/* ============================================================
   VagaGringa — "Greenback"
   The app converts study reps into a USD band, so the material
   is paper money: dollar-paper background, ink text, one green,
   engraved mono numbers, hard printed shadows. No gradients.
   Display: Bricolage Grotesque · Body: Public Sans · Data: IBM Plex Mono
   ============================================================ */
/* Dark is the default — the vault. Light is the daylight teller counter. */
:root {
  --paper: #10150f;
  --surface: #171d16;
  --surface2: #1d241c;
  --ink: #e5ebe1;
  --muted: #9dab9c;
  --faint: #6b786b;
  --line: #29322a;
  --line2: #39443a;
  --green: #2c8f60;
  --green-deep: #17492f;
  --green-ink: #8ad2ab;
  --green-soft: #1c2f23;
  --gold: #cfa64a;
  --gold-soft: #2d2514;
  --red: #d3705a;
  --red-soft: #34201b;
  --md-text: #c1ccc0;
  --code-bg: #0b0f0c;
  --code-text: #cfe0d2;
  --r: 6px;
  --r-sm: 4px;
  --display: 'Bricolage Grotesque', Georgia, serif;
  --font: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --press: 3px 3px 0 #0a0e0a;
  --press-sm: 2px 2px 0 #0a0e0a;
  --panel-shadow: none;
}

:root[data-theme="light"] {
  --paper: #e6e8d6;
  --surface: #fcfbf2;
  --surface2: #f0efe0;
  --ink: #171e19;
  --muted: #55645a;
  --faint: #7f8b80;
  --line: #d0d2bd;
  --line2: #b2b69e;
  --green: #0e6b43;
  --green-deep: #07472c;
  --green-ink: #0a5434;
  --green-soft: #d8e6d1;
  --gold: #8f6c15;
  --gold-soft: #f0e5c5;
  --red: #a83c28;
  --red-soft: #f2ddd3;
  --md-text: #333f38;
  --code-bg: #171e19;
  --code-text: #cfe0d2;
  --press: 3px 3px 0 #c3c6ab;
  --press-sm: 2px 2px 0 #c3c6ab;
  --panel-shadow: 0 1px 3px rgba(23, 30, 25, .08), 0 1px 2px rgba(23, 30, 25, .05);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
h1 {
  font-family: var(--display); font-size: 27px; font-weight: 700;
  margin: 0 0 4px; letter-spacing: -.01em;
  display: flex; align-items: center; gap: 10px;
}
h2 { font-size: 16px; font-weight: 700; margin: 0; }
h4 { margin: 18px 0 6px; font-size: 14px; font-weight: 700; color: var(--green-ink); }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.hint { color: var(--faint); font-size: 12px; margin: 8px 0 0; }
.hint.center { text-align: center; }
.good { color: var(--green); }
.warn { color: var(--gold); }
.bad { color: var(--red); }
.empty { padding: 24px 8px; text-align: center; }
.boot { display: grid; place-items: center; height: 100vh; color: var(--faint); font-family: var(--mono); }
::selection { background: var(--green-soft); }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
button { font: inherit; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* the section label device: small engraved caps, like a bill's fine print */
.panel-head h2, .eyebrow {
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .14em; color: var(--muted);
}
.eyebrow { display: inline-block; }

/* ============ layout ============ */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 236px; z-index: 40;
  display: flex; flex-direction: column; gap: 14px;
  padding: 20px 14px 16px;
  background: var(--surface);
  border-right: 1px solid var(--line);
}
.main { flex: 1; margin-left: 236px; padding: 30px 34px 90px; }
.content { max-width: 1010px; margin: 0 auto; }

.logo { display: flex; align-items: center; gap: 10px; padding: 2px 6px; }
.logo:hover { text-decoration: none; }
.logo-mark {
  display: grid; place-items: center; width: 34px; height: 34px; flex: none;
  background: var(--green); color: #fff;
  font-family: var(--display); font-weight: 700; font-size: 14px;
  border-radius: 5px; box-shadow: var(--press-sm);
}
.logo-mark.big { width: 52px; height: 52px; font-size: 22px; border-radius: 10px; margin: 0 auto 14px; }
.logo-text { font-family: var(--display); font-weight: 600; font-size: 17px; color: var(--ink); }
.logo-text b { font-weight: 800; color: var(--green); }

.side-search {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface2); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 8px 11px; color: var(--faint); cursor: text;
}
.side-search input { background: none; border: none; outline: none; color: var(--ink); font: inherit; font-size: 13px; width: 100%; }
.side-search input::placeholder { color: var(--faint); }

.nav { display: flex; flex-direction: column; gap: 1px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 8.5px 12px; border-radius: var(--r-sm);
  color: var(--muted); font-weight: 500; font-size: 14px;
  border-left: 2px solid transparent;
}
.nav-item:hover { color: var(--ink); background: var(--surface2); text-decoration: none; }
.nav-item.active { color: var(--green-ink); background: var(--green-soft); border-left-color: var(--green); font-weight: 600; }
.nav-item .ic { opacity: .75; }

.side-foot { border-top: 1px dashed var(--line2); padding-top: 12px; display: flex; flex-direction: column; gap: 7px; }
.user-chip { display: flex; gap: 8px; align-items: center; padding: 2px 6px; flex-wrap: wrap; }
.user-chip .theme-btn { margin-left: auto; }
.avatar {
  width: 32px; height: 32px; flex: none; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 14px;
  background: var(--gold-soft); border: 1px solid var(--line2); color: var(--gold);
}
.user-meta { display: flex; flex-direction: column; line-height: 1.25; font-size: 13px; flex: 1; min-width: 0; }
.user-meta b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.streak { color: var(--faint); font-size: 11.5px; display: inline-flex; align-items: center; gap: 4px; }
.streak.lit { color: var(--gold); }

.lang-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.lang-toggle button {
  border: none; background: var(--surface); color: var(--faint); cursor: pointer;
  font-family: var(--mono); font-size: 10.5px; font-weight: 600; padding: 4px 8px;
}
.lang-toggle button.on { background: var(--ink); color: var(--paper); }
.login-lang { position: absolute; top: 14px; right: 14px; display: flex; gap: 6px; align-items: center; }
.theme-btn {
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  border-radius: 6px; padding: 4px 7px; cursor: pointer; display: inline-grid; place-items: center;
}
.theme-btn:hover { color: var(--ink); border-color: var(--line2); }

