/* One local system stack; no network fonts. Mono uses the same family by product policy.
   GLOBAL_FONT_FAMILY_POLICY: exactly ONE family across the whole site (var(--font-family-base)).
   Report reading hierarchy is built from size / weight / line-height / measure — never a second family. */
:root{
 /* ---- Font (the only family on the site) ---- */
 --font-family-base: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
 /* ---- Color tokens ---- */
 --color-bg:#f4f6f4;
 --color-surface:#fff;
 --color-surface-tint:#edf2ec;
 --color-surface-live:#e0eee2;
 --color-surface-soft:#f9faf6;
 --color-ink:#213b35;
 --color-muted:#63756d;
 --color-caption:#507669;
 --color-accent:#285e4c;
 --color-link:#205b49;
 --color-border:#dde5df;
 --color-border-strong:#cad9ce;
 --color-success-bg:#eaf4ee;--color-success-fg:#23543c;--color-success-border:#47815e;
 --color-error-bg:#fff0ed;--color-error-fg:#883c32;--color-error-border:#b65a49;
 --color-info-bg:#eef2f5;--color-info-fg:#425b6d;
 --color-warn-bg:#faf8f1;--color-warn-fg:#655e4a;--color-warn-border:#b6a478;
 /* ---- Spacing tokens ---- */
 --space-1:4px;--space-2:8px;--space-3:12px;--space-4:16px;
 --space-6:24px;--space-8:32px;--space-12:48px;--space-16:64px;
 /* ---- Radius tokens ---- */
 --radius-sm:8px;--radius-md:10px;--radius-lg:12px;--radius-xl:16px;--radius-pill:20px;
 /* ---- Shadow tokens ---- */
 --shadow-1:0 1px 2px rgb(33 59 53 / .05);
 --shadow-2:0 4px 12px rgb(33 59 53 / .08);
 /* ---- Container widths ---- */
 --container-narrow:740px;--container-report:820px;--container-wide:960px;--container-shell:1160px;
 /* ---- Control / touch ---- */
 --control-min-height:46px;--touch-min:44px;
 /* ---- Typography scale (existing, preserved) ---- */
 --text-display: clamp(1.875rem, 4vw, 2.5rem);
 --text-display-font-size: var(--text-display);
 --text-display-font-weight: 600;
 --text-display-line-height: 1.3;
 --text-display-letter-spacing: -.025em;
 --text-page-title: clamp(1.625rem, 3vw, 1.875rem);
 --text-page-title-font-size: var(--text-page-title);
 --text-page-title-font-weight: 600;
 --text-page-title-line-height: 1.3;
 --text-page-title-letter-spacing: -.025em;
 --text-section-title: 1.375rem;
 --text-section-title-font-size: var(--text-section-title);
 --text-section-title-font-weight: 600;
 --text-section-title-line-height: 1.5;
 --text-section-title-letter-spacing: 0;
 --text-subsection-title: 1.1875rem;
 --text-subsection-title-font-size: var(--text-subsection-title);
 --text-subsection-title-font-weight: 600;
 --text-subsection-title-line-height: 1.5;
 --text-subsection-title-letter-spacing: 0;
 --text-body-lg: 1.125rem;
 --text-body-lg-font-size: var(--text-body-lg);
 --text-body-lg-font-weight: 400;
 --text-body-lg-line-height: 1.85;
 --text-body-lg-letter-spacing: 0;
 --text-body: 1rem;
 --text-body-font-size: var(--text-body);
 --text-body-font-weight: 400;
 --text-body-line-height: 1.75;
 --text-body-letter-spacing: 0;
 --text-body-sm: .875rem;
 --text-body-sm-font-size: var(--text-body-sm);
 --text-body-sm-font-weight: 400;
 --text-body-sm-line-height: 1.6;
 --text-body-sm-letter-spacing: 0;
 --text-caption: .75rem;
 --text-caption-font-size: var(--text-caption);
 --text-caption-font-weight: 500;
 --text-caption-line-height: 1.5;
 --text-caption-letter-spacing: .02em;
 --text-button: 1rem;
 --text-button-font-size: var(--text-button);
 --text-button-font-weight: 600;
 --text-button-line-height: 1.5;
 --text-button-letter-spacing: 0;
 --text-table: .875rem;
 --text-table-font-size: var(--text-table);
 --text-table-font-weight: 400;
 --text-table-line-height: 1.6;
 --text-table-letter-spacing: 0;
 --text-mono: .875rem;
 --text-mono-font-size: var(--text-mono);
 --text-mono-font-weight: 400;
 --text-mono-line-height: 1.6;
 --text-mono-letter-spacing: 0;
}
html,body{font-family:var(--font-family-base);font-size:var(--text-body);font-weight:var(--text-body-font-weight);line-height:var(--text-body-line-height);letter-spacing:var(--text-body-letter-spacing)}
button,input,select,textarea{font-family:var(--font-family-base)}
h1{font-family:var(--font-family-base);font-size:var(--text-page-title);font-weight:var(--text-page-title-font-weight);line-height:var(--text-page-title-line-height);letter-spacing:var(--text-page-title-letter-spacing)}h2{font-family:var(--font-family-base);font-size:var(--text-section-title);font-weight:var(--text-section-title-font-weight);line-height:var(--text-section-title-line-height);letter-spacing:var(--text-section-title-letter-spacing)}h3,h4{font-family:var(--font-family-base);font-size:var(--text-subsection-title);font-weight:var(--text-subsection-title-font-weight);line-height:var(--text-subsection-title-line-height);letter-spacing:var(--text-subsection-title-letter-spacing)}
button{font-family:var(--font-family-base);font-size:var(--text-button);font-weight:var(--text-button-font-weight);line-height:var(--text-button-line-height);letter-spacing:var(--text-button-letter-spacing);min-height:var(--control-min-height)}
table{font-family:var(--font-family-base);font-size:var(--text-table);font-weight:var(--text-table-font-weight);line-height:var(--text-table-line-height);letter-spacing:var(--text-table-letter-spacing)}code,pre{font-family:var(--font-family-base);font-size:var(--text-mono);font-weight:var(--text-mono-font-weight);line-height:var(--text-mono-line-height);letter-spacing:var(--text-mono-letter-spacing)}

