/* Karim Lab — site styles. One file, no framework. */

@font-face { font-family: "Inter"; src: url(../fonts/Inter-Regular.woff) format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url(../fonts/Inter-SemiBold.woff) format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url(../fonts/InterDisplay-Bold.woff) format("woff"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url(../fonts/InterDisplay-Black.woff) format("woff"); font-weight: 900; font-display: swap; }
@font-face { font-family: "Lab Mono"; src: url(../fonts/DejaVuSansMono.woff) format("woff"); font-weight: 400; font-display: swap; }

:root {
  --paper: #f2efe6;
  --paper-2: #e8e4d6;
  --card: #fbfaf6;
  --ink: #141414;
  --ink-2: #34332f;
  --muted: #6b675d;
  --line: rgba(20, 20, 20, .14);
  --line-strong: rgba(20, 20, 20, .85);
  --accent: #ff5b1f;
  --accent-dk: #d9420c;
  --green: #17824a;
  --radius: 14px;
  --wrap: 1180px;
  --display: "Inter Display", "Inter", system-ui, sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Lab Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: -1px -1px;
  background-attachment: fixed;
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
body::before { /* soften the grid so it reads as paper, not a spreadsheet */
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 80% at 50% 0%, rgba(242,239,230,.55), rgba(242,239,230,.88));
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.025em; line-height: 1.05; margin: 0 0 .4em; }
h2 { font-size: clamp(28px, 4vw, 44px); }
h3 { font-size: 22px; letter-spacing: -0.015em; }
p { margin: 0 0 1em; }
.mono { font-family: var(--mono); font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 99; border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ---------- Family bar (only when signed in) ---------- */
.familybar { background: var(--ink); color: var(--paper); font-size: 13.5px; padding: 8px 24px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.familybar a { color: var(--accent); font-weight: 600; text-decoration: none; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(242,239,230,.86); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.site-header__in { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__mark { width: 26px; height: 26px; border-radius: 7px; background: var(--ink); position: relative; display: inline-block; }
.brand__mark i { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); right: 4px; bottom: 4px; }
.brand__mark::before { content: ""; position: absolute; left: 5px; top: 5px; width: 7px; height: 7px; border: 2px solid var(--paper); border-radius: 2px; }
.brand__name { font: 700 19px/1 var(--display); letter-spacing: -0.02em; }
.topnav { display: flex; gap: 4px; }
.topnav a { text-decoration: none; font-weight: 600; font-size: 15px; padding: 8px 14px; border-radius: 999px; color: var(--ink-2); }
.topnav a:hover { background: var(--paper-2); color: var(--ink); }
.topnav a[aria-current="page"] { background: var(--ink); color: var(--paper); }

/* ---------- Buttons & links ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; font: 600 15.5px/1 var(--sans); text-decoration: none; border: 1.5px solid var(--ink); cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s; }
.btn:active { transform: translateY(1px); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { box-shadow: 4px 4px 0 var(--accent); transform: translate(-2px, -2px); }
.btn--line { background: transparent; color: var(--ink); }
.btn--line:hover { background: var(--ink); color: var(--paper); }
.btn--accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--accent:hover { background: var(--accent-dk); border-color: var(--accent-dk); }
.btn--ghost { background: transparent; color: inherit; border-color: currentColor; opacity: .9; }
.btn--ghost:hover { opacity: 1; background: rgba(255,255,255,.08); }
.arrowlink { display: inline-flex; gap: 8px; font-weight: 600; text-decoration: none; border-bottom: 2px solid var(--accent); padding-bottom: 2px; }
.arrowlink span { transition: transform .15s; }
.arrowlink:hover span { transform: translateX(4px); }
.kicker { color: var(--muted); margin-bottom: 14px; }
.kicker span { color: var(--accent); padding: 0 4px; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(48px, 9vw, 110px) 0 48px; border-bottom: 1px solid var(--line); }
.hero__field { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero__in { position: relative; }
.hero__title { font-weight: 900; font-size: clamp(68px, 15vw, 210px); line-height: .84; letter-spacing: -0.06em; margin: 0 0 26px; }
.hero__title .dot { color: var(--accent); }
.hero__lead { font-size: clamp(20px, 2.4vw, 28px); line-height: 1.3; max-width: 22em; color: var(--ink-2); letter-spacing: -0.01em; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 30px 0 56px; }

.longbuild { max-width: 760px; padding-bottom: 22px; }
.longbuild__head { display: flex; justify-content: space-between; color: var(--muted); margin-bottom: 10px; }
.longbuild__track { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.longbuild__track li { position: relative; height: 44px; border: 1.5px solid var(--line-strong); border-radius: 8px; display: flex; align-items: flex-end; padding: 0 0 6px 8px; background: var(--card); }
.longbuild__track li span { font-size: 10.5px; color: var(--muted); }
.longbuild__track li.is-past { background: var(--ink); }
.longbuild__track li.is-past span { color: var(--paper); }
.longbuild__track li.is-now { background: var(--accent); border-color: var(--accent); }
.longbuild__track li.is-now span { color: #fff; }
.longbuild__track li.is-now::after { content: "you are here"; position: absolute; bottom: -20px; left: 0; font: 10px/1 var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--accent-dk); white-space: nowrap; }

/* ---------- Bench (now) ---------- */
.band { background: var(--ink); color: var(--paper); }
.bench { display: grid; grid-template-columns: 200px 1fr auto; gap: 40px; align-items: center; padding-top: 38px; padding-bottom: 38px; }
.bench__label { color: #b9b5aa; display: flex; align-items: center; gap: 10px; }
.live { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(255,91,31,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(255,91,31,0); } 100% { box-shadow: 0 0 0 0 rgba(255,91,31,0); } }
.bench__body h2 { font-size: clamp(24px, 3vw, 34px); margin-bottom: 8px; }
.bench__body p { color: #d7d3c8; margin: 0; max-width: 40em; }
.bench__stats { display: flex; gap: 28px; margin: 0; }
.bench__stats dt { color: #b9b5aa; }
.bench__stats dd { margin: 0; font: 900 46px/1 var(--display); letter-spacing: -0.04em; }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section--tight { padding-top: 24px; }
.section--top0 { padding-top: 0; }
.section__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 30px; }
.section__head h2 { margin: 0; }
.empty { padding: 40px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius); text-align: center; color: var(--muted); }

/* ---------- Cards ---------- */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.card { background: var(--card); border: 1.5px solid var(--ink); border-radius: var(--radius); overflow: hidden; transition: transform .18s ease, box-shadow .18s ease; }
.card:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--ink); }
.card__link { display: flex; flex-direction: column; height: 100%; text-decoration: none; }
.card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.card__meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; color: var(--muted); }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--ink-2); font-size: 15.5px; line-height: 1.5; }
.card__flags { margin-top: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.card.is-hidden, .entry.is-hidden { display: none; }

.tags { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font: 12px/1 var(--mono); padding: 6px 9px; border-radius: 6px; background: var(--paper-2); color: var(--ink-2); }

.pill { display: inline-flex; align-items: center; gap: 6px; font: 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .05em; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--ink); background: var(--card); }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.pill--building i { background: var(--accent); }
.pill--shipped i { background: var(--green); }
.pill--idea i { background: transparent; border: 1.5px solid var(--ink); }

