@charset "UTF-8";
/* AMDdict — tokens and layout. Graphite and ember; the green family palette stays NVIDIAddict's. */
:root {
  color-scheme: light;
  --bg: #F6F4F2; --surface: #FFFFFF; --raised: #EFEBE7; --ink: #1A1412; --muted: #6A5F59;
  --grid: #E3DDD8; --line: #DAD2CC;
  --accent: #C8410C; --accent-ink: #FFFFFF; --accent-soft: #FBE3D6; --gold: #A8760A; --gold-soft: #F6ECD2;
  --good: #1F8F6A; --warn: #B47B00; --serious: #C95A22; --crit: #C33A3A;
  --s1: #C8521A; --s2: #2A78D6; --s3: #BF7700; --s4: #C2418E; --s5: #5A46B8;
  --f1: #2a78d6; --f2: #eb6834; --f3: #1baf7a; --f4: #eda100; --f5: #e87ba4; --f6: #008300; --f7: #4a3aa7; --f8: #e34948; --f9: #1E1A22;
  --amd: var(--accent); --nvda: var(--twin); --twin: #4F8A00; --photon: #F2C46B; --horizon: rgba(0,0,0,.55);
  --sp1: #D93A2B; --sp2: #E8761E; --sp3: #D4A800; --sp4: #2E9A4E; --sp5: #2C78C8; --sp6: #4B4FB8; --sp7: #8A45C2;
  --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(26,20,18,.06), 0 8px 24px -12px rgba(26,20,18,.18);
  --radius: 10px;
  --sq-light: #EDE6E0; --sq-dark: #B89C8C;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0E0B0A; --surface: #141110; --raised: #1C1715; --ink: #EEE7E3; --muted: #A0928B;
    --grid: #2A2320; --line: #322925;
    --accent: #FF6B2C; --accent-ink: #120A06; --accent-soft: #2E1A10; --gold: #E3B34A; --gold-soft: #2A2210;
    --good: #3FBF93; --warn: #E0A83A; --serious: #E9784A; --crit: #E85C5C;
    --s1: #F0702E; --s2: #3B8FE8; --s3: #C4850F; --s4: #D95AA8; --s5: #8579DE;
    --f1: #3987e5; --f2: #d95926; --f3: #199e70; --f4: #c98500; --f5: #d55181; --f6: #008300; --f7: #9085e9; --f8: #e66767; --f9: #E9E4F5;
    --twin: #8FD11A; --photon: #FFD58A; --horizon: rgba(0,0,0,.7);
    --sp1: #FF5A4A; --sp2: #FF9A3C; --sp3: #F2D04B; --sp4: #4CC67A; --sp5: #4AA3F0; --sp6: #7C80F0; --sp7: #B57BEA;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px -14px rgba(0,0,0,.7);
    --sq-light: #2E2724; --sq-dark: #1C1715;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
    --bg: #0E0B0A; --surface: #141110; --raised: #1C1715; --ink: #EEE7E3; --muted: #A0928B;
    --grid: #2A2320; --line: #322925;
    --accent: #FF6B2C; --accent-ink: #120A06; --accent-soft: #2E1A10; --gold: #E3B34A; --gold-soft: #2A2210;
    --good: #3FBF93; --warn: #E0A83A; --serious: #E9784A; --crit: #E85C5C;
    --s1: #F0702E; --s2: #3B8FE8; --s3: #C4850F; --s4: #D95AA8; --s5: #8579DE;
    --f1: #3987e5; --f2: #d95926; --f3: #199e70; --f4: #c98500; --f5: #d55181; --f6: #008300; --f7: #9085e9; --f8: #e66767; --f9: #E9E4F5;
    --twin: #8FD11A; --photon: #FFD58A; --horizon: rgba(0,0,0,.7);
    --sp1: #FF5A4A; --sp2: #FF9A3C; --sp3: #F2D04B; --sp4: #4CC67A; --sp5: #4AA3F0; --sp6: #7C80F0; --sp7: #B57BEA;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px -14px rgba(0,0,0,.7);
    --sq-light: #2E2724; --sq-dark: #1C1715;
}

