/* runwise. — brand tokens
   Bone #F4F2EC · Track Black #0A0C0A · Pulse Cyan #00FFFF · Deep Blue #0A1F5C · Flag Orange #FF5A2C · Paper #FBFAF5
*/
:root {
  --bone: #F4F2EC;
  --black: #0A0C0A;
  --cyan: #00FFFF;
  --cyan-ink: #00CCCC;
  --blue: #0A1F5C;
  --orange: #FF5A2C;
  --paper: #FBFAF5;
  --muted: #6b6b6b;
  --line: rgba(10,12,10,.12);

  --display: 'Archivo Black', system-ui, sans-serif;
  --body: 'Inter Tight', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  --tab-h: 64px;
  --safe-bot: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* fix: voorkomt dat .ib/.ios/.tabbar met display:flex|grid de hidden-attribute overschrijven */
html, body {
  margin: 0; padding: 0;
  background: var(--bone); color: var(--black);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  /* Double-tap-zoom uit (pinch-zoom werkt nog wel — accessibility). */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
body { min-height: 100dvh; }
#app { min-height: 100dvh; padding-bottom: calc(var(--tab-h) + var(--safe-bot)); }
body.no-tabbar #app { padding-bottom: 0; }

/* type */
h1, h2, h3 { font-family: var(--display); font-weight: 900; letter-spacing: -0.045em; line-height: .95; margin: 0; }
h1 { font-size: clamp(40px, 10vw, 72px); }
h2 { font-size: clamp(28px, 6vw, 40px); }
h3 { font-size: 20px; letter-spacing: -0.02em; }
.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
p { line-height: 1.5; }
a { color: inherit; }

/* layout */
.screen { padding: 28px 20px 20px; max-width: 560px; margin: 0 auto; }
.screen-pad-top { padding-top: max(28px, env(safe-area-inset-top)); }
.stack > * + * { margin-top: 14px; }
.row { display: flex; gap: 12px; align-items: center; }
.row.between { justify-content: space-between; }
.hr { height: 1px; background: var(--line); border: 0; margin: 18px 0; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: 1.5px solid var(--black); background: var(--black); color: var(--bone);
  font-family: var(--body); font-weight: 700; font-size: 15px;
  padding: 14px 18px; border-radius: 999px; cursor: pointer; width: 100%;
  transition: transform .04s ease;
}
.btn:active { transform: translateY(1px); }
.btn.ghost {
  background: transparent;
  color: var(--muted);
  border-color: var(--line);
  font-weight: 600;
}
.btn.ghost:hover { color: var(--black); border-color: var(--muted); }
.btn.cyan { background: var(--cyan); color: var(--black); border-color: var(--black); }
.btn.orange { background: var(--orange); color: var(--bone); border-color: var(--orange); }
.btn.strava { background: #FC4C02; color: #fff; border-color: #FC4C02; }
.btn.apple-health { background: linear-gradient(135deg,#ff2d55,#ff5e3a); color: #fff; border-color: #ff2d55; }
.btn.apple-health:hover { filter: brightness(1.05); }
.btn.sm { padding: 10px 14px; font-size: 13px; width: auto; }

/* Lesson-button vult mee tijdens typing animatie: bone → black */
.btn.is-typing-progress {
  background: var(--bone);
  color: var(--black);
  border-color: var(--line);
  animation: rw-btn-fill var(--type-duration, 2000ms) ease-in forwards;
}
@keyframes rw-btn-fill {
  0%   { background: var(--bone);  color: var(--black); border-color: var(--line); }
  100% { background: var(--black); color: var(--bone);  border-color: var(--black); }
}

/* inputs */
.field { display: block; }
.field label { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.field input, .field select {
  width: 100%; padding: 14px 14px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--paper); color: var(--black);
  font-family: var(--body); font-size: 16px;
}
.field input:focus, .field select:focus { outline: 2px solid var(--cyan); outline-offset: 0; border-color: var(--black); }
.error { color: var(--orange); font-size: 13px; margin-top: 8px; }
.info  { color: var(--blue);   font-size: 13px; margin-top: 8px; }

/* card */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.card.dark { background: var(--black); color: var(--bone); border-color: var(--black); }

/* ---------- splash / loader (boot screen) ---------- */
.splash {
  position: fixed; inset: 0; z-index: 200;
  background: var(--bone);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 32px;
  transition: opacity .35s ease, visibility .35s ease;
}
.splash.fade { opacity: 0; visibility: hidden; }
.splash-mark {
  height: 36px; width: auto;
  animation: splash-pulse 1.4s ease-in-out infinite;
}
@keyframes splash-pulse {
  0%, 100% { opacity: .35; transform: scale(.98); }
  50%      { opacity: 1;   transform: scale(1);   }
}
.splash-bar {
  width: 140px; height: 2px;
  background: rgba(10,12,10,.08);
  border-radius: 999px; overflow: hidden;
}
.splash-bar-fill {
  height: 100%; width: 40%;
  background: var(--black);
  border-radius: 999px;
  animation: splash-slide 1.1s ease-in-out infinite;
}
@keyframes splash-slide {
  0%   { transform: translateX(-100%); }
  50%  { transform: translateX(150%);  }
  100% { transform: translateX(-100%); }
}

/* hint-card (subtiele CTA naar profiel als Strava nog niet gekoppeld is) */
.hint-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px;
  background: var(--paper); border: 1px dashed var(--line); border-radius: 14px;
  font-size: 14px; color: var(--muted); cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.hint-card:hover { background: var(--bone); border-color: var(--black); color: var(--black); }
.hint-card b { color: var(--black); font-weight: 600; }

/* kpi tegels */
.kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpi {
  background: var(--black); color: var(--bone);
  border-radius: 18px; padding: 18px 16px;
  display: flex; flex-direction: column; gap: 6px;
  min-height: 110px; justify-content: space-between;
  position: relative; overflow: hidden;
}
.kpi:nth-child(2), .kpi:nth-child(3) {
  background: var(--cyan); color: var(--black);
}
.kpi-num {
  font-family: var(--display); font-weight: 900;
  font-size: clamp(36px, 9vw, 48px); line-height: 1;
  letter-spacing: -.045em;
}
.kpi-lbl {
  font-family: var(--mono); font-size: 10px; letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .65;
}
.kpi:nth-child(2) .kpi-lbl, .kpi:nth-child(3) .kpi-lbl { opacity: .8; color: rgba(10,12,10,.75); }
.kpi-skel {
  display: inline-block; min-width: 1.4em;
  background: rgba(244,242,236,.08); border-radius: 6px;
  color: transparent; animation: kpi-pulse 1.4s ease-in-out infinite;
}
.kpi:nth-child(2) .kpi-skel, .kpi:nth-child(3) .kpi-skel { background: rgba(10,12,10,.08); }
@keyframes kpi-pulse { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }

/* ---------- admin dashboard ---------- */
.admin .kpi-num { font-size: clamp(24px, 6vw, 32px); }
.admin .kpi { min-height: 92px; padding: 14px; }
@media (min-width: 560px) {
  .admin #admin-stats { grid-template-columns: repeat(4, 1fr); }
}
.chart-wrap { position: relative; width: 100%; height: 240px; }
.chart-wrap.chart-sm { height: 200px; }

/* Admin charts grid wrapper — pakt 2 koloms op desktop */
.admin .chart-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

/* Desktop: dashboard breder + KPI's in 4-7 koloms grid + charts naast elkaar */
@media (min-width: 720px) {
  section.admin { max-width: 1200px; padding-left: 32px; padding-right: 32px; }
  .admin .kpi-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .admin .kpi { min-height: 110px; padding: 18px; }
  .admin .kpi-num { font-size: clamp(24px, 2.8vw, 34px); }
  .admin .chart-grid { grid-template-columns: 1fr 1fr; }
  .admin .chart-wrap { height: 300px; }
  .admin .chart-wrap.chart-sm { height: 260px; }
}

@media (min-width: 1100px) {
  .admin .kpi-grid { grid-template-columns: repeat(7, 1fr); }
  .admin .kpi-num { font-size: clamp(20px, 1.8vw, 28px); }
}

/* wordmark logo */
.wordmark { height: 22px; width: auto; display: block; }
.auth-hero .wordmark { height: 26px; }

/* ---------- Ad-free CTA (permanent, linksonder) ---------- */
.adfree-btn {
  position: fixed;
  left: calc(12px + env(safe-area-inset-left, 0px));
  bottom: calc(var(--tab-h) + var(--safe-bot) + 12px);
  z-index: 60;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px 8px 12px;
  background: var(--black); color: var(--bone);
  border: 0; border-radius: 999px;
  font-family: var(--body); font-weight: 700; font-size: 12px;
  letter-spacing: .01em; cursor: pointer;
  box-shadow: 0 8px 22px rgba(10,12,10,.22), 0 0 0 1px rgba(244,242,236,.06) inset;
  transition: transform .08s ease, background .15s ease;
}
.adfree-btn:hover { background: #16181a; }
.adfree-btn:active { transform: translateY(1px); }
.adfree-btn svg { color: var(--cyan); flex: 0 0 14px; }
/* dock laag als tabbar verborgen is (login/signup-pagina’s tonen 'm sowieso niet, maar voor zekerheid) */
body.no-tabbar .adfree-btn { bottom: calc(var(--safe-bot) + 12px); }

/* ---------- install banner (floating chip onderaan) ---------- */
.ib {
  position: fixed; left: 12px; right: 12px;
  bottom: calc(var(--tab-h) + var(--safe-bot) + 12px);
  z-index: 70;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px 10px 10px;
  background: var(--black); color: var(--bone);
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(10,12,10,.22), 0 0 0 1px rgba(244,242,236,.06) inset;
  animation: ib-in .35s cubic-bezier(.2,.8,.2,1);
}
/* als de tabbar verborgen is (login/signup), dock 'm laag */
body.no-tabbar .ib { bottom: calc(var(--safe-bot) + 12px); }

@keyframes ib-in {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.ib-icon {
  width: 40px; height: 40px; flex: 0 0 40px;
  border-radius: 10px; display: block;
}
.ib-copy { flex: 1; min-width: 0; line-height: 1.25; }
.ib-title {
  font-family: var(--body); font-weight: 700; font-size: 14px;
  letter-spacing: -.01em;
}
.ib-sub {
  font-family: var(--mono); font-size: 10px; letter-spacing: .08em;
  text-transform: uppercase; color: rgba(244,242,236,.55);
  margin-top: 2px;
}
.ib-cta {
  background: var(--cyan); color: var(--black); border: 0;
  font-family: var(--body); font-weight: 700; font-size: 13px;
  padding: 9px 14px; border-radius: 999px; cursor: pointer; white-space: nowrap;
}
.ib-cta:active { transform: translateY(1px); }
.ib-close {
  flex: 0 0 28px; width: 28px; height: 28px;
  display: grid; place-items: center;
  background: transparent; border: 0; color: rgba(244,242,236,.55);
  border-radius: 999px; cursor: pointer;
  margin-left: -4px;
}
.ib-close:hover { color: var(--bone); background: rgba(244,242,236,.08); }

/* op smalle telefoons: 2-rij layout */
@media (max-width: 380px) {
  .ib { flex-wrap: wrap; padding: 10px 12px 12px; }
  .ib-copy { flex: 1 1 auto; }
  .ib-cta { order: 3; flex: 1 1 100%; margin-top: 6px; padding: 11px; }
  .ib-close { order: 2; }
}

/* ---------- iOS install modal ---------- */
.ios {
  position: fixed; inset: 0; z-index: 110;
  display: grid; place-items: end center;
  background: rgba(10,12,10,.55);
  backdrop-filter: blur(6px);
  animation: ios-bg .2s ease both;
}
@keyframes ios-bg { from { opacity: 0; } to { opacity: 1; } }

.ios-card {
  position: relative;
  width: 100%; max-width: 440px;
  margin: 0 12px 12px;
  background: var(--paper); color: var(--black);
  border-radius: 22px;
  padding: 22px 22px 20px;
  box-shadow: 0 24px 60px rgba(10,12,10,.35);
  animation: ios-card-in .32s cubic-bezier(.2,.8,.2,1) both;
}
@media (min-width: 560px) {
  .ios { place-items: center; }
  .ios-card { margin: 0; }
}
@keyframes ios-card-in {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.ios-close {
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  background: transparent; border: 0;
  color: var(--muted); cursor: pointer; border-radius: 999px;
}
.ios-close:hover { background: rgba(10,12,10,.06); color: var(--black); }

.ios-icon {
  width: 56px; height: 56px; border-radius: 14px;
  display: block; margin-bottom: 14px;
}
.ios-title {
  font-family: var(--display); font-size: 28px;
  letter-spacing: -.035em; margin: 0 0 4px;
}
.ios-lead { color: var(--muted); font-size: 14px; margin: 0 0 16px; }

.ios-steps {
  list-style: none; padding: 0; margin: 0 0 18px;
  display: flex; flex-direction: column; gap: 10px;
}
.ios-steps li {
  display: flex; gap: 12px; align-items: flex-start;
  font-size: 14px; line-height: 1.45;
}
.ios-num {
  flex: 0 0 22px; height: 22px; border-radius: 999px;
  background: var(--black); color: var(--bone);
  font-family: var(--mono); font-size: 11px;
  display: grid; place-items: center; margin-top: 1px;
}
.ios-share-ico {
  display: inline-block; vertical-align: -3px;
  width: 16px; height: 16px;
  padding: 2px; border: 1px solid var(--line); border-radius: 5px;
  margin: 0 2px;
}

/* tabbar */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0;
  height: calc(var(--tab-h) + var(--safe-bot));
  padding-bottom: var(--safe-bot);
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--black); color: var(--bone);
  z-index: 50;
}
.tab { background: transparent; border: 0; color: var(--bone); font-family: var(--mono); font-size: 10px; letter-spacing: .12em; cursor: pointer; }
.tab[aria-current="page"] { color: var(--cyan); }

/* ad slot — fullscreen PWA overlay */
.ad-slot {
  position: fixed; inset: 0;
  background: var(--blue); color: var(--bone);
  padding: calc(env(safe-area-inset-top, 0px) + 72px) 24px calc(var(--safe-bot) + 32px);
  display: flex; flex-direction: column;
  z-index: 100;
  opacity: 0; transition: opacity .25s ease;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
.ad-slot.show { opacity: 1; }

/* per-variant background accents */
.ad-slot.v-blue   { background: var(--blue);   color: var(--bone); }
.ad-slot.v-black  { background: var(--black);  color: var(--bone); }
.ad-slot.v-cyan   { background: var(--cyan);   color: var(--black); }
.ad-slot.v-bone   { background: var(--bone);   color: var(--black); }

/* subtle brand mark in corner */
.ad-slot .ad-mark {
  position: absolute; top: calc(env(safe-area-inset-top, 0px) + 20px); left: 20px;
  font-family: var(--display); letter-spacing: -.03em; font-size: 18px;
  opacity: .9;
}
.ad-slot .ad-mark::after { content: '.'; color: var(--cyan); }
.ad-slot.v-cyan .ad-mark::after,
.ad-slot.v-bone .ad-mark::after { color: var(--blue); }

/* decorative bar */
.ad-slot .ad-deco {
  position: absolute; left: 0; right: 0; bottom: 0; height: 6px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  opacity: .8;
}
.ad-slot.v-cyan .ad-deco { background: linear-gradient(90deg, var(--black), var(--blue)); }

/* main column */
.ad-slot .ad-body {
  flex: 1; display: flex; flex-direction: column; justify-content: center;
  gap: 18px; max-width: 560px; margin: 0 auto; width: 100%;
}
.ad-slot .ad-eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  opacity: .75;
}
.ad-slot .ad-text {
  font-family: var(--display); letter-spacing: -.035em; line-height: .95;
  font-size: clamp(40px, 11vw, 64px);
  margin: 0;
}
.ad-slot .ad-text b { color: var(--cyan); }
.ad-slot.v-cyan .ad-text b { color: var(--blue); }
.ad-slot.v-bone .ad-text b { color: var(--blue); }
.ad-slot .ad-sub {
  font-size: 16px; line-height: 1.45; opacity: .85; max-width: 440px;
}

/* PRO feature checklist */
.ad-slot .ad-features {
  list-style: none; padding: 0; margin: 4px 0 0;
  display: flex; flex-direction: column; gap: 8px;
}
.ad-slot .ad-features li {
  display: flex; align-items: center; gap: 12px;
  font-size: 15px; line-height: 1.3;
  padding: 10px 14px;
  background: rgba(255,255,255,.08);
  border-radius: 12px;
}
.ad-slot.v-cyan .ad-features li,
.ad-slot.v-bone .ad-features li { background: rgba(0,0,0,.08); }
.ad-slot .ad-features .check {
  flex: 0 0 22px; width: 22px; height: 22px;
  border-radius: 999px;
  background: var(--cyan); color: var(--black);
  display: inline-grid; place-items: center;
  font-weight: 900; font-size: 14px; line-height: 1;
}
.ad-slot.v-cyan .ad-features .check,
.ad-slot.v-bone .ad-features .check { background: var(--black); color: var(--cyan); }

/* CTA group, pinned bottom for thumb reach */
.ad-slot .ad-actions {
  display: flex; flex-direction: column; gap: 12px;
  width: 100%; max-width: 420px; margin: 0 auto;
  padding-top: 16px;
}
.ad-slot .ad-cta {
  background: var(--cyan); color: var(--black); border: 0;
  border-radius: 999px; padding: 18px 24px;
  font-family: var(--body); font-weight: 700; font-size: 17px;
  cursor: pointer; min-height: 56px;
  transition: transform .06s ease;
}
.ad-slot .ad-cta:active { transform: translateY(1px); }
.ad-slot.v-cyan .ad-cta { background: var(--black); color: var(--bone); }
.ad-slot.v-bone .ad-cta { background: var(--blue); color: var(--bone); }
.ad-slot .ad-fineprint {
  text-align: center; font-family: var(--mono); font-size: 10px; letter-spacing: .12em;
  text-transform: uppercase; opacity: .55;
}

/* close + countdown — top right */
.ad-slot .ad-close {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 14px); right: 14px;
  width: 48px; height: 48px; border-radius: 999px;
  background: rgba(255,255,255,.10); border: 0; color: inherit;
  display: grid; place-items: center; cursor: not-allowed; padding: 0;
  -webkit-tap-highlight-color: transparent;
}
.ad-slot.v-cyan .ad-close,
.ad-slot.v-bone .ad-close { background: rgba(0,0,0,.10); }
.ad-slot .ad-close[data-ready="1"] { cursor: pointer; background: rgba(255,255,255,.18); }
.ad-slot.v-cyan .ad-close[data-ready="1"],
.ad-slot.v-bone .ad-close[data-ready="1"] { background: rgba(0,0,0,.18); }
.ad-slot .ad-close .ad-count {
  font-family: var(--mono); font-size: 14px; font-weight: 700;
}
.ad-slot .ad-close .ad-x {
  font-size: 26px; line-height: 1;
}
.ad-slot .ad-close svg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  transform: rotate(-90deg);
  pointer-events: none;
}
.ad-slot .ad-close svg circle.track { stroke: currentColor; opacity: .25; }
.ad-slot .ad-close svg circle.bar   {
  stroke: currentColor;
  stroke-dasharray: 131.95;
  stroke-dashoffset: 0;
}
.ad-slot.show .ad-close[data-ready="0"] svg circle.bar {
  animation: ad-ring 15s linear forwards;
}
@keyframes ad-ring {
  from { stroke-dashoffset: 0; }
  to   { stroke-dashoffset: 131.95; }
}

/* lists */
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 14px 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.list li:first-child { border-top: 0; }
.avatar { width: 40px; height: 40px; border-radius: 999px; background: var(--bone); border: 1.5px solid var(--black); display: grid; place-items: center; font-family: var(--display); }

/* empty state */
.empty { text-align: center; padding: 48px 12px; color: var(--muted); }
.empty .em-icon { font-size: 40px; margin-bottom: 10px; }

/* login hero */
.auth-hero {
  background: var(--black); color: var(--bone);
  border-radius: 24px; padding: 28px 22px;
  display: flex; flex-direction: column; gap: 8px;
}
.auth-hero .dot { color: var(--cyan); }
.auth-hero p { color: rgba(244,242,236,.7); margin: 0; }

/* tag */
.tag { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; padding: 4px 8px; border-radius: 999px; background: var(--bone); border: 1px solid var(--line); }
.tag.cyan { background: var(--cyan); border-color: var(--black); }
.tag.ok { background: #e6fff7; border-color: #00b399; color: #006e5f; }

/* ---------- admin: funnel ---------- */
.funnel { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.funnel-row { display: flex; flex-direction: column; gap: 6px; }
.funnel-label {
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted);
}
.funnel-bar-wrap { display: flex; align-items: center; gap: 12px; }
.funnel-bar {
  background: var(--black); color: var(--bone);
  border-radius: 10px; padding: 12px 14px;
  min-width: 80px;
  display: flex; align-items: baseline; gap: 8px;
  transition: width .35s ease;
  white-space: nowrap;
}
.funnel-row:nth-child(2) .funnel-bar { background: var(--blue); }
.funnel-row:nth-child(3) .funnel-bar { background: var(--cyan); color: var(--black); }
.funnel-row:nth-child(4) .funnel-bar {
  background: var(--bone); color: var(--black);
  border: 1.5px solid var(--black);
}
.funnel-uniq { font-family: var(--display); font-weight: 900; font-size: 20px; letter-spacing: -.03em; }
.funnel-total { font-family: var(--mono); font-size: 11px; opacity: .75; letter-spacing: .05em; }
.funnel-conv {
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  padding: 4px 8px; border-radius: 999px;
  background: rgba(10,12,10,.08); color: var(--muted);
  flex-shrink: 0;
}
.funnel-conv.good { background: #e6fff7; color: #006e5f; }
.funnel-conv.mid  { background: rgba(0,255,255,.15); color: var(--blue); }
.funnel-conv.low  { background: rgba(255,90,44,.12); color: var(--orange); }

/* per-source cards */
.source-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 8px; }
.source-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px;
  display: flex; flex-direction: column; gap: 8px;
}
.source-title {
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted);
}
.source-stages { display: flex; gap: 16px; flex-wrap: wrap; }
.source-stages > div { display: flex; flex-direction: column; gap: 2px; }
.source-stages .num {
  font-family: var(--display); font-weight: 900; font-size: 24px; letter-spacing: -.03em;
}
.source-stages .lbl {
  font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted);
}
.source-conv { font-size: 13px; color: var(--muted); }
.source-conv b { color: var(--black); font-weight: 700; }

@media (min-width: 720px) {
  .source-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- profile PRO upsell ---------- */
.pro-cta {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  width: 100%; padding: 18px 20px;
  border: 0; border-radius: 18px; cursor: pointer;
  background: var(--black); color: var(--bone);
  text-align: left;
  overflow: hidden;
  box-shadow: 0 10px 30px -12px rgba(0,255,255,.4);
  transition: transform .08s ease;
  -webkit-tap-highlight-color: transparent;
}
.pro-cta::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at top right, rgba(0,255,255,.25), transparent 55%);
  pointer-events: none;
}
.pro-cta:active { transform: translateY(1px); }
.pro-cta-text { display: flex; flex-direction: column; gap: 4px; position: relative; }
.pro-cta-eyebrow {
  font-family: var(--mono); font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--cyan);
}
.pro-cta-title {
  font-family: var(--display); font-weight: 900;
  font-size: clamp(22px, 5.5vw, 28px); letter-spacing: -.03em; line-height: 1;
}
.pro-cta-sub { font-size: 13px; opacity: .8; }
.pro-cta-arrow {
  position: relative;
  flex: 0 0 44px; width: 44px; height: 44px; border-radius: 999px;
  background: var(--cyan); color: var(--black);
  display: grid; place-items: center;
  font-weight: 900; font-size: 20px; line-height: 1;
}

