/* Colours. The only file in the site that may name a colour by its hex
   value (tests/design_tokens.rs; the river's water ramp in src/river.rs is
   the one exemption, and the test names it). Everything else uses these.

   THE TOKENS ARE STUDY 06's, "The Furniture"
   ------------------------------------------
   Every theme defines the same names, in its own colours:

     --surface-page     the ground
     --surface-raised   a card, a panel: a shade lighter than the page
     --surface-sunken   a field's well
     --surface-hover    a row under the pointer
     --border-hairline  the edge between things
     --border-strong    the edge of a control
     --text-primary, --text-secondary, --text-tertiary
     --accent           the primary action, and nothing else
     --focus-ring       the ring every control carries with the keyboard
     --danger           destructive actions, as an outline and text

   plus the ones this product needs and the study does not name: the
   confidence ramp, the two gender hues, the crossing hues, the wash.

   Study 06 is the floor: `:root` carries its values, every theme below
   redefines them in its own colours, and a page that names no theme has it
   whole (docs/adr/0002, docs/adr/0008). Every control is built from the
   river's own ground: surfaces a shade lighter than the page, never a
   colour; hairline edges; one accent, on the primary action and the focus
   ring only.

   The river is dark under every theme. Its water ramp is calibrated for a
   dark ground, so `.river` sets the Study 06 values on itself whatever the
   page around it is (docs/adr/0002). */

/* Study 06, written on :root so that a page with no data-theme at all
   still has every token, on the dark ground every theme shares. Each theme
   below redefines every colour named here (tests/themes.rs), so under a
   theme none of these values shows. */
:root {
  color-scheme: dark;
  /* Light itself, whatever the theme: the glint that crosses a button made
     to be seen (the record's way to Impact). */
  --sheen: #ffffff66;
  --surface-page: #0b110e;
  --surface-raised: #111a16;
  --border-hairline: #22302a;
  /* The boundary of a control, which WCAG 1.4.11 holds to 3:1 against what
     is behind it — on the *darkest* ground a control can sit on, which since
     the page wash arrived is the deepest of its gradient stops rather than
     the raised surface. Not the study's #3a4b42: measured at 2.06:1 on its
     own page (docs/adr/0002, §3). */
  --border-strong: #526a5d;
  --text-primary: #ece6d6;
  --text-secondary: #a7b3aa;
  /* Muted secondary text is where a palette usually fails, so it is the one
     measured first: 4.5:1, as WCAG AA asks of body text, on every ground it
     can sit on (tests/design_tokens.rs, `every_theme_reads`). */
  --text-tertiary: #75847b;
  /* Study 06's three surfaces and the focus ring: a field's well, a row
     under the pointer, and the ring every control carries when it has the
     keyboard. */
  --surface-sunken: #0e1512;
  --surface-hover: #17221d;
  --focus-ring: #dcae64;
  --accent: #dcae64;
  --accent-soft: #2a2a1f;
  /* Text on top of --accent. A literal here would be the one colour no
     theme could override. */
  --on-accent: #0b110e;

  /* Confidence palette: a single hue ramp so the eye reads it as one scale,
     not as unrelated categories. Colour is the *last* of four encodings
     here — see the head of the themes below. */
  --conf-certain: #6dc39a;
  --conf-high: #8fbf97;
  --conf-medium: #d9ab6b;
  --conf-low: #e0937a;
  --conf-track: #3a3630;

  /* Destructive actions and the error severity, as a FOREGROUND.
     The low-confidence colour used to do this job and could not, being the
     lightest stop of the confidence ramp — chosen to be filled into a bar,
     and the lightest stop of a ramp is exactly the wrong thing to set text
     in. On the colour-blind themes of 0.4 it put the Delete button's label
     at 2.5:1 against 4.5:1 required — a real AA failure, shipped, and
     invisible to a reader of the stylesheet because the variable's name
     says "low", not "unreadable". Same defect the confidence track had, same
     fix: its own variable. */
  --danger: #d98068;

  /* The warning severity, as a FOREGROUND, for the same reason --danger has
     its own variable: --conf-medium is a ramp stop, chosen to be filled into
     a bar, and a bar fill only has to clear the 3:1 of a graphic. Set in
     0.7–0.8rem text it was measured under the 4.5 AA asks of body text on
     two of the themes of 0.4 — shipped, and invisible to a reader of this
     file because the variable's name says "medium", not "unreadable". Held
     to 4.5:1 against the darkest ground it can sit on, which is a wash stop
     rather than --surface-raised. */
  --warning: #d9ab6b;

  /* Two neutral hues for gender, deliberately not pink and blue. The `-line`
     values are the outline of a tree card, which is a control, so they are
     held to 3:1 against the canvas behind them rather than chosen by eye. */
  --sex-a: #253034;
  --sex-a-line: #5c757f;
  --sex-b: #322c24;
  --sex-b-line: #7d6c52;
  --sex-u: #2a2926;
  --sex-u-line: #6e6a63;
  /* The tree's lines and strips (2026-10-28: "a boy blue, a girl red"):
     a son, a daughter, anyone else. Bright enough on every dark ground;
     Clarity, light, has its own. */
  --kin-boy: #5e9bff;
  --kin-girl: #ff6b81;
  --kin-other: #a3aab0;
  /* A tie of rite or custom: a godparent, a milk sibling (docs/adr/0020).
     A hue no family line has, never the accent. */
  --kin-rite: #3fd4b0;

  /* Residual edge crossings: the Okabe–Ito set, chosen to stay apart under
     each form of colour blindness, and paired with dash patterns in app.css
     all the same, because a hue alone does not survive every eye. */
  --hue-1: #56b4e9;
  --hue-2: #e69f00;
  --hue-3: #33d6a6;
  --hue-4: #f0a3c8;
  --hue-5: #b49ae0;
  --hue-6: #d6b656;
  --hue-7: #6fc0d0;
  --hue-8: #d78a8a;

  /* Elevation. Composed from a colour and a strength rather than a literal
     shadow per theme, so a theme states two values instead of six. */
  --shadow-rgb: 0 0 0;
  --shadow-a: 0.45;

  /* The three tints the page wash is built from, mixed from the theme's own
     background toward its own hues — cool and nearly imperceptible, as a
     dark page asks for. The deepest of the three is the darkest ground a
     control boundary can sit on, and --border-strong is held to 3:1 against
     exactly that: re-measure the pair before changing any of them. */
  --wash-1: #0d1411;
  --wash-2: #0c1310;
  --wash-3: #0e1310;

  /* A texture a theme may carry over its wash, under the same switch (off
     until a reader turns it on). An image, not a colour: an inline SVG grain,
     drawn and never fetched, a few hundred bytes. On the page's background
     only — never on a control, a field, a card or a frame, which Study 06
     builds from the plain ground. */
  --wash-texture: none;
}