.menu-btn { display: none; }
.backdrop { display: none; }

/* ============ shared components ============ */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head p { margin: 2px 0 0; }
.head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.crumb { display: inline-flex; align-items: center; gap: 4px; color: var(--faint); font-size: 12.5px; margin-bottom: 6px; }
.crumb:hover { color: var(--ink); text-decoration: none; }

.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 18px 20px; margin-bottom: 16px;
}
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 13px; flex-wrap: wrap; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-weight: 600; font-size: 14px;
  color: var(--ink); background: var(--surface);
  border: 1px solid var(--line2); border-radius: var(--r-sm);
  padding: 8px 15px; cursor: pointer;
  box-shadow: var(--press-sm); transition: transform .1s, box-shadow .1s;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--line2); }
.btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--line2); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.primary { background: var(--green); border-color: var(--green-deep); color: #fff; box-shadow: 2px 2px 0 var(--green-deep); }
.btn.primary:hover { box-shadow: 3px 3px 0 var(--green-deep); }
.btn.primary:active { box-shadow: 1px 1px 0 var(--green-deep); }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--surface); box-shadow: var(--press-sm); }
.btn.small { padding: 5.5px 11px; font-size: 13px; }
.btn.wide { width: 100%; margin-top: 12px; }
.btn.on-good { border-color: var(--green); color: var(--green-ink); background: var(--green-soft); }
.btn.on-warn { border-color: var(--gold); color: var(--gold); background: var(--gold-soft); }
.linklike { background: none; border: none; padding: 0; font-size: 13px; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.linklike:hover { color: var(--ink); }
.linklike.danger:hover { color: var(--red); }
.danger-zone { margin-top: 14px; text-align: right; }

.chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; font-weight: 600; color: var(--muted);
  background: var(--surface); border: 1px solid var(--line2);
  border-radius: 4px; padding: 2px 8px; white-space: nowrap;
}
.chip i { font-style: normal; color: var(--faint); }
.chip.trap { color: var(--gold); border-color: var(--gold); background: var(--gold-soft); }
.chip.ok, .chip.good { color: var(--green-ink); border-color: var(--green); background: var(--green-soft); }
.chip.meh, .chip.warn { color: var(--gold); border-color: var(--gold); }
.chip.bad { color: var(--red); border-color: var(--red); background: var(--red-soft); }
.chip.code-chip { font-family: var(--mono); font-size: 10px; }
.chip.filter { cursor: pointer; font-size: 12.5px; padding: 4.5px 11px; border-radius: 5px; }
.chip.filter:hover { border-color: var(--ink); color: var(--ink); }
.chip.filter.on { color: var(--paper); border-color: var(--ink); background: var(--ink); }
.chip.filter.on i { color: var(--paper); opacity: .65; }
.chip.user { cursor: pointer; font-size: 13px; padding: 5px 13px; border-radius: 5px; }
.chip.user:hover { border-color: var(--green); color: var(--green-ink); }
.diff-easy { color: var(--green-ink); }
.diff-medium { color: var(--gold); }
.diff-hard { color: var(--red); }

.badge {
  display: inline-grid; place-items: center; flex: none;
  width: 33px; height: 33px; border-radius: 7px;
  font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: -.02em;
  color: color-mix(in srgb, var(--c) 45%, var(--ink));
  background: color-mix(in srgb, var(--c) 16%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--c) 38%, var(--line));
}
.badge.sm { width: 25px; height: 25px; font-size: 10px; border-radius: 5px; }

.bar { height: 7px; background: var(--surface2); border: 1px solid var(--line); border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--green); border-radius: 99px; transition: width .4s; }
.bar.thin { height: 5px; }
.session-bar { margin-bottom: 20px; }

.ring {
  --p: 0;
  width: 106px; height: 106px; border-radius: 50%; margin: 0 auto 14px;
  background: conic-gradient(var(--green) calc(var(--p) * 1%), var(--surface2) 0);
  border: 1px solid var(--line);
  display: grid; place-items: center;
}
.ring span {
  display: grid; place-items: center;
  width: 82px; height: 82px; border-radius: 50%;
  background: var(--surface); font-family: var(--mono); font-size: 20px; font-weight: 600;
}

.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; color: var(--faint); font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 8px 10px; border-bottom: 1px solid var(--line); }
.table tr:last-child td { border-bottom: none; }

.ic { flex: none; }

/* ============ mission hero ============ */
h1.mission { font-size: 26px; margin-top: 2px; }
.mission b { color: var(--green-ink); }
.mission-art {
  font-family: var(--display); font-weight: 800; font-size: 46px; letter-spacing: -.02em;
  display: flex; gap: 14px; align-items: baseline; margin: 16px 0 4px; line-height: 1;
}
.mission-art s { color: var(--faint); text-decoration-thickness: 3px; text-decoration-color: var(--red); }
.mission-art .arr { color: var(--faint); font-size: 28px; }
.mission-art b { color: var(--green-ink); }

