/* ============================================================
   AHA Learning Center — prototype design system
   "Storybook annual report": warm paper, literary serif,
   AHA red + marigold. Built mobile-first.
   ============================================================ */

:root {
  /* AHA Learning Center brand — ahalearningcenter.com */
  --paper: #FCFCFB;
  --paper-deep: #F4F4F1;
  --surface: #FFFEFC;
  --ink: #3D3D3D;
  --ink-muted: #767470;
  --ink-faint: #A5A29C;
  --line: #E9E7E2;
  --grid: #F0EEE9;
  --red: #EC272B;
  --red-deep: #C2181C;
  --red-soft: #FDE9E8;
  --marigold: #F7AF02;
  --marigold-deep: #C98902;
  --marigold-soft: #FDF3D8;
  --blue: #1861A6;
  --green: #3E7A46;
  --green-soft: #E4EFE2;
  --shadow: 0 2px 6px rgba(40, 36, 30, 0.05), 0 14px 34px rgba(40, 36, 30, 0.07);
  --shadow-lift: 0 4px 10px rgba(40, 36, 30, 0.09), 0 22px 48px rgba(40, 36, 30, 0.12);
  --radius: 24px;
  --font-display: 'Manrope', -apple-system, sans-serif;
  --font-body: 'Poppins', -apple-system, sans-serif;
  --font-data: 'Spline Sans Mono', ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img, video, svg { max-width: 100%; height: auto; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(at 12% 8%, rgba(247, 175, 2, 0.06), transparent 42%),
    radial-gradient(at 88% 92%, rgba(236, 39, 43, 0.04), transparent 46%);
}

.page-wrap { overflow-x: hidden; width: 100%; position: relative; }

::selection { background: var(--marigold); color: var(--ink); }

h1, h2, h3, .display { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em; line-height: 1.12; }
.num { font-family: var(--font-data); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

a { color: var(--red); }
button { font-family: inherit; cursor: pointer; }

:focus-visible {
  outline: 2.5px solid var(--marigold-deep);
  outline-offset: 2px;
  border-radius: 4px;
}

.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 10px; padding: 12px 20px; max-width: 1120px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); margin-right: auto; min-width: 0; }
.brand img { height: 36px; width: auto; flex-shrink: 0; }
.brand-name { font-size: 12.5px; line-height: 1.25; color: var(--ink-muted); font-weight: 600; padding-left: 10px; border-left: 1.5px solid var(--line); white-space: nowrap; }
.nav-links { display: flex; gap: 2px; }
.nav-links a {
  text-decoration: none; color: var(--ink-muted); font-weight: 600; font-size: 14px;
  padding: 9px 13px; border-radius: 99px; transition: all .18s ease; white-space: nowrap;
}
.nav-links a:hover { color: var(--ink); background: var(--paper-deep); }
.nav-links a.active { background: var(--ink); color: var(--paper); }

@media (max-width: 720px) {
  .brand-name { display: none; }
  .nav-inner { padding: 10px 12px; overflow-x: auto; scrollbar-width: none; }
  .nav-inner::-webkit-scrollbar { display: none; }
  .nav-links a { padding: 9px 11px; font-size: 13px; }
}

/* ---------- hero ---------- */
.hero { padding-top: 64px; padding-bottom: 40px; position: relative; }
.hero h1 { font-size: clamp(40px, 7vw, 76px); max-width: 13ch; }
.hero h1 em { font-style: normal; color: var(--ink); position: relative; white-space: nowrap; }
.hero h1 em .underline-svg { position: absolute; left: 0; right: 0; bottom: -0.12em; width: 100%; height: 0.22em; }
.hero .lede { font-size: clamp(16px, 2.2vw, 19px); color: var(--ink-muted); max-width: 56ch; margin-top: 20px; }
.hero .lede b { color: var(--ink); }

.hero-facts { margin-top: 18px; font-size: 13px; color: var(--ink-muted); font-weight: 500; }

