/* Claude Stock Screener — design tokens, layout, components.
   Light and dark are each chosen, not flipped: both palettes come from the same
   validated ramps (see the dataviz reference), with their own steps per mode. */
:root {
  color-scheme: light;
  --page: #f9f9f7;
  --surface: #fcfcfb;
  --surface-2: #f3f2ee;
  --surface-3: #ebeae4;
  --line: #e1e0d9;
  --line-strong: #c3c2b7;
  --text-1: #0b0b0b;
  --text-2: #52514e;
  --text-3: #6f6e69;
  --accent: #2a78d6;
  --accent-ink: #1d5fae;
  --accent-soft: rgba(42, 120, 214, .10);
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --series-4: #eda100;
  --series-5: #6250d6;
  --pos-mark: #1baf7a;
  --neg-mark: #e34948;
  --pos-ink: #006300;
  --neg-ink: #b42323;
  --good: #0ca30c;
  --warning: #fab219;
  --serious: #ec835a;
  --critical: #d03b3b;
  --shade: rgba(42, 120, 214, .07);
  --grid: #e1e0d9;
  --axis: #c3c2b7;
  --shadow: 0 1px 2px rgba(20, 20, 15, .04), 0 8px 24px -12px rgba(20, 20, 15, .10);
  --shadow-lg: 0 2px 6px rgba(20, 20, 15, .05), 0 24px 48px -24px rgba(20, 20, 15, .22);
  --radius: 14px;
  --radius-sm: 9px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Inter Tight", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --nav-h: 60px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0d0d0d;
  --surface: #1a1a19;
  --surface-2: #222220;
  --surface-3: #2a2a28;
  --line: #2c2c2a;
  --line-strong: #383835;
  --text-1: #f0efec;
  --text-2: #c3c2b7;
  --text-3: #9a998f;
  --accent: #3987e5;
  --accent-ink: #7fb2f0;
  --accent-soft: rgba(57, 135, 229, .16);
  --series-1: #3987e5;
  --series-2: #d95926;
  --series-3: #199e70;
  --series-4: #c98500;
  --series-5: #9085e9;
  --pos-mark: #199e70;
  --neg-mark: #e66767;
  --pos-ink: #2fc76a;
  --neg-ink: #f07b7b;
  --good: #0ca30c;
  --shade: rgba(57, 135, 229, .10);
  --grid: #2c2c2a;
  --axis: #383835;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -12px rgba(0, 0, 0, .6);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, .4), 0 24px 48px -24px rgba(0, 0, 0, .8);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #0d0d0d; --surface: #1a1a19; --surface-2: #222220; --surface-3: #2a2a28;
    --line: #2c2c2a; --line-strong: #383835;
    --text-1: #f0efec; --text-2: #c3c2b7; --text-3: #9a998f;
    --accent: #3987e5; --accent-ink: #7fb2f0; --accent-soft: rgba(57, 135, 229, .16);
    --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500; --series-5: #9085e9;
    --pos-mark: #199e70; --neg-mark: #e66767; --pos-ink: #2fc76a; --neg-ink: #f07b7b;
    --shade: rgba(57, 135, 229, .10); --grid: #2c2c2a; --axis: #383835;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -12px rgba(0, 0, 0, .6);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, .4), 0 24px 48px -24px rgba(0, 0, 0, .8);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  margin: 0; background: var(--page); color: var(--text-1);
  font: 400 15px/1.55 var(--font);
  font-feature-settings: "cv11", "ss01", "ss03";
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.02em; margin: 0; font-weight: 650; }
h1 { font-size: clamp(28px, 4.2vw, 44px); line-height: 1.08; letter-spacing: -0.035em; }
h2 { font-size: 22px; line-height: 1.2; }
h3 { font-size: 16px; line-height: 1.3; letter-spacing: -0.01em; }
p { margin: 0 0 12px; }
.num, table, .kpi .v, .mono { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: .92em; letter-spacing: -0.01em; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.pos { color: var(--pos-ink); }
.neg { color: var(--neg-ink); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: 8px; box-shadow: var(--shadow); }
.skip:focus { top: 12px; }

/* ---------------------------------------------------------------- nav */
.nav {
  position: sticky; top: 0; z-index: 40; height: var(--nav-h);
  background: color-mix(in srgb, var(--page) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.nav-in { max-width: 1280px; margin: 0 auto; height: 100%; display: flex; align-items: center; gap: 20px; padding: 0 24px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text-1); font-weight: 650; letter-spacing: -0.02em; white-space: nowrap; font-family: var(--font-display); font-size: 16px; }
.brand:hover { text-decoration: none; }
.brand svg { flex: none; }
.brand small { color: var(--text-3); font-weight: 500; font-family: var(--font); font-size: 12px; letter-spacing: 0; margin-left: 2px; }
.tabs { display: flex; gap: 2px; margin-left: 8px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  color: var(--text-2); padding: 7px 12px; border-radius: 999px; font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: background .15s, color .15s;
}
.tabs a:hover { color: var(--text-1); background: var(--surface-2); text-decoration: none; }
.tabs a[aria-current="page"] { color: var(--text-1); background: var(--surface-3); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.stamp { font-size: 12.5px; color: var(--text-2); white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: var(--good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 22%, transparent); }
.dot.warn { background: var(--warning); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warning) 25%, transparent); }
.dot.crit { background: var(--critical); box-shadow: 0 0 0 3px color-mix(in srgb, var(--critical) 25%, transparent); }
.icon-btn {
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); cursor: pointer; color: var(--text-2); transition: color .15s, border-color .15s;
}
.icon-btn:hover { color: var(--text-1); border-color: var(--line-strong); }
.menu-btn { display: none; }