/* ============ the signature: pay-band card ============ */
.paycard {
  position: relative; overflow: hidden;
  /* fine engraving lines, like security printing on a bill */
  background:
    repeating-linear-gradient(135deg, transparent 0 7px, color-mix(in srgb, var(--ink) 3%, transparent) 7px 8px),
    var(--surface);
  border: 1px solid var(--line2);
  border-radius: var(--r);
  padding: 18px 22px 14px;
  margin-bottom: 16px;
  box-shadow: var(--press);
}
.pay-watermark {
  position: absolute; right: 4px; top: -46px;
  font-family: var(--display); font-weight: 800; font-size: 215px; line-height: 1;
  color: var(--ink); opacity: .045; pointer-events: none; user-select: none;
}
.pay-to { display: block; font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; color: var(--faint); margin-top: 4px; }
.paycard-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.pay-serial { font-family: var(--mono); font-size: 9.5px; letter-spacing: .06em; color: var(--faint); }
/* perforation along the top, like a detached pay stub */
.paycard::before {
  content: ''; position: absolute; top: 7px; left: 14px; right: 14px; height: 0;
  border-top: 2px dashed var(--line);
}
.paycard-head { display: flex; justify-content: space-between; align-items: baseline; margin: 6px 0 10px; }
.paycard-ready { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.paycard-ready b { color: var(--ink); font-size: 14px; }
.paycard-main { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin: 4px 0 12px; }
.paycard-amount {
  font-family: var(--mono); font-size: 58px; font-weight: 600; letter-spacing: -.045em;
  color: var(--green-ink); line-height: 1;
}
.paycard-amount i { font-style: normal; font-size: 17px; color: var(--faint); letter-spacing: 0; }
.paycard-side { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; }
.pay-stamp {
  display: inline-block; transform: rotate(-4deg);
  font-family: var(--display); font-weight: 800; font-size: 13.5px;
  text-transform: uppercase; letter-spacing: .05em;
  color: var(--gold); border: 2.5px solid var(--gold); border-radius: 7px;
  padding: 4px 12px; background: color-mix(in srgb, var(--gold) 7%, transparent);
}
.pay-yr { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.pay-bar { height: 8px; }
.paycard-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.paycard-note { margin: 8px 0 0; font-size: 11px; color: var(--faint); border-top: 1px solid var(--line); padding-top: 7px; }

/* the full ladder — always visible so the map is clear from day zero */
.pay-ladder { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 2px 0 12px; }
.rung {
  display: flex; flex-direction: column; gap: 1px; min-width: 0;
  padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface2);
}
.rung-mo { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.rung-name { font-size: 10px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rung-min { font-family: var(--mono); font-size: 9.5px; color: var(--faint); }
.rung.past { border-color: var(--green); }
.rung.past .rung-mo { color: var(--green-ink); }
.rung.cur { border-color: var(--green); background: var(--green-soft); box-shadow: var(--press-sm); }
.rung.cur .rung-mo, .rung.cur .rung-name { color: var(--green-ink); }

/* ============ first-run intro ============ */
.overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0, 0, 0, .55);
  display: grid; place-items: center; padding: 20px; overflow-y: auto;
}
.intro-card {
  width: min(580px, 100%); max-height: 92vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line2); border-radius: 10px;
  box-shadow: 6px 6px 0 rgba(0, 0, 0, .3);
  padding: 26px 30px 22px;
}
.intro-card h1 { margin: 8px 0 10px; font-size: 23px; }
.intro-card p { font-size: 14px; color: var(--muted); }
.intro-card p b { color: var(--ink); }
.intro-loop { background: var(--surface2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px 16px; }
.intro-loop ol { margin: 0; padding-left: 20px; font-size: 14px; }
.intro-loop li { margin-bottom: 4px; }
.intro-loop li:last-child { margin-bottom: 0; }
.intro-loop li::marker { font-family: var(--mono); color: var(--green-ink); font-weight: 600; }

/* onboarding tour chrome */
.ob-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ob-step { font-family: var(--mono); font-size: 11px; color: var(--faint); white-space: nowrap; }
.ob-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 20px; }
.ob-dots { display: flex; gap: 6px; }
.ob-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line2); }
.ob-dot.on { background: var(--green); transform: scale(1.25); }
.ob-dot.past { background: var(--green-deep); }
.ob-btns { display: flex; gap: 8px; }

/* on-page spotlight + floating coach */
.tour-dim { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .5); }
.tour-target {
  position: relative; z-index: 95;
  outline: 3px solid var(--gold); outline-offset: 5px; border-radius: 10px;
}
.tour-coach {
  position: fixed; z-index: 100; left: 50%; bottom: 22px; transform: translateX(-50%);
  width: min(440px, calc(100vw - 24px));
  background: var(--surface); border: 1px solid var(--line2); border-radius: 10px;
  box-shadow: 6px 6px 0 rgba(0, 0, 0, .35);
  padding: 15px 18px 13px;
}
.tour-coach h3 { font-family: var(--display); font-size: 18px; font-weight: 700; margin: 7px 0 6px; }
.tour-coach p { font-size: 13.5px; color: var(--muted); margin: 0; }
.tour-coach p b, .intro-card p b { color: var(--ink); }
.tour-coach .ob-foot { margin-top: 13px; }

