:root {
  --ink: #14231f;
  --ink-soft: #30423c;
  --muted: #6f7d78;
  --line: #dfe6e2;
  --paper: #f5f7f4;
  --card: #ffffff;
  --forest: #123f33;
  --forest-2: #1e5b49;
  --mint: #dceee6;
  --lime: #d6f36c;
  --amber: #d98a28;
  --red: #bd4436;
  --shadow: 0 20px 60px rgba(24, 55, 46, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--paper); font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; line-height: 1.6; }
button, input, textarea { font: inherit; }
button, a, label { -webkit-tap-highlight-color: transparent; }
.hidden { display: none !important; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; font-size: 16px; font-weight: 800; text-decoration: none; }
.brand-symbol { width: 35px; height: 35px; display: grid; place-items: center; overflow: hidden; border-radius: 10px; background: #fff; }
.brand-symbol img { width: 100%; height: 100%; object-fit: cover; }
.kicker { margin: 0 0 7px; color: var(--forest-2); font-size: 11px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }

.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 28px; background: var(--forest); }
.login-screen::before { position: fixed; content: ""; inset: 0; opacity: .2; background-image: linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px); background-size: 48px 48px; }
.login-shell { position: relative; width: min(920px, 100%); min-height: 570px; display: grid; grid-template-columns: 1.15fr .85fr; grid-template-rows: auto 1fr; gap: 32px 70px; padding: 44px; border-radius: 28px; background: #f8faf7; box-shadow: 0 35px 100px rgba(0,0,0,.24); }
.login-shell > .brand { grid-column: 1 / -1; align-self: start; }
.login-copy { align-self: center; }
.login-copy h1 { margin: 0; font-size: clamp(42px, 5vw, 66px); line-height: 1.08; letter-spacing: -.06em; }
.login-copy > p:last-child { max-width: 430px; margin: 22px 0 0; color: var(--muted); font-size: 16px; }
.login-form { align-self: center; padding: 30px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: var(--shadow); }
.login-form label { display: block; margin-bottom: 8px; color: var(--ink-soft); font-size: 13px; font-weight: 750; }
.login-form input, .notes-field textarea { width: 100%; border: 1px solid #cfd9d4; border-radius: 11px; outline: none; background: #fff; color: var(--ink); transition: .2s; }
.login-form input { height: 50px; padding: 0 14px; letter-spacing: .08em; }
.login-form input:focus, .notes-field textarea:focus { border-color: var(--forest-2); box-shadow: 0 0 0 3px rgba(30,91,73,.1); }
.form-error { min-height: 24px; margin: 7px 0; color: var(--red); font-size: 12px; }
.login-shell.compact { min-height: auto; grid-template-columns: 1fr; }

.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 20px; border: 1px solid transparent; border-radius: 10px; cursor: pointer; font-weight: 800; transition: .18s ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.button-solid { color: #fff; background: var(--forest); box-shadow: 0 8px 20px rgba(18,63,51,.18); }
.button-solid:hover { background: var(--forest-2); }
.button-ghost { color: var(--ink-soft); border-color: var(--line); background: #fff; }
.button-accent { color: #172219; background: var(--lime); border-color: #b7d645; box-shadow: 0 8px 20px rgba(160,190,54,.2); }
.login-form .button { width: 100%; }
.text-button { border: 0; padding: 5px; cursor: pointer; color: var(--muted); background: transparent; }

.topbar { height: 66px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 max(24px, calc((100vw - 1240px) / 2)); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(14px); position: sticky; top: 0; z-index: 30; }
.topbar-center { display: flex; align-items: center; gap: 8px; color: var(--ink-soft); font-size: 13px; font-weight: 750; }
.product-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(184,216,75,.16); }
.topbar-actions { justify-self: end; display: flex; align-items: center; gap: 16px; color: var(--muted); font-size: 12px; }
.app-shell { width: min(1240px, calc(100% - 42px)); margin: 0 auto; padding: 50px 0 90px; }
.notice { margin-bottom: 18px; padding: 13px 16px; border-radius: 11px; font-size: 13px; }
.notice.warning { color: #815216; background: #fff3d9; }
.notice.error { color: #992e26; background: #ffeae6; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 32px; }
.page-heading h1 { margin: 0; font-size: clamp(34px, 4vw, 52px); line-height: 1.1; letter-spacing: -.055em; }
.page-heading div > p:last-child { margin: 10px 0 0; color: var(--muted); }
.subtle-link { flex: 0 0 auto; color: var(--forest-2); font-size: 13px; font-weight: 750; text-decoration: none; border-bottom: 1px solid currentColor; }

.setup-layout { display: grid; grid-template-columns: 245px minmax(0, 1fr); gap: 26px; align-items: start; }
.setup-rail { position: sticky; top: 94px; padding: 25px 22px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.75); }
.rail-item { display: flex; align-items: center; gap: 13px; opacity: .45; transition: .2s; }
.rail-item > span { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid #cbd7d1; border-radius: 50%; font-size: 11px; font-weight: 850; background: #fff; }
.rail-item strong, .rail-item small { display: block; }
.rail-item strong { font-size: 14px; }
.rail-item small { color: var(--muted); font-size: 11px; }
.rail-item.active, .rail-item.done { opacity: 1; }
.rail-item.active > span { color: #fff; border-color: var(--forest); background: var(--forest); }
.rail-item.done > span { color: var(--forest); border-color: #adc8bc; background: var(--mint); }
.rail-line { width: 1px; height: 28px; margin: 5px 0 5px 18px; background: var(--line); }
.rail-note { margin-top: 28px; padding: 15px; border-radius: 12px; color: #426257; background: var(--mint); }
.rail-note strong { font-size: 12px; }
.rail-note p { margin: 4px 0 0; font-size: 11px; }
.step-card { min-height: 570px; border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: var(--shadow); overflow: hidden; }
.form-step { display: none; min-height: 570px; padding: 36px 40px 30px; }
.form-step.active { display: flex; flex-direction: column; }
.step-heading { display: flex; align-items: start; gap: 14px; }
.step-heading > span { color: #93a29c; font-size: 12px; font-weight: 850; letter-spacing: .08em; padding-top: 4px; }
.step-heading p { margin: 0; color: var(--forest-2); font-size: 11px; font-weight: 850; letter-spacing: .12em; }
.step-heading h2 { margin: 3px 0 0; font-size: 28px; letter-spacing: -.04em; }
.step-intro { max-width: 720px; margin: 14px 0 25px 30px; color: var(--muted); font-size: 14px; }
.document-drop { min-height: 180px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; border: 1.5px dashed #b7c6bf; border-radius: 16px; text-align: center; cursor: pointer; background: #fbfcfb; transition: .2s; }
.document-drop:hover, .document-drop.has-files { border-color: var(--forest-2); background: #f3f8f5; }
.document-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.drop-icon { width: 45px; height: 45px; display: grid; place-items: center; margin-bottom: 12px; border-radius: 13px; color: var(--forest); background: var(--mint); font-size: 15px; font-weight: 900; }
.document-drop strong { font-size: 16px; }
.document-drop small { max-width: 480px; margin-top: 5px; color: var(--muted); font-size: 12px; font-weight: 500; }
.document-drop.has-files small { color: var(--forest-2); }
.primary-drop { min-height: 220px; }
.file-tip { display: flex; gap: 13px; margin-top: 16px; padding: 13px 16px; border-radius: 11px; background: #f5f7f5; color: var(--muted); font-size: 12px; }
.file-tip span { flex: 0 0 auto; color: var(--forest-2); font-weight: 800; }
.file-tip p { margin: 0; }
.evidence-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.evidence-warning { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 13px 15px; border-left: 3px solid var(--amber); background: #fffaf1; color: #725d3e; font-size: 12px; }
.evidence-warning b { flex: 0 0 auto; color: #714817; }
.step-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 28px; }
.scope-flow { display: grid; grid-template-columns: repeat(9, auto); align-items: center; justify-content: space-between; gap: 8px; margin: 8px 0 24px; padding: 22px; border-radius: 16px; background: var(--forest); color: #fff; }
.scope-flow > div { min-width: 104px; }
.scope-flow span { width: 24px; height: 24px; display: grid; place-items: center; margin-bottom: 8px; border-radius: 50%; color: var(--forest); background: var(--lime); font-size: 10px; font-weight: 900; }
.scope-flow strong, .scope-flow small { display: block; }
.scope-flow strong { font-size: 14px; }
.scope-flow small { margin-top: 3px; color: #b9cec6; font-size: 10px; }
.scope-flow i { color: #6d9083; font-style: normal; }
.file-review { display: grid; gap: 8px; margin-bottom: 18px; }
.review-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 12px; }
.review-row span { color: var(--muted); }
.review-row strong { max-width: 70%; text-align: right; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.notes-field { display: grid; gap: 7px; color: var(--ink-soft); font-size: 13px; font-weight: 750; }
.notes-field textarea { padding: 11px 13px; resize: vertical; }
.confirmation { display: flex; align-items: start; gap: 10px; margin-top: 16px; color: var(--muted); font-size: 12px; cursor: pointer; }
.confirmation input { flex: 0 0 auto; width: 17px; height: 17px; margin-top: 1px; accent-color: var(--forest); }

.analysis-screen { min-height: 650px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.analysis-orbit { position: relative; width: 92px; height: 92px; display: grid; place-items: center; margin-bottom: 24px; border: 1px solid #afc1b9; border-radius: 50%; }
.analysis-orbit::after { position: absolute; content: ""; inset: 13px; border-radius: 50%; background: var(--forest); }
.analysis-orbit b { z-index: 1; color: var(--lime); letter-spacing: .05em; }
.analysis-orbit span { position: absolute; width: 10px; height: 10px; top: -5px; border-radius: 50%; background: var(--lime); transform-origin: 5px 51px; animation: orbit 1.5s linear infinite; }
@keyframes orbit { to { transform: rotate(360deg); } }
.analysis-screen h2 { margin: 0; font-size: 32px; letter-spacing: -.04em; }
.analysis-screen > p:not(.kicker) { color: var(--muted); }
.analysis-progress { width: min(500px, 85vw); height: 5px; margin: 22px 0 18px; overflow: hidden; border-radius: 99px; background: #dfe6e2; }
.analysis-progress i { display: block; width: 8%; height: 100%; border-radius: inherit; background: var(--forest-2); transition: width .6s; }
.analysis-stages { display: flex; gap: 26px; color: #a0aaa6; font-size: 12px; }
.analysis-stages span.active { color: var(--forest); font-weight: 800; }

.result-hero { display: flex; align-items: end; justify-content: space-between; gap: 30px; padding: 34px 38px; border-radius: 22px; color: #fff; background: var(--forest); box-shadow: var(--shadow); }
.result-hero .kicker { color: var(--lime); }
.result-hero h1 { margin: 0; font-size: clamp(30px, 4vw, 46px); letter-spacing: -.05em; }
.result-hero p:last-child { margin: 8px 0 0; color: #b9cec6; }
.hero-decision { flex: 0 0 180px; padding: 17px; border: 1px solid rgba(255,255,255,.2); border-radius: 14px; background: rgba(255,255,255,.08); }
.hero-decision span, .hero-decision strong, .hero-decision small { display: block; }
.hero-decision span, .hero-decision small { color: #b9cec6; font-size: 11px; }
.hero-decision strong { margin: 4px 0; color: var(--lime); font-size: 23px; }
.result-actions { display: flex; justify-content: flex-end; gap: 10px; margin: 18px 0 24px; }
.result-layout { display: grid; grid-template-columns: 205px minmax(0, 1fr); gap: 22px; align-items: start; }
.result-nav { position: sticky; top: 92px; display: grid; padding: 18px 12px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.result-nav p { margin: 0 10px 10px; color: #98a49f; font-size: 10px; font-weight: 850; letter-spacing: .12em; }
.result-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--muted); font-size: 12px; font-weight: 700; text-decoration: none; }
.result-nav a:hover, .result-nav a.active { color: var(--forest); background: #eff5f2; }
.result-nav span { font-size: 9px; }
.result-content { display: grid; gap: 18px; }
.report-section { scroll-margin-top: 90px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 8px 28px rgba(24,55,46,.04); overflow: hidden; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.section-head div { display: flex; align-items: baseline; gap: 10px; }
.section-head span { color: #98a49f; font-size: 10px; font-weight: 850; }
.section-head h2 { margin: 0; font-size: 20px; letter-spacing: -.025em; }
.section-head small { color: var(--muted); font-size: 11px; }
.section-body { padding: 23px 24px; }
.overview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.overview-item { min-height: 82px; padding: 13px 14px; border-radius: 11px; background: #f5f8f6; }
.overview-item span, .overview-item strong { display: block; }
.overview-item span { color: var(--muted); font-size: 10px; }
.overview-item strong { margin-top: 5px; font-size: 13px; }
.summary-copy { margin: 0; color: var(--ink-soft); white-space: pre-wrap; }
.matrix-wrap { overflow-x: auto; }
.matrix { width: 100%; border-collapse: collapse; font-size: 12px; }
.matrix th { padding: 10px 11px; border-bottom: 1px solid var(--line); color: var(--muted); background: #f7f9f7; text-align: left; white-space: nowrap; }
.matrix td { min-width: 110px; padding: 12px 11px; border-bottom: 1px solid #edf1ef; vertical-align: top; color: var(--ink-soft); }
.matrix tr:last-child td { border-bottom: 0; }
.subsection-title { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 26px 0 12px; padding-top: 22px; border-top: 1px solid var(--line); }
.subsection-title.first { margin-top: 0; padding-top: 0; border-top: 0; }
.subsection-title h3 { margin: 0; font-size: 15px; }
.subsection-title span { color: var(--muted); font-size: 11px; }
.status-badge { display: inline-flex; padding: 3px 8px; border-radius: 99px; font-size: 10px; font-weight: 850; white-space: nowrap; }
.status-pass { color: #176543; background: #e2f4ea; }
.status-fail { color: #a0382e; background: #fde8e5; }
.status-pending { color: #83571c; background: #fff2d8; }
.decision-grid { display: grid; grid-template-columns: 210px 1fr; gap: 22px; }
.score-panel { display: grid; place-items: center; min-height: 190px; border-radius: 15px; text-align: center; color: #fff; background: var(--forest); }
.score-panel b { font-size: 54px; line-height: 1; }
.score-panel span, .score-panel small { display: block; color: #b9cec6; }
.score-panel strong { display: block; margin: 8px 0 2px; color: var(--lime); font-size: 20px; }
.decision-copy h3 { margin: 0 0 7px; font-size: 15px; }
.decision-copy p { margin: 0 0 16px; color: var(--ink-soft); }
.clean-list { margin: 0; padding-left: 19px; color: var(--ink-soft); }
.clean-list li { margin: 6px 0; }
.two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.subpanel { padding: 17px; border: 1px solid var(--line); border-radius: 12px; }
.subpanel h3 { margin: 0 0 10px; font-size: 14px; }
.draft-list { display: grid; gap: 9px; }
.draft { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.draft summary { padding: 14px 16px; cursor: pointer; font-weight: 800; background: #f8faf8; }
.draft-content { padding: 17px; border-top: 1px solid var(--line); }
.draft-content p { margin: 0 0 12px; color: var(--ink-soft); white-space: pre-wrap; }
.evidence-line, .placeholder-line { padding: 10px 12px; border-radius: 9px; font-size: 11px; }
.evidence-line { color: #426257; background: #eef6f2; }
.placeholder-line { margin-top: 7px; color: #815216; background: #fff7e8; }
.empty { margin: 0; color: #98a49f; }
.manual-check { width: 16px; height: 16px; accent-color: var(--forest); }

@media (max-width: 980px) {
  .setup-layout, .result-layout { grid-template-columns: 1fr; }
  .setup-rail { position: static; display: flex; align-items: center; gap: 10px; }
  .rail-line { width: 24px; height: 1px; margin: 0; }
  .rail-note { display: none; }
  .result-nav { position: static; grid-template-columns: repeat(3, 1fr); }
  .result-nav p { grid-column: 1 / -1; }
  .scope-flow { grid-template-columns: repeat(5, 1fr); }
  .scope-flow i { display: none; }
}

@media (max-width: 680px) {
  .login-screen { padding: 14px; }
  .login-shell { min-height: 0; grid-template-columns: 1fr; gap: 28px; padding: 26px 22px; }
  .login-copy h1 { font-size: 42px; }
  .login-form { padding: 22px; }
  .topbar { grid-template-columns: 1fr auto; padding: 0 14px; }
  .topbar-center { display: none; }
  #user-label { display: none; }
  .app-shell { width: min(100% - 24px, 1240px); padding-top: 30px; }
  .page-heading, .result-hero { align-items: stretch; flex-direction: column; }
  .page-heading h1 { font-size: 38px; }
  .setup-rail { padding: 14px; justify-content: space-between; }
  .rail-item { gap: 6px; }
  .rail-item small { display: none; }
  .rail-item > span { width: 30px; height: 30px; }
  .form-step { min-height: 0; padding: 25px 19px; }
  .step-intro { margin-left: 0; }
  .evidence-grid, .overview-grid, .two-column, .decision-grid { grid-template-columns: 1fr; }
  .document-drop { min-height: 160px; }
  .step-actions { align-items: stretch; flex-direction: column-reverse; }
  .step-actions .button { width: 100%; }
  .scope-flow { grid-template-columns: 1fr 1fr; padding: 16px; }
  .scope-flow > div { min-width: 0; }
  .scope-flow > div:last-child { grid-column: 1 / -1; }
  .result-hero { padding: 26px 22px; }
  .hero-decision { flex-basis: auto; }
  .result-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .result-nav { grid-template-columns: 1fr 1fr; }
  .section-head { align-items: start; flex-direction: column; }
  .section-body { padding: 18px; }
}
