/* 沿用桌面应用 apps/renderer/src/index.css 的 Design Token 与图标的石墨/浅金配色。 */
:root {
  --background: #fcfdfc;
  --foreground: #25272a;
  --card: #ffffff;
  --primary: #16181b;
  --primary-foreground: #ffffff;
  --secondary: #f0f3f1;
  --muted-foreground: #62656a;
  --border: #dfe5e1;
  --gold: #a07a2c;
  --gold-soft: #f6efdc;
  --content-accent: #4f6bd8;
  --content-accent-foreground: #364da8;
  --content-accent-soft: #eef1fc;
  --gain: #1f7a4d;
  --loss: #b3392b;
  --claim-fact: #ecebe6;
  --claim-fact-foreground: #3c3e42;
  --claim-management: #f8ead2;
  --claim-management-foreground: #7a4b0c;
  --claim-inference: #ece6f7;
  --claim-inference-foreground: #5b3c99;
  --claim-missing: #f3e1de;
  --claim-missing-foreground: #8a2f24;
  --shadow: 0 1px 2px rgb(22 24 27 / 6%), 0 12px 32px rgb(22 24 27 / 8%);
  --radius: 10px;
  --font-display: "Newsreader", "Iowan Old Style", "New York", Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-numeric: "SF Mono", ui-monospace, Menlo, monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #151619;
    --foreground: #e7e8ea;
    --card: #1d1f23;
    --primary: #ece3cc;
    --primary-foreground: #16181b;
    --secondary: #1a1c1f;
    --muted-foreground: #a2a5ab;
    --border: #30333a;
    --gold: #dcc48e;
    --gold-soft: #2a261c;
    --content-accent: #8ea2f0;
    --content-accent-foreground: #b7c4f6;
    --content-accent-soft: #232a45;
    --gain: #5cc493;
    --loss: #f08a7c;
    --claim-fact: #2b2c2f;
    --claim-fact-foreground: #d9dadc;
    --claim-management: #3a2f1c;
    --claim-management-foreground: #f0cf98;
    --claim-inference: #2f2742;
    --claim-inference-foreground: #cdb9f3;
    --claim-missing: #3c2522;
    --claim-missing-foreground: #f2b2a8;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 12px 32px rgb(0 0 0 / 35%);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: var(--content-accent-foreground); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--content-accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: 0; }
p { margin: 0 0 1rem; }
code { font-family: var(--font-numeric); font-size: 0.9em; overflow-wrap: anywhere; }

.shell { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted-foreground); }
.small { font-size: 14px; }
.numeric { font-family: var(--font-numeric); font-variant-numeric: tabular-nums; font-size: 0.92em; }
.gain { color: var(--gain); }
.loss { color: var(--loss); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }

.skip-link { position: absolute; left: 12px; top: -48px; z-index: 20; background: var(--card); padding: 8px 12px; border-radius: 6px; }
.skip-link:focus { top: 12px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--background) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-row { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--foreground); text-decoration: none; font-weight: 600; }
.brand img { border-radius: 7px; }
.brand span { font-family: var(--font-display); font-size: 20px; font-weight: 500; }
.header-nav { display: flex; gap: 22px; margin-left: auto; }
.header-nav a { color: var(--muted-foreground); text-decoration: none; font-size: 15px; }
.header-nav a:hover { color: var(--foreground); }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 8px;
  font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; transition: background-color 0.15s, border-color 0.15s;
}
.button-primary { background: var(--primary); color: var(--primary-foreground); }
.button-primary:hover { background: color-mix(in srgb, var(--primary) 86%, var(--gold)); }
.button-secondary { background: var(--card); color: var(--foreground); border-color: var(--border); }
.button-secondary:hover { border-color: var(--muted-foreground); }
.button-small { min-height: 36px; padding: 0 14px; font-size: 14px; }
.button-large { min-height: 50px; padding: 0 22px; font-size: 16px; }

/* Hero */
.hero { padding: 72px 0 80px; background:
  radial-gradient(1200px 400px at 85% -10%, var(--gold-soft), transparent 70%),
  var(--background); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 56px; align-items: center; }
