/* ============================================================
   Trainexus Lernkurs — main.css
   Iteration 3 · Product-UI idiom (per design-taste-frontend skill)
   - Zinc neutrals, single accent (burnt sienna), no serif anywhere
   - Top bar with real progress, asymmetric hero with chapter preview pane
   - Tabbed three-prompts, filtered showcase list (no 3-card cliché)
   ============================================================ */

/* Geist single-family, multiple weights */
@font-face { font-family:'Geist'; font-weight:300; font-display:swap; src:url(../fonts/geist-4.woff2) format('woff2'); unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2212,U+FEFF,U+FFFD; }
@font-face { font-family:'Geist'; font-weight:400; font-display:swap; src:url(../fonts/geist-4.woff2) format('woff2'); unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2212,U+FEFF,U+FFFD; }
@font-face { font-family:'Geist'; font-weight:500; font-display:swap; src:url(../fonts/geist-4.woff2) format('woff2'); unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2212,U+FEFF,U+FFFD; }
@font-face { font-family:'Geist'; font-weight:600; font-display:swap; src:url(../fonts/geist-4.woff2) format('woff2'); unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2212,U+FEFF,U+FFFD; }
@font-face { font-family:'Geist'; font-weight:700; font-display:swap; src:url(../fonts/geist-4.woff2) format('woff2'); unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2212,U+FEFF,U+FFFD; }
@font-face { font-family:'Geist'; font-weight:800; font-display:swap; src:url(../fonts/geist-4.woff2) format('woff2'); unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2212,U+FEFF,U+FFFD; }

:root {
  /* Cool Zinc neutrals */
  --canvas:       oklch(98.5% 0.003 250);
  --surface:      oklch(100% 0 0);
  --surface-2:    oklch(96.5% 0.004 250);
  --surface-3:    oklch(94% 0.006 250);
  --line:         oklch(89% 0.008 250);
  --line-strong:  oklch(78% 0.012 250);
  --line-stronger:oklch(62% 0.015 250);

  --ink:          oklch(18% 0.008 250);
  --ink-mid:      oklch(35% 0.008 250);
  --ink-dim:      oklch(50% 0.008 250);
  --ink-faint:    oklch(65% 0.010 250);

  /* Single accent: burnt sienna (NOT AI blue, NOT AI purple) */
  --accent:       oklch(55% 0.14 45);
  --accent-deep:  oklch(46% 0.16 40);
  --accent-bg:    oklch(55% 0.14 45 / 0.10);
  --accent-bg-2:  oklch(55% 0.14 45 / 0.04);
  --accent-line:  oklch(55% 0.14 45 / 0.30);

  /* Functional status */
  --ok:           oklch(55% 0.13 152);
  --ok-bg:        oklch(55% 0.13 152 / 0.10);
  --warn:         oklch(72% 0.13 80);
  --err:          oklch(58% 0.20 25);

  /* Domain tones (used as small dots/marks only) */
  --c-role:       oklch(48% 0.16 290);
  --c-behavior:   oklch(58% 0.14 70);
  --c-reaction:   oklch(50% 0.13 165);
  --c-flow:       oklch(50% 0.14 230);

  /* Typography — Geist only (no serif anywhere) */
  --font-body:    'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono:    ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --r-xs:   4px;
  --r-sm:   6px;
  --r-md:   10px;
  --r-lg:   14px;
  --r-xl:   20px;

  /* Type scale — restrained, no oversized H1 */
  --t-xs:    clamp(0.74rem, 0.72rem + 0.10vw, 0.80rem);
  --t-sm:    clamp(0.84rem, 0.82rem + 0.12vw, 0.92rem);
  --t-base:  clamp(0.98rem, 0.96rem + 0.18vw, 1.06rem);
  --t-md:    clamp(1.08rem, 1.04rem + 0.20vw, 1.18rem);
  --t-lg:    clamp(1.24rem, 1.16rem + 0.40vw, 1.46rem);
  --t-xl:    clamp(1.56rem, 1.40rem + 0.80vw, 2.10rem);
  --t-2xl:   clamp(2.00rem, 1.60rem + 2.00vw, 2.95rem);
  --t-3xl:   clamp(2.40rem, 1.80rem + 3.00vw, 3.80rem);  /* hero: controlled, not screaming */

  --ease:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-q:  cubic-bezier(0.22, 1, 0.36, 1);

  --gutter:  clamp(20px, 4vw, 56px);
  --max-w:   1400px;
  --topbar-h: 56px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--t-base);
  line-height: 1.55;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent-bg); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
strong { font-weight: 600; color: var(--ink); }

.skip-link {
  position: absolute; top: -40px; left: 12px; z-index: 100;
  background: var(--ink); color: var(--canvas);
  padding: 8px 14px; border-radius: var(--r-sm);
  font-size: var(--t-xs); font-weight: 500;
}
.skip-link:focus { top: 12px; }

