/* Base, layout and components. Tokens live in tokens.css. */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-ui);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-body);
  background: var(--surface-page);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  color: var(--text-strong);
  line-height: var(--leading-tight);
  font-weight: 700;
  text-wrap: balance;
}

a {
  color: var(--accent);
  text-underline-offset: 2px;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Motion ──────────────────────────────────────────────────────────── */

@keyframes fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes breathe {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

.animate-in { animation: fade-up var(--dur-slow) var(--ease-out) both; }
.breathe { animation: breathe 1.6s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── App frame ───────────────────────────────────────────────────────── */

.app {
  display: grid;
  grid-template-columns: var(--rail-width) 1fr;
  min-height: 100vh;
  min-height: 100dvh; /* mobile browsers: the visible height, not behind the URL bar */
}

.app__rail {
  background: var(--surface-card);
  border-inline-start: 1px solid var(--border-subtle);
  padding: var(--space-4) var(--space-3) var(--space-6);
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
}

.app__main {
  min-width: 0;
  padding: var(--space-5) var(--space-6) var(--space-8);
  max-width: var(--content-max);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-2) var(--space-5);
  font-weight: 800;
  font-size: var(--text-md);
  color: var(--text-strong);
}

.brand__mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: var(--accent-wash);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-md);
  font-size: 1rem;
}

/* ── Rail navigation ─────────────────────────────────────────────────── */

.nav-group { margin-bottom: var(--space-4); }

.nav-group__title {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-faint);
  letter-spacing: 0.06em;
  padding: var(--space-2);
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-2) var(--space-3);
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-body);
  font-size: var(--text-sm);
  text-align: start;
  cursor: pointer;
  transition: background var(--dur-fast), color var(--dur-fast);
}

.nav-item:hover { background: var(--surface-sunken); color: var(--text-strong); }

.nav-item[aria-current='true'] {
  background: var(--accent-wash);
  color: var(--accent);
  font-weight: 600;
}

.nav-item__icon { font-size: 1rem; line-height: 1; }
.nav-item__label { flex: 1; min-width: 0; }

.nav-item__meter {
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums;
  color: var(--text-faint);
}

.nav-sub {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-1) var(--space-3) var(--space-1) var(--space-2);
  margin-inline-start: var(--space-4);
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: var(--text-xs);
  text-align: start;
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.nav-sub:hover { color: var(--text-strong); background: var(--surface-sunken); }
.nav-sub[aria-current='true'] { color: var(--accent); font-weight: 600; }

.nav-sub__dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--border-strong);
  flex: none;
}

.nav-sub__dot--done { background: var(--normal); }
.nav-sub__dot--active { background: var(--accent); }

/* ── Primitives ──────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--dur-fast), border-color var(--dur-fast),
    transform var(--dur-fast), color var(--dur-fast);
}

.btn:active { transform: translateY(1px); }

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn--primary { background: var(--accent); color: var(--text-on-accent); }
.btn--primary:hover:not(:disabled) { background: var(--accent-hover); }

.btn--secondary {
  background: var(--surface-card);
  color: var(--text-strong);
  border-color: var(--border-default);
}
.btn--secondary:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }

.btn--ghost { background: transparent; color: var(--text-muted); }
.btn--ghost:hover:not(:disabled) { background: var(--surface-sunken); color: var(--text-strong); }

.btn--sm { padding: var(--space-1) var(--space-3); font-size: var(--text-xs); }
.btn--block { width: 100%; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 2px var(--space-2);
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
}

.chip--normal { background: var(--normal-wash); color: var(--normal); border-color: currentColor; }
.chip--disease { background: var(--disease-wash); color: var(--disease); border-color: currentColor; }
.chip--expert { background: var(--expert-wash); color: var(--expert); border-color: currentColor; }
.chip--neutral { background: var(--surface-sunken); color: var(--text-muted); border-color: var(--border-default); }
.chip--accent { background: var(--accent-wash); color: var(--accent); border-color: currentColor; }

.card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}

.card--flush { padding: 0; overflow: hidden; }

.callout {
  border-inline-start: 3px solid var(--border-strong);
  background: var(--surface-sunken);
  padding: var(--space-3) var(--space-4);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: var(--space-4) 0;
  font-size: var(--text-sm);
}

.callout--key { border-color: var(--normal); background: var(--normal-wash); }
.callout--warn { border-color: var(--disease); background: var(--disease-wash); }
.callout--note { border-color: var(--accent); background: var(--accent-wash); }
.callout--caution { border-color: var(--caution); background: var(--caution-wash); }
.callout__title { font-weight: 700; color: var(--text-strong); display: block; margin-bottom: 2px; }

/* ── Prose ───────────────────────────────────────────────────────────── */