/* ============ login: brand panel + form ============ */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(340px, 44%) 1fr; }
.login-brand {
  display: flex; flex-direction: column; justify-content: space-between; gap: 30px;
  padding: 52px 56px 26px;
  background:
    repeating-linear-gradient(135deg, transparent 0 7px, color-mix(in srgb, var(--ink) 3%, transparent) 7px 8px),
    var(--green-soft);
  border-right: 1px solid var(--line);
}
.brand-word { font-family: var(--display); font-size: 56px; font-weight: 800; line-height: .93; letter-spacing: -.02em; display: block; }
.login-brand .mission-art { font-size: 33px; margin: 28px 0 14px; }
.fx-line { display: block; margin: 6px 0 20px; }
.fx-big { font-family: var(--display); font-size: 26px; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; }
.fx-big b { color: var(--green-ink); font-size: 32px; }
.fx-big i { font-style: normal; font-size: 15px; color: var(--muted); font-weight: 600; margin-left: 2px; }
.fx-eq { color: var(--faint); font-weight: 600; font-size: 20px; padding: 0 2px; }
.fx-rate { display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; color: var(--faint); margin-top: 3px; text-transform: uppercase; }
.brand-line { max-width: 34ch; color: var(--muted); font-size: 14.5px; margin: 0; }
.login-brand-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.brand-serial { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; color: var(--faint); }
.login-toggles { display: flex; gap: 6px; align-items: center; }
.login-panel { display: grid; place-items: center; padding: 40px 24px; }
.auth-box { width: min(340px, 100%); }
.auth-tabs { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.auth-tabs button {
  flex: 1; background: none; border: none; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 600; color: var(--faint);
  padding: 10px 4px 11px; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.auth-tabs button.on { color: var(--ink); border-bottom-color: var(--green); }
.auth-tabs button:hover { color: var(--ink); }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field > span { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .13em; color: var(--muted); }
.field input {
  width: 100%; font: inherit; font-size: 14px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line2); border-radius: var(--r-sm);
  padding: 9px 11px; outline: none;
}
.field input:focus { border-color: var(--green); }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 38px; }
.pw-eye {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--faint); cursor: pointer;
  padding: 6px; display: grid; place-items: center;
}
.pw-eye:hover { color: var(--ink); }
.field-hint { font-style: normal; font-size: 11.5px; color: var(--faint); }
.field-hint.met { color: var(--green-ink); }
.pw-wrap.short input, .pw-wrap.short input:focus { border-color: var(--gold); }
.pw-wrap.ok input, .pw-wrap.ok input:focus { border-color: var(--green); }
.pw-meter { display: flex; gap: 4px; margin-top: 7px; }
.pw-seg { height: 3px; flex: 1; background: var(--line); border-radius: 2px; transition: background .15s; }
.pw-meter.s1 .pw-seg.on { background: var(--red); }
.pw-meter.s2 .pw-seg.on { background: var(--gold); }
.pw-meter.s3 .pw-seg.on { background: var(--green); }
.auth-error { color: var(--red); font-size: 13px; margin: -4px 0 0; }
.auth-form .btn.wide { margin-top: 4px; }
.brand-fact { margin: 26px 0; }
.fact-big { font-family: var(--display); font-weight: 800; font-size: 48px; line-height: 1; color: var(--green-ink); display: block; margin: 10px 0 10px; }
.fact-head { display: block; font-family: var(--display); font-size: 18.5px; font-weight: 700; margin-bottom: 6px; }
.fact-line { color: var(--muted); font-size: 14px; line-height: 1.62; max-width: 42ch; margin: 0; }
.sync-badge { font-family: var(--mono); font-size: 10.5px; color: var(--faint); padding: 0 6px; }
.sync-badge.ok { color: var(--green-ink); }
.sync-badge.pending { color: var(--gold); }
.sync-badge.error { color: var(--red); }

/* ============ dashboard ============ */
.stat-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 16px; }
.stat-row.four { grid-template-columns: repeat(4, 1fr); }
.stat {
  display: flex; align-items: center; gap: 11px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 12px 14px;
}
.stat b { font-family: var(--mono); font-size: 18px; font-weight: 600; display: block; line-height: 1.1; }
.stat b i { font-style: normal; font-size: 12px; color: var(--faint); font-weight: 500; }
.stat span { font-size: 11.5px; color: var(--muted); }
.stat-ic { color: var(--green); display: grid; place-items: center; width: 36px; height: 36px; flex: none; background: var(--surface2); border: 1px solid var(--line); border-radius: 8px; }
.stat-ic.flame { color: var(--gold); }
.stat.lit .stat-ic.flame { background: var(--gold-soft); border-color: var(--gold); }

.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(176px, 1fr)); gap: 10px; }
.plan-card {
  position: relative; display: flex; flex-direction: column; gap: 6px;
  background: var(--surface2); border: 1px solid var(--line); border-radius: var(--r);
  padding: 15px 13px 13px; color: var(--ink); font-size: 13.5px;
  transition: transform .1s, box-shadow .1s;
}
.plan-card:hover { text-decoration: none; border-color: var(--line2); transform: translate(-1px, -1px); box-shadow: var(--press-sm); }
.plan-card.hot { border-color: var(--green); background: var(--green-soft); }
.plan-card .ic { color: var(--green-ink); }
.plan-step {
  position: absolute; top: -4px; right: 9px;
  font-family: var(--display); font-size: 42px; font-weight: 800; line-height: 1;
  color: var(--ink); opacity: .08; pointer-events: none;
}
.plan-card b { font-size: 13.5px; line-height: 1.3; }

.rounds { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.round { background: var(--surface2); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; font-size: 12.5px; display: flex; flex-direction: column; gap: 7px; }
.round-top { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.round-top b { font-size: 12.5px; }
.round-pct { font-family: var(--mono); font-weight: 600; color: var(--green-ink); font-size: 12px; }
.round-mods { display: flex; gap: 5px; flex-wrap: wrap; }
.round-mods a:hover { text-decoration: none; }

.track-row {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center;
  padding: 10px 4px; color: var(--ink); font-size: 13.5px; font-weight: 500;
  border-bottom: 1px solid var(--line);
}
.track-row:last-of-type { border-bottom: none; }
.track-row:hover { text-decoration: none; color: var(--green-ink); }
.track-row .bar { grid-column: 1 / -1; }
.track-row > span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.track-nums { color: var(--faint); font-family: var(--mono); font-size: 12px; }

/* ============ study ============ */
.track { margin-bottom: 26px; }
.track-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 11px; }
.track-head h2 { font-family: var(--display); font-size: 17px; }
.mod-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; }
.mod-card {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 15px; color: var(--ink); transition: transform .1s, box-shadow .1s;
}
.mod-card:hover { text-decoration: none; transform: translate(-1px, -1px); box-shadow: var(--press-sm); border-color: var(--line2); }
.mod-top { display: flex; gap: 11px; align-items: center; }
.mod-name { display: flex; flex-direction: column; line-height: 1.25; }
.mod-name b { font-size: 14.5px; }
.mod-meta { display: flex; justify-content: space-between; align-items: center; }

