/* Options Explorer — styles. Dark-first, Robinhood-like: black canvas, one green, one orange-red. */
:root {
  --bg: #000;
  --surface: #0f1012;
  --raised: #17191c;
  --raised-2: #1f2226;
  --line: #25282d;
  --line-soft: #1a1c20;
  --text: #f5f6f7;
  --dim: #8d939b;
  --faint: #858b94;
  --up: #00c805;
  --up-soft: rgba(0, 200, 5, .12);
  --down: #ff5000;
  --down-soft: rgba(255, 80, 0, .12);
  --call: #5ac8fa;
  --put: #ffb340;
  --warn: #ffcc00;
  --radius: 14px;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --text-2: #d5d8dc;
  --text-3: #c9cdd2;
  --curve: #e8eaed;
  --ink: #ffffff;
  --on-accent: #000000;
  --zero: #4a4f56;
  --spot: #6b7079;
  --hover-line: #3a3e44;
  --pill-hover: #2b2f35;
  --up-hover: #2bd92f;
  --band: rgba(255,255,255,.035);
  --band-2: rgba(255,255,255,.075);
  --hover-outline: rgba(255,255,255,.5);
  --topbar: rgba(0,0,0,.86);
  --overlay: rgba(0,0,0,.66);
  --shadow: rgba(0,0,0,.6);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) {
  --bg: #ffffff; --surface: #f6f7f8; --raised: #eceef1; --raised-2: #e2e5e9; --line: #d3d8de; --line-soft: #e6e9ed;
  --text: #0b0d0f; --text-2: #2b3036; --text-3: #3d434a; --dim: #565d66; --faint: #5f666f;
  --up: #007306; --up-soft: rgba(0,150,8,.11); --down: #b83700; --down-soft: rgba(220,70,0,.1);
  --call: #0063c2; --put: #995100; --warn: #7d5c00;
  --curve: #3d434a; --ink: #0b0d0f; --on-accent: #ffffff; --zero: #9aa1a9; --spot: #8a9199;
  --hover-line: #b8bfc7; --pill-hover: #d8dce1; --up-hover: #008a07;
  --band: rgba(0,0,0,.035); --band-2: rgba(0,0,0,.07); --hover-outline: rgba(0,0,0,.45);
  --topbar: rgba(255,255,255,.88); --overlay: rgba(20,22,26,.35); --shadow: rgba(0,0,0,.16);
  color-scheme: light;
} }
:root[data-theme="light"] {
  --bg: #ffffff; --surface: #f6f7f8; --raised: #eceef1; --raised-2: #e2e5e9; --line: #d3d8de; --line-soft: #e6e9ed;
  --text: #0b0d0f; --text-2: #2b3036; --text-3: #3d434a; --dim: #565d66; --faint: #5f666f;
  --up: #007306; --up-soft: rgba(0,150,8,.11); --down: #b83700; --down-soft: rgba(220,70,0,.1);
  --call: #0063c2; --put: #995100; --warn: #7d5c00;
  --curve: #3d434a; --ink: #0b0d0f; --on-accent: #ffffff; --zero: #9aa1a9; --spot: #8a9199;
  --hover-line: #b8bfc7; --pill-hover: #d8dce1; --up-hover: #008a07;
  --band: rgba(0,0,0,.035); --band-2: rgba(0,0,0,.07); --hover-outline: rgba(0,0,0,.45);
  --topbar: rgba(255,255,255,.88); --overlay: rgba(20,22,26,.35); --shadow: rgba(0,0,0,.16);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans);
  font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--up); outline-offset: 2px; border-radius: 4px; }
.hidden { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.up { color: var(--up); }
.down { color: var(--down); }

/* ── top bar ── */
.topbar { position: sticky; top: 0; z-index: 40; background: var(--topbar); backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line-soft); }
.topbar-inner { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; gap: 18px; padding: 10px 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; background: var(--up); color: var(--on-accent); display: grid; place-items: center; }
.brand-mark svg { display: block; }
.brand small { font-weight: 500; color: var(--dim); margin-left: 2px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1 1 auto; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { text-decoration: none; color: var(--dim); font-weight: 600; font-size: 14px; padding: 7px 12px; border-radius: 999px; white-space: nowrap; }
.tabs a:hover { color: var(--text); }
.tabs a[aria-current="page"] { color: var(--text); background: var(--raised); }
.topbar .back { color: var(--dim); font-size: 13.5px; text-decoration: none; white-space: nowrap; }
.topbar .back:hover { color: var(--text); }
@media (max-width: 640px) {
  .topbar-inner { flex-wrap: wrap; gap: 8px 12px; padding: 10px 16px 8px; }
  .tabs { order: 3; flex-basis: 100%; margin: 0 -4px; }
  .brand small { display: none; }
  .topbar .back { margin-left: auto; }
}

main { max-width: 1180px; margin: 0 auto; padding: 0 16px 80px; }

/* ── library ── */
.hero { padding: 44px 0 22px; }
.eyebrow { font-family: var(--mono); font-size: 12px; color: var(--up); letter-spacing: .04em; text-transform: uppercase; margin: 0 0 12px; }
.hero h1 { font-size: clamp(32px, 6vw, 54px); line-height: 1.04; letter-spacing: -.035em; margin: 0 0 14px; font-weight: 750; max-width: 15ch; }
.hero p { color: var(--dim); font-size: 17px; max-width: 62ch; margin: 0 0 22px; }
.search { position: relative; max-width: 520px; }
.search input { width: 100%; font: inherit; font-size: 16px; color: var(--text); background: var(--raised); border: 1px solid var(--line);
  border-radius: 999px; padding: 12px 16px 12px 42px; }
.search input::placeholder { color: var(--faint); }
.search svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--dim); }
.search kbd { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-family: var(--mono); font-size: 11px; color: var(--faint);
  border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0 6px; }