.prose { font-size: var(--text-base); line-height: var(--leading-prose); color: var(--text-body); }
.prose > * + * { margin-top: var(--space-3); }
.prose h3 { font-size: var(--text-md); margin-top: var(--space-5); }
.prose ul, .prose ol { padding-inline-start: var(--space-5); }
.prose li + li { margin-top: var(--space-1); }
.prose strong { color: var(--text-strong); font-weight: 600; }
.prose code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--surface-sunken);
  padding: 1px 5px;
  border-radius: var(--radius-sm);
  direction: ltr;
  display: inline-block;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  margin: var(--space-4) 0;
}

.data-table th,
.data-table td {
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border-subtle);
  text-align: start;
}

.data-table th {
  background: var(--surface-sunken);
  font-weight: 600;
  color: var(--text-strong);
}

.data-table td:nth-child(2) { font-variant-numeric: tabular-nums; }

/* ── Lesson player ───────────────────────────────────────────────────── */

.lesson {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--aside-width);
  gap: var(--space-5);
  align-items: start;
}

.lesson { scroll-margin-top: calc(72px + env(safe-area-inset-top)); } /* clears the phone top bar on step changes */

.lesson__aside { position: sticky; top: var(--space-5); display: grid; gap: var(--space-4); }

.lesson__head { margin-bottom: var(--space-5); }

.lesson__eyebrow {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.lesson__title { font-size: var(--text-xl); }

.lesson__sub { color: var(--text-muted); font-size: var(--text-sm); margin-top: var(--space-1); }

.progress {
  display: flex;
  gap: 3px;
  margin: var(--space-4) 0;
}

.progress__seg {
  height: 4px;
  flex: 1;
  border-radius: var(--radius-pill);
  background: var(--border-default);
  transition: background var(--dur-normal);
}

.progress__seg--done { background: var(--normal); }
.progress__seg--active { background: var(--accent); }

/* Review mode: the segments are buttons. A taller hit area, same visual bar. */
.progress--jump .progress__seg {
  height: 14px;
  border: 0;
  padding: 0;
  cursor: pointer;
  background-clip: content-box;
  padding-block: 5px;
}
.progress--jump .progress__seg:hover { background-color: var(--accent-wash, var(--border-strong)); }
.progress--jump .progress__seg:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.review-panel {
  border: 1px dashed var(--accent);
  border-radius: var(--radius-md, 8px);
  background: var(--accent-wash, transparent);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
  font-size: var(--text-xs);
}
.review-panel__head {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  font-weight: 700;
  color: var(--accent);
  margin-bottom: var(--space-2);
}
.review-panel__rows {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 2px var(--space-3);
  margin: 0;
}
.review-panel__rows dt { color: var(--text-muted); }
.review-panel__rows dd { margin: 0; word-break: break-word; }
.review-panel__key { margin: var(--space-2) 0 0; padding-inline-start: var(--space-5); }
.review-panel__note { margin-top: var(--space-2); color: var(--text-muted); }

.review-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  cursor: pointer;
}
.review-banner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.step-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-subtle);
}

.step-nav__status { font-size: var(--text-xs); color: var(--text-muted); }

/* The instructor track: what makes this read as a taught session, not a document. */
.narration {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-3);
  align-items: start;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
  box-shadow: var(--shadow-sm);
}

.narration__avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-pill);
  background: var(--accent-wash);
  border: 1px solid var(--accent-line);
  display: grid;
  place-items: center;
  font-size: 1rem;
  flex: none;
}

.narration__speaker {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 2px;
}

.narration__text { font-size: var(--text-base); line-height: var(--leading-prose); }

/* ── Viewer ──────────────────────────────────────────────────────────── */

/* minmax(0, 1fr): without it the grid track takes the min-content width of
   its widest child (a toolbar row, or the cornerstone canvas at the size it
   was enabled with), and in the two-column comparison the viewer then spills
   past its pane and off the page. */
.viewer { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-3); min-width: 0; }