/* ---------- pricing page ---------- */
.pricing h1 { line-height: .9; }
.pricing-intro { color: var(--muted); max-width: 560px; margin-top: 4px; }
.pricing-foot { font-family: var(--mono); font-size: 11px; letter-spacing: .04em; color: var(--muted); margin-top: 12px; text-align: center; }

.plan-grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 8px; }

.plan {
  position: relative;
  background: var(--paper); color: var(--black);
  border: 1px solid var(--line); border-radius: 20px;
  padding: 22px 20px;
  display: flex; flex-direction: column; gap: 16px;
}
.plan.plan-pro {
  background: var(--black); color: var(--bone);
  border-color: var(--black);
  box-shadow: 0 10px 30px -10px rgba(0,255,255,.35);
}
.plan[data-plan="fam"] {
  background: var(--blue); color: var(--bone);
  border-color: var(--blue);
}

.plan-head { display: flex; flex-direction: column; gap: 6px; }
.plan-tag {
  font-family: var(--mono); font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
  align-self: flex-start;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(10,12,10,.06); color: var(--muted);
}
.plan.plan-pro .plan-tag { background: var(--cyan); color: var(--black); }
.plan[data-plan="fam"] .plan-tag { background: var(--cyan); color: var(--black); }

.plan-name {
  font-family: var(--display); font-weight: 900;
  font-size: clamp(28px, 7vw, 36px); letter-spacing: -.04em;
  margin: 0;
}
.plan-price { display: flex; align-items: baseline; gap: 6px; }
.plan-amount {
  font-family: var(--display); font-weight: 900;
  font-size: clamp(48px, 13vw, 72px); line-height: 1; letter-spacing: -.05em;
}
.plan-suffix { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; opacity: .7; }

