/* ============================================================================
   TGIS — THE THEME CATALOGUE
   Thirty-six themes. Each one is a dozen numbers.

   The ask was thirty, in light and dark, coloured and monochrome, at one, two,
   three, four and five colours. Thirty-six is what falls out of covering that
   grid honestly — six per palette size — rather than stopping mid-row. Twenty
   are dark and sixteen are light.

   ----------------------------------------------------------------------------
   WHAT A THEME IS ALLOWED TO SAY

   Only seeds. A theme never names a colour that appears on screen — it names
   the hue, chroma and lightness that tokens.css §4 builds the colours out of.
   That is the whole reason this file is 600 lines instead of 30 × 40 tokens,
   and the reason a theme cannot half-apply: there is no surface, hairline or
   grey anywhere in the product that is not downstream of these numbers.

     --h-surf / --c-surf   the tint in the greys. 0 chroma = a true neutral.
     --h-text / --c-text   the tint in the text ramp. Kept far lower than the
                           surface tint; coloured body copy is a headache.
     --h-N / --c-N / --l-N the five palette tones, N = 1..5. Tone 1 is the
                           accent — the thing buttons and links are made of.

   A theme MAY also move the mode ladder (`--l-bg-*`) if its whole point is to
   be darker or flatter than the standard one, and MAY override the semantic
   hues, but both are exceptional and every case below says why.

   ----------------------------------------------------------------------------
   THE `dk-` / `lt-` PREFIX IS LOAD-BEARING

   tokens.css switches the light ladder on `[data-theme^="lt-"]`. A theme
   therefore carries its own mode and the boot script only ever sets one
   attribute. Rename a theme without its prefix and it will render its palette
   against the wrong ladder — which is a loud, immediate, obvious failure
   rather than a subtle one, and that is deliberate.

   ----------------------------------------------------------------------------
   PALETTE SIZE

   The product asks for one, two, three, four and five colour palettes, but no
   component should ever have to ask how many colours it may use — a chart with
   four series cannot check the theme first. So all five tone slots always
   exist, and a palette shorter than five CYCLES: a two-colour theme's tone 3 is
   its tone 1 again, tone 4 its tone 2, tone 5 its tone 1. The cycling happens
   once, in §7, for all themes of that size at once.

   ----------------------------------------------------------------------------
   THE GALLERY READS THIS FILE, NOT A COPY OF IT

   web/lib/theme.js carries ids and labels and nothing else. The swatches in
   the settings gallery are sampled from a hidden probe element carrying the
   real `data-theme`, so a swatch cannot drift from the theme it advertises.
   Add a theme here and in the list there; there is no third place.
   ========================================================================== */


/* ==========================================================================
   1. ONE COLOUR
   --------------------------------------------------------------------------
   A single tone doing every job: accent, chart, chip, focus ring. These live
   or die on the grey ramp, because the grey ramp is nearly all of what is on
   screen — which is exactly why they are worth having, and why they were
   impossible before this rewrite.
   ========================================================================== */

/* Neutral graphite. The reference point: no hue anywhere, tone 1 is a white.
   If something looks wrong on carbon, it is wrong in the layout, not the
   palette — which makes this the theme to debug in. */
[data-theme="dk-carbon"] {
  --h-surf: 0;    --c-surf: 0;
  --h-text: 0;    --c-text: 0;
  --h-1: 0;       --c-1: 0;       --l-1: 93%;
}

/* Pure black ground, pure white ink, nothing between them softened. Built for
   OLED and for members who find the standard dark theme muddy. The ladder is
   pushed down and spread out: the canvas is true black, so the rungs above it
   have to climb further to stay separable from it. */
[data-theme="dk-noir"] {
  --l-bg-0: 0%;   --l-bg-1: 11%;  --l-bg-2: 16%;  --l-bg-3: 20%;  --l-bg-4: 25%;
  --l-text-0: 100%; --l-text-1: 84%; --l-text-2: 70%; --l-text-3: 62%;
  --h-surf: 0;    --c-surf: 0;
  --h-text: 0;    --c-text: 0;
  --h-1: 0;       --c-1: 0;       --l-1: 100%;
}