.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gutter); }

/* === Top Bar: real product chrome with progress === */
.topbar {
  position: sticky; top: 0; z-index: 40;
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  height: 100%; display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center; gap: 20px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: var(--t-sm); letter-spacing: -0.01em;
  color: var(--ink);
}
.brand-mark {
  width: 26px; height: 26px; border-radius: var(--r-xs);
  background: var(--ink); color: var(--canvas);
  display: grid; place-items: center;
  font-size: 11px; font-weight: 800; letter-spacing: -0.04em;
}
.brand-sub {
  font-weight: 400; color: var(--ink-faint); font-size: var(--t-xs);
  padding-left: 10px; border-left: 1px solid var(--line); margin-left: 2px;
}
.progress {
  display: flex; align-items: center; gap: 10px;
  font-size: var(--t-xs); color: var(--ink-faint);
  min-width: 0;
}
.progress-meta { white-space: nowrap; font-variant-numeric: tabular-nums; }
.progress-meta strong { color: var(--ink); font-weight: 600; font-size: var(--t-sm); }
.progress-track {
  flex: 1; min-width: 0; max-width: 260px;
  height: 4px; background: var(--surface-3); border-radius: 2px; overflow: hidden;
  position: relative;
}
.progress-fill {
  height: 100%; width: 0%; background: var(--accent);
  transition: width 600ms var(--ease-q);
  border-radius: 2px;
}
.topbar .meta-sep { width: 1px; height: 20px; background: var(--line); }
.topbar-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: var(--r-sm);
  background: var(--ink); color: var(--canvas);
  font-size: var(--t-sm); font-weight: 500;
  transition: background 200ms var(--ease), transform 120ms var(--ease);
}
.topbar-cta:hover { background: var(--accent); }
.topbar-cta:active { transform: translateY(1px); }
.topbar-cta svg { width: 14px; height: 14px; stroke-width: 1.8; }

/* === Hero: Intel-shaped — left text, right big product mockup === */
.hero { padding: clamp(48px, 7vw, 96px) 0 clamp(48px, 7vw, 80px); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 5vw, 80px);
  align-items: center;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: var(--t-xs); font-weight: 500;
  color: var(--ink-mid);
  padding: 5px 10px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line);
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
}

.hero h1 {
  margin: 24px 0 20px;
  font-size: var(--t-3xl);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.030em;
  color: var(--ink);
  max-width: 18ch;
  text-wrap: balance;
}
.hero h1 .accent { color: var(--accent); font-weight: 800; }

.hero .lead {
  margin: 0 0 28px;
  font-size: var(--t-lg);
  line-height: 1.5;
  color: var(--ink-mid);
  max-width: 56ch;
}
.hero .lead strong { color: var(--ink); font-weight: 500; }

/* Email entry — inline, app-form-style (label above input) */
.entry {
  display: grid; gap: 8px;
  max-width: 460px;
  margin-bottom: 24px;
  scroll-margin-top: 80px;
}
.entry label {
  font-size: var(--t-xs); font-weight: 500; color: var(--ink-mid);
}
.entry .row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}
.entry input {
  width: 100%;
  height: 44px;
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-sm);
  padding: 0 14px;
  font: inherit; font-size: var(--t-base);
  color: var(--ink);
  transition: border-color 140ms var(--ease), box-shadow 140ms var(--ease);
}
.entry input::placeholder { color: var(--ink-faint); }
.entry input:focus { outline: 0; border-color: var(--ink); box-shadow: 0 0 0 3px var(--accent-bg); }
.entry button {
  height: 44px;
  padding: 0 22px;
  background: var(--ink);
  color: var(--canvas);
  border-radius: var(--r-sm);
  font-weight: 500; font-size: var(--t-base);
  transition: background 200ms var(--ease), transform 120ms var(--ease);
}
.entry button:hover { background: var(--accent); }
.entry button:active { transform: translateY(1px); }
.entry .help {
  font-size: var(--t-xs); color: var(--ink-faint); margin-top: 2px;
}

