/* Daglicht en diepte — Wegwijstheorie.
   One light source (top right, low sun), one shadow family tinted toward the
   brand navy, and illustrations drawn in the same flat top-down language as the
   traffic scenes. Loaded last; remove this file and its markup to revert.
   Motion storyboard (homepage hero, once per render):
     300ms  car enters on the road, decelerating (ease-out)
     2.1s   car stops before the shark teeth, brake lights on
   Purchase panel (once, when scrolled into view):
     200ms  nearest street lamps light, then every 140ms one pair further away */

:root {
  --depth-tint: 22 48 71;
  --shadow-raise:
    0 0 0 1px rgb(var(--depth-tint) / 0.06),
    0 1px 2px rgb(var(--depth-tint) / 0.06),
    0 8px 20px -8px rgb(var(--depth-tint) / 0.16);
  --shadow-float:
    0 0 0 1px rgb(var(--depth-tint) / 0.05),
    0 2px 4px rgb(var(--depth-tint) / 0.05),
    0 18px 36px -14px rgb(var(--depth-tint) / 0.24),
    0 48px 88px -32px rgb(29 81 206 / 0.28);
  --button-depth:
    inset 0 1px 0 rgb(255 255 255 / 0.2),
    0 1px 2px rgb(20 50 140 / 0.24),
    0 6px 14px -6px rgb(29 81 206 / 0.55);
  --sun: #fff1d2;
  --sky: #e7efff;
  --scape-verge: #d3e4c3;
  --scape-kerb: #ebe7dc;
  --scape-road: #69727c;
  --scape-lane: #ffffff;
  --tree: #8db676;
  --tree-light: #a8cc8f;
  --tree-shade: rgb(36 70 40 / 0.16);
  --sign-red: #d4372f;
  --sign-white: #ffffff;
  --car-glass: #cfdfff;
  --car-roof: #3b6ef0;
  --fi-asphalt: #69727c;
  --fi-tile-top: #f6f9ff;
  --fi-tile-bottom: #e4ecff;
  --fi-tile-light: rgb(255 255 255 / 0.9);
  --fi-tile-ring: rgb(29 81 206 / 0.12);
  --fi-accent: #1d51ce;
  --fi-back: #b9cbf5;
  --fi-card: #ffffff;
  --fi-card-edge: #1d51ce;
  --fi-line: #8aa6e6;
}
:root[data-theme="dark"] {
  --depth-tint: 0 0 0;
  --shadow-raise:
    0 0 0 1px rgb(255 255 255 / 0.06),
    0 1px 2px rgb(0 0 0 / 0.3),
    0 10px 24px -10px rgb(0 0 0 / 0.55);
  --shadow-float:
    0 0 0 1px rgb(255 255 255 / 0.07),
    0 2px 4px rgb(0 0 0 / 0.3),
    0 24px 48px -18px rgb(0 0 0 / 0.65);
  --button-depth:
    inset 0 1px 0 rgb(255 255 255 / 0.35),
    0 1px 2px rgb(0 0 0 / 0.35),
    0 8px 18px -8px rgb(0 0 0 / 0.6);
  --sun: #34506e;
  --sky: #263a50;
  --scape-verge: #2c4136;
  --scape-kerb: #3a4957;
  --scape-road: #1b232b;
  --scape-lane: rgb(226 234 242 / 0.75);
  --tree: #3e664f;
  --tree-light: #4f7d61;
  --tree-shade: rgb(0 0 0 / 0.3);
  --sign-red: #e0564e;
  --sign-white: #f2f5f8;
  --car-glass: #8fb0f0;
  --car-roof: #7fa3ff;
  --fi-asphalt: #18202a;
  --fi-tile-top: #3d536c;
  --fi-tile-bottom: #2f4358;
  --fi-tile-light: rgb(255 255 255 / 0.12);
  --fi-tile-ring: rgb(255 255 255 / 0.08);
  --fi-accent: #4f80f2;
  --fi-back: #6a8cc4;
  --fi-card: #e8effb;
  --fi-card-edge: #e8effb;
  --fi-line: #7d9bd2;
}

/* ---------- Buttons: lit from above, pressed into the page ---------- */
.button:not(.secondary):not(.ghost):not(.danger) {
  background-image: linear-gradient(
    180deg,
    rgb(255 255 255 / 0.1),
    rgb(255 255 255 / 0)
  );
  box-shadow: var(--button-depth);
}
.button.secondary,
.button.ghost {
  box-shadow: 0 1px 2px rgb(var(--depth-tint) / 0.06);
}
.button,
.answer,
.comparison-controls button {
  transition:
    background-color var(--motion-fast, 160ms) var(--ease-out, ease),
    border-color var(--motion-fast, 160ms) var(--ease-out, ease),
    color var(--motion-fast, 160ms) var(--ease-out, ease),
    box-shadow var(--motion-fast, 160ms) var(--ease-out, ease),
    transform 120ms var(--ease-out, ease);
}
.button:active {
  transform: scale(0.97);
}

/* ---------- Raised surfaces across the app ---------- */
.price-card,
.lab-tile,
.course-topic,
.topic-card,
.focus-callout,
.panel,
.home-live-section .home-example {
  box-shadow: var(--shadow-raise);
}
.price-card,
.lab-tile,
.course-topic,
.topic-card {
  transition:
    transform 200ms var(--ease-out, ease),
    box-shadow 200ms var(--ease-out, ease),
    border-color 160ms var(--ease-out, ease);
}
@media (hover: hover) {
  .lab-tile:hover,
  .course-topic:hover,
  .topic-card:hover,
  .price-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-float);
  }
}

