/*
 * The lomelian.com website: plain HTML and CSS. Two small scripts, both optional: theme.js (the
 * light theme a visitor can opt into; dark is the default) and the hero's 3D scene (hero.js, built
 * from hero/hero.js). The page works without either.
 * Tokens, type (self-hosted, below) and the mark follow docs/design/stylebook.md (section 11a);
 * the token values are copied from apps/web/src/theme/tokens.css, since the site has no build step
 * to share them.
 */

/* --- fonts: self-hosted (stylebook 11a) ------------------------------------------------------
 * The Case File type (stylebook 4) served from the site itself, so no request goes to a third
 * party and the CSP allows fonts from 'self' only. Variable woff2 files from Fontsource 5.3.0
 * (@fontsource-variable/*), latin and latin-ext subsets; the browser fetches latin-ext only for a
 * character outside latin. SIL Open Font License 1.1: fonts/OFL-*.txt.
 */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(fonts/bricolage-grotesque-latin-opsz-normal.woff2) format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(fonts/bricolage-grotesque-latin-ext-opsz-normal.woff2) format('woff2');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/geist-latin-wght-normal.woff2) format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/geist-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/geist-mono-latin-wght-normal.woff2) format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/geist-mono-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

/* --- tokens: dark (the default) -------------------------------------------------------------- */
/* `.theme-dark` keeps a part of a light page dark (the hero and the closing stage), like the
   app's `.lm-dark`: declared on the element itself, its values win over the inherited light ones. */
:root,
.theme-dark {
  color-scheme: dark;

  --lm-chrome: #0a0f1d;
  --lm-bg: #101524;
  --lm-pane: #151b2b;
  --lm-raise: #1b2133;
  --lm-line: #262d40;
  --lm-line-2: #323a50;
  --lm-line-3: #444e66;
  --lm-ink: #e5e9f3;
  --lm-ink-2: #a2aabd;
  --lm-ink-3: #878fa4;
  --lm-ink-4: #737c93;
  --lm-accent: #9a9ffb;
  --lm-accent-2: #c0c6fe;
  --lm-accent-dim: #5c5ac6;
  --lm-accent-ink: #0b1430;
  --lm-on-accent-dim: #ffffff;
  --lm-btn: #262e42;
  --lm-btn-hover: #2e364d;
  --lm-btn-line: #67718c;
  --lm-btn-line-hover: #8690aa;
  --lm-flag: #e8a35a;
  --lm-highlighter: #f2c94c;
  --lm-lane-edit: #4d5873;
  --lm-lane-rule: rgba(255, 255, 255, 0.03);
  --lm-pass: #6bc79a;
  --lm-fail: #e07a63;
  /* Task types (stylebook 3.5), copied from the app's tokens. */
  --lm-type-kt: #7fb0f0;
  --lm-type-bh: #ee8fb0;
  --lm-type-ct: #62c4d6;
  --lm-type-ai: #7fb7a8;
  --lm-type-al: #b29cf0;
  --lm-type-cr: #e0a274;
  --lm-type-ds: #b2cc72;
  --lm-type-ag: #e08ee0;
  --lm-type-rd: #9db0c8;
  --lm-type-ma: #93a8ff;
  --lm-type-pq: #cdb48f;
  --lm-type-fill: 16%;

  /* Website only (stylebook 11a): glows, cards, the header glass and the iris band. */
  --site-mark-tile: #5c5ac6; /* the product variant */
  --site-glow: rgba(92, 90, 198, 0.34); /* iris 500 */
  --site-glow-2: rgba(154, 159, 251, 0.1); /* iris 300 */
  --site-grad: linear-gradient(100deg, #f0f4fe 0%, #c0c6fe 45%, #9a9ffb 100%);
  --site-card: rgba(21, 27, 43, 0.72); /* pane */
  --site-card-line: #262d40; /* line */
  --site-card-line-hover: #444e66; /* line-3 */
  --site-card-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035), 0 24px 48px -32px rgba(0, 0, 0, 0.8);
  --site-header: rgba(10, 15, 29, 0.78); /* chrome */
  --site-header-line: rgba(255, 255, 255, 0.06);
  --site-divider: linear-gradient(90deg, transparent, #323a50 20%, #323a50 80%, transparent);
}

/* --- tokens: light (opt-in, stylebook 3.4) ---------------------------------------------------- */
:root[data-theme='light'] {
  color-scheme: light;

  --lm-chrome: #ebeef5;
  --lm-bg: #fbfcfd;
  --lm-pane: #f3f5fa;
  --lm-raise: #ffffff;
  --lm-line: #e2e5ee;
  --lm-line-2: #ced4e1;
  --lm-line-3: #aab2c4;
  --lm-ink: #101524;
  --lm-ink-2: #3b445b;
  --lm-ink-3: #555e75;
  --lm-ink-4: #757d93;
  --lm-accent: #47469c;
  --lm-accent-2: #333372;
  --lm-accent-dim: #5c5ac6;
  --lm-accent-ink: #ffffff;
  --lm-btn: #f1f4fa;
  --lm-btn-hover: #e6eaf4;
  --lm-btn-line: #8089a0;
  --lm-btn-line-hover: #5f6981;
  --lm-flag: #9a5a10;
  --lm-lane-edit: #aab2c6;
  --lm-lane-rule: rgba(16, 21, 36, 0.05);
  --lm-pass: #1c7f52;
  --lm-fail: #b8432b;
  --lm-type-kt: #2a5ea8;
  --lm-type-bh: #a3305a;
  --lm-type-ct: #0f6372;
  --lm-type-ai: #24645a;
  --lm-type-al: #6142b8;
  --lm-type-cr: #86481a;
  --lm-type-ds: #476414;
  --lm-type-ag: #8f3590;
  --lm-type-rd: #3f5470;
  --lm-type-ma: #3d4fb0;
  --lm-type-pq: #6b5530;
  --lm-type-fill: 12%;

  --site-mark-tile: #333372; /* the primary variant, iris 700 */
  --site-glow: rgba(92, 90, 198, 0.14);
  --site-glow-2: rgba(154, 159, 251, 0.12);
  --site-grad: linear-gradient(100deg, #333372 0%, #47469c 50%, #5c5ac6 100%);
  --site-card: #ffffff;
  --site-card-line: #e2e5ee;
  --site-card-line-hover: #aab2c4;
  --site-card-shadow: 0 1px 2px rgba(16, 21, 36, 0.04), 0 16px 40px -28px rgba(16, 21, 36, 0.28);
  --site-header: rgba(251, 252, 253, 0.8);
  --site-header-line: rgba(16, 21, 36, 0.08);
  --site-divider: linear-gradient(90deg, transparent, #ced4e1 20%, #ced4e1 80%, transparent);
}

/* The same in both themes. */
:root {
  --font-display: 'Bricolage Grotesque', 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-ui: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-data: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* The iris band (For teams): iris 50 to 100 with iris 600 to 900 ink. */
  --site-iris-bg: #f0f4fe;
  --site-iris-bg-2: #dbe5fe;
  --site-iris-ink: #1d1d44;
  --site-iris-ink-2: #333372;
  --site-iris-ink-3: #47469c;
  --site-iris-line: #c0c6fe;
  --site-closing: #1d1d44; /* iris 900 */

  --ease: cubic-bezier(0.2, 0, 0, 1);
  --gutter: clamp(16px, 5vw, 56px);
  --radius: 16px;
  --header-h: 64px;
}

/* --- base ------------------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--lm-bg);
  scroll-behavior: smooth;
  /* Section links land below the sticky header. */
  scroll-padding-top: calc(var(--header-h) + 16px);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--lm-bg);
  color: var(--lm-ink-2);
  font: 400 16px/1.6 var(--font-ui);
  -webkit-font-smoothing: antialiased;
}

/* A dark stage inside a light page sets its own text colour, which body set from the light ink. */
.theme-dark {
  color: var(--lm-ink-2);
}

main {
  flex: 1;
}

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

a:hover {
  color: var(--lm-accent-2);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--lm-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
}

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* For keyboard users: the first Tab jumps past the header. */
.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 20;
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--lm-accent);
  color: var(--lm-accent-ink);
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--lm-accent);
  font: 500 12px/1.2 var(--font-data);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: '';
  width: 18px;
  height: 1px;
  background: currentColor;
}