.plan-features { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.plan-features li {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; line-height: 1.35;
}
.plan-features .check {
  flex: 0 0 20px; width: 20px; height: 20px;
  border-radius: 999px;
  background: var(--black); color: var(--cyan);
  display: inline-grid; place-items: center;
  font-weight: 900; font-size: 12px; line-height: 1;
}
.plan.plan-pro .plan-features .check { background: var(--cyan); color: var(--black); }
.plan[data-plan="fam"] .plan-features .check { background: var(--cyan); color: var(--blue); }

/* Desktop: 3 koloms */
@media (min-width: 720px) {
  .pricing { max-width: 1080px; }
  .plan-grid { grid-template-columns: repeat(3, 1fr); align-items: stretch; gap: 18px; }
  .plan { padding: 28px 24px; }
  .plan.plan-pro { transform: translateY(-8px); }
}

/* ---------- Run Academy (OEFEN.) ---------- */

/* Academy screen vult de viewport zodat de 4 secties proportioneel kunnen verdelen */
.academy-screen {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - var(--tab-h) - var(--safe-bot));
  padding-bottom: 0;
}

.academy-root {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 14px;
}

/* Landing: 4 secties verticaal, flex-ratio 4 / 2 / 1 / 1 = 50 / 25 / 12.5 / 12.5 */
.academy-landing {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 10px;
}

