/* lampwick marketing site: base, layout and components. Tokens live in tokens.css; rules in DESIGN.md.
 * Sections of this file follow the component list in DESIGN.md, in the same order. Use tokens, never raw
 * values; a new component gets its own commented block here and an entry in styleguide.html. */

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font: var(--fs-body)/1.6 var(--sans); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: clip; }
::selection { background: var(--accent-soft); }
img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
[tabindex="-1"]:focus { outline: none; }   /* skip-link targets */
h1, h2, h3 { font-family: var(--display); color: var(--text-strong); font-weight: var(--fw-display); margin: 0; text-wrap: balance; font-variation-settings: "opsz" var(--display-opsz); }
h1 { font-size: var(--fs-hero); line-height: 1.04; letter-spacing: -.01em; font-stretch: var(--display-wide); }
h2 { font-size: var(--fs-h2); line-height: 1.1; letter-spacing: -.01em; font-stretch: var(--display-mid); }
h3 { font-size: var(--fs-h3); line-height: 1.3; letter-spacing: 0; font-stretch: var(--display-normal); font-weight: var(--fw-display-small); font-variation-settings: "opsz" var(--display-opsz-small); }
p { margin: 0; text-wrap: pretty; }
code, kbd, pre { font-family: var(--mono); font-size: .875em; }
:not(pre) > code { background: var(--panel-3); color: var(--text-strong); padding: .1em .4em; border-radius: 5px; }
kbd { display: inline-block; min-width: 1.6em; padding: .05em .4em; border-radius: 6px; background: var(--panel); color: var(--text-strong); box-shadow: inset 0 0 0 1px var(--border-strong), 0 1px 0 var(--border-strong); text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---- Layout ---- */
.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); position: relative; }
.section.sunk { background: var(--bg-sunk); }
.section-head { max-width: 720px; margin-bottom: var(--s-8); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 + .lead { margin-top: var(--s-4); }
.stack > * + * { margin-top: var(--s-4); }
.grid { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.split { display: grid; gap: var(--s-7); align-items: center; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }

/* ---- Text helpers ---- */
/* Eyebrow: a small label above a heading; the LED dot is the one place the lamp colour shows in text. */
.eyebrow { display: inline-flex; align-items: center; gap: var(--s-2); font: 500 var(--fs-label)/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: var(--s-4); }
.eyebrow::before { content: ""; width: var(--m-cell); height: var(--m-cell); background: var(--m-lamp); box-shadow: 0 0 8px var(--m-lamp); }
.lead { font-size: var(--fs-lead); line-height: 1.5; color: var(--muted); max-width: var(--measure); }
.center .lead { margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: var(--fs-small); }

/* ---- Buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); height: 44px; padding: 0 var(--s-5); border-radius: var(--r-pill); border: 0;
  font: 500 var(--fs-body)/1 var(--sans); color: var(--text-strong); background: var(--panel-3); box-shadow: inset 0 0 0 1px var(--ring); cursor: pointer; white-space: nowrap;
  transition: background var(--t-fast), transform 160ms var(--ease-out); }
.btn:hover { color: var(--text-strong); background: var(--panel-2); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent-fill); color: #fff; box-shadow: inset 0 1px 0 rgb(255 255 255 / .18), 0 1px 2px rgb(0 0 0 / .15); }
.btn.primary:hover { background: var(--accent-fill-hover); }
.btn.ghost { background: transparent; box-shadow: none; color: var(--text); }
.btn.ghost:hover { background: var(--panel-3); }
.btn.sm { height: 34px; padding: 0 var(--s-4); font-size: var(--fs-small); }
.actions { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }

/* ---- Nav ---- */
.nav { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid transparent; transition: border-color var(--t); }
.nav.scrolled { border-bottom-color: var(--border); }
.nav .container { display: flex; align-items: center; gap: var(--s-5); height: 64px; }
.nav-links { display: flex; gap: var(--s-1); margin-left: var(--s-3); }
.nav-links a { padding: var(--s-2) var(--s-3); border-radius: var(--r-sm); color: var(--muted); font-size: var(--fs-small); font-weight: 500; }
.nav-links a:hover { color: var(--text-strong); background: var(--panel-3); }
.nav .actions { margin-left: auto; flex-wrap: nowrap; }
@media (max-width: 760px) { .nav .hide-sm { display: none; } .nav .container { gap: var(--s-3); } .nav-links { margin-left: 0; } }
/* Small phones: Docs + Start free fit; Log in is in the footer. */
@media (max-width: 440px) { .nav .actions .btn.ghost { display: none; } }
@media (max-width: 360px) { .nav .container { gap: var(--s-2); } .nav-links a { padding-inline: var(--s-2); } .nav .btn.sm { padding-inline: var(--s-3); } }

/* Wordmark: the app's logomark (templates/icons.html 'logo') + "Lampwick" in the display face.
   Same proportions as on the auth pages: mark at ~.9em, gap ~.32em, mark in the text colour. */
.wordmark { display: inline-flex; align-items: center; gap: .32em; font: var(--fw-display) 1.375rem/1 var(--display); font-stretch: var(--display-mid); font-variation-settings: "opsz" var(--display-opsz); letter-spacing: -.01em; color: var(--text-strong); }
.logomark { width: .91em; height: .91em; flex: none; color: currentColor; }
.wordmark:hover { color: var(--text-strong); }

/* ---- Hero ---- */
.hero { position: relative; padding-top: clamp(var(--s-8), 9vw, var(--s-10)); padding-bottom: clamp(240px, 30vw, 360px); overflow: clip; }
.hero .container { position: relative; z-index: 1; }
.hero h1 { max-width: 9.2em; }   /* em, not ch: ch follows the font, so the fallback would wrap differently */
.hero .lead { margin-top: var(--s-5); }
.hero .actions { margin-top: var(--s-6); }
.hero-scene { position: absolute; inset: auto 0 0; height: clamp(200px, 28vw, 320px); }

/* ---- Card ---- */
.card { background: var(--panel); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: var(--s-5); min-width: 0; }
.card h3 { margin-bottom: var(--s-2); }
.card p { color: var(--muted); }
.card .matrix { margin-bottom: var(--s-5); }
.feature { display: flex; flex-direction: column; }
.feature .tag { margin-top: auto; padding-top: var(--s-4); font: 500 var(--fs-label)/1.4 var(--mono); color: var(--faint); }

/* ---- Code ---- */
/* Install pill: one command, monospace, with a copy button (site.js, [data-copy]). */
.cmd { display: inline-flex; align-items: center; gap: var(--s-3); height: 44px; padding: 0 6px 0 var(--s-4); border-radius: var(--r-pill); background: var(--panel); box-shadow: var(--shadow);
  font: 500 var(--fs-small)/1 var(--mono); color: var(--text-strong); max-width: 100%; }
.cmd > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmd > span::before { content: "$ "; color: var(--faint); }
.copy { flex: none; height: 32px; padding: 0 var(--s-3); border: 0; border-radius: var(--r-pill); background: var(--panel-3); color: var(--muted); font: 500 var(--fs-label) var(--sans); cursor: pointer; }
.copy:hover { color: var(--text-strong); }
.copy.done { color: var(--ok); }
.codebox { position: relative; background: var(--code-bg); border-radius: var(--r); box-shadow: inset 0 0 0 1px var(--border); padding: var(--s-4) var(--s-5); overflow-x: auto; }
.codebox pre { margin: 0; color: var(--text-strong); line-height: 1.7; }
.codebox .copy { position: absolute; top: var(--s-2); right: var(--s-2); }
/* Copy buttons need JS (site.js adds .js and hides them when there is no clipboard). */
html:not(.js) [data-copy], html:not(.js) [data-copy-src] { display: none; }
.codebox .c { color: var(--faint); }   /* comment */
.codebox .k { color: var(--accent); }  /* keyword / command */
.codebox .s { color: var(--ok); }      /* string / value */

/* ---- Steps ---- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-6); counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: var(--s-2) var(--s-4); }
.steps li::before { content: counter(step); grid-row: span 3; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font: 600 var(--fs-small) var(--sans); }
.steps h3 { font-size: 1.05rem; }
.steps p { color: var(--muted); }

/* ---- Demo: the real app ---- */
/* site/demo/ holds the real Issues page, rendered from the app's templates and CSS by
   src/web/site_demo.rs. The iframe renders it at desktop size (data-demo="WxH") and site.js scales
   it to the column; without JS it shows at 1:1, cropped. Navigable: the sidebar links between the
   demo pages; links to pages outside the demo are switched off. Sandboxed: no scripts run. */
.demo { position: relative; z-index: 1; padding-top: var(--s-6); }
.demo-frame { margin: 0; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-lg); background: var(--frame);
  aspect-ratio: var(--demo-ratio, 1200 / 760); position: relative; }
.demo-frame iframe { position: absolute; top: 0; left: 0; width: 1200px; height: 760px; border: 0; transform-origin: 0 0; transform: scale(var(--demo-scale, 1)); }

/* ---- Features: a plain list (3 columns on desktop), no cards ---- */
.features { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-7) var(--s-7); grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.features h3 { font-size: 1.05rem; margin-bottom: var(--s-2); }
.features p { color: var(--muted); font-size: var(--fs-small); line-height: 1.6; }

/* ---- Plans (pricing) ---- */
.plans { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.plan { display: flex; flex-direction: column; gap: var(--s-4); background: var(--panel); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: var(--s-5); }
.plan h3 { font-size: 1.05rem; }
.plan .price { font: var(--fw-display) var(--fs-h2)/1 var(--display); font-stretch: var(--display-wide); letter-spacing: 0; font-variation-settings: "opsz" var(--display-opsz); font-variant-numeric: lining-nums; color: var(--text-strong); }
.plan .price span { font: 400 var(--fs-small) var(--sans); letter-spacing: normal; color: var(--muted); margin-left: var(--s-1); }
.plan ul { list-style: none; margin: 0 0 auto; padding: 0; display: grid; gap: var(--s-2); color: var(--muted); font-size: var(--fs-small); }
.plan .btn { align-self: flex-start; }

/* ---- Install ---- */
.narrow { max-width: calc(640px + 2 * var(--gutter)); }
.install h2 + .lead { margin-top: var(--s-3); }
.install .codebox { margin-top: var(--s-6); }
.install .actions { margin-top: var(--s-6); }

/* ---- Brand elements (LED matrix, assets/matrix.js) ---- */
.matrix { display: inline-block; vertical-align: middle; line-height: 0; }
.matrix.fill { display: block; width: 100%; }
/* Unlit LED field: a texture for quiet backgrounds. Fades out towards the edges. */
.led-field { position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: var(--m-off);
  -webkit-mask: linear-gradient(90deg, #000 var(--m-cell), transparent 0) 0 0 / calc(var(--m-cell) + var(--m-gap)) 100%,
                linear-gradient(#000 var(--m-cell), transparent 0) 0 0 / 100% calc(var(--m-cell) + var(--m-gap)),
                radial-gradient(ellipse at var(--field-at, 15% 100%), #000, transparent 65%);
  -webkit-mask-composite: source-in; mask-composite: intersect; }

/* ---- CTA band ---- */
.cta { text-align: center; }
.cta .matrix { margin: 0 auto var(--s-6); }
.cta .actions { justify-content: center; margin-top: var(--s-6); }

/* ---- Footer ---- */
.footer { position: relative; padding-top: var(--s-9); }
.footer .sea { height: 64px; }
.footer-row { display: flex; flex-wrap: wrap; gap: var(--s-4) var(--s-6); align-items: center; padding-block: var(--s-6) var(--s-7); }
.footer-row nav { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); margin-left: auto; }
.footer-row nav a { color: var(--muted); font-size: var(--fs-small); }
.footer-row nav a:hover { color: var(--text-strong); }

/* ---- Content pages: generated from site/content/ by src/web/site_pages.rs (templates in site/templates/) ---- */

/* Skip link: first thing in the nav partial, visible only when focused. */
.skip-link { position: absolute; left: var(--s-4); top: var(--s-2); z-index: 20; padding: var(--s-2) var(--s-4); border-radius: var(--r-pill);
  background: var(--panel); color: var(--text-strong); box-shadow: var(--shadow); font-size: var(--fs-small); transform: translateY(-200%); }
.skip-link:focus { transform: none; }
.nav-links a.active { color: var(--text-strong); }

/* Page head: eyebrow (optional), h1, lead = the description, meta row (dates, Markdown twin). */
.page-head { padding-block: var(--s-8) var(--s-6); }
.page-head h1 { font-size: var(--fs-page-h1); line-height: 1.1; letter-spacing: -.01em; font-stretch: var(--display-mid); }
.page-head .lead { margin-top: var(--s-3); }
.page-head .eyebrow a { color: inherit; }
.page-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-4); margin-top: var(--s-4); color: var(--muted); font-size: var(--fs-small); }
.page-meta a { color: var(--muted); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: .2em; }
.page-meta a:hover { color: var(--text-strong); }

/* Prose: rendered Markdown. Running text keeps to --measure; code blocks and tables may be wider
   and scroll inside themselves, never the page. */
.prose { min-width: 0; }
.prose > * { max-width: var(--measure); }
.prose > .codebox, .prose > .table-wrap { max-width: none; }
.prose > * + * { margin-top: var(--s-4); }
.prose h2 { font-size: var(--fs-prose-h2); line-height: 1.25; letter-spacing: 0; font-stretch: var(--display-normal); font-weight: var(--fw-display-small); font-variation-settings: "opsz" var(--display-opsz-small); margin-top: var(--s-7); }
.prose h3 { font-size: var(--fs-prose-h3); margin-top: var(--s-6); }
.prose h4 { font: 600 var(--fs-body)/1.4 var(--sans); color: var(--text-strong); margin: var(--s-5) 0 0; }
.prose :is(h2, h3, h4) + * { margin-top: var(--s-3); }
.prose .anchor { margin-left: .3em; color: var(--faint); opacity: 0; transition: opacity var(--t-fast); }
.prose .anchor::before { content: "#"; }
.prose :is(h2, h3, h4):hover .anchor, .prose .anchor:focus-visible { opacity: 1; }
@media (hover: none) { .prose .anchor { display: none; } }
.prose a:not(.anchor) { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--link) 45%, transparent); text-underline-offset: .2em; }
.prose a:not(.anchor):hover { text-decoration-color: currentColor; }
.prose strong { color: var(--text-strong); font-weight: 600; }
.prose :is(ul, ol) { padding-left: 1.4em; margin-bottom: 0; }
.prose li + li, .prose li > * + * { margin-top: var(--s-2); }
.prose li::marker { color: var(--faint); }
.prose blockquote { margin-inline: 0; padding-left: var(--s-4); box-shadow: inset 3px 0 0 var(--border-strong); color: var(--muted); }
.prose hr { border: 0; height: 1px; background: var(--border); margin-block: var(--s-7); }
.prose img { border-radius: var(--r); }
/* The copy button gets its own column, so code never runs under it. */
.prose .codebox { overflow: visible; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
.prose .codebox pre { grid-row: 1; grid-column: 1; overflow-x: auto; padding: var(--s-4) var(--s-5); }
.prose .codebox .copy { position: static; grid-row: 1; grid-column: 2; margin: var(--s-2) var(--s-2) 0 0; }
.prose :not(pre) > code { overflow-wrap: anywhere; }
.codebox pre code { font-size: inherit; }
/* Tables scroll inside themselves; a shadow on the edge shows there is more (scroll-shadow trick). */
.table-wrap { overflow-x: auto;
  background: linear-gradient(90deg, var(--bg) 30%, transparent) left / 32px 100% no-repeat local,
              linear-gradient(270deg, var(--bg) 30%, transparent) right / 32px 100% no-repeat local,
              radial-gradient(farthest-side at 0 50%, var(--border-strong), transparent) left / 12px 100% no-repeat scroll,
              radial-gradient(farthest-side at 100% 50%, var(--border-strong), transparent) right / 12px 100% no-repeat scroll; }
.prose table { border-collapse: collapse; min-width: 100%; font-size: var(--fs-small); }
.prose th, .prose td { padding: var(--s-2) var(--s-3); text-align: left; vertical-align: top; box-shadow: inset 0 -1px 0 var(--border); }
.prose th { color: var(--text-strong); font-weight: 600; white-space: nowrap; }
.prose :is(th, td):first-child { padding-left: 0; }
.prose td:first-child code { white-space: nowrap; }        /* names stay whole … */
.prose td:not(:first-child) code { overflow-wrap: anywhere; } /* … long values may break */
.prose :is(th, td):last-child { min-width: 14em; }
@media (max-width: 600px) { .prose :is(th, td):last-child { min-width: 0; } }
.prose thead:not(:has(th:not(:empty))) { display: none; } /* key–value tables written with an empty header row */
/* Wide prose tables (marked .stack by the generator) become one card per row on phones; each cell
   shows its column name (data-label) above the value. Narrower tables keep scrolling sideways. */
@media (max-width: 600px) {
  .table-wrap.stack { overflow: visible; background: none; }
  .stack :is(table, tbody, tr, td) { display: block; }
  .stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .stack tr { padding-block: var(--s-3); box-shadow: inset 0 -1px 0 var(--border); }
  .prose .stack td { padding: var(--s-1) 0; box-shadow: none; min-width: 0; }
  .prose .stack td:first-child { color: var(--text-strong); font-weight: 600; }
  .stack td + td::before { content: attr(data-label); display: block; font: 500 var(--fs-label)/1.6 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
}
.prose .footnote-definition { display: flex; gap: var(--s-2); color: var(--muted); font-size: var(--fs-small); }
.prose .footnote-definition p { margin: 0; }

/* Docs layout: sidebar · article · "on this page". The sidebar is a <details>: collapsed on small
   screens (works without JS), opened on wide screens by site.js ([data-docs-nav]). */
.docs { display: grid; gap: var(--s-5) var(--s-7); grid-template-columns: minmax(0, 1fr); align-items: start; padding-top: var(--s-5); }
.docs .page-head { padding-top: var(--s-5); }
.docs-nav > summary { display: flex; align-items: center; justify-content: space-between; height: 44px; padding: 0 var(--s-4); border-radius: var(--r);
  background: var(--panel); box-shadow: var(--shadow); color: var(--text-strong); font-weight: 500; font-size: var(--fs-small); cursor: pointer; list-style: none; }
.docs-nav > summary::-webkit-details-marker { display: none; }
.docs-nav > summary::after { content: "+"; font: 400 1.25rem/1 var(--mono); color: var(--muted); }
.docs-nav[open] > summary::after { content: "\2212"; }
.docs-nav nav { padding: var(--s-4) var(--s-4) var(--s-2) calc(var(--s-4) + var(--s-3)); }
.docs-group { font: 500 var(--fs-label)/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: var(--s-5) 0 var(--s-2); }
.docs-nav .docs-group:first-child, .toc .docs-group { margin-top: 0; }
.docs-nav ul, .toc ul { list-style: none; margin: 0; padding: 0; }
.docs-nav a { display: block; padding: var(--s-2) var(--s-3); margin-left: calc(-1 * var(--s-3)); border-radius: var(--r-sm); color: var(--muted); font-size: var(--fs-small); }
.docs-nav a:hover { color: var(--text-strong); background: var(--panel-3); }
.docs-nav a[aria-current="page"] { color: var(--text-strong); background: var(--panel-3); font-weight: 500; }
.toc { display: none; }
/* Below 1200px: "On this page" as a collapsible list under the page head. */
.toc-inline { margin-bottom: var(--s-6); max-width: var(--measure); border-radius: var(--r); background: var(--panel); box-shadow: var(--shadow); }
.toc-inline > summary { display: flex; align-items: center; min-height: 44px; padding: 0 var(--s-4); cursor: pointer; color: var(--text-strong); font-size: var(--fs-small); font-weight: 500; }
.toc-inline ul { list-style: none; margin: 0; padding: 0 var(--s-4) var(--s-3); }
.toc-inline a { display: flex; align-items: center; min-height: 36px; color: var(--muted); font-size: var(--fs-small); }
.toc-inline .sub a { padding-left: var(--s-4); }
@media (min-width: 1200px) { .toc-inline:not(.page-toc) { display: none; } }
.toc a { display: block; padding: var(--s-1) 0; color: var(--muted); font-size: var(--fs-small); line-height: 1.4; }
.toc a:hover { color: var(--text-strong); }
.toc .sub a { padding-left: var(--s-3); }
@media (min-width: 900px) {
  .docs { grid-template-columns: var(--docs-nav) minmax(0, 1fr); }
  .docs-nav { position: sticky; top: 80px; max-height: calc(100vh - 96px); overflow-y: auto; padding-top: var(--s-5); }
  .docs-nav[open] > summary { display: none; }
  .docs-nav nav { padding: 0 0 var(--s-5) var(--s-3); }
}
@media (min-width: 1200px) {
  .docs { grid-template-columns: var(--docs-nav) minmax(0, 1fr) var(--docs-toc); }
  .toc { display: block; position: sticky; top: 80px; max-height: calc(100vh - 96px); overflow-y: auto; padding-top: var(--s-8); }
}
/* Prev / next at the end of a docs page. */
.pager { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: var(--s-4); margin-top: var(--s-8); max-width: var(--measure); }
.pager a { display: grid; gap: var(--s-1); padding: var(--s-4) var(--s-5); border-radius: var(--r); background: var(--panel); box-shadow: var(--shadow); color: var(--text-strong); font-weight: 500; }
.pager a:hover { color: var(--accent); }
.pager small { color: var(--muted); font-size: var(--fs-label); font-weight: 400; }
.pager .next { grid-column: -2; text-align: right; }

/* Post list: the blog index. Date, title, description; no cards. */
.post-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-7); }
.post-list time { color: var(--muted); font-size: var(--fs-small); }
.post-list h2 { font-size: var(--fs-prose-h2); line-height: 1.25; letter-spacing: 0; font-stretch: var(--display-normal); font-weight: var(--fw-display-small); font-variation-settings: "opsz" var(--display-opsz-small); margin: var(--s-1) 0 var(--s-2); }
.post-list h2 a { color: var(--text-strong); }
.post-list h2 a:hover { color: var(--accent); }
.post-list p { color: var(--muted); }