/* ---------- Hero: low sun, a road through the landscape ---------- */
.course-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-bottom: 104px;
  background:
    radial-gradient(56% 80% at 92% -8%, var(--sun) 0%, transparent 62%),
    radial-gradient(44% 70% at -6% 0%, var(--sky) 0%, transparent 70%),
    var(--paper);
}
.course-hero-grid {
  position: relative;
  z-index: 1;
}
.hero-scape {
  position: absolute;
  inset: auto 0 0;
  z-index: 0;
  width: 100%;
  height: 240px;
  pointer-events: none;
  user-select: none;
}
.hero-scape path {
  fill: none;
  stroke-linecap: round;
}
.scape-verge {
  stroke: var(--scape-verge);
  stroke-width: 118;
}
.scape-kerb {
  stroke: var(--scape-kerb);
  stroke-width: 64;
}
.scape-road {
  stroke: var(--scape-road);
  stroke-width: 56;
}
.scape-lane {
  stroke: var(--scape-lane);
  stroke-width: 2.4;
  stroke-dasharray: 16 20;
  stroke-linecap: butt;
}
.scape-trees circle {
  fill: var(--tree);
}
.scape-trees .tree-light {
  fill: var(--tree-light);
}
.scape-trees .tree-shade {
  fill: var(--tree-shade);
}
.scape-car,
.scape-stop {
  offset-path: path("M-60 206 C 260 202 420 126 720 118 S 1180 98 1500 46");
  offset-rotate: auto;
  offset-anchor: 0 0;
}
.scape-stop {
  offset-distance: 45%;
}
.hero-scape .scape-teeth {
  fill: var(--scape-lane);
  stroke: none;
}
.scape-sign .sign-rim {
  fill: var(--sign-red);
  stroke: var(--sign-red);
  stroke-width: 2;
  stroke-linejoin: round;
}
.scape-sign .sign-face {
  fill: var(--sign-white);
}
.scape-sign .sign-shade,
.scape-car .car-shade {
  fill: rgb(var(--depth-tint) / 0.18);
}
.scape-car {
  offset-distance: 43.2%;
  animation: car-arrive 1.8s cubic-bezier(0.2, 0.75, 0.25, 1) 300ms both;
}
.car-body {
  fill: var(--blue);
}
.car-glass {
  fill: var(--car-glass);
}
.car-roof {
  fill: var(--car-roof);
}
.car-brake {
  fill: #ff4b3e;
  opacity: 1;
  animation: car-brake 1.8s linear 300ms both;
}
@keyframes car-arrive {
  from {
    offset-distance: 0%;
  }
}
@keyframes car-brake {
  0%,
  62% {
    opacity: 0;
  }
  72%,
  100% {
    opacity: 1;
  }
}
.road-photo {
  position: relative;
  box-shadow: var(--shadow-float);
}
.road-photo figcaption {
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.6);
}
[data-theme="dark"] .road-photo figcaption {
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.06);
}

/* ---------- Facts: a card lifted off the road ---------- */
.course-facts {
  position: relative;
  z-index: 2;
  margin-top: -64px;
  padding: 24px 32px;
  border: 0;
  border-radius: 16px;
  background: var(--paper);
  box-shadow: var(--shadow-float);
}
.course-facts > div {
  gap: 16px;
}
.fact-icon {
  box-sizing: border-box;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  padding: 7px;
  overflow: visible;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--fi-tile-top), var(--fi-tile-bottom));
  box-shadow:
    inset 0 1px 0 var(--fi-tile-light),
    inset 0 0 0 1px var(--fi-tile-ring),
    0 1px 2px rgb(var(--depth-tint) / 0.1);
}
.fact-icon * {
  vector-effect: non-scaling-stroke;
}
.fi-back {
  fill: var(--fi-back);
}
.fi-card {
  fill: var(--fi-card);
  stroke: var(--fi-card-edge);
  stroke-width: 1.6;
}
.fi-line {
  stroke: var(--fi-line);
  stroke-width: 1.8;
  stroke-linecap: round;
}
.fi-dot,
.fi-square {
  fill: var(--fi-accent);
}
.fi-check,
.fi-square-arrow {
  fill: none;
  stroke: #fff;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.fi-asphalt {
  fill: var(--fi-asphalt);
}
.fi-dash {
  stroke: #fff;
  stroke-width: 1.4;
  stroke-linecap: round;
  opacity: 0.85;
}
.fi-trail {
  stroke: var(--fi-accent);
  stroke-width: 1.4;
  stroke-linecap: round;
  opacity: 0.7;
}
.fi-glass {
  fill: var(--car-glass);
}
.fi-warn,
.fi-round {
  fill: var(--sign-red);
  stroke: var(--sign-red);
  stroke-width: 1.6;
  stroke-linejoin: round;
}
.fi-warn-face {
  fill: var(--sign-white);
}
.fi-round-bar {
  stroke: var(--sign-white);
  stroke-width: 2.4;
  stroke-linecap: round;
}

/* ---------- Steps: numbers as Dutch blue route signs ---------- */
.steps-grid .step-preview {
  box-shadow: var(--shadow-raise);
  transition:
    transform 220ms var(--ease-out, ease),
    box-shadow 220ms var(--ease-out, ease);
}
@media (hover: hover) {
  .steps-grid article:hover .step-preview {
    transform: translateY(-3px);
    box-shadow: var(--shadow-float);
  }
}
.steps-grid .step-number {
  display: inline-grid;
  place-items: center;
  min-width: 40px;
  height: 28px;
  padding: 0 8px;
  margin-bottom: 12px;
  border-radius: 6px;
  background: var(--blue);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  box-shadow:
    inset 0 0 0 2px var(--blue),
    inset 0 0 0 3.5px rgb(255 255 255 / 0.95),
    0 1px 2px rgb(var(--depth-tint) / 0.2);
}
[data-theme="dark"] .steps-grid .step-number {
  color: #101c2b;
  box-shadow:
    inset 0 0 0 2px var(--blue),
    inset 0 0 0 3.5px #101c2b,
    0 1px 2px rgb(0 0 0 / 0.4);
}

