/* CHAPTR — chaptr.amsterdam
   Palette and type from the CHAPTR brand book (v1, 2026).
   Layout idea: the site reads like a book — title page, contents, numbered chapters, colophon. */

@font-face {
  font-family: "Inter Tight";
  src: url("/assets/fonts/inter-tight-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand colours */
  --ink: #1a1a18;
  --paper: #f5f2ed;
  --ash: #e0ddd8;
  --stone: #9c9892;
  --dusk: #4a4845;
  --ember: #c4622d;      /* accent: never a background */
  --ember-on-ink: #d9733c;

  /* Type — brand face is Neue Haas Grotesk Display. Helvetica Neue is the closest system face; Inter Tight is the self-hosted fallback. */
  --font: "Neue Haas Grotesk Display Pro", "NHaasGroteskDSPro-65Md", "Helvetica Neue", "Inter Tight", Helvetica, Arial, sans-serif;

  --m: clamp(16px, 3.2vw, 44px);          /* page margin */
  --g: clamp(16px, 2vw, 28px);            /* grid gutter */
  --section: clamp(96px, 14vw, 200px);    /* vertical rhythm */

  --t-label: 12px;
  --t-body: clamp(16px, 1.05vw + 10px, 19px);
  --t-lead: clamp(20px, 1.4vw + 12px, 30px);
  --t-statement: clamp(30px, 4.4vw, 76px);
  --t-display: clamp(48px, 9.6vw, 176px);

  --ease: cubic-bezier(.2, .7, .1, 1);

  --bg: var(--paper);
  --fg: var(--ink);
  --muted: var(--dusk);
  --rule: color-mix(in srgb, var(--ink) 18%, transparent);
  --accent: var(--ember);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--t-body);
  line-height: 1.45;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-kerning: normal;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ol, ul, dl, dd { margin: 0; padding: 0; }
ol, ul { list-style: none; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--ink); color: var(--paper); }

/* Paper grain — a quiet tactile layer, like the stock of a printed book */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- utilities ---------- */
.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; }
.skip { position: absolute; left: var(--m); top: -100px; z-index: 200; background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 999px; font-size: 14px; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.label, .meta {
  font-size: var(--t-label);
  line-height: 1.35;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 500;
}
.ember { color: var(--accent); }
/* The round full stop from the CH. mark, used to close display words */
.dot {
  display: inline-block;
  width: .17em; height: .17em;
  margin-left: .05em;
  border-radius: 50%;
  background: var(--accent);
  overflow: hidden;
  text-indent: 1em;
  vertical-align: baseline;
}
.todo {
  background: color-mix(in srgb, var(--ember) 22%, transparent);
  outline: 1px dashed var(--ember);
  outline-offset: 1px;
  border-radius: 2px;
  padding: 0 .2em;
  font-style: normal;
}

/* Dark sections swap tokens, so every component works on both. */
[data-theme="dark"] {
  --bg: var(--ink);
  --fg: var(--paper);
  --muted: var(--stone);
  --rule: color-mix(in srgb, var(--paper) 20%, transparent);
  --accent: var(--ember-on-ink);
  background: var(--bg);
  color: var(--fg);
}
[data-theme="dark"] ::selection { background: var(--paper); color: var(--ink); }

/* ---------- header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex; align-items: center; gap: var(--g);
  padding: 14px var(--m);
  color: var(--ink);
  transition: color .4s var(--ease), transform .5s var(--ease);
}
.site-header.is-dark { color: var(--paper); }
.site-header.is-hidden { transform: translateY(-110%); }
.site-header__mark { display: block; padding: 6px 0; margin-right: auto; }
.mark {
  display: block;
  width: 52px; height: 26px;
  background: currentColor;
  -webkit-mask: url("/assets/img/ch-mark-ink.png") center / contain no-repeat;
          mask: url("/assets/img/ch-mark-ink.png") center / contain no-repeat;
}
.site-header__nav { display: none; gap: 28px; font-size: 14px; font-weight: 500; }
.site-header__nav a { position: relative; padding: 6px 0; }
.site-header__nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .45s var(--ease);
}
.site-header__nav a:hover::after { transform: scaleX(1); transform-origin: left; }
@media (min-width: 820px) { .site-header__nav { display: flex; margin-right: 12px; } }

.pill {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 500;
  padding: 10px 16px 10px 18px;
  border-radius: 999px;
  background: var(--ink); color: var(--paper);
  transition: background .4s var(--ease), color .4s var(--ease);
}
.site-header.is-dark .pill { background: var(--paper); color: var(--ink); }
.pill__arrow { display: inline-block; transition: transform .4s var(--ease); }
.pill:hover .pill__arrow { transform: translate(2px, 2px) rotate(-45deg); }

/* ---------- hero / title page ---------- */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  padding: calc(72px + 2vh) var(--m) clamp(20px, 3vh, 36px);
  position: relative;
}
.hero__meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule);
}
.meta__k { color: var(--stone); margin-right: .4em; }
.meta--end { display: none; }
@media (min-width: 820px) {
  .hero__meta { grid-template-columns: 1.3fr 1.3fr .8fr .4fr; gap: var(--g); }
  .meta--end { display: block; text-align: right; }
}