/* Touch screens: every control and standalone link gets a 44px hit area (DESIGN.md §4). */
@media (pointer: coarse) {
  .btn.sm, .copy { min-height: 44px; }
  .docs-nav a { display: flex; align-items: center; min-height: 44px; }
  .skip-link { min-height: 44px; display: inline-flex; align-items: center; }
  .nav .wordmark { min-height: 44px; }
  .page-meta a, .footer-row nav a, .toc-inline a, .nav-links a { display: inline-flex; align-items: center; min-height: 44px; }
}

/* ---- Form: the contact page (a plain POST to the app; site.js adds the fill-time token) ----
   Fields stack; inputs are 44px tall at 16px text (no zoom on iOS). Errors without JS: the
   browser's own checks mark a field :user-invalid after the visitor touched it, which shows
   its .field-error line. The app's /contact page shows server-side errors. */
.form { display: grid; gap: var(--s-4); max-width: 560px; margin-block: var(--s-6); }
.form .field { display: grid; gap: var(--s-2); }
.form label { font-weight: 500; color: var(--text-strong); }
.form label .muted { font-weight: 400; }
.form input, .form select, .form textarea { width: 100%; min-height: 44px; padding: var(--s-2) var(--s-3); border: 0; border-radius: var(--r-sm);
  font: var(--fs-body)/1.5 var(--sans); color: var(--text-strong); background: var(--panel); box-shadow: inset 0 0 0 1px var(--border-strong);
  transition: box-shadow var(--t-fast); }
.form textarea { min-height: calc(var(--s-10) + var(--s-6)); resize: vertical; }
.form select { appearance: auto; }
.form input:focus-visible, .form select:focus-visible, .form textarea:focus-visible { outline: none; box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 4px var(--accent-soft); }
.form :user-invalid { box-shadow: inset 0 0 0 1px var(--bad); }
.form .field-error { display: none; color: var(--bad-text); font-size: var(--fs-small); }
.form :user-invalid ~ .field-error { display: block; }
.form .hint { color: var(--muted); font-size: var(--fs-small); }
.form .actions { margin-top: var(--s-2); }
.form .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---- Reveal on scroll (site.js adds .in). Content is visible without JS. ---- */
.js [data-reveal] { opacity: 0; transform: translateY(12px); transition: opacity var(--t-slow) var(--ease-out), transform var(--t-slow) var(--ease-out); }
.js [data-reveal].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js [data-reveal] { opacity: 1; transform: none; transition: none; } }