/* ---------- SituatieLab: a street map under the comparison ---------- */
.home-lab-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(38% 70% at 24% 50%, var(--blue-wash) 0%, transparent 72%),
    var(--paper);
}
.lab-streets {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.lab-streets .street {
  fill: none;
  stroke: var(--street, #e2e9f3);
  stroke-width: 22;
}
.lab-streets .street-line {
  fill: none;
  stroke: var(--paper);
  stroke-width: 1.5;
  stroke-dasharray: 8 10;
}
[data-theme="dark"] .lab-streets {
  --street: #33475a;
}
.comparison-demo.home-lab-images {
  position: relative;
  background: var(--paper);
  border: 0;
  box-shadow: var(--shadow-float);
}
.comparison-demo .comparison-stage {
  box-shadow: inset 0 0 0 1px rgb(var(--depth-tint) / 0.06);
}

/* One thumb slides between A and B; the buttons stay put. */
.comparison-controls {
  position: relative;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: var(--soft);
  box-shadow: inset 0 1px 2px rgb(var(--depth-tint) / 0.08);
}
.compare-thumb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 6px);
  border-radius: 8px;
  background: var(--paper);
  box-shadow:
    0 1px 2px rgb(var(--depth-tint) / 0.12),
    0 4px 10px -4px rgb(var(--depth-tint) / 0.2);
  pointer-events: none;
  transition: transform 240ms cubic-bezier(0.65, 0, 0.35, 1);
}
[data-compare-state="b"] .compare-thumb {
  transform: translateX(calc(100% + 4px));
}
.comparison-controls button,
.comparison-controls button[aria-pressed="true"] {
  position: relative;
  z-index: 1;
  border-color: transparent;
  background: transparent;
}
.comparison-controls button[aria-pressed="true"],
.comparison-controls button[aria-pressed="true"] span {
  color: var(--blue);
}