.chip { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 6px 13px; font-size: 13.5px; font-weight: 600;
  color: var(--dim); cursor: pointer; }
.chip:hover { color: var(--text); border-color: var(--hover-line); }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.count { color: var(--faint); font-size: 13px; margin: 10px 0 0; }

.cat { margin-top: 38px; }
.cat h2 { font-size: 22px; letter-spacing: -.02em; margin: 0 0 4px; }
.cat > p { color: var(--dim); margin: 0 0 16px; font-size: 14.5px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.card { display: flex; flex-direction: column; gap: 10px; text-decoration: none; background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 16px; transition: border-color .15s, transform .15s, background .15s; min-width: 0; }
.card:hover { border-color: var(--line); background: var(--raised); transform: translateY(-1px); }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.card h3 { margin: 0; font-size: 17px; letter-spacing: -.01em; }
.card p { margin: 0; color: var(--dim); font-size: 13.5px; line-height: 1.5; flex: 1 1 auto; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--raised-2); color: var(--dim); white-space: nowrap; }
.badge.bullish { color: var(--up); background: var(--up-soft); }
.badge.bearish { color: var(--down); background: var(--down-soft); }
.badge.neutral { color: var(--text-3); }
.badge.volatile { color: var(--call); background: rgba(90,200,250,.12); }
.spark { flex: none; }
.spark .sz { stroke: var(--line); stroke-width: 1; }
.spark .sf.up { fill: var(--up-soft); } .spark .sf.down { fill: var(--down-soft); }
.spark .sl { fill: none; stroke-width: 2; stroke-linejoin: round; }
.spark .sl.up { stroke: var(--up); } .spark .sl.down { stroke: var(--down); }
.empty { color: var(--dim); padding: 40px 0; text-align: center; }

/* ── strategy detail ── */
.crumb { display: inline-flex; align-items: center; gap: 6px; color: var(--dim); text-decoration: none; font-size: 14px; margin: 22px 0 14px; }
.crumb:hover { color: var(--text); }
.title-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.title-row h1 { font-size: clamp(28px, 5vw, 40px); letter-spacing: -.03em; line-height: 1.1; margin: 0; }
.aka { color: var(--dim); font-size: 14px; }
.lede { font-size: 17px; color: var(--text-2); max-width: 70ch; margin: 10px 0 8px; }
.analogy { color: var(--dim); font-size: 14.5px; max-width: 70ch; margin: 0 0 22px; padding-left: 12px; border-left: 2px solid var(--up); }

.sim { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; align-items: start; }
@media (max-width: 920px) { .sim { grid-template-columns: minmax(0, 1fr); } }
.panel { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 18px; min-width: 0; }
.panel h2 { font-size: 13px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); margin: 0 0 12px; }
.panel + .panel { margin-top: 12px; }

.pl-head { min-height: 92px; }
.pl-big { font-size: clamp(34px, 6vw, 46px); font-weight: 750; letter-spacing: -.03em; line-height: 1.05; }
.pl-sub { color: var(--dim); font-size: 14px; margin-top: 4px; }
.pl-sub b { color: var(--text); font-weight: 600; }
.pl-now { font-size: 14px; margin-top: 2px; color: var(--dim); }
.pl-now b { font-weight: 600; }

