/* k0bayashi.com shared theme contract (11/11/2026, extended 15/11/2026). Served at https://k0bayashi.com/themes.css and loaded by
   every site (dash, Plant Life, agent hub, SierraCam). The chosen theme is <html data-kb-theme="tron|field|garden">, set before first
   paint by kb-theme.js (kb_theme cookie on Domain=k0bayashi.com, then localStorage "kb-theme"). Each site maps its own variables to
   these --kb-* tokens; a site with no choice yet uses its own default look (dash: tron, Plant Life: garden).

   CONTRACT. A theme pack defines every token below under [data-kb-theme="<id>"]. Sites read tokens only (never theme literals),
   so a new theme = one block here + an entry in kb-theme.js (+ optional component slots in the dash, web/src/theme/).
   Values in [] are what the existing three themes use; existing names never change meaning (other sites depend on them).
   Colour
     surfaces    --kb-bg --kb-surface --kb-surface-2
     ink         --kb-ink --kb-muted --kb-line --kb-accent --kb-accent-ink (text on accent)
     status      --kb-good (= ok, kept for older sites) --kb-ok --kb-warn --kb-bad --kb-info: fills, dots, bars, borders, tints
                 --kb-ok-text --kb-warn-text --kb-bad-text: the same status as text on the page surface (Tron uses a lighter shade)
     weather     --kb-rain --kb-snow --kb-snow-text --kb-cold --kb-hot --kb-sun
     warnings    --kb-alert-yellow --kb-alert-orange --kb-alert-red (official MeteoAlarm-style levels)
     charts      --kb-chart-1 .. --kb-chart-6 (categorical series, in order)
   Type          --kb-font-display --kb-font-body --kb-font-mono; --kb-case-display (uppercase|none) and --kb-tracking-display
                 (letter-spacing) for headings; --kb-text-2xs (smallest text size, never under 11px)
   Shape         --kb-radius --kb-border-w --kb-shadow (panel shadow) --kb-glow (1 = neon glows on, 0 = off)
   Density       --kb-space-unit (the dash's spacing step; Tailwind --spacing)
   Motion        --kb-dur-fast --kb-dur-base --kb-dur-slow --kb-ease; --kb-ambient (1 = background animation on, 0 = still)
   Icon          --kb-icon-stroke (stroke width for line icons)
   Texture       --kb-texture: background layers drawn over --kb-bg (a CSS background-image list, or none) */