.viewer__stage {
  position: relative;
  background: var(--surface-stage-deep);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.viewer__canvas {
  width: 100%;
  height: clamp(340px, 52vh, 560px);
  background: #000;
  cursor: crosshair;
  touch-action: none;
}

.viewer__overlay-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.viewer__hud {
  position: absolute;
  top: var(--space-3);
  inset-inline-start: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.5;
  color: oklch(85% 0.17 150);
  background: oklch(0% 0 0 / 0.72);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  pointer-events: none;
  direction: ltr;
  text-align: left;
  z-index: 3;
}

.viewer__hud-row { display: flex; gap: var(--space-3); justify-content: space-between; }
.viewer__hud-key { opacity: 0.65; }

/* Shown over the stage while the second pass fills in the remaining slices. */
.viewer__densifying {
  position: absolute;
  top: var(--space-3);
  inset-inline-end: var(--space-3);
  max-width: 48%;
  font-size: var(--text-xs);
  line-height: var(--leading-normal);
  color: var(--text-on-dark);
  background: oklch(0% 0 0 / 0.72);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  pointer-events: none;
  z-index: 3;
}

.viewer__probe {
  position: absolute;
  bottom: var(--space-3);
  inset-inline-start: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-on-dark);
  background: oklch(0% 0 0 / 0.72);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  pointer-events: none;
  direction: ltr;
  z-index: 3;
}

.viewer__loading,
.viewer__error {
  display: grid;
  place-items: center;
  gap: var(--space-3);
  min-height: clamp(340px, 52vh, 560px);
  padding: var(--space-5);
  text-align: center;
  color: var(--text-on-dark);
}

.viewer__error { color: oklch(72% 0.18 25); }

.viewer__progress-track {
  width: min(320px, 70%);
  height: 4px;
  background: oklch(100% 0 0 / 0.15);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.viewer__progress-fill {
  height: 100%;
  background: var(--accent);
  transition: width var(--dur-normal) var(--ease-out);
}

/* ── Viewer controls ─────────────────────────────────────────────────── */

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  padding: var(--space-3);
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.toolbar__group {
  display: flex;
  flex-wrap: wrap; /* the window presets alone outgrow a half-width comparison pane */
  min-width: 0;
  gap: var(--space-1);
  align-items: center;
  padding-inline-end: var(--space-3);
  border-inline-end: 1px solid var(--border-subtle);
}

.toolbar__group:last-child { border-inline-end: 0; padding-inline-end: 0; }

.toolbar__label {
  font-size: var(--text-xs);
  color: var(--text-faint);
  font-weight: 600;
  margin-inline-end: var(--space-1);
}

.preset-btn {
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  background: var(--surface-card);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-body);
  cursor: pointer;
  transition: all var(--dur-fast);
}

.preset-btn:hover { border-color: var(--accent); color: var(--accent); }

.preset-btn[aria-pressed='true'] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text-on-accent);
}

.viewer__touch-hint {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin: 0;
}

.slice-slider {
  width: 100%;
  direction: ltr;
  accent-color: var(--accent);
}

.segment-legend {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-3);
  background: var(--surface-sunken);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
}

.segment-legend__row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.segment-legend__swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex: none;
  border: 1px solid oklch(0% 0 0 / 0.2);
}

.segment-legend__name { flex: 1; color: var(--text-strong); font-weight: 600; }
.segment-legend__count { color: var(--text-faint); font-variant-numeric: tabular-nums; }

.attribution {
  font-size: var(--text-xs);
  line-height: var(--leading-normal);
  color: var(--text-muted);
  background: var(--surface-sunken);
  border: 1px solid var(--border-subtle);
  padding: var(--space-3);
  border-radius: var(--radius-md);
}

.attribution strong { color: var(--text-body); }

/* ── Comparison ──────────────────────────────────────────────────────── */

.compare { display: grid; gap: var(--space-4); }

.comparison-entry { display: flex; align-items: center; gap: var(--space-4); justify-content: space-between; margin-bottom: var(--space-5); }
.comparison-entry h2 { font-size: var(--text-md); }
.comparison-entry p, .comparison-workspace header p { color: var(--text-muted); margin-top: var(--space-2); }
.comparison-entry .btn { flex-shrink: 0; }
.comparison-workspace { display: grid; gap: var(--space-4); min-width: 0; }
.comparison-picker { display: grid; gap: var(--space-4); min-width: 0; }
.comparison-picker__filters, .comparison-picker__series { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
.comparison-picker label { display: grid; gap: var(--space-2); min-width: 0; }
.comparison-picker select, .comparison-picker input { width: 100%; min-width: 0; padding: var(--space-3); border: 1px solid var(--border-default); border-radius: var(--radius-md); background: var(--surface-card); color: var(--text-strong); font: inherit; }
.comparison-picker__note { font-size: var(--text-xs); color: var(--text-muted); }
.comparison-picker > .btn { justify-self: start; }
@media (max-width: 600px) {
  .comparison-entry { align-items: stretch; flex-direction: column; }
  .comparison-picker__filters, .comparison-picker__series { grid-template-columns: minmax(0, 1fr); }
}

.compare__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.compare__toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  cursor: pointer;
}