/* ---------- Purchase: an evening road, lamps light as you arrive ---------- */
.home-buy {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 232px;
  border: 0;
  border-radius: 20px;
  background: #0e1f33;
  box-shadow: var(--shadow-float);
}
.home-buy::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    90deg,
    rgb(12 27 46 / 0.92) 0%,
    rgb(12 27 46 / 0.65) 34%,
    rgb(12 27 46 / 0) 52%
  );
  pointer-events: none;
}
.buy-scape {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.buy-scene {
  transform: translateX(110px);
}
.buy-scape .sky-top {
  stop-color: #0b1a2c;
}
.buy-scape .sky-bottom {
  stop-color: #1e3a5f;
}
.buy-scape .horizon-core {
  stop-color: #ffbf6e;
  stop-opacity: 0.42;
}
.buy-scape .horizon-mid {
  stop-color: #7d8fd0;
  stop-opacity: 0.16;
}
.buy-scape .horizon-edge {
  stop-color: #7d8fd0;
  stop-opacity: 0;
}
.buy-land {
  fill: #0a1626;
}
.buy-road {
  fill: #172538;
}
.buy-edge {
  fill: none;
  stroke: rgb(255 255 255 / 0.22);
  stroke-width: 1.4;
}
.buy-dash {
  fill: none;
  stroke: rgb(255 255 255 / 0.6);
  stroke-width: 2;
}
.buy-tail circle {
  fill: #ff5a4c;
  filter: drop-shadow(0 0 3px #ff5a4c);
}
.lamp-pole {
  fill: none;
  stroke: #2a3d55;
  stroke-width: 2;
}
.lamp-head {
  fill: #4a5a6e;
  transition: fill 300ms ease-out calc(200ms + var(--i) * 140ms);
}
.lamp-glow {
  fill: url(#buy-lamp);
  opacity: 0;
  transition: opacity 700ms ease-out calc(200ms + var(--i) * 140ms);
}
.lamp-pool {
  fill: url(#buy-pool);
  opacity: 0;
  transition: opacity 900ms ease-out calc(260ms + var(--i) * 140ms);
}
.home-buy.is-lit .lamp-head {
  fill: #fff0c8;
}
.home-buy.is-lit .lamp-glow {
  opacity: 1;
}
.home-buy.is-lit .lamp-pool {
  opacity: 1;
}
/* Copy, actions and promises read as one column on the dark left; the lit
   road keeps the right half to itself. */
.home-buy {
  display: block;
  padding: 56px;
}
.buy-copy {
  max-width: 520px;
}
.buy-kicker {
  margin: 0 0 12px;
  color: #ffd38a;
  font-size: 14px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.buy-kicker::before {
  content: "";
  display: inline-block;
  vertical-align: 0.15em;
  margin-right: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffd38a;
  box-shadow: 0 0 8px 2px rgb(255 211 138 / 0.55);
}
.home-buy h2 {
  color: #fff;
  margin: 0 0 8px;
}
.home-buy p {
  color: #c5d2e3;
}
.home-buy .buy-kicker {
  color: #ffd38a;
}
.buy-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  margin-top: 28px;
}
.home-buy .button:not(.secondary) {
  margin: 0;
  background-color: #fff;
  color: #0e1f33;
  box-shadow:
    inset 0 -1px 0 rgb(14 31 51 / 0.14),
    0 0 0 1px rgb(255 255 255 / 0.5),
    0 10px 30px -8px rgb(255 196 112 / 0.6);
}
.home-buy .button:not(.secondary):hover {
  background-color: #fff5e2;
}
.buy-free {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #fff;
  font-size: 15px;
  text-decoration: underline;
  text-decoration-color: rgb(255 255 255 / 0.35);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: text-decoration-color 150ms ease;
}
@media (hover: hover) {
  .buy-free:hover {
    text-decoration-color: #ffd38a;
  }
}
.buy-promises {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  color: #c5d2e3;
  font-size: 14px;
}
.buy-promises li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.buy-check {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
}
.buy-check circle {
  fill: rgb(255 211 138 / 0.16);
}
.buy-check path {
  fill: none;
  stroke: #ffd38a;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.home-buy :focus-visible {
  outline-color: #fff;
}

@media (max-width: 760px) {
  .course-hero {
    padding-bottom: 88px;
  }
  .hero-scape {
    height: 200px;
  }
  .course-facts {
    margin-top: -48px;
    padding: 20px;
    align-items: start;
  }
  .fact-icon {
    margin-bottom: 8px;
  }
  .home-buy {
    padding: 32px 24px 184px;
  }
  .home-buy::before {
    background: linear-gradient(
      180deg,
      rgb(12 27 46 / 0.96) 0%,
      rgb(12 27 46 / 0.9) 58%,
      rgb(12 27 46 / 0) 80%
    );
  }
  /* The scene keeps a fixed 260px band on the bottom edge (scale 1), so it
     never zooms as the copy grows. The slice then shows the right end of the
     scene; shift it so the vanishing point sits near the middle. */
  .buy-scape {
    inset: auto 0 0;
    height: 260px;
  }
  .buy-scene {
    transform: translateX(60px);
  }
}
@media (max-width: 480px) {
  .buy-scene {
    transform: translateX(232px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .scape-car,
  .car-brake {
    animation: none;
  }
  .compare-thumb,
  .lamp-head,
  .lamp-glow,
  .lamp-pool,
  .steps-grid .step-preview {
    transition: none;
  }
  .button:active {
    transform: none;
  }
}

/* ======================================================================
   Other pages: the same light and material as the homepage.
   Emblems, plan calendars and the login landscape are added by art.js.
   ====================================================================== */

/* Extra emblem strokes and fills (shared tile tokens above). */
.fi-white {
  fill: #fff;
}
.fi-white-line {
  fill: none;
  stroke: #fff;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.9;
}
.fi-stroke,
.fi-stroke-strong {
  fill: none;
  stroke: var(--fi-accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.fi-stroke-strong {
  stroke-width: 2.6;
}
.fi-soft {
  fill: var(--fi-tile-bottom);
}
.fi-grid circle {
  fill: var(--fi-line);
}

/* Page titles carry their emblem tile on the left. */
h1.has-emblem {
  display: flex;
  align-items: center;
  gap: 16px;
}
.page-emblem {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  padding: 8px;
  border-radius: 14px;
}

/* The page you're on is a raised tab in the sidebar. */
.app-sidebar .side-link.active {
  background: var(--paper);
  box-shadow:
    0 0 0 1px rgb(29 81 206 / 0.14),
    0 1px 2px rgb(var(--depth-tint) / 0.08),
    0 6px 14px -8px rgb(29 81 206 / 0.35);
}
[data-theme="dark"] .app-sidebar .side-link.active {
  background: var(--soft);
  box-shadow:
    0 0 0 1px rgb(255 255 255 / 0.08),
    0 6px 14px -8px rgb(0 0 0 / 0.6);
}
.app-sidebar .side-link {
  transition:
    background-color 150ms ease,
    color 150ms ease,
    box-shadow 150ms ease;
}

/* Prices: a calendar per plan, the default plan lifted towards the light. */
.price-card .plan-emblem {
  display: block;
  margin-bottom: 20px;
}
.price-card.featured {
  box-shadow: var(--shadow-float);
}
.free-intro {
  margin-top: 40px;
  padding: 24px 32px;
  border: 0;
  border-radius: 16px;
  background: var(--paper);
  box-shadow: var(--shadow-raise);
}

/* Login and registration end on the road from the homepage. */
.page-scape {
  position: relative;
  height: 240px;
  margin-top: -32px;
  overflow: hidden;
  pointer-events: none;
}
.auth-photo {
  box-shadow: var(--shadow-float);
}
.auth-screen .auth-form {
  box-shadow: var(--shadow-float);
}

@media (max-width: 760px) {
  .page-emblem {
    flex-basis: 44px;
    width: 44px;
    height: 44px;
    padding: 7px;
    border-radius: 12px;
  }
  h1.has-emblem {
    gap: 12px;
  }
  .page-scape {
    height: 200px;
    margin-top: 0;
  }
  .free-intro {
    padding: 20px;
  }
}

/* An emblem makes titles wider: let title rows wrap instead of overflowing. */
.admin-title,
.page-heading {
  flex-wrap: wrap;
}
.admin-title > div,
.page-heading > div {
  min-width: 0;
}

/* ---------- Theme toggle: one SVG that morphs sun <-> moon ----------
   Sun -> moon: 0ms rays fold away · 80ms disc swells, shadow slides in to
   carve the crescent · 380/460ms stars pop in.
   Moon -> sun: stars out first · shadow slides off, disc shrinks ·
   120ms rays spring back out on a quarter turn. */
#theme {
  --ti-sun: #fbbf24;
  --ti-sun-edge: #d97706;
  --ti-moon: #f2e4b0;
  --ti-out: cubic-bezier(0.32, 0.72, 0, 1);
  --ti-spring: cubic-bezier(0.34, 1.45, 0.64, 1);
}
#theme .theme-icon {
  display: block;
  overflow: visible;
  filter: drop-shadow(0 0 3px rgb(251 191 36 / 0.35));
  transition:
    filter 400ms ease,
    transform 120ms ease-out;
}
#theme .theme-icon * {
  transform-origin: 12px 12px;
}
#theme .ti-rays {
  fill: none;
  stroke: var(--ti-sun-edge);
  stroke-width: 2;
  stroke-linecap: round;
  transition:
    transform 480ms var(--ti-spring) 120ms,
    opacity 200ms ease-out 120ms;
}
#theme .ti-body {
  fill: var(--ti-sun);
  stroke: var(--ti-sun-edge);
  stroke-width: 1.5;
  transition:
    transform 380ms var(--ti-out),
    fill 300ms ease,
    stroke 300ms ease;
}
#theme .ti-cut {
  transform: translate(9px, -9px);
  transition: transform 340ms var(--ti-out);
}
#theme .ti-stars path {
  fill: var(--ti-moon);
  opacity: 0;
  transform: scale(0.4);
  transform-box: fill-box;
  transform-origin: center;
  transition:
    transform 120ms ease-out,
    opacity 120ms ease-out;
}
#theme .ti-spin,
#theme .ti-tilt {
  transition: transform 600ms var(--ti-out);
}
:root[data-theme="dark"] #theme .theme-icon {
  filter: drop-shadow(0 0 4px rgb(242 228 176 / 0.45));
}
:root[data-theme="dark"] #theme .ti-rays {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
  transition:
    transform 260ms var(--ti-out),
    opacity 160ms ease-out;
}
:root[data-theme="dark"] #theme .ti-body {
  fill: var(--ti-moon);
  stroke: var(--ti-moon);
  transform: scale(1.55);
  transition:
    transform 520ms var(--ti-spring) 80ms,
    fill 300ms ease 80ms,
    stroke 300ms ease 80ms;
}
:root[data-theme="dark"] #theme .ti-cut {
  transform: translate(0, 0);
  transition: transform 520ms var(--ti-out) 80ms;
}
:root[data-theme="dark"] #theme .ti-stars path {
  opacity: 1;
  transform: scale(1);
  transition:
    transform 360ms var(--ti-spring) 380ms,
    opacity 200ms ease-out 380ms;
}
:root[data-theme="dark"] #theme .ti-stars path + path {
  transition-delay: 460ms;
}
@media (hover: hover) {
  #theme:hover .ti-spin {
    transform: rotate(45deg);
  }
  :root[data-theme="dark"] #theme:hover .ti-tilt {
    transform: rotate(-14deg);
  }
}
#theme:active .theme-icon {
  transform: scale(0.92);
}
@media (prefers-reduced-motion: reduce) {
  #theme .theme-icon,
  #theme .theme-icon * {
    transition: none !important;
  }
}