.hero__middle {
  display: grid;
  gap: clamp(24px, 4vh, 40px);
  align-content: center;
  padding: clamp(24px, 6vh, 96px) 0;
}
.hero__lede {
  font-size: var(--t-lead);
  line-height: 1.15;
  letter-spacing: -.015em;
  font-weight: 500;
  max-width: 17em;
}
.contents ol { margin-top: 12px; border-top: 1px solid var(--rule); counter-reset: none; }
.contents li { border-bottom: 1px solid var(--rule); }
.contents a {
  display: flex; align-items: baseline; gap: 18px;
  padding: clamp(6px, 1vh, 9px) 0;
  font-size: 15px; font-weight: 500;
  transition: padding .45s var(--ease), color .3s;
}
.contents a span { font-size: var(--t-label); color: var(--stone); font-variant-numeric: tabular-nums; width: 2ch; }
.contents a::after { content: "→"; margin-left: auto; opacity: 0; transform: translateX(-8px); transition: opacity .3s, transform .45s var(--ease); }
.contents a:hover { padding-left: 8px; }
.contents a:hover::after { opacity: 1; transform: none; }
@media (min-width: 820px) {
  .hero__middle { grid-template-columns: repeat(12, 1fr); column-gap: var(--g); }
  .hero__lede { grid-column: 1 / span 6; align-self: end; }
  .contents { grid-column: 9 / span 4; align-self: end; }
}

