/* DawnTrend — zinc neutrals + one blue accent. Dark is the default theme. */
:root, :root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #09090b;
  --side: #0c0c0e;
  --surface: #111113;
  --surface-2: #18181b;
  --surface-3: #202024;
  --line: #27272a;
  --line-strong: #52525b;
  --line-soft: #1d1d21;
  --grid: #1f1f23;
  --text: #fafafa;
  --text-2: #b4b4bd;
  --muted: #8e8e99;
  --accent: #3b82f6;
  --accent-hi: #60a5fa;
  --btn: #2563eb;
  --btn-hi: #1d4ed8;
  --inv: #fafafa;
  --inv-ink: #09090b;
  --inv-hi: #e4e4e7;
  --accent-soft: rgba(59, 130, 246, .12);
  --accent-ink: #ffffff;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500;
  --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767;
  --good: #34d399; --bad: #f87171; --warn: #fbbf24;
  --pos: #3987e5; --neg: #e66767;
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 12px 32px rgba(0,0,0,.35);
}
:root[data-theme='light'] {
  color-scheme: light;
  --bg: #ffffff; --side: #fafafa; --surface: #ffffff; --surface-2: #f4f4f5; --surface-3: #ececee;
  --line: #e4e4e7; --line-strong: #8a8a93; --line-soft: #f0f0f2; --grid: #efeff1;
  --text: #09090b; --text-2: #52525b; --muted: #656570;
  --btn: #2563eb; --btn-hi: #1d4ed8; --inv: #09090b; --inv-ink: #fafafa; --inv-hi: #27272a;
  --accent: #2563eb; --accent-hi: #1d4ed8; --accent-soft: rgba(37, 99, 235, .08);
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100;
  --s5: #e87ba4; --s6: #008300; --s7: #4a3aa7; --s8: #e34948;
  --good: #047857; --bad: #c81e1e; --warn: #b45309;
  --pos: #2a78d6; --neg: #e34948;
  --shadow: 0 1px 2px rgba(9,9,11,.04), 0 8px 24px rgba(9,9,11,.06);
}
:root {
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Space Grotesk', 'Inter', ui-sans-serif, system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --r: 12px; --r-sm: 8px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14.5px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { flex: none; vertical-align: -3px; }
h1, h2, h3 { letter-spacing: -.02em; }

/* ---------- shell (top nav) ---------- */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.top { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.top-row { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand b { font-weight: 600; color: var(--accent); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 600 18px var(--display); letter-spacing: -.025em; color: var(--text); white-space: nowrap; }
.logo { flex: none; border-radius: 7px; box-shadow: 0 1px 2px rgba(37,99,235,.35); }
.nav { display: flex; gap: 2px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
@media (min-width: 641px) and (max-width: 1100px) { .nav { -webkit-mask-image: linear-gradient(to right, #000 88%, transparent); mask-image: linear-gradient(to right, #000 88%, transparent); padding-right: 18px; } }
.nav a { text-decoration: none; color: var(--text-2); padding: 7px 12px; border-radius: var(--r-sm); font-weight: 500; font-size: 14px; white-space: nowrap; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a[aria-current='page'] { color: var(--text); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.icon-btn { width: 34px; height: 34px; display: grid; place-items: center; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); cursor: pointer; color: var(--text-2); flex: none; }
.icon-btn:hover { color: var(--text); background: var(--surface-2); }
#app { padding-top: 8px; padding-bottom: 32px; outline: none; min-height: 70vh; }
#app > .page-head:first-child, #app > .back:first-child { margin-top: 32px; }
.foot { border-top: 1px solid var(--line); margin-top: 32px; padding: 18px 0 32px; color: var(--muted); font-size: 12.5px; }
.foot-row { display: flex; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; align-items: center; }
.conn { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-weight: 500; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); display: inline-block; box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 20%, transparent); flex: none; }
.status-dot.off { background: var(--warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 20%, transparent); }

/* ---------- hero ---------- */
.hero { position: relative; text-align: center; padding: 72px 0 30px; }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background-image: linear-gradient(var(--line-soft) 1px, transparent 1px), linear-gradient(90deg, var(--line-soft) 1px, transparent 1px); background-size: 32px 32px; mask-image: radial-gradient(60% 70% at 50% 35%, #000, transparent 75%); -webkit-mask-image: radial-gradient(60% 70% at 50% 35%, #000, transparent 75%); }
.eyebrow { display: inline-flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--text-2); border: 1px solid var(--line); background: var(--surface); padding: 5px 12px; border-radius: 99px; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--good); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 60%, transparent); } 70%, 100% { box-shadow: 0 0 0 8px transparent; } }
.hero h1 { font: 600 clamp(36px, 6.2vw, 66px)/1.02 var(--display); letter-spacing: -.045em; margin: 20px auto 16px; max-width: 900px; }
.hero h1 u { text-decoration: none; background-image: linear-gradient(var(--accent), var(--accent)); background-size: 100% 4px; background-position: 0 92%; background-repeat: no-repeat; padding-bottom: 2px; }
.hero .lede { margin: 0 auto 28px; font-size: 17px; }
.hero .prompt-form { max-width: 760px; margin: 0 auto; text-align: left; }
.hero .prompt-examples { justify-content: center; margin-top: 16px; }

/* ---------- ticker ---------- */
.tickers { display: grid; gap: 10px; margin: 26px 0 0; }
.ticker { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); opacity: 0; transform: translateY(6px); transition: opacity .5s ease, transform .5s ease; }
.ticker.go { opacity: 1; transform: none; }
.ticker-label { position: absolute; left: 18px; top: 4px; z-index: 1; font: 500 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); pointer-events: none; }
.ticker-track { display: flex; width: max-content; padding: 20px 0 10px; animation: scroll var(--dur, 60s) linear infinite; animation-play-state: paused; will-change: transform; }
.ticker.go .ticker-track { animation-play-state: running; }
.ticker.rev .ticker-track { animation-direction: reverse; }
.ticker:hover .ticker-track, .ticker:focus-within .ticker-track, .ticker.hold .ticker-track { animation-play-state: paused; }
.tk-set { display: flex; gap: 10px; padding-right: 10px; }
.tk-ctl { justify-self: end; margin: 0 4px -4px; z-index: 2; display: inline-flex; align-items: center; gap: 5px; border: 0; background: transparent; color: var(--muted); font: 500 11px var(--font); cursor: pointer; padding: 3px 6px; border-radius: 6px; }
.tk-ctl:hover { color: var(--text); background: var(--surface-2); }
@media (max-width: 640px) { .tk-ctl { min-height: 44px; padding: 0 12px; font-size: 12.5px; margin-bottom: -10px; } }
.tickers[data-play='0'] .ticker-track { animation-play-state: paused !important; }
/* Someone who pressed Play under "reduce motion" chose it, so it overrides the blanket rule. */
.tickers[data-play='1'] .ticker.go .ticker-track { animation: scroll var(--dur, 60s) linear infinite !important; }
.tickers[data-play='1'] .ticker.rev.go .ticker-track { animation-direction: reverse !important; }
.tickers[data-play='1'] .ticker .tk-set + .tk-set { display: flex; }
.tickers[data-play='1'] .ticker { overflow-x: hidden; mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
.tickers[data-play='1'] .ticker:hover .ticker-track, .tickers[data-play='1'] .ticker:focus-within .ticker-track, .tickers[data-play='1'] .ticker.hold .ticker-track { animation-play-state: paused !important; }
@keyframes scroll { to { transform: translateX(-50%); } }
.tick { display: inline-flex; gap: 9px; align-items: center; font-size: 13.5px; white-space: nowrap; text-decoration: none; padding: 6px 13px 6px 8px; border: 1px solid var(--line-soft); border-radius: 99px; background: var(--surface-2); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.tick:hover, .tick:focus-visible { transform: translateY(-2px); border-color: var(--muted); }
.tick.up { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--good) 14%, transparent); }
.tick.down { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bad) 12%, transparent); }
.tick b { font-weight: 500; }
.tick .logo-box.sm, .tick .monogram.sm { width: 22px; height: 22px; border-radius: 6px; }
.tick .logo-box.sm img { width: 15px; height: 15px; }
.tick .mini { width: 52px; height: 20px; flex: none; }
.tk-chg { display: inline-flex; gap: 3px; align-items: center; min-width: 4.4em; font-weight: 500; }
.tk-chg i { font-style: normal; font-size: 9px; }
.tk-score { display: inline-grid; place-items: center; min-width: 26px; height: 20px; padding: 0 6px; border-radius: 99px; font: 600 11.5px var(--font); font-variant-numeric: tabular-nums; background: color-mix(in srgb, var(--s3) 20%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--s3) 40%, var(--line)); }
@media (prefers-reduced-motion: reduce) {
  .ticker { opacity: 1; transform: none; transition: none; overflow-x: auto; mask-image: none; -webkit-mask-image: none; scrollbar-width: none; }
  .ticker::-webkit-scrollbar { display: none; }
  .ticker-track { animation: none; }
  .tk-set + .tk-set { display: none; }
}

