/* ─────────────────────────────────────────────────────────────
   Tokens
   Light only, following the editorial reference: ink on white,
   warm-grey secondary text, hairline rules, three pale panels.
   ───────────────────────────────────────────────────────────── */
:root {
  --bg: #ffffff;
  --ink: #151515;
  --ink-hover: #33332e;
  --muted: #626259;          /* 6.2:1 on --bg, 5.7:1 on --paper */
  --rule: #d9d9d1;
  --paper: #f5f6f8;
  --blue: #d8e1ed;
  --warm: #f0efe6;
  --sheet: #fbfaf6;
  --sheet-edge: #cdcec9;

  /* line-art */
  --art-card: #ffffff;
  --art-edge: #c5c9cd;
  --art-line: #bbc1c6;
  --art-dot: #a5afbc;
  --art-warm-solid: #e3dcc6;

  --live: #2f7d4f;
  --wip: #a86a12;

  --font-display: 'Archivo', 'Arial Black', Arial, sans-serif;
  --font-body: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --nav-h: 88px;
  color-scheme: light;
}

/* ─── Base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html:has(dialog[open]) { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, dl, dd { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
svg { flex-shrink: 0; }

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 5px;
}

[id] { scroll-margin-top: calc(var(--nav-h) + 28px); }

:root { --gutter: 48px; }

.wrap {
  width: 100%;
  max-width: 1380px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: fixed;
  top: -80px;
  left: 20px;
  z-index: 100;
  padding: 10px 18px;
  background: var(--bg);
  border: 1px solid var(--rule);
}
.skip:focus { top: 12px; }

main { padding-top: var(--nav-h); }
main:focus { outline: none; }

/* ─── Type roles ───────────────────────────────────────────── */
.kicker {
  color: var(--muted);
  font: 11px/1.5 var(--font-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 18px;
}
.eyebrow::before {
  content: "";
  width: 5px;
  height: 5px;
  background: var(--ink);
}

.display {
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 125%;
  font-variation-settings: "wdth" 125;
  font-size: clamp(34px, 5.4vw, 80px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}

h2 {
  font-size: clamp(30px, 3.1vw, 44px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.05em;
}

h3 {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.04em;
}

.intro {
  max-width: 52ch;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}
.intro-sm { font-size: 15px; max-width: 44ch; }

/* ─── Buttons and links ────────────────────────────────────── */
.button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 48px;
  font-size: 14px;
}

.button {
  padding: 14px 22px;
  border-radius: 2px;
  background: var(--ink);
  color: var(--bg);
  transition: background-color 0.15s ease-out;
}
.button:hover { background: var(--ink-hover); }

.text-link { border-bottom: 1px solid var(--ink); }

.button svg,
.text-link svg {
  width: 18px;
  height: 18px;
  transition: transform 0.2s ease-out;
}
.button:hover svg,
.text-link:hover svg { transform: translate(2px, -2px); }

.circle-link {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border: 1px solid var(--rule);
  border-radius: 50%;
  transition: background-color 0.15s ease-out, border-color 0.15s ease-out, color 0.15s ease-out;
}
.circle-link svg { width: 18px; height: 18px; }
.circle-link:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 10px;
  vertical-align: 0.1em;
}
.status-live { background: var(--live); }
.status-wip { background: var(--wip); }

/* ─── Nav ──────────────────────────────────────────────────── */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  height: var(--nav-h);
}

.brand { display: flex; align-items: center; gap: 15px; }
.brand-mark {
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 125%;
  font-variation-settings: "wdth" 125;
  font-size: 15px;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}
.brand-sub {
  padding-left: 15px;
  border-left: 1px solid var(--rule);
  font: 10px var(--font-mono);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-links,
.nav-actions {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 13px;
  white-space: nowrap;
}
.nav-links a {
  padding-block: 10px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease-out;
}
.nav-links a:hover,
.nav-links a[aria-current="true"] { border-color: var(--ink); }

.nav-actions .button { min-height: 42px; padding: 10px 18px; font-size: 13px; }


.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
}
.menu-toggle svg { width: 22px; height: 22px; }