/* The grow room reduced to its one true colour. Everything that used to be
   amber or violet is chartreuse now, which is either the most coherent theme
   here or the most relentless, depending on the hour. */
[data-theme="dk-chartreuse"] {
  --h-surf: 132;  --c-surf: 0.012;
  --h-text: 120;  --c-text: 0.006;
  --h-1: 130.2;   --c-1: 0.2165;  --l-1: 91.75%;
}

/* Amber monochrome — a CRT, a darkroom, a drying tent under HPS. The surface
   tint is warm and unusually strong for a dark theme because the whole point
   is that the light in the room has a colour. */
[data-theme="dk-amber"] {
  --h-surf: 70;   --c-surf: 0.016;
  --h-text: 80;   --c-text: 0.010;
  --h-1: 76;      --c-1: 0.155;   --l-1: 84%;
}

/* Warm paper. The default light theme: an off-white ground so that white cards
   read as cards, and a single warm near-black doing every job. */
[data-theme="lt-paper"] {
  --h-surf: 80;   --c-surf: 0.010;
  --h-text: 70;   --c-text: 0.008;
  --h-1: 60;      --c-1: 0.035;   --l-1: 28%;
}

/* Cool white with one cobalt. The most conventional theme in the catalogue and
   deliberately so — every product a member already uses looks roughly like
   this, and a familiar option is not a wasted slot. */
[data-theme="lt-cobalt"] {
  --h-surf: 250;  --c-surf: 0.006;
  --h-text: 250;  --c-text: 0.005;
  --h-1: 252;     --c-1: 0.170;   --l-1: 55%;
}


/* ==========================================================================
   2. TWO COLOURS
   --------------------------------------------------------------------------
   One to act with and one to warn with. Tone 2 is the second voice: the thing
   a chart's second series and a secondary chip are made of.
   ========================================================================== */

/* Phosphor green on black with amber for the second voice. A terminal, and
   like a terminal it lets the semantic hues be overridden — on this theme a
   warning IS amber, because there is no third colour for it to be. */
[data-theme="dk-terminal"] {
  --l-bg-0: 4%;   --l-bg-1: 12%;  --l-bg-2: 17%;  --l-bg-3: 21%;  --l-bg-4: 26%;
  --h-surf: 150;  --c-surf: 0.010;
  --h-text: 150;  --c-text: 0.012;
  --h-1: 148;     --c-1: 0.190;   --l-1: 86%;
  --h-2: 82;      --c-2: 0.150;   --l-2: 85%;
  --h-warn: 82;   --c-warn: 0.150;  --l-warn: 85%;
  --h-ok: 148;    --c-ok: 0.190;    --l-ok: 86%;
}

/* Deep sea. A navy-tinted dark with cyan and a coral to answer it — the coral
   is the only warm thing on the screen, which is what makes it readable as a
   signal at any size. */
[data-theme="dk-abyss"] {
  --h-surf: 245;  --c-surf: 0.018;
  --h-text: 240;  --c-text: 0.008;
  --h-1: 205;     --c-1: 0.135;   --l-1: 82%;
  --h-2: 25;      --c-2: 0.145;   --l-2: 76%;
}

/* Ember. Warm dark, orange and cream — a cure room at night. Tone 2 is nearly
   neutral on purpose: two hot colours would fight. */
[data-theme="dk-ember"] {
  --h-surf: 40;   --c-surf: 0.014;
  --h-text: 50;   --c-text: 0.007;
  --h-1: 48;      --c-1: 0.175;   --l-1: 78%;
  --h-2: 90;      --c-2: 0.045;   --l-2: 90%;
}

/* Ledger. White paper, ink blue, and the red that account books put losses in.
   Semantics stay standard — the red here is a palette colour, and a member
   must not have to work out whether a red number is a brand red or a real one. */
[data-theme="lt-ledger"] {
  --h-surf: 240;  --c-surf: 0.004;
  --h-text: 250;  --c-text: 0.006;
  --h-1: 265;     --c-1: 0.150;   --l-1: 42%;
  --h-2: 25;      --c-2: 0.180;   --l-2: 52%;
}