* { 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); }
.digest-manual { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.digest-manual summary { cursor: pointer; font-size: 13px; color: var(--muted); list-style: none; }
.digest-manual summary::-webkit-details-marker { display: none; }
.digest-manual summary::before { content: "+ "; font-family: var(--mono); }
.digest-manual[open] summary::before { content: "\2212 "; }
.digest-manual[open] summary { margin-bottom: 10px; }
.digest-manual .f { margin-top: 4px; }
.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: 7px 2px; font-size: 10.5px; min-width: 0; 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; } }

/* ============ v2.0: market clock, front page, sub-tabs ============ */

/* Market status chip in the header. Colour carries the phase; the label repeats it for anyone who can't see colour. */
.mkt { display: flex; align-items: center; gap: 8px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--raised); white-space: nowrap; flex: 0 0 auto; }
.mkt .mkt-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); flex: 0 0 auto; }
.mkt .mkt-label { font-size: 11px; font-weight: 600; letter-spacing: .01em; }
.mkt .mkt-next { font-family: var(--mono); font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mkt .mkt-note { font-size: 10.5px; color: var(--muted); border-left: 1px solid var(--line); padding-left: 8px; }
.mkt[data-phase="open"] .mkt-dot { background: var(--good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 22%, transparent); }
.mkt[data-phase="open"] .mkt-label { color: var(--good); }
.mkt[data-phase="pre"] .mkt-dot, .mkt[data-phase="after"] .mkt-dot { background: var(--warn); }
.mkt[data-phase="pre"] .mkt-label, .mkt[data-phase="after"] .mkt-label { color: var(--warn); }
.mkt[data-phase="closed"] .mkt-dot { background: var(--muted); }
@media (prefers-reduced-motion: no-preference) {
  .mkt[data-phase="open"] .mkt-dot { animation: mktpulse 2.4s ease-in-out infinite; }
}
@keyframes mktpulse { 0%, 100% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 22%, transparent); } 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--good) 8%, transparent); } }