/* ---- Shared components ---- */
/* Toast: transient feedback; built via DOM only. */
.toast{position:fixed;left:50%;bottom:max(24px,env(safe-area-inset-bottom));transform:translateX(-50%);z-index:60;max-width:min(92vw,420px);padding:12px 18px;border-radius:var(--radius-lg);background:var(--color-ink);color:#fff;font-size:var(--text-body-sm);line-height:var(--text-body-sm-line-height);box-shadow:var(--shadow-2);opacity:0;translate:0 8px;transition:opacity 160ms ease,translate 160ms ease}
.toast[data-show="true"]{opacity:1;translate:0 0}
/* Skeleton: loading placeholder. */
.skeleton{background:linear-gradient(90deg,#e7ece7 25%,#f1f4f1 45%,#e7ece7 65%);background-size:200% 100%;animation:skeleton-wave 1.2s ease-in-out infinite;border-radius:var(--radius-sm)}
@keyframes skeleton-wave{0%{background-position:200% 0}100%{background-position:-200% 0}}
.skeleton-card{min-height:150px;padding:var(--space-4);border:1px solid var(--color-border);border-radius:var(--radius-lg)}
.skeleton-line{height:14px;margin:10px 0;border-radius:var(--radius-sm)}
.skeleton-line[style*="width"]{min-width:0}
@media(prefers-reduced-motion:reduce){.skeleton{animation:none}}
/* Empty state: onboarding copy; DOM-built only. */
.empty-state{padding:var(--space-8) var(--space-4);text-align:center;color:var(--color-muted);font-size:var(--text-body-sm);line-height:var(--text-body-sm-line-height);border:1px dashed var(--color-border-strong);border-radius:var(--radius-lg);background:var(--color-surface-soft)}
.empty-state strong{display:block;margin-bottom:var(--space-2);color:var(--color-ink);font-size:var(--text-body);font-weight:var(--text-button-font-weight)}
/* Back link / text button: guaranteed touch target. */
.back-link,.text-button{display:inline-flex;align-items:center;min-height:var(--touch-min);padding:var(--space-2) var(--space-1);color:var(--color-muted);text-decoration:none;font-size:var(--text-body-sm);font-weight:var(--text-body-sm-font-weight);line-height:var(--text-body-sm-line-height);letter-spacing:var(--text-body-sm-letter-spacing)}
.back-link:hover,.text-button:hover{color:var(--color-accent)}
/* Horizontal table scroll with mobile affordance. */
.table-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch}
.table-scroll table{min-width:540px}
@media(max-width:600px){.table-scroll::before{content:"左右滑动查看完整表格";display:sticky;display:block;position:sticky;left:0;margin-bottom:8px;color:var(--color-muted);font-size:var(--text-caption);letter-spacing:var(--text-caption-letter-spacing)}}
/* Field hints */
.field-required::after{content:" *";color:var(--color-error-fg)}
.field-optional{color:var(--color-muted);font-size:var(--text-caption)}
