/* Castle of Todd — Dashboard V2 design tokens (DASH-V2-01A).
   Colour values mirror the live castleoftodd.co.uk stylesheet (read 2026-11-22).
   The Design Studio names colours only; these oklch values are the site's own derivation.
   Fonts: the approved families are declared first. No web-font download is made
   (local dashboard rule), so machines without them installed render the fallbacks. */

:root {
  color-scheme: dark;

  /* Site palette */
  --background: oklch(16% .008 80);
  --card: oklch(20% .008 80);
  --stone: oklch(24% .009 80);
  --muted: oklch(24% .009 80);
  --iron: oklch(12% .005 80);
  --leather: oklch(17% .018 65);
  --midnight: oklch(16% .013 255);
  --ivory: oklch(94% .02 85);
  --foreground: oklch(94% .02 85);
  --muted-foreground: oklch(73% .013 80);
  --gold: oklch(76% .09 80);
  --gold-soft: oklch(76% .09 80 / .35);
  --gold-faint: oklch(76% .09 80 / .12);
  --border: oklch(94% .02 85 / .12);
  --border-strong: oklch(94% .02 85 / .2);
  --destructive: oklch(60% .2 27);

  /* Institution hues (site) */
  --royal-purple: oklch(66% .115 304);
  --royal-blue: oklch(61% .09 257);
  --forest: oklch(66% .075 150);
  --institution-red: oklch(65% .15 27);
  --earth: oklch(65% .063 66);
  --logistics: oklch(72% .03 82);
  --graphite: oklch(73% .025 250);

  /* Status semantics (UI only; never the only carrier of meaning) */
  --status-live: oklch(72% .11 150);
  --status-partial: oklch(78% .1 80);
  --status-none: oklch(68% .015 80);
  --status-alert: oklch(68% .14 35);
  /* Chart tokens (01C.1). Series gold validated with the dataviz palette checks on the card surface:
     lightness band, chroma floor and >= 3:1 contrast all PASS. Grid and axis stay recessive. */
  --chart-series: oklch(66% .12 80);
  --chart-dim: oklch(73% .013 80 / .32);
  --chart-grid: oklch(94% .02 85 / .07);
  --chart-axis: oklch(94% .02 85 / .22);

  /* ANGLO-UX-COM-01 world map surfaces: a dark sea, muted land and outlines, and three strengths of recorded
     buyer presence. Layer marks reuse --gold, --forest and --royal-blue. */
  --map-sea: oklch(11% .012 250);
  --map-ocean: oklch(14.5% .018 245);
  --map-land: oklch(30% .016 78);
  --map-edge: oklch(57% .03 80);
  --map-graticule: oklch(78% .03 240 / .09);
  --map-hover: oklch(40% .035 80);
  --map-supplier: oklch(40% .06 150);
  --map-buyer-1: oklch(43% .062 78);
  --map-buyer-2: oklch(51% .078 78);
  --map-buyer-3: oklch(59% .09 78);

  /* ANGLO-UX-ESTATE-01 Florida survey chart: Gulf water, a coastal shelf, unrecorded county land, neighbouring land
     and survey lines. Recorded counties are shaded by mixing the chosen layer's existing hue into the land. */
  --fl-water: oklch(17% .028 200);
  --fl-shelf: oklch(55% .062 192 / .2);
  --fl-coast: oklch(74% .07 190);
  --fl-land: oklch(29% .018 130);
  --fl-edge: oklch(55% .028 130);
  --fl-context: oklch(22% .01 100);
  --fl-graticule: oklch(78% .05 195 / .1);

  /* ANGLO-GRAND-HALL-01 heraldic tinctures for the Seven Crowns' proposed banners (lore record, 27 Nov 2026).
     Fields are deep enough that the gold or silver charge on them stays above 3:1. Used only for heraldry;
     gold still marks current and primary. The hall scene adds a vault darkness and a hearth glow. */
  --tincture-sable: oklch(19% .012 80);
  --tincture-purpure: oklch(36% .12 304);
  --tincture-gules: oklch(39% .14 25);
  --tincture-steel: oklch(40% .065 245);
  --tincture-vert: oklch(37% .085 158);
  --tincture-teal: oklch(39% .07 205);
  --tincture-ivory: oklch(88% .03 85);
  --metal-or: oklch(80% .11 82);
  --metal-argent: oklch(88% .012 250);
  --metal-or-deep: oklch(52% .1 70);
  --hall-vault: oklch(11% .01 70);
  --hall-floor: oklch(17% .016 65);
  --hall-hearth: oklch(72% .14 62);

  /* Type */
  --font-serif: "Cormorant Garamond", "Cormorant", "EB Garamond", Garamond,
                "Palatino Linotype", "Book Antiqua", Palatino, Georgia, ui-serif, serif;
  --font-sans: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, "Helvetica Neue",
               Arial, sans-serif;
  --font-mono: "IBM Plex Mono", Consolas, "Cascadia Mono", ui-monospace, "Courier New", monospace;

  --text-xs: 0.72rem;
  --text-sm: 0.82rem;
  --text-base: 0.92rem;
  --text-md: 1.05rem;
  --text-lg: 1.35rem;
  --text-xl: 1.85rem;
  --text-2xl: 2.5rem;

  /* Space and shape */
  --gutter: 16px;
  --radius: 3px;
  --radius-lg: 6px;
  /* ANGLO-NAV-02B.6: rounded work surfaces (tickets, stage strips, opportunity cards) at the 10px the
     King's commission asks for. Existing panels keep --radius / --radius-lg. */
  --radius-card: 10px;
  --header-h: 60px;
  /* ANGLO-NAV-02B.4A: the striped sample ribbon is replaced by the header mode indicator.
     Kept at 0 so layouts that still add it to their offsets are unaffected. */
  --ribbon-h: 0px;
  --sidebar-w: 312px;
  --rail-w: 68px;

  /* ANGLO-NAV-02B.4A: one field surface for every input, select and textarea (between
     --iron and --background), replacing the mix of stone, card and browser-default greys. */
  --field-bg: oklch(14% .006 80);
  --field-border: oklch(94% .02 85 / .18);
  --menu-shadow: 0 18px 40px -16px oklch(0% 0 0 / .85);

  --shadow: 0 1px 0 oklch(100% 0 0 / .03) inset, 0 12px 30px -18px oklch(0% 0 0 / .8);
  --focus: 0 0 0 2px var(--background), 0 0 0 4px var(--gold);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --dur: 180ms;

  /* Default institution colour (overridden per theme) */
  --institution: var(--gold);
}