/* ---------- Admin dashboard ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.admin-content {
  display: grid;
  gap: 24px;
  min-width: 0;
}
.admin-content .admin-title {
  margin-bottom: 0;
}
.admin-title .button {
  flex: none;
}
.admin-loading {
  display: grid;
  gap: 16px;
}
.admin-loading span {
  height: 96px;
  border-radius: 12px;
  background: linear-gradient(
      90deg,
      var(--soft) 30%,
      color-mix(in srgb, var(--soft) 55%, var(--paper)) 50%,
      var(--soft) 70%
    )
    0 0 / 300% 100%;
  animation: admin-shimmer 1.4s linear infinite;
}
.admin-loading span:first-child {
  height: 56px;
  width: 50%;
}
@keyframes admin-shimmer {
  to {
    background-position: -150% 0;
  }
}
.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.panel-head h2 {
  margin: 0;
}
.panel-head > span {
  color: var(--muted);
  font-size: 13px;
}
.app-content .admin-columns-even {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

/* Headline numbers */
.admin-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.admin-kpis.admin-kpis-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.admin-kpi {
  display: grid;
  gap: 4px;
  align-content: start;
  padding: 20px;
  border-radius: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-raise);
  min-width: 0;
}
.admin-kpi > span {
  color: var(--muted);
  font-size: 13px;
}
.admin-kpi > b {
  font-size: 30px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.admin-kpi > small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

/* Status badges: palette hues, always with a word, never colour alone */
.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  line-height: 20px;
  white-space: nowrap;
  background: var(--soft);
  color: var(--muted);
}
.admin-badge::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.admin-badge[data-tone="ok"] {
  background: var(--green-wash);
  color: var(--green);
}
.admin-badge[data-tone="warn"] {
  background: color-mix(in srgb, var(--amber) 14%, var(--paper));
  color: var(--amber);
}
.admin-badge[data-tone="bad"] {
  background: var(--red-wash);
  color: var(--red);
}
.admin-badge[data-tone="info"] {
  background: var(--blue-wash);
  color: var(--blue);
}
.admin-dot {
  display: inline-block;
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--muted);
}
.admin-dot[data-tone="ok"] {
  background: var(--green);
}
.admin-dot[data-tone="warn"] {
  background: var(--amber);
}
.admin-dot[data-tone="bad"] {
  background: var(--red);
}

/* Attention list and people */
.admin-attention,
.admin-people {
  list-style: none;
  margin: 0;
  padding: 0;
}
.admin-attention a {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 8px 12px;
  margin-inline: -12px;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  transition: background-color 150ms ease;
}
.admin-attention li + li {
  border-top: 1px solid var(--line);
}
@media (hover: hover) {
  .admin-attention a:hover {
    background: var(--soft);
  }
}
.admin-attention a > span:last-child {
  color: var(--muted);
}
.admin-allclear {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.admin-people li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
}
.admin-people li + li {
  border-top: 1px solid var(--line);
}
.admin-avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--blue-wash);
  color: var(--blue);
  font-size: 13px;
  font-weight: 500;
}
.admin-people .admin-email {
  flex: 1;
}
.admin-email {
  overflow-wrap: anywhere;
  min-width: 0;
}
.order-table td small,
.admin-email small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}
.order-table td.num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.order-table tr[data-selected] td {
  background: var(--blue-wash);
}