.compare__toggle input:disabled { cursor: not-allowed; }
.compare__toggle:has(input:disabled) { opacity: 0.5; cursor: not-allowed; }

.compare__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
  align-items: start;
}

.compare__pane { min-width: 0; display: grid; gap: var(--space-2); }

.compare__pane-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-strong);
}

.compare__pane-index {
  width: 22px;
  height: 22px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: var(--radius-pill);
  background: var(--accent-wash);
  border: 1px solid var(--accent-line);
  color: var(--accent);
  font-size: var(--text-xs);
  font-weight: 700;
}

/* Two full workstations side by side stop being readable well before phone
   width, so they stack and each keeps its own full toolbar. */
@media (max-width: 1100px) {
  .compare__grid { grid-template-columns: minmax(0, 1fr); }
}

/* ── Quiz ────────────────────────────────────────────────────────────── */

.quiz__stem {
  font-size: var(--text-md);
  color: var(--text-strong);
  font-weight: 600;
  margin-bottom: var(--space-4);
  line-height: var(--leading-normal);
}

.quiz__options { display: grid; gap: var(--space-2); }

.quiz__option {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--surface-card);
  text-align: start;
  font-size: var(--text-sm);
  cursor: pointer;
  transition: border-color var(--dur-fast), background var(--dur-fast);
}

.quiz__option:hover:not(:disabled) { border-color: var(--accent); }
.quiz__option:disabled { cursor: default; }

.quiz__option--correct {
  border-color: var(--normal);
  background: var(--normal-wash);
  color: var(--normal);
  font-weight: 600;
}

.quiz__option--wrong {
  border-color: var(--disease);
  background: var(--disease-wash);
  color: var(--disease);
}

.quiz__marker {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-pill);
  border: 1px solid currentColor;
  display: grid;
  place-items: center;
  font-size: var(--text-xs);
  font-weight: 700;
  flex: none;
  opacity: 0.7;
}

.quiz__explain {
  margin-top: var(--space-4);
  padding: var(--space-4);
  background: var(--accent-wash);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  line-height: var(--leading-prose);
}

/* ── Dashboard ───────────────────────────────────────────────────────── */

.hero {
  padding: var(--space-6);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(120% 140% at 85% 0%, var(--accent-wash), transparent 60%),
    var(--surface-card);
  border: 1px solid var(--border-subtle);
  margin-bottom: var(--space-6);
}

.hero__title { font-size: var(--text-2xl); margin-bottom: var(--space-3); }
.hero__lead { font-size: var(--text-md); color: var(--text-body); max-width: 62ch; line-height: var(--leading-prose); }

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
  margin-top: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border-subtle);
}

.stat__value {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.stat__label { font-size: var(--text-xs); color: var(--text-muted); }

.region-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: var(--space-4);
}

.region-card {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-5);
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  text-align: start;
  cursor: pointer;
  transition: transform var(--dur-normal) var(--ease-out),
    box-shadow var(--dur-normal), border-color var(--dur-fast);
}

.region-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-default);
}

.region-card__icon { font-size: 1.6rem; }
.region-card__title { font-size: var(--text-md); font-weight: 700; color: var(--text-strong); }
.region-card__desc { font-size: var(--text-sm); color: var(--text-muted); }
.region-card__meta { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-top: auto; }

.region-card__bar {
  height: 3px;
  background: var(--border-default);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.region-card__bar-fill { height: 100%; background: var(--normal); transition: width var(--dur-slow) var(--ease-out); }

/* ── Home page: principles, body figure, tracker, lesson picker ──────── */

.home { display: grid; gap: var(--space-5); }
.home__intro { display: grid; gap: var(--space-2); }
.home__title { font-size: var(--text-xl); }
.home__lead { color: var(--text-body); font-size: var(--text-md); max-width: 60ch; }
.home__heading { font-size: var(--text-md); margin-bottom: var(--space-3); color: var(--text-strong); }
.home__footer { display: flex; gap: var(--space-3); align-items: center; }
.home__about summary { cursor: pointer; font-weight: 700; color: var(--text-strong); }
.home__about[open] summary { margin-bottom: var(--space-3); }
.evidence { display: grid; gap: var(--space-1); color: var(--text-muted); }
.evidence strong { color: var(--text-body); }

.principle:focus-visible,
.station:focus-visible,
.picker__lesson:focus-visible,
.filter-chip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.principles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
}

.principle {
  display: grid;
  gap: var(--space-2);
  align-content: start;
  padding: var(--space-4);
  text-align: start;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: transform var(--dur-normal) var(--ease-out),
    box-shadow var(--dur-normal), border-color var(--dur-fast);
}