.mobile-menu {
  display: grid;
  gap: 4px;
  max-height: calc(100dvh - var(--nav-h));
  overflow: auto;
  padding-block: 16px 28px;
  border-top: 1px solid var(--rule);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 14px;
  border-bottom: 1px solid var(--rule);
  font-size: 17px;
}
.mobile-menu small { color: var(--muted); font: 11px var(--font-mono); }

/* ─── Hero ─────────────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 64px;
  padding-block: 78px 64px;
}

.hero-copy .display { margin-block: 38px 28px; }
.hero-copy .display span { display: block; }
.hero-copy .intro { max-width: 44ch; }

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 28px;
  margin-top: 32px;
}

.hero-note {
  margin-top: 26px;
  color: var(--muted);
  font-size: 13px;
}

/* The signature: an API response sheet laid on a network map */
.study {
  position: relative;
  width: 100%;
  max-width: 650px;
  min-width: 0;
  margin: 0 auto;
  aspect-ratio: 1.12;
  overflow: hidden;
  background: var(--blue);
}

.study-label,
.study-caption {
  position: absolute;
  left: 25px;
  right: 25px;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  color: var(--muted);
  font: 10px/1.6 var(--font-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.study-label { top: 22px; }
.study-caption { bottom: 22px; }

.study-network {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.study-sheet {
  position: absolute;
  top: 20%;
  left: 14%;
  width: 58%;
  padding: 24px;
  background: var(--sheet);
  border: 1px solid var(--sheet-edge);
  transform: rotate(-7deg);
  transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.study-sheet-back {
  top: 27%;
  left: 34%;
  height: 59%;
  background: var(--warm);
  transform: rotate(10deg);
}

/* Sheets settle into place once on load */
.js .study:not(.is-settled) .study-sheet-front { transform: rotate(0deg) translateY(10px); }
.js .study:not(.is-settled) .study-sheet-back { transform: rotate(2deg); }

.study-sheet-top,
.study-sheet-end {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font: 10px/1.6 var(--font-mono);
}
.study-sheet-top { padding-bottom: 20px; border-bottom: 1px solid var(--rule); }
.study-sheet-top span:last-child { color: var(--live); }

.study-sheet p {
  margin: 26px 0;
  font-size: clamp(18px, 2.2vw, 32px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.06em;
}

.study-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.study-sheet-end {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 9px;
}

/* ─── Working terms ────────────────────────────────────────── */
.terms {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px;
  padding-block: 28px;
  border-block: 1px solid var(--rule);
}
.terms > div {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-content: start;
  gap: 4px 15px;
}
.terms svg { grid-row: span 2; width: 20px; height: 20px; margin-top: 3px; }
.terms dt { font-size: 15px; letter-spacing: -0.03em; }
.terms dd { color: var(--muted); font-size: 13px; }
#heroClock { font-family: var(--font-mono); font-size: 12px; }

/* ─── Sections ─────────────────────────────────────────────── */
/* The rule is drawn as a background so it stops at the content edge,
   not the padding edge, and lines up with the rows inside. */
.section {
  padding-block: 88px;
  background: linear-gradient(var(--rule), var(--rule)) center top / calc(100% - 2 * var(--gutter)) 1px no-repeat;
}
.section-first { background: none; }

.split-heading {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  gap: 70px;
  margin-bottom: 40px;
}
.split-heading h2 { margin-top: 22px; }
.split-heading > div > p:not(.kicker) {
  max-width: 44ch;
  color: var(--muted);
  font-size: 15px;
}
.split-heading .text-link { margin-top: 18px; }

/* ─── Project board ────────────────────────────────────────── */
.board-labels,
.row {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) 200px;
  gap: 28px;
}

.board-labels {
  padding-block: 15px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font: 10px/1.6 var(--font-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.row {
  align-items: center;
  min-width: 0;
  padding-block: 28px;
  border-top: 1px solid var(--rule);
}
.row:last-child { border-bottom: 1px solid var(--rule); }

.row-field {
  display: flex;
  align-items: baseline;
  gap: 12px;
  color: var(--muted);
  font: 11px/1.7 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.row-field .kicker { font-size: 10px; }

.row-body { min-width: 0; }
.row h3 { max-width: 48ch; }
.row h3 a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.row-desc {
  max-width: 72ch;
  margin-top: 9px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 15px;
  margin-top: 14px;
  color: var(--muted);
  font: 11px/1.6 var(--font-mono);
}
.row-meta span + span { padding-left: 15px; border-left: 1px solid var(--rule); }

.row-end {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
}
.row-end strong {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

/* ─── Writing cards ────────────────────────────────────────── */
.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card { position: relative; }

.card-art { background: var(--paper); }
.card-art svg { display: block; width: 100%; height: auto; }
.art-warm { background: var(--warm); }
.art-blue { background: var(--blue); }

.card-number {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-block: 19px 14px;
  color: var(--muted);
  font: 11px/1.6 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.card-number span { color: var(--ink); }

.card h3 { font-size: 20px; line-height: 1.25; }

.post-open {
  text-align: left;
  letter-spacing: inherit;
  line-height: inherit;
}
/* Whole card is the click target; the button stays the accessible name */
.post-open::after { content: ""; position: absolute; inset: 0; }
.card:hover .post-open {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.post-open:focus-visible { outline: none; }
.post-open:focus-visible::after { outline: 2px solid var(--ink); outline-offset: 6px; }

.card > p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

/* ─── Line-art shared classes ──────────────────────────────── */
.a-card { fill: var(--art-card); stroke: var(--art-edge); }
.a-card-path { fill: var(--art-card); stroke: var(--art-edge); }
.a-rule { stroke: var(--rule); }
.a-edge { stroke: var(--art-edge); }
.a-line { stroke: var(--art-line); }
.a-line.dashed { stroke-dasharray: 3 5; }
.a-dot, .a-dot circle { fill: var(--art-dot); stroke: none; }
.a-blue { fill: var(--blue); stroke: none; }
.a-warm { fill: var(--warm); stroke: none; }
.a-warm-solid { fill: var(--art-warm-solid); stroke: none; }
.a-ink { stroke: var(--ink); fill: none; }

/* Strokes draw in when their panel scrolls into view */
.js .draw { stroke-dasharray: 1; stroke-dashoffset: 1; }
.js .art-arrived .draw { animation: draw 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) 0.1s both; }
.js .art-arrived .draw-slow { animation-duration: 1.4s; animation-delay: 0.3s; }

@keyframes draw {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

/* ─── Stack surface ────────────────────────────────────────── */
.surface {
  background: var(--paper);
  border-block: 1px solid var(--rule);
}

.stack-layout {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 50px 80px;
  padding-block: 80px;
}

.stack-copy h2 { margin-block: 22px; }
.stack-copy > p:not(.kicker) { max-width: 42ch; color: var(--muted); font-size: 15px; }

.stack-size {
  display: flex;
  align-items: center;
  gap: 25px;
  margin-top: 38px;
}
.stack-size strong {
  font-size: clamp(56px, 6vw, 80px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.07em;
}
.stack-size span { color: var(--muted); font: 11px/1.7 var(--font-mono); text-transform: uppercase; letter-spacing: 0.03em; }

.stack-index {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 40px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.stack-index li {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 15px;
  padding-block: 13px;
  border-bottom: 1px solid var(--rule);
}
.stack-index li:nth-child(-n+2) { padding-top: 0; }
.stack-index .kicker { font-size: 10px; padding-top: 6px; }
.stack-index h3 { font-size: 20px; }
.stack-index p { margin-top: 2px; color: var(--muted); font-size: 13px; }

/* ─── About ────────────────────────────────────────────────── */
.about {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 80px;
}
.about h2 { margin-top: 24px; }

.prose p + p { margin-top: 18px; }
.about .prose { max-width: 62ch; color: var(--muted); font-size: 16px; line-height: 1.75; }
.prose a { color: var(--ink); border-bottom: 1px solid var(--ink); padding-bottom: 1px; }

.link-list { margin: 40px 0 0; padding: 0; list-style: none; }
.link-list a {
  display: grid;
  grid-template-columns: 1fr auto 20px;
  align-items: center;
  gap: 20px;
  padding-block: 20px;
  border-top: 1px solid var(--rule);
  font-size: 18px;
  letter-spacing: -0.03em;
}
.link-list li:last-child a { border-bottom: 1px solid var(--rule); }
.link-list small { color: var(--muted); font: 11px var(--font-mono); letter-spacing: 0; }
.link-list svg { width: 18px; height: 18px; transition: transform 0.2s ease-out; }
.link-list a:hover svg { transform: translate(2px, -2px); }
.link-list a:hover span { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }

/* ─── Closing ──────────────────────────────────────────────── */
.closing {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 70px;
  padding-block: 70px 100px;
  border-top: 1px solid var(--rule);
}
.closing h2 { margin-top: 24px; max-width: 18ch; }
.closing small { display: block; margin-top: 22px; color: var(--muted); font-size: 13px; }
.closing small a { color: var(--ink); border-bottom: 1px solid var(--ink); padding-bottom: 2px; }

/* ─── Footer ───────────────────────────────────────────────── */
.footer {
  padding-block: 50px 30px;
  background: var(--paper);
  border-top: 1px solid var(--rule);
}

.footer-main {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 60px;
}
.footer-main p { margin-top: 22px; color: var(--muted); font-size: 16px; }
.footer nav { display: flex; flex-direction: column; gap: 16px; font-size: 13px; }
.footer nav a { display: inline-flex; align-items: center; gap: 10px; width: fit-content; }
.footer nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer nav svg { width: 14px; height: 14px; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-top: 50px;
  color: var(--muted);
  font: 11px/1.6 var(--font-mono);
}

/* ─── Post reader (native modal dialog) ────────────────────── */
.reader {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--bg);
  color: var(--ink);
  overflow-y: auto;
}
.reader::backdrop { background: var(--bg); }
.reader[open] { animation: reader-in 0.3s ease-out both; }

@keyframes reader-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.reader-inner { max-width: 820px; padding-block: 56px 110px; }

.reader-back {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  margin-bottom: 36px;
  color: var(--muted);
  font-size: 13px;
}
.reader-back:hover { color: var(--ink); }
.reader-back svg { width: 16px; height: 16px; }

.reader-title {
  max-width: 28ch;
  margin-top: 22px;
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.055em;
}

.reader-body {
  margin-top: 44px;
  padding-top: 36px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.reader-body p { margin-block: 18px; }
.reader-body strong, .reader-body em { color: var(--ink); }
.reader-body h2,
.reader-body h5 {
  margin-block: 40px 14px;
  color: var(--ink);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.035em;
}
.reader-body h5 {
  margin-top: 8px;
  color: var(--muted);
  font: 11px/1.6 var(--font-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.reader-body code {
  padding: 2px 6px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 2px;
  color: var(--ink);
  font: 0.85em var(--font-mono);
}
.reader-body pre {
  margin-block: 26px;
  padding: 22px 24px;
  overflow-x: auto;
  background: var(--paper);
  border-block: 1px solid var(--rule);
  line-height: 1.6;
}
.reader-body pre code { padding: 0; border: 0; background: none; font-size: 13px; }
.reader-body blockquote {
  margin: 32px 0;
  padding: 4px 0 4px 26px;
  border-left: 2px solid var(--ink);
  color: var(--ink);
  font-size: 20px;
  line-height: 1.5;
  letter-spacing: -0.03em;
}

/* ─── Responsive ───────────────────────────────────────────── */
@media (max-width: 1100px) {
  :root { --nav-h: 80px; --gutter: 32px; }
  .nav-links { gap: 22px; }
  .nav-actions { gap: 20px; }
  .brand-sub { display: none; }
  .hero { gap: 36px; }
  .study-sheet { padding: 18px; }
  .study-sheet p { margin-block: 20px; }
  .study-sheet-end { margin-top: 18px; padding-top: 12px; }
  .board-labels, .row { grid-template-columns: 120px minmax(0, 1fr) 160px; gap: 24px; }
  .cards { gap: 18px; }
  .stack-layout { gap: 40px; }
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .menu-toggle { display: flex; }
  .hero { grid-template-columns: 1fr; gap: 44px; padding-block: 55px 40px; }
  .hero-copy .display { font-size: clamp(36px, 8vw, 64px); }
  .study { aspect-ratio: 1.35; max-width: 610px; }
  .study-sheet-front { top: 16%; width: 54%; }
  .study-sheet-back { top: 26%; }
  .study-sheet p { font-size: clamp(22px, 4vw, 32px); }
  .terms { gap: 20px; }
  .split-heading { gap: 40px; }
  .board-labels, .row { grid-template-columns: 100px minmax(0, 1fr) 140px; gap: 20px; }
  .row-end strong { font-size: 15px; }
  .cards { grid-template-columns: 1fr 1fr; gap: 40px 25px; }
  .stack-layout { grid-template-columns: 1fr; }
  .about { gap: 40px; }
  .footer-main { gap: 35px; }
}

@media (max-width: 720px) {
  .nav-actions .button { display: none; }
}

@media (max-width: 600px) {
  :root { --nav-h: 72px; --gutter: 16px; }
  .nav-inner { gap: 12px; }
  .nav-actions { gap: 8px; }
  .brand-mark { font-size: 13px; }
  .hero { gap: 36px; padding-block: 40px 30px; }
  .hero-copy .display { font-size: clamp(30px, 10vw, 44px); margin-block: 28px 22px; }
  .hero .intro { font-size: 16px; }
  .study { aspect-ratio: 1; }
  .study-sheet-front { top: 22%; left: 10%; width: 66%; }
  .study-sheet-back { top: 30%; left: 30%; }
  .study-label, .study-caption { left: 16px; right: 16px; font-size: 8px; }
  .study-sheet { padding: 14px; }
  .study-sheet-top { padding-bottom: 12px; font-size: 8px; }
  .study-sheet p { margin-block: 14px; font-size: 21px; }
  .study-check { gap: 6px; margin-top: 6px; font-size: 10px; }
  .study-sheet-end { margin-top: 12px; padding-top: 10px; font-size: 7px; }
  .terms { grid-template-columns: 1fr; gap: 20px; padding-block: 24px; }
  .section { padding-block: 56px; }
  .split-heading { grid-template-columns: 1fr; gap: 22px; margin-bottom: 28px; }
  .board-labels { display: none; }
  .row { grid-template-columns: 1fr; gap: 12px; padding-block: 24px; }
  .row h3 { font-size: 20px; }
  .row-end { margin-top: 4px; }
  .cards { grid-template-columns: 1fr; gap: 44px; }
  .stack-layout { padding-block: 56px; }
  .stack-index { grid-template-columns: 1fr; }
  .stack-index li:nth-child(2) { padding-top: 13px; }
  .about { grid-template-columns: 1fr; gap: 28px; }
  .link-list a { font-size: 17px; gap: 12px; }
  .closing { grid-template-columns: 1fr; gap: 26px; padding-block: 48px 64px; }
  .footer-main { grid-template-columns: 1fr 1fr; gap: 30px; }
  .footer-main > div { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; gap: 12px; padding-top: 36px; }
  .reader-inner { padding-block: 28px 80px; }
  .reader-body { font-size: 16px; }
}

@media (max-width: 380px) {
  .link-list small { display: none; }
  .link-list a { grid-template-columns: 1fr 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .js .draw { stroke-dasharray: none; stroke-dashoffset: 0; }
  .js .study:not(.is-settled) .study-sheet-front { transform: rotate(-7deg); }
  .js .study:not(.is-settled) .study-sheet-back { transform: rotate(10deg); }
}
