/*
 * Rocketizer Playground: design tokens, shared by the sign-in page and the app.
 *
 * Paper and carbon. The light theme is warm paper with ink; the dark theme is carbon with paper
 * ink, stepped on its own (raised surfaces get lighter), not an inversion. One signal colour,
 * vermilion, marks what is live and what to press. Data colours are a validated categorical set
 * (eight slots, fixed order) used only for marks, never for text.
 *
 * Type: Bricolage Grotesque for the interface and figures (its optical-size axis follows the size),
 * Martian Mono at 87.5% width for data, code and numbers that line up.
 */

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("fonts/bricolage-grotesque-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: "Bricolage Grotesque";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("fonts/bricolage-grotesque-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: "Martian Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  font-stretch: 75% 112.5%;
  src: url("fonts/martian-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: "Martian Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  font-stretch: 75% 112.5%;
  src: url("fonts/martian-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 {
  color-scheme: light;

  /* Type */
  --font-sans: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Martian Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --mono-stretch: 87.5%;
  --text-2xs: 10.5px;
  --text-xs: 11.5px;
  --text-sm: 12.5px;
  --text-md: 13.5px;
  --text-lg: 15px;
  --text-xl: 19px;
  --text-2xl: 26px;
  --text-3xl: 34px;
  --text-hero: 52px;
  --leading-tight: 1.15;
  --leading: 1.45;
  --mono-xs: 10.5px;
  --mono-sm: 11px;
  --mono-md: 12px;

  /* Space, radius, motion */
  --s-1: 2px; --s-2: 4px; --s-3: 6px; --s-4: 8px; --s-5: 12px; --s-6: 16px; --s-7: 20px; --s-8: 24px; --s-9: 32px; --s-10: 40px;
  --r-xs: 4px; --r-sm: 6px; --r-md: 9px; --r-lg: 13px; --r-xl: 18px; --r-pill: 999px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --t-fast: 120ms; --t-med: 220ms; --t-slow: 420ms;

  /* Surfaces (paper) */
  --paper-0: #F3F0E8;      /* the page plane */
  --paper-1: #FBFAF6;      /* panels */
  --paper-2: #FFFFFF;      /* raised: cards, popovers, inputs */
  --paper-sunk: #ECE8DE;   /* wells: the browser's bed, code */
  --paper-hover: rgba(28, 27, 23, .045);
  --paper-press: rgba(28, 27, 23, .08);
  --line-1: #E4DFD3;       /* hairlines */
  --line-2: #D3CCBC;       /* dividers that must show */
  --line-field: #8C8577;   /* field borders: 3:1 on every surface */
  --dot: rgba(28, 27, 23, .09);
  --hatch: rgba(28, 27, 23, .05);

  /* Ink */
  --ink-1: #1C1B17;
  --ink-2: #4A463E;
  --ink-3: #6A6559;
  --ink-4: #A39D90;        /* never for text that must be read */
  --ink-inverse: #FBFAF6;

  /* Signal (vermilion) */
  --accent: #DE5A2C;       /* marks, dots, rules */
  --accent-ink: #B23D16;   /* text and focus */
  --accent-fill: #C8471B;  /* primary buttons, with white text */
  --accent-fill-hover: #B33E15;
  --accent-on: #FFFFFF;
  --accent-wash: #FBE6DB;
  --accent-wash-2: #F6D3C2;
  --focus: #B23D16;

  /* Status: always with an icon and a word */
  --ok: #2B6E3F;    --ok-wash: #E3EFE5;
  --warn: #8A5A00;  --warn-wash: #F7EBD0;
  --bad: #B3261E;   --bad-wash: #F8E1DD;
  --info: #2F5FB3;  --info-wash: #E3EAF7;

  /* Chat */
  --bubble-me: #F9DDCD;
  --bubble-me-ink: #1C1B17;
  --bubble-maya: #FFFFFF;
  --bubble-meta: #5E594F;
  --chat-bed: #F1EDE3;

  /* Data: eight categorical slots, fixed order (validated: adjacent CVD ΔE ≥ 9, normal ≥ 15) */
  --c1: #2d6fcd; --c2: #de602f; --c3: #00a089; --c4: #dfa11a;
  --c5: #c65b93; --c6: #428731; --c7: #7152c4; --c8: #cc323e;
  --c-neutral: #9A9384;
  --grid: #E8E3D8;
  --axis: #C9C2B2;

  /* Elevation */
  --shadow-1: 0 1px 0 rgba(28, 27, 23, .04), 0 1px 2px rgba(28, 27, 23, .06);
  --shadow-2: 0 1px 0 rgba(28, 27, 23, .03), 0 10px 30px -14px rgba(52, 38, 20, .28), 0 2px 6px -2px rgba(52, 38, 20, .10);
  --shadow-3: 0 24px 60px -20px rgba(52, 38, 20, .38), 0 6px 16px -6px rgba(52, 38, 20, .16);
  --ring-inset: inset 0 0 0 1px rgba(28, 27, 23, .06);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper-0: #12110E; --paper-1: #1A1915; --paper-2: #23211C; --paper-sunk: #0D0C0A;
    --paper-hover: rgba(238, 233, 221, .055); --paper-press: rgba(238, 233, 221, .1);
    --line-1: #2B2923; --line-2: #3B3830; --line-field: #77705F;
    --dot: rgba(238, 233, 221, .07); --hatch: rgba(238, 233, 221, .035);
    --ink-1: #EEE9DD; --ink-2: #C4BEB0; --ink-3: #9A9486; --ink-4: #5F5A50; --ink-inverse: #12110E;
    --accent: #FF7246; --accent-ink: #FF8D66; --accent-fill: #FF7246; --accent-fill-hover: #FF8A63; --accent-on: #1A0D07;
    --accent-wash: #3A1E14; --accent-wash-2: #4E2717; --focus: #FF8D66;
    --ok: #7BD39A; --ok-wash: #16301F; --warn: #F0BC5C; --warn-wash: #3A2C10;
    --bad: #FF8A80; --bad-wash: #3D1714; --info: #8DB4FF; --info-wash: #172540;
    --bubble-me: #47271A; --bubble-me-ink: #EEE9DD; --bubble-maya: #23211C; --bubble-meta: #ABA595; --chat-bed: #151410;
    --c1: #427fd8; --c2: #d35d31; --c3: #039580; --c4: #be8700;
    --c5: #c0558d; --c6: #478638; --c7: #8974d3; --c8: #d95256;
    --c-neutral: #6F695D; --grid: #26241F; --axis: #3B3830;
    --shadow-1: 0 1px 0 rgba(0, 0, 0, .3);
    --shadow-2: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 12px 32px -14px rgba(0, 0, 0, .7);
    --shadow-3: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 28px 70px -20px rgba(0, 0, 0, .85);
    --ring-inset: inset 0 0 0 1px rgba(238, 233, 221, .06);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper-0: #12110E; --paper-1: #1A1915; --paper-2: #23211C; --paper-sunk: #0D0C0A;
  --paper-hover: rgba(238, 233, 221, .055); --paper-press: rgba(238, 233, 221, .1);
  --line-1: #2B2923; --line-2: #3B3830; --line-field: #77705F;
  --dot: rgba(238, 233, 221, .07); --hatch: rgba(238, 233, 221, .035);
  --ink-1: #EEE9DD; --ink-2: #C4BEB0; --ink-3: #9A9486; --ink-4: #5F5A50; --ink-inverse: #12110E;
  --accent: #FF7246; --accent-ink: #FF8D66; --accent-fill: #FF7246; --accent-fill-hover: #FF8A63; --accent-on: #1A0D07;
  --accent-wash: #3A1E14; --accent-wash-2: #4E2717; --focus: #FF8D66;
  --ok: #7BD39A; --ok-wash: #16301F; --warn: #F0BC5C; --warn-wash: #3A2C10;
  --bad: #FF8A80; --bad-wash: #3D1714; --info: #8DB4FF; --info-wash: #172540;
  --bubble-me: #47271A; --bubble-me-ink: #EEE9DD; --bubble-maya: #23211C; --bubble-meta: #ABA595; --chat-bed: #151410;
  --c1: #427fd8; --c2: #d35d31; --c3: #039580; --c4: #be8700;
  --c5: #c0558d; --c6: #478638; --c7: #8974d3; --c8: #d95256;
  --c-neutral: #6F695D; --grid: #26241F; --axis: #3B3830;
  --shadow-1: 0 1px 0 rgba(0, 0, 0, .3);
  --shadow-2: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 12px 32px -14px rgba(0, 0, 0, .7);
  --shadow-3: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 28px 70px -20px rgba(0, 0, 0, .85);
  --ring-inset: inset 0 0 0 1px rgba(238, 233, 221, .06);
}

@media (prefers-reduced-motion: reduce) {
  :root { --t-fast: 0ms; --t-med: 0ms; --t-slow: 0ms; }
}