/* === Welcome banner (logged-in landing) === */
.entry-welcome {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 20px 22px;
  display: flex; flex-direction: column; gap: 14px;
  max-width: 460px;
  scroll-margin-top: 80px;
}
.entry-welcome .welcome-hd { display: flex; flex-direction: column; gap: 4px; }
.entry-welcome .welcome-eyebrow {
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-faint); font-weight: 500;
}
.entry-welcome .welcome-hd strong {
  font-size: var(--t-md); font-weight: 600; color: var(--ink);
  letter-spacing: -0.012em;
}
.entry-welcome .welcome-prog {
  margin: 0;
  font-size: var(--t-sm); color: var(--ink-mid); line-height: 1.5;
}
.entry-welcome .welcome-prog strong { color: var(--ink); font-weight: 600; }
.entry-welcome .welcome-cta {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px;
  background: var(--ink); color: var(--canvas);
  border-radius: var(--r-sm);
  font-weight: 500; font-size: var(--t-sm);
  align-self: flex-start;
  transition: background 140ms var(--ease), transform 120ms var(--ease);
}
.entry-welcome .welcome-cta:hover { background: var(--accent); }
.entry-welcome .welcome-cta:active { transform: translateY(1px); }
.entry-welcome .welcome-cta svg { width: 14px; height: 14px; stroke-width: 1.8; flex-shrink: 0; }

/* User pill + ghost logout in topbar (logged-in state) */
.user-pill {
  font-size: var(--t-xs); color: var(--ink-mid);
  padding: 6px 12px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line);
  font-weight: 500;
}
.topbar-cta-ghost {
  background: var(--surface) !important; color: var(--ink-mid) !important;
  border: 1px solid var(--line);
}
.topbar-cta-ghost:hover { color: var(--ink) !important; border-color: var(--line-stronger); background: var(--surface-2) !important; }

/* === Hero meta line (slim, replaces the older 4-cell stats grid) === */
.hero-meta-line {
  margin: 28px 0 0;
  font-family: var(--font-mono);
  font-size: var(--t-sm);
  color: var(--ink-mid);
  letter-spacing: 0.02em;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* Hero stats row (legacy: variant-cube.html archive still uses this) */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-top: 32px;
}
.hero-stats > div {
  padding: 14px 22px;
  border-right: 1px solid var(--line);
}
.hero-stats > div:first-child { padding-left: 0; }
.hero-stats > div:last-child  { border-right: 0; padding-right: 0; }
.hero-stats .k {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-faint); font-weight: 500; margin-bottom: 4px;
}
.hero-stats .v {
  font-size: var(--t-md); color: var(--ink); font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* === Hero right: Big app mockup (Apple/Intel style "show the product") === */
.mockup {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow:
    0 1px 0 var(--surface-2) inset,
    0 40px 80px -32px oklch(20% 0.02 250 / 0.18),
    0 16px 32px -16px oklch(20% 0.02 250 / 0.08);
  overflow: hidden;
  position: relative;
}
.mockup-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.mockup-bar .dots { display: flex; gap: 6px; }
.mockup-bar .dots span {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--line-stronger);
}
.mockup-bar .url {
  flex: 1; padding: 4px 12px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-family: var(--font-mono); font-size: 11px;
  color: var(--ink-faint); letter-spacing: 0.02em;
  text-align: center;
}
.mockup-bar .url .scheme { color: var(--ok); margin-right: 4px; }
.mockup-bar .live-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 500;
  color: var(--ok); padding: 3px 8px; border-radius: 999px;
  background: var(--ok-bg);
  border: 1px solid oklch(55% 0.13 152 / 0.30);
  letter-spacing: 0.02em;
}
.mockup-bar .live-pill::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: var(--ok);
  animation: live-pulse 1.8s ease-in-out infinite;
}
@keyframes live-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.mockup-app {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 280px);
  min-height: 460px;
}
.mockup-main {
  padding: 22px 24px;
  display: flex; flex-direction: column;
  border-right: 1px solid var(--line);
}
.mockup-aside {
  padding: 22px 22px;
  background: var(--surface-2);
  display: flex; flex-direction: column; gap: 16px;
}

/* Avatar header inside mockup */
.mockup-avatar {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 14px; align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.mockup-avatar .pic {
  width: 56px; height: 56px; border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, oklch(85% 0.05 50) 0%, oklch(60% 0.08 50) 60%, oklch(45% 0.10 40) 100%);
  position: relative;
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 2px var(--accent);
}
.mockup-avatar .pic::after {
  content: '';
  position: absolute; bottom: 0; right: 0;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--ok); border: 2.5px solid var(--surface);
}
.mockup-avatar .role-name {
  font-size: var(--t-base); font-weight: 600; color: var(--ink);
  letter-spacing: -0.012em; margin: 0 0 2px;
}
.mockup-avatar .role-sub {
  font-size: var(--t-xs); color: var(--ink-faint);
  display: flex; gap: 8px; align-items: center;
}
.mockup-avatar .role-sub .sep { color: var(--line-strong); }
.mockup-avatar .timer {
  font-family: var(--font-mono);
  font-size: 11px; color: var(--ink-mid);
  padding: 5px 10px; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: var(--r-xs);
  font-variant-numeric: tabular-nums; font-weight: 500;
}

