/* Modernist — design-system tokens and component classes. This file is the source of truth for the system's look; retune it here and see readme.md. */
@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;600;800&display=swap');

/* Palette v3, 2026-08-17 (direct instruction, same evening as v2 above --
   v2's Tailwind blue/teal is superseded, not this comment block's history)
   -- a custom periwinkle-blue-violet primary + aquamarine-teal secondary,
   from a real reference swatch the user supplied live in a browser
   preview session ("this could be good to mimic": #6076BE / #60A5BE /
   #60BEA8, a teal-green-to-blue-violet gradient triad). #6076BE anchors
   --color-accent, #60BEA8 anchors --color-accent-2 -- the middle swatch
   (#60A5BE) wasn't adopted as a third token; two accents was already the
   system's shape, and the two end colors alone read as a coherent family
   without it. Full 100-900 ramps generated from each anchor by a fixed
   lightness/saturation offset curve (not Tailwind's own curve -- tried
   first, broke down at the light end for these particular anchors,
   overflowing step 100 to pure white; a controlled offset curve keeping
   saturation roughly constant was more robust), verified live in a real
   browser (homepage hero, demo.html's search UI) before being locked in.
   Slate canvas/text is unchanged from v2. --color-accent/--color-accent-2
   still deliberately IDENTICAL in both modes where dark mode is re-enabled
   (see the commented-out dark-mode block below) -- only the ground and ink
   change there. --color-neutral-* does NOT stay fixed between modes -- see
   that block's own comment for why. */