/* ============ module detail ============ */
.module-head h1 { margin-top: 2px; }
.intro { padding: 14px 20px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.filters { display: flex; gap: 7px; flex-wrap: wrap; }

.topics { display: flex; flex-direction: column; gap: 9px; }
.topic {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; scroll-margin-top: 20px;
}
.topic.known { border-left: 3px solid var(--green); }
.topic.review { border-left: 3px solid var(--gold); }
.topic.open { border-color: var(--line2); box-shadow: var(--press-sm); }
.topic-head {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  background: none; border: none; color: var(--ink); font-weight: 600; font-size: 14.5px;
  padding: 13px 16px; cursor: pointer;
}
.topic-head:hover { background: var(--surface2); }
.topic-title { flex: 1; }
.dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--line2); }
.dot.known { background: var(--green); }
.dot.review { background: var(--gold); }
.chev { color: var(--faint); transition: transform .2s; display: grid; place-items: center; }
.topic.open .chev { transform: rotate(-90deg); }
.topic-body { padding: 2px 18px 16px 35px; }
.topic-foot { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.topic-actions { display: flex; gap: 8px; }
.note-wrap summary { cursor: pointer; color: var(--faint); font-size: 12.5px; user-select: none; }
.note-wrap textarea {
  width: 100%; min-height: 70px; margin-top: 8px; resize: vertical;
  font: inherit; font-size: 13.5px; color: var(--ink);
  background: var(--gold-soft); border: 1px solid var(--line2); border-radius: var(--r-sm);
  padding: 10px 12px; outline: none;
}
.note-wrap textarea:focus { border-color: var(--gold); }

/* markdown content — tuned for reading, not skimming past */
.md { font-size: 14.5px; line-height: 1.66; max-width: 72ch; color: var(--md-text); }
.md p { margin: 0 0 12px; }
.md p:last-child { margin-bottom: 0; }
.md strong { color: var(--ink); }
.md .callout { border: 1px solid var(--line2); border-left-width: 3px; border-radius: 7px; padding: 10px 14px 9px; margin: 0 0 12px; }
.md .callout::before { display: block; font-family: var(--mono); font-size: 9.5px; font-weight: 600; letter-spacing: .13em; margin-bottom: 4px; }
.md .callout p { margin: 0; }
.trap-callout { border-color: var(--gold) !important; background: var(--gold-soft); }
.trap-callout::before { content: 'INTERVIEW TRAP'; color: var(--gold); }
.say-callout { border-color: var(--green) !important; background: var(--green-soft); }
.say-callout::before { content: 'SAY THIS OUT LOUD'; color: var(--green-ink); }
.md code {
  font-family: var(--mono); font-size: 12.5px;
  background: var(--green-soft); color: var(--green-ink);
  border-radius: 4px; padding: 1px 5px;
}
.md ul, .md ol { margin: 0 0 12px; padding-left: 22px; }
.md li { margin-bottom: 4px; }
.md a { word-break: break-all; }
pre.code {
  position: relative; margin: 0 0 14px; overflow-x: auto;
  background: var(--code-bg); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 14px 16px;
}
pre.code code { font-family: var(--mono); font-size: 12.5px; line-height: 1.6; color: var(--code-text); background: none; padding: 0; }
pre.code[data-lang]::after {
  content: attr(data-lang); position: absolute; top: 7px; right: 11px;
  font-size: 10px; color: #7b8a7d; font-family: var(--mono); text-transform: uppercase;
}

/* ============ dsa problems (NeetCode 150) ============ */
.dsa-log { margin-top: 24px; }
.dsa-log .btn { margin-top: 12px; }
.lvl-tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 14px; }
.lvl-tab {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 9px 12px; color: var(--muted); position: relative;
}
.lvl-tab b { font-size: 13px; color: var(--ink); }
.lvl-tab span { font-size: 11px; }
.lvl-tab i { position: absolute; top: 8px; right: 10px; font-style: normal; font-family: var(--mono); font-size: 10.5px; color: var(--faint); }
.lvl-tab:hover { border-color: var(--line2); }
.lvl-tab.on { border-color: var(--green); background: var(--green-soft); }
.lvl-tab.on b, .lvl-tab.on i { color: var(--green-ink); }

