/* Shared editorial shell. Warm paper, charcoal, a little green.
   Order: fonts, tokens, base, layout, components, paper grain, then
   @media (max-width:760px), (max-width:440px), reduced motion, print. */

/* Fonts: Geist and Geist Mono (SIL OFL, see /assets/fonts/OFL.txt), served from this site.
   Only these weights exist; anything bolder is mapped to 500 below. */
@font-face {font-family:'Geist';src:url('/assets/fonts/Geist-Regular.woff2') format('woff2');font-weight:400;font-style:normal;font-display:swap}
@font-face {font-family:'Geist';src:url('/assets/fonts/Geist-Medium.woff2') format('woff2');font-weight:500;font-style:normal;font-display:swap}
@font-face {font-family:'Geist Mono';src:url('/assets/fonts/GeistMono-Regular.woff2') format('woff2');font-weight:400;font-style:normal;font-display:swap}

/* Tokens */
:root {--measure:36em;
  color-scheme: light;
  --sans:Geist,system-ui,-apple-system,sans-serif;
  --mono:'Geist Mono',ui-monospace,SFMono-Regular,monospace;
  --bg:#F4F1EA; --ink:#1A1A1A; --muted:#5E5B54; --hue:#2F5D4A;
  --surface:#ece9e1; --line:color-mix(in srgb,var(--ink) 16%,transparent);
  --gap:var(--bg); --rule:var(--ink);
  --s0:var(--hue); --s1:color-mix(in oklab,var(--hue) 82%,var(--bg));
  --s2:color-mix(in oklab,var(--hue) 66%,var(--bg)); --s3:color-mix(in oklab,var(--hue) 52%,var(--bg));
  --s4:color-mix(in oklab,var(--hue) 40%,var(--bg)); --s5:color-mix(in oklab,var(--hue) 30%,var(--bg));
  --s6:color-mix(in oklab,var(--hue) 22%,var(--bg));
  /* Heading tracking: never tighter than -0.03em; a touch looser on dark paper */
  --track:-.03em;
  /* Lightlap tag colours. "lit" are Lightlap's own values (for dark surfaces);
     "deep" are the same hues calibrated for light surfaces. */
  --lit-work:#3FA9F5; --lit-study:#34C759; --lit-read:#FFD60A; --lit-admin:#AF52DE;
  --deep-work:#2B8AD0; --deep-study:#2A9F47; --deep-read:#D4A300; --deep-admin:#AF52DE;
  --dot-work:var(--deep-work); --dot-study:var(--deep-study); --dot-read:var(--deep-read); --dot-admin:var(--deep-admin);
  --dot-on-ink-work:var(--lit-work); --dot-on-ink-study:var(--lit-study); --dot-on-ink-read:var(--lit-read); --dot-on-ink-admin:var(--lit-admin);
  /* Paper grain: dark noise multiplied into light paper */
  --grain-fine:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.1 0 0 0 0 0.1 0 0 0 0 0.1 0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --grain-fiber:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.012 0.04' numOctaves='4' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 0.18 0 0 0 0 0.2 0 0 0 0 0.16 0 0 0 0.9 -0.35'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");
  --grain-blend:multiply; --grain-fine-opacity:.16; --grain-fiber-opacity:.07;
}
/* Dark palette. The grain uses light noise screened onto the dark paper, so no filter:invert() is needed.
   feColorMatrix works in linearRGB: each constant is the sRGB inverse of the light one, converted back
   to linear (0.1 -> 0.38; 0.18/0.2/0.16 -> 0.25/0.23/0.28), matching the old invert(1) by calculation. */