/* ---------------------------------------------------------------- layout */
main { max-width: 1280px; margin: 0 auto; padding: 28px 24px 80px; min-height: calc(100vh - var(--nav-h) - 120px); }
.view { animation: rise .28s cubic-bezier(.2, .7, .2, 1); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .view { animation: none; } * { transition: none !important; } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 6px 0 24px; flex-wrap: wrap; }
.page-head .eyebrow { font-size: 13px; font-weight: 600; color: var(--accent-ink); letter-spacing: .02em; margin-bottom: 10px; display: block; }
.page-head p.lede { font-size: 16.5px; color: var(--text-2); max-width: 720px; margin: 12px 0 0; line-height: 1.55; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-7-5 { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.g-8-4 { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); }
.section { margin-top: 36px; }
.section > h2 { margin-bottom: 6px; }
.section > p.sub { color: var(--text-2); margin: 0 0 16px; max-width: 820px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow); min-width: 0;
}
.card.flush { padding: 0; overflow: hidden; }
.card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-h h3 { font-size: 15px; }
.card-h .meta { font-size: 12.5px; color: var(--text-3); }
.card p.note { font-size: 13px; color: var(--text-2); margin: 12px 0 0; }

/* ---------------------------------------------------------------- KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); min-width: 0; }
.kpi .k { font-size: 12.5px; color: var(--text-2); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.kpi .v { font-family: var(--font-display); font-size: 26px; font-weight: 650; letter-spacing: -0.03em; margin-top: 4px; line-height: 1.15; white-space: nowrap; }
.kpi .v small { font-size: 14px; color: var(--text-3); font-weight: 500; letter-spacing: 0; margin-left: 4px; }
.kpi .d { font-size: 12.5px; color: var(--text-3); margin-top: 4px; }
.kpi.hero { background: linear-gradient(180deg, var(--accent-soft), transparent 70%), var(--surface); }

/* ---------------------------------------------------------------- banners */
.banner {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-sm); margin-bottom: 18px;
  background: color-mix(in srgb, var(--warning) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warning) 45%, var(--line));
  font-size: 14px; color: var(--text-1);
}
.banner.info { background: color-mix(in srgb, var(--accent) 8%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.banner.crit { background: color-mix(in srgb, var(--critical) 10%, var(--surface)); border-color: color-mix(in srgb, var(--critical) 45%, var(--line)); }
.banner svg { flex: none; margin-top: 2px; }
.banner b { font-weight: 600; }

/* ---------------------------------------------------------------- regime strip */
.strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 22px; }
.strip > div { padding: 14px 18px; border-left: 1px solid var(--line); min-width: 0; }
.strip > div:first-child { border-left: 0; }
.strip .k { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip .v { font-family: var(--font-display); font-weight: 650; font-size: 19px; letter-spacing: -0.02em; margin-top: 2px; white-space: nowrap; }
.strip .v small { font-size: 12px; font-weight: 500; color: var(--text-3); letter-spacing: 0; margin-left: 3px; }

/* ---------------------------------------------------------------- toolbar & controls */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; padding: 3px; }
.seg button {
  border: 0; background: transparent; padding: 6px 14px; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 550; color: var(--text-2);
  display: inline-flex; align-items: center; gap: 7px;
}
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text-1); box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 0 0 1px var(--line); }
.seg button .count { font-size: 12px; color: var(--text-3); font-weight: 500; }
.field { position: relative; }
.field svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
input[type="search"], select {
  font: inherit; font-size: 14px; color: var(--text-1); background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  height: 38px; padding: 0 12px; min-width: 0; transition: border-color .15s, box-shadow .15s;
}
input[type="search"] { padding-left: 34px; width: 220px; }
select { padding-right: 30px; appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23898781' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; }
input[type="search"]:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); cursor: pointer; user-select: none; height: 38px; padding: 0 4px; }
.toggle input { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
.toolbar .spacer { flex: 1; }
.toolbar .count-note { font-size: 13px; color: var(--text-3); }
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); cursor: pointer; font-size: 14px; font-weight: 550; color: var(--text-1); white-space: nowrap; transition: border-color .15s, background .15s;
}
.btn:hover { border-color: var(--line-strong); text-decoration: none; }
.btn.primary { background: var(--text-1); color: var(--page); border-color: var(--text-1); }
.btn.primary:hover { opacity: .9; }
.btn.small { height: 32px; padding: 0 11px; font-size: 13px; }