/* ---------- spotlight ---------- */
.spot { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.spot .card-plot .spark { height: 110px; }
.spot .trend-card { border-color: color-mix(in srgb, var(--accent) 25%, var(--line)); }

/* ---------- page heads ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.page-kicker { font: 500 11.5px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin: 0 0 10px; display: inline-flex; gap: 8px; align-items: center; }
.page-head h1 { font: 600 clamp(30px, 4.4vw, 46px)/1.04 var(--display); letter-spacing: -.035em; margin: 0 0 10px; }
.accent-period { color: var(--accent); }
.lede { color: var(--text-2); font-size: 16px; margin: 0; max-width: 640px; }

/* ---------- buttons & controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: var(--r-sm); padding: 9px 14px; font-weight: 600; font-size: 14px; cursor: pointer; background: var(--btn); color: #fff; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn:hover { background: var(--btn-hi); }
/* secondary: outlined, no fill; sits beside a primary without competing with it */
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line-strong); font-weight: 500; }
.btn.ghost:hover { background: var(--surface-2); border-color: var(--text-2); }
/* inverse: the quiet-but-visible header action; white on dark, black on light */
.btn.inverse { background: var(--inv); color: var(--inv-ink); }
.btn.inverse:hover { background: var(--inv-hi); }
/* tertiary: an in-row cue, not a button-sized shout */
.btn.text { background: transparent; color: var(--accent-hi); border-color: transparent; padding-left: 6px; padding-right: 6px; font-weight: 500; }
.btn.text:hover { background: var(--accent-soft); }
.btn.small { padding: 6px 10px; font-size: 13px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn[aria-pressed='true'].ghost { background: var(--surface-2); border-color: var(--text-2); }
.text-link { color: var(--text-2); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; font-weight: 500; font-size: 14px; }
.text-link:hover { color: var(--text); }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 5px 11px; border-radius: 6px; cursor: pointer; color: var(--text-2); font-size: 13px; font-weight: 500; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed='true'] { background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(0,0,0,.2); }
.sel, .input { border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--r-sm); padding: 8px 10px; font-size: 13.5px; color: var(--text); }
.input { width: 100%; outline: none; }
.input:focus, .sel:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); outline: none; }
.chip, .example { border: 1px solid var(--line-strong); background: var(--surface); color: var(--text-2); border-radius: 99px; padding: 5px 12px; font-size: 13px; cursor: pointer; }
.chip:hover, .example:hover { color: var(--text); border-color: var(--text-2); }
.chip[aria-pressed='true'] { background: var(--text); color: var(--bg); border-color: var(--text); }
.tiny-badge { font: 500 11px var(--mono); border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; color: var(--text-2); background: var(--surface-2); letter-spacing: .02em; white-space: nowrap; }