:root {
  --color-bg: #f8fafc;
  --color-surface: #f1f5f9;
  --color-text: #0f172a;
  --color-accent: #6076be;
  --color-accent-2: #60bea8;
  --color-divider: color-mix(in srgb, #0f172a 40%, transparent);

  /* Fixed white in both modes -- NOT derived from --color-bg (which
     flips dark), specifically so text on a filled --color-accent button
     stays legible in dark mode too. Added alongside this palette change;
     see the .btn-primary / .seg-opt:has(input:checked) fixes below. */
  --color-on-accent: #ffffff;

  /* Tonal ramps -- Tailwind's own slate scale, chosen to read coherently
     with the new cool-gray bg/text (the old warm-gray neutral ramp would
     have clashed against it). */
  --color-neutral-100: #f1f5f9;
  --color-neutral-200: #e2e8f0;
  --color-neutral-300: #cbd5e1;
  --color-neutral-400: #94a3b8;
  --color-neutral-500: #64748b;
  --color-neutral-600: #475569;
  --color-neutral-700: #334155;
  --color-neutral-800: #1e293b;
  --color-neutral-900: #0f172a;

  /* Periwinkle-blue-violet ramp, anchored on #6076BE -- see palette v3
     comment above. */
  --color-accent-100: #e1e6f4;
  --color-accent-200: #c7d0ea;
  --color-accent-300: #a7b4dd;
  --color-accent-400: #8395ce;
  --color-accent-500: #6076be;
  --color-accent-600: #465daa;
  --color-accent-700: #3c5090;
  --color-accent-800: #34447a;
  --color-accent-900: #2c3963;

  /* Aquamarine-teal ramp, anchored on #60BEA8 -- see palette v3 comment
     above. */
  --color-accent-2-100: #e1f4f0;
  --color-accent-2-200: #c7eae2;
  --color-accent-2-300: #a7ddd0;
  --color-accent-2-400: #83cebc;
  --color-accent-2-500: #60bea8;
  --color-accent-2-600: #46aa93;
  --color-accent-2-700: #3c907c;
  --color-accent-2-800: #347a69;
  --color-accent-2-900: #2c6356;

  --font-heading: "Archivo", system-ui, sans-serif;
  --font-heading-weight: 800;
  --font-body: "Archivo", system-ui, sans-serif;

  --space-1: 4.0px;
  --space-2: 8.0px;
  --space-3: 12.0px;
  --space-4: 16.0px;
  --space-6: 24.0px;
  --space-8: 32.0px;

  --radius-sm: 0px;
  --radius-md: 0px;
  --radius-lg: 0px;

  /* Elevation — derived from the ground: soft ink-tinted shadows on a
     light theme, a hairline edge + ambient darkness on a dark one. */
  --shadow-sm: 0 1px 2px color-mix(in srgb, #0f172a 14%, transparent);
  --shadow-md: 0 3px 10px color-mix(in srgb, #0f172a 16%, transparent);
  --shadow-lg: 0 12px 32px color-mix(in srgb, #0f172a 22%, transparent);
}

/* Dark mode -- built 2026-08-17, REVERTED same day (direct instruction:
   "let's just default back to a single color mode"). Real reason, not a
   change of heart on dark mode itself: explorer.html -- a 269KB
   single-line bundled export with its own fully embedded old-palette
   hex literals, no shared stylesheet, no reachable CSS hook -- can't be
   made dark-mode-aware without a large, risky rewrite (flagged as its
   own scoped follow-up, not attempted here). Auto-switching everywhere
   else while Explorer stays permanently light would mean a dark-mode
   visitor gets a jarring flash to white the moment they click into it --
   worse than no dark mode at all. Single light mode, site-wide, until
   Explorer's own fix is done for real. The values themselves are kept
   below, commented out rather than deleted, so re-enabling this later
   is a one-line uncomment, not a rebuild -- the earlier
   contrast/legibility work here (neutral-ramp mirroring in particular)
   was real and shouldn't have to be re-derived.

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #0f172a;
    --color-surface: color-mix(in srgb, #0f172a 90%, white);
    --color-text: #f8fafc;
    --color-divider: color-mix(in srgb, #f8fafc 18%, transparent);
    --color-neutral-100: #0f172a;
    --color-neutral-200: #1e293b;
    --color-neutral-300: #334155;
    --color-neutral-400: #475569;
    --color-neutral-500: #64748b;
    --color-neutral-600: #94a3b8;
    --color-neutral-700: #cbd5e1;
    --color-neutral-800: #e2e8f0;
    --color-neutral-900: #f1f5f9;
    --shadow-sm: 0 1px 2px color-mix(in srgb, #000000 30%, transparent);
    --shadow-md: 0 3px 10px color-mix(in srgb, #000000 36%, transparent);
    --shadow-lg: 0 12px 32px color-mix(in srgb, #000000 45%, transparent);
  }
}
*/

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
}
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: var(--font-heading-weight); }

.grayscale{filter:grayscale(1) contrast(1.08)}

/* .theme-light-only/.theme-dark-only (2026-08-17, light/dark logo-asset
   swap for the footer's "Runs on" row) removed same day, alongside the
   dark-mode block above -- single light mode has no second variant to
   swap to. The dark-mode logo assets themselves (brand/partners/
   *-logo-dark.*) are left on disk, unreferenced, not deleted -- cheap to
   keep for whenever dark mode comes back for real. */

/* ══════════════════════════════════════════════════════════════════════════
   Components — built with the tokens above. Plain CSS
   on plain HTML: no JavaScript, no build step. Each class is documented in
   readme.md and demonstrated in foundations/ and components/.
   ══════════════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-size: 15px; line-height: 1.55; font-weight: 400; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 var(--space-2);
}
h1 { font-size: 42px; }
h2 { font-size: 32px; }
h3 { font-size: 25px; }
h4 { font-size: 20px; }
h5 { font-size: 16px; }
h6 { font-size: 13px; }
h6 { letter-spacing: 0.08em; text-transform: uppercase; }
p { margin: 0 0 var(--space-3); }
a { color: var(--color-accent); text-underline-offset: 3px; }
img { display: block; max-width: 100%; }
figure { margin: 0; }
figcaption {
  font-size: 11px; margin-top: var(--space-1);
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
}
.text-muted { color: color-mix(in srgb, var(--color-text) 55%, transparent); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }

/* — rules — */
.hr {
  height: 2px; border: 0; margin: var(--space-4) 0;
  background: var(--color-divider);
}

/* — buttons — */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; text-decoration: none;
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 14px; line-height: 1.2; color: var(--color-text); /* matches the .input's 14px —
     the pair sits side by side in sign-up rows */
  background: transparent; border: 1px solid transparent;
  padding: var(--space-2) calc(var(--space-3) * 1.2);
  border-radius: var(--radius-md);
}
.btn svg { display: block; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--color-accent); color: var(--color-on-accent); }
.btn-primary:hover { background: var(--color-accent-600); }
.btn-primary:active { background: var(--color-accent-700); }
.btn-secondary { border-color: var(--color-divider); }
.btn-secondary:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }
.btn-secondary:active { background: color-mix(in srgb, var(--color-text) 14%, transparent); }
.btn-ghost { color: var(--color-accent); padding-inline: var(--space-1); }
.btn-ghost:hover { background: color-mix(in srgb, var(--color-accent) 10%, transparent); }
.btn-ghost:active { background: color-mix(in srgb, var(--color-accent) 18%, transparent); }
.btn-icon { width: 36px; height: 36px; padding: 0; }
.btn-block { width: 100%; margin-top: var(--space-2); justify-content: flex-start; text-align: left; }