/* Institution themes — names and values as on the live site */
.theme-crown { --institution: var(--royal-purple); }
.theme-hand { --institution: var(--royal-blue); }
.theme-scout { --institution: var(--forest); }
.theme-outreach { --institution: var(--institution-red); }
.theme-war { --institution: oklch(76% .012 250); }
.theme-rookery { --institution: var(--ivory); }
.theme-builder { --institution: var(--earth); }
.theme-deal { --institution: oklch(68% .095 174); }
.theme-treasury { --institution: oklch(61% .105 151); }
.theme-quartermaster { --institution: var(--logistics); }
.theme-library { --institution: oklch(70% .16 295); }
.theme-architect { --institution: var(--graphite); }
.theme-infirmary { --institution: oklch(72% .12 25); }
/* Not on the site: Kane Farm Estate. Derived from the Studio's named estate palette
   (cream / ivory / gold / brown leather). Documented as a DASH-V2-01A design default. */
.theme-estate { --institution: oklch(82% .055 85); }
/* ANGLO-UX-01 venture identities. Each reuses an existing hue; gold still marks current and primary. */
.anglo-demo.theme-commodity { --institution: var(--earth); }
.anglo-demo.theme-property { --institution: var(--forest); }
.anglo-demo.theme-market { --institution: var(--royal-blue); }
.anglo-demo.theme-advisory { --institution: var(--royal-purple); }

@media (prefers-reduced-motion: reduce) {
  :root { --dur: 0ms; }
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