.academy-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  appearance: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  min-height: 0;
  width: 100%;
  overflow: hidden;
}

.academy-section.card { padding: 14px 16px; }

.academy-section-daily {
  flex: 2 1 0;
  cursor: default;
  background: var(--black);
  color: var(--bone);
  border-color: var(--black);
  position: relative;
  overflow: hidden;
}

/* Cyan accent-streep boven aan de Daily-kaart */
.academy-section-daily::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--cyan);
}

.academy-section-paths      { flex: 1 1 0; }
.academy-section-injury     { flex: 1 1 0; }
.academy-section-interactie { flex: 1 1 0; }

.academy-section.is-locked { opacity: .68; }

.academy-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.academy-section-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

.academy-section-sub {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.academy-section-arrow {
  font-size: 18px;
  color: var(--muted);
}

.academy-section-tag {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

/* Paths progress preview op de landing — zit onderaan de section card */
.paths-progress {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: auto;
}

.paths-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.paths-progress-label {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--black);
  letter-spacing: .04em;
  flex-shrink: 0;
}

.paths-progress-bar {
  flex: 1;
  height: 8px;
  background: rgba(10, 12, 10, .08);
  border-radius: 999px;
  overflow: hidden;
}

.paths-progress-fill {
  height: 100%;
  background: var(--cyan);
  border-radius: 999px;
  transition: width .35s ease;
  box-shadow: 0 0 0 1px rgba(10, 12, 10, .08) inset;
}

.paths-progress-pct {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  flex-shrink: 0;
  min-width: 36px;
  text-align: right;
}

.academy-section-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* Daily binnen-content */
.academy-section-daily .academy-section-label,
.academy-section-daily .academy-section-sub {
  color: var(--cyan);
}

.daily-inner {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.daily-inner.is-empty { justify-content: center; align-items: center; text-align: center; color: var(--bone); }

/* Title + meta gecentreerd verticaal in de beschikbare ruimte */
.daily-mid {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
}

.daily-bottom {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.daily-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 900;
  letter-spacing: -0.035em;
  font-size: clamp(22px, 5.5vw, 30px);
  line-height: 1.05;
  color: var(--bone);
  text-align: center;
}

.daily-meta {
  display: flex;
  gap: 8px;
  font-size: 12px;
  color: rgba(244, 242, 236, .65);
  flex-wrap: wrap;
  justify-content: center;
  font-family: var(--mono);
  margin: 0;
}

.daily-done { color: var(--cyan); font-weight: 600; }

.daily-hint { margin: 0; font-size: 12px; color: rgba(244, 242, 236, .55); text-align: center; }

/* Start-button binnen Daily-kaart: cyan i.p.v. zwart, omdat de achtergrond zwart is */
.daily-inner .btn:not(.ghost) {
  background: var(--cyan);
  color: var(--black);
  border-color: var(--cyan);
}
.daily-inner .btn.ghost {
  background: transparent;
  color: var(--bone);
  border-color: rgba(244, 242, 236, .35);
}

/* Paths list */
.path-card { display: flex; flex-direction: column; gap: 10px; }
.path-card.is-locked { opacity: .72; }
.path-card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.path-card-title { margin: 0; font-size: 20px; line-height: 1.2; }
.path-card-sub { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.4; }
.path-lock {
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em;
  background: rgba(10, 12, 10, .08); color: var(--black);
  padding: 4px 10px; border-radius: 999px;
}

/* Path/level back-link */
.path-back {
  appearance: none; background: transparent; border: 0; padding: 4px 0;
  font: inherit; font-size: 14px; color: var(--muted); cursor: pointer;
  align-self: flex-start;
}
.path-back:hover { color: var(--black); }

.path-detail-title { margin: 0; font-size: 28px; line-height: 1.1; }
.path-detail-sub { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.4; }

/* Level card */
.level-card { display: flex; flex-direction: column; gap: 12px; }
.level-head { display: flex; gap: 12px; align-items: center; }
.level-num {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 8px; border-radius: 12px;
  background: var(--black); color: var(--bone);
  font-family: var(--mono); font-size: 13px; font-weight: 600;
}
.level-titles { flex: 1; min-width: 0; }
.level-title { margin: 0; font-size: 16px; line-height: 1.25; }
.level-meta { margin: 2px 0 0; font-size: 12px; color: var(--muted); }

/* Admin: Daily Lessons Tester */
.lessons-tester {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
@media (min-width: 560px) {
  .lessons-tester { grid-template-columns: 1fr 1fr; }
}

.lessons-tester-btn {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bone);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  text-align: left;
  font: inherit;
  cursor: pointer;
  color: var(--black);
}
.lessons-tester-btn:hover { border-color: var(--black); }

.lt-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--black);
  color: var(--bone);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}