.principle:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-line);
}

.principle__mark {
  inline-size: 2.6rem;
  block-size: 2.6rem;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: var(--accent-wash);
  color: var(--accent);
  font-weight: 800;
  font-size: var(--text-sm);
  letter-spacing: 0.04em;
}

.principle--done .principle__mark { background: var(--normal-wash); color: var(--normal); }
.principle__name { font-weight: 700; color: var(--text-strong); font-size: var(--text-md); }
.principle__blurb { font-size: var(--text-sm); color: var(--text-muted); min-height: 2.6em; }
.principle__count { font-size: var(--text-xs); color: var(--text-faint); }

/* A progress bar that grows by transform, from the right edge (RTL start). */
.gauge {
  display: block;
  height: 4px;
  background: var(--border-default);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.gauge__fill {
  display: block;
  height: 100%;
  background: var(--normal);
  transform-origin: right center;
  transition: transform var(--dur-slow) var(--ease-out);
}

.home__stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--aside-width);
  gap: var(--space-5);
  align-items: start;
}

.bodymap__grid {
  display: grid;
  grid-template-columns: minmax(200px, 300px) minmax(0, 1fr);
  gap: var(--space-5);
  align-items: center;
}

.bodymap__figure { display: grid; justify-items: center; gap: var(--space-2); }
.bodymap__caption { font-size: var(--text-sm); color: var(--text-muted); text-align: center; min-height: 2.8em; }

.figure { inline-size: 100%; max-inline-size: 250px; block-size: auto; overflow: visible; }

.figure__part {
  cursor: pointer;
  fill: var(--surface-sunken);
  stroke: var(--border-strong);
  stroke-width: 2;
  transform-box: fill-box;
  transform-origin: center;
  transition: fill var(--dur-fast), stroke var(--dur-fast), transform var(--dur-normal) var(--ease-out);
}

.figure__part--empty { stroke-dasharray: 5 4; }
.figure__part--started { fill: var(--accent-wash); stroke: var(--accent-line); }
.figure__part--done { fill: var(--normal-wash); stroke: var(--normal); }

.figure__part:hover,
.figure__part--hot {
  fill: var(--accent);
  stroke: var(--accent);
  transform: scale(1.04);
}

.figure__part:active { transform: scale(0.98); }

.stations { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-2); }

.station {
  inline-size: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-1) var(--space-3);
  align-items: center;
  padding: var(--space-3) var(--space-4);
  text-align: start;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--dur-fast), background var(--dur-fast),
    transform var(--dur-normal) var(--ease-out);
}

.station .gauge { grid-column: 1 / -1; }

/* The figure is on the right of the list (RTL), so a hot station leans to it. */
.station:hover,
.station--hot {
  border-color: var(--accent);
  background: var(--accent-wash);
  transform: translateX(4px);
}

.station__name { font-weight: 700; color: var(--text-strong); }
.station__count { font-size: var(--text-sm); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.station--empty .station__name { color: var(--text-muted); }

.selftest {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-top: var(--space-5);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--accent-wash);
  border: 1px solid var(--accent-line);
}

.selftest__title { font-size: var(--text-md); color: var(--text-strong); }
.selftest__text { font-size: var(--text-sm); color: var(--text-body); }

.tracker { display: grid; gap: var(--space-2); position: sticky; top: var(--space-4); }
.tracker__summary { text-align: center; color: var(--text-body); font-size: var(--text-sm); }
.tracker__sub { font-size: var(--text-xs); color: var(--text-faint); margin-top: var(--space-3); }
.tracker__list { list-style: none; padding: 0; margin: 0; display: grid; }

.tracker__row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-1) 0;
  font-size: var(--text-sm);
  color: var(--text-body);
  border-bottom: 1px solid var(--border-subtle);
}

.tracker__num { font-variant-numeric: tabular-nums; color: var(--text-muted); }
.tracker__note { font-size: var(--text-xs); color: var(--text-faint); margin-top: var(--space-2); }

.ring { inline-size: 150px; justify-self: center; }
.ring__track { fill: none; stroke: var(--border-default); stroke-width: 10; }
.ring__fill { fill: none; stroke: var(--normal); stroke-width: 10; stroke-linecap: round; }
.ring__value { font-size: 26px; font-weight: 800; fill: var(--text-strong); }
.ring__label { font-size: 12px; fill: var(--text-muted); }

