/* zeno "HARD SIGNAL" neo-brutalist rebrand (docs/BRAND.md). Self-host Archivo
   Black (display) + Space Mono (mono) and re-alias the legacy family names
   ("Fraunces" -> Archivo Black, "JetBrains Mono" -> Space Mono) so all 90+
   inline font declarations across the existing pages re-skin without being
   edited. Geist stays for long-form body readability on the doc pages. */
@font-face { font-family: "Archivo Black"; src: url("/fonts/ArchivoBlack-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Space Mono"; src: url("/fonts/SpaceMono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Space Mono"; src: url("/fonts/SpaceMono-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
/* legacy aliases -> brutalist faces */
@font-face { font-family: "Fraunces"; src: url("/fonts/ArchivoBlack-400.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/SpaceMono-400.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/fonts/SpaceMono-400.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
/* Newsreader (self-hosted variable) - the research/whitepaper long-form serif */
@font-face { font-family: "Newsreader"; src: url("/fonts/Newsreader-normal.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/fonts/Newsreader-italic.woff2") format("woff2"); font-weight: 200 800; font-style: italic; font-display: swap; }

:root {
  /* HARD SIGNAL brutalist palette (light). Legacy var NAMES kept; VALUES
     remapped so every page that references them re-skins at once. */
  --paper: #ffffff;
  --paper-deep: #f2f1ec;
  --paper-card: #ffffff;
  --ink: #000000;
  --ink-muted: #52525b;
  --ink-muted-strong: #3f3f46;
  --hairline: #000000;
  --accent: #8a6a00;
  --accent-ink: #8a6a00;
  --accent-soft: rgba(255, 229, 0, 0.2);
  --accent-fill: #ffe500;
  /* brutalist accent set */
  --red: #ff2d2d;
  --yellow: #ffe500;
  --cyan: #FFE500;
  --blue: #2d5bff;
  --coral: #ff6f61;
  --green: #00e676;
  --violet: #a855f7;

  /* Backwards-compatible aliases used in existing page styles. */
  --bg: var(--paper);
  --panel: var(--paper-card);
  --muted: var(--ink-muted-strong);
  --line: var(--hairline);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #000;
  outline-offset: 2px;
}

.mono { font-family: var(--mono); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--ink);
  color: var(--paper);
  padding: 8px 12px;
  font: 700 11px/1 "JetBrains Mono", monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  z-index: 100;
}

.skip-link:focus {
  left: 16px;
}

/* Top nav shared across all pages (index/pricing/research carry their own
   inline copy for cache reasons; this version is the canonical one used by
   whitepaper, prosoche, sclt, privacy, terms). */
.topnav {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--line);
  margin-bottom: 28px;
  font: 700 11px/1 "JetBrains Mono", monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.topnav .brand {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}

.topnav nav {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

.topnav nav a {
  color: var(--muted);
  text-decoration: none;
}

.topnav nav a:hover,
.topnav nav a:focus-visible {
  color: var(--ink);
}

.topnav nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom: 2px solid var(--ink);
  padding-bottom: 2px;
}

.topnav .grow { flex: 1; }

.topnav .lang-switch {
  text-decoration: none;
  border: 2px solid var(--line);
  padding: 4px 8px;
  color: var(--ink);
}

.paper-caption {
  font: 400 10.5px/1.4 "JetBrains Mono", monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 28px;
}

@media (max-width: 720px) {
  .topnav {
    flex-wrap: wrap;
    gap: 12px;
    font-size: 10px;
    margin-bottom: 22px;
    padding-bottom: 12px;
  }
  .topnav .grow { display: none; }
  .topnav nav { gap: 14px; }
  .paper-caption { font-size: 9.5px; margin-bottom: 22px; }
}

/* ------------------------------------------------------------------------
   Unified site chrome (header + footer), ported from instrument.css so the
   common.css pages carry the exact same .site-head / .site-foot blocks as
   index.html and research.html. Scoped/namespaced (.site-head, .site-foot,
   .nav, .nav-cta) so page-local .btn / a / h2 styles never collide. */
:root {
  --mono: "Space Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --hair: #000000;
  --fg: #000000;
  --fg-strong: #000000;
  --fg-muted: #52525b;
  --signal: #ffe500;
  --signal-ink: #8a6a00;
  --good: #00e676;
  --watch: #ffe500;
  --maxw: 1120px;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1.1rem, 4vw, 2.2rem); }

.site-head { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(10px); border-bottom: 2px solid var(--hair); }
.site-head .wrap { display: flex; align-items: center; gap: 1.2rem; padding-top: 0.8rem; padding-bottom: 0.8rem; }
.nav { display: flex; gap: 0.3rem; margin-left: auto; align-items: center; flex-wrap: wrap; }
.nav a { font-family: var(--mono); font-size: 0.76rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fg-muted); padding: 0.4rem 0.6rem; text-decoration: none; border-bottom: none; }
.nav a:hover, .nav a:focus-visible { color: var(--fg-strong); text-decoration: none; background: var(--yellow); }
.nav a[aria-current="page"] { color: var(--fg-strong); box-shadow: inset 0 -3px 0 0 var(--yellow); }
.nav-cta { display: inline-flex; align-items: center; font-family: var(--mono); font-size: 0.76rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 0.5rem 0.9rem; margin-left: 0.3rem; border: 2px solid #000; background: var(--yellow); color: #000; box-shadow: 3px 3px 0 0 #000; text-decoration: none; transition: transform 120ms ease, box-shadow 120ms ease; }
.nav-cta:hover, .nav-cta:focus-visible { color: #000; text-decoration: none; transform: translate(-2px, -2px); box-shadow: 5px 5px 0 0 #000; }
.nav-cta:active { transform: translate(0, 0); box-shadow: 2px 2px 0 0 #000; }

.site-foot { padding: 2.6rem 0 3.4rem; margin-top: 48px; color: var(--fg-muted); font-family: var(--mono); font-size: 0.76rem; line-height: 1.6; border-top: 2px solid var(--hair); background: var(--paper); }
.site-foot a { color: var(--fg-muted); text-decoration: none; border-bottom: none; }
.site-foot a:hover, .site-foot a:focus-visible { color: var(--signal-ink); text-decoration: underline; text-underline-offset: 3px; }
.site-foot .grid { display: grid; gap: 0.9rem; }
.site-foot .cols-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.site-foot .readout { font-family: var(--mono); }
.site-foot .readout .k { color: var(--fg-muted); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.site-foot .chip { display: inline-flex; align-items: center; gap: 0.4rem; font-family: var(--mono); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; border: 2px solid #000; color: #000; background: #fff; }
.site-foot .chip.live { background: var(--good); }
.site-foot .chip.soon { background: var(--watch); }

@media print {
  :root {
    --paper: #ffffff;
    --paper-deep: #ffffff;
    --paper-card: #ffffff;
    --ink: #000000;
    --ink-muted: #2f2f2f;
    --ink-muted-strong: #1f1f1f;
    --hairline: rgba(0, 0, 0, 0.22);
    --accent: #000000;
    --accent-soft: rgba(0, 0, 0, 0.05);
  }

  html,
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 11pt;
    line-height: 1.45;
  }

  .skip-link,
  .lang-switch,
  .download-row {
    display: none !important;
  }

  .page {
    max-width: none !important;
    margin: 0 !important;
    padding: 18mm 14mm !important;
  }

  .meta,
  footer,
  .biblio {
    break-inside: avoid;
  }

  h1,
  h2,
  h3,
  .chapter h2 {
    break-after: avoid-page;
  }

  p,
  li,
  blockquote,
  .chapter,
  .abstract,
  .toc {
    orphans: 3;
    widows: 3;
  }

  a,
  a:visited {
    color: #000000 !important;
    text-decoration: underline;
    text-underline-offset: 2px;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
  }

  @page {
    margin: 14mm;
  }
}