:root[data-kb-theme="tron"], [data-kb-theme="tron"] {
  /* Softer Tron (15/11/2026, owner: "too contrast heavy"): deep navy instead of black, off-white ink with a cyan tint, lifted muted
     text, a less saturated cyan, quieter lines, glow at half strength (--kb-glow 0.5 scales every glow). Ratios on --kb-surface:
     ink 12.1:1, muted 7.3:1, accent 9.0:1, ok/warn/bad text 9.4/10.1/7.1:1. */
  --kb-bg: oklch(0.2 0.045 254); --kb-surface: oklch(0.235 0.045 252); --kb-surface-2: oklch(0.27 0.045 244);
  --kb-ink: oklch(0.89 0.03 205); --kb-muted: oklch(0.74 0.035 220); --kb-line: oklch(0.41 0.06 215);
  --kb-accent: oklch(0.79 0.115 202); --kb-accent-ink: oklch(0.2 0.045 254);
  --kb-good: oklch(0.74 0.14 155); --kb-warn: oklch(0.8 0.12 85); --kb-bad: oklch(0.68 0.16 25); --kb-info: oklch(0.79 0.115 202);
  --kb-snow: oklch(0.84 0.06 275); --kb-rain: oklch(0.8 0.09 230);
  --kb-font-display: "Orbitron", "Rajdhani", sans-serif; --kb-font-body: "Rajdhani", -apple-system, system-ui, sans-serif; --kb-font-mono: "Geist Mono Variable", ui-monospace, monospace;
  --kb-radius: 4px; --kb-shadow: 0 0 16px oklch(0.79 0.115 202 / 0.12); --kb-glow: 0.5;
  --kb-ok: oklch(0.74 0.14 155); --kb-ok-text: oklch(0.8 0.13 155); --kb-warn-text: oklch(0.84 0.12 85); --kb-bad-text: oklch(0.75 0.13 25);
  --kb-snow-text: oklch(0.9 0.04 275); --kb-cold: oklch(0.84 0.06 275); --kb-hot: oklch(0.85 0.13 90); --kb-sun: oklch(0.88 0.14 98);
  --kb-alert-yellow: oklch(0.88 0.15 98); --kb-alert-orange: oklch(0.76 0.15 56); --kb-alert-red: oklch(0.72 0.16 24);
  --kb-chart-1: oklch(0.79 0.115 202); --kb-chart-2: oklch(0.68 0.11 225); --kb-chart-3: oklch(0.74 0.09 180); --kb-chart-4: oklch(0.64 0.13 205); --kb-chart-5: oklch(0.84 0.07 195); --kb-chart-6: oklch(0.74 0.11 300);
  --kb-case-display: uppercase; --kb-tracking-display: 0.05em; --kb-text-2xs: 0.6875rem;
  --kb-border-w: 1px; --kb-space-unit: 0.25rem;
  /* Tron motion: fast and snappy (page wipe, panels boot in), a slow grid drift when --kb-ambient is 1. */
  --kb-dur-fast: 140ms; --kb-dur-base: 260ms; --kb-dur-slow: 900ms; --kb-ease: cubic-bezier(0.2, 0.8, 0.2, 1); --kb-ambient: 1;
  --kb-icon-stroke: 1.6;
  --kb-texture: radial-gradient(ellipse 80% 45% at 50% -10%, color-mix(in oklch, var(--kb-accent) 9%, transparent), transparent 70%),
    linear-gradient(color-mix(in oklch, var(--kb-accent) 4.5%, transparent) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, color-mix(in oklch, var(--kb-accent) 4.5%, transparent) 1px, transparent 1px) 0 0 / 40px 40px;
  color-scheme: dark;
}

/* Field = submarine control room / army field kit (V3, 15/11/2026, owner: "think military / army / submarine"; flat and matte, no
   gradients): dark steel ground, olive-drab panels, pale khaki ink, signal amber accent, safety red, dull green status lamp.
   Ratios on --kb-surface (on --kb-bg): ink 11.3 (14.0), muted 7.1 (8.9), amber 7.4 (9.2), ok/warn/bad text 7.9/8.6/5.8
   (9.8/10.6/7.2), rain 7.3, snow text 11.3, alert red 5.3:1; --kb-line 3.2:1 on surface. Type: Barlow Condensed (labels/headings),
   Barlow (body), IBM Plex Mono (readouts), Allerta Stencil (section labels only), from Google Fonts via kb-theme.js. */
