:root {
  color-scheme: light;
  --ink: #17201d;
  --muted: #65716c;
  --paper: #ffffff;
  --canvas: #f2f5f1;
  --line: #dfe6e1;
  --green: #184f3b;
  --green-2: #267257;
  --green-soft: #e8f2ed;
  --lime: #d8e9b9;
  --amber: #b66b20;
  --red: #a93f38;
  --blue: #476a8e;
  --shadow: 0 18px 55px rgba(31, 54, 44, .09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
p { color: var(--muted); line-height: 1.7; }

.topbar {
  height: 72px;
  padding: 0 clamp(20px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
}
.brand { display: flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: var(--green); color: white; font: 800 21px Georgia, serif;
}
.brand strong, .brand small { display: block; }
.brand strong { font: 700 19px Georgia, serif; letter-spacing: .02em; }
.brand small { color: var(--muted); font-size: 10px; margin-top: 1px; }
.topbar-actions { display: flex; align-items: center; gap: 15px; }
.privacy-note { color: var(--muted); font-size: 12px; }
.user-pill {
  border: 1px solid var(--line); background: var(--paper); border-radius: 999px;
  padding: 8px 13px; color: var(--ink); font-size: 13px;
}

.intro {
  min-height: 420px;
  padding: 64px clamp(20px, 6vw, 90px);
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, .72fr);
  gap: clamp(36px, 7vw, 110px);
  align-items: center;
  background:
    radial-gradient(circle at 75% 20%, rgba(216,233,185,.8), transparent 27%),
    linear-gradient(140deg, #edf3ed 0%, #f7f4e9 100%);
  border-bottom: 1px solid var(--line);
}
.kicker { color: var(--green-2); font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.intro h1 { margin: 15px 0 20px; font: 600 clamp(38px, 5.2vw, 72px)/1.08 Georgia, "Songti SC", serif; letter-spacing: -.035em; }
.intro h1 em { color: var(--green); font-style: normal; }
.intro-copy > p { max-width: 720px; font-size: 17px; margin: 0 0 25px; }
.trust-row { display: flex; gap: 20px; flex-wrap: wrap; font-size: 13px; color: #44524c; }
.trust-row span::before { content: "✓"; color: var(--green-2); font-weight: 900; margin-right: 7px; }
.flow-card { background: rgba(255,255,255,.82); padding: 25px; border: 1px solid rgba(255,255,255,.9); border-radius: 24px; box-shadow: var(--shadow); }
.flow-head { display: flex; justify-content: space-between; font-size: 13px; border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.flow-head b { color: var(--green-2); }
.flow-card ol { list-style: none; padding: 6px 0 0; margin: 0; }
.flow-card li { display: grid; grid-template-columns: 42px 1fr; gap: 12px; align-items: center; padding: 12px 0; }
.flow-card i { font: 700 12px Georgia, serif; color: var(--green-2); width: 34px; height: 34px; border-radius: 50%; background: var(--green-soft); display: grid; place-items: center; }
.flow-card strong, .flow-card small { display: block; }
.flow-card strong { font-size: 14px; }
.flow-card small { color: var(--muted); margin-top: 3px; }

.app-shell {
  max-width: 1600px;
  margin: 0 auto;
  padding: 28px clamp(16px, 3vw, 48px) 70px;
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.sidebar { position: sticky; top: 92px; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.side-section { padding: 20px; border-bottom: 1px solid var(--line); }
.side-section:last-child { border-bottom: 0; }
.section-label { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.section-label span { font-weight: 800; font-size: 14px; }
.section-label b { color: var(--muted); font-size: 11px; font-weight: 600; }
.field { display: grid; gap: 7px; color: var(--ink); font-size: 12px; }
.field > span { font-weight: 700; }
.field small { color: var(--muted); line-height: 1.5; }
input, select {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; background: white;
  padding: 11px 12px; color: var(--ink); outline: none;
}
input:focus, select:focus { border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(38,114,87,.1); }
form { display: grid; gap: 11px; }
.primary, .secondary, .download, .icon-danger, .text-button {
  border: 0; border-radius: 10px; padding: 11px 15px; font-weight: 750; transition: .16s ease;
}
.primary { color: white; background: var(--green); }
.primary:hover:not(:disabled) { background: #0f3d2d; transform: translateY(-1px); }
.attention { animation: attention-ring .7s ease-in-out 3; }
@keyframes attention-ring {
  50% { box-shadow: 0 0 0 7px rgba(216, 233, 185, .9); transform: translateY(-2px); }
}
.secondary { color: var(--green); background: var(--green-soft); }
.download {
  color: var(--green); background: white; border: 1px solid var(--green);
  display: block; text-align: center; text-decoration: none; cursor: pointer;
}
.download.disabled { cursor: not-allowed; opacity: .45; pointer-events: none; }
.wide { width: 100%; }
.small { padding: 8px 11px; font-size: 12px; }
.text-button { padding: 5px 0 0; background: transparent; color: var(--muted); font-size: 12px; }
.dropzone { border: 1px dashed #9bb3a8; border-radius: 13px; min-height: 125px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: #f8fbf8; cursor: pointer; padding: 15px; }
.dropzone.dragging { background: var(--green-soft); border-color: var(--green-2); }
.dropzone.invalid { background: #fff5f4; border-color: var(--red); }
.dropzone input { display: none; }
.dropzone strong { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.dropzone small { color: var(--muted); margin-top: 5px; font-size: 11px; }
.upload-icon { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: white; font-weight: 900; margin-bottom: 8px; }
.upload-validation { padding: 10px 11px; border-radius: 10px; background: #fff0ef; border: 1px solid #e2aaa5; color: var(--red); font-size: 12px; line-height: 1.55; font-weight: 700; }
.microcopy { font-size: 11px; margin: 12px 0 0; line-height: 1.55; }
.document-list { display: grid; gap: 8px; max-height: 310px; overflow: auto; }
.doc-row { border: 1px solid var(--line); border-radius: 11px; padding: 11px; cursor: pointer; background: #fbfcfb; }
.doc-row:hover, .doc-row.active { border-color: #89aa9a; background: var(--green-soft); }
.doc-row strong { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-row small { color: var(--muted); display: block; margin-top: 5px; font-size: 10px; }
.empty-state { color: var(--muted); font-size: 13px; }

.workspace { min-width: 0; }
.status { min-height: 46px; display: flex; align-items: center; gap: 10px; padding: 11px 15px; border: 1px solid var(--line); border-radius: 13px; background: white; color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #94a19b; flex: 0 0 auto; }
.status.working .status-dot { background: var(--amber); animation: pulse 1s infinite alternate; }
.status.success { color: var(--green); border-color: #acd0bd; background: #f1faf5; }
.status.success .status-dot { background: var(--green-2); }
.status.error { color: var(--red); border-color: #e0b5b1; background: #fff6f5; }
.status.error .status-dot { background: var(--red); }
@keyframes pulse { to { opacity: .3; } }
.empty-workspace { min-height: 620px; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; display: grid; place-items: center; align-content: center; gap: 28px; text-align: center; padding: 50px; box-shadow: var(--shadow); }
.empty-workspace h2 { font: 600 33px Georgia, serif; margin: 12px 0; }
.empty-workspace p { max-width: 540px; margin: 0 auto; }
.paper-illustration { width: 150px; height: 190px; background: white; border: 1px solid #cbd6d0; border-radius: 4px; box-shadow: 17px 17px 0 var(--green-soft); padding: 36px 22px; transform: rotate(-2deg); }
.paper-illustration span { height: 7px; background: #dfe7e2; display: block; margin-bottom: 14px; border-radius: 9px; }
.paper-illustration span:first-child { width: 55%; background: var(--green); height: 10px; }
.paper-illustration span:last-child { width: 70%; }

#activeWorkspace { display: grid; gap: 14px; }
.document-header { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 24px 26px; display: flex; justify-content: space-between; gap: 20px; box-shadow: var(--shadow); }
.document-header h2 { margin: 8px 0 5px; font: 600 28px Georgia, "Songti SC", serif; }
.document-header p { margin: 0; font-size: 13px; }
.document-state { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.state-badge { border-radius: 999px; background: #f4eee2; color: #7a5e30; padding: 8px 12px; font-size: 11px; font-weight: 800; }
.state-badge.paid { background: var(--green-soft); color: var(--green); }
.icon-danger { color: var(--red); background: #fff0ef; padding: 8px 12px; font-size: 11px; }
.tabs { display: flex; gap: 5px; padding: 6px; border: 1px solid var(--line); border-radius: 14px; background: white; overflow-x: auto; }
.tab { flex: 1; min-width: 125px; border: 0; border-radius: 9px; padding: 10px 13px; color: var(--muted); background: transparent; font-weight: 750; white-space: nowrap; }
.tab span { display: inline-grid; place-items: center; min-width: 21px; height: 21px; padding: 0 6px; margin-left: 5px; border-radius: 99px; background: var(--canvas); font-size: 10px; }
.tab.active { background: var(--green); color: white; }
.tab.active span { background: rgba(255,255,255,.18); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 11px; margin-bottom: 14px; }
.metric { background: white; border: 1px solid var(--line); border-top: 3px solid; border-radius: 14px; padding: 15px; }
.metric span, .metric small { display: block; color: var(--muted); font-size: 11px; }
.metric strong { display: block; font: 600 31px Georgia, serif; margin: 8px 0 4px; }
.metric.severe { border-top-color: var(--red); }.metric.medium { border-top-color: var(--amber); }.metric.low { border-top-color: var(--blue); }.metric.fixable { border-top-color: var(--green-2); }
.two-column { display: grid; grid-template-columns: minmax(360px, .92fr) minmax(400px, 1.08fr); gap: 14px; }
.content-card { background: white; border: 1px solid var(--line); border-radius: 18px; padding: 20px; box-shadow: var(--shadow); min-width: 0; }
.card-title { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.card-title h3 { margin: 6px 0 0; font: 600 21px Georgia, "Songti SC", serif; }
.card-title p { margin: 7px 0 0; font-size: 12px; }
.preview-note, .rule-chip { color: var(--green); background: var(--green-soft); padding: 7px 10px; border-radius: 999px; font-size: 10px; font-weight: 800; }
.issue-list { display: grid; gap: 9px; margin: 15px 0; max-height: 660px; overflow: auto; padding-right: 3px; }
.issue { position: relative; display: grid; grid-template-columns: auto 4px 1fr; gap: 11px; border: 1px solid var(--line); border-radius: 12px; padding: 13px; background: #fff; }
.issue:has(input:checked) { background: #f3f9f6; border-color: #99b9aa; }
.issue input { width: 17px; height: 17px; accent-color: var(--green); margin-top: 2px; }
.severity-bar { border-radius: 99px; background: var(--blue); }
.issue[data-severity="high"] .severity-bar { background: var(--red); }.issue[data-severity="medium"] .severity-bar { background: var(--amber); }
.issue-top { display: flex; justify-content: space-between; gap: 12px; }
.issue-title { font-size: 13px; line-height: 1.45; }
.severity-pill { flex: 0 0 auto; font-size: 9px; padding: 4px 7px; border-radius: 99px; background: var(--canvas); color: var(--muted); height: fit-content; }
.issue-meta { color: var(--green-2); font-size: 10px; margin-top: 5px; }
.issue-detail { font-size: 11px; line-height: 1.55; margin: 7px 0 0; }
.sticky-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding-top: 15px; }
.sticky-actions > span { color: var(--muted); font-size: 11px; }
.sticky-actions > div { display: flex; gap: 7px; }
.preview { min-height: 510px; max-height: 720px; overflow: auto; border: 1px solid #d7ddd9; background: #fdfdfb; padding: clamp(24px, 4vw, 55px); box-shadow: inset 0 0 35px rgba(41,54,48,.025); }
.preview p { color: #242927; text-indent: 2em; font-family: "SimSun", serif; font-size: 13px; line-height: 1.9; margin: 0 0 9px; }
.preview h3 { text-align: center; font-family: "SimHei", sans-serif; margin: 20px 0 14px; }
.preview .caption { text-indent: 0; text-align: center; font-size: 11px; }
.preview .blank { min-height: 10px; margin: 0; }

.format-card { padding: 25px; }
.format-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; padding: 25px 0; }
.span-two { grid-column: 1 / -1; }
.consent { display: flex; gap: 11px; padding: 14px; background: #f8f6ee; border: 1px solid #e8e1cc; border-radius: 12px; }
.consent input { width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--green); }
.consent strong, .consent small { display: block; }
.consent strong { font-size: 12px; }.consent small { color: var(--muted); margin-top: 4px; line-height: 1.5; }
.panel-footer { display: flex; justify-content: space-between; align-items: center; gap: 18px; border-top: 1px solid var(--line); padding-top: 18px; }
.panel-footer p { margin: 0; font-size: 12px; }
.version-layout { display: grid; grid-template-columns: 290px 1fr; gap: 15px; padding-top: 18px; }
.version-list { display: grid; gap: 9px; align-content: start; max-height: 620px; overflow: auto; }
.version-row { border: 1px solid var(--line); border-radius: 12px; background: #fbfcfb; padding: 13px; text-align: left; }
.version-row.active { border-color: var(--green-2); background: var(--green-soft); }
.version-row strong, .version-row small { display: block; }
.version-row small { color: var(--muted); margin-top: 5px; font-size: 10px; }
.version-row .current { color: var(--green-2); font-weight: 800; margin-left: 5px; }
.version-toolbar { min-height: 47px; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.version-preview-wrap .preview { min-height: 520px; max-height: 620px; }
.export-card { min-height: 420px; display: grid; grid-template-columns: 1.2fr 330px; gap: 60px; align-items: center; background: linear-gradient(135deg, #173f32, #0e2c22); color: white; border-radius: 18px; padding: clamp(30px, 6vw, 70px); box-shadow: var(--shadow); }
.export-copy h3 { font: 600 clamp(28px, 4vw, 46px) Georgia, serif; margin: 12px 0 15px; }
.export-copy p, .export-copy li { color: #cbdad3; }
.export-copy ul { padding-left: 18px; line-height: 2; font-size: 13px; }
.export-card .kicker { color: var(--lime); }
.export-action { background: white; color: var(--ink); border-radius: 16px; padding: 24px; display: grid; gap: 10px; }
.export-action > div { text-align: center; padding-bottom: 12px; }
.export-action span, .export-action small { color: var(--muted); display: block; font-size: 11px; }
.export-action strong { display: block; font: 600 36px Georgia, serif; margin: 6px 0; }

@media (max-width: 1150px) {
  .intro { grid-template-columns: 1fr; }
  .flow-card { max-width: 700px; }
  .app-shell { grid-template-columns: 270px minmax(0, 1fr); }
  .two-column { grid-template-columns: 1fr; }
  .preview { min-height: 430px; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .privacy-note { display: none; }
  .intro { padding-top: 45px; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .version-layout, .export-card { grid-template-columns: 1fr; }
  .export-card { gap: 25px; }
}
@media (max-width: 560px) {
  .topbar { padding: 0 14px; }
  .brand small { display: none; }
  .intro { padding: 40px 18px; }
  .intro h1 { font-size: 40px; }
  .flow-card { padding: 18px; }
  .app-shell { padding: 14px 10px 50px; }
  .document-header, .card-title, .panel-footer, .sticky-actions { flex-direction: column; align-items: stretch; }
  .document-state { justify-content: flex-start; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .format-grid { grid-template-columns: 1fr; }
  .span-two { grid-column: auto; }
  .tabs { justify-content: flex-start; }
  .content-card { padding: 15px; }
  .preview { padding: 25px 18px; }
  .sticky-actions > div { display: grid; }
}
/* Filing labels are supplied by the production environment, never hard-coded. */
.site-filing {
  display: flex;
  justify-content: center;
  gap: 18px;
  padding: 18px 24px 30px;
  color: #68736e;
  font-size: 13px;
}

.site-filing a { color: inherit; text-decoration: none; }
.site-filing a:hover { text-decoration: underline; }

.verification-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; }
.verification-field { margin: 0; }
.verification-row button { min-height: 46px; white-space: nowrap; }
.login-help { display: block; margin-top: 9px; color: var(--muted); line-height: 1.5; }