/* Transcript */
.transcript {
  flex: 1;
  padding: 18px 0 12px;
  display: flex; flex-direction: column; gap: 14px;
  overflow: hidden;
}
.msg { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; }
.msg .who {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 600;
  color: var(--ink-mid);
  background: var(--surface-2); border: 1px solid var(--line);
}
.msg.avatar .who {
  background: oklch(55% 0.14 45 / 0.12); color: var(--accent-deep); border-color: var(--accent-line);
}
.msg.user .who { background: var(--surface-2); color: var(--ink-mid); }
.msg .name {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink-faint); font-weight: 500; margin-bottom: 4px;
}
.msg .name strong { color: var(--ink-mid); font-weight: 600; text-transform: none; letter-spacing: 0; font-size: var(--t-xs); }
.msg .bubble {
  font-size: var(--t-sm); color: var(--ink); line-height: 1.5;
  background: var(--surface-2);
  padding: 9px 12px; border-radius: var(--r-md);
  border: 1px solid var(--line);
  max-width: 92%;
}
.msg.avatar .bubble { background: oklch(55% 0.14 45 / 0.05); border-color: var(--accent-line); }

.transcript-input {
  margin-top: auto;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.transcript-input .mic {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); display: grid; place-items: center;
  color: var(--canvas); font-size: 13px;
  position: relative;
}
.transcript-input .mic::before, .transcript-input .mic::after {
  content: ''; position: absolute; border-radius: 50%; border: 2px solid var(--accent);
  opacity: 0; animation: mic-ring 2.4s ease-out infinite;
}
.transcript-input .mic::before { inset: -4px; }
.transcript-input .mic::after { inset: -10px; animation-delay: 0.8s; }
@keyframes mic-ring {
  0% { opacity: 0.5; transform: scale(0.8); }
  100% { opacity: 0; transform: scale(1.3); }
}
.transcript-input .label {
  font-size: var(--t-sm); color: var(--ink-mid);
}
.transcript-input .label strong { color: var(--ink); font-weight: 500; }

/* Feedback panel */
.feedback-block {
  display: flex; flex-direction: column; gap: 14px;
}
.feedback-block .hd {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.10em;
  color: var(--ink-faint); font-weight: 500;
  display: flex; align-items: center; justify-content: space-between;
}
.feedback-block .hd .stat {
  font-family: var(--font-mono); color: var(--ok); font-weight: 600;
  background: var(--ok-bg); padding: 2px 8px; border-radius: var(--r-xs);
  font-size: 10px; letter-spacing: 0;
}
.score-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--line);
}
.score-row:last-child { border-bottom: 0; }
.score-row .lbl {
  font-size: var(--t-xs); color: var(--ink-mid);
}
.score-row .val {
  font-family: var(--font-mono); font-size: var(--t-xs);
  color: var(--ink); font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.score-row .bar {
  grid-column: 1 / -1;
  height: 4px; background: var(--surface-3); border-radius: 2px;
  position: relative; overflow: hidden;
}
.score-row .bar::after {
  content: ''; position: absolute; top: 0; left: 0; height: 100%;
  background: var(--accent); border-radius: 2px;
  width: var(--w, 50%);
}

/* Old preview retained for if needed; renamed to avoid collision */
.preview {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow:
    0 1px 0 var(--line) inset,
    0 30px 60px -28px oklch(20% 0.02 250 / 0.12);
  overflow: hidden;
  position: relative;
}
.preview-head {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  font-size: var(--t-xs); color: var(--ink-faint); font-weight: 500;
  letter-spacing: 0;
}
.preview-head .dots { display: flex; gap: 5px; }
.preview-head .dots span {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--line-stronger);
}
.preview-head .title {
  flex: 1; text-align: center;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}
.preview-head .badge {
  font-size: 10px; padding: 3px 8px; border-radius: 999px;
  background: var(--ok-bg); color: var(--ok); font-weight: 500;
  border: 1px solid oklch(55% 0.13 152 / 0.25);
}
.preview-body { padding: 8px; }
.chapter-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 12px; align-items: center;
  padding: 11px 12px; border-radius: var(--r-sm);
  transition: background 140ms var(--ease);
  cursor: pointer;
}
.chapter-row:hover { background: var(--surface-2); }
.chapter-row.active { background: var(--accent-bg-2); border: 1px solid var(--accent-line); padding: 10px 11px; }
.chapter-row .nr {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  color: var(--ink-faint); text-align: right;
  font-variant-numeric: tabular-nums;
}
.chapter-row.active .nr { color: var(--accent); }
.chapter-row .name {
  font-size: var(--t-sm); color: var(--ink); font-weight: 500;
  line-height: 1.35;
}
.chapter-row .dur {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}
.chapter-row.active .name { color: var(--ink); font-weight: 600; }
.chapter-row.done .nr { color: var(--ok); }
.chapter-row.done .name { color: var(--ink-mid); }
.preview-foot {
  border-top: 1px solid var(--line);
  padding: 12px 16px;
  display: flex; justify-content: space-between; align-items: center;
  background: var(--surface-2);
  font-size: var(--t-xs); color: var(--ink-faint);
}
.preview-foot .label { font-weight: 500; }
.preview-foot .pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 8px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  color: var(--ink-mid); font-weight: 500;
}
.preview-foot .pill .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