:root[data-kb-theme="field"], [data-kb-theme="field"] {
  --kb-bg: oklch(0.21 0.01 145); --kb-surface: oklch(0.285 0.035 118); --kb-surface-2: oklch(0.33 0.035 115);
  --kb-ink: oklch(0.92 0.03 95); --kb-muted: oklch(0.78 0.035 95); --kb-line: oklch(0.57 0.035 110);
  --kb-accent: oklch(0.8 0.15 70); --kb-accent-ink: oklch(0.2 0.01 145);
  --kb-good: oklch(0.72 0.12 140); --kb-warn: oklch(0.8 0.15 70); --kb-bad: oklch(0.62 0.2 27); --kb-info: oklch(0.77 0.06 230);
  --kb-snow: oklch(0.9 0.015 240); --kb-rain: oklch(0.78 0.07 225);
  --kb-font-display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif; --kb-font-body: "Barlow", "Segoe UI", system-ui, sans-serif; --kb-font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --kb-radius: 2px;
  --kb-shadow: none;
  --kb-glow: 0;
  --kb-ok: oklch(0.72 0.12 140); --kb-ok-text: oklch(0.8 0.11 140); --kb-warn-text: oklch(0.84 0.14 75); --kb-bad-text: oklch(0.74 0.15 27);
  --kb-snow-text: oklch(0.92 0.015 240); --kb-cold: oklch(0.83 0.05 240); --kb-hot: oklch(0.77 0.14 55); --kb-sun: oklch(0.86 0.14 92);
  --kb-alert-yellow: oklch(0.87 0.15 95); --kb-alert-orange: oklch(0.77 0.15 58); --kb-alert-red: oklch(0.72 0.17 27);
  --kb-chart-1: oklch(0.8 0.15 70); --kb-chart-2: oklch(0.72 0.12 140); --kb-chart-3: oklch(0.77 0.06 230); --kb-chart-4: oklch(0.74 0.15 27); --kb-chart-5: oklch(0.82 0.04 95); --kb-chart-6: oklch(0.7 0.08 180);
  --kb-case-display: uppercase; --kb-tracking-display: 0.06em; --kb-text-2xs: 0.6875rem;
  --kb-border-w: 1px; --kb-space-unit: 0.25rem;
  /* Field motion: crisp and mechanical (shutter page wipe, panels slide and snap, needles settle fast); no ambient. */
  --kb-dur-fast: 120ms; --kb-dur-base: 200ms; --kb-dur-slow: 450ms; --kb-ease: cubic-bezier(0.2, 0.7, 0.2, 1); --kb-ambient: 0;
  --kb-icon-stroke: 1.75;
  --kb-texture: none;
  color-scheme: dark;
}

/* Garden = botanical plate / herbarium (15/11/2026, owner: "heavily lean into the flora/plant theme"). The light theme: laid cream
   paper, ink-brown text, sage to deep-leaf greens, small flower accents (dusty rose, ochre pollen). Plant Life's big sister: same body
   and mono type, Plant Life keeps its own colours (it does not read these tokens in Garden). Status: ok = leaf, warn = ochre pollen,
   bad = berry/rust, rain = blue-green water, snow = frost blue-grey. Ratios on --kb-surface (on --kb-bg): ink 14.1 (12.9),
   muted 6.8 (6.2), accent 6.1 (5.6), accent-ink on accent 6.1, ok/warn/bad text 5.5/5.6/6.2 (5.0/5.1/5.7), rain 5.4 (4.9),
   snow text 5.7 (5.2), sun 5.3 (4.8), alert y/o/r 5.5/5.3/6.2; --kb-line 3.6 (3.3):1. Type: Fraunces (botanical serif headings),
   Atkinson Hyperlegible (body), IBM Plex Mono (numbers), from Google Fonts via kb-theme.js (Big Shoulders stays in that list for
   Plant Life). Motion: slow and soft (unfurl page switch, panels grow in, vines draw in, a frond sways when --kb-ambient is 1). */