@media (prefers-color-scheme:dark) {
  :root:not([data-theme="light"]) {
    color-scheme:dark;--bg:#141413;--ink:#F4F1EA;--muted:#A9A59B;--hue:#8BC4A6;--surface:#1e201c;--track:-.025em;
    --dot-work:var(--lit-work);--dot-study:var(--lit-study);--dot-read:var(--lit-read);--dot-admin:var(--lit-admin);
    --dot-on-ink-work:var(--deep-work);--dot-on-ink-study:var(--deep-study);--dot-on-ink-read:var(--deep-read);--dot-on-ink-admin:var(--deep-admin);
    --grain-fine:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.38 0 0 0 0 0.38 0 0 0 0 0.38 0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    --grain-fiber:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.012 0.04' numOctaves='4' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 0.25 0 0 0 0 0.23 0 0 0 0 0.28 0 0 0 0.9 -0.35'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");
    --grain-blend:screen;--grain-fine-opacity:.07;--grain-fiber-opacity:.04;
  }
}
:root[data-theme="dark"] {
  color-scheme:dark;--bg:#141413;--ink:#F4F1EA;--muted:#A9A59B;--hue:#8BC4A6;--surface:#1e201c;--track:-.025em;
  --dot-work:var(--lit-work);--dot-study:var(--lit-study);--dot-read:var(--lit-read);--dot-admin:var(--lit-admin);
  --dot-on-ink-work:var(--deep-work);--dot-on-ink-study:var(--deep-study);--dot-on-ink-read:var(--deep-read);--dot-on-ink-admin:var(--deep-admin);
  --grain-fine:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.38 0 0 0 0 0.38 0 0 0 0 0.38 0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --grain-fiber:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.012 0.04' numOctaves='4' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 0.25 0 0 0 0 0.23 0 0 0 0 0.28 0 0 0 0.9 -0.35'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");
  --grain-blend:screen;--grain-fine-opacity:.07;--grain-fiber-opacity:.04;
}