/* Front page tape: the price is the headline, not a sales line. */
.front-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.front-top .eyebrow { margin: 0; }
.ft-px { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.ft-sym { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; }
.ft-v { font-family: var(--display); font-size: clamp(30px, 6vw, 44px); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.ft-chg { font-family: var(--mono); font-size: 14px; font-variant-numeric: tabular-nums; color: var(--muted); }
.ft-chg.up { color: var(--good); } .ft-chg.dn { color: var(--crit); }
.ft-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 6px; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }

/* Headlines river. */
.news { list-style: none; margin: 0; padding: 0; }
.news-item { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; }
.news-item:last-child { border-bottom: 0; }
.news-item a { text-decoration: none; color: inherit; display: block; }
.news-item a:hover .news-t, .news-item a:focus-visible .news-t { text-decoration: underline; text-underline-offset: 2px; }
.news-t { font-size: 14.5px; font-weight: 500; line-height: 1.35; }
.news-m { font-family: var(--mono); font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.news-kicker { display: inline-block; font-family: var(--mono); font-size: 9.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-ink); background: var(--accent); padding: 1px 6px; border-radius: 3px; margin-right: 8px; vertical-align: 2px; }
.news-item.desk .news-t { font-weight: 600; }
.news-empty { padding: 14px 0; color: var(--muted); font-size: 13px; }

/* Read-next / sources list. */
.links { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.links li a { display: block; padding: 7px 0; font-size: 13.5px; color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); }
.links li:last-child a { border-bottom: 0; }
.links li a:hover, .links li a:focus-visible { color: var(--accent); }
.links .links-sep { font-family: var(--mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); padding: 12px 0 4px; border-top: 1px solid var(--line); margin-top: 6px; }

/* Sub-tabs inside a consolidated screen. */
.subtabs { display: flex; gap: 4px; padding: 4px; background: var(--raised); border: 1px solid var(--line); border-radius: 999px; width: fit-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; margin-bottom: 20px; }
.subtabs::-webkit-scrollbar { display: none; }
.subtabs button { border: 0; background: transparent; color: var(--muted); font: 600 13px/1 var(--sans); padding: 9px 16px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.subtabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.subview { display: none; }
.subview.active { display: block; }
.subview .screen-head { margin-top: 0; }

/* Journal grafted under Squawk. */
.panel.divider { background: transparent; box-shadow: none; border-style: dashed; }

@media (max-width: 860px) {
  .mkt { order: 3; width: 100%; justify-content: flex-start; }
  .front-top { align-items: flex-start; }
  .subtabs button { padding: 9px 13px; font-size: 12.5px; }
}

/* A long status pill in the blind-tests panel was pushing the whole page sideways on a phone.
   Pills wrap instead of forcing a horizontal scroll; wide tables keep scrolling inside their wrap. */
.pill { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.tablewrap { max-width: 100%; }

/* Mobile header: the price strip gets its own row instead of being crushed between the brand and the mode toggle. */
@media (max-width: 860px) {
  .ticker { order: 4; flex: 1 0 100%; width: 100%; }
}
/* An empty headlines panel should not stretch to the height of the sidebar column. */
#news-panel { align-self: start; }
.t td.up { color: var(--good); } .t td.dn { color: var(--crit); } /* desk vs market: who scored better on that pair */

/* ============ 2026-10-02: live price, compact phone header, Capex Chess rebuild ============ */

/* Live price. The dot and the small label say where the number came from: live, pre / after hours,
   the close, delayed, or an offline snapshot. Never "live" unless the exchange printed it minutes ago. */
.live-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); margin-right: 5px; vertical-align: 1px; flex: 0 0 auto; }
[data-live="live"] .live-dot { background: var(--good); }
[data-live="ext"] .live-dot { background: var(--warn); }
[data-live="stale"] .live-dot, [data-live="offline"] .live-dot { background: var(--crit); }
@media (prefers-reduced-motion: no-preference) { [data-live="live"] .live-dot { animation: livepulse 1.8s ease-in-out infinite; } }
@keyframes livepulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 55%, transparent); } 60% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--good) 0%, transparent); } }
.tick-px .k { display: inline-flex; align-items: center; }
.tick-px .k em { font-style: normal; margin-left: 5px; letter-spacing: .08em; }
.tick-px[data-live="live"] .k em { color: var(--good); }
.tick-px[data-live="ext"] .k em { color: var(--warn); }
.tick-px[data-live="stale"] .k em, .tick-px[data-live="offline"] .k em { color: var(--crit); }
.tick-px .v b { font-weight: 700; }
.tick-px .v small { font-size: 11.5px; }
small.up, b.up, em.up, .ft-ext b.up { color: var(--good); }
small.dn, b.dn, em.dn, .ft-ext b.dn { color: var(--crit); }
.ft-sym { display: inline-flex; align-items: center; }
.front-tape[data-live="live"] .ft-sym { color: var(--good); }
.ft-ext { font-family: var(--mono); font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
#asof[data-live="live"] { color: var(--good); }
#asof[data-live="stale"], #asof[data-live="offline"] { color: var(--crit); }
@media (prefers-reduced-motion: no-preference) {
  .flash-up .v b, .flash-up .ft-v { animation: pxup .9s ease-out; }
  .flash-dn .v b, .flash-dn .ft-v { animation: pxdn .9s ease-out; }
}
@keyframes pxup { 0% { color: var(--good); text-shadow: 0 0 14px color-mix(in srgb, var(--good) 55%, transparent); } }
@keyframes pxdn { 0% { color: var(--crit); text-shadow: 0 0 14px color-mix(in srgb, var(--crit) 55%, transparent); } }

/* Phone header: two rows instead of four. Mode, XP, sound and theme fold behind one button, so the
   board (and everything else) gets the screen back. */
.hdr-more { display: none; }
@media (max-width: 860px) {
  .top { gap: 6px 10px; padding: 8px 14px 6px; }
  .top .brand { order: 1; }
  .top .mkt { order: 2; width: auto; flex: 1 1 0; min-width: 0; justify-content: flex-start; border: 0; background: transparent; padding: 0 0 0 4px; overflow: hidden; }
  .top .mkt .mkt-note { display: none; }
  .hdr-more { order: 3; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 34px; border: 1px solid var(--line); border-radius: 10px; background: var(--raised); color: var(--ink); cursor: pointer; flex: 0 0 auto; }
  .hdr-more svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
  .top.open .hdr-more { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
  .top > .seg, .top > .xp { display: none; order: 4; }
  .top.open > .seg, .top.open > .xp { display: inline-flex; }
  .top .ticker { order: 5; flex: 1 0 100%; width: 100%; gap: 16px; }
}
@media (max-width: 400px) { .top .mkt .mkt-next { display: none; } }
/* A phone on its side: the header scrolls away and the bottom bar becomes a side rail. */
:root[data-orient="landscape"][data-short="1"] .top { position: static; }
@media (max-width: 900px) and (orientation: landscape) and (max-height: 560px) {
  .app { padding-left: 64px; }
  .rail { top: 0; bottom: 0; left: 0; right: auto; width: 64px; height: 100%; flex-direction: column; justify-content: center; border-top: 0; border-right: 1px solid var(--line); padding: 4px; }
  .rail button { flex: 0 0 auto; }
  main { padding-bottom: 24px; }
}

/* Games screen on a phone: the board is the point, so the intro shrinks and the game chips scroll. */
@media (max-width: 860px) {
  #screen-games .screen-head { margin-bottom: 10px; }
  #screen-games .screen-head > p { display: none; }
  #screen-games .screen-head h2 { font-size: 20px; }
  .arena-nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 12px; padding: 0 16px 2px; }
  .arena-nav::-webkit-scrollbar { display: none; }
  .arena-nav button { flex: 0 0 auto; white-space: nowrap; }
}

/* ---- Capex Chess ---- */
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.pc, svg.pcm { stroke-width: 3.4; stroke-linejoin: round; stroke-linecap: round; overflow: visible; display: block; }
svg.pc.w, svg.pcm.w { fill: #F6F5EC; stroke: #141812; color: #141812; }
svg.pc.b, svg.pcm.b { fill: #262D22; stroke: #0A0C09; color: #E2EAD6; }
svg.pc .d, svg.pcm .d { fill: none; }
svg.pc.b .d, svg.pcm.b .d { stroke: #E2EAD6; }
svg.pc .e, svg.pcm .e { fill: currentColor; stroke: none; }

.cc { --bsz: 320px; --cl: #E4EBD5; --cd: #779753; --hl: rgba(244, 206, 58, .46); --sl: rgba(122, 196, 44, .55); display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); grid-template-areas: "opp" "board" "you" "acts" "moves" "side"; }
.cc[data-board="walnut"] { --cl: #EFDDBA; --cd: #AE7E53; }
.cc[data-board="slate"] { --cl: #DEE4EB; --cd: #7589A4; }
#cc-bar-opp { grid-area: opp; } .cc-boardwrap { grid-area: board; } #cc-bar-you { grid-area: you; } .cc-actions { grid-area: acts; } .cc-movesrow { grid-area: moves; } .cc-side { grid-area: side; }
.cc > .cc-bar, .cc > .cc-boardwrap, .cc > .cc-actions, .cc > .cc-movesrow { width: var(--bsz); max-width: 100%; justify-self: center; min-width: 0; }
.cc[data-mode="desk"] { grid-template-columns: var(--bsz) minmax(260px, 320px); justify-content: center; column-gap: 20px; grid-template-areas: "opp acts" "board moves" "you moves" "side side"; }
.cc[data-mode="desk"] > .cc-actions, .cc[data-mode="desk"] > .cc-movesrow { width: auto; justify-self: stretch; }
.cc[data-mode="land"] { grid-template-columns: var(--bsz) minmax(200px, 1fr); grid-template-rows: auto auto auto 1fr auto; column-gap: 14px; grid-template-areas: "board opp" "board you" "board acts" "board moves" "side side"; align-items: start; }
.cc[data-mode="land"] .cc-boardwrap { grid-row: 1 / span 4; }
.cc[data-mode="land"] > .cc-bar, .cc[data-mode="land"] > .cc-actions, .cc[data-mode="land"] > .cc-movesrow { width: auto; justify-self: stretch; }

.cc-boardwrap { position: relative; height: var(--bsz); }
#cc .board { position: relative; display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); width: var(--bsz); height: var(--bsz); max-width: none; aspect-ratio: auto; border: 0; border-radius: 6px; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; box-shadow: 0 0 0 1px rgba(0, 0, 0, .28), 0 14px 34px -16px rgba(0, 0, 0, .6); }
#cc .sq { position: relative; display: block; font-size: 0; cursor: default; overflow: visible; min-width: 0; box-shadow: none; animation: none; }
#cc .sq.l { background: var(--cl); } #cc .sq.d { background: var(--cd); }
#cc .sq.own { cursor: grab; }
#cc .sq.last::before { content: ""; position: absolute; inset: 0; background: var(--hl); }
#cc .sq.sel::before { content: ""; position: absolute; inset: 0; background: var(--sl); }
#cc .sq.chk::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle, rgba(232, 38, 38, .95) 0, rgba(232, 38, 38, .6) 32%, rgba(232, 38, 38, 0) 74%); }
#cc .sq.hov::before { content: ""; position: absolute; inset: 0; background: rgba(255, 255, 255, .22); box-shadow: inset 0 0 0 calc(var(--bsz) / 8 * .06) rgba(255, 255, 255, .8); }
#cc .sq.mv::after { content: ""; position: absolute; left: 50%; top: 50%; width: 30%; height: 30%; transform: translate(-50%, -50%); border-radius: 50%; background: rgba(12, 20, 8, .26); opacity: 1; border: 0; z-index: 2; }
#cc .sq.cap::after { content: ""; position: absolute; inset: 3%; width: auto; height: auto; border-radius: 50%; border: calc(var(--bsz) / 8 * .09) solid rgba(12, 20, 8, .3); background: none; opacity: 1; z-index: 2; box-sizing: border-box; }
#cc .sq .pc { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; filter: drop-shadow(0 calc(var(--bsz) / 8 * .03) 0 rgba(0, 0, 0, .3)); }
#cc .pc.dying { animation: die .24s ease-in forwards; }
#cc .cl { position: absolute; z-index: 3; pointer-events: none; font: 700 calc(var(--bsz) / 8 * .2) / 1 var(--sans); }
#cc .cl.rk { left: 5%; top: 5%; } #cc .cl.fl { right: 6%; bottom: 4%; }
#cc .sq.l .cl { color: var(--cd); } #cc .sq.d .cl { color: var(--cl); }
#cc .cc-ghost { position: absolute; z-index: 5; pointer-events: none; margin: 0; will-change: transform; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .3)); }
#cc .cc-drag { position: absolute; left: 0; top: 0; z-index: 6; pointer-events: none; filter: drop-shadow(0 10px 12px rgba(0, 0, 0, .4)); }
#cc .cc-arrow { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 4; pointer-events: none; }
#cc .cc-arrow line { stroke: rgba(255, 166, 0, .88); stroke-width: .17; stroke-linecap: round; }
#cc .cc-arrow polygon { fill: rgba(255, 166, 0, .88); }
#cc .board.reviewing { box-shadow: 0 0 0 3px var(--warn), 0 14px 34px -16px rgba(0, 0, 0, .6); }

.cc-bar { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 2px; }
.cc-av { width: 36px; height: 36px; border-radius: 9px; background: var(--cd); border: 2px solid transparent; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; transition: border-color .2s, box-shadow .2s; }
.cc-av svg { width: 30px; height: 30px; }
.cc-bar.turn .cc-av { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.cc-who { min-width: 0; flex: 1 1 auto; }
.cc-name { display: flex; align-items: baseline; gap: 7px; font-size: 14.5px; line-height: 1.2; white-space: nowrap; }
.cc-rt { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.cc-caps { display: flex; align-items: center; height: 18px; margin-top: 2px; }
.cc-caps svg { width: 18px; height: 18px; margin-right: -6px; }
.cc-caps b { font: 600 11.5px var(--mono); color: var(--muted); margin-left: 10px; }
.cc-dots { display: none; gap: 3px; align-items: center; }
.cc.thinking .cc-dots { display: inline-flex; }
.cc-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); animation: ccdot 1.1s infinite ease-in-out; }
.cc-dots i:nth-child(2) { animation-delay: .15s; } .cc-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes ccdot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.cc-mkt { font-family: var(--mono); font-size: 12px; white-space: nowrap; display: flex; align-items: center; gap: 4px; color: var(--muted); flex: 0 0 auto; }
.cc-mkt b { color: var(--ink); font-weight: 600; } .cc-mkt em { font-style: normal; }
#cc-bar-you .pill { flex: 0 0 auto; }

.cc-actions { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.cc-act { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px 2px 5px; min-height: 50px; border: 1px solid var(--line); background: var(--raised); color: var(--ink); border-radius: 11px; font: 600 11.5px/1.1 var(--sans); cursor: pointer; transition: transform .08s, background .15s; }
.cc-act:active:not(:disabled) { transform: scale(.96); }
.cc-act svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.cc-act:disabled { opacity: .38; cursor: default; }
.cc-act small { font: 600 10px var(--mono); color: var(--muted); }
#chess-new { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.cc-act.armed { background: var(--crit); color: #fff; border-color: transparent; }

.cc-movesrow { display: grid; grid-template-columns: 36px 36px minmax(0, 1fr) 36px 36px; gap: 4px; align-items: center; }
.cc-nav { height: 36px; border: 1px solid var(--line); background: var(--raised); color: var(--ink); border-radius: 9px; cursor: pointer; font-size: 12px; padding: 0; }
#cc .moves { grid-column: 3; margin: 0; height: 36px; max-height: none; display: flex; flex-wrap: nowrap; align-items: center; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; white-space: nowrap; padding: 0 6px; scroll-behavior: smooth; }
#cc .moves::-webkit-scrollbar { display: none; }
.cc[data-mode="desk"] .cc-movesrow { grid-template-columns: repeat(4, 1fr); grid-template-rows: minmax(0, 1fr) auto; align-self: stretch; align-items: stretch; }
.cc[data-mode="desk"] #chess-moves { grid-row: 1; grid-column: 1 / -1; height: auto; flex-wrap: wrap; align-content: flex-start; overflow-y: auto; white-space: normal; padding: 8px; }
.cc[data-mode="desk"] .cc-nav { grid-row: 2; }
.cc[data-mode="land"] .cc-actions { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.cc-promo { position: absolute; inset: 0; z-index: 8; background: rgba(0, 0, 0, .38); }
.cc-promo-col { position: absolute; left: calc(var(--c) * var(--bsz) / 8); top: 0; width: calc(var(--bsz) / 8); display: flex; flex-direction: column; background: var(--surface); box-shadow: 0 10px 30px rgba(0, 0, 0, .45); border-radius: 0 0 10px 10px; overflow: hidden; }
.cc-promo-col[data-top="0"] { top: auto; bottom: 0; flex-direction: column-reverse; border-radius: 10px 10px 0 0; }
.cc-promo-col button { position: relative; width: 100%; height: calc(var(--bsz) / 8); border: 0; padding: 0; background: var(--surface); cursor: pointer; }
.cc-promo-col button:hover { background: var(--accent-soft); }
.cc-promo-col button svg.pc { position: absolute; inset: 6%; width: 88%; height: 88%; }
.cc-promo-col button.x { height: calc(var(--bsz) / 16); font-size: 18px; color: var(--muted); background: var(--raised); }

.cc-sheet { position: absolute; inset: 0; z-index: 9; display: flex; align-items: center; justify-content: center; padding: 3%; background: rgba(5, 8, 5, .58); border-radius: 6px; }
.cc-card { width: min(100%, 440px); max-height: 100%; overflow: auto; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; padding: 14px; box-shadow: 0 18px 50px rgba(0, 0, 0, .5); display: grid; gap: 10px; overscroll-behavior: contain; }
.cc-card-head { display: flex; justify-content: space-between; align-items: center; }
.cc-card h4 { font-size: 21px; }
.cc-x { border: 0; background: transparent; font-size: 24px; line-height: 1; color: var(--muted); cursor: pointer; width: 38px; height: 38px; border-radius: 8px; }
.cc-x:hover { background: var(--raised); }
.cc-bots { display: grid; gap: 6px; }
.cc-bot { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; text-align: left; border: 1px solid var(--line); background: var(--raised); color: var(--ink); border-radius: 11px; padding: 7px 10px; cursor: pointer; font: inherit; }
.cc-bot[aria-checked="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
.cc-bot b { font-size: 14px; }
.cc-bot b i, .cc-rung i { font-style: normal; font-family: var(--mono); color: var(--muted); font-size: 12px; font-weight: 500; margin-left: 3px; }
.cc-bot b em { font-style: normal; font-size: 9.5px; font-family: var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin-left: 6px; }
.cc-bot small { display: block; color: var(--muted); font-size: 12px; line-height: 1.35; margin-top: 1px; }
.cc-bot-av { width: 34px; height: 34px; border-radius: 9px; background: var(--cd); display: flex; align-items: center; justify-content: center; }
.cc-bot-av svg { width: 28px; height: 28px; }
.cc-bot-rec { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.cc-color { justify-self: center; }
.cc-warn { color: var(--warn); margin: 0; text-align: center; }
.cc-go { justify-content: center; font-size: 15px; padding: 12px; border-radius: 11px; }
.cc-reason { margin: -6px 0 0; color: var(--muted); font-size: 13px; }
.cc-result.win h4 { color: var(--good); } .cc-result.loss h4 { color: var(--crit); }
.cc-rating-change { display: flex; align-items: baseline; gap: 10px; font-size: 18px; color: var(--muted); }
.cc-rating-change b { font-size: 34px; color: var(--ink); font-family: var(--display); }
.cc-rating-change em { font-style: normal; font: 700 16px var(--mono); }
.cc-streak { margin: 0; color: var(--gold); font-weight: 700; }
.cc-result-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.cc-result-acts .btn { flex: 1 1 auto; justify-content: center; padding: 11px 12px; }

.cc-side { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 16px; align-items: start; }
.cc-big { font-family: var(--display); font-size: 26px; line-height: 1; }
.cc-spark { width: 100%; height: 44px; display: block; margin-bottom: 4px; }
.cc-spark polyline { fill: none; stroke: var(--accent); stroke-width: 1.8; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.cc-stats { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); }
.cc-stats b { color: var(--ink); font-family: var(--mono); }
.cc-ladder { display: grid; gap: 2px; }
.cc-rung { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; border: 0; background: transparent; color: var(--ink); padding: 6px; border-radius: 9px; cursor: pointer; font: inherit; text-align: left; }
.cc-rung:hover { background: var(--raised); }
.cc-rung.cur { background: var(--accent-soft); }
.cc-rung .cc-bot-av { width: 30px; height: 30px; }
.cc-rung .cc-bot-av svg { width: 24px; height: 24px; }
.cc-legend { margin-top: 10px; }
.cc-legend summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.cc-legend-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; font-size: 12.5px; margin-top: 8px; }
.cc-legend ul { margin: 4px 0 0; padding-left: 16px; }
#cc-theme button { padding: 5px 10px; font-size: 12px; }
.archive .agame b.up { color: var(--good); } .archive .agame b.dn { color: var(--crit); }
@media (prefers-reduced-motion: reduce) { .cc-dots i { animation: none; opacity: .8; } }
/* New-game sheet: only the selected opponent shows its description, and on a phone the sheet rises from
   the bottom of the screen instead of squeezing six opponents into the board. */
.cc-bot:not([aria-checked="true"]) small { display: none; }
.cc[data-mode="port"] .cc-sheet[data-kind="new"] { position: fixed; inset: 0; z-index: 60; align-items: flex-end; padding: 0; border-radius: 0; }
.cc[data-mode="port"] .cc-sheet[data-kind="new"] .cc-card { width: 100%; max-width: 560px; max-height: 88vh; border-radius: 18px 18px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); }

/* Lead story (12 Nov 2026): the desk's newest feature. Same panel, same tokens; the chart is the piece's own share image. */
.front-feature { padding: 0; overflow: hidden; border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.front-feature .ff-img { display: block; background: var(--raised); border-bottom: 1px solid var(--line); }
.front-feature .ff-img img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }
.front-feature .ff-body { padding: 20px 24px 22px; }
.front-feature .eyebrow { margin: 0 0 10px; }
.front-feature .eyebrow b { color: var(--accent); font-weight: 700; }
.front-feature h2 { font-size: clamp(24px, 2.7vw, 34px); line-height: 1.1; font-weight: 800; letter-spacing: -0.022em; text-wrap: balance; }
.front-feature h2 a { color: inherit; text-decoration: none; }
.front-feature h2 a:hover, .front-feature h2 a:focus-visible { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.front-feature .ff-dek { font-size: 16.5px; line-height: 1.5; margin: 12px 0 0; max-width: 64ch; color: var(--muted); }
.front-feature .ff-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 18px 0 0; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.front-feature .ff-tiles > div { background: var(--raised); padding: 11px 12px 12px; min-width: 0; }
.front-feature .ff-tiles dt { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.front-feature .ff-tiles dd { margin: 5px 0 0; font-family: var(--display); font-weight: 700; font-size: 17px; line-height: 1.15; }
.front-feature .ff-tiles dd small { display: block; margin-top: 4px; font-family: var(--sans); font-weight: 400; font-size: 12.5px; line-height: 1.3; color: var(--muted); }
.front-feature .ff-more { display: inline-block; margin-top: 16px; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 15px; border-radius: 999px; padding: 10px 18px; text-decoration: none; }
.front-feature .ff-more:hover { filter: brightness(1.06); }
.front-feature a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (min-width: 900px) { .front-feature:has(.ff-img) { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: center; } .front-feature .ff-img { border-bottom: 0; align-self: stretch; display: flex; align-items: center; background: #0E0B0A; border-right: 1px solid var(--line); } }
@media (max-width: 700px) { .front-feature .ff-body { padding: 16px 16px 18px; } .front-feature .ff-dek { font-size: 15.5px; } .front-feature .ff-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .front-feature .ff-tiles dd { font-size: 16px; } .front-feature .ff-more { display: block; text-align: center; padding: 12px 18px; } }