/* Mint. A cool, quiet light theme — the palest surfaces in the catalogue with
   a deep teal to hold them down. Built for long reading sessions. */
[data-theme="lt-mint"] {
  --h-surf: 170;  --c-surf: 0.008;
  --h-text: 180;  --c-text: 0.007;
  --h-1: 172;     --c-1: 0.120;   --l-1: 50%;
  --h-2: 300;     --c-2: 0.110;   --l-2: 52%;
}

/* Rose. Warm light with rose and plum. The softest theme here, and the only
   one whose surface tint is pink — which is enough on its own to make the
   whole product feel like a different product. */
[data-theme="lt-rose"] {
  --h-surf: 355;  --c-surf: 0.010;
  --h-text: 350;  --c-text: 0.008;
  --h-1: 12;      --c-1: 0.155;   --l-1: 56%;
  --h-2: 320;     --c-2: 0.130;   --l-2: 46%;
}


/* ==========================================================================
   3. THREE COLOURS
   --------------------------------------------------------------------------
   Enough for a stacked bar to be honest without repeating itself, which is why
   most of the product's charts were drawn against three to begin with.
   ========================================================================== */

/* THE DEFAULT. Chartreuse, HPS amber, LED violet — veg light, cure light,
   night spectra. Identical to the seeds in tokens.css §3, restated here so it
   can be picked in the gallery like any other. Do not change one without the
   other; a test asserts they resolve the same. */
[data-theme="dk-grow"] {
  --h-surf: 132;  --c-surf: 0.008;
  --h-text: 106;  --c-text: 0.0045;
  --h-1: 130.2;   --c-1: 0.2165;  --l-1: 91.75%;
  --h-2: 88.1;    --c-2: 0.1520;  --l-2: 87.41%;
  --h-3: 300.4;   --c-3: 0.1663;  --l-3: 72.95%;
}

/* VHS. Magenta, cyan, yellow on a blue-black — subtractive primaries, the
   colours a tape degrades into. The most saturated dark theme here. */
[data-theme="dk-vhs"] {
  --h-surf: 285;  --c-surf: 0.020;
  --h-text: 290;  --c-text: 0.006;
  --h-1: 330;     --c-1: 0.210;   --l-1: 74%;
  --h-2: 200;     --c-2: 0.140;   --l-2: 82%;
  --h-3: 95;      --c-3: 0.165;   --l-3: 90%;
}

/* Sepia. A brown-black ground with brass, rust and bone. Warm the whole way
   through, no cool anywhere — which is unusual enough that the semantic blues
   stand out sharply, and that is the point. */
[data-theme="dk-sepia"] {
  --h-surf: 60;   --c-surf: 0.022;
  --h-text: 65;   --c-text: 0.014;
  --h-1: 78;      --c-1: 0.125;   --l-1: 82%;
  --h-2: 40;      --c-2: 0.140;   --l-2: 70%;
  --h-3: 95;      --c-3: 0.055;   --l-3: 92%;
}

/* Studio. A true-neutral light theme with three unmixed primaries. Nothing is
   tinted, nothing is soft — the surfaces get out of the way completely and the
   only colour on screen is colour that means something. */
[data-theme="lt-studio"] {
  --h-surf: 0;    --c-surf: 0;
  --h-text: 0;    --c-text: 0;
  --h-1: 250;     --c-1: 0.185;   --l-1: 52%;
  --h-2: 45;      --c-2: 0.165;   --l-2: 62%;
  --h-3: 150;     --c-3: 0.150;   --l-3: 55%;
}

/* Sakura. Pink, sage and gold on warm white. The gentlest palette here and the
   one most likely to be picked for a grow diary rather than for the feed. */
[data-theme="lt-sakura"] {
  --h-surf: 350;  --c-surf: 0.008;
  --h-text: 340;  --c-text: 0.006;
  --h-1: 355;     --c-1: 0.130;   --l-1: 58%;
  --h-2: 145;     --c-2: 0.085;   --l-2: 52%;
  --h-3: 80;      --c-3: 0.125;   --l-3: 62%;
}

/* Nordic. Cool grey-blue light with steel, rust and moss — muted on purpose,
   every tone under 0.13 chroma. The counterweight to lt-citrus. */
