.studio,.studio-bank {--pine:#104d36;--line:#d9d5c9;color:#203227}
.studio {max-width:1400px;margin:auto}
.studio h1 {font-size:clamp(30px,4vw,54px);letter-spacing:-.055em;line-height:1.05;margin:8px 0 30px}
.studio h2 {font-size:clamp(20px,2.4vw,31px);letter-spacing:-.035em;margin:20px 0}
.studio header {display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.studio header select,.studio-action,.studio-primary,.studio-tabs button,.studio-months button,.studio-book span {border:1px solid #819083;border-radius:9px;padding:10px 16px;background:#fcfaf5;color:var(--pine);font:inherit;font-weight:650;cursor:pointer;text-decoration:none}
.studio header select {margin-bottom:14px}
.studio-primary,.studio [aria-pressed=true] {color:white;background:var(--pine)}
.studio-months,.studio-tabs {display:flex;flex-wrap:wrap;gap:0;margin:10px 0 28px}
.studio-tabs button,.studio-months button {border-radius:0;margin-right:-1px}
.studio-tabs button:first-child,.studio-months button:first-child {border-radius:10px 0 0 10px}
.studio-tabs button:last-child,.studio-months button:last-child {border-radius:0 10px 10px 0}
.studio-months button {flex:1}
.studio-subjects,.studio-books {display:grid;gap:clamp(12px,2vw,25px);grid-template-columns:repeat(2,minmax(0,1fr))}
.studio-subject {min-height:250px;padding:clamp(18px,2.6vw,36px);border-radius:18px;display:flex;align-items:flex-start;flex-direction:column;background:#eee8da url('../img/studio/practice-math.webp') right top / 43% auto no-repeat}
.studio-subject.reading {background-color:#e8ebd8;background-image:url('../img/studio/practice-rw.webp')}
.studio-subject h3 {max-width:59%;font-size:clamp(23px,2.8vw,40px);line-height:1.08;margin:5px 0}
.studio-subject p {margin:12px 0}
.studio-subject progress {width:70%;accent-color:#175a40}
.studio-subject small {margin:5px 0 14px}
.studio-subject .studio-action {margin-top:auto}
.studio-subject.reading .studio-action {background:var(--pine);color:white}
.studio-dashboard {max-width:1400px;margin:34px auto}
.studio-dashboard summary,.studio-bank summary {cursor:pointer;font-weight:650}
.studio-books {grid-template-columns:repeat(4,minmax(0,1fr))}
.studio-book {background:none;border:0;padding:0;cursor:pointer;min-width:0}
.studio-book img,.studio-prediction img {width:100%;height:auto;display:block;border-radius:5px;box-shadow:0 7px 12px #30291924}
.studio-book span {display:block;margin-top:12px}
.studio-book:hover img,.studio-book[aria-expanded=true] img {outline:2px solid var(--pine);outline-offset:2px}
.studio-test {display:block;border-bottom:1px solid var(--line);padding:13px 0;color:var(--pine);font-weight:bold}
.studio-prediction .rt-grid {grid-template-columns:repeat(5,minmax(0,1fr))}
.studio-prediction .rt-card {border:0;border-radius:5px}
.studio-real {display:grid;grid-template-columns: minmax(0,1.55fr) minmax(250px,1fr);gap:20px}
.studio-real h1,.studio-real .scrollbar {grid-column:1/-1;margin:0}
.studio-real #rtMonths {align-content:start;margin:0;gap:15px}
.studio-real .rt-card {position:relative;margin-top:14px;overflow:visible;border-radius:4px 12px 12px 12px;background:#cad3ba;padding:35px 12px 16px;box-shadow:0 4px 10px #28221e1c}
.studio-real .rt-card::before {content:'';position:absolute;bottom:100%;left:-2px;width:45%;height:12px;background:inherit;border-radius:7px 10px 0 0}
.studio-real .rt-card:nth-child(3n) {background:#e4d4b8}
.studio-real .rt-card.is-selected {background:#18583d;color:#fff}
.studio-real .rt-card .rt-name,.studio-real .rt-card .rt-meta {color:inherit;padding:0;display:block}
.studio-real .rt-banner {display:none}
.studio-real #rtPop {grid-column:auto;margin:0;align-self:start;box-shadow:none;border:1px solid var(--line)}
.studio-real .rt-chips {display:grid}
.studio-real .rt-chip {width:100%;height:auto;padding:9px 12px;text-align:left;font-size:15px}
.studio-real .rt-pop::before {display:none}
.studio-wordmark {width:142px;height:auto;display:block}
.topbar .studio-wordmark {width:100px;filter:brightness(.2)}
@media(min-width:901px){.side-collapsed .side .studio-wordmark {width:44px}}
.studio-bank {grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);max-width:1400px;margin:auto}
.studio-bank .qb-main,.studio-bank .qb-drill {background:#fffdf8;border:1px solid #d9d5c9;border-radius:16px;padding:17px;gap:0;color:#203227;box-shadow:none}
.studio-bank .qb-side {position:static}
.studio-bank .qb-card {background:none;box-shadow:none;border:0;padding:10px 4px}
.studio-bank .qb-step-num,.studio-bank .qb-source-desc,.studio-bank .qb-drill::after,.studio-bank .qb-source-icon,.studio-bank .qb-bars,.studio-bank .qb-drill-stats,.studio-bank .qb-match-note:first-of-type {display:none}
.studio-bank .qb-drill-eyebrow {font-size:19px;background:#e0ebd7;color:#23483a;letter-spacing:0;text-transform:none;border-radius:9px;padding:12px}
.studio-bank .qb-start {background:#10583d;color:white}
.studio-bank .qb-reset {color:#355945}
.studio-bank .qb-domain summary {padding:10px;background:#f0f3eb;border-radius:7px}
.studio-bank .qb-skills {display:grid}
.studio-bank .qb-source,.studio-bank .qb-diff {padding:9px;min-height:0}
.studio-bank .qb-diff-grid {grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:960px){.studio-real {grid-template-columns:1fr}.studio-prediction .rt-grid {grid-template-columns:repeat(3,minmax(0,1fr))}.studio-books {grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.studio-bank {grid-template-columns:1fr}.studio-real #rtMonths {grid-template-columns:repeat(2,minmax(0,1fr))}.studio-months {gap:4px}.studio-months button {border-radius:7px!important;padding:7px}.studio-subjects {grid-template-columns:1fr}.studio-subject {min-height:180px}.studio-prediction .rt-grid {grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Champagne theme for study, navigation and the Premium comparison. */
:root {
  --studio-paper: #fcfaf7;
  --studio-panel: #fefcf9;
  --studio-cream: #f7efe0;
  --studio-ink: #3d2c1c;
  --studio-muted: #61503d;
  --studio-line: #e6d7bd;
  --studio-gold: #75542e;
  --studio-gold-line: #be9d62;
  --studio-foil: linear-gradient(112deg, #dec28a, #edd7ab 28%, #faecd1 53%, #e7cca0 78%, #ddbf86);
  /* Champagne v2 (2026-11-23, TOKENS.md §1-§2): light left→right cream
     gradient — strong variant for NEXT SAT / hero / 3-month / waiting banner,
     soft variant for the Premium card. */
  --studio-cream-grad: linear-gradient(90deg, #f2e0bc, #f7ebd3 55%, #fdf7eb);
  --studio-cream-grad-soft: linear-gradient(90deg, #f9efdd, #fdfaf5);
  /* Streak number only: mockup "5 days" is #7e5928, NOT --studio-gold —
     kept as its own token, do not silently unify (TOKENS.md §3). */
  --studio-streak-num: #7e5928;
  /* Page background: flat #f8f4ed (v5 mockup, the later version). Overrides
     app.css --bg #FAF6EF; the dot pattern is removed below. */
  --bg: #f8f4ed;
}
.shell { background: #f8f4ed; }
/* Flat page background (mockups are flat, no dots): the app.css
   body:not(.is-exam) .main-col dotted rule (0,2,1) beats .shell .main-col
   (0,2,0), so this needs the stronger body:not(.is-exam) selector. */
.shell .main-col { background: #f8f4ed; }
body:not(.is-exam) .shell .main-col { background-color: #f8f4ed; background-image: none; }
.shell .side {
  background: #faf7f3;
  border-inline-end: 1px solid var(--studio-line);
  color: var(--studio-ink);
}
.side .side-link, .side .side-link.is-premium, .side .icon-btn, .side .side-star,
.side .side-user .who span, .side .side-streak span, .side .side-streak p {
  color: var(--studio-muted);
}
.side .side-link:hover, .side .side-link.is-active {
  color: var(--studio-ink);
  background: linear-gradient(105deg, #f8e9ca, #fff5e3 56%, #f1dab0);
}
.side .side-streak, .side .side-streak-icon, .side .side-user .avatar { background: var(--studio-cream); }
/* Sidebar streak sits on cream now, so the number/icon must be dark:
   app.css keeps .side-streak b white (#fff) for the old dark background. */
.side .side-streak b { color: var(--studio-ink); }
.side .side-streak-icon { color: var(--studio-gold); }
.side .side-sep, .side .side-link.is-ghost { border-color: var(--studio-line); }
.side .btn-signin {
  background: var(--studio-paper);
  border: 1px solid var(--studio-line);
  color: var(--studio-ink);
}
.topbar .studio-wordmark { filter: none; }
.studio, .studio-bank { --pine: var(--studio-gold); --line: var(--studio-line); color: var(--studio-ink); }
.studio h1 { font-size: clamp(30px, 3.6vw, 51px); letter-spacing: -.045em; }
.studio header select, .studio-action, .studio-tabs button, .studio-months button {
  background: var(--studio-panel);
  border-color: var(--studio-gold-line);
  color: var(--studio-ink);
}
.studio .studio-primary, .studio [aria-pressed=true],
.studio-subject.reading .studio-action, .studio-real .scroll-chip.active, .studio-real .rt-start {
  background: var(--studio-foil);
  border: 1px solid var(--studio-gold-line);
  color: var(--studio-ink);
}
.studio-subject, .studio-subject.reading {
  background-color: #f9f2e5;
  border: 1px solid var(--studio-line);
}
.studio-subject progress { accent-color: var(--studio-gold); }
.studio-subject h3 { font-size: clamp(21px, 2.35vw, 34px); }
.studio-real .rt-card, .studio-real .rt-card:nth-child(3n) { background: #f6ead3; color: var(--studio-ink); }
.studio-real .rt-card.is-selected { background: var(--studio-foil); color: var(--studio-ink); border-color: var(--studio-gold-line); }
.studio-real .rt-start:disabled { background: var(--studio-cream); opacity: .55; }
.studio-real .rt-chip.is-selected, .studio-real .rt-opt.is-selected {
  background: var(--studio-foil);
  color: var(--studio-ink);
  border-color: var(--studio-gold-line);
}
/* Unselected version chips kept app.css sage (#f1f5f1 bg, #22362b text) —
   the last green leftover spotted on the live check. Champagne override. */
.studio-real .rt-chip { background: var(--studio-panel); border-color: var(--studio-line); color: var(--studio-ink); }
.studio-real .rt-chip:hover { border-color: var(--studio-gold-line); }
.studio-book.studio-cover, .studio-prediction .rt-card.studio-cover {
  position: relative;
  display: flex;
  flex-direction: column;
  aspect-ratio: 169 / 289;
  overflow: hidden;
  isolation: isolate;
  justify-content: flex-start;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--studio-line);
  border-radius: 8px;
  background: #fbf4e7;
  color: var(--studio-ink);
  padding: 15px 10px 0;
  box-shadow: none;
}
.studio-cover strong { z-index: 1; font-size: clamp(13px, 1.6vw, 22px); line-height: 1.18; text-wrap: balance; }
.studio-book.studio-cover img, .studio-prediction .studio-cover img {
  position: absolute;
  inset: auto 0 0;
  width: 100%;
  height: 79%;
  object-fit: cover;
  object-position: center bottom;
  mask-image: linear-gradient(transparent, #000 22%);
  border-radius: 0;
  box-shadow: none;
  outline: none;
}
.studio-book.studio-cover:hover, .studio-prediction .rt-card.studio-cover:hover {
  border-color: var(--studio-gold-line);
  box-shadow: 0 4px 15px #75542e19;
}
.studio-prediction .rt-card.studio-cover { align-items: flex-start; aspect-ratio: 133 / 178; }
.studio-prediction .studio-cover strong { font-size: clamp(11px, 1.25vw, 16px); }
.studio-prediction .studio-cover b {
  z-index: 1;
  font: 400 clamp(28px, 4vw, 54px) / 1.05 Georgia, serif;
}
.studio-prediction .studio-cover span, .studio-test span {
  border-radius: 50%;
  background: var(--studio-cream);
  color: var(--studio-ink);
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}
.studio-prediction .studio-cover span { position: absolute; right: 8px; bottom: 8px; }
.studio-crumb { color: var(--studio-muted); margin-block: 10px 22px; }
.studio-crumb button {
  border: 0;
  background: transparent;
  padding: 5px;
  color: var(--studio-gold);
  text-decoration: underline;
  cursor: pointer;
}
.studio-chapter-art { width: 100%; aspect-ratio: 4 / 1; object-fit: cover; border-radius: 12px; }
.studio-chapter-tests { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-top: 18px; }
.studio-chapter-tests .studio-test {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 49px;
  gap: 10px;
  padding: 9px 13px;
  border: 1px solid var(--studio-line);
  border-radius: 10px;
  background: var(--studio-panel);
  color: var(--studio-ink);
  font-size: 14px;
  font-weight: 500;
}
.studio-chapter-tests .studio-test:hover { border-color: var(--studio-gold-line); background: var(--studio-cream); text-decoration: none; }
.studio-bank {
  --primary: var(--studio-gold);
  --mint: #ecdbb7;
  --mint-2: #faf1df;
  --choc: #ecd7ad;
  --ink: var(--studio-ink);
  --ink-2: var(--studio-muted);
  --muted: var(--studio-muted);
  --line-2: var(--studio-line);
}
.studio-bank .qb-main, .studio-bank .qb-drill { border-color: var(--studio-line); background: var(--studio-panel); color: var(--studio-ink); }
.studio-bank .qb-drill-eyebrow, .studio-bank .qb-domain summary, .studio-bank .qb-rule { background: var(--studio-cream); color: var(--studio-ink); }
.studio-bank .qb-source-count, .studio-bank .qb-skill.is-on, .studio-bank .qb-reset { color: var(--studio-gold); }
.studio-bank .qb-check.is-on, .studio-bank .qb-box.is-on, .studio-bank .qb-seg button.is-active, .studio-bank .qb-length.is-on {
  background: #ecd7ad;
  border-color: var(--studio-gold-line);
  color: var(--studio-ink);
}
.studio-bank .qb-source-count, .studio-bank .qb-step-sub, .studio-bank .qb-rule-desc, .studio-bank .qb-match-note { font-size: 13px; }
.studio-bank .qb-start, .cmp .cmp-upgrade {
  background: var(--studio-foil);
  border: 1px solid var(--studio-gold-line);
  color: var(--studio-ink);
}
.studio-bank .qb-drill-meta, .studio-bank .qb-match-note { opacity: 1; color: var(--studio-muted); }

.cmp { background: var(--studio-paper); color: var(--studio-ink); max-width: 1120px; }
.cmp .cmp-left { background: linear-gradient(150deg,#f6ead1,#faefd9 43%,#dfc58f); color: var(--studio-ink); }
.cmp .cmp-left::before { content: none; }
.cmp .cmp-left small, .cmp .cmp-sub, .cmp .cmp-what small { color: var(--studio-muted); }
.cmp .cmp-pill, .cmp .cmp-tag, .cmp .cmp-plan { background: var(--studio-cream); color: var(--studio-gold); }
.cmp .cmp-check, .cmp .cmp-eyebrow, .cmp .cmp-cell.is-prem .ico { color: var(--studio-gold); }
.cmp .cmp-table { box-shadow: none; border-color: var(--studio-line); background: var(--studio-panel); }
.cmp .cmp-head .cmp-col.is-prem { background: var(--studio-foil); color: var(--studio-ink); }
.cmp .cmp-head .cmp-col.is-prem b, .cmp .cmp-head .cmp-col.is-prem small { color: var(--studio-ink); }
.cmp .cmp-cell.is-prem { background: var(--studio-cream); }

@media (max-width: 760px) {
  .studio-chapter-art { aspect-ratio: 3 / 1; }
  .studio-prediction .rt-card.studio-cover { aspect-ratio: 4 / 5; }
}
@media (max-width: 520px) {
  .studio-chapter-tests { grid-template-columns: 1fr; }
  .studio-real .rt-name { font-size: 16px; }
  .studio-bank .qb-diff-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .studio-bank .qb-lengths { flex-wrap: wrap; }
  .cmp .cmp-left, .cmp .cmp-right { padding: 20px 14px; }
  .cmp .cmp-head, .cmp .cmp-row { grid-template-columns: minmax(0,1fr) 47px 94px; }
  .cmp .cmp-cell.is-prem { margin-inline: 0; padding-inline: 4px; }
  .cmp .cmp-head .cmp-col.is-prem { padding-inline: 4px; margin-right: 0; }
}
.topbar { color: var(--studio-ink); background: var(--studio-paper); border-bottom: 1px solid var(--studio-line); }
.topbar .icon-btn { color: var(--studio-ink); }
.studio-real .rt-pop-group { color: var(--studio-gold); }
.studio-real .rt-opt.is-selected .rt-radio { border-color: var(--studio-gold); }
.studio-real .rt-opt.is-selected .rt-radio::after { background: var(--studio-gold); }
.studio-bank .qb-bar { background: var(--studio-cream); }
.studio-bank .qb-bar i { background: var(--studio-gold-line); }

/* ==========================================================================
   Champagne v2 (2026-11-23) — mockup-driven rebrand pass (DIFF.md / TOKENS.md).
   All overrides live here so app.css / exam.css stay close to live.
   Load order: app.css, then studio.css, then exam.css (appended later by JS),
   so exam.css overrides below need the higher .ex-bnav specificity.
   ========================================================================== */

/* ---- Mode selector (#15-17): gold foil in EVERY context, not just .studio-real.
   Covers the Real Tests popover (.studio-real), the Prediction chooser
   (.rt-chooser) and the intro section picker (.rt-sections). ---- */
.rt-opt { border-color: var(--studio-line); background: var(--studio-panel); }
.rt-opt:hover { border-color: var(--studio-gold-line); }
.rt-opt.is-selected { background: var(--studio-foil); border-color: var(--studio-gold-line); color: var(--studio-ink); }
.rt-opt.is-selected .rt-radio { border-color: var(--studio-gold); }
.rt-opt.is-selected .rt-radio::after { background: var(--studio-gold); }
.rt-opt-t { color: var(--studio-ink); font-size: 16px; }
.rt-opt-m { color: var(--studio-muted); }
.rt-start { background: var(--studio-foil); border: 1px solid var(--studio-gold-line); color: var(--studio-ink); border-radius: 12px; font-size: 17px; }
.rt-start:disabled { background: var(--studio-cream); opacity: .55; }

/* ---- Home: streak card (v2) + NEXT SAT / Premium top cards (v5 p1) ---- */
.streak-card { background: var(--studio-panel); border-color: var(--studio-line); border-radius: 20px; box-shadow: none; margin: 0 0 16px; }
.streak-card h3 { font-size: 22px; margin: 0 0 12px; color: var(--studio-ink); }
.streak-card-inner { background: #f6efdf; border-radius: 15px; padding: 16px 18px; }
.streak-card-row { display: flex; align-items: center; gap: 14px; }
.streak-card-flame { width: 46px; height: 46px; flex: none; border-radius: 12px; background: var(--studio-foil); border: 1px solid var(--studio-gold-line); display: grid; place-items: center; }
.streak-card-flame svg { width: 24px; height: 24px; color: var(--studio-ink); }
.streak-card-days b { display: block; font-size: 22px; line-height: 1.1; color: var(--studio-streak-num); }
.streak-card-days span { font-size: 15px; color: var(--studio-muted); }
.streak-card-inner p { margin: 12px 0 0; font-size: 16px; color: var(--studio-muted); }

.studio-top-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 0 0 22px; }
.studio-top-cards > * { margin: 0; }
.studio-top-cards .count-down { background: var(--studio-cream-grad); border-color: var(--studio-line); border-radius: 16px; box-shadow: none; }
.studio-top-cards .count-down .aside-eyebrow { font-size: 14px; color: var(--studio-muted); }
.studio-top-cards .count-down .aside-eyebrow .ico { color: var(--studio-gold); }
.count-down .big { font-size: 55px; color: var(--studio-ink); }
.count-down .big small { font-size: 20px; color: var(--studio-ink); }
.count-down p { color: var(--studio-ink); font-size: 16px; }
.count-down p b { font-size: 20px; color: var(--studio-ink); }
.studio-top-cards .pr-card.is-on { background: var(--studio-cream-grad-soft); border-color: var(--studio-line); border-radius: 16px; box-shadow: none; }
.studio-top-cards .pr-card .aside-eyebrow { font-size: 14px; color: var(--studio-muted); }
.studio-top-cards .pr-card .aside-eyebrow .ico { color: var(--studio-gold); }
.studio-top-cards .pr-card.is-on h3 { font-size: 30px; color: var(--studio-ink); }
.studio-top-cards .pr-card.is-on p { font-size: 16px; color: var(--studio-muted); }
.pr-card-actions .btn-ghost { background: var(--studio-foil); border: 1px solid var(--studio-gold-line); color: var(--studio-ink); border-radius: 12px; font-size: 15px; }
.pr-card-actions .link-btn { color: var(--studio-gold); }

/* ---- Home: logged-out Premium hero card (v5 p1) ----
   app.css paints .pr-hero green (#44785C); the .pr-card.is-on rules above
   only cover the active-premium state, so logged-out users kept the green
   card. Champagne override (CSS only; premium.js untouched). ---- */
.studio-top-cards .pr-hero { background: var(--studio-cream-grad-soft); border: 1px solid var(--studio-line); border-radius: 16px; box-shadow: none; color: var(--studio-ink); }
.studio-top-cards .pr-hero::after { background: #f3e3c2; }
.studio-top-cards .pr-hero-eyebrow { color: var(--studio-muted); }
.studio-top-cards .pr-hero-eyebrow .pr-hero-star { color: var(--studio-gold); }
.studio-top-cards .pr-hero h3 { font-size: 30px; color: var(--studio-ink); }
.studio-top-cards .pr-hero-checks li { color: var(--studio-ink); }
.studio-top-cards .pr-hero-check { background: var(--studio-foil); border: 1px solid var(--studio-gold-line); color: var(--studio-ink); }
.studio-top-cards .pr-hero-price b { color: var(--studio-ink); }
.studio-top-cards .pr-hero-price span, .studio-top-cards .pr-hero-price2 { color: var(--studio-muted); }
.studio-top-cards .pr-hero-upgrade { background: var(--studio-foil); border: 1px solid var(--studio-gold-line); color: var(--studio-ink); }
.studio-top-cards .pr-hero .link-btn { color: var(--studio-gold); }

/* ---- Home: year pill, month pills, month heading, Start button ---- */
.studio-year-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.studio-year-pills button { border: 1px solid var(--studio-gold-line); border-radius: 999px; background: var(--studio-panel); color: var(--studio-ink); font: inherit; font-weight: 700; font-size: 17px; padding: 10px 22px; cursor: pointer; }
.studio-year-pills button[aria-pressed="true"] { background: var(--studio-foil); }
.studio-months { gap: 10px; align-items: center; }
/* Round 3: the year group sits at the FAR RIGHT of the month strip,
   pushed away from the month pills (margin-left: auto). */
.studio-months .studio-year-pills { margin-left: auto; }
.studio-months button { flex: none; border-radius: 999px; margin-right: 0; font-size: 17px; padding: 10px 22px; }
.studio-months button:first-child, .studio-months button:last-child { border-radius: 999px; }
.studio header h2 { font-size: 25px; }
.studio .studio-primary { border-radius: 12px; font-size: 17px; }

/* ---- Home: section cards as full-width horizontal rows (art right) ---- */
.studio-subjects { grid-template-columns: 1fr; }
.studio-subject { flex-direction: row; min-height: 170px; background-position: right center; background-size: auto 100%; }
.studio-subject-body { max-width: 62%; display: flex; flex-direction: column; align-items: flex-start; }
.studio-subject h3 { max-width: none; font-size: 22px; }
.studio-subject p { font-size: 16px; margin: 10px 0; }
.studio-subject .studio-action { border-radius: 12px; font-size: 16px; }
/* Math Resume gold (#6): state-dependent — the .resume class is added by
   home.js section() only when an attempt is in progress. :not(.reading) was
   rejected: it would also foil "Open section", which v5 shows white. */
.studio-subject.resume .studio-action { background: var(--studio-foil); border: 1px solid var(--studio-gold-line); color: var(--studio-ink); }

/* ---- Home: thin custom progress track (#7) ---- */
.studio-subject progress { -webkit-appearance: none; appearance: none; width: 70%; max-width: 260px; height: 6px; border: 0; border-radius: 99px; background: #efe6d2; }
.studio-subject progress::-webkit-progress-bar { background: #efe6d2; border-radius: 99px; }
.studio-subject progress::-webkit-progress-value { background: var(--studio-gold-line); border-radius: 99px; }
.studio-subject progress::-moz-progress-bar { background: var(--studio-gold-line); border-radius: 99px; }

/* ---- Home: "My dashboard" as a plain link under the cards ---- */
.studio-dashboard-link { display: inline-block; background: none; border: 0; padding: 6px 0; font: inherit; font-size: 17px; font-weight: 700; color: var(--studio-ink); cursor: pointer; }
.studio-dashboard-link:hover { text-decoration: underline; }
.studio-dashboard { margin-top: 18px; }

/* ---- Exam entry (intro.js): Module pill rows, feature pills, gold aside ---- */
.intro-hero { border-color: var(--studio-line); }
.intro-hero h1 { font-size: 30px; }
.intro .mod-list { border-color: var(--studio-gold-line); border-radius: 12px; }
.intro .mod-list li { font-size: 16px; border-bottom-color: var(--studio-line); }
.intro .mod-list li span:first-child { font-weight: 700; color: var(--studio-ink); }
.intro .mod-list li .muted { color: var(--studio-muted); }
.intro .feature-list li { border: 1px solid var(--studio-line); border-radius: 10px; background: var(--studio-panel); padding: 9px 12px; font-size: 16px; }
.intro .feature-list .ico { color: var(--studio-gold); }
.intro-start .btn-primary { background: var(--studio-foil); border: 1px solid var(--studio-gold-line); color: var(--studio-ink); border-radius: 12px; font-size: 17px; }
.intro-start .btn-primary:hover:not(:disabled) { background: var(--studio-foil); }
.intro-start [data-restart] { background: var(--studio-panel); border: 1px solid var(--studio-gold-line); color: var(--studio-ink); border-radius: 12px; font-size: 16px; }
.intro-start .btn-ghost { border-color: var(--studio-gold-line); }
.intro-start .link-btn { color: var(--studio-gold); }

/* ---- Premium plan chooser (#25-30): mint green -> champagne ---- */
.pay-hero-head { background: var(--studio-cream-grad); border-radius: 20px 20px 0 0; }
.pay-hero-head h3 { color: var(--studio-ink); font-size: 41px; }
.pay-hero-head p { color: var(--studio-muted); font-size: 16px; }
.pay-hero-brand b { color: var(--studio-ink); }
.pay-hero-badge { color: var(--studio-gold); border-color: var(--studio-gold-line); background: var(--studio-panel); }
.pay-hero-label { color: var(--studio-muted); font-size: 17px; }
.pay-hero-card { border-color: var(--studio-line); background: var(--studio-panel); }
.pay-hero-top b { color: var(--studio-ink); font-size: 22px; }
.pay-hero-big { color: var(--studio-ink); font-size: 42px; }
.pay-hero-per, .pay-hero-foot { color: var(--studio-muted); font-size: 16px; }
.pay-hero-radio { border-color: var(--studio-line); }
.pay-hero-plan input:checked + .pay-hero-card { border-color: var(--studio-gold-line); background: var(--studio-cream-grad); }
.pay-hero-plan input:checked + .pay-hero-card .pay-hero-radio { background: var(--studio-gold); border-color: var(--studio-gold); color: var(--studio-ink); }
.pay-hero-plan input:focus-visible + .pay-hero-card { outline-color: var(--studio-gold-line); }

/* ---- Simple plan chooser (fallback path, premium.js:593): green -> gold ----
   User confirmed 2026-11-23 ("Cả thẻ đang chọn cũng vàng luôn"): the WHOLE
   selected card goes gold, not just the button. Mirrors the hero variant
   above (:412): gold border + cream gradient when checked. Price in dark
   gold (--studio-gold #75542e, legible on cream/panel), never light foil. */
.pay-plan span em { color: var(--studio-gold); }
.pay-plan input:checked + span { border-color: var(--studio-gold-line); background: var(--studio-cream-grad); }
.pay-plan input:focus-visible + span { outline-color: var(--studio-gold-line); }
.pay-hero-save { color: var(--studio-gold); background: #f6efdf; }
.pay-hero-total span { color: var(--studio-muted); font-size: 16px; }
.pay-hero-total b { color: var(--studio-ink); font-size: 18px; }
.pay-hero-go { background: var(--studio-foil); border: 1px solid var(--studio-gold-line); color: var(--studio-ink); border-radius: 12px; font-size: 18px; }
.pay-hero-foot2 { color: var(--studio-muted); font-size: 15px; }

/* ---- Modals: outer radius ~20px (TOKENS.md §6); "Get Premium" display title ---- */
.modal { border-radius: 20px; }
.modal:has(.pay-hero) .modal-head h2 { font-size: 34px; color: var(--studio-ink); }

/* ---- VietQR (#33, #34): wider QR column, cream waiting banner, warm kv ----
   Round 3 (2026-11-23, Task D): the QR modal felt too vertical — the QR
   column was 370px and the image stretched to fill it (width: 100%),
   so the 260x336 print image rendered ~478px tall. Now the modal itself
   widens to 960px on the QR step only (:has(.pay-qr) matches once
   renderQr has filled the step, so the plan step keeps the normal 680px),
   the QR column is a fixed 300px, and the image stays at its native
   260px wide, centred — legible/scannable, no stretch. CSS only;
   premium.js untouched, QR image and all text unchanged. */
.modal.is-wide:has(.pay-qr) { max-width: 960px; }
.pay-step[data-step=qr]:not([hidden]) { grid-template-columns: 300px minmax(0, 1fr); gap: 28px; }
.pay-qr { background: #ffffff; border: 1px solid var(--studio-line); border-radius: 16px; padding: 18px; }
.pay-qr-title { font-size: 33px; line-height: 1.15; color: var(--studio-ink); text-align: center; margin: 2px 0 16px; }
.pay-qr img { width: 260px; height: auto; margin: 0 auto; border-radius: 12px; }
@media (max-width: 760px) {
  .modal.is-wide:has(.pay-qr) .pay-step[data-step=qr]:not([hidden]) { grid-template-columns: 1fr; }
  .modal.is-wide:has(.pay-qr) .pay-qr { justify-self: center; width: 300px; max-width: 100%; }
}
.pay-qr-cap { font-size: 16px; font-weight: 700; color: var(--studio-ink); text-align: center; margin: 16px 0 2px; }
.pay-info p { font-size: 16px; color: var(--studio-ink); }
.pay-info .link-btn { color: var(--studio-gold); }
.kv dt { color: var(--studio-muted); }
.kv dd { color: var(--studio-ink); }
.pay-wait { background: var(--studio-cream-grad); color: var(--studio-ink); border: 1px solid var(--studio-line); border-radius: 12px; font-size: 15px; }
.pay-wait .spinner { border-color: #e3d3ae; border-top-color: var(--studio-gold); }

/* ---- Exam Back / Next (#37-39, corrected spec) ----
   Base in exam.css (loaded AFTER studio.css by JS):
   .ex-btn { background: var(--bb-blue); color: #fff; border: 0; ... } (0,1,0)
   .ex-btn.is-ghost { background: #fff; color: var(--bb-ink); border: 1.5px solid var(--bb-ink); } (0,2,0)
   .ex-btn:hover { background: var(--bb-blue-hover); } (0,2,0)
   These .ex-bnav-scoped rules are (0,2,0)/(0,3,0), so they win on
   specificity regardless of load order. Scoped strictly to .ex-bnav:
   "Go to Review Page" (.foot-btn) and break-screen "Resume Testing" are
   untouched. Back = foil + WHITE text; Next = foil + dark-brown text.
   The same Next button reads "Submit" on the review view of the last
   module — gold there too, intended. ---- */
.ex-bnav .ex-btn { background: var(--studio-foil); border: 1px solid var(--studio-gold-line); color: var(--studio-ink); }
.ex-bnav .ex-btn:hover { background: var(--studio-foil); }
.ex-bnav .ex-btn.is-ghost { background: var(--studio-foil); border: 1px solid var(--studio-gold-line); color: #fff; }
.ex-bnav .ex-btn.is-ghost:hover { background: var(--studio-foil); }
.ex-bnav .ex-btn:disabled { opacity: .55; }
.ex-bnav .ex-btn.is-ghost:disabled { opacity: .55; }

/* ---- Small screens: keep the v2 layout, restore the QR single column ---- */
@media (max-width: 760px) {
  .studio-top-cards { grid-template-columns: 1fr; }
  .studio-subject { background-size: auto 90%; }
  .studio-subject-body { max-width: 58%; }
  .studio-months button { border-radius: 999px !important; padding: 9px 16px; font-size: 16px; }
  .count-down .big { font-size: 48px; }
  .pay-hero-head h3 { font-size: 32px; }
  .pay-hero-big { font-size: 34px; }
}
@media (max-width: 600px) {
  .pay-step[data-step=qr]:not([hidden]) { grid-template-columns: 1fr; }
  .pay-qr { justify-self: stretch; }
}

/* ==========================================================================
   Champagne round 2 (2026-11-23, user feedback on live 6b03e2cb):
   home too big -> tighten + slim top bars; streak to sidebar only
   (home.js: streak card + whole "My dashboard" removed); green -> gold
   sweep on results / exam navigator / confirm modal. STAGED ONLY.
   ========================================================================== */

/* ---- Home: tighten the oversized page ---- */
.studio h1 { font-size: clamp(26px, 2.6vw, 38px); margin: 4px 0 18px; }
.studio header h2 { font-size: 22px; }
.studio .studio-primary { font-size: 15px; padding: 9px 14px; }
.studio-year-pills button { font-size: 15px; padding: 8px 18px; }
.studio-months button { font-size: 15px; padding: 8px 18px; }
.studio-subject { min-height: 140px; }
.studio-subject h3 { font-size: 20px; }
.studio-subject p { font-size: 15px; }
.studio-subject .studio-action { font-size: 15px; }
.studio-top-cards { margin: 0 0 14px; }

/* ---- Top bars: slim horizontal rows stacked at the top ---- */
.studio-top-cards { display: flex; flex-direction: column; gap: 10px; margin: 0 0 16px; }
.studio-top-cards .count-down,
.studio-top-cards .pr-card.is-on,
.studio-top-cards .pr-hero { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; padding: 10px 16px; border-radius: 12px; }

/* NEXT SAT bar: eyebrow + compact number + date/reg stacked at the right. */
.studio-top-cards .count-down .aside-eyebrow { font-size: 13px; margin: 0; }
.count-down .big { font-size: 30px; }
.count-down .big small { font-size: 15px; }
.studio-top-cards .count-down p { margin: 0; display: flex; flex-direction: column; gap: 0; font-size: 14px; line-height: 1.35; color: var(--studio-muted); }
.studio-top-cards .count-down p br { display: none; }
.count-down p b { font-size: 15px; }

/* Premium-active bar (premium.js renders .pr-card.is-on ONLY when the
   licence is active; the upsell .pr-hero is the logged-out state — the
   is-on logic is untouched, this is presentation only). */
.studio-top-cards .pr-card .aside-eyebrow { font-size: 13px; margin: 0; }
.studio-top-cards .pr-card.is-on h3 { font-size: 20px; margin: 0; }
.studio-top-cards .pr-card.is-on p { flex: 1 1 220px; margin: 0; font-size: 14.5px; }
.studio-top-cards .pr-card-actions { margin-left: auto; }

/* Logged-out upsell as the same slim bar (content kept: checks, price,
   upgrade + compare links all stay, just laid out in one wrapping row). */
.studio-top-cards .pr-hero::after { display: none; }
.studio-top-cards .pr-hero-eyebrow { margin: 0; font-size: 13px; }
.studio-top-cards .pr-hero h3 { font-size: 20px; margin: 0; }
.studio-top-cards .pr-hero-checks { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; }
.studio-top-cards .pr-hero-checks li { font-size: 13.5px; gap: 6px; }
.studio-top-cards .pr-hero-price { margin: 0; }
.studio-top-cards .pr-hero-price b { font-size: 20px; }
.studio-top-cards .pr-hero-price2 { margin: 0; font-size: 13.5px; }
.studio-top-cards .pr-hero-upgrade { width: auto; margin-left: auto; padding: 10px 18px; }
.studio-top-cards .pr-hero-compare { margin: 0; }

/* ---- Gold sweep: results page ---- */
/* Big estimated score was mint #7FD8B4 on the dark-brown hero; light
   champagne gold keeps the contrast on --choc. */
.res-score b { color: #eccf9b; }
/* "Redo Mistakes" is a global .btn-primary (green); foil it in the
   results actions only. */
.res-actions .btn-primary { background: var(--studio-foil); border: 1px solid var(--studio-gold-line); color: var(--studio-ink); }
.res-actions .btn-primary:hover:not(:disabled) { background: var(--studio-foil); }

/* ---- Gold sweep: exam navigator + Check-Your-Work grid ----
   exam.css loads AFTER studio.css, so these need the higher
   .ngrid-scoped specificity (0,2,0)/(0,3,0) vs exam.css (0,1,0)/(0,2,0).
   Unanswered: ink number, dashed ink border kept (legend .lg-un matches).
   Answered: gold-foil fill, ink number, solid gold border — the
   answered/unanswered distinction (solid vs dashed) is preserved.
   Current pin (::before) and red For-Review flag (::after) untouched. */
.ngrid .nq { color: var(--studio-ink); border-color: var(--bb-ink); }
.ngrid .nq.is-ans { background: var(--studio-foil); border-color: var(--studio-gold-line); color: var(--studio-ink); }

/* ---- Gold sweep: confirm modal ("Move to the next module?") ----
   OK action is a global .btn-primary (green); foil it in modal feet.
   The X close button has no border of its own — the green ring in the
   screenshot is the :focus-visible outline (U.modal focuses the first
   button, the X). Recolour the outline gold inside modals. */
.modal-foot .btn-primary { background: var(--studio-foil); border: 1px solid var(--studio-gold-line); color: var(--studio-ink); }
.modal-foot .btn-primary:hover:not(:disabled) { background: var(--studio-foil); }
.modal :focus-visible { outline-color: var(--studio-gold-line); }

/* ---- Round 3 (2026-11-23, Task C): payment buttons still green ----
   Compare modal "Upgrade to Premium" (.btn.btn-primary.cmp-upgrade,
   app.js) and the dashboard "Pay now" bar (.pr-bar .btn-primary,
   premium.js:468) and the plan-step "Continue to payment"
   (.pay .btn-primary, premium.js:597) — all global .btn-primary green,
   foiled only inside the pay/compare views so no other primary button
   on the site changes. The compare-modal button itself was ALREADY
   foiled in round 2 (:245, .cmp .cmp-upgrade) — the user's screenshot
   shows the LIVE site, where round 2 is not deployed yet; no duplicate
   rule is added here. Also already foiled in round 2 and NOT repeated:
   .pr-hero-upgrade (studio-top-cards, :346) and .pay-hero-go (:418). */
.pr-bar .btn-primary { background: var(--studio-foil); border: 1px solid var(--studio-gold-line); color: var(--studio-ink); }
.pr-bar .btn-primary:hover:not(:disabled) { background: var(--studio-foil); }
.pay .btn-primary { background: var(--studio-foil); border: 1px solid var(--studio-gold-line); color: var(--studio-ink); }
.pay .btn-primary:hover:not(:disabled) { background: var(--studio-foil); }

/* ---- Round 3 (2026-11-23, Task E): sidebar Premium green border ----
   The dark-green rounded outline on the sidebar Premium row while the
   compare modal is open is the global :focus-visible outline
   (app.css:46, var(--primary)) on the focused Premium nav button —
   the user clicked it to open the modal, so it keeps focus. Recolour
   sidebar focus outlines gold. .side-star green and the avatar are
   untouched (user-approved accents). */
.side :focus-visible { outline-color: var(--studio-gold-line); }

/* Adjacent fix found while verifying Task E (2026-11-23): a logged-in
   user's name in the sidebar rendered WHITE on the cream sidebar
   (app.css keeps .side-user .who b #fff for the old dark background;
   round 2 recolored the email span but missed the name) — invisible.
   Same one-line pattern as the streak-number fix (:110). */
.side .side-user .who b { color: var(--studio-ink); }
