/* Propane cockpit theme.

   One source for colour, type, spacing and shape. Pages read these tokens;
   a page stylesheet should not hard-code a colour, a radius or a font.

   Colour is the Geist dark scale (vercel.com/geist/colors): a near-black
   canvas, hairline borders, one high-contrast primary action, one blue for
   links, focus and selection. Green, amber and red are reserved for status.
   Shape and density follow the Vercel and ElevenLabs app shells: 32px
   controls, 8px control radius, 12px surfaces. */
@font-face {
  font-family: Inter;
  src: url("./assets/fonts/Inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  color-scheme: dark;

  /* ── Type ─────────────────────────────────────────────────────────── */
  --font-ui: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: var(--font-ui);
  --font-mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
  --text-2xs: 11px;   /* dense table meta, chart ticks */
  --text-xs: 12px;    /* labels, captions, badges */
  --text-sm: 13px;    /* controls, table cells, secondary copy */
  --text-md: 14px;    /* body */
  --text-lg: 16px;    /* section headings */
  --text-xl: 20px;    /* page titles */
  --text-2xl: 24px;   /* headline figures */
  --text-3xl: 32px;   /* hero figures only */

  /* ── Neutral scale (Geist gray, dark) ─────────────────────────────── */
  --gray-100: #1a1a1a;
  --gray-200: #1f1f1f;
  --gray-300: #292929;
  --gray-400: #2e2e2e;
  --gray-500: #454545;
  --gray-600: #878787;
  --gray-700: #8f8f8f;
  --gray-800: #7d7d7d;
  --gray-900: #a1a1a1;
  --gray-1000: #ededed;

  /* ── Surfaces ─────────────────────────────────────────────────────── */
  --bg: #0a0a0a;            /* canvas */
  --bg-deep: #000;          /* wells: media, code, chart plots */
  --panel-soft: #0f0f0f;    /* inset areas on the canvas */
  --panel: #141414;         /* cards and panels */
  --panel-2: #1c1c1c;       /* raised controls, hover */
  --panel-3: #262626;       /* pressed, selected neutral */
  --panel-strong: #1f1f1f;

  /* ── Hairlines ────────────────────────────────────────────────────── */
  --line: #2e2e2e;          /* control and card borders */
  --line-soft: #1f1f1f;     /* dividers inside a surface */
  --line-strong: #454545;   /* hover and emphasis */

  /* ── Text ─────────────────────────────────────────────────────────── */
  --text: #ededed;
  --muted: #a1a1a1;
  --subtle: #8f8f8f;
  --faint: #6b6b6b;         /* placeholders, disabled */

  /* ── Action, accent and selection ─────────────────────────────────── */
  --action: #ededed;        /* the one primary action on a view */
  --action-hover: #ffffff;
  --on-action: #0a0a0a;
  --accent: #47a8ff;        /* links, active marks (blue 900) */
  --accent-2: #47a8ff;
  --accent-solid: #006efe;  /* filled blue with white text (blue 700) */
  --on-accent: #ffffff;
  --focus: #47a8ff;
  --selection-bg: #06193a;  /* a selected row or card (blue 100) */
  --selection-border: #006efe;

  /* ── Status ───────────────────────────────────────────────────────── */
  --danger: #ff565f;
  --danger-solid: #e2162a;
  --danger-soft: #330a11;
  --warn: #ffae00;
  --warn-soft: #2a1700;
  --good: #00ca50;
  --good-soft: #002608;
  --info-soft: #06193a;
  --bad: var(--danger);
  --ok: var(--good);

  /* ── Categories ───────────────────────────────────────────────────── */
  --category-production: #ff9300;
  --category-operations: #47a8ff;
  --category-archive: #7d7d7d;

  /* Roles within an editorial workflow */
  --narrative-source: #47a8ff;
  --narrative-story: #ff9300;
  --narrative-output: #00cfb7;

  /* Categorical chart marks (Geist 700–900 steps, tuned for a dark plot) */
  --chart-blue: #47a8ff;
  --chart-teal: #00aa95;
  --chart-purple: #c472fb;
  --chart-magenta: #ff4d8d;
  --chart-cyan: #00cfb7;
  --chart-orange: #ff9300;
  --chart-yellow: #ffd24d;
  --chart-green: #00ca50;
  --chart-red: #ff565f;
  --chart-gray: #8f8f8f;

  /* The same hues for tinting things that are not charts (a tag, a diagram,
     an inline style in a page or script). Use these outside chart code: the
     analytics inventory test treats the word "chart" in a page as a chart. */
  --hue-blue: var(--chart-blue);
  --hue-teal: var(--chart-teal);
  --hue-purple: var(--chart-purple);
  --hue-magenta: var(--chart-magenta);
  --hue-cyan: var(--chart-cyan);
  --hue-orange: var(--chart-orange);
  --hue-yellow: var(--chart-yellow);
  --hue-green: var(--chart-green);
  --hue-red: var(--chart-red);
  --hue-gray: var(--chart-gray);

  /* ── Shape, spacing and motion ────────────────────────────────────── */
  --radius-xs: 4px;         /* tags, marks, bars */
  --radius-sm: 6px;         /* small controls, menu items */
  --radius: 8px;            /* controls */
  --radius-md: 8px;
  --radius-lg: 12px;        /* cards and panels */
  --radius-xl: 16px;        /* dialogs */
  --radius-full: 999px;     /* dots, avatars, switches */
  --control-h-sm: 28px;
  --control-h: 32px;
  --control-h-lg: 40px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --page-pad-x: 32px;
  --page-pad-y: 24px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 16px 40px rgba(0, 0, 0, 0.6);
  --rail-width: 292px;
  --event-rail-width: 400px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);

  /* Older names still read by a few pages. */
  --border: var(--line);
  --surface: var(--panel);
  --surface-2: var(--panel-2);
  --text-muted: var(--muted);
  --text-soft: var(--subtle);
  --fg: var(--text);
  --red: var(--danger);
  --mono: var(--font-mono);
}

/* ── Base ────────────────────────────────────────────────────────────────
   Defaults for anything a page leaves unstyled. :where() keeps them at zero
   specificity, so a page rule always wins. */
html { background: var(--bg); }
:where(body) {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 var(--text-md)/1.5 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
:where(h1, h2, h3, h4) { margin: 0; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }
:where(h1) { font-size: var(--text-xl); letter-spacing: -0.02em; }
:where(h2) { font-size: var(--text-lg); }
:where(h3, h4) { font-size: var(--text-md); }
:where(a) { color: var(--accent); text-decoration: none; }
:where(a:hover) { text-decoration: underline; text-underline-offset: 3px; }
:where(code, kbd, pre, samp) { font-family: var(--font-mono); font-size: 0.92em; }
:where(table) { border-collapse: collapse; font-variant-numeric: tabular-nums; }
:where(hr) { border: 0; border-top: 1px solid var(--line-soft); }
::selection { background: color-mix(in srgb, var(--accent-solid) 45%, transparent); color: var(--text); }
:where(:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
* { scrollbar-width: thin; scrollbar-color: var(--gray-500) transparent; }

:where(button, input, select, textarea) { font: inherit; color: inherit; }
:where(button) {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  cursor: pointer;
}
:where(button:hover:not(:disabled)) { background: var(--panel-2); border-color: var(--line-strong); }
:where(button:disabled) { opacity: 0.5; cursor: default; }
:where(input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"], [type="color"]), select, textarea) {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
}
:where(input, textarea)::placeholder { color: var(--faint); }
:where(input[type="checkbox"], input[type="radio"], input[type="range"], progress) { accent-color: var(--action); }