.picker {
  inline-size: min(720px, 94vw);
  max-block-size: min(86dvh, 820px);
  /* The global reset zeroes margins, which would pin the dialog to a corner. */
  margin: auto;
  padding: 0;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
  color: var(--text-body);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.picker[open] {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  animation: picker-in var(--dur-normal) var(--ease-out);
}

.picker::backdrop { background: oklch(20% 0.02 255 / 0.5); }

@keyframes picker-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
}

.picker__head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-5) var(--space-3);
}

.picker__title { font-size: var(--text-lg); color: var(--text-strong); }
.picker__meta { font-size: var(--text-sm); color: var(--text-muted); }
.picker__filters { display: flex; flex-wrap: wrap; gap: var(--space-2); padding: 0 var(--space-5) var(--space-3); }

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 34px;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-default);
  background: var(--surface-card);
  color: var(--text-body);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: background var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast);
}

.filter-chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--text-on-accent); }
.filter-chip__count { font-size: var(--text-xs); opacity: 0.8; font-variant-numeric: tabular-nums; }

.picker__body { overflow-y: auto; padding: 0 var(--space-5) var(--space-5); overscroll-behavior: contain; }
.picker__group + .picker__group { margin-top: var(--space-4); }

.picker__group-title {
  position: sticky;
  top: 0;
  z-index: 1;
  padding-block: var(--space-1);
  margin-bottom: var(--space-2);
  background: var(--surface-raised);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.picker__list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-2); }

.picker__lesson {
  inline-size: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: var(--space-3);
  min-height: 52px;
  padding: var(--space-3) var(--space-4);
  text-align: start;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--dur-fast), background var(--dur-fast);
}

.picker__lesson:hover { border-color: var(--accent); background: var(--accent-wash); }

.picker__dot {
  inline-size: 22px;
  block-size: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  font-size: 12px;
  color: var(--text-on-accent);
}

.picker__dot--done { background: var(--normal); border-color: var(--normal); }
.picker__lesson-text { display: grid; }
.picker__lesson-title { font-weight: 600; color: var(--text-strong); }
.picker__lesson-sub { font-size: var(--text-xs); color: var(--text-muted); }
.picker__go { color: var(--text-faint); transition: transform var(--dur-fast), color var(--dur-fast); }
.picker__lesson:hover .picker__go { transform: translateX(-3px); color: var(--accent); }
.picker__empty { padding: var(--space-5) 0; color: var(--text-muted); }

@media (max-width: 1180px) {
  .home__stage { grid-template-columns: minmax(0, 1fr); }
  .tracker { position: static; }
  .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .bodymap__grid { grid-template-columns: minmax(0, 1fr); }
  .figure { max-inline-size: 190px; }
  .selftest { flex-direction: column; align-items: stretch; }
  .principle:hover, .station:hover, .station--hot { transform: none; }
  .station { min-height: 48px; }

  /* A bottom sheet: the thumb reaches the lessons without stretching. */
  .picker {
    inline-size: 100vw;
    max-inline-size: 100vw;
    max-block-size: 90dvh;
    margin-block-end: 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
}

@media (max-width: 400px) {
  .principles { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .picker[open] { animation: none; }
  .figure__part, .station, .principle, .gauge__fill { transition: none; }
  .figure__part:hover, .figure__part--hot, .station:hover, .station--hot, .principle:hover { transform: none; }
}

/* ── Responsive ──────────────────────────────────────────────────────── */

@media (max-width: 1180px) {
  .lesson { grid-template-columns: minmax(0, 1fr); }
  .lesson__aside { position: static; }
}

/* Phone and small tablet: the rail becomes a drawer behind a top bar, so the
   first screen is the lesson and not thirteen module names. */
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }

  .app__rail {
    position: fixed;
    top: 0;
    bottom: 0;
    inset-inline-start: 0;
    z-index: 40;
    width: min(86vw, 320px);
    height: 100dvh;
    padding-top: calc(var(--space-4) + env(safe-area-inset-top));
    padding-bottom: calc(var(--space-6) + env(safe-area-inset-bottom));
    box-shadow: var(--shadow-md);
    transform: translateX(105%); /* RTL: inline-start is the right edge */
    visibility: hidden;
    transition: transform var(--dur-normal) var(--ease-out), visibility 0s linear var(--dur-normal);
    overscroll-behavior: contain;
  }

  .app__rail--open {
    transform: none;
    visibility: visible;
    transition: transform var(--dur-normal) var(--ease-out);
  }

  .app__main { padding: var(--space-4) var(--space-4) var(--space-7); }

  /* Finger-sized targets: 44px is the WCAG 2.2 / Apple HIG minimum. */
  .nav-item { min-height: 44px; }
  .nav-sub { min-height: 40px; padding-block: var(--space-2); }
  .preset-btn { min-height: 40px; padding-inline: var(--space-3); font-size: var(--text-sm); }
  .btn { min-height: 44px; }
  .quiz__option { min-height: 48px; }

  .toolbar__group {
    border-inline-end: 0;
    padding-inline-end: 0;
    flex-wrap: wrap;
  }

  /* A fat thumb on the slice slider instead of the 16px desktop default. */
  .slice-slider { height: 32px; }

  /* Hover lift reads as a stuck state after a tap on touch screens. */
  .region-card:hover { transform: none; }
}