/* ---------- unit viz (one dot per learner) ---------- */
.swarm-block { margin-top: 44px; }
.swarm-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 6px; }
.swarm-title { font-family: var(--font-display); font-weight: 800; font-size: 19px; }
.swarm-sub { font-size: 13px; color: var(--ink-muted); margin-top: 2px; }
.swarm-sub span { font-family: var(--font-data); color: var(--ink); font-weight: 600; }
#swarm svg { display: block; }

/* ---------- stat band (numbers as statements) ---------- */
.stat-band {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1.5px solid var(--ink); border-bottom: 1px solid var(--line);
}
.stat-band > .stat { min-width: 0; padding: 26px 22px 30px 0; }
.stat-band > .stat + .stat { border-left: 1px solid var(--line); padding-left: 22px; }
.stat .stat-val { font-family: var(--font-display); font-size: clamp(40px, 5.4vw, 62px); font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
.stat .stat-lab { font-size: 13.5px; font-weight: 600; color: var(--ink); margin-top: 10px; }
.stat .stat-note { font-size: 12.5px; color: var(--ink-muted); margin-top: 4px; }
.stat .spark { margin-top: 10px; max-width: 150px; }
@media (max-width: 820px) {
  .stat-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-band > .stat { padding: 20px 16px 22px 0; border-top: 1px solid var(--line); }
  .stat-band > .stat:nth-child(-n+2) { border-top: none; }
  .stat-band > .stat:nth-child(odd) { border-left: none; padding-left: 0; }
  .stat-band > .stat:nth-child(even) { border-left: 1px solid var(--line); padding-left: 16px; }
}

/* ---------- sections ---------- */
.section { padding-top: 52px; padding-bottom: 52px; }
.section-head { margin-bottom: 28px; max-width: 62ch; }
.section-head h2 { font-size: clamp(26px, 4vw, 38px); margin-top: 6px; }
.section-head p { color: var(--ink-muted); margin-top: 10px; font-size: 15.5px; }

/* ---------- cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 26px;
}
.card + .card { margin-top: 16px; }
.card-title { font-size: 19px; margin-bottom: 4px; }
.card-sub { font-size: 13.5px; color: var(--ink-muted); margin-bottom: 18px; }

/* ---------- two-col layouts ---------- */
.split { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 16px; align-items: start; }
.split--main { grid-template-columns: minmax(0,2fr) minmax(0,1fr); }
.split--registry { grid-template-columns: minmax(0,1fr) minmax(0,1.6fr); }
@media (max-width: 860px) { .split, .split--main, .split--registry { grid-template-columns: minmax(0,1fr); } }

/* ---------- filter chips ---------- */
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.filter-chip {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1.5px solid var(--line); background: var(--surface); border-radius: 99px;
  padding: 9px 16px; font-weight: 700; font-size: 13.5px; color: var(--ink-muted);
  min-height: 44px; transition: all .15s ease;
}
.filter-chip:hover { border-color: var(--ink-muted); }
.filter-chip.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* ---------- level bars ---------- */
.levelbar { margin-bottom: 14px; }
.levelbar-label { font-size: 12.5px; font-weight: 700; color: var(--ink-muted); margin-bottom: 6px; font-family: var(--font-data); text-transform: uppercase; letter-spacing: 0.08em; }
.levelbar-track { display: flex; gap: 2px; border-radius: 8px; overflow: hidden; }
.levelbar-seg {
  display: flex; align-items: center; justify-content: center;
  color: #FFF8EC; font-size: 12px; font-weight: 700; font-family: var(--font-data);
  min-width: 0; transition: filter .15s ease;
}
.levelbar-seg:hover { filter: brightness(1.12); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 14px; }
.legend-item { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-muted); font-weight: 600; }
.legend-swatch { width: 12px; height: 12px; border-radius: 4px; flex-shrink: 0; }