/* === Section base === */
.section {
  padding: clamp(60px, 8vw, 100px) 0;
  border-top: 1px solid var(--line);
}
.section-head { margin-bottom: clamp(32px, 5vh, 56px); max-width: 64ch; }
.section-head .kicker {
  font-size: var(--t-xs); font-weight: 500;
  color: var(--accent);
  margin-bottom: 12px;
  display: inline-flex; align-items: center; gap: 8px;
}
.section-head .kicker::before {
  content: ''; width: 14px; height: 1px; background: var(--accent);
}
.section-head h2 {
  margin: 0 0 14px;
  font-size: var(--t-2xl); font-weight: 700;
  line-height: 1.10; letter-spacing: -0.025em;
  color: var(--ink); text-wrap: balance;
}
.section-head .lede {
  margin: 0; font-size: var(--t-lg); color: var(--ink-mid);
  line-height: 1.5; max-width: 60ch;
}

/* === Anatomy: editor-style panel with sidebar legend === */
.anatomy {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr);
  gap: clamp(20px, 3vw, 32px);
  align-items: stretch;
}
.editor {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.editor-head {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.editor-tabs {
  display: flex; gap: 4px;
}
.editor-tabs button {
  padding: 4px 10px; border-radius: var(--r-xs);
  font-size: var(--t-xs); font-weight: 500;
  color: var(--ink-faint);
  font-family: var(--font-mono);
}
.editor-tabs button.active {
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line);
}
.editor-meta {
  margin-left: auto;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}
.editor-body {
  padding: clamp(24px, 3vw, 36px);
  font-size: var(--t-md);
  line-height: 1.85;
  color: var(--ink);
  flex: 1;
}
.editor-body .tok {
  background: var(--accent-bg-2);
  border-bottom: 2px solid var(--accent);
  padding: 2px 4px; border-radius: 2px;
  cursor: help;
  transition: background 140ms var(--ease);
}
.editor-body .tok[data-type="role"]     { background: oklch(48% 0.16 290 / 0.10); border-color: var(--c-role); }
.editor-body .tok[data-type="behavior"] { background: oklch(58% 0.14 70 / 0.12); border-color: var(--c-behavior); }
.editor-body .tok[data-type="reaction"] { background: oklch(50% 0.13 165 / 0.10); border-color: var(--c-reaction); }
.editor-body .tok[data-type="flow"]     { background: oklch(50% 0.14 230 / 0.10); border-color: var(--c-flow); }
.editor-body .tok[data-type="role"]:hover     { background: oklch(48% 0.16 290 / 0.20); }
.editor-body .tok[data-type="behavior"]:hover { background: oklch(58% 0.14 70 / 0.22); }
.editor-body .tok[data-type="reaction"]:hover { background: oklch(50% 0.13 165 / 0.20); }
.editor-body .tok[data-type="flow"]:hover     { background: oklch(50% 0.14 230 / 0.20); }

.editor-foot {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  font-family: var(--font-mono); font-size: 11px;
  color: var(--ink-faint);
}
.editor-foot .live {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ok);
}
.editor-foot .live::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: var(--ok);
}