.eyebrow { margin: 0 0 12px; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); }
.eyebrow a { color: inherit; text-decoration: none; }
.hero h1 { font-family: var(--font-display); font-weight: 500; font-size: clamp(40px, 5.4vw, 64px); line-height: 1.05; margin-bottom: 20px; }
.lede { font-size: 18px; color: var(--muted-foreground); max-width: 60ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 14px; }
.visual-note { margin-top: 12px; }

/* Report card */
.report-card { margin: 0; background: var(--card); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.report-card-head { padding: 20px 22px 12px; }
.report-card-head h2 { font-family: var(--font-display); font-weight: 500; font-size: 24px; margin-bottom: 4px; }
.report-kind { margin: 0 0 6px; font-size: 12px; font-weight: 600; color: var(--muted-foreground); text-transform: uppercase; letter-spacing: 0.06em; }
.metric-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.metric-table th, .metric-table td { padding: 11px 22px; border-top: 1px solid var(--border); text-align: left; vertical-align: middle; }
.metric-table thead th { font-size: 12px; font-weight: 600; color: var(--muted-foreground); background: var(--secondary); }
.metric-table tbody th { font-weight: 500; }
.metric-table tbody th .chip { margin-left: 8px; }
.metric-table .num { text-align: right; white-space: nowrap; }
.report-card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 22px; border-top: 1px solid var(--border); }
.report-card-source { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; padding: 12px 22px 16px; border-top: 1px solid var(--border); color: var(--muted-foreground); }

.chip { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.5; white-space: nowrap; font-family: var(--font-sans); }
.claim-fact { background: var(--claim-fact); color: var(--claim-fact-foreground); }
.claim-calculation { background: var(--content-accent-soft); color: var(--content-accent-foreground); }
.claim-management { background: var(--claim-management); color: var(--claim-management-foreground); }
.claim-inference { background: var(--claim-inference); color: var(--claim-inference-foreground); }
.claim-missing { background: var(--claim-missing); color: var(--claim-missing-foreground); }

