/* ─────────────────────────────────────────────────────────────────────────
   BioQ design system

   The palette comes from the protein lab bench: Coomassie blue (the stain on
   every protein gel) for ink and actions, Ponceau pink (the membrane stain)
   as the one accent, and residue colours for sequences, which are data and
   always coloured the way biologists expect to read them.

   Type: Mona Sans (expanded) for Latin display, Inter for Latin UI, JetBrains
   Mono only for sequences, identifiers and code. Each CJK language uses the
   typeface its readers see every day (Pretendard; Hiragino / Yu Gothic;
   PingFang / Microsoft YaHei / JhengHei), set with that script's spacing.
   ───────────────────────────────────────────────────────────────────────── */

@font-face { font-family: "Mona Sans"; font-style: normal; font-display: swap; font-weight: 200 900; font-stretch: 75% 125%;
  src: url(/static/fonts/mona-sans-latin-wdth-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Mona Sans"; font-style: normal; font-display: swap; font-weight: 200 900; font-stretch: 75% 125%;
  src: url(/static/fonts/mona-sans-latin-ext-wdth-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/static/fonts/inter-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/static/fonts/inter-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-display: swap; font-weight: 100 800;
  src: url(/static/fonts/jetbrains-mono-latin-wght-normal.woff2) format("woff2-variations"); }

:root {
  color-scheme: light;
  --paper: #f5f7fb;
  --surface: #ffffff;
  --gel: #eef1f8;
  --gel-2: #e4e9f5;
  --ink: #0f1a3a;
  --text: #2a3354;
  --muted: #59637f;
  --faint: #8a93ae;
  --line: #dde2ee;
  --line-strong: #c3cadb;
  --primary: #2541b2;
  --primary-hover: #1b318f;
  --primary-ink: #ffffff;
  --primary-soft: #e7ecfc;
  --accent: #e8456b;
  --accent-soft: #fde9ee;
  --ok: #17845a;
  --ok-soft: #e3f4ec;
  --warn: #a86400;
  --warn-soft: #fbf0dc;
  --bad: #c22f4b;
  --bad-soft: #fbe6ea;
  --band: #0f1a3a;
  --band-2: #17244d;
  --on-band: #e9edf9;
  --on-band-muted: #a6b1d3;
  --shadow-window: 0 1px 0 rgba(15, 26, 58, .04), 0 24px 48px -24px rgba(15, 26, 58, .28);
  --shadow-pop: 0 12px 32px -12px rgba(15, 26, 58, .3);

  /* residue colours: hydrophobic, positive, negative, polar, special */
  --aa-h: #2f62d6; --aa-pos: #d1334b; --aa-neg: #b02f86; --aa-pol: #15925a;
  --aa-c: #d27d00; --aa-g: #a76b00; --aa-p: #8a7c00; --aa-aro: #0b8f9c;
  --nt-a: #15925a; --nt-c: #2f62d6; --nt-g: #b06f00; --nt-t: #d1334b;

  --r-chip: 6px; --r-input: 10px; --r-panel: 14px; --r-window: 18px;

  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Mona Sans", var(--font-ui);
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --display-stretch: 112%;
  --display-track: -0.025em;
  --body-lh: 1.6;
  --body-track: 0;
  --hero-size: clamp(2.25rem, 1.3rem + 4.6vw, 4.75rem);
  --h2-size: clamp(1.75rem, 1.2rem + 2vw, 2.625rem);

  --gutter: 24px;
  --max: 1200px;
}

/* Language-specific type. Pretendard's Latin is drawn from Inter, so Korean pages
   stay in one family. CJK display text stays upright and normal width. */
:lang(ko) {
  --font-ui: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", system-ui, sans-serif;
  --font-display: var(--font-ui);
  --display-stretch: 100%;
  --display-track: -0.03em;
  --body-lh: 1.7;
  --body-track: -0.005em;
  --hero-size: clamp(2.125rem, 1.3rem + 3.6vw, 3.875rem);
}
:lang(ja) {
  --font-ui: "Inter", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", YuGothic, Meiryo, "Noto Sans JP", "Noto Sans CJK JP", sans-serif;
  --font-display: var(--font-ui);
  --display-stretch: 100%;
  --display-track: 0;
  --body-lh: 1.85;
  --body-track: 0.02em;
  --hero-size: clamp(2rem, 1.2rem + 3.2vw, 3.5rem);
}
:lang(zh-Hans) {
  --font-ui: "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;
  --font-display: var(--font-ui);
  --display-stretch: 100%;
  --display-track: 0;
  --body-lh: 1.8;
  --hero-size: clamp(2rem, 1.2rem + 3.2vw, 3.5rem);
}
:lang(zh-Hant) {
  --font-ui: "Inter", "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", "Noto Sans CJK TC", "Source Han Sans TC", sans-serif;
  --font-display: var(--font-ui);
  --display-stretch: 100%;
  --display-track: 0;
  --body-lh: 1.8;
  --hero-size: clamp(2rem, 1.2rem + 3.2vw, 3.5rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #0a0f1f; --surface: #111832; --gel: #172042; --gel-2: #1d2850;
    --ink: #eef1fb; --text: #cdd4ea; --muted: #97a2c4; --faint: #6d789c;
    --line: #232d54; --line-strong: #344172;
    --primary: #7f97ff; --primary-hover: #a3b4ff; --primary-ink: #0a0f1f; --primary-soft: #1c2758;
    --accent: #ff7395; --accent-soft: #3a1830;
    --ok: #4cc58e; --ok-soft: #12302a; --warn: #f0ae4a; --warn-soft: #33270f; --bad: #ff7d93; --bad-soft: #3a1622;
    --band: #060a17; --band-2: #0e1530; --on-band: #e9edf9; --on-band-muted: #9aa6cc;
    --shadow-window: 0 0 0 1px rgba(127, 151, 255, .12), 0 24px 48px -24px rgba(0, 0, 0, .7);
    --shadow-pop: 0 12px 32px -12px rgba(0, 0, 0, .7);
    --aa-h: #7d9dff; --aa-pos: #ff7b8e; --aa-neg: #f07ccd; --aa-pol: #4cc58e;
    --aa-c: #ffb547; --aa-g: #e3a24a; --aa-p: #d6c84a; --aa-aro: #46cfdb;
    --nt-a: #4cc58e; --nt-c: #7d9dff; --nt-g: #ffb547; --nt-t: #ff7b8e;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0a0f1f; --surface: #111832; --gel: #172042; --gel-2: #1d2850;
  --ink: #eef1fb; --text: #cdd4ea; --muted: #97a2c4; --faint: #6d789c;
  --line: #232d54; --line-strong: #344172;
  --primary: #7f97ff; --primary-hover: #a3b4ff; --primary-ink: #0a0f1f; --primary-soft: #1c2758;
  --accent: #ff7395; --accent-soft: #3a1830;
  --ok: #4cc58e; --ok-soft: #12302a; --warn: #f0ae4a; --warn-soft: #33270f; --bad: #ff7d93; --bad-soft: #3a1622;
  --band: #060a17; --band-2: #0e1530; --on-band: #e9edf9; --on-band-muted: #9aa6cc;
  --shadow-window: 0 0 0 1px rgba(127, 151, 255, .12), 0 24px 48px -24px rgba(0, 0, 0, .7);
  --shadow-pop: 0 12px 32px -12px rgba(0, 0, 0, .7);
  --aa-h: #7d9dff; --aa-pos: #ff7b8e; --aa-neg: #f07ccd; --aa-pol: #4cc58e;
  --aa-c: #ffb547; --aa-g: #e3a24a; --aa-p: #d6c84a; --aa-aro: #46cfdb;
  --nt-a: #4cc58e; --nt-c: #7d9dff; --nt-g: #ffb547; --nt-t: #ff7b8e;
}

/* ── base ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--paper); color: var(--text);
  font-family: var(--font-ui); font-size: 16px; line-height: var(--body-lh); letter-spacing: var(--body-track);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01";
}
:lang(ko) body, :lang(ko).body { word-break: keep-all; overflow-wrap: anywhere; }
:lang(ja) body { line-break: strict; }
img, svg { display: block; max-width: 100%; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
::selection { background: var(--accent-soft); color: var(--ink); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { color: var(--ink); margin: 0; font-weight: 650; line-height: 1.2; }
p { margin: 0; }
button { font: inherit; color: inherit; }
code, kbd, pre, .mono { font-family: var(--font-mono); font-size: .92em; letter-spacing: 0; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -120px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: 8px; box-shadow: var(--shadow-pop); }
.skip:focus { top: 12px; }
[hidden] { display: none !important; }
@media (max-width: 640px) { :root { --gutter: 16px; } }

/* ── buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: var(--r-input); border: 1px solid transparent;
  font-weight: 600; font-size: 15px; line-height: 1; cursor: pointer; white-space: nowrap;
  text-decoration: none !important; transition: background-color .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-quiet:hover { border-color: var(--ink); }
.btn-ghost { background: transparent; color: var(--text); height: 36px; padding: 0 10px; }
.btn-ghost:hover { background: var(--gel); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 14px; border-radius: 8px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn-on-band { background: var(--on-band); color: var(--band); }
.btn-on-band:hover { background: #fff; }

/* ── header ─────────────────────────────────────────────────────────────── */
.site-head { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-head.scrolled { border-bottom-color: var(--line); }
.site-head .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none !important; flex: 0 0 auto; }
.logo svg { width: 28px; height: 28px; }
.logo b { font-family: "Mona Sans", var(--font-ui); font-stretch: 115%; font-weight: 750; font-size: 21px; letter-spacing: -0.03em; }
.nav { display: flex; gap: 4px; align-items: center; }
.nav a { color: var(--text); padding: 8px 10px; border-radius: 8px; font-size: 15px; font-weight: 500; }
.nav a:hover { background: var(--gel); text-decoration: none; }
.head-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.pop-btn.menu-btn { display: none; }
@media (max-width: 900px) {
  .nav, .head-right .hide-m { display: none; }
  .pop-btn.menu-btn { display: inline-flex; }
}
.mobile-nav { border-top: 1px solid var(--line); background: var(--paper); padding: 8px var(--gutter) 20px; }
.mobile-nav a { display: block; padding: 12px 4px; color: var(--ink); font-size: 17px; border-bottom: 1px solid var(--line); }
.mobile-nav .btn { width: 100%; margin-top: 16px; }

/* popover menus (language, theme, account) */
.pop { position: relative; }
.pop-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px; border-radius: 8px; background: transparent; border: 1px solid transparent; cursor: pointer; color: var(--text); font-size: 14px; }
.pop-btn:hover { background: var(--gel); }
.pop-btn svg { width: 18px; height: 18px; }
.pop-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 180px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-pop); padding: 6px; z-index: 60; }
.pop-menu a, .pop-menu button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; border: 0; background: transparent; color: var(--text); font-size: 14px; text-align: left; cursor: pointer; text-decoration: none; }
.pop-menu a:hover, .pop-menu button:hover { background: var(--gel); text-decoration: none; }
.pop-menu [aria-current="true"], .pop-menu [aria-checked="true"] { color: var(--primary); font-weight: 600; }
.pop-menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
.pop-menu .meta { padding: 8px 10px 10px; font-size: 13px; color: var(--muted); }