/* Legend panel */
.legend-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.legend-panel-head {
  padding: 10px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px; color: var(--ink-faint); letter-spacing: 0.06em;
  text-transform: uppercase; font-weight: 500;
}
.legend-list {
  list-style: none; margin: 0; padding: 0;
}
.legend-list li {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 12px; align-items: start;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.legend-list li:last-child { border-bottom: 0; }
.legend-list .mark {
  margin-top: 6px;
  width: 10px; height: 10px; border-radius: 2px;
  background: var(--c-role);
}
.legend-list li[data-type="behavior"] .mark { background: var(--c-behavior); }
.legend-list li[data-type="reaction"] .mark { background: var(--c-reaction); }
.legend-list li[data-type="flow"] .mark     { background: var(--c-flow); }
.legend-list h4 {
  margin: 0 0 4px;
  font-size: var(--t-sm); font-weight: 600; color: var(--ink);
  letter-spacing: -0.01em;
}
.legend-list p { margin: 0; font-size: var(--t-xs); color: var(--ink-mid); line-height: 1.5; }

/* === Three-Prompts: TABS (not 3 cards) === */
.tabs {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.tabs-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.tabs-bar button {
  text-align: left;
  padding: 18px 22px;
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 4px;
  transition: background 140ms var(--ease);
  position: relative;
}
.tabs-bar button:last-child { border-right: 0; }
.tabs-bar button:hover { background: var(--surface-3); }
.tabs-bar button.active { background: var(--surface); }
.tabs-bar button.active::after {
  content: ''; position: absolute; bottom: -1px; left: 0; right: 0;
  height: 2px; background: var(--accent);
}
.tabs-bar .kicker {
  font-size: 10px; letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--ink-faint); font-weight: 500;
  display: flex; align-items: center; gap: 6px;
}
.tabs-bar .kicker .glyph {
  width: 7px; height: 7px; border-radius: 2px; background: var(--c-role);
}
.tabs-bar button[data-tab="formative"] .glyph { background: var(--c-behavior); }
.tabs-bar button[data-tab="summative"] .glyph { background: var(--c-reaction); }
.tabs-bar .name {
  font-size: var(--t-md); font-weight: 600; color: var(--ink);
  letter-spacing: -0.012em;
}
.tabs-body { padding: clamp(28px, 3vw, 40px); }
.tabs-pane { display: none; }
.tabs-pane.active { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.tabs-pane .desc h3 {
  margin: 0 0 14px;
  font-size: var(--t-xl); font-weight: 700; letter-spacing: -0.022em;
  color: var(--ink);
}
.tabs-pane .desc p { margin: 0 0 18px; color: var(--ink-mid); font-size: var(--t-base); line-height: 1.6; max-width: 50ch; }
.tabs-pane .desc .when {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px; border-radius: 999px;
  background: var(--accent-bg-2); color: var(--accent-deep);
  font-size: var(--t-xs); font-weight: 500;
}
.tabs-pane .desc .when::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.tabs-pane .sample {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px 20px;
  font-size: var(--t-sm);
  color: var(--ink);
  line-height: 1.6;
}
.tabs-pane .sample .label {
  font-family: var(--font-mono);
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.10em;
  color: var(--ink-faint); font-weight: 500; margin-bottom: 8px;
}
.tabs-pane .sample blockquote {
  margin: 0; padding-left: 12px; border-left: 2px solid var(--line-strong);
  color: var(--ink-mid);
}

/* === Showcase: list with filter chips at top === */
.filters {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 20px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  align-items: center;
}
.filters .lbl {
  font-size: var(--t-xs); font-weight: 500; color: var(--ink-faint);
  letter-spacing: 0;
  margin-right: 4px;
}
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: var(--t-xs); font-weight: 500;
  color: var(--ink-mid);
  transition: background 140ms var(--ease), border-color 140ms var(--ease), color 140ms var(--ease);
  cursor: pointer;
}
.chip:hover { background: var(--surface-2); color: var(--ink); }
.chip.active { background: var(--ink); color: var(--canvas); border-color: var(--ink); }
.chip .count {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--ink-faint); padding-left: 4px;
  border-left: 1px solid var(--line); margin-left: 2px;
  font-weight: 500;
}
.chip.active .count { color: var(--canvas); border-color: oklch(40% 0.005 250); opacity: 0.7; }

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.scen {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 16px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  align-items: center;
  transition: border-color 140ms var(--ease), background 140ms var(--ease), transform 120ms var(--ease);
  cursor: pointer;
}
.scen:hover { border-color: var(--line-stronger); background: var(--surface); }
.scen:active { transform: translateY(1px); }
.scen .glyph {
  width: 44px; height: 44px; border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  font-family: var(--font-mono); font-weight: 600; font-size: 11px;
  color: var(--ink-mid); letter-spacing: 0.04em;
}
.scen[data-domain="medizin"] .glyph    { background: oklch(50% 0.16 25 / 0.08); border-color: oklch(50% 0.16 25 / 0.30); color: oklch(40% 0.18 25); }
.scen[data-domain="recht"] .glyph      { background: oklch(45% 0.15 275 / 0.08); border-color: oklch(45% 0.15 275 / 0.30); color: oklch(38% 0.18 275); }
.scen[data-domain="verwaltung"] .glyph { background: oklch(50% 0.14 80 / 0.08); border-color: oklch(50% 0.14 80 / 0.30); color: oklch(40% 0.16 75); }
.scen[data-domain="sprachen"] .glyph   { background: oklch(48% 0.16 145 / 0.08); border-color: oklch(48% 0.16 145 / 0.30); color: oklch(40% 0.18 145); }
.scen[data-domain="wirtschaft"] .glyph { background: oklch(55% 0.14 50 / 0.08); border-color: oklch(55% 0.14 50 / 0.30); color: oklch(45% 0.16 45); }
.scen[data-domain="coaching"] .glyph   { background: oklch(48% 0.14 175 / 0.08); border-color: oklch(48% 0.14 175 / 0.30); color: oklch(38% 0.16 175); }
.scen[data-domain="schule"] .glyph     { background: oklch(50% 0.16 310 / 0.08); border-color: oklch(50% 0.16 310 / 0.30); color: oklch(40% 0.18 310); }
.scen[data-domain="industrie"] .glyph  { background: var(--surface-3); border-color: var(--line-strong); color: var(--ink-mid); }
.scen .info { min-width: 0; }
.scen .title {
  font-size: var(--t-base); font-weight: 600; color: var(--ink);
  letter-spacing: -0.012em; margin: 0 0 4px;
  line-height: 1.3;
}
.scen .meta {
  font-size: var(--t-xs); color: var(--ink-faint);
  display: flex; gap: 8px; flex-wrap: wrap;
}
.scen .meta .inst { color: var(--ink-mid); font-weight: 500; }
.scen .meta .sep { color: var(--line-stronger); }
.scen .tail {
  display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
  font-family: var(--font-mono); font-size: 10px;
  color: var(--ink-faint); letter-spacing: 0.04em;
}
.scen .lang {
  padding: 3px 7px; border-radius: var(--r-xs);
  background: var(--surface-2); color: var(--ink-mid);
  border: 1px solid var(--line);
  font-weight: 500;
}

