:root {
  color-scheme: dark;
  --base: #0d0d0d;
  --stage: #111111;
  --surface: #171717;
  --raised: #1e1e1e;
  --line: #2b2b2b;
  --text: #f5f3ef;
  --muted: #aeaaa5;
  --red: #ed665f;
  --red-strong: #e24b42;
  --red-dim: #44201f;
  --gutter: clamp(16px, 4vw, 50px);
  font: 15px/1.5 'Segoe UI', Arial, sans-serif;
  background: var(--base);
  color: var(--text);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 0; }
button, input, select { font: inherit; }
button { color: inherit; cursor: pointer; }
a { color: inherit; }
:where(button,a,summary,select) { -webkit-tap-highlight-color:rgb(237 102 95 / 20%); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
.studio { max-width: 1260px; margin: auto; padding: 0 clamp(10px, 2.5vw, 30px) 24px; }
.studio-bar, .studio-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 2px; }
.studio-name { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font: 600 11px/1.2 Consolas, monospace; letter-spacing: .12em; text-transform: uppercase; }
.studio-name b { color: var(--text); }
.studio-divider { display: inline-block; height: 11px; width: 1px; background: var(--line); }
.studio-bar nav, .variant-switch { display: flex; flex-wrap: wrap; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 8px; }
.studio-bar button, .variant-switch button { background: transparent; border: 0; border-radius: 5px; color: var(--muted); padding: 6px 11px; min-height: 34px; font-size: 12px; font-weight: 600; }
.studio-bar button[aria-pressed="true"], .variant-switch button[aria-pressed="true"] { background: var(--raised); color: var(--text); }
.studio-controls { justify-content: flex-end; flex-wrap: wrap; color: var(--muted); font-size: 12px; }
.app-shell { position: relative; overflow: clip; background: var(--stage); border: 1px solid var(--line); border-radius: 18px; }
.app-bar { position: sticky; top: 0; z-index: 3; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 var(--gutter); min-height: 67px; background: var(--stage); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; padding: 0; border: 0; background: transparent; font-size: 15px; font-weight: 800; letter-spacing: .025em; min-height: 44px; white-space: nowrap; }
.brand strong { color: var(--muted); font-size: 12px; font-weight: 600; }
.brand-mark { display: inline-block; width: 18px; height: 20px; background: var(--red); clip-path: polygon(0 0,100% 0,100% 23%,30% 23%,30% 40%,78% 40%,78% 64%,30% 64%,30% 100%,0 100%); }
#app-nav { display: flex; align-self: stretch; gap: 25px; }
.nav-button { position: relative; border: 0; background: transparent; color: var(--muted); padding: 0 3px; font-size: 13px; min-height: 44px; white-space: nowrap; }
.nav-button[aria-current] { color: var(--text); }
.nav-button[aria-current]::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px; background: var(--red); }
.access-tag { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.access-tag::before { content: ''; background: var(--red); border-radius: 100%; width: 6px; height: 6px; }
.app-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; padding: 16px var(--gutter); border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
#screen { outline: 0; min-height: 400px; }
#mobile-nav { display: none; }
.hero { position: relative; display: grid; grid-template-columns: 1.12fr 1fr; min-height: 416px; background: #131313; isolation: isolate; overflow: clip; }
.hero-with-coin { overflow: visible; }
.hero-with-coin ~ .flow-section { position: relative; isolation: isolate; }
.hero-with-coin + #library .module-card:not(:hover) { background: rgb(28 28 28 / 55%); }
.hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #28282833 1px, transparent 1px), linear-gradient(#28282833 1px, transparent 1px); background-size: 56px 56px; mask-image: linear-gradient(90deg, transparent 15%, #000 72%); z-index: -1; }
.hero-copy { z-index: 1; align-self: center; padding: 44px 0 52px var(--gutter); }
.eyebrow { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; color: var(--muted); font: 600 11px/1.2 Consolas, monospace; text-transform: uppercase; letter-spacing: .13em; }
.eyebrow::before { content: ''; width: 20px; height: 2px; background: var(--red); }
.hero h1 { font-size: clamp(42px, 6.45vw, 84px); line-height: .95; letter-spacing: -.069em; margin: 20px 0 18px; font-weight: 740; }
.hero h1 span { color: var(--red); }
.hero-copy > p:not(.eyebrow) { max-width: 33ch; color: var(--muted); font-size: 15px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 24px; }
.button { display: inline-flex; min-height: 44px; max-width: 100%; justify-content: center; align-items: center; gap: 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--text); padding: 9px 14px; font-size: 14px; font-weight: 650; text-decoration: none; text-align: center; }
.button:hover { filter: brightness(1.16); }
.primary { background: var(--red); color: #1a1010; border-color: var(--red); }
.ghost { background: transparent; }
.block { width: 100%; }
.focus-icon { position:relative; display:inline-block; width:1em; height:1em; flex:none; vertical-align:-.13em; transform:rotate(var(--icon-turn,0deg)); }
.focus-icon::before,.focus-icon::after { content:""; position:absolute; box-sizing:border-box; }
.focus-icon:is([data-icon^="arrow-"],[data-icon="plus"],[data-icon="close"])::before {
  inset-inline:13%; top:calc(50% - .7px); height:1.4px; background:currentColor; border-radius:1px;
}
.focus-icon:is([data-icon^="arrow-"],[data-icon="chevron"])::after {
  width:43%; height:43%; top:50%; right:15%; border:solid currentColor;
  border-width:1.4px 1.4px 0 0; border-radius:0 1px 0 0; transform:translateY(-50%) rotate(45deg);
}
.focus-icon[data-icon="chevron"]::after { right:34%; }
.focus-icon[data-icon="arrow-out"] { --icon-turn:-45deg; }
.focus-icon[data-icon="arrow-down"] { --icon-turn:90deg; }
.focus-icon:is([data-icon="plus"],[data-icon="close"])::after {
  inset-block:13%; left:calc(50% - .7px); width:1.4px; background:currentColor; border-radius:1px;
}
.focus-icon[data-icon="close"] { --icon-turn:45deg; }
.focus-icon[data-icon="play"]::before { inset:13% 5% 13% 22%; background:currentColor; clip-path:polygon(0 0,100% 50%,0 100%); }
.focus-icon[data-icon="pause"]::before,.focus-icon[data-icon="pause"]::after {
  inset-block:14%; width:14%; background:currentColor; border-radius:1px;
}
.focus-icon[data-icon="pause"]::before { left:27%; }
.focus-icon[data-icon="pause"]::after { right:27%; }
.art-panel { position: relative; align-self: stretch; min-width: 0; min-height: 335px; margin: 0 12px 0 0; }
.coin-layer {
  position: absolute; inset: 0; pointer-events: none; user-select: none; will-change: opacity, transform;
  container-type: size;
}
.coin-layer::before {
  content:""; position:absolute; left:58%; top:53%; width:92%; height:94%; transform:translate(-50%,-50%); pointer-events:none;
  opacity:var(--glow-strength,1);
  background: radial-gradient(ellipse closest-side,
    rgb(142 35 45 / 61%), rgb(109 30 40 / 37%) 46%, transparent 100%);
}
.art-panel canvas { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
.coin-surface { position:absolute; inset:0; }
@media (prefers-reduced-motion: no-preference) {
  .coin-surface { transition: opacity 90ms linear, filter 90ms linear; }
}
.art-panel.art-still .coin-layer canvas { visibility: hidden; }
.art-loop { position: absolute; inset: 0; margin: auto; width: min(100cqw, 100cqh); height: auto; aspect-ratio: 1;
  mask-image: radial-gradient(closest-side, #000 85%, transparent); }
.art-poster { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
@media (pointer: coarse) {
  .coin-layer { color-scheme: only dark; --coin-tone:grayscale(1); }
  [data-theme="light"] .coin-layer { color-scheme: only light; }
  /* Keep the metal neutral after WebGL or video compositing; the backlight stays red. */
  .coin-layer :is(canvas,.art-loop,.art-poster) { filter:var(--coin-tone); }
  .coin-layer .art-loop { filter:var(--coin-tone) contrast(1.08); mask-image:radial-gradient(ellipse 38% 51% at 50% 51%, #000 84%, transparent); }
}
.art-poster-turn { --poster-cycle:17.46s; }
.art-poster-turn .art-poster { animation:poster-turn var(--poster-cycle) linear infinite; }
.art-poster-turn .coin-layer::after {
  content:""; position:absolute; width:37%; height:7%; left:30%; top:83%; border-radius:50%;
  background:#0008; filter:blur(5px); animation:poster-shadow var(--poster-cycle) linear infinite;
}
.art-motion-paused .art-poster,.art-motion-paused .coin-layer::after { animation-play-state:paused; }
@media (prefers-reduced-motion: reduce) { .art-poster-turn { --poster-cycle:27s; } }
@keyframes poster-turn {
  0%,50%,100% { transform:scaleX(1); filter:var(--coin-tone,brightness(1)) brightness(1.08); }
  12.5%,37.5%,62.5%,87.5% { transform:scaleX(.7); filter:var(--coin-tone,brightness(1)) brightness(1.21); }
  25%,75% { transform:scaleX(.09); filter:var(--coin-tone,brightness(1)) brightness(.95); }
}
@keyframes poster-shadow {
  0%,50%,100% { transform:scaleX(1) rotate(4deg); }
  25%,75% { transform:scaleX(.26) rotate(-7deg); }
}
.art-controls { position: absolute; right: 20px; bottom: 21px; display: flex; gap: 8px; align-items: center; }
.art-controls .button { width: 44px; border-radius: 50%; padding: 0; font-size: 13px; background: #171717d9; color: var(--muted); }
/* Fractured metal and the five bilingual labels share one responsive stage. */
.coin-meaning, .coin-hit-window { position:absolute; inset:0; container-type:size; pointer-events:none; }
.coin-meaning { z-index:1; overflow:visible; user-select:none; transform:translate3d(var(--coin-travel-x,0px),var(--coin-travel-y,0px),0); }
.coin-meaning .fracture-stage {
  inset:calc(0px - var(--burst-bleed,0px)) auto auto calc(0px - var(--burst-bleed,0px));
  width:calc(100% + 2 * var(--burst-bleed,0px)); height:calc(100% + 2 * var(--burst-bleed,0px));
}
.coin-hit-window { z-index:2; overflow:clip; }
.coin-hit {
  position:absolute; left:50%; top:50%; width:66%; height:66%; padding:0; border:0; background:transparent;
  border-radius:50%; cursor:pointer; pointer-events:auto; touch-action:pan-y pinch-zoom;
  transform:translate(-50%,-50%) translate(var(--coin-travel-x,0px),var(--coin-travel-y,0px));
}
.meaning-open .coin-hit { inset:0 2% 9%; width:auto; height:auto; transform:none; border-radius:12px; }
.coin-out-of-reach .coin-hit { pointer-events:none; }
.coin-meaning ol { position:absolute; inset:0; list-style:none; margin:0; padding:0; }
.coin-meaning li { position:absolute; display:grid; gap:3px; width:max-content; color:#f6f0eb; transform:translateY(-50%); }
.coin-meaning li span { font:650 clamp(18px,5.2cqw,34px)/.98 'Segoe UI',Arial,sans-serif; letter-spacing:-.055em; }
.coin-meaning li b { color:#f28178; font-weight:inherit; }
.coin-meaning li small { font:450 clamp(11px,2.7cqw,15px)/1.14 'Segoe UI',Arial,sans-serif; color:#c5b9b4; letter-spacing:.005em; }
.art-panel .coin-layer :is(canvas,.art-poster,.art-loop) { opacity:var(--coin-body-alpha,1); }
.meaning-open .coin-layer::before { opacity:.44; }
.art-controls { z-index:3; }
.meaning-active .coin-meaning,.meaning-active .coin-layer { transform:none !important; }
@media(max-width:680px){
  .art-panel.meaning-active { height:clamp(320px,92vw,420px); }
}
.viewer-controls { gap:8px; }
.coin-meaning-button {
  min-height:44px; padding:7px 14px; border:1px solid #53413e; border-radius:24px;
  background:#1b1817ed; color:#e2d9d3; font:600 12px/1.2 'Segoe UI',Arial,sans-serif;
}
.coin-meaning-button:hover,.coin-meaning-button[aria-expanded=true] { border-color:#9a5751; }
.chart-panel { display: grid; align-self: center; gap: 11px; margin: 24px var(--gutter) 24px 12px; padding: 15px; min-width: 0; border: 1px solid var(--line); border-radius: 10px; background: #151515; }
.chart-panel img, .chapter-chart { display: block; width: 100%; height: auto; }
.chart-panel .note { font: 600 11px/1.2 Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; }
.section { padding: 28px var(--gutter); }
.section + .section, .home-lessons { border-top: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.section-head h2 { font-size: clamp(22px, 3vw, 31px); line-height: 1.1; letter-spacing: -.03em; }
.section-head p { color: var(--muted); font-size: 13px; }
.module-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.module-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; width: 100%; min-height: 126px; padding: 13px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.module-card:hover { background: var(--raised); border-color: #5a3734; }
.module-number { color: var(--red); font: 600 11px/1.15 Consolas, monospace; letter-spacing: .08em; margin-bottom: 10px; }
.module-card strong { display: block; line-height: 1.25; margin-bottom: 10px; }
.module-card small { color: var(--muted); margin-top: auto; font-size: 12px; }
.module-arrow { color: var(--muted); position: absolute; top: 8px; right: 10px; }
.page-padding { padding: clamp(20px, 4vw, 40px) var(--gutter); }
.page-head { display: grid; gap: 8px; margin-bottom: 24px; }
.page-head h1, .page-head h2 { font-size: clamp(29px, 5.5vw, 56px); letter-spacing: -.047em; line-height: 1.02; }
.flow-section { border-top: 1px solid var(--line); scroll-margin-top: 67px; }
#home:focus, .flow-section:focus { outline: 0; }
.program { margin-top: 15px; border-block: 1px solid var(--line); }
.program summary { cursor: pointer; padding: 15px 1px; display: flex; align-items: center; gap: 12px; font-weight: 650; line-height: 1.3; }
.program summary::-webkit-details-marker { display: none; }
.program summary small { margin-left: auto; font-size: 12px; font-weight: 400; white-space: nowrap; color: var(--muted); }
.program summary .focus-icon { color:var(--red); }
.program[open] summary .focus-icon::after { opacity:0; }
.program summary:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.page-head p:not(.eyebrow) { color: var(--muted); max-width: 65ch; }
.page-head .button { justify-self: start; }
.panel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.panel { display: grid; align-content: start; gap: 12px; padding: clamp(14px, 2.5vw, 25px); background: var(--surface); border: 1px solid var(--line); border-radius: 11px; min-width: 0; }
.panel h2 { font-size: 21px; letter-spacing: -.025em; }
.panel p { max-width: 70ch; }
.note { color: var(--muted); font-size: 13px; }
.module-list, .table-list { border-top: 1px solid var(--line); }
.module-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 8px; background: transparent; width: 100%; padding: 10px 3px; margin: 0; color: var(--text); text-align: left; border: 0; border-bottom: 1px solid var(--line); min-height: 52px; }
.module-row:hover { background: var(--raised); }
.module-row .module-number { margin: 0; }
.module-row small { color: var(--muted); white-space: nowrap; font-size: 11px; }
.module-row strong { font-size: 14px; line-height: 1.25; }
.table-line { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.table-line span { overflow-wrap: anywhere; }
.tag { display: inline-block; color: var(--text); border: 1px solid #5b3331; background: #281a19; border-radius: 4px; padding: 3px 7px; font-size: 11px; }
.payment-title { color: var(--text); font-size: clamp(25px, 5vw, 40px); letter-spacing: -.04em; line-height: 1.1; }
.payment-price { font-size: 30px; font-weight: 740; font-variant-numeric: tabular-nums; line-height: 1; }
.feature-list { display: grid; gap: 8px; margin: 2px 0; }
.feature-list li { display: grid; grid-template-columns: 16px 1fr; gap: 7px; }
.feature-list li::before { content: '+'; color: var(--red); font-family: Consolas, monospace; }
.field { display: grid; gap: 5px; color: var(--muted); font-size: 13px; }
.field input, .field select { width: 100%; min-height: 44px; background: var(--stage); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; font-size: 16px; }
form { display: grid; gap: 10px; }
.code { display: block; background: #101010; border: 1px solid var(--line); padding: 8px; border-radius: 4px; overflow-wrap: anywhere; color: var(--red); }
.dialog { padding: 0; width: min(450px, calc(100% - 24px)); color: var(--text); border: 1px solid #48403e; border-radius: 13px; background: var(--surface); }
.dialog::backdrop { background: #000b; }
.dialog-inner { display: grid; gap: 14px; padding: 22px; }
.dialog-close { justify-self: end; }
.notice { position: fixed; z-index: 5; bottom: 18px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 28px); padding: 11px 14px; background: #291b1a; border: 1px solid #6d3936; color: var(--text); border-radius: 7px; box-shadow: 0 8px 30px #0006; font-size: 13px; }
.notice:empty { display: none; }
.store-canvas { background: #151414; }
.chat-sample { border-left: 2px solid var(--red); padding-left: 12px; }

.feed-links { display:flex; flex-wrap:wrap; gap:8px 20px; margin-top:12px; }
.feed-links .button { padding:3px 0; border:0; color:#d3cec8; font-size:13px; font-weight:550; }
.feed-links .button:hover { color:var(--red); }
.feed-section { padding:clamp(38px,5vw,70px) var(--gutter); }
.feed-title { max-width:22ch; margin:13px 0 18px; font-size:clamp(32px,4.8vw,58px); font-weight:680; line-height:1.03; letter-spacing:-.056em; text-wrap:balance; }
.feed-intro { max-width:71ch; margin-bottom:26px; color:var(--muted); line-height:1.58; }
.outcome-layout { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,.93fr); gap:clamp(24px,5.7vw,78px); align-items:stretch; }
.outcome-list { margin:26px 0 0; }
.outcome-list dt { border-top:1px solid var(--line); padding-top:13px; margin-top:15px; color:var(--text); font-size:clamp(17px,1.7vw,21px); line-height:1.25; font-weight:630; letter-spacing:-.025em; }
.outcome-list dd { margin:5px 0 0; max-width:54ch; color:var(--muted); line-height:1.5; }
.outcome-chart { display:block; width:100%; height:auto; align-self:center; }
.practice-section { background:#141413; }
.practice-panel { background:#191918; border:1px solid #393735; border-radius:14px; overflow:hidden; }
.hero-with-coin ~ .practice-section { background: rgb(23 23 21 / 50%); }
.hero-with-coin ~ .practice-section .practice-panel { background: rgb(30 30 29 / 50%); }
.plot-heading,.plot-meta { display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap; gap:4px 10px; }
.plot-heading { padding:17px clamp(12px,2.4vw,28px) 5px; }
.plot-heading strong,.quote-head strong { font-size:18px; letter-spacing:-.035em; }
.plot-heading strong span,.quote-head strong span { color:var(--muted); font-weight:450; font-size:.72em; }
.plot-heading > span,.plot-meta,.case-fact small,.quote-head small,.quote-extremes { font:12px/1.4 Consolas,monospace; color:#aaa6a0; }
.plot-meta { padding:3px clamp(12px,2.4vw,28px) 14px; }
.practice-plot { position:relative; margin:0 clamp(7px,1.6vw,20px); height:clamp(220px,26vw,310px); }
.practice-plot canvas { display:block; width:100%; height:100%; }
.practice-plot .plot-pin { z-index:2; }
.plot-pin.is-future span { background:#242422; color:#b3aea8; border-color:#635f5b; }
.plot-tag { position:absolute; z-index:1; pointer-events:none; white-space:nowrap; padding:3px 6px; border:1px solid #555451; border-radius:4px; background:#242423; color:#bab7b1; font:600 11px/1.25 var(--ui-font,system-ui),sans-serif; }
.plot-tag[hidden] { display:none; }
.plot-tag.is-current { color:#ffd3c9; border-color:#ae695f; background:#382624; box-shadow:0 0 9px #d56d561c; }
@media(max-width:550px){ .practice-plot { height:292px; } .plot-tag { font-size:10px; padding:3px 4px; } }
.plot-pin { display:grid; place-items:center; position:absolute; width:44px; height:44px; transform:translate(-50%,-50%); padding:0; border:0; border-radius:50%; background:transparent; }
.plot-pin span { display:grid; place-items:center; width:26px; height:26px; border:1px solid #a59d95; border-radius:50%; background:#282725; color:#f7f2ec; font:650 12px/1 Consolas,monospace; }
.plot-pin[aria-pressed=true] span { background:var(--red); border-color:var(--red); color:#23110f; box-shadow:0 0 0 4px #ed665f25; }
.case-selector { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); border-block:1px solid #373532; }
.case-selector button { display:flex; align-items:center; gap:9px; min-height:52px; background:#151514; border:0; border-right:1px solid var(--line); padding:9px clamp(8px,1.5vw,18px); text-align:left; font-weight:600; font-size:14px; }
.case-selector button:last-child { border-right:0; }
.case-selector small { color:var(--muted); font:12px/1 Consolas,monospace; }
.case-selector [aria-pressed=true] { background:#2b2220; box-shadow:inset 0 -2px var(--red); }
.case-selector [aria-pressed=true] small,.case-fact small { color:#f18a80; }
.case-selector button:focus-visible { outline-offset:-3px; }
.case-notes { display:grid; grid-template-columns:1.1fr 1fr; gap:clamp(20px,4vw,50px); padding:clamp(18px,3vw,30px); min-height:182px; }
.case-notes h3 { font-size:clamp(21px,2.5vw,29px); letter-spacing:-.04em; line-height:1.16; margin:5px 0 9px; }
.case-notes p { color:#c1bcb5; font-size:15px; line-height:1.52; }
.case-next { align-self:center; border-left:2px solid #82524b; padding-left:17px; }
.case-next strong { font-weight:600; }
.case-next p { margin-top:4px; }
.markets-head { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:8px 14px; }
.market-refresh span { font-size:19px; line-height:1; }
.market-refresh:disabled { opacity:.55; cursor:progress; }
.pulse-grid { display:grid; grid-template-columns:minmax(205px,.7fr) minmax(300px,1.3fr); gap:12px; margin:24px 0 14px; }
.pulse-card,.event-board { border:1px solid var(--line); border-radius:12px; background:linear-gradient(125deg,#201c1b,#171717 60%); padding:clamp(16px,3vw,29px); }
.market-kicker,.pulse-foot,.meter-ends,.liq-tape time,.news-meta { color:var(--muted); font-size:12px; }
.pulse-card h3 { font-size:clamp(19px,2.4vw,26px); margin:4px 0 10px; letter-spacing:-.04em; }
.sentiment-value { display:flex; align-items:baseline; gap:8px; margin-top:14px; color:var(--muted); }
.sentiment-value strong { font-size:42px; line-height:1; color:var(--text); letter-spacing:-.06em; }
.sentiment-label { display:block; margin-top:8px; color:#e4b2a3; }
.sentiment-meter { height:5px; background:linear-gradient(90deg,#b35b55,#817571,#b8b4aa); border-radius:3px; margin:16px 5px 6px; position:relative; }
.sentiment-meter i { position:absolute; top:50%; width:9px;height:9px;background:#faf3e9; border-radius:50%;transform:translate(-50%,-50%);box-shadow:0 0 0 2px #242120; }
.meter-ends,.news-meta { display:flex; justify-content:space-between; gap:8px; }
.pulse-foot { margin-top:14px; }
.liq-intro,.news-page p { color:var(--muted); }
.liq-tape { margin-top:14px; }
.liq-tape li { display:flex; flex-wrap:wrap; align-items:baseline; gap:8px; padding:9px 0;border-top:1px solid var(--line); font-size:13px; }
.liq-tape strong { margin-left:auto; }
.liq-empty { color:var(--muted); }
.news-page { max-width:1060px; margin:auto; padding-bottom:52px; }
.news-selected { padding:20px; margin-block:12px 24px; border:1px solid var(--line); border-inline-start:3px solid var(--red); border-radius:8px; background:var(--surface); }
.news-selected h2 { margin-block:10px; }
.news-selected-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:16px; }
.news-page h2 { font-size:clamp(22px,3.1vw,31px); letter-spacing:-.045em; }
.news-page h3 { font-size:clamp(16px,2.2vw,21px); line-height:1.22; letter-spacing:-.025em; }
.news-page ol { list-style:none; margin:0; padding:0; }
.event-list li { display:grid; grid-template-columns:minmax(76px,15%) 1fr; gap:18px; margin-top:11px; padding-top:11px; border-top:1px solid #39312e; }
.event-list time { display:grid; align-content:start; color:#f18b7c; }
.event-list time span,.event-list small { font-size:12px; color:var(--muted); }
.event-list p,.news-digest p { margin-top:5px; max-width:76ch; font-size:14px; }
.news-digest { margin-top:28px; }
.news-digest li { padding:15px 0 18px; border-top:1px solid var(--line); }
.news-digest ol { margin-top:10px; }
.news-meta { justify-content:flex-start; align-items:center; gap:14px; margin-bottom:7px; }
.news-meta b { color:#ed9085; font-size:11px; }
.event-board summary { margin-top:14px; cursor:pointer; color:var(--text); font-weight:600; }
@media(max-width:700px){.pulse-grid{grid-template-columns:1fr;} #mobile-nav:not(:empty){justify-content:flex-start;overflow-x:auto;scrollbar-width:thin;} #mobile-nav .nav-button{flex:1 0 auto;padding-inline:7px;} }
@media(max-width:480px){.event-list li{grid-template-columns:65px 1fr;gap:10px;} .event-list p{font-size:13px;}}
.news-page .news-impact { min-width:0; border-left:1px solid #55413d; padding-left:16px; align-self:start; }
.news-impact small { display:block; color:#aba49b; font-size:11px; font-weight:500; line-height:1.4; }
.news-impact .impact-tone { display:block; margin-top:3px; font-size:14px; line-height:1.3; }
.news-impact .tone-positive,.impact-pair .move-up { color:#b2cebc; }
.news-impact .tone-negative,.impact-pair .move-down { color:#f09389; }
.news-impact .tone-mixed { color:#d8c19f; }
.news-page .news-impact p { margin-top:4px; font-size:13px; line-height:1.45; }
.news-impact .impact-fact { border-top:1px solid #3c3935; margin-top:10px; padding-top:8px; }
.impact-pair { display:inline-block; font:12px/1.6 Consolas,monospace; margin:3px 10px 0 0; white-space:nowrap; }
.impact-pair b { font-weight:700; }
.impact-window { display:block; color:#ada79f; font-size:11px; line-height:1.45; }
.news-page .impact-note { margin-top:8px; max-width:82ch; font-size:13px; }
@media(min-width:741px){
  .event-list li { grid-template-columns:85px minmax(0,1fr) minmax(225px,33%); padding-block:15px 4px; }
  .news-digest li { display:grid; grid-template-columns:minmax(0,1fr) minmax(225px,33%); gap:26px; padding-block:19px; }
}
@media(max-width:740px){
  .event-list .news-impact { grid-column:2; }
  .news-page .news-impact { padding-left:11px; }
  .news-digest .news-impact { margin-top:12px; }
}
.quote-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.quote-card { padding:clamp(16px,2.5vw,28px); border:1px solid #363431; background:linear-gradient(135deg,#1e1e1c,#181817); border-radius:10px; }
.quote-head,.quote-extremes,.quote-footer { display:flex; justify-content:space-between; align-items:baseline; flex-wrap:wrap; gap:4px 10px; }
.quote-value { margin-top:18px; color:var(--text); font-size:clamp(29px,3.65vw,46px); letter-spacing:-.055em; line-height:1.12; font-weight:640; font-variant-numeric:tabular-nums; }
.quote-change { margin-top:5px; color:var(--text); font-size:13px; font-variant-numeric:tabular-nums; }
.quote-change.negative { color:#f48c82; }
.quote-track { position:relative; height:3px; border-radius:4px; background:#514c48; margin:23px 4px 8px; }
.quote-track i { position:absolute; top:50%; width:8px; height:8px; transform:translate(-50%,-50%); border-radius:100%; background:#f1eae1; box-shadow:0 0 0 3px #292723; }
.quote-extremes { font-size:11px; }
.quote-footer { margin-top:14px; color:var(--muted); font-size:12px; }
.quote-online::before { display:inline-block; content:''; margin-right:6px; width:6px; height:6px; border-radius:50%; background:#c8c2b9; }
.course-path { gap:0; }
.course-path h3 { font-size:21px; letter-spacing:-.025em; margin-bottom:7px; }
.course-path button { display:grid; grid-template-columns:23px 1fr auto; gap:8px; align-items:center; min-height:44px; padding:6px 0; text-align:left; background:none; border:0; border-top:1px solid var(--line); }
.course-path small { color:var(--red); font:12px Consolas,monospace; }
.course-path button strong { font-weight:550; }
.course-path button span { color:var(--muted); }
@media(max-width:760px) {
  .outcome-layout { grid-template-columns:1fr; }
  .outcome-chart { max-width:560px; justify-self:center; }
  .case-notes { grid-template-columns:1fr; gap:17px; min-height:0; }
  .quote-grid { grid-template-columns:1fr; gap:9px; }
  .quote-card { display:grid; grid-template-columns:1fr minmax(95px,.65fr); column-gap:20px; }
  .quote-head { grid-column:1/-1; }
  .quote-value { grid-row:2; grid-column:1; margin-top:11px; }
  .quote-change { grid-row:3; grid-column:1; }
  .quote-track { grid-row:2; grid-column:2; align-self:end; margin:0 4px 7px; }
  .quote-extremes { grid-row:3; grid-column:2; margin-top:6px; gap:2px 4px; }
}
@media(max-width:590px) {
  .case-selector { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .case-selector button { min-height:45px; gap:6px; font-size:13px; }
  .case-selector button:nth-child(-n+2) { border-bottom:1px solid var(--line); }
  .case-selector button:nth-child(2) { border-right:0; }
  .markets-head { align-items:end; margin-bottom:12px; }
  .markets-head .feed-title { margin-bottom:0; }
  .market-refresh { padding:7px 10px; font-size:12px; }
}
@media(max-width:360px) {
  .quote-card { column-gap:9px; padding:13px; }
  .quote-extremes { font-size:10px; }
  .feed-links { column-gap:14px; }
}
@media(max-width:450px) {
  .quote-card { grid-template-columns:minmax(0,1fr) auto; }
  .quote-change { grid-row:2; grid-column:2; align-self:end; margin:0 0 3px; }
  .quote-track { grid-column:1/-1; grid-row:3; margin:18px 4px 7px; }
  .quote-extremes { grid-column:1/-1; grid-row:4; margin:0; }
}

@media (max-width: 850px) { .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } #app-nav { gap: 13px; } }
@media (max-width: 680px) {
  .studio-bar { flex-wrap: wrap; }
  .studio-bar nav { max-width: 100%; }
  .studio-bar button, .variant-switch button { min-height: 39px; }
  .app-bar { position: relative; min-height: 55px; }
  #app-nav { display: none; }
  #mobile-nav:not(:empty) { display: flex; position: sticky; top: 0; z-index: 3; justify-content: space-around; padding: 0 4px; background: var(--stage); border-bottom: 1px solid var(--line); }
  .flow-section { scroll-margin-top: 45px; }
  #mobile-nav .nav-button { flex: 1; }
  .hero { grid-template-columns: 1fr; }
  .hero::before { mask-image: linear-gradient(transparent 15%, #000 75%); }
  .hero-copy { padding: 27px var(--gutter) 0; }
  .hero h1 { margin: 15px 0 12px; font-size: clamp(42px, 10vw, 66px); }
  .hero-actions { margin-top: 16px; }
  .art-panel { width: 100%; height: clamp(235px, 67vw, 310px); min-height: 0; margin: 0; }
  .art-controls { right: 12px; bottom: 10px; }
  .chart-panel { margin: 16px var(--gutter) 21px; }
  .panel-grid { grid-template-columns: 1fr; }
  .module-card { min-height: 112px; padding: 11px; }
  .app-footer { font-size: 11px; }
}
@media (max-width: 390px) { .studio { padding-inline: 7px; } .studio-controls { justify-content: flex-start; flex-wrap: wrap; } .studio-bar button { padding-inline: 8px; } .app-bar { gap: 6px; } .access-tag { font-size: 11px; } .brand { gap: 6px; } }
@media (prefers-reduced-motion: no-preference) { .button, .module-card { transition: background-color .18s, border-color .18s, filter .18s; } }

/* Light paper surfaces share the same graphite and carmine palette as the course. */
:root[data-theme="light"] {
  color-scheme:light;
  --base:#eeece9; --stage:#faf9f7; --surface:#fff; --raised:#efedea; --line:#d6d2ce;
  --text:#252329; --muted:#615c61; --red:#a62e40; --red-strong:#8c2032; --red-dim:#f4e0e2;
  --focus-positive:#333037; --focus-negative:#a6273b;
}
.app-bar-tools { display:flex; align-items:center; gap:10px; }
.account-heading { padding-bottom:8px; }
.account-tabs { display:flex; flex-wrap:wrap; gap:7px; padding-block:8px 16px; border-bottom:1px solid var(--line); }
.account-tabs .button[aria-pressed="true"] { border-color:var(--red); background:var(--raised); }
.account-screen > section { padding-top:24px; }
@media(pointer:coarse),(max-width:680px) {
  .app-bar .brand,.app-bar .nav-button,#mobile-nav .nav-button,.app-bar-tools button { min-height:44px; }
  .app-bar-tools button { min-width:40px; }
  .account-tabs .button { flex:1 1 calc(50% - 7px); min-height:44px; }
  .button,.fl-reader button { touch-action:manipulation; }
  input,select,textarea { font-size:16px; }
}
button.theme-switch {
  flex:none; width:32px; height:32px; display:inline-grid; place-items:center; padding:0;
  border:1px solid var(--line); border-radius:50%; color:var(--text); background:var(--surface);
}
button.theme-switch:hover { background:var(--raised); border-color:var(--muted); }
.theme-moon, [data-theme="light"] .theme-sun { display:none; }
[data-theme="light"] .theme-moon { display:inline; }
.app-bar { min-height:43px; }
.app-bar .brand,.app-bar .nav-button,#mobile-nav .nav-button { min-height:36px; }
.app-footer { padding-block:7px; }
@media(max-width:720px){ .app-bar { min-height:40px; } .app-bar-tools { gap:6px; } }
[data-theme="light"] :is(.hero,.store-canvas,.practice-section,.hero-with-coin ~ .practice-section) { background:var(--stage); }
[data-theme="light"] :is(.chart-panel,.code,.coin-meaning-button,.art-controls .button,.practice-panel,.hero-with-coin ~ .practice-section .practice-panel,.pulse-card,.event-board,.quote-card,.case-selector button) { background:var(--surface); color:var(--text); border-color:var(--line); }
[data-theme="light"] .hero-with-coin + #library .module-card:not(:hover) { background:rgb(255 255 255 / 82%); }
[data-theme="light"] :is(.tag,.notice,.case-selector [aria-pressed=true]) { background:var(--red-dim); color:var(--red-strong); border-color:#d6b6bc; }
[data-theme="light"] .primary { color:#fff; }
[data-theme="light"] :is(.coin-meaning li,.feed-links .button,.news-impact .tone-positive,.impact-pair .move-up) { color:var(--text); }
[data-theme="light"] :is(.coin-meaning li small,.plot-heading>span,.plot-meta,.quote-extremes,.quote-head small,.case-notes p,.news-impact small,.impact-window,.news-impact .tone-mixed) { color:var(--muted); }
[data-theme="light"] :is(.coin-meaning li b,.sentiment-label,.event-list time,.news-meta b,.news-impact .tone-negative,.impact-pair .move-down,.quote-change.negative,.case-fact small,.case-selector [aria-pressed=true] small) { color:var(--red); }
[data-theme="light"] .quote-track { background:var(--line); }
[data-theme="light"] .quote-track i { background:var(--text); box-shadow:0 0 0 2px var(--stage); }
[data-theme="light"] :is(.practice-plot,.outcome-chart) { background:#1a191a; border-radius:7px; }
/* Touch targets follow available width and input type, including narrow desktop windows. */
@media (max-width:680px),(pointer:coarse) {
  .app-bar .brand,.app-bar .nav-button,#mobile-nav .nav-button { min-height:44px; }
  #mobile-nav .nav-button { font-size:14px; flex:1 1 0; min-width:0; padding-inline:5px; }
  .app-bar-tools .theme-switch,.app-bar-tools .focus-inbox-bell { min-width:40px; min-height:40px; }
  .account-tabs .button { min-height:44px; }
}
@media(max-width:430px) { .app-bar-tools .access-tag { display:none; } }