.mono {
  color: var(--lm-ink-3);
  font: 400 14px/1.4 var(--font-data);
}

/* --- buttons (stylebook 7.1, at marketing size) --------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--lm-btn-line);
  border-radius: 8px;
  background: var(--lm-btn);
  color: var(--lm-ink);
  font: 600 14px/1 var(--font-ui);
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.2s ease,
    transform 0.2s var(--ease);
}

.btn:hover {
  border-color: var(--lm-btn-line-hover);
  background: var(--lm-btn-hover);
  color: var(--lm-ink);
}

.btn-sm {
  height: 34px;
  padding: 0 14px;
  font-size: 13px;
}

.btn-lg {
  height: 48px;
  padding: 0 22px;
  border-radius: 10px;
  font-size: 15px;
}

/* The one accent button in a view, with a soft iris glow. */
.btn-accent {
  border-color: var(--lm-accent);
  background: var(--lm-accent);
  color: var(--lm-accent-ink);
  box-shadow: 0 8px 28px -10px var(--lm-accent-dim);
}

.btn-accent:hover {
  border-color: var(--lm-accent-2);
  background: var(--lm-accent-2);
  color: var(--lm-accent-ink);
  box-shadow: 0 10px 34px -10px var(--lm-accent-dim);
}

.btn .arrow {
  transition: transform 0.2s var(--ease);
}

.btn:hover .arrow {
  transform: translateX(3px);
}