[data-theme="lt-nordic"] {
  --h-surf: 230;  --c-surf: 0.008;
  --h-text: 235;  --c-text: 0.008;
  --h-1: 235;     --c-1: 0.105;   --l-1: 48%;
  --h-2: 42;      --c-2: 0.115;   --l-2: 54%;
  --h-3: 145;     --c-3: 0.095;   --l-3: 50%;
}


/* ==========================================================================
   4. FOUR COLOURS
   ========================================================================== */

/* Neon. Magenta, cyan, lime and orange on black — a grow tent seen through a
   shop window at 2am. Every tone is at or near the sRGB gamut edge, so this is
   the theme that proves the tone interface holds when the colours are extreme.
   The canvas drops to true black to keep the glows from washing it out. */
[data-theme="dk-neon"] {
  --l-bg-0: 3%;   --l-bg-1: 12%;  --l-bg-2: 17%;  --l-bg-3: 21%;  --l-bg-4: 26%;
  --h-surf: 300;  --c-surf: 0.016;
  --h-text: 300;  --c-text: 0.005;
  --h-1: 328;     --c-1: 0.240;   --l-1: 72%;
  --h-2: 195;     --c-2: 0.155;   --l-2: 84%;
  --h-3: 135;     --c-3: 0.230;   --l-3: 90%;
  --h-4: 55;      --c-4: 0.185;   --l-4: 78%;
}

/* Forest. Moss, bark, sky and amber on a green-black. The most literal reading
   of what this product is about, and the one that most rewards the three.js
   room: canopy.js keys its light off tone 1 and tone 4, so on this theme the
   ambient goes green under a warm fill. */
[data-theme="dk-forest"] {
  --h-surf: 145;  --c-surf: 0.016;
  --h-text: 140;  --c-text: 0.008;
  --h-1: 145;     --c-1: 0.145;   --l-1: 82%;
  --h-2: 60;      --c-2: 0.075;   --l-2: 72%;
  --h-3: 225;     --c-3: 0.115;   --l-3: 80%;
  --h-4: 70;      --c-4: 0.150;   --l-4: 86%;
}

/* Jewel. Emerald, sapphire, ruby, topaz on near-black. Deep and even —
   all four tones sit within four points of lightness of each other, so no
   single one grabs the eye first and a four-series chart reads as four peers. */
[data-theme="dk-jewel"] {
  --h-surf: 280;  --c-surf: 0.012;
  --h-text: 270;  --c-text: 0.005;
  --h-1: 160;     --c-1: 0.150;   --l-1: 78%;
  --h-2: 255;     --c-2: 0.145;   --l-2: 76%;
  --h-3: 15;      --c-3: 0.175;   --l-3: 74%;
  --h-4: 85;      --c-4: 0.155;   --l-4: 80%;
}

/* Citrus. Lemon, lime, orange, grapefruit on white. Loud, and the only light
   theme whose tone 1 is bright enough that the auto-ink rule flips it to black
   text — which is precisely the case a hand-picked ink value would have got
   wrong. */
[data-theme="lt-citrus"] {
  --h-surf: 95;   --c-surf: 0.010;
  --h-text: 90;   --c-text: 0.006;
  --h-1: 60;      --c-1: 0.165;   --l-1: 62%;
  --h-2: 130;     --c-2: 0.155;   --l-2: 60%;
  --h-3: 45;      --c-3: 0.175;   --l-3: 64%;
  --h-4: 20;      --c-4: 0.165;   --l-4: 58%;
}

/* Pastel. Mint, periwinkle, peach, lilac. Low chroma across the board, which
   on a light ground is the hardest thing to keep accessible — every tone here
   is pinned at 55% lightness so a fill still clears 4.5:1 with white ink. */
[data-theme="lt-pastel"] {
  --h-surf: 280;  --c-surf: 0.008;
  --h-text: 280;  --c-text: 0.006;
  --h-1: 175;     --c-1: 0.095;   --l-1: 55%;
  --h-2: 265;     --c-2: 0.105;   --l-2: 55%;
  --h-3: 35;      --c-3: 0.110;   --l-3: 57%;
  --h-4: 310;     --c-4: 0.100;   --l-4: 55%;
}

