/* Design tokens — "Swiss Journal" (design-system spec §2; values bundle-authoritative).
   Light values on :root, dark overrides in ONE prefers-color-scheme block. */

@font-face {
  font-family: "Instrument Sans";
  src: url("/static/fonts/InstrumentSans[wdth,wght].woff2") format("woff2");
  font-weight: 400 700;
  font-stretch: 100%; /* variable file carries a wdth axis — pin it (spec §3) */
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("/static/fonts/InstrumentSans-Italic[wdth,wght].woff2") format("woff2");
  font-weight: 400 700;
  font-stretch: 100%;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: light dark;

  /* §2.1 color — light */
  --bg: #FBFCFA;
  --surface: #FFFFFE;
  --ink: #131412;
  --body: #131412;
  --muted: #67695F;
  --muted-2: #8A8C86;       /* non-text decoration ONLY (spec §8.2) */
  --rule: #E0E2DE;
  --rule-faint: #F0F1EE;
  --rule-strong: #131412;
  --accent: #1E6B4B;
  --accent-tint: #E7F0EB;
  --on-accent: #FFFFFE;
  --error: #B0362A;
  --error-tint: #FBF1EF;
  --disabled: #C7C9C5;
  --banner-tint: #F3F6F2;

  /* §2.3 spacing — phone base, overridden at the two breakpoints */
  --nav-h: 56px;
  --gutter: 20px;

  /* §2.2 typography scale — sizes fluid via clamp() between bundle endpoints */
  --text-hero-size: clamp(32px, 2.5vw + 24px, 46px);
  --text-title-size: clamp(28px, 2vw + 22px, 38px);
  --text-section-size: 22px;
  --text-subsection-size: 17px;
  --text-body-size: 16px;
  --text-body-lh: 1.75;
  --text-ui-size: 15px;
  --text-refs-size: 14px;
  --text-refs-lh: 1.6;
  --text-meta-size: 12px;
  --text-kicker-size: 11px;
  --text-mono: 12px ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161715;
    --surface: #1C1E1B;
    --ink: #EDEEE9;
    --body: #D8D9D2;
    --muted: #9A9C92;
    --muted-2: #6E7066;
    --rule: #33352F;
    --rule-faint: #2A2C26;
    --rule-strong: #EDEEE9;
    --accent: #5CAD87;
    --accent-tint: #24312A;
    --error: #D2695B;
    --error-tint: #241B19;
    --disabled: #33352F;
    --banner-tint: #1E211E;
  }
}

@media (min-width: 700px) {
  :root { --nav-h: 60px; --gutter: 32px; }
}
@media (min-width: 1080px) {
  :root { --nav-h: 64px; --gutter: 48px; }
}

/* Bare-element base styles (spec §1.3: base only — no component rules here). */
html { background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: "Instrument Sans", -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-variant-numeric: tabular-nums; /* spec §2.2: tabular numerals globally */
  font-size: var(--text-ui-size);
  line-height: 1.6;
}
h1, h2, h3, h4 {
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.02em;
}
a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Transitions exist ONLY on [data-scrollhide]; this disables them by normal
   cascade — the system never uses importance overrides (spec §1.3). Any task
   adding a transition must add its reduced-motion override here. */
@media (prefers-reduced-motion: reduce) {
  [data-scrollhide] { transition: none; }
}