.flag { font: 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; padding: 5px 8px; border-radius: 5px; }
.flag--example { background: #fff2c2; color: #6b5200; border: 1px dashed #b38f00; }
.flag--private { background: var(--ink); color: var(--paper); }
.flag--draft { background: var(--paper-2); color: var(--muted); }
.flag--review { background: #ffe1d3; color: var(--accent-dk); }

/* Generated covers */
.cover { aspect-ratio: 16 / 10; border-bottom: 1.5px solid var(--ink); overflow: hidden; background: var(--paper-2); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover--gen { position: relative; display: flex; align-items: flex-end; padding: 16px 18px; }
.cover--gen span { position: relative; font: 900 clamp(56px, 7vw, 92px)/.8 var(--display); letter-spacing: -0.06em; }
.cover--v0 { background-color: var(--accent); background-image: radial-gradient(rgba(20,20,20,.35) 1.6px, transparent 1.7px); background-size: 16px 16px; color: var(--ink); }
.cover--v1 { background: var(--ink) repeating-radial-gradient(circle at 85% 20%, transparent 0 14px, rgba(255,91,31,.9) 14px 16px); color: var(--paper); }
.cover--v2 { background: repeating-linear-gradient(-45deg, var(--paper-2) 0 12px, var(--card) 12px 24px); color: var(--ink); }
.cover--v2::after { content: ""; position: absolute; right: 18px; top: 18px; width: 34%; aspect-ratio: 1; border-radius: 50%; background: var(--accent); }
.cover--v3 { background-color: #1d1d1b; background-image: linear-gradient(rgba(242,239,230,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(242,239,230,.12) 1px, transparent 1px); background-size: 22px 22px; color: var(--accent); }
.cover--hero { aspect-ratio: 21 / 9; border: 1.5px solid var(--ink); border-radius: var(--radius); margin-bottom: 48px; }
.cover--hero.cover--gen { aspect-ratio: 3 / 1; }
.cover--hero.cover--gen span { font-size: clamp(90px, 16vw, 200px); }

/* ---------- Log list (home) ---------- */
.split { display: grid; grid-template-columns: 1fr 1.4fr; gap: 56px; align-items: start; }
.loglist { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--ink); }
.loglist li { display: flex; gap: 16px; align-items: flex-start; padding: 16px 0; border-bottom: 1px solid var(--line); }
.loglist__meta { color: var(--muted); margin: 0 0 4px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.loglist__title { font-weight: 600; font-size: 18px; margin: 0; letter-spacing: -0.01em; }
.logicon { flex: none; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font: 700 16px/1 var(--mono); border: 1.5px solid var(--ink); background: var(--card); }
.logicon--achievement, .logicon--milestone { background: var(--accent); border-color: var(--accent); color: #fff; }
.logicon--book { background: var(--ink); color: var(--paper); }

/* ---------- Teaser ---------- */
.teaser { display: grid; grid-template-columns: 1.3fr 1fr; gap: 30px; align-items: center; background: var(--ink); color: var(--paper); border-radius: calc(var(--radius) + 8px); padding: clamp(28px, 5vw, 60px); text-decoration: none; overflow: hidden; }
.teaser .kicker { color: #b9b5aa; }
.teaser p { color: #d7d3c8; max-width: 32em; }
.teaser .btn { margin-top: 8px; }
.teaser__art { width: 100%; max-width: 300px; justify-self: center; }
.teaser__line { stroke: var(--paper); stroke-width: 2; stroke-dasharray: 6 6; animation: dash 8s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -120; } }
.teaser__a circle { fill: var(--accent); }
.teaser__b circle { fill: var(--paper); }
.teaser:hover .btn--accent { background: var(--accent-dk); }

/* ---------- Page heads ---------- */
.pagehead { padding: clamp(48px, 8vw, 96px) 0 40px; }
.pagehead h1 { font-weight: 900; font-size: clamp(52px, 9vw, 120px); line-height: .9; letter-spacing: -0.055em; margin-bottom: 20px; }
.pagehead__lead { font-size: clamp(18px, 2vw, 23px); line-height: 1.4; color: var(--ink-2); max-width: 34em; }
.pagehead--project h1 { font-size: clamp(42px, 7vw, 88px); }
.pagehead--dark { background: var(--ink); color: var(--paper); }
.pagehead--dark .pagehead__lead { color: #d7d3c8; }
.pagehead--dark .kicker { color: #b9b5aa; }
.backlink { display: inline-block; text-decoration: none; color: var(--muted); margin-bottom: 26px; }
.backlink:hover { color: var(--ink); }
.notice { background: var(--card); border: 1.5px solid var(--ink); border-radius: 10px; padding: 12px 16px; font-size: 15px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.notice--example { background: #fff8de; border-style: dashed; border-color: #b38f00; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.chip { font: 600 14px/1 var(--sans); padding: 10px 16px; border-radius: 999px; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; }
.chip.is-on { background: var(--ink); color: var(--paper); }

/* ---------- Project page ---------- */
.project__meta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.project__grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 56px; align-items: start; padding-bottom: 40px; }
.factsheet { position: sticky; top: 90px; border-top: 1.5px solid var(--ink); }
.factsheet dl { margin: 0; }
.factsheet dl > div { padding: 14px 0; border-bottom: 1px solid var(--line); }
.factsheet dt { color: var(--muted); margin-bottom: 4px; }
.factsheet dd { margin: 0; font-weight: 600; }
.factsheet .tags { margin: 6px 0 0; }
.prose { font-size: 18px; line-height: 1.7; max-width: 680px; }
.prose h2 { font-size: 28px; margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.4em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .3em; }
.prose li::marker { color: var(--accent); }
.prose code { font: 15px var(--mono); background: var(--paper-2); padding: 2px 6px; border-radius: 5px; }
.prose a { text-decoration-color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 2px; }
.prose--big { font-size: clamp(19px, 2vw, 22px); }
.learned { margin-top: 40px; padding: 24px 26px; border-radius: var(--radius); background: var(--ink); color: var(--paper); }
.learned .kicker { color: var(--accent); }
.learned p:last-child { margin: 0; }
.video { position: relative; aspect-ratio: 16 / 9; margin: 28px 0; border-radius: var(--radius); overflow: hidden; border: 1.5px solid var(--ink); background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin: 28px 0; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; border: 1.5px solid var(--ink); }
.pager { display: flex; justify-content: space-between; gap: 20px; padding-bottom: 80px; }
.pager a { flex: 1; max-width: 48%; text-decoration: none; border-top: 1.5px solid var(--ink); padding-top: 14px; font: 700 20px/1.2 var(--display); }
.pager a span { display: block; color: var(--muted); margin-bottom: 6px; font-weight: 400; }
.pager__next { text-align: right; margin-left: auto; }
.pager a:hover { color: var(--accent-dk); }

/* ---------- Log page ---------- */
.year { display: grid; grid-template-columns: 120px 1fr; gap: 24px; margin-bottom: 40px; }
.year__label { font-size: 13px; position: sticky; top: 90px; align-self: start; padding-top: 6px; color: var(--accent-dk); }
.timeline { list-style: none; margin: 0; padding: 0; border-left: 1.5px solid var(--ink); }
.entry { display: flex; gap: 18px; padding: 4px 0 30px 0; margin-left: -18px; }
.entry .logicon { margin-top: 2px; }
.entry__meta { color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.entry h3 { font-size: 22px; margin-bottom: 6px; }
.entry__text { color: var(--ink-2); max-width: 40em; }
.entry__text p:last-child { margin-bottom: 0; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1.4fr 1fr; gap: 60px; align-items: start; }
.rules { background: var(--card); border: 1.5px solid var(--ink); border-radius: var(--radius); padding: 26px; }
.rules ol { padding-left: 1.2em; margin: 0 0 18px; }
.rules li { margin-bottom: 10px; }
.rules li::marker { font-family: var(--mono); color: var(--accent); }

/* ---------- Playground ---------- */
.section--dark { background: var(--ink); color: var(--paper); }
.playground { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.playground__stage { position: relative; }
#pcanvas { width: 100%; aspect-ratio: 1; display: block; border-radius: var(--radius); background: #1f1f1d; border: 1.5px solid #3c3b37; touch-action: manipulation; cursor: crosshair; }
.playground__hud { position: absolute; left: 14px; top: 14px; display: flex; gap: 10px; pointer-events: none; }
.playground__hud span { background: rgba(20,20,20,.8); border: 1px solid #3c3b37; padding: 7px 10px; border-radius: 8px; color: #b9b5aa; }
.playground__hud b { color: var(--paper); font-weight: 400; }
.steps { list-style: none; padding: 0; margin: 0 0 24px; }
.steps li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid #33322e; color: #d7d3c8; }
.steps li .mono { flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: #fff; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; background: #24231f; border-radius: 999px; margin-bottom: 14px; }
.seg__btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border-radius: 999px; border: 0; background: transparent; color: #d7d3c8; font: 600 15px var(--sans); cursor: pointer; }
.seg__btn.is-on { background: var(--paper); color: var(--ink); }
.sw { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.sw--a { background: var(--accent); }
.sw--b { background: var(--ink); box-shadow: 0 0 0 2px var(--paper); }
.controls { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; }
.controls .btn { min-height: 46px; padding: 0 12px; }
.controls .btn--ghost { color: var(--paper); border-color: #55534c; }
.slider { display: flex; align-items: center; gap: 12px; color: #b9b5aa; margin-bottom: 22px; }
.slider input { flex: 1; accent-color: var(--accent); }
.explain { border: 1px solid #3c3b37; border-radius: 12px; padding: 14px 18px; color: #d7d3c8; }
.explain summary { cursor: pointer; font-weight: 600; color: var(--paper); }
.explain p { margin: 12px 0 0; font-size: 15.5px; }
.soon { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.soon li { border: 1.5px dashed var(--line-strong); border-radius: var(--radius); padding: 22px; font: 700 20px/1.2 var(--display); }
.soon li span { display: block; color: var(--accent-dk); margin-bottom: 10px; font-weight: 400; }

/* ---------- Footer & tab bar ---------- */
.site-footer { border-top: 1.5px solid var(--ink); padding: 40px 0 48px; background: var(--paper); }
.site-footer__in { display: grid; grid-template-columns: 1fr auto; gap: 18px 40px; }
.site-footer__name { font: 900 30px/1 var(--display); letter-spacing: -0.04em; margin-bottom: 8px; }
.site-footer__links { display: flex; gap: 18px; flex-wrap: wrap; align-items: flex-start; }
.site-footer__links a { text-decoration: none; font-weight: 600; }
.site-footer__links a:hover { color: var(--accent-dk); }
.site-footer__legal { grid-column: 1 / -1; margin: 0; }
.tabbar { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bench { grid-template-columns: 1fr; gap: 14px; }
  .split, .about, .playground { grid-template-columns: 1fr; gap: 32px; }
  .project__grid { grid-template-columns: 1fr; gap: 28px; }
  .factsheet { position: static; }
  .factsheet dl { display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; }
  .teaser { grid-template-columns: 1fr; }
  .teaser__art { max-width: 200px; justify-self: start; }
}

@media (max-width: 720px) {
  body { font-size: 16.5px; padding-bottom: calc(68px + env(safe-area-inset-bottom)); background-size: 24px 24px; }
  .wrap { padding: 0 18px; }
  .site-header__in { height: 56px; }
  .topnav a:not([href="/about"]) { display: none; }
  .topnav a[href="/about"] { padding: 8px 12px; }
  .grid { grid-template-columns: 1fr; gap: 16px; }
  .hero { padding-top: 40px; }
  .hero__cta .btn { flex: 1 1 100%; }
  .hero__cta { margin-bottom: 52px; }
  .longbuild__track { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 3px; }
  .longbuild__track li { height: 38px; padding: 0 0 5px 0; justify-content: center; border-radius: 6px; }
  .longbuild__track li span { font-size: 9px; letter-spacing: 0; }
  .longbuild__track li span { writing-mode: initial; }
  .section__head { flex-direction: column; align-items: flex-start; }
  .bench__stats dd { font-size: 38px; }
  .year { grid-template-columns: 1fr; gap: 10px; }
  .year__label { position: static; }
  .soon { grid-template-columns: 1fr; }
  .pager { flex-direction: column; }
  .pager a { max-width: 100%; }
  .pager__next { text-align: left; margin-left: 0; }
  .site-footer__in { grid-template-columns: 1fr; }
  .cover--hero { aspect-ratio: 4 / 3; margin-bottom: 28px; }
  .card .cover { aspect-ratio: 2 / 1; }
  .tabbar { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(20,20,20,.96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 5px; color: #a9a59a; text-decoration: none; font: 600 12.5px/1 var(--sans); padding: 6px 0; border-radius: 10px; }
  .tabbar__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .5; }
  .tabbar a[aria-current="page"] { color: var(--paper); }
  .tabbar a[aria-current="page"] .tabbar__dot { background: var(--accent); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  .site-header, .tabbar, .familybar, .hero__field { display: none; }
  body { background: #fff; }
}