/* Bauhaus. Red, blue, yellow and black on paper white, no tint in the greys at
   all. The primaries are stated at full strength because the whole idea is
   that a colour is either itself or absent. */
[data-theme="lt-bauhaus"] {
  --h-surf: 0;    --c-surf: 0;
  --h-text: 0;    --c-text: 0;
  --l-bg-0: 97.5%; --l-bg-1: 100%; --l-bg-2: 100%; --l-bg-3: 100%; --l-bg-4: 93%;
  --h-1: 27;      --c-1: 0.200;   --l-1: 55%;
  --h-2: 258;     --c-2: 0.190;   --l-2: 48%;
  --h-3: 90;      --c-3: 0.170;   --l-3: 65%;
  --h-4: 0;       --c-4: 0;       --l-4: 20%;
}


/* ==========================================================================
   5. FIVE COLOURS
   --------------------------------------------------------------------------
   The full interface. Anything the product can draw — a five-series chart, a
   five-strain comparison, a phase timeline — has a distinct colour here and
   never has to reuse one.
   ========================================================================== */

/* Spectrum. Red through violet, evenly spaced around the hue wheel at one
   lightness. The reference five-colour palette: if a chart is unreadable on
   spectrum it is the chart's fault. */
[data-theme="dk-spectrum"] {
  --h-surf: 0;    --c-surf: 0;
  --h-text: 0;    --c-text: 0;
  --h-1: 25;      --c-1: 0.175;   --l-1: 78%;
  --h-2: 90;      --c-2: 0.165;   --l-2: 88%;
  --h-3: 155;     --c-3: 0.155;   --l-3: 82%;
  --h-4: 245;     --c-4: 0.140;   --l-4: 76%;
  --h-5: 315;     --c-5: 0.180;   --l-5: 74%;
}

/* Aurora. Green, teal, blue, violet, magenta — a walk along one half of the
   wheel, so the five tones read as a sequence rather than as five categories.
   The right theme for anything ordinal: a timeline, a ramp, a week. */
[data-theme="dk-aurora"] {
  --h-surf: 240;  --c-surf: 0.020;
  --h-text: 250;  --c-text: 0.006;
  --h-1: 150;     --c-1: 0.165;   --l-1: 86%;
  --h-2: 190;     --c-2: 0.130;   --l-2: 84%;
  --h-3: 240;     --c-3: 0.140;   --l-3: 78%;
  --h-4: 290;     --c-4: 0.160;   --l-4: 76%;
  --h-5: 335;     --c-5: 0.185;   --l-5: 76%;
}

/* Canopy. The five grow tones in full — chartreuse, amber, violet,
   chlorophyll, anthocyanin. dk-grow with the two colours it never exposed,
   and the theme the five-part strain charts were designed against. */
[data-theme="dk-canopy"] {
  --h-surf: 132;  --c-surf: 0.010;
  --h-text: 106;  --c-text: 0.0045;
  --h-1: 130.2;   --c-1: 0.2165;  --l-1: 91.75%;
  --h-2: 88.1;    --c-2: 0.1520;  --l-2: 87.41%;
  --h-3: 300.4;   --c-3: 0.1663;  --l-3: 72.95%;
  --h-4: 154.6;   --c-4: 0.1722;  --l-4: 80.24%;
  --h-5: 339.8;   --c-5: 0.2139;  --l-5: 74.34%;
}

/* Dusk. Five muted tones on a violet-black — the only five-colour dark theme
   that is not loud. Every chroma is under 0.13, which makes it the one to pick
   when the screen is mostly photographs and the UI should not compete. */
[data-theme="dk-dusk"] {
  --h-surf: 300;  --c-surf: 0.014;
  --h-text: 300;  --c-text: 0.007;
  --h-1: 25;      --c-1: 0.105;   --l-1: 80%;
  --h-2: 75;      --c-2: 0.100;   --l-2: 84%;
  --h-3: 165;     --c-3: 0.090;   --l-3: 82%;
  --h-4: 255;     --c-4: 0.095;   --l-4: 78%;
  --h-5: 320;     --c-5: 0.105;   --l-5: 78%;
}