/* Activity chart: single series, thin bars, 4px rounded tops, 2px gaps */
.admin-chart {
  position: relative;
  margin: 0;
}
.admin-bars {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  gap: 2px;
  height: 168px;
  padding-bottom: 24px;
  background: linear-gradient(var(--line), var(--line)) 0 calc(100% - 24px) /
    100% 1px no-repeat;
}
.admin-bar {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  outline: none;
}
.admin-bar::before {
  content: "";
  width: min(18px, 70%);
  height: var(--h);
  border-radius: 4px 4px 0 0;
  background: var(--blue);
  opacity: 0.85;
  transition: opacity 150ms ease;
}
.admin-bar:hover::before,
.admin-bar:focus-visible::before {
  opacity: 1;
}
.admin-bar:focus-visible {
  box-shadow: inset 0 0 0 2px var(--muted);
  border-radius: 6px;
}
.admin-bar em {
  position: absolute;
  bottom: -22px;
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.admin-bar:first-child em {
  left: 0;
}
.admin-bar:last-child em {
  right: 0;
}
.admin-tip {
  position: absolute;
  bottom: calc(var(--h) + 8px);
  left: 50%;
  z-index: 2;
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 4px);
  transition:
    opacity 120ms ease,
    transform 120ms ease;
}
.admin-tip b {
  font-weight: 500;
}
.admin-bar:nth-child(-n + 3) .admin-tip {
  left: 0;
  transform: translate(0, 4px);
}
.admin-bar:nth-last-child(-n + 3) .admin-tip {
  left: auto;
  right: 0;
  transform: translate(0, 4px);
}
.admin-bar:hover .admin-tip,
.admin-bar:focus-visible .admin-tip {
  opacity: 1;
  transform: translate(-50%, 0);
}
.admin-bar:nth-child(-n + 3):hover .admin-tip,
.admin-bar:nth-child(-n + 3):focus-visible .admin-tip,
.admin-bar:nth-last-child(-n + 3):hover .admin-tip,
.admin-bar:nth-last-child(-n + 3):focus-visible .admin-tip {
  transform: translate(0, 0);
}
.admin-chart-empty {
  position: absolute;
  inset: 0 0 auto;
  height: 144px;
  display: grid;
  place-items: center;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  pointer-events: none;
}
.admin-chart figcaption {
  margin-top: 20px;
}
.admin-chart summary {
  cursor: pointer;
  color: var(--blue);
  font-size: 13px;
}
.admin-chart details .table-wrap {
  margin-top: 12px;
}

/* Filter chips */
.admin-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.admin-filters button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition:
    background-color 150ms ease,
    border-color 150ms ease;
}
.admin-filters button span {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.admin-filters button[aria-pressed="true"] {
  background: var(--blue-wash);
  border-color: var(--blue);
  color: var(--blue);
}
.admin-filters button[aria-pressed="true"] span {
  color: inherit;
}

/* Reports */
.admin-reports {
  display: grid;
  gap: 16px;
}
.admin-report blockquote {
  margin: 0 0 16px;
  padding: 12px 16px;
  border-inline-start: 3px solid var(--line);
  background: var(--soft);
  border-radius: 0 8px 8px 0;
  font-size: 15px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.admin-report-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.admin-empty {
  padding: 32px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 12px;
}
.admin-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.health-checks li {
  align-items: center;
}

/* Switch between the admin panel and the learning environment */
.side-switch {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  margin-bottom: 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow-raise);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 150ms ease;
}
.side-switch .ui-icon {
  flex: none;
  color: var(--blue);
}
.side-switch b {
  display: block;
  font-size: 14px;
  font-weight: 500;
}
.side-switch small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  margin-top: 2px;
}
@media (hover: hover) {
  .side-switch:hover {
    border-color: var(--blue);
  }
}

@media (max-width: 1100px) {
  .admin-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .app-content .admin-columns-even {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 560px) {
  .admin-kpis,
  .admin-kpis.admin-kpis-3 {
    grid-template-columns: minmax(0, 1fr);
  }
  .admin-kpi > b {
    font-size: 26px;
  }
  .admin-field-row {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  .admin-loading span {
    animation: none;
  }
  .admin-tip {
    transition: none;
  }
}
.admin-orders .admin-order-end {
  display: grid;
  justify-items: end;
  gap: 4px;
  font-variant-numeric: tabular-nums;
}
.admin-orders .admin-order-end b {
  font-weight: 500;
}
.admin-content .order-table th,
.admin-content .order-table td {
  text-align: left;
}
/* Room above the tallest bar for its tooltip */
.admin-bars {
  height: 224px;
  padding-top: 56px;
}
.admin-chart-empty {
  top: 56px;
}

/* ---------- App sidebar: full-bleed column, extras right under the menu ---------- */
@media (min-width: 1101px) {
  /* On wide screens the white column runs to the window edge, so the page
     no longer shows an empty grey strip left of the menu. The menu itself
     stays on the same grid line as every other page. */
  .app-sidebar::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    right: 100%;
    width: 100vw;
    background: var(--paper);
    pointer-events: none;
  }
  .app-sidebar .side-promo {
    margin-top: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
  }
  .app-sidebar .side-legal {
    margin-top: auto;
    padding-top: 20px;
  }
}
.side-count {
  margin-left: auto;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--red-wash);
  color: var(--red);
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.side-status {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  padding: 16px;
  border-radius: 10px;
  background: var(--soft);
}
.side-status:empty {
  display: none;
}
.side-status > b {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}
.side-status ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.side-status li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  color: var(--ink);
}
.side-setup {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
}
.side-setup b {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.side-meter {
  grid-column: 1 / -1;
  height: 6px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.side-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}
@media (hover: hover) {
  .side-setup:hover b {
    color: var(--blue);
  }
}

/* ---------- Category dashboard and study material ---------- */
.study-dashboard,
.study-index {
  gap: 32px;
}
.section-head {
  margin-bottom: 16px;
}
.section-head h2 {
  margin: 0 0 6px;
}
.section-head p {
  margin: 0;
  color: var(--muted);
  max-width: 64ch;
}

/* Shared: meter + status chip */
.cat-meter {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.cat-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}
[data-status="weak"] .cat-meter i,
.focus-list .cat-meter i {
  background: var(--blue);
}
.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  line-height: 20px;
  white-space: nowrap;
  background: var(--soft);
  color: var(--muted);
}
.cat-chip::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.cat-chip[data-tone="ok"] {
  background: var(--green-wash);
  color: var(--green);
}
.cat-chip[data-tone="warn"] {
  background: color-mix(in srgb, var(--amber) 14%, var(--paper));
  color: var(--amber);
}
.cat-chip[data-tone="bad"] {
  background: var(--red-wash);
  color: var(--red);
}
.cat-num {
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 500;
  color: var(--blue);
}