/* The river's own palette (`/`), declared with the others but not on :root,
   because it is the same under every theme by design: the water's colour ramp
   is drawn into the SVG server-side, and the dark ground is part of how that
   ramp reads. Time also runs on the half-century bands for exactly that
   reason — they are what carries it to a colour-blind eye and in print.
   A theme that ever needs to can still override these on `.river`. */
.river {
  --rv-ink-0: #0b110e; --rv-ink-1: #0c1310; --rv-ink-2: #0e1512; --rv-ink-3: #111a16; --rv-ink-4: #17221d;
  --rv-chip-on: #1d2a24;
  --rv-rule-1: #1a2520; --rv-rule-2: #22302a; --rv-rule-3: #526a5d; --rv-rule-4: #4d6157;
  --rv-text-1: #ece6d6; --rv-text-2: #a7b3aa; --rv-text-3: #75847b;
  --rv-accent: #dcae64; --rv-accent-hi: #f0d9a2; --rv-lit: #fbe9c0; --rv-water: #86b08f; --rv-warn: #d98068;
  /* The drawing's own inks (src/river.rs paints with classes, app.css maps
     them to these): the half-century bands, their rules and years, the
     data and names beside each person, the living glow. */
  --rv-band-odd: #0e1714; --rv-band-live: #15150f; --rv-band-rule: #18241f;
  --rv-band-text: #4f6158; --rv-band-text-live: #8a7a52;
  --rv-data: #8d9c92; --rv-name: #e2dccb; --rv-centre: #f6efdc; --rv-glow: #e6b062;
  /* The Selva Verde rework (v0.5.0, docs/adr/0004 §5): the bright thread
     down the middle of attested water, the route the pointer lights and its
     halo, the contour lines of the ground, and the shade laid over the
     ground's photograph so that every ink above keeps its contrast. */
  --rv-core: #fdf3d8; --rv-lit-halo: #f2cf86; --rv-contour: #6f9a8c;
  --rv-zone-down: #66bfab; --rv-zone-up: #f2c879;
  /* After Selva Verde (Canopée, 2026-10-24): the zones' pale contour lines,
     and the attested water's white thread of light and its glow. */
  --rv-contour-hi: #e4efe9; --rv-thread: #fffbef; --rv-thread-glow: #ffe8b5;
  /* Along the family's streams and rivers (river-scene.js, docs/adr/0004
     §15), the ground's vegetation, darker and greener: what it is
     multiplied by. */
  --rv-riparian: #9ecc98;
  --rv-shade-rgb: 10 17 14;
  /* The mist in two corners of the ground, as over Selva Verde's forest. */
  --rv-mist-rgb: 214 226 220;
  /* The living ground (river-scene.js, docs/adr/0004 §12): the low sun's
     light over the photograph. Read by the script, so the drawing and the
     ground share one palette. */
  --rv-sun: #ffe1ad;
  /* The sky the family's water reflects as it runs away from the viewer
     (docs/adr/0004 §17). */
  --rv-sky-rgb: 200 216 220;
  --rv-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --rv-serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  /* Study 06 on the river itself, under every theme: anything drawn inside
     it — its controls, the record beside it — sits on the river's ground. */
  --surface-page: var(--rv-ink-0); --surface-raised: var(--rv-ink-3);
  --surface-sunken: var(--rv-ink-2); --surface-hover: var(--rv-ink-4);
  --border-hairline: var(--rv-rule-2); --border-strong: var(--rv-rule-3);
  --text-primary: var(--rv-text-1); --text-secondary: var(--rv-text-2);
  --text-tertiary: var(--rv-text-3);
  --accent: var(--rv-accent); --focus-ring: var(--rv-accent); --danger: var(--rv-warn);
  color-scheme: dark;
}

