/* hotpatch.ai — hardcoded theme. Mistral direction: warm white ground, near-black
   text, the yellow→orange→vermilion ramp as the only chromatic voice. Shape and
   treatment follow pluginsec.ai — rounded cards, soft shadows, a radial glow
   ground. There is no theme switcher and no user choice. */

:root {
  /* ── seed ──────────────────────────────────────────────────────────── */
  --bg: #ffffff;
  --surface: #faf8f5;
  --surface-2: #f2efea;
  --border: #e7e2da;
  --text: #141210;
  --text-muted: #6b6459;
  --text-subtle: #918a7e;

  --primary: #fa520f;
  --primary-hover: #cc3a05;
  --primary-pressed: #cc3a05;
  --on-primary: #ffffff;

  --success: #1a7f37;
  --warning: #bb6a00;
  --danger: #d1242f;
  --info: #fa520f;

  /* ── the ramp: Mistral's signature, mapped onto the stage machine ──── */
  --ramp-1: #ffc53d;   /* observe — logging only */
  --ramp-2: #ff8a00;   /* canary  — narrowed scope */
  --ramp-3: #fa520f;   /* block   — dropping traffic */
  --ramp-4: #d93a00;   /* the far end of the ramp; used in the section rule */

  /* One dark band per page, as the contrast anchor. */
  --ink-band: #141210;
  --on-band: #f6f3ef;

  /* ── type ──────────────────────────────────────────────────────────── */
  /* Latin faces are self-hosted (see site.css @font-face); CJK falls through to
     the system so we do not ship a multi-megabyte font for it. */
  --font-sans: "Archivo", ui-sans-serif, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono",
               Menlo, Consolas, "PingFang SC", monospace;

  /* ── shape ─────────────────────────────────────────────────────────── */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --border-weight: 1px;
  --shadow-sm: 0 1px 2px rgba(20, 18, 16, .06);
  --shadow-md: 0 4px 12px rgba(20, 18, 16, .10);
  --shadow-lg: 0 12px 32px rgba(20, 18, 16, .14);

  /* ── structure (was supplied by the retired structure kit) ─────────── */
  --nav-w: 220px;
  --header-h: 56px;
  --row-h: 40px;
  --control-h: 36px;
  --content-pad: 24px;
  --content-max: 1080px;

  /* ── spacing scale (charter §13) ───────────────────────────────────── */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px;
  --s5: 24px; --s6: 40px; --s7: 64px;

  /* ── derived depth layer — from seed tokens, do not hand-edit ──────── */
  --surface-hover: color-mix(in oklab, var(--text) 5%, var(--surface));
  --surface-active: color-mix(in oklab, var(--text) 9%, var(--surface));
  --surface-selected: color-mix(in oklab, var(--primary) 10%, var(--surface));
  --border-subtle: color-mix(in oklab, var(--border) 55%, var(--bg));
  --border-strong: color-mix(in oklab, var(--border) 55%, var(--text));
  --primary-subtle: color-mix(in oklab, var(--primary) 12%, var(--bg));
  --primary-border: color-mix(in oklab, var(--primary) 38%, var(--bg));
  --success-subtle: color-mix(in oklab, var(--success) 12%, var(--bg));
  --success-border: color-mix(in oklab, var(--success) 38%, var(--bg));
  --warning-subtle: color-mix(in oklab, var(--warning) 12%, var(--bg));
  --warning-border: color-mix(in oklab, var(--warning) 38%, var(--bg));
  --danger-subtle: color-mix(in oklab, var(--danger) 12%, var(--bg));
  --danger-border: color-mix(in oklab, var(--danger) 38%, var(--bg));
  --info-subtle: var(--primary-subtle);
  --info-border: var(--primary-border);
  --focus-ring: color-mix(in oklab, var(--primary) 45%, transparent);
  --overlay: color-mix(in srgb, #000 45%, transparent);
}

/* Keyboard focus is visible everywhere. The retired kit defined --focus-ring
   and never consumed it. */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

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