/* A quiet second action beside the accent one. */
.btn-ghost {
  border-color: var(--lm-line-2);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--lm-line-3);
  background: color-mix(in srgb, var(--lm-ink) 6%, transparent);
}

.text-link {
  font-weight: 500;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}

/* --- top bar: sticky glass ---------------------------------------------------------------------- */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--site-header-line);
  background: var(--site-header);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  backdrop-filter: saturate(150%) blur(14px);
}

.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--header-h);
}

/* Lockup: the gap between mark and word is 0.3 × the mark size (28 px → 8.4 px). */
.lockup {
  display: inline-flex;
  align-items: center;
  gap: 8.4px;
  color: var(--lm-ink);
  text-decoration: none;
}

.lockup:hover {
  color: var(--lm-ink);
}

.mark {
  width: 28px;
  height: 28px;
  flex: none;
}

.mark-tile {
  fill: var(--site-mark-tile);
}

.mark-chevron {
  fill: none;
  stroke: var(--lm-on-accent-dim);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* The cursor is always yellow. It may blink here, a marketing context: 1.1 s, hard steps; only
   in the header, so one cursor blinks at a time. */
.mark-cursor {
  fill: var(--lm-highlighter);
}

.top .mark-cursor {
  animation: blink 1.1s steps(1, end) infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .top .mark-cursor {
    animation: none;
  }
}

.word {
  font: 600 20px/1 var(--font-display);
  letter-spacing: -0.025em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--lm-ink-2);
  font-size: 14px;
  text-decoration: none;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}

.nav-link:hover {
  background: color-mix(in srgb, var(--lm-ink) 7%, transparent);
  color: var(--lm-ink);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* The theme switch: a sun in the dark theme (switch to light), a moon in the light one. */
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--lm-line-2);
  border-radius: 8px;
  background: transparent;
  color: var(--lm-ink-2);
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.theme-toggle[hidden] {
  display: none;
}

.theme-toggle:hover {
  border-color: var(--lm-line-3);
  color: var(--lm-ink);
}

.theme-toggle svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle .i-moon,
.theme-toggle[aria-pressed='true'] .i-sun {
  display: none;
}

.theme-toggle[aria-pressed='true'] .i-moon {
  display: block;
}

/* --- hero: a dark stage on a iris glow, with the sky behind ---------------------------------- */
.hero-bg {
  position: relative;
  isolation: isolate;
  /* Clips the sky and the 3D scene's canvas, which reaches past the drawing (.scene-gl) and would
     otherwise widen the page on phones. */
  overflow: clip;
  background:
    radial-gradient(60% 70% at 78% 32%, var(--site-glow), transparent 70%),
    radial-gradient(40% 50% at 8% 92%, var(--site-glow-2), transparent 70%), var(--lm-bg);
}

/* The glows fade into the page at the hero's foot instead of ending on an edge. */
.hero-bg::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  z-index: -1;
  height: 160px;
  background: linear-gradient(180deg, transparent, var(--lm-bg));
  pointer-events: none;
}

/* In the light theme the hero is an inset dark stage with round corners. */
[data-theme='light'] .hero-bg {
  margin: 12px 12px 0;
  border-radius: 24px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: center;
  gap: 40px;
  padding-top: clamp(56px, 11vh, 120px);
  padding-bottom: clamp(32px, 6vh, 64px);
}

/* Early access, as a pill beside the eyebrow words. */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  padding: 4px 14px 4px 4px;
  border: 1px solid var(--lm-line-2);
  border-radius: 999px;
  background: color-mix(in srgb, var(--lm-pane) 70%, transparent);
  color: var(--lm-ink-2);
  font: 500 13px/1.2 var(--font-ui);
}

.badge-pill {
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--lm-accent) 18%, transparent);
  color: var(--lm-accent-2);
  font: 500 11px/1.2 var(--font-data);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin-bottom: 24px;
  color: var(--lm-ink);
  font: 500 clamp(40px, 5vw, 64px) / 1.03 var(--font-display);
  letter-spacing: -0.035em;
  text-wrap: balance;
}

/* The headline's key words in a iris gradient (website only, stylebook 11a). */
.grad {
  background: var(--site-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  max-width: 56ch;
  margin-bottom: 32px;
  font-size: 18px;
  line-height: 1.6;
}

.hero .lede {
  font-size: 19px;
}

/* The library at a glance: real figures from the library, under the hero. */
.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--lm-line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--lm-pane) 60%, transparent);
}

/* Under the figures: they are a snapshot of a library that keeps growing. */
.facts-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 clamp(40px, 7vh, 72px);
  color: var(--lm-ink-3);
  font-size: 14px;
}