/* ---------------------------------------------------------------------------
   Themes
   ---------------------------------------------------------------------------
   Four of them: Canopée, the default, and Fusion, Galaxy and Summit,
   which share its furniture and each bring a view of their own (the three
   kept in 0.5.0, docs/adr/0008, and Summit, docs/adr/0010). Every colour is a custom property on :root, and a theme is one
   block that redefines them under a `data-theme` attribute the server writes
   into the markup. Nothing below these blocks names a literal colour, so a
   theme's colours are its palette and nothing else.

   THE CONSTRAINT THAT SHAPES ALL OF THEM
   --------------------------------------
   Confidence is this product's argument, and colour is exactly what
   disappears under colour blindness. So confidence is never carried by colour
   alone, in any theme:

     * a bar's LENGTH is the value, and length survives everything;
     * a dot is a PIE filled to the value, so the dot carries the number too,
       not merely which of four bands it fell in;
     * the numeric percentage is printed beside the bar and is in the
       accessible name of both, so a screen reader hears "0.35" and not
       "orange";
     * inline text carries opacity and an underline style.

   Until 0.5.0, three colour-blind themes went further and dropped hue from
   the confidence ramp altogether. They were retired with seven others
   (docs/adr/0008); the four encodings above are what remains, and they are
   enough on their own that no reading depends on telling two hues apart. */


/* --- canopée --------------------------------------------------------------- */
/* The reference theme since v0.5.0 (docs/adr/0004), and the default: a
   forest-green ground, after the Zenze and Selva Verde references, cut and
   reworked in the operator's Canva ("Kit UI Canopée"), and the gold of
   ax·genealogy's logo for its accent (docs/adr/0006). The accent was a lime
   until the logo came; the ground, the forest and the river did not change.
   Every pair measured with the rules of `every_theme_reads`, the darkest
   wash stop and the contour texture at its strongest pixel included: the
   tightest is --border-strong on --wash-1 under the texture, 3.25:1. The
   gold reads at 7.1:1 on the lightest ground, and the dark ink on it at
   9.5:1.

   The last block of names is this theme's own and no other theme carries
   them: the four tints of an icon's disc (river, tree, search, quality —
   Zenze's coloured pastilles), the glow under a gold control, and the logo's
   own four colours, exactly as it was drawn. Anything that draws with them
   is written under [data-theme="canopee"]. */
[data-theme="canopee"] {
  --sheen: #ffffff66;
  color-scheme: dark;
  --surface-page: #0c1611;
  --surface-raised: #122019;
  --border-hairline: #21352a;
  --border-strong: #5a7a66;
  --text-primary: #eef4ec;
  --text-secondary: #a9bcae;
  --text-tertiary: #8aa192;
  --surface-sunken: #0f1b15;
  --surface-hover: #192a21;
  --focus-ring: #f7d99a;
  --accent: #e6b254;
  --accent-soft: #2a2515;
  --on-accent: #0c1611;

  --conf-certain: #7fcf9a;
  --conf-high: #a3cc8a;
  --conf-medium: #e0b46c;
  --conf-low: #e8957c;
  --conf-track: #2c3a31;
  --danger: #f0927f;
  --warning: #e6bb6a;

  --sex-a: #1d2c2a;
  --sex-a-line: #62837f;
  --sex-b: #2e2a1f;
  --sex-b-line: #8c7858;
  --sex-u: #232a25;
  --sex-u-line: #77807a;
  --kin-boy: #5e9bff;
  --kin-girl: #ff6b81;
  --kin-other: #a3aab0;
  /* A tie of rite or custom: a godparent, a milk sibling (docs/adr/0020).
     A hue no family line has, never the accent. */
  --kin-rite: #3fd4b0;

  --hue-1: #56b4e9;
  --hue-2: #e69f00;
  --hue-3: #33d6a6;
  --hue-4: #f0a3c8;
  --hue-5: #b49ae0;
  --hue-6: #d6b656;
  --hue-7: #6fc0d0;
  --hue-8: #d78a8a;

  --shadow-rgb: 0 0 0;
  --shadow-a: 0.5;

  --wash-1: #0f1c15;
  --wash-2: #0d1913;
  --wash-3: #111b13;
  /* Contour lines, drawn and never fetched, under the same switch as every
     texture: off until a reader turns the background on. */
  --wash-texture: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240' viewBox='0 0 240 240'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.05' stroke-width='1'%3E%3Cpath d='M-10 60c40-26 80 22 130-4s90-30 130 2'/%3E%3Cpath d='M-10 104c46-20 84 24 132-2s86-26 128 6'/%3E%3Cpath d='M-10 150c42-30 88 18 134-6s82-22 126 8'/%3E%3Cpath d='M-10 196c50-22 80 26 128 0s92-30 132 4'/%3E%3C/g%3E%3C/svg%3E");

  --icon-river: #1f4a4c;
  --icon-tree: #24452a;
  --icon-search: #4d3c1c;
  --icon-quality: #4d2a26;
  --icon-river-ink: #8fd3c8;
  --icon-tree-ink: #b4dc7c;
  --icon-search-ink: #ecc77a;
  --icon-quality-ink: #f3a593;
  --glow-rgb: 230 178 84;

  --logo-tile: #14322b;
  --logo-deep: #a06f24;
  --logo-gold: #e6b254;
  --logo-light: #f7d99a;
}

/* --- fusion ---------------------------------------------------------------- */
/* A dashboard at night (v0.5.0, docs/adr/0007), after the operator's two
   references: charcoal tiles, neon red and orange, a teal and a green for
   what is alive. Its landing view is not the river but a living tree drawn
   from the same layout (static/fusion.js). Measured with the rules of
   `every_theme_reads`, under its grid at its strongest pixel: the tightest
   pair is --border-strong on --wash-3, 3.6:1; the accent reads at 5.9:1 on
   the lightest ground, and the dark ink on it at 6.4:1. */