.prob-list { display: flex; flex-direction: column; margin-top: 12px; }
.prob-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 2px; border-bottom: 1px solid var(--line); font-size: 14px;
}
.prob-row:last-child { border-bottom: none; }
.prob-row.solved .prob-name { color: var(--faint); }
.prob-st {
  width: 24px; height: 24px; flex: none; display: grid; place-items: center;
  cursor: pointer; padding: 0;
  background: var(--surface); border: 1.5px solid var(--line2); border-radius: 50%;
  color: var(--faint); transition: transform .1s, border-color .1s;
}
.prob-st:hover { border-color: var(--green); transform: scale(1.1); }
.prob-st.solved { border-color: var(--green); color: var(--green-ink); background: var(--green-soft); }
.prob-st.review { border-color: var(--gold); color: var(--gold); background: var(--gold-soft); }
.prob-name { color: var(--ink); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prob-name:hover { color: var(--green-ink); }
.chip.core { color: var(--green-ink); border-color: var(--green); }
.chip.hotchip { color: var(--red); border-color: var(--red); background: var(--red-soft); }
.chip.prem { color: var(--faint); border-style: dashed; }
.prob-date { width: 80px; text-align: right; flex: none; font-family: var(--mono); font-size: 11px; }
.cat .bar { margin-bottom: 2px; }

/* ============ flashcards ============ */
.deck-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.deck-chip {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 7px 11px; color: var(--muted); transition: border-color .1s;
}
.deck-chip b { font-size: 13px; color: var(--ink); font-weight: 600; }
.deck-chip span { font-size: 11px; font-family: var(--mono); }
.deck-chip.on { border-color: color-mix(in srgb, var(--c, var(--green)) 55%, var(--ink)); background: color-mix(in srgb, var(--c, var(--green)) 10%, var(--surface)); }
.deck-chip:hover { border-color: var(--line2); }

.modes { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.mode {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 10px 14px; color: var(--ink);
}
.mode.on { border-color: var(--green); background: var(--green-soft); }

.deck-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }
.ds-item { background: var(--surface2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 9px; text-align: center; }
.ds-item b { display: block; font-family: var(--mono); font-size: 17px; font-weight: 600; }
.ds-item span { font-size: 11px; color: var(--muted); }

.boxes { display: flex; align-items: flex-end; gap: 8px; height: 72px; padding: 0 4px 4px; position: relative; margin-bottom: 14px; }
.box-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.box-bar { width: 100%; min-height: 2px; background: var(--green); border-radius: 3px 3px 0 0; opacity: .85; }
.box-col span { font-family: var(--mono); font-size: 10px; color: var(--faint); }
.box-note { position: absolute; right: 4px; top: -6px; }

.inline-setting { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13.5px; color: var(--muted); padding: 8px 0; }
.inline-setting input, .inline-setting select {
  font: inherit; color: var(--ink); background: var(--surface2);
  border: 1px solid var(--line2); border-radius: 6px; padding: 5px 9px; width: 80px; outline: none;
}
.inline-setting select { width: auto; }
.inline-setting input:focus, .inline-setting select:focus { border-color: var(--green); }

.fc { perspective: 1400px; cursor: pointer; margin-bottom: 16px; }
.fc-inner {
  position: relative; height: min(480px, 60vh); min-height: 320px;
  transform-style: preserve-3d; transition: transform .4s cubic-bezier(.2, .7, .3, 1);
}
.fc.flipped .fc-inner { transform: rotateY(180deg); }
.fc-face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  background: var(--surface); border: 1px solid var(--line2); border-radius: 8px;
  padding: 26px 30px; overflow-y: auto; box-shadow: var(--press);
}
.fc-front { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; }
.fc-tags { display: flex; align-items: center; gap: 8px; }
.fc-q { font-family: var(--display); font-size: 24px; font-weight: 700; letter-spacing: -.01em; max-width: 620px; }
.fc-back { transform: rotateY(180deg); }

.grades { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; transition: opacity .2s; }
.grades.hidden-soft { opacity: .35; }
.btn.grade { flex-direction: column; gap: 1px; padding: 10px; font-size: 14.5px; }
.btn.grade span { font-family: var(--mono); font-size: 11px; font-weight: 500; opacity: .7; }
.btn.grade.bad:hover { border-color: var(--red); color: var(--red); }
.btn.grade.ok:hover { border-color: var(--green); color: var(--green-ink); }
.btn.grade.great:hover { border-color: var(--green-ink); color: var(--green-ink); background: var(--green-soft); }

/* ============ quiz / exam ============ */
.q-card { padding: 22px 26px; }
.q-meta { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.q-text { font-family: var(--font); font-size: 17.5px; font-weight: 700; margin-bottom: 16px; line-height: 1.4; text-transform: none; letter-spacing: 0; color: var(--ink); }
.q-text.small { font-size: 14.5px; margin-bottom: 6px; display: flex; gap: 8px; align-items: baseline; }
.options { display: flex; flex-direction: column; gap: 9px; margin-bottom: 16px; }
.option {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  font-size: 14px; color: var(--ink); cursor: pointer;
  background: var(--surface2); border: 1px solid var(--line2); border-radius: var(--r-sm);
  padding: 11px 13px; transition: border-color .1s, background .1s;
}
.option:hover:not(:disabled) { border-color: var(--green); background: var(--surface); }
.option:disabled { cursor: default; }
.opt-letter {
  display: grid; place-items: center; width: 26px; height: 26px; flex: none;
  font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--muted);
  border: 1px solid var(--line2); border-radius: 50%; background: var(--surface);
}
.option.correct { border-color: var(--green); background: var(--green-soft); }
.option.correct .opt-letter { border-color: var(--green); color: var(--green-ink); }
.option.wrong { border-color: var(--red); background: var(--red-soft); }
.option.wrong .opt-letter { border-color: var(--red); color: var(--red); }
.option.dim { opacity: .45; }
.option.picked { border-color: var(--green); background: var(--green-soft); }
.option.picked .opt-letter { border-color: var(--green); color: var(--green-ink); }

.explain { border-radius: var(--r-sm); padding: 12px 15px; font-size: 13.5px; margin-bottom: 14px; color: var(--md-text); }
.explain.good-b { background: var(--green-soft); border: 1px solid var(--green); }
.explain.bad-b { background: var(--red-soft); border: 1px solid var(--red); }
.explain b { color: var(--ink); }

.quiz-intro { max-width: 560px; }
.palette { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.pal {
  width: 31px; height: 31px; display: grid; place-items: center;
  font-family: var(--mono); font-size: 12px; font-weight: 600; cursor: pointer;
  color: var(--muted); background: var(--surface);
  border: 1px solid var(--line); border-radius: 6px;
}
.pal.ans { color: var(--green-ink); border-color: var(--green); background: var(--green-soft); }
.pal.cur { border-color: var(--ink); color: var(--ink); background: var(--surface); box-shadow: var(--press-sm); }
.exam-nav { display: flex; gap: 10px; flex-wrap: wrap; }
.clock { font-family: var(--mono); font-weight: 600; font-size: 15px; color: var(--gold); background: var(--gold-soft); border: 1px solid var(--gold); border-radius: 6px; padding: 5px 11px; }

.finish { display: grid; place-items: center; padding: 26px 0 8px; }
.finish-card { text-align: center; max-width: 480px; margin-bottom: 18px; }
.finish-card h1 { justify-content: center; }
.finish-actions { display: flex; gap: 10px; justify-content: center; margin-top: 16px; }
.miss { border-bottom: 1px solid var(--line); padding: 13px 2px; }
.miss:last-child { border-bottom: none; }
.miss p { margin: 3px 0; font-size: 13.5px; }
.miss.was-right { opacity: .7; }

/* ============ glossary & search ============ */
.big-search {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 11px 15px; margin-bottom: 16px; color: var(--faint); cursor: text;
}
.big-search input { flex: 1; background: none; border: none; outline: none; color: var(--ink); font: inherit; font-size: 15px; }
.gloss-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gloss {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 11px 14px; font-size: 13.5px; display: flex; flex-direction: column; gap: 3px;
}
.gloss b { color: var(--green-ink); font-family: var(--mono); font-size: 12.5px; }
.gloss span { color: var(--muted); }
.search-hit {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 11px 4px; border-bottom: 1px solid var(--line); color: var(--ink);
}
.search-hit:last-child { border-bottom: none; }
.search-hit:hover { text-decoration: none; }
.search-hit:hover b { color: var(--green-ink); }
.search-hit div { display: flex; flex-direction: column; gap: 2px; }

.refs { margin: 0; padding-left: 20px; }
.refs li { margin-bottom: 6px; }

/* community chat */
.chat-panel { display: flex; flex-direction: column; height: calc(100vh - 230px); min-height: 380px; }
.chat-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 1px; padding: 2px; }
.chat-msg { display: flex; gap: 10px; padding: 7px 10px; border-radius: 6px; }
.chat-msg:hover { background: var(--surface2); }
.chat-msg .avatar { width: 27px; height: 27px; font-size: 11.5px; }
.chat-msg-main { min-width: 0; flex: 1; }
.chat-meta { display: flex; gap: 8px; align-items: baseline; }
.chat-name { font-weight: 600; font-size: 13px; }
.chat-msg.mine .chat-name { color: var(--green-ink); }
.chat-time { font-family: var(--mono); font-size: 10px; color: var(--faint); }
.chat-body { font-size: 14px; color: var(--md-text); overflow-wrap: anywhere; }
.chat-form { display: flex; gap: 8px; margin-top: 10px; }
.chat-form input {
  flex: 1; font: inherit; font-size: 14px; color: var(--ink);
  background: var(--surface2); border: 1px solid var(--line2); border-radius: var(--r-sm);
  padding: 9px 12px; outline: none; min-width: 0;
}
.chat-form input:focus { border-color: var(--green); }
.chat-live { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
.chat-live.on { color: var(--green-ink); }

/* lifetime purchase banner */
.buy-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--gold-soft); border: 1px solid var(--gold); border-radius: var(--r);
  padding: 12px 16px; margin-bottom: 18px;
}
.buy-bar b { display: block; font-size: 14.5px; }
.buy-bar span { font-size: 12.5px; color: var(--muted); }

