/* ==========================================================================
   VOLCANIC ENGLISH — design system v2
   Editorial and restrained: Source Serif 4 display, Inter UI, JetBrains Mono labels.
   Calm paper surfaces and one dawn accent by default; the dark night theme survives for Young Learners.
   ========================================================================== */
:root {
  /* Calm, premium (default): paper, ink, dawn. Teide above the clouds at sunrise. */
  --bg: #F6F2EA;
  --bg-elev: #EFECE4;
  --surface: #FAF8F3;
  --surface-2: #EFECE4;
  --surface-3: #E2DDD2;
  --fg-rgb: 31, 29, 26;
  --bg-rgb: 246, 242, 234;
  --panel-rgb: 250, 248, 243;
  --shadow-rgb: 35, 33, 30;
  --accent-rgb: 200, 109, 81;
  --accent2-rgb: 160, 83, 58;
  --ok-rgb: 110, 133, 116;
  --bad-rgb: 192, 72, 60;
  --line: #E2DDD2;
  --line-strong: #C9C2B4;
  --text: #1F1D1A;
  --text-2: #5E5950;
  --text-3: #756E63;
  --accent: #C86D51;
  --accent-2: #A0533A;
  --accent-ink: #ffffff;
  --accent-soft: rgba(var(--accent-rgb), .12);
  --ok: #587060;
  --ok-soft: rgba(var(--ok-rgb), .1);
  --bad: #c0483c;
  --bad-soft: rgba(var(--bad-rgb), .08);
  --sea: #4f7ea0;
  --on-dark: #ffffff;

  --lv1: #d9a066; --lv2: #cf8566; --lv3: #c06c6c; --lv4: #a86a86; --lv5: #8a6f9e; --lv6: #6f7fae; --lv7: #4f6f9a;

  /* Volcanic English design system (2026-11): named colours. Small text uses the deeper "-text" shades for readability. */
  --bg-primary: #F6F2EA; --bg-card-front: #EFECE4; --bg-card-elevated: #FAF8F3; --bg-dark-surface: #23211E;
  --text-primary: #1F1D1A; --text-secondary: #5E5950; --text-muted: #8C857A; --text-muted-text: #756E63;
  --text-on-dark: #F6F2EA; --text-on-dark-muted: #B8B2A6;
  --border-subtle: #E2DDD2; --border-strong: #C9C2B4;
  --accent-terracotta: #C86D51; --accent-terracotta-text: #A0533A; --accent-ember-glow: #9E6B8E; --accent-sage: #6E8574; --accent-sage-text: #587060;
  --r: 14px;
  --r-sm: 10px;
  --r-xs: 6px;
  --serif: 'Source Serif 4', 'Iowan Old Style', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --nav-h: 64px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  /* Type scale (rem, so phones get one step larger with the 17px root below). Nothing on screen goes under --fs-xs,
     and --fs-xs is for uppercase/mono labels only; sentences use --fs-sm or larger. */
  --fs-xs: .75rem;    /* 12px · uppercase labels, counters, badges */
  --fs-sm: .875rem;   /* 14px · secondary text, captions, small buttons */
  --fs-base: 1rem;    /* 16px · body */
  --fs-md: 1.125rem;  /* 18px · lead text, card titles */
  --fs-lg: 1.25rem;   /* 20px */
  --fs-xl: 1.5rem;    /* 24px · small headings */
  /* Spacing scale: a 4px grid. Gaps between repeated items use 8/12/16/24. */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-7: 32px; --sp-8: 48px;
  --card-pad: var(--sp-6);   /* every card: 24px on computers, 20px on phones */
  --stack-gap: var(--sp-4);  /* between stacked cards and blocks on a page */
  color-scheme: light;
}
@media (max-width: 640px) { :root { --card-pad: var(--sp-5); } }
/* Volcanic English for Young Learners keeps the original night-and-lava look. */
html.theme-dark {
  --bg: #0a0807; --bg-elev: #110e0c; --surface: #15110f; --surface-2: #1b1613; --surface-3: #231d19;
  --fg-rgb: 244, 236, 228; --bg-rgb: 10, 8, 7; --panel-rgb: 27, 22, 19; --shadow-rgb: 0, 0, 0;
  --accent-rgb: 255, 107, 44; --accent2-rgb: 255, 176, 103; --ok-rgb: 95, 211, 154; --bad-rgb: 255, 122, 107;
  --text: #f4ece4; --text-2: #b9ada3; --text-3: #7e736b;
  --accent: #ff6b2c; --accent-2: #ffb067; --accent-ink: #1a0a04;
  --ok: #5fd39a; --bad: #ff7a6b; --sea: #6fb6d0;
  --lv1: #ffb547; --lv2: #ff8a3d; --lv3: #ff5e3a; --lv4: #e8364f; --lv5: #c2185b; --lv6: #9c4dcc; --lv7: #6e63ff;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--sans);
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
}
body::before { /* film grain */
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 1000; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img, svg, canvas { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(var(--accent-rgb), .35); }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 4px; }
#app:focus { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 300; background: var(--text); color: var(--bg); padding: 8px 14px; border-radius: 8px; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- type ---------- */
h1, h2, h3, h4, .display { font-family: var(--serif); font-weight: 400; letter-spacing: -.015em; line-height: 1.04; margin: 0 0 .45em; }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4vw, 3.1rem); }
h3 { font-size: 1.55rem; line-height: 1.15; }
h4 { font-size: 1.2rem; }
h1 em, h2 em, h3 em, .display em { font-style: italic; color: var(--accent-2); }
p { margin: 0 0 1em; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--text-2); line-height: 1.65; max-width: 38em; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: .875rem; }
.tag, .eyebrow { font: 500 var(--fs-xs)/1.4 var(--mono); text-transform: uppercase; letter-spacing: .14em; color: var(--accent-2); }
.mono { font-family: var(--mono); }
.lava-text { color: var(--accent-2); font-style: italic; }
.num { font-family: var(--serif); font-variant-numeric: lining-nums; }

/* ---------- layout ---------- */
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.wrap-narrow { width: min(820px, 100% - 32px); margin-inline: auto; }
.stack > * + * { margin-top: var(--sp-4); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.divider { height: 1px; background: var(--line); border: 0; margin: 24px 0; }

/* ---------- buttons ---------- */
.btn {
  white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: var(--r-sm);
  border: 1px solid var(--line-strong); background: transparent; color: var(--text);
  font: 500 15px/1 var(--sans); letter-spacing: -.005em; text-decoration: none; cursor: pointer;
  transition: background .2s var(--ease), border-color .2s, color .2s, transform .15s var(--ease);
}
.btn:hover { background: rgba(var(--fg-rgb), .05); border-color: rgba(var(--fg-rgb), .28); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-lava, .btn-primary { background: var(--accent); border-color: transparent; color: var(--accent-ink); font-weight: 600; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 8px 24px -10px rgba(var(--accent-rgb), .7); }
.btn-lava:hover, .btn-primary:hover { background: var(--accent); border-color: transparent; }
.btn-light { background: var(--text); color: var(--bg); border-color: transparent; font-weight: 600; }
.btn-light:hover { background: #fff; }
.btn-ghost { border-color: transparent; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: var(--fs-sm); border-radius: 8px; }
.btn-lg { min-height: 52px; padding: 0 24px; font-size: 16px; }
.btn-block { width: 100%; }
.btn > svg { width: 18px; height: 18px; flex: 0 0 auto; }
.link { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.link:hover { text-decoration-color: var(--accent-2); }
.arrow::after { content: '→'; margin-left: 6px; transition: transform .2s var(--ease); display: inline-block; }
.arrow:hover::after { transform: translateX(3px); }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: var(--card-pad); }
.card-hot { border-color: rgba(var(--accent-rgb), .35); background: linear-gradient(180deg, rgba(var(--accent-rgb), .07), transparent 60%), var(--surface); }
.card-flat { background: transparent; }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 26px; padding: 0 10px; border-radius: 999px; font: 500 var(--fs-xs)/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); border: 1px solid var(--line-strong); white-space: nowrap; }
.pill-lava { color: var(--accent-2); border-color: rgba(var(--accent2-rgb), .35); background: rgba(var(--accent2-rgb), .06); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--accent)); display: inline-block; flex: 0 0 7px; }

/* ---------- forms ---------- */
label { display: block; font-weight: 500; margin-bottom: 8px; font-size: 14px; color: var(--text-2); }
.field { margin-bottom: var(--sp-5); }
.input, select, textarea {
  width: 100%; min-height: 46px; padding: 11px 14px; border-radius: var(--r-sm);
  background: var(--bg-elev); border: 1px solid var(--line-strong); color: var(--text); transition: border-color .2s, box-shadow .2s;
}
textarea { min-height: 130px; resize: vertical; line-height: 1.6; }
.input::placeholder, textarea::placeholder { color: var(--text-3); }
.input:focus, select:focus, textarea:focus { border-color: var(--accent-2); outline: none; box-shadow: 0 0 0 3px rgba(var(--accent2-rgb), .14); }
.error { color: var(--bad); font-size: var(--fs-sm); margin-top: var(--sp-2); }
.choice-grid { display: grid; gap: var(--sp-3); grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); }
.choice {
  position: relative; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; text-align: left;
  padding: 16px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--bg-elev);
  cursor: pointer; font-weight: 500; transition: border-color .15s, background .15s;
}
.choice:hover { border-color: rgba(var(--fg-rgb), .3); }
.choice[aria-pressed="true"], .choice.selected { border-color: var(--accent-2); background: rgba(var(--accent2-rgb), .06); }
.choice small { color: var(--text-3); font-weight: 400; font-size: var(--fs-sm); }
.choice .k { font: 500 var(--fs-xs)/1 var(--mono); color: var(--text-3); letter-spacing: .1em; }
.choice img.flag { width: 26px; height: 18px; border-radius: 3px; object-fit: cover; margin-bottom: 6px; }
.flag-i { display: inline-block; width: 18px; height: 13px; border-radius: 2px; object-fit: cover; vertical-align: -2px; }

/* ---------- top bar & tabs ---------- */
.topbar {
  position: sticky; top: 0; z-index: 60; height: var(--nav-h);
  display: flex; align-items: center; gap: 20px; padding: 0 clamp(16px, 3vw, 32px);
  background: rgba(var(--bg-rgb), .72); backdrop-filter: saturate(1.4) blur(16px); -webkit-backdrop-filter: saturate(1.4) blur(16px);
  border-bottom: 1px solid var(--line);
}
/* Phones with a notch or an edge-to-edge app (Android app, iPhone home-screen): keep the bar below the status bar. */
.topbar { height: calc(var(--nav-h) + env(safe-area-inset-top, 0px)); padding-top: env(safe-area-inset-top, 0px); }
.topbar.over { position: fixed; left: 0; right: 0; background: linear-gradient(rgba(var(--bg-rgb), .55), rgba(var(--bg-rgb), 0)); border-bottom-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); white-space: nowrap; flex: 0 0 auto; }
.brand svg { width: 26px; height: 26px; }
.brand .wm { font-family: var(--serif); font-size: 21px; letter-spacing: -.01em; line-height: 1; }
.brand .wm i { color: var(--accent-2); }
.nav-links { display: flex; gap: 2px; }
.nav-links a { padding: 8px 12px; border-radius: 8px; color: var(--text-2); text-decoration: none; font-weight: 500; font-size: 14px; display: flex; gap: 8px; align-items: center; transition: color .2s, background .2s; }
.nav-links a svg { width: 16px; height: 16px; opacity: .8; }
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); background: rgba(var(--fg-rgb), .06); }
.stat-chip { white-space: nowrap; flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line); font: 500 13px/1 var(--mono); color: var(--text-2); }
.stat-chip svg { width: 15px; height: 15px; }
.stat-chip b { color: var(--text); font-weight: 600; }
.tabbar { display: none; }
@media (max-width: 880px) {
  .nav-links, .topbar .hide-mobile { display: none; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; bottom: 0; left: 0; right: 0; z-index: 70;
    background: rgba(var(--panel-rgb), .94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 0 9px; color: var(--text-3); text-decoration: none; font: 500 var(--fs-xs)/1 var(--sans); letter-spacing: .02em; }
  .tabbar a svg { width: 21px; height: 21px; }
  .tabbar a.active { color: var(--text); }
  .tabbar a.active svg { color: var(--accent-2); }
  main.app { padding-bottom: 96px !important; }
}

/* ---------- 3D volcano ---------- */
.v3d { position: relative; overflow: hidden; background: radial-gradient(120% 80% at 50% 100%, #2a120b 0%, var(--bg) 60%); }
.v3d-canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
.v3d-labels { position: absolute; inset: 0; pointer-events: none; }
.v3d-label { display: flex; align-items: center; gap: 8px; font: 500 var(--fs-xs)/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--c); text-shadow: 0 1px 6px rgba(var(--shadow-rgb), .9); white-space: nowrap; opacity: .8; }
.v3d-label::before { content: ''; width: 14px; height: 1px; background: var(--c); opacity: .7; }
.v3d-label .n { color: rgba(var(--fg-rgb), .55); }
.v3d-label.done { opacity: .95; }
.v3d-label.current { opacity: 1; }
.v3d-label.current .t::after { content: ' · You are here'; color: var(--text); }
.v3d-label.future { opacity: .5; }
.v3d-fallback { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(var(--bg-rgb), .2), rgba(var(--bg-rgb), .85)), url('/img/teide-marek.jpg') center 35% / cover; }

/* ---------- landing ---------- */
.hero { position: relative; min-height: 100svh; display: grid; align-items: end; isolation: isolate; }
.hero .stage { position: absolute; inset: 0; z-index: -2; }
.hero::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(90deg, rgba(var(--bg-rgb), .92) 0%, rgba(var(--bg-rgb), .55) 38%, rgba(var(--bg-rgb), 0) 62%), linear-gradient(0deg, var(--bg) 0%, rgba(var(--bg-rgb), 0) 30%); }
.hero-copy { padding: calc(var(--nav-h) + 40px) 0 clamp(48px, 9vh, 110px); max-width: 640px; }
.hero h1 { font-size: clamp(3.2rem, 8.4vw, 7rem); line-height: .94; letter-spacing: -.025em; margin-bottom: .32em; }
.hero .meta-row { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 28px; color: var(--text-3); font: 500 var(--fs-xs)/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.hero .meta-row span { display: inline-flex; gap: 8px; align-items: center; }
.scroll-cue { position: absolute; right: clamp(16px, 3vw, 32px); bottom: 28px; font: 500 var(--fs-xs)/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); writing-mode: vertical-rl; display: flex; gap: 12px; align-items: center; }
.scroll-cue::after { content: ''; width: 1px; height: 46px; background: linear-gradient(var(--text-3), transparent); }
@media (max-width: 880px) {
  .hero { align-items: start; }
  .hero .stage { bottom: auto; height: 58svh; }
  .hero::after { background: linear-gradient(180deg, rgba(var(--bg-rgb), .35) 0%, rgba(var(--bg-rgb), 0) 18%, rgba(var(--bg-rgb), 0) 38%, var(--bg) 58%); }
  .hero-copy { padding-top: 46svh; }
  .scroll-cue { display: none; }
}
section.band { padding: clamp(72px, 11vw, 140px) 0; position: relative; }
section.band.alt { background: var(--bg-elev); border-block: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head .tag { display: block; margin-bottom: 18px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; } }
.statement { font-family: var(--serif); font-size: clamp(1.9rem, 4.2vw, 3.4rem); line-height: 1.12; letter-spacing: -.015em; max-width: 22em; }
.statement em { color: var(--accent-2); }
.figures { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.figures > div { padding: 26px 22px 0 0; }
.figures .v { font-family: var(--serif); font-size: clamp(2.4rem, 4.6vw, 3.8rem); line-height: 1; letter-spacing: -.02em; }
.figures .l { color: var(--text-2); font-size: 14px; margin-top: 10px; max-width: 18em; }
@media (max-width: 880px) { .figures { grid-template-columns: repeat(2, 1fr); row-gap: 20px; } }
.loop { display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.loop > div { padding: 24px 20px 28px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-height: 168px; display: flex; flex-direction: column; gap: 8px; background: var(--surface); transition: background .25s; }
.loop > div:hover { background: var(--surface-2); }
.loop > div:nth-child(5n) { border-right: 0; }
.loop > div:nth-last-child(-n+5) { border-bottom: 0; }
.loop .n { font: 500 var(--fs-xs)/1 var(--mono); color: var(--text-3); letter-spacing: .12em; }
.loop b { font-family: var(--serif); font-weight: 400; font-size: 1.45rem; line-height: 1.1; }
.loop span.d { color: var(--text-2); font-size: 14px; line-height: 1.5; }
@media (max-width: 980px) { .loop { grid-template-columns: repeat(2, 1fr); } .loop > div { border-right: 1px solid var(--line) !important; border-bottom: 1px solid var(--line) !important; } .loop > div:nth-child(2n) { border-right: 0 !important; } }
.levels { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0; border-top: 1px solid var(--line); }
.levels > div { padding: 22px 16px 0 0; position: relative; }
.levels > div::before { content: ''; position: absolute; top: -1px; left: 0; width: 38px; height: 2px; background: var(--c); }
.levels .n { font: 500 var(--fs-xs)/1 var(--mono); color: var(--c); letter-spacing: .12em; }
.levels h4 { font-size: 1.5rem; margin: 10px 0 6px; }
.levels .cefr { font: 500 var(--fs-xs)/1 var(--mono); color: var(--text-3); letter-spacing: .08em; margin-bottom: 10px; }
.levels p { color: var(--text-2); font-size: 14px; line-height: 1.5; }
@media (max-width: 980px) { .levels { grid-template-columns: repeat(2, 1fr); row-gap: 8px; } }
.principles { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.principles > div { padding: 24px 28px 28px 0; border-bottom: 1px solid var(--line); }
.principles .n { font: 500 var(--fs-xs)/1 var(--mono); color: var(--text-3); }
.principles h4 { font-size: 1.35rem; margin: 10px 0 8px; }
.principles p { color: var(--text-2); font-size: 14.5px; line-height: 1.55; margin: 0; }
@media (max-width: 980px) { .principles { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .principles { grid-template-columns: 1fr; } }
.memory-states { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.memory-states > div { background: var(--surface); padding: 26px 22px; display: flex; flex-direction: column; gap: 12px; }
.memory-states svg { width: 34px; height: 34px; }
@media (max-width: 880px) { .memory-states { grid-template-columns: 1fr 1fr; } }
.photo-card { border-radius: var(--r); overflow: hidden; position: relative; min-height: 460px; border: 1px solid var(--line); }
.photo-card img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; filter: saturate(.9) contrast(1.05); }
.photo-card .cap { position: absolute; inset: auto 0 0 0; padding: 24px; background: linear-gradient(transparent, rgba(var(--shadow-rgb), .82)); }
.credit { font-size: var(--fs-xs); color: var(--text-3); }
.credit a { color: var(--text-3); }
.quote { font-family: var(--serif); font-size: clamp(1.6rem, 2.8vw, 2.25rem); line-height: 1.2; letter-spacing: -.01em; }
.price-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.price { background: var(--surface); padding: 28px 24px; display: flex; flex-direction: column; gap: 16px; }
.price.hot { background: linear-gradient(180deg, rgba(var(--accent-rgb), .09), transparent 55%), var(--surface); }
.price .amt { font-family: var(--serif); font-size: 3rem; line-height: 1; letter-spacing: -.02em; }
.price ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; font-size: 14.5px; color: var(--text-2); }
.price li { padding-left: 20px; position: relative; }
.price li::before { content: ''; position: absolute; left: 0; top: .62em; width: 10px; height: 1px; background: var(--accent-2); }
.price .btn { margin-top: auto; }
@media (max-width: 980px) { .price-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .price-grid { grid-template-columns: 1fr; } }
.compare { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.compare th, .compare td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; }
.compare thead th { font: 500 var(--fs-xs)/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.compare thead th:nth-child(2) { color: var(--accent-2); }
.compare td:nth-child(2) { background: rgba(var(--accent2-rgb), .04); }
.compare td.yes { color: var(--text); }
.compare td.yes::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin-right: 8px; }
.compare td.no { color: var(--text-3); }
.table-scroll { overflow-x: auto; }
.cta-final { text-align: center; position: relative; min-height: 70vh; display: grid; place-items: center; overflow: hidden; }
footer.site { padding: 56px 0 120px; color: var(--text-3); font-size: 14px; border-top: 1px solid var(--line); }
footer.site a { color: var(--text-2); text-decoration: none; }
footer.site a:hover { color: var(--text); }
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- app shell ---------- */
main.app { padding: 36px 0 72px; }
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.page-head h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); margin: 8px 0 0; }
.dash { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 20px; }
@media (max-width: 1000px) { .dash { grid-template-columns: 1fr; } }
.volcano-map { position: relative; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); min-height: 460px; height: 100%; }
.volcano-map .overlay-info { position: absolute; left: 18px; top: 16px; right: 18px; display: flex; justify-content: space-between; gap: 12px; pointer-events: none; z-index: 2; }
.volcano-map .alt { font-family: var(--serif); font-size: 2.2rem; line-height: 1; }
@media (max-width: 600px) { .volcano-map { min-height: 380px; } }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; gap: 1px; background: var(--line); }
@media (max-width: 600px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.kpi { padding: 16px 16px 18px; background: var(--surface); }
.kpi .v { font-family: var(--serif); font-size: 2.1rem; line-height: 1; display: flex; align-items: baseline; gap: 8px; }
.kpi .v small { font: 500 var(--fs-xs)/1 var(--mono); color: var(--text-3); }
.kpi .l { font: 500 var(--fs-xs)/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); margin-top: 10px; }
.memory-bar { display: flex; height: 6px; border-radius: 99px; overflow: hidden; background: var(--surface-3); gap: 2px; }
.memory-bar span { display: block; height: 100%; transition: width .6s var(--ease); }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--text-2); margin-top: 12px; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 7px; vertical-align: 1px; }
.next-card { display: grid; gap: 16px; text-decoration: none; color: inherit; }
.next-card h3 { font-size: 2rem; margin: 0; }
.level-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; margin-bottom: 28px; }
.level-tabs button { flex: 0 0 auto; background: none; border: 0; border-bottom: 2px solid transparent; padding: 14px 16px; color: var(--text-3); cursor: pointer; font: 500 13px/1 var(--sans); display: flex; gap: 8px; align-items: center; margin-bottom: -1px; }
.level-tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--c); }
.level-tabs button .dot { opacity: .9; }
.camp { margin-bottom: 36px; }
.camp-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.camp-head h3 { margin: 0; font-size: 1.6rem; }
.block-path { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.block-node {
  position: relative; display: grid; grid-template-columns: 40px 1fr; gap: 16px; align-items: center; padding: 16px; border-radius: var(--r-sm);
  background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text); min-height: 82px; transition: border-color .2s, background .2s;
}
a.block-node:hover { border-color: var(--line-strong); background: var(--surface-2); }
.block-node .stone svg { width: 40px; height: 40px; }
.block-node b { display: block; font-weight: 500; font-size: 15px; line-height: 1.3; }
.block-node small { display: block; color: var(--text-3); font: 500 var(--fs-xs)/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; margin-top: 5px; }
.block-node.locked, .block-node.soon { opacity: .45; }
.block-node.next { border-color: rgba(var(--accent2-rgb), .5); background: linear-gradient(90deg, rgba(var(--accent-rgb), .08), transparent 70%), var(--surface); }
.block-node.done small { color: var(--ok); }
.progress-ring { --p: 0; width: 52px; height: 52px; border-radius: 50%; background: conic-gradient(var(--accent-2) calc(var(--p) * 1%), var(--surface-3) 0); display: grid; place-items: center; flex: 0 0 52px; }
.progress-ring > div { width: 42px; height: 42px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font: 600 12px/1 var(--mono); }