.lt-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.lt-title { font-size: 14px; line-height: 1.25; }
.lt-meta { font-size: 11px; color: var(--muted); font-family: var(--mono); }
.lt-date { font-size: 11px; color: var(--black); font-family: var(--mono); margin-top: 2px; }

/* Home: Vandaag rows (Daily / Ga verder / Leer meer) */
.today-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.today-row {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  background: var(--bone);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  cursor: pointer;
  color: var(--black);
  width: 100%;
  transition: border-color .15s ease;
}
.today-row:hover:not(:disabled) { border-color: var(--black); }
.today-row:disabled { cursor: default; opacity: .6; }
.today-row.is-loading { color: var(--muted); }
.today-row.is-done .today-row-title { color: var(--muted); }

.today-row-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.today-row-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.today-row-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.today-row-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.today-row-arrow {
  font-size: 20px;
  color: var(--muted);
  flex-shrink: 0;
  line-height: 1;
}

/* Community user row XP badge */
.comm-user-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.comm-user-name {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.comm-user-xp {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  background: var(--cyan);
  color: var(--black);
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
}

/* Profile XP grid */
.profile-xp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.profile-xp-cell {
  background: rgba(10, 12, 10, .04);
  border-radius: 12px;
  padding: 14px;
}
.profile-xp-num {
  font-family: var(--display);
  font-weight: 900;
  letter-spacing: -.03em;
  font-size: 26px;
  line-height: 1;
  color: var(--black);
}
.profile-xp-lbl {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 6px;
}

/* Injury grid */
.injury-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.injury-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  padding: 14px;
}