/* Garden. Five botanical colours on warm white — leaf, soil, sky, flower,
   fruit. The light counterpart to dk-canopy. */
[data-theme="lt-garden"] {
  --h-surf: 120;  --c-surf: 0.010;
  --h-text: 120;  --c-text: 0.007;
  --h-1: 140;     --c-1: 0.130;   --l-1: 48%;
  --h-2: 55;      --c-2: 0.090;   --l-2: 45%;
  --h-3: 230;     --c-3: 0.130;   --l-3: 55%;
  --h-4: 325;     --c-4: 0.140;   --l-4: 55%;
  --h-5: 30;      --c-5: 0.155;   --l-5: 57%;
}

/* Atlas. Five map colours on a paper-grey — the muted, high-legibility set a
   printed chart uses when all five series matter equally and none of them is
   the headline. */
[data-theme="lt-atlas"] {
  --h-surf: 90;   --c-surf: 0.006;
  --h-text: 90;   --c-text: 0.005;
  --h-1: 215;     --c-1: 0.110;   --l-1: 50%;
  --h-2: 30;      --c-2: 0.125;   --l-2: 55%;
  --h-3: 155;     --c-3: 0.100;   --l-3: 48%;
  --h-4: 300;     --c-4: 0.110;   --l-4: 52%;
  --h-5: 75;      --c-5: 0.115;   --l-5: 58%;
}


/* ==========================================================================
   6. SIX BY NAME
   --------------------------------------------------------------------------
   Spread across the palette sizes rather than adding a sixth row. These exist
   because people ask for them by name — matrix, blueprint, solarized — and a
   catalogue that omits the ones with names has a hole in it regardless of how
   well the grid is covered.
   ========================================================================== */

/* Matrix — one colour, and the ladder flattened so the whole screen sits in a
   narrow band of green-black. */
[data-theme="dk-matrix"] {
  --l-bg-0: 6%;   --l-bg-1: 10%;  --l-bg-2: 13%;  --l-bg-3: 16%;  --l-bg-4: 20%;
  --h-surf: 150;  --c-surf: 0.024;
  --h-text: 150;  --c-text: 0.030;
  --h-1: 148;     --c-1: 0.230;   --l-1: 88%;
}

/* Blueprint — two colours, cyan on a drafting blue. The surface tint is the
   strongest in the catalogue; this is a theme about its ground. */
[data-theme="dk-blueprint"] {
  --h-surf: 255;  --c-surf: 0.038;
  --h-text: 250;  --c-text: 0.014;
  --h-1: 210;     --c-1: 0.130;   --l-1: 88%;
  --h-2: 40;      --c-2: 0.130;   --l-2: 82%;
}

/* Sand — two colours, a light theme with a genuinely beige canvas rather than
   a white one. The one light theme where cards are clearly a different
   material from the page. */
[data-theme="lt-sand"] {
  --l-bg-0: 93.5%; --l-bg-1: 98%; --l-bg-2: 99.5%; --l-bg-3: 99.5%; --l-bg-4: 90%;
  --h-surf: 75;   --c-surf: 0.024;
  --h-text: 70;   --c-text: 0.012;
  --c-scale-surf: 1;   /* the light ladder damps surface tint to 0.42 because
                          tinted whites go dirty; this theme wants the dirt */
  --h-1: 45;      --c-1: 0.130;   --l-1: 48%;
  --h-2: 170;     --c-2: 0.105;   --l-2: 45%;
}

/* Slate — three colours, cool neutral light. The office theme. */
[data-theme="lt-slate"] {
  --h-surf: 250;  --c-surf: 0.005;
  --h-text: 250;  --c-text: 0.004;
  --h-1: 245;     --c-1: 0.135;   --l-1: 50%;
  --h-2: 190;     --c-2: 0.110;   --l-2: 48%;
  --h-3: 30;      --c-3: 0.140;   --l-3: 55%;
}

/* Wine — three colours on an oxblood-black. Warm, low, and the only dark theme
   with a red ground, so its `--danger` is deliberately pushed toward orange:
   a red alert on a red page is not an alert. */