.chart-host { position: relative; margin: 10px -6px 0; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.oe-chart { display: block; width: 100%; height: auto; cursor: crosshair; touch-action: pan-y; }
.oe-chart:focus { outline: none; }
.oe-chart:focus-visible { outline: 2px solid var(--up); outline-offset: 2px; }
.oe-chart text { font-family: var(--sans); font-size: 11.5px; fill: var(--dim); }
.oe-chart .grid { stroke: var(--line-soft); stroke-width: 1; }
.oe-chart .zero { stroke: var(--zero); stroke-width: 1.2; }
.oe-chart .band { fill: var(--band); }
.oe-chart .band-l { font-size: 10.5px; fill: var(--faint); }
.oe-chart .spot { stroke: var(--spot); stroke-dasharray: 2 4; stroke-width: 1.2; }
.oe-chart .spot-l { font-size: 11px; fill: var(--dim); font-weight: 600; }
.oe-chart .kline { stroke: var(--line); stroke-dasharray: 3 5; }
.oe-chart .ref { stroke-width: 1; stroke-dasharray: 1 4; }
.oe-chart .ref.up { stroke: var(--up); } .oe-chart .ref.down { stroke: var(--down); }
.oe-chart .ref-l { font-size: 10.5px; font-weight: 600; }
.oe-chart .ref-l.up { fill: var(--up); } .oe-chart .ref-l.down { fill: var(--down); }
.oe-chart .exp-line { fill: none; stroke-width: 2.6; stroke-linejoin: round; }
.oe-chart .exp-line.up { stroke: var(--up); } .oe-chart .exp-line.down { stroke: var(--down); }
.oe-chart .now-line { fill: none; stroke: var(--curve); stroke-width: 1.6; stroke-dasharray: 5 5; opacity: .85; }
.oe-chart .be { fill: var(--bg); stroke: var(--curve); stroke-width: 1.6; }
.oe-chart .be-l { font-size: 10.5px; fill: var(--text-3); font-weight: 600; }
.oe-chart .marker line { stroke: var(--ink); stroke-width: 1; opacity: .55; }
.oe-chart .dot-exp { stroke: var(--bg); stroke-width: 2.5; }
.oe-chart .dot-exp.up { fill: var(--up); } .oe-chart .dot-exp.down { fill: var(--down); }
.oe-chart .dot-now { fill: var(--ink); stroke: var(--bg); stroke-width: 2; }
.oe-chart .sim-tag rect { fill: var(--ink); }
.oe-chart .sim-tag text { fill: var(--bg); font-weight: 700; font-size: 11.5px; }
.oe-chart .pill { cursor: ew-resize; }
.oe-chart .pill rect { fill: var(--raised-2); stroke-width: 1.4; }
.oe-chart .pill.long rect { stroke: var(--up); }
.oe-chart .pill.short rect { stroke: var(--down); }
.oe-chart .pill.mixed rect { stroke: var(--text-3); }
.oe-chart .pill text { fill: var(--text); font-weight: 650; font-size: 11px; }
.oe-chart .pill:hover rect, .oe-chart .pill.active rect { fill: var(--pill-hover); }

.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12.5px; color: var(--dim); margin: 6px 0 4px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { display: inline-block; width: 18px; height: 0; border-top: 2.6px solid var(--up); }
.legend i.dash { border-top: 1.6px dashed var(--curve); }
.legend i.box { width: 12px; height: 10px; border: 0; background: var(--band-2); border-radius: 2px; }
.hint { font-size: 12.5px; color: var(--faint); margin: 2px 0 0; }

.controls { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
@media (max-width: 640px) { .controls { grid-template-columns: 1fr; } }
fieldset { border: 1px solid var(--line-soft); border-radius: 12px; padding: 12px 14px 6px; margin: 0; min-width: 0; }
legend.fs { font-size: 12px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); padding: 0 6px; }
.ctl { margin-bottom: 12px; }
.ctl-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13.5px; }
.ctl-top label { color: var(--dim); }
.ctl-top output, .ctl-top .val { font-weight: 650; }
input[type=range] { width: 100%; margin: 8px 0 0; accent-color: var(--up); height: 22px; }
.stepper { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.stepper input { width: 100%; min-width: 0; font: inherit; font-weight: 650; color: var(--text); background: var(--raised); border: 1px solid var(--line);
  border-radius: 9px; padding: 7px 10px; text-align: center; }
.stepper button, .btn { border: 1px solid var(--line); background: var(--raised); border-radius: 9px; padding: 6px 11px; cursor: pointer; font-weight: 650; }
.stepper button:hover, .btn:hover { background: var(--raised-2); }
.btn.ghost { background: transparent; }
.btn.small { font-size: 12.5px; padding: 4px 10px; }
details.adv { margin: 2px 0 10px; font-size: 13.5px; }
details.adv summary { cursor: pointer; color: var(--dim); }
details.adv .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }

/* stats */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line-soft); border-radius: 10px; overflow: hidden; }
.stat { background: var(--surface); padding: 10px 12px; min-width: 0; }
.stat .k { font-size: 12px; color: var(--dim); }
.stat .v { font-weight: 700; font-size: 16px; overflow-wrap: anywhere; }
.stat.wide { grid-column: 1 / -1; }
.stat .s { font-size: 11.5px; color: var(--faint); }
.prob { margin-top: 12px; }
.prob-bar { height: 8px; border-radius: 4px; background: var(--down-soft); overflow: hidden; margin-top: 6px; }
.prob-bar span { display: block; height: 100%; background: var(--up); border-radius: 4px; }
.legs { list-style: none; margin: 0; padding: 0; }
.legs li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.legs li:last-child { border-bottom: 0; }
.side-tag { font-size: 11px; font-weight: 750; letter-spacing: .04em; padding: 2px 7px; border-radius: 6px; }
.side-tag.buy { color: var(--up); background: var(--up-soft); }
.side-tag.sell { color: var(--down); background: var(--down-soft); }
.legs .px { color: var(--dim); font-size: 13px; text-align: right; }
.legs .kstep { display: inline-flex; gap: 2px; margin-left: 6px; vertical-align: middle; }
.legs .kstep button { border: 1px solid var(--line); background: var(--raised); border-radius: 6px; width: 22px; height: 22px; line-height: 1; cursor: pointer; padding: 0; color: var(--dim); }
.legs .kstep button:hover { color: var(--text); }
.greeks { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; text-align: center; }
.greeks div { background: var(--raised); border-radius: 9px; padding: 8px 2px; min-width: 0; }
.greeks .g { font-size: 15px; font-weight: 700; color: var(--dim); }
.greeks .gv { font-size: 12.5px; font-weight: 650; overflow-wrap: anywhere; }
.greeks .gn { font-size: 10.5px; color: var(--faint); }
.note { font-size: 12.5px; color: var(--faint); margin: 10px 0 0; }