@media (max-width: 520px) {
  .app__main { padding-inline: var(--space-3); }
  .hero { padding: var(--space-4); }
  .card { padding: var(--space-4); }
  .narration { padding: var(--space-3); }
  /* Near-square: the image fills the width and the toolbar stays reachable. */
  .viewer__canvas { height: min(92vw, 62dvh); }
  .viewer__loading, .viewer__error { min-height: min(92vw, 62dvh); }
  .step-nav { position: sticky; bottom: 0; z-index: 5; background: var(--surface-page);
    padding-bottom: calc(var(--space-3) + env(safe-area-inset-bottom)); }
  .region-grid { grid-template-columns: minmax(0, 1fr); }
  /* The HUD sits on the image; at phone width it must not cover a third of it. */
  .viewer__hud, .viewer__probe, .viewer__densifying {
    font-size: 0.62rem;
    padding: 2px var(--space-2);
    line-height: 1.35;
  }
  .viewer__hud { top: var(--space-2); inset-inline-start: var(--space-2); opacity: 0.88; }
}

/* ── Phone top bar and drawer scrim ──────────────────────────────────── */

.topbar {
  display: none; /* shown only at phone width, above */
  position: sticky;
  top: 0;
  z-index: 30;
  align-items: center;
  gap: var(--space-2);
  padding: calc(var(--space-2) + env(safe-area-inset-top)) var(--space-3) var(--space-2);
  background: var(--surface-card);
  border-bottom: 1px solid var(--border-subtle);
}

.topbar__menu {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--surface-card);
  color: var(--text-strong);
  font-size: 1.2rem;
  cursor: pointer;
  flex: none;
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 800;
  color: var(--text-strong);
  cursor: pointer;
}

.topbar__context {
  margin-inline-start: auto;
  font-size: var(--text-xs);
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.app__scrim {
  position: fixed;
  inset: 0;
  z-index: 35;
  background: oklch(0% 0 0 / 0.45);
}

.app__rail-close {
  display: none; /* phone drawer only, below */
  margin-inline-start: auto;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--surface-card);
  color: var(--text-strong);
  cursor: pointer;
}

/* The scrim and the scroll lock exist only for the phone drawer. */
.app__scrim { display: none; }

/* After the base rules on purpose: same specificity, so order decides. */
@media (max-width: 860px) {
  .topbar { display: flex; }
  .app__scrim { display: block; }
  .app__rail-close { display: grid; }
  body.nav-locked { overflow: hidden; }
}

/* ── Accounts: sign-in, user bar ─────────────────────────────────────── */

.auth {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: var(--space-5) var(--space-4);
  background: var(--surface-page);
}

.auth__panel {
  width: min(100%, 420px);
  padding: var(--space-6);
}

.auth__title {
  font-size: var(--text-xl);
  color: var(--text-strong);
  margin-bottom: var(--space-2);
}

.auth__lead {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-5);
  line-height: var(--leading-normal);
}

.auth__form {
  display: grid;
  gap: var(--space-4);
}

.auth__switch {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.auth__fine {
  margin-top: var(--space-5);
  font-size: var(--text-xs);
  color: var(--text-faint);
  line-height: var(--leading-normal);
}

.field {
  display: grid;
  gap: var(--space-1);
}

.field__label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-strong);
}

.field__input {
  font: inherit;
  font-size: var(--text-base);
  color: var(--text-strong);
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  min-height: 42px;
  width: 100%;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}

.field__input:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-line);
}

/* Email and password are typed left-to-right; keep them aligned that way. */
.field__input[dir='ltr'] { text-align: left; }