/* ---------- guide layer ---------- */
.guide-dot {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 21px; height: 21px; border-radius: 50%; flex-shrink: 0;
  border: 1.5px solid var(--ink-faint); background: var(--surface); color: var(--ink-muted);
  font-family: var(--font-data); font-size: 11.5px; font-weight: 600; line-height: 1;
  vertical-align: 2px; margin-left: 8px; cursor: help; transition: all .15s ease;
}
.guide-dot::after { content: ''; position: absolute; inset: -12px; }
.guide-dot:hover, .guide-dot.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.guide-pop {
  position: absolute; z-index: 350; display: none; opacity: 0;
  background: var(--ink); color: var(--paper); border-radius: 14px;
  padding: 16px 18px; box-shadow: var(--shadow-lift); transition: opacity .15s ease;
}
.guide-pop-title { font-family: var(--font-display); font-weight: 800; font-size: 15px; margin-bottom: 6px; }
.guide-pop-body { font-size: 13.5px; line-height: 1.55; color: #EDEAE4; }
.guide-pop-body b { color: #fff; }
.guide-sheet { position: fixed; inset: 0; z-index: 400; display: none; align-items: flex-end; }
.guide-sheet.open { display: flex; }
.guide-sheet-backdrop { position: absolute; inset: 0; background: rgba(40, 36, 30, 0.5); }
.guide-sheet-panel {
  position: relative; width: 100%; box-sizing: border-box;
  background: var(--surface); border-radius: 20px 20px 0 0;
  padding: 26px 22px calc(22px + env(safe-area-inset-bottom, 0px));
  animation: sheet-up .3s cubic-bezier(.2,.8,.3,1);
}
@keyframes sheet-up { from { transform: translateY(40%); opacity: 0; } }
.guide-sheet-title { font-family: var(--font-display); font-weight: 800; font-size: 19px; margin-bottom: 8px; }
.guide-sheet-body { font-size: 15px; line-height: 1.6; color: var(--ink); }
.guide-sheet-body b { font-weight: 700; }
.guide-sheet-close { margin-top: 18px; width: 100%; }
.guide-hint { font-size: 13px; color: var(--ink-muted); margin-top: 10px; }
.guide-hint .guide-dot { pointer-events: none; margin: 0 2px; vertical-align: -4px; }

/* ---------- proportion bars ---------- */
.prop { margin-top: 12px; }
.prop-track { position: relative; height: 10px; border-radius: 6px; background: var(--paper-deep); overflow: hidden; }
.prop-fill { height: 100%; width: 0%; border-radius: 6px; transition: width 1.2s cubic-bezier(.2,.7,.2,1); }
.prop-100 { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-family: var(--font-data); font-size: 8.5px; color: var(--ink-faint); line-height: 1; }
.prop-label { font-size: 12px; color: var(--ink-muted); margin-top: 6px; font-family: var(--font-data); }
.impact-head { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; }
.impact-num { font-family: var(--font-display); font-weight: 800; font-size: clamp(52px, 7vw, 84px); line-height: 1; letter-spacing: -0.03em; color: var(--ink); }
.impact-text { flex: 1; min-width: 220px; font-size: 17px; font-weight: 600; line-height: 1.4; }
.cohort-sum b { color: var(--ink); }

/* ---------- cohort rows ---------- */
.cohort-row { padding: 18px 0 4px; }
.cohort-row + .cohort-row { border-top: 1px solid var(--line); }
.cohort-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-bottom: 10px; }
.cohort-name { font-weight: 700; font-size: 15px; }
.cohort-sum { font-size: 13px; color: var(--ink-muted); }
.cohort-dots { display: flex; flex-wrap: wrap; gap: 5px; padding-bottom: 14px; }
.cohort-dot {
  width: 13px; height: 13px; border-radius: 50%; display: inline-block;
  transform: scale(0); transition: transform .35s cubic-bezier(.3,1.4,.4,1);
}
.cohort-dot.in { transform: scale(1); }
.cohort-dot.slipped { box-shadow: inset 0 0 0 2.5px var(--red-soft); }
.cohort-dot:hover { transform: scale(1.35); }
.chart-note { font-size: 12.5px; color: var(--ink-faint); margin-top: 12px; }

/* ---------- hbars ---------- */
.hbar-row { display: grid; grid-template-columns: 110px minmax(0,1fr) 52px; gap: 12px; align-items: center; margin-bottom: 12px; }
.hbar-name { font-size: 13.5px; font-weight: 700; }
.hbar-track { background: var(--paper-deep); border-radius: 6px; height: 22px; overflow: hidden; }
.hbar-fill { height: 100%; border-radius: 6px 4px 4px 6px; transition: width 1.1s cubic-bezier(.2,.7,.2,1); }
.hbar-val { font-family: var(--font-data); font-size: 13.5px; font-weight: 600; text-align: right; }

/* ---------- tooltip ---------- */
.chart-tip {
  position: absolute; z-index: 300; pointer-events: none; opacity: 0;
  background: var(--ink); color: var(--paper); border-radius: 10px;
  padding: 10px 13px; font-size: 13px; line-height: 1.45;
  box-shadow: var(--shadow-lift); transition: opacity .12s ease;
  max-width: 260px;
}
.chart-tip .tip-head { font-weight: 700; margin-bottom: 3px; }
.chart-tip .tip-sub { font-size: 11.5px; opacity: 0.75; margin-top: 3px; }
.chart-tip .tip-row { display: flex; align-items: center; gap: 6px; }
.chart-tip .swatch { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }

/* ---------- reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
[data-reveal].revealed { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  * { animation: none !important; transition-duration: 0.01ms !important; }
}

/* ---------- pills / buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 99px; font-weight: 700; font-size: 15px;
  padding: 13px 24px; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease;
  min-height: 44px;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; transform: none; }
.btn-red { background: var(--red); color: #fff; box-shadow: 0 3px 0 var(--red-deep); }
.btn-red:hover { transform: translateY(-1px); box-shadow: 0 4px 0 var(--red-deep), var(--shadow); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink-muted); }
.btn-ink { background: var(--ink); color: var(--paper); }

.chip {
  display: inline-flex; align-items: center; gap: 6px; border-radius: 99px;
  font-size: 12.5px; font-weight: 700; padding: 4px 11px;
}
.chip.green { background: var(--green-soft); color: var(--green); }
.chip.amber { background: var(--marigold-soft); color: var(--marigold-deep); }
.chip.red { background: var(--red-soft); color: var(--red); }
.chip.paper { background: var(--paper-deep); color: var(--ink-muted); }

/* ---------- program grid ---------- */
.program-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.program-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 18px; transition: transform .18s ease, box-shadow .18s ease;
}
.program-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.program-card h4 { font-size: 15.5px; margin: 0 0 2px; font-family: var(--font-body); font-weight: 700; }
.program-card .p-grades { font-size: 11.5px; font-family: var(--font-data); color: var(--marigold-deep); font-weight: 600; }
.program-card p { font-size: 12.8px; color: var(--ink-muted); margin-top: 6px; line-height: 1.5; }