/* ---------- search ---------- */
.search-surface { margin-bottom: 26px; }
.prompt-form { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 6px 6px 6px 14px; box-shadow: var(--shadow); color: var(--muted); }
.prompt-form:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow); }
.prompt-form input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-size: 16px; padding: 9px 0; color: var(--text); }
.prompt-form input::placeholder { color: var(--muted); }
.prompt-examples { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.prompt-examples > span { color: var(--muted); font-size: 13px; margin-right: 2px; }

/* ---------- panels, kpis ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; min-width: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.panel-head h2 { font: 600 16px/1.3 var(--display); margin: 0; }
.panel-head p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.kpi strong { font: 600 26px/1.1 var(--display); letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpi strong.txt { font-size: 18px; line-height: 1.25; white-space: normal; }
.kpi strong small { font-size: 14px; color: var(--muted); font-weight: 500; }
.kpi strong a { text-decoration: none; }
.kpi strong a:hover { color: var(--accent); }
.metric-label { font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.kpi-context { color: var(--muted); font-size: 12.5px; }
.up { color: var(--good); } .down { color: var(--bad); } .flat { color: var(--text-2); }
.row-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.note { color: var(--muted); font-size: 12.5px; margin: 10px 0 0; }
.banner { border: 1px solid var(--line); background: var(--surface-2); border-radius: var(--r-sm); padding: 10px 14px; color: var(--text-2); font-size: 13.5px; margin: 0 0 14px; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.banner.err { border-color: color-mix(in srgb, var(--bad) 50%, var(--line)); color: var(--bad); }
.banner.info { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); background: var(--accent-soft); }
.empty { text-align: center; color: var(--text-2); padding: 40px 16px; }
.empty h2, .empty h3 { color: var(--text); margin: 0 0 6px; font-family: var(--display); }
.skeleton { background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%); background-size: 200% 100%; animation: sheen 1.3s infinite; border-radius: var(--r); border: 1px solid var(--line); min-height: 180px; }
@keyframes sheen { to { background-position: -200% 0; } }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin: 30px 0 14px; }
.section-head h2 { font: 600 20px/1.2 var(--display); margin: 0; }
.section-head p { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }
.cols-2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.cols-2.even { grid-template-columns: 1fr 1fr; }

/* ---------- entity logos ---------- */
.logo-box { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; overflow: hidden; flex: none; }
.logo-box img { width: 26px; height: 26px; object-fit: contain; display: block; }
.logo-box.lg { width: 56px; height: 56px; border-radius: 14px; }
.logo-box.lg img { width: 36px; height: 36px; }
.logo-box.sm { width: 26px; height: 26px; border-radius: 7px; }
.logo-box.sm img { width: 17px; height: 17px; }
.monogram { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font: 600 14px var(--display); background: var(--surface-3); color: var(--text-2); border: 1px solid var(--line); flex: none; }
.monogram.topic { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.monogram.lg { width: 56px; height: 56px; border-radius: 14px; font-size: 19px; }
.monogram.sm { width: 26px; height: 26px; border-radius: 7px; font-size: 10.5px; }

/* ---------- filters ---------- */
#filters { margin-bottom: 14px; }
.filter-top, .filter-bottom { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; }
.filter-bottom { justify-content: flex-start; margin-top: 10px; }
.filter-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-sm); padding: 0 10px; color: var(--muted); }
.filter-search input { border: 0; outline: none; background: transparent; padding: 8px 0; width: 170px; color: var(--text); font-size: 13.5px; }
.filter-context { color: var(--muted); font-size: 12.5px; margin-left: auto; }

/* ---------- entity cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.trend-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); transition: border-color .15s, transform .15s, box-shadow .15s; min-width: 0; }
.trend-card:hover { border-color: color-mix(in srgb, var(--text) 22%, var(--line)); transform: translateY(-2px); box-shadow: var(--shadow); }
.card-link { display: flex; flex-direction: column; gap: 12px; padding: 16px; text-decoration: none; height: 100%; }
.card-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.card-id { min-width: 0; flex: 1; }
.card-id h3 { margin: 0; font: 600 16.5px/1.25 var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-org { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.type-pill { font-size: 11.5px; font-weight: 500; border-radius: 6px; padding: 2px 8px; border: 1px solid var(--line); color: var(--text-2); background: var(--surface-2); white-space: nowrap; }
.about { color: var(--text-2); font-size: 13.5px; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }
.card-plot .spark { height: 64px; }
.no-history { display: grid; place-items: center; height: 64px; color: var(--muted); font-size: 12.5px; border: 1px dashed var(--line); border-radius: var(--r-sm); }
.card-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.card-stats > div { min-width: 0; }
.card-stats strong { display: block; font: 600 18px/1.2 var(--display); margin-top: 3px; white-space: nowrap; }
.card-stats strong small { font-size: 12px; font-weight: 500; color: var(--muted); }
.align-right { text-align: right; }
.card-foot { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 12px; gap: 8px; }
.score-ring { --v: 0; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--accent) calc(var(--v) * 1%), var(--surface-3) 0); flex: none; }
.score-ring span { width: 30px; height: 30px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font: 600 12.5px var(--display); }
.score-ring.lg { width: 64px; height: 64px; }
.score-ring.lg span { width: 52px; height: 52px; font-size: 20px; }

/* status badges — Exploding gets the one accent fill (blue = breakout) */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; border-radius: 99px; padding: 2px 9px; border: 1px solid var(--line); color: var(--text-2); background: var(--surface-2); white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.Exploding { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-hi); }
.badge.Growing { color: var(--good); }
.badge.Declining { color: var(--bad); }
.badge.Peaked { color: var(--warn); }
.badge.New { color: var(--accent); }

/* label badges (site lookup) */
.lbl { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; }
.lbl i { width: 8px; height: 8px; border-radius: 2px; }
.lbl small { color: var(--muted); font: 400 11px var(--mono); }