/* ---------------------------------------------------------------- table */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
table.data th {
  position: sticky; top: 0; background: var(--surface); z-index: 1;
  text-align: left; font-weight: 550; font-size: 12.5px; color: var(--text-2); padding: 11px 10px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.data th.r, table.data td.r { text-align: right; }
table.data th button { border: 0; background: none; padding: 0; cursor: pointer; color: inherit; font: inherit; display: inline-flex; gap: 4px; align-items: center; }
table.data th button:hover { color: var(--text-1); }
table.data th[aria-sort] button { color: var(--text-1); }
table.data th .arr { width: 10px; opacity: .0; }
table.data th[aria-sort] .arr { opacity: 1; }
table.data td { padding: 10px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr.click { cursor: pointer; transition: background .12s; }
table.data tbody tr.click:hover { background: var(--surface-2); }
table.data tbody tr.click:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.tk { display: flex; flex-direction: column; min-width: 0; }
.tk b { font-family: var(--mono); font-weight: 600; font-size: 13.5px; letter-spacing: -0.01em; color: var(--text-1); }
.tk span { font-size: 12.5px; color: var(--text-2); max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
.rank { font-variant-numeric: tabular-nums; color: var(--text-3); font-size: 13px; width: 28px; }
.leg { font-family: var(--mono); font-size: 13px; }
.leg .b { color: var(--pos-ink); }
.leg .s { color: var(--neg-ink); }
.sub-line { font-size: 12px; color: var(--text-3); display: block; margin-top: 1px; }
.pill {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 550; padding: 2px 8px; border-radius: 999px;
  background: var(--surface-3); color: var(--text-2); white-space: nowrap; line-height: 1.6;
}
.pill.blue { background: var(--accent-soft); color: var(--accent-ink); }
.pill.warn { background: color-mix(in srgb, var(--warning) 20%, transparent); color: color-mix(in srgb, var(--warning) 35%, var(--text-1)); }
.pill.good { background: color-mix(in srgb, var(--good) 16%, transparent); color: var(--pos-ink); }
.pill.bad { background: color-mix(in srgb, var(--critical) 14%, transparent); color: var(--neg-ink); }
.meter { display: inline-block; width: 34px; height: 6px; border-radius: 3px; background: var(--surface-3); position: relative; vertical-align: middle; margin-right: 8px; overflow: hidden; }
.meter i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--series-1); }
.empty { padding: 40px 20px; text-align: center; color: var(--text-2); font-size: 14px; }
.table-foot { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--text-3); flex-wrap: wrap; }