/* content sections */
.doc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
@media (max-width: 760px) { .doc { grid-template-columns: minmax(0, 1fr); } }
.doc .panel { margin: 0; }
.doc .span2 { grid-column: 1 / -1; }
.doc h3 { font-size: 18px; letter-spacing: -.01em; margin: 0 0 10px; }
.doc p { margin: 0 0 10px; color: var(--text-2); }
.doc p:last-child { margin-bottom: 0; }
.doc ul { margin: 0; padding-left: 18px; color: var(--text-2); }
.doc li { margin-bottom: 7px; }
.doc li::marker { color: var(--faint); }
.doc .yes li::marker { color: var(--up); }
.doc .no li::marker { color: var(--down); }
.formula { display: grid; grid-template-columns: 110px 1fr auto; gap: 8px 12px; align-items: baseline; font-size: 14px; }
.formula dt { color: var(--dim); }
.formula dd { margin: 0; font-family: var(--mono); font-size: 13px; color: var(--text-2); }
.formula .live { font-family: var(--sans); font-weight: 700; font-size: 14px; text-align: right; white-space: nowrap; }
@media (max-width: 520px) { .formula { grid-template-columns: 1fr auto; } .formula dd.f { grid-column: 1 / -1; grid-row: auto; } }
.gtable { width: 100%; border-collapse: collapse; font-size: 14px; }
.gtable td { padding: 8px 6px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.gtable tr:last-child td { border-bottom: 0; }
.gtable .gs { font-weight: 800; font-size: 16px; width: 44px; text-align: center; }
.gtable .gname { font-weight: 650; width: 70px; }
.gtable td:last-child { color: var(--text-3); }
.tipbox { background: var(--up-soft); border: 1px solid rgba(0,200,5,.25); border-radius: 12px; padding: 12px 14px; font-size: 14.5px; }
.tipbox b { color: var(--up); }
.scen { width: 100%; border-collapse: collapse; font-size: 14px; }
.scen th { font-size: 12px; font-weight: 600; color: var(--dim); text-align: right; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.scen th:first-child, .scen td:first-child { text-align: left; }
.scen td { padding: 7px 8px; text-align: right; border-bottom: 1px solid var(--line-soft); font-weight: 600; }
.scen tr.cur td { background: var(--raised); }
.related { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.related a { display: flex; gap: 10px; align-items: center; text-decoration: none; background: var(--raised); border-radius: 11px; padding: 10px; }
.related a:hover { background: var(--raised-2); }
.related b { font-size: 14px; display: block; }
.related span { font-size: 12px; color: var(--dim); }

.disclaimer { color: var(--faint); font-size: 12.5px; max-width: 80ch; margin: 40px 0 0; border-top: 1px solid var(--line-soft); padding-top: 16px; }
.disclaimer a { color: var(--dim); }

/* library filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 4px; }
.sel select { font: inherit; font-size: 13.5px; font-weight: 600; color: var(--text); background: var(--raised); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 30px 6px 13px; appearance: none; -webkit-appearance: none; cursor: pointer; max-width: 100%;
  background-image: linear-gradient(45deg, transparent 50%, var(--dim) 50%), linear-gradient(135deg, var(--dim) 50%, transparent 50%);
  background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.sel { max-width: 100%; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── learn ── */
.newbie { margin: -6px 0 18px; font-size: 14.5px; color: var(--dim); }
.newbie a { color: var(--up); text-decoration: none; font-weight: 600; }
.btn.primary { display: inline-block; background: var(--up); color: var(--on-accent); border-color: transparent; text-decoration: none; padding: 10px 18px; border-radius: 999px; }
.btn.primary:hover { background: var(--up-hover); }
.lessons { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 10px; }
.lessons a { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center; text-decoration: none; background: var(--surface);
  border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 16px; }
.lessons a:hover { background: var(--raised); border-color: var(--line); }
.ln-n { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--up-soft); color: var(--up); font-weight: 800; }
.ln-b b { display: block; font-size: 16.5px; }
.ln-b span { color: var(--dim); font-size: 14px; }
.ln-m { color: var(--faint); font-size: 13px; white-space: nowrap; }
@media (max-width: 520px) { .lessons a { grid-template-columns: 36px 1fr; } .ln-m { display: none; } .ln-n { width: 34px; height: 34px; } }

.lesson { max-width: 820px; }
.lesson > h1 { font-size: clamp(30px, 5vw, 44px); letter-spacing: -.03em; line-height: 1.08; margin: 0; }
.prose { font-size: 16px; color: var(--text-2); }
.prose p, .prose ul, .prose ol, .prose dl { margin: 0 0 14px; }
.prose h3 { font-size: 21px; letter-spacing: -.015em; margin: 30px 0 10px; color: var(--text); }
.prose a { color: var(--up); }
.prose code { font-family: var(--mono); font-size: 13.5px; background: var(--raised); border-radius: 5px; padding: 1px 6px; color: var(--text); }
.prose li { margin-bottom: 6px; }
.formula-line { overflow-x: auto; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 10px; }
.formula-line code { background: none; padding: 0; white-space: nowrap; }
.defs { display: grid; grid-template-columns: 130px 1fr; gap: 8px 14px; }
.defs dt { font-weight: 650; color: var(--text); }
.defs dd { margin: 0; color: var(--text-3); }
@media (max-width: 520px) { .defs { grid-template-columns: 1fr; } .defs dd { margin-bottom: 8px; } }
.timeline { list-style: none; padding: 0; border-left: 2px solid var(--line); margin-left: 6px !important; }
.timeline li { position: relative; padding: 0 0 12px 18px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--up); }
.timeline b { display: block; color: var(--text); }
.takeaways, .tryit { margin-top: 28px; }
.takeaways h3, .tryit h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); margin: 0 0 10px; }
.takeaways ul { margin: 0; padding: 14px 16px 14px 34px; background: var(--up-soft); border: 1px solid rgba(0,200,5,.22); border-radius: 12px; }
.takeaways li { margin-bottom: 6px; }
.tryit .related a { display: block; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 30px; }
.pager a { text-decoration: none; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 12px; padding: 12px 14px; }
.pager a:hover { background: var(--raised); }
.pager span { display: block; font-size: 12.5px; color: var(--dim); }
.pager .nx { text-align: right; }