.facts-note svg {
  flex: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--lm-accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.facts li {
  display: grid;
  gap: 2px;
  padding: 18px 24px;
}

.facts li + li {
  border-left: 1px solid var(--lm-line);
}

.facts b {
  color: var(--lm-ink);
  font: 500 32px/1.1 var(--font-display);
  letter-spacing: -0.03em;
}

.facts span {
  color: var(--lm-ink-3);
  font-size: 14px;
}

/* --- the hero's scene: the idea of Lomelian, not a report (stylebook 11a) -------------------- */
/* A candidate's work as a path through space: it draws itself step by step, the moments that
   matter light up yellow as it passes them, and it ends in the small result a take-home would
   show on its own. hero.js draws it in 3D; without WebGL the SVG below stands in. */
.scene {
  width: 100%;
  max-width: 600px;
  margin: 0 0 0 auto;
}

.scene-stage {
  position: relative;
}

.scene-gl {
  position: absolute;
  inset: -10% -12%;
  width: 124%;
  height: 120%;
  /* The scene fades out before the canvas edges. */
  mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 60%, transparent 100%);
}

.scene-art {
  display: block;
  width: 100%;
  height: auto;
}

/* With the 3D scene running, the drawing only keeps the space. It stays in the accessibility
   tree (opacity, not visibility), so its title still describes the scene to screen readers. */
.scene.gl .scene-art {
  opacity: 0;
}

.art-path {
  fill: none;
  stroke: var(--lm-accent);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 0 12;
}

.art-moment {
  fill: var(--lm-highlighter);
}

.art-result {
  fill: none;
  stroke: var(--lm-accent-2);
  stroke-width: 2;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  margin-top: 18px;
  color: var(--lm-ink-2);
  font-size: 13.5px;
}

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

.key {
  display: inline-block;
  flex: none;
}

.key-path {
  width: 22px;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--lm-accent-dim), var(--lm-accent-2));
}

/* The moments: evidence, so the highlighter. */
.key-moment {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--lm-highlighter);
}

.key-result {
  width: 10px;
  height: 10px;
  border: 1.5px solid var(--lm-accent-2);
  border-radius: 2px;
}

/* --- sections ------------------------------------------------------------------------------- */
.band {
  position: relative;
  padding-top: clamp(64px, 8vw, 104px);
  padding-bottom: clamp(64px, 8vw, 104px);
}

/* A hairline that fades out at both ends between sections. */
.band + .band::before {
  content: '';
  position: absolute;
  top: 0;
  left: var(--gutter);
  right: var(--gutter);
  height: 1px;
  background: var(--site-divider);
}

.sec-head {
  margin-bottom: 40px;
}

.sec-head .lede {
  margin: 20px 0 0;
}

h2 {
  max-width: 24ch;
  color: var(--lm-ink);
  font: 500 clamp(30px, 3.8vw, 46px) / 1.08 var(--font-display);
  letter-spacing: -0.03em;
  text-wrap: balance;
}

h3 {
  margin-bottom: 8px;
  color: var(--lm-ink);
  font: 500 19px/1.25 var(--font-display);
  letter-spacing: -0.015em;
}

/* Heading on the left, held in view while its content scrolls past on the right. */
.split {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 56px;
  align-items: start;
}

.split .sec-head {
  position: sticky;
  top: calc(var(--header-h) + 32px);
  margin: 0;
}

/* --- cards ---------------------------------------------------------------------------------- */
.card {
  position: relative;
  padding: 28px;
  border: 1px solid var(--site-card-line);
  border-radius: var(--radius);
  background: var(--site-card);
  box-shadow: var(--site-card-shadow);
  transition:
    border-color 0.25s ease,
    transform 0.3s var(--ease),
    box-shadow 0.3s ease;
}

.card:hover {
  border-color: var(--site-card-line-hover);
  transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
  .card,
  .btn,
  .btn .arrow {
    transition: none;
  }

  .card:hover,
  .btn:hover .arrow {
    transform: none;
  }
}

.card p {
  font-size: 15px;
}

.problems,
.steps,
.kinds {
  display: grid;
  gap: 16px;
  padding: 0;
  list-style: none;
}