/* Dashboard top */
.dash-top {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 20px;
}
.dash-next {
  position: relative;
  overflow: hidden;
  padding: 32px;
  border-radius: 16px;
  background:
    radial-gradient(120% 140% at 100% 0%, var(--blue-wash), transparent 60%),
    var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-raise);
}
.dash-next h2 {
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 8px 0 12px;
}
.dash-next p {
  color: var(--muted);
  max-width: 52ch;
  margin: 0 0 24px;
}
.dash-stats {
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow-raise);
}
.dash-stats > div {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 16px 24px;
}
.dash-stats > div + div {
  border-top: 1px solid var(--line);
}
.dash-stats b {
  min-width: 72px;
  font-size: 28px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.dash-stats b small {
  font-size: 16px;
  color: var(--muted);
}
.dash-stats span {
  color: var(--muted);
  font-size: 14px;
}

/* Learn → practise → exam */
.dash-paths {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.dash-path {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow-raise);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 150ms ease;
}
.dash-path b {
  display: block;
  font-size: 16px;
  font-weight: 500;
}
.dash-path small {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  margin-top: 2px;
}
.dash-path > .ui-icon {
  color: var(--muted);
}
.dash-step {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font-weight: 500;
  box-shadow: inset 0 0 0 2px rgb(255 255 255 / 0.35);
}
@media (hover: hover) {
  .dash-path:hover,
  .cat-card:hover,
  .study-card:hover,
  .extra-tile:hover {
    border-color: var(--blue);
  }
}

/* Focus list */
.focus-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: focus;
}
.focus-list li {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(80px, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
}
.focus-list li + li {
  border-top: 1px solid var(--line);
}
.focus-name b {
  display: block;
  font-weight: 500;
}
.focus-name small {
  color: var(--muted);
  font-size: 13px;
}
.focus-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Category grid */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.cat-card {
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 14px;
  padding: 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow-raise);
  transition: border-color 150ms ease;
  min-width: 0;
}
.cat-card-main {
  display: grid;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
}
.cat-title b {
  display: block;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
}
.cat-title small {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}
.cat-progress {
  display: grid;
  gap: 6px;
}
.cat-progress > span {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.cat-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  font-size: 13px;
}
.cat-actions .cat-chip {
  margin-right: auto;
}

/* Extra practice tiles */
.dash-extra {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.extra-tile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 150ms ease;
  min-width: 0;
}
.extra-tile > svg,
.extra-icon {
  flex: none;
  width: 44px;
  height: 44px;
}
.extra-icon {
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--blue-wash);
  color: var(--blue);
}
.extra-tile b {
  display: block;
  font-weight: 500;
}
.extra-tile small {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

/* ---------- Leerstof overview ---------- */
.study-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  align-items: start;
}
.study-intro p {
  margin: 0 0 12px;
  color: var(--muted);
  max-width: 66ch;
  line-height: 1.6;
}
.study-lock-note {
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--soft);
}
.study-tip {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  padding: 18px 20px;
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  text-decoration: none;
  box-shadow: var(--shadow-float);
}
.study-tip span {
  grid-column: 1;
  font-size: 12px;
  opacity: 0.85;
}
.study-tip b {
  grid-column: 1;
  font-size: 18px;
  font-weight: 500;
}
.study-tip small {
  grid-column: 1;
  font-size: 13px;
  opacity: 0.85;
}
.study-tip .ui-icon {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: center;
}
.study-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.study-card {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 24px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow-raise);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 150ms ease;
  min-width: 0;
}
.study-card h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
}
.study-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.study-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- One category ---------- */
.study-page {
  display: grid;
  gap: 28px;
}
.study-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 32px;
  align-items: center;
  padding: 28px 32px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 140% at 100% 0%, var(--blue-wash), transparent 55%),
    var(--paper);
  box-shadow: var(--shadow-raise);
}
.study-lead {
  font-size: 17px;
  line-height: 1.6;
  margin: 8px 0 20px;
  max-width: 62ch;
}
.study-score {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.study-ring {
  --p: 0;
  display: grid;
  place-content: center;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background:
    radial-gradient(closest-side, var(--paper) 80%, transparent 81%),
    conic-gradient(var(--blue) calc(var(--p) * 1%), var(--line) 0);
}
.study-ring b {
  font-size: 28px;
  font-weight: 500;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.study-ring small {
  font-size: 12px;
}
.study-numbers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}
.study-numbers > div {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--blue);
}
.study-numbers b {
  font-size: 24px;
  font-weight: 500;
  line-height: 1.1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.study-numbers span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}