[data-theme="dk-wine"] {
  --h-surf: 15;   --c-surf: 0.020;
  --h-text: 20;   --c-text: 0.008;
  --h-1: 350;     --c-1: 0.150;   --l-1: 74%;
  --h-2: 65;      --c-2: 0.120;   --l-2: 84%;
  --h-3: 275;     --c-3: 0.120;   --l-3: 76%;
  --h-danger: 45; --c-danger: 0.190;  --l-danger: 76%;
}

/* Solar — four colours, a light theme built on the Solarized ratios: a fixed
   low-chroma ground and four tones that sit at one lightness so none of them
   dominates. */
[data-theme="lt-solar"] {
  --l-bg-0: 94.5%; --l-bg-1: 97.5%; --l-bg-2: 99%; --l-bg-3: 99%; --l-bg-4: 91.5%;
  --h-surf: 90;   --c-surf: 0.020;
  --h-text: 200;  --c-text: 0.020;
  --c-scale-surf: 1;  --c-scale-text: 1;   /* Solarized is its tint; see lt-sand */
  --h-1: 195;     --c-1: 0.100;   --l-1: 55%;
  --h-2: 25;      --c-2: 0.140;   --l-2: 55%;
  --h-3: 130;     --c-3: 0.120;   --l-3: 55%;
  --h-4: 300;     --c-4: 0.115;   --l-4: 55%;
}


/* ==========================================================================
   7. PALETTE CYCLING
   --------------------------------------------------------------------------
   Every theme above states only as many tones as it has colours. These blocks
   fill the remaining slots by cycling, so all five always resolve and no
   component ever has to know how many colours the current theme owns.

   Order matters: these come after the definitions, so they win for the slots a
   theme left unset, and they never touch a slot a theme did set.
   ========================================================================== */

/* One colour — every slot is tone 1. */
[data-theme="dk-carbon"], [data-theme="dk-noir"], [data-theme="dk-chartreuse"],
[data-theme="dk-amber"],  [data-theme="dk-matrix"],
[data-theme="lt-paper"],  [data-theme="lt-cobalt"] {
  --h-2: var(--h-1); --c-2: var(--c-1); --l-2: var(--l-1);
  --h-3: var(--h-1); --c-3: var(--c-1); --l-3: var(--l-1);
  --h-4: var(--h-1); --c-4: var(--c-1); --l-4: var(--l-1);
  --h-5: var(--h-1); --c-5: var(--c-1); --l-5: var(--l-1);
}

/* Two colours — 1, 2, 1, 2, 1. */
[data-theme="dk-terminal"], [data-theme="dk-abyss"], [data-theme="dk-ember"],
[data-theme="dk-blueprint"],
[data-theme="lt-ledger"],   [data-theme="lt-mint"],  [data-theme="lt-rose"],
[data-theme="lt-sand"] {
  --h-3: var(--h-1); --c-3: var(--c-1); --l-3: var(--l-1);
  --h-4: var(--h-2); --c-4: var(--c-2); --l-4: var(--l-2);
  --h-5: var(--h-1); --c-5: var(--c-1); --l-5: var(--l-1);
}

/* Three colours — 1, 2, 3, 1, 2. */
[data-theme="dk-grow"],  [data-theme="dk-vhs"],    [data-theme="dk-sepia"],
[data-theme="dk-wine"],
[data-theme="lt-studio"],[data-theme="lt-sakura"], [data-theme="lt-nordic"],
[data-theme="lt-slate"] {
  --h-4: var(--h-1); --c-4: var(--c-1); --l-4: var(--l-1);
  --h-5: var(--h-2); --c-5: var(--c-2); --l-5: var(--l-2);
}

/* Four colours — the fifth slot is tone 1 again. */
[data-theme="dk-neon"],    [data-theme="dk-forest"],  [data-theme="dk-jewel"],
[data-theme="lt-citrus"],  [data-theme="lt-pastel"],  [data-theme="lt-bauhaus"],
[data-theme="lt-solar"] {
  --h-5: var(--h-1); --c-5: var(--c-1); --l-5: var(--l-1);
}