.problems {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.num {
  display: block;
  margin-bottom: 20px;
  color: var(--lm-ink-3);
  font: 500 13px/1 var(--font-data);
}

.steps {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* The step number as a large outlined figure. */
.index {
  display: block;
  margin-bottom: 20px;
  font: 500 44px/1 var(--font-display);
  letter-spacing: -0.04em;
  background: var(--site-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.kinds {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Each part type card carries a faint wash of its type colour from the top-left corner. */
.kinds .card {
  background:
    radial-gradient(
      120% 90% at 0% 0%,
      color-mix(in srgb, var(--type) 13%, transparent),
      transparent 55%
    ),
    var(--site-card);
}

.kinds .card:hover {
  border-color: color-mix(in srgb, var(--type) 50%, var(--site-card-line));
}

.kinds .meta {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--lm-line-2);
  color: var(--lm-ink-3);
  font: 500 12px/1.5 var(--font-data);
}

/* The part type code, as in the app (7.4). */
.code {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 24px;
  margin-bottom: 16px;
  border: 1px solid var(--lm-line-2);
  border-radius: 5px;
  color: var(--lm-ink-2);
  font: 600 10.5px/1 var(--font-data);
  flex: none;
}

/* Each part type in its own colour (stylebook 3.5): the code on a tint of it. */
.code[data-type] {
  border-color: color-mix(in srgb, var(--type) 55%, transparent);
  background: color-mix(in srgb, var(--type) var(--lm-type-fill), transparent);
  color: var(--type);
}
[data-type='KT'] {
  --type: var(--lm-type-kt);
}
[data-type='BH'] {
  --type: var(--lm-type-bh);
}
[data-type='CT'] {
  --type: var(--lm-type-ct);
}
[data-type='AI'] {
  --type: var(--lm-type-ai);
}
[data-type='AL'] {
  --type: var(--lm-type-al);
}
[data-type='CR'] {
  --type: var(--lm-type-cr);
}
[data-type='DS'] {
  --type: var(--lm-type-ds);
}
[data-type='AG'] {
  --type: var(--lm-type-ag);
}
[data-type='RD'] {
  --type: var(--lm-type-rd);
}
[data-type='MA'] {
  --type: var(--lm-type-ma);
}
[data-type='PQ'] {
  --type: var(--lm-type-pq);
}

/* --- window frames: product drawings framed like an app window -------------------------------- */
.window {
  margin-top: 40px;
  border: 1px solid var(--site-card-line);
  border-radius: var(--radius);
  background: var(--site-card);
  box-shadow: var(--site-card-shadow);
  overflow: hidden;
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  border-bottom: 1px solid var(--site-card-line);
  background: color-mix(in srgb, var(--lm-chrome) 70%, transparent);
}

.window-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--lm-line-2);
}

.window-bar span {
  margin-left: 10px;
  color: var(--lm-ink-3);
  font: 500 12px/1 var(--font-data);
}

/* The recording, drawn as the report's timeline lanes (6.10). */
.timeline-scroll {
  overflow-x: auto;
  padding: 32px 24px 8px;
}

.timeline-svg {
  display: block;
  width: 100%;
  min-width: 620px;
  height: auto;
  overflow: visible;
}

.tl-label,
.tl-axis,
.tl-time {
  font: 500 11px var(--font-data);
}

.tl-label {
  fill: var(--lm-ink-3);
  letter-spacing: 0.08em;
}

.tl-axis {
  fill: var(--lm-ink-4);
}

.tl-time {
  fill: var(--lm-highlighter);
}

/* On light, the playhead's time label keeps its yellow but needs a darker outline to read. */
[data-theme='light'] .tl-time {
  paint-order: stroke;
  stroke: #6e5300;
  stroke-width: 3px;
}

.tl-rule {
  stroke: var(--lm-lane-rule);
}

.tl-playhead {
  stroke: var(--lm-highlighter);
  stroke-width: 1.5;
}

.t-prompt {
  fill: var(--lm-accent);
}

.t-edit {
  fill: var(--lm-lane-edit);
}

.t-pass {
  fill: var(--lm-pass);
}

.t-fail {
  fill: var(--lm-fail);
}

.t-paste {
  fill: var(--lm-ink-2);
}

.timeline figcaption {
  padding: 4px 24px 20px;
  color: var(--lm-ink-3);
  font-size: 13px;
  line-height: 1.5;
}

/* --- tracks and levels ---------------------------------------------------------------------- */
.tracks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tracks li {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 14px;
  row-gap: 2px;
  align-items: center;
  align-content: center;
  padding: 16px 18px;
  border: 1px solid var(--site-card-line);
  border-radius: 12px;
  background: var(--site-card);
  box-shadow: var(--site-card-shadow);
  transition: border-color 0.25s ease;
}

.tracks li:hover {
  border-color: var(--site-card-line-hover);
}

.t-mark {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--lm-line);
  border-radius: 10px;
  background: var(--lm-raise);
  color: var(--lm-ink);
}

/* Each track's logo in one colour (simple-icons, CC0), so the set reads as one family. */
.t-mark svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* General has no logo (a line icon of stacked layers), and Java's cup is drawn the same way,
   since simple-icons has no Java logo. */
.t-mark svg.t-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
}

.tracks b {
  color: var(--lm-ink);
  font-weight: 600;
  font-size: 15px;
}

.tracks li > span:last-child {
  color: var(--lm-ink-3);
  font-size: 13px;
}

.levels {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
}

.lv {
  padding: 4px 12px;
  border: 1px solid color-mix(in srgb, var(--lm-accent) 45%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--lm-accent) 10%, transparent);
  color: var(--lm-accent);
  font: 500 12px var(--font-data);
}

.lv-note {
  color: var(--lm-ink-3);
  font-size: 13px;
}

/* The full table, on request. */
.matrix-more {
  margin-top: 20px;
}

.matrix-more summary {
  cursor: pointer;
  color: var(--lm-accent);
  font-size: 14px;
  font-weight: 500;
}

.matrix-more[open] summary {
  margin-bottom: 8px;
}