.field__hint {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.field__check {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-size: var(--text-sm);
  cursor: pointer;
}

.field__check input {
  margin-top: 0.2em;
  width: 1.1em;
  height: 1.1em;
  flex-shrink: 0;
}

.field__check .field__hint { display: block; margin-top: 2px; }

.user-bar {
  margin-top: var(--space-5);
  padding: var(--space-3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--surface-sunken);
  display: grid;
  gap: var(--space-1);
}

.user-bar__name {
  font-weight: 700;
  color: var(--text-strong);
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
}

.user-bar__email {
  font-size: var(--text-xs);
  color: var(--text-muted);
  overflow-wrap: anywhere;
  text-align: right;
}

.user-bar__sync {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.user-bar__sync--saved { color: var(--normal); }
.user-bar__sync--offline { color: var(--caution); }

.user-bar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

/* ── Team progress report ────────────────────────────────────────────── */

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.report-table { margin: 0; }
.report-table td { vertical-align: middle; font-variant-numeric: tabular-nums; }
.report-table tr[aria-selected='true'] td { background: var(--accent-wash); }

.meter {
  display: inline-block;
  vertical-align: middle;
  width: 72px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--border-subtle);
  overflow: hidden;
  margin-inline-end: var(--space-2);
}

.meter__fill {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: inherit;
}

/* ── External teaching media (MediaCatalog) ───────────────────────────────── */
.media__heading { font-size: var(--text-md); margin-bottom: var(--space-2); }
.media__note { color: var(--text-body); margin-bottom: var(--space-3); }
.media-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-3);
}
/* Two columns, so a normal clip and its positive partner share a row. */
@media (min-width: 640px) {
  .media-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.media-item {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  display: grid;
  align-content: start;
  gap: var(--space-1);
  min-width: 0;
}
/* Ultrasound stays black in both themes, as it is on the machine. */
.clip { position: relative; margin: var(--space-1) 0; border-radius: var(--radius-md); overflow: hidden; background: #000; }
.clip__image { display: block; width: 100%; height: auto; }
/* Kept clear of the source's watermark, which sits in the bottom right corner. */
.clip__toggle { position: absolute; bottom: var(--space-2); left: var(--space-2); }
/* A single radiograph in a step takes the row on its own, at reading size. */
.media-list:has(> .media-item:only-child) { grid-template-columns: minmax(0, 760px); justify-content: center; }
/* A radiograph is film: black surround in both themes. */
.radiograph { margin: var(--space-1) 0; border-radius: var(--radius-md); overflow: hidden; background: #000; }
.radiograph__image { display: block; width: 100%; height: auto; }
.radiograph__caption { font-size: 0.85rem; padding: var(--space-2); color: #e6e6e6; background: #111; }
.media-item__attribution { font-size: 0.8rem; opacity: 0.9; text-align: left; overflow-wrap: anywhere; }
.media-item__source { font-size: 0.8rem; overflow-wrap: anywhere; }
.media-item__head { display: flex; align-items: baseline; gap: var(--space-2); flex-wrap: wrap; }
.media-item__kind {
  font-size: 0.75rem;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--accent-wash);
  color: var(--accent);
}
.media-item__orig { font-size: 0.85rem; opacity: 0.8; text-align: right; }
.media-item__meta { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); font-size: 0.8rem; opacity: 0.85; }
.media-item__license { font-weight: 600; }
.media-item__hint { font-size: 0.8rem; opacity: 0.75; }
.media-item__open { justify-self: start; margin-top: var(--space-1); }

/* Original diagrams authored inline in lesson prose. */
.prose figure.diagram { margin: var(--space-4) 0; text-align: center; }
.prose figure.diagram svg { width: 100%; max-width: 520px; height: auto; color: var(--text-strong); }
.prose figure.diagram figcaption { font-size: 0.85rem; opacity: 0.8; margin-top: var(--space-2); }

/* Practice exam: verdict and picture shown right after a question is answered. */
.quiz__verdict--ok { color: var(--normal); }
.quiz__verdict--bad { color: var(--disease); }
.quiz__figure { margin: var(--space-3) 0 0; }
.quiz__figure img {
  display: block;
  max-width: 100%;
  max-height: 60dvh;
  margin-inline: auto;
  border-radius: var(--radius-md);
  background: #000;
}
.quiz__figure figcaption { font-size: 0.85rem; margin-top: var(--space-2); text-align: center; }
.quiz__figure-credit { font-size: 0.75rem; opacity: 0.8; margin-top: 2px; }

.us-case { min-width: 0; }
.us-case__stage { background: #000; overflow: auto; min-height: 180px; margin-block: var(--space-3); color: white; }
.us-case__image { position: relative; transform-origin: top right; }
.us-case__image img { display: block; width: 100%; height: auto; }
.us-case__image .us-case__overlay { position: absolute; inset: 0; }
.us-case label { display: flex; gap: var(--space-3); align-items: center; margin-block: var(--space-3); }
.us-case small { display: block; line-height: 1.6; }
