@font-face { font-family: 'Schibsted Grotesk'; font-style: normal; font-weight: 400 900; font-display: swap; src: url('../fonts/schibsted-grotesk-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: 'Schibsted Grotesk'; font-style: normal; font-weight: 400 900; font-display: swap; src: url('../fonts/schibsted-grotesk-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 100 800; font-display: swap; src: url('../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; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 100 800; font-display: swap; src: url('../fonts/jetbrains-mono-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --font: 'Schibsted Grotesk', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --r-card: 14px;
  --r-control: 10px;
  --r-table: 8px;
  --r-pill: 999px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --dur-press: 160ms;
  --dur-pop: 180ms;
  --dur-dialog: 200ms;
}

/* Light: also the default before any theme is chosen. */
:root,
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f5f7;
  --bg-top: #fbfbfc;
  --surface: #ffffff;
  --raised: #eceef2;
  --ink: #0a0a0a;
  --ink-2: #5a5f66;
  --ink-3: #80858c; /* non-text only (borders, decoration): below 4.5:1 */
  --line: rgba(0, 0, 0, 0.06);
  --line-table: rgba(0, 0, 0, 0.14);
  --line-strong: rgba(0, 0, 0, 0.28);
  --control-border: #80858c;
  --accent: #0037d6;
  --accent-hover: #002aa6;
  --accent-text: #0037d6;
  --accent-soft: rgba(0, 55, 214, 0.1);
  --on-accent: #ffffff;
  --sheen-top: #1f55f0;
  --focus: #0037d6;
  --ok: #146c3f;
  --ok-soft: rgba(20, 108, 63, 0.1);
  --warning: #8f5400;
  --warning-soft: rgba(143, 84, 0, 0.1);
  --critical: #b0302a;
  --critical-soft: rgba(176, 48, 42, 0.1);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 14px rgba(0, 0, 0, 0.05);
  --shadow-2: 0 8px 28px rgba(0, 0, 0, 0.12);
  --shadow-accent: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 4px 12px rgba(0, 55, 214, 0.25);
  --backdrop: rgba(10, 10, 10, 0.4);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0c0e;
  --bg-top: #121317;
  --surface: #16181c;
  --raised: #1e2127;
  --ink: #f2f3f5;
  --ink-2: #9aa0a8;
  --ink-3: #6d737b; /* non-text only (borders, decoration): below 4.5:1 */
  --line: rgba(255, 255, 255, 0.06);
  --line-table: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.28);
  --control-border: #6d737b;
  --accent: #3560f0;
  --accent-hover: #2a52dc;
  --accent-text: #7c9bff;
  --accent-soft: rgba(124, 155, 255, 0.14);
  --on-accent: #ffffff;
  --sheen-top: #3f69f5;
  --focus: #7c9bff;
  --ok: #52d18f;
  --ok-soft: rgba(82, 209, 143, 0.14);
  --warning: #f0b24a;
  --warning-soft: rgba(240, 178, 74, 0.14);
  --critical: #ff6b5e;
  --critical-soft: rgba(255, 107, 94, 0.14);
  --shadow-1: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 12px 36px rgba(0, 0, 0, 0.55);
  --shadow-accent: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 4px 14px rgba(53, 96, 240, 0.35);
  --backdrop: rgba(0, 0, 0, 0.6);
}

/* System: the dark block again, verbatim (the contrast test checks the two blocks are identical). */
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    color-scheme: dark;
    --bg: #0b0c0e;
    --bg-top: #121317;
    --surface: #16181c;
    --raised: #1e2127;
    --ink: #f2f3f5;
    --ink-2: #9aa0a8;
    --ink-3: #6d737b; /* non-text only (borders, decoration): below 4.5:1 */
    --line: rgba(255, 255, 255, 0.06);
    --line-table: rgba(255, 255, 255, 0.14);
    --line-strong: rgba(255, 255, 255, 0.28);
    --control-border: #6d737b;
    --accent: #3560f0;
    --accent-hover: #2a52dc;
    --accent-text: #7c9bff;
    --accent-soft: rgba(124, 155, 255, 0.14);
    --on-accent: #ffffff;
    --sheen-top: #3f69f5;
    --focus: #7c9bff;
    --ok: #52d18f;
    --ok-soft: rgba(82, 209, 143, 0.14);
    --warning: #f0b24a;
    --warning-soft: rgba(240, 178, 74, 0.14);
    --critical: #ff6b5e;
    --critical-soft: rgba(255, 107, 94, 0.14);
    --shadow-1: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-2: 0 12px 36px rgba(0, 0, 0, 0.55);
    --shadow-accent: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 4px 14px rgba(53, 96, 240, 0.35);
    --backdrop: rgba(0, 0, 0, 0.6);
  }
}

/* Print: the light block again on white paper, with no shadows, whatever the theme on screen (the contrast test checks
   it against the light block). No element carries data-print-x, so the :not() always holds; it only gives this
   selector its own text for the test and one more attribute of specificity: (0,3,0) beats the (0,2,0) of the dark and
   system blocks, whatever the source order. */
@media print {
  :root[data-theme]:not([data-print-x]) {
    color-scheme: light;
    --bg: #ffffff;
    --bg-top: #ffffff;
    --surface: #ffffff;
    --raised: #eceef2;
    --ink: #0a0a0a;
    --ink-2: #5a5f66;
    --ink-3: #80858c; /* non-text only (borders, decoration): below 4.5:1 */
    --line: rgba(0, 0, 0, 0.06);
    --line-table: rgba(0, 0, 0, 0.14);
    --line-strong: rgba(0, 0, 0, 0.28);
    --control-border: #80858c;
    --accent: #0037d6;
    --accent-hover: #002aa6;
    --accent-text: #0037d6;
    --accent-soft: rgba(0, 55, 214, 0.1);
    --on-accent: #ffffff;
    --sheen-top: #1f55f0;
    --focus: #0037d6;
    --ok: #146c3f;
    --ok-soft: rgba(20, 108, 63, 0.1);
    --warning: #8f5400;
    --warning-soft: rgba(143, 84, 0, 0.1);
    --critical: #b0302a;
    --critical-soft: rgba(176, 48, 42, 0.1);
    --shadow-1: none;
    --shadow-2: none;
    --shadow-accent: none;
    --backdrop: rgba(10, 10, 10, 0.4);
  }
}