/* ── hero ───────────────────────────────────────────────────────────────── */
.hero { padding: 72px 0 40px; }
.hero h1 {
  font-family: var(--font-display); font-stretch: var(--display-stretch); font-weight: 720;
  font-size: var(--hero-size); line-height: 1.02; letter-spacing: var(--display-track);
  max-width: 16ch; text-wrap: balance;
}
:lang(ko) .hero h1, :lang(ja) .hero h1, :lang(zh-Hans) .hero h1, :lang(zh-Hant) .hero h1 { line-height: 1.18; max-width: 18em; font-weight: 750; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 56px; margin-top: 40px; align-items: start; }
.hero-lead { font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem); line-height: 1.6; color: var(--text); max-width: 34em; }
:lang(ja) .hero-lead, :lang(zh-Hans) .hero-lead, :lang(zh-Hant) .hero-lead { line-height: 1.85; }
.hero-note { margin-top: 14px; font-size: 14px; color: var(--muted); }
.hero-links { margin-top: 22px; display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; } .hero { padding-top: 44px; } }

/* omnibox (landing + app) */
.omni { margin-top: 28px; display: flex; align-items: stretch; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 14px; padding: 6px; gap: 6px; box-shadow: 0 1px 0 rgba(15, 26, 58, .03); transition: border-color .15s, box-shadow .15s; }
.omni:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.omni textarea, .omni input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink);
  font: inherit; font-size: 16px; padding: 10px 10px; resize: none; line-height: 1.5;
}
.omni textarea { min-height: 44px; max-height: 220px; }
.omni textarea::placeholder, .omni input::placeholder { color: var(--faint); }
.omni .btn { align-self: flex-end; }

