/* nk design system: tokens. One accent, quiet neutrals, light and dark.
   Type renders as SF Pro on Apple devices and Inter elsewhere. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
}
:root {
  color-scheme: light dark;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, "Segoe UI", Roboto, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", system-ui, "Segoe UI", Roboto, sans-serif;

  /* Type scale (rem; 1rem = 16px). Headings use weight 500; body 400. */
  --fs-display: clamp(3rem, 1.6rem + 5.6vw, 5rem);    /* 48 -> 80 */
  --fs-title1: clamp(2.125rem, 1.6rem + 2.2vw, 3rem); /* 34 -> 48 */
  --fs-title2: clamp(1.625rem, 1.35rem + 1.1vw, 2rem); /* 26 -> 32 */
  --fs-title3: 1.3125rem;  /* 21 */
  --fs-body: 1.0625rem;    /* 17 */
  --fs-callout: 1rem;      /* 16: buttons and inputs, 1px under body (rule 6), never under 16 */
  --fs-sub: 0.9375rem;     /* 15 */
  --fs-foot: 0.8125rem;    /* 13: floor */
  --fs-score: clamp(4.5rem, 3rem + 6vw, 7.5rem);
  --lh-display: 1.05;
  --lh-title: 1.12;
  --lh-body: 1.47;
  --tr-display: -0.025em;  /* tighter as type grows (rule 7) */
  --tr-title1: -0.02em;
  --tr-title2: -0.012em;
  --tr-title3: -0.006em;
  --tr-body: -0.003em;
  --w-regular: 400;
  --w-medium: 500;
  --w-strong: 600; /* numbers and the one primary label only */

  /* Neutrals (light) */
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --surface: #ffffff;
  --ink: #1d1d1f;
  --ink-2: #6e6e73;   /* 5.1:1 on white */
  --ink-3: #8e8e93;   /* non-text only */
  --hairline: #d2d2d7;
  --fill: #e8e8ed;
  /* The one accent */
  --accent: #c8102e;
  --accent-ink: #ffffff;
  --link: #b0102a;    /* 6.4:1 on white */
  /* Status (charts, glyphs, short labels only) */
  --st-done: #1a7f37;
  --st-working: #5fae6e;
  --st-stuck: #b7791f;
  --st-broken: #c8102e;
  --st-none: #c7c7cc;
  --st-done-text: #1a7f37;
  --st-working-text: #2f7a3e;
  --st-stuck-text: #8a5a12;
  --st-broken-text: #b0102a;
  --st-none-text: #6e6e73;
  /* Glass (floating nav only) */
  --glass: rgb(255 255 255 / 0.86);
  --glass-line: rgb(0 0 0 / 0.08);
  --blur: 20px;

  /* Space (4/8 base) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px; --s9: 120px;
  --gutter: clamp(20px, 4vw, 48px);
  --maxw: 1120px;
  --measure: 38em;
  /* Radii: one per object type */
  --r-control: 10px;   /* inputs, segmented controls */
  --r-media: 18px;     /* photos, screenshots, charts panel */
  --r-button: 980px;   /* buttons */
  /* Motion */
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-exit: cubic-bezier(.3, 0, .8, .15);
  --dur-press: 120ms;
  --dur-ui: 240ms;
  --dur-reveal: 400ms;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000; --bg-alt: #161617; --surface: #1c1c1e;
    --ink: #f5f5f7; --ink-2: #a1a1a6; --ink-3: #6e6e73; --hairline: #38383a; --fill: #2c2c2e;
    --accent: #ff453a; --accent-ink: #000000; --link: #ff6961;
    --st-done: #30d158; --st-working: #1f8a3a; --st-stuck: #ffb340; --st-broken: #ff453a; --st-none: #48484a;
    --st-done-text: #30d158; --st-working-text: #7bd88f; --st-stuck-text: #ffb340; --st-broken-text: #ff6961; --st-none-text: #a1a1a6;
    --glass: rgb(22 22 23 / 0.86); --glass-line: rgb(255 255 255 / 0.1);
  }
}
:root[data-theme="dark"] {
  --bg: #000000; --bg-alt: #161617; --surface: #1c1c1e;
  --ink: #f5f5f7; --ink-2: #a1a1a6; --ink-3: #6e6e73; --hairline: #38383a; --fill: #2c2c2e;
  --accent: #ff453a; --accent-ink: #000000; --link: #ff6961;
  --st-done: #30d158; --st-working: #1f8a3a; --st-stuck: #ffb340; --st-broken: #ff453a; --st-none: #48484a;
  --st-done-text: #30d158; --st-working-text: #7bd88f; --st-stuck-text: #ffb340; --st-broken-text: #ff6961; --st-none-text: #a1a1a6;
  --glass: rgb(22 22 23 / 0.86); --glass-line: rgb(255 255 255 / 0.1);
}