/* Base */
* {box-sizing:border-box}
[hidden] {display:none!important}
html {scroll-behavior:smooth;scroll-padding-top:24px}
body {margin:0;background:var(--bg);color:var(--ink);font-family:var(--sans);font-size:16px;line-height:1.7;min-height:100vh;display:flex;flex-direction:column;-webkit-font-smoothing:antialiased}
::selection {background:var(--hue);color:var(--bg)}
a {color:inherit;text-underline-offset:4px;text-decoration-thickness:1px}
a:hover {color:var(--hue)}
a,button { -webkit-tap-highlight-color:transparent }
:focus-visible {outline:2px solid var(--hue);outline-offset:4px;border-radius:2px}
strong,b,th {font-weight:500}
h1,h2,h3,h4 {font-weight:500;line-height:1.18;letter-spacing:var(--track);text-wrap:balance}
h1 {font-size:clamp(28px,3.8vw,38px);margin:0 0 14px;max-width:780px}
h2 {font-size:21px;margin:36px 0 12px}
h3 {font-size:17px;margin:24px 0 8px}
p {margin:0 0 1.2em}
p,li,dd {text-wrap:pretty}
.sr-only,.theme-label {position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;clip-path:inset(50%);overflow:hidden;white-space:nowrap}
.lede {font-size:clamp(17px,1.8vw,20px);line-height:1.55;color:var(--muted);max-width:620px;margin-bottom:18px;letter-spacing:-.015em}
/* Monospace is kept for data and stamps: labels, dates, tags, coordinates, badge, status, code, the "busy, busy, busy" stamp and the BA signature */
.kicker,.eyebrow,.tag,.footer-tag,.status,.article-meta,.entries time,.badge,.tag-row,.tag-filter button,.cover-notebook .cover-kicker,.cover-notebook .cover-sign,.cover-place .place,.signature,.q figcaption,.prose code,.prose pre {font-family:var(--mono)}
.kicker {display:block;text-transform:uppercase;letter-spacing:.12em;font-size:11px;color:var(--muted);margin:0 0 14px}
.eyebrow {font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.tag {font-size:12px;letter-spacing:.07em;color:var(--muted);margin:0}
.status {font-size:11px;color:var(--muted)}
.status::before {content:'';display:inline-block;width:6px;height:6px;background:var(--hue);border-radius:50%;margin-right:8px}
.note {font-size:13px;color:var(--muted)}
/* Reading measure: 36em (~66-70 characters at 16px Geist). */
main > p,.prose,dl.faq {max-width:var(--measure)}
main > ul {max-width:calc(var(--measure) + 22px)}
/* Lightlap product page keeps the full-width wrap (owner, Nov 26); reading pages keep --measure */
main:has(> .app-head) > p,main:has(> .app-head) > ul {max-width:none}
.card {max-width:calc(var(--measure) + 48px)}

/* Layout: skip link, compact header (56-64px), navigation, theme toggle, main */
.skip-link {position:absolute;left:24px;top:8px;transform:translateY(-180%);background:var(--ink);color:var(--bg);padding:10px 16px;z-index:10}
.skip-link:focus {transform:translateY(0);color:var(--bg)}
header.site,main,footer {width:min(100% - 64px, 1000px);margin-inline:auto}
header.site {padding:10px 0;display:flex;align-items:center;justify-content:space-between;gap:24px;border-bottom:1px solid var(--line)}
.brand {display:inline-flex;align-items:center;gap:11px;min-height:38px;text-decoration:none;font-size:16px;font-weight:500;white-space:nowrap;letter-spacing:-.03em}
.mark {width:38px;height:auto;overflow:visible;flex-shrink:0}
.mark path {fill:transparent;stroke:var(--ink);stroke-width:.12;stroke-linejoin:round;transition:fill .4s ease,stroke .4s ease;transition-delay:calc(var(--i)*40ms)}
.brand:hover .mark path,.brand:focus-visible .mark path {fill:var(--f);stroke:var(--gap);stroke-width:.32}
.navigation {display:flex;align-items:center;gap:20px}
nav.site {display:flex;gap:20px;font-size:14px}
nav.site a {text-decoration:none;color:var(--muted);padding-block:6px}
nav.site a:hover,nav.site a[aria-current="page"] {color:var(--ink)}
nav.site a[aria-current="page"] {text-decoration:underline;text-decoration-color:var(--hue);text-underline-offset:6px}
#theme-toggle {display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;min-width:36px;min-height:36px;padding:6px;border:1px solid var(--line);border-radius:50%;font:inherit;font-size:18px;line-height:1;background:none;color:var(--ink);cursor:pointer}
#theme-toggle:hover {border-color:var(--hue);color:var(--hue)}
main {flex:1;padding:36px 0 72px}
main:has(.covers) {padding-top:22px}
main:focus {outline:none}

/* Home intro */
.intro {padding:0 0 14px}
.intro h1 {font-size:clamp(34px,4.4vw,48px);line-height:1.08;margin-bottom:12px}
.intro .lede {margin-bottom:10px;text-wrap:balance}

/* busy, busy, busy: a disclosure button; the full quote shows on hover (pointer devices) or when expanded */
.q {position:relative;display:inline-block}
.q-trigger {display:inline-flex;align-items:center;min-height:36px;margin-block:-8px;padding:0;border:0;background:none;color:inherit;font:inherit;cursor:help}
.q-trigger:focus-visible {outline:none}
.q-trigger:focus-visible .tag {outline:2px solid var(--ink);outline-offset:6px;border-radius:2px}
.q .full {position:absolute;left:0;top:calc(100% + 10px);transform:translateY(-4px);width:min(30em,86vw);margin:0;padding:16px 20px;background:var(--bg);border:1px solid color-mix(in srgb,var(--ink) 18%,transparent);border-radius:10px;box-shadow:0 8px 24px rgba(0,0,0,.14);opacity:0;visibility:hidden;transition:opacity .25s ease,transform .25s ease,visibility .25s;z-index:5}
.q-trigger[aria-expanded="true"] + .full {opacity:1;visibility:visible;transform:translateY(0)}
@media (hover:hover) {.q:not(.dismissed):hover .full {opacity:1;visibility:visible;transform:translateY(0)}}
.q blockquote {margin:0}
.q .full p {font-size:15px;line-height:1.65;color:var(--ink);margin:0}
.q figcaption {font-size:13px;letter-spacing:.06em;color:var(--muted);margin-top:10px}

/* Home: three covers in the golden ratio (1.618 : 1) */
.covers {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:28px;padding:20px 0 12px;border-top:1px solid var(--line)}
.cover {display:flex;flex-direction:column;text-decoration:none;color:inherit}
.cover-index {display:block;margin-bottom:10px}
.cover-art {aspect-ratio:1.618/1;border:1px solid var(--line);border-radius:4px;display:flex;align-items:center;justify-content:center;overflow:hidden;transition:border-color .3s ease,transform .3s ease}
.cover:hover .cover-art,.cover:focus-visible .cover-art {border-color:var(--hue);transform:translateY(-3px)}
.cover-work {background:var(--surface)}
.cover-work img {width:auto;height:46%;border-radius:22%}
.cover-notebook {background:var(--ink);color:var(--bg);flex-direction:column;align-items:flex-start;justify-content:space-between;padding:16px 20px}
.cover-notebook .cover-kicker,.cover-notebook .cover-sign {font-size:12px;letter-spacing:.12em;text-transform:uppercase;opacity:.75}
.cover-notebook .cover-title {font-size:clamp(18px,1.8vw,22px);line-height:1.18;letter-spacing:var(--track);font-weight:500}
.cover-about {background:var(--surface)}
/* About cover: seven-green palette, each swatch a golden rectangle (height = 1.618 x width), and the coordinates */
.cover-place {flex-direction:column;align-items:stretch;justify-content:center;gap:16px;padding:20px 22px}
.cover-place .swatches {display:grid;grid-template-columns:repeat(7,1fr);gap:4px;align-items:start}
.cover-place .swatches span {border-radius:2px;aspect-ratio:1/1.618}
.cover-place .place {display:flex;flex-direction:column;gap:4px;text-transform:uppercase;letter-spacing:.12em}
.cover-place .place-coord {font-size:12px;color:var(--muted)}
/* Cover text; the footers (status / tags / place) share one baseline and size */
.cover-meta {padding-top:14px;flex:1;display:flex;flex-direction:column}
.cover-meta h2 {font-size:21px;margin:0 0 6px;letter-spacing:var(--track)}
.cover-meta h2 span {font-size:16px;color:var(--hue)}
.cover-meta p {font-size:14px;color:var(--muted);margin:0 0 10px;line-height:1.5;flex:1}
.cover-meta .status,.cover-meta .tag-row {margin-top:auto;font-size:12px;letter-spacing:.04em;color:var(--muted);line-height:1.5}
.cover-meta .tag-row .tag-dot {width:6px;height:6px}

/* Work */
.project {display:flex;align-items:center;justify-content:space-between;gap:32px;padding:28px 32px;background:var(--surface);border:1px solid var(--line);border-radius:4px;margin:24px 0 20px;text-decoration:none;transition:border-color .2s ease}
.project:hover {border-color:var(--hue);color:inherit}
.project h2 {font-size:28px;margin:0 0 10px}
.project h2 span {font-size:20px;color:var(--hue)}
.project p {font-size:16px;color:var(--muted);line-height:1.65;margin-bottom:16px;max-width:520px}
.project .kicker {margin-bottom:12px;font-size:11px}
.project img {border-radius:22px;flex-shrink:0;width:96px;height:96px}

/* Notebook archive: compact single-line rows (44-52px) */
.archive-head {margin-bottom:14px}
.archive-head h1 {font-size:clamp(26px,3vw,30px);margin:0 0 4px}
.archive-note {font-size:14px;color:var(--muted);margin:0;line-height:1.5}
.archive-note a {color:var(--hue)}
.empty-state {padding:24px 0 12px;color:var(--muted)}
.empty-symbol {font-family:Georgia,serif;font-size:28px;display:block;color:var(--hue);margin-bottom:10px}
.empty-state p {font-size:16px;margin:0 0 4px}
.empty-state .note {font-size:12px;line-height:1.8}
.entries {list-style:none;padding:0;margin:0}
.entries li {border-bottom:1px solid var(--line)}
.entries li:first-child {border-top:1px solid var(--line)}
.entries li[hidden] {display:none}
.entries a {display:flex;align-items:baseline;justify-content:space-between;gap:16px;min-height:46px;padding:10px 0;text-decoration:none}
.entries a:hover .entry-title,.entries a:focus-visible .entry-title {color:var(--hue)}
.entry-main {min-width:0;flex:1}
.entry-title {font-size:16px;font-weight:500;line-height:1.3;letter-spacing:-.015em;margin:0 0 2px;text-wrap:pretty}
.entry-sub {font-size:13.5px;line-height:1.38;color:var(--muted);margin:0;max-width:78ch}
.entry-meta {display:inline-flex;align-items:center;gap:10px;flex-shrink:0}
.entries time {font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums;white-space:nowrap}

/* Lightlap tag dots (colour is never the only cue: name is shown or announced via sr-only).
   A hairline ring keeps light dots visible; colours follow the surface the dot sits on. */
.tag-dot {display:inline-block;width:8px;height:8px;border-radius:50%;flex-shrink:0;vertical-align:middle;box-shadow:inset 0 0 0 1px color-mix(in srgb,currentColor 35%,transparent)}
.tag-work {background:var(--dot-work)}.tag-study {background:var(--dot-study)}.tag-read {background:var(--dot-read)}.tag-admin {background:var(--dot-admin)}
.tag-none {background:transparent;box-shadow:inset 0 0 0 1.5px var(--muted)}
.tag-label {display:inline-flex;align-items:center;gap:6px}
.tag-row {font-size:12px;color:var(--muted);display:inline-flex;align-items:center;gap:8px}
.tag-row .sep {opacity:.6}
.tag-filter {display:flex;flex-wrap:wrap;gap:6px;margin:0 0 16px}
.tag-filter button {display:inline-flex;align-items:center;gap:6px;min-height:32px;padding:4px 12px;border:1px solid var(--line);border-radius:999px;background:transparent;color:var(--ink);font-size:12px;letter-spacing:.04em;cursor:pointer}
.tag-filter button:hover {border-color:var(--hue)}
.tag-filter button[aria-pressed="true"] {background:var(--ink);color:var(--bg);border-color:var(--ink);--dot-work:var(--dot-on-ink-work);--dot-study:var(--dot-on-ink-study);--dot-read:var(--dot-on-ink-read);--dot-admin:var(--dot-on-ink-admin)}
.tag-filter button[aria-pressed="true"] .tag-none {box-shadow:inset 0 0 0 1.5px currentColor}

/* Articles & full Markdown */
.article-header {max-width:var(--measure);margin-bottom:28px;padding-bottom:18px;border-bottom:1px solid var(--line)}
.article-header .kicker {margin-bottom:12px;text-decoration:none}
.article-header .kicker:hover {color:var(--hue)}
.article-header h1 {font-size:clamp(28px,3.6vw,36px);line-height:1.18;margin:0 0 8px}
.article-header .lede {font-size:16px;line-height:1.5;color:var(--muted);margin:0 0 12px;max-width:var(--measure);letter-spacing:-.01em}
.article-meta {font-size:12px;color:var(--muted);line-height:1.6;margin:0;font-variant-numeric:tabular-nums}
.prose {font-size:16px;line-height:1.72}
.prose p {margin:0 0 1.2em}
/* Essays fill each line to the margin (owner, Nov 29): no early breaks from text-wrap:pretty */
.prose p,.prose li {text-wrap:wrap}
.prose h2 {font-size:20px;line-height:1.25;margin:2em 0 .6em}
.prose h3 {font-size:17px;line-height:1.3;margin:1.5em 0 .5em}
.prose h4 {font-size:15px;line-height:1.35;margin:1.3em 0 .4em}
.prose .heading-link {margin-left:.38em;color:var(--muted);text-decoration:none;opacity:0;font-weight:400;transition:opacity .15s ease}
.prose :is(h2,h3,h4):hover .heading-link,.prose .heading-link:focus-visible {opacity:1;color:var(--hue)}
@media (hover:none) {.prose .heading-link {opacity:.5}}
.prose a {color:var(--hue)}
.prose ul,.prose ol {margin:0 0 1.2em;padding-left:1.35em}
.prose li {margin:.35em 0}
.prose li > ul,.prose li > ol {margin:.35em 0}
.prose hr {border:0;border-top:1px solid var(--line);margin:2.2em 0}
.prose img {max-width:100%;height:auto;display:block;border-radius:4px}
.prose figure {margin:1.6em 0}
.prose figcaption {font-size:13px;color:var(--muted);margin-top:8px;line-height:1.5}
.prose blockquote {margin:1.5em 0;padding:0 0 0 20px;border-left:2px solid var(--hue);color:var(--muted)}
.prose blockquote > :last-child {margin-bottom:0}
.prose :not(pre) > code {font-size:.875em;background:var(--surface);border:1px solid var(--line);border-radius:3px;padding:.1em .32em;overflow-wrap:anywhere}
.prose pre {overflow-x:auto;padding:15px 18px;margin:1.4em 0;background:var(--surface);border:1px solid var(--line);border-radius:4px;font-size:13.5px;line-height:1.6;max-width:100%}
.prose pre code {display:block;background:none;border:0;padding:0;white-space:pre;overflow-wrap:normal;word-break:normal}
.prose table {display:block;overflow-x:auto;border-collapse:collapse;max-width:100%;margin:1.5em 0;font-size:14px;line-height:1.5;font-variant-numeric:tabular-nums}
.prose td,.prose th {border-bottom:1px solid var(--line);padding:7px 12px;text-align:left}
.prose thead th {border-bottom:1.5px solid var(--ink)}
.prose dl {margin:1.4em 0}
.prose dt {font-weight:500;margin-top:1em;color:var(--ink)}
.prose dd {margin:.25em 0 0 1.2em;color:var(--muted)}
.prose abbr[title] {text-decoration:underline dotted var(--muted);text-underline-offset:3px;cursor:help}
.prose sup {line-height:0;vertical-align:super}
.prose sup {line-height:0}
.prose .footnote-ref {font-size:.72em;padding:0 1px;color:var(--hue);text-decoration:underline;text-underline-offset:2px;font-variant-numeric:tabular-nums}
.prose .footnote {margin-top:2.4em;font-size:14px;line-height:1.6;color:var(--muted)}
.prose .footnote hr {margin:0 0 1.2em}
.prose .footnote ol {padding-left:1.3em;margin:0}
.prose .footnote li {margin:.5em 0}
.prose .footnote li p {margin:0}
.prose .footnote-backref {text-decoration:none;margin-left:.3em;color:var(--hue)}
.prose .signature {letter-spacing:.06em;color:var(--muted);margin-top:2em}
/* Same width as .prose: --measure at the 16px body size */
.article-end {display:grid;grid-template-columns:1fr 1fr;gap:24px;border-top:1px solid var(--line);padding-top:20px;margin-top:44px;max-width:var(--measure)}
.article-end a {display:flex;flex-direction:column;gap:4px;text-decoration:none;min-width:0}
.article-end .nav-next {text-align:right;align-items:flex-end}
.article-end .nav-dir {font-family:var(--mono);font-size:12px;letter-spacing:.04em;color:var(--muted)}
.article-end .nav-title {font-size:15px;line-height:1.4;color:var(--ink);text-wrap:balance}
.article-end a:hover .nav-title,.article-end a:focus-visible .nav-title {text-decoration:underline;text-underline-offset:3px}

/* Lightlap, Privacy, Support */
.rule {width:48px;height:2px;background:var(--hue);margin:24px 0}
.app-head {display:flex;gap:20px;align-items:center;flex-wrap:wrap}
.app-head img {width:96px;height:96px;border-radius:22px}
.badge {display:inline-block;font-size:11px;letter-spacing:.08em;border:1px solid var(--line);padding:5px 11px;border-radius:999px;margin-top:6px}
.shots {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;margin:32px 0 12px}
.shots figure {margin:0}
.shots img {width:100%;height:auto;display:block;border-radius:32px;background:#000}
.shots figcaption {font-size:13px;color:var(--muted);margin-top:10px;text-align:center}
.card {border:1px solid var(--line);border-radius:4px;padding:20px 24px;margin:24px 0}
.card p {margin:4px 0}
ul.plain {padding-left:22px}
ul.plain li {margin:8px 0}
dl.faq dt {font-weight:500;margin-top:24px}
dl.faq dd {margin:6px 0 0;color:var(--muted)}

/* Footer: studio identity left, text links and quiet social icon row right */
footer {display:flex;justify-content:space-between;align-items:flex-start;gap:28px;border-top:1px solid var(--line);padding:24px 0 34px;font-size:13px;line-height:1.7;color:var(--muted)}
footer a {text-decoration:none}
footer .footer-tag {font-size:11px;margin:0 0 10px}
footer .footer-brand {display:block;margin-bottom:4px;color:var(--ink);font-weight:500;font-size:15px}
footer .footer-copy {display:block}
.footer-right {display:flex;flex-direction:column;align-items:flex-end;gap:12px}
footer .links {display:flex;align-content:flex-start;justify-content:flex-end;flex-wrap:wrap;gap:10px 20px}
.social {display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin-right:-8px}
.social-link {display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:6px;color:var(--muted);transition:color .15s ease,background-color .15s ease}
.social-link:hover,.social-link:focus-visible {color:var(--hue);background:var(--surface)}
.social-icon {width:18px;height:18px;display:block}

/* Paper grain: fine noise and long fibers painted as the page's paper, behind all content (text and screenshots sit on it, crisp).
   Absolute, not fixed: it scrolls with the page, so nothing is recomposited on scroll. body isolates the blend to the paper colour. */
body {position:relative;isolation:isolate}
body::before,body::after {content:'';position:absolute;inset:0;pointer-events:none;z-index:-1;mix-blend-mode:var(--grain-blend)}
body::before {background-image:var(--grain-fine);opacity:var(--grain-fine-opacity)}
body::after {background-image:var(--grain-fiber);opacity:var(--grain-fiber-opacity)}

@media (max-width:760px) {
  header.site,main,footer {width:calc(100% - 40px)}
  header.site {align-items:flex-start;flex-wrap:wrap;padding:10px 0;gap:10px}
  .brand {min-height:44px}
  .navigation {width:100%;justify-content:space-between;gap:12px}
  /* Tap targets of at least 44 x 44 px on phones */
  nav.site {gap:10px}
  nav.site a {display:inline-flex;align-items:center;justify-content:center;min-height:44px;min-width:44px}
  #theme-toggle {width:44px;height:44px;min-width:44px;min-height:44px;font-size:20px}
  .q-trigger {min-height:44px;margin-block:-12px}
  .tag-filter button {min-height:44px;padding:8px 14px}
  .article-header .kicker {display:inline-flex;align-items:center;min-height:44px}
  .article-end {grid-template-columns:1fr;gap:16px}
  .article-end a {min-height:44px;justify-content:center}
  .article-end .nav-next {text-align:left;align-items:flex-start}
  .article-header .kicker {margin-block:-8px 4px}
  main {padding:28px 0 56px}
  .covers {grid-template-columns:1fr;gap:28px}
  .project {padding:24px;gap:20px}
  .project img {width:76px;height:76px;border-radius:18px}
  footer {flex-direction:column;gap:18px}
  footer .footer-brand {display:flex;align-items:center;width:fit-content;min-height:44px;margin-bottom:0}
  .footer-right {align-items:flex-start;gap:8px}
  footer .links {justify-content:flex-start;gap:0 16px}
  footer .links a {display:inline-flex;align-items:center;justify-content:center;min-height:44px;min-width:44px}
  .social {gap:4px;margin-right:0;margin-left:-13px}
  .social-link {width:44px;height:44px;min-width:44px;min-height:44px}
}
@media (max-width:440px) {
  nav.site {gap:6px;font-size:13px}
  .navigation {gap:8px}
  .project {align-items:flex-start;gap:16px;padding:20px}
  .project img {width:56px;height:56px;border-radius:12px}
  .project h2 {font-size:24px}
  .project p {font-size:15px}
  .entries a {gap:12px}
  .shots {grid-template-columns:1fr;max-width:280px;margin-inline:auto;gap:24px}
  .card {padding:18px}
  .prose td,.prose th {padding:6px 9px}
}
@media (prefers-reduced-motion:reduce) {
  html {scroll-behavior:auto}
  *,*::before,*::after {animation:none!important;transition:none!important}
  .cover:hover .cover-art {transform:none}
}
@media print {body::before,body::after {display:none}}
