/* ============================================================
   Mighty Money — styles
   Mobile-first (designed around 390px), polished on desktop.
   Dark, calm, credible. Mint primary, frost-blue ecosystem
   accent, soft gold for milestones.
   ============================================================ */

:root {
  --bg: #0a1020;
  --bg-2: #0e1526;
  --surface: #141d31;
  --surface-2: #1a2540;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);

  --text: #f2efe8;
  --muted: #a2adc4;

  --mint: #4fd1a5;
  --mint-soft: rgba(79, 209, 165, 0.14);
  --mint-line: rgba(79, 209, 165, 0.34);

  --frost: #7fb4ff;
  --frost-soft: rgba(127, 180, 255, 0.13);

  --gold: #e6c67e;
  --gold-soft: rgba(230, 198, 126, 0.14);

  --warn: #f0b37a;
  --hot: #f28d7c;

  --ink: #061021;

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --pad: 16px;
  --maxw: 460px;
  --tabh: 68px;
  --rail: 0px;

  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --t: 180ms cubic-bezier(.2, .7, .3, 1);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(1100px 620px at 50% -12%, rgba(79, 209, 165, 0.10), transparent 60%),
    radial-gradient(900px 520px at 92% 8%, rgba(127, 180, 255, 0.09), transparent 62%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3, h4 { margin: 0 0 8px; line-height: 1.22; letter-spacing: -0.01em; }
h1 { font-size: 28px; }
h2 { font-size: 23px; }
h3 { font-size: 18px; }
h4 { font-size: 16px; }
p { margin: 0 0 12px; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0 0 12px; padding-left: 20px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; color: var(--frost); }

a { color: var(--frost); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 3px solid var(--frost);
  outline-offset: 2px;
  border-radius: 8px;
}

.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.ico.lg { width: 30px; height: 30px; }

/* ---------- Layout shell ---------- */
.app {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.shell {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* The sidebar only exists from the tablet breakpoint up. */
.sidebar { display: none; }

.wordmark {
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.appbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(10, 16, 32, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-weight: 650;
  letter-spacing: -0.01em;
  min-height: 44px;
  padding: 0 4px;
}
.brand:hover { text-decoration: none; }
.brand .mark {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: linear-gradient(150deg, var(--mint), #2f9f86);
  color: var(--ink);
  box-shadow: 0 4px 14px rgba(79, 209, 165, 0.28);
}
.brand .mark svg { width: 19px; height: 19px; stroke-width: 2; }
.brand .wordmark { display: block; font-size: 14.5px; line-height: 1.2; }
.brand small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: 0.01em; }

.appbar-actions { display: flex; gap: 6px; }
.iconbtn {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 12px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--t), color var(--t), border-color var(--t);
}
.iconbtn:hover { background: var(--surface); color: var(--text); border-color: var(--line); text-decoration: none; }

.view {
  flex: 1;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px var(--pad) calc(var(--tabh) + 34px);
}
.view:focus { outline: none; }

/* ---------- Bottom navigation ---------- */
.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 30;
  display: flex;
  justify-content: center;
  gap: 2px;
  padding: 6px max(10px, env(safe-area-inset-left)) calc(6px + env(safe-area-inset-bottom));
  background: rgba(10, 16, 32, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.tabbar a {
  flex: 1 1 0;
  max-width: 120px;
  min-height: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 14px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 560;
  letter-spacing: 0.01em;
  transition: color var(--t), background var(--t);
}
.tabbar a:hover { text-decoration: none; color: var(--text); }
.tabbar a.on { color: var(--mint); background: var(--mint-soft); }
.tabbar a.on .ico { stroke-width: 2; }

/* ---------- Buttons ---------- */
.btn {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: transform var(--t), background var(--t), border-color var(--t), opacity var(--t);
}
.btn:hover { text-decoration: none; background: #22304f; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn .ico { width: 18px; height: 18px; }

.btn.primary {
  background: linear-gradient(150deg, var(--mint), #34ac8d);
  border-color: transparent;
  color: var(--ink);
  box-shadow: 0 8px 22px rgba(79, 209, 165, 0.22);
}
.btn.primary:hover { background: linear-gradient(150deg, #63dcb2, #3ab998); }
.btn.ghost { background: transparent; border-color: var(--line-strong); color: var(--text); }
.btn.ghost:hover { background: var(--surface); }
.btn.danger { background: rgba(242, 141, 124, 0.14); border-color: rgba(242, 141, 124, 0.5); color: #ffd9d2; }
.btn.danger:hover { background: rgba(242, 141, 124, 0.22); }
.btn.lg { width: 100%; min-height: 54px; font-size: 17px; }
.btn.sm { min-height: 40px; padding: 8px 13px; font-size: 14px; border-radius: 11px; }

.row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.row > * { flex: 1 1 45%; }
.row.tight { gap: 8px; }
.row.tight > * { flex: 0 0 auto; }

/* ---------- Cards ---------- */
.card {
  display: block;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)), var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px;
  margin: 0 0 14px;
  color: var(--text);
  box-shadow: var(--shadow);
}
a.card:hover { text-decoration: none; border-color: var(--line-strong); background: var(--surface-2); }
.card > .btn { margin-top: 12px; }
.card.accent { border-color: var(--mint-line); background: linear-gradient(180deg, var(--mint-soft), rgba(79, 209, 165, 0.03)), var(--surface); }
.card.warn { border-color: rgba(240, 179, 122, 0.32); background: linear-gradient(180deg, rgba(240, 179, 122, 0.09), transparent), var(--surface); }
.card.action { border-color: var(--frost-soft); background: linear-gradient(180deg, var(--frost-soft), transparent), var(--surface); }
.card.move { border-color: var(--gold-soft); background: linear-gradient(180deg, var(--gold-soft), transparent), var(--surface); }
.card.ebook { border-style: dashed; border-color: var(--line-strong); box-shadow: none; }
.card.statement { background: var(--bg-2); }

.eyebrow {
  display: flex; align-items: center; gap: 7px;
  margin: 0 0 8px;
  font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--mint);
}
.eyebrow .ico { width: 15px; height: 15px; }
.eyebrow.center { justify-content: center; }
.card.move .eyebrow { color: var(--gold); }
.card.action .eyebrow, .card.ebook .eyebrow { color: var(--frost); }
.card.warn .eyebrow { color: var(--warn); }

.muted { color: var(--muted); }
.small { font-size: 14.5px; }
.micro { font-size: 12.5px; line-height: 1.45; }
.block { display: block; }
.center { text-align: center; }
.accent-txt { color: var(--mint); }

.note {
  display: flex; gap: 9px;
  padding: 12px 14px;
  margin: 4px 0 14px;
  border-radius: var(--r-sm);
  background: rgba(127, 180, 255, 0.07);
  border: 1px solid var(--frost-soft);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.note .ico { width: 16px; height: 16px; color: var(--frost); margin-top: 2px; }

.toast {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: var(--mint-soft);
  border: 1px solid var(--mint-line);
  color: var(--text);
  font-size: 14px;
}

.win {
  display: flex; align-items: center; gap: 8px;
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: var(--gold-soft);
  border: 1px solid rgba(230, 198, 126, 0.28);
  color: #f6e6c2;
  font-size: 14px;
  font-weight: 550;
}
.win .ico { width: 17px; height: 17px; color: var(--gold); }

/* ---------- Hero / home ---------- */
.hero { text-align: center; padding: 12px 4px 20px; }
.hero-mark {
  width: 62px; height: 62px;
  margin: 0 auto 14px;
  display: grid; place-items: center;
  border-radius: 20px;
  background: linear-gradient(150deg, var(--mint), #2c8f79);
  color: var(--ink);
  box-shadow: 0 14px 34px rgba(79, 209, 165, 0.28);
}
.hero-mark.small { width: 54px; height: 54px; border-radius: 17px; }
.hero h1 { font-size: 30px; margin-bottom: 6px; }
.tagline { color: var(--mint); font-weight: 620; letter-spacing: 0.01em; margin-bottom: 10px; }
.hero-body { color: var(--muted); max-width: 34ch; margin: 0 auto 18px; }
.hero .btn { max-width: 340px; }
.hero .micro { margin-top: 10px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.tile {
  display: flex; flex-direction: column; gap: 4px;
  min-height: 96px;
  padding: 14px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
}
.tile:hover { text-decoration: none; border-color: var(--mint-line); background: var(--surface-2); }
.tile .ico { color: var(--mint); margin-bottom: 4px; }

.eco-strip {
  margin: 18px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.eco-strip a {
  display: inline-block;
  min-height: 44px;
  padding: 12px 8px;
  color: var(--frost);
}

/* ---------- Progress bar ---------- */
.bar {
  height: 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
  margin: 12px 0 6px;
}
.bar span {
  display: block; height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--mint), var(--frost));
  transition: width var(--t);
}

.stats { display: flex; gap: 10px; margin-top: 12px; }
.stat {
  flex: 1;
  padding: 10px 8px;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  text-align: center;
}
.stat strong { display: block; font-size: 22px; color: var(--mint); line-height: 1.2; }

/* ---------- Screen heads / back links ---------- */
.screen-head { margin: 4px 0 16px; }
.screen-head .bar { margin-bottom: 4px; }
.screen-head.center { text-align: center; }

.backlink {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px;
  margin-bottom: 4px;
  padding: 0;
  background: none; border: 0;
  color: var(--muted);
  font: inherit; font-size: 14px; font-weight: 550;
  cursor: pointer;
}
.backlink:hover { color: var(--text); text-decoration: none; }
.backlink .ico { width: 17px; height: 17px; }

/* ---------- Paths / lessons ---------- */
.path-card { transition: border-color var(--t), background var(--t); }
.path-top { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.path-ico {
  width: 42px; height: 42px; flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 13px;
  background: var(--mint-soft);
  color: var(--mint);
  border: 1px solid var(--mint-line);
}
.path-ico.big { width: 52px; height: 52px; border-radius: 16px; margin-bottom: 10px; }
.path-ico.big .ico { width: 26px; height: 26px; }
.path-top h3 { margin: 0 0 2px; }
.path-top > div:nth-child(2) { flex: 1; }

.pill {
  display: inline-grid; place-items: center;
  width: 28px; height: 28px;
  border-radius: 99px;
  background: var(--mint-soft);
  color: var(--mint);
  border: 1px solid var(--mint-line);
}
.pill .ico { width: 16px; height: 16px; stroke-width: 2.4; }
.pill.done.inline {
  width: auto; height: auto;
  display: inline-flex; gap: 6px; align-items: center;
  padding: 4px 10px;
  font-size: 12px; font-weight: 600;
  color: var(--mint);
}

.lesson-list { list-style: none; padding: 0; margin: 0; }
.lesson-list li { margin-bottom: 10px; }
.lesson-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px;
  min-height: 64px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
}
.lesson-row:hover { text-decoration: none; border-color: var(--mint-line); background: var(--surface-2); }
.lesson-row .numb {
  width: 30px; height: 30px; flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  font-size: 13px; font-weight: 700; color: var(--muted);
}
.lesson-row.done .numb { background: var(--mint-soft); border-color: var(--mint-line); color: var(--mint); }
.lesson-row.done .numb .ico { width: 16px; height: 16px; stroke-width: 2.4; }
.lesson-copy { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.lesson-copy strong { font-size: 15.5px; }
.lesson-row > .ico { color: var(--muted); }

.lesson-head { margin: 4px 0 16px; }
.lesson-foot { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.lesson .rows { margin-top: 12px; }

.rows { margin: 0; }
.rows > div {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
}
.rows > div:last-child { border-bottom: 0; padding-bottom: 0; }
.rows dt { color: var(--muted); font-size: 14.5px; }
.rows dd { margin: 0; font-weight: 620; text-align: right; }
.rows > div.stacked { display: block; }
.rows > div.stacked dt { color: var(--text); font-weight: 650; margin-bottom: 3px; }
.rows > div.stacked dd { text-align: left; font-weight: 400; color: var(--muted); font-size: 14.5px; }

.reasons { margin: 8px 0 12px; padding-left: 18px; color: var(--muted); }
.reasons li { margin-bottom: 7px; }

/* ---------- Disclosure ---------- */
.disclose {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 48px;
  margin-top: 6px;
  padding: 10px 0;
  background: none; border: 0; border-top: 1px solid var(--line);
  color: var(--frost);
  font: inherit; font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.card.dict .disclose { border-top: 0; margin: 0; padding: 4px 0; color: var(--text); }
.card.dict .disclose .micro { font-weight: 400; margin-top: 2px; }
.disclose .chev {
  width: 26px; height: 26px; flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 16px; line-height: 1;
}
.disclose-body { padding-top: 4px; }
.disclose-body .eyebrow { margin-top: 12px; }

/* ---------- Choices / chips ---------- */
.choices { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.choice {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 14px 16px;
  border-radius: var(--r);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  font: inherit; font-size: 15.5px; font-weight: 550;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--t), background var(--t), transform var(--t);
}
.choice:hover { border-color: var(--mint-line); background: var(--surface-2); }
.choice:active { transform: translateY(1px); }
.choice .ico { color: var(--muted); width: 18px; height: 18px; }
.choice.selected { border-color: var(--mint); background: var(--mint-soft); }
.choice.selected .ico { color: var(--mint); }
.choice.right { border-color: var(--mint-line); }
.choice.right::after { content: "✓"; color: var(--mint); font-weight: 700; }
.choice.wrong { border-color: rgba(242, 141, 124, 0.5); background: rgba(242, 141, 124, 0.08); }
.choice .micro { font-weight: 400; }

.quiz-q { font-weight: 620; font-size: 16.5px; margin-bottom: 4px; }
.situation { font-size: 16.5px; line-height: 1.5; }

.feedback {
  padding: 13px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
}
.feedback strong { display: block; margin-bottom: 4px; }
.feedback.good { border-color: var(--mint-line); background: var(--mint-soft); }
.feedback.good strong { color: var(--mint); }
.feedback.soft { border-color: var(--frost-soft); background: var(--frost-soft); }
.feedback.soft strong { color: var(--frost); }
.feedback p { margin: 0; color: var(--muted); font-size: 14.5px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.chips.wide { gap: 8px; }
.chip {
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 99px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font: inherit; font-size: 14.5px; font-weight: 550;
  cursor: pointer;
  transition: border-color var(--t), background var(--t), color var(--t);
}
.chip:hover { border-color: var(--mint-line); }
.chip.selected { border-color: var(--mint); background: var(--mint-soft); color: var(--mint); }

/* ---------- Fields ---------- */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; color: var(--text); }
.field input,
.search-wrap input {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
  color: var(--text);
  font: inherit; font-size: 17px;
  -webkit-appearance: none;
  appearance: none;
}
.field input:focus, .search-wrap input:focus { border-color: var(--mint); }
.field input::placeholder, .search-wrap input::placeholder { color: #6d7a92; }

.search-wrap { position: relative; margin-bottom: 14px; }
.search-wrap .ico { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-wrap input { padding-left: 42px; }

.switch {
  display: flex; align-items: flex-start; gap: 12px;
  min-height: 48px;
  padding: 10px 0;
  cursor: pointer;
}
.switch + .switch { border-top: 1px solid var(--line); }
.switch input {
  -webkit-appearance: none; appearance: none;
  width: 46px; height: 28px; flex: 0 0 auto;
  margin: 2px 0 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--line-strong);
  position: relative;
  cursor: pointer;
  transition: background var(--t), border-color var(--t);
}
.switch input::after {
  content: "";
  position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px;
  border-radius: 99px;
  background: #cbd5e6;
  transition: transform var(--t), background var(--t);
}
.switch input:checked { background: var(--mint-soft); border-color: var(--mint); }
.switch input:checked::after { transform: translateX(18px); background: var(--mint); }
.switch > span { flex: 1; font-size: 15px; font-weight: 550; }
.switch > span .micro { font-weight: 400; margin-top: 3px; }

.confirm {
  margin-top: 12px;
  padding: 14px;
  border-radius: var(--r-sm);
  border: 1px solid rgba(242, 141, 124, 0.4);
  background: rgba(242, 141, 124, 0.08);
}
.confirm p { margin-bottom: 0; font-size: 14.5px; }

/* ---------- Check-in ---------- */
.checkin { padding-top: 4px; }
.checkin-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dots { display: flex; gap: 6px; margin: 6px 0 18px; }
.dots span {
  height: 5px; flex: 1;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  transition: background var(--t);
}
.dots span.done { background: var(--mint); }
.dots span.now { background: var(--frost); }
.ci-q { font-size: 24px; margin-bottom: 6px; }

.result-wrap { padding-top: 6px; }
.result-mark {
  width: 66px; height: 66px;
  margin: 6px auto 14px;
  display: grid; place-items: center;
  border-radius: 99px;
  background: var(--mint-soft);
  border: 1px solid var(--mint-line);
  color: var(--mint);
}
.result-mark.calm { background: var(--gold-soft); border-color: rgba(230, 198, 126, 0.3); color: var(--gold); }
.result-wrap > h2 { margin-bottom: 8px; }
.result-wrap > .muted.center { margin-bottom: 20px; }

/* ---------- Practice: paycheck ---------- */
.pay-meter {
  position: sticky; top: 64px; z-index: 10;
  padding: 12px 14px;
  margin-bottom: 14px;
  border-radius: var(--r);
  border: 1px solid var(--mint-line);
  background: rgba(14, 21, 38, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.pay-meter > div:first-child { display: flex; align-items: baseline; justify-content: space-between; }
.pay-meter strong { font-size: 22px; color: var(--mint); }
.pay-meter.over { border-color: rgba(242, 141, 124, 0.5); }
.pay-meter.over strong { color: var(--hot); }
.pay-meter .bar { margin: 8px 0; }

.bucket { padding: 14px; }
.bucket-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.bucket-val { font-size: 18px; font-weight: 680; color: var(--mint); }
.stepper { display: flex; gap: 6px; margin-top: 10px; }
.step {
  flex: 1;
  min-height: 44px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit; font-size: 14.5px; font-weight: 620;
  cursor: pointer;
  transition: background var(--t), border-color var(--t);
}
.step:hover { background: var(--surface-2); border-color: var(--mint-line); }

/* ---------- Practice: purchase result ---------- */
.card.result h3 { font-size: 20px; }
.card.result.good { border-color: var(--mint-line); background: linear-gradient(180deg, var(--mint-soft), transparent), var(--surface); }
.card.result.good h3 { color: var(--mint); }
.card.result.ok { border-color: var(--frost-soft); background: linear-gradient(180deg, var(--frost-soft), transparent), var(--surface); }
.card.result.ok h3 { color: var(--frost); }
.card.result.warn { border-color: rgba(240, 179, 122, 0.4); }
.card.result.warn h3 { color: var(--warn); }
.card.result.hot { border-color: rgba(242, 141, 124, 0.45); background: linear-gradient(180deg, rgba(242, 141, 124, 0.1), transparent), var(--surface); }
.card.result.hot h3 { color: var(--hot); }

.wait-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.wait-row:last-of-type { border-bottom: 0; }
.wait-row p { margin: 2px 0 0; }

/* ---------- Tools ---------- */
.tool .tool-out {
  margin: 14px 0 10px;
  padding: 14px;
  border-radius: var(--r-sm);
  background: rgba(127, 180, 255, 0.06);
  border: 1px solid var(--frost-soft);
}
.big-out { font-size: 27px; font-weight: 700; color: var(--frost); margin: 0 0 4px; letter-spacing: -0.02em; }
.out-msg { margin: 0; }

.split-total {
  display: flex; align-items: baseline; gap: 10px;
  margin: 12px 0 8px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: var(--mint-soft);
  border: 1px solid var(--mint-line);
}
.split-total strong { font-size: 18px; color: var(--mint); }
.split-total.off { background: rgba(240, 179, 122, 0.1); border-color: rgba(240, 179, 122, 0.34); }
.split-total.off strong { color: var(--warn); }
.split-total .micro { margin-left: auto; color: var(--muted); }

.split-row { padding: 12px 0; border-bottom: 1px solid var(--line); }
.split-row:last-of-type { border-bottom: 0; }
.split-ctrl { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.split-ctrl .step { flex: 0 0 46px; font-size: 20px; }
.split-val { flex: 1; text-align: center; }
.split-val strong { display: block; font-size: 17px; }
.split-label strong { font-size: 15.5px; }
.split-label .micro { display: block; }

/* ---------- About ---------- */
.eco-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.eco-item {
  display: flex; flex-direction: column; gap: 1px;
  padding: 11px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.028);
  color: var(--text);
  font-size: 14px;
}
.eco-item:hover { text-decoration: none; border-color: var(--frost-soft); }
.eco-item strong { font-size: 14.5px; font-weight: 620; }
.eco-item.current { border-color: var(--mint-line); background: var(--mint-soft); }

.link-list { margin-top: 8px; }
.link-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 50px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-weight: 550;
}
.link-row:last-child { border-bottom: 0; }
.link-row:hover { text-decoration: none; color: var(--mint); }
.link-row .ext { color: var(--frost); }

/* ---------- Tablet and desktop: sidebar replaces the bottom nav ---------- */
@media (min-width: 768px) {
  :root { --maxw: 600px; --pad: 28px; --rail: 218px; }

  /* Mobile chrome off — the sidebar carries brand, nav, About and Settings. */
  .appbar { display: none; }
  .tabbar { display: none; }

  .app { display: block; }
  .shell { margin-left: var(--rail); min-height: 100vh; }

  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 40;
    width: var(--rail);
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 22px 14px 18px;
    background: rgba(13, 20, 36, 0.78);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-right: 1px solid var(--line);
    overflow-y: auto;
  }

  /* Brand block */
  .rail-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 8px 2px;
    color: var(--text);
    min-height: 48px;
  }
  .rail-brand:hover { text-decoration: none; }
  .rail-brand .mark {
    width: 34px; height: 34px; flex: 0 0 auto;
    display: grid; place-items: center;
    border-radius: 10px;
    background: linear-gradient(150deg, var(--mint), #2f9f86);
    color: var(--ink);
    box-shadow: 0 5px 16px rgba(79, 209, 165, 0.26);
  }
  .rail-brand .mark svg { width: 20px; height: 20px; stroke-width: 2; }
  .rail-name { min-width: 0; }
  .rail-name .wordmark { display: block; font-size: 13.5px; line-height: 1.25; }
  .rail-name small { display: block; margin-top: 2px; font-size: 11px; color: var(--muted); line-height: 1.35; }

  /* Nav lists */
  .rail-nav, .rail-secondary { display: flex; flex-direction: column; gap: 4px; }
  .rail-nav { flex: 1; }
  .sidebar a[data-tab],
  .sidebar a[data-route] {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    padding: 0 12px;
    border-radius: 12px;
    color: var(--muted);
    font-size: 14.5px;
    font-weight: 560;
    transition: color var(--t), background var(--t);
  }
  .sidebar a[data-tab]:hover,
  .sidebar a[data-route]:hover {
    text-decoration: none;
    color: var(--text);
    background: rgba(255, 255, 255, 0.045);
  }
  .sidebar a.on {
    color: var(--mint);
    background: var(--mint-soft);
  }
  .sidebar a.on::before {
    content: "";
    position: absolute;
    left: -14px; top: 50%;
    width: 3px; height: 22px;
    transform: translateY(-50%);
    border-radius: 0 3px 3px 0;
    background: var(--mint);
  }
  .sidebar a.on .ico { stroke-width: 2; }

  /* Footer identity */
  .rail-foot {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
  }
  .rail-eco {
    margin: 0;
    padding: 0 12px;
    font-size: 11px;
    line-height: 1.6;
    color: var(--muted);
    letter-spacing: 0.02em;
  }
  .rail-eco span { display: block; }

  /* Main column */
  .view {
    padding: 30px var(--pad) 56px;
    max-width: var(--maxw);
    margin: 0 auto;
  }
  h1 { font-size: 34px; }
  .hero { padding: 22px 4px 26px; }
  .hero h1 { font-size: 34px; }
  .pay-meter { top: 16px; }
}

@media (min-width: 1024px) {
  :root { --maxw: 680px; --rail: 248px; }
  .sidebar { padding: 26px 16px 20px; gap: 22px; }
  .rail-name .wordmark { font-size: 14.5px; }
  .sidebar a[data-tab], .sidebar a[data-route] { min-height: 48px; font-size: 15px; }
  .sidebar a.on::before { left: -16px; }
  .grid-2 { grid-template-columns: repeat(4, 1fr); }
  .lesson-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .lesson-list li { margin-bottom: 0; }
  .lesson-row { height: 100%; align-items: flex-start; }
  .stats { gap: 12px; }
}

@media (min-width: 1440px) {
  :root { --maxw: 760px; --rail: 268px; }
  .view { padding-top: 40px; }
}

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

@media print {
  .tabbar, .appbar, .sidebar { display: none; }
}