[data-theme="fusion"] {
  --sheen: #ffffff66;
  color-scheme: dark;
  --surface-page: #0c0e11;
  --surface-raised: #15181d;
  --border-hairline: #252a32;
  --border-strong: #6a7482;
  --text-primary: #f0f2f5;
  --text-secondary: #b2bac5;
  --text-tertiary: #959fad;
  --surface-sunken: #101317;
  --surface-hover: #1c2027;
  --focus-ring: #ffb454;
  --accent: #ff5f3a;
  --accent-soft: #2a1712;
  --on-accent: #0c0e11;

  --conf-certain: #43d98a;
  --conf-high: #9bd36b;
  --conf-medium: #ffb454;
  --conf-low: #ff6b6b;
  --conf-track: #2a3038;
  --danger: #ff7b7b;
  --warning: #ffc15e;

  --sex-a: #16202b;
  --sex-a-line: #5d7e9c;
  --sex-b: #2b1d1d;
  --sex-b-line: #9c6a5d;
  --sex-u: #1e2126;
  --sex-u-line: #77808b;
  --kin-boy: #5e9bff;
  --kin-girl: #ff6b81;
  --kin-other: #a3aab0;
  /* A tie of rite or custom: a godparent, a milk sibling (docs/adr/0020).
     A hue no family line has, never the accent. */
  --kin-rite: #3fd4b0;

  --hue-1: #4cc9f0;
  --hue-2: #ff9f1c;
  --hue-3: #2ee6a6;
  --hue-4: #f15bb5;
  --hue-5: #a78bfa;
  --hue-6: #fde047;
  --hue-7: #5eead4;
  --hue-8: #fb7185;

  --shadow-rgb: 0 0 0;
  --shadow-a: 0.55;

  --wash-1: #0d1014;
  --wash-2: #0b0d10;
  --wash-3: #0e1013;
  /* The dashboard's grid, drawn and never fetched. */
  --wash-texture: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M48 0H0V48' fill='none' stroke='%23ffffff' stroke-opacity='.035' stroke-width='1'/%3E%3C/svg%3E");
  /* The tree's stage: the dashboard's grid, a shade stronger than the page's. */
  --tv-grid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M48 0H0V48' fill='none' stroke='%23ffffff' stroke-opacity='.05' stroke-width='1'/%3E%3C/svg%3E");

  --icon-river: #12333a;
  --icon-tree: #183a24;
  --icon-search: #3d2a12;
  --icon-quality: #3d1616;
  --icon-river-ink: #5eead4;
  --icon-tree-ink: #6ee7a0;
  --icon-search-ink: #ffb454;
  --icon-quality-ink: #ff7b7b;
  --glow-rgb: 255 95 58;

  /* The logo in this theme's neon (docs/adr/0006 §2): the same drawing. */
  --logo-tile: #15181d;
  --logo-deep: #c2410c;
  --logo-gold: #ff5f3a;
  --logo-light: #ffb454;

  /* The living tree (static/fusion.js): bark, the light in its veins, a
     leaf that is alive and one that is not, and the soil line. */
  --tv-bark: #4b525d;
  --tv-bark-lit: #79828f;
  --tv-vein: #ff5f3a;
  --tv-vein-soft: #ff9b5e;
  --tv-leaf-living: #43d98a;
  --tv-leaf-gone: #ff8a3d;
  --tv-leaf-hidden: #6a7482;
  --tv-soil: #ff5f3a;
  --tv-teal: #2ee6c5;
  /* The two sides of the person in the middle (2026-10-27): the branches
     and their light toward the ancestors, below, and toward the
     descendants, above. */
  --tv-down: #ff8a1f;
  --tv-down-soft: #ffb35c;
  --tv-up: #36d67c;
  --tv-up-soft: #8eeeb6;
  /* The glass the tree stands in (2026-10-23): its cold light, the panels
     the names are written on, and their edge. */
  --tv-glass: #4aa8ff;
  --tv-panel: #0a1420;
  --tv-panel-line: #2f6fa8;
}

/* --- galaxy ---------------------------------------------------------------- */
/* Deep space (v0.5.0, docs/adr/0007), after the operator's two references:
   navy, electric violet, cyan and magenta. Its landing view is a solar
   system drawn from the same layout (static/galaxy.js): the person at the
   centre is the sun, every generation an orbit. Measured with the rules of
   `every_theme_reads`, under its stars at their strongest pixel: the
   tightest pair is --border-strong on --wash-3, 4.0:1; the accent reads at
   5.5:1 on the lightest ground, and the dark ink on it at 6.0:1. */