/* — forms — */
.field > label {
  display: block; font-size: 12px; margin-bottom: 5px;
  color: color-mix(in srgb, var(--color-text) 70%, transparent);
}
.input {
  width: 100%; min-height: 36px; padding: 6px 10px; font: inherit;
  font-size: 14px; color: var(--color-text); caret-color: var(--color-accent);
  background: var(--color-surface);
  border: 1px solid var(--color-divider); border-radius: var(--radius-md);
}
.input:hover { border-color: color-mix(in srgb, var(--color-text) 45%, transparent); }
.input:focus-visible { border-color: var(--color-accent); outline-offset: 0; }
textarea.input { min-height: 90px; resize: vertical; }
.radio { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.radio input, .seg-opt input {
  position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none;
}
.radio .dot {
  width: 16px; height: 16px; flex: none; border-radius: 50%;
  border: 1.5px solid var(--color-divider);
}
.radio:hover .dot { border-color: var(--color-accent); }
.radio input:checked + .dot {
  border-color: var(--color-accent); background: var(--color-accent);
  box-shadow: inset 0 0 0 4px var(--color-bg);
}
.radio input:focus-visible + .dot { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.seg {
  display: inline-flex; overflow: hidden;
  border: 1px solid var(--color-divider); border-radius: var(--radius-md);
}
.seg-opt {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; font-size: 13px; cursor: pointer;
}
.seg-opt + .seg-opt { border-left: 1px solid var(--color-divider); }
.seg-opt:has(input:checked) { background: var(--color-accent); color: var(--color-on-accent); }
.seg-opt:not(:has(input:checked)):hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }
.seg-opt:has(input:focus-visible) { outline: 2px solid var(--color-accent); outline-offset: -2px; }

/* — cards — */
.card {
  display: flex; flex-direction: column; gap: var(--space-2);
  padding: var(--space-3); border-radius: var(--radius-md); background: var(--color-surface);
}
.card-kicker { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-accent); }
.card-title {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 17px; line-height: 1.2;
}
.card-body { margin: 0; font-size: 13px; opacity: 0.8; flex: 1; }
.card-meta {
  display: flex; align-items: center; gap: 6px; font-size: 11px;
  color: color-mix(in srgb, var(--color-text) 50%, transparent);
}
.elev-sm { box-shadow: var(--shadow-sm); }
.elev-md { box-shadow: var(--shadow-md); }
.elev-lg { box-shadow: var(--shadow-lg); }

/* — tags — */
.tag {
  display: inline-flex; align-items: center; font-size: 11px;
  letter-spacing: 0.02em; padding: 3px 10px;
  border-radius: calc(var(--radius-md) * 0.75);
}
.tag-accent { background: var(--color-accent-100); color: var(--color-accent-800); }
.tag-accent-2 { background: var(--color-accent-2-100); color: var(--color-accent-2-800); }
.tag-neutral { background: var(--color-neutral-100); color: var(--color-neutral-800); }
.tag-outline { border: 1px solid var(--color-accent); color: var(--color-accent); }

/* — navigation — */
.nav {
  display: flex; align-items: center; gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-bottom: 2px solid var(--color-divider);
}
.nav-brand {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 18px; margin-right: auto;
}
.nav a { color: inherit; text-decoration: none; font-size: 14px; }
.nav a:hover, .nav a[aria-current='page'] { color: var(--color-accent); }

/* — tables — */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: color-mix(in srgb, var(--color-text) 60%, transparent);
  padding: var(--space-2); border-bottom: 2px solid var(--color-divider);
}
.table td {
  padding: var(--space-2);
  border-bottom: 1px solid var(--color-divider);
}
.table tbody tr:hover { background: color-mix(in srgb, var(--color-text) 4%, transparent); }

/* — dialog — */
.dialog-backdrop {
  position: fixed; inset: 0; display: grid; place-items: center;
  padding: var(--space-4);
  background: color-mix(in srgb, var(--color-neutral-900) 50%, transparent);
}
.dialog {
  width: min(440px, 100%); display: flex; flex-direction: column; gap: var(--space-3);
  padding: var(--space-4); border-radius: var(--radius-lg);
  background: var(--color-surface); box-shadow: var(--shadow-lg);
}
.dialog-title {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 20px;
}
.dialog-body { font-size: 14px; opacity: 0.85; }
.dialog-actions { display: flex; justify-content: flex-end; gap: var(--space-2); margin-top: var(--space-2); }