/* mobile cards for the picks table */
.pick-cards { display: none; }
.pick-card {
  display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--text-1);
}
.pick-card:hover { text-decoration: none; background: var(--surface-2); }
.pick-card .row2 { grid-column: 1 / -1; display: flex; gap: 6px 12px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); }
.pick-card .row2 b { color: var(--text-1); font-weight: 600; }

/* ---------------------------------------------------------------- trade view */
.back { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text-2); margin-bottom: 14px; }
.back:hover { color: var(--text-1); text-decoration: none; }
.trade-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.trade-head h1 { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.trade-head h1 .mono { font-size: .9em; letter-spacing: -0.04em; }
.trade-head h1 .nm { font-size: 20px; color: var(--text-2); font-weight: 500; letter-spacing: -0.01em; font-family: var(--font); }
.trade-head .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.px-big { text-align: right; }
.px-big .p { font-family: var(--font-display); font-size: 30px; font-weight: 650; letter-spacing: -0.03em; }
.px-big .c { font-size: 14px; }
.ticket { border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); overflow: hidden; }
.ticket-h { padding: 18px 20px 14px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ticket-h .ttl { font-family: var(--font-display); font-size: 19px; font-weight: 650; letter-spacing: -0.02em; }
.ticket-h .why { font-size: 13px; color: var(--text-2); margin-top: 3px; }
.legs { border-top: 1px solid var(--line); }
.legs .lg { display: grid; grid-template-columns: 54px 1fr auto; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.legs .act { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 3px 0; border-radius: 6px; text-align: center; }
.legs .act.buy { background: color-mix(in srgb, var(--pos-mark) 16%, transparent); color: var(--pos-ink); }
.legs .act.sell { background: color-mix(in srgb, var(--neg-mark) 14%, transparent); color: var(--neg-ink); }
.legs .ct { font-family: var(--mono); font-weight: 600; font-size: 14.5px; }
.legs .ct small { display: block; font-family: var(--font); font-weight: 400; font-size: 12px; color: var(--text-3); margin-top: 2px; }
.legs .q { text-align: right; font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.price-row { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
.price-row > div { padding: 12px 20px; border-left: 1px solid var(--line); }
.price-row > div:first-child { border-left: 0; }
.price-row .k { font-size: 12px; color: var(--text-2); }
.price-row .v { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 16px; }
.price-row .lim { background: var(--accent-soft); }
.price-row .lim .v { color: var(--accent-ink); }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); }
.facts > div { padding: 12px 20px; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); }
.facts > div:nth-child(odd) { border-left: 0; }
.facts .k { font-size: 12px; color: var(--text-2); display: flex; gap: 6px; align-items: center; }
.facts .v { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }
.facts .v small { font-weight: 400; font-size: 12.5px; color: var(--text-3); margin-left: 4px; }
.ticket-f { padding: 14px 20px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.ticket-f .note { font-size: 12.5px; color: var(--text-3); flex: 1 1 220px; }
.thesis { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.thesis ul { list-style: none; padding: 0; margin: 0; }
.thesis li { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; font-size: 14px; border-bottom: 1px dashed var(--line); }
.thesis li:last-child { border-bottom: 0; }
.thesis li svg { flex: none; margin-top: 3px; }
.thesis h4 { font-size: 13px; color: var(--text-2); font-weight: 600; margin-bottom: 4px; font-family: var(--font); letter-spacing: 0; }
.tip-i { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; border: 1px solid var(--line-strong); color: var(--text-3); font-size: 10px; font-weight: 700; cursor: help; font-style: normal; }

/* ---------------------------------------------------------------- charts */
.chart { display: block; overflow: visible; font-family: var(--font); }
.chart .grid { stroke: var(--grid); stroke-width: 1; shape-rendering: crispEdges; }
.chart .baseline { stroke: var(--axis); stroke-width: 1; shape-rendering: crispEdges; }
.chart .cross { stroke: var(--line-strong); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .ax { fill: var(--text-3); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.chart .ax.strong { fill: var(--text-1); font-weight: 600; }
.chart .ax-label { fill: var(--text-2); font-size: 11.5px; }
.chart .lbl { fill: var(--text-1); font-size: 12.5px; }
.chart .val { fill: var(--text-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.chart .end-label { fill: var(--text-1); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.chart .marker-spot { stroke: var(--text-1); stroke-width: 1.5; stroke-dasharray: 2 3; }
.chart .marker-be { stroke: var(--text-3); stroke-width: 1; stroke-dasharray: 4 3; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--text-2); margin-bottom: 10px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 7px; }
.chart-legend i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.chart-tip {
  position: fixed; left: 0; top: 0; z-index: 80; pointer-events: none; opacity: 0; transition: opacity .12s;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; box-shadow: var(--shadow-lg);
  font-size: 12.5px; color: var(--text-1); min-width: 140px; max-width: 280px;
}
.chart-tip .th { font-weight: 600; margin-bottom: 4px; }
.chart-tip .tr { display: flex; align-items: center; gap: 8px; justify-content: space-between; font-variant-numeric: tabular-nums; }
.chart-tip .tr span { color: var(--text-2); flex: 1; }
.chart-tip .tr i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.chart-tip .tr b { font-weight: 600; }
.chart-tip .muted { font-weight: 400; }
.spark { display: block; }

/* ---------------------------------------------------------------- how it works */
.doc { max-width: 900px; }
.doc h2 { margin: 44px 0 10px; font-size: 24px; }
.doc h3 { margin: 22px 0 8px; }
.doc p, .doc li { color: var(--text-2); font-size: 15.5px; line-height: 1.7; }
.doc p b, .doc li b { color: var(--text-1); font-weight: 600; }
.doc ul, .doc ol { padding-left: 20px; }
.doc li { margin-bottom: 6px; }
.formula {
  font-family: var(--mono); font-size: 13.5px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px; overflow-x: auto; color: var(--text-1); line-height: 1.7; margin: 12px 0 16px; white-space: pre;
}
.toc { position: sticky; top: calc(var(--nav-h) + 20px); align-self: start; font-size: 13.5px; }
.toc a { display: block; padding: 5px 0 5px 12px; color: var(--text-2); border-left: 2px solid var(--line); }
.toc a:hover { color: var(--text-1); text-decoration: none; border-left-color: var(--line-strong); }
.toc a.on { color: var(--text-1); border-left-color: var(--accent); font-weight: 550; }
.doc-wrap { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 48px; }
.diagram { width: 100%; height: auto; display: block; font-family: var(--font); }
.diagram .box { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1; }
.diagram .box.accent { fill: var(--accent-soft); stroke: var(--accent); }
.diagram .box.dim { fill: var(--surface-2); stroke: var(--line); }
.diagram .t1 { fill: var(--text-1); font-size: 13px; font-weight: 600; }
.diagram .t2 { fill: var(--text-2); font-size: 11.5px; }
.diagram .t3 { fill: var(--text-3); font-size: 11px; }
.diagram .num { fill: var(--accent-ink); font-size: 11px; font-weight: 700; letter-spacing: .06em; }
.diagram .flow { stroke: var(--line-strong); stroke-width: 1.5; fill: none; }
.diagram .flow.accent { stroke: var(--accent); }
.diagram .loop { stroke: var(--series-2); stroke-width: 1.5; fill: none; stroke-dasharray: 5 4; }
.diagram .loop-t { fill: var(--series-2); font-size: 11.5px; font-weight: 600; }
.diagram .head { fill: var(--line-strong); }
.diagram .head.accent { fill: var(--accent); }
.diagram .head.loop { fill: var(--series-2); }
.callout { border-left: 3px solid var(--accent); padding: 4px 0 4px 16px; margin: 18px 0; color: var(--text-1); font-size: 15.5px; }
.verdict-list { display: grid; gap: 10px; }
.verdict { display: grid; grid-template-columns: 260px 1fr; gap: 16px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.verdict .nm { font-weight: 600; font-size: 14px; }
.verdict .nm small { display: block; font-weight: 400; color: var(--text-3); font-size: 12px; margin-top: 2px; }
.verdict p { margin: 0; font-size: 14px; color: var(--text-2); }

/* catalogue */
.cat { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.sig { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.sig .top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.sig .nm { font-weight: 600; font-size: 14px; line-height: 1.35; }
.sig p { margin: 0; font-size: 13px; color: var(--text-2); line-height: 1.5; }
.sig .ev { font-size: 12px; color: var(--text-3); font-style: italic; }
.sig .stats { display: flex; gap: 12px; font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; margin-top: 2px; flex-wrap: wrap; }

/* status list */
.status-list { display: grid; gap: 0; }
.status-row { display: grid; grid-template-columns: 28px 220px 1fr; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); align-items: start; }
.status-row:last-child { border-bottom: 0; }
.status-row .nm { font-weight: 600; font-size: 14px; }
.status-row .dt { font-size: 14px; color: var(--text-2); }
.status-row .ac { font-size: 13px; color: var(--text-1); margin-top: 4px; }
.lvl { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.lvl.ok { background: var(--good); }
.lvl.warning { background: var(--warning); color: #1a1a19; }
.lvl.critical { background: var(--critical); }

footer.foot { max-width: 1280px; margin: 0 auto; padding: 28px 24px 48px; color: var(--text-3); font-size: 12.5px; border-top: 1px solid var(--line); display: flex; gap: 20px; justify-content: space-between; flex-wrap: wrap; }
footer.foot p { margin: 0; max-width: 760px; }

.loading { display: grid; place-items: center; min-height: 50vh; color: var(--text-3); font-size: 14px; gap: 14px; }
.spinner { width: 22px; height: 22px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; transition: all .2s; z-index: 90;
  background: var(--text-1); color: var(--page); padding: 10px 16px; border-radius: 10px; font-size: 14px; font-weight: 550; box-shadow: var(--shadow-lg); pointer-events: none;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1080px) {
  .strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .strip > div:nth-child(4) { border-left: 0; }
  .strip > div:nth-child(n+4) { border-top: 1px solid var(--line); }
  .g-7-5, .g-8-4 { grid-template-columns: 1fr; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doc-wrap { grid-template-columns: 1fr; }
  .toc { display: none; }
  .stamp .long { display: none; }
}
@media (max-width: 860px) {
  .tabs { display: none; position: fixed; top: var(--nav-h); left: 0; right: 0; flex-direction: column; background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px 16px 14px; margin: 0; box-shadow: var(--shadow-lg); }
  .tabs.open { display: flex; }
  .tabs a { padding: 11px 12px; border-radius: 10px; font-size: 15px; }
  .menu-btn { display: grid; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .thesis { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 14.5px; }
  main { padding: 18px 16px 64px; }
  .nav-in { padding: 0 16px; gap: 10px; }
  .brand small { display: none; }
  .stamp { display: none; }
  .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strip > div { border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
  .strip > div:nth-child(odd) { border-left: 0; }
  .strip > div:nth-child(-n+2) { border-top: 0; }
  .g4 { grid-template-columns: 1fr 1fr; }
  .kpi .v { font-size: 22px; }
  .picks-table { display: none; }
  .pick-cards { display: block; }
  input[type="search"] { width: 100%; }
  .toolbar .field { flex: 1 1 100%; }
  .toolbar select { flex: 1 1 calc(50% - 5px); }
  .price-row { grid-template-columns: 1fr 1fr 1fr; }
  .price-row > div, .facts > div, .legs .lg, .ticket-h, .ticket-f { padding-left: 14px; padding-right: 14px; }
  .px-big { text-align: left; }
  .verdict { grid-template-columns: 1fr; gap: 6px; }
  .status-row { grid-template-columns: 26px 1fr; }
  .status-row .dt-wrap { grid-column: 2; }
  .card { padding: 16px; }
  .hide-sm { display: none; }
  table.data td, table.data th { padding-left: 8px; padding-right: 8px; }
}
@media print {
  .nav, footer.foot, .toolbar, .ticket-f .btn { display: none !important; }
  body { background: #fff; }
  .card, .kpi, .ticket { box-shadow: none; }
}
@media (forced-colors: active) {
  .chart path, .chart circle { forced-color-adjust: auto; }
}

.warn-t { color: color-mix(in srgb, var(--warning) 45%, var(--text-1)); font-weight: 550; }
table.data .spark { display: inline-block; vertical-align: middle; }
