/* Vividly â€” design system. Direction: Colour chapters (seed 1557780953). */

@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("../assets/fonts/hanken-latin.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: "Hanken Grotesk";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("../assets/fonts/hanken-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --step-display: clamp(3.5rem, 9.5vw, 9.375rem);
  --margin: clamp(20px, 2.2vw, 32px);
  --gap-section: clamp(88px, 12vw, 180px);
  --maxw: 1440px;

  --paper: #f5f5f3;
  --ink: #111111;
  --muted: #5c2a05;
  --accent: #de194b;
  --accent-ink: #ffffff;
  --line: rgba(17, 17, 17, 0.18);

  --f1: #ff8126;  --f1-ink: #111111;
  --f2: #4db3ff;  --f2-ink: #111111;
  --f3: #c5f53d;  --f3-ink: #111111;
  --f4: #161615;  --f4-ink: #f2f2f2;
  --f5: #de194b;  --f5-ink: #ffffff;

  --hero-top: var(--paper);
  --hero-bottom: var(--f1);
  --hero-top-ink: #111111;
  --hero-bottom-ink: #111111;
  --nav-ink: #111111;
  --code-bg: #161615;
  --code-ink: #f4f4f2;
  --code-1: #ff9c55;
  --code-2: #7fd3ff;
  --code-3: #d4ff66;
  --code-4: #ff7fa3;
  --shadow: none;
}