.hero__title { margin: 0; line-height: 0; }
.hero__wordmark { width: 100%; height: auto; }
.hero__foot {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-top: clamp(14px, 2vw, 26px);
}
.tagline {
  color: var(--ember);
  font-size: clamp(22px, 2.6vw, 44px);
  font-weight: 400;
  letter-spacing: .01em;
  line-height: 1;
}
.cue { font-size: var(--t-label); text-transform: uppercase; letter-spacing: .06em; font-weight: 500; }
.cue span { display: inline-block; margin-left: 6px; animation: cue 2.4s var(--ease) infinite; }
@keyframes cue { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

/* Intro motion — the wordmark rises into place like a page being turned up */
/* Pure CSS so the title page can never get stuck hidden if scripts are slow or blocked. */
.hero__title { overflow: hidden; }
.hero__wordmark { animation: rise 1.3s var(--ease) .15s both; }
.hero__meta, .hero__middle, .hero__foot { animation: fade-up 1s var(--ease) both; }
.hero__meta { animation-delay: .55s; }
.hero__middle { animation-delay: .7s; }
.hero__foot { animation-delay: .95s; }
@keyframes rise { from { transform: translateY(102%); } to { transform: none; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- chapters ---------- */
.chapter {
  position: relative;
  padding: var(--section) var(--m);
  background: var(--bg);
  color: var(--fg);
}
.chapter--ash { --bg: var(--ash); --rule: color-mix(in srgb, var(--ink) 16%, transparent); }
.chapter__head {
  display: flex; align-items: baseline; gap: 18px;
  padding-bottom: 14px;
  margin-bottom: clamp(48px, 7vw, 110px);
  border-bottom: 1px solid var(--rule);
}
.chapter__no {
  font-size: var(--t-label); font-weight: 500; letter-spacing: .06em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.chapter__label { font-size: var(--t-label); font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }

/* Statement with word-by-word fill on scroll */
.statement {
  font-size: var(--t-statement);
  line-height: 1.04;
  letter-spacing: -.028em;
  font-weight: 500;
  max-width: 19em;
  text-wrap: balance;
}
.js .statement .w { color: var(--stone); opacity: .55; transition: color .35s, opacity .35s; }
.js .statement .w.is-on { color: var(--fg); opacity: 1; }

.school {
  display: grid;
  gap: 56px;
  margin-top: clamp(64px, 9vw, 140px);
}
.founders__names {
  display: flex; flex-wrap: wrap; gap: 0 .35em;
  margin-top: 12px;
  font-size: clamp(40px, 6vw, 96px);
  font-weight: 500; letter-spacing: -.035em; line-height: .95;
}
.founders__names li:not(:last-child)::after { content: " /"; color: var(--stone); font-weight: 400; }
.school__text { display: grid; gap: 1em; max-width: 34em; color: var(--muted); }
.school__text p:first-child { color: var(--fg); }
@media (min-width: 900px) {
  .school { grid-template-columns: repeat(12, 1fr); column-gap: var(--g); align-items: end; }
  .founders { grid-column: 1 / span 6; }
  .school__text { grid-column: 8 / span 5; }
}

/* 02 Urban Kiz */
.intro {
  font-size: var(--t-lead);
  line-height: 1.2;
  letter-spacing: -.015em;
  font-weight: 500;
  max-width: 24em;
  margin-bottom: clamp(56px, 8vw, 120px);
}
.pillars { border-top: 1px solid var(--rule); }
.pillar {
  display: grid;
  grid-template-columns: 2.5em 1fr;
  gap: 6px 12px;
  padding: clamp(18px, 2.4vw, 34px) 0;
  border-bottom: 1px solid var(--rule);
}
.pillar__no { font-size: var(--t-label); color: var(--muted); padding-top: .9em; font-style: italic; }
.pillar__word {
  font-size: var(--t-display);
  line-height: .86;
  letter-spacing: -.045em;
  font-weight: 500;
}
.pillar__text { grid-column: 2; color: var(--muted); max-width: 22em; }
@media (min-width: 900px) {
  .pillar { grid-template-columns: 4em 1fr 22em; align-items: end; }
  .pillar__text { grid-column: 3; padding-bottom: .5em; }
}

/* 03 Classes */
.classes { display: grid; gap: 56px; }
.classes__intro { display: grid; gap: 22px; align-content: start; max-width: 28em; }
.classes__intro > p:not(.display-s) { color: var(--muted); }
.display-s { font-size: clamp(36px, 4.4vw, 72px); line-height: .98; letter-spacing: -.035em; font-weight: 500; color: var(--fg); }
.link-arrow { font-weight: 500; display: inline-flex; gap: 10px; border-bottom: 1px solid currentColor; padding-bottom: 4px; justify-self: start; }
.link-arrow span { transition: transform .4s var(--ease); }
.link-arrow:hover span { transform: translateX(4px); }

.levels { border-top: 1px solid var(--rule); }
.level {
  display: grid;
  grid-template-columns: 4.2em 1fr;
  gap: 4px 16px;
  padding: 22px 0 24px;
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.level__no { font-size: var(--t-label); font-weight: 500; letter-spacing: .04em; color: var(--stone); padding-top: .75em; text-transform: uppercase; }
.level__name { font-size: clamp(26px, 2.8vw, 46px); line-height: 1.02; letter-spacing: -.03em; font-weight: 500; transition: transform .5s var(--ease); }
.level__text { grid-column: 2; color: var(--muted); max-width: 30em; }
.level::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  transform: translate(-16px, -50%) scale(0);
  transition: transform .45s var(--ease);
}
@media (hover: hover) {
  .level:hover .level__name { transform: translateX(10px); }
  .level:hover .level__no { color: var(--accent); }
  .level:hover::before { transform: translate(-16px, -50%) scale(1); }
}
@media (min-width: 900px) {
  .classes { grid-template-columns: repeat(12, 1fr); column-gap: var(--g); }
  .classes__intro { grid-column: 1 / span 4; position: sticky; top: 110px; }
  .levels { grid-column: 6 / span 7; }
  .level { grid-template-columns: 5em 1fr 1fr; align-items: baseline; }
  .level__text { grid-column: 3; }
}

/* 04 Values */
.values { display: grid; gap: 0; border-top: 1px solid var(--rule); }
.value { padding: 26px 0 34px; border-bottom: 1px solid var(--rule); display: grid; gap: 10px; }
.value__no { font-size: var(--t-label); color: var(--accent); font-weight: 500; letter-spacing: .06em; }
.value__title { font-size: clamp(26px, 2.6vw, 42px); line-height: 1.02; letter-spacing: -.03em; font-weight: 500; text-wrap: balance; max-width: 12em; }
.value__text { color: var(--muted); }
@media (min-width: 760px) {
  .values { grid-template-columns: 1fr 1fr; column-gap: var(--g); border-top: 0; }
  .value { border-top: 1px solid var(--rule); border-bottom: 0; padding-bottom: clamp(40px, 6vw, 90px); }
}

/* 05 Contact */
.display-xl {
  font-size: clamp(64px, 15vw, 280px);
  line-height: .84;
  letter-spacing: -.05em;
  font-weight: 500;
  margin-left: -.04em;
}
.contact__lede { font-size: var(--t-lead); line-height: 1.2; font-weight: 500; letter-spacing: -.015em; max-width: 20em; margin: clamp(28px, 4vw, 56px) 0 clamp(48px, 6vw, 90px); color: var(--fg); }
.contact__grid { display: grid; gap: 28px; border-top: 1px solid var(--rule); padding-top: 28px; }
.contact__item { display: grid; gap: 8px; align-content: start; }
.contact__item .label { color: var(--muted); }
.contact__item a { justify-self: start; border-bottom: 1px solid var(--rule); transition: border-color .3s; word-break: break-word; }
.contact__item a:hover { border-color: currentColor; }
.contact__big { font-size: clamp(24px, 2.6vw, 40px); letter-spacing: -.02em; font-weight: 500; line-height: 1.1; }
@media (min-width: 900px) {
  .contact__grid { grid-template-columns: repeat(12, 1fr); column-gap: var(--g); }
  .contact__item--primary { grid-column: 1 / span 6; }
  .contact__item:not(.contact__item--primary) { grid-column: span 2; }
}
.button {
  display: inline-flex; align-items: center; gap: 14px;
  margin-top: clamp(48px, 6vw, 80px);
  padding: 16px 26px;
  border-radius: 999px;
  background: var(--fg); color: var(--bg);
  font-weight: 500; font-size: 17px;
  transition: transform .45s var(--ease);
}
.button:hover { transform: translateY(-2px); }
.button span { transition: transform .45s var(--ease); }
.button:hover span { transform: translate(2px, -2px); }

/* ---------- footer / colophon ---------- */
.site-footer {
  padding: clamp(64px, 8vw, 120px) var(--m) clamp(18px, 2.4vw, 28px);
  border-top: 1px solid var(--rule);
  font-size: 15px;
}
.site-footer .label { color: var(--muted); margin-bottom: 14px; }
.site-footer__grid { display: grid; gap: 48px; }
.site-footer__legal > p:not(.label) { max-width: 30em; }
.facts { display: grid; gap: 6px; margin-top: 18px; }
.facts div { display: grid; grid-template-columns: 9.5em 1fr; gap: 12px; }
.facts dt { color: var(--muted); }
.site-footer__links { display: grid; gap: 6px; align-content: start; }
.site-footer__links a { justify-self: start; }
.site-footer__links a:hover { color: var(--accent); }
@media (min-width: 900px) {
  .site-footer__grid { grid-template-columns: repeat(12, 1fr); column-gap: var(--g); }
  .site-footer__legal { grid-column: 1 / span 7; }
  .site-footer__links { grid-column: 9 / span 4; }
}
.site-footer__base { margin-top: clamp(64px, 9vw, 140px); }
.site-footer__wordmark { width: 100%; opacity: .96; }
.site-footer__small {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  padding-top: 16px;
  font-size: var(--t-label); text-transform: uppercase; letter-spacing: .06em; font-weight: 500;
  color: var(--muted);
}
.site-footer__small .ember { text-transform: none; letter-spacing: .01em; font-size: 14px; }

/* ---------- long-form (privacy) ---------- */
.doc { padding: calc(110px + 4vw) var(--m) var(--section); }
.doc__head { display: grid; gap: 22px; padding-bottom: clamp(40px, 6vw, 80px); border-bottom: 1px solid var(--rule); margin-bottom: clamp(40px, 6vw, 80px); }
.doc__title { font-size: clamp(48px, 8vw, 140px); line-height: .9; letter-spacing: -.045em; font-weight: 500; }
.doc__meta { color: var(--muted); }
.doc__body { display: grid; gap: 0; }
.doc__section { display: grid; gap: 14px; padding: 28px 0 36px; border-bottom: 1px solid var(--rule); }
.doc__section h2 { font-size: clamp(22px, 2vw, 30px); letter-spacing: -.02em; line-height: 1.1; font-weight: 500; }
.doc__section .content { display: grid; gap: .9em; max-width: 38em; }
.doc__section ul { display: grid; gap: .4em; }
.doc__section li { padding-left: 1.2em; position: relative; }
.doc__section li::before { content: "—"; position: absolute; left: 0; color: var(--stone); }
.doc__section a { border-bottom: 1px solid var(--rule); }
.doc__section a:hover { border-color: currentColor; }
@media (min-width: 900px) {
  .doc__head { grid-template-columns: repeat(12, 1fr); column-gap: var(--g); align-items: end; }
  .doc__title { grid-column: 1 / span 8; }
  .doc__meta { grid-column: 10 / span 3; }
  .doc__section { grid-template-columns: repeat(12, 1fr); column-gap: var(--g); }
  .doc__section h2 { grid-column: 1 / span 4; }
  .doc__section .content { grid-column: 6 / span 7; }
}

/* ---------- reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform 1.1s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .js .statement .w { color: var(--fg); opacity: 1; }
}

/* "Created by dancers, for dancers." — replaces the founder names in chapter 01 */
.founders__line {
  font-size: clamp(36px, 5.2vw, 88px);
  font-weight: 500; letter-spacing: -.035em; line-height: .98;
  max-width: 9em;
  text-wrap: balance;
}

/* Class times on each level */
.level__when {
  grid-column: 2;
  font-size: var(--t-label); font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent);
  margin: 4px 0 6px;
  font-variant-numeric: tabular-nums;
}
@media (min-width: 900px) {
  .level__no { grid-row: 1 / span 2; }
  .level__when { grid-column: 2; grid-row: 2; margin-bottom: 0; }
  .level__text { grid-row: 1 / span 2; }
}
.classes__venue { color: var(--muted); }
.classes__venue a { border-bottom: 1px solid var(--rule); }
.classes__venue a:hover { border-color: currentColor; }

/* 04: the chapter rule already sits above the list, so the first row drops its own */
.values { border-top: 0; }
.value:first-child { padding-top: 0; }
@media (min-width: 760px) {
  .value:nth-child(-n+2) { border-top: 0; padding-top: 0; }
}

.site-footer__small a { text-transform: uppercase; }
.site-footer__small a:hover { color: var(--fg); }

/* ======================================================================
   UI/UX review pass (ui-ux-pro-max checklist) — experimental copy only
   ====================================================================== */

/* §1 Contrast: brand Stone (2.6:1) and Ember (3.7:1) are too light for small
   text on Paper. Text-only tints keep the look but reach WCAG AA 4.5:1.
   Brand Ember stays for large type (tagline) and the dots. */
:root {
  --stone-text: #6b6762;  /* 5.0:1 on paper */
  --ember-text: #9a4a1c;  /* 5.6:1 on paper, 4.6:1 on ash */
  --header-h: 72px;
}
[data-theme="dark"] { --stone-text: var(--stone); --ember-text: var(--ember-on-ink); }
.meta__k,
.contents a span,
.level__no,
.site-footer__small { color: var(--stone-text); }
.chapter__no,
.level__when,
.value__no { color: var(--ember-text); }
.chapter--ash .value__text { color: var(--dusk); }
/* Unlit words in the scroll-fill statement stay readable (3.5:1, above the 3:1 large-text minimum) */
.js .statement .w { color: #85817b; opacity: 1; }

/* §9 / WCAG 2.2 focus-not-obscured: anchors land below the fixed header */
html { scroll-padding-top: var(--header-h); }

/* §2 Touch targets: 44px tall hit areas on touch screens, no visual change */
a, button { touch-action: manipulation; }
.pill { min-height: 44px; }
@media (pointer: coarse) {
  .contents a { min-height: 44px; }
  .site-header__mark { min-height: 44px; display: flex; align-items: center; }
  .cue,
  .site-footer__small a,
  .contact__item a,
  .classes__venue a,
  .facts a,
  .doc__section a { display: inline-flex; align-items: center; min-height: 44px; }
  .site-footer__small { align-items: center; }
}

/* §5 Safe areas: viewport-fit=cover is on, so keep content clear of notches in landscape */
@supports (padding: max(0px)) {
  .site-header,
  .hero,
  .chapter,
  .site-footer,
  .doc {
    padding-left: max(var(--m), env(safe-area-inset-left));
    padding-right: max(var(--m), env(safe-area-inset-right));
  }
  .site-footer { padding-bottom: max(clamp(18px, 2.4vw, 28px), env(safe-area-inset-bottom)); }
}
