/* schwarz.sh: one stylesheet. Light and dark follow the system unless the switch sets data-theme.
   Each project's colors derive from its single --accent. */

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin-opsz-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f7f7f8;
  --fg: #121417;
  --body: #2b3038;
  --muted: #5b6069;
  --dim: #868c94;
  --line: #e3e5e8;
  --panel: #ffffff;
  --inv-dim: #8b9099;
  --inv-line: #2a2e34;
  --shadow: 0 40px 80px -44px rgb(0 0 0 / 0.5);
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --edge: max(20px, calc((100% - 1208px) / 2));
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0e1012;
  --fg: #eceef1;
  --body: #d3d7dd;
  --muted: #9aa1ab;
  --dim: #737a84;
  --line: #24282e;
  --panel: #14171b;
  --inv-dim: #5d636b;
  --inv-line: #cfd3d8;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1012;
    --fg: #eceef1;
    --body: #d3d7dd;
    --muted: #9aa1ab;
    --dim: #737a84;
    --line: #24282e;
    --panel: #14171b;
    --inv-dim: #5d636b;
    --inv-line: #cfd3d8;
    color-scheme: dark;
  }
}

/* Project colors. color-mix is the fallback; relative oklch where supported. */
.tint {
  --band: color-mix(in oklab, var(--accent) 14%, #fff);
  --ink: #121417;
  --tbody: color-mix(in oklab, var(--accent) 25%, #2b2b2b);
  --label: color-mix(in oklab, var(--accent) 40%, #565656);
  --acc: color-mix(in oklab, var(--accent) 70%, #000);
  --rule: color-mix(in oklab, var(--accent) 22%, #fff);
  --pill-bg: #121417;
  --pill-fg: #ffffff;
}
@supports (color: oklch(from red l c h)) {
  .tint {
    --band: oklch(from var(--accent) 0.935 calc(c * 0.24) h);
    --tbody: oklch(from var(--accent) 0.36 calc(c * 0.25) h);
    --label: oklch(from var(--accent) 0.46 calc(c * 0.35) h);
    --acc: oklch(from var(--accent) 0.45 calc(c * 0.9) h);
    --rule: oklch(from var(--accent) 0.86 calc(c * 0.35) h);
  }
}
:root[data-theme="dark"] .tint {
  --band: color-mix(in oklab, var(--accent) 18%, #0e1012);
  --ink: #eef0f3;
  --tbody: color-mix(in oklab, var(--accent) 15%, #d8dbe0);
  --label: color-mix(in oklab, var(--accent) 30%, #949aa3);
  --acc: color-mix(in oklab, var(--accent) 60%, #fff);
  --rule: color-mix(in oklab, var(--accent) 22%, #2a2e34);
  --pill-bg: var(--acc);
  --pill-fg: var(--band);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tint {
    --band: color-mix(in oklab, var(--accent) 18%, #0e1012);
    --ink: #eef0f3;
    --tbody: color-mix(in oklab, var(--accent) 15%, #d8dbe0);
    --label: color-mix(in oklab, var(--accent) 30%, #949aa3);
    --acc: color-mix(in oklab, var(--accent) 60%, #fff);
    --rule: color-mix(in oklab, var(--accent) 22%, #2a2e34);
    --pill-bg: var(--acc);
    --pill-fg: var(--band);
  }
}
@supports (color: oklch(from red l c h)) {
  :root[data-theme="dark"] .tint {
    --band: oklch(from var(--accent) 0.255 calc(c * 0.3) h);
    --ink: oklch(from var(--accent) 0.95 calc(c * 0.08) h);
    --tbody: oklch(from var(--accent) 0.87 calc(c * 0.15) h);
    --label: oklch(from var(--accent) 0.72 calc(c * 0.25) h);
    --acc: oklch(from var(--accent) 0.8 calc(c * 0.7) h);
    --rule: oklch(from var(--accent) 0.34 calc(c * 0.3) h);
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .tint {
      --band: oklch(from var(--accent) 0.255 calc(c * 0.3) h);
      --ink: oklch(from var(--accent) 0.95 calc(c * 0.08) h);
      --tbody: oklch(from var(--accent) 0.87 calc(c * 0.15) h);
      --label: oklch(from var(--accent) 0.72 calc(c * 0.25) h);
      --acc: oklch(from var(--accent) 0.8 calc(c * 0.7) h);
      --rule: oklch(from var(--accent) 0.34 calc(c * 0.3) h);
    }
  }
}

/* Screenshots with a dark counterpart swap with the theme. */
.swap { display: contents; }
.swap-d { display: none !important; }
:root[data-theme="dark"] .swap-l { display: none !important; }
:root[data-theme="dark"] .swap-d { display: block !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .swap-l { display: none !important; }
  :root:not([data-theme="light"]) .swap-d { display: block !important; }
}

/* Theme switch shows the theme it switches to. */
.theme-toggle .i-sun, .theme-toggle .when-dark { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun, :root[data-theme="dark"] .theme-toggle .when-dark { display: inline; }
:root[data-theme="dark"] .theme-toggle .i-moon, :root[data-theme="dark"] .theme-toggle .when-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun, :root:not([data-theme="light"]) .theme-toggle .when-dark { display: inline; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon, :root:not([data-theme="light"]) .theme-toggle .when-light { display: none; }
}

/* --- Base ------------------------------------------------------------------ */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  transition: background-color 320ms ease, color 320ms ease;
}
img { max-width: 100%; }
a { color: inherit; }
a:hover { opacity: 0.8; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
.wrap { max-width: 1320px; margin-inline: auto; padding-inline: clamp(20px, 4%, 56px); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--fg); color: var(--bg); padding: 8px 12px; border-radius: 4px; z-index: 10; }
.skip:focus { left: 8px; }

.display, .display-m, .title, .wordmark, .index-name, .also-name, .built-item h3 {
  font-weight: 600;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.display { font-size: clamp(48px, 8vw, 120px); line-height: 0.94; }
.display span { display: block; }
.display-m { font-size: clamp(40px, 5.2vw, 76px); line-height: 0.96; letter-spacing: -0.05em; }
.title { font-size: clamp(28px, 2.6vw, 34px); line-height: 1.1; letter-spacing: -0.035em; }
.dim { color: var(--dim); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.strong { font-weight: 600; text-decoration: none; }
.lede { font-size: 19px; line-height: 1.55; color: var(--muted); max-width: 560px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim);
}
.eyebrow.acc { color: var(--acc); }
.dot { width: 8px; height: 8px; border-radius: 2px; background: var(--accent); flex: none; }
.label { font-family: var(--mono); font-size: 12.5px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); }

.button {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  font: inherit; font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer;
  background: var(--fg); color: var(--bg); border: 0; border-radius: 6px; padding: 13px 20px;
  transition: opacity 160ms ease, transform 160ms var(--ease);
}
.button:hover { opacity: 0.88; }
.button:active { transform: translateY(1px); }
.button-tint { background: var(--pill-bg); color: var(--pill-fg); font-size: 14.5px; padding: 11px 18px; }
.button-inv { background: var(--bg); color: var(--fg); }

/* --- Header and footer ------------------------------------------------------- */

.site-header { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; padding-block: 24px; }
.wordmark { font-size: 20px; letter-spacing: -0.02em; text-decoration: none; }
.wordmark span { color: var(--dim); }
.site-nav { display: flex; align-items: center; gap: 24px; font-size: 15px; }
.site-nav a { text-decoration: none; }
.theme-toggle {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 500; color: inherit;
  background: transparent; border: 1px solid var(--line); border-radius: 6px; padding: 6px 11px;
}
.tint .theme-toggle { border-color: var(--rule); }
.site-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-block: 8px 36px; font-size: 13px; color: var(--dim); }

/* --- Home: hero and rail --------------------------------------------------------- */

.hero { padding-block: clamp(56px, 9vw, 104px) 56px; display: flex; flex-direction: column; gap: 32px; }
.hero-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px 48px; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-size: 13px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 5px 10px; }

.rail {
  display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 0 var(--edge) 12px; scroll-padding-inline: var(--edge); scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail:focus-visible { outline-offset: -2px; }
.rail-item { flex: 0 0 min(760px, 84%); scroll-snap-align: start; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.rail-item--tall { flex-basis: min(240px, 46%); }
.rail-img { display: block; width: 100%; height: auto; border-radius: 6px; box-shadow: 0 1px 0 rgb(0 0 0 / 0.04), 0 24px 48px -28px rgb(0 0 0 / 0.45); }
.rail-item figcaption { font-size: 13.5px; color: var(--muted); }
.rail-item figcaption a { font-weight: 600; color: var(--fg); text-decoration: none; margin-right: 6px; }

/* --- Home: selected work index ------------------------------------------------------ */

.work { padding-block: 120px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 18px; }
.index { display: flex; flex-wrap: wrap; gap: 48px 72px; align-items: flex-start; padding-top: 8px; }
.index-list { list-style: none; margin: 0; padding: 0; flex: 1 1 360px; min-width: 0; }
.index-item {
  display: flex; align-items: baseline; gap: 14px; padding-block: 18px; border-bottom: 1px solid var(--line);
  text-decoration: none; color: var(--muted); transition: color 200ms ease;
}
.index-item:hover, .index-item[aria-current="true"] { color: var(--fg); opacity: 1; }
.index-item .dot { transform: translateY(-4px); }
.index-name { flex: 1 1 auto; font-size: clamp(24px, 2.6vw, 34px); line-height: 1.1; letter-spacing: -0.035em; }
.index-kind { font-family: var(--mono); font-size: 12px; color: var(--dim); white-space: nowrap; }
.index-previews { flex: 1.5 1 560px; min-width: 0; }
.preview { display: flex; flex-direction: column; gap: 56px; animation: rise 420ms var(--ease); }
.layered { position: relative; padding-bottom: 48px; }
.layered-main { display: block; width: 100%; height: auto; border-radius: 6px; box-shadow: var(--shadow); }
.layered-second {
  position: absolute; left: -28px; bottom: 0; width: 44%; height: auto; display: block;
  border-radius: 6px; box-shadow: 0 24px 48px -18px rgb(0 0 0 / 0.55); outline: 4px solid var(--bg);
}
.layered-second.is-tall { width: 20%; }
.preview-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 40px; }
.preview-meta p { flex: 1 1 320px; font-size: 16.5px; line-height: 1.6; color: var(--body); }
.preview-links { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; color: var(--dim); }
.preview-links .strong { color: var(--fg); }

/* --- Home: chapters --------------------------------------------------------------- */

.chapter { background: var(--band); color: var(--ink); overflow: hidden; transition: background-color 320ms ease, color 320ms ease; }
.chapter-inner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 56px 72px;
  padding-block: clamp(72px, 9vw, 112px); padding-left: var(--edge);
}
.chapter--flip .chapter-inner { flex-direction: row-reverse; padding-left: 0; padding-right: var(--edge); }
.chapter-text { flex: 1 1 380px; max-width: 480px; display: flex; flex-direction: column; gap: 22px; }
.chapter-summary { font-size: 18px; line-height: 1.6; color: var(--tbody); }
.dash-list { list-style: none; margin: 0; padding: 18px 0 0; border-top: 1px solid var(--rule); display: flex; flex-direction: column; gap: 10px; font-size: 15.5px; line-height: 1.5; }
.dash-list li { display: flex; gap: 12px; }
.dash-list li::before { content: "—"; color: var(--accent); }
.facts-inline { margin: 0; padding-top: 18px; border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: 12px 32px; font-size: 14px; }
.facts-inline dt, .facts dt, .details dt {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--label); margin-bottom: 4px;
}
.facts-inline dd, .facts dd, .details dd { margin: 0; }
.chapter-media { flex: 1.8 1 560px; min-width: 0; position: relative; padding-bottom: 56px; }
.chapter-main { display: block; width: 100%; height: auto; border-radius: 6px 0 0 6px; box-shadow: var(--shadow); }
.chapter--flip .chapter-main { border-radius: 0 6px 6px 0; }
.chapter-second {
  position: absolute; bottom: 0; left: 40px; width: 40%; height: auto; display: block;
  border-radius: 6px; box-shadow: 0 24px 48px -18px rgb(0 0 0 / 0.55);
}
.chapter--flip .chapter-second { left: auto; right: 40px; }
.chapter-second.is-tall { width: 17%; }

/* --- Home: also built and contact ---------------------------------------------------- */

.also { padding-top: 112px; }
.also-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 56px; }
.also-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; padding-block: 18px; border-top: 1px solid var(--line); }
.also-list li:nth-child(-n+2) { border-top: 0; }
.also-name { flex: 0 0 120px; font-size: 18px; letter-spacing: -0.02em; }
.also-line { flex: 1 1 200px; font-size: 15px; color: var(--muted); }

.contact-block {
  margin-block: 112px 40px; background: var(--fg); color: var(--bg); border-radius: 8px;
  padding: clamp(32px, 6%, 80px); display: flex; flex-direction: column; gap: 48px;
}
.contact-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 32px; }
.contact-top h2 { flex: 1 1 520px; }
.dim-inv { color: var(--inv-dim); }
.contact-notes { display: flex; flex-wrap: wrap; gap: 20px 48px; padding-top: 28px; border-top: 1px solid var(--inv-line); font-size: 15px; }
.contact-notes > div { flex: 1 1 220px; }
.label-inv { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--inv-dim); margin-bottom: 6px; }

/* --- Project page ---------------------------------------------------------------------- */

.band { background: var(--band); color: var(--ink); transition: background-color 320ms ease, color 320ms ease; }
.band .wordmark span { color: var(--label); }
.band-inner { padding-block: 56px 220px; display: flex; flex-direction: column; gap: 22px; }
.back { align-self: flex-start; font-size: 14px; text-decoration: none; color: var(--acc); }
.project-title { font-size: clamp(60px, 10vw, 150px); line-height: 0.88; letter-spacing: -0.06em; }
.band-lede { max-width: 680px; font-size: clamp(19px, 1.8vw, 22px); line-height: 1.45; color: var(--tbody); }
.facts { margin: 26px 0 0; display: flex; flex-wrap: wrap; border-top: 1px solid var(--rule); }
.facts > div { flex: 1 1 180px; padding: 16px 20px 0 0; }
.facts dd { font-size: 15.5px; }
.lift { margin-top: -170px; }

.figure { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.figure-img { display: block; width: 100%; height: auto; border-radius: 6px; box-shadow: var(--shadow); }
.figure figcaption, .compare figcaption { font-size: 14.5px; color: var(--muted); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.figure--tall { align-items: center; }
.figure--tall .figure-img { max-width: 340px; }

.compare { margin: 0; display: flex; flex-direction: column; gap: 14px; --pos: 50; }
.compare-frame { position: relative; border-radius: 6px; overflow: hidden; box-shadow: 0 60px 110px -60px rgb(0 0 0 / 0.6); user-select: none; }
.compare-frame img { display: block; width: 100%; height: auto; }
.compare-dark { position: absolute; inset: 0; clip-path: inset(0 0 0 calc(var(--pos) * 1%)); }
.compare-line, .compare-knob { position: absolute; left: calc(var(--pos) * 1%); pointer-events: none; }
.compare-line { top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgb(0 0 0 / 0.25); }
.compare-knob {
  top: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%;
  background: #fff; color: #121417; box-shadow: 0 6px 20px rgb(0 0 0 / 0.35);
  display: flex; align-items: center; justify-content: center;
}
.compare-tag { position: absolute; top: 14px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 8px; border-radius: 3px; }
.compare-tag--l { left: 14px; background: rgb(255 255 255 / 0.92); color: #121417; }
.compare-tag--d { right: 14px; background: rgb(14 16 18 / 0.9); color: #eceef1; }
.compare input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }

.split-section { display: flex; flex-wrap: wrap; gap: 32px 80px; padding-block: 104px 88px; }
.split-section .label { flex: 1 1 240px; }
.prose { flex: 3 1 560px; display: flex; flex-direction: column; gap: 20px; font-size: 18.5px; line-height: 1.7; color: var(--body); max-width: 68ch; }
.block { padding-block: 56px 32px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 20px; }
.built-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 40px; }
.built-item { padding-block: 20px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.built-item h3 { font-size: 18px; letter-spacing: -0.02em; }
.built-item p { font-size: 15px; line-height: 1.55; color: var(--muted); }
.screens { gap: 48px; padding-bottom: 96px; }
.pair { display: flex; flex-wrap: wrap; gap: 48px 28px; align-items: flex-start; }
.pair > .figure { flex: 1 1 420px; min-width: 0; }
.details { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; padding-bottom: 64px; }
.details dt { color: var(--dim); }
.details dd { font-size: 16px; line-height: 1.5; }

.next { display: block; text-decoration: none; background: var(--band); color: var(--ink); margin-top: 32px; }
.next:hover { opacity: 1; }
.next-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 32px; padding-block: 64px; }
.next-inner > span { display: flex; flex-direction: column; gap: 8px; }
.next-img { width: 420px; max-width: 100%; height: auto; border-radius: 6px; box-shadow: 0 30px 60px -36px rgb(0 0 0 / 0.5); transition: transform 400ms var(--ease); }
.next:hover .next-img { transform: translateY(-4px); }

/* --- Contact page ------------------------------------------------------------------------ */

.contact-page { display: flex; flex-wrap: wrap; gap: 48px 80px; padding-block: 72px 112px; align-items: flex-start; }
.contact-intro { flex: 1 1 380px; display: flex; flex-direction: column; gap: 24px; }
.form {
  flex: 1.3 1 480px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: clamp(24px, 3.5%, 40px); display: flex; flex-direction: column; gap: 20px;
}
.form-done { gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 8px; font-size: 14px; font-weight: 500; }
.form-row { display: flex; flex-wrap: wrap; gap: 20px; }
.form-row label { flex: 1 1 220px; }
.form input, .form textarea {
  /* 16px or larger, or iPhones zoom in when a field is tapped. */
  font: inherit; font-size: 16px; font-weight: 400; color: var(--fg); background: var(--bg);
  border: 1px solid var(--line); border-radius: 6px; padding: 11px 13px;
}
.form textarea { resize: vertical; line-height: 1.55; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--fg); box-shadow: 0 0 0 3px color-mix(in oklab, var(--fg) 14%, transparent); }
.form-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding-top: 4px; }
.form-errors { border: 1px solid #d6454f; border-radius: 6px; padding: 14px 16px; font-size: 14.5px; }
.form-errors ul { margin: 6px 0 0; padding-left: 18px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* --- Motion and small screens ------------------------------------------------------------- */

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@supports (animation-timeline: view()) {
  .chapter-media, .screens .figure { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
/* Tablets and phones: screenshots lead, full width; text follows. */
@media (max-width: 900px) {
  .index-previews, .work .section-head .eyebrow { display: none; }
  .index-item { color: var(--fg); }
  .index-item::after { content: "→"; color: var(--dim); font-size: 18px; }
  .chapter-inner, .chapter--flip .chapter-inner {
    flex-direction: column; align-items: stretch; gap: 32px;
    padding: 40px 0 56px;
  }
  .chapter-media { order: -1; padding-bottom: 0; }
  .chapter-main, .chapter--flip .chapter-main { border-radius: 0; box-shadow: none; }
  .chapter-second { display: none; }
  .chapter-text { max-width: none; padding-inline: var(--edge); gap: 18px; }
  .also-list, .built-grid { grid-template-columns: minmax(0, 1fr); }
  .also-list li:nth-child(2) { border-top: 1px solid var(--line); }
  .details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work { padding-block: 72px; }
  .also { padding-top: 72px; }
  .contact-block { margin-block: 72px 32px; }
}

/* Phones. */
@media (max-width: 600px) {
  .site-header { padding-block: 12px; flex-wrap: nowrap; }
  .site-nav { gap: 6px; }
  .site-nav a { padding: 12px 8px; }
  .theme-toggle { width: 44px; height: 44px; padding: 0; justify-content: center; }
  .theme-toggle .when-light, .theme-toggle .when-dark { display: none !important; }
  .display { font-size: clamp(44px, 13vw, 60px); }
  .hero { padding-block: 40px 32px; gap: 24px; }
  .lede { font-size: 17px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--edge) * -1); padding-inline: var(--edge); scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chips li { flex: none; }
  .rail { gap: 12px; }
  .rail-item { flex-basis: 88%; }
  .index-name { font-size: 26px; }
  .index-kind { display: none; }
  .chapter-summary { font-size: 17px; }
  .dash-list { font-size: 15px; }
  .contact-block { padding: 32px 24px; gap: 32px; border-radius: 6px; }
  .contact-top .button { width: 100%; justify-content: center; }

  /* Project page: screenshots run edge to edge; captions keep the gutter. */
  .band-inner { padding-block: 32px 112px; gap: 18px; }
  .project-title { font-size: clamp(52px, 16vw, 72px); }
  .facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; }
  .facts > div { padding-right: 0; }
  .lift { margin-top: -80px; padding-inline: 0; }
  .compare-frame, .lift .figure-img { border-radius: 0; }
  .compare figcaption, .lift .figure figcaption { padding-inline: var(--edge); }
  .compare-tag { top: 10px; font-size: 10px; }
  .compare-knob { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
  .split-section { padding-block: 56px 40px; gap: 16px; }
  .prose { font-size: 17px; }
  .screens .figure:not(.figure--tall) .figure-img { width: calc(100% + 40px); max-width: none; margin-inline: -20px; border-radius: 0; box-shadow: none; }
  .screens, .pair { gap: 36px; }
  .next-inner { padding-block: 48px; }

  /* Contact page. */
  .contact-page { padding-block: 32px 72px; gap: 32px; }
  .form { padding: 20px; }
  .form-foot .button { width: 100%; justify-content: center; }
}