/* widgets */
.widget { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 18px 0 22px; font-size: 14.5px; }
.widget .note { margin-top: 10px; }
.widget .stats { margin-top: 12px; }
.ctl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 4px 18px; margin-top: 8px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; background: var(--raised); border-radius: 18px; padding: 3px; margin-bottom: 8px; max-width: 100%; }
.seg button { border: 0; background: none; border-radius: 999px; padding: 6px 13px; font-weight: 650; font-size: 13.5px; color: var(--dim); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.ticket { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: clamp(20px, 4.4vw, 28px); font-weight: 750; letter-spacing: -.02em; }
.ticket button, .occ span { border: 1px dashed transparent; background: none; border-radius: 8px; padding: 2px 6px; cursor: pointer; font: inherit; color: var(--text); }
.ticket button:hover, .ticket button.on, .occ span.on { border-color: var(--up); background: var(--up-soft); }
.ticket .at { color: var(--faint); }
.occ { margin-top: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.occ-k { font-size: 12px; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; }
.occ code { font-family: var(--mono); font-size: 15px; background: var(--raised); border-radius: 8px; padding: 4px 6px; overflow-wrap: anywhere; }
.occ span { padding: 1px 2px; font-size: inherit; }
.explain { margin: 12px 0; padding: 12px 14px; background: var(--raised); border-radius: 10px; min-height: 66px; }
.calc { display: grid; grid-template-columns: minmax(160px, 220px) 1fr; gap: 16px; align-items: start; }
.calc-out div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.calc-out span { color: var(--dim); }
@media (max-width: 600px) { .calc { grid-template-columns: 1fr; } }
.quad { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
@media (max-width: 560px) { .quad { grid-template-columns: 1fr; } }
.qcard { background: var(--raised); border-radius: 12px; padding: 12px; min-width: 0; }
.qhead { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.qrole { color: var(--dim); font-size: 13px; margin: 4px 0 6px; min-height: 2.6em; }
.qfoot { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--dim); }
.qfoot b { font-size: 16px; }
.tablewrap { overflow-x: auto; margin-top: 8px; -webkit-overflow-scrolling: touch; }
.mny, .chain { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.mny th, .chain th { font-size: 11.5px; font-weight: 600; color: var(--dim); text-align: center; padding: 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.mny td, .chain td { text-align: center; padding: 7px 6px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.mny .k, .chain .k { font-weight: 750; }
.mny .d { color: var(--dim); font-size: 12.5px; }
.mny td.itm-c, .mny td.itm-p { background: var(--up-soft); }
.mtag { font-size: 11px; font-weight: 750; padding: 2px 7px; border-radius: 6px; }
.mtag.itm { color: var(--up); background: rgba(0,200,5,.18); }
.mtag.atm { color: var(--bg); background: var(--warn); }
.mtag.otm { color: var(--faint); background: var(--raised-2); }
.intr { font-size: 12px; color: var(--dim); }
.spot-row td { padding: 0; border: 0; position: relative; height: 26px; }
.spot-row td span { position: relative; z-index: 1; background: var(--up); color: var(--on-accent); font-size: 11.5px; font-weight: 750; padding: 3px 10px; border-radius: 999px; }
.spot-row td::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1.5px solid var(--up); }
.mny-sum { margin: 8px 0 2px; color: var(--dim); }
.chain-top { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; }
.chain tbody tr[data-k] { cursor: pointer; }
.chain tbody tr[data-k]:hover { background: var(--raised); }
.chain tr.itm td { background: rgba(0,200,5,.06); }
.chain tr.sel td { background: var(--raised-2); box-shadow: inset 0 1px 0 var(--up), inset 0 -1px 0 var(--up); }
.chain-detail { margin-top: 14px; }
.chain-detail h4 { margin: 0 0 4px; font-size: 16px; }
.chain-detail .stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.decomp { margin-top: 12px; }
.dbar { display: flex; height: 26px; border-radius: 8px; overflow: hidden; background: var(--raised); }
.dbar .di { background: var(--up); transition: width .15s; }
.dbar .de { background: repeating-linear-gradient(135deg, var(--call) 0 6px, rgba(90,200,250,.55) 6px 12px); transition: width .15s; }
.dlegend { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 8px; font-size: 14px; }
.dim { color: var(--dim); }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 6px; }
.sw.g { background: var(--up); } .sw.h { background: var(--call); } .sw.w { background: var(--curve); height: 3px; vertical-align: 3px; }
.sw.w.dash { background: repeating-linear-gradient(90deg, var(--curve) 0 4px, transparent 4px 7px); }
.plot-host, .plot-host2, .qplot { margin-top: 10px; }
.plot-cap { font-size: 12.5px; color: var(--dim); margin: 4px 0 0; }
.plot-cap i + i { margin-left: 12px; }
.vs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.vs > div { background: var(--raised); border-radius: 10px; padding: 10px 12px; }
.vs span { display: block; font-size: 12.5px; color: var(--dim); }
.vs b { font-size: 20px; }
.vs small { display: block; font-size: 12px; color: var(--faint); }
@media (max-width: 520px) { .vs { grid-template-columns: 1fr; } }
.verdict .v { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--raised); }
.verdict .v.up { background: var(--up-soft); color: var(--text); }
.verdict .v.up b { color: var(--up); }

/* line plots */
.lp { display: block; max-width: 100%; }
.lp text { font-family: var(--sans); font-size: 11px; fill: var(--dim); }
.lp .grid { stroke: var(--line-soft); }
.lp .zero { stroke: var(--zero); stroke-width: 1.2; }
.lp .band { fill: var(--band); } .lp .band2 { fill: var(--band-2); }
.lp .band-l { font-size: 10.5px; fill: var(--dim); font-weight: 600; }
.lp .ln { fill: none; stroke-width: 2.2; stroke-linejoin: round; }
.lp .ln.up, .lp .ln.green { stroke: var(--up); } .lp .ln.down { stroke: var(--down); }
.lp .ln.white { stroke: var(--curve); } .lp .ln.dash { stroke-dasharray: 5 5; stroke-width: 1.6; }
.lp .ln.call { stroke: var(--call); } .lp .ln.put { stroke: var(--put); } .lp .ln.dimln { stroke: var(--faint); }
.lp .fill-up { fill: var(--up-soft); } .lp .fill-down { fill: var(--down-soft); }
.lp .tv-area { fill: rgba(90,200,250,.16); } .lp .iv-area { fill: rgba(0,200,5,.22); }
.lp .spot { stroke: var(--dim); stroke-dasharray: 2 4; stroke-width: 1.2; }
.lp .mk { stroke: var(--ink); stroke-width: 1; opacity: .5; }
.lp .kline { stroke: var(--line); stroke-dasharray: 3 5; }
.lp .vl-l { font-size: 10.5px; font-weight: 600; }
.lp .ref { stroke-dasharray: 2 4; stroke-width: 1.2; } .lp .ref.up { stroke: var(--up); } .lp .ref.dim { stroke: var(--faint); }
.lp .ref-l { font-size: 10.5px; font-weight: 600; fill: var(--dim); }
.lp .dot { stroke: var(--bg); stroke-width: 2; } .lp .dot.up { fill: var(--up); } .lp .dot.down { fill: var(--down); } .lp .dot.white { fill: var(--ink); }
.lp .ln-l { font-size: 11px; font-weight: 650; }

/* ── greeks lab ── */
.hero.short { padding-bottom: 8px; }
.glab { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 920px) { .glab { grid-template-columns: minmax(0, 1fr); } }
.gctl { position: sticky; top: 64px; max-height: calc(100vh - 80px); overflow-y: auto; }
@media (max-width: 920px) { .gctl { position: static; max-height: none; } }
.gctl .seg { margin-right: 4px; }
.gprice { margin: 6px 0 12px; padding: 12px; background: var(--raised); border-radius: 10px; }
.gprice .k { font-size: 12.5px; color: var(--dim); }
.gprice .v { font-size: 26px; font-weight: 750; letter-spacing: -.02em; }
.gprice .s { font-size: 12px; color: var(--faint); }
.gjump { display: flex; flex-wrap: wrap; gap: 6px; }
.gjump a { font-size: 12.5px; font-weight: 600; text-decoration: none; color: var(--dim); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; }
.gjump a:hover { color: var(--text); }
.gcards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
@media (max-width: 560px) { .gcards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.gcard { display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; background: var(--surface);
  border: 1px solid var(--line-soft); border-radius: 12px; padding: 10px 4px; min-width: 0; }
.gcard:hover { border-color: var(--line); background: var(--raised); }
.gcard .gsym { font-size: 20px; }
.gcard b { font-size: 15px; overflow-wrap: anywhere; text-align: center; }
.gcard span:last-child { font-size: 11.5px; color: var(--faint); }
.gsec { scroll-margin-top: 70px; }
.gsec + .gsec { margin-top: 12px; }
.ghead { display: flex; align-items: center; gap: 12px; }
.gsym { font-family: var(--sans); font-size: 28px; font-weight: 800; color: var(--up); line-height: 1; min-width: 34px; text-align: center; }
.gsym.small { font-family: var(--sans); font-size: 20px; }
.panel .gname, .gname { font-size: 22px; letter-spacing: -.02em; margin: 0; text-transform: none; color: var(--text); }
.gunit { font-size: 13px; color: var(--dim); }
.gval { margin-left: auto; font-size: 20px; white-space: nowrap; }
.gdef { color: var(--text-2); margin: 12px 0 6px; }
.gsay { background: var(--raised); border-radius: 10px; padding: 10px 12px; margin: 8px 0 4px; font-size: 14.5px; }
.gcharts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 8px; }
@media (max-width: 700px) { .gcharts { grid-template-columns: 1fr; } }
.gcharts h4, .decay h4 { margin: 8px 0 0; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); font-weight: 650; }
.gcharts > div { min-width: 0; }
.decay { margin-top: 10px; }
.gsec .formula-line { margin: 12px 0 8px; font-size: 13px; }
.gsec .formula-line code { font-family: var(--mono); color: var(--text-2); }
.gpoints { margin: 0; padding-left: 18px; color: var(--text-3); font-size: 14.5px; }
.gpoints li { margin-bottom: 6px; }
.sw.c { background: var(--call); height: 3px; vertical-align: 3px; } .sw.p { background: var(--put); height: 3px; vertical-align: 3px; }
.cheat { width: 100%; border-collapse: collapse; font-size: 14px; }
.cheat th { font-size: 12px; color: var(--dim); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: center; }
.cheat td { padding: 8px; border-bottom: 1px solid var(--line-soft); text-align: center; font-weight: 750; font-size: 16px; }
.cheat td:first-child, .cheat th:first-child { text-align: left; font-weight: 650; font-size: 14px; white-space: nowrap; }
.cheat td.w { text-align: left; font-weight: 400; font-size: 13px; color: var(--dim); min-width: 160px; }
.gexplain { list-style: none; margin: 12px 0 0; padding: 0; font-size: 13px; color: var(--text-3); }
.gexplain li { padding: 5px 0; border-top: 1px solid var(--line-soft); }
.gexplain li b:first-child { display: inline-block; width: 18px; color: var(--dim); }
.note a { color: var(--dim); }

/* ── dictionary ── */
.az { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 14px; }
.az a { min-width: 30px; text-align: center; text-decoration: none; font-weight: 700; font-size: 13.5px; padding: 5px 6px; border-radius: 8px; background: var(--raised); color: var(--text); }
.az a:hover { background: var(--up); color: var(--on-accent); }
.az a.off { opacity: .25; pointer-events: none; }
.gl-letter { scroll-margin-top: 70px; margin-top: 26px; }
.gl-letter h2 { font-size: 28px; color: var(--up); margin: 0 0 8px; letter-spacing: -.02em; }
.gl-letter dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 8px; }
@media (max-width: 400px) { .gl-letter dl { grid-template-columns: 1fr; } }
.gl-letter dl > div { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.gl-letter dt a { font-weight: 700; text-decoration: none; font-size: 15.5px; }
.gl-letter dt a:hover { color: var(--up); }
.gl-letter dt .aka { font-size: 12.5px; }
.gl-letter dd { margin: 4px 0 0; color: var(--dim); font-size: 13.5px; line-height: 1.5; }
.entry { max-width: 780px; }
.entry > h1 { font-size: clamp(32px, 6vw, 50px); letter-spacing: -.035em; line-height: 1.05; margin: 0; }
.entry .aka { margin: 6px 0 0; }
.entry .prose h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); margin: 22px 0 6px; }
.entry .ex { background: var(--surface); border-left: 3px solid var(--up); border-radius: 0 10px 10px 0; padding: 12px 14px; }
.entry h3.sub { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); margin: 26px 0 10px; }
.rel-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rel-chips a { text-decoration: none; background: var(--raised); border: 1px solid var(--line-soft); border-radius: 10px; padding: 7px 12px; font-weight: 650; font-size: 14px; }
.rel-chips a:hover { border-color: var(--up); }
.rel-chips span { display: block; font-size: 10.5px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: .05em; }