/* toasts */
.toasts {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%);
  z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none; width: min(420px, calc(100vw - 24px));
}
.toast {
  background: var(--surface); border: 1px solid var(--line2); border-left: 3px solid var(--green);
  border-radius: 6px; box-shadow: var(--press-sm);
  padding: 10px 16px; font-size: 13.5px; font-weight: 500; color: var(--ink);
  opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s;
  max-width: 100%;
}
.toast.in { opacity: 1; transform: none; }
.toast.warn { border-left-color: var(--gold); }
.toast.err { border-left-color: var(--red); }

/* layered depth — matters in light mode, a no-op in dark */
.panel, .mod-card, .stat, .topic, .round, .plan-card, .deck-chip, .lvl-tab, .gloss { box-shadow: var(--panel-shadow); }
.topic.open { box-shadow: var(--press-sm); }
.mod-card:hover, .plan-card:hover { box-shadow: var(--press-sm); }

/* ============ responsive ============ */
@media (max-width: 1080px) {
  .stat-row { grid-template-columns: repeat(3, 1fr); }
  .rounds { grid-template-columns: repeat(2, 1fr); }
  .mod-grid { grid-template-columns: repeat(2, 1fr); }
  .lvl-tabs { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; min-height: 100vh; }
  .login-brand { padding: 24px 20px 18px; gap: 14px; border-right: none; border-bottom: 1px solid var(--line); }
  .brand-word { font-size: 30px; }
  .brand-word br { display: none; }
  .login-brand .mission-art { font-size: 22px; margin: 10px 0 8px; }
  .fx-big { font-size: 20px; }
  .fx-line { margin: 2px 0 10px; }
  .brand-line { font-size: 13px; }
  .login-panel { align-items: start; padding: 28px 18px 44px; }
  .brand-fact { display: none; }
  .sidebar { transform: translateX(-100%); transition: transform .22s; width: 258px; }
  .sidebar.open { transform: none; box-shadow: 6px 0 24px rgba(28, 38, 33, .18); }
  .backdrop.show { display: block; position: fixed; inset: 0; z-index: 30; background: rgba(0, 0, 0, .45); }
  .pay-ladder { grid-template-columns: repeat(3, 1fr); }
  .main { margin-left: 0; padding: 66px 16px 60px; }
  .menu-btn {
    display: flex; flex-direction: column; justify-content: center; gap: 4px;
    position: fixed; top: 13px; left: 13px; z-index: 50;
    width: 40px; height: 40px; padding: 10px; cursor: pointer;
    background: var(--surface); border: 1px solid var(--line2); border-radius: 8px;
    box-shadow: var(--press-sm);
  }
  .menu-btn span { display: block; height: 2px; background: var(--ink); border-radius: 2px; }
  .two-col { grid-template-columns: 1fr; }
  .gloss-list { grid-template-columns: 1fr; }
  .stat-row, .stat-row.four { grid-template-columns: repeat(2, 1fr); }
  .prob-date { display: none; }
  .chip.prem { display: none; }
  .paycard-amount { font-size: 32px; }
  .fc-q { font-size: 20px; }
}
@media (max-width: 560px) {
  .mod-grid, .rounds, .lvl-tabs { grid-template-columns: 1fr; }
  .deck-summary { grid-template-columns: repeat(2, 1fr); }
  h1 { font-size: 22px; }
  .main { padding: 62px 12px 56px; }
  .panel { padding: 15px 14px; }
  .q-card { padding: 16px 15px; }
  .login-form { flex-direction: column; }
  .table { font-size: 12.5px; }
  .table th, .table td { padding: 6px 6px; }
  .paycard { padding: 16px 16px 12px; }
  .paycard-amount { font-size: 34px; }
  .paycard-main { gap: 12px; }
  .paycard-side { align-items: flex-start; }
  .pay-stamp { font-size: 11.5px; padding: 3px 9px; }
  .pay-ladder { gap: 5px; }
  .rung { padding: 6px 7px; }
  .prob-row .chip.core { display: none; }
  .intro-card { padding: 20px 18px 16px; }
  .intro-card h1 { font-size: 19.5px; }
  h1.mission { font-size: 23px; }
  .mission-art { font-size: 34px; gap: 10px; }
  .pay-watermark { font-size: 150px; top: -30px; }
  .tour-coach { left: 10px; right: 10px; transform: none; width: auto; bottom: 10px; }
  .ob-foot { flex-wrap: wrap; }
  .ob-dots { order: -1; width: 100%; justify-content: center; margin-bottom: 4px; }
  .grades { gap: 7px; }
  .btn.grade { padding: 9px 6px; font-size: 13.5px; }
  .fc-face { padding: 20px 18px; }
  .finish-actions { flex-wrap: wrap; }
  .exam-nav .btn { flex: 1; }
  .chat-panel { height: calc(100vh - 200px); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- admin dashboard ---------- */
.mx-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.mx-card { background: var(--surface2); border: 1px solid var(--line); border-radius: 10px; padding: 14px 15px; display: grid; gap: 2px; }
.mx-card b { font-size: 12px; color: var(--muted); font-weight: 600; }
.mx-big { font-size: 26px; font-weight: 700; color: var(--green-ink); font-variant-numeric: tabular-nums; }
.mx-sub { font-size: 11px; color: var(--faint); }
.mx-note { font-size: 11.5px; }
.mx-row { display: grid; grid-template-columns: minmax(90px, 200px) 1fr auto; gap: 10px; align-items: center; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.mx-row:last-child { border-bottom: 0; }
.mx-label { font-size: 12.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mx-path { font-family: var(--mono, monospace); font-size: 11.5px; color: var(--muted); }
.mx-bar { background: var(--surface2); border-radius: 99px; height: 10px; overflow: hidden; border: 1px solid var(--line); }
.mx-bar i { display: block; height: 100%; background: var(--green); }
.mx-val { font-size: 11.5px; color: var(--faint); white-space: nowrap; font-variant-numeric: tabular-nums; }
.mx-chart { display: flex; align-items: flex-end; gap: 4px; height: 120px; padding-top: 8px; }
.mx-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.mx-col i { display: block; width: 100%; max-width: 26px; background: var(--green); border-radius: 3px 3px 0 0; min-height: 2px; }
.mx-col span { font-size: 9.5px; color: var(--faint); }
.mx-purchases { display: flex; gap: 8px; flex-wrap: wrap; }
.mx-chip { background: var(--surface2); border: 1px solid var(--line); border-radius: 99px; padding: 4px 12px; font-size: 12px; color: var(--muted); }
.mx-chip b { color: var(--ink); }

/* paid lock panels */
.lock-panel { text-align: center; padding: 44px 24px; }
.lock-badge { font-size: 34px; margin-bottom: 6px; }
.lock-panel h2 { margin: 0 0 8px; }
.lock-panel .muted { max-width: 46ch; margin: 0 auto 8px; }
.lock-panel .btn { margin-top: 14px; }
.lock-note { display: block; margin-top: 10px; font-size: 11.5px; color: var(--faint); }
.flash-lock-note { font-size: 12px; color: var(--gold); margin: 6px 0 0; }

.field-opt { font-style: normal; font-size: 11px; color: var(--faint); font-weight: 400; }
.auth-forgot { margin: 2px 0 0; font-size: 12.5px; }
.auth-forgot a { color: var(--muted); }

a.brand-word { color: inherit; text-decoration: none; }
.paid-badge { font-size: 11.5px; font-weight: 700; color: var(--green-ink); border: 1px solid var(--green-deep); background: var(--green-soft); border-radius: 999px; padding: 5px 12px; align-self: center; }
.welcome-paid { background: var(--green-soft); border: 1px solid var(--green-deep); border-radius: 12px; padding: 18px 20px; margin-bottom: 14px; }
.welcome-paid b { color: var(--green-ink); font-size: 16px; }
.welcome-paid p { margin: 6px 0 10px; color: var(--muted); font-size: 14px; }

@media (max-width: 560px) {
  .mx-cards { grid-template-columns: repeat(2, 1fr); }
  .mx-big { font-size: 21px; }
  .mx-chart { height: 88px; }
  .mx-row { grid-template-columns: minmax(70px, 110px) 1fr auto; gap: 7px; }
  .mx-val { font-size: 10px; }
  .lock-panel { padding: 32px 14px; }
  .buy-bar { flex-direction: column; align-items: flex-start; gap: 10px; }
  .buy-bar .btn { width: 100%; }
  .head-actions { flex-wrap: wrap; }
  .welcome-paid { padding: 14px 14px; }
  .flash-lock-note { line-height: 1.5; }
}

/* spoken simulator */
.sim-tracks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sim-track { text-align: left; background: var(--surface2); border: 1px solid var(--line2); border-radius: 10px; padding: 16px 15px; cursor: pointer; color: var(--ink); display: grid; gap: 4px; }
.sim-track:hover { border-color: var(--green); }
.sim-track b { font-size: 15px; }
.sim-track span { font-size: 12px; color: var(--muted); }
.sim-priv { margin-top: 12px; }
.sim-qpanel .sim-q { margin: 6px 0 12px; font-size: 21px; line-height: 1.35; }
.sim-meta { font-family: var(--mono, monospace); font-size: 12px; color: var(--faint); }
.sim-transcript { width: 100%; margin-top: 12px; background: var(--code-bg); color: var(--ink); border: 1px solid var(--line2); border-radius: 10px; padding: 12px; font-size: 14px; line-height: 1.6; resize: vertical; }
.sim-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.btn.danger { background: var(--red-soft); border-color: var(--red); color: var(--red); }
.sim-score { display: grid; grid-template-columns: 110px 1fr auto; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.sim-score span:first-child { font-size: 13px; color: var(--muted); }
.sim-dots { display: flex; gap: 5px; }
.sim-dots i { width: 22px; height: 8px; border-radius: 99px; background: var(--surface2); border: 1px solid var(--line); }
.sim-dots i.on { background: var(--green); border-color: var(--green-deep); }
.sim-score b { font-size: 12.5px; color: var(--green-ink); }
.sim-fillers { font-size: 13px; color: var(--gold); margin: 10px 0; }
.sim-fix, .sim-good { border-radius: 10px; padding: 12px 14px; margin: 10px 0; }
.sim-fix { background: var(--red-soft); border: 1px solid var(--red); }
.sim-good { background: var(--green-soft); border: 1px solid var(--green-deep); }
.sim-fix .tag, .sim-good .tag { display: block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 4px; }
.sim-fix .tag { color: var(--red); }
.sim-good .tag { color: var(--green-ink); }
.sim-fix p, .sim-good p { margin: 0; font-size: 14px; }
.sim-model { margin-top: 14px; border-top: 1px dashed var(--line2); padding-top: 12px; }
.sim-hist-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.sim-hist-row b { color: var(--green-ink); }
.sim-hist-q { font-family: var(--mono, monospace); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 700px) { .sim-tracks { grid-template-columns: 1fr; } }