.study-body {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}
.study-toc {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 10px;
  font-size: 14px;
}
.study-toc > b {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}
.study-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
  border-left: 2px solid var(--line);
}
.study-toc a {
  display: block;
  padding: 6px 12px;
  margin-left: -2px;
  border-left: 2px solid transparent;
  color: var(--muted);
  text-decoration: none;
  line-height: 1.4;
  transition:
    color 150ms ease,
    border-color 150ms ease;
}
@media (hover: hover) {
  .study-toc a:hover {
    color: var(--ink);
    border-left-color: var(--blue);
  }
}
.study-toc .lock {
  font-size: 11px;
  color: var(--muted);
}
.study-content {
  display: grid;
  gap: 20px;
  max-width: 760px;
  min-width: 0;
}
.study-section {
  scroll-margin-top: 96px;
  padding: 28px 32px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--paper);
}
.study-section h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  font-size: 22px;
  line-height: 1.25;
  text-wrap: balance;
}
.study-section h2 > span {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--blue-wash);
  color: var(--blue);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.study-section > p {
  margin: 0 0 14px;
  line-height: 1.7;
  font-size: 16px;
  text-wrap: pretty;
}
.study-section.is-locked {
  background: var(--soft);
  color: var(--muted);
}
.study-section.is-locked p {
  margin: 0;
}
.study-remember {
  margin-top: 8px;
  padding: 16px 18px;
  border-radius: 10px;
  background: var(--blue-wash);
}
.study-remember b,
.study-pitfall b {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 8px;
}
.study-remember b {
  color: var(--blue);
}
.study-remember ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.study-remember li {
  position: relative;
  padding-left: 22px;
  line-height: 1.5;
}
.study-remember li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.45em;
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--blue);
  border-bottom: 2px solid var(--blue);
  transform: rotate(-45deg);
}
.study-pitfall {
  margin-top: 12px;
  padding: 14px 18px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--amber) 12%, var(--paper));
  border-left: 3px solid var(--amber);
}
.study-pitfall b {
  color: var(--amber);
}
.study-pitfall p {
  margin: 0;
  line-height: 1.55;
}
.study-sign-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.study-sign-grid figure {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin: 0;
  padding: 14px 10px;
  border-radius: 10px;
  background: var(--soft);
  text-align: center;
}
.study-sign-grid svg {
  width: 64px;
  height: 64px;
}
.study-sign-grid figcaption b {
  display: block;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}
.study-sign-grid figcaption small {
  color: var(--muted);
  font-size: 11px;
}
.study-labs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.study-lab {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}
.study-lab img {
  width: 100%;
  height: auto;
  border-radius: 6px;
}
.study-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 32px;
  border-radius: 14px;
  background: var(--blue);
  color: #fff;
  box-shadow: var(--shadow-float);
}
.study-cta h2 {
  margin: 0 0 6px;
  color: inherit;
}
.study-cta p {
  margin: 0;
  opacity: 0.9;
  max-width: 52ch;
}
.study-cta .button {
  flex: none;
  background: #fff;
  color: var(--blue);
}
.study-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.study-pager a {
  display: grid;
  gap: 2px;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}
.study-pager a.next {
  text-align: right;
  grid-column: 2;
}
.study-pager small {
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 1200px) {
  .cat-grid,
  .dash-extra {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 1000px) {
  .dash-top,
  .study-intro {
    grid-template-columns: minmax(0, 1fr);
  }
  .dash-paths {
    grid-template-columns: minmax(0, 1fr);
  }
  .study-body {
    grid-template-columns: minmax(0, 1fr);
  }
  .study-toc {
    position: static;
  }
  .study-toc ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-left: 0;
    gap: 4px 16px;
  }
  .study-toc a {
    border-left: 0;
    padding: 4px 0;
  }
}
@media (max-width: 700px) {
  .cat-grid,
  .dash-extra,
  .study-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .study-hero {
    grid-template-columns: minmax(0, 1fr);
    padding: 24px 20px;
  }
  .study-score {
    grid-template-columns: auto 1fr;
    justify-items: start;
    text-align: left;
    align-items: center;
  }
  .study-ring {
    width: 88px;
    height: 88px;
    grid-row: span 2;
  }
  .study-ring b {
    font-size: 20px;
  }
  .study-section {
    padding: 22px 18px;
  }
  .study-section h2 {
    font-size: 19px;
  }
  .study-cta {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 20px;
  }
  .focus-list li {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .focus-list .cat-meter {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .focus-links {
    grid-column: 1 / -1;
  }
  .dash-next {
    padding: 24px 20px;
  }
  .dash-next h2 {
    font-size: 24px;
  }
  .study-toc ol {
    grid-template-columns: minmax(0, 1fr);
  }
}
.admin-cats {
  list-style: none;
  margin: 0;
  padding: 0;
}
.admin-cats li {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(120px, 2fr) minmax(0, 1.6fr);
  align-items: center;
  gap: 16px;
  padding: 10px 0;
  font-size: 14px;
}
.admin-cats li + li {
  border-top: 1px solid var(--line);
}
.admin-cats li > span:last-child {
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 700px) {
  .admin-cats li {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }
}
.dash-stats {
  align-content: stretch;
}
.dash-stats > div {
  align-items: center;
}
.dash-stats b {
  display: inline-flex;
  align-items: baseline;
  white-space: nowrap;
}
.dash-next {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.study-cta h2,
.study-cta p {
  color: #fff;
}
.study-cta p {
  opacity: 0.92;
}
.cat-actions .cat-chip {
  flex-basis: 100%;
  width: fit-content;
  max-width: fit-content;
  margin-right: 0;
}
.study-section > p {
  color: var(--ink);
}
/* Text on a blue surface follows the page surface colour, so it stays
   readable in dark mode where the blue is light. */
.study-tip,
.study-cta,
.study-cta h2,
.study-cta p,
.dash-step {
  color: var(--paper);
}
.study-cta .button {
  background: var(--paper);
  color: var(--blue);
}
.cat-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 1200px) {
  .cat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .cat-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.study-pitfall p {
  color: var(--ink);
}