/* === Curriculum (full chapter list) — same product idiom but bigger === */
.curriculum {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.cur-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 16px; align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  transition: background 140ms var(--ease);
  cursor: pointer;
  color: inherit;
  text-decoration: none;
}
.cur-row.done .body h3 { color: var(--ink-mid); }
.cur-row.done .nr { color: var(--ok); }
.cur-row:last-child { border-bottom: 0; }
.cur-row:hover { background: var(--surface-2); }
.cur-row .nr {
  font-family: var(--font-mono); font-size: var(--t-sm); font-weight: 600;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}
.cur-row .body h3 {
  margin: 0 0 4px;
  font-size: var(--t-md); font-weight: 600; color: var(--ink);
  letter-spacing: -0.014em;
}
.cur-row .body p { margin: 0; font-size: var(--t-sm); color: var(--ink-mid); line-height: 1.5; max-width: 64ch; }
.cur-row .tail {
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
  font-family: var(--font-mono); font-size: var(--t-xs);
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}
.cur-row .tail .dur { color: var(--ink-mid); font-weight: 500; }

/* === Pathways: two real action panels === */
.pathways {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.path {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(24px, 3vw, 36px);
  transition: border-color 140ms var(--ease), box-shadow 140ms var(--ease), transform 120ms var(--ease);
  cursor: pointer;
  display: flex; flex-direction: column;
}
.path:hover {
  border-color: var(--line-stronger);
  box-shadow: 0 20px 40px -24px oklch(20% 0.02 250 / 0.10);
}
.path:active { transform: translateY(1px); }
.path[data-invite="1"] {
  background: var(--accent-bg-2);
  border-color: var(--accent-line);
}
.path[data-invite="1"]:hover { border-color: var(--accent); }
.path[data-invite="1"] .step { color: var(--accent-deep); }
.path[data-invite="1"] .step::before { background: var(--accent); }
.path[data-invite="1"] .go { background: var(--accent); color: var(--canvas); border-color: var(--accent); }
.path[data-invite="1"] .go:hover { background: var(--accent-deep); }
.path .step {
  font-size: var(--t-xs); font-weight: 500;
  color: var(--accent); margin-bottom: 12px;
  display: inline-flex; align-items: center; gap: 8px;
}
.path .step::before {
  content: ''; width: 14px; height: 1px; background: var(--accent);
}
.path h3 {
  margin: 0 0 10px;
  font-size: var(--t-xl); font-weight: 700; letter-spacing: -0.022em; color: var(--ink);
}
.path p {
  margin: 0 0 24px; color: var(--ink-mid); font-size: var(--t-sm); line-height: 1.55; max-width: 48ch;
  flex: 1;
}
.path .go {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  background: var(--ink); color: var(--canvas);
  border-radius: var(--r-sm);
  font-size: var(--t-sm); font-weight: 500;
  transition: background 140ms var(--ease);
  align-self: flex-start;
}
.path:hover .go { background: var(--accent); }
.path .go svg { width: 14px; height: 14px; stroke-width: 1.8; }

/* === Footer === */
footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 28px 0;
  font-size: var(--t-xs);
  color: var(--ink-faint);
}
.foot { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot a { color: var(--ink-mid); }
.foot a:hover { color: var(--accent); }
.foot .legal-link {
  display: inline; padding: 0; background: none; border: 0;
  font: inherit; letter-spacing: inherit;
  color: var(--ink-mid); cursor: pointer;
  text-decoration: none;
  transition: color 140ms var(--ease);
}
.foot .legal-link:hover { color: var(--accent); }
.foot .legal-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

/* === Legal dialogs (Impressum, Datenschutz) === */
.legal-dialog {
  border: 0; padding: 0;
  background: transparent;
  max-width: 640px; width: calc(100% - 32px);
  max-height: calc(100vh - 64px);
  margin: auto;
}
.legal-dialog::backdrop {
  background: oklch(15% 0.02 250 / 0.55);
  backdrop-filter: blur(4px);
}
.legal-dialog-inner {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow:
    0 30px 80px -24px oklch(15% 0.02 250 / 0.40),
    0 12px 28px -16px oklch(15% 0.02 250 / 0.18);
  overflow: hidden;
  display: flex; flex-direction: column;
  max-height: calc(100vh - 64px);
}
.legal-dialog-hd {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  flex-shrink: 0;
}
.legal-dialog-hd h2 {
  margin: 0;
  font-size: var(--t-md); font-weight: 700; letter-spacing: -0.014em;
  color: var(--ink);
}
.legal-close {
  width: 32px; height: 32px;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-mid);
  font-size: 22px; line-height: 1; cursor: pointer;
  display: grid; place-items: center;
  font-weight: 400;
  transition: background 140ms var(--ease), color 140ms var(--ease), border-color 140ms var(--ease);
}
.legal-close:hover {
  background: var(--ink); color: var(--canvas); border-color: var(--ink);
}
.legal-dialog-body {
  padding: 22px 26px 28px;
  overflow-y: auto;
  font-size: var(--t-sm);
  line-height: 1.6;
  color: var(--ink);
}
.legal-dialog-body p { margin: 0 0 14px; }
.legal-dialog-body p:last-child { margin-bottom: 0; }
.legal-dialog-body h3 {
  margin: 22px 0 8px;
  font-size: var(--t-sm); font-weight: 600;
  color: var(--ink); letter-spacing: -0.010em;
}
.legal-dialog-body h3:first-of-type { margin-top: 0; }
.legal-dialog-body strong { color: var(--ink); font-weight: 600; }
.legal-dialog-body a { color: var(--accent); border-bottom: 1px solid var(--accent-line); }
.legal-dialog-body a:hover { border-bottom-color: var(--accent); }