.matrix-scroll {
  margin-top: 8px;
  overflow-x: auto;
}

.matrix {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 14px;
}

.matrix th,
.matrix td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--lm-line);
  text-align: center;
  white-space: nowrap;
}

.matrix thead th .code {
  margin: 0;
}

.matrix thead th {
  color: var(--lm-ink-3);
  font: 500 11px/1 var(--font-data);
  letter-spacing: 0.08em;
}

.matrix th[scope='row'],
.matrix thead th:first-child {
  padding-left: 0;
  text-align: left;
  color: var(--lm-ink);
  font-weight: 500;
}

.matrix td {
  color: var(--lm-accent);
  font: 500 12.5px/1 var(--font-data);
  letter-spacing: 0.12em;
}

.matrix td.none {
  color: var(--lm-ink-4);
}

.note {
  margin-top: 14px;
  color: var(--lm-ink-3);
  font-size: 13px;
}

/* An example assessment, framed like the app's setup. */
.path-body {
  padding: 24px 28px 22px;
}

.path figcaption {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
}

.path .eyebrow {
  margin: 0;
}

.path-title {
  color: var(--lm-ink);
  font: 500 21px/1.3 var(--font-display);
  letter-spacing: -0.015em;
}

.path ol {
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--lm-line);
}

.path li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 64px 56px;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--lm-line);
  font-size: 15px;
}

.path li .code {
  margin: 0;
}

.path li > span:nth-child(2) {
  color: var(--lm-ink);
}

/* The time-budget ruler (6.11): each part's share of the 85 minutes, in its type colour. */
.ruler {
  display: grid;
  grid-template-columns: 15fr 20fr 15fr 35fr;
  gap: 3px;
  margin-top: 18px;
}

.ruler i {
  height: 8px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--type) 70%, transparent);
}

.path-total {
  margin-top: 10px;
  text-align: right;
}

/* --- the iris band: For teams --------------------------------------------------------------- */
.iris {
  background:
    radial-gradient(50% 80% at 90% 0%, rgba(255, 255, 255, 0.6), transparent 70%),
    linear-gradient(180deg, var(--site-iris-bg), var(--site-iris-bg-2));
  color: var(--site-iris-ink-2);
}

[data-theme='light'] .iris {
  margin: 0 12px;
  border-radius: 24px;
}

.iris .eyebrow {
  color: var(--site-iris-ink-3);
}

.iris h2,
.iris h3 {
  color: var(--site-iris-ink);
}

.iris .card {
  border-color: var(--site-iris-line);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 16px 40px -28px rgba(29, 29, 68, 0.35);
}

.iris .card:hover {
  border-color: var(--site-iris-ink-3);
}

.iris .points li {
  border-color: var(--site-iris-line);
}

.iris .points li::before {
  color: var(--site-iris-ink-3);
}

.cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cols h3 {
  margin-bottom: 14px;
}

.points {
  padding: 0;
  list-style: none;
}

.points li {
  position: relative;
  padding: 11px 0 11px 22px;
  border-top: 1px solid var(--lm-line);
  font-size: 15px;
  line-height: 1.55;
}

.points li::before {
  content: '›';
  position: absolute;
  left: 2px;
  color: var(--lm-accent);
  font-family: var(--font-data);
}

/* A line icon at the top of a card (Trust). */
.icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 20px;
  border: 1px solid color-mix(in srgb, var(--lm-accent) 35%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--lm-accent) 10%, transparent);
  color: var(--lm-accent);
}

.icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --- AI, in the open ------------------------------------------------------------------------ */
.ai-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 56px;
  align-items: start;
}

.ai-split .lede {
  margin-bottom: 20px;
  font-size: 17px;
}

/* The AI label (6.13): mono, uppercase, a dashed border, never filled. */
.ai-tag {
  display: inline-block;
  padding: 1px 5px;
  border: 1px dashed var(--lm-line-3);
  border-radius: 2px;
  color: var(--lm-ink-3);
  font: 500 11px/1.4 var(--font-data);
  text-transform: uppercase;
  vertical-align: 2px;
}

.rubric-card {
  padding: 8px 28px;
}