:root[data-theme="dark"] {
  --paper: #0e0e0d;
  --ink: #f4f4f2;
  --muted: #e9b98f;
  --accent: #de194b;
  --accent-ink: #ffffff;
  --line: rgba(245, 242, 237, 0.2);

  --f1: #8f3d00;  --f1-ink: #f4f4f4;
  --f2: #16527d;  --f2-ink: #f4f4f4;
  --f3: #6b9519;  --f3-ink: #0a0a0a;
  --f4: #080808;  --f4-ink: #f2f2f2;
  --f5: #de194b;  --f5-ink: #ffffff;

  --hero-top: #0e0e0d;
  --hero-bottom: #8f3d00;
  --hero-top-ink: #f4f4f2;
  --hero-bottom-ink: #f4f4f4;
  --nav-ink: #f5f2ed;
  --code-bg: #080808;
  --code-ink: #f4f4f2;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scrollbar-width: none; }
html::-webkit-scrollbar { width: 0; height: 0; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  font-size: var(--step-body);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: -0.005em;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 {
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 0.9;
  text-wrap: balance;
}
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 200;
  background: var(--ink); color: var(--paper);
  padding: 12px 18px; transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---- Navigation: fixed bar, ink follows the chapter beneath it ---- */
.site-nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 22px var(--margin);
  color: var(--nav-ink);
  transition: color 300ms ease;
  pointer-events: none;
}
.site-nav > * { pointer-events: auto; }
.wordmark {
  font-size: 28px; font-weight: 500; letter-spacing: -0.05em;
  text-decoration: none; line-height: 1;
}
.nav-links { display: flex; align-items: center; gap: clamp(16px, 2vw, 34px); }
.nav-links a {
  font-size: 15px; text-decoration: none; padding: 8px 0;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { border-bottom-color: currentColor; }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 22px; border: 0; border-radius: 0;
  background: var(--accent); color: var(--accent-ink);
  font-size: 15px; font-weight: 500; text-decoration: none; cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--ghost { background: transparent; color: currentColor; border: 2px solid currentColor; }
.theme-toggle {
  width: 46px; height: 46px; border: 2px solid currentColor; border-radius: 0;
  background: transparent; cursor: pointer; display: grid; place-items: center;
  transition: background 160ms ease, color 160ms ease;
}
.theme-toggle:hover { background: currentColor; }
.theme-toggle:hover svg { filter: invert(1); }
.menu-word { display: none; background: transparent; border: 0; cursor: pointer; font-size: 15px; padding: 8px 0; }
.site-nav .nav-links, .site-nav .menu-word { transition: opacity 300ms ease, visibility 300ms ease; }
.site-nav.is-over-cta .nav-links, .site-nav.is-over-cta .menu-word { opacity: 0; visibility: hidden; pointer-events: none; }

/* ---- Hero: two fields meeting at the seam ---- */
.hero {
  position: relative; min-height: 100svh; overflow: hidden;
  background: var(--hero-bottom);
}
.hero-fields { position: absolute; inset: 0; }
.hero-fields::before, .hero-fields::after { content: ""; position: absolute; left: 0; right: 0; height: 50%; }
.hero-fields::before { top: 0; background: var(--hero-top); }
.hero-fields::after { bottom: 0; background: var(--hero-bottom); }
.hero-center {
  position: absolute; top: 46%; left: var(--margin); right: var(--margin);
  transform: translateY(-50%); display: grid; place-items: center; text-align: center;
}
.hero-title {
  grid-area: 1 / 1; font-size: var(--step-display); line-height: 0.86;
  letter-spacing: -0.05em; text-transform: none; max-width: 14ch;
}
.hero-title span { display: block; }
.hero-title--top { color: var(--hero-bottom-ink); }
.hero-title--bottom { display: none; }
.hero-sub {
  position: absolute; left: 50%; bottom: 56px; transform: translateX(-50%);
  width: min(620px, calc(100% - 2 * var(--margin)));
  color: var(--hero-bottom-ink); font-size: 20px; text-align: center;
  line-height: 1.4;
}
.hero-scroll {
  position: absolute; left: var(--margin); bottom: 22px;
  color: var(--hero-bottom-ink); font-size: 13px; letter-spacing: 0.02em;
}
.hero-foot-continue { min-height: 30svh; background: var(--hero-bottom); }

/* ---- Chapters: full-bleed flat fields ---- */
.chapter { position: relative; padding: clamp(90px, 11vw, 170px) var(--margin); min-height: 90svh; }
.chapter--1 { background: var(--f1); color: var(--f1-ink); }
.chapter--2 { background: var(--f2); color: var(--f2-ink); }
.chapter--3 { background: var(--f3); color: var(--f3-ink); }
.chapter--4 { background: var(--f4); color: var(--f4-ink); min-height: 76svh; }
.chapter-inner { width: 100%; max-width: var(--maxw); margin: 0 auto; }
.chapter-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: clamp(40px, 6vw, 90px); align-items: center; }
.chapter-split img { width: 100%; height: auto; object-fit: cover; }
.chapter-head { font-size: var(--step-head); max-width: 22ch; }
.chapter-lead { font-size: var(--step-lead); max-width: 46ch; margin-top: 24px; }
.eyebrow-none { display: none; }

/* ---- Chapter 1: language deck that folds into spines ---- */
.deck-wrap { height: 190svh; position: relative; background: var(--f1); }
.deck-stage {
  position: sticky; top: 0; height: 100svh; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 var(--margin); background: var(--f1); color: var(--f1-ink);
}
.deck-head { font-size: clamp(2.5rem, 4.2vw, 4rem); margin-bottom: 42px; }
.deck-viewport { position: relative; height: 340px; width: 100%; }
.lang-card {
  position: absolute; top: 0; left: 0; height: 340px; width: min(620px, 90vw);
  padding: 32px; background: #111111; color: #f4f4f2;
  display: flex; flex-direction: column; justify-content: space-between;
  transition: transform 520ms cubic-bezier(0.22, 1, 0.36, 1), width 520ms cubic-bezier(0.22, 1, 0.36, 1), filter 300ms ease;
  will-change: transform;
}
.lang-card h3 { font-size: 30px; line-height: 1.1; max-width: 16ch; }
.lang-card p { font-size: 16px; max-width: 42ch; margin-top: 14px; }
.lang-card-foot {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  font-size: 16px; border-top: 2px solid rgba(244, 244, 242, 0.3); padding-top: 14px;
}
.lang-card-foot a { text-decoration-thickness: 2px; text-underline-offset: 4px; }
.lang-card .spine-title { display: none; }
.lang-card.is-spine {
  width: 96px; padding: 18px 10px; background: #2a2a28; overflow: hidden;
  filter: saturate(0.5);
}
.lang-card.is-spine h3 {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-size: 18px; max-height: 100%; white-space: nowrap; overflow: hidden;
}
.lang-card.is-spine p, .lang-card.is-spine .lang-card-foot { display: none; }
.deck-meta {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: 44px; font-size: 17px;
}
.deck-meta a { text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* ---- Chapter 2: feature rows with margin photographs ---- */
.feature-axis { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--margin); }
.feature-statement {
  grid-column: 5 / -1; font-size: clamp(2.5rem, 5vw, 5rem); max-width: 18ch;
  margin: 0 0 clamp(90px, 12vw, 170px);
}
.feature-row {
  grid-column: 5 / -1; display: grid;
  grid-template-columns: minmax(0, 1fr) 260px; column-gap: 48px;
  align-items: start; margin-bottom: clamp(80px, 10vw, 120px);
}
.feature-row:nth-of-type(2) { grid-template-columns: minmax(0, 1fr) 320px; }
.feature-row:nth-of-type(3) { grid-template-columns: minmax(0, 1fr) 180px; }
.feature-row:nth-of-type(4) { grid-template-columns: minmax(0, 1fr) 280px; }
.feature-row:last-of-type { margin-bottom: 0; }
.feature-row h3 { grid-column: 1; font-size: clamp(1.75rem, 2.4vw, 2.5rem); }
.feature-row p { grid-column: 1; max-width: 34ch; font-size: 17px; margin-top: 16px; }
.feature-row img { grid-column: 2; grid-row: 1 / span 2; width: 100%; height: auto; object-fit: cover; }
.feature-row .row-index { display: none; }

/* ---- Chapter 3: accordion strip ---- */
.strip-intro { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--margin); margin-bottom: 64px; }
.strip-intro h2 { grid-column: 1 / 6; font-size: clamp(2.25rem, 4vw, 3.75rem); }
.strip-intro p { grid-column: 7 / 12; font-size: 18px; align-self: end; }
.accordion { display: flex; gap: 0; height: 460px; width: 100%; }
.acc-panel {
  flex: 0 0 9%; background: rgba(17, 17, 17, 0.12);
  transition: flex-basis 450ms cubic-bezier(0.22, 1, 0.36, 1);
  cursor: pointer; position: relative; overflow: hidden; border: 0; padding: 0;
  text-align: left; color: inherit;
}
.acc-panel:nth-child(1) { background: rgba(17, 17, 17, 0.72); color: #f4f4f2; }
.acc-panel:nth-child(2) { background: rgba(17, 17, 17, 0.52); }
.acc-panel:nth-child(3) { background: rgba(17, 17, 17, 0.34); }
.acc-panel:nth-child(4) { background: rgba(17, 17, 17, 0.18); }
.acc-panel.is-open { flex-basis: 58%; background: rgba(17, 17, 17, 0.9); color: #f4f4f2; }
.acc-sliver {
  position: absolute; bottom: 22px; left: 20px;
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-size: 20px; font-weight: 500; white-space: nowrap;
}
.acc-content { display: none; padding: 36px 40px; height: 100%; flex-direction: column; justify-content: space-between; }
.acc-panel.is-open .acc-sliver { display: none; }
.acc-panel.is-open .acc-content { display: flex; }
.acc-content h3 { font-size: 40px; }
.acc-content p { font-size: 18px; max-width: 36ch; }
.acc-img { max-width: 280px; margin-top: 20px; }

/* ---- Chapter 4: one word is the button ---- */
.cta-band {
  position: relative; display: block; min-height: 60svh;
  background: var(--f5); color: var(--f5-ink); text-decoration: none;
  padding: clamp(48px, 7vw, 90px) var(--margin) 24px;
  overflow: hidden;
}
.cta-note { font-size: 20px; max-width: 30ch; position: relative; z-index: 1; }
.cta-arrow { position: absolute; top: clamp(40px, 6vw, 80px); right: var(--margin); }
.cta-word {
  position: absolute; left: var(--margin); right: var(--margin); bottom: 14px;
  font-size: clamp(6rem, 26vw, 25rem); line-height: 0.78; letter-spacing: -0.06em;
  font-weight: 500; white-space: nowrap;
}
.cta-band:hover, .cta-band:focus-visible { background: var(--ink); color: var(--paper); }

/* ---- Footer of tiles ---- */
.site-footer { background: var(--paper); color: var(--ink); padding: 10px; }
.footer-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 10px; }
.tile { padding: 24px; min-height: 180px; display: flex; flex-direction: column; justify-content: space-between; }
.tile--statement { grid-column: 1 / 5; background: var(--f2); color: var(--f2-ink); }
.tile--nav { grid-column: 5 / 8; background: var(--f3); color: var(--f3-ink); }
.tile--time { grid-column: 8 / 10; background: var(--f1); color: var(--f1-ink); }
.tile--email { grid-column: 10 / 13; background: var(--f4); color: #f2f2f2; }
.tile--statement p { font-size: 24px; max-width: 18ch; }
.tile small { font-size: 13px; }
.tile--nav ul { list-style: none; padding: 0; margin: 0; font-size: 16px; line-height: 1.9; }
.tile--nav a { text-decoration: none; border-bottom: 2px solid transparent; }
.tile--nav a:hover { border-bottom-color: currentColor; }
.tile--email a { font-size: 20px; word-break: break-all; }
.tile--wide { grid-column: 1 / 9; min-height: 300px; background: var(--ink); color: var(--paper); align-items: center; justify-content: center; }
.tile--wide span { font-size: clamp(3rem, 9vw, 9rem); letter-spacing: -0.06em; line-height: 0.9; font-weight: 500; }
.tile--invite { grid-column: 9 / 13; min-height: 300px; background: var(--accent); color: var(--accent-ink); text-decoration: none; }
.tile--invite p { font-size: 28px; max-width: 10ch; }
.tile--invite svg { align-self: flex-end; }
.invite-go { align-self: flex-end; font-size: 16px; }

/* ---- Hubs ---- */
.hub-hero { position: relative; padding: clamp(150px, 18vw, 240px) var(--margin) clamp(60px, 8vw, 100px); background: var(--hero-bottom); color: var(--hero-bottom-ink); }
.hub-note { position: absolute; right: var(--margin); bottom: 44px; font-size: 16px; }
.hub-photos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 10px; background: var(--paper); }
.hub-photos img { width: 100%; height: 180px; object-fit: cover; }
.hub-caption { grid-column: 1 / -1; text-align: right; font-size: 15px; padding-right: 10px; }
.hub-hero-inner { max-width: var(--maxw); margin: 0 auto; }
.hub-hero h1 { font-size: clamp(3rem, 10vw, 9rem); }
.hub-hero p { font-size: var(--step-lead); max-width: 50ch; margin-top: 30px; }
.hub-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px; padding: 10px; background: var(--paper);
}
.hub-card {
  min-height: 220px; padding: 28px; text-decoration: none;
  display: flex; flex-direction: column; justify-content: space-between;
  transition: transform 180ms ease;
}
.hub-card:hover { transform: translateY(-6px); }
.hub-card h2 { font-size: clamp(1.75rem, 2.4vw, 2.5rem); }
.hub-card span { font-size: 15px; }
.hub-card:nth-child(6n+1) { background: var(--f1); color: var(--f1-ink); }
.hub-card:nth-child(6n+2) { background: var(--f2); color: var(--f2-ink); }
.hub-card:nth-child(6n+3) { background: var(--f3); color: var(--f3-ink); }
.hub-card:nth-child(6n+4) { background: var(--f4); color: #f2f2f2; }
.hub-card:nth-child(6n+5) { background: var(--f5); color: #fff; }
.hub-card:nth-child(6n+6) { background: var(--ink); color: var(--paper); }

/* ---- Lesson pages ---- */
.lesson-hero { position: relative; padding: clamp(150px, 17vw, 220px) var(--margin) clamp(70px, 9vw, 110px); }
.hero-continue {
  position: absolute; right: var(--margin); bottom: 44px;
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 16px; text-decoration: none;
  border-bottom: 2px solid currentColor; padding-bottom: 4px;
}
.lesson-hero--1 { background: var(--f1); color: var(--f1-ink); }
.lesson-hero--2 { background: var(--f2); color: var(--f2-ink); }
.lesson-hero--3 { background: var(--f3); color: var(--f3-ink); }
.lesson-hero-inner { max-width: var(--maxw); margin: 0 auto; }
.lesson-hero h1 { font-size: clamp(3rem, 9vw, 8rem); }
.lesson-hero p { font-size: var(--step-lead); max-width: 54ch; margin-top: 26px; }
.lesson-crumbs { font-size: 15px; margin-bottom: 28px; }
.lesson-crumbs a { text-decoration-thickness: 2px; text-underline-offset: 4px; }
.lesson-layout {
  display: grid; grid-template-columns: 200px minmax(0, 1fr);
  gap: clamp(32px, 5vw, 80px); justify-content: stretch;
  width: 100%; padding: clamp(70px, 9vw, 120px) var(--margin);
}
.lesson-photos { margin: 56px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.lesson-photos img { width: 100%; height: 220px; object-fit: cover; }
.lesson-photos figcaption { grid-column: 1 / -1; font-size: 15px; margin-top: 8px; text-align: right; }
.lesson-sidebar { align-self: start; position: sticky; top: 110px; }
.lesson-sidebar h2 { font-size: 15px; letter-spacing: 0; line-height: 1.3; margin-bottom: 18px; text-transform: none; }
.lesson-sidebar ol { list-style: none; padding: 0; margin: 0; }
.toc-sub { padding-left: 14px; margin-top: 8px; }
.toc-sub a { font-size: 13px; }
.lesson-sidebar li { margin-bottom: 12px; }
.lesson-sidebar a { font-size: 15px; text-decoration: none; opacity: 0.72; }
.lesson-sidebar a:hover, .lesson-sidebar a[aria-current="location"] { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.lesson-sidebar .side-back { display: inline-block; margin-top: 30px; font-size: 15px; }
.lesson-body h2 { font-size: clamp(2rem, 3.6vw, 3.25rem); margin-top: 76px; scroll-margin-top: 110px; }
.lesson-body h2:first-child { margin-top: 0; }
.lesson-body p { margin: 20px 0; max-width: 66ch; }
.lesson-body ul, .lesson-body ol { max-width: 66ch; padding-left: 24px; }
.lesson-body li { margin: 10px 0; }
.lesson-body strong { font-weight: 500; }
.lesson-body a { text-decoration-thickness: 2px; text-underline-offset: 4px; }
.callout {
  margin: 36px 0; padding: 26px 28px; background: var(--f3); color: #111;
  font-size: 17px; max-width: 66ch;
}
.callout--warn { background: var(--f5); color: #fff; }
.code-block {
  margin: 30px 0; background: var(--code-bg); color: var(--code-ink);
  border-radius: 0; overflow: hidden; max-width: 100%;
}
.code-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 0 12px 18px; font-size: 13px; color: #a9a49b;
  border-bottom: 2px solid rgba(255,255,255,0.12);
}
.code-block pre { margin: 0; padding: 22px 0 22px 20px; }
.code-block code {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 15px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere;
}
.tok-c { color: #9a958c; }
.tok-s { color: var(--code-3); }
.tok-k { color: var(--code-2); }
.tok-n { color: var(--code-1); }
.tok-f { color: var(--code-4); }
.lesson-nav { display: flex; justify-content: space-between; gap: 20px; margin-top: 90px; font-size: 16px; }
.lesson-nav a { text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* ---- Long-form lesson content ---- */
.toc-group { margin-bottom: 24px; }
.toc-label { font-size: 13px; opacity: 0.6; margin: 0 0 10px; }
.lesson-body h3 { font-size: clamp(1.5rem, 2.2vw, 2rem); margin: 52px 0 18px; scroll-margin-top: 110px; }
.concept { margin: 52px 0; }
.concept h3:first-child { margin-top: 0; }
.concept .code-block { margin: 24px 0; }
.watchout {
  background: var(--f1); color: var(--f1-ink); padding: 20px 24px;
  font-size: 16px; max-width: 66ch; margin-top: 22px;
}
.line-table, .fix-table {
  width: 100%; border-collapse: collapse; margin: 28px 0; font-size: 16px;
}
.line-table th, .line-table td, .fix-table th, .fix-table td {
  text-align: left; vertical-align: top; padding: 14px 16px;
  border-bottom: 2px solid var(--line);
}
.line-table th, .fix-table th { font-weight: 500; }
.line-table td:first-child { width: 48%; }
.line-table code {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 14px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere;
}
.ln {
  display: inline-block; min-width: 34px; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.fix-table td:first-child { width: 45%; }
.practice-list li { margin: 16px 0; }
.tool-item { margin: 56px 0; }
.tool-item h3 { font-size: clamp(1.5rem, 2.2vw, 2rem); margin: 0 0 18px; }
.fn-section { margin-top: 64px; }
.fn-item { margin: 56px 0; }
.fn-item h4 { font-size: clamp(1.5rem, 2.2vw, 2rem); margin: 0 0 8px; }
.fn-kind { font-size: 13px; opacity: 0.6; margin: 0 0 16px; }
.fn-purpose { margin-bottom: 0; }
.fn-meta { width: 100%; border-collapse: collapse; margin: 20px 0; }
.fn-meta th, .fn-meta td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 2px solid var(--line); }
.fn-meta th { width: 130px; font-weight: 500; }
.fn-meta code { font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---- Reveal + motion ---- */
.reveal { opacity: 1; }
.js-motion .reveal { transform: translateY(24px); }
.js-motion .reveal.is-in { transform: translateY(0); }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .menu-word { display: block; }
  .site-nav.is-open .nav-links {
    display: flex; position: absolute; top: 72px; left: var(--margin); right: var(--margin);
    flex-direction: column; align-items: flex-start; gap: 6px;
    background: var(--paper); color: var(--ink); padding: 20px;
  }
  .hero-title { max-width: 12ch; }
  .hero-sub { font-size: 17px; bottom: 56px; }
  .hero-scroll { display: none; }
  .feature-statement, .feature-row { grid-column: 1 / -1; }
  .feature-row, .feature-row:nth-of-type(2), .feature-row:nth-of-type(3), .feature-row:nth-of-type(4) {
    grid-template-columns: minmax(0, 1fr); position: relative; padding-bottom: 220px; margin-bottom: 60px;
  }
  .feature-row img {
    grid-column: 1; grid-row: auto; width: 100%; max-width: 320px;
    position: absolute; bottom: 0; left: 0;
  }
  .feature-row:nth-of-type(2) img { width: 70%; left: auto; right: 0; }
  .feature-row:nth-of-type(3) img { width: 55%; }
  .feature-row:nth-of-type(4) img { width: 80%; left: auto; right: 0; }
  .chapter-split { grid-template-columns: minmax(0, 1fr); }
  .strip-intro h2, .strip-intro p { grid-column: 1 / -1; }
  .accordion { flex-direction: column; height: auto; gap: 6px; }
  .acc-panel { flex: 0 0 auto; height: 64px; }
  .acc-panel.is-open { flex: 0 0 auto; height: auto; min-height: 300px; }
  .acc-sliver { writing-mode: horizontal-tb; transform: none; bottom: auto; top: 20px; left: 20px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .tile--statement, .tile--nav, .tile--time, .tile--email, .tile--wide, .tile--invite { grid-column: 1 / -1; }
  .lesson-layout { grid-template-columns: 1fr; }
  .lesson-sidebar { position: static; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
  .lesson-sidebar h2 { grid-column: 1 / -1; }
  .lesson-photos { grid-template-columns: 1fr; }
  .lesson-photos img { height: 180px; }
  .lesson-nav { flex-wrap: wrap; }
  .code-block code { white-space: pre-wrap; overflow-wrap: anywhere; }
}
@media (max-width: 900px) {
  .deck-wrap { height: auto; }
  .deck-stage { position: static; height: auto; padding: 70px var(--margin); }
  .deck-viewport { height: auto; display: flex; flex-direction: column; gap: 12px; }
  .lang-card, .lang-card.is-spine {
    position: static; width: 100%; height: auto; min-height: 240px;
    padding: 24px; transform: none !important; filter: none;
  }
  .lang-card.is-spine h3 { writing-mode: horizontal-tb; transform: none; font-size: 26px; }
  .lang-card.is-spine p, .lang-card.is-spine .lang-card-foot { display: flex; }
  .deck-meta { flex-direction: column; gap: 10px; }
}

@media (max-width: 640px) {
  .deck-wrap { height: auto; }
  .deck-stage { position: static; height: auto; padding: 70px var(--margin); }
  .deck-viewport { height: auto; display: flex; flex-direction: column; gap: 12px; }
  .lang-card, .lang-card.is-spine {
    position: static; width: 100%; height: auto; min-height: 240px;
    padding: 24px; transform: none !important; filter: none;
  }
  .lang-card.is-spine h3 { writing-mode: horizontal-tb; transform: none; font-size: 26px; }
  .lang-card.is-spine p, .lang-card.is-spine .lang-card-foot { display: flex; }
  .deck-meta { flex-direction: column; gap: 10px; }
  .lesson-sidebar { grid-template-columns: repeat(2, 1fr); }
  .fn-meta th { width: 90px; }
  .fn-meta th, .fn-meta td { padding: 10px 8px; }
  .hero-title { font-size: 11vw; max-width: none; }
  .cta-band { min-height: 46svh; }
  .cta-word { font-size: 22vw; }
  .cta-note { font-size: 17px; max-width: 24ch; }
}

@media (max-width: 640px) {
  .line-table, .fix-table { font-size: 14px; }
  .line-table th, .line-table td, .fix-table th, .fix-table td { padding: 10px 8px; }
  .line-table td:first-child { width: 52%; }
  .line-table code { font-size: 12px; }
  .ln { min-width: 24px; }
}

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