/* Sections */
.section { padding: 88px 0; }
.section-tint { background: var(--secondary); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-title { font-family: var(--font-display); font-weight: 500; font-size: clamp(30px, 3.6vw, 42px); margin-bottom: 18px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }

.steps { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.steps li { padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.step-number { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: var(--primary-foreground); font-weight: 600; margin-bottom: 14px; }
.steps h3, .feature h3 { font-size: 18px; margin-bottom: 8px; }
.steps p, .feature p { margin: 0; color: var(--muted-foreground); }

.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 32px; }
.feature { padding: 24px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.feature h3::before { content: ""; display: block; width: 28px; height: 2px; background: var(--gold); margin-bottom: 14px; }

.label-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.label-list li { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 16px; align-items: baseline; padding: 14px 18px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.label-list .chip { justify-self: start; }

.checked-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; margin-top: 16px; }
.checked-card { display: flex; flex-direction: column; gap: 12px; padding: 18px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.checked-card h3 { font-size: 17px; }
.checked-card header p { margin: 2px 0 0; }
.ticker { font-family: var(--font-numeric); font-size: 12px; font-weight: 500; color: var(--muted-foreground); margin-left: 4px; }
.checked-card dl { margin: 0; display: grid; gap: 6px; }
.checked-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 3.6em; gap: 10px; align-items: baseline; font-size: 14px; }
.checked-row dt { color: var(--muted-foreground); }
.checked-row dd { margin: 0; white-space: nowrap; text-align: right; }
.checked-row dd.unavailable { grid-column: 2 / -1; }
.checked-card > a { margin-top: auto; }

.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 32px 0 20px; }
.plan { padding: 24px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.plan-current { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.plan header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.plan h3 { font-family: var(--font-display); font-weight: 500; font-size: 26px; }
.plan-status { margin: 0; color: var(--muted-foreground); font-weight: 600; }
.plan-current .plan-status { color: var(--gold); }
.plan-price { font-size: 22px; font-weight: 600; margin: 12px 0 2px; }
.plan-limits { margin: 18px 0 0; display: grid; gap: 10px; border-top: 1px solid var(--border); padding-top: 16px; }
.plan-limits dt { font-size: 13px; color: var(--muted-foreground); }
.plan-limits dd { margin: 0; font-weight: 500; }

.faq-shell { max-width: 860px; }
.faq-list { margin-top: 24px; border-top: 1px solid var(--border); }
.faq-list details { border-bottom: 1px solid var(--border); }
.faq-list summary { cursor: pointer; list-style: none; padding: 18px 36px 18px 0; font-weight: 600; font-size: 17px; position: relative; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-size: 24px; font-weight: 400; color: var(--muted-foreground); }
.faq-list details[open] summary::after { content: "−"; }
.faq-list details p { margin: 0 0 20px; color: var(--muted-foreground); max-width: 70ch; }

.download-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 28px; align-items: center; padding-top: 40px; padding-bottom: 40px; background: var(--card); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); max-width: 1112px; }
.download-card img { border-radius: 20px; }
.download-copy p { margin: 0 0 6px; }
.download-copy .section-title { font-size: clamp(26px, 3vw, 34px); margin-bottom: 10px; }
.download-actions { display: grid; gap: 8px; justify-items: start; }
.download-actions p { margin: 0; max-width: 260px; }
.checksum { grid-column: 1 / -1; color: var(--muted-foreground); }
.checksum summary { cursor: pointer; padding: 10px 0; }
.checksum code { display: block; margin-top: 8px; padding: 10px 12px; background: var(--secondary); border-radius: 6px; }

/* Legal */
.legal-page { padding-top: 56px; }
.page-title { font-family: var(--font-display); font-weight: 500; font-size: clamp(32px, 4vw, 46px); margin-bottom: 20px; }
.legal-index { list-style: none; padding: 0; margin: 28px 0 0; border-top: 1px solid var(--border); }
.legal-index li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.legal-index a { font-weight: 600; font-size: 17px; }
.prose { font-size: 16px; }
.prose h2 { font-family: var(--font-display); font-weight: 500; font-size: 26px; margin: 36px 0 12px; }
.prose h3 { font-size: 18px; margin: 24px 0 8px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.table-scroll { overflow-x: auto; margin: 0 0 20px; border: 1px solid var(--border); border-radius: 8px; }
.prose table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 14px; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.prose th { background: var(--secondary); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 48px 0 32px; background: var(--secondary); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer-grid p { margin: 10px 0 0; }
.footer-heading { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted-foreground); margin-bottom: 12px; }
.footer-grid a { color: var(--foreground); }
.footer-notes { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border); }
.footer-notes p { margin: 0 0 8px; }

/* Tablet */
@media (max-width: 960px) {
  .hero-grid, .split { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .feature-grid, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plan-grid { grid-template-columns: minmax(0, 1fr); }
  .download-card { grid-template-columns: auto minmax(0, 1fr); }
  .download-actions { grid-column: 1 / -1; }
}

/* Phone */
@media (max-width: 720px) {
  .shell { padding: 0 16px; }
  .header-row { gap: 12px; }
  .header-nav { display: none; }
  .header-row .button { margin-left: auto; }
  .hero { padding: 40px 0 56px; }
  .lede { font-size: 17px; }
  .hero-actions .button { flex: 1 1 100%; }
  .section { padding: 60px 0; }
  .feature-grid, .steps { grid-template-columns: minmax(0, 1fr); }
  .metric-table th, .metric-table td { padding: 10px 12px; font-size: 14px; }
  .metric-table thead th:nth-child(3), .metric-table tbody td:nth-child(3) { display: none; }
  .metric-table tbody th .chip { display: none; }
  .report-card-head, .report-card-foot, .report-card-source { padding-left: 14px; padding-right: 14px; }
  .label-list li { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .download-card { grid-template-columns: minmax(0, 1fr); padding: 24px 16px; margin: 0 16px; width: auto; }
  .download-card img { width: 64px; height: 64px; border-radius: 15px; }
  .download-actions, .download-actions .button { width: 100%; }
  .download-actions p { max-width: none; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
}