.injury-card.is-empty {
  opacity: .55;
  cursor: not-allowed;
}

.injury-icon {
  font-size: 28px;
  line-height: 1;
}

.injury-title {
  margin: 0;
  font-size: 15px;
  line-height: 1.25;
}

.injury-meta {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  font-family: var(--mono);
}

/* Lesson row in level */
.lesson-row { display: flex; flex-direction: column; gap: 12px; }
.lesson-row-head { display: flex; gap: 12px; align-items: center; }
.lesson-row-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 999px;
  background: rgba(10, 12, 10, .08); color: var(--black);
  font-family: var(--mono); font-size: 13px; font-weight: 600;
  flex-shrink: 0;
}
.lesson-row-title { margin: 0; font-size: 15px; line-height: 1.3; }
.lesson-row-meta { margin: 2px 0 0; font-size: 12px; color: var(--muted); }

/* ---------- Lesson overlay (full-screen) ---------- */

.lesson-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  overscroll-behavior: contain;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

.lesson-overlay-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
  padding: 12px 16px;
  box-sizing: border-box;
  overflow: hidden;
}

/* When a lesson is active, hide page chrome so users can focus.
   Ad-slot blijft beschikbaar zodat de end-of-lesson ad kan tonen — die
   moet juist over de lesson heen verschijnen. */