[data-theme="galaxy"] {
  --sheen: #ffffff66;
  color-scheme: dark;
  --surface-page: #070a1a;
  --surface-raised: #0f1430;
  --border-hairline: #1f2752;
  --border-strong: #6b74ba;
  --text-primary: #eef0ff;
  --text-secondary: #b8bdea;
  --text-tertiary: #9ca2d8;
  --surface-sunken: #0b0f24;
  --surface-hover: #161c3f;
  --focus-ring: #67e8f9;
  --accent: #8b7bff;
  --accent-soft: #1c1a45;
  --on-accent: #070a1a;

  --conf-certain: #4ef0c5;
  --conf-high: #6bb8ff;
  --conf-medium: #ffbe6b;
  --conf-low: #ff6b9d;
  --conf-track: #222a55;
  --danger: #ff7a9c;
  --warning: #ffc46b;

  --sex-a: #121c3a;
  --sex-a-line: #5b7bd0;
  --sex-b: #2a1636;
  --sex-b-line: #b06fc0;
  --sex-u: #171c33;
  --sex-u-line: #7a80b0;
  --kin-boy: #5e9bff;
  --kin-girl: #ff6b81;
  --kin-other: #a3aab0;
  /* A tie of rite or custom: a godparent, a milk sibling (docs/adr/0020).
     A hue no family line has, never the accent. */
  --kin-rite: #3fd4b0;

  --hue-1: #67e8f9;
  --hue-2: #f472b6;
  --hue-3: #a3e635;
  --hue-4: #fbbf24;
  --hue-5: #c084fc;
  --hue-6: #34d399;
  --hue-7: #60a5fa;
  --hue-8: #fb7185;

  --shadow-rgb: 0 0 0;
  --shadow-a: 0.6;

  --wash-1: #080b1d;
  --wash-2: #070a18;
  --wash-3: #090c20;
  /* Stars, drawn and never fetched. */
  --wash-texture: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='%23ffffff'%3E%3Ccircle cx='12' cy='18' r='.7' fill-opacity='.5'/%3E%3Ccircle cx='71' cy='44' r='.5' fill-opacity='.4'/%3E%3Ccircle cx='132' cy='26' r='.9' fill-opacity='.35'/%3E%3Ccircle cx='38' cy='97' r='.5' fill-opacity='.45'/%3E%3Ccircle cx='104' cy='118' r='.7' fill-opacity='.3'/%3E%3Ccircle cx='150' cy='88' r='.4' fill-opacity='.5'/%3E%3Ccircle cx='86' cy='150' r='.6' fill-opacity='.35'/%3E%3Ccircle cx='6' cy='140' r='.4' fill-opacity='.4'/%3E%3C/g%3E%3C/svg%3E");

  --icon-river: #11284a;
  --icon-tree: #1d2a4d;
  --icon-search: #2f1f4a;
  --icon-quality: #3a1530;
  --icon-river-ink: #67e8f9;
  --icon-tree-ink: #a3e635;
  --icon-search-ink: #fbbf24;
  --icon-quality-ink: #ff7a9c;
  --glow-rgb: 139 123 255;

  /* The logo in this theme's light (docs/adr/0006 §2): the same drawing. */
  --logo-tile: #0f1430;
  --logo-deep: #6d28d9;
  --logo-gold: #8b7bff;
  --logo-light: #67e8f9;

  /* The solar system (static/galaxy.js): the sun, an orbit, a link, and a
     planet that is alive, one that is not, one this reader may not see. */
  --gx-sun: #ffb347;
  --gx-sun-core: #fff1c9;
  --gx-orbit: #6d78c7;
  --gx-link: #8b7bff;
  --gx-link-hot: #f472b6;
  --gx-planet-living: #4ef0c5;
  --gx-planet-gone: #8b7bff;
  --gx-planet-hidden: #6b74ba;
  /* The two sides of the sun (2026-10-27): violet toward the descendants,
     white toward the ancestors; a star's field; the dark well under the
     drawing. The orbits are lighter since, over the galaxy's picture. */
  --gx-up: #a78bfa;
  --gx-down: #eef0ff;
  --gx-field: #c9bcff;
  --gx-well: #07061a;
}

/* --- summit ---------------------------------------------------------------- */
/* A mountain at sunrise (v0.5.0, docs/adr/0010), after the operator's two
   references: a night-navy ground, the gold of first light for its accent,
   and the dawn's violets, roses and peaches for its sky. Its landing view is
   an ascent drawn from the same layout (static/summit.js): the ancestors up
   the mountain, the descendants down in the valley, and more snow the
   further back the climb goes. Measured with the rules of
   `every_theme_reads`, under its stars at their strongest pixel: the
   tightest pair is --border-strong on --wash-3, 3.5:1; the gold reads at
   8.8:1 on a card, and the dark ink on it at 9.5:1. */
