@charset "UTF-8";
/* NVIDIAddict — tokens and layout */
:root {
  color-scheme: light;
  --bg: #F4F6F1; --surface: #FFFFFF; --raised: #EBEFE6; --ink: #131A0F; --muted: #5C6656;
  --grid: #DDE3D6; --line: #D3DACB;
  --accent: #5C9A00; --accent-ink: #FFFFFF; --accent-soft: #E6F2CF; --gold: #A8760A; --gold-soft: #F6ECD2;
  --good: #1F8F6A; --warn: #B47B00; --serious: #C95A22; --crit: #C33A3A;
  --s1: #4F8A00; --s2: #2A78D6; --s3: #BF7700; --s4: #C2418E; --s5: #5A46B8;
  --f1: #2a78d6; --f2: #eb6834; --f3: #1baf7a; --f4: #eda100; --f5: #e87ba4; --f6: #008300; --f7: #4a3aa7; --f8: #e34948;
  --display: "Bricolage Grotesque", "Arial Narrow", Impact, sans-serif;
  --sans: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  --shadow: 0 1px 2px rgba(19,26,15,.06), 0 8px 24px -12px rgba(19,26,15,.18);
  --radius: 10px;
  --sq-light: #E7ECDD; --sq-dark: #9DB07F;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0B0F0C; --surface: #0E1410; --raised: #151C16; --ink: #E6ECE2; --muted: #8E9A88;
    --grid: #1F2A21; --line: #26322A;
    --accent: #8FD11A; --accent-ink: #0B0F0C; --accent-soft: #1B2A10; --gold: #E3B34A; --gold-soft: #2A2210;
    --good: #3FBF93; --warn: #E0A83A; --serious: #E9784A; --crit: #E85C5C;
    --s1: #5FA30C; --s2: #3B8FE8; --s3: #C4850F; --s4: #D95AA8; --s5: #8579DE;
    --f1: #3987e5; --f2: #d95926; --f3: #199e70; --f4: #c98500; --f5: #d55181; --f6: #008300; --f7: #9085e9; --f8: #e66767;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px -14px rgba(0,0,0,.7);
    --sq-light: #2A3327; --sq-dark: #1A221B;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0B0F0C; --surface: #0E1410; --raised: #151C16; --ink: #E6ECE2; --muted: #8E9A88;
  --grid: #1F2A21; --line: #26322A;
  --accent: #8FD11A; --accent-ink: #0B0F0C; --accent-soft: #1B2A10; --gold: #E3B34A; --gold-soft: #2A2210;
  --good: #3FBF93; --warn: #E0A83A; --serious: #E9784A; --crit: #E85C5C;
  --s1: #5FA30C; --s2: #3B8FE8; --s3: #C4850F; --s4: #D95AA8; --s5: #8579DE;
  --f1: #3987e5; --f2: #d95926; --f3: #199e70; --f4: #c98500; --f5: #d55181; --f6: #008300; --f7: #9085e9; --f8: #e66767;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px -14px rgba(0,0,0,.7);
  --sq-light: #2A3327; --sq-dark: #1A221B;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
img { max-width: 100%; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.55; }
a { color: var(--accent); }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
h2 { font-size: 26px; font-weight: 800; line-height: 1.1; }
h3 { font-size: 17px; font-weight: 700; }
p { margin: 0; }
.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.eyebrow { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.hidden, [hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Shell */
.app { display: grid; grid-template-columns: 92px 1fr; grid-template-rows: auto 1fr; min-height: 100vh; }
.top { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; padding: 10px 20px; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 20; flex-wrap: wrap; }
.brand { font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: -0.02em; display: flex; align-items: baseline; gap: 6px; }
.brand em { font-style: normal; color: var(--accent); }
.brand small { font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; }
.ticker { display: flex; gap: 18px; align-items: center; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.ticker::-webkit-scrollbar { display: none; }
.tick { display: flex; flex-direction: column; line-height: 1.15; white-space: nowrap; }
.tick .k { font-family: var(--mono); font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.tick .v { font-family: var(--mono); font-size: 14px; font-variant-numeric: tabular-nums; }
.tick .v.up { color: var(--good); } .tick .v.dn { color: var(--crit); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--raised); }
.seg button { border: 0; background: transparent; padding: 6px 14px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.seg button.gold[aria-pressed="true"] { background: var(--gold); color: #1A1305; }
.xp { font-family: var(--mono); font-size: 12px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--raised); white-space: nowrap; }
.xp b { color: var(--accent); }
.seg.theme { padding: 2px; }
.seg.theme button { padding: 5px 9px; font-size: 13px; line-height: 1; min-width: 32px; }
.seg.theme button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

.rail { border-right: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; padding: 12px 8px; gap: 4px; position: sticky; top: 62px; height: calc(100vh - 62px); }
.rail button { border: 0; background: transparent; border-radius: 8px; padding: 10px 4px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.rail button svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rail button[aria-current="page"] { background: var(--accent-soft); color: var(--ink); }
.rail button[aria-current="page"] svg { stroke: var(--accent); }
.rail .gate { opacity: .45; }

main { padding: 22px 24px 96px; max-width: 1240px; width: 100%; min-width: 0; }
.screen { display: none; }
.screen.active { display: block; animation: rise .25s ease-out; }
@keyframes rise { from { opacity: .6; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.screen-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.screen-head p { max-width: 62ch; color: var(--muted); }

/* Grid + panels */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(12, 1fr); }
.c12 { grid-column: span 12; } .c8 { grid-column: span 8; } .c6 { grid-column: span 6; } .c4 { grid-column: span 4; } .c3 { grid-column: span 3; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; min-width: 0; }
.panel.raised { box-shadow: var(--shadow); }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.panel-head h3 { display: flex; gap: 8px; align-items: center; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.kpi { background: var(--raised); border-radius: 8px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.kpi .k { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.kpi .v { font-family: var(--display); font-size: 24px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi .d { font-size: 12px; color: var(--muted); }
.kpi .d.up { color: var(--good); } .kpi .d.dn { color: var(--crit); }

/* Ladder */
.ladder { display: grid; gap: 0; }
.rung { display: grid; grid-template-columns: 56px 1fr; gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); }
.rung:first-child { border-top: 0; padding-top: 4px; }
.rung .n { font-family: var(--display); font-weight: 800; font-size: 34px; line-height: 1; color: var(--accent); letter-spacing: -0.04em; }
.rung .n small { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .1em; color: var(--muted); font-weight: 500; margin-top: 4px; }
.rung h4 { font-size: 16px; font-weight: 700; }
.rung .sub { color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.rung ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rung li { display: grid; grid-template-columns: minmax(140px, 1fr) minmax(180px, 1.4fr); gap: 6px 14px; font-size: 14.5px; padding: 8px 10px; background: var(--raised); border-radius: 6px; }
.rung li b { font-weight: 600; }
.rung li .v { font-family: var(--mono); font-size: 12.5px; }
.rung li .note { grid-column: 1 / -1; color: var(--muted); font-size: 13.5px; }
.rung.hot .n { color: var(--gold); }

/* Catalyst list */
.cal { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cal li { display: grid; grid-template-columns: 70px 1fr auto; gap: 10px; align-items: baseline; padding: 8px 10px; border-radius: 6px; background: var(--raised); font-size: 14px; }
.cal .d { font-family: var(--mono); font-size: 12px; }
.cal .why { grid-column: 2 / -1; color: var(--muted); font-size: 13px; }
.pill { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.pill.s0 { border-color: var(--muted); } .pill.s1 { border-color: var(--s2); color: var(--s2); } .pill.s2 { border-color: var(--s3); color: var(--s3); } .pill.s3 { border-color: var(--gold); color: var(--gold); }
.pill.tbc { opacity: .7; }
.pill.good { color: var(--good); border-color: var(--good); } .pill.crit { color: var(--crit); border-color: var(--crit); } .pill.warn { color: var(--warn); border-color: var(--warn); }

/* Buttons + forms */
.btn { border: 1px solid var(--line); background: var(--raised); border-radius: 8px; padding: 8px 14px; cursor: pointer; font-weight: 600; font-size: 13.5px; display: inline-flex; align-items: center; gap: 6px; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.gold { background: var(--gold); color: #1A1305; border-color: transparent; }
.btn.ghost { background: transparent; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.sm { padding: 5px 10px; font-size: 12.5px; }
textarea, input[type="number"], input[type="text"], select { width: 100%; font: inherit; color: var(--ink); background: var(--raised); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
textarea { min-height: 96px; resize: vertical; font-family: var(--mono); font-size: 12.5px; }
input[type="number"] { font-family: var(--mono); }
label.f { display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); }
label.f span b { color: var(--ink); font-family: var(--mono); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.fields { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.slider { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.slider:first-child { border-top: 0; }
.slider .l { font-size: 13px; font-weight: 600; }
.slider .h { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
.slider .sc { font-family: var(--mono); font-size: 12px; min-width: 64px; text-align: right; }
.slider input { grid-column: 1 / -1; }

/* Charts */
.chart { position: relative; }
.chart-svg { width: 100%; height: auto; display: block; }
.gauge-svg { width: 100%; max-width: 280px; height: auto; display: block; margin: 0 auto; }
.ctip { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 6px; padding: 6px 10px; font-size: 12px; font-family: var(--mono); z-index: 5; min-width: 120px; }
.ctip b { display: block; margin-bottom: 2px; font-family: var(--sans); }
.ctip i, .legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 6px; }
.spark { width: 120px; height: 32px; display: block; }

/* HTML bars */
.hbars { display: grid; gap: 8px; }
.hbar { display: grid; grid-template-columns: var(--labw, 150px) 1fr auto; gap: 10px; align-items: center; font-size: 12.5px; }
.hbar .l { text-align: right; color: var(--ink); }
.hbar .tr { height: 14px; background: var(--grid); border-radius: 3px; overflow: hidden; }
.hbar .tr b { display: block; height: 100%; border-radius: 3px; }
.hbar .v { font-family: var(--mono); font-variant-numeric: tabular-nums; min-width: 64px; }
@media (max-width: 600px) { .hbar { grid-template-columns: 1fr auto; } .hbar .l { grid-column: 1 / -1; text-align: left; font-weight: 600; } }

/* Forces */
.donut-svg { max-width: 380px; margin: 0 auto; }
.forces { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.forces li { display: grid; grid-template-columns: 14px 1fr auto; gap: 10px; align-items: start; padding: 10px 12px; background: var(--raised); border-radius: 8px; }
.forces li i { width: 14px; height: 14px; border-radius: 4px; display: block; margin-top: 4px; }
.forces li b { font-size: 15px; }
.forces li .w { font-family: var(--display); font-weight: 800; font-size: 20px; font-variant-numeric: tabular-nums; text-align: right; }
.forces li .why { grid-column: 2 / -1; font-size: 13.5px; color: var(--muted); }
.forces li .dir { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.forces li .dir.head { color: var(--crit); } .forces li .dir.tail { color: var(--good); } .forces li .dir.mix { color: var(--warn); }
.wslider { display: grid; grid-template-columns: 14px 1fr 64px; gap: 10px; align-items: center; padding: 6px 0; }
.wslider i { width: 14px; height: 14px; border-radius: 4px; display: block; }
.wslider .n { font-family: var(--mono); font-size: 12.5px; text-align: right; }
.wslider label { font-size: 13.5px; }

/* Squawk */
.arch { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.arch .card { background: var(--raised); border-radius: 8px; padding: 14px; display: grid; gap: 8px; border-top: 3px solid var(--muted); }
.arch .card.special { border-top-color: var(--gold); background: var(--gold-soft); }
.arch .card.b2 { border-top-color: var(--good); } .arch .card.b1 { border-top-color: var(--s1); } .arch .card.b0 { border-top-color: var(--s2); } .arch .card.b-1 { border-top-color: var(--warn); } .arch .card.b-2 { border-top-color: var(--crit); }
.arch h4 { font-size: 15px; font-weight: 700; }
.arch .say { font-size: 14.5px; border-left: 2px solid var(--line); padding-left: 10px; font-style: italic; }
.arch .meter { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); font-family: var(--mono); }
.arch .meter i { flex: 1; height: 5px; background: var(--grid); border-radius: 3px; overflow: hidden; display: block; }
.arch .meter i b { display: block; height: 100%; background: var(--accent); }
.digest { display: grid; gap: 10px; }
.digest .item { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; padding: 10px 12px; background: var(--raised); border-radius: 8px; font-size: 14.5px; }
.digest .item.noise { opacity: .7; }
.digest .item .why { color: var(--muted); font-size: 13.5px; }
.streamout { white-space: pre-wrap; font-size: 13.5px; background: var(--raised); border-radius: 8px; padding: 12px; min-height: 60px; }
.think { color: var(--muted); font-family: var(--mono); font-size: 12px; }
.think::after { content: "…"; animation: dots 1.2s steps(4) infinite; }
@keyframes dots { to { content: ""; } }

/* Prophecy ledger */
.pgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.pcard { background: var(--raised); border-radius: 8px; padding: 12px 14px; }
.pcard h4 { font-size: 15px; font-weight: 700; }
.plist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.plist li { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; font-size: 13.5px; }
.plist li b { font-weight: 600; }
.pgrid table.t td { vertical-align: top; }

/* Risk */
.risklabel { font-family: var(--display); font-weight: 800; font-size: 20px; text-align: center; }
.flip { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 13px; }
.flip li { display: flex; gap: 8px; align-items: baseline; }
.flip li::before { content: "→"; color: var(--accent); font-family: var(--mono); }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th { text-align: left; font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); font-weight: 500; }
table.t td { padding: 8px; border-bottom: 1px solid var(--grid); font-variant-numeric: tabular-nums; }
table.t td.n { font-family: var(--mono); text-align: right; }
table.t th.n { text-align: right; }
.tablewrap { overflow-x: auto; }

/* Scenarios */
.scen { display: grid; gap: 8px; }
.scen .s { display: grid; grid-template-columns: 12px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; background: var(--raised); border-radius: 8px; cursor: pointer; border: 1px solid transparent; }
.scen .s[aria-pressed="true"] { border-color: var(--accent); }
.scen .s i { width: 12px; height: 12px; border-radius: 3px; display: block; }
.scen .s .nm { font-weight: 600; font-size: 14px; }
.scen .s .p { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.scen .s .tgt { font-family: var(--display); font-weight: 800; font-size: 18px; text-align: right; }
.scen .s .tgt small { display: block; font-family: var(--mono); font-weight: 500; font-size: 11px; color: var(--muted); }
.big { font-family: var(--display); font-weight: 800; font-size: 40px; letter-spacing: -0.03em; line-height: 1; }
.big small { font-size: 14px; color: var(--muted); font-family: var(--mono); font-weight: 500; letter-spacing: 0; margin-left: 6px; }

/* Flows / fiat */
.fx { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.fx .p { background: var(--raised); border-radius: 8px; padding: 12px; display: grid; gap: 4px; }
.fx .p .k { font-family: var(--mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.fx .p .v { font-family: var(--display); font-weight: 800; font-size: 22px; font-variant-numeric: tabular-nums; }
.fx .p .w { font-size: 12.5px; color: var(--muted); }
.mech { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.mech .m { padding: 12px; border-radius: 8px; background: var(--raised); font-size: 13px; display: grid; gap: 4px; }
.mech .m b { font-size: 14px; }
.mech .m .dir { font-family: var(--mono); font-size: 12px; }
.mech .m .dir.neg { color: var(--crit); } .mech .m .dir.pos { color: var(--good); } .mech .m .dir.mix { color: var(--warn); }

/* Options desk */
.greeks { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.greeks .g { background: var(--raised); border-radius: 8px; padding: 10px; display: grid; gap: 2px; }
.greeks .g .k { font-family: var(--mono); font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.greeks .g .v { font-family: var(--display); font-weight: 800; font-size: 20px; font-variant-numeric: tabular-nums; }
.verdict { padding: 12px 14px; border-radius: 8px; background: var(--gold-soft); border-left: 3px solid var(--gold); font-size: 13.5px; }

/* Arena */
.arena-nav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.arena-nav button { border: 1px solid var(--line); background: var(--raised); border-radius: 999px; padding: 8px 14px; cursor: pointer; font-weight: 600; font-size: 13px; }
.arena-nav button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.game { display: none; }
.game.active { display: block; }
.board { position: relative; display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); aspect-ratio: 1; width: 100%; max-width: 520px; border: 2px solid var(--line); border-radius: 6px; overflow: hidden; user-select: none; }
.sq { display: flex; align-items: center; justify-content: center; font-size: clamp(22px, 5.5vw, 40px); cursor: pointer; position: relative; line-height: 1; overflow: hidden; min-width: 0; }
.sq.l { background: var(--sq-light); } .sq.d { background: var(--sq-dark); }
.sq.sel { box-shadow: inset 0 0 0 3px var(--accent); }
.sq.mv::after { content: ""; width: 26%; height: 26%; border-radius: 50%; background: var(--accent); opacity: .55; position: absolute; }
.sq.cap::after { width: 90%; height: 90%; border-radius: 50%; border: 3px solid var(--crit); background: transparent; opacity: .8; box-sizing: border-box; }
.sq.chk { box-shadow: inset 0 0 0 3px var(--crit); }
.sq .pc { pointer-events: none; }
.sq .pc.w { color: #F6FBEA; text-shadow: 0 0 2px #000, 0 1px 1px #000, 0 0 1px #000; }
.sq .pc.b { color: #101510; text-shadow: 0 0 2px #B8C8A8; }
.sq .lab { position: absolute; left: 3px; top: 2px; font-family: var(--mono); font-size: 9px; color: var(--muted); opacity: .8; }
.legendp { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; font-size: 12.5px; }
.legendp div { display: flex; gap: 8px; align-items: center; }
.legendp .g { font-size: 18px; width: 22px; text-align: center; }
.lesson { padding: 12px 14px; border-radius: 8px; background: var(--accent-soft); border-left: 3px solid var(--accent); font-size: 13.5px; }
.lesson.bad { background: var(--gold-soft); border-left-color: var(--crit); }
.cards { display: flex; gap: 8px; flex-wrap: wrap; min-height: 84px; }
.card-p { width: 58px; height: 82px; border-radius: 6px; background: #FBFBF7; color: #111; border: 1px solid #C9C9C0; display: flex; flex-direction: column; justify-content: space-between; padding: 6px; font-family: var(--mono); font-weight: 700; font-size: 15px; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.card-p.red { color: #C2342E; }
.card-p.back { background: repeating-linear-gradient(45deg, #2F5D1F 0 6px, #3B7328 6px 12px); border-color: #24451A; }
.card-p span:last-child { align-self: flex-end; transform: rotate(180deg); }
.bank { font-family: var(--mono); font-size: 13px; }
.choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.choice button { padding: 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--raised); cursor: pointer; font-weight: 700; font-size: 14px; }
.choice button:hover { border-color: var(--accent); }
.choice button.right { background: var(--accent-soft); border-color: var(--accent); }
.choice button.wrong { background: var(--gold-soft); border-color: var(--crit); }
.score { font-family: var(--mono); font-size: 13px; }
.claim { font-size: 17px; font-family: var(--display); font-weight: 700; line-height: 1.3; min-height: 60px; }

/* Journal */
.jlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.jlist li { display: grid; grid-template-columns: 90px 70px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; background: var(--raised); border-radius: 6px; font-size: 13px; }
.jlist .d { font-family: var(--mono); font-size: 12px; }
.badges { display: flex; gap: 8px; flex-wrap: wrap; }
.badge { padding: 6px 10px; border-radius: 8px; background: var(--raised); font-size: 12.5px; border: 1px solid var(--line); }
.badge.on { border-color: var(--accent); background: var(--accent-soft); }
.badge.on::before { content: "✓ "; color: var(--accent); }

/* Glossary tooltips */
abbr.g { text-decoration: underline dotted var(--accent); cursor: help; }
.toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-size: 13px; font-weight: 600; z-index: 50; box-shadow: var(--shadow); opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.show { opacity: 1; }
.mode-note { font-size: 12.5px; color: var(--muted); padding: 8px 12px; border-radius: 8px; background: var(--raised); border-left: 3px solid var(--gold); }
.callonly[data-hide="1"] { display: none; }
.beginneronly[data-hide="1"] { display: none; }
.foot { margin-top: 28px; color: var(--muted); font-size: 12px; max-width: 70ch; }

/* Responsive */
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .rail { position: fixed; bottom: 0; left: 0; right: 0; top: auto; height: auto; flex-direction: row; justify-content: space-around; border-right: 0; border-top: 1px solid var(--line); padding: 4px 2px; z-index: 30; overflow-x: auto; gap: 0; }
  .rail button { padding: 6px 2px; font-size: 9.5px; min-width: 44px; flex: 1; }
  .rail button svg { width: 20px; height: 20px; }
  .brand { font-size: 19px; }
  .seg button { padding: 5px 10px; font-size: 12px; }
  main { padding: 16px 16px 110px; }
  .c8, .c6, .c4, .c3 { grid-column: span 12; }
  .top { padding: 8px 16px; }
  .rung { grid-template-columns: 44px 1fr; }
  .rung li { grid-template-columns: 1fr; }
  .jlist li { grid-template-columns: 80px 1fr; }
  .jlist li .note { grid-column: 1 / -1; }
}
@media (min-width: 901px) and (max-width: 1100px) {
  .c4 { grid-column: span 6; } .c3 { grid-column: span 6; }
}

/* NVIDY */
.nvidy-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 10px; max-width: 580px; }
.nvidy-main { min-width: 0; }
.ncols { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; margin-bottom: 6px; }
.ncol { text-align: center; font-size: 10px; line-height: 1.15; padding: 4px 0 3px; border-radius: 4px; background: var(--raised); color: var(--muted); position: relative; overflow: hidden; }
.ncol b { display: block; font-weight: 600; color: var(--ink); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ncol span { font-family: var(--mono); font-size: 10px; }
.ncol i { display: block; height: 3px; margin-top: 3px; background: var(--grid); }
.ncol.bull i { background: var(--good); } .ncol.bear i { background: var(--crit); }
.nboard { position: relative; display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); aspect-ratio: 1; width: 100%; border: 2px solid var(--line); border-radius: 6px; overflow: hidden; user-select: none; }
.nsq { position: relative; display: flex; align-items: center; justify-content: center; cursor: pointer; min-width: 0; overflow: hidden; }
.nsq.l { background: var(--sq-light); } .nsq.d { background: var(--sq-dark); }
.nsq.last { box-shadow: inset 0 0 0 100vmax color-mix(in srgb, var(--gold) 28%, transparent); }
.nsq.sel { box-shadow: inset 0 0 0 3px var(--accent); }
.nsq.mv::after { content: ""; width: 26%; height: 26%; border-radius: 50%; background: var(--accent); opacity: .55; position: absolute; }
.nsq.cap::after { content: ""; width: 88%; height: 88%; border-radius: 50%; border: 3px solid var(--crit); position: absolute; box-sizing: border-box; opacity: .85; }
.nsq .lab { position: absolute; left: 3px; top: 2px; font-size: 9px; font-family: var(--mono); color: var(--muted); pointer-events: none; }
.npc { pointer-events: none; padding: 0 1px; box-sizing: border-box; width: 84%; aspect-ratio: 1; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: clamp(8px, 1.5vw, 11.5px); font-weight: 600; letter-spacing: -.01em; text-align: center; line-height: 1; box-shadow: inset 0 -3px 0 rgba(0,0,0,.25), 0 1px 2px rgba(0,0,0,.35); }
.npc.bull { background: var(--good); color: #fff; }
.npc.bear { background: var(--crit); color: #fff; }
.ntape { display: grid; grid-template-rows: repeat(9, 1fr); gap: 2px; border: 1px solid var(--line); border-radius: 6px; padding: 3px; background: var(--raised); margin-top: 28px; }
.ntape .tick { border-radius: 3px; background: var(--grid); font-size: 8.5px; font-family: var(--mono); display: flex; align-items: center; justify-content: center; color: var(--muted); text-transform: uppercase; letter-spacing: .02em; }
.ntape .tick.top { background: color-mix(in srgb, var(--good) 35%, var(--grid)); }
.ntape .tick.bot { background: color-mix(in srgb, var(--crit) 35%, var(--grid)); }
.ntape .tick.on { background: var(--accent); color: #fff; font-weight: 700; box-shadow: 0 0 0 2px var(--accent-soft); }
@media (max-width: 900px) { .nvidy-wrap { grid-template-columns: minmax(0, 1fr) 36px; } .ncol b { font-size: 9px; } }

/* Board animation, move list, replay */
.anim-pc { position: absolute; z-index: 6; pointer-events: none; display: flex; align-items: center; justify-content: center; margin: 0; will-change: transform; }
.pc.dying, .npc.dying { animation: die .26s ease-in forwards; }
@keyframes die { to { transform: scale(.15); opacity: 0; } }
.sq.last { box-shadow: inset 0 0 0 100vmax color-mix(in srgb, var(--gold) 28%, transparent); }
.sq.sel { box-shadow: inset 0 0 0 3px var(--accent); }
.sq.chk { animation: chk .9s ease-in-out 2; }
@keyframes chk { 0%, 100% { box-shadow: inset 0 0 0 3px var(--crit); } 50% { box-shadow: inset 0 0 0 6px var(--crit); } }
.ntape .tick.on { animation: pop .4s cubic-bezier(.2,.8,.2,1); }
@keyframes pop { 0% { transform: scale(.8); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
.movenav { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; align-items: center; }
.movenav .btn { min-width: 38px; }
.moves { margin-top: 8px; max-height: 96px; overflow-y: auto; display: flex; flex-wrap: wrap; gap: 2px 4px; align-items: center; font-family: var(--mono); font-size: 12.5px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--raised); }
.moves .mvno { color: var(--muted); margin-left: 6px; }
.moves .mvno:first-child { margin-left: 0; }
.moves button.mv { border: 0; background: transparent; color: var(--ink); font: inherit; padding: 2px 5px; border-radius: 4px; cursor: pointer; }
.moves button.mv:hover { background: var(--grid); }
.moves button.mv.on { background: var(--accent); color: var(--accent-ink); }
.archive .agame { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--grid); }
.archive .agame:last-child { border-bottom: 0; }
@media (prefers-reduced-motion: reduce) { .anim-pc { transition: none !important; } .pc.dying, .npc.dying, .sq.chk, .ntape .tick.on { animation: none; } }
