/* Shared by gallery.html (/) and design.html (/design/*), served by serve.mjs at /site.css:
   colours, base type, the site header, buttons, tabs and the footer. Page layouts stay in
   each page's own <style>. */

:root {
  --bg: #f6f6f4; --panel: #ffffff; --ink: #1d1d1b; --muted: #6b6b66; --line: #e2e1dc;
  --accent: #3b5bdb; --accent-ink: #ffffff; --bad: #c92a2a; --warn: #9a6f00; --good: #2b8a3e;
  --stage: #111;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151514; --panel: #1f1f1d; --ink: #ecebe6; --muted: #9b9a93; --line: #34332f;
    --accent: #748ffc; --accent-ink: #10131f; --bad: #ff6b6b; --warn: #f0c050; --good: #69db7c;
    --stage: #000;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 system-ui, -apple-system, sans-serif; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: 1440px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); }
.eyebrow { font: 12px ui-monospace, monospace; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.good { color: var(--good); } .warn { color: var(--warn); } .bad { color: var(--bad); }
.muted { color: var(--muted); }
kbd { font: 11px ui-monospace, monospace; border: 1px solid currentColor; border-radius: 4px; padding: 0 5px; opacity: 0.7; margin-left: 6px; }

/* Site header: the same on every page. */
header.top { position: sticky; top: 0; z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line); }
header.top .bar { display: flex; align-items: center; gap: 24px; height: 60px; }
.mark { font-weight: 800; font-size: 19px; letter-spacing: -0.03em; text-decoration: none; white-space: nowrap; }
.mark span { color: var(--accent); }
.site-nav { display: flex; gap: 2px; flex: 1; justify-content: flex-end; overflow-x: auto; scrollbar-width: none; }
.site-nav a { text-decoration: none; color: var(--muted); font-size: 14px; white-space: nowrap; padding: 6px 13px; border-radius: 999px; border: 1px solid transparent; }
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); border-color: var(--ink); }
/* On a phone every link stays visible (wrapped, not scrolled away), and the taller header
   scrolls with the page instead of covering it. */
@media (max-width: 760px) {
  header.top { position: static; }
  header.top .bar { height: auto; flex-wrap: wrap; gap: 4px 16px; padding-top: 10px; }
  .site-nav { flex-basis: 100%; flex-wrap: wrap; justify-content: flex-start; overflow: visible; margin: 0 -10px; padding-bottom: 8px; }
  .site-nav a { padding: 5px 10px; }
}

/* Buttons. One solid pill leads; the rest are outlined. */
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px; padding: 9px 17px; font: 600 14px system-ui, sans-serif; text-decoration: none; border: 1px solid var(--ink); background: none; color: var(--ink); cursor: pointer; white-space: nowrap; }
.pill.solid, .pill[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.pill:hover { background: var(--ink); color: var(--bg); }
.pill.solid:hover { opacity: 0.85; }
.pill.small { padding: 5px 12px; font-size: 12px; }
.pill:disabled { opacity: 0.45; cursor: default; background: none; color: var(--ink); }
.linkish { border: 0; background: none; padding: 0; color: var(--muted); cursor: pointer; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.linkish:hover { color: var(--ink); }

/* Tabs: an underline marks the current one. */
.tabs { display: flex; gap: 4px 18px; flex-wrap: wrap; }
.tabs button, .tabs a { border: 0; background: none; padding: 4px 0; color: var(--muted); cursor: pointer; font-size: 15px; text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button:hover, .tabs a:hover { color: var(--ink); }
.tabs button[aria-selected="true"], .tabs button.on, .tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }

footer.site { border-top: 1px solid var(--line); padding: 32px 0 44px; margin-top: 24px; }
footer.site .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: baseline; }
footer.site .big { font-size: clamp(24px, 3.4vw, 38px); font-weight: 800; letter-spacing: -0.045em; }
footer.site nav { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; }
footer.site nav a { color: var(--muted); text-decoration: none; }
footer.site nav a:hover { color: var(--ink); }

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