[data-theme="summit"] {
  --sheen: #ffffff66;
  color-scheme: dark;
  --surface-page: #06111d;
  --surface-raised: #0d1a28;
  --border-hairline: #1f3247;
  --border-strong: #61778f;
  --text-primary: #f4ead9;
  --text-secondary: #c4b7a4;
  --text-tertiary: #a39884;
  --surface-sunken: #091520;
  --surface-hover: #132334;
  --focus-ring: #f3cf8a;
  --accent: #e0b062;
  --accent-soft: #2a2215;
  --on-accent: #06111d;

  --conf-certain: #86d3b0;
  --conf-high: #9fc4e8;
  --conf-medium: #e0b062;
  --conf-low: #e98c78;
  --conf-track: #22344b;
  --danger: #f08e7a;
  --warning: #edc36e;

  --sex-a: #102238;
  --sex-a-line: #5f82ad;
  --sex-b: #2b1d22;
  --sex-b-line: #b88672;
  --sex-u: #172231;
  --sex-u-line: #7d8798;
  --kin-boy: #5e9bff;
  --kin-girl: #ff6b81;
  --kin-other: #a3aab0;
  /* A tie of rite or custom: a godparent, a milk sibling (docs/adr/0020).
     A hue no family line has, never the accent. */
  --kin-rite: #3fd4b0;

  --hue-1: #6fc4ec;
  --hue-2: #f0a35e;
  --hue-3: #86d3b0;
  --hue-4: #f3a6c0;
  --hue-5: #b8a2e6;
  --hue-6: #e3c25c;
  --hue-7: #7dc7d4;
  --hue-8: #e58e8e;

  --shadow-rgb: 0 0 0;
  --shadow-a: 0.55;

  --wash-1: #07131f;
  --wash-2: #06111c;
  --wash-3: #081522;
  /* The last stars before the dawn, drawn and never fetched. */
  --wash-texture: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cg fill='%23ffffff'%3E%3Ccircle cx='18' cy='22' r='.6' fill-opacity='.45'/%3E%3Ccircle cx='96' cy='38' r='.5' fill-opacity='.35'/%3E%3Ccircle cx='158' cy='14' r='.8' fill-opacity='.3'/%3E%3Ccircle cx='52' cy='112' r='.4' fill-opacity='.4'/%3E%3Ccircle cx='134' cy='96' r='.6' fill-opacity='.3'/%3E%3Ccircle cx='76' cy='164' r='.5' fill-opacity='.35'/%3E%3C/g%3E%3C/svg%3E");

  --icon-river: #0f2a3d;
  --icon-tree: #14291f;
  --icon-search: #2c2416;
  --icon-quality: #33191f;
  --icon-river-ink: #7dc7d4;
  --icon-tree-ink: #86d3b0;
  --icon-search-ink: #e0b062;
  --icon-quality-ink: #f08e7a;
  --glow-rgb: 224 176 98;

  /* The logo in this theme's light (docs/adr/0006 §2): the same drawing,
     an ember of the dawn under the gold. */
  --logo-tile: #0d1a28;
  --logo-deep: #9a5a3c;
  --logo-gold: #e0b062;
  --logo-light: #f3cf8a;

  /* The ascent (static/summit.js): the sky from night to dawn, the sun,
     the far ranges and the mountain's rock in shade and in first light, its
     snow in shade, in light and in the dawn's glow, the valley and its
     mist, the trail, the contour lines, and a camp that is alive, one that
     is not, and one this reader may not see. */
  --sm-sky-night: #0a1630;
  --sm-sky-dawn: #3d2a52;
  --sm-sky-glow: #d98f7a;
  --sm-sun: #ffd38a;
  --sm-sun-core: #fff3d9;
  --sm-range-far: #2a3550;
  --sm-range-mid: #1c2639;
  --sm-rock: #1f2a40;
  --sm-rock-lit: #6b4b5a;
  --sm-snow: #eef2f8;
  --sm-snow-shade: #a9b8cf;
  --sm-snow-glow: #f6c3ad;
  --sm-valley: #0b1c22;
  --sm-pine: #0e2a2a;
  --sm-mist: #a9bcd0;
  --sm-trail: #e0b062;
  --sm-trail-hot: #ffdca3;
  --sm-contour: #3a4c68;
  --sm-camp-living: #ffcf7a;
  --sm-camp-gone: #c9d3e2;
  --sm-camp-hidden: #61778f;
}

/* Clarity (v0.5.0, docs/adr/0013): the first light theme, from the
   operator's references — an administration dashboard on white, its orange
   accent and dark teal figures, and a glossy funnel in blue, violet and pink.
   Measured as every theme is (`every_theme_reads`). Softened on the
   operator's review of 9 November 2026 ("the contrasts are too violent"):
   no pure white and no near-black, the inks quieter, the words at 11–13:1
   where they were at 16:1. */