:root[data-kb-theme="garden"], [data-kb-theme="garden"] {
  --kb-bg: #F2EEE1; --kb-surface: #FBF8EF; --kb-surface-2: #E9E3D1;
  --kb-ink: #2E2619; --kb-muted: #5F5644; --kb-line: #8C8366;
  --kb-accent: #2F6A3E; --kb-accent-ink: #FBF8EF;
  --kb-good: #36723B; --kb-warn: #A77612; --kb-bad: #A23A30; --kb-info: #1F6B75;
  --kb-snow: #536D86; --kb-rain: #1F6B75;
  --kb-font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif; --kb-font-body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif; --kb-font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --kb-radius: 6px; --kb-shadow: 0 1px 1px rgb(46 38 25 / .06), 0 2px 4px rgb(46 38 25 / .05), 0 10px 24px -8px rgb(60 70 40 / .16); --kb-glow: 0;
  --kb-ok: #36723B; --kb-ok-text: #36723B; --kb-warn-text: #875C0B; --kb-bad-text: #A23A30;
  --kb-snow-text: #4C657E; --kb-cold: #536D86; --kb-hot: #A4501D; --kb-sun: #876109;
  --kb-alert-yellow: #7A6200; --kb-alert-orange: #A84E17; --kb-alert-red: #A23A30;
  --kb-chart-1: #2F6A3E; --kb-chart-2: #9E5670; --kb-chart-3: #A77612; --kb-chart-4: #1F6B75; --kb-chart-5: #587449; --kb-chart-6: #7A5A8A;
  --kb-case-display: none; --kb-tracking-display: 0; --kb-text-2xs: 0.6875rem;
  --kb-border-w: 1px; --kb-space-unit: 0.25rem;
  /* Garden motion: slow, soft, organic (no overshoot). */
  --kb-dur-fast: 200ms; --kb-dur-base: 560ms; --kb-dur-slow: 1600ms; --kb-ease: cubic-bezier(0.22, 0.61, 0.36, 1); --kb-ambient: 1;
  --kb-icon-stroke: 1.4;
  /* laid paper (fine horizontal laid lines, wide vertical chain lines) under two faint watercolour washes: sage top-left, rose
     bottom-right. Gradients only (CSP img-src 'self'). */
  --kb-texture: radial-gradient(ellipse 55% 40% at 6% 0%, rgb(120 150 95 / .13), transparent 70%),
    radial-gradient(ellipse 45% 35% at 100% 100%, rgb(176 96 122 / .07), transparent 70%),
    radial-gradient(ellipse 40% 30% at 85% 12%, rgb(200 160 60 / .05), transparent 70%),
    repeating-linear-gradient(0deg, rgb(90 75 45 / .028) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, transparent 0 63px, rgb(90 75 45 / .035) 63px 64px);
  color-scheme: light;
}
/* Garden at night (system dark): a dark herbarium folio. Moss-black paper, cream ink, pale sage accent, the same flower accents
   lifted. Ratios on --kb-surface (on --kb-bg): ink 13.2 (14.5), muted 7.2 (8.0), accent 9.4 (10.3), ok/warn/bad text 8.4/8.7/6.9,
   rain 8.0, snow text 9.4, sun 9.6, alert y/o/r 9.8/7.7/6.9; --kb-line 3.5 (3.9):1. */
@media (prefers-color-scheme: dark) {
  :root[data-kb-theme="garden"], [data-kb-theme="garden"] {
    --kb-bg: #13160F; --kb-surface: #1C2017; --kb-surface-2: #171B13;
    --kb-ink: #ECE5D2; --kb-muted: #B3AB93; --kb-line: #727660;
    --kb-accent: #A3CF8E; --kb-accent-ink: #13160F;
    --kb-good: #8FC77C; --kb-warn: #E2B657; --kb-bad: #EC8E7C; --kb-info: #72C2C0;
    --kb-snow: #B4C5D8; --kb-rain: #72C2C0;
    --kb-ok: #8FC77C; --kb-ok-text: #8FC77C; --kb-warn-text: #E2B657; --kb-bad-text: #EC8E7C;
    --kb-snow-text: #B4C5D8; --kb-cold: #B4C5D8; --kb-hot: #E99A66; --kb-sun: #E5C25A;
    --kb-alert-yellow: #E1C653; --kb-alert-orange: #EBA061; --kb-alert-red: #EC8E7C;
    --kb-chart-1: #A3CF8E; --kb-chart-2: #E0A0B4; --kb-chart-3: #E2B657; --kb-chart-4: #72C2C0; --kb-chart-5: #A9C08F; --kb-chart-6: #C3A6D6;
    --kb-shadow: 0 1px 2px rgb(0 0 0 / .45), 0 10px 24px -8px rgb(0 0 0 / .5);
    --kb-texture: radial-gradient(ellipse 55% 40% at 6% 0%, rgb(140 190 110 / .08), transparent 70%),
      radial-gradient(ellipse 45% 35% at 100% 100%, rgb(224 160 180 / .05), transparent 70%),
      repeating-linear-gradient(0deg, rgb(236 229 210 / .018) 0 1px, transparent 1px 3px),
      repeating-linear-gradient(90deg, transparent 0 63px, rgb(236 229 210 / .025) 63px 64px);
    color-scheme: dark;
  }
}
