/* FindData Technology — global styles (ponytail: one sheet, no framework) */
:root {
  --bg: #0b1020;
  --bg-soft: #111730;
  --panel: #161d3a;
  /* depth is tonal, not shadowed (DESIGN.md "flat by doctrine"): one raised
     step above panel for feature-grade surfaces */
  --surface-raised: #1b2348;
  --readout-void: #0a0f1e;
  --border: #25305a;
  /* hover / current-state border; kept ≥3:1 against --bg for non-text UI */
  --border-strong: #4a5ca8;
  --text: #e6ebff;
  --muted: #9aa6d0;
  /* mint is the single brand accent (CTA, figures, current item);
     periwinkle is demoted to inline prose links only */
  --accent: #38e1c8;
  --accent-2: #6aa6ff;
  --accent-ink: #06201b;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  /* six-step type scale: display / h1 / h2 / body / label / mono */
  --fs-display: clamp(2.2rem, 5vw, 3.4rem);
  --fs-h1: 2rem;
  --fs-h2: 1.45rem;
  --fs-body: 1rem;
  --fs-label: 0.95rem;
  --fs-mono: 0.85rem;
  /* CJK headings need more air than the Latin default */
  --lh-display: 1.25;
  /* Latin display voice (headings/kicker only); CJK falls to system PingFang */
  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

/* display voice applies to the Latin layer of headings site-wide */
.hero h1, h1.page, article.doc h1,
.lines-strip h2, .roadmap-strip h2, .research h2,
.tour-copy h2, .trial-copy h2, .tour-features h2 {
  font-family: var(--font-display);
}

/* Space Grotesk — latin subset, self-hosted 22KB (ui-refine D2). Display
   voice for Latin in headings; CJK glyphs fall through to the system stack. */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  src: url('/fonts/space-grotesk-latin.woff2') format('woff2');
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

header.site {
  position: sticky; top: 0; z-index: 10;
  background: rgba(11, 16, 32, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(6px);
}

header.site nav {
  max-width: 1080px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; gap: 22px; height: 60px;
}

header.site .brand {
  font-weight: 700; color: var(--text); letter-spacing: 0.2px;
  display: inline-flex; align-items: center; gap: 8px;
}
header.site .brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 6px;
  background: var(--accent); color: var(--accent-ink, #06201b);
  font-family: 'Songti SC', 'STSong', 'Noto Serif SC', 'SimSun', serif;
  font-weight: 700; font-size: 0.95rem; line-height: 1;
}
header.site .brand em { color: var(--accent); font-style: normal; }

header.site .nav-links { display: flex; gap: 18px; flex: 1; }
header.site .nav-links a { color: var(--muted); font-size: 0.95rem; }
header.site .nav-links a:hover { color: var(--text); }
header.site .nav-links a.active { color: var(--accent); }
header.site .lang { font-size: 0.95rem; color: var(--accent); }

main { max-width: 1080px; margin: 0 auto; padding: 48px 20px 72px; }

/* visually hidden, still exposed to screen readers */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

.hero { text-align: center; padding: 64px 0 44px; }
.hero .tagline {
  color: var(--accent); font-family: var(--mono); font-size: var(--fs-label);
  letter-spacing: 1px; text-transform: uppercase;
}
.hero h1 { font-size: var(--fs-display); line-height: var(--lh-display); margin: 18px 0 16px; letter-spacing: -0.02em; text-wrap: balance; }
.hero p.sub { color: var(--muted); max-width: 680px; margin: 0 auto; font-size: 1.05rem; }
.hero .cta { margin-top: 30px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero .cta a {
  padding: 12px 22px; border-radius: 10px; font-weight: 600;
}
.hero .cta .primary { background: var(--accent); color: #06201b; }
.hero .cta .primary:hover { text-decoration: none; filter: brightness(1.08); }
.hero .cta .secondary { border: 1px solid var(--border); color: var(--text); }
.hero .cta .secondary:hover { text-decoration: none; border-color: var(--accent); }

/* build-sourced figures, demoted to a secondary mono line (ui-refine 3.3) */
.statline { margin: 36px 0 0; color: var(--muted); font-family: var(--mono); font-size: var(--fs-mono); }
.statline b { color: var(--accent); font-weight: 600; }

.stats { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; margin-top: 44px; }
.stats .stat { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 14px 26px; min-width: 150px; }
.stats .stat b { display: block; font-size: 1.7rem; color: var(--accent); font-family: var(--mono); }
.stats .stat span { color: var(--muted); font-size: 0.85rem; }

h1.page { font-size: var(--fs-h1); line-height: 1.3; margin: 0 0 6px; }
p.page-sub { color: var(--muted); margin: 0 0 32px; }

/* repo grid */
ul.grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; padding: 0; }
ul.grid .card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px 18px; display: flex; flex-direction: column; gap: 8px;
}
ul.grid .card:hover { border-color: var(--border-strong); }
ul.grid .card a { color: inherit; }
ul.grid .card a:hover { text-decoration: none; }
ul.grid .card .name { font-weight: 700; font-family: var(--mono); color: var(--text); }
ul.grid .card .desc { color: var(--muted); font-size: 0.95rem; flex: 1; }
ul.grid .card .meta { color: var(--muted); font-size: 0.78rem; font-family: var(--mono); }
ul.grid .card.featured { border-color: var(--accent); background: var(--surface-raised); }
ul.grid .card.featured .name { color: var(--accent); }
ul.grid .card.featured .name::after { content: ' ★'; color: var(--accent); }
/* thin lines lay their few entries out across the full content width */
ul.grid.grid--feature { grid-template-columns: 1fr; }
ul.grid.grid--feature .card {
  background: var(--surface-raised); border-color: var(--border-strong);
  padding: 26px 30px; gap: 10px;
}
ul.grid.grid--feature .card .desc { font-size: 1.05rem; color: var(--text); max-width: 72ch; }
ul.grid .card { position: relative; }
ul.grid .card .card-main { display: flex; flex-direction: column; gap: 8px; }
ul.grid .card .card-gh {
  position: absolute; top: 14px; right: 14px;
  color: var(--muted); display: inline-flex; padding: 4px; border-radius: 6px;
}
ul.grid .card .card-gh:hover { color: var(--text); background: var(--surface-raised); text-decoration: none; }
ul.grid .card .card-demo {
  align-self: flex-start; margin-top: 4px;
  background: var(--accent); color: #06201b; border-radius: 8px;
  padding: 6px 14px; font-weight: 700; font-size: 0.85rem;
}
ul.grid .card .card-demo:hover { text-decoration: none; filter: brightness(1.08); }

/* ── homepage mission block (brand-mission) ────────────────────────── */
.mission {
  max-width: 1080px; margin: 64px auto 0;
  border-top: 1px solid var(--border); padding-top: 22px;
}
.mission-label {
  margin: 0 0 8px; color: var(--muted);
  font-family: var(--mono); font-size: var(--fs-label);
  letter-spacing: 0.05em;
}
.mission-body {
  margin: 0; color: var(--text); font-size: 1.15rem; line-height: 1.7;
  max-width: 68ch;
}

/* ── homepage open-source strip (ia-lean) ──────────────────────────── */
.opensource {
  max-width: 1080px; margin: 76px auto 0;
  border-top: 1px solid var(--border); padding-top: 22px;
}
.opensource h2 { font-size: var(--fs-h2); margin: 0 0 10px; }
.opensource .oss-addr {
  margin: 0 0 14px; font-family: var(--mono); font-size: var(--fs-mono);
  color: var(--text); display: flex; gap: 14px; flex-wrap: wrap; align-items: baseline;
}
.opensource .oss-addr a { color: var(--accent); }
.opensource .oss-count { color: var(--muted); }
.opensource .oss-links { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── homepage ladder rail (ui-refine polish pass) ─────────────────────
   The five lines as a magnitude ladder: seal mark + numeral watermark per
   rung, labelled by the brand sentence, with one authored entrance (CSS-only,
   reduced-motion aware). Motion lives here, not in the token layer. */
.ladder-rail-label {
  margin: 0 0 16px; color: var(--accent);
  font-family: var(--mono); font-size: var(--fs-label); letter-spacing: 0.05em;
}
.ladder-rail .card { background: var(--bg-soft); }
.ladder-rail .card:hover { border-color: var(--accent); }
.rung-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.rung-numeral {
  font-family: 'Songti SC', 'STSong', 'Noto Serif SC', 'SimSun', serif;
  font-size: 2rem; line-height: 1; color: var(--border-strong);
  opacity: 0.55; user-select: none; margin-top: 2px;
}
/* one rung per line on wide screens: the ladder must read 一 → 万 left to right */
@media (min-width: 1080px) {
  .lines-strip:has(.ladder-rail) { max-width: 1080px; }
  ul.grid.ladder-rail { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .ladder-rail .card .desc { font-size: 0.95rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .ladder-rail .card {
    opacity: 0;
    transform: translateY(12px);
    animation: rung-rise 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }
  .ladder-rail .card:nth-child(1) { animation-delay: 0.05s; }
  .ladder-rail .card:nth-child(2) { animation-delay: 0.12s; }
  .ladder-rail .card:nth-child(3) { animation-delay: 0.19s; }
  .ladder-rail .card:nth-child(4) { animation-delay: 0.26s; }
  .ladder-rail .card:nth-child(5) { animation-delay: 0.33s; }
}
@keyframes rung-rise { to { opacity: 1; transform: none; } }

/* /repos line grouping (ui-refine D7) */
.repo-group { margin-top: 44px; }
.repo-group-head { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; font-size: 1.05rem; }
.repo-group-head .count { color: var(--muted); font-family: var(--mono); font-size: 0.78rem; }
.repo-group-head .group-numeral { margin-left: auto; font-size: 1.45rem; margin-top: 0; }

/* page-level demo CTA strip (repos + docs index) */
.demo-cta {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(56,225,200,0.12), rgba(106,166,255,0.08));
  border: 1px solid var(--accent); border-radius: 12px;
  padding: 16px 22px; margin-bottom: 28px; color: var(--text);
}
.demo-cta:hover { text-decoration: none; filter: brightness(1.05); }
.demo-cta-label { color: var(--accent); font-weight: 700; }
.demo-cta-sub { color: var(--muted); font-size: 0.95rem; }

/* repo detail header icon + demo */
.repo-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.repo-head h1 { margin: 0; }
.repo-head .card-gh { color: var(--muted); display: inline-flex; padding: 4px; border-radius: 6px; }
.repo-head .card-gh:hover { color: var(--accent); text-decoration: none; }
/* article.doc a (line ~156) outranks a bare class selector — scope the button
   to article.doc so its dark text on the accent fill stays readable. */
article.doc a.repo-demo-btn {
  display: inline-block; margin: 0 0 20px;
  background: var(--accent); color: #06201b; border-radius: 8px;
  padding: 10px 20px; font-weight: 700;
}
article.doc a.repo-demo-btn:hover { text-decoration: none; filter: brightness(1.08); }

/* docs */
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.doc-grid a {
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  padding: 20px; color: var(--text);
}
.doc-grid a:hover { border-color: var(--accent); text-decoration: none; }
.doc-grid b { color: var(--accent-2); }
.doc-grid span { color: var(--muted); font-size: 0.95rem; display: block; margin-top: 6px; }

article.doc { max-width: 820px; }
article.doc p { max-width: 72ch; }
article.doc h1 { font-size: 2rem; }
article.doc h2 { margin-top: 40px; margin-bottom: 10px; color: var(--text); font-size: var(--fs-subtitle, 1.3rem); scroll-margin-top: 80px; }
article.doc pre {
  background: #0a0f1e; border: 1px solid var(--border); border-radius: 10px;
  padding: 14px 16px; overflow-x: auto; font-family: var(--mono); font-size: 0.95rem;
}
article.doc code { font-family: var(--mono); background: #0a0f1e; padding: 2px 6px; border-radius: 4px; font-size: 0.9em; }
article.doc pre code { background: none; padding: 0; }
article.doc a { color: var(--accent); }
.doc-back { display: inline-block; margin-bottom: 20px; color: var(--muted); font-size: 0.95rem; }

/* about + rendered README prose */
.about { max-width: 760px; margin: 56px auto 0; }
.about h2 { color: var(--accent-2); font-size: 1.45rem; }
.about p { color: var(--muted); font-size: 1.05rem; }
article.doc .repo-meta { color: var(--muted); font-size: 0.95rem; font-family: var(--mono); margin-bottom: 20px; }
article.doc .repo-meta a { color: var(--accent); }
article.doc h3 { margin-top: 28px; scroll-margin-top: 80px; }
article.doc ul, article.doc ol { padding-left: 1.4em; }
article.doc li { margin: 6px 0; }
article.doc blockquote { border: 1px solid var(--border); margin: 12px 0; padding: 4px 16px; color: var(--muted); }
article.doc table { border-collapse: collapse; margin: 16px 0; display: block; overflow-x: auto; }
article.doc th, article.doc td { border: 1px solid var(--border); padding: 7px 12px; }
article.doc th { background: var(--bg-soft); text-align: left; font-weight: 600; }
article.doc img { max-width: 100%; border-radius: 8px; }
article.doc hr { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

/* roadmap */
ol.phases { list-style: none; padding: 0; display: grid; gap: 16px; max-width: 760px; }
li.phase { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; }
li.phase.in-progress { border-color: var(--accent); }
.phase-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.phase-name { font-weight: 700; font-size: 1.15rem; }
.phase-name em { color: var(--muted); font-style: italic; font-weight: 400; font-size: 0.95rem; margin-left: 6px; }
.phase-status { font-family: var(--mono); font-size: 0.78rem; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); white-space: nowrap; }
.phase-status.in-progress { color: #06201b; background: var(--accent); border-color: var(--accent); }
.phase-status.done { color: var(--accent); border-color: var(--accent); }
.phase-period { color: var(--accent-2); font-family: var(--mono); font-size: 0.85rem; margin: 8px 0 4px; }
.phase-goal { color: var(--muted); margin: 0; }

.roadmap-strip { max-width: 860px; margin: 76px auto 0; }
.roadmap-strip h2 { font-size: var(--fs-h2); margin-bottom: 14px; }
.roadmap-strip h2 a { color: var(--text); }
.roadmap-strip h2 a:hover { color: var(--accent); text-decoration: none; }
.roadmap-strip ol { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.roadmap-strip li { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.roadmap-strip li.in-progress { border-color: var(--accent); }
.roadmap-strip li b em { color: var(--muted); font-weight: 400; font-size: 0.85rem; }
.roadmap-strip .period { color: var(--muted); font-size: 0.85rem; font-family: var(--mono); }
.roadmap-strip .phase-status { align-self: flex-start; }

/* homepage mid-page strips (product lines + research), mirroring .roadmap-strip */
.lines-strip { max-width: 860px; margin: 76px auto 0; }
.lines-strip h2 { font-size: var(--fs-h2); margin-bottom: 14px; }
.lines-strip h2 a { color: var(--text); }
.lines-strip h2 a:hover { color: var(--accent); text-decoration: none; }
.lines-strip .sub { color: var(--muted); margin: 0 0 16px; max-width: 68ch; }
.lines-strip ul.grid { margin: 0; }
.lines-strip .name.lines-name { font-family: var(--font); color: var(--text); font-weight: 700; }
/* research & services reads as the page's footnote: a hairline rule, a
   label-style heading, no section-scale weight */
.research { max-width: 1080px; margin: 76px auto 0; border-top: 1px solid var(--border); padding-top: 22px; }
.research h2 {
  font-size: var(--fs-label); font-family: var(--mono); color: var(--muted);
  font-weight: 400; letter-spacing: 0.05em; margin: 0 0 8px;
}
.research p { color: var(--muted); font-size: 0.95rem; max-width: 68ch; }

/* updates feed */
ol.feed { list-style: none; padding: 0; display: grid; gap: 14px; max-width: 820px; }
ol.feed > li { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; }
ol.feed > li.upcoming { border-color: var(--accent); }
.feed-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.feed-repo { font-family: var(--mono); font-weight: 700; }
.feed-ver { color: var(--accent); font-family: var(--mono); font-size: 0.85rem; }
li.upcoming .feed-ver { background: var(--accent); color: #06201b; padding: 1px 8px; border-radius: 12px; font-size: 0.78rem; }
.feed-head time { color: var(--muted); font-size: 0.85rem; font-family: var(--mono); margin-left: auto; }
.feed-lines { display: inline-flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.feed-line-tag { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 0.78rem; color: var(--muted); }
.app-identity { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.app-identity a { color: var(--text); }
.app-identity a:hover { color: var(--accent); }
ol.feed ul { margin: 8px 0 0; padding-left: 1.2em; color: var(--muted); font-size: 0.95rem; }
ol.feed li li { margin: 2px 0; }
ol.feed code { font-family: var(--mono); background: #0a0f1e; padding: 1px 5px; border-radius: 4px; font-size: 0.88em; }

/* release notes (/releases) */
ol.feed.releases-feed { gap: 20px; }
.release .release-headline { margin: 10px 0 2px; font-size: 1.3rem; }
.release .release-body { color: var(--muted); font-size: 0.95rem; }
.release .release-body h2 { color: var(--text); font-size: 1.05rem; margin: 18px 0 6px; }
.release .release-body h3 { color: var(--text); font-size: 0.95rem; margin: 14px 0 4px; }
.release .release-body p { margin: 6px 0; max-width: 72ch; }
.release .release-body ul { margin: 6px 0; padding-left: 1.2em; }
.release .release-body li { margin: 2px 0; }
.release .release-body code { font-family: var(--mono); background: #0a0f1e; padding: 1px 5px; border-radius: 4px; font-size: 0.88em; overflow-wrap: anywhere; }
.release .release-body a { color: var(--accent); }

/* flagship */
.flagship-tagline { color: var(--accent); font-size: 1.05rem; margin-top: -8px; }

/* demo */
.widget { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 22px; max-width: 720px; }
.widget form { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.widget label { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; color: var(--muted); flex: 1; min-width: 220px; }
.widget input {
  background: #0a0f1e; border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); padding: 10px 12px; font-size: 1rem;
}
.widget input:focus { border-color: var(--accent); }
.widget button {
  background: var(--accent); color: #06201b; border: none; border-radius: 8px;
  padding: 11px 22px; font-weight: 700; cursor: pointer; font-size: 1rem;
}
.widget button:disabled { opacity: 0.5; cursor: wait; }
.widget pre {
  background: #0a0f1e; border: 1px solid var(--border); border-radius: 10px;
  padding: 14px; margin: 16px 0 0; max-height: 420px; overflow: auto;
  font-family: var(--mono); font-size: 0.85rem; white-space: pre-wrap; word-break: break-word;
}

footer.site {
  border-top: 1px solid var(--border); padding: 24px 20px 28px; color: var(--muted);
  font-size: 0.95rem;
}
footer.site .inner { max-width: 1080px; margin: 0 auto; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
footer.site .inner.sunk { justify-content: center; gap: 22px; margin-bottom: 14px; font-size: 0.85rem; }
footer.site a { color: var(--muted); }
footer.site a:hover { color: var(--accent); }
footer.site .gh { display: inline-flex; align-items: center; gap: 6px; }
footer.site .gh svg { display: block; }
footer.site .org { display: inline-flex; align-items: center; gap: 8px; }

/* indicators page: dashboard charts */
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-bottom: 36px; }
.chart-card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; }
.chart-card h3 { margin: 0 0 12px; font-size: 0.95rem; color: var(--muted); font-weight: 600; }
.chart-svg { width: 100%; height: auto; display: block; }
.chart-svg text { font-family: var(--mono); font-size: 0.95rem; fill: var(--muted); }
.chart-svg .chart-value { fill: var(--text); }
.chart-svg .chart-hole-num { fill: var(--text); font-size: 1.7rem; font-weight: 700; }
.chart-svg .chart-hole-label { font-size: 0.78rem; }
.chart-card .chart-donut { max-width: 260px; margin: 0 auto; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 0.78rem; color: var(--muted); }
.chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.chart-legend i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.chart-legend b { color: var(--text); font-family: var(--mono); font-weight: 600; }
.chart-empty { color: var(--muted); font-size: 0.85rem; margin: 8px 0; }
.chart-host { position: relative; }
.chart-tip {
  position: absolute; display: none; pointer-events: none; z-index: 5;
  background: #0a0f1e; border: 1px solid var(--accent); border-radius: 6px;
  color: var(--text); font-family: var(--mono); font-size: 0.78rem; padding: 3px 8px;
}

/* indicators page: search + results */
.ind-search { margin-bottom: 16px; }
.ind-search input {
  width: 100%; background: #0a0f1e; border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); padding: 12px 16px; font-size: 1rem;
}
.ind-search input:focus { border-color: var(--accent); }
.ind-results { display: flex; flex-direction: column; gap: 8px; }
.ind-row {
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 16px; cursor: pointer; text-align: left; width: 100%;
  color: inherit; font: inherit;
}
.ind-row:hover { border-color: var(--accent); }
.ind-row.active { border-color: var(--accent); background: var(--bg-soft); }
.ind-row .code { font-family: var(--mono); color: var(--accent-2); font-weight: 700; font-size: 0.95rem; }
.ind-row .names { color: var(--text); font-size: 0.95rem; margin-top: 2px; }
.ind-row .names .zh { color: var(--muted); margin-left: 8px; }
.ind-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.ind-badges span {
  font-size: 0.78rem; font-family: var(--mono); color: var(--muted);
  border: 1px solid var(--border); border-radius: 999px; padding: 1px 9px;
}
.ind-empty { color: var(--muted); padding: 24px 0; text-align: center; }
.ind-more { color: var(--muted); font-size: 0.85rem; text-align: center; padding: 6px 0; }

/* indicators page: drill-down detail */
.ind-detail { background: var(--bg-soft); border: 1px solid var(--accent); border-radius: 12px; padding: 20px 22px; margin: 20px 0 28px; }
.ind-detail .head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.ind-detail .head .code { font-family: var(--mono); color: var(--accent-2); font-weight: 700; }
.ind-detail .head .name { font-size: 1.15rem; font-weight: 700; }
.ind-detail .close {
  margin-left: auto; background: none; border: 1px solid var(--border); color: var(--muted);
  border-radius: 8px; padding: 4px 12px; cursor: pointer; font: inherit; font-size: 0.85rem;
}
.ind-detail .close:hover { color: var(--text); border-color: var(--accent); }
.ind-meta { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 0.95rem; }
.ind-meta th { text-align: left; color: var(--muted); font-weight: 500; padding: 5px 18px 5px 0; white-space: nowrap; vertical-align: top; }
.ind-meta td { color: var(--text); font-family: var(--mono); font-size: 0.85rem; }
.ind-detail .demo-link { display: inline-block; margin-top: 6px; font-weight: 600; }
.ind-detail .no-sample { color: var(--muted); font-size: 0.95rem; margin: 10px 0; }

@media (max-width: 900px) {
  header.site nav { flex-wrap: wrap; height: auto; padding: 10px 16px; row-gap: 6px; }
  header.site .nav-links { flex-wrap: wrap; gap: 8px 16px; }
  header.site .lang { margin-left: auto; }
}

@media (max-width: 640px) {
  .chart-grid { grid-template-columns: 1fr; }
  .ind-detail .close { margin-left: 0; }
  header.site nav { gap: 10px; padding: 10px 16px; }
  header.site .nav-links { gap: 8px 14px; }
  header.site .nav-links a { font-size: 0.95rem; }
  header.site .lang { font-size: 0.85rem; }
}

/* indicators page: catalog export freshness */
.catalog-asof { color: var(--muted); font-size: 0.85rem; font-family: var(--mono); margin: 0 0 14px; }

/* ── /demo Platform product tour ─────────────────────────────────── */
::selection { background: rgba(56, 225, 200, 0.28); color: var(--text); }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px;
}

.tour-hero {
  display: grid; grid-template-columns: 1fr 1.15fr; gap: 44px; align-items: center;
  margin-top: 40px; padding: 40px 0 8px; border-top: 1px solid var(--border);
}
.tour-copy h2 { font-size: var(--fs-h2); line-height: 1.25; margin: 0 0 10px; }
.tour-copy .sub { color: var(--muted); font-size: var(--fs-label); max-width: 52ch; }
.tour-cta {
  display: inline-flex; align-items: center; gap: 9px; margin-top: 26px;
  background: var(--accent); color: #06201b; border-radius: 10px;
  padding: 13px 24px; font-weight: 700; font-size: 1.05rem;
  box-shadow: 0 10px 26px -12px rgba(56, 225, 200, 0.5);
}
.tour-cta:hover { text-decoration: none; filter: brightness(1.07); }
.cta-note { color: var(--muted); font-size: 0.85rem; margin-top: 12px; }

.tour-mock {
  margin: 0; display: grid; grid-template-columns: 132px 1fr;
  background: var(--readout-void); border: 1px solid var(--border); border-radius: 14px;
  overflow: hidden; min-height: 380px;
  box-shadow: 14px 22px 44px -22px rgba(2, 6, 18, 0.85);
  font-size: 0.78rem;
}
.tm-rail { border-right: 1px solid var(--border); padding: 14px 10px; display: flex; flex-direction: column; gap: 9px; }
.tm-brand { width: 9px; height: 9px; border-radius: 4px; background: var(--accent); margin: 2px 6px 10px; }
.tm-nav { color: var(--muted); font-family: var(--mono); font-size: 0.78rem; padding: 4px 8px; border-radius: 6px; }
.tm-nav.active { color: var(--text); background: rgba(56, 225, 200, 0.1); }
.tm-main { display: flex; flex-direction: column; }
.tm-head {
  display: flex; justify-content: space-between; gap: 10px; padding: 11px 16px;
  border-bottom: 1px solid var(--border); font-family: var(--mono); font-size: 0.68rem; color: var(--muted);
}
.tm-head .tm-mode { color: var(--accent-2); }
.tm-thread { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.tm-msg { max-width: 88%; }
.tm-msg p { margin: 0; }
.tm-user { align-self: flex-end; background: var(--panel); border: 1px solid var(--border); border-radius: 12px 12px 4px 12px; padding: 9px 13px; color: var(--text); }
.tm-assistant { display: flex; flex-direction: column; gap: 8px; }
.tm-tool {
  display: inline-flex; align-items: center; gap: 7px; align-self: flex-start;
  font-family: var(--mono); font-size: 0.68rem; color: var(--accent-2);
  background: rgba(106, 166, 255, 0.08); border-radius: 6px; padding: 3px 9px;
}
.tm-tool svg { color: var(--accent); }
.tm-tool em { font-style: normal; color: var(--muted); }
.tm-assistant > p { color: var(--text); }
.tm-assistant blockquote { margin: 0; padding: 6px 12px; color: var(--muted); background: rgba(154, 166, 208, 0.07); border-radius: 8px; }
.tm-live { min-height: 14px; }
.tm-caret {
  display: inline-block; width: 8px; height: 14px; vertical-align: -2px;
  background: var(--accent); border-radius: 2px; animation: tm-blink 1.1s steps(2, start) infinite;
}
@keyframes tm-blink { to { visibility: hidden; } }
.tm-input { margin: 0 16px 14px; border: 1px solid var(--border); border-radius: 10px; padding: 8px 13px; color: var(--muted); font-family: var(--mono); font-size: 0.68rem; }

.tour-features { max-width: 880px; margin: 64px auto 0; border-top: 1px solid var(--border); padding-top: 34px; }
.tour-features h2 { font-size: 1.45rem; margin: 0 0 6px; }
.tour-rows { margin-top: 18px; }
.tour-row {
  display: grid; grid-template-columns: 30px 1fr; gap: 18px;
  padding: 20px 2px; border-top: 1px solid var(--border);
}
.tour-ico { color: var(--accent-2); margin-top: 3px; }
.tour-row h3 { margin: 0 0 6px; font-size: 1.05rem; }
.tour-row p { margin: 0; color: var(--muted); font-size: 0.95rem; max-width: 68ch; }

.tour-trial {
  display: grid; grid-template-columns: 1fr 1.1fr; gap: 36px; align-items: center;
  background: var(--panel); border: 1px solid var(--border); border-radius: 16px;
  padding: 34px 36px; margin-top: 64px;
}
.trial-copy h2 { margin: 0 0 10px; font-size: 1.45rem; }
.trial-copy p { color: var(--muted); margin: 0 0 22px; max-width: 44ch; }
.trial-copy .primary {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  background: var(--accent); color: #06201b; border-radius: 10px; padding: 12px 22px; font-weight: 700;
}
.trial-copy .primary:hover { text-decoration: none; filter: brightness(1.07); }
.trial-panel { display: flex; flex-direction: column; gap: 12px; }
.trial-field {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  background: var(--readout-void); border: 1px solid var(--border); border-radius: 10px; padding: 11px 14px;
}
.trial-label { color: var(--muted); font-size: 0.78rem; white-space: nowrap; }
.trial-value { font-family: var(--mono); font-size: 0.85rem; color: var(--text); overflow-wrap: anywhere; }
.copy-btn {
  font: inherit; font-size: 0.78rem; color: var(--accent); background: none; cursor: pointer;
  border: 1px solid var(--border); border-radius: 6px; padding: 5px 12px; white-space: nowrap;
}
.copy-btn:hover { border-color: var(--accent); }
.copy-btn.ok { color: #06201b; background: var(--accent); border-color: var(--accent); }
.trial-note { color: var(--muted); font-size: 0.78rem; font-family: var(--mono); margin: 4px 0 0; }

@media (prefers-reduced-motion: reduce) {
  .tm-caret { animation: none; }
}
@media (max-width: 900px) {
  .tour-hero { grid-template-columns: 1fr; gap: 30px; }
  .tour-mock { font-size: 0.78rem; min-height: 320px; }
  .tour-trial { grid-template-columns: 1fr; padding: 26px 22px; gap: 24px; }
}
@media (max-width: 560px) {
  .tour-mock { grid-template-columns: 96px 1fr; }
  .tm-rail { padding: 10px 6px; }
  .tm-nav { font-size: 0.68rem; }
  .tm-msg { max-width: 100%; }
  .trial-field { grid-template-columns: 1fr auto; }
  .trial-label { grid-column: 1 / -1; }
}

/* data modules explorer */
.data-explorer { margin-top: 36px; }
/* three-caliber band (registered / servable / active) — same panel language as .data-summary */
.data-calibers {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  border: 1px solid var(--border); border-radius: 12px; padding: 16px 20px;
  background: var(--panel); margin-bottom: 28px;
}
.data-calibers-item { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.data-calibers-value { color: var(--accent); font-family: var(--mono); font-size: 1.45rem; line-height: 1; }
.data-calibers-value.is-unknown { color: var(--muted); font-size: 1.05rem; font-weight: 400; }
.data-calibers-label { color: var(--muted); font-size: 0.95rem; }
.data-calibers-asof { color: var(--muted); font-family: var(--mono); font-size: 0.78rem; margin: 0; text-align: right; }
.data-summary {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px;
  background: var(--panel); margin-bottom: 28px;
}
.data-summary > div { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.data-summary-label { color: var(--muted); font-size: 0.95rem; }
.data-summary-value { color: var(--accent); font-family: var(--mono); font-size: 1.7rem; line-height: 1; }
.data-summary-rate { color: var(--text); font-size: 0.95rem; }
.data-summary-asof { color: var(--muted); font-family: var(--mono); font-size: 0.78rem; margin: 0; text-align: right; }
.data-toolbar { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; }
.data-toolbar-label { color: var(--muted); font-size: 0.95rem; white-space: nowrap; }
.data-tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.data-tabs::-webkit-scrollbar { display: none; }
.data-tab {
  flex: 0 0 auto; background: var(--bg-soft); color: var(--muted); border: 1px solid var(--border);
  border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 0.85rem; cursor: pointer;
}
.data-tab:hover { color: var(--text); border-color: var(--accent-2); }
.data-tab.is-active { color: #06201b; background: var(--accent); border-color: var(--accent); font-weight: 700; }
.data-view[hidden] { display: none; }
.data-group + .data-group { margin-top: 34px; }
.data-group-title { color: var(--text); font-size: 1.05rem; margin: 0 0 14px; }
.data-group-count { color: var(--muted); font-family: var(--mono); font-size: 0.78rem; font-weight: 400; }
.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.module-card {
  display: flex; flex-direction: column; gap: 14px; min-width: 0;
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 18px;
}
.module-card:hover { border-color: var(--accent); }
.module-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.module-name { color: var(--text); font-size: 1.05rem; line-height: 1.3; margin: 0; }
.module-name-alt { color: var(--accent-2); font-family: var(--mono); font-size: 0.78rem; margin: 5px 0 0; overflow-wrap: anywhere; }
.module-status {
  flex: 0 0 auto; color: var(--muted); border: 1px solid var(--border); border-radius: 999px;
  padding: 3px 9px; font-family: var(--mono); font-size: 0.78rem; white-space: nowrap;
}
.module-status.is-paused { color: var(--muted); background: transparent; border: 1px dashed var(--muted); }
.module-description { color: var(--text); font-size: 0.95rem; line-height: 1.55; margin: 0; }
.module-description-alt { color: var(--muted); font-size: 0.85rem; line-height: 1.5; margin: -8px 0 0; }
.module-badges, .module-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.badge, .module-chip {
  color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 2px 8px;
  font-family: var(--mono); font-size: 0.68rem; line-height: 1.4;
}
.badge-database { color: var(--accent-2); }
.module-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 8px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 12px 0; }
.module-stat { min-width: 0; }
.module-stat strong { display: block; color: var(--accent); font-family: var(--mono); font-size: 1.15rem; line-height: 1.2; overflow-wrap: anywhere; }
.module-stat span { display: block; color: var(--muted); font-size: 0.78rem; margin-top: 3px; }
.module-mcp-line { margin: -4px 0 12px; font-family: var(--mono); font-size: 0.78rem; color: var(--muted); }
.module-dbstats { display: grid; gap: 6px; margin: 0 0 14px; padding: 10px 12px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; }
.module-dbstats-label { color: var(--muted); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; }
.module-dbstat { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; font-size: 0.78rem; }
.module-dbstat-db { font-family: var(--mono); font-size: 0.78rem; color: var(--accent-2); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; }
.module-dbstat-value { color: var(--muted); }
.module-dbstat-value b { color: var(--text); }
.module-dbstat-detail { flex-basis: 100%; color: var(--muted); font-size: 0.78rem; }
.module-meta { display: grid; gap: 7px; margin: 0; font-size: 0.78rem; }
.module-meta div { display: flex; gap: 10px; }
.module-meta dt { flex: 0 0 92px; color: var(--muted); }
.module-meta dd { margin: 0; color: var(--text); font-family: var(--mono); overflow-wrap: anywhere; }
.module-chip { color: var(--accent-2); background: var(--bg-soft); }
.module-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 4px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 8px; padding: 9px 13px; font-size: 0.85rem; font-weight: 700; }
.button:hover { text-decoration: none; }
.button-primary { color: #06201b; background: var(--accent); border: 1px solid var(--accent); }
.button-primary:hover { filter: brightness(1.08); }
.button-secondary { color: var(--accent-2); background: transparent; border: 1px solid var(--border); }
.button-secondary:hover { border-color: var(--accent-2); }
.data-empty { color: var(--muted); border: 1px dashed var(--border); border-radius: 12px; padding: 28px; text-align: center; }

@media (max-width: 640px) {
  .data-summary { align-items: flex-start; flex-direction: column; gap: 12px; padding: 16px; }
  .data-summary-asof { text-align: left; }
  .data-calibers { align-items: flex-start; flex-direction: column; gap: 10px; padding: 16px; }
  .data-calibers-asof { text-align: left; }
  .data-toolbar { align-items: flex-start; flex-direction: column; gap: 10px; }
  .data-tabs { width: 100%; }
  .data-tab { padding: 10px 16px; }
  .module-grid { grid-template-columns: 1fr; }
  .module-card-top { gap: 8px; }
  .module-status { font-size: 0.68rem; }
  .module-meta div { align-items: flex-start; flex-direction: column; gap: 2px; }
  .module-actions .button { flex: 1 1 150px; }
}
