/* TEU · Unit 3 Stocks. Everything in Unit 3 looks like a stocks app on a phone or Mac: black ground,
   system type, green and red for moves, blue for actions. This is the one place TEU uses rounded corners
   and a chart gradient, on purpose. */
body[data-world="board"] {
  --f-sys: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  --f-body: var(--f-sys); --f-board: var(--f-sys);
  --ground: #000; --panel: #1C1C1E; --panel-2: #2C2C2E; --panel-3: #3A3A3C;
  --ink: #FFFFFF; --ink-2: #8E8E93; --ink-3: #AEAEB2; --rule: #38383A; --rule-2: #48484A;
  --sx-up: #30D158; --sx-down: #FF453A; --sx-pill-up: #1A7F37; --sx-pill-down: #D3302A; --sx-blue: #0A84FF; --sx-gold: #FFD60A;
  /* Filled controls carry white text, so they use a deeper blue than links (#0A84FF on black). Hovers go darker, never lighter. */
  --sx-fill: #0071E3; --sx-fill-hover: #0062C4; --sx-buy-hover: #166C2F; --sx-sell-hover: #B92820;
  --up: var(--sx-up); --down: var(--sx-down); --good: var(--sx-up); --bad: var(--sx-down); --good-soft: #10291A; --bad-soft: #3A1512;
  --amber: #FFFFFF; --ochre: var(--sx-blue); --ochre-ink: var(--sx-blue); --cobalt: #64D2FF; --moss: var(--sx-up); --rust: var(--sx-down); --hl: #3A3110;
  --bar: #1C1C1E; --bar-ink: #FFFFFF; --bar-ink-2: #8E8E93; --stone: #8E8E93;
  color-scheme: dark;
  -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums;
}
body[data-world="board"] :focus-visible { outline-color: var(--sx-blue); border-radius: 8px; }
body[data-world="board"] ::selection { background: var(--sx-fill); color: #fff; }
body[data-world="board"] .skip { background: var(--sx-fill); color: #fff; }
body[data-world="board"] .mark { font-family: var(--f-code); }
body[data-world="board"] .top-stats { display: none; }
body[data-world="board"] .btn { border-radius: 10px; border-width: 1px; border-color: var(--rule-2); background: var(--panel); }
body[data-world="board"] .btn.primary { background: var(--sx-fill); border-color: var(--sx-fill); color: #fff; border-radius: 999px; }
@media (hover: hover) and (pointer: fine) {
  body[data-world="board"] .btn:not(.primary):not(:disabled):hover { background: var(--panel-2); }
  body[data-world="board"] .btn.primary:hover { background: var(--sx-fill-hover); }
}
body[data-world="board"] kbd { border-radius: 4px; border-color: var(--rule-2); opacity: 1; color: var(--ink-3); font-family: var(--f-sys); }
body[data-world="board"] .btn.primary kbd, body[data-world="board"] .sx-drill kbd, body[data-world="board"] .sx-calls .call kbd { color: #fff; border-color: rgba(255,255,255,.6); }
body[data-world="board"] .field { border-radius: 10px; border-color: transparent; background: var(--panel); }
body[data-world="board"] .field:focus { box-shadow: 0 0 0 2px var(--sx-blue); border-color: transparent; }
body[data-world="board"] input[type=checkbox] { accent-color: var(--sx-blue); }
body[data-world="board"] .hl, .sx-hl { color: var(--sx-gold); border-radius: 4px; }
body[data-world="board"] .state { border-radius: 6px; }
body[data-world="board"] .mode small, body[data-world="board"] .unit-btn .tab { color: #fff; }
body[data-world="board"] .mode small { background: var(--sx-fill); border-radius: 6px; }
body[data-world="board"] .unit-blk[data-u="3"] .unit-btn .tab { background: var(--sx-fill); border-radius: 8px; }
body[data-world="board"] .topic .idx { font-variant-numeric: tabular-nums; color: var(--ink); }
body[data-world="board"] .topic .idx.up { color: var(--sx-up); }
/* Flashcards and drills in Unit 3: the rail keeps every unit reachable but opens only Unit 3 */
body[data-world="board"] .unit-blk:not([data-u="3"]) .topic { display: none; }
body[data-world="board"] .unit-blk[data-u="3"] { order: -1; }
body[data-world="board"] .rail-all { order: -2; }
body[data-world="board"] .chip[aria-pressed="true"] { background: var(--sx-fill); color: #fff; }
body[data-world="board"] .flash { border-top: 0; background: var(--panel); border-radius: 16px; padding: 18px 22px 22px; }
body[data-world="board"] .flash .prompt { border-top-style: solid; border-bottom-style: solid; border-color: var(--rule); }
body[data-world="board"] .grades .btn { border-radius: 12px; }
body[data-world="board"] .opt, body[data-world="board"] .quiz .feedback { border-radius: 12px; }
body[data-world="board"] .progress-line { border-top-color: var(--rule); }
body[data-world="board"] .empty { border-radius: 12px; border: 1px dashed var(--panel-3); padding: 22px; }
body[data-world="board"] .dg { border-radius: 10px; background: #0E0E10; }
body[data-world="board"] .dg .lbl, body[data-world="board"] .dg .note-t { stroke: #0E0E10; }
body[data-world="board"] .dg .t-a { stroke: var(--sx-up); }
body[data-world="board"] .dg .lbl.t-a, body[data-world="board"] .dg .note-t.t-a, body[data-world="board"] .dg .area.t-a { fill: var(--sx-up); }
body[data-world="board"] .dg .t-b { stroke: var(--sx-blue); }
body[data-world="board"] .dg .lbl.t-b, body[data-world="board"] .dg .note-t.t-b, body[data-world="board"] .dg .area.t-b { fill: var(--sx-blue); }
body[data-world="board"] .dg .t-c { stroke: var(--sx-gold); }
body[data-world="board"] .dg .lbl.t-c, body[data-world="board"] .dg .note-t.t-c, body[data-world="board"] .dg .area.t-c { fill: var(--sx-gold); }

/* Ticker tape, in the app's own type */
body[data-world="board"] .ticker { font-family: var(--f-sys); font-size: 13.5px; font-weight: 600; background: #000; border-bottom-color: var(--rule); height: 32px; }
body[data-world="board"] .ticker .q { border-right-color: #1C1C1E; }
body[data-world="board"] .ticker .q b { font-weight: 700; color: #fff; }
body[data-world="board"] .ticker .q .p { color: #fff; font-weight: 500; }
body[data-world="board"] .ticker .q .ipo { color: var(--ink-2); }
.ticker .tape-btn { position: absolute; right: 0; top: 0; bottom: 0; width: 40px; display: grid; place-items: center; background: #000; border: 0; border-left: 1px solid var(--rule); color: var(--ink-2); }
.ticker .tape-btn svg { width: 12px; height: 12px; }
@media (hover: hover) and (pointer: fine) { .ticker .tape-btn:hover { color: #fff; } }
.ticker .tape-btn:focus-visible { outline-offset: -3px; }
.ticker.paused .tape { animation-play-state: paused; }
body[data-world="board"][data-view="cards"] .ticker, body[data-world="board"][data-view="diagrams"] .ticker, body[data-world="board"][data-view="quiz"] .ticker, body[data-world="board"][data-view="rwe"] .ticker { display: none; }

/* Notes in Unit 3 are the Stocks screen: it brings its own watchlist, so the rail and page head step aside */
body[data-world="board"][data-view="notes"] .layout { grid-template-columns: minmax(0, 1fr); padding-top: 0; }
body[data-world="board"][data-view="notes"] .rail,
body[data-world="board"][data-view="notes"] #view-notes > .view-head,
body[data-world="board"][data-view="notes"] #view-notes > .toolbar { display: none; }
.stx { display: grid; grid-template-columns: 330px minmax(0, 1fr); min-height: calc(100vh - 100px); margin: 0 -8px; }
:where(.stx) button { font: inherit; color: inherit; }
.sx-side { border-right: 1px solid var(--rule); padding: 14px 10px 24px 0; position: sticky; top: 62px; align-self: start; max-height: calc(100vh - 62px); overflow-y: auto; overscroll-behavior: contain; }
.sx-up, .sx-back { background: none; border: 0; color: var(--sx-blue); font-size: 15px; padding: 2px 8px; margin-bottom: 6px; border-radius: 6px; display: inline-flex; align-items: center; gap: 6px; }
.sx-chev { width: 8px; height: 13px; flex: none; }
.sx-top { display: flex; align-items: center; justify-content: space-between; margin: 0 8px; }
.sx-top h1 { font-size: 28px; font-weight: 700; letter-spacing: -.02em; margin: 0; }
.sx-date { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; color: var(--ink-2); font-size: 17px; font-weight: 600; margin: 0 8px 10px; letter-spacing: -.01em; }
.sx-show { background: none; border: 0; color: var(--sx-blue); font-size: 13px; font-weight: 600; padding: 2px 4px; border-radius: 6px; letter-spacing: 0; }
.sx-icon { background: none; border: 0; color: var(--sx-blue); width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; }
.sx-icon svg { width: 20px; height: 20px; }
@media (hover: hover) and (pointer: fine) { .sx-icon:hover { background: var(--panel); } }
.sx-sortw, .sx-infow { position: relative; }
.sx-menu, .sx-pop { position: absolute; right: 0; top: 40px; background: var(--panel-2); border-radius: 12px; z-index: 6; border: 1px solid var(--rule-2); transform-origin: top right; transition: opacity 150ms var(--ease-out), transform 150ms var(--ease-out); }
.sx-menu[hidden], .sx-pop[hidden] { display: block !important; opacity: 0; transform: scale(.96); pointer-events: none; visibility: hidden; transition: opacity 150ms var(--ease-out), transform 150ms var(--ease-out), visibility 0s 150ms; }
.sx-menu { width: 200px; padding: 5px; }
.sx-menu p { margin: 4px 10px 6px; font-size: 12px; color: var(--ink-3); font-weight: 600; }
.sx-menu button { display: flex; justify-content: space-between; width: 100%; text-align: left; background: none; border: 0; padding: 6px 10px; border-radius: 7px; font-size: 14.5px; }
.sx-menu button svg { width: 14px; height: 14px; }
.sx-menu button:hover, .sx-menu button:focus-visible { background: var(--sx-fill); outline: none; }
.sx-pop { width: 320px; padding: 14px 16px; font-size: 14px; line-height: 1.45; color: #E5E5EA; }
.sx-pop b { color: #fff; }
.sx-search { display: flex; align-items: center; gap: 6px; background: var(--panel); border-radius: 10px; padding: 0 10px; margin: 0 4px 10px; color: var(--ink-2); }
.sx-search svg { width: 15px; height: 15px; flex: none; }
.sx-search input { flex: 1; min-width: 0; background: none; border: 0; color: #fff; font: 16px var(--f-sys); padding: 8px 0; outline: none; }
.sx-search input::placeholder { color: var(--ink-2); }
.sx-search:focus-within { box-shadow: 0 0 0 2px var(--sx-blue); }

.sx-row { display: grid; grid-template-columns: minmax(0, 1fr) 64px 84px; align-items: center; gap: 10px; padding: 10px 8px; border-radius: 10px; position: relative; width: 100%; text-align: left; background: none; border: 0; }
.sx-row + .sx-row::before { content: ""; position: absolute; left: 8px; right: 8px; top: 0; height: 1px; background: var(--rule); }
.sx-row.ix { margin-bottom: 8px; }
.sx-row.ix + .sx-row::before { display: none; }
.sx-row[aria-current="true"] { background: var(--panel-2); }
.sx-row[aria-current="true"]::before, .sx-row[aria-current="true"] + .sx-row::before { display: none; }
.sx-row:focus-visible { outline-offset: -2px; }
.sx-row > div { min-width: 0; }
.sx-row .tk { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.sx-row .nm { font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.sx-row[aria-current="true"] .nm { color: var(--ink-3); }
.sx-row .rt { text-align: right; }
.sx-row .px { font-size: 17px; font-weight: 500; }
.sx-pill { display: inline-block; min-width: 72px; text-align: right; font-size: 13.5px; font-weight: 600; padding: 3px 7px; border-radius: 6px; margin-top: 3px; color: #fff; white-space: nowrap; transition: background-color .2s ease; }
.sx-pill.up { background: var(--sx-pill-up); } .sx-pill.down { background: var(--sx-pill-down); } .sx-pill.flat, .sx-pill.ipo { background: var(--rule-2); }
.sx-pill[data-sx] { cursor: pointer; }
.sx-spark { width: 64px; height: 32px; display: block; }
.sx-spark path { fill: none; stroke-width: 1.5; stroke-linejoin: round; }
.sx-spark .base { stroke: var(--rule-2); stroke-dasharray: 1 3; stroke-linecap: round; stroke-width: 1; }
.sx-spark .up { stroke: var(--sx-up); } .sx-spark .down { stroke: var(--sx-down); }
.sx-results h3 { font-size: 13px; color: var(--ink-2); margin: 10px 8px 4px; font-weight: 600; }
.sx-res { display: block; width: 100%; text-align: left; background: none; border: 0; border-radius: 8px; padding: 8px; }
.sx-res:hover, .sx-res:focus-visible { background: var(--panel); }
.sx-res b { font-size: 15px; } .sx-res span { display: block; font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.sx-res mark { background: none; color: var(--sx-gold); }
.sx-none { color: var(--ink-2); margin: 8px; font-size: 14px; }

.sx-main { padding: 22px 8px 48px 32px; min-width: 0; }
.sx-back { display: none; font-size: 17px; padding: 0; margin-bottom: 8px; }
.sx-headrow { display: flex; align-items: flex-start; gap: 16px; }
.sx-head { flex: 1; min-width: 0; }
.sx-head .tk { font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.sx-head .nm { font-size: 17px; color: var(--ink-2); margin-left: 8px; }
.sx-hl { display: inline-block; font-size: 11px; font-weight: 700; border: 1px solid currentColor; padding: 0 4px; margin-left: 6px; line-height: 16px; vertical-align: 2px; }
.sx-actions { display: flex; gap: 6px; align-items: center; padding-top: 4px; }
.sx-drill { background: var(--sx-fill); color: #fff; border: 0; border-radius: 999px; padding: 8px 16px; font-size: 15px; font-weight: 600; display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; transition: transform 160ms var(--ease-out), background-color .15s ease; }
.sx-drill:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .sx-drill:hover { background: var(--sx-fill-hover); } }
.sx-link { background: none; border: 0; color: var(--sx-blue); font-size: 14px; font-weight: 600; margin-left: auto; padding: 2px 6px; border-radius: 6px; }
.sx-quote { margin-top: 4px; display: flex; align-items: baseline; gap: 10px; min-height: 44px; flex-wrap: wrap; }
.sx-quote .px { font-size: 34px; font-weight: 600; letter-spacing: -.02em; }
.sx-quote .ch { font-size: 17px; font-weight: 600; }
.sx-quote .ch.up, .sx-close .ch.up, em.up { color: var(--sx-up); } .sx-quote .ch.down, .sx-close .ch.down, em.down { color: var(--sx-down); } .sx-quote .ch.flat { color: var(--ink-2); }
.sx-quote .when { color: var(--ink-2); font-size: 15px; }
.sx-ath { font-size: 12.5px; font-weight: 700; color: var(--sx-gold); border: 1px solid currentColor; border-radius: 6px; padding: 1px 6px; }
.sx-mkt { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 14px; margin-top: 2px; }
.sx-mkt i { width: 8px; height: 8px; border-radius: 50%; background: var(--sx-up); flex: none; }
.sx-mkt.closed i { background: #636366; }
.sx-ranges { display: flex; gap: 4px; margin: 16px 0 6px; }
.sx-ranges button { background: none; border: 0; color: var(--ink-2); font-size: 13.5px; font-weight: 600; padding: 5px 11px; border-radius: 7px; transition: background-color .15s ease, color .15s ease; }
.sx-ranges button[aria-pressed="true"] { background: var(--panel-3); color: #fff; }
.sx-chart { position: relative; height: 320px; user-select: none; touch-action: pan-y; border-radius: 8px; }
.sx-chart svg { width: 100%; height: 100%; display: block; overflow: visible; }
.sx-chart .grid { stroke: var(--panel-2); stroke-width: 1; }
.sx-chart .vgrid { stroke: var(--panel); stroke-width: 1; }
.sx-chart .axis { fill: var(--ink-2); font: 500 11.5px var(--f-sys); }
.sx-chart .prev, .sx-chart .tgt { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 1 4; stroke-linecap: round; }
.sx-chart .tgt { stroke: var(--sx-gold); stroke-dasharray: 4 4; opacity: .8; }
.sx-chart .prevlbl { fill: var(--ink-2); font: 600 10.5px var(--f-sys); }
.sx-chart .tgtlbl { fill: var(--sx-gold); font: 600 11px var(--f-sys); }
.sx-chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.sx-chart .scrub { stroke: var(--ink-2); stroke-width: 1; }
.sx-chart .dot { stroke: #000; stroke-width: 2; }
.sx-chart .span { fill: rgba(255,255,255,.08); }
.sx-chartnote { color: var(--ink-2); font-size: 12px; margin-top: 4px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sx-chartnote kbd { font-size: 10.5px; line-height: 15px; }
.sx-emptychart { min-height: 300px; display: grid; place-items: center; align-content: center; gap: 16px; text-align: center; color: var(--ink-2); font-size: 15px; border: 1px dashed var(--panel-3); border-radius: 14px; margin-top: 16px; padding: 24px; }
.sx-emptychart b { display: block; color: #fff; font-size: 17px; margin-bottom: 6px; }
.sx-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 28px; margin-top: 18px; border-top: 1px solid var(--rule); }
.sx-stats div { display: flex; justify-content: space-between; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--rule); font-size: 14px; min-width: 0; }
.sx-stats span { color: var(--ink-2); white-space: nowrap; } .sx-stats b { font-weight: 600; text-align: right; }
.sx-stats em { font-style: normal; }
.sx-main h2 { font-size: 21px; font-weight: 700; margin: 34px 0 6px; letter-spacing: -.01em; display: flex; align-items: baseline; gap: 10px; }
.sx-main h2 small { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.sx-lede { color: var(--ink-2); font-size: 14px; margin-bottom: 4px; }
.sx-term { display: grid; grid-template-columns: minmax(0, 1fr) 70px 86px; gap: 12px; align-items: start; padding: 10px 8px; border: 0; border-bottom: 1px solid var(--rule); width: 100%; text-align: left; background: none; }
@media (hover: hover) and (pointer: fine) { .sx-term:hover { background: #0E0E10; } }
.sx-term .sym { font-weight: 700; font-size: 15px; }
.sx-term .tn { font-size: 15px; margin-left: 8px; }
.sx-term .def { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--ink-2); font-size: 14.5px; line-height: 1.42; margin-top: 3px; max-width: 76ch; }
.sx-term .def.one { -webkit-line-clamp: 1; font-size: 13px; }
.sx-term[aria-expanded="true"] .def { -webkit-line-clamp: unset; display: block; color: #D1D1D6; }
.sx-term .px { text-align: right; font-weight: 500; padding-top: 1px; }
.sx-term .rt { text-align: right; }
.sx-term .rt .sx-pill { margin-top: 0; }
.sx-due { font-size: 12px; font-weight: 600; color: var(--sx-down); margin-left: 8px; }
.sx-term.lit { animation: sxFlash 1.4s var(--ease-out); }
@keyframes sxFlash { from { background: rgba(10,132,255,.28); } }
.sx-about { font-size: 16px; line-height: 1.5; max-width: 72ch; color: #E5E5EA; margin-bottom: 10px; }
.sx-dgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-top: 8px; }
.sx-dcard { background: var(--panel); border-radius: 14px; padding: 12px 14px 14px; }
.sx-dcard > b { font-size: 15px; } .sx-dcard p { color: var(--ink-2); font-size: 13.5px; margin: 3px 0 8px; line-height: 1.4; }
.sx-dcard .dg { max-width: none; }
.sx-fx { border-top: 1px solid var(--rule); }
.sx-fx div { display: grid; grid-template-columns: minmax(150px, 26ch) 1fr; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: 15px; }
.sx-fx span { color: var(--ink-2); } .sx-fx b { font-weight: 600; }
.sx-fx small { display: block; font-weight: 400; color: var(--ink-2); font-size: 13.5px; margin-top: 2px; }
.sx-news { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 8px; }
.sx-story { background: var(--panel); border-radius: 14px; padding: 14px 16px; }
.sx-story .src { font-size: 13px; font-weight: 800; letter-spacing: -.01em; }
.sx-story .src.idea { color: #E5E5EA; } .sx-story .src.trap { color: var(--sx-down); } .sx-story .src.eval { color: var(--sx-gold); }
.sx-story .src .sx-hl { color: var(--sx-gold); }
.sx-story .txt { font-size: 16px; font-weight: 600; line-height: 1.4; margin: 6px 0 0; text-wrap: pretty; }
.sx-story .wrong { color: var(--ink-2); text-decoration: line-through; text-decoration-color: var(--sx-down); font-weight: 500; font-size: 14.5px; display: block; margin-bottom: 2px; }
.sx-keys { color: var(--ink-2); font-size: 12.5px; margin-top: 36px; border-top: 1px solid var(--rule); padding-top: 12px; }
.sx-keys kbd { font-size: 10.5px; line-height: 15px; }

/* The game: exam target, movers, records */
.sx-target { margin-top: 26px; background: var(--panel); border-radius: 14px; padding: 14px 16px 16px; }
.sx-target .hd { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--ink-2); }
.sx-target .hd b { color: var(--sx-gold); font-weight: 700; }
.sx-target .bar { height: 6px; border-radius: 3px; background: var(--panel-3); margin: 12px 0 6px; overflow: hidden; }
.sx-target .bar i { display: block; height: 100%; background: var(--sx-up); border-radius: 3px; transform-origin: left; transform: scaleX(var(--p)); transition: transform .5s var(--ease-out); }
.sx-target .ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-2); }
.sx-target .ends span:nth-child(2) { color: #fff; font-weight: 600; }
.sx-target p { margin-top: 10px; font-size: 14.5px; color: #E5E5EA; max-width: 70ch; }
.sx-runnote { margin-top: 10px; color: var(--sx-gold); font-size: 14px; font-weight: 600; }
.sx-actrow { margin-top: 14px; }
.sx-recs { border-top: 1px solid var(--rule); }
.sx-rec { display: grid; grid-template-columns: minmax(0, 1fr) 180px; gap: 16px; align-items: center; padding: 10px 8px; border-bottom: 1px solid var(--rule); }
.sx-rec b { display: block; font-size: 15px; }
.sx-rec span { font-size: 13.5px; color: var(--ink-2); }
.sx-rec .rt { display: grid; gap: 5px; justify-items: end; }
.sx-rec .bar { width: 100%; height: 4px; border-radius: 2px; background: var(--panel-3); overflow: hidden; display: block; }
.sx-rec .bar i { display: block; height: 100%; background: var(--sx-blue); transform-origin: left; transform: scaleX(var(--p)); }
.sx-rec:not(.got) b { color: var(--ink-3); }
.sx-rec .got { color: var(--sx-up); font-weight: 600; }
.sx-more { margin-top: 2px; }
.sx-more > summary { color: var(--sx-blue); font-size: 14.5px; font-weight: 600; padding: 10px 8px; cursor: pointer; list-style: none; border-radius: 8px; }
.sx-more > summary::-webkit-details-marker { display: none; }
.sx-more[open] > summary { color: var(--ink-2); }

/* Flashcards in Unit 3: the card is a quote, and you make a call before you flip */
.sx-cq { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.sx-cq .tk { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.sx-cq .px { font-size: 22px; font-weight: 500; }
.sx-cq .ipo { color: var(--ink-2); font-size: 14px; }
.sx-hidden { color: var(--ink-2); letter-spacing: .1em; }
.sx-cq .sx-pill { margin-top: 0; min-width: 0; }
.sx-calls { display: flex; gap: 8px; flex-wrap: wrap; }
body[data-world="board"] .sx-calls .call { border: 0; color: #fff; font-weight: 700; }
body[data-world="board"] .sx-calls .buy { background: var(--sx-pill-up); } body[data-world="board"] .sx-calls .sell { background: var(--sx-pill-down); }
@media (hover: hover) and (pointer: fine) {
  body[data-world="board"] .sx-calls .buy:hover { background: var(--sx-buy-hover); }
  body[data-world="board"] .sx-calls .sell:hover { background: var(--sx-sell-hover); }
}
.sx-yourcall { font-size: 14.5px; color: var(--ink-2); }
.sx-tbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; align-items: center; background: var(--panel); border-radius: 14px; padding: 10px 16px; margin-bottom: 14px; max-width: 900px; font-size: 14.5px; }
.sx-tbar > div { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.sx-tbar .lbl, .sx-tbar .sess span { color: var(--ink-2); }
.sx-tbar b { font-size: 16px; }
.sx-tbar .sx-pill { margin-top: 0; min-width: 0; }
.sx-tbar .v { font-weight: 600; color: #E5E5EA; }
.sx-tbar b.up { color: var(--sx-up); } .sx-tbar b.down { color: var(--sx-down); }
.sx-tbar .px { display: inline-flex; align-items: center; gap: 6px; }
.sx-to { width: 14px; height: 9px; color: var(--ink-2); }
.sx-undo { background: none; border: 0; color: var(--sx-blue); font-weight: 600; font-size: 14px; padding: 2px 6px; border-radius: 6px; display: inline-flex; gap: 6px; align-items: center; }
.sx-undo kbd { font-size: 10.5px; line-height: 15px; }
.sx-tbar .tick { display: inline-block; animation: sxTick .5s var(--ease-out); }
@keyframes sxTick { from { opacity: 0; transform: translateY(6px); } }
.sx-close { background: var(--panel); border-radius: 16px; padding: 18px 22px 20px; margin-bottom: 16px; max-width: 900px; }
.sx-close .lbl { color: var(--ink-2); font-size: 14px; font-weight: 600; }
.sx-close .big { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 4px 0 6px; }
.sx-close .big .tk { font-size: 30px; font-weight: 700; }
.sx-close .big .px { font-size: 30px; font-weight: 600; }
.sx-close .big .ch { font-size: 18px; font-weight: 600; }
.sx-close > p { color: #E5E5EA; font-size: 15.5px; }
.sx-close h3 { font-size: 15px; margin: 16px 0 4px; }
.sx-missed { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.sx-missed li { padding: 7px 0; border-bottom: 1px solid var(--rule); font-size: 15px; }
.sx-missed b { margin-right: 8px; }
.sx-close .sx-actrow { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.sx-close .sx-link { margin-left: 0; font-size: 15px; }

/* Real-world examples: holdings that open into a memory card, and the drill's mode switch */
.sx-sub { display: flex; gap: 10px; align-items: baseline; font-size: 15px; margin: 18px 0 2px; padding: 0 8px; }
.sx-sub span { color: var(--ink-2); font-size: 13px; font-weight: 600; }
.sx-exbody { padding: 6px 8px 18px; border-bottom: 1px solid var(--rule); }
.sx-ex.lit { animation: sxFlash 1.4s var(--ease-out); }
.sx-mem { max-width: 900px; }
.sx-hook { font-size: 16px; color: #E5E5EA; max-width: 72ch; margin-top: 4px; }
body[data-world="board"] .story { font-size: 17px; margin-top: 12px; }
body[data-world="board"] .story .arr { color: var(--sx-blue); }
body[data-world="board"] .nums { border-top: 1px solid var(--rule); margin-top: 14px; }
body[data-world="board"] .nums b { font-size: 30px; font-weight: 600; letter-spacing: -.02em; }
body[data-world="board"] .but h3 { color: var(--sx-down); letter-spacing: .02em; text-transform: none; font-size: 14px; }
.sx-use { margin-top: 12px; font-size: 15px; color: var(--ink-2); }
.sx-use b { color: #fff; font-weight: 600; margin-right: 6px; }
.sx-score { margin-top: 12px; font-size: 13px; color: var(--ink-2); }
.sx-score b { color: #fff; }
body[data-world="board"] .cols h4 { letter-spacing: .02em; text-transform: none; font-size: 14px; color: #fff; }
body[data-world="board"] .tag { border-radius: 6px; border-color: var(--rule-2); }
body[data-world="board"] .sources a { color: var(--sx-blue); }
body[data-world="board"] .num-hl { background: var(--panel-3); border-radius: 4px; padding: 0 4px; }
body[data-world="board"] .cloze input { border-radius: 8px 8px 0 0; border-bottom-color: var(--sx-blue); }
body[data-world="board"] .opt { border-radius: 12px; border-color: var(--rule-2); }
body[data-world="board"] .opt.right { border-color: var(--sx-up); } body[data-world="board"] .opt.wrong { border-color: var(--sx-down); }
.sx-seg { display: inline-flex; background: var(--panel); border-radius: 9px; padding: 2px; margin-bottom: 16px; }
.sx-seg button { background: none; border: 0; border-radius: 7px; padding: 6px 14px; font: 600 14px var(--f-sys); color: var(--ink-2); transition: background-color .15s ease, color .15s ease; }
.sx-seg button[aria-selected="true"] { background: var(--panel-3); color: #fff; }
@media (hover: hover) and (pointer: fine) { .sx-seg button[aria-selected="false"]:hover { color: #fff; } }
#view-rwe .flash { max-width: 900px; }
#view-rwe .flash:focus, #view-rwe .quiz:focus { outline: none; }
.sx-seg kbd { font-size: 10px; line-height: 14px; margin-left: 4px; opacity: .8; }
.sx-mem p, .sx-about, .sx-target p { text-wrap: pretty; }
/* Recall in the examples drill: tick what you got, and TEU suggests the grade */
.sx-checks { display: grid; border-top: 1px solid var(--rule); }
.sx-tickrow { display: grid; grid-template-columns: 30px 22px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.sx-tick { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--ink-2); background: none; display: grid; place-items: center; color: transparent; padding: 0; transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
.sx-tick svg { width: 14px; height: 14px; }
.sx-tickrow.on .sx-tick { background: var(--sx-pill-up); border-color: var(--sx-pill-up); color: #fff; }
.sx-tickrow > kbd { margin-top: 4px; font-size: 10.5px; line-height: 15px; }
.sx-tickrow .body > b { display: block; font-size: 14px; color: var(--ink-2); font-weight: 600; }
.sx-tickrow .body > b.fig { font-size: 26px; color: #fff; letter-spacing: -.02em; line-height: 1.15; }
.sx-tickrow .body .w { color: var(--ink-2); font-size: 14px; }
.sx-tickrow .body .story { margin-top: 2px; }
.sx-tickrow .body p { margin-top: 2px; }
.sx-suggest { font-size: 14.5px; color: var(--ink-2); }
.sx-suggest b { color: #fff; }
body[data-world="board"] .grades .btn[data-hint] { outline: 2px solid var(--sx-blue); outline-offset: 2px; }
.sx-batch { background: var(--panel); border-radius: 14px; padding: 16px 20px; max-width: 900px; display: grid; gap: 12px; justify-items: start; }
.sx-batch p { color: #E5E5EA; }
body[data-world="board"] .feedback { border-top: 0; padding: 6px 0 2px; }
body[data-world="board"] .feedback.ok > b { color: var(--sx-up); } body[data-world="board"] .feedback.no > b { color: var(--sx-down); }
body[data-world="board"] .feedback .story { font-size: 15px; margin-top: 8px; }

/* Record toasts: a notification banner, top right */
.sx-toasts { position: fixed; bottom: calc(16px + env(safe-area-inset-bottom)); right: 16px; z-index: 60; display: grid; gap: 8px; width: min(340px, calc(100vw - 32px)); pointer-events: none; }
.sx-toast { background: rgba(44,44,46,.97); color: #fff; border-radius: 14px; padding: 12px 14px; border: 1px solid #48484A; display: grid; gap: 1px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; opacity: 0; transform: translateY(8px); transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out); }
.sx-toast.in { opacity: 1; transform: none; }
.sx-toast .k { font-size: 12px; font-weight: 600; color: var(--sx-gold, #FFD60A); }
.sx-toast b { font-size: 15px; }
.sx-toast span:last-child { font-size: 13.5px; color: #AEAEB2; }

@media (max-width: 1100px) { .sx-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .sx-side { top: 0; max-height: none; position: static; } }
@media (max-width: 820px) {
  .stx { grid-template-columns: minmax(0, 1fr); margin: 0; min-height: 0; }
  .stx[data-pane="detail"] .sx-side, .stx[data-pane="list"] .sx-main { display: none; }
  .sx-side { border-right: 0; padding-right: 0; }
  .sx-main { padding: 12px 0 40px; }
  .sx-back { display: inline-flex; }
  .sx-headrow { flex-wrap: wrap; gap: 8px; }
  .sx-head { flex-basis: 100%; }
  .sx-head .nm { display: block; margin: 2px 0 0; font-size: 15px; }
  .sx-chart { height: 240px; }
  .sx-term { grid-template-columns: minmax(0, 1fr) 58px 78px; gap: 8px; }
  .sx-rec { grid-template-columns: minmax(0, 1fr) 110px; }
  .sx-fx div { grid-template-columns: 1fr; gap: 2px; }
  .sx-keys { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .sx-term.lit, .sx-tbar .tick { animation: none; }
  .sx-toast { transform: none; }
  .sx-menu, .sx-pop, .sx-target .bar i { transition-duration: .01ms; }
}