[data-theme="clarity"] {
  --sheen: #ffffff66;
  color-scheme: light;
  --surface-page: #edf0f4;
  --surface-raised: #fbfcfd;
  --border-hairline: #d6dde5;
  --border-strong: #6c7b8a;
  --text-primary: #25323f;
  --text-secondary: #43515e;
  --text-tertiary: #55626e;
  --surface-sunken: #f3f5f8;
  --surface-hover: #e8ecf1;
  --focus-ring: #a5532d;
  --accent: #a5532d;
  --accent-soft: #f7e8df;
  --on-accent: #ffffff;

  --conf-certain: #1f7a4d;
  --conf-high: #2463a6;
  --conf-medium: #8a4b00;
  --conf-low: #b42318;
  --conf-track: #e2e8ef;
  --danger: #a82a20;
  --warning: #804600;

  --sex-a: #e7f0fb;
  --sex-a-line: #3d6fa8;
  --sex-b: #fbeaee;
  --sex-b-line: #b0566e;
  --sex-u: #eef1f4;
  --sex-u-line: #68798a;
  --kin-boy: #3d68a8;
  --kin-girl: #b04a62;
  --kin-other: #5f6b78;
  /* A tie of rite or custom: a godparent, a milk sibling (docs/adr/0020).
     A hue no family line has, never the accent. */
  --kin-rite: #2a7d70;

  --hue-1: #4a6fb5;
  --hue-2: #b0603a;
  --hue-3: #3f8058;
  --hue-4: #a8507a;
  --hue-5: #7560b0;
  --hue-6: #93722e;
  --hue-7: #3b7a88;
  --hue-8: #a5463e;

  --shadow-rgb: 19 34 48;
  --shadow-a: 0.09;

  --wash-1: #eef1f4;
  --wash-2: #ebeef2;
  --wash-3: #eff2f5;
  /* No texture: the reference's white is clean. */
  --wash-texture: none;

  --icon-river: #e4f0f2;
  --icon-tree: #e6f1ea;
  --icon-search: #f7e8df;
  --icon-quality: #f6e6e4;
  --icon-river-ink: #2e6b74;
  --icon-tree-ink: #3a7350;
  --icon-search-ink: #a5532d;
  --icon-quality-ink: #a33a30;
  --glow-rgb: 165 83 45;

  /* The logo in this theme's light (docs/adr/0006 §2): the same drawing on
     white, its X in the funnel's colours — pink where the sources meet,
     violet, blue toward the descendants — and its laurels blue. Nothing of
     Canopée's green and gold is left. */
  --logo-tile: #ffffff;
  --logo-deep: #d07aa3;
  --logo-gold: #8e7cc4;
  --logo-light: #6390d0;

  /* The funnel (static/clarity.js): its five glass tones from the mouth
     (blue) to the narrow end (pink), the gloss, the rim, the mesh and the
     light running up it, the beads of the living, the dead and the hidden,
     the person at the fixed point, the stage's ground and its figures. */
  --cl-slice-1: #e4eaf6;
  --cl-slice-2: #e8e5f5;
  --cl-slice-3: #ede4f4;
  --cl-slice-4: #f2e3ef;
  --cl-slice-5: #f5e5eb;
  --cl-gloss: #ffffff;
  --cl-rim: #ffffff;
  --cl-link: #353066;
  --cl-link-hot: #d8793f;
  --cl-bead: #ffffff;
  --cl-living: #c0652f;
  --cl-gone: #2f4b54;
  --cl-hidden: #8a99a8;
  --cl-centre: #a5532d;
  --cl-stage: #f7f8fb;
  --cl-figure: #25323f;

  /* The frames (v0.5.0, the operator's second look: "we are writing on
     paper"): a blue-grey ground the white boxes stand off, a pale ground
     for a pack of fields, and five category inks with their tints — the
     funnel's blue, violet and pink, the accent's orange, the dashboard's
     teal — for the strip on top of a box and its icon chip. Each ink reads
     at 5:1 or more on its tint and on white. */
  --cl-pack: #f4f6f9;
  --cl-ink-1: #3e5f97;
  --cl-tint-1: #e7ecf5;
  --cl-ink-2: #66579f;
  --cl-tint-2: #eceaf5;
  --cl-ink-3: #9b4a6c;
  --cl-tint-3: #f4e8ee;
  --cl-ink-4: #a5532d;
  --cl-tint-4: #f6e9e1;
  --cl-ink-5: #2e6b74;
  --cl-tint-5: #e5f0f1;
}
/* Genealogy (v0.5.0, docs/adr/0016), from the operator's frame pack: a
   dark green interface with cream cards, oval portraits and antique vines
   (their second screen), and the family on a parchment scroll a tree grows
   from, joined by thin gold lines (their first, the view). Two palettes:
   the page's, dark, measured here as every theme is; and the cards', cream
   with a sepia ink, which app.css puts on every card and which
   `genealogy_cards_read` measures the same way (tests/design_tokens.rs).
   Softened on the operator's review of 9 November 2026 ("the contrasts are
   too violent"): the page a moss rather than a near-black green, the cards
   a quieter parchment, the gold an old brass; the words at 8–10:1 where they
   were at 14:1, and the cards 9.5:1 off the page where they were 14:1. */