.rubric {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.rubric th,
.rubric td {
  padding: 14px 0;
  border-bottom: 1px solid var(--lm-line);
  text-align: left;
  vertical-align: top;
}

.rubric tr:last-child th,
.rubric tr:last-child td {
  border-bottom: 0;
}

.rubric thead th {
  color: var(--lm-ink-3);
  font: 500 11px/1 var(--font-data);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rubric th[scope='row'] {
  width: 46%;
  padding-right: 16px;
  color: var(--lm-ink);
  font-weight: 500;
}

.rubric .mono {
  margin-right: 6px;
  font-size: 12px;
}

/* --- FAQ ------------------------------------------------------------------------------------ */
.faq {
  display: grid;
  gap: 10px;
}

.faq details {
  border: 1px solid var(--site-card-line);
  border-radius: 12px;
  background: var(--site-card);
  transition: border-color 0.2s ease;
}

.faq details:hover,
.faq details[open] {
  border-color: var(--site-card-line-hover);
}

.faq summary {
  position: relative;
  padding: 18px 56px 18px 22px;
  color: var(--lm-ink);
  font: 500 17px/1.4 var(--font-display);
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  position: absolute;
  right: 18px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-top: -13px;
  border: 1px solid var(--lm-line-2);
  border-radius: 50%;
  color: var(--lm-accent);
  font: 400 16px/1 var(--font-data);
}

.faq details[open] summary::after {
  content: '–';
}

.faq details p {
  max-width: 68ch;
  padding: 0 22px 20px;
  font-size: 15px;
}

/* --- closing: a dark stage rising into iris ---------------------------------------------------- */
.closing-wrap {
  padding-bottom: clamp(48px, 8vw, 96px);
}

.closing-bg {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--lm-line-2);
  border-radius: 24px;
  background:
    radial-gradient(55% 90% at 85% 100%, var(--site-glow), transparent 70%),
    radial-gradient(40% 60% at 0% 0%, var(--site-glow-2), transparent 70%),
    linear-gradient(180deg, var(--lm-bg), var(--site-closing));
}

.closing {
  padding: clamp(40px, 7vw, 80px);
}

.closing h2 {
  max-width: 20ch;
  margin-bottom: 16px;
  font-size: clamp(32px, 4.6vw, 54px);
}

.closing .lede {
  margin-bottom: 36px;
}

/* How getting started works: three numbered steps above the closing action. */
.start-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 36px;
  padding: 0;
  list-style: none;
  counter-reset: start;
}

.start-steps li {
  padding: 20px;
  border: 1px solid var(--lm-line-2);
  border-radius: 12px;
  background: rgba(10, 15, 29, 0.4);
  color: var(--lm-ink-2);
  font-size: 15px;
  line-height: 1.55;
  counter-increment: start;
}

.start-steps li::before {
  content: counter(start);
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-bottom: 14px;
  border: 1px solid var(--lm-accent-dim);
  border-radius: 50%;
  color: var(--lm-accent);
  font: 500 12px/1 var(--font-data);
}

.start-steps strong {
  color: var(--lm-ink);
  font-weight: 600;
}

/* --- footer --------------------------------------------------------------------------------- */
.foot {
  border-top: 1px solid var(--lm-line);
  background: var(--lm-chrome);
  color: var(--lm-ink-3);
  font: 500 12px/1.5 var(--font-data);
}

.foot-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 32px;
  padding-top: 28px;
  padding-bottom: 28px;
}

.foot-brand {
  display: grid;
  gap: 14px;
}

.lockup-sm .mark {
  width: 22px;
  height: 22px;
}

.lockup-sm {
  gap: 6.6px;
}

.lockup-sm .word {
  font-size: 16px;
}

.foot a {
  color: var(--lm-ink-3);
  text-decoration: none;
}

.foot a:hover {
  color: var(--lm-ink);
  text-decoration: underline;
}

.foot .lockup,
.foot .lockup:hover {
  color: var(--lm-ink);
  text-decoration: none;
}

