/* ============================================================================
   Swarm Traces — the shared tokens, matching the write-up (site/article/article.css):
   dark ink on light paper, one theme; serif for reading, a sans for labels and small
   text, monospace for captured text. Hairline rules, one link colour, no accent
   palette, no chips/cards/gradients/shadows. Redactions read as editorial marks.
   ============================================================================ */

:root {
  --paper:  #fdfdfb;
  --ink:    #1b1b1b;
  --muted:  #4a4a4a;   /* secondary text (the write-up's --ink-soft) */
  --faint:  #767676;   /* metadata, labels, redaction marks (the write-up's --ink-mute) */
  --rule:   #d9d6cf;   /* hairlines */
  --rule-2: #f3f2ee;   /* faint fills: code plate */
  --link:   #1f4e79;   /* the single link colour */
  --link-visited: #1f4e79;
  --mark:   #b8860b;   /* the accent: highlights are a pale tint of it */
  --tint:   rgba(184, 134, 11, 0.16);
  --miss:   #9b2226;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans:  -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono:  "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --measure: 42rem;
  --gutter: clamp(16px, 5vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--paper); color-scheme: light; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--serif); font-size: 18px; line-height: 1.6;
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
::selection { background: var(--tint); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.25; color: var(--ink); }

/* ---------- site chrome, the same as the write-up's: links in the top-right corner, the site name as a kicker
   above the page title; on narrow screens a sticky bar across the top carrying the name and the links ---------- */
.topbar {
  position: absolute; top: 0; left: 0; right: 0; height: 2.75rem; z-index: 25;
  display: flex; align-items: center; justify-content: center; padding: 0 var(--gutter); pointer-events: none;
}
.topbar-brand, .kicker { font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.14em; font-weight: 600; color: var(--muted); }
.topbar-brand { display: none; font-size: 0.78rem; text-decoration: none; }
.topbar-brand:hover { color: var(--ink); text-decoration: none; }
.kicker { font-size: 0.82rem; line-height: 1.3; margin: 0 0 0.9rem; }
.site-nav { display: flex; gap: 1.4rem; pointer-events: auto; font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.72rem; font-weight: 500; }
.site-nav { justify-content: flex-end; width: 100%; max-width: calc(46rem - 2 * var(--gutter)); }   /* flush with the viewer column's right edge */
.site-nav a { color: var(--faint); text-decoration: none; }
.site-nav a:hover { color: var(--ink); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--ink); }
@media (max-width: 1099px) {
  .topbar {
    position: fixed; justify-content: space-between; pointer-events: auto;
    background: var(--paper); border-bottom: 1px solid var(--rule);
  }
  .topbar-brand { display: block; }
  .site-nav { width: auto; max-width: none; }
  .kicker { display: none; }                    /* the bar already says it */
  body { padding-top: 2.75rem; }
}

/* ---------- redaction marks: editorial, not UI ---------- */
.redact, .marker, .secret-removed {
  font-family: var(--mono); font-size: 0.86em; color: var(--faint);
  white-space: nowrap; font-style: normal;
}
.marker { font-style: italic; }
.secret-removed { color: var(--miss); }

/* ---------- footer ---------- */
.site-foot { max-width: 46rem; margin: 0 auto; padding: 1.2rem var(--gutter) 3rem; font-family: var(--sans); font-size: 0.74rem; color: var(--faint); border-top: 1px solid var(--rule); line-height: 1.55; }

@media (max-width: 640px) { body { font-size: 17px; } }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* on a phone the bar has no room for the name and all three links: drop the name (the kicker above the title
   comes back) and shorten "Download dataset" to "Download" */
@media (max-width: 560px) {
  .topbar-brand { display: none; }
  .site-nav { margin-left: auto; }
  .nav-more { display: none; }
  .kicker { display: block; }
}
