/* RunHeap design tokens. The ink ramp is ordered by distance from the ground,
   not by lightness, so every semantic role below is theme independent. */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/archivo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("/assets/fonts/jetbrains-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;

  --ink-0: #ffffff;
  --ink-1: #fafbfc;
  --ink-2: #f5f7f9;
  --ink-3: #eef1f4;
  --ink-4: #e3e7ec;
  --ink-5: #d3d9e0;
  --ink-6: #b4bdc7;
  --ink-7: #68737f;
  --ink-8: #48525d;
  --ink-9: #252c34;
  --ink-10: #0a0c0e;

  --state-ok: #1a7f37;
  --state-warn: #8a5d00;
  --state-bad: #cf222e;
  --state-info: #0857c3;

  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --series-4: #eda100;
  --series-5: #e87ba4;
  --series-6: #008300;
  --series-7: #4a3aa7;
  --series-8: #e34948;

  --shadow-overlay: 0 32px 64px -16px rgb(10 12 14 / 0.22),
    0 2px 8px rgb(10 12 14 / 0.08);
  --backdrop: rgb(10 12 14 / 0.42);
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --ink-0: #0a0c0e;
  --ink-1: #0f1214;
  --ink-2: #14181b;
  --ink-3: #1a1f23;
  --ink-4: #232930;
  --ink-5: #2e353d;
  --ink-6: #414a54;
  --ink-7: #7c8894;
  --ink-8: #8a95a1;
  --ink-9: #b9c1ca;
  --ink-10: #f4f6f8;

  --state-ok: #3fb950;
  --state-warn: #d6a32c;
  --state-bad: #f0564a;
  --state-info: #4d8df5;

  --series-1: #3987e5;
  --series-2: #d95926;
  --series-3: #199e70;
  --series-4: #c98500;
  --series-5: #d55181;
  --series-6: #008300;
  --series-7: #9085e9;
  --series-8: #e66767;

  --shadow-overlay: 0 32px 64px -16px rgb(0 0 0 / 0.62),
    0 2px 8px rgb(0 0 0 / 0.44);
  --backdrop: rgb(4 5 6 / 0.66);
}

:root {
  /* Surfaces and ink, mapped once so views never touch the ramp directly. */
  --bg: var(--ink-0);
  --bg-raised: var(--ink-1);
  --panel: var(--ink-2);
  --control: var(--ink-3);
  --rule: var(--ink-4);
  --rule-strong: var(--ink-5);
  --fg-faint: var(--ink-6);
  --fg-muted: var(--ink-7);
  --fg-secondary: var(--ink-8);
  --fg: var(--ink-9);
  --fg-strong: var(--ink-10);

  --sans: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --text-11: 0.6875rem;
  --text-12: 0.75rem;
  --text-13: 0.8125rem;
  --text-14: 0.875rem;
  --text-15: 0.9375rem;
  --text-17: 1.0625rem;
  --text-20: 1.25rem;
  --text-24: 1.5rem;
  --text-30: 1.875rem;
  --text-38: 2.375rem;
  --text-display: clamp(2.5rem, 1.4rem + 4.6vw, 4.75rem);
  --text-display-sm: clamp(1.875rem, 1.2rem + 2.6vw, 3rem);

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-14: 56px;
  --space-18: 72px;
  --space-24: 96px;
  --space-32: 128px;

  --radius-sm: 3px;
  --radius: 5px;
  --radius-lg: 8px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 120ms;
  --dur: 220ms;
  --dur-slow: 460ms;

  --shell-sidebar: 232px;
  --shell-topbar: 52px;
  --content-max: 1440px;
  --reading-max: 68ch;
}

/* Quantity encoded without color: density of a monochrome hatch. Load, coverage,
   and share all read in grayscale, which keeps hue reserved for meaning. */
.hatch {
  --hatch-angle: 45deg;
  --hatch-gap: 5px;
  background-image: repeating-linear-gradient(
    var(--hatch-angle),
    currentColor 0 1px,
    transparent 1px var(--hatch-gap)
  );
}
.hatch-2 { --hatch-gap: 4px; }
.hatch-3 { --hatch-gap: 3px; }
.hatch-4 { --hatch-gap: 2.2px; }
.hatch-conflict {
  background-image: repeating-linear-gradient(45deg, currentColor 0 1px, transparent 1px 4px),
    repeating-linear-gradient(135deg, currentColor 0 1px, transparent 1px 4px);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