/* Footer text on the left: the copyright and, on the home page, the note on the track logos. */
.foot-legal {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Footer links on the right: Privacy, Terms, Sign in. */
.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.foot a[aria-current='page'] {
  color: var(--lm-ink);
}

/* --- the legal pages (privacy.html, terms.html): one readable column -------------------------- */
.legal {
  padding-top: clamp(48px, 9vh, 104px);
  padding-bottom: 72px;
  color: var(--lm-ink-2);
  font-size: 15px;
  line-height: 1.65;
}

.legal h1 {
  margin-bottom: 8px;
  font-size: clamp(32px, 4.4vw, 44px);
}

.legal h2 {
  max-width: none;
  margin: 40px 0 12px;
  color: var(--lm-ink);
  font: 500 20px/1.3 var(--font-display);
  letter-spacing: -0.01em;
}

.legal p + p,
.legal p + .legal-list,
.legal .legal-list + p {
  margin-top: 12px;
}

.legal strong {
  color: var(--lm-ink);
  font-weight: 600;
}

.legal-meta {
  margin-bottom: 32px;
  color: var(--lm-ink-3);
  font: 500 12px/1.4 var(--font-data);
}

.legal-list {
  display: grid;
  gap: 8px;
  padding-left: 20px;
}

.legal-list li::marker {
  color: var(--lm-accent);
}

.legal > * {
  max-width: 72ch;
}

/* A detail to fill in before launch (entity, address, periods): flag colour, never highlighter. */
.todo {
  padding: 0 4px;
  border: 1px dashed var(--lm-flag);
  border-radius: 3px;
  color: var(--lm-flag);
  font: 500 0.92em/1.4 var(--font-data);
}

/* --- the 404 page ---------------------------------------------------------------------------- */
.lost {
  padding-top: clamp(56px, 12vh, 140px);
  padding-bottom: 56px;
}

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

/* --- the sky: glowing prompt chevrons at three depths, behind the hero ------------------------- */
/*
 * Each depth tiles glowing prompt chevrons (the mark's `>`) of its own size and brightness from an
 * SVG tile 2400 px wide (wider than a screen, so it never repeats side by side), spread at random
 * with a minimum distance so they neither line up nor clump. They are files, not data: URLs,
 * because the CSP allows images only from the site itself. The sky fades out towards the hero's
 * foot, so the sections below read on a calm surface. Without scroll-driven animations (or with
 * reduced motion) it simply stays still.
 */
.sky {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  /* Fades out at the foot, and is dimmer behind the headline so no chevron competes with it. */
  mask-image:
    linear-gradient(180deg, #000 55%, transparent 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.35) 40%, #000 65%);
  mask-composite: intersect;
}

.sky i {
  position: absolute;
  inset: 0 0 auto;
  height: 160%;
  will-change: transform;
}

/* Far: small, dim and dense. */
.sky-far {
  background: url(sky-far.svg);
  opacity: 0.7;
}

/* Middle: a little larger, with a soft glow. */
.sky-mid {
  background: url(sky-mid.svg);
  animation: twinkle 7s ease-in-out infinite alternate;
}

/* Near: few, large and glowing. */
.sky-near {
  background: url(sky-near.svg);
  opacity: 0.85;
}

@keyframes twinkle {
  from {
    opacity: 0.5;
  }
  to {
    opacity: 0.95;
  }
}

/* --- motion (scroll-driven, no JavaScript) ------------------------------------------------------ */
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    /* The deeper the layer, the slower it moves against the page. */
    .sky-far {
      animation: drift-far linear both;
      animation-timeline: scroll(root);
      animation-range: 0 100vh;
    }

    .sky-mid {
      animation:
        drift-mid linear both,
        twinkle 7s ease-in-out infinite alternate;
      animation-timeline: scroll(root), auto;
      animation-range:
        0 100vh,
        normal;
    }

    .sky-near {
      animation: drift-near linear both;
      animation-timeline: scroll(root);
      animation-range: 0 100vh;
    }

    /* The illustration floats up a little slower than the hero text as the page scrolls. */
    .scene {
      animation: float-up linear both;
      animation-timeline: view();
      animation-range: cover 0% cover 100%;
    }

    /* Cards, frames and the closing rise gently into place as they enter. */
    .card,
    .window,
    .tracks li,
    .faq details,
    .closing-bg {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 70%;
    }
  }
}

@keyframes drift-far {
  to {
    transform: translateY(-8vh);
  }
}

@keyframes drift-mid {
  to {
    transform: translateY(-20vh);
  }
}

@keyframes drift-near {
  to {
    transform: translateY(-40vh);
  }
}

@keyframes float-up {
  from {
    transform: translateY(48px);
  }
  to {
    transform: translateY(-48px);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    translate: 0 28px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sky-mid {
    animation: none;
  }
}

/* --- narrow screens ------------------------------------------------------------------------- */
@media (max-width: 1080px) {
  .nav {
    display: none;
  }
}

@media (max-width: 960px) {
  .kinds,
  .cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ai-split,
  .split {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .split .sec-head {
    position: static;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .scene {
    margin: 0 auto;
  }

  .tracks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .facts li:nth-child(3) {
    border-left: 0;
  }

  .facts li:nth-child(n + 3) {
    border-top: 1px solid var(--lm-line);
  }

  .start-steps {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .problems,
  .steps,
  .kinds,
  .cols,
  .cols-2 {
    grid-template-columns: minmax(0, 1fr);
  }

  .card {
    padding: 22px;
  }

  [data-theme='light'] .hero-bg,
  [data-theme='light'] .iris {
    margin-left: 8px;
    margin-right: 8px;
    border-radius: 18px;
  }

  .path-body {
    padding: 18px 16px;
  }

  .path li {
    grid-template-columns: 30px minmax(0, 1fr) auto;
  }

  .path li > span:nth-child(3) {
    display: none;
  }

  .timeline-scroll {
    padding: 24px 12px 8px;
  }

  .timeline figcaption {
    padding: 4px 12px 16px;
  }

  .rubric-card {
    padding: 4px 18px;
  }

  .closing-bg {
    border-radius: 18px;
  }

  .foot-row {
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  /* Two small cards a row, so the eight tracks stay one glance tall. */
  .tracks {
    gap: 8px;
  }

  .tracks li {
    column-gap: 10px;
    padding: 10px 12px;
  }

  .t-mark {
    width: 32px;
    height: 32px;
  }

  .tracks b {
    font-size: 14px;
  }

  .tracks li > span:last-child {
    font-size: 12px;
  }

  .facts li {
    padding: 14px 16px;
  }

  .facts b {
    font-size: 26px;
  }

  .btn-lg {
    width: 100%;
    justify-content: center;
  }
}