/* ---------- block player ---------- */
.player { max-width: 880px; margin: 0 auto; }
.stage-rail { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; margin: 18px 0 30px; }
.stage-rail button { height: 3px; border-radius: 3px; border: 0; background: var(--surface-3); cursor: pointer; padding: 0; position: relative; }
.stage-rail button::after { content: ''; position: absolute; inset: -10px 0; }
.stage-rail button.done { background: rgba(var(--accent2-rgb), .55); }
.stage-rail button.current { background: var(--accent); }
.stage-rail button:disabled { cursor: default; }
.stage-title { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.stage-title .ico { width: 52px; height: 52px; flex: 0 0 52px; color: var(--accent-2); }
.stage-title .ico svg { width: 52px; height: 52px; }
.stage-title h2 { margin: 4px 0 0; font-size: clamp(2rem, 4vw, 2.8rem); }
.why { font-size: 14.5px; color: var(--text-2); padding: 0 0 22px; margin: 0 0 26px; border-bottom: 1px solid var(--line); max-width: 60em; }
.why b { color: var(--text); font-weight: 600; }
.story-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.story-line { display: grid; grid-template-columns: 40px 1fr auto; gap: 16px; align-items: start; padding: 14px 10px; border-radius: var(--r-sm); transition: background .25s; }
.story-line.speaking { background: rgba(var(--accent2-rgb), .07); }
.story-line .avatar { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; }
.story-line .who { font: 500 var(--fs-xs)/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent-2); margin-bottom: 6px; }
.story-line .en { font-size: 17px; line-height: 1.5; }
.story-line .l1 { color: var(--text-3); font-size: 14.5px; margin-top: 4px; }
.l1-hidden .l1 { display: none; }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-2); cursor: pointer; margin: 0; }
.toggle input { accent-color: var(--accent); width: 16px; height: 16px; }
.chunk-card { padding: 20px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.chunk-card .l1t { font-size: 13.5px; color: var(--text-3); }
.chunk-card .en { font-family: var(--serif); font-size: 1.75rem; line-height: 1.15; cursor: pointer; transition: filter .25s; }
.chunk-card .note { font-size: 14px; color: var(--text-2); }
.sound-item { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: center; padding: 18px 20px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); }
.sound-item .sounds { font-family: var(--mono); color: var(--accent-2); font-size: 15px; letter-spacing: .02em; margin-top: 4px; }
.mic-btn { width: 72px; height: 72px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; cursor: pointer; position: relative; box-shadow: 0 10px 30px -10px rgba(var(--accent-rgb), .8), inset 0 1px 0 rgba(255, 255, 255, .3); transition: transform .15s var(--ease); flex: 0 0 auto; }
.mic-btn:hover { transform: scale(1.04); }
.mic-btn svg { width: 26px; height: 26px; }
.mic-btn.sm { width: 46px; height: 46px; }
.mic-btn.sm svg { width: 19px; height: 19px; }
.mic-btn.listening::after { content: ''; position: absolute; inset: -7px; border-radius: 50%; border: 2px solid var(--accent); animation: pulse 1.2s ease-out infinite; }
@keyframes pulse { from { transform: scale(.92); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }
.drill-cue { font-family: var(--serif); font-size: clamp(1.9rem, 5vw, 2.9rem); line-height: 1.15; text-align: center; padding: 30px 10px 26px; }
.drill-timer { height: 2px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.drill-timer span { display: block; height: 100%; background: var(--accent); transition: width .1s linear; }
.answer-box { display: flex; gap: 12px; align-items: center; }
.answer-box .input { flex: 1; font-size: 16px; }
.feedback { padding: 14px 16px; border-radius: var(--r-sm); margin-top: 14px; border: 1px solid; font-size: 15px; line-height: 1.55; }
.feedback.good { border-color: rgba(var(--ok-rgb), .3); background: var(--ok-soft); }
.feedback.bad { border-color: rgba(var(--bad-rgb), .3); background: var(--bad-soft); }
.feedback.info { border-color: var(--line-strong); background: var(--surface-2); }
.feedback .k { font: 600 var(--fs-xs)/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; margin-right: 8px; }
.feedback.good .k { color: var(--ok); } .feedback.bad .k { color: var(--bad); } .feedback.info .k { color: var(--accent-2); }
.mcq { display: grid; gap: 8px; }
.mcq button { text-align: left; justify-content: flex-start; min-height: 50px; padding: 12px 16px; font-weight: 400; background: var(--bg-elev); border: 1px solid var(--line-strong); border-radius: var(--r-sm); cursor: pointer; transition: border-color .15s, background .15s; }
.mcq button:hover:not([disabled]) { border-color: rgba(var(--fg-rgb), .32); }
.mcq button .key { font: 500 var(--fs-xs)/1 var(--mono); color: var(--text-3); margin-right: 12px; }
.mcq button.right { border-color: var(--ok); background: var(--ok-soft); }
.mcq button.wrong { border-color: var(--bad); background: var(--bad-soft); }
.gap-sentence { font-size: 1.2rem; margin-bottom: 4px; line-height: 1.45; }
.trap { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; padding: 16px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); }
.trap .x { color: var(--bad); text-decoration: line-through; text-decoration-color: rgba(var(--bad-rgb), .6); }
.trap .v { color: var(--text); font-weight: 600; }
.trap .why2 { color: var(--text-2); font-size: 14px; }
.reading { font: 400 1.2rem/1.75 var(--serif); background: #f3ebe0; color: #23170f; padding: clamp(22px, 4vw, 40px); border-radius: var(--r); white-space: pre-wrap; box-shadow: 0 30px 60px -30px rgba(var(--shadow-rgb), .8); }
.player-nav { display: flex; gap: 12px; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); justify-content: space-between; }
.chat { display: flex; flex-direction: column; gap: 12px; min-height: 300px; max-height: 58vh; overflow-y: auto; padding: 18px; border-radius: var(--r); background: var(--bg-elev); border: 1px solid var(--line); }
.msg { max-width: 84%; padding: 12px 15px; border-radius: 14px; line-height: 1.5; font-size: 15.5px; }
.msg.tutor { background: var(--surface-2); border: 1px solid var(--line); border-top-left-radius: 4px; align-self: flex-start; }
.em-aloud { display: inline-flex; align-items: center; gap: 8px; margin: 4px 2px 10px; font-size: .9rem; color: var(--text-2); cursor: pointer; } .em-aloud svg { width: 18px; height: 18px; } .em-aloud input { width: 18px; height: 18px; accent-color: #E0652E; }
.msg .msg-say { display: inline-flex; vertical-align: middle; margin-left: 8px; padding: 4px; border: 0; border-radius: 50%; background: transparent; color: var(--text-2); cursor: pointer; } .msg .msg-say:hover { background: var(--surface-3, rgba(0,0,0,.06)); } .msg .msg-say svg { width: 18px; height: 18px; }
.msg.me { background: rgba(var(--accent-rgb), .14); border: 1px solid rgba(var(--accent-rgb), .25); border-top-right-radius: 4px; align-self: flex-end; }
.msg .fix { margin-top: 10px; font-size: 13.5px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--text-2); display: grid; gap: 8px; }
.msg .fix b { color: var(--ok); font-weight: 600; }
.msg .fix s { color: var(--bad); }
.typing span { display: inline-block; width: 6px; height: 6px; margin: 0 2px; border-radius: 50%; background: var(--text-3); animation: blink 1s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; } .typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 50% { opacity: .2; } }
.goals { display: grid; gap: 8px; }
.goal { display: flex; gap: 12px; align-items: center; font-size: 14.5px; color: var(--text-2); }
.goal .tick { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; flex: 0 0 18px; transition: all .3s; }
.goal .tick svg { width: 11px; height: 11px; opacity: 0; }
.goal.met { color: var(--text); }
.goal.met .tick { background: var(--ok); border-color: var(--ok); color: #062b19; }
.goal.met .tick svg { opacity: 1; }
.chat-input { display: flex; gap: 12px; margin-top: 12px; align-items: center; }
.chat-input .input { flex: 1; }
.persona { display: grid; grid-template-columns: 48px 1fr; gap: 16px; align-items: center; }
.persona .avatar { width: 48px; height: 48px; }

/* review */
.review-card { min-height: 340px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 16px; padding: 40px 24px; }
.review-card .prompt { font-family: var(--serif); font-size: clamp(1.9rem, 5vw, 2.8rem); line-height: 1.15; max-width: 16em; }
.grade-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: 100%; max-width: 560px; margin: 0 auto; }
.grade-row .btn { flex-direction: column; gap: 4px; min-height: 60px; }
.grade-row small { font: 500 var(--fs-xs)/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.state-badge { display: inline-flex; gap: 8px; align-items: center; font: 500 var(--fs-xs)/1 var(--mono); text-transform: uppercase; letter-spacing: .12em; }
.state-badge svg { width: 18px; height: 18px; }

/* community */
.post { display: grid; grid-template-columns: 40px 1fr; gap: 16px; padding: 20px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.post .avatar { width: 40px; height: 40px; }
.post .meta { font: 500 var(--fs-xs)/1 var(--mono); letter-spacing: .06em; color: var(--text-3); display: inline-flex; gap: 8px; align-items: center; }
.post p { font-size: 15.5px; }
.spark-btn { background: none; border: 1px solid var(--line-strong); border-radius: 8px; padding: 6px 10px; cursor: pointer; color: var(--text-2); font: 500 12px/1 var(--mono); display: inline-flex; gap: 8px; align-items: center; }
.spark-btn svg { width: 13px; height: 13px; }
.spark-btn.on { border-color: rgba(var(--accent2-rgb), .5); color: var(--accent-2); }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--bg-elev); border: 1px solid var(--line); gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 7px 12px; border-radius: 7px; cursor: pointer; color: var(--text-2); font: 500 13px/1 var(--sans); }
.seg button[aria-pressed="true"] { background: var(--surface-3); color: var(--text); }

/* blueprint (in-app) */
.doc { max-width: 760px; font-size: 17px; line-height: 1.75; color: var(--text); }
.doc h1 { font-size: clamp(2.6rem, 5vw, 3.8rem); }
.doc h2 { margin-top: 2.2em; padding-top: 1em; border-top: 1px solid var(--line); font-size: clamp(1.9rem, 3.4vw, 2.5rem); }
.doc h3 { margin-top: 1.8em; font-size: 1.5rem; color: var(--text); }
.doc table { width: 100%; border-collapse: collapse; margin: 1.2em 0 1.8em; font-size: 14px; line-height: 1.5; display: block; overflow-x: auto; }
.doc th, .doc td { border-bottom: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.doc th { font: 500 var(--fs-xs)/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); border-bottom-color: var(--line-strong); }
.doc blockquote { margin: 1.4em 0; padding: 4px 0 4px 22px; border-left: 2px solid var(--accent); font-family: var(--serif); font-size: 1.35rem; line-height: 1.4; color: var(--text); }
.doc code { font-family: var(--mono); background: var(--surface-2); padding: 2px 6px; border-radius: 5px; font-size: .85em; }
.doc strong { color: var(--text); font-weight: 600; }
.doc li { margin-bottom: .35em; }
.toc { position: sticky; top: calc(var(--nav-h) + 20px); max-height: calc(100vh - 120px); overflow: auto; font-size: 13.5px; padding-right: 8px; }
.toc a { display: block; padding: 5px 0 5px 12px; color: var(--text-3); text-decoration: none; border-left: 1px solid var(--line); line-height: 1.4; }
.toc a:hover { color: var(--text); border-left-color: var(--accent-2); }
.doc-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 56px; }
@media (max-width: 980px) { .doc-layout { grid-template-columns: minmax(0, 1fr); } .toc { display: none; } }

/* modal & toast */
.overlay { position: fixed; inset: 0; z-index: 200; background: rgba(var(--fg-rgb), .78); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); display: grid; place-items: center; padding: 16px; animation: fade .25s ease; }
.modal { width: min(520px, 100%); max-height: 90vh; overflow-y: auto; }
@keyframes fade { from { opacity: 0; } }
.toast-host { position: fixed; z-index: 250; right: 20px; bottom: 24px; display: grid; gap: 8px; width: min(360px, calc(100% - 32px)); pointer-events: none; }
@media (max-width: 880px) { .toast-host { right: 16px; bottom: 92px; } }
.toast { padding: 12px 14px; border-radius: 12px; background: rgba(var(--panel-rgb), .96); border: 1px solid var(--line-strong); box-shadow: 0 20px 40px -20px rgba(var(--shadow-rgb), .9); animation: rise .35s var(--ease); font-size: 14px; display: flex; gap: 12px; align-items: center; backdrop-filter: blur(10px); }
.toast svg { width: 16px; height: 16px; flex: 0 0 16px; }
.toast.good { border-color: rgba(var(--ok-rgb), .35); }
.toast.bad { border-color: rgba(var(--bad-rgb), .4); }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } }

/* auth */
.auth { min-height: calc(100vh - var(--nav-h)); display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.auth-art { position: relative; overflow: hidden; min-height: 520px; border-right: 1px solid var(--line); }
.auth-art .caption { position: absolute; left: clamp(24px, 4vw, 48px); bottom: clamp(24px, 4vw, 48px); right: 24px; z-index: 3; max-width: 30em; pointer-events: none; }
.auth-art .caption h2 { font-size: clamp(2rem, 3.4vw, 2.8rem); }
.auth-art::after { content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(0deg, rgba(var(--bg-rgb), .92) 0%, rgba(var(--bg-rgb), 0) 50%); }
.auth-form { display: grid; place-items: center; padding: 48px 20px; }
.auth-form .panel { width: min(460px, 100%); }
.auth-form h1 { font-size: clamp(2.2rem, 4vw, 3rem); }
@media (max-width: 880px) { .auth { grid-template-columns: 1fr; } .auth-art { display: none; } }
.steps-dots { display: flex; gap: 8px; margin-bottom: 26px; }
.steps-dots i { flex: 1; height: 2px; border-radius: 2px; background: var(--surface-3); }
.steps-dots i.on { background: var(--accent-2); }

/* completion */
.complete-stage { position: relative; height: min(52vh, 460px); border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); }
.eruption svg { width: min(300px, 80%); margin: 0 auto; }

/* monogram avatars */
.mono-av { width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; font: 400 1.05rem/1 var(--serif); color: var(--text); background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--c) 30%, var(--surface-3)), var(--surface) 80%); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 55%, transparent); letter-spacing: .02em; }

