:root {
  --ink: #20231f;
  --muted: #777b72;
  --paper: #f6f5ef;
  --card: rgba(255, 255, 252, 0.94);
  --line: #e5e4dc;
  --green: #1e5945;
  --green-2: #2e725b;
  --green-soft: #e6efe9;
  --lime: #d7e89a;
  --orange: #d76c37;
  --orange-soft: #fbebe1;
  --red: #b4483c;
  --yellow: #f1c85b;
  --blue: #5e7e91;
  --shadow: 0 18px 50px rgba(37, 48, 39, 0.09);
  --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    linear-gradient(rgba(30,89,69,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30,89,69,.025) 1px, transparent 1px),
    var(--paper);
  background-size: 28px 28px;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  line-height: 1.5;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
svg { display: block; }

.ambient { position: fixed; z-index: -1; border-radius: 999px; filter: blur(4px); pointer-events: none; }
.ambient-one { width: 360px; height: 360px; right: -120px; top: 80px; background: rgba(215,232,154,.3); }
.ambient-two { width: 300px; height: 300px; left: -150px; top: 460px; background: rgba(146,193,171,.18); }

.site-header {
  width: min(1180px, calc(100% - 32px));
  height: 84px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { color: inherit; text-decoration: none; display: inline-flex; gap: 12px; align-items: center; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: var(--green); color: white; }
.brand-mark svg { width: 28px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.brand strong { display: block; font-size: 22px; letter-spacing: .1em; }
.brand small { display: block; font-size: 11px; color: var(--muted); letter-spacing: .06em; }
.icon-button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: rgba(255,255,255,.66); color: var(--green); font-weight: 800; }

.app-shell { width: min(1100px, calc(100% - 32px)); margin: 12px auto 72px; }
.hero { display: flex; align-items: end; justify-content: space-between; gap: 40px; padding: 42px 0 34px; }
.eyebrow, .section-kicker { color: var(--green-2); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.hero h1 { max-width: 760px; margin: 10px 0 18px; font-size: clamp(38px, 6vw, 70px); line-height: 1.08; letter-spacing: -.045em; font-family: "Songti SC", "STSong", serif; font-weight: 700; }
.hero h1 em { color: var(--green); font-style: normal; box-shadow: inset 0 -.17em 0 var(--lime); }
.hero p { max-width: 680px; margin: 0; color: var(--muted); font-size: 16px; }
.trust-pill { flex: none; margin-bottom: 6px; border: 1px solid var(--line); padding: 10px 14px; border-radius: 100px; background: rgba(255,255,255,.68); font-size: 12px; color: var(--muted); }
.trust-pill span { display: inline-block; width: 7px; height: 7px; margin-right: 7px; background: #4fa879; border-radius: 50%; box-shadow: 0 0 0 4px rgba(79,168,121,.12); }

.stepper { margin: 0 0 24px; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3,1fr); position: relative; }
.stepper::before { content: ""; height: 1px; position: absolute; left: 16.66%; right: 16.66%; top: 17px; background: var(--line); }
.stepper li { z-index: 1; display: grid; justify-items: center; gap: 6px; color: #a4a69f; font-size: 12px; font-weight: 700; }
.stepper span { width: 34px; height: 34px; display: grid; place-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 50%; transition: .25s; }
.stepper p { margin: 0; }
.stepper li.active { color: var(--green); }
.stepper li.active span { color: white; border-color: var(--green); background: var(--green); box-shadow: 0 0 0 5px rgba(30,89,69,.09); }
.stepper li.done span { color: var(--green); border-color: var(--green); background: #edf5f0; }

.view { display: none; animation: fadeUp .4s ease both; }
.view.active { display: block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.upload-card, .processing-card, .panel-card {
  background: var(--card);
  border: 1px solid rgba(218,218,208,.85);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.upload-card { text-align: center; padding: 42px clamp(22px, 6vw, 70px) 36px; }
.upload-illustration { width: 134px; margin: -4px auto 16px; color: var(--green); }
.upload-illustration svg { fill: #f8faf6; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.upload-illustration circle { fill: var(--lime); }
.upload-card h2, .processing-card h2 { margin: 8px 0 8px; font-family: "Songti SC", "STSong", serif; font-size: clamp(26px, 4vw, 38px); }
.muted { color: var(--muted); }
.upload-actions { max-width: 650px; margin: 28px auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.primary-action, .secondary-action, .analyze-button, .sticky-result button {
  min-height: 52px; border-radius: 14px; border: 0; font-weight: 800; transition: transform .15s, box-shadow .15s, background .15s;
}
.primary-action:hover, .secondary-action:hover, .analyze-button:not(:disabled):hover, .sticky-result button:hover { transform: translateY(-1px); }
.primary-action { color: white; background: var(--green); box-shadow: 0 8px 18px rgba(30,89,69,.2); }
.secondary-action { color: var(--green); border: 1px solid #cbd9d0; background: #f5faf6; }
.upload-actions button { display: flex; justify-content: center; align-items: center; gap: 9px; }
.upload-actions svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.file-list { max-width: 650px; margin: 16px auto 0; text-align: left; }
.file-item { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; background: #f3f5f0; border: 1px solid var(--line); }
.file-item + .file-item { margin-top: 8px; }
.file-icon { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--green-soft); color: var(--green); font-weight: 900; font-size: 11px; }
.file-meta { min-width: 0; flex: 1; }
.file-meta strong, .file-meta small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-meta small { color: var(--muted); }
.remove-file { border: 0; color: var(--muted); background: transparent; font-size: 22px; }
.analyze-button { display: block; width: min(650px, 100%); margin: 14px auto 0; color: white; background: var(--green); }
.analyze-button:disabled { background: #bbbeb6; cursor: not-allowed; }
.demo-divider { max-width: 650px; margin: 25px auto 10px; display: flex; gap: 13px; align-items: center; color: #a3a59f; font-size: 12px; }
.demo-divider::before, .demo-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.text-button { border: 0; background: transparent; color: var(--green); font-weight: 800; }
.feature-strip { margin-top: 18px; display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.feature-strip article { display: flex; gap: 13px; align-items: center; padding: 20px; background: rgba(255,255,255,.58); border: 1px solid var(--line); border-radius: 18px; }
.feature-strip b { color: #a6b5a9; font-family: Georgia, serif; font-size: 24px; }
.feature-strip strong, .feature-strip small { display: block; }
.feature-strip small { color: var(--muted); }

.processing-card { padding: 46px clamp(20px,6vw,80px); text-align: center; }
.scan-frame { width: 170px; height: 150px; position: relative; margin: 0 auto 18px; display: grid; place-items: center; overflow: hidden; }
.mock-document { width: 100px; height: 130px; padding: 24px 14px; background: white; border: 1px solid #d7dbd2; border-radius: 8px; transform: rotate(-3deg); box-shadow: 0 12px 25px rgba(40,60,49,.12); }
.mock-document span { display: block; height: 5px; margin: 0 0 12px; background: #dce3dc; border-radius: 4px; }
.mock-document span:nth-child(2), .mock-document span:nth-child(4) { width: 70%; }
.scan-line { position: absolute; left: 20px; right: 20px; top: 16px; height: 2px; background: #55b883; box-shadow: 0 0 13px #55b883; animation: scan 1.8s ease-in-out infinite alternate; }
@keyframes scan { to { transform: translateY(115px); } }
.pipeline { max-width: 660px; margin: 30px auto 0; text-align: left; }
.pipeline-item { min-height: 52px; display: grid; grid-template-columns: 18px 1fr auto; gap: 12px; align-items: center; padding: 0 10px; color: #989b94; border-bottom: 1px solid var(--line); }
.pipeline-item i { width: 11px; height: 11px; border: 2px solid #c7cac3; border-radius: 50%; }
.pipeline-item b { font-size: 11px; }
.pipeline-item.active { color: var(--green); }
.pipeline-item.active i { border-color: var(--green); background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.pipeline-item.processing i { border-top-color: var(--green); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.processing-note { margin: 20px 0 0; color: #9a9d96; font-size: 12px; }

.result-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin: 8px 0 22px; }
.result-heading h2 { margin: 6px 0 3px; font-family: "Songti SC", "STSong", serif; font-size: clamp(28px,4vw,44px); }
.result-heading p { margin: 0; color: var(--muted); }
.outline-button { min-height: 38px; padding: 0 15px; color: var(--green); border: 1px solid #cad4cc; border-radius: 11px; background: rgba(255,255,255,.7); font-weight: 700; }
.summary-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.summary-card { min-height: 150px; padding: 24px; display: flex; flex-direction: column; border-radius: 20px; border: 1px solid var(--line); background: rgba(255,255,255,.78); }
.summary-card > span { color: var(--muted); font-size: 13px; }
.summary-card strong { margin: auto 0 2px; font-family: Georgia, serif; font-size: clamp(28px,4vw,40px); letter-spacing: -.03em; }
.summary-card > small { color: var(--muted); font-size: 12px; }
.summary-card.forecast { color: white; background: var(--green); border-color: var(--green); box-shadow: 0 16px 30px rgba(30,89,69,.18); }
.summary-card.forecast > span, .summary-card.forecast > small { color: rgba(255,255,255,.72); }
.summary-card.risk strong { color: var(--orange); }
.summary-card.risk strong small { margin-left: 3px; font-family: inherit; font-size: 14px; }

.result-tabs { margin: 28px 0 16px; display: flex; gap: 4px; overflow-x: auto; padding-bottom: 2px; border-bottom: 1px solid var(--line); }
.result-tabs button { flex: none; position: relative; padding: 13px 18px; border: 0; background: transparent; color: var(--muted); font-weight: 700; }
.result-tabs button.active { color: var(--green); }
.result-tabs button.active::after { content: ""; height: 3px; position: absolute; left: 12px; right: 12px; bottom: -2px; background: var(--green); border-radius: 3px 3px 0 0; }
.result-tabs i { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-left: 3px; color: white; background: var(--orange); border-radius: 50%; font-size: 10px; font-style: normal; }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeUp .3s ease both; }
.panel-card { padding: 26px; margin-bottom: 14px; }
.panel-heading { display: flex; justify-content: space-between; gap: 18px; align-items: start; margin-bottom: 24px; }
.panel-heading h3, .config-intro h3 { margin: 5px 0 0; font-family: "Songti SC", "STSong", serif; font-size: 27px; }
.confidence { flex: none; padding: 7px 10px; color: var(--green); background: var(--green-soft); border-radius: 100px; font-size: 11px; font-weight: 700; }
.chart-layout { display: grid; grid-template-columns: 280px 1fr; gap: 46px; align-items: center; }
.donut { width: 240px; aspect-ratio: 1; margin: auto; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--green) 0 45%, var(--orange) 45% 63%, var(--yellow) 63% 76%, var(--blue) 76% 88%, #9ab7a6 88% 100%); position: relative; }
.donut::before { content: ""; width: 62%; aspect-ratio: 1; position: absolute; border-radius: 50%; background: white; }
.donut div { z-index: 1; text-align: center; }
.donut strong, .donut span { display: block; }
.donut strong { font-family: Georgia, serif; font-size: 21px; }
.donut span { color: var(--muted); font-size: 11px; }
.legend { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; }
.legend-item { display: grid; grid-template-columns: 10px 1fr auto; gap: 9px; align-items: center; }
.legend-item i { width: 9px; height: 9px; border-radius: 50%; }
.legend-item span strong, .legend-item span small { display: block; }
.legend-item span small { color: var(--muted); font-size: 11px; }
.legend-item > strong { font-family: Georgia, serif; }
.room-list { display: grid; gap: 11px; }
.room-row { display: grid; grid-template-columns: 120px 1fr 100px; gap: 14px; align-items: center; }
.room-row span small { display: block; color: var(--muted); }
.room-track { height: 10px; overflow: hidden; background: #eff0eb; border-radius: 20px; }
.room-track i { height: 100%; display: block; border-radius: 20px; background: linear-gradient(90deg,var(--green),#74a88c); }
.room-row > strong { text-align: right; font-family: Georgia, serif; }

.risk-banner { display: grid; grid-template-columns: 40px 1fr; gap: 15px; padding: 18px; margin-bottom: 12px; border: 1px solid #f1c8b3; border-radius: 18px; background: var(--orange-soft); }
.risk-banner > div span { width: 34px; height: 34px; display: grid; place-items: center; color: white; background: var(--orange); border-radius: 50%; font-weight: 900; }
.risk-banner p { margin: 0; color: #734229; }
.risk-list { display: grid; gap: 10px; }
.risk-item { display: grid; grid-template-columns: 9px 1fr auto; gap: 15px; align-items: start; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.78); }
.risk-item > i { width: 9px; height: 9px; margin-top: 8px; border-radius: 50%; background: var(--yellow); }
.risk-item.high > i { background: var(--red); }
.risk-item.medium > i { background: var(--orange); }
.risk-item h4 { margin: 0 0 4px; }
.risk-item p { margin: 0; color: var(--muted); font-size: 13px; }
.risk-item button { padding: 6px 10px; color: var(--green); border: 0; border-radius: 9px; background: var(--green-soft); font-size: 11px; font-weight: 700; }

.config-intro { display: flex; justify-content: space-between; align-items: center; gap: 30px; }
.config-intro p { margin: 6px 0 0; color: var(--muted); }
.price-change { flex: none; min-width: 210px; padding-left: 30px; border-left: 1px solid var(--line); }
.price-change span, .price-change strong, .price-change small { display: block; }
.price-change span, .price-change small { color: var(--muted); font-size: 12px; }
.price-change strong { margin: 3px 0; color: var(--green); font-family: Georgia, serif; font-size: 27px; }
.config-list { display: grid; gap: 10px; }
.config-card { padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.78); }
.config-card-header { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 15px; }
.config-card-header h4 { margin: 0; }
.config-card-header small { color: var(--muted); }
.config-card-header strong { font-family: Georgia, serif; }
.config-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field label { display: block; margin: 0 0 5px; color: var(--muted); font-size: 11px; }
.field select { width: 100%; height: 42px; padding: 0 34px 0 12px; border: 1px solid #d9ddd5; border-radius: 10px; color: var(--ink); background: #fbfcfa; }
.sticky-result { position: sticky; bottom: 12px; margin-top: 16px; padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; border: 1px solid #cad8cd; border-radius: 18px; background: rgba(246,250,247,.94); backdrop-filter: blur(12px); box-shadow: 0 12px 30px rgba(30,60,44,.14); }
.sticky-result span, .sticky-result strong { display: block; }
.sticky-result span { color: var(--muted); font-size: 11px; }
.sticky-result strong { font-family: Georgia, serif; font-size: 24px; }
.sticky-result button { padding: 0 24px; color: white; background: var(--green); }

.raw-heading { align-items: center; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 720px; font-size: 13px; }
th { padding: 10px; color: var(--muted); background: #f3f4f0; text-align: left; }
td { padding: 13px 10px; border-bottom: 1px solid var(--line); }
.status-chip { padding: 4px 7px; color: var(--green); background: var(--green-soft); border-radius: 7px; font-size: 10px; }
.status-chip.warn { color: #a24a24; background: var(--orange-soft); }

footer { width: min(1100px, calc(100% - 32px)); margin: 0 auto 40px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 11px; }
footer strong { color: var(--green); }

dialog { width: min(520px, calc(100% - 32px)); padding: 30px; border: 0; border-radius: 22px; color: var(--ink); box-shadow: 0 28px 90px rgba(20,38,29,.25); }
dialog::backdrop { background: rgba(24,32,28,.42); backdrop-filter: blur(3px); }
dialog h2 { margin: 7px 0 14px; font-family: "Songti SC", "STSong", serif; }
dialog ol { padding-left: 20px; color: var(--muted); }
dialog li { margin: 8px 0; }
dialog code { padding: 2px 5px; border-radius: 4px; background: #eef0eb; color: var(--green); }
dialog .primary-action { width: 100%; }
.dialog-close { position: absolute; right: 17px; top: 14px; border: 0; background: transparent; color: var(--muted); font-size: 26px; }
.toast { position: fixed; z-index: 20; left: 50%; bottom: 25px; transform: translate(-50%,20px); padding: 10px 16px; color: white; background: #27342d; border-radius: 10px; opacity: 0; pointer-events: none; transition: .25s; font-size: 13px; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translate(-50%,0); }

@media (max-width: 720px) {
  .site-header { height: 70px; }
  .app-shell { width: min(100% - 24px, 1100px); margin-top: 0; }
  .hero { display: block; padding: 24px 0 26px; }
  .hero h1 { font-size: 39px; }
  .hero p { font-size: 14px; }
  .trust-pill { display: inline-block; margin-top: 17px; }
  .stepper { margin-bottom: 16px; }
  .upload-card { padding: 28px 16px 25px; border-radius: 20px; }
  .upload-illustration { width: 108px; }
  .upload-actions { grid-template-columns: 1fr; }
  .feature-strip { grid-template-columns: 1fr; gap: 7px; }
  .feature-strip article { padding: 13px 16px; }
  .processing-card { padding: 35px 14px; }
  .pipeline-item { padding: 0 2px; font-size: 12px; }
  .result-heading { align-items: start; }
  .result-heading .outline-button { padding: 0 10px; font-size: 11px; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .summary-card { min-height: 130px; padding: 18px; }
  .summary-card.forecast { grid-column: 1 / -1; grid-row: 1; }
  .summary-card strong { font-size: 30px; }
  .result-tabs button { padding: 12px 13px; font-size: 13px; }
  .panel-card { padding: 19px; border-radius: 20px; }
  .panel-heading h3, .config-intro h3 { font-size: 23px; }
  .chart-layout { grid-template-columns: 1fr; gap: 28px; }
  .donut { width: 210px; }
  .legend { grid-template-columns: 1fr; gap: 12px; }
  .room-row { grid-template-columns: 80px 1fr 72px; font-size: 12px; gap: 9px; }
  .risk-item { grid-template-columns: 8px 1fr; padding: 16px; }
  .risk-item button { grid-column: 2; justify-self: start; }
  .config-intro { display: block; }
  .price-change { margin-top: 18px; padding: 15px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .config-controls { grid-template-columns: 1fr; }
  .sticky-result button { padding: 0 15px; font-size: 12px; }
  footer { display: block; }
  footer span { display: block; margin-top: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