/* ---------- charts ---------- */
.spark { width: 100%; display: block; }
svg.mini { width: 100px; height: 28px; display: block; }
.chart { position: relative; min-height: 120px; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .axis text { fill: var(--muted); font-size: 11px; font-family: var(--mono); }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .series { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 1s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.chart .fitline { fill: none; stroke: var(--text-2); stroke-width: 1.5; stroke-dasharray: 5 5; opacity: .75; }
.chart .proj-band { fill: var(--text-2); opacity: .05; }
.chart .baseline { stroke: var(--muted); stroke-dasharray: 2 3; stroke-width: 1; }
.chart .cross { stroke: var(--muted); stroke-width: 1; }
.chart .dot { stroke: var(--surface); stroke-width: 2; }
.tip { position: absolute; pointer-events: none; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 10px; font-size: 12px; box-shadow: var(--shadow); min-width: 170px; z-index: 5; opacity: 0; transition: opacity .1s; }
.tip .row { display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.tip .sw { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.tip .title { color: var(--muted); margin-bottom: 4px; font-family: var(--mono); font-size: 11px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--text-2); margin-top: 12px; }
.legend span { display: inline-flex; gap: 6px; align-items: center; }
.legend i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.legend i.dash { background: repeating-linear-gradient(90deg, var(--text-2) 0 4px, transparent 4px 7px) !important; }
details.tv summary { cursor: pointer; color: var(--muted); font-size: 12.5px; margin-top: 12px; }
details.tv .table-wrap { margin-top: 8px; max-height: 320px; }

/* donut */
.donut-wrap { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 20px; align-items: center; }
.donut { position: relative; }
.donut svg { width: 100%; height: auto; display: block; }
.donut path { stroke: var(--surface); stroke-width: 2; transition: opacity .15s; }
.donut.hovering path:not(.on) { opacity: .3; }
.donut-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.donut-center strong { font: 600 21px/1.1 var(--display); }
.donut-center span { color: var(--muted); font-size: 11.5px; max-width: 110px; }
.donut-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: 13px; }
.donut-legend li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 4px 6px; border-radius: 6px; cursor: default; }
.donut-legend li.on { background: var(--surface-2); }
.donut-legend i { width: 10px; height: 10px; border-radius: 3px; }
.donut-legend span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.donut-legend b { font-weight: 600; font-variant-numeric: tabular-nums; }
.donut-legend small { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 48px; text-align: right; }

/* diverging bars */
.bars { display: grid; gap: 8px; font-size: 13px; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 160px) minmax(0, 1fr) 70px; gap: 10px; align-items: center; }
.bar-row > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.bar-track { position: relative; height: 14px; }
.bar-track::before { content: ''; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--muted); opacity: .6; }
.bar-fill { position: absolute; top: 1px; bottom: 1px; border-radius: 4px; }
.bar-fill.pos { left: 50%; background: var(--pos); border-top-left-radius: 0; border-bottom-left-radius: 0; }
.bar-fill.neg { right: 50%; background: var(--neg); border-top-right-radius: 0; border-bottom-right-radius: 0; }
.bar-row b { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- tables ---------- */
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
th { font: 500 11px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; background: var(--surface-2); position: sticky; top: 0; z-index: 1; }
th button { all: unset; cursor: pointer; }
th button:hover { color: var(--text); }
td.r, th.r { text-align: right; }
tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
tbody tr:last-child td { border-bottom: 0; }
.kw { font-weight: 500; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.kw:hover { color: var(--accent); }
.entity-cell { display: flex; align-items: center; gap: 10px; }
.entity-cell a { text-decoration: none; font-weight: 500; }
.entity-cell a:hover { color: var(--accent); }
.entity-cell small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.table-period { display: block; color: var(--muted); font-size: 11.5px; }
.swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
input[type='checkbox'] { accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; }
.meter { width: 64px; height: 6px; border-radius: 3px; background: var(--surface-3); display: inline-block; vertical-align: middle; overflow: hidden; margin-right: 8px; }
.meter i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }

/* ---------- detail ---------- */
.back { color: var(--text-2); text-decoration: none; font-size: 13.5px; display: inline-flex; gap: 6px; }
.back:hover { color: var(--text); }
.detail-search { margin: 14px 0 22px; }
.detail-loading { min-height: 420px; }
.detail-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 18px; }
.detail-id { display: flex; gap: 16px; align-items: center; min-width: 0; }
.detail-head h1 { font: 600 clamp(28px, 4vw, 42px)/1.05 var(--display); letter-spacing: -.03em; margin: 6px 0 6px; }
.detail-head p { margin: 0; color: var(--text-2); max-width: 640px; }
.detail-lower { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.insight-panel h2 { font: 600 20px/1.2 var(--display); margin: 6px 0 8px; }
.insight-panel > p { color: var(--text-2); margin: 0 0 14px; }
.insight-facts { display: grid; gap: 10px; }
.insight-facts > div { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.insight-facts span { color: var(--muted); font-size: 13px; }
.insight-facts strong { text-align: right; font-weight: 600; }
.insight-facts small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; }
.related-list { display: grid; gap: 2px; margin-bottom: 12px; max-height: 360px; overflow: auto; }
.related-row { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto 64px; gap: 10px; align-items: center; padding: 7px 8px; border-radius: 6px; font-size: 13.5px; }
.related-row:hover { background: var(--surface-2); }
.related-row a { text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.related-row span { color: var(--muted); }
.related-row strong { text-align: right; }
.score-card { display: flex; gap: 16px; align-items: center; }
.score-break { display: grid; gap: 8px; margin-top: 14px; }
.score-break div { display: grid; grid-template-columns: 120px minmax(0, 1fr) 36px; gap: 10px; align-items: center; font-size: 12.5px; color: var(--text-2); }
.score-break .track { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.score-break .track i { display: block; height: 100%; background: var(--accent); }
.score-break b { text-align: right; font-weight: 600; color: var(--text); }

/* ---------- bulk ---------- */
.bulk-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; margin-bottom: 8px; }
.bulk-input textarea { width: 100%; min-height: 190px; resize: vertical; border: 1px solid var(--line); background: var(--bg); border-radius: var(--r-sm); padding: 12px; font: 13.5px/1.7 var(--mono); outline: none; color: var(--text); }
.bulk-input textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.bulk-run { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; }
.preset-panel { display: flex; flex-direction: column; gap: 6px; }
.preset { display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-sm); padding: 10px 12px; cursor: pointer; color: var(--muted); }
.preset:hover { border-color: var(--muted); background: var(--surface-2); color: var(--text); }
.preset b { color: var(--text); font-weight: 500; display: block; }
.preset small { color: var(--muted); font-size: 12px; }

/* ---------- industries ---------- */
.formula { font-size: 13px; color: var(--text-2); display: grid; gap: 12px; align-content: start; }
.formula h2 { font: 600 16px var(--display); margin: 0; color: var(--text); }
.formula code { display: block; font: 12px/1.65 var(--mono); background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; color: var(--text); white-space: normal; }
.formula dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; }
.formula dt { color: var(--muted); }
.formula dd { margin: 0; }
.findings { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.findings li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; color: var(--text-2); font-size: 14px; }
.findings li b { color: var(--text); font-weight: 600; }
.findings .ic { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font: 600 12px var(--mono); }
.ind-link { text-decoration: none; font-weight: 500; display: inline-flex; gap: 8px; align-items: center; }
.ind-link:hover { color: var(--accent); }
.logo-stack { display: inline-flex; }
.logo-stack > * { margin-left: -7px; box-shadow: 0 0 0 2px var(--surface); }
.logo-stack > *:first-child { margin-left: 0; }
.bench { display: grid; grid-template-columns: minmax(0, 1fr) 230px auto; gap: 8px; }
.bench-out { margin-top: 14px; }
.verdict { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.verdict > div { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; }
.verdict strong { font: 600 22px var(--display); display: block; }

/* ---------- method ---------- */
.method-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.method-card h2 { font: 600 16px var(--display); margin: 8px 0 6px; }
.method-card p { margin: 0; color: var(--text-2); font-size: 13.5px; }
.method-number { font: 500 12px var(--mono); color: var(--accent); }
.method-source { margin-top: 16px; display: grid; gap: 8px; }
.method-source h2 { font: 600 16px var(--display); margin: 0; }
.method-source p { margin: 0; color: var(--text-2); }

.fade-in { animation: fadeUp .35s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .cols-2, .cols-2.even, .detail-lower, .bulk-layout, .spot { grid-template-columns: 1fr; }
  .filter-context { margin-left: 0; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  /* Phones: brand and account on the first row, the full nav as its own scrollable row underneath. */
  .top-row { gap: 12px; height: auto; flex-wrap: wrap; padding-top: 8px; }
  .brand { margin-right: auto; }
  .nav { order: 3; flex: 0 0 100%; margin: 0 -16px; padding: 0 16px 8px; -webkit-mask-image: linear-gradient(to right, #000 92%, transparent); mask-image: linear-gradient(to right, #000 92%, transparent); }
  .nav a { padding: 9px 12px; font-size: 14px; }
  .hero { padding-top: 44px; }
}
@media (max-width: 560px) {
  .prompt-form { flex-wrap: wrap; padding: 8px; }
  .prompt-form input { width: calc(100% - 40px); }
  .prompt-form .btn { width: 100%; }
  .donut-wrap { grid-template-columns: 1fr; }
  .donut { max-width: 210px; margin: 0 auto; width: 100%; }
  .bench { grid-template-columns: 1fr; }
  .card-stats strong { font-size: 16px; }
  .filter-search input { width: 120px; }
  .bar-row { grid-template-columns: 90px minmax(0, 1fr) 56px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before { animation: none !important; transition: none !important; }
  .chart .draw { stroke-dashoffset: 0; }
}

/* ---------- omnibox ---------- */
.omni-wrap { position: relative; max-width: 760px; margin: 0 auto; text-align: left; }
.detail-search .omni-wrap { max-width: none; }
.omni { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 25; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 24px 60px rgba(0,0,0,.45); padding: 6px; max-height: min(70vh, 560px); overflow: auto; }
.omni-label { font: 500 10.5px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 10px 10px 4px; }
.omni-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 10px; border-radius: var(--r-sm); text-decoration: none; }
.omni-row:hover, .omni-row.active, .omni-morph:hover, .omni-morph.active { background: var(--surface-2); }
.omni-id { min-width: 0; display: grid; }
.omni-id b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.omni-id small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.omni-right { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; }
.omni-right b { min-width: 52px; text-align: right; font-weight: 600; }
.omni-morph { display: block; text-decoration: none; border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); background: color-mix(in srgb, var(--accent-soft) 60%, var(--surface)); border-radius: var(--r-sm); padding: 10px 12px 12px; margin-bottom: 4px; animation: morph .22s ease both; }
@keyframes morph { from { opacity: 0; transform: scale(.985); } }
.omni-intent { display: inline-block; font: 500 10.5px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin-bottom: 8px; }
.morph-body { display: flex; align-items: center; gap: 12px; min-width: 0; }
.morph-body .omni-id { flex: 1; }
.morph-body > b { min-width: 56px; text-align: right; }
.morph-spark { width: 140px; flex: none; }
.morph-spark .spark { height: 40px; }
.morph-media { width: 84px; height: 48px; border-radius: 6px; overflow: hidden; background: var(--surface-3); flex: none; }
.morph-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.morph-terms { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; min-width: 0; }
.term { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; border: 1px solid var(--line); border-radius: 99px; padding: 2px 9px; background: var(--surface); }
.term i { width: 8px; height: 3px; border-radius: 2px; }
.term i.unk { background: transparent; border: 1px dashed var(--muted); height: 8px; width: 8px; border-radius: 50%; }
.morph-chart { width: 200px; height: 54px; flex: none; }
.omni-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font: 400 11px var(--mono); color: var(--muted); padding: 8px 10px 4px; border-top: 1px solid var(--line); margin-top: 6px; }

/* preview image banner (entity + site pages) */
.media-banner { position: relative; display: block; height: 180px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); margin-bottom: 16px; background: var(--surface-2); }
.media-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-banner::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,.55)); }
.media-banner span { position: absolute; left: 14px; bottom: 10px; z-index: 1; color: #fff; font-size: 12.5px; display: inline-flex; gap: 6px; align-items: center; }
@media (max-width: 640px) {
  .morph-spark, .morph-chart, .morph-media { display: none; }
  .omni-right svg { display: none; }
  .media-banner { height: 120px; }
}

/* ---------- markets ---------- */
.uni-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-top: 8px; }
.uni-card { text-decoration: none; }
.uni-mark { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font: 600 11px var(--mono); background: var(--accent-soft); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); flex: none; }
.entity-cell .tiny-badge { margin-left: 2px; }
.tiny-badge.ai { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.mover { grid-template-columns: auto minmax(0, 1fr) auto 70px; text-decoration: none; }
.mover-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text) !important; }
.mover-name small { color: var(--muted); font: 400 11px var(--mono); }
.netbar { display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: var(--surface-3); width: 100%; min-width: 80px; }
.netbar i { display: block; height: 100%; }
.netbar i.u { background: var(--pos); }
.netbar i.d { background: var(--neg); margin-left: auto; }
.card-link > .netbar { margin-top: -4px; }
td .netbar { width: 110px; display: inline-flex; vertical-align: middle; }