[data-theme="genealogy"] {
  --sheen: #ffffff66;
  color-scheme: dark;
  --surface-page: #283a2e;
  --surface-raised: #304436;
  --border-hairline: #44594a;
  --border-strong: #9aab9c;
  --text-primary: #ebe4d0;
  --text-secondary: #d8ceb5;
  --text-tertiary: #c9bd9e;
  --surface-sunken: #22322a;
  --surface-hover: #384d3e;
  --focus-ring: #dcc38a;
  --accent: #cdb075;
  --accent-soft: #3d4330;
  --on-accent: #22302a;

  --conf-certain: #9ad49f;
  --conf-high: #b7cf86;
  --conf-medium: #e3bb6a;
  --conf-low: #ec9a82;
  --conf-track: #3a4d3e;
  --danger: #f2a690;
  --warning: #e8c67e;

  --sex-a: #2c3d36;
  --sex-a-line: #6b8a7c;
  --sex-b: #3b3626;
  --sex-b-line: #94805a;
  --sex-u: #323a2f;
  --sex-u-line: #7d8270;
  --kin-boy: #8fb2e6;
  --kin-girl: #e79aa8;
  --kin-other: #b4bab0;
  /* A tie of rite or custom: a godparent, a milk sibling (docs/adr/0020).
     A hue no family line has, never the accent. */
  --kin-rite: #86cdb7;

  --hue-1: #93bcd2;
  --hue-2: #dcae63;
  --hue-3: #94c9a8;
  --hue-4: #ddb0c3;
  --hue-5: #bfb0d8;
  --hue-6: #d2bd7c;
  --hue-7: #97c4c6;
  --hue-8: #d6a59c;

  --shadow-rgb: 4 10 3;
  --shadow-a: 0.38;

  --wash-1: #2a3c30;
  --wash-2: #273a2d;
  --wash-3: #2b3d30;
  /* No texture: the vines along the page's edges are its ground (app.css). */
  --wash-texture: none;

  --icon-river: #2f4a42;
  --icon-tree: #364b2f;
  --icon-search: #4a4128;
  --icon-quality: #4a3329;
  --icon-river-ink: #9ed6c4;
  --icon-tree-ink: #bfdc86;
  --icon-search-ink: #efcc80;
  --icon-quality-ink: #f4ab95;
  --glow-rgb: 205 176 117;

  /* The logo in this theme's light (docs/adr/0006 §2): the forest's green
     for its tile, the gold of the scroll's lines for its own. */
  --logo-tile: #2b402f;
  --logo-deep: #8a6420;
  --logo-gold: #cdb075;
  --logo-light: #ece0bc;

  /* The cards' palette: cream stock and a sepia ink, the screen's
     cards. app.css sets each colour token to its `--gn-l-` twin on a
     card, so everything inside one reads as it would on a light theme. */
  --gn-l-surface-page: #e4dac4;
  --gn-l-surface-raised: #ebe3d0;
  --gn-l-border-hairline: #cdbf9f;
  --gn-l-border-strong: #7b6d52;
  --gn-l-text-primary: #3a3022;
  --gn-l-text-secondary: #504430;
  --gn-l-text-tertiary: #5e523d;
  --gn-l-surface-sunken: #ddd2ba;
  --gn-l-surface-hover: #e1d7c0;
  --gn-l-focus-ring: #7a5a18;
  --gn-l-accent: #3c5a42;
  --gn-l-accent-soft: #dde2cb;
  --gn-l-on-accent: #f1ead8;
  --gn-l-conf-certain: #2c6b3a;
  --gn-l-conf-high: #4f6b1f;
  --gn-l-conf-medium: #8a5300;
  --gn-l-conf-low: #a8331f;
  --gn-l-conf-track: #ddd1b3;
  --gn-l-danger: #9e281d;
  --gn-l-warning: #7a4a05;
  --gn-l-sex-a: #e3e9df;
  --gn-l-sex-a-line: #4d6f61;
  --gn-l-sex-b: #f0e2cc;
  --gn-l-sex-b-line: #8a6a3e;
  --gn-l-sex-u: #e8e2d2;
  --gn-l-sex-u-line: #77705d;
  --gn-l-hue-1: #2b6a95;
  --gn-l-hue-2: #9a5a08;
  --gn-l-hue-3: #2c7a4c;
  --gn-l-hue-4: #a33b6c;
  --gn-l-hue-5: #6a4a9e;
  --gn-l-hue-6: #7d6410;
  --gn-l-hue-7: #1f6d72;
  --gn-l-hue-8: #a3392e;
  --gn-l-icon-river: #dbe7df;
  --gn-l-icon-tree: #e2e8cf;
  --gn-l-icon-search: #f1e1bd;
  --gn-l-icon-quality: #f1d9cf;
  --gn-l-icon-river-ink: #21564a;
  --gn-l-icon-tree-ink: #3d5b1c;
  --gn-l-icon-search-ink: #714a05;
  --gn-l-icon-quality-ink: #8a2c1a;

  /* The tree, climbed (static/genealogy.js), on its picture of a tree
     growing out of a parchment scroll: the stage's dark, into which the
     picture's wall fades round the scroll, and its light behind the scroll
     before the picture is drawn; the lines' ink and the parchment's light under it,
     and the lit route's; the gold of the knots, its brighter tone and the
     glint along the lines, the falling leaves and the dust; the cards
     beside the portraits, their edge and shadow, their two inks; the
     portraits' cream mounts and their gold edge, the sepia print, a sparse
     record's paler one, and the initials on it; the living's, the gone's
     and the hidden's edges; the person at the fixed point; the
     generations' numbers, on the stage's dark, and their shadow; the dashboard's bars for the
     roots, the trunk and the crown. Each ink is measured on its own
     ground: the lines at 4.5:1 or more on the parchment and 3:1 on the
     leaves, with the parchment's light under them; the initials at 4.5:1
     on the print; the cards' words at 7:1. */
  --gn-stage: #26382b;
  --gn-stage-lit: #344632;
  --gn-wire: #4a2f12;
  --gn-wire-halo: #f6ecd4;
  --gn-lit: #7a4a0c;
  --gn-lit-halo: #fbf1d8;
  --gn-node: #bfa262;
  --gn-node-rim: #4a3212;
  --gn-gold: #bfa262;
  --gn-gold-hi: #d6bd7c;
  --gn-glint: #f5ead0;
  --gn-leaf: #ad8a46;
  --gn-dust: #fff4d6;
  --gn-card: #efe7d4;
  --gn-card-line: #b09a68;
  --gn-card-shade: #000000;
  --gn-ink: #2a2114;
  --gn-ink-2: #4f4128;
  --gn-mount: #ede5d3;
  --gn-mount-line: #a28a52;
  --gn-print: #a88d64;
  --gn-print-hi: #c4a87e;
  --gn-print-sparse: #c9b28c;
  --gn-initials: #2e2010;
  --gn-living: #3f6b25;
  --gn-gone: #a8843f;
  --gn-hidden: #6f6a5c;
  --gn-hidden-fill: #e2d8c2;
  --gn-centre: #7a3f12;
  --gn-gen: #dfd5bb;
  --gn-gen-0: #d6bd7c;
  --gn-gen-halo: #1d2b20;
  --gn-bar-root: #a58c66;
  --gn-bar-crown: #86a35e;
}