/* auto-linked terms + tooltip */
a.gl { color: inherit; text-decoration: underline dotted var(--faint); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a.gl:hover, a.gl:focus-visible { color: var(--up); text-decoration-color: var(--up); }
.gl-tip { position: fixed; z-index: 80; background: var(--raised-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; line-height: 1.45;
  color: var(--text-2); box-shadow: 0 12px 40px var(--shadow); pointer-events: none; }
.gl-tip b { display: block; color: var(--text); margin-bottom: 2px; }
.gl-tip span { display: block; margin-top: 6px; font-size: 11.5px; color: var(--up); }

/* search button + palette */
.sbtn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--raised); color: var(--dim); border-radius: 999px;
  padding: 6px 10px 6px 12px; cursor: pointer; font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.sbtn:hover { color: var(--text); border-color: var(--hover-line); }
.sbtn kbd, .pal kbd { font-family: var(--mono); font-size: 11px; color: var(--faint); border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; }
@media (max-width: 640px) { .sbtn span, .sbtn kbd { display: none; } .sbtn { padding: 7px; } }
.pal { position: fixed; inset: 0; z-index: 90; background: var(--overlay); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); display: flex; justify-content: center; padding: 10vh 16px 16px; }
.pal[hidden] { display: none; }
.pal-box { width: 100%; max-width: 620px; max-height: 76vh; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: 0 30px 80px var(--shadow); }
.pal-in { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--dim); }
.pal-in input { flex: 1; min-width: 0; font: inherit; font-size: 17px; background: none; border: 0; color: var(--text); outline: none; }
.pal-res { overflow-y: auto; padding: 6px; }
.pal-h { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); font-weight: 650; padding: 10px 10px 4px; }
.pal-res a { display: block; text-decoration: none; padding: 8px 10px; border-radius: 10px; }
.pal-res a b { display: block; font-size: 15px; }
.pal-res a span { display: block; font-size: 12.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pal-res a.on, .pal-res a:hover { background: var(--raised-2); }
.pal-res a.on b { color: var(--up); }
.pal-hint { color: var(--dim); font-size: 14px; padding: 12px 10px; margin: 0; line-height: 2; }
.pal-res .pal-hint a { display: inline; padding: 0; color: var(--up); border-radius: 0; }
.pal-res .pal-hint a:hover { background: none; text-decoration: underline; }
body.noscroll { overflow: hidden; }

/* ── simulator extras: builder, heat map, compare ── */
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.panel-h h2, .panel-h h3 { margin: 0; }
.panel-h .btn { text-decoration: none; }
.oe-chart .cmp-line { fill: none; stroke: var(--call); stroke-width: 2; stroke-dasharray: 7 4; opacity: .95; }
.legend i.cmpl { border-top: 2px dashed var(--call); }
.leg-row { display: grid; grid-template-columns: 62px 1fr 1fr 22px; grid-template-areas: "side type px del" "qty strike dte dte";
  gap: 6px 8px; align-items: end; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.leg-row .side-tag { grid-area: side; border: 0; cursor: pointer; padding: 7px 0; align-self: stretch; }
.leg-row select { grid-area: type; }
.leg-row .lf.q { grid-area: qty; } .leg-row .lf.k { grid-area: strike; } .leg-row .lf.d { grid-area: dte; }
.leg-row .lf.muted { grid-area: strike / strike / dte / dte; font-size: 12.5px; color: var(--dim); align-self: center; }
.leg-row select, .leg-row input { width: 100%; min-width: 0; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--text); background: var(--raised);
  border: 1px solid var(--line); border-radius: 8px; padding: 6px 7px; }
.leg-row .lf { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.leg-row .lf > span { font-size: 10.5px; color: var(--faint); text-transform: uppercase; letter-spacing: .05em; }
.leg-row .lpx { grid-area: px; text-align: right; font-size: 13px; font-weight: 650; align-self: center; line-height: 1.25; }
.leg-row .lpx small { font-size: 11px; color: var(--dim); font-weight: 500; }
.leg-row .del { grid-area: del; border: 0; background: none; color: var(--faint); font-size: 20px; line-height: 1; cursor: pointer; align-self: center; padding: 2px 0; }
.leg-row .del:hover { color: var(--down); }
@media (min-width: 461px) and (max-width: 920px) {
  .leg-row { grid-template-columns: 62px 96px 70px 96px 72px 1fr 22px; grid-template-areas: "side type qty strike dte px del"; }
}
.addrow { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 8px; }
.startfrom select { width: 100%; }
.heat { border-collapse: separate; border-spacing: 2px; width: 100%; font-size: 12px; table-layout: fixed; min-width: 560px; }
.heat thead th:first-child { width: 86px; }
.heat th { font-weight: 600; color: var(--dim); padding: 4px 6px; white-space: nowrap; text-align: right; font-size: 11.5px; }
.heat thead th { text-align: center; }
.heat thead th.on { color: var(--text); }
.heat tbody tr.on th { color: var(--text); }
.heat td { text-align: center; padding: 6px 4px; border-radius: 5px; font-weight: 650; cursor: pointer; white-space: nowrap; min-width: 52px; }
.heat td:hover { outline: 1px solid var(--hover-outline); }
.heat td.cur { outline: 2px solid var(--ink); }
.cmp { width: 100%; border-collapse: collapse; font-size: 14px; }
.cmp th, .cmp td { padding: 8px 10px; border-bottom: 1px solid var(--line-soft); text-align: right; white-space: nowrap; }
.cmp thead th { font-size: 13px; color: var(--text); }
.cmp th:first-child { text-align: left; color: var(--dim); font-weight: 500; }
.cmp td { font-weight: 650; }
.cmp a { color: var(--call); }

/* ── finder ── */
.finder { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 920px) { .finder { grid-template-columns: minmax(0, 1fr); } }
.fq { position: sticky; top: 64px; }
@media (max-width: 920px) { .fq { position: static; } }
.fq-item + .fq-item { margin-top: 14px; }
.fq h3 { font-size: 15px; margin: 0 0 6px; }
.fq .note { margin: -2px 0 6px; }
.fres-h { font-size: 20px; margin: 0 0 10px; letter-spacing: -.01em; }
.fres-h span { display: block; font-size: 13px; color: var(--dim); font-weight: 500; letter-spacing: 0; }
.fcard { display: block; text-decoration: none; margin-bottom: 10px; transition: border-color .15s, background .15s; }
.fcard:hover { border-color: var(--line); background: var(--raised); }
.fc-top { display: flex; gap: 12px; align-items: flex-start; }
.fc-rank { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--up-soft); color: var(--up); font-weight: 800; }
.fc-name { flex: 1; min-width: 0; }
.fc-name b { display: block; font-size: 17px; }
.fc-name span { font-size: 13.5px; color: var(--dim); }
.fc-bar { height: 5px; border-radius: 3px; background: var(--raised-2); margin: 10px 0; overflow: hidden; }
.fc-bar span { display: block; height: 100%; background: var(--up); }
.fc-why { display: flex; flex-wrap: wrap; gap: 6px; }
.fc-why span { font-size: 12px; font-weight: 600; color: var(--up); background: var(--up-soft); border-radius: 999px; padding: 2px 9px; }
.fc-why span.warn { color: var(--warn); background: rgba(255,204,0,.1); }
.fc-nums { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 10px; font-size: 13px; color: var(--dim); }
.fc-nums b { color: var(--text); }
.fc-nums b.up { color: var(--up); } .fc-nums b.down { color: var(--down); }
.fres .note a { color: var(--dim); }

/* ── AI layer ── */
.ai-box { border-color: rgba(0,200,5,.28); background: linear-gradient(180deg, rgba(0,200,5,.05), var(--surface) 120px); }
#ai-suggest { margin-bottom: 16px; }
.ai-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ai-head h3 { margin: 0; font-size: 17px; letter-spacing: -.01em; }
.ai-badge { font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--on-accent); background: var(--up); border-radius: 6px; padding: 2px 7px; }
.ai-in { width: 100%; font: inherit; font-size: 15px; line-height: 1.5; color: var(--text); background: var(--raised); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px; resize: vertical; min-height: 76px; }
.ai-in:focus { outline: none; border-color: var(--up); }
.ai-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.ai-row .btn.primary { border: 0; cursor: pointer; font-weight: 700; }
.ai-row .btn.primary:disabled { opacity: .5; cursor: wait; }
.ai-status { font-size: 13px; color: var(--dim); }
.ai-out { margin-top: 12px; }
.ai-out:empty { display: none; }
.ai-read { background: var(--raised); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.ai-read p { margin: 0 0 8px; }
.ai-watch { margin: 8px 0 0; font-size: 13.5px; color: var(--text-2); }
.ai-watch b { color: var(--warn); }
.ai-q { background: rgba(90,200,250,.08); border: 1px solid rgba(90,200,250,.25); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.ai-q b { color: var(--call); }
.ai-err { color: var(--down); background: var(--down-soft); border-radius: 10px; padding: 10px 12px; margin: 0; }
.ai-headline { font-size: 20px; font-weight: 750; letter-spacing: -.015em; margin: 0 0 10px; }
.ai-sec { margin-top: 10px; }
.ai-sec h4 { margin: 0 0 3px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); }
.ai-sec p { margin: 0; color: var(--text-2); }
.ai-sec ul { margin: 2px 0 0; padding-left: 18px; color: var(--text-2); }
.ai-meta { font-size: 11.5px; color: var(--faint); margin: 14px 0 0; }

/* ── theme button, keyboard focus, reduced motion ── */
.tbtn { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: var(--raised); color: var(--dim); cursor: pointer; flex: none; }
.tbtn:hover { color: var(--text); }
.oe-chart .pill:focus { outline: none; }
.oe-chart .pill:focus-visible rect { stroke: var(--ink); stroke-width: 2.5; }
.heat td:focus-visible { outline: 2px solid var(--up); outline-offset: 1px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