/* ---------- product shots ---------- */
.product-shot { display: flex; align-items: center; justify-content: center; background: radial-gradient(120% 90% at 50% 20%, #ffffff, #eef0f3); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; flex: none; }
:root[data-theme='dark'] .product-shot, :root:not([data-theme]) .product-shot { background: radial-gradient(120% 90% at 50% 20%, #26272c, #141417); }
.product-shot img { width: 100%; height: 100%; object-fit: contain; padding: 8%; display: block; }
.product-shot.thumb { width: 84px; height: 64px; border-radius: 8px; }
.product-shot.thumb img { padding: 6%; }
.product-shot.card { width: 120px; height: 96px; }
.card-plot.with-shot { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.product-feature { order: 3; margin: 0; display: grid; gap: 6px; }
.product-feature:not(:has(.product-shot:not([hidden]))) { display: none; }
.product-feature .product-shot { width: 280px; height: 200px; }
.product-feature figcaption { color: var(--muted); font-size: 12px; }
.product-feature figcaption a { color: var(--accent); }
.detail-head { align-items: center; }
@media (max-width: 640px) {
  .product-feature .product-shot { width: 100%; height: 180px; }
  .product-feature { order: 0; width: 100%; }
  .product-shot.card { width: 88px; height: 72px; }
}
.detail-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "id shot" "actions shot"; align-items: end; gap: 14px 28px; }
.detail-head > .detail-id { grid-area: id; }
.detail-head > .row-actions { grid-area: actions; align-self: start; }
.detail-head > .product-feature { grid-area: shot; order: 0; }
@media (max-width: 640px) {
  .detail-head { grid-template-columns: 1fr; grid-template-areas: "shot" "id" "actions"; }
}
.chanbar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; margin: 8px 0 4px; background: var(--surface-3); }
.chanbar i { display: block; height: 100%; }
.scatter { width: 100%; height: auto; display: block; }
.scatter .q { stroke: var(--muted); stroke-dasharray: 3 3; }
.scatter text { fill: var(--muted); font: 11px var(--mono); }

.shares { display: grid; gap: 10px; margin-top: 4px; }
.share-row { display: grid; grid-template-columns: minmax(130px, 200px) minmax(0, 1fr) 44px; gap: 10px; align-items: center; font-size: 13px; }
.share-row small { display: block; color: var(--muted); font-size: 11.5px; }
.share-track { height: 10px; border-radius: 5px; background: var(--surface-3); overflow: hidden; }
.share-track i { display: block; height: 100%; border-radius: 5px; }
.share-row b { text-align: right; }

/* ---------- server-rendered copy (for crawlers and no-JS readers); hidden once the app is running ---------- */
html.js .ssr { display: none; }
.ssr-page { max-width: 820px; margin: 40px auto; }
.ssr-page h1 { font: 600 clamp(28px, 4vw, 40px)/1.1 var(--display); letter-spacing: -.03em; margin: 8px 0 12px; }
.ssr-page h2 { font: 600 20px var(--display); margin: 28px 0 8px; }
.ssr-page h3 { font: 600 16px var(--display); margin: 18px 0 4px; }
.ssr-kicker { font-size: 17px; color: var(--text-2); }
.ssr-crumbs { color: var(--muted); font-size: 13px; }
.ssr-page table { margin: 8px 0; }
.ssr-page dt { color: var(--muted); font-size: 13px; margin-top: 8px; }
.ssr-page dd { margin: 0; font-weight: 500; }
.foot-links { display: flex; gap: 6px 18px; flex-wrap: wrap; margin-top: 10px; }
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--text); }
.auth-slot { display: flex; gap: 8px; align-items: center; margin-left: 4px; }
.auth-slot .who { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; padding: 4px 10px 4px 4px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); font-size: 13px; }
.auth-slot .who i { width: 24px; height: 24px; border-radius: 50%; background: var(--btn); color: #fff; display: grid; place-items: center; font: 600 12px var(--display); font-style: normal; }
@media (max-width: 900px) { .auth-slot .ghost { display: none; } }

/* ---------- gates: a blurred stand-in (generic art, never real data) with a call to action ---------- */
.gate { position: relative; overflow: hidden; display: grid; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); margin: 0; }
.gate > * { grid-area: 1 / 1; }
.gate-decoy { filter: blur(7px); opacity: .55; padding: 18px; color: var(--accent); pointer-events: none; user-select: none; }
.gate-decoy svg { width: 100%; height: 150px; display: block; }
.decoy-row { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 14px; padding: 9px 0; }
.decoy-row i { height: 12px; border-radius: 6px; background: var(--surface-3); display: block; }
.decoy-row i:first-child { background: color-mix(in srgb, var(--accent) 35%, var(--surface-3)); }
.decoy-bar { height: 16px; margin: 10px 0; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.decoy-bar i { display: block; height: 100%; background: color-mix(in srgb, var(--accent) 55%, var(--surface-3)); }
.gate-cta { position: relative; display: grid; place-content: center; justify-items: center; gap: 6px; text-align: center; padding: 26px 18px; min-height: 200px; background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 15%, transparent), color-mix(in srgb, var(--surface) 82%, transparent)); }
.gate.compact .gate-cta { min-height: 150px; padding: 22px 18px; }
.gate-cta .row-actions { gap: 10px; margin-top: 4px; }
.gate-cta strong { font: 600 17px var(--display); }
.gate + .btn, .gate + .note { margin-top: 12px; }
.gate-decoy { position: absolute; inset: 0; overflow: hidden; }
.gate-cta p { margin: 0 0 6px; color: var(--text-2); max-width: 460px; font-size: 13.5px; }
.gate-lock { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.lock-row td { padding: 0; }
.teasers { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; color: var(--text-2); font-size: 13.5px; }
.teasers b { color: var(--text); margin-right: 6px; }

/* ---------- sign up / log in / account ---------- */
.auth-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: start; margin-top: 40px; }
.auth-grid.single { grid-template-columns: minmax(0, 480px); justify-content: center; }
.auth-side h1 { font: 600 clamp(30px, 4.4vw, 44px)/1.05 var(--display); letter-spacing: -.035em; margin: 6px 0 10px; }
.value-props { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 16px; }
.value-props li { display: grid; grid-template-columns: 36px 1fr; gap: 12px; }
.value-props b { display: block; }
.value-props small { display: block; color: var(--text-2); font-size: 13.5px; }
.vp-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.auth-card { padding: 26px; box-shadow: var(--shadow); }
.auth-card h2 { font: 600 20px var(--display); margin: 0 0 14px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 13px; color: var(--text-2); font-weight: 500; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--text-2); margin-bottom: 14px; }
.check input { margin-top: 3px; }
.check a, .auth-card a { color: var(--accent); }
.btn.wide { width: 100%; padding: 11px 14px; }
.form-error { color: var(--bad); font-size: 13px; margin: 0 0 12px; }
.sent { display: grid; gap: 8px; justify-items: start; }
.sent-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.dev-link { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; border: 1px dashed var(--line); border-radius: var(--r-sm); padding: 10px 12px; width: 100%; }
.onboard { margin-bottom: 16px; border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); background: color-mix(in srgb, var(--accent-soft) 60%, var(--surface)); }
.steps { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 8px; }
.steps li small { color: var(--muted); margin-left: 6px; }
.steps li.done b { text-decoration: line-through; color: var(--muted); }
.allow { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.allow strong { font: 600 34px var(--display); }
.allow span { color: var(--text-2); font-size: 13.5px; }
.meter.wide { width: 100%; height: 8px; margin: 10px 0 0; display: block; }
.key-form { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.key-form .input { flex: 1; min-width: 200px; }
.key-once { align-items: flex-start; }
.key-once code { display: block; margin-top: 6px; font: 13px var(--mono); word-break: break-all; }
.code { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; overflow-x: auto; font: 12.5px/1.6 var(--mono); margin: 10px 0; }
.danger { border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); }
.danger-btn { background: #b91c1c; color: #fff; }
.danger-btn:hover { background: #991b1b; }
.plain { margin: 0; padding-left: 18px; display: grid; gap: 6px; color: var(--text-2); font-size: 14px; }
code { font: 12.5px var(--mono); background: var(--surface-2); padding: 1px 6px; border-radius: 5px; }
.legal { max-width: 720px; margin: 40px auto; }
.legal h1 { font: 600 clamp(28px, 4vw, 40px)/1.1 var(--display); letter-spacing: -.03em; margin: 0 0 8px; }
.legal h2 { font: 600 18px var(--display); margin: 26px 0 6px; }
.legal p { color: var(--text-2); }
.auth-slot .who small { color: var(--muted); }

/* ---------- About ---------- */
.about-sec { margin: 40px 0; }
.about-sec h2 { font: 600 24px var(--display); letter-spacing: -.02em; margin: 0 0 6px; }
.sec-lede { color: var(--text-2); max-width: 720px; margin: 0 0 16px; }
.stepper { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; position: relative; }
.stage { width: 100%; text-align: left; border-radius: var(--r); padding: 14px; display: grid; gap: 2px; cursor: pointer; background: var(--surface); border: 1px dashed var(--line); color: var(--text-2); }
.stage.on { border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--line)); background: color-mix(in srgb, var(--accent-soft) 70%, var(--surface)); color: var(--text); }
.stage[aria-pressed='true'] { box-shadow: 0 0 0 2px var(--accent); }
.stage b { font: 600 16px var(--display); }
.stage small { font-size: 12px; color: var(--muted); }
.stage.on small { color: var(--accent); }
.stage-n { font: 500 11px var(--mono); color: var(--muted); }
.stage-detail { min-height: 96px; }
.stage-detail h3 { margin: 0 0 6px; font: 600 17px var(--display); }
.stage-detail p { margin: 0 0 6px; color: var(--text-2); }
.lead-fig { margin: 16px 0 0; }
.lead-svg { width: 100%; height: auto; }
.lead-svg .ax, .mini-curve .ax { stroke: var(--line); }
.lead-fig figcaption, .about-sec .note { color: var(--muted); font-size: 12.5px; }
.archetypes { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.archetypes .about { min-height: 0; }
.curves { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.curve { margin: 0; }
.curve figcaption { display: grid; gap: 1px; margin-bottom: 4px; font-size: 13px; }
.curve figcaption span { color: var(--accent); font: 500 12px var(--mono); }
.curve figcaption small { color: var(--muted); }
.mini-curve { width: 100%; height: auto; }
.mini-curve text { fill: var(--muted); font: 10px var(--mono); }
.mini-curve .drop { stroke: var(--accent); stroke-dasharray: 3 3; }
.sum { grid-column: 1 / -1; margin: 0; }
.quad { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-width: 640px; padding: 0 0 22px 22px; }
.q { border: 1px solid var(--line); border-radius: var(--r); padding: 14px; background: var(--surface); display: grid; gap: 4px; min-height: 96px; }
.q b { font: 600 15px var(--display); }
.q small { color: var(--text-2); font-size: 13px; }
.q2 { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: color-mix(in srgb, var(--accent-soft) 70%, var(--surface)); }
.qa { position: absolute; font: 11px var(--mono); color: var(--muted); }
.qa-x { bottom: 0; right: 0; }
.qa-y { top: 0; left: 0; writing-mode: vertical-rl; transform: rotate(180deg); }
.principles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.principles h3 { font: 600 16px var(--display); margin: 8px 0 6px; }
.principles p { margin: 0; color: var(--text-2); font-size: 13.5px; }
.faq details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { margin: 8px 0 0; color: var(--text-2); max-width: 760px; }
@media (max-width: 900px) {
  .auth-grid { grid-template-columns: 1fr; gap: 20px; margin-top: 24px; }
  .stepper { grid-template-columns: 1fr; }
  .curves { grid-template-columns: 1fr; }
}
.auth-card a.btn:not(.ghost):not(.inverse), .gate a.btn:not(.ghost):not(.inverse) { color: #fff; }
.auth-card a.btn.ghost, .gate a.btn.ghost { color: var(--text); }

.mini-curve { max-width: 340px; }
a.trend-card, a.trend-card:hover { text-decoration: none; }
.cols-2 > *, .auth-grid > * { min-width: 0; }
.code { max-width: 100%; }
.panel td code { white-space: normal; word-break: break-all; }
#apiKeys td code { white-space: nowrap; word-break: normal; }
@media (max-width: 640px) {
  #apiKeys .table-wrap { overflow: visible; }
  #apiKeys table, #apiKeys tbody { display: block; width: 100%; }
  #apiKeys thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  #apiKeys tbody tr { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 6px 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  #apiKeys td { padding: 0; border: 0; text-align: left; white-space: normal; overflow-wrap: anywhere; grid-column: 1; }
  #apiKeys td:first-child { font-weight: 600; }
  #apiKeys td[data-label] { font-size: 12.5px; color: var(--text-2); }
  #apiKeys td[data-label]::before { content: attr(data-label) ': '; color: var(--muted); }
  #apiKeys td:last-child { grid-column: 2; grid-row: 1 / span 4; align-self: start; }
}

/* Readable text on the Dawn Index signal-weight bar: dark ink on the bright series colors, white on the two dark-toned
   light-theme swatches. Bars lose their 80% opacity on the numbers so they meet 4.5:1. */
.dn-how .dn-weights i { color: #09090b; }
.dn-how .dn-weights b { opacity: 1; }
:root[data-theme='light'] .dn-how .dn-weights i:nth-child(1) { background: #1f5fb0 !important; color: #fff; }
:root[data-theme='light'] .dn-how .dn-weights i:nth-child(4) { color: #fff; }

/* Touch screens: every control is at least 44px in its short dimension (WCAG 2.5.5 target size). */
@media (pointer: coarse), (max-width: 640px) {
  .brand { min-height: 44px; min-width: 44px; }
  .nav a { display: inline-flex; align-items: center; min-height: 44px; }
  .icon-btn { width: 44px; height: 44px; }
  .auth-slot .who { min-height: 44px; }
  .foot-links { gap: 0 8px; }
  .foot-links a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 0 6px; }
  .chip, .example { display: inline-flex; align-items: center; min-height: 44px; }
  .tick { min-height: 44px; }
  .btn, .btn.small { min-height: 44px; }
  .seg button { min-height: 44px; min-width: 44px; }
  .text-link, .card-link-row a, .section-head > a { display: inline-flex; align-items: center; min-height: 44px; }
  .ind-link, .dn-inline { display: inline-flex; align-items: center; min-height: 44px; }
  .chip { min-width: 44px; justify-content: center; }
  .back { align-items: center; min-height: 44px; }
  .kpi strong a { display: inline-block; padding: 12px 0; }
  .filter-search { min-height: 44px; } .filter-search input { padding: 12px 0; } .sel { min-height: 44px; }
  .dn-crumbs a, .dn-crumbs span:not(.sep) { display: inline-flex; align-items: center; min-height: 40px; }
  .dn-inline, .dn-opt { min-height: 44px; }
}

/* The hidden attribute must win over component display rules (.btn, .banner ...). */
[hidden] { display: none !important; }

/* Rank pills read as one phrase; the banner wraps them onto their own line instead of breaking inside. */
.dn-rank { white-space: nowrap; }
.dn-banner { flex-wrap: wrap; }

/* Brand page hero: measured facts first, the composite score as one quiet line. */
.dn-head-act { flex: none; align-self: flex-start; }
.dn-scoreline { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 12px 0 0; color: var(--text-2); font-size: 13.5px; }
.dn-scoreline b { color: var(--text); font: 600 15px var(--display); margin-left: 4px; }
.dn-scoreline span { color: var(--muted); }
.dn-scoreline a { color: var(--text-2); }
.dn-facts-hero { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 1px; margin: 22px 0 16px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.dn-fact { display: grid; align-content: start; gap: 6px; padding: 16px 18px; background: var(--surface); min-width: 0; }
.dn-fact strong { font: 600 28px/1.1 var(--display); letter-spacing: -.02em; color: var(--text); }
.dn-fact strong.up { color: var(--good); } .dn-fact strong.down { color: var(--bad); }
.dn-fact strong small { font-size: 14px; color: var(--muted); font-weight: 500; }
.dn-fact > span:last-child { color: var(--text-2); font-size: 13px; line-height: 1.4; }
@media (max-width: 900px) { .dn-facts-hero { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dn-fact { grid-column: auto !important; } .dn-fact:last-child:nth-child(odd) { grid-column: span 2 !important; } .dn-fact strong { font-size: 24px; } }

/* Header spacing: four essential links, so keep them together on mid-size screens (signed-in shows a wider account pill). */
@media (min-width: 641px) and (max-width: 1100px) { .top-row { gap: 14px; } .nav a { padding: 7px 10px; } }