/* === Assistant pill === */
.bot {
  position: fixed; bottom: 20px; right: 20px; z-index: 60;
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink);
  color: var(--canvas);
  border-radius: 999px;
  padding: 10px 16px 10px 12px;
  font-size: var(--t-sm); font-weight: 500;
  box-shadow: 0 20px 40px -16px oklch(20% 0.02 250 / 0.30);
  transition: background 140ms var(--ease), transform 140ms var(--ease);
}
.bot:hover { background: var(--accent); transform: translateY(-1px); }
.bot:active { transform: translateY(0); }
.bot .icon {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); display: grid; place-items: center;
  font-size: 11px; font-weight: 700; color: var(--canvas);
}
.bot:hover .icon { background: var(--ink); }
.bot svg { width: 12px; height: 12px; stroke-width: 2; opacity: 0.6; }

/* === Reveal === */
.reveal { opacity: 0; transform: translateY(10px); animation: rev 600ms var(--ease-q) forwards; }
.reveal.d1 { animation-delay: 80ms; }
.reveal.d2 { animation-delay: 200ms; }
.reveal.d3 { animation-delay: 340ms; }
.reveal.d4 { animation-delay: 480ms; }
@keyframes rev { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Responsive */
@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; align-items: start; }
  .mockup-app { grid-template-columns: 1fr; }
  .mockup-aside { border-top: 1px solid var(--line); }
  .mockup-main { border-right: 0; }
  .anatomy { grid-template-columns: 1fr; }
  .tabs-pane.active { grid-template-columns: 1fr; }
  .showcase-grid { grid-template-columns: 1fr; }
  .pathways { grid-template-columns: 1fr; }
  .progress { display: none; }
}
@media (max-width: 640px) {
  .topbar-inner { grid-template-columns: 1fr auto; }
  .brand-sub { display: none; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-stats > div:nth-child(2) { border-right: 0; }
  .hero-stats > div:nth-child(1),
  .hero-stats > div:nth-child(2) { border-bottom: 1px solid var(--line); }
  .tabs-bar { grid-template-columns: 1fr; }
  .tabs-bar button { border-right: 0; border-bottom: 1px solid var(--line); }
  .tabs-bar button:last-child { border-bottom: 0; }
  .entry .row { grid-template-columns: 1fr; }
  .scen { grid-template-columns: 36px 1fr; }
  .scen .tail { grid-column: 2; grid-row: 2; flex-direction: row; padding-top: 6px; }
}
