/* Site pages (web/): long reading text. Tokens mirror src/theme/tokens.ts;
   Instrument Sans is served from this origin (web/fonts, OFL). mark.svg and
   favicon.png come from scripts/gen-icons.mjs. */
@font-face { font-family: "Instrument Sans"; src: url("/fonts/instrument-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/fonts/instrument-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  color-scheme: light dark;
  --surface: #fff6e0; --ink: #1a1a1a; --ink-muted: #6e6450; --line: #ead9a8;
  --accent: #1e6b3c; --focus: #1e6b3c;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --surface: #0f1f16; --ink: #fff6e0; --ink-muted: #c9bfa6; --line: #2e4636;
    --accent: #8fd4a6; --focus: #ffd23f;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--surface); color: var(--ink);
  font: 400 17px/1.65 var(--sans);
  padding: 20px 16px 96px;
  -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%;
}
main, .top { max-width: 42rem; margin: 0 auto; }

/* Top: brand on the left, language switch on the right */
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-bottom: 40px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand .mark { display: block; width: 28px; height: 28px; }
.wordmark { font: 600 22px/1 var(--sans); }
.langs { display: flex; gap: 14px; margin: 0; padding: 0; list-style: none; font: 600 13px/16px var(--sans); }
.langs li { margin: 0; }
.langs a { color: var(--ink-muted); text-decoration: none; }
.langs a:hover { color: var(--accent); }
.langs a[aria-current="page"] { color: var(--ink); }

/* Text */
h1 { margin: 0 0 8px; font: 600 36px/1.1 var(--sans); text-wrap: balance; overflow-wrap: anywhere; }
h2 { margin: 40px 0 10px; padding-top: 24px; border-top: 1px solid var(--line); font: 600 22px/1.25 var(--sans); }
h2:first-of-type { border-top: 0; padding-top: 0; }
h3 { margin: 28px 0 4px; font: 600 17px/1.4 var(--sans); }
p { margin: 0 0 12px; }
.date { margin: 0 0 40px; font-size: 14px; color: var(--ink-muted); }
ul { margin: 0 0 12px; padding-left: 1.2em; }
li { margin: 6px 0; }
strong { font-weight: 600; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
footer { margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-muted); }