/* ---------- how-it-works strip ---------- */
.flow-strip { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
@media (max-width: 760px) { .flow-strip { grid-template-columns: minmax(0,1fr); } }
.flow-step { position: relative; padding: 22px 24px; }
.flow-step .f-num {
  font-family: var(--font-data); font-size: 34px;
  color: var(--marigold-deep); font-weight: 600; line-height: 1;
}
.flow-step h4 { font-size: 17px; margin: 10px 0 6px; }
.flow-step p { font-size: 13.5px; color: var(--ink-muted); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 36px 0 60px; }
.footer .foot-note { font-size: 13px; color: var(--ink-muted); max-width: 72ch; }
.footer .foot-note b { color: var(--ink); }
.footer .foot-meta { margin-top: 18px; font-family: var(--font-data); font-size: 11.5px; color: var(--ink-faint); }

/* ---------- privacy banner ---------- */
.privacy-strip {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--marigold-soft); border: 1px solid #EDD9A8;
  border-radius: 14px; padding: 16px 20px; font-size: 13.5px; color: #6B5210;
}
.privacy-strip b { color: #4A3A0C; }

/* ============================================================
   TEACHER / ENCODE / LEARNERS shared app styles
   ============================================================ */
.app-head { padding-top: 40px; padding-bottom: 8px; }
.app-head h1 { font-size: clamp(30px, 5vw, 46px); }
.app-head .sub { color: var(--ink-muted); margin-top: 8px; font-size: 15.5px; max-width: 60ch; }

.select-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 6px; align-items: center; }
.select-pill {
  appearance: none; -webkit-appearance: none;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 99px;
  padding: 10px 38px 10px 16px; font-weight: 700; font-size: 16px; color: var(--ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237A6A5C' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 15px center;
}

/* reading groups board */
.groups-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.group-col { border-radius: 14px; padding: 14px; border: 1px solid var(--line); background: var(--surface); }
.group-col .g-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.group-col .g-dot { width: 13px; height: 13px; border-radius: 4px; }
.group-col h4 { font-size: 15px; font-family: var(--font-body); font-weight: 800; }
.group-col .g-count { margin-left: auto; font-family: var(--font-data); font-size: 12px; color: var(--ink-muted); }
.pupil {
  display: flex; align-items: center; gap: 8px;
  background: var(--paper); border-radius: 9px; padding: 7px 10px; margin-bottom: 6px;
  font-size: 13.5px; font-weight: 600;
}
.pupil .p-init {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: #fff;
}
.pupil .p-flag { margin-left: auto; font-size: 12px; }

.watch-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.watch-item:last-child { border-bottom: none; }
.watch-item .w-name { font-weight: 700; font-size: 14.5px; }
.watch-item .w-why { font-size: 12.5px; color: var(--ink-muted); }
.watch-item .chip { margin-left: auto; flex-shrink: 0; }

/* ---------- encode ---------- */
.encode-bar {
  position: sticky; top: 62px; z-index: 60;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 16px; box-shadow: var(--shadow); margin-bottom: 18px;
}
.encode-bar .e-date {
  font-family: var(--font-data); font-weight: 600; font-size: 16px;
  border: 1.5px solid var(--line); border-radius: 10px; padding: 8px 12px; background: var(--paper);
  color: var(--ink);
}
.encode-bar .e-timer { font-family: var(--font-data); font-size: 13px; color: var(--ink-muted); margin-left: auto; }
.encode-bar .e-timer b { color: var(--green); font-size: 16px; }

.mode-toggle { display: inline-flex; background: var(--paper-deep); border-radius: 99px; padding: 3px; }
.mode-toggle button {
  border: none; background: transparent; border-radius: 99px; padding: 8px 16px;
  font-weight: 700; font-size: 13.5px; color: var(--ink-muted); min-height: 38px;
}
.mode-toggle button.on { background: var(--ink); color: var(--paper); }

.roster { display: grid; gap: 10px; }
.roster-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 16px; transition: border-color .15s ease, background .2s ease;
}
.roster-row.done-p { border-color: #BCD8BF; background: #F4FAF3; }
.roster-row.done-a { border-color: #EBC4C4; background: #FCF4F2; }
.roster-row .r-name { font-weight: 700; font-size: 15px; min-width: 0; }
.roster-row .r-meta { font-size: 12px; color: var(--ink-muted); font-family: var(--font-data); }
.roster-row .r-actions { margin-left: auto; display: flex; gap: 8px; }
.att-btn {
  min-width: 52px; min-height: 44px; border-radius: 12px; border: 1.5px solid var(--line);
  background: var(--paper); font-weight: 800; font-size: 13px; color: var(--ink-muted);
  transition: all .13s ease;
}
.att-btn:active { transform: scale(0.94); }
.att-btn.sel-p { background: var(--green); border-color: var(--green); color: #fff; }
.att-btn.sel-l { background: var(--marigold); border-color: var(--marigold); color: var(--ink); }
.att-btn.sel-a { background: var(--red); border-color: var(--red); color: #fff; }

.level-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.level-chip {
  border: 1.5px solid var(--line); background: var(--paper); border-radius: 10px;
  min-height: 44px; padding: 6px 12px; font-weight: 700; font-size: 13px; color: var(--ink-muted);
  transition: all .13s ease;
}
.level-chip.sel { color: #fff; }

.encode-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 20px; }
.progress-note { font-size: 13.5px; color: var(--ink-muted); }

/* success overlay */
.success-overlay {
  position: fixed; inset: 0; z-index: 400; display: none;
  align-items: center; justify-content: center; padding: 20px;
  background: color-mix(in srgb, var(--ink) 45%, transparent);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.success-overlay.open { display: flex; }
.success-card {
  background: var(--surface); border-radius: 22px; max-width: 480px; width: 100%;
  padding: 36px 32px; text-align: center; box-shadow: var(--shadow-lift);
  animation: pop .45s cubic-bezier(.2,1.4,.4,1);
}
@keyframes pop { from { transform: scale(.85); opacity: 0; } }
.success-card h3 { font-size: 26px; margin: 0 0 8px; }
.success-card p { color: var(--ink-muted); font-size: 14.5px; }
.success-card .btn { margin-top: 20px; }

/* ---------- learners (private layer) ---------- */
.gate {
  position: relative; border-radius: var(--radius); overflow: hidden;
}
.gate .gate-blur { filter: blur(9px) saturate(.8); pointer-events: none; user-select: none; }
.gate-blur .card { pointer-events: none; }
.gate .gate-cover {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px; text-align: center;
  background: color-mix(in srgb, var(--paper) 55%, transparent); padding: 24px;
}
.gate .gate-cover h3 { font-size: 24px; }
.gate .gate-cover p { color: var(--ink-muted); font-size: 14px; max-width: 44ch; }

.search-input {
  width: 100%; border: 1.5px solid var(--line); border-radius: 14px;
  background: var(--surface); padding: 13px 18px; font-size: 16px; font-weight: 600;
  color: var(--ink); font-family: var(--font-body);
}
.search-input:focus { outline: 2px solid var(--marigold); border-color: transparent; }

.student-list { max-height: 420px; overflow-y: auto; }
.list-empty { padding: 22px 6px; font-size: 14px; color: var(--ink-muted); }
.student-row {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: transparent; border: none; border-bottom: 1px solid var(--line);
  padding: 11px 6px; font-size: 14px; font-weight: 600; color: var(--ink);
  min-height: 44px;
}
.student-row:hover { background: var(--paper-deep); }
.student-row.sel { background: var(--marigold-soft); }
.student-row .s-meta { margin-left: auto; font-family: var(--font-data); font-size: 11.5px; color: var(--ink-muted); text-align: right; }

.s360 .s-name { font-size: 28px; }
.s360 .s-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 20px; }
.journey-steps { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 8px 0 4px; }
.journey-node {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 700; color: var(--ink-muted); min-width: 64px;
}
.journey-node .j-dot {
  width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center;
  justify-content: center; color: #FFF3E0; font-weight: 800; font-size: 12px;
}
.journey-arrow { color: var(--ink-faint); font-size: 17px; }

.audit-note {
  font-family: var(--font-data); font-size: 11.5px; color: var(--ink-faint);
  border-top: 1px dashed var(--line); margin-top: 20px; padding-top: 12px;
}

/* ---------- comparison table ---------- */
.mini-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.mini-table th { text-align: left; font-family: var(--font-data); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-muted); padding: 8px 10px; border-bottom: 2px solid var(--line); }
.mini-table td { padding: 10px; border-bottom: 1px solid var(--line); font-weight: 600; }
.mini-table td.num-cell { font-family: var(--font-data); }
.mini-table tr:last-child td { border-bottom: none; }
@media (max-width: 640px) { .mini-table th, .mini-table td { padding: 8px 6px; font-size: 12.5px; } }
.table-scroll { overflow-x: auto; }

/* inputs on mobile: no iOS zoom */
@media (max-width: 768px) {
  input, textarea, select { font-size: 16px; }
}