/* demo window */
.window { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-window); box-shadow: var(--shadow-window); overflow: hidden; }
.window-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.window-bar .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); display: inline-block; margin-right: 8px; }
.demo { padding: 18px 18px 20px; }
.demo-q { font-weight: 600; color: var(--ink); font-size: 15px; line-height: 1.5; }
.demo-steps { list-style: none; margin: 14px 0 0; padding: 0; border-left: 2px solid var(--line); }
.demo-steps li { position: relative; padding: 6px 0 6px 18px; font-size: 13.5px; display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: baseline; }
.demo-steps li::before { content: ""; position: absolute; left: -5px; top: 13px; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.demo-steps .n { font-family: var(--font-mono); font-size: 12px; color: var(--primary); font-weight: 600; }
.demo-steps code { color: var(--ink); font-size: 12.5px; }
.demo-steps .what { color: var(--muted); grid-column: 2 / 4; font-size: 13px; margin-top: -2px; }
.demo-steps .ms { font-family: var(--font-mono); font-size: 11.5px; color: var(--faint); }
.demo-answer { margin-top: 16px; font-size: 14.5px; line-height: 1.65; color: var(--text); }
.demo-answer .cite { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 18px; padding: 0 5px; margin: 0 1px; border-radius: 5px; background: var(--primary-soft); color: var(--primary); font-size: 11px; font-weight: 700; vertical-align: 1px; font-family: var(--font-mono); }
.demo-limit { margin-top: 12px; font-size: 13px; color: var(--muted); padding-top: 12px; border-top: 1px dashed var(--line); }
.demo [data-reveal] { opacity: 1; }
.js-anim .demo [data-reveal] { opacity: 0; transform: translateY(4px); transition: opacity .35s ease, transform .35s ease; }
.js-anim .demo [data-reveal].on { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js-anim .demo [data-reveal] { opacity: 1; transform: none; transition: none; } }

/* ── signature: corpus tracks ───────────────────────────────────────────── */
.tracks-sec { padding: 40px 0 24px; }
.tracks-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.tracks-head h2 { font-size: 15px; font-weight: 650; color: var(--ink); letter-spacing: 0; }
.tracks-head p { font-size: 13px; color: var(--muted); }
.tracks { background: var(--band); color: var(--on-band); border-radius: var(--r-window); padding: 22px 24px; overflow: hidden; }
.track { display: grid; grid-template-columns: 170px minmax(0, 1fr) 120px; gap: 18px; align-items: center; padding: 7px 0; }
.track + .track { border-top: 1px solid rgba(255, 255, 255, .06); }
.track-name { font-size: 13.5px; font-weight: 600; color: var(--on-band); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-count { font-family: var(--font-mono); font-size: 13px; color: var(--on-band-muted); text-align: right; white-space: nowrap; }
.track-bar { position: relative; height: 18px; overflow: hidden; white-space: nowrap; font-family: var(--font-mono); font-size: 12.5px; line-height: 18px; letter-spacing: .04em; }
.track-bar span.seq { display: block; overflow: hidden; width: var(--w, 50%); mask-image: linear-gradient(90deg, #000 85%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); }
.js-anim .track-bar span.seq { width: 0; transition: width 1.4s cubic-bezier(.2, .7, .1, 1); }
.js-anim .tracks.on .track-bar span.seq { width: var(--w, 50%); }
@media (prefers-reduced-motion: reduce) { .js-anim .track-bar span.seq { width: var(--w, 50%); transition: none; } }
.tracks .r-h { color: #8fb0ff; } .tracks .r-pos { color: #ff8a9c; } .tracks .r-neg { color: #f39bd8; } .tracks .r-pol { color: #63d6a0; }
.tracks .r-c { color: #ffc266; } .tracks .r-g { color: #f0b867; } .tracks .r-p { color: #e3d76b; } .tracks .r-aro { color: #62dce6; }
.tracks .n-a { color: #63d6a0; } .tracks .n-c { color: #8fb0ff; } .tracks .n-g { color: #ffc266; } .tracks .n-t { color: #ff8a9c; }
@media (max-width: 720px) {
  .tracks { padding: 16px; }
  .track { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
  .track-bar { grid-column: 1 / -1; order: 3; }
}

/* ── sections ───────────────────────────────────────────────────────────── */
.sec { padding: 96px 0; }
.sec-tight { padding: 64px 0; }
.sec h2, .sec-tight h2 { font-family: var(--font-display); font-stretch: var(--display-stretch); font-size: var(--h2-size); letter-spacing: var(--display-track); font-weight: 700; line-height: 1.1; max-width: 22ch; text-wrap: balance; }
:lang(ko) .sec h2, :lang(ja) .sec h2, :lang(zh-Hans) .sec h2, :lang(zh-Hant) .sec h2, :lang(ko) .sec-tight h2, :lang(ja) .sec-tight h2, :lang(zh-Hans) .sec-tight h2, :lang(zh-Hant) .sec-tight h2 { line-height: 1.3; max-width: 24em; }
.sec .lead { margin-top: 18px; font-size: 18px; color: var(--text); max-width: 40em; }
@media (max-width: 720px) { .sec { padding: 64px 0; } .sec .lead { font-size: 16.5px; } }

/* before/after table */
.versus { margin-top: 40px; width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); overflow: hidden; }
.versus th, .versus td { text-align: left; vertical-align: top; padding: 18px 20px; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.55; }
.versus tr:last-child td { border-bottom: 0; }
.versus thead th { font-size: 13px; font-weight: 600; color: var(--muted); background: var(--gel); }
.versus td:first-child { font-weight: 650; color: var(--ink); width: 24%; }
.versus td:nth-child(2) { color: var(--muted); width: 38%; }
.versus td:nth-child(3) { color: var(--ink); }
.versus thead th:nth-child(3) { color: var(--primary); }
@media (max-width: 760px) {
  .versus, .versus tbody, .versus tr, .versus td { display: block; width: 100% !important; }
  .versus thead { display: none; }
  .versus tr { border-bottom: 1px solid var(--line); padding: 16px; }
  .versus tr:last-child { border-bottom: 0; }
  .versus td { border: 0; padding: 4px 0; }
  .versus td:nth-child(2)::before, .versus td:nth-child(3)::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 600; color: var(--faint); margin-top: 8px; }
  .versus td:nth-child(3)::before { color: var(--primary); }
}

/* how it works: a real sequence of three steps */
.steps { margin-top: 48px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; counter-reset: s; border-top: 2px solid var(--ink); }
.steps li { list-style: none; padding: 24px 28px 0 0; counter-increment: s; }
.steps li::before { content: counter(s); font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: var(--primary); display: block; margin-bottom: 14px; }
.steps h3 { font-size: 20px; font-weight: 650; }
.steps p { margin-top: 10px; color: var(--muted); font-size: 15.5px; }
.steps ol, ol.steps { padding: 0; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } .steps li { padding: 22px 0 18px; border-bottom: 1px solid var(--line); } }

/* use cases */
.cases { margin-top: 44px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; }
.case { padding: 26px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.case h3 { font-size: 19px; }
.case p { color: var(--text); font-size: 16px; }
.case .case-layers { font-size: 13.5px; color: var(--muted); }
.case .try { justify-self: start; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 8px; background: var(--gel); color: var(--ink); font-family: var(--font-mono); font-size: 13px; border: 1px solid var(--line); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.case .try svg { width: 15px; height: 15px; flex: 0 0 auto; color: var(--muted); }
.case .try:hover { border-color: var(--primary); text-decoration: none; color: var(--primary); }
@media (max-width: 760px) { .cases { grid-template-columns: 1fr; } }

/* trust */
.trust-grid { margin-top: 44px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.principles { display: grid; gap: 26px; }
.principle h3 { font-size: 18px; display: flex; gap: 10px; align-items: baseline; }
.principle h3::before { content: ""; flex: 0 0 auto; width: 10px; height: 10px; border-radius: 2px; background: var(--accent); transform: translateY(-1px); }
.principle p { margin-top: 6px; color: var(--muted); padding-left: 20px; }
.code-card { background: var(--band); color: var(--on-band); border-radius: var(--r-panel); overflow: hidden; }
.code-card .cap { padding: 12px 16px; font-size: 12.5px; color: var(--on-band-muted); border-bottom: 1px solid rgba(255, 255, 255, .08); display: flex; justify-content: space-between; gap: 12px; }
.code-card pre { margin: 0; padding: 16px; font-size: 12.5px; line-height: 1.7; overflow-x: auto; color: #d9def0; }
.code-card .k { color: #9fb4ff; } .code-card .s { color: #8fe3b8; } .code-card .num { color: #ffc77a; } .code-card .hl { background: rgba(232, 69, 107, .22); border-radius: 3px; padding: 0 2px; }
@media (max-width: 900px) { .trust-grid { grid-template-columns: 1fr; } }

/* privacy band */
.band { background: var(--band); color: var(--on-band); }
.band h2 { color: var(--on-band); }
.band .lead { color: var(--on-band-muted); }
.privacy-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.privacy-list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 10px; }
.privacy-list li { display: flex; gap: 12px; align-items: center; font-weight: 600; }
.privacy-list li svg { width: 20px; height: 20px; color: #63d6a0; flex: 0 0 auto; }
.mask-demo { background: var(--band-2); border-radius: var(--r-panel); padding: 20px; font-family: var(--font-mono); font-size: 13px; line-height: 1.75; border: 1px solid rgba(255, 255, 255, .06); }
.mask-demo .lbl { font-family: var(--font-ui); font-size: 12px; color: var(--on-band-muted); margin-bottom: 6px; }
.mask-demo .seqline { word-break: break-all; }
.mask-demo .arrow { margin: 14px 0; color: var(--on-band-muted); font-family: var(--font-ui); font-size: 12px; display: flex; align-items: center; gap: 10px; }
.mask-demo .arrow::before, .mask-demo .arrow::after { content: ""; height: 1px; background: rgba(255, 255, 255, .14); flex: 1; }
.mask-demo .handle { display: inline-block; background: rgba(232, 69, 107, .2); color: #ffb3c4; border: 1px solid rgba(255, 115, 149, .4); border-radius: 6px; padding: 0 6px; }
@media (max-width: 900px) { .privacy-grid { grid-template-columns: 1fr; gap: 32px; } }

/* api */
.api-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 56px; align-items: center; }
.tabs { display: flex; gap: 2px; padding: 4px; background: rgba(255, 255, 255, .06); border-radius: 10px; }
.tabs button { flex: 0 0 auto; border: 0; background: transparent; color: var(--on-band-muted); padding: 6px 12px; border-radius: 7px; font-size: 13px; cursor: pointer; }
.tabs button[aria-selected="true"] { background: rgba(255, 255, 255, .12); color: var(--on-band); }
.code-card .cap .tabs { padding: 0; background: transparent; }
@media (max-width: 900px) { .api-grid { grid-template-columns: 1fr; gap: 28px; } }

/* coverage table */
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th, .table td { text-align: left; padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: 13px; color: var(--muted); font-weight: 600; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table td:first-child { font-weight: 650; color: var(--ink); white-space: nowrap; }
.cov-wrap { margin-top: 36px; overflow-x: auto; }
@media (max-width: 640px) { .cov-wrap .table td:nth-child(2) { min-width: 220px; } }

/* final CTA */
.cta { text-align: left; display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; padding: 48px; border-radius: var(--r-window); background: var(--primary); color: var(--primary-ink); }
.cta h2 { color: var(--primary-ink); max-width: 18ch; }
.hero-links svg, .btn svg { width: 17px; height: 17px; flex: 0 0 auto; }
.cta p { margin-top: 10px; opacity: .85; max-width: 36em; }
.cta .btn { background: var(--primary-ink); color: var(--primary); }
.cta .btn:hover { opacity: .92; }
@media (max-width: 640px) { .cta { padding: 32px 24px; } }

/* ── footer ─────────────────────────────────────────────────────────────── */
.site-foot { border-top: 1px solid var(--line); padding: 56px 0 40px; margin-top: 40px; font-size: 14px; color: var(--muted); }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(2, minmax(0, 1fr)); gap: 32px; }
.foot-grid h4 { font-size: 13px; color: var(--ink); font-weight: 650; margin-bottom: 12px; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.foot-grid a { color: var(--muted); }
.foot-grid a:hover { color: var(--ink); }
.foot-legal { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--faint); display: grid; gap: 4px; }
@media (max-width: 720px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > :first-child { grid-column: 1 / -1; } }

/* ── pricing ────────────────────────────────────────────────────────────── */
.page-head { padding: 64px 0 28px; }
.page-head h1 { font-family: var(--font-display); font-stretch: var(--display-stretch); font-size: clamp(2.25rem, 1.6rem + 2.4vw, 3.5rem); letter-spacing: var(--display-track); font-weight: 720; }
.page-head p { margin-top: 14px; font-size: 18px; color: var(--text); max-width: 40em; }
.billing { margin-top: 28px; display: inline-flex; padding: 4px; border-radius: 12px; background: var(--gel); border: 1px solid var(--line); }
.billing button { border: 0; background: transparent; padding: 8px 14px; border-radius: 9px; cursor: pointer; font-size: 14px; color: var(--muted); font-weight: 600; display: inline-flex; gap: 8px; align-items: center; }
.billing button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(15, 26, 58, .1); }
.billing .save { font-size: 12px; color: var(--ok); font-weight: 700; }
.plans { margin-top: 28px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 24px; display: flex; flex-direction: column; gap: 16px; position: relative; }
.plan.featured { border: 2px solid var(--primary); padding: 23px; }
.plan .badge { position: absolute; top: -12px; left: 22px; background: var(--primary); color: var(--primary-ink); font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 6px; }
.plan h2 { font-size: 20px; font-weight: 700; font-family: var(--font-ui); letter-spacing: -0.01em; max-width: none; }
.plan .for { font-size: 14px; color: var(--muted); min-height: 2.8em; }
.price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.price b { font-family: var(--font-display); font-stretch: var(--display-stretch); font-size: 40px; font-weight: 720; color: var(--ink); letter-spacing: -0.02em; line-height: 1; }
.price > span { font-size: 13.5px; color: var(--muted); }
.plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; font-size: 14.5px; }
.plan li { display: flex; gap: 10px; align-items: flex-start; }
.plan li svg { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 3px; color: var(--primary); }
.plan .btn { width: 100%; margin-top: auto; }
.pricing-note { margin-top: 20px; font-size: 14px; color: var(--muted); display: grid; gap: 6px; }
@media (max-width: 1080px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .plans { grid-template-columns: 1fr; } }
.compare-wrap { margin-top: 24px; overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); }
.compare { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 640px; }
.compare th, .compare td { padding: 13px 16px; border-bottom: 1px solid var(--line); text-align: center; }
.compare th:first-child, .compare td:first-child { text-align: left; color: var(--ink); }
.compare thead th { font-size: 14px; color: var(--ink); background: var(--gel); }
.compare tr:last-child td { border-bottom: 0; }
.compare .yes { color: var(--primary); font-weight: 700; }
.compare .no { color: var(--faint); }
.faq { margin-top: 24px; display: grid; gap: 0; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 0; font-weight: 600; color: var(--ink); display: flex; justify-content: space-between; gap: 16px; font-size: 16.5px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; color: var(--muted); font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 0 18px; color: var(--text); max-width: 46em; }
.sec-title { font-size: 24px; font-weight: 700; margin-top: 72px; }

/* ── dialogs ────────────────────────────────────────────────────────────── */
dialog { border: 0; padding: 0; border-radius: var(--r-window); background: var(--surface); color: var(--text); box-shadow: var(--shadow-pop); width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); }
dialog::backdrop { background: rgba(10, 15, 31, .55); }
.dlg { padding: 28px; display: grid; gap: 16px; }
.dlg h2 { font-size: 22px; font-weight: 700; }
.dlg p { color: var(--muted); }
.field { display: grid; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; color: var(--ink); }
.input, .field input, .field textarea, .field select { width: 100%; height: 44px; padding: 0 12px; border-radius: var(--r-input); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: inherit; font-size: 16px; }
.field textarea { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; }
.input:focus, .field input:focus, .field textarea:focus, .field select:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .row2 { grid-template-columns: 1fr; } }
.dlg-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.notice { padding: 12px 14px; border-radius: 10px; font-size: 14px; }
.notice.ok { background: var(--ok-soft); color: var(--ok); }
.notice.bad { background: var(--bad-soft); color: var(--bad); }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.notice.info { background: var(--primary-soft); color: var(--primary); }

/* ── login ──────────────────────────────────────────────────────────────── */
.auth { min-height: calc(100dvh - 64px); display: grid; place-items: center; padding: 40px 16px 80px; }
.auth-card { width: min(440px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-window); padding: 36px 32px; box-shadow: var(--shadow-window); display: grid; gap: 18px; }
.auth-card h1 { font-size: 26px; font-weight: 720; letter-spacing: -0.02em; }
.auth-card .lead { color: var(--muted); font-size: 15px; }
.btn-google { width: 100%; background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); height: 48px; font-size: 15.5px; }
.btn-google:hover { border-color: var(--ink); }
.btn-google svg { width: 18px; height: 18px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-card .btn-primary { width: 100%; height: 48px; }
.auth-card .fine { font-size: 12.5px; color: var(--faint); }
@media (max-width: 480px) { .auth-card { padding: 28px 20px; } }

/* ── docs ───────────────────────────────────────────────────────────────── */
.docs { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; padding: 40px 0 80px; }
.docs-nav { position: sticky; top: 84px; align-self: start; max-height: calc(100dvh - 100px); overflow-y: auto; font-size: 14px; padding-right: 8px; }
.docs-nav h4 { font-size: 12.5px; color: var(--muted); font-weight: 650; margin: 18px 0 6px; }
.docs-nav a { display: block; padding: 5px 8px; border-radius: 6px; color: var(--text); font-family: var(--font-mono); font-size: 13px; }
.docs-nav a.plain { font-family: var(--font-ui); font-size: 14px; }
.docs-nav a:hover { background: var(--gel); text-decoration: none; }
.docs-body h1 { font-family: var(--font-display); font-stretch: var(--display-stretch); font-size: clamp(2rem, 1.6rem + 1.6vw, 2.75rem); letter-spacing: var(--display-track); font-weight: 720; }
.docs-body > p.lead { margin-top: 12px; font-size: 17px; max-width: 44em; }
.docs-body h2 { font-size: 24px; margin: 56px 0 14px; padding-top: 8px; font-weight: 700; }
.docs-body h3 { font-size: 18px; margin: 28px 0 10px; }
.docs-body p { max-width: 46em; margin: 10px 0; }
.docs-body ul { max-width: 46em; padding-left: 20px; }
.docs-body li { margin: 4px 0; }
.endpoint { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); }
.endpoint-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.endpoint-title h3 { margin: 0; font-family: var(--font-mono); font-size: 19px; font-weight: 600; }
.method { font-family: var(--font-mono); font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: var(--ok-soft); color: var(--ok); }
.method.post { background: var(--warn-soft); color: var(--warn); }
.endpoint .summary { margin-top: 8px; font-size: 16.5px; color: var(--ink); }
.params { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 14px; }
.params th, .params td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.params th { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.params td:first-child { font-family: var(--font-mono); color: var(--ink); white-space: nowrap; font-size: 13px; }
.params .req { color: var(--accent); font-size: 12px; margin-left: 6px; font-family: var(--font-ui); }
.params .def { color: var(--faint); font-size: 12.5px; }
.code { background: var(--band); color: #d9def0; border-radius: 12px; padding: 14px 16px; overflow-x: auto; font-size: 12.5px; line-height: 1.7; margin: 10px 0; position: relative; }
.code pre { margin: 0; white-space: pre; }
.code .copy { position: absolute; top: 8px; right: 8px; height: 28px; padding: 0 10px; font-size: 12px; border-radius: 7px; border: 1px solid rgba(255, 255, 255, .15); background: rgba(255, 255, 255, .06); color: var(--on-band); cursor: pointer; }
.fields { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 14.5px; max-width: 46em; }
.fields li code { color: var(--ink); background: var(--gel); padding: 1px 6px; border-radius: 5px; }
details.sample summary { cursor: pointer; color: var(--primary); font-size: 14px; margin-top: 10px; font-weight: 600; }
@media (max-width: 900px) { .docs { grid-template-columns: minmax(0, 1fr); } .docs-nav { position: static; max-height: none; border: 1px solid var(--line); border-radius: 12px; padding: 12px; } }

/* ── legal & simple pages ───────────────────────────────────────────────── */
.prose { max-width: 720px; padding: 56px 0 80px; }
.prose h1 { font-size: 36px; font-weight: 720; letter-spacing: -0.02em; }
.prose h2 { font-size: 20px; margin: 36px 0 8px; }
.prose p, .prose li { color: var(--text); margin: 10px 0; }
.prose .meta { color: var(--muted); font-size: 14px; margin-top: 8px; }

/* ─────────────────────────────────────────────────────────────────────────
   The app (signed-in workspace)
   ───────────────────────────────────────────────────────────────────────── */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100dvh; }
.rail { position: sticky; top: 0; height: 100dvh; border-right: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; padding: 14px 12px; gap: 4px; }
.rail .logo { padding: 6px 8px 14px; }
.rail-link { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; color: var(--text); font-size: 14.5px; font-weight: 500; border: 0; background: transparent; cursor: pointer; text-align: left; width: 100%; text-decoration: none !important; }
.rail-link svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--muted); }
.rail-link:hover { background: var(--gel); }
.rail-link[aria-current="page"] { background: var(--primary-soft); color: var(--primary); }
.rail-link[aria-current="page"] svg { color: var(--primary); }
.rail h5 { margin: 18px 10px 6px; font-size: 12px; font-weight: 600; color: var(--faint); display: flex; justify-content: space-between; align-items: center; }
.rail h5 button { border: 0; background: transparent; color: var(--faint); font-size: 12px; cursor: pointer; padding: 0; }
.rail h5 button:hover { color: var(--ink); }
.hist { overflow-y: auto; flex: 1; min-height: 0; margin: 0 -4px; padding: 0 4px; }
.hist a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--text); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist a:hover { background: var(--gel); text-decoration: none; }
.hist a small { color: var(--faint); font-size: 11.5px; margin-right: 6px; }
.hist .empty { padding: 6px 10px; color: var(--faint); font-size: 13px; }
.rail-foot { border-top: 1px solid var(--line); padding-top: 10px; display: grid; gap: 8px; }
.meter { padding: 4px 10px; display: grid; gap: 8px; }
.meter-row { display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); }
.meter-row div { display: flex; justify-content: space-between; }
.meter-row b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.meter-bar { height: 4px; border-radius: 4px; background: var(--gel-2); overflow: hidden; }
.meter-bar i { display: block; height: 100%; background: var(--primary); border-radius: 4px; }
.me { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; border: 0; background: transparent; width: 100%; cursor: pointer; text-align: left; }
.me:hover { background: var(--gel); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: 0 0 auto; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.me .who { min-width: 0; display: grid; }
.me .who b { font-size: 13.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.me .who span { font-size: 12px; color: var(--muted); }
.app-top { display: none; }
.main { min-width: 0; padding: 0 0 80px; }
.main-inner { max-width: 1080px; margin: 0 auto; padding: 28px 32px; }
@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .rail { position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 50; transform: translateX(-105%); transition: transform .2s ease; box-shadow: var(--shadow-pop); }
  .rail.open { transform: none; }
  .app-top { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 12px; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 30; }
  .app-top .logo b { font-size: 19px; }
  .main-inner { padding: 20px 16px; }
  .scrim { position: fixed; inset: 0; background: rgba(10, 15, 31, .45); z-index: 45; }
}

/* app search box */
.ask { position: relative; }
.ask .omni { margin-top: 0; }
.modes { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--gel); border: 1px solid var(--line); margin-bottom: 10px; }
.modes button { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: var(--muted); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.modes button svg { width: 15px; height: 15px; }
.modes button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(15, 26, 58, .1); }
.readas { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); min-height: 30px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: var(--r-chip); border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 13px; cursor: pointer; white-space: nowrap; }
.chip:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.chip.on { background: var(--primary-soft); border-color: transparent; color: var(--primary); font-weight: 600; cursor: default; }
.chip.mono { font-family: var(--font-mono); font-size: 12.5px; }
.hello { padding: 8vh 0 4vh; }
.hello h1 { font-family: var(--font-display); font-stretch: var(--display-stretch); font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem); letter-spacing: var(--display-track); font-weight: 720; }
.hello p { margin-top: 8px; color: var(--muted); max-width: 40em; }
.hello .ask { margin-top: 26px; }
.examples { margin-top: 34px; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.example { display: grid; gap: 4px; text-align: left; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; color: var(--text); }
.example:hover { border-color: var(--primary); }
.example small { font-size: 12px; color: var(--muted); }
.example span { font-size: 14.5px; color: var(--ink); font-weight: 550; line-height: 1.45; }
.example span.mono { font-family: var(--font-mono); font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.example { min-width: 0; }

/* results */
.result-head { margin: 28px 0 8px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.result-head h1 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.125rem); font-weight: 720; letter-spacing: -0.02em; word-break: break-word; }
.result-head h1.mono { font-family: var(--font-mono); font-size: clamp(1.25rem, 1.1rem + .8vw, 1.75rem); font-weight: 600; letter-spacing: 0; }
.result-head .sub { margin-top: 6px; color: var(--muted); font-size: 15px; }
.jump { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); margin: 12px -4px 0; padding: 8px 4px; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.jump::-webkit-scrollbar { display: none; }
.jump a { flex: 0 0 auto; padding: 6px 10px; border-radius: 8px; font-size: 13.5px; color: var(--muted); font-weight: 550; }
.jump a:hover { background: var(--gel); color: var(--ink); text-decoration: none; }
@media (max-width: 960px) { .jump { top: 56px; } }
.panels { display: grid; gap: 16px; margin-top: 18px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); min-width: 0; scroll-margin-top: 70px; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 18px 0; flex-wrap: wrap; }
.panel-head h2 { font-size: 17px; font-weight: 680; }
.panel-head .sub { margin-top: 3px; font-size: 13.5px; color: var(--muted); max-width: 60em; }
.panel-tools { display: flex; gap: 4px; flex-wrap: wrap; }
.panel-tools button, .panel-tools a { height: 30px; padding: 0 9px; border-radius: 7px; border: 1px solid transparent; background: transparent; color: var(--muted); font-size: 12.5px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.panel-tools button:hover, .panel-tools a:hover { background: var(--gel); color: var(--ink); text-decoration: none; }
.panel-tools svg { width: 15px; height: 15px; }
.panel-body { padding: 14px 18px 18px; }
.panel-foot { padding: 10px 18px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--faint); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.panel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
@media (max-width: 860px) { .panel-grid { grid-template-columns: 1fr; } }
.panel.loading .panel-body { min-height: 120px; }
.skel { display: grid; gap: 10px; }
.skel i { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--gel) 0%, var(--gel-2) 50%, var(--gel) 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.skel i:nth-child(2) { width: 80%; } .skel i:nth-child(3) { width: 64%; } .skel i:nth-child(4) { width: 72%; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skel i { animation: none; } }
.slow-note { margin-top: 12px; font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: flex-start; }
.timer { font-family: var(--font-mono); font-size: 12px; color: var(--faint); }

.stat-row { display: flex; gap: 28px; flex-wrap: wrap; margin-bottom: 14px; }
.stat b { display: block; font-size: 24px; font-weight: 720; color: var(--ink); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.stat span { font-size: 12.5px; color: var(--muted); }
.verdict { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 6px; font-size: 12.5px; font-weight: 600; }
.verdict::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.verdict.ok { background: var(--ok-soft); color: var(--ok); }
.verdict.warn { background: var(--warn-soft); color: var(--warn); }
.verdict.bad { background: var(--bad-soft); color: var(--bad); }
.verdict.na { background: var(--gel); color: var(--muted); }

.dt { width: 100%; border-collapse: collapse; font-size: 14px; }
.dt th, .dt td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.dt th { font-size: 12px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.dt td.num, .dt th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dt td.id { font-family: var(--font-mono); font-size: 13px; white-space: nowrap; }
.dt td.id a { color: var(--primary); }
.dt tr:last-child td { border-bottom: 0; }
.dt .dim { color: var(--muted); }
.dt-wrap { overflow-x: auto; max-width: 100%; }
.bar-cell { min-width: 120px; }
.hbar { height: 8px; border-radius: 4px; background: var(--gel-2); overflow: hidden; position: relative; }
.hbar i { position: absolute; top: 0; bottom: 0; left: 0; background: var(--primary); border-radius: 4px; }
.hbar.neg i { left: auto; right: 0; background: var(--accent); }
.hbar .aln { background: var(--primary); }
.more-btn { margin-top: 10px; border: 0; background: transparent; color: var(--primary); font-weight: 600; font-size: 13.5px; cursor: pointer; padding: 4px 0; }

/* lineage chart (diverging around zero) */
.lchart { display: grid; gap: 6px; }
.lrow { display: grid; grid-template-columns: minmax(90px, 170px) minmax(0, 1fr) 96px 64px; gap: 12px; align-items: center; font-size: 13px; }
.lrow .ln { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.lrow .lv { font-family: var(--font-mono); font-size: 12px; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.lrow.head { font-size: 11.5px; color: var(--faint); font-weight: 600; }
.lrow.head .lv { font-family: var(--font-ui); }
.frac { height: 14px; background: var(--gel); border-radius: 3px; position: relative; overflow: hidden; }
.frac i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); opacity: .85; }
.frac.cool i { background: var(--primary); }
@media (max-width: 560px) { .lrow { grid-template-columns: minmax(70px, 110px) minmax(0, 1fr) 84px; } .lrow .lv.hide-s { display: none; } .hide-s { display: none; } }
.histo { display: grid; gap: 6px; }
.histo-row { display: grid; grid-template-columns: minmax(120px, 220px) minmax(0, 1fr) 70px; gap: 12px; align-items: center; font-size: 13px; }
.histo-row span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.histo-row .lv { text-align: right; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.sig-path { background: var(--bad) !important; } .sig-lpath { background: color-mix(in srgb, var(--bad) 65%, var(--surface)) !important; }
.sig-vus { background: var(--warn) !important; } .sig-benign { background: var(--ok) !important; } .sig-other { background: var(--faint) !important; }

/* layer matrix */
.layers { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.layer { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 4px; font-size: 13px; }
.layer b { font-size: 13.5px; color: var(--ink); font-weight: 600; }
.layer .why { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.layer .verdict { justify-self: start; }
.layer.hit { border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); background: color-mix(in srgb, var(--ok-soft) 50%, var(--surface)); }

/* sequence viewer */
.seqview { font-family: var(--font-mono); font-size: 13px; line-height: 1.9; word-break: break-all; background: var(--gel); border-radius: 10px; padding: 12px 14px; max-height: 260px; overflow-y: auto; letter-spacing: .06em; }
.seqview .blk { margin-right: .7em; }
.r-h { color: var(--aa-h); } .r-pos { color: var(--aa-pos); } .r-neg { color: var(--aa-neg); } .r-pol { color: var(--aa-pol); }
.r-c { color: var(--aa-c); } .r-g { color: var(--aa-g); } .r-p { color: var(--aa-p); } .r-aro { color: var(--aa-aro); }
.n-a { color: var(--nt-a); } .n-c { color: var(--nt-c); } .n-g { color: var(--nt-g); } .n-t { color: var(--nt-t); }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 18px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--ink); word-break: break-word; }
.raw pre { margin: 0; max-height: 420px; overflow: auto; font-size: 12px; line-height: 1.6; background: var(--gel); padding: 12px; border-radius: 10px; color: var(--text); }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 10px; font-size: 14px; z-index: 90; box-shadow: var(--shadow-pop); }

/* agent */
.agent-run { margin-top: 24px; display: grid; gap: 16px; }
.agent-q { font-size: 18px; font-weight: 650; color: var(--ink); line-height: 1.5; }
.agent-masked { font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.agent-masked svg { width: 15px; height: 15px; color: var(--ok); flex: 0 0 auto; }
.agent-status { display: inline-flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--muted); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }
.steplist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.stepcard { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); scroll-margin-top: 80px; }
.stepcard.flash { box-shadow: 0 0 0 3px var(--primary-soft); border-color: var(--primary); }
.stepcard summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 14px; }
.stepcard summary::-webkit-details-marker { display: none; }
.stepcard .sn { width: 24px; height: 24px; border-radius: 7px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-family: var(--font-mono); font-size: 12px; font-weight: 700; }
.stepcard.err .sn { background: var(--bad-soft); color: var(--bad); }
.stepcard .st { min-width: 0; }
.stepcard .st b { font-family: var(--font-mono); font-size: 13px; color: var(--ink); font-weight: 600; }
.stepcard .st span { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stepcard .sm { font-family: var(--font-mono); font-size: 11.5px; color: var(--faint); }
.stepcard .sbody { padding: 0 14px 14px; }
.answer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 20px 22px; }
.answer.provisional { color: var(--muted); }
.md { font-size: 15.5px; line-height: 1.7; color: var(--text); }
.md > * + * { margin-top: 10px; }
.md h1, .md h2, .md h3, .md h4 { font-size: 16px; margin-top: 18px; }
.md ul, .md ol { padding-left: 22px; margin: 8px 0; }
.md li + li { margin-top: 4px; }
.md code { background: var(--gel); padding: 1px 5px; border-radius: 5px; font-size: 13px; }
.md table { border-collapse: collapse; font-size: 14px; display: block; overflow-x: auto; }
.md th, .md td { border-bottom: 1px solid var(--line); padding: 6px 10px; text-align: left; }
.md strong { color: var(--ink); }
.md a.cite { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 18px; padding: 0 5px; margin: 0 1px; border-radius: 5px; background: var(--primary-soft); color: var(--primary); font-size: 11px; font-weight: 700; vertical-align: 1px; font-family: var(--font-mono); text-decoration: none; }
.md a.cite:hover { background: var(--primary); color: var(--primary-ink); }
.agent-foot { font-size: 12.5px; color: var(--faint); }
.verify { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 13px; }
.verify.ok { color: var(--ok); }
.verify.warn { color: var(--warn); }
.followup { margin-top: 8px; }

/* keys & account */
.keybox { display: flex; gap: 8px; align-items: center; background: var(--gel); border-radius: 10px; padding: 10px 12px; font-family: var(--font-mono); font-size: 13px; word-break: break-all; }
.keybox code { flex: 1; color: var(--ink); }
.form-row { display: flex; gap: 8px; flex-wrap: wrap; }
.form-row .input { flex: 1; min-width: 200px; }
.page-title { font-size: 26px; font-weight: 720; letter-spacing: -0.02em; margin-top: 8px; }
.page-sub { color: var(--muted); margin-top: 6px; max-width: 46em; }
.stack { display: grid; gap: 16px; margin-top: 24px; }