/* subtle legacy SVG animation hooks (fallback art & icons) */
.flicker { animation: flicker 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes flicker { 25% { transform: scaleY(1.06); } 50% { transform: scaleY(.96); } 75% { transform: scaleY(1.03); } }
.glow-pulse { animation: glowPulse 3s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes glowPulse { 50% { opacity: .6; } }
.ember-rise, .smoke, .lava-flow, .lava-pour, .wave, .twinkle, .bob, .rock-fly, .erupt-burst, .cloud-drift, .climber-pulse { animation: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- admin ---------- */
/* The founder's control room. Built only from the tokens above; every selector is prefixed .adm-. */
.tabbar.adm-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.tabbar.adm-6 a { font-size: var(--fs-xs); letter-spacing: 0; }
.tabbar a { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
main.adm { padding-top: var(--sp-6); }
.adm-wrap { width: min(1200px, 100% - 32px); margin-inline: auto; } /* the same column as every other page */
.adm-subnav { display: flex; align-items: center; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 26px; overflow-x: auto; scrollbar-width: none; }
.adm-subnav::-webkit-scrollbar { display: none; }
.adm-subnav-tag { color: var(--text-3); margin-right: 14px; flex: 0 0 auto; }
.adm-subnav a { flex: 0 0 auto; padding: 12px 12px 13px; color: var(--text-3); text-decoration: none; font: 500 14px/1 var(--sans); border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .2s; }
.adm-subnav a:hover { color: var(--text); }
.adm-subnav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }
.adm-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.adm-head > div:first-child { flex: 1 1 320px; min-width: 0; }
.adm-head h1 { font-size: clamp(2rem, 4vw, 2.9rem); margin: 0; overflow-wrap: anywhere; }
.adm-sub { margin: 8px 0 0; font-size: 14px; }
.adm-head-r { display: flex; gap: 8px; align-items: center; }
.adm-loading { padding: 40px 0; }
.adm-claim { margin-top: 24px; }
.adm-claim h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin: 14px 0 10px; }
.adm-crumbs { display: flex; gap: 8px; align-items: center; font: 500 12px/1 var(--mono); letter-spacing: .06em; color: var(--text-3); margin-bottom: 12px; }
.adm-crumbs a { color: var(--text-2); text-decoration: none; }
.adm-crumbs a:hover { color: var(--text); }
.adm-empty { margin: 8px 0 0; }
.adm-stale { opacity: .45; transition: opacity .2s; pointer-events: none; }
.nowrap { white-space: nowrap; }

/* KPI tiles (stat-tile contract: label, sans value with proportional figures, optional context) */
.adm-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-bottom: 18px; }
.adm-kpi { background: var(--surface); padding: 16px 16px 18px; min-width: 0; }
.adm-kpi .l { font-size: 13px; color: var(--text-2); }
.adm-kpi .v { font: 600 28px/1.1 var(--sans); letter-spacing: -.02em; margin-top: 8px; color: var(--text); }
.adm-kpi .v small { font: 500 13px/1 var(--sans); color: var(--text-3); letter-spacing: 0; }
.adm-kpi .s { font-size: 12.5px; color: var(--text-3); margin-top: 6px; }
.adm-kpis.sm { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.adm-kpis.sm .adm-kpi .v { font-size: 22px; }
@media (max-width: 900px) { .adm-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* chart cards */
.adm-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: 20px; }
.adm-grid2.wide-l { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.adm-grid4 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: 20px; }
@media (max-width: 960px) { .adm-grid2, .adm-grid2.wide-l, .adm-grid4 { grid-template-columns: minmax(0, 1fr); } }
.adm-chart { min-width: 0; padding: 20px; }
.adm-chart + .adm-chart { margin-top: 0; }
.adm-ov > section.adm-chart { margin-bottom: 20px; }
.adm-ch-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.adm-ch-head h3 { font: 600 15px/1.3 var(--sans); letter-spacing: -.005em; margin: 0; }
.adm-ch-head p { margin: 4px 0 0; }
.adm-seg { padding: 2px; }
.adm-seg button { padding: 6px 10px; font-size: 12.5px; }
.adm-plot { width: 100%; min-height: 210px; }
.adm-svg { display: block; width: 100%; overflow: visible; }
.adm-svg:focus-visible { outline-offset: 4px; }
.adm-ax { font: 400 11px var(--sans); fill: var(--text-3); font-variant-numeric: tabular-nums; }
.adm-lbl { fill: var(--text-2); font-weight: 500; }
.adm-mk { transition: opacity .15s; }
.adm-svg:hover .adm-mk:not(.on), .adm-svg:focus .adm-mk:not(.on) { opacity: .55; }
.adm-tip { position: fixed; z-index: 260; pointer-events: none; background: rgba(var(--panel-rgb), .97); border: 1px solid var(--line-strong); border-radius: 10px; padding: 8px 12px; box-shadow: 0 16px 34px -18px rgba(var(--shadow-rgb), .9); font-size: 13px; max-width: 260px; }
.adm-tip-t { color: var(--text-3); font-size: 12px; margin-bottom: 4px; }
.adm-tip-r { display: flex; align-items: center; gap: 8px; }
.adm-tip-r i { width: 12px; height: 2px; border-radius: 2px; flex: 0 0 12px; }
.adm-tip-r b { color: var(--text); font-weight: 600; font-size: 14px; }
.adm-tip-r span { color: var(--text-2); }

/* horizontal bars */
.adm-hb { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; --hbw: .78; }
.adm-hb-row { display: grid; grid-template-columns: minmax(84px, 40%) minmax(0, 1fr); gap: 12px; align-items: center; padding: 6px 6px; margin: 0 -6px; border-radius: 6px; cursor: default; }
.adm-hb-row:hover, .adm-hb-row:focus-visible { background: rgba(var(--fg-rgb), .04); }
.adm-hb-l { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-2); min-width: 0; }
.adm-hb-l > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-hb-i { width: 18px; height: 18px; flex: 0 0 18px; display: inline-grid; place-items: center; }
.adm-hb-i svg { width: 18px; height: 18px; }
.adm-hb-i.st { color: var(--text-3); }
.adm-hb-t { display: flex; align-items: center; gap: 8px; min-width: 0; }
.adm-hb-b { display: block; height: 10px; border-radius: 0 4px 4px 0; flex: 0 1 auto; min-width: 2px; }
.adm-hb-v { font-size: 13px; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* tables */
.adm-table { font-size: 14px; }
.adm-table th, .adm-table td { padding: 11px 14px; vertical-align: middle; }
.adm-table thead th { white-space: nowrap; }
.adm-table td:nth-child(2) { background: none; }
.adm-table thead th:nth-child(2) { color: var(--text-3); }
.adm-table tbody th { font-weight: 400; color: var(--text); text-align: left; }
.adm-table .r { text-align: right; }
.adm-table .num-t { font-variant-numeric: tabular-nums; }
.adm-table tbody tr:last-child > * { border-bottom: 0; }
.adm-tcard { padding: 0; }
.adm-click tbody tr[data-href], .adm-click tbody tr[data-user] { cursor: pointer; transition: background .15s; }
.adm-click tbody tr[data-href]:hover, .adm-click tbody tr[data-user]:hover { background: rgba(var(--fg-rgb), .03); }
.adm-blk { color: var(--text); text-decoration: none; display: inline-flex; gap: 12px; align-items: baseline; }
.adm-blk:hover { color: var(--accent-2); }
.adm-blk .mono { font-size: 12px; }
.adm-sort { background: none; border: 0; padding: 0; font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.adm-sort:hover { color: var(--text); }
.adm-meter-wrap { display: inline-flex; align-items: center; gap: 8px; justify-content: flex-end; }
.adm-meter { width: 56px; height: 4px; border-radius: 99px; background: rgba(var(--accent-rgb), .2); overflow: hidden; display: inline-block; }
.adm-meter span { display: block; height: 100%; background: #e76128; border-radius: 99px; }
.adm-st { height: 24px; gap: 8px; }
.adm-st i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.adm-st.st-pub { color: var(--ok); border-color: rgba(var(--ok-rgb), .3); }
.adm-st.st-draft { color: var(--accent-2); border-color: rgba(var(--accent2-rgb), .3); }
.adm-st.st-none { color: var(--text-3); border-style: dashed; }
.adm-st.st-orphan { color: var(--bad); border-color: rgba(var(--bad-rgb), .3); }
.adm-cnt { font: 500 12px/1 var(--mono); white-space: nowrap; }
.adm-cnt.bad { color: var(--bad); } .adm-cnt.ok { color: var(--text-3); } .adm-cnt.warn { color: var(--accent-2); }

/* people */
.adm-people { list-style: none; margin: 0; padding: 0; }
.adm-people li + li { border-top: 1px solid var(--line); }
.adm-person { width: 100%; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 4px; background: none; border: 0; text-align: left; cursor: pointer; border-radius: 8px; }
.adm-person:hover { background: rgba(var(--fg-rgb), .03); }
.adm-person.tight { grid-template-columns: 30px minmax(0, 1fr); padding: 0; min-width: 220px; }
.adm-person .who { display: flex; flex-direction: column; min-width: 0; }
.adm-person .who b { font-weight: 500; font-size: 14.5px; }
.adm-person .who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-av { width: 34px; height: 34px; display: block; font-size: .85rem; }
.adm-person.tight .adm-av { width: 30px; height: 30px; }
.adm-av.lg { width: 52px; height: 52px; font-size: 1.2rem; flex: 0 0 52px; }
@media (max-width: 520px) { .adm-person:not(.tight) { grid-template-columns: 34px minmax(0, 1fr) auto; } .adm-person:not(.tight) > :nth-child(3) { display: none; } }

/* filters */
.adm-filters { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 16px; }
.adm-fl { flex: 0 1 220px; min-width: 150px; }
.adm-fl.grow { flex: 1 1 320px; }
.adm-fl:first-child { flex: 1 1 260px; }
.adm-fl label { font-size: 12.5px; margin-bottom: 6px; }
.adm-fl .input, .adm-fl select { min-height: 40px; padding: 8px 12px; }
.adm-count { margin-left: auto; padding-bottom: 10px; }
.adm-pager { display: flex; gap: 12px; align-items: center; justify-content: flex-end; margin-top: 14px; }

/* editor toolbar */
.adm-toolbar { position: sticky; top: var(--nav-h); z-index: 30; display: flex; gap: 12px 16px; align-items: center; flex-wrap: wrap; padding: 10px 0; margin-bottom: 14px; background: rgba(var(--bg-rgb), .88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.adm-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-left: auto; justify-content: flex-end; }
.adm-status { font: 500 12px/1.2 var(--mono); color: var(--text-3); display: inline-flex; align-items: center; gap: 8px; }
.adm-status.dirty { color: var(--accent-2); }
.adm-status.dirty::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); }
.adm-note { width: 220px; min-height: 34px; padding: 6px 10px; font-size: 13.5px; }
.adm-kbd { font: 500 var(--fs-xs)/1 var(--mono); color: var(--text-3); border: 1px solid var(--line-strong); border-radius: 4px; padding: 2px 4px; margin-left: 2px; }
.adm-del { color: var(--bad); padding: 0 9px; }
@media (max-width: 760px) { .adm-toolbar { position: static; } .adm-actions { margin-left: 0; justify-content: flex-start; } .adm-note { flex: 1 1 100%; width: auto; order: 5; } .adm-kbd { display: none; } }
.adm-danger { background: var(--bad); color: #220806; border-color: transparent; font-weight: 600; }
.adm-danger:hover { background: #ff8e81; border-color: transparent; }
.adm-danger-ghost { color: var(--bad); border-color: rgba(var(--bad-rgb), .3); }
.adm-danger-ghost:hover { background: var(--bad-soft); border-color: rgba(var(--bad-rgb), .5); }

/* validation */
.adm-val { margin-bottom: 14px; padding: 16px 18px; }
.adm-val .row { gap: 16px; }
.adm-issues { list-style: none; margin: 10px 0 0; padding: 0; max-height: 280px; overflow-y: auto; }
.adm-issue { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.adm-issue .k { font: 600 var(--fs-xs)/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; width: 64px; flex: 0 0 64px; }
.adm-issue.bad .k { color: var(--bad); } .adm-issue.warn .k { color: var(--accent-2); }
.adm-path { background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 3px 7px; font-size: 12px; color: var(--text-2); cursor: pointer; max-width: 100%; overflow-wrap: anywhere; text-align: left; }
.adm-path:hover { color: var(--text); border-color: var(--line-strong); }

/* lesson editor layout */
.adm-editor { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 32px; align-items: start; }
.adm-secnav { position: sticky; top: calc(var(--nav-h) + 76px); display: grid; gap: 1px; max-height: calc(100vh - 160px); overflow-y: auto; }
.adm-secnav button { display: flex; gap: 12px; align-items: baseline; text-align: left; background: none; border: 0; border-left: 1px solid var(--line); padding: 7px 0 7px 12px; color: var(--text-2); font: 500 13.5px/1.2 var(--sans); cursor: pointer; }
.adm-secnav button:hover { color: var(--text); border-left-color: var(--accent-2); }
.adm-secnav .mono { font-size: var(--fs-xs); }
@media (max-width: 960px) {
  .adm-editor { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .adm-secnav { position: static; display: flex; overflow-x: auto; max-height: none; border-bottom: 1px solid var(--line); scrollbar-width: none; }
  .adm-secnav button { flex: 0 0 auto; border-left: 0; padding: 8px 10px; }
}
.adm-form { min-width: 0; }
.adm-sec { padding: 28px 0 32px; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--nav-h) + 80px); }
.adm-sec:first-child { border-top: 0; padding-top: 4px; }
.adm-sec-h { display: flex; gap: 16px; align-items: center; margin-bottom: 20px; }
.adm-sec-h .ico { width: 36px; height: 36px; color: var(--accent-2); flex: 0 0 36px; }
.adm-sec-h .ico svg { width: 36px; height: 36px; }
.adm-sec-h h2 { font-size: 1.9rem; margin: 4px 0 0; }

/* generic form fields */
.adm-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 16px 16px; }
.adm-f { min-width: 0; }
.adm-f.full { grid-column: 1 / -1; }
.adm-f > label, .adm-group > legend, .adm-lt { font-size: 13px; font-weight: 500; color: var(--text-2); margin-bottom: 6px; }
.adm .input, .adm select, .adm textarea { min-height: 40px; padding: 8px 12px; font-size: 14.5px; }
.adm textarea { min-height: 0; line-height: 1.5; }
.adm .input[readonly] { color: var(--text-3); background: transparent; }
.adm-help { font-size: 12.5px; color: var(--text-3); margin-top: 5px; }
.adm-lh + .adm-help { margin: -2px 0 8px; }
.adm-group { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px 14px; margin: 0; }
.adm-group > legend { padding: 0 6px; margin-left: -6px; }
.adm-err { border-color: var(--bad) !important; box-shadow: 0 0 0 3px var(--bad-soft) !important; }
.adm-color { display: flex; gap: 8px; align-items: center; }
.adm-color input[type=color] { width: 44px; height: 40px; padding: 3px; border-radius: var(--r-xs); border: 1px solid var(--line-strong); background: var(--bg-elev); cursor: pointer; flex: 0 0 44px; }
.adm-color .input { flex: 1; }
.adm-radios { display: grid; gap: 8px; }
.adm-radio { display: flex; align-items: center; gap: 12px; margin: 0; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; font-weight: 400; color: var(--text); cursor: pointer; font-size: 14px; }
.adm-radio:has(input:checked) { border-color: rgba(var(--ok-rgb), .45); background: var(--ok-soft); }
.adm-radio input { accent-color: var(--ok); width: 16px; height: 16px; margin: 0; flex: 0 0 16px; }
.adm-radio .k { font: 500 var(--fs-xs)/1 var(--mono); color: var(--text-3); }
.adm-radio .t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-answer { border: 0; padding: 0; margin: 0; }
.adm-answer > legend { padding: 0; margin-bottom: 6px; font-size: 13px; font-weight: 500; color: var(--text-2); }
.adm-kw + .adm-kw { margin-top: 10px; }
.adm-kw label { font-weight: 400; font-size: 13.5px; color: var(--text); margin-bottom: 5px; }
.adm-kw label .mono { font-size: var(--fs-xs); margin-right: 6px; }
.adm-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.adm-chip { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 12.5px; color: var(--text-2); cursor: pointer; }
.adm-chip:has(input:checked) { color: var(--text); border-color: rgba(var(--accent2-rgb), .5); background: rgba(var(--accent2-rgb), .06); }
.adm-chip input { accent-color: var(--accent); margin: 0; }
.adm-chip.bad { border-color: rgba(var(--bad-rgb), .45); color: var(--bad); }

/* lists */
.adm-lh { display: flex; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.adm-lt { margin: 0; }
.adm-ul, .adm-rows, .adm-cards { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.adm-li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; align-items: start; }
.adm-n { font-size: var(--fs-xs); color: var(--text-3); padding-top: 12px; }
.adm-list.compact .adm-n { padding-top: 10px; }
.adm-list.compact .input { min-height: 36px; padding: 6px 10px; font-size: 14px; }
.adm-tools { display: flex; gap: 2px; align-items: center; padding-top: 3px; }
.adm-ico { width: 32px; height: 32px; display: inline-grid; place-items: center; border: 1px solid transparent; border-radius: 8px; background: none; color: var(--text-3); cursor: pointer; padding: 0; text-decoration: none; }
.adm-ico svg { width: 16px; height: 16px; }
.adm-ico:hover:not([disabled]) { color: var(--text); background: rgba(var(--fg-rgb), .05); border-color: var(--line); }
.adm-ico[data-danger]:hover:not([disabled]) { color: var(--bad); }
.adm-ico[disabled] { opacity: .25; cursor: default; }
.adm-add { color: var(--text-2); }
.adm-add svg { width: 15px; height: 15px; }
.adm-rhead { display: grid; grid-template-columns: 22px var(--cols) 124px; gap: 8px; font: 500 var(--fs-xs)/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); padding: 0 0 8px; }
.adm-ritem { display: grid; grid-template-columns: 22px var(--cols) 124px; gap: 8px; align-items: start; padding: 6px 0; border-top: 1px solid var(--line); }
.adm-ritem .adm-f.full { grid-column: auto; }
.adm-ritem textarea { resize: vertical; }
.adm-rtools { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.adm-rtools .adm-tools { padding-top: 0; flex-wrap: wrap; justify-content: flex-end; }
.adm-rtools .adm-tools .adm-ico, .adm-rtools > .adm-ico { width: 28px; height: 28px; }
@media (max-width: 860px) {
  .adm-rhead { display: none; }
  .adm-ritem { grid-template-columns: minmax(0, 1fr); padding: 12px 0; gap: 8px; }
  .adm-ritem > .adm-n { padding: 0; }
  .adm-ritem .sr-only { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; font-size: 12.5px; color: var(--text-3); margin-bottom: 4px; }
  .adm-rtools { justify-content: flex-start; }
}
.adm-card { border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); position: relative; }
.adm-card > .adm-tools { position: absolute; top: 6px; right: 8px; padding: 0; }
.adm-chead, .adm-card summary { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 8px 160px 8px 16px; }
.adm-card summary { cursor: pointer; list-style: none; border-radius: var(--r-sm); }
.adm-card summary::-webkit-details-marker { display: none; }
.adm-card summary:hover { background: rgba(var(--fg-rgb), .025); }
.adm-chev { width: 16px; height: 16px; color: var(--text-3); transition: transform .2s var(--ease); flex: 0 0 16px; }
.adm-chev svg { width: 16px; height: 16px; }
details[open] > summary .adm-chev { transform: rotate(90deg); }
.adm-chead .adm-n, .adm-card summary .adm-n { padding: 0; }
.adm-ct { font-size: 14px; color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-sw { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 10px; }
.adm-cbody { padding: 4px 14px 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.adm-cbody .adm-card { background: var(--bg-elev); }
@media (max-width: 520px) {
  .adm-chead, .adm-card summary { padding-right: 16px; flex-wrap: wrap; }
  .adm-card > .adm-tools { position: static; padding: 0 8px 8px; }
  .adm-card > details + .adm-tools { padding-top: 0; }
  .adm-cbody { padding: 12px 10px 14px; }
  .adm-li { grid-template-columns: minmax(0, 1fr) auto; }
  .adm-li > .adm-n { display: none; }
  .adm-li .adm-tools { flex-direction: column; gap: 0; }
  .adm-li .adm-tools .adm-ico { width: 28px; height: 22px; }
}

/* JSON */
.adm-json label { font-size: 13px; }
.adm-code { width: 100%; min-height: 62vh !important; font: 400 13px/1.55 var(--mono) !important; tab-size: 2; white-space: pre; overflow: auto; background: var(--bg-elev); }
.adm-json-s { font: 500 12.5px/1.4 var(--mono); margin-top: 8px; }
.adm-json-s.ok { color: var(--text-3); } .adm-json-s.bad { color: var(--bad); } .adm-json-s.warn { color: var(--accent-2); }
.adm-pre { font: 400 12.5px/1.55 var(--mono); background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px; max-height: 58vh; overflow: auto; margin: 16px 0 0; color: var(--text-2); }

/* create / preview */
.adm-create { max-width: 720px; }
.adm-create h2 { margin: 12px 0 10px; font-size: 2.2rem; }
.adm-preview { display: grid; gap: 20px; }
.adm-preview > .card h3 { margin: 12px 0 8px; }
.adm-pv-hero h2 { margin: 16px 0 8px; }
.adm-pv-list { margin: 12px 0 0; padding-left: 20px; color: var(--text-2); font-size: 14.5px; }
.adm-pv-lines .story-line { padding: 10px 4px; grid-template-columns: 36px 1fr; }
.adm-pv-lines .story-line > span:last-child { display: none; }
.adm-pv-lines .avatar { width: 36px; height: 36px; }
.adm-pv-lines .l1 .mono { font-size: var(--fs-xs); color: var(--text-3); margin-right: 4px; }
.ico-s { width: 20px; height: 20px; color: var(--accent-2); display: inline-block; }
.ico-s svg { width: 20px; height: 20px; }
.adm-hint { margin: 0 0 14px; }

/* modals */
.modal.adm-modal { width: min(860px, 100%); }
.adm-ud-h { flex-wrap: nowrap; align-items: flex-start; }
.adm-ellip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; margin: 20px 0 8px; }
.adm-dl > div { background: var(--surface-2); padding: 12px 12px; }
.adm-dl dt { font-size: 12px; color: var(--text-3); }
.adm-dl dd { margin: 3px 0 0; font-size: 14px; color: var(--text); }
.adm-h4 { font: 600 13px/1.3 var(--sans); color: var(--text-2); margin: 22px 0 8px; letter-spacing: 0; }
.adm-feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; font-size: 14px; }
.adm-feed li { padding: 10px 0; border-top: 1px solid var(--line); }
.adm-danger-zone { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; justify-content: space-between; margin-top: 24px; padding: 14px 16px; border: 1px solid rgba(var(--bad-rgb), .25); border-radius: var(--r-sm); background: var(--bad-soft); }
.adm-danger-zone b { font-weight: 500; }
.adm-quote { margin: 12px 0; padding: 4px 0 4px 14px; border-left: 2px solid var(--line-strong); color: var(--text); font-size: 14.5px; }

/* community + data */
.adm-posts { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.adm-posts .post p { overflow-wrap: anywhere; }
.adm-linkbtn { background: none; border: 0; padding: 0; cursor: pointer; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.adm-linkbtn:hover { color: var(--text); text-decoration: underline; }
.adm-data h3 { margin: 10px 0 8px; }
.adm-grid2:has(> .adm-data) { align-items: start; }
.adm-imp { margin-top: 6px; }
.adm-imp .adm-kpis { margin-bottom: 12px; }
.adm-ids summary { cursor: pointer; font-size: 13.5px; color: var(--text-2); margin-bottom: 6px; }
.adm-ul, .adm-rows, .adm-cards, .adm-hb { grid-template-columns: minmax(0, 1fr); }
.adm-card, .adm-li, .adm-ritem, .adm-sec, .adm-f > * { min-width: 0; }
.adm-tcard .adm-table, #bf .adm-table, .adm-preview .adm-table, .adm-ud .adm-table { min-width: 640px; }
.adm .table-scroll, .adm-ud .table-scroll, .adm-ritem, .adm-li, .adm-sec { position: relative; } /* keeps .sr-only labels inside their scroll box */
.adm-group > .adm-help { margin: 0 0 10px; }

/* ---------- calm theme adjustments (everything except Young Learners) ---------- */
html:not(.theme-dark) body::before { opacity: .02; }
html:not(.theme-dark) .btn-lava, html:not(.theme-dark) .btn-primary { background: var(--text); color: var(--bg); box-shadow: none; }
html:not(.theme-dark) .btn-lava:hover, html:not(.theme-dark) .btn-primary:hover { background: #000; }
html:not(.theme-dark) .btn:not(.btn-lava):not(.btn-primary):not(.btn-light):hover { background: rgba(var(--fg-rgb), .04); }
html:not(.theme-dark) .btn-light:hover { background: #000; color: var(--bg); }
html:not(.theme-dark) .card { box-shadow: 0 1px 0 rgba(var(--shadow-rgb), .03); }
html:not(.theme-dark) .card-hot { border-color: rgba(var(--fg-rgb), .22); background: var(--surface); }
html:not(.theme-dark) .v3d { background: linear-gradient(180deg, #c9b8d6 0%, #efd2c6 60%, #f1d3cf 100%); }
html:not(.theme-dark) .v3d-label { text-shadow: none; color: var(--text); background: rgba(var(--panel-rgb), .86); padding: 4px 9px 4px 7px; border-radius: 999px; border: 1px solid rgba(var(--fg-rgb), .08); box-shadow: 0 6px 16px -10px rgba(var(--shadow-rgb), .6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); font-size: var(--fs-xs); letter-spacing: .12em; }
html:not(.theme-dark) .v3d-label::before { width: 7px; height: 7px; border-radius: 50%; opacity: 1; }
html:not(.theme-dark) .v3d-label .n { color: var(--text-3); }
html:not(.theme-dark) .v3d-label.future { opacity: .62; }
html:not(.theme-dark) .v3d-label.current { background: var(--text); color: var(--bg); border-color: transparent; }
html:not(.theme-dark) .v3d-label.current .n { color: rgba(var(--bg-rgb), .6); }
html:not(.theme-dark) .v3d-label.current .t::after { color: rgba(var(--bg-rgb), .75); }
html:not(.theme-dark) .mic-btn { box-shadow: 0 8px 22px -12px rgba(var(--accent-rgb), .7); }
html:not(.theme-dark) .volcano-map .alt, html:not(.theme-dark) .volcano-map .overlay-info .tag { text-shadow: 0 1px 6px rgba(255, 255, 255, .7); }
html:not(.theme-dark) .reading { background: #fffdf9; border: 1px solid var(--line); box-shadow: 0 24px 50px -36px rgba(var(--shadow-rgb), .5); }
html:not(.theme-dark) .toast { background: rgba(var(--panel-rgb), .98); }
html:not(.theme-dark) .msg.me { background: rgba(var(--fg-rgb), .06); border-color: rgba(var(--fg-rgb), .12); }
html:not(.theme-dark) ::selection { background: rgba(var(--accent-rgb), .25); color: var(--text); }
html:not(.theme-dark) .auth-art::after { background: linear-gradient(0deg, rgba(40, 30, 60, .55) 0%, rgba(40, 30, 60, 0) 55%); }
html:not(.theme-dark) .auth-art .caption, html:not(.theme-dark) .auth-art .caption .muted { color: #fff; }
html:not(.theme-dark) .auth-art .caption .tag { color: rgba(255, 255, 255, .85); }
.auth-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 60%; max-width: none; }
/* small screens: keep the 3D level labels from colliding (current level keeps its full label) */
@media (max-width: 600px) {
  html:not(.theme-dark) .v3d-label:not(.current) .t { display: none; }
  html:not(.theme-dark) .v3d-label:not(.current) { padding: 3px 7px 3px 6px; gap: 4px; }
}

/* ---------- My Space: the learner's personal home ---------- */
.space { max-width: 1160px; }
.space-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px 32px; flex-wrap: wrap; margin: 8px 0 32px; }
.space-head h1 { margin: 12px 0 0; font-size: clamp(2.4rem, 5vw, 3.5rem); }
.space-stats { list-style: none; margin: 0; padding: 0; display: flex; gap: 24px; flex-wrap: wrap; color: var(--text-3); font-size: 14px; }
.space-stats li { display: flex; align-items: center; gap: 8px; }
.space-stats svg { width: 17px; height: 17px; color: var(--accent-2); }
.space-stats b { color: var(--text); font-weight: 500; }
.space-top { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 20px; }
@media (max-width: 1000px) { .space-top { grid-template-columns: minmax(0, 1fr); } }
.space-continue { display: flex; flex-direction: column; gap: 20px; text-decoration: none; color: inherit; padding: 28px 32px 28px; background: var(--surface); transition: border-color .2s, box-shadow .2s; }
.space-continue:hover { border-color: rgba(var(--fg-rgb), .32); box-shadow: 0 24px 48px -34px rgba(var(--shadow-rgb), .5); }
.space-continue h2 { margin: 0 0 8px; font-size: clamp(2rem, 3.6vw, 2.7rem); }
.space-continue p { margin: 0; max-width: 40em; }
.sc-rail { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; margin-top: auto; }
.sc-rail i { height: 4px; border-radius: 2px; background: rgba(var(--fg-rgb), .1); }
.sc-rail i.done { background: var(--accent); }
.sc-rail i.now { background: linear-gradient(90deg, var(--accent) 0 40%, rgba(var(--accent-rgb), .28) 40%); }
.sc-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.sc-foot .btn svg { width: 16px; height: 16px; }
.sc-foot b { color: var(--text); font-weight: 500; }
.space-today { padding: 24px 28px 12px; }
.space-today ol { list-style: none; margin: 12px 0 0; padding: 0; }
.space-today li + li { border-top: 1px solid var(--line); }
.space-today a { display: flex; align-items: center; gap: 16px; padding: 16px 0; text-decoration: none; color: inherit; }
.space-today a > svg { width: 16px; height: 16px; margin-left: auto; flex: 0 0 16px; color: var(--text-3); transition: transform .2s; }
.space-today a:hover > svg { transform: translateX(3px); color: var(--text); }
.space-today b { display: block; font-weight: 500; }
.space-today small { display: block; color: var(--text-3); font-size: 13px; margin-top: 2px; }
.st-check { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-strong); color: var(--text-2); }
.st-check svg { width: 17px; height: 17px; }
.space-today li.done .st-check { background: var(--ok); border-color: var(--ok); color: #fff; }
.space-today li.done b { color: var(--text-2); text-decoration: line-through; text-decoration-color: rgba(var(--fg-rgb), .3); }
.space-climb { margin-top: clamp(56px, 8vw, 96px); }
.space-climb-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 32px; flex-wrap: wrap; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.space-climb-head h2 { margin: 12px 0 0; font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
.space-climb-head p { margin: 0; font-size: 14px; }
.space-climb-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px 40px; align-items: center; margin: 26px 0 30px; }
@media (max-width: 1000px) { .space-climb-grid { grid-template-columns: minmax(0, 1fr); } }
.space-lvl { border-left: 1px solid var(--line); padding: 8px 0 8px 28px; }
@media (max-width: 1000px) { .space-lvl { border-left: 0; border-top: 1px solid var(--line); padding: 24px 0 0; } }
.space-lvl h3 { font-size: 2rem; margin: 12px 0 8px; }
.space-lvl p { margin: 0 0 16px; }
.space-lvl .sl-bar { height: 4px; border-radius: 2px; background: rgba(var(--fg-rgb), .1); overflow: hidden; margin: 20px 0 12px; }
.space-lvl .sl-bar i { display: block; height: 100%; border-radius: 2px; }
.space-lvl b { font-weight: 500; }
.space-lvl .sl-state { font: 500 var(--fs-xs)/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-2); margin: 0; }
.place-vp { width: 100%; }

/* ---------- Illustrated climb (volcanoPath.js) ---------- */
.vp-wrap { overflow: hidden; margin: 0 -4px; padding: 0 4px; }
.vp { position: relative; width: 100%; aspect-ratio: 1000 / 540; --vp-m1: #e6d9cf; --vp-m2: #f1e9e1; --vp-sun: #efc3a8; color: var(--text); }
html.theme-dark .vp { --vp-m1: #2a2220; --vp-m2: #1a1514; --vp-sun: #8a4a33; }
.vp-art { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.vp-far { fill: rgba(var(--fg-rgb), .035); }
.vp-mountain { fill: url(#vp-m); stroke: var(--text); stroke-width: 2; stroke-linejoin: round; }
.vp-crater { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.vp-ridge { fill: none; stroke: rgba(var(--fg-rgb), .12); stroke-width: 1.5; stroke-linecap: round; }
.vp-cloud { fill: var(--bg); }
.vp-cloud-line { fill: none; stroke: rgba(var(--fg-rgb), .09); stroke-width: 1.5; }
.vp-cloud.back { fill: rgba(var(--bg-rgb), .75); }
.vp-trail { fill: none; stroke: rgba(var(--fg-rgb), .38); stroke-width: 2; stroke-dasharray: 2 7; stroke-linecap: round; }
.vp-walked { fill: none; stroke: var(--accent); stroke-width: 3.5; stroke-linecap: round; }
.vp-points { position: absolute; inset: 0; }
.vp-pt { position: absolute; display: flex; align-items: center; gap: 12px; padding: 4px; margin: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; transform: translate(-13px, -50%); text-align: left; -webkit-tap-highlight-color: transparent; }
.vp-pt.l { flex-direction: row-reverse; transform: translate(calc(-100% + 13px), -50%); text-align: right; }
.vp-pt .dot { width: 18px; height: 18px; flex: 0 0 18px; border-radius: 50%; background: var(--bg); border: 2px solid rgba(var(--fg-rgb), .45); box-shadow: 0 0 0 5px rgba(var(--bg-rgb), .7); transition: transform .2s var(--ease), box-shadow .2s; }
.vp-pt.open .dot { border-color: var(--text); }
.vp-pt.done .dot { background: var(--text); border-color: var(--text); }
.vp-pt.now .dot { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 6px rgba(var(--accent-rgb), .22); }
.vp-pt .lb { display: flex; flex-direction: column; line-height: 1.05; font-family: var(--serif); font-size: clamp(1.05rem, 1.9vw, 1.45rem); white-space: nowrap; background: rgba(var(--bg-rgb), .82); padding: 4px 8px 5px; border-radius: 8px; color: var(--text-2); }
.vp-pt .lb small { font: 500 var(--fs-xs)/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.vp-pt .lb em { font: 500 var(--fs-xs)/1.6 var(--mono); letter-spacing: .12em; text-transform: uppercase; font-style: normal; color: var(--accent-2); }
.vp-pt.next .lb { color: var(--text-3); }
.vp-pt:hover .lb, .vp-pt[aria-selected="true"] .lb { color: var(--text); }
.vp-pt:hover .dot { transform: scale(1.15); }
.vp-pt[aria-selected="true"] .dot { transform: scale(1.2); box-shadow: 0 0 0 5px rgba(var(--bg-rgb), .8), 0 0 0 7px var(--text); }
.vp-pt.now[aria-selected="true"] .dot { box-shadow: 0 0 0 5px rgba(var(--bg-rgb), .8), 0 0 0 7px var(--accent); }
.vp-pt:focus-visible { outline: none; }
.vp-pt:focus-visible .dot { outline: 2px solid var(--accent); outline-offset: 6px; }
@media (max-width: 720px) {
  .vp { width: 150%; margin-left: -25%; }
  .vp-pt.l { flex-direction: row; text-align: left; transform: translate(-15.5px, -50%); }
  .vp-pt .lb { font-size: .95rem; padding: 2px 6px 3px; }
  .vp-pt .lb small { display: none; }
  .vp-pt:not([aria-selected="true"]):not(.now) .lb { display: none; }
  .vp-pt .dot { width: 13px; height: 13px; flex-basis: 13px; box-shadow: 0 0 0 3px rgba(var(--bg-rgb), .7); }
  .vp-pt { padding: 9px; gap: 8px; transform: translate(-15.5px, -50%); }
  .vp-pt[aria-selected="true"] .dot { box-shadow: 0 0 0 3px rgba(var(--bg-rgb), .8), 0 0 0 5px var(--text); }
  .vp-pt.now .dot { box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .22); }
  .vp-pt.now[aria-selected="true"] .dot { box-shadow: 0 0 0 3px rgba(var(--bg-rgb), .8), 0 0 0 5px var(--accent); }
}

/* camps that are still being written collapse to one quiet line */
.camp.soon-all { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; padding: 14px 0; border-top: 1px solid var(--line); margin: 0; }
.camp.soon-all .camp-head { margin: 0; }
.camp.soon-all h3 { color: var(--text-2); }
.camp.soon-all .soon-note { margin-left: auto; font: 500 var(--fs-xs)/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }

/* ---------- language menu ---------- */
.lang-menu { position: relative; }
.lang-btn { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border-radius: 999px; border: 1px solid transparent; background: none; color: var(--text-2); font: 500 12px/1 var(--mono); letter-spacing: .08em; cursor: pointer; }
.lang-btn svg { width: 16px; height: 16px; flex: 0 0 16px; }
.lang-btn:hover, .lang-btn[aria-expanded="true"] { border-color: var(--line-strong); color: var(--text); }
.lang-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 120; list-style: none; margin: 0; padding: 6px; min-width: 170px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: 0 24px 50px -24px rgba(var(--shadow-rgb), .6); }
.lang-list button { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; border: 0; border-radius: 9px; background: none; color: var(--text-2); font: 400 14px/1.2 var(--sans); text-align: left; cursor: pointer; }
.lang-list button:hover, .lang-list button:focus-visible { background: rgba(var(--fg-rgb), .05); color: var(--text); outline: none; }
.lang-list button[aria-checked="true"] { color: var(--text); font-weight: 500; }
.lang-list button[aria-checked="true"]::after { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.topbar.paper .lang-btn { color: #4a515c; }
@media (max-width: 560px) {
  .topbar .btn-light[href="#/signup"] { display: none; } /* every logged-out page has its own sign-up call to action */
  .lang-btn { padding: 0 8px; }
}
@media (max-width: 420px) {
  .topbar { gap: 8px; }
  .topbar .brand { gap: 8px; }
  .topbar .brand svg { width: 22px; height: 22px; }
  .topbar .brand .wm { font-size: 17.5px; }
  .topbar .btn-sm { padding-left: 11px; padding-right: 11px; }
  .lang-btn { padding: 0 6px; gap: 4px; }
}

/* ---------- Story so far (each Block carries the whole) ---------- */
.journey { border: 1px solid var(--line); border-radius: var(--r); padding: var(--card-pad); margin: 0 0 var(--sp-6); background: linear-gradient(135deg, rgba(var(--accent-rgb), .05), transparent 60%), var(--surface); }
.jr-start { margin: 10px 0 0; color: var(--text-2); }
.jr-prev { list-style: none; margin: 16px 0 0; padding: 0; position: relative; }
.jr-prev::before { content: ''; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 1px; background: var(--line-strong); }
.jr-prev li { position: relative; display: grid; grid-template-columns: 11px minmax(0, 1fr); gap: 16px; padding: 6px 0; }
.jr-dot { width: 11px; height: 11px; border-radius: 50%; margin-top: 5px; background: var(--surface); border: 1.5px solid rgba(var(--fg-rgb), .35); position: relative; z-index: 1; }
.jr-prev li.done .jr-dot { background: var(--text); border-color: var(--text); }
.jr-prev li.now .jr-dot { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .18); }
.jr-prev b { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.15rem; line-height: 1.25; }
.jr-prev span { display: block; color: var(--text-3); font-size: var(--fs-sm); line-height: 1.45; }
.jr-prev li.now b { color: var(--accent-2); }
.jr-back { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.jr-back p { margin: 0 0 10px; }
.jr-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.jr-chip { padding: 6px 12px; border-radius: 999px; border: 1px dashed rgba(var(--fg-rgb), .3); font-family: var(--serif); font-size: 1.05rem; color: var(--text-2); }
.jr-chip.owned { border-style: solid; border-color: rgba(var(--accent-rgb), .45); background: rgba(var(--accent-rgb), .07); color: var(--text); }

/* ---------- phrase network + my story ---------- */
.pn-map { padding: 18px 20px 8px; margin-bottom: 30px; }
.pn-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-3); }
.pn-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.pn-scroll { overflow-x: auto; margin: 6px -20px 0; padding: 0 20px; }
.pn-canvas { position: relative; }
.pn-canvas svg { position: absolute; left: 0; top: 0; overflow: visible; }
.pn-line { stroke: var(--line-strong); stroke-width: 1.5; fill: none; }
.pn-arc { fill: none; stroke-width: 1.6; opacity: .55; transition: opacity .2s, stroke-width .2s; }
.pn-arc.on, .pn-arc:hover { opacity: 1; stroke-width: 3; }
.pn-node { position: absolute; transform: translate(-50%, -16px); display: flex; flex-direction: column; align-items: center; gap: 8px; width: 130px; text-align: center; }
.pn-dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1.5px solid var(--text); font: 500 12px/1 var(--mono); }
.pn-t { font-size: 12.5px; line-height: 1.3; color: var(--text-2); }
.pn-list { display: grid; gap: 28px; }
.pn-group h3 { font-size: 1.5rem; margin: 0 0 10px; display: flex; align-items: baseline; gap: 12px; }
.pn-group ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.pn-group li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.pn-state { width: 24px; height: 24px; flex: 0 0 24px; }
.pn-state svg { width: 24px; height: 24px; }
.pn-group b { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.2rem; line-height: 1.25; }
.pn-group li span { display: block; }
.pn-back { color: var(--accent-2); margin-top: 4px; }
.mystory-head { margin: 20px 0 36px; }
.mystory-head h1 { margin: 12px 0 12px; font-size: clamp(2.4rem, 5vw, 3.4rem); }
.mystory-head .btn svg { width: 16px; height: 16px; }
.story-chapters { list-style: none; margin: 0; padding: 0; counter-reset: ch; }
.story-chapters li { padding: 26px 0; border-top: 1px solid var(--line); }
.sc-meta { display: flex; gap: 16px; align-items: baseline; flex-wrap: wrap; margin-bottom: 10px; color: var(--accent-2); }
.sc-text { font-family: var(--serif); font-size: clamp(1.35rem, 2.4vw, 1.65rem); line-height: 1.45; margin: 0 0 12px; white-space: pre-wrap; }
.story-chapters .btn svg { width: 15px; height: 15px; }
.space-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--stack-gap); margin-top: var(--sp-4); }
@media (max-width: 1000px) { .space-links { grid-template-columns: minmax(0, 1fr); } }
.space-mentor:empty { display: none; }
.space-link { display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-5) var(--card-pad); text-decoration: none; color: inherit; transition: border-color .2s; }
.space-link:hover { border-color: rgba(var(--fg-rgb), .3); }
.space-link b { display: block; font-weight: 500; }
.space-link small { display: block; color: var(--text-3); font-size: var(--fs-sm); margin-top: 2px; }
.space-link > svg { width: 16px; height: 16px; margin-left: auto; flex: 0 0 16px; color: var(--text-3); }
.sl-ico { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(var(--accent-rgb), .1); color: var(--accent-2); }
.sl-ico svg { width: 20px; height: 20px; }

/* ==========================================================================
   Human mentoring: "Your teacher" (mt-*) and the teaching area (teach-*)
   ========================================================================== */
.mt-portrait { display: inline-block; flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; overflow: hidden; background: var(--surface-2); }
.mt-portrait.sm { width: 36px; height: 36px; }
.mt-portrait.md { width: 52px; height: 52px; }
.mt-portrait.lg { width: 112px; height: 112px; box-shadow: 0 0 0 4px var(--surface), 0 0 0 5px var(--line-strong); }
.mt-portrait.lg .mono-av { font-size: 2.4rem; }
.mt-portrait img { width: 100%; height: 100%; object-fit: cover; }
.mt { padding-bottom: 48px; }
.mt h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-top: 40px; }
.mt-hero { display: flex; gap: 28px; align-items: flex-start; padding: var(--sp-7); background: linear-gradient(160deg, rgba(var(--accent-rgb), .08), transparent 55%), var(--surface); }
.mt-hero-b { min-width: 0; flex: 1; }
.mt-hero h1 { font-size: clamp(2.4rem, 5vw, 3.4rem); margin: 8px 0 12px; }
.mt-hero h3 { margin: 8px 0 8px; }
.mt-bio { margin: 0 0 16px; max-width: 36em; }
.mt-human { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 12px; padding: 12px 16px; border-radius: var(--r-sm); background: var(--surface-2); color: var(--text); font-size: 15px; line-height: 1.5; }
.mt-human svg { width: 18px; height: 18px; flex: 0 0 18px; margin-top: 2px; color: var(--accent-2); }
.mt-hero-pv { display: flex; gap: 20px; align-items: flex-start; margin-top: 16px; }
.mt-hero-pv .mt-portrait.lg { width: 80px; height: 80px; }
.mt-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mt-option { display: grid; grid-template-columns: 40px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 16px; row-gap: 4px; align-items: start; text-align: left; padding: var(--sp-5); border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); cursor: pointer; transition: border-color .2s, background .2s, transform .2s var(--ease); }
.mt-option:hover:not([disabled]) { border-color: rgba(var(--accent-rgb), .45); transform: translateY(-1px); }
.mt-option.on { border-color: var(--accent); background: linear-gradient(180deg, rgba(var(--accent-rgb), .08), transparent), var(--surface); }
.mt-option[disabled] { opacity: .5; cursor: not-allowed; }
.mt-option-i { grid-row: span 2; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(var(--accent-rgb), .1); color: var(--accent-2); }
.mt-option-i svg { width: 20px; height: 20px; }
.mt-option b { font-weight: 600; font-size: 15.5px; }
.mt-option small { color: var(--text-2); font-size: var(--fs-sm); line-height: 1.5; }
.mt-form { margin-top: 16px; }
.mt-form textarea { width: 100%; resize: vertical; }
.mt-direct { margin: 8px 0 0; }
.mt-count { min-height: 1em; margin-top: 4px; }
.mt-empty { display: flex; gap: 16px; align-items: flex-start; }
.mt-empty p { margin: 4px 0 0; }
.mt-thread { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.mt-item { border-radius: var(--r); padding: 16px 18px; }
.mt-item-h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.mt-who { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.mt-who b { font-weight: 600; font-size: 14.5px; }
.mt-body { font-size: 15.5px; line-height: 1.6; overflow-wrap: anywhere; }
.mt-from-student { align-self: flex-end; width: min(560px, 92%); background: var(--surface-2); border: 1px solid var(--line); }
.mt-from-teacher { align-self: flex-start; width: min(680px, 100%); background: var(--surface); border: 1px solid var(--line-strong); box-shadow: 0 10px 30px -22px rgba(var(--shadow-rgb), .45); }
.mt-from-teacher.is-new { border-color: rgba(var(--accent-rgb), .55); }
.mt-item-actions { margin-top: 12px; }
.mt-status { font: 500 var(--fs-xs)/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; padding: 4px 8px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--text-3); }
.mt-status.st-open { color: var(--accent-2); border-color: rgba(var(--accent2-rgb), .35); }
.mt-status.st-answered { color: var(--ok); border-color: rgba(var(--ok-rgb), .35); }
.mt-video { margin-top: 12px; border-radius: var(--r-sm); overflow: hidden; background: #111; aspect-ratio: 16 / 9; }
.mt-video iframe, .mt-video video { width: 100%; height: 100%; border: 0; display: block; }
.mt-video-facade { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; border: 0; cursor: pointer; color: #fff; background: radial-gradient(circle at 50% 40%, rgba(var(--accent-rgb), .45), transparent 60%), linear-gradient(160deg, #2a2420, #15110f); }
.mt-video-facade .mt-play { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .92); color: #1d2129; transition: transform .2s var(--ease); }
.mt-video-facade:hover .mt-play { transform: scale(1.06); }
.mt-video-facade .mt-play svg { width: 26px; height: 26px; margin-left: 3px; }
.mt-video-l { font-weight: 500; }
.mt-video-src { color: rgba(255, 255, 255, .7); }
.mt-meet { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 12px; padding: 16px 16px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line); }
.mt-meet-i { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(var(--accent-rgb), .12); color: var(--accent-2); flex: 0 0 40px; }
.mt-meet-i svg { width: 20px; height: 20px; }
.mt-meet-b { display: flex; flex-direction: column; flex: 1; min-width: 180px; }
.mt-meet-b b { font-weight: 600; font-size: 16px; }
.mt-card { display: flex; flex-direction: column; gap: var(--sp-3); }
.mt-card.has-new { border-color: rgba(var(--accent-rgb), .45); }
.mt-card-h { display: flex; align-items: center; gap: var(--sp-4); }
.mt-card-t { min-width: 0; flex: 1; }
.mt-card-t h3 { margin: 4px 0 0; font-size: 1.4rem; }
.mt-card p { margin: 0; }
.mt-card .btn { align-self: flex-start; }
.mt-badge { min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--accent); color: var(--accent-ink); font: 600 12.5px/1 var(--sans); }

.teach-inbox, .teach-groups, .teach-writings { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.teach-req { padding: 18px 20px; }
.teach-req-h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.teach-req-who { text-decoration: none; min-width: 0; flex: 1; }
.teach-req-meta { margin: 8px 0 0; }
.teach-req-body { margin: 10px 0 14px; font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
.teach-empty p { margin: 8px 0 16px; }
.teach-row-link { text-decoration: none; }
.teach-grp { margin: 2px 0 0 42px; }
.teach-cur { display: flex; flex-direction: column; gap: 4px; min-width: 150px; }
.teach-bar { display: block; height: 4px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.teach-bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.teach-sh { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin: 18px 0 20px; }
.teach-sh-b { min-width: 0; flex: 1; }
.teach-sh h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin: 0 0 4px; }
.teach-role { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 999px; cursor: pointer; }
.teach-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.teach-sec { margin-top: 28px; min-width: 0; }
.teach-h { font-size: 1.5rem; margin: 0 0 14px; }
.teach-strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.teach-strip li { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); }
.teach-strip li.done .teach-bar i { background: var(--ok); }
.teach-strip-t { font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.teach-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.teach-composer { margin-top: var(--stack-gap); }
.teach-composer textarea, .teach-composer .input { width: 100%; }
.teach-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: -6px 0 16px; overflow-x: auto; }
.teach-tabs button { background: none; border: 0; padding: 10px 12px 11px; color: var(--text-3); font: 500 14px/1 var(--sans); border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; }
.teach-tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.teach-replying { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; margin-bottom: 14px; border-radius: var(--r-sm); background: var(--surface-2); }
.teach-pv:empty { display: none; }
.teach-pv { margin-top: 8px; }
.teach-2col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.teach-writings li { padding: 14px 16px; }
.teach-wtext { margin: 6px 0 8px; font-size: 14.5px; line-height: 1.6; overflow-wrap: anywhere; }
.teach-writings summary { cursor: pointer; color: var(--text-2); }
.teach-fixes { margin: 6px 0; padding-left: 18px; font-size: 14px; }
.teach-fixes s { color: var(--bad); }
.teach-upgrade .tag { margin-right: 6px; }
.teach-newgroup .input { width: 100%; }
.teach-fresh { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.teach-link { display: flex; gap: 8px; margin: 8px 0; }
.teach-link .input { flex: 1; min-width: 0; font-size: 13px; }
.teach-groups li { padding: 14px 16px; }
@media (max-width: 900px) {
  .teach-grid { grid-template-columns: minmax(0, 1fr); }
  .teach-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .mt-hero { flex-direction: column; gap: 16px; padding: var(--card-pad); }
  .mt-portrait.lg { width: 88px; height: 88px; }
  .mt-options { grid-template-columns: minmax(0, 1fr); }
  .mt-from-student, .mt-from-teacher { width: 100%; }
  .teach-2col { grid-template-columns: minmax(0, 1fr); }
}
.teach-gactions { margin-top: 10px; gap: 8px; }
.teach-groups .adm-person.tight { width: auto; flex: 1 1 220px; }
.st-rhythm { margin: 4px 0 6px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--text-3); }
.space-today .st-rhythm a { display: inline; padding: 0; color: var(--text-2); margin-left: 8px; text-decoration: underline; text-underline-offset: 3px; }

/* ==========================================================================
   Voice snapshot (#/snapshot) and Unlearn cards (#/unlearn) — public/js/snapshot.js, unlearn.js
   ========================================================================== */
.vs .vs-step { display: flex; flex-direction: column; gap: 16px; }
.vs .vs-step > h1 { margin: 6px 0 0; outline: none; }
.vs-dots { margin-bottom: 30px; }
.vs-plan { margin: 0; padding-left: 20px; color: var(--text-2); line-height: 1.8; }
.vs-q { font-size: clamp(1.4rem, 2.6vw, 1.8rem); margin: 18px 0 2px; }
.vs-consent { display: grid; gap: 12px; margin-top: 6px; }
.vs-check { display: flex; gap: 12px; align-items: flex-start; margin: 0; font-weight: 400; font-size: 15px; color: var(--text); cursor: pointer; }
.vs-check input { width: 18px; height: 18px; margin-top: 2px; flex: 0 0 auto; accent-color: var(--text); }
.vs-check.off { color: var(--text-3); cursor: not-allowed; }
.vs-reassure { font: 400 1.2rem/1.4 var(--serif); font-style: italic; color: var(--text-2); margin: 6px 0 0; }
.vs-nav { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.vs-title { font-size: clamp(2rem, 4.4vw, 2.8rem); }
.vs-story { padding: var(--card-pad); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.vs-story p { font: 400 clamp(1.3rem, 2.4vw, 1.6rem)/1.55 var(--serif); margin: 0 0 .6em; color: var(--text); }
.vs-story p:last-child { margin-bottom: 0; }
.vs-big { font-size: clamp(1.7rem, 3.6vw, 2.4rem); line-height: 1.2; }
.vs-rec { display: flex; align-items: center; gap: 20px; padding: 16px 0; }
.vs-rec-info { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1; }
.vs-mic svg { width: 26px; height: 26px; }
.vs-mic.done { opacity: .35; }
.vs-meter { height: 4px; border-radius: 4px; background: var(--surface-3); overflow: hidden; max-width: 260px; }
.vs-meter i { display: block; height: 100%; width: 0; background: var(--accent-2); transition: width .1s linear; }
.vs-done { display: grid; gap: 12px; }
.vs-done audio, .vs-audio audio { width: 100%; max-width: 420px; }
.vs-ok { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); flex: 0 0 26px; }
.vs-ok svg { width: 15px; height: 15px; }
.vs-heard { font: 400 1.15rem/1.45 var(--serif); margin: 0; }
.vs-mic-help { margin-top: 0; }
.vs-limit { margin-top: 0; }

.vs-map { display: grid; gap: 32px; }
.vs-map-h h1 { margin: 10px 0 6px; }
.vs-map-h p { margin: 0; }
.vs-dates { margin-top: 8px; gap: 16px; }
.vs-sec h2 { font-size: clamp(1.5rem, 2.8vw, 1.9rem); margin-bottom: 16px; }
.vs-strengths { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.vs-strengths li { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; }
.vs-focus { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.vs-focus li { display: grid; gap: 8px; padding: 18px 20px; }
.vs-focus-h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.vs-focus-h h3 { margin: 0; font-size: 1.5rem; }
.vs-n { font: 500 12px/1 var(--mono); color: var(--text-3); width: 22px; height: 22px; display: inline-grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; }
.vs-tip { margin: 0; color: var(--text); }
.vs-ev { margin: 0; color: var(--text-2); }
.vs-ev b { font-weight: 500; color: var(--accent-2); }
.vs-focus .btn { justify-self: start; }
.vs-notice { margin: -6px 0 12px; }
.vs-habit { display: grid; gap: 8px; text-decoration: none; color: var(--text); transition: border-color .2s; }
.vs-habit:hover { border-color: var(--line-strong); }
.vs-habit-t { font: 400 1.35rem/1.35 var(--serif); }
.vs-habit-t s { color: var(--text-3); }
.vs-habit .small { display: inline-flex; align-items: center; gap: 8px; }
.vs-habit svg { width: 15px; height: 15px; }
.vs-start h2 { margin: 8px 0 6px; font-size: clamp(1.6rem, 3vw, 2.1rem); }
.vs-start p { margin: 0; }
.vs-review { border-color: rgba(var(--ok-rgb), .3); background: linear-gradient(180deg, var(--ok-soft), transparent 70%), var(--surface); }
.vs-review .tag { color: var(--ok); }
.vs-review-note { margin-top: 10px; font-size: 15.5px; line-height: 1.65; }
.vs-asked { margin: 0; }
.vs-actions { margin-top: 30px; }
.vs-card { display: grid; gap: 8px; text-decoration: none; color: var(--text); align-content: start; }
.vs-card h3 { margin: 4px 0 0; font-size: 1.45rem; }
.vs-card p { margin: 0; }
.vs-card .btn { justify-self: start; margin-top: 4px; }
.vs-card-go { display: inline-flex; gap: 8px; align-items: center; color: var(--text-2); }
.vs-card-go svg, .vs-card .btn svg { width: 15px; height: 15px; }
.vs-invite { display: grid; gap: 8px; margin-top: 24px; max-width: 520px; }
.vs-invite h3 { margin: 4px 0 0; font-size: 1.5rem; }
.vs-invite p { margin: 0 0 6px; }
.vs-invite .btn { justify-self: start; }

.ul-head { max-width: 760px; margin-bottom: 28px; }
.ul-head h1 { margin: 12px 0 12px; }
.ul-nomap { margin: 0 0 20px; }
.ul-mine { margin-bottom: 22px; }
.ul-mine .ul-card { border-color: rgba(var(--accent2-rgb), .35); background: linear-gradient(180deg, rgba(var(--accent2-rgb), .05), transparent 50%), var(--surface); }
.ul-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); align-items: start; }
.ul-card { display: grid; gap: 12px; outline: none; scroll-margin-top: calc(var(--nav-h) + 16px); }
.ul-card.flash { animation: ulFlash 1.8s var(--ease) 1; }
@keyframes ulFlash { 0%, 40% { box-shadow: 0 0 0 3px rgba(var(--accent2-rgb), .35); } 100% { box-shadow: 0 0 0 0 rgba(var(--accent2-rgb), 0); } }
.ul-top { min-height: 10px; }
.ul-anchor { text-decoration: none; }
.ul-title { margin: 0; font-size: 1.45rem; line-height: 1.2; }
.ul-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ul-pair > span { display: grid; gap: 2px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); }
.ul-pair s { color: var(--text-3); }
.ul-pair b { font-weight: 500; }
.ul-smile { margin: 0; font: italic 400 1.15rem/1.45 var(--serif); color: var(--text-2); }
.ul-l1, .ul-both p { margin: 0; font-size: 15px; color: var(--text-2); }
.ul-both summary { cursor: pointer; color: var(--text-2); font-size: 14px; }
.ul-both p + p { margin-top: 8px; }
.ul-both p:first-of-type { margin-top: 8px; }
.ul-say { border-top: 1px solid var(--line); padding-top: 12px; display: grid; gap: 8px; }
.ul-say-t { margin: 0; font: 400 1.3rem/1.35 var(--serif); }
.ul-say .btn.listening { box-shadow: 0 0 0 3px rgba(var(--accent2-rgb), .3); }
.ul-say .btn svg { width: 16px; height: 16px; }
.ul-status { margin: 0; min-height: 1.2em; }
.ul-status .feedback { margin-top: 4px; }
.ul-box { margin-top: 16px; padding: 16px 16px; border: 1px dashed var(--line-strong); border-radius: var(--r-sm); background: var(--surface); display: grid; gap: 8px; }
.ul-box-row { display: grid; gap: 4px; text-decoration: none; color: var(--text); padding-top: 8px; }
.ul-box-row + .ul-box-row { border-top: 1px solid var(--line); padding-top: 12px; }
.ul-box-t { font: 400 1.15rem/1.35 var(--serif); }
.ul-box-t s { color: var(--text-3); }
.ul-box-go { color: var(--text-2); }
.ul-box-row:hover .ul-box-go { color: var(--accent-2); }
.ul-fixlink { font-size: 12.5px; color: var(--text-2); white-space: nowrap; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.ul-fixlink:hover { color: var(--accent-2); }

.teach-vs-card { display: grid; gap: 16px; }
.teach-vs-audio { width: 100%; max-width: 480px; }
.teach-vs-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.teach-vs-list { margin: 8px 0 0; padding-left: 20px; font-size: 14px; display: grid; gap: 8px; }
.teach-vs-raw summary { cursor: pointer; color: var(--text-2); }
.teach-vs-raw p { overflow-wrap: anywhere; }
.teach-vs-raw .tag { margin-right: 6px; }
.teach-vs-form { border-top: 1px solid var(--line); padding-top: 14px; }
.teach-vs-sounds { border: 0; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 8px 16px; }
.teach-vs-sounds legend { margin-bottom: 8px; color: var(--text-2); }
.teach-vs-chk { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 400; font-size: 14px; color: var(--text); }
.teach-vs-older { margin: 10px 0 0; padding-left: 18px; color: var(--text-2); }
.teach-vs-badge svg { width: 12px; height: 12px; }

@media (max-width: 640px) {
  .vs-rec { gap: 16px; }
  .ul-pair { grid-template-columns: minmax(0, 1fr); }
  .vs-focus-h .pill { white-space: normal; height: auto; padding: 4px 10px; }
}
.ul-say [hidden], .vs [hidden] { display: none !important; }
.vs .vs-step > .btn, .vs .vs-step > .row > .btn { align-self: flex-start; }

/* ---------- Notebook: three voices (you, teacher, Ember), a dated journal and four sections ---------- */
:root { --nb-you: #4f6f9a; --nb-teacher: #c8735a; --nb-ember: #c98f4f; }
.nb-head { align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.nb-head h1 { margin: 8px 0 4px; }
.nb-tools { gap: 8px; flex-wrap: wrap; }
.nb-tools .btn svg, .nb-ib svg { width: 17px; height: 17px; }
.nb-add { margin: 18px 0 8px; display: grid; gap: 12px; }
.nb-add[hidden] { display: none; }
.nb-2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 12px; }
@media (max-width: 640px) { .nb-2 { grid-template-columns: minmax(0, 1fr); } }
.nb-bar { position: sticky; top: 0; z-index: 3; background: var(--bg); padding: 14px 0 12px; margin-top: 10px; border-bottom: 1px solid var(--line); display: grid; gap: 12px; }
.nb-tabs { display: flex; gap: 4px 20px; flex-wrap: wrap; }
.nb-tabs a { color: var(--text-2); text-decoration: none; font-weight: 500; padding: 6px 0; border-bottom: 2px solid transparent; white-space: nowrap; }
.nb-tabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }
.nb-c { font: 500 var(--fs-xs)/1 var(--mono); color: var(--text-3); margin-left: 2px; }
.nb-filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.nb-search { flex: 1 1 220px; max-width: 360px; min-height: 38px; }
.nb-filters .seg button.vb-you[aria-pressed="true"] { box-shadow: inset 0 -2px 0 var(--nb-you); }
.nb-filters .seg button.vb-teacher[aria-pressed="true"] { box-shadow: inset 0 -2px 0 var(--nb-teacher); }
.nb-filters .seg button.vb-ember[aria-pressed="true"] { box-shadow: inset 0 -2px 0 var(--nb-ember); }
.nb-list { margin-top: 8px; }
.nb-none { margin: 28px 0; }
.nb-empty { margin-top: 20px; }
.nb-empty h2 { margin: 0 0 8px; font-size: 1.5rem; }
.nb-day { padding: 26px 0 8px; border-bottom: 1px solid var(--line); }
.nb-day-h { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.nb-day-h > div { flex: 1; min-width: 0; }
.nb-day-h h2 { font-size: 1.35rem; margin: 0; }
.nb-day-b { font: 400 1rem/1.3 var(--sans); color: var(--text-3); }
.nb-day-n { margin: 4px 0 0; font-size: 13.5px; color: var(--text-2); }
.nb-day-s { margin: 6px 0 0; font-family: var(--serif); font-style: italic; font-size: 1.12rem; color: var(--text); }
.nb-entries { display: grid; gap: 12px; }
.nb-entry { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px 16px 10px 19px; }
.nb-entry::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--nb-you); }
.nb-entry.v-teacher::before { background: var(--nb-teacher); }
.nb-entry.v-ember::before { background: var(--nb-ember); }
.nb-entry.is-done { opacity: .62; }
.nb-who { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; font-size: 12px; color: var(--text-3); margin-bottom: 6px; }
.nb-voice { font: 600 var(--fs-xs)/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--nb-you); }
.v-teacher .nb-voice { color: var(--nb-teacher); }
.v-ember .nb-voice { color: var(--nb-ember); }
.nb-block { color: var(--text-3); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.nb-flag { font-size: var(--fs-xs); padding: 1px 7px; border-radius: 99px; background: var(--bad-soft); color: var(--bad); }
.nb-flag.ask { background: var(--accent-soft); color: var(--accent-2); }
.nb-text { font-size: 1.05rem; line-height: 1.45; color: var(--text); overflow-wrap: anywhere; }
.k-phrase .nb-text { font: 400 1.4rem/1.25 var(--serif); }
.nb-tr { color: var(--text-2); margin-top: 3px; }
.nb-pron { font-size: 13.5px; color: var(--text-2); margin-top: 6px; }
.nb-ex { font-style: italic; color: var(--text-2); margin-top: 6px; }
.nb-ex::before { content: '“'; } .nb-ex::after { content: '”'; }
.nb-note { margin-top: 8px; font-size: 14.5px; color: var(--text-2); padding-left: 10px; border-left: 2px solid var(--line); }
.nb-sound { margin-top: 8px; font-size: 13.5px; }
.nb-sound summary { cursor: pointer; color: var(--accent-2); }
.nb-sound p { margin: 6px 0 0; color: var(--text-2); }
.nb-foot { display: flex; align-items: center; gap: 4px 12px; flex-wrap: wrap; margin-top: 8px; font-size: 13px; color: var(--text-2); }
.nb-foot label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.nb-ib { border: 0; background: none; color: var(--text-3); width: 32px; height: 32px; border-radius: 8px; display: inline-grid; place-items: center; cursor: pointer; }
.nb-ib:hover { color: var(--text); background: var(--surface-2); }
.nb-edit { display: grid; gap: 12px; }
.nb-edit .field label { font-size: 12.5px; }
.nb-pref { display: flex; align-items: center; gap: 8px; margin: 26px 0 8px; color: var(--text-2); }
.nb-print-head { display: none; }
.nb-sub { font: 500 12px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin: 20px 0 10px; }
.nb-tadd { display: grid; gap: 12px; }
.nt-due { display: inline-flex; align-items: center; gap: 8px; }
.nt-due[hidden] { display: none; }
.nt-due .input { min-height: 34px; width: auto; }
.nb-needs-l { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 12px; }
.nb-needs-l li { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; padding: 14px 18px; }
.nb-chips { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; min-width: 200px; }
.nb-chip { font-size: 13px; padding: 3px 9px; border-radius: 99px; background: var(--bad-soft); color: var(--text); }
.nb-chip.ask { background: var(--accent-soft); }
.nb-mini { margin-left: 8px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text-2); font: 500 var(--fs-xs)/1 var(--sans); padding: 4px 8px; border-radius: 6px; cursor: pointer; vertical-align: middle; }
.nb-mini:hover { color: var(--text); }
.nb-mini.ok { color: var(--ok); border-color: var(--ok); }
.nb-gap { display: inline-block; min-width: 3em; border-bottom: 2px solid var(--accent); color: transparent; }
dialog.nb-ask { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--text); padding: 24px; width: min(520px, calc(100vw - 32px)); }
dialog.nb-ask::backdrop { background: rgba(var(--fg-rgb), .35); }
dialog.nb-ask form { display: grid; gap: 12px; }
.nb-ask-q { font: 400 1.3rem/1.3 var(--serif); margin: 4px 0 0; }
/* the translate card's notebook row */
.tr-nb { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.tr-nb .tr-nb-save { color: var(--text); border-color: rgba(var(--accent-rgb), .55); }
.tr-nb .ok { color: var(--ok); border-color: var(--ok); }

@media print {
  body * { visibility: hidden; }
  .nb-page, .nb-page * { visibility: visible; }
  .nb-page { position: absolute; inset: 0 auto auto 0; width: 100%; padding: 0; }
  .nb-tools, .nb-add, .nb-bar, .nb-pref, .nb-ib, .nb-foot input, .nb-foot .nb-prac, .nb-day-h .nb-ib, .page-head .tag, .page-head p, .tr-pill, .tabbar { display: none !important; }
  .nb-bar { position: static; border: 0; padding: 0; }
  .nb-print-head { display: block; font: 500 var(--fs-xs)/1.4 var(--mono); color: #555; margin-bottom: 8px; order: -1; }
  .nb-entry { break-inside: avoid; border-color: #ddd; }
  .nb-day { break-inside: auto; }
  a { color: inherit; text-decoration: none; }
}

/* ---------- Guest mode ---------- */
.guest-bar { position: sticky; top: 0; z-index: 40; display: flex; justify-content: center; align-items: center; gap: 8px 16px; flex-wrap: wrap; padding: 9px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: 14px; color: var(--text-2); text-align: center; }
.guest-bar a { color: var(--accent-2); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.guest-keep { max-width: 520px; margin: 8px auto 0; text-align: center; display: grid; gap: 8px; justify-items: center; }
.link-btn { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 5px; }
.link-btn svg { width: 15px; height: 15px; }
.h3-guest { margin: 18px 0 0; color: var(--ink-2, var(--text-2)); }

/* ---------- Notebook inside a Block: header button, floating button and side panel ---------- */
.nb-open-btn { gap: 8px; border-color: rgba(var(--accent-rgb), .55); }
.nb-open-btn svg { width: 16px; height: 16px; }
.nb-open-btn .nb-c:empty { display: none; }
.nb-open-btn .nb-c { font: 600 var(--fs-xs)/1 var(--mono); background: var(--accent-soft); color: var(--accent-2); padding: 3px 6px; border-radius: 99px; }
.nb-fab { position: fixed; right: 20px; bottom: 22px; z-index: 60; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px 0 16px; border-radius: 999px; border: 1px solid rgba(var(--accent-rgb), .5); background: var(--surface); color: var(--text); font: 600 14.5px/1 var(--sans); box-shadow: 0 10px 28px rgba(var(--shadow-rgb), .16); cursor: pointer; }
.nb-fab:hover { border-color: var(--accent); }
.nb-fab svg { width: 19px; height: 19px; color: var(--accent-2); }
.nb-fab .nb-n { font: 600 var(--fs-xs)/1 var(--mono); background: var(--accent); color: var(--accent-ink); padding: 4px 7px; border-radius: 99px; }
.nb-fab .nb-dot { position: absolute; top: 6px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--nb-teacher); box-shadow: 0 0 0 2px var(--surface); }
@media (max-width: 880px) {
  .nb-fab { bottom: calc(84px + env(safe-area-inset-bottom)); right: 14px; min-height: 46px; padding: 0 13px; z-index: 95; }
  .nb-fab > span { display: none; }
  body:has(.nb-fab) .player-nav { margin-bottom: 72px; }
}
body.nb-panel-open .nb-fab { display: none; }
.nb-panel { position: fixed; top: 0; right: 0; bottom: 0; z-index: 120; width: min(440px, 100vw); background: var(--bg); border-left: 1px solid var(--line); box-shadow: -18px 0 40px rgba(var(--shadow-rgb), .12); overflow-y: auto; padding: 20px 20px 40px; display: grid; align-content: start; gap: 16px; }
.nb-panel[hidden] { display: none; }
@media (max-width: 880px) { .nb-panel { top: auto; height: 86vh; width: 100vw; border-left: 0; border-top: 1px solid var(--line); border-radius: 16px 16px 0 0; box-shadow: 0 -18px 40px rgba(var(--shadow-rgb), .16); } }
.nb-panel-h { display: flex; align-items: flex-start; gap: 12px; }
.nb-panel-h > div { flex: 1; }
.nb-panel-h h2 { font-size: 1.6rem; margin: 8px 0 0; }
.nb-quick { display: grid; gap: 8px; }
.nb-quick-row { gap: 8px; flex-wrap: nowrap; }
.nb-quick-row select { flex: 1; min-height: 38px; }
.nb-quick p { margin: 0; }
.nb-panel .k-phrase .nb-text { font-size: 1.25rem; }
.nb-all { justify-self: start; }
@media (min-width: 1200px) { body.nb-panel-open #app { margin-right: 440px; } }

/* ---------- Calls with your tutor (booking) ---------- */
.bk { display: grid; gap: 16px; margin-top: var(--stack-gap); }
.bk-head h2 { margin: 8px 0 4px; font-size: 1.7rem; }
.bk-head p { margin: 0; }
.bk-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.bk-item { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; background: var(--surface); display: grid; gap: 8px; }
.bk-item.s-confirmed { border-left: 3px solid var(--ok); }
.bk-item.s-pending { border-left: 3px solid var(--accent); }
.bk-item.s-declined, .bk-item.s-cancelled { opacity: .65; }
.bk-when { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.bk-when a { color: inherit; }
.bk-chip { font-size: 12px; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--text-2); }
.bk-chip.turn { background: var(--accent-soft); color: var(--accent-2); font-weight: 600; }
.bk-chip.confirmed { background: var(--ok-soft); color: var(--ok); }
.bk-note { margin: 0; font-size: 14px; color: var(--text-2); }
.bk-actions { gap: 8px; flex-wrap: wrap; }
.bk-later { color: var(--text-3); }
.bk-new h3 { font-size: 1.15rem; margin: 6px 0 10px; }
.bk-picker { display: grid; gap: 12px; }
.bk-days, .bk-times { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.bk-days button, .bk-times button { flex: none; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 10px; padding: 8px 12px; font: 500 14px/1.2 var(--sans); cursor: pointer; text-align: center; }
.bk-days button small { display: block; color: var(--text-3); font-size: var(--fs-xs); font-weight: 400; margin-top: 2px; }
.bk-times { flex-wrap: wrap; overflow: visible; }
.bk-days button[aria-pressed="true"], .bk-times button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.bk-inline:not([hidden]) { display: grid; gap: 8px; margin-top: 4px; }
.bk-inline .row, .bk-tpropose .row { gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.bk-inline .input, .bk-tpropose .input { min-height: 36px; width: auto; flex: 1 1 180px; }
.bk-tpropose { display: grid; gap: 12px; margin-bottom: 12px; }
.bk-tpropose .field { margin: 0; flex: 1 1 200px; }
.bk-avail { display: grid; gap: 12px; }
.bk-avail-top { gap: 12px; flex-wrap: wrap; }
.bk-avail-top .field { flex: 1 1 180px; margin: 0; }
.bk-rows { display: grid; gap: 8px; }
.bk-row { gap: 8px; flex-wrap: wrap; align-items: center; }
.bk-row .input { width: auto; min-height: 36px; }
.bk-preview { line-height: 1.8; }
.bk-space.turn { border-color: var(--accent); }
/* Top menu: keep one line when Teaching and Admin are added (tutors) */
.nav-links a { white-space: nowrap; }
@media (max-width: 1360px) { .nav-links a { padding: 8px 9px; gap: 4px; font-size: 13.5px; } }
@media (max-width: 1200px) { .nav-links a svg { display: none; } }

/* ==========================================================================
   Calm dark mode ("night"): warm charcoal, soft lava accent. Chosen with the
   theme switch in the top bar, or follows the phone/computer setting.
   ========================================================================== */
html.theme-night {
  --bg: #141210; --bg-elev: #1b1815; --surface: #1f1c19; --surface-2: #27231f; --surface-3: #312c27;
  --fg-rgb: 238, 232, 224; --bg-rgb: 20, 18, 16; --panel-rgb: 31, 28, 25; --shadow-rgb: 0, 0, 0;
  --accent-rgb: 226, 140, 106; --accent2-rgb: 240, 178, 148; --ok-rgb: 108, 196, 151; --bad-rgb: 239, 138, 124;
  --text: #eee8e0; --text-2: #c4bbb1; --text-3: #9a9187;
  --accent: #e28c6a; --accent-2: #f0b294; --accent-ink: #1a0f0a; --accent-soft: rgba(226, 140, 106, .16);
  --ok: #6cc497; --ok-soft: rgba(108, 196, 151, .14); --bad: #ef8a7c; --bad-soft: rgba(239, 138, 124, .14); --sea: #7fb0d0;
  --nb-you: #8fa9d3; --nb-teacher: #e28c6a; --nb-ember: #e0b070;
  color-scheme: dark;
}
html.theme-night .h2 {
  --paper: #141210; --paper-2: #1b1815; --card: #1f1c19;
  --ink: #eee8e0; --ink-2: #c4bbb1; --ink-3: #9a9187; --rule: rgba(238, 232, 224, .14);
  --dawn: #e28c6a; --dawn-2: #8a5340; --sky: #8aa0c4;
}
html.theme-night body:has(.h2) { background: #141210; }
html.theme-night .topbar.paper { background: var(--bg); border-bottom-color: var(--line); }
html.theme-night .topbar.paper .btn-light { background: var(--text); color: var(--bg); }
html.theme-night .h2-btn-dark:hover, html.theme-night .btn-lava:hover, html.theme-night .btn-primary:hover, html.theme-night .btn-light:hover { background: #fff; color: #141210; }
html.theme-night .reading { background: var(--surface); }
html.theme-night .h2 .h2-btn-light { background: var(--card); color: var(--ink); }
html.theme-night img.flag, html.theme-night .flag-i { filter: brightness(.92); }
html.theme-night .cs-art .cs-mtn { fill: rgba(226, 140, 106, .08); }
@media (prefers-reduced-motion: no-preference) { html.theme-switching * { transition: background-color .25s, color .25s, border-color .25s !important; } }

/* Theme switch in the top bar */
.theme-btn { border: 1px solid var(--line); background: none; color: var(--text-2); width: 36px; height: 36px; border-radius: 10px; display: inline-grid; place-items: center; cursor: pointer; }
.theme-btn:hover { color: var(--text); border-color: var(--line-strong); }
.theme-btn svg { width: 18px; height: 18px; }

/* Easier reading on phones: larger base size, stronger small print */
@media (max-width: 640px) {
  html { font-size: 106.25%; } /* rem-based text grows by one step (16 → 17px) */
  body { font-size: 17px; }
  .small { font-size: .9rem; }
  .tabbar a { font-size: var(--fs-xs); }
  .nb-who, .nb-foot, .nb-day-n { font-size: 13.5px; }
  .faint { color: var(--text-2); }
  .h2 { font-size: 17.5px; }
}

/* Sound and rhythm: stressed words carry the beat (big, dark, a dot above); the rest is small and light */
.nb-rhythm { display: inline; line-height: 1.6; }
.nb-rhythm b { position: relative; font-weight: 600; color: var(--text); font-size: 1.12em; }
.nb-rhythm b::before { content: ''; position: absolute; left: 50%; top: -.18em; width: .32em; height: .32em; margin-left: -.16em; border-radius: 50%; background: var(--accent); }
.nb-rhythm i { font-style: normal; color: var(--text-3); font-size: .9em; }
.nb-rhythm.big { font: 400 2rem/1.5 var(--serif); }
.nb-rhythm.big b { font-weight: 400; font-size: 1.18em; }
.k-phrase .nb-rhythm { font-family: var(--serif); }

/* ---------- 2026-11 mockups: language pill, Ember orb ---------- */
.lang-btn { border-color: var(--line); }
.topbar.paper .lang-btn { border-color: rgba(31, 29, 26, .16); }
html.theme-night .topbar.paper .lang-btn { border-color: var(--line-strong); color: var(--text-2); }
.ember-orb { display: none; }
@media (max-width: 880px) {
  /* a glowing dome rising from the tab bar, like the sun over the mountain */
  .tabbar a.ember-orb {
    display: block; position: absolute; left: 50%; top: -26px; width: 52px; height: 52px; padding: 0; margin-left: -26px; border-radius: 50%;
    background: radial-gradient(circle at 50% 38%, #FFF3DE 0, #F6C56B 22%, #E0892F 52%, #A94B1C 86%);
    box-shadow: 0 0 30px 10px rgba(224, 137, 47, .34);
    clip-path: inset(-40px -40px 50% -40px); overflow: visible;
  }
  .tabbar a.ember-orb span { position: absolute; inset: -18px; border-radius: 50%; background: radial-gradient(circle, rgba(224, 137, 47, .3), rgba(224, 137, 47, 0) 66%); animation: emberBreath 5s ease-in-out infinite; pointer-events: none; }
  .tabbar a.ember-orb:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
}
@keyframes emberBreath { 0%, 100% { transform: scale(.88); opacity: .65; } 50% { transform: scale(1.08); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .tabbar a.ember-orb span { animation: none; } }

/* ==========================================================================
   Notebook (2026-11): Today · Library · From your tutor. One colour per type.
   ========================================================================== */
:root { --t-phrase: #C86D51; --t-word: #4A5E7E; --t-sound: #9E6B8E; --t-grammar: #587060; --t-note: #A07A2E; --t-homework: #A07A2E;
  --t-phrase-bg: #F6E3DB; --t-word-bg: #E7ECF4; --t-sound-bg: #F1E4EE; --t-grammar-bg: #E3EAE4; --t-note-bg: #F3EAD3; --t-homework-bg: #F3EAD3;
  --t-phrase-ink: #A0533A; --t-word-ink: #4A5E7E; --t-sound-ink: #7C4E6E; --t-grammar-ink: #587060; --t-note-ink: #85631F; --t-homework-ink: #85631F; }
html.theme-night { --t-phrase: #e28c6a; --t-word: #8fa9d3; --t-sound: #c99bbd; --t-grammar: #8fb59a; --t-note: #d6b46a; --t-homework: #d6b46a;
  --t-phrase-bg: rgba(226,140,106,.16); --t-word-bg: rgba(143,169,211,.16); --t-sound-bg: rgba(201,155,189,.16); --t-grammar-bg: rgba(143,181,154,.16); --t-note-bg: rgba(214,180,106,.16); --t-homework-bg: rgba(214,180,106,.16);
  --t-phrase-ink: #f0b294; --t-word-ink: #a9bfe2; --t-sound-ink: #dbb7d1; --t-grammar-ink: #a8cbb2; --t-note-ink: #e3c68a; --t-homework-ink: #e3c68a; }
.nb3 { max-width: 760px; }
.nb3-head { display: flex; align-items: baseline; gap: 12px; margin: 8px 0 12px; }
.nb3-head h1 { margin: 0; font-size: clamp(1.9rem, 4vw, 2.4rem); }
.nb3-tabs { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface-2); border-radius: 999px; padding: 4px; margin: 0 0 18px; }
.nb3-tabs a { text-align: center; padding: 10px 6px; border-radius: 999px; font: 500 14px/1.1 var(--sans); color: var(--text-2); text-decoration: none; }
.nb3-tabs a[aria-current="page"] { background: #23211E; color: #F6F2EA; }
html.theme-night .nb3-tabs a[aria-current="page"] { background: #F6F2EA; color: #23211E; }
.nb-sec { display: flex; justify-content: space-between; align-items: center; margin: 20px 0 8px; font: 500 var(--fs-xs)/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.nb-sec a { display: inline-flex; gap: 4px; align-items: center; color: var(--text-2); text-decoration: none; }
.nb-sec a svg { width: 13px; height: 13px; }
/* quick add */
.nb-quick { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 16px; padding: 10px; margin: 0 0 6px; }
.nb-quick-row { display: flex; gap: 8px; align-items: center; }
.nb-quick-row .input { flex: 1; border: 0; background: transparent; box-shadow: none; padding: 8px 6px; font-size: 1rem; }
.nb-quick-row .input:focus { outline: none; }
.nb-quick:focus-within { border-color: var(--text-3); }
.nb-mic { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); display: grid; place-items: center; color: var(--text); cursor: pointer; flex: 0 0 auto; }
.nb-mic svg { width: 18px; height: 18px; }
.nb-mic.listening { background: var(--accent); color: #fff; border-color: var(--accent); }
.nb-quick-save { flex: 0 0 auto; }
.nb-quick-more { margin-top: 8px; }
.nb-quick-hint { margin: 6px 4px 2px; }
.nb-sum { font: italic 400 1.02rem/1.45 var(--serif); color: var(--text-2); margin: 12px 2px 0; }
.nb-from-tutor .nb-entry { border-left: 3px solid var(--accent); }
.nb-agreed-strip { display: flex; gap: 12px; align-items: center; margin: 18px 0 0; padding: 14px 16px; border-radius: 16px; background: #23211E; color: #F6F2EA; text-decoration: none; }
.nb-agreed-strip b { display: block; font-weight: 500; }
.nb-agreed-strip small { display: block; color: #B8B2A6; font-size: .82rem; margin-top: 2px; }
.nb-tick { width: 28px; height: 28px; border-radius: 50%; background: #6E8574; display: grid; place-items: center; flex: 0 0 auto; }
.nb-tick svg { width: 15px; height: 15px; color: #fff; }
.nb-agreed { color: var(--ok); font-weight: 500; font-size: .8rem; }
/* type tags */
.nb-k { display: inline-flex; align-items: center; gap: 4px; font: 500 var(--fs-xs)/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 5px 9px; border-radius: 999px; border: 1px solid transparent; background: var(--surface-2); color: var(--text-2); }
.nb-k::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.nb-k.t-phrase { background: var(--t-phrase-bg); color: var(--t-phrase-ink); } .nb-k.t-word { background: var(--t-word-bg); color: var(--t-word-ink); }
.nb-k.t-sound { background: var(--t-sound-bg); color: var(--t-sound-ink); } .nb-k.t-grammar { background: var(--t-grammar-bg); color: var(--t-grammar-ink); }
.nb-k.t-note { background: var(--t-note-bg); color: var(--t-note-ink); } .nb-k.t-homework { background: var(--t-homework-bg); color: var(--t-homework-ink); }
button.nb-k { cursor: pointer; font-size: var(--fs-xs); padding: 7px 11px; }
button.nb-k.on { border-color: currentColor; box-shadow: inset 0 0 0 1px currentColor; }
/* library */
.nb-lib-tools { display: grid; gap: 12px; margin: 0 0 6px; }
.nb-selects { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.nb-sel { display: block; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 12px; padding: 7px 10px 6px; }
.nb-sel small { display: block; font: 500 var(--fs-xs)/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.nb-sel select { width: 100%; border: 0; background: transparent; font: 500 14px/1.4 var(--sans); color: var(--text); padding: 0; appearance: auto; }
.nb-types { display: flex; flex-wrap: wrap; gap: 8px; }
.nb-filters2 { display: flex; flex-wrap: wrap; gap: 8px; }
.nb-chip { min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text-2); font: 500 13px/1 var(--sans); display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.nb-chip.on { background: #23211E; border-color: #23211E; color: #F6F2EA; }
html.theme-night .nb-chip.on { background: #F6F2EA; color: #23211E; }
.nb-chip svg { width: 14px; height: 14px; }
.nb-save-share { margin-left: auto; color: var(--text); }
.nb-grp-h { display: flex; justify-content: space-between; align-items: baseline; margin: 18px 0 8px; }
.nb-grp-h h3 { margin: 0; font: 400 1.12rem/1.25 var(--serif); }
.nb-grp-h span { font-size: .78rem; color: var(--text-3); }
.nb-lib { display: block; width: 100%; text-align: left; cursor: pointer; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line-strong); border-radius: 6px 14px 14px 6px; padding: 10px 12px; margin: 0 0 8px; }
.nb-lib:hover { border-color: var(--line-strong); }
.nb-lib.t-phrase { border-left-color: var(--t-phrase); } .nb-lib.t-word { border-left-color: var(--t-word); } .nb-lib.t-sound { border-left-color: var(--t-sound); }
.nb-lib.t-grammar { border-left-color: var(--t-grammar); } .nb-lib.t-note, .nb-lib.t-homework { border-left-color: var(--t-note); }
.nb-lib-text { display: block; font: 400 1.06rem/1.5 var(--serif); }
.nb-lib-text .nb-rhythm { font-family: var(--serif); }
.nb-lib-tr { display: block; color: var(--text-2); font-size: .9rem; margin-top: 1px; }
.nb-lib-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 7px; font-size: .76rem; color: var(--text-3); }
.nb-lib-open { margin: 0 0 10px; }
.nb-lib-close { margin: 4px 0 0 4px; }
.nb-az { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
.nb-letter { font: 400 1.45rem/1 var(--serif); color: var(--accent-2); margin: 16px 0 8px; scroll-margin-top: calc(var(--nav-h) + 20px); }
.nb-az-index { position: sticky; top: calc(var(--nav-h) + 12px); align-self: start; display: flex; flex-direction: column; gap: 2px; padding-top: 14px; }
.nb-az-index a { font: 600 var(--fs-xs)/1.2 var(--mono); color: var(--accent-2); text-decoration: none; padding: 2px 4px; text-align: center; }
.nb-tutor-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.nb-agree { color: var(--ok); }
/* save or share */
dialog.nb-export { border: 0; padding: 0; width: min(440px, 100%); max-width: 100%; margin: auto auto 0; border-radius: 22px 22px 0 0; background: var(--surface); color: var(--text); box-shadow: 0 -20px 40px -20px rgba(0,0,0,.4); }
@media (min-width: 600px) { dialog.nb-export { margin: auto; border-radius: 22px; } }
dialog.nb-export::backdrop { background: rgba(31, 29, 26, .4); }
dialog.nb-export form { padding: 10px 18px 18px; }
.nb-ex-grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line-strong); margin: 0 auto 12px; }
dialog.nb-export h2 { margin: 0 0 2px; font-size: 1.5rem; }
.nb-ex-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.nb-ex-row select { width: auto; max-width: 60%; }
.nb-switch { appearance: none; width: 40px; height: 24px; border-radius: 999px; background: var(--line-strong); position: relative; cursor: pointer; flex: 0 0 auto; transition: background .2s; }
.nb-switch::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; }
.nb-switch:checked { background: #23211E; } .nb-switch:checked::after { transform: translateX(16px); }
html.theme-night .nb-switch:checked { background: var(--accent); }
.nb-ex-go { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 16px 0 8px; }
.nb-ex-go button { display: flex; flex-direction: column; align-items: center; gap: 8px; border: 0; background: none; font: 500 12px/1.2 var(--sans); color: var(--text-2); cursor: pointer; }
.nb-ex-go i { width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; font: 700 12px/1 var(--sans); font-style: normal; color: #fff; }
.nb-ex-go i svg { width: 20px; height: 20px; }
.g-pdf { background: #23211E; } .g-wa { background: #25D366; } .g-mail { background: #5E5950; } .g-share { background: #C86D51; }
.nb-ex-close { width: 100%; }
/* printable page */
#print-sheet { display: none; }
@media print {
  html.printing body > *:not(#print-sheet) { display: none !important; }
  html.printing #print-sheet { display: block !important; color: #1F1D1A; font: 11.5pt/1.45 'Inter', sans-serif; }
  html.printing, html.printing body { background: #fff !important; }
  #print-sheet .ps-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 1.5pt solid #1F1D1A; padding-bottom: 8pt; margin-bottom: 10pt; }
  #print-sheet .ps-k { font: 500 7.5pt/1.4 'JetBrains Mono', monospace; letter-spacing: .14em; text-transform: uppercase; color: #756E63; margin: 0; }
  #print-sheet h1 { font: 400 20pt/1.1 'Source Serif 4', serif; margin: 2pt 0; }
  #print-sheet .ps-sub { color: #5E5950; margin: 0; }
  #print-sheet h2 { font: 500 8pt/1.4 'JetBrains Mono', monospace; letter-spacing: .14em; text-transform: uppercase; color: #756E63; margin: 14pt 0 4pt; }
  #print-sheet table { width: 100%; border-collapse: collapse; }
  #print-sheet tr { break-inside: avoid; }
  #print-sheet td { padding: 5pt 4pt; border-bottom: .6pt solid #E2DDD2; vertical-align: top; }
  #print-sheet .ps-type { width: 16%; font: 500 7pt/1.6 'JetBrains Mono', monospace; text-transform: uppercase; letter-spacing: .06em; }
  #print-sheet tr.t-phrase .ps-type { color: #A0533A; } #print-sheet tr.t-word .ps-type { color: #4A5E7E; } #print-sheet tr.t-sound .ps-type { color: #7C4E6E; } #print-sheet tr.t-grammar .ps-type { color: #587060; } #print-sheet tr.t-note .ps-type, #print-sheet tr.t-homework .ps-type { color: #85631F; }
  #print-sheet .ps-text { font: 400 12pt/1.6 'Source Serif 4', serif; }
  #print-sheet .ps-note { font: 400 9pt/1.4 'Inter', sans-serif; color: #5E5950; }
  #print-sheet .ps-tr { width: 36%; color: #5E5950; text-align: right; }
  #print-sheet .ps-gap { display: inline-block; width: 90%; border-bottom: .8pt solid #1F1D1A; height: 12pt; }
  #print-sheet .nb-rhythm b::before { background: #C86D51; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #print-sheet .ps-foot { margin-top: 14pt; font-size: 8pt; color: #756E63; }
  #print-sheet .ps-intro { margin: 0 0 6pt; }
  #print-sheet .ps-intro ul { margin: 2pt 0 0; padding-left: 14pt; }
}
.nb-filters2 select.nb-chip { width: auto; max-width: 48%; flex: 0 1 auto; padding: 0 28px 0 12px; height: 34px; background-position: right 10px center; }
@media (max-width: 420px) { .nb-filters2 select.nb-chip { max-width: 100%; } }

/* ===== Block summary ===== */
.bsum { max-width: 720px; }
.bsum-hero { background: #23211E; color: #F6F2EA; border-radius: 20px; padding: 20px 20px 24px; margin: 12px 0 12px; }
.bsum-hero h1 { color: #F6F2EA; margin: 4px 0 8px; font-size: clamp(1.8rem, 4.4vw, 2.4rem); }
.bsum-hero p { color: #B8B2A6; margin: 0; }
.bsum-k { font: 500 var(--fs-xs)/1.4 var(--mono) !important; letter-spacing: .12em; text-transform: uppercase; }
.bsum-sec { margin: 0 0 12px; }
.bsum-h { font: 500 var(--fs-xs)/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); margin: 0 0 8px; }
.bsum-can { margin: 0; padding-left: 18px; } .bsum-can li { margin: 3px 0; }
.bsum-phrase { display: flex; gap: 12px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.bsum-phrase:last-child { border-bottom: 0; }
.bsum-en { display: block; font: 400 1.08rem/1.4 var(--serif); }
.bsum-tr { display: block; color: var(--text-2); font-size: .9rem; }
.bsum-g { margin: 0 0 8px; display: grid; gap: 3px; }
.bsum-g b { font-weight: 600; }
.bsum-g span { color: var(--text-2); }
.bsum-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 22px 0 6px; }
.bsum-actions button { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 6px; border: 1px solid var(--line-strong); border-radius: 16px; background: var(--surface); font: 500 12.5px/1.2 var(--sans); color: var(--text); cursor: pointer; }
.bsum-actions i { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font: 700 12px/1 var(--sans); font-style: normal; color: #fff; }
.nb-grp-h a { color: var(--accent-2); }
@media print {
  #print-sheet .ps-gaps { margin: 2pt 0 4pt; padding-left: 16pt; line-height: 2.2; }
  #print-sheet .ps-gap-s { display: inline-block; width: 70pt; border-bottom: .8pt solid #1F1D1A; height: 12pt; }
}
@media print { html.printing #print-sheet, html.printing #print-sheet * { visibility: visible !important; } html.printing #print-sheet { position: static !important; } }

/* ===== Ember's extras under a reply ===== */
.ember-extras { display: grid; gap: 8px; margin-top: 10px; }
.ember-k { display: block; font: 500 var(--fs-xs)/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); margin-bottom: 4px; }
.ember-help { background: var(--surface-2); border-radius: 12px; padding: 9px 11px; font-size: .92rem; color: var(--text); }
.ember-say { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 9px 11px; }
.ember-rh.nb-rhythm.big { font-size: 1.25rem; line-height: 1.9; }
.ember-miss { text-decoration: none; border-bottom: 2px dotted var(--accent); }
.ember-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: var(--fs-xs); color: var(--text-3); margin-top: 2px; }
.ember-legend span { display: inline-flex; align-items: center; gap: 4px; }
.ember-legend b { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); display: inline-block; }
.ember-legend i { width: 14px; border-bottom: 2px dotted var(--accent); display: inline-block; }
.ember-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.mini-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: 500 12.5px/1 var(--sans); cursor: pointer; }
.mini-btn svg { width: 14px; height: 14px; }
.ember-story { display: flex; gap: 12px; align-items: center; text-align: left; border: 0; background: var(--surface-2); border-radius: 12px; padding: 9px 11px; cursor: pointer; color: var(--text); font: inherit; }
.ember-story i { font: italic 400 .98rem/1.4 var(--serif); }
.ember-play { width: 30px; height: 30px; border-radius: 50%; background: #23211E; display: grid; place-items: center; flex: 0 0 auto; }
.ember-play svg { width: 12px; height: 12px; fill: #F6F2EA; stroke: #F6F2EA; margin-left: 2px; }
.ember-ask { justify-self: start; }

/* ===== Weekly summary (tutor), your week (learner), the bridge into the next Block ===== */
.wk-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: var(--card-pad); }
.wk-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 8px; }
.wk-stats div { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; }
.wk-stats b { display: block; font: 400 1.5rem/1.1 var(--serif); }
.wk-stats span { font-size: var(--fs-xs); color: var(--text-3); }
.wk-k { font: 500 var(--fs-xs)/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); margin: 12px 0 4px; }
.wk-list { margin: 0; padding-left: 20px; } .wk-list li { margin: 3px 0; }
.wk-suggest { background: var(--surface-2); border-radius: 12px; padding: 8px 12px 10px; margin-top: 12px; }
.wk-suggest .wk-k { margin-top: 2px; }
.wk-student { margin-top: 12px; } .wk-student summary { cursor: pointer; color: var(--text-2); font-size: .9rem; }
.wk-acts { margin-top: 10px; }
.space-week h3 { margin: 8px 0 8px; font-size: 1.35rem; }
.space-week p { margin: 0 0 8px; color: var(--text-2); }
.space-week-k { font: 500 var(--fs-xs)/1.4 var(--mono) !important; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3) !important; margin: 10px 0 4px !important; }
.space-week ul { margin: 0 0 12px; padding-left: 20px; }
.bridge { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 6px 16px 16px 6px; padding: 12px 14px; margin: 0 0 14px; }
.bridge-k { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font: 500 var(--fs-xs)/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-2); }
.bridge-k svg { width: 14px; height: 14px; }
.bridge-t { margin: 0; font: 400 1.06rem/1.6 var(--serif); }
mark.nb-mark { background: none; color: inherit; border-bottom: 2px solid var(--accent); padding-bottom: 1px; cursor: help; }

/* ===== Library: overview, compact view ===== */
.nb-ov { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 10px 14px 12px; margin: 0 0 12px; }
.nb-ov summary { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; cursor: pointer; list-style: none; }
.nb-ov summary::-webkit-details-marker { display: none; }
.nb-ov summary b { font: 400 1.08rem/1.3 var(--serif); }
.nb-ov summary span { font-size: .76rem; color: var(--text-3); }
.nb-bars { display: flex; align-items: flex-end; gap: 8px; height: 76px; margin-top: 10px; border-bottom: 1px solid var(--line); }
.nb-bar { flex: 1; display: flex; flex-direction: column-reverse; border-radius: 4px 4px 0 0; overflow: hidden; min-height: 2px; }
.nb-bar i { display: block; }
.nb-bar i.t-phrase { background: var(--t-phrase); } .nb-bar i.t-word { background: var(--t-word); } .nb-bar i.t-sound { background: var(--t-sound); } .nb-bar i.t-grammar { background: var(--t-grammar); } .nb-bar i.t-note { background: var(--t-note); }
.nb-wks { display: flex; gap: 8px; margin-top: 4px; } .nb-wks span { flex: 1; text-align: center; font: 500 var(--fs-xs)/1 var(--mono); color: var(--text-3); }
.nb-tbars { display: grid; gap: 4px; margin-top: 12px; }
.nb-tb { display: grid; grid-template-columns: minmax(80px, 30%) 1fr 26px; gap: 8px; align-items: center; font-size: .8rem; color: var(--text-2); }
.nb-tb i { display: block; height: 7px; border-radius: 4px; background: var(--surface-3); }
.nb-tb i b { display: block; height: 100%; border-radius: 4px; background: var(--accent); opacity: .7; }
.nb-tb em { font-style: normal; text-align: right; color: var(--text-3); }
.nb-ov-gap { margin: 8px 0 0; font-size: .8rem; color: var(--text-3); }
.nb-ov-cap { margin: 10px 0 6px; font-size: var(--fs-xs); color: var(--text-3); letter-spacing: .02em; }
.nb-view-row { display: flex; justify-content: space-between; align-items: center; margin: 10px 0 2px; }
.nb-vt { display: inline-grid; grid-template-columns: 1fr 1fr; background: var(--surface-2); border-radius: 999px; padding: 3px; }
.nb-vt button { border: 0; background: none; padding: 6px 12px; border-radius: 999px; font: 500 12.5px/1 var(--sans); color: var(--text-2); cursor: pointer; }
.nb-vt button[aria-pressed="true"] { background: #23211E; color: #F6F2EA; }
html.theme-night .nb-vt button[aria-pressed="true"] { background: #F6F2EA; color: #23211E; }
.nb-line { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: none; padding: 10px 4px; cursor: pointer; color: var(--text); font: inherit; }
.nb-line:hover { background: var(--surface); }
.nb-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; background: var(--line-strong); }
.nb-line.t-phrase .nb-dot { background: var(--t-phrase); } .nb-line.t-word .nb-dot { background: var(--t-word); } .nb-line.t-sound .nb-dot { background: var(--t-sound); }
.nb-line.t-grammar .nb-dot { background: var(--t-grammar); } .nb-line.t-note .nb-dot, .nb-line.t-homework .nb-dot { background: var(--t-note); }
.nb-line-x { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .92rem; }
.nb-line-x b { font: 400 1.02rem/1.3 var(--serif); }
.nb-line-x span { color: var(--text-3); }
.nb-line-d { font: 500 var(--fs-xs)/1 var(--mono); color: var(--text-3); flex: 0 0 auto; }
.is-compact .nb-lib-open { margin: 8px 0; }
.is-compact .nb-letter { margin: 14px 0 4px; }
.is-compact .nb-grp-h { margin-top: 16px; }
@media print {
  #print-sheet.ps-compact td { padding: 2.5pt 4pt; }
  #print-sheet.ps-compact .ps-text { font-size: 11pt; line-height: 1.3; }
  #print-sheet.ps-compact .ps-tr { text-align: left; width: 34%; font-size: 9.5pt; }
  #print-sheet .ps-dot { width: 10pt; } #print-sheet .ps-dot i { display: inline-block; width: 6pt; height: 6pt; border-radius: 50%; background: #C9C2B4; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #print-sheet tr.t-phrase .ps-dot i { background: #C86D51; } #print-sheet tr.t-word .ps-dot i { background: #4A5E7E; } #print-sheet tr.t-sound .ps-dot i { background: #9E6B8E; } #print-sheet tr.t-grammar .ps-dot i { background: #587060; } #print-sheet tr.t-note .ps-dot i { background: #A07A2E; }
  #print-sheet .ps-meta { width: 18%; text-align: right; font: 500 7pt/1.3 'JetBrains Mono', monospace; color: #8C857A; }
}

/* ===== Listen on the go ===== */
.ls { max-width: 640px; }
.ls h1 { margin: 2px 0 6px; font-size: clamp(1.8rem, 5vw, 2.3rem); }
.ls-k { font: 500 var(--fs-xs)/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); margin: 14px 0 0; }
.ls-center { text-align: center; }
.ls-src { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ls-opt { text-align: left; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 14px; padding: 12px 12px; cursor: pointer; color: var(--text); font: inherit; }
.ls-opt.on { border: 2px solid var(--text); padding: 8px 12px; }
.ls-opt b { display: block; font-weight: 600; font-size: .92rem; }
.ls-opt small { color: var(--text-3); font-size: .78rem; }
.ls-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: var(--sp-3) 0 0; }
.ls-blocks { display: grid; gap: 8px; margin: 12px 0 0; max-height: 260px; overflow: auto; }
.ls-blk { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; background: var(--surface); font-size: .92rem; cursor: pointer; }
.ls-blk small { color: var(--text-3); font-size: .76rem; }
.ls-modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ls-mode { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 14px; padding: 12px 8px; text-align: center; font: 500 .82rem/1.25 var(--sans); color: var(--text); cursor: pointer; }
.ls-mode i { display: block; font-style: normal; font-size: 1.2rem; margin-bottom: 3px; }
.ls-mode.on { background: #23211E; color: #F6F2EA; border-color: #23211E; }
html.theme-night .ls-mode.on { background: #F6F2EA; color: #23211E; }
.ls-mode:disabled { opacity: .35; cursor: default; }
.ls-dirs { display: grid; gap: 8px; margin: 12px 0 4px; }
.ls-dir { display: flex; align-items: center; gap: 12px; text-align: left; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 12px; padding: 12px 12px; cursor: pointer; color: var(--text); font: inherit; }
.ls-dir.on { border: 2px solid var(--text); padding: 8px 12px; }
.ls-dir b { font-weight: 600; font-size: .9rem; }
.ls-dir span { margin-left: auto; font: 500 var(--fs-xs)/1.2 var(--mono); color: var(--text-3); }
.ls-sl { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; padding: 12px 0 4px; border-bottom: 1px solid var(--line); font-size: .9rem; }
.ls-sl input { grid-column: 1 / -1; width: 100%; accent-color: #23211E; }
html.theme-night .ls-sl input { accent-color: var(--accent); }
.ls-sl output { font: 500 12px/1 var(--mono); color: var(--text-2); }
.ls-loop { border-bottom: 0; }
.ls-start { width: 100%; margin-top: 16px; }
.ls-start svg { width: 15px; height: 15px; }
/* On a phone the Start button stays in reach at the bottom of the screen, above the tab bar, its Ember dome and the
   translate pill (which sits 76px up); the page gets extra room at the end so the last controls scroll clear of it. */
@media (max-width: 720px) {
  .ls-start:not(:disabled) { position: sticky; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 66px); z-index: 5; box-shadow: 0 10px 28px -10px rgba(var(--shadow-rgb), .45), 0 0 0 6px rgba(var(--bg-rgb), .9); }
  main.app.ls:not(.ls-player) { padding-bottom: calc(var(--nav-h) + 140px + env(safe-area-inset-bottom, 0px)) !important; }
}
.ls-dl { display: flex; gap: 12px; align-items: flex-start; margin-top: 16px; padding: 12px 16px; border-radius: 14px; border: 1px dashed var(--line-strong); font-size: var(--fs-sm); color: var(--text-2); }
.ls-dl b { display: block; color: var(--text); font-weight: 600; }
.ls-dl > span:first-child { font-size: 1.3rem; line-height: 1; }
/* player */
.ls-prog { display: flex; justify-content: center; font: 500 var(--fs-xs)/1 var(--mono); color: var(--text-3); margin: 12px 0 8px; }
.ls-pbar { height: 4px; border-radius: 2px; background: var(--line); margin: 0 0 20px; } .ls-pbar b { display: block; height: 100%; width: 0; background: var(--text); border-radius: 2px; transition: width .3s; }
.ls-now { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 28px 20px; text-align: center; min-height: 240px; display: flex; flex-direction: column; justify-content: center; margin: 0 0 20px; }
.ls-lab { font: 500 var(--fs-xs)/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); margin: 0 0 6px; }
.ls-en { font: 400 1.7rem/1.3 var(--serif); margin: 0; }
.ls-l1 { color: var(--text-2); font-size: 1.05rem; margin: 8px 0 0; }
.ls-l1.big { font: 400 1.5rem/1.3 var(--serif); color: var(--text); }
.ls-turn { --p: 0%; width: 96px; height: 96px; margin: 16px auto 4px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--accent) 0 var(--p), var(--line) var(--p) 100%); }
.ls-turn span { width: 80px; height: 80px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; align-content: center; font: 600 .82rem/1.2 var(--sans); color: var(--accent-2); }
.ls-turn em { display: block; font-style: normal; font-weight: 500; }
.ls-ctrl { display: flex; justify-content: center; align-items: center; gap: 24px; }
.ls-ctrl button { width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); display: grid; place-items: center; font-size: 1.1rem; color: var(--text); cursor: pointer; }
.ls-ctrl button.big { width: 80px; height: 80px; background: #23211E; color: #F6F2EA; border: 0; font-size: 1.6rem; }
.ls-ctrl button.big svg { width: 26px; height: 26px; fill: currentColor; margin-left: 4px; }
html.theme-night .ls-ctrl button.big { background: #F6F2EA; color: #23211E; }
.ls-extra { display: flex; justify-content: center; margin-top: 16px; }
.ls-hint { text-align: center; color: var(--text-3); margin-top: 16px; }
/* car mode */
.ls-player.car { max-width: none; background: #141210; color: #F6F2EA; margin: -18px calc(50% - 50vw) 0; padding: 20px 16px 100px; min-height: calc(100vh - var(--nav-h)); }
.ls-player.car .btn { color: #F6F2EA; border-color: rgba(246,242,234,.25); background: transparent; }
.ls-player.car .ls-now { background: transparent; border: 0; min-height: 300px; }
.ls-player.car .ls-en { font-size: 2.4rem; color: #F6F2EA; }
.ls-player.car .ls-l1, .ls-player.car .ls-l1.big { color: #B8B2A6; font-size: 1.3rem; }
.ls-player.car .ls-l1.big { font-size: 2rem; color: #F6F2EA; }
.ls-player.car .ls-turn span { background: #141210; color: #f0b294; }
.ls-player.car .ls-ctrl { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 12px; }
.ls-player.car .ls-ctrl button { width: auto; height: 120px; border-radius: 26px; background: #2b2722; border: 0; color: #F6F2EA; font-size: 2rem; }
.ls-player.car .ls-ctrl button.big { background: #C86D51; height: 120px; width: auto; font-size: 2.6rem; }
.ls-player.car .ls-pbar { background: rgba(246,242,234,.15); } .ls-player.car .ls-pbar b { background: #F6F2EA; }
.ls-player.car .ls-extra, .ls-player.car .ls-k { opacity: .7; }
.bsum-listen { display: flex; align-items: center; gap: 12px; margin: 12px 0 0; padding: 12px 16px; border-radius: 16px; border: 1px solid var(--line-strong); background: var(--surface); text-decoration: none; color: var(--text); }
.bsum-listen b { display: block; font-weight: 600; } .bsum-listen small { color: var(--text-3); }
.bsum-listen > svg { width: 16px; height: 16px; margin-left: auto; }
/* car mode: a full-screen layer above everything (menus and floating buttons too) */
.ls-player.car { position: fixed; inset: 0; z-index: 300; margin: 0; max-width: none; min-height: 0; overflow-y: auto; padding: calc(16px + env(safe-area-inset-top, 0px)) 16px calc(24px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; }
.ls-player.car .ls-now { flex: 1; }
.ls-player.car { width: auto !important; max-width: none !important; }
/* tutors on phones: Profile as a small icon in the top bar (the tab bar holds six) */
.topbar .top-profile { display: none; }
@media (max-width: 880px) { .topbar .top-profile { display: inline-flex; width: 34px; height: 34px; padding: 0; justify-content: center; align-items: center; } .topbar .top-profile svg { width: 17px; height: 17px; } }
.space-otg .sl-ico { background: #23211E; color: #F6F2EA; }
html.theme-night .space-otg .sl-ico { background: #F6F2EA; color: #23211E; }
.ls-k svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 2px; }
.nb-otg { background: #23211E; color: #F6F2EA; border-color: #23211E; margin-left: auto; }
html.theme-night .nb-otg { background: #F6F2EA; color: #23211E; }
.nb-otg + .nb-chip { margin-left: 0; }

/* Base Camp: no ranking — pick of the week, people alongside, quiet milestones, a heart without a count */
.post-pick { border-color: rgba(200, 109, 81, .45); background: color-mix(in srgb, var(--surface) 88%, #C86D51 12%); }
.pick-tag { display: inline-flex; align-items: center; gap: 8px; font: 600 var(--fs-xs)/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: #A0533A; margin-bottom: 8px; }
.pick-tag svg { width: 14px; height: 14px; }
.heart-btn svg { width: 15px; height: 15px; }
.heart-btn.on { color: #A0533A; border-color: rgba(200, 109, 81, .5); }
.heart-btn.on svg { fill: currentColor; }
.bc-note { font-size: .9rem; margin: 4px 0 12px; }
.bc-people { display: flex; flex-wrap: wrap; gap: 8px; }
.bc-person { display: inline-flex; align-items: center; gap: 8px; padding: 5px 11px 5px 5px; border: 1px solid var(--line); border-radius: 999px; font-size: .92rem; }
.bc-person img { width: 16px; height: auto; }
.bc-av { width: 26px; height: 26px; flex: 0 0 26px; display: inline-block; }
.bc-av svg, .bc-av img { width: 100%; height: 100%; }
.bc-miles { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 12px; }
.bc-miles li { display: grid; grid-template-columns: 18px 1fr; gap: 12px; align-items: start; font-size: .93rem; line-height: 1.4; }
.bc-miles svg { width: 18px; height: 18px; color: #587060; margin-top: 1px; }
:root[data-theme="dark"] .pick-tag, :root[data-theme="dark"] .heart-btn.on { color: #E39478; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pick-tag, :root:not([data-theme="light"]) .heart-btn.on { color: #E39478; } }

/* My Space: "Your week" spans the full row (it is longer than the link cards), and its link arrow stays small */
#week-slot { grid-column: 1 / -1; }
.space-week { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); column-gap: 32px; align-items: start; }
.space-week > .tag, .space-week > h3, .space-week > p:not(.space-week-k) { grid-column: 1; }
.space-week > .space-week-k, .space-week > ul, .space-week > .link { grid-column: 2; }
.space-week > .space-week-k { grid-row: 1; }
.space-week > ul { grid-row: 2 / span 2; }
.space-week > .link { grid-row: 4; }
.space-week .link svg { width: 14px; height: 14px; vertical-align: -2px; }
@media (max-width: 760px) { .space-week { display: block; } }
.space-links { grid-auto-flow: row dense; }
.space-week .link { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; justify-self: start; }
.space-proto { border-style: dashed; border-color: rgba(200, 109, 81, .5); }
.space-proto .sl-ico { background: rgba(200, 109, 81, .14); color: #A0533A; }
.sl-time { color: #587060; margin-top: -4px; }
.sl-time:empty { display: none; }
html.theme-night .sl-time { color: #9db8a4; }
/* Tip bank (opt-in per tip) */
.nb-share { margin-left: 10px; }
.nb-tips-why { margin: -4px 0 10px; }
.nb-tips { display: grid; gap: 12px; margin-bottom: 18px; }
.nb-tip { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; padding: 14px 16px; border: 1px solid var(--line); border-left: 3px solid #9E6B8E; border-radius: 12px; background: var(--surface); }
.nb-tip b { display: block; font: 500 1.02rem/1.35 var(--serif); }
.nb-tip-tr { display: block; color: var(--text-3); font-size: .9rem; margin-top: 2px; }
.nb-tip p { margin: 8px 0 0; font-size: .92rem; color: var(--text-2); }
.nb-tip small { display: block; margin-top: 6px; color: var(--text-3); font: 500 var(--fs-xs)/1.4 var(--mono); letter-spacing: .06em; }
.nb-tip .btn { flex: 0 0 auto; }
.lvl-video { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; font-weight: 500; color: #A0533A; text-decoration: none; }
.lvl-video svg { width: 16px; height: 16px; }
.amb-btn[aria-pressed="false"] { opacity: .7; }
/* The new course (outline for tutors) */
.v2-sum { font: 500 12px/1.4 var(--mono); letter-spacing: .06em; color: var(--text-3); margin: 0 0 14px; }
.v2-lvl { padding: 0; margin-bottom: 12px; overflow: hidden; }
.v2-head { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; width: 100%; text-align: left; padding: 20px 20px; background: none; border: 0; color: inherit; cursor: pointer; font: inherit; }
.v2-head .tag { grid-column: 1 / -1; }
.v2-head b { font: 500 1.35rem/1.2 var(--serif); }
.v2-head .muted { grid-column: 1; font-size: .92rem; }
.v2-count { grid-column: 2; grid-row: 2 / span 2; align-self: center; font: 500 var(--fs-xs)/1.4 var(--mono); color: var(--text-3); }
.v2-camp { padding: 4px 20px 12px; border-top: 1px solid var(--line); }
.v2-camp-t { font-weight: 600; margin: 12px 0 6px; }
.v2-camp-t span { font-weight: 400; color: var(--text-3); font-size: .9rem; margin-left: 6px; }
.v2-blocks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.v2-blocks details { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--surface); }
.v2-blocks li.done details { border-color: rgba(110, 133, 116, .5); }
.v2-blocks summary { display: grid; grid-template-columns: 20px 1fr; gap: 2px 12px; cursor: pointer; list-style: none; }
.v2-blocks summary::-webkit-details-marker { display: none; }
.v2-blocks summary .small { grid-column: 2; }
.v2-dot { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: inline-flex; align-items: center; justify-content: center; margin-top: 2px; }
.v2-blocks li.done .v2-dot { background: #6E8574; border-color: #6E8574; color: #fff; }
.v2-dot svg { width: 12px; height: 12px; }
.v2 dl { margin: 12px 0; display: grid; gap: 8px; }
.v2-f { display: grid; grid-template-columns: 120px 1fr; gap: 12px; font-size: .92rem; }
.v2-f dt { font: 500 var(--fs-xs)/1.6 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.v2-f dd { margin: 0; }
@media (max-width: 600px) { .v2-f { grid-template-columns: 1fr; gap: 0; } }
.v2-empty { padding: 0 20px 16px; }
.ask-name { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 16px; background: rgba(35, 33, 30, .45); }
.ask-name-card { width: min(440px, 100%); display: grid; gap: 12px; }
.ask-name-card h2 { margin: 0; font-size: 1.6rem; }
.ask-name-card p { margin: 0; }

/* Read aloud: listen, read it yourself, record; recordings over time */
.ra-host { margin-top: 22px; }
.ra { display: grid; gap: 12px; }
.ra-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; }
.ra-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.ra-tabs button { border: 1px solid var(--line-strong); background: none; border-radius: 999px; padding: 6px 14px; font: 500 13px/1.2 var(--sans); color: var(--text-2); cursor: pointer; }
.ra-tabs button.on { background: #23211E; border-color: #23211E; color: #F6F2EA; }
html.theme-night .ra-tabs button.on { background: #F6F2EA; border-color: #F6F2EA; color: #23211E; }
.ra-text { font: 400 1.12rem/1.75 var(--serif); padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); max-height: 420px; overflow: auto; }
.ra-text p { margin: 0 0 12px; }
.ra-text p:last-child { margin-bottom: 0; }
.ra-text .ra-t { font: 600 var(--fs-xs)/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.ra-w { border-radius: 4px; transition: background .15s; }
.ra-w.on { background: rgba(200, 109, 81, .22); }
.ra-w.ra-miss { text-decoration: underline dotted #A0533A; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.ra-ctrl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ra-rec.listening { animation: raPulse 1.4s ease-in-out infinite; }
@keyframes raPulse { 50% { box-shadow: 0 0 0 6px rgba(200, 109, 81, .18); } }
.ra-level { width: 70px; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.ra-level i { display: block; height: 100%; width: 0; background: #6E8574; transition: width .08s; }
.ra-chip { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 999px; padding: 2px 10px; margin: 2px; font: 500 13px/1.6 var(--sans); cursor: pointer; color: inherit; }
.ra-k { font: 600 var(--fs-xs)/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); margin: 6px 0 6px; }
.ra-trend { margin: 0 0 8px; font-size: .92rem; }
.ra-trend b { color: #587060; }
.ra-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ra-list li { display: grid; grid-template-columns: 58px 90px 40px 1fr 30px; gap: 12px; align-items: center; font-size: .9rem; }
.ra-list audio { width: 100%; height: 32px; }
.ra-bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.ra-bar i { display: block; height: 100%; background: #6E8574; }
.ra-d { color: var(--text-3); font: 500 12px/1.4 var(--mono); }
.ra-pct { font: 600 12px/1.4 var(--mono); }
@media (max-width: 600px) { .ra-list li { grid-template-columns: 52px 1fr 40px 30px; } .ra-list audio { grid-column: 1 / -1; grid-row: 2; } }
.ra-story-card { margin-top: 16px; }
.nb-read-why { margin: 0 0 14px; }
.nb-chapter { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; background: var(--surface); }
.nb-chapter summary { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; cursor: pointer; }
.nb-chapter[open] summary { margin-bottom: 12px; }
.nb-ra .ra-text { max-height: 340px; }
.teach-ra { margin-top: var(--stack-gap); }
.teach-ra-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.teach-ra-list li { display: grid; gap: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.teach-ra-list audio { width: 100%; max-width: 420px; height: 34px; }
.v2-index { padding: 16px 18px; margin-bottom: 16px; display: grid; gap: 12px; }
.v2-index-k { margin: 0; font: 600 var(--fs-xs)/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.v2-index-row { display: grid; grid-template-columns: 150px 1fr; gap: 12px; align-items: start; }
.v2-index-l { font-size: .92rem; padding-top: 4px; }
.v2-index-l b { font: 600 var(--fs-xs)/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: #A0533A; margin-right: 4px; }
.v2-index-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.v2-chip { border: 1px solid var(--line-strong); background: var(--surface); color: inherit; border-radius: 999px; padding: 5px 12px; font: 500 13px/1.3 var(--sans); cursor: pointer; }
.v2-chip:hover { border-color: #C86D51; }
.v2-chip i { font: 600 var(--fs-xs)/1 var(--mono); font-style: normal; color: #587060; margin-left: 4px; }
.v2-chip.done { border-color: rgba(110, 133, 116, .6); background: rgba(110, 133, 116, .1); }
.v2-camp { scroll-margin-top: 90px; transition: background .4s; border-radius: 10px; }
.v2-camp.v2-flash { background: rgba(200, 109, 81, .1); }
@media (max-width: 600px) { .v2-index-row { grid-template-columns: 1fr; gap: 4px; } }
.follows-note { margin: 0 0 14px; padding: 10px 14px; border-left: 3px solid #9E6B8E; background: rgba(158, 107, 142, .08); border-radius: 8px; font-size: .94rem; }
.follows-note a { margin-left: 6px; font-weight: 500; }
/* Tutor: questions from the home page */
.tq-list { display: grid; gap: 12px; }
.tq.done { opacity: .72; }
.tq-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.tq-q { font: 400 1.08rem/1.5 var(--serif); margin: 8px 0 12px; }
.tq-k { display: block; font: 600 var(--fs-xs)/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); margin-bottom: 6px; }
.tq textarea { width: 100%; }
.tq-acts { margin-top: 10px; }

/* ---------- Easier to see (2026-11): bigger menu icons, stronger menu font, clearer small labels ---------- */
.nav-links a { font-size: 15px; font-weight: 600; color: var(--text); gap: 8px; }
.nav-links a:not(.active) { color: color-mix(in srgb, var(--text) 82%, transparent); }
.nav-links a svg { width: 20px; height: 20px; opacity: 1; stroke-width: 1.8; flex: 0 0 20px; }
@media (max-width: 1360px) { .nav-links a { font-size: 14px; padding: 8px 5px; gap: 4px; } .nav-links a svg { width: 18px; height: 18px; flex-basis: 18px; } }
@media (max-width: 1200px) { .nav-links a svg { display: inline-block; } .nav-links a { font-size: 13.5px; padding: 8px 6px; } }
@media (max-width: 1100px) { .nav-links a svg { display: none; } }
@media (max-width: 760px) {
  .tabbar a { gap: 4px; padding: 9px 2px 8px; font: 600 12px/1.15 var(--sans); color: var(--text-2); white-space: normal; text-align: center; overflow: visible; }
  .tabbar.adm-6 a { font-size: var(--fs-xs); }
  .tabbar a svg { width: 26px; height: 26px; stroke-width: 1.8; }
  .tabbar a.active { color: var(--text); }
  .top-profile svg, .theme-btn svg { width: 22px; height: 22px; }
}
/* The small capital labels ("STAGE 8 OF 10 · IS THIS YOU?", notebook and My Space headings): bigger and bolder. */
.tag, .eyebrow, .h2-eyebrow { font-size: 12px; font-weight: 600; }
.ra-k, .ft-k, .basics-k, .bsum-k, .bsum-h, .nb-sec, .wk-k, .tq-k, .h6-faq-k, .v2-f dt, .cm-f dt, .cm-k, .space-week-k, .h4-k, .pick-tag, .ra-d, .ra-pct, .sl-time, .h4-lvl-time, .h6-times span, .nb-k, .v2-count, .cm-meta, .h6-pn { font-size: 12px !important; font-weight: 600 !important; }
@media (max-width: 640px) {
  .tag, .eyebrow, .h2-eyebrow, .stage-title .tag { font-size: 13px; letter-spacing: .08em; }
  .ra-k, .ft-k, .basics-k, .bsum-k, .bsum-h, .nb-sec, .wk-k, .tq-k, .h6-faq-k, .v2-f dt, .cm-f dt, .cm-k, .space-week-k, .h4-k, .pick-tag, .ra-d, .ra-pct, .sl-time, .h4-lvl-time, .h6-times span, .nb-k, .v2-count, .cm-meta, .h6-pn { font-size: 13px !important; letter-spacing: .06em !important; }
  .story-line .who, .bubble .who { font-size: 12px; }
  .why { font-size: 15px; }
}
/* One Pause / Resume / Stop bar for anything read aloud */
.tts-bar { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 350; display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-strong); box-shadow: 0 12px 34px -12px rgba(var(--shadow-rgb), .45); }
.tts-bar[hidden] { display: none; }
.tts-k { font: 600 13px/1.2 var(--sans); color: var(--text); margin-right: 4px; white-space: nowrap; }
.tts-bar .btn { min-height: 40px; padding: 8px 14px; font-weight: 600; }
.tts-pause { display: inline-block; width: 11px; height: 13px; border-left: 4px solid currentColor; border-right: 4px solid currentColor; }
.tts-stop { display: inline-block; width: 12px; height: 12px; background: currentColor; border-radius: 2px; }
@media (max-width: 760px) { .tts-bar { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); } }
.vs-rec-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.vs-rec-acts .btn, .ra-ctrl .btn { min-height: 40px; font-weight: 600; }

/* Header: a light/dark switch that is easy to find (moon = indigo, sun = amber), and flags for EN / ES / CS */
.theme-btn { width: 38px; height: 38px; border-radius: 12px; transition: background .15s, border-color .15s, transform .1s; }
.theme-btn svg { width: 20px; height: 20px; }
.theme-btn:active { transform: scale(.95); }
.theme-btn.to-dark { color: #4b4c9e; background: #eeedfb; border-color: #d9d7f3; }
.theme-btn.to-dark:hover { color: #3b3c8a; background: #e4e2f8; border-color: #c9c6ee; }
.theme-btn.to-light { color: #f2b04a; background: rgba(242, 176, 74, .14); border-color: rgba(242, 176, 74, .38); }
.theme-btn.to-light:hover { color: #ffc768; background: rgba(242, 176, 74, .22); border-color: rgba(242, 176, 74, .55); }
.lang-flag { width: 20px; height: 14px; flex: 0 0 20px; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1px rgba(var(--fg-rgb), .12); }
.lang-btn .lang-flag { width: 22px; height: 15px; flex-basis: 22px; }
.lang-n { display: inline-flex; align-items: center; gap: 12px; }
.lang-noflag { display: inline-block; width: 20px; flex: 0 0 20px; }
.topbar .theme-btn, .topbar .lang-btn { flex: 0 0 auto; }

/* Pilot features card on My Space (staff and pilot students) */
.pilot-card { display: grid; gap: 12px; }
.pilot-card h2 { margin: 0; font-size: clamp(1.3rem, 3vw, 1.6rem); }
.pilot-links { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.pilot-link { display: grid; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--text); text-decoration: none; }
.pilot-link:hover { border-color: var(--line-strong); }
.pilot-link span { color: var(--text-2); font-size: .9rem; }

/* ==========================================================================
   Consistency pass (22 Nov 2026), answering Enzonic's review: one type scale and one spacing scale (tokens at the
   top of this file), no text under 12px, the same card padding and stack gap everywhere, no stray empty bands.
   ========================================================================== */
/* Inline icons inside text links never grow to the width of their box (the Path page showed a 100px arrow). */
.link > svg, a.small > svg, .ms-prev > svg { display: inline-block; width: 1em; height: 1em; vertical-align: -.125em; flex: 0 0 auto; }
.space-climb-head .link { white-space: nowrap; }
/* Top bar: staff see Teaching and Admin as well; below 1360px the metres chip steps aside so nothing scrolls sideways. */
@media (max-width: 1360px) { .topbar:has(.nav-links > a:nth-child(8)) .stat-chip.hide-mobile { display: none; } }
@media (max-width: 420px) {
  .topbar { gap: 4px; padding-left: 12px; padding-right: 12px; }
  .topbar .btn-sm { padding-left: 8px; padding-right: 8px; }
}
/* Log in / Sign up on phones: start at the top like every other page, not in the middle of an empty screen. */
@media (max-width: 880px) { .auth { min-height: 0; } .auth-form { place-items: start center; padding: var(--sp-7) var(--sp-4) var(--sp-8); } }
/* "← My Space" / "← My notebook" ghost buttons at the top of a page: their text lines up with the page's left edge. */
main.app > .btn-ghost.btn-sm:first-child, main.app > .row:first-child > .btn-ghost.btn-sm:first-child { margin-left: -12px; }
/* Small phones (360px) with a long "Log in" (Přihlásit se, Iniciar sesión): a slightly smaller wordmark keeps the bar on one line. */
@media (max-width: 380px) { .topbar .brand { gap: 6px; } .topbar .brand svg { width: 20px; height: 20px; } .topbar .brand .wm { font-size: 16px; } .lang-btn:has(.lang-flag) > span { display: none; } }

/* Messages from the tutor to many learners (public/js/broadcasts.js) */
.bc-slot { display: grid; gap: 10px; }
.bc-slot[hidden] { display: none; }
.bc-card { padding: 14px 16px; display: grid; gap: 8px; border-left: 3px solid var(--accent); }
.bc-top { display: flex; align-items: center; gap: 10px; }
.bc-top .tag { flex: 1; min-width: 0; }
.bc-x { border: 0; background: none; color: var(--text-3); font-size: 1.25rem; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.bc-x:hover { color: var(--text); background: var(--surface-2); }
.bc-body { margin: 0; font-size: var(--fs-base); line-height: 1.5; }
.bc-card .btn { justify-self: start; }
.t2-msgs .bc-slot { margin-bottom: 10px; }
.ann-strip { display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 16px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); background: var(--text); color: var(--bg); font: 500 var(--fs-sm)/1.4 var(--sans); text-align: center; }
.ann-strip a { color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
/* Teaching → Messages */
.bcw { padding: 18px; display: grid; gap: 10px; margin-bottom: 20px; }
.bcw textarea { width: 100%; }
.bcw-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.bcw-row > div { display: grid; gap: 4px; min-width: 0; }
.bcw-aud { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.bcw-aud legend { margin-bottom: 4px; }
.bcw-r { display: inline-flex; gap: 6px; align-items: center; }
.bcw-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; max-height: 260px; overflow: auto; padding: 8px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.bcw-list[hidden] { display: none; }
.bcw-s { display: grid; grid-template-columns: auto 1fr; gap: 0 8px; align-items: center; font-size: var(--fs-sm); }
.bcw-s small { grid-column: 2; }
.bcw-h { font: 600 1.15rem var(--serif); margin: 8px 0 10px; }
.bcw-sent { display: grid; gap: 10px; margin-bottom: 20px; }
.bcw-item { padding: 14px 16px; display: grid; gap: 8px; }
.bcw-item.over { opacity: .6; }
.bcw-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bcw-meta .btn { margin-left: auto; }
.pf-early { display: flex; gap: 10px; align-items: flex-start; margin: 6px 0 12px; cursor: pointer; }
.pf-early input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); }
.pf-early span { display: grid; gap: 2px; }
.pf-early small { font-size: var(--fs-sm); }

/* A voice message to Michal (public/js/voicenote.js) */
.vn-go { display: inline-flex; align-items: center; gap: 8px; }
.vn-hint { display: block; margin-top: 4px; font-size: .82rem; opacity: .8; }
.vn-on, .vn-ok { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.vn-lvl { --lv: 0; width: 14px; height: 14px; border-radius: 50%; background: #D94B2B; box-shadow: 0 0 0 calc(var(--lv) * 10px) rgba(217,75,43,.25); transition: box-shadow .1s; }
.vn-time { font-variant-numeric: tabular-nums; font-size: 1.05rem; } .vn-max { opacity: .65; font-size: .85rem; }
.vn-ok audio { height: 38px; max-width: 100%; }

/* A guest's first Stage: feedback from Michal (block.js) */
.gfb { max-width: 620px; margin: 8px auto 0; text-align: left; display: grid; gap: 8px; border-top: 5px solid #6B4FA0; }
.gfb h2 { margin: 2px 0 0; font-size: 1.45rem; }
.gfb form { display: grid; gap: 10px; margin-top: 4px; }
.gfb label, .gfb legend { font-weight: 700; font-size: .88rem; }
.gfb-moods { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.gfb-moods legend { margin-bottom: 6px; }
.gfb-moods label { font-weight: 600; }
.gfb-moods input { position: absolute; opacity: 0; pointer-events: none; }
.gfb-moods span { display: inline-block; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line, #d8d0c2); cursor: pointer; }
.gfb-moods input:checked + span { background: #6B4FA0; border-color: #6B4FA0; color: #fff; }
.gfb-moods input:focus-visible + span { outline: 3px solid #F0844A; outline-offset: 2px; }
.gfb-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .gfb-row > span { display: grid; gap: 4px; }
.gfb .btn-lva, .gfb button[type=submit] { justify-self: start; }
.gfb-msg { color: #B5480F; min-height: 1em; margin: 0; }
@media (max-width: 560px) { .gfb-row { grid-template-columns: 1fr; } }

/* Questions inbox: a guest's Stage feedback, voice messages */
.tq-fb { border-left: 5px solid #6B4FA0; }
.tq-kind { background: #6B4FA0; color: #fff; }
.tq-work { margin: 10px 0 4px; padding: 10px 14px; border-radius: 12px; background: var(--surface-2, rgba(107,79,160,.07)); }
.tq-work .tq-stage { margin: 0 0 8px; }
.tq-work blockquote { margin: 0 0 8px; padding-left: 10px; border-left: 3px solid #F0844A; font-style: italic; }
.tq-fixes { margin: 0 0 6px; padding-left: 18px; } .tq-fixes s { opacity: .7; }
.tq-voice { margin: 4px 0 12px; } .tq-voice audio { width: 100%; max-width: 420px; height: 40px; }

/* Trying the course at your level (public/js/trial.js) */
.trial h1 { margin: 12px 0 6px; }
.tr-check { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin: 22px 0 8px; border-top: 5px solid #E0652E; }
.tr-check p { margin: 4px 0 0; }
.tr-or { font-size: 1.15rem; margin: 26px 0 10px; }
.tr-levels { display: grid; gap: 10px; }
.tr-lv { display: flex; gap: 14px; align-items: flex-start; text-align: left; width: 100%; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--line, #d8d0c2); background: var(--surface, #fff); color: inherit; font: inherit; cursor: pointer; }
.tr-lv:hover, .tr-lv:focus-visible { border-color: #6B4FA0; box-shadow: 0 4px 14px rgba(107,79,160,.15); }
.tr-lv:disabled { opacity: .6; cursor: progress; }
.tr-lv.tr-first { border-style: dashed; }
.tr-cefr { flex: none; min-width: 48px; text-align: center; padding: 6px 8px; border-radius: 10px; background: #2B2140; color: #fff; font-weight: 700; font-size: .95rem; }
.tr-cefr.big { display: inline-block; min-width: 0; font-size: 1rem; vertical-align: middle; margin-left: 6px; }
.tr-txt { display: grid; gap: 3px; } .tr-txt small { opacity: .85; line-height: 1.4; } .tr-txt em { font-style: normal; font-size: .82rem; color: #B5480F; font-weight: 600; }
.tr-note { margin-top: 18px; }
.tr-go { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: 18px 0 6px; }
.trial-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 8px 12px; margin-bottom: 12px; border-radius: 12px; background: #2B2140; color: #FBF3E6; font-size: .9rem; }
.trial-bar .btn { color: #FFD2B8; border-color: rgba(255,210,184,.45); }
.trial-bar .tb-go { display: flex; flex-wrap: wrap; gap: 6px; }
.trial .tr-or { font: 700 1.2rem/1.3 var(--sans, Inter, sans-serif); letter-spacing: 0; }
.trial .tr-note { max-width: none; margin-left: 0; margin-right: 0; text-align: left; }
.gfb-face { display: none; }
/* The first Listen of a Stage: invite the tap instead of playing by itself */
.co-invite { animation: co-invite 2.4s ease-in-out 3; }
@keyframes co-invite { 0%, 100% { box-shadow: 0 0 0 0 rgba(224,101,46,0); } 50% { box-shadow: 0 0 0 8px rgba(224,101,46,.22); } }
@media (prefers-reduced-motion: reduce) { .co-invite { animation: none; } }

/* Trial: welcome on the first screen of a Stage, the end page, the keepsake (trial.js) */
.trial-welcome { margin: 0 0 14px; display: grid; gap: 6px; border-left: 5px solid #E0652E; }
.trial-welcome h2 { margin: 2px 0 0; font-size: 1.35rem; } .trial-welcome h2 em { color: #B5480F; font-size: .8em; margin-left: 6px; }
.tw-list { margin: 4px 0 0; padding-left: 1.1em; display: grid; gap: 3px; font-size: .95rem; }
.tr-end-opts { display: grid; gap: 12px; margin-top: 18px; }
.tr-end-o { display: grid; gap: 4px; text-decoration: none; color: inherit; border-left: 5px solid #6B4FA0; }
.tr-end-o b { font: 600 1.15rem var(--serif); } .tr-end-o:first-child { border-left-color: #E0652E; }
.kp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 16px; }
.kp-sheet { background: #FFFDF8; color: #2A2119; border-radius: 18px; padding: 34px 38px; box-shadow: 0 18px 40px -26px rgba(43,33,64,.55); border: 1px solid #E8DCC6; display: grid; gap: 22px; font-size: 15px; }
.kp-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #2B2140; padding-bottom: 12px; }
.kp-logo { display: inline-flex; align-items: center; gap: 10px; font: 500 1.25rem Georgia, serif; color: #2B2140; } .kp-logo i { color: #E0652E; }
.kp-site { font: 700 .85rem var(--sans, sans-serif); color: #E0652E; letter-spacing: .02em; }
.kp-kk { font: 700 .72rem var(--sans, sans-serif); letter-spacing: .08em; text-transform: uppercase; color: #B5480F; }
.kp-title h1 { margin: 4px 0 2px; font: 600 1.9rem/1.15 Georgia, serif; color: #2B2140; } .kp-title p { margin: 0; color: #6E6152; }
.kp-sec h2, .kp-reco h2 { margin: 0 0 8px; font: 700 .8rem var(--sans, sans-serif); letter-spacing: .08em; text-transform: uppercase; color: #6B4FA0; }
.kp-stages { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; } .kp-stages span { color: #6E6152; font-size: .9em; }
.kp-ph { width: 100%; border-collapse: collapse; } .kp-ph td { padding: 6px 8px; border-bottom: 1px solid #EFE4D1; vertical-align: top; }
.kp-ph td:first-child { font: 600 1rem Georgia, serif; width: 55%; } .kp-ph td:last-child { color: #6E6152; }
.kp-ph tr:nth-child(odd) td { background: #FBF4E8; }
.kp-reco { display: flex; gap: 16px; align-items: flex-start; border-radius: 14px; padding: 16px 18px; background: #F3EEFA; border-left: 5px solid #6B4FA0; }
.kp-reco img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px #FF9E66; flex: none; }
.kp-reco p { margin: 0; line-height: 1.55; white-space: pre-line; } .kp-sig { display: block; margin-top: 6px; font: 600 1.5rem/1 'Caveat', 'Segoe Script', cursive; color: #E0652E; }
.kp-foot { border-top: 1px solid #E8DCC6; padding-top: 12px; font-size: .88rem; color: #6E6152; } .kp-foot b { color: #2B2140; }
@media (max-width: 560px) { .kp-sheet { padding: 22px 18px; } .kp-title h1 { font-size: 1.5rem; } }
@media print {
  html.kp-print body * { visibility: hidden !important; }
  html.kp-print .kp-sheet, html.kp-print .kp-sheet * { visibility: visible !important; }
  html.kp-print .kp-sheet { position: absolute; left: 0; top: 0; width: 100%; box-shadow: none; border: 0; border-radius: 0; padding: 0; }
  html.kp-print .kp-ph tr { break-inside: avoid; } html.kp-print .kp-reco { break-inside: avoid; }
  @page { margin: 16mm; }
}
@media print {
  html.kp-print, html.kp-print body { background: #fff !important; }
  html.kp-print .kp-sheet { padding: 6mm 4mm !important; background: #fff !important; }
}

/* Ember by voice (public/js/embervoice.js) */
.ev-box { margin-bottom: 14px; }
.ev-card { display: grid; gap: 12px; border-radius: 18px; padding: 16px 18px; background: var(--surface, #fff); border: 1.5px solid #E0652E; box-shadow: 0 10px 26px -18px rgba(224,101,46,.6); }
.ev-h { display: flex; align-items: center; gap: 12px; } .ev-h > span:nth-child(2) { display: grid; gap: 2px; flex: 1; min-width: 0; }
.ev-h b { font: 600 1.15rem var(--serif); } .ev-h small { font-size: .85rem; opacity: .8; }
.ev-ic { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: #E0652E; color: #fff; flex: none; }
.ev-pill { font: 700 .66rem var(--sans); letter-spacing: .07em; text-transform: uppercase; border-radius: 999px; padding: 3px 8px; background: #2B2140; color: #FFB48A; }
.ev-who { display: flex; flex-wrap: wrap; gap: 8px; }
.ev-p { display: grid; gap: 1px; text-align: left; border: 1.5px solid var(--line, #d8d0c2); background: transparent; color: inherit; border-radius: 12px; padding: 7px 12px; cursor: pointer; font: inherit; }
.ev-p b { font-size: .95rem; } .ev-p small { font-size: .76rem; opacity: .75; }
.ev-p[aria-checked="true"] { border-color: #E0652E; background: color-mix(in srgb, #E0652E 12%, transparent); }
.ev-p:focus-visible, .ev-go:focus-visible { outline: 3px solid #E0652E; outline-offset: 2px; }
.ev-go { display: inline-flex; align-items: center; gap: 10px; justify-self: start; }
.ev-note { margin: 0; font-size: .85rem; opacity: .8; }
.ev-state { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.ev-state i { width: 18px; height: 18px; border-radius: 50%; background: #8a7b66; flex: none; }
.ev-state[data-state="listening"] i { background: #2F7D5B; box-shadow: 0 0 0 0 rgba(47,125,91,.5); animation: ev-pulse 1.6s infinite; }
.ev-state[data-state="speaking"] i { background: #E0652E; box-shadow: 0 0 0 0 rgba(224,101,46,.5); animation: ev-pulse 1s infinite; }
.ev-state .ev-time { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 700; }
@keyframes ev-pulse { 70% { box-shadow: 0 0 0 12px rgba(0,0,0,0); } 100% { box-shadow: 0 0 0 0 rgba(0,0,0,0); } }
@media (prefers-reduced-motion: reduce) { .ev-state i { animation: none !important; } }
.ev-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.ev-k { display: block; font: 700 .72rem var(--sans); letter-spacing: .08em; text-transform: uppercase; color: #B5480F; margin-bottom: 4px; }
.ev-well p { margin: 0 0 4px; }
.ev-fixes { display: grid; gap: 8px; }
.ev-fix { display: grid; gap: 4px; border-radius: 12px; padding: 10px 12px; background: color-mix(in srgb, #E0652E 7%, transparent); }
.ev-fix p { margin: 0; } .ev-fix s { opacity: .65; } .ev-fix small { opacity: .85; } .ev-fix .btn { justify-self: start; }
.ev-again { justify-self: start; }

/* My plan (public/js/billing.js) */
.bl-page { display: grid; gap: 14px; }
.bl-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.bl-plan { display: grid; gap: 8px; align-content: start; position: relative; }
.bl-plan.rec { border-color: #E0652E !important; box-shadow: 0 10px 24px -18px rgba(224,101,46,.7); }
.bl-plan .pill { justify-self: start; background: #E0652E; color: #fff; }
.bl-plan > b { font: 600 1.25rem var(--serif); }
.bl-price { font: 700 1.4rem var(--sans); } .bl-price small { font-size: .8rem; font-weight: 500; opacity: .7; }
.bl-plan ul { margin: 0; padding-left: 1.1em; display: grid; gap: 4px; font-size: .92rem; }
.bl-plan .btn { justify-self: start; margin-top: 4px; }
.bl-manage, .bl-lesson { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.bl-manage > div, .bl-lesson > div { display: grid; gap: 2px; flex: 1; min-width: 220px; } .bl-manage small, .bl-lesson small { opacity: .8; }
.bl-lesson > .bl-sessions { display: flex; flex-wrap: wrap; gap: 8px; flex: 0 1 auto; min-width: 0; } .bl-sessions .btn b { margin-left: 4px; }
.bl-intro { margin: 14px 0 0; font-weight: 600; color: var(--lava, #B5480F); }
@media (max-width: 760px) { .bl-plans { grid-template-columns: 1fr; } }

/* ---------- Ember call screen (public/js/embervoice.js): full screen like a phone call ---------- */
html.evc-open, html.evc-open body { overflow: hidden; }
.evc { --acc: #E0652E; --acc2: #F59A5B; --lvl: 0; position: fixed; inset: 0; z-index: 1000; display: flex; color: #F7F1EA;
  background: radial-gradient(120% 80% at 50% 0%, #3A2A55 0%, #221A34 55%, #17121F 100%); font-family: var(--sans, system-ui, sans-serif); }
.evc-grace { --acc: #D9577A; --acc2: #F08AA6; } .evc-ray { --acc: #3D7DD8; --acc2: #7FB0F0; }
.evc-lucia { --acc: #D99A2B; --acc2: #F2C35E; } .evc-tomas { --acc: #2E9C8A; --acc2: #6FD1BF; }
.evc-stage { flex: 1; min-width: 0; display: grid; grid-template-rows: auto 1fr auto; padding: max(14px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom)); }
.evc-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 760px; width: 100%; margin: 0 auto; }
.evc-who { display: grid; gap: 2px; } .evc-who b { font: 600 1.3rem var(--serif, Georgia, serif); } .evc-who small { opacity: .72; font-size: .9rem; }
.evc-time { font-variant-numeric: tabular-nums; }
.evc-pill { padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.1); font: 700 .68rem var(--sans, sans-serif); letter-spacing: .1em; text-transform: uppercase; opacity: .8; }
.evc-tbtn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); color: inherit; font: 600 .9rem var(--sans, sans-serif); cursor: pointer; }
.evc-tbtn[aria-pressed="true"] { background: rgba(255,255,255,.16); }
.evc-mid { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; max-width: 760px; width: 100%; margin: 0 auto; min-height: 0; }
.evc-orb { position: relative; width: clamp(150px, 34vmin, 230px); aspect-ratio: 1; display: grid; place-items: center; flex: none; }
.evc-core { position: relative; z-index: 2; width: 72%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; color: #fff; font: 600 3rem var(--serif, Georgia, serif);
  background: radial-gradient(circle at 35% 30%, var(--acc2), var(--acc) 60%, #7A2E12 130%); box-shadow: 0 0 calc(30px + var(--lvl) * 70px) calc(var(--lvl) * 18px) color-mix(in srgb, var(--acc) 70%, transparent);
  transform: scale(calc(1 + var(--lvl) * .12)); transition: transform .08s linear; }
.evc-ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--acc2) 55%, transparent); opacity: calc(.25 + var(--lvl) * .6); transform: scale(calc(.82 + var(--lvl) * .3)); transition: transform .1s linear, opacity .1s linear; }
.evc-ring.r2 { transform: scale(calc(.9 + var(--lvl) * .5)); opacity: calc(.12 + var(--lvl) * .4); }
.evc-orb[data-mode="listening"] .evc-core { background: radial-gradient(circle at 35% 30%, #B9A6F0, #6B4FC2 60%, #2C1E5C 130%); box-shadow: 0 0 calc(24px + var(--lvl) * 60px) calc(var(--lvl) * 14px) rgba(140,110,230,.55); }
.evc-orb[data-mode="listening"] .evc-ring { border-color: rgba(185,166,240,.5); }
.evc-orb[data-mode="connecting"] .evc-core, .evc-orb[data-mode="done"] .evc-core { animation: evc-breathe 1.6s ease-in-out infinite; }
@keyframes evc-breathe { 50% { transform: scale(1.06); filter: brightness(1.15); } }
.evc-status { margin: 0; font-size: .95rem; opacity: .75; min-height: 1.4em; }
.evc-subs { display: grid; gap: 10px; width: 100%; min-height: 6.5em; }
.evc-ai { margin: 0; font: 500 clamp(1.25rem, 3.4vw, 1.7rem)/1.4 var(--serif, Georgia, serif); color: #fff; text-wrap: balance; }
.evc-me { margin: 0; font-size: 1.02rem; line-height: 1.45; color: rgba(247,241,234,.82); } .evc-me span { opacity: .6; margin-right: 4px; } .evc-me.old { opacity: .5; }
.evc-fix { display: grid; gap: 4px; justify-items: center; padding: 12px 18px; border-radius: 16px; background: rgba(76,175,125,.16); border: 1px solid rgba(110,210,160,.45); max-width: 560px; }
.evc-fix.in { animation: evc-pop .35s ease-out; } @keyframes evc-pop { from { transform: translateY(8px); opacity: 0; } }
.evc-fix-k { display: inline-flex; align-items: center; gap: 6px; font: 700 .72rem var(--sans, sans-serif); letter-spacing: .08em; text-transform: uppercase; color: #8EE0B5; }
.evc-fix b { font-size: 1.15rem; color: #fff; } .evc-fix small { opacity: .7; }
.evc-ctrl { display: flex; justify-content: center; align-items: flex-start; gap: clamp(22px, 7vw, 46px); padding-top: 10px; }
.evc-ctrl[hidden] { display: none; }
.evc-btn { display: grid; grid-template-rows: 74px auto; align-items: center; justify-items: center; gap: 7px; background: none; border: 0; color: inherit; cursor: pointer; font: 500 .82rem var(--sans, sans-serif); }
.evc-ib { width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.16); transition: background .15s; }
.evc-btn:hover .evc-ib { background: rgba(255,255,255,.2); }
.evc-btn[aria-pressed="true"] .evc-ib { background: #F7F1EA; color: #221A34; }
.evc-end .evc-ib { width: 74px; height: 74px; background: #E5484D; border-color: #E5484D; } .evc-end:hover .evc-ib { background: #CC3338; }
.evc-end .evc-ib svg { transform: rotate(0deg); width: 30px; height: 30px; }
.evc-btn:focus-visible .evc-ib, .evc-tbtn:focus-visible, .evc-x:focus-visible { outline: 3px solid #F7F1EA; outline-offset: 3px; }
.evc-side { width: min(380px, 38vw); flex: none; display: flex; flex-direction: column; background: rgba(12,9,18,.42); border-left: 1px solid rgba(255,255,255,.08); }
.evc-side[hidden] { display: none; }
.evc-side header { display: flex; justify-content: space-between; align-items: center; padding: 18px 18px 10px; } .evc-side header b { font: 600 1.05rem var(--serif, Georgia, serif); }
.evc-x { background: none; border: 0; color: inherit; padding: 6px; border-radius: 50%; cursor: pointer; } .evc-x:hover { background: rgba(255,255,255,.1); }
.evc-log { list-style: none; margin: 0; padding: 6px 16px 22px; display: grid; gap: 10px; overflow-y: auto; align-content: start; flex: 1; }
.evc-log li { display: grid; gap: 3px; max-width: 92%; } .evc-log li p { margin: 0; padding: 9px 12px; border-radius: 14px; line-height: 1.45; font-size: .95rem; }
.evc-log li.ai p { background: rgba(255,255,255,.08); border-top-left-radius: 4px; }
.evc-log li.me { justify-self: end; text-align: right; } .evc-log li.me p { background: color-mix(in srgb, var(--acc) 35%, transparent); border-top-right-radius: 4px; text-align: left; }
.evc-log li.fixed p { border: 1px solid rgba(110,210,160,.45); } .evc-log mark { background: rgba(110,210,160,.28); color: #fff; border-radius: 4px; padding: 0 2px; }
.evc-lw { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; opacity: .55; }
@media (max-width: 999px) {
  .evc-side { position: absolute; left: 0; right: 0; bottom: 0; width: auto; height: 62%; border-left: 0; border-top: 1px solid rgba(255,255,255,.12); border-radius: 20px 20px 0 0; background: #1B1428; box-shadow: 0 -20px 40px rgba(0,0,0,.4); z-index: 3; }
}
@media (max-height: 640px) { .evc-orb { width: 120px; } .evc-mid { gap: 10px; } .evc-ib { width: 52px; height: 52px; } .evc-end .evc-ib { width: 62px; height: 62px; } }
@media (prefers-reduced-motion: reduce) { .evc-core, .evc-ring { transition: none; animation: none !important; } .evc-fix.in { animation: none; } }