body.lesson-active { overflow: hidden; }
body.lesson-active #tabbar,
body.lesson-active #adfree-btn,
body.lesson-active #install-banner { display: none !important; }
/* notify-prompt mag wel boven een actieve lesson verschijnen (post-XP moment) */

/* ---------- notify-prompt (post-XP claim) ---------- */
.np {
  position: fixed; left: 12px; right: 12px;
  bottom: calc(var(--safe-bot) + 14px);
  z-index: 120;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px 10px 12px;
  background: var(--black); color: var(--bone);
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(10,12,10,.28), 0 0 0 1px rgba(244,242,236,.06) inset;
  animation: np-in .32s cubic-bezier(.2,.8,.2,1);
}
.np.np-out { animation: np-out .22s ease forwards; }
@keyframes np-in {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
@keyframes np-out {
  to { transform: translateY(20px); opacity: 0; }
}
.np-icon {
  width: 36px; height: 36px; flex: 0 0 36px;
  border-radius: 10px; display: grid; place-items: center;
  background: rgba(244,242,236,.08); color: var(--cyan);
}
.np-copy { flex: 1; min-width: 0; line-height: 1.25; }
.np-title {
  font-family: var(--body); font-weight: 700; font-size: 14px;
  letter-spacing: -.01em;
}
.np-sub {
  font-family: var(--mono); font-size: 10px; letter-spacing: .08em;
  text-transform: uppercase; color: rgba(244,242,236,.55);
  margin-top: 2px;
}
.np-cta {
  background: var(--cyan); color: var(--black); border: 0;
  font-family: var(--body); font-weight: 700; font-size: 13px;
  padding: 9px 14px; border-radius: 999px; cursor: pointer; white-space: nowrap;
}
.np-cta:disabled { opacity: .7; cursor: default; }
.np-cta:active { transform: translateY(1px); }
.np-close {
  flex: 0 0 28px; width: 28px; height: 28px;
  display: grid; place-items: center;
  background: transparent; border: 0; color: rgba(244,242,236,.55);
  border-radius: 999px; cursor: pointer;
  margin-left: -4px;
}
.np-close:hover { color: var(--bone); background: rgba(244,242,236,.08); }
@media (max-width: 380px) {
  .np { flex-wrap: wrap; padding: 10px 12px 12px; }
  .np-copy { flex: 1 1 auto; }
  .np-cta { order: 3; flex: 1 1 100%; margin-top: 6px; padding: 11px; }
  .np-close { order: 2; }
}

/* ---------- Lesson player ---------- */

.lesson-shell {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 0;
  border-radius: 0;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.lesson-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.lesson-progress {
  display: flex;
  gap: 6px;
  flex: 1;
}

.lesson-dot {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: rgba(10, 12, 10, .12);
  transition: background .2s ease;
}

.lesson-dot.is-active { background: var(--black); }

.lesson-close {
  appearance: none;
  background: transparent;
  border: 0;
  font-size: 18px;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
}

.lesson-close:hover { background: rgba(10, 12, 10, .06); }

.lesson-stage {
  flex: 1;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow-y: auto;
}

.lesson-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lesson-kind-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.lesson-text {
  font-size: 22px;
  line-height: 1.35;
  margin: 0;
  color: var(--black);
}

.lesson-text.is-typing {
  cursor: pointer;
}

.lesson-bold {
  font-weight: 700;
  /* Subtiele visuele lift zonder kleur-knal */
  background: linear-gradient(transparent 60%, rgba(0, 255, 255, .35) 60%);
  padding: 0 1px;
}

.lesson-text.is-typing::after {
  content: '';
  display: inline-block;
  width: 2px;
  height: 1em;
  vertical-align: -2px;
  margin-left: 2px;
  background: var(--black);
  animation: rw-blink 1s steps(1) infinite;
}

@keyframes rw-blink {
  50% { opacity: 0; }
}

.lesson-question {
  font-size: 20px;
  line-height: 1.35;
  margin: 0 0 6px;
  color: var(--black);
}

.lesson-foot {
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}

.lesson-hint {
  margin: 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.lesson-feedback {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.4;
}

.lesson-feedback.is-correct {
  background: #DDF4E0;
  color: #1A5024;
}

.lesson-feedback.is-wrong {
  background: #FBE2DD;
  color: #6A1F12;
}

.lesson-feedback p { margin: 0; }

/* Completion */

.lesson-card-completion {
  align-items: center;
  text-align: center;
  gap: 18px;
}

.lesson-xp-badge {
  display: inline-block;
  background: var(--black);
  color: var(--bone);
  font-family: var(--mono);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 16px;
  letter-spacing: .04em;
}

.lesson-completion-text {
  font-size: 18px;
  line-height: 1.4;
  margin: 0;
  color: var(--black);
}

/* ---------- Interaction: multiple-choice ---------- */

.ix-mc {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ix-mc-opt {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  background: var(--bone);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  font-size: 15px;
  color: var(--black);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}

.ix-mc-opt:hover:not(:disabled) { border-color: var(--black); }

.ix-mc-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(10, 12, 10, .08);
  font-family: var(--mono);
  font-size: 13px;
  flex-shrink: 0;
}

.ix-mc-opt.is-correct { border-color: #2E7D3A; background: #E8F6EA; }
.ix-mc-opt.is-wrong   { border-color: #B83A24; background: #F8E2DD; }

.ix-mc-opt:disabled { cursor: default; }

/* ---------- Interaction: true/false ---------- */

.ix-tf {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.ix-tf-btn {
  appearance: none;
  background: var(--bone);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 22px 12px;
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  color: var(--black);
  cursor: pointer;
}

.ix-tf-btn:hover:not(:disabled) { border-color: var(--black); }
.ix-tf-btn.is-correct { border-color: #2E7D3A; background: #E8F6EA; }
.ix-tf-btn.is-wrong   { border-color: #B83A24; background: #F8E2DD; }
.ix-tf-btn:disabled { cursor: default; }

/* ---------- Interaction: smart-choice ---------- */

.ix-smart {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.ix-smart-card {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  background: var(--bone);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  text-align: left;
  font: inherit;
  font-size: 14px;
  color: var(--black);
  cursor: pointer;
  min-height: 130px;
}

.ix-smart-card:hover:not(:disabled) { border-color: var(--black); }

.ix-smart-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--black);
  color: var(--bone);
  font-family: var(--mono);
  font-size: 13px;
}

.ix-smart-text { line-height: 1.4; }

.ix-smart-card.is-correct { border-color: #2E7D3A; background: #E8F6EA; }
.ix-smart-card.is-wrong   { border-color: #B83A24; background: #F8E2DD; }
.ix-smart-card:disabled { cursor: default; }

/* ---------- Interaction: scenario ---------- */

.ix-scenario-situation {
  margin: 0;
  padding: 14px 16px;
  border-left: 3px solid var(--black);
  background: rgba(10, 12, 10, .04);
  font-style: italic;
  font-size: 15px;
  line-height: 1.45;
  border-radius: 0 12px 12px 0;
}

.ix-scenario-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ix-scenario-opt {
  appearance: none;
  background: var(--bone);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  font: inherit;
  font-size: 15px;
  text-align: left;
  color: var(--black);
  cursor: pointer;
}

.ix-scenario-opt:hover:not(:disabled) { border-color: var(--black); }
.ix-scenario-opt.is-correct { border-color: #2E7D3A; background: #E8F6EA; }
.ix-scenario-opt.is-wrong   { border-color: #B83A24; background: #F8E2DD; }
.ix-scenario-opt:disabled { cursor: default; }

/* ---------- Interaction: mistake-correction ---------- */

.ix-mistake-quote {
  margin: 0;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--bone);
  font-size: 15px;
  line-height: 1.5;
  font-style: italic;
}

.ix-mistake-quote mark.ix-mc-frag {
  background: rgba(10, 12, 10, .06);
  padding: 0 3px;
  border-radius: 3px;
}

.ix-mistake-hint {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.ix-mistake-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ix-mistake-chip {
  appearance: none;
  background: var(--bone);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-size: 14px;
  color: var(--black);
  cursor: pointer;
}

.ix-mistake-chip.is-selected {
  background: var(--black);
  color: var(--bone);
  border-color: var(--black);
}

.ix-mistake-chip.is-correct { border-color: #2E7D3A; background: #E8F6EA; color: var(--black); }
.ix-mistake-chip.is-wrong   { border-color: #B83A24; background: #F8E2DD; color: var(--black); }
.ix-mistake-chip:disabled { cursor: default; }

.ix-mistake-confirm {
  align-self: flex-start;
  margin-top: 8px;
}

.ix-mistake-explanation {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

/* ---------- Lesson visuals ---------- */

.rv {
  margin-top: 6px;
}

/* Tone colors — shared across visual types */
.rv-tone-easy    { --rv-fg: #1F6B33; --rv-bg: #D7F0DD; --rv-border: #1F6B33; }
.rv-tone-hard    { --rv-fg: #8A3520; --rv-bg: #FBE0D6; --rv-border: #8A3520; }
.rv-tone-neutral { --rv-fg: #4B4B4B; --rv-bg: #EAEAEA; --rv-border: #B0B0B0; }
.rv-tone-warn    { --rv-fg: #7A5A14; --rv-bg: #FCEBC0; --rv-border: #7A5A14; }

/* ratio-bar */

.rv.ratio-bar { display: flex; flex-direction: column; gap: 10px; }

.rv-bar {
  display: flex;
  height: 28px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(10, 12, 10, .06);
  border: 1px solid var(--line);
}

.rv-bar-seg {
  background: var(--rv-bg);
  border-right: 1px solid rgba(0, 0, 0, .08);
}

.rv-bar-seg:last-child { border-right: 0; }

.rv-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 13px;
}

.rv-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.rv-legend-swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--rv-bg);
  border: 1px solid var(--rv-border);
}

.rv-legend-text { color: var(--black); }
.rv-legend-text b { font-family: var(--mono); font-weight: 600; }

/* comparison */

.rv.comparison {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: stretch;
}

.cmp-side {
  background: var(--rv-bg);
  border: 1.5px solid var(--rv-border);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--rv-fg);
}

.cmp-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 600;
}

.cmp-text { font-size: 14px; line-height: 1.4; color: var(--black); }

.cmp-vs {
  align-self: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

/* icon-list */

.rv.icon-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.il-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bone);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
}

.il-icon {
  font-size: 20px;
  line-height: 1;
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}

.il-label { font-size: 14px; line-height: 1.35; color: var(--black); }
