/* ── Reset ────────────────────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { overflow-x: hidden; width: 100%; font-size: 16px; }

/* ── Design tokens ────────────────────────────────────────────────
   Colour roles (every theme sets all of them):
     --tn-text-bright  primary text          --tn-text      secondary text
     --tn-text-dim     muted / captions      --tn-text-muted quiet UI text
     --tn-mint         headings, highlight   --tn-teal      accent (actions, active)
     --tn-purple       links                 --tn-amber / --tn-coral / --tn-danger / --tn-success  status
     --tn-bg / --tn-canvas / --tn-bg-deep / --tn-panel-solid / --tn-surface-deep  surfaces
     --tn-tint-rgb     light-on-dark wash (white in dark themes, ink in light ones)
     --tn-shade-rgb    panel fill behind text (black in dark themes, paper in light ones)
   Each colour also has an -rgb triplet for alpha: rgb(var(--tn-teal-rgb) / .3).
   Themes: html[data-theme] = one of the eight WD sun-palette families
   (pale-lithium-green, coral-ember, apricot-glow, azure-calcium, sirius-blue,
   carbon-pink, lime-chiffon, pearl-white; colour study by Mark Hollands,
   University of Warwick) or the Terp original permissionless. Set before first
   paint by lib/shell/shell.js, which also maps the old ids (default, light,
   sandman) and sets html[data-tn-mode] = light | dark.
   The base blocks below give each mode its full token set; the generated
   WD-THEMES block after them retunes surfaces, text and accent per family. */
:root, html[data-theme="default"], html[data-theme="pale-lithium-green"] {
    /* Type */
    --tn-font: 'Satoshi', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --tn-font-display: var(--tn-font);
    --tn-font-mono: ui-monospace, 'SF Mono', 'Cascadia Code', 'Consolas', 'Courier New', monospace;
    --tn-font-weight-body: 400;
    --tn-font-weight-ui: 400;
    --tn-font-weight-medium: 500;
    --tn-font-weight-strong: 600;
    --tn-text-base: 0.95rem;
    --tn-line-body: 1.55;
    --tn-line-tight: 1.25;
    --tn-letter-kicker: 0.1em;
    /* Type scale (roles) */
    --tn-size-display: clamp(1.6rem, 1.1rem + 2.2vw, 2.4rem);
    --tn-size-title: 1.4rem;
    --tn-size-heading: 1.06rem;
    --tn-size-body: var(--tn-text-base);
    --tn-size-small: 0.86rem;
    --tn-size-caption: 0.78rem;
    --tn-size-label: 0.7rem;
    --tn-size-kicker: 0.8rem;
    --tn-track-display: -0.015em;
    --tn-track-heading: -0.005em;
    --tn-track-nav: 0.02em;
    --tn-track-label: 0.08em;
    --tn-weight-display: 500;
    --tn-header-max: 1100px;
    --tn-header-h: 3.75rem;
    --tn-radius: 8px;
    --tn-radius-sm: 4px;
    --tn-radius-ctl: 2px;
    /* Text drawn in a translucent ink never fades below this (contrast floor). */
    --tn-alpha-floor: 0.66;

    /* Surfaces */
    --tn-bg: #000000;
    --tn-canvas: #0b0f0d;        --tn-canvas-rgb: 11 15 13;
    --tn-bg-deep: #07080b;       --tn-bg-deep-rgb: 8 9 13;
    --tn-panel: rgba(255, 255, 255, 0.03);
    --tn-panel-solid: #14161a;
    --tn-surface-deep: #0a0a0f;
    --tn-on-accent: #0a0a0f;
    --tn-tint-rgb: 255 255 255;
    --tn-shade-rgb: 0 0 0;
    --tn-shadow-rgb: 0 0 0;
    --tn-shadow-k: 1;

    /* Ink */
    --tn-teal: #98e8c1;          --tn-teal-rgb: 152 232 193;
    --tn-teal-hover: #b0f0d0;
    --tn-mint: #cfffcf;          --tn-mint-rgb: 207 255 207;
    --tn-text: #d2d3d8;          --tn-text-rgb: 210 211 216;
    --tn-text-bright: #f8f8f2;   --tn-text-bright-rgb: 248 248 242;
    --tn-text-dim: #7d8bba;      --tn-text-dim-rgb: 125 139 186;
    --tn-text-muted: #a3ada6;
    --tn-kicker: #ffffda;        --tn-kicker-rgb: 255 255 218;
    --tn-purple: #bd93f9;        --tn-purple-rgb: 189 147 249;
    --tn-coral: #fe7d7d;         --tn-coral-rgb: 254 125 125;
    --tn-amber: #ffb86c;         --tn-amber-rgb: 255 184 108;
    --tn-danger: #ff5555;        --tn-danger-rgb: 255 85 85;
    --tn-error: #ffb4a8;         --tn-error-rgb: 255 180 168;
    --tn-warn: #e9d27a;
    --tn-success: #55efc4;       --tn-success-rgb: 85 239 196;
    --tn-rot-a: var(--tn-success); --tn-rot-b: #c6ec8a; --tn-rot-c: #e2f7a0; /* landing word gradient */

    /* CSS glows (box-shadow blooms): colour and strength. Paper themes use a pale
       tint so a glow reads as light on paper, never as a dark shadow. */
    --tn-halo-rgb: var(--tn-teal-rgb);
    --tn-halo-k: 1;

    /* Code blocks (.tn-code, wrapped by lib/shell/shell.js) */
    --tn-code-frame: #101312;
    --tn-code-bg: #07080b;
    --tn-code-border: rgb(255 255 255 / 0.12);
    --tn-code-text: #e6ece7;
    --tn-code-cmd: #bd93f9;
    --tn-code-val: #98e8c1;
    --tn-code-muted: #8a95a8;
    --tn-code-scroll: rgb(255 255 255 / 0.22);

    /* Navigation canvas (lib/fractal/world.js reads these) */
    --tn-orb-blend: lighter;
    --tn-orb-mode: glow;
    --tnw-bg-2: #121815;
    --tnw-ink: #e6ece7;          --tnw-ink-rgb: 230 236 231;
    --tnw-amber: #e0b36a;
    --tnw-focus: #ffe7a8;
    --tnw-strong: #ffffff;
}

html[data-theme="light"], html[data-theme="coral-ember"], html[data-theme="lime-chiffon"], html[data-theme="pearl-white"], html[data-theme="apricot-glow"] {
    --tn-alpha-floor: 0.97;
    --tn-font-weight-body: 400;
    --tn-bg: #f6f7f5;
    --tn-canvas: #f3f5f2;        --tn-canvas-rgb: 243 245 242;
    --tn-bg-deep: #e8ebe7;       --tn-bg-deep-rgb: 232 235 231;
    --tn-panel: rgba(20, 24, 26, 0.03);
    --tn-panel-solid: #ffffff;
    --tn-surface-deep: #ffffff;
    --tn-on-accent: #ffffff;
    --tn-tint-rgb: 20 26 24;
    --tn-shade-rgb: 255 255 255;
    --tn-shadow-rgb: 24 34 30;
    --tn-shadow-k: 0.3;
    /* Accent: orange (see notes/detail-pass-8.md for how it was chosen) */
    --tn-teal: #af5400;          --tn-teal-rgb: 175 84 0;
    --tn-teal-hover: #994600;
    --tn-mint: #813d00;          --tn-mint-rgb: 129 61 0;
    --tn-text: #384044;          --tn-text-rgb: 56 64 68;
    --tn-text-bright: #121618;   --tn-text-bright-rgb: 18 22 24;
    --tn-text-dim: #555e70;      --tn-text-dim-rgb: 85 94 112;
    --tn-text-muted: #545d58;
    --tn-kicker: #5a4a12;        --tn-kicker-rgb: 90 74 18;
    --tn-purple: #5f35b5;        --tn-purple-rgb: 95 53 181;
    --tn-coral: #a8281f;         --tn-coral-rgb: 168 40 31;
    --tn-amber: #8a4f00;         --tn-amber-rgb: 138 79 0;
    --tn-danger: #b0261c;        --tn-danger-rgb: 176 38 28;
    --tn-error: #a3301e;         --tn-error-rgb: 163 48 30;
    --tn-warn: #765800;
    --tn-success: #0b7350;       --tn-success-rgb: 11 115 80;
    --tn-rot-a: #af5400; --tn-rot-b: #a94700; --tn-rot-c: #965e00;
    --tn-halo-rgb: 239 205 178;
    --tn-halo-k: 3;
    --tn-code-frame: #ffffff;
    --tn-code-bg: #eef0ec;
    --tn-code-border: rgb(20 26 24 / 0.16);
    --tn-code-text: #121618;
    --tn-code-cmd: #5f35b5;
    --tn-code-val: #8f4400;
    --tn-code-muted: #555e70;
    --tn-code-scroll: rgb(20 26 24 / 0.25);
    --tn-orb-blend: source-over;
    --tn-orb-mode: ink;
    --tn-orb-ink-accent: 0.7;
    --tnw-bg-2: #e8ebe7;
    --tnw-ink: #161a1c;          --tnw-ink-rgb: 22 26 28;
    --tnw-amber: #8a4f00;
    --tnw-focus: #af5400;
    --tnw-strong: #000000;
}

/* Permissionless: the permissionless.money fractal palette (hopalong generator:
   field #08090d, points #b1ebeb, strokes #bd93f9; site greys and accents). */
html[data-theme="permissionless"] {
    --tn-alpha-floor: 0.74;
    --tn-bg: #08090d;
    --tn-canvas: #08090d;        --tn-canvas-rgb: 8 9 13;
    --tn-bg-deep: #07080b;       --tn-bg-deep-rgb: 7 8 11;
    --tn-panel: rgba(236, 236, 232, 0.03);
    --tn-panel-solid: #0c0e12;
    --tn-surface-deep: #07080b;
    --tn-on-accent: #08090d;
    --tn-tint-rgb: 236 236 232;
    --tn-shade-rgb: 7 8 11;
    --tn-teal: #b1ebeb;          --tn-teal-rgb: 177 235 235;
    --tn-teal-hover: #c8ecec;
    --tn-mint: #c8ecec;          --tn-mint-rgb: 200 236 236;
    --tn-text: #b9b9b2;          --tn-text-rgb: 185 185 178;
    --tn-text-bright: #ecece8;   --tn-text-bright-rgb: 236 236 232;
    --tn-text-dim: #8a8a82;      --tn-text-dim-rgb: 138 138 130;
    --tn-text-muted: #9a9a92;
    --tn-kicker: #c4a574;        --tn-kicker-rgb: 196 165 116;
    --tn-purple: #bd93f9;        --tn-purple-rgb: 189 147 249;
    --tn-coral: #e0907f;         --tn-coral-rgb: 224 144 127;
    --tn-amber: #c4a574;         --tn-amber-rgb: 196 165 116;
    --tn-danger: #f07f7f;        --tn-danger-rgb: 240 127 127;
    --tn-error: #f0a89c;         --tn-error-rgb: 240 168 156;
    --tn-warn: #c4a574;
    --tn-success: #9dba9a;       --tn-success-rgb: 157 186 154;
    --tn-rot-a: #b1ebeb; --tn-rot-b: #c8ecec; --tn-rot-c: #bd93f9;
    --tn-glow-rgb: 84 226 231;     /* hopalong points, oklch(.84 .12 198) */
    --tn-glow-2-rgb: 187 145 255;  /* hopalong strokes, oklch(.74 .17 300) */
    --tn-glow-k: 1;
    --tn-glow-tk: 1;
    --tn-orb-color: oklch;         /* OKLCH glow renderer (lib/fractal/world.js); other themes keep the original */
    --tn-orb-blend: screen;
    --tn-orb-mode: fractal;
    --tn-orb-lc: 0.7 0.18;
    --tn-orb-core: 0.16 0.65;
    --tnw-bg-2: #0c0e12;
    --tnw-ink: #ecece8;          --tnw-ink-rgb: 236 236 232;
    --tnw-amber: #c4a574;
    --tnw-focus: #c8ecec;
    --tnw-strong: #ffffff;
    --tn-glow-text: 0 0 2px rgb(var(--tn-glow-rgb) / calc(0.32 * var(--tn-glow-tk))), 0 0 4.6px rgb(var(--tn-glow-rgb) / calc(0.2 * var(--tn-glow-tk))), 0 0 9.2px rgb(var(--tn-glow-rgb) / calc(0.12 * var(--tn-glow-tk)));
    --tn-glow-ring: 0 0 0 1px rgb(var(--tn-glow-rgb) / calc(0.22 * var(--tn-glow-k))), 0 0 4.6px rgb(var(--tn-glow-rgb) / calc(0.2 * var(--tn-glow-k))), 0 0 14px rgb(var(--tn-glow-rgb) / calc(0.12 * var(--tn-glow-k)));
    --tn-glow-bar: 0 2px 4.6px -1px rgb(var(--tn-glow-rgb) / calc(0.55 * var(--tn-glow-k)));
    --tn-code-frame: #0c0e12;
    --tn-code-bg: #07080b;
    --tn-code-border: rgb(236 236 232 / 0.12);
    --tn-code-text: #ecece8;
    --tn-code-cmd: #bd93f9;
    --tn-code-val: #b1ebeb;
    --tn-code-muted: #8a8a82;
    --tn-code-scroll: rgb(236 236 232 / 0.22);
}


/* Sandman: the terp-core operator guide (paper #f7f4ee, ink #1c1915,
   rust #8a3d22, Iowan Old Style). Flat paper, no texture. */
html[data-theme="sandman"], html[data-theme="apricot-glow"] {
    --tn-alpha-floor: 0.92;
    --tn-font: 'Iowan Old Style', Palatino, 'Palatino Linotype', Georgia, serif;
    --tn-font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    --tn-text-base: 1.02rem;
    --tn-weight-display: 500;
    --tn-track-display: -0.03em;
    --tn-track-heading: -0.01em;
    --tn-track-nav: 0.01em;
    --tn-track-label: 0.04em;
    --tn-radius: 0.6rem;
    --tn-bg: #f7f4ee;
    --tn-canvas: #f7f4ee;        --tn-canvas-rgb: 247 244 238;
    --tn-bg-deep: #efeae2;       --tn-bg-deep-rgb: 239 234 226;
    --tn-panel: rgba(255, 253, 249, 0.7);
    --tn-panel-solid: #fffdf9;
    --tn-surface-deep: #fffdf9;
    --tn-on-accent: #fffdf9;
    --tn-tint-rgb: 28 25 21;
    --tn-shade-rgb: 255 253 249;
    --tn-shadow-rgb: 60 45 30;
    --tn-shadow-k: 0.25;
    --tn-teal: #8a3d22;          --tn-teal-rgb: 138 61 34;
    --tn-teal-hover: #6f2f19;
    --tn-mint: #1c1915;          --tn-mint-rgb: 28 25 21;
    --tn-text: #3a352e;          --tn-text-rgb: 58 53 46;
    --tn-text-bright: #1c1915;   --tn-text-bright-rgb: 28 25 21;
    --tn-text-dim: #5c564c;      --tn-text-dim-rgb: 92 86 76;
    --tn-text-muted: #5c564c;
    --tn-kicker: #8a3d22;        --tn-kicker-rgb: 138 61 34;
    --tn-purple: #8a3d22;        --tn-purple-rgb: 138 61 34;
    --tn-coral: #9c2f1c;         --tn-coral-rgb: 156 47 28;
    --tn-amber: #7a5212;         --tn-amber-rgb: 122 82 18;
    --tn-danger: #9c2f1c;        --tn-danger-rgb: 156 47 28;
    --tn-error: #9c2f1c;         --tn-error-rgb: 156 47 28;
    --tn-warn: #7a5212;
    --tn-success: #3f6b3a;       --tn-success-rgb: 63 107 58;
    --tn-rot-a: #8a3d22; --tn-rot-b: #6f4a1a; --tn-rot-c: #4f5a1e;
    --tn-halo-rgb: 228 196 184;
    --tn-halo-k: 3;
    --tn-code-frame: #fffdf9;
    --tn-code-bg: #efeae2;
    --tn-code-border: rgb(28 25 21 / 0.16);
    --tn-code-text: #1c1915;
    --tn-code-cmd: #8a3d22;
    --tn-code-val: #3f6b3a;
    --tn-code-muted: #5c564c;
    --tn-code-scroll: rgb(28 25 21 / 0.25);
    --tn-orb-blend: source-over;
    --tn-orb-mode: ink;
    --tnw-bg-2: #efeae2;
    --tnw-ink: #1c1915;          --tnw-ink-rgb: 28 25 21;
    --tnw-amber: #8a3d22;
    --tnw-focus: #8a3d22;
    --tnw-strong: #000000;
}
html:is([data-theme="sandman"], [data-theme="apricot-glow"]) :is(pre, code, kbd, samp):not([class*="tnw"]) { background-color: var(--tnw-bg-2); }

/* WD-THEMES:BEGIN — generated by scripts/gen-wd-themes.mjs from the WD colour
   study (sun palette by Mark Hollands, University of Warwick). Do not hand-edit;
   change the study or the script and run it with --write. */
html[data-theme="pale-lithium-green"] {
    --tn-bg: #0b1105;
    --tn-canvas: #0b1105;
    --tn-canvas-rgb: 11 17 5;
    --tn-bg-deep: #060c02;
    --tn-bg-deep-rgb: 6 12 2;
    --tn-panel-solid: #161d0f;
    --tn-surface-deep: #060c02;
    --tn-on-accent: #1d2218;
    --tn-teal: #b4d595;
    --tn-teal-rgb: 180 213 149;
    --tn-teal-hover: #c7e9a8;
    --tn-mint: #d4fab1;
    --tn-mint-rgb: 212 250 177;
    --tn-text: #e7efe1;
    --tn-text-rgb: 231 239 225;
    --tn-text-bright: #f4f8f2;
    --tn-text-bright-rgb: 244 248 242;
    --tn-text-dim: #b0baa7;
    --tn-text-dim-rgb: 176 186 167;
    --tn-text-muted: #b0baa7;
    --tn-kicker: #b4d595;
    --tn-kicker-rgb: 180 213 149;
    --tn-rot-a: #b4d595;
    --tn-rot-b: #b4d595;
    --tn-rot-c: #c5e9a3;
    --tn-halo-rgb: 180 213 149;
    --tn-code-frame: #161d0f;
    --tn-code-bg: #060c02;
    --tn-code-border: rgb(48 57 41 / 0.9);
    --tnw-bg-2: #242b1c;
    --tnw-focus: #b4d595;
    --tnw-ink: #f4f8f2;
    --tnw-ink-rgb: 244 248 242;
    --tn-wd-swatch-a: #0b1105;
    --tn-wd-swatch-b: #b4d595;
    --tnw-link: #b4d595;
    --tnw-link-hover: #c7e9a8;
    --tnw-heading: #f4f8f2;
    --tnw-subheading: #c5e9a3;
    --tnw-close: #b0baa7;
    --tnw-close-hover: #f4f8f2;
    --tnw-close-ring: rgb(103 122 85 / 0.7);
    --tnw-eco-hover-wash: rgb(180 213 149 / 0.08);
    --tnw-eco-hover-ring: rgb(180 213 149 / 0.5);
    --tn-purple: #87deb1;
    --tn-purple-rgb: 135 222 177;
    --tn-amber: #dfb4ff;
    --tn-amber-rgb: 223 180 255;
    --tnw-amber: #dfb4ff;
    --tn-coral: #ffa098;
    --tn-coral-rgb: 255 160 152;
    --tn-danger: #ffa098;
    --tn-danger-rgb: 255 160 152;
    --tn-error: #ffa098;
    --tn-error-rgb: 255 160 152;
    --tn-success: #72d699;
    --tn-success-rgb: 114 214 153;
    --tn-warn: #f1c45e;
    --tnw-strong: #ffffff;
    --tnw-tint: 180, 213, 149;
    --tn-code-text: #f4f8f2;
    --tn-code-cmd: #87deb1;
    --tn-code-val: #c5e9a3;
    --tn-code-muted: #b0baa7;
    --tn-code-scroll: rgb(103 122 85 / 0.6);
    --tnw-code-bg: #060c02;
    --tnw-code-text: #f4f8f2;
    --tnw-code-keyword: #b4d595;
    --tnw-code-string: #d6ca7e;
    --tnw-code-number: #dfb4ff;
    --tnw-code-fn: #87deb1;
    --tnw-code-comment: #b0baa7;
    --tnw-code-value: #c5e9a3;
    --tnw-title-shade-rgb: 6 12 2;
    --tnw-series-live: #d6ca7e;
    --tnw-series-live-rgb: 214 202 126;
    --tnw-series-upg: #87deb1;
    --tnw-series-upg-rgb: 135 222 177;
    --tnw-series-gap: #ffa098;
    --tnw-series-gap-rgb: 255 160 152;
    --tnw-series-stall: #ffa47a;
    --tnw-series-stall-rgb: 255 164 122;
    --tnw-series-gap-text: #ffa098;
    --tnw-orb-1: #c5e9a3;
    --tnw-orb-2: #b4d595;
    --tnw-orb-3: #d6ca83;
    --tnw-orb-4: #91dbb4;
    --tnw-orb-5: #d4fab1;
    --tnw-orb-6: #dbb8f6;
    --tnw-orb-1-ink: #c5e9a3;
    --tnw-orb-2-ink: #b4d595;
    --tnw-orb-3-ink: #d6ca83;
    --tnw-orb-4-ink: #91dbb4;
    --tnw-orb-5-ink: #d4fab1;
    --tnw-orb-6-ink: #dbb8f6;
}
html[data-theme="coral-ember"] {
    --tn-bg: #fff3f0;
    --tn-canvas: #fff3f0;
    --tn-canvas-rgb: 255 243 240;
    --tn-bg-deep: #ffe6e1;
    --tn-bg-deep-rgb: 255 230 225;
    --tn-panel-solid: #fffbfa;
    --tn-surface-deep: #fffbfa;
    --tn-on-accent: #ffffff;
    --tn-tint-rgb: 54 23 18;
    --tn-shadow-rgb: 98 42 33;
    --tn-teal: #bf4b3a;
    --tn-teal-rgb: 191 75 58;
    --tn-teal-hover: #aa3828;
    --tn-mint: #8d392c;
    --tn-mint-rgb: 141 57 44;
    --tn-text: #622a21;
    --tn-text-rgb: 98 42 33;
    --tn-text-bright: #361712;
    --tn-text-bright-rgb: 54 23 18;
    --tn-text-dim: #903c2f;
    --tn-text-dim-rgb: 144 60 47;
    --tn-text-muted: #903c2f;
    --tn-kicker: #622a21;
    --tn-kicker-rgb: 98 42 33;
    --tn-rot-a: #bf4b3a;
    --tn-rot-b: #903c2f;
    --tn-rot-c: #e1624f;
    --tn-halo-rgb: 249 235 232;
    --tn-code-frame: #fffbfa;
    --tn-code-bg: #ffe6e1;
    --tn-code-border: rgb(239 209 204 / 0.9);
    --tnw-bg-2: #ffe6e1;
    --tnw-focus: #c24e3d;
    --tnw-ink: #361712;
    --tnw-ink-rgb: 54 23 18;
    --tn-wd-swatch-a: #fff3f0;
    --tn-wd-swatch-b: #bf4b3a;
    --tnw-link: #bf4b3a;
    --tnw-link-hover: #aa3828;
    --tnw-heading: #361712;
    --tnw-subheading: #8d392c;
    --tnw-close: #903c2f;
    --tnw-close-hover: #361712;
    --tnw-close-ring: rgb(243 193 184 / 0.7);
    --tnw-eco-hover-wash: rgb(191 75 58 / 0.07);
    --tnw-eco-hover-ring: rgb(191 75 58 / 0.5);
    --tn-purple: #a95e00;
    --tn-purple-rgb: 169 94 0;
    --tn-amber: #007c8a;
    --tn-amber-rgb: 0 124 138;
    --tnw-amber: #007c8a;
    --tn-coral: #a12f2f;
    --tn-coral-rgb: 161 47 47;
    --tn-danger: #a12f2f;
    --tn-danger-rgb: 161 47 47;
    --tn-error: #a12f2f;
    --tn-error-rgb: 161 47 47;
    --tn-success: #00703e;
    --tn-success-rgb: 0 112 62;
    --tn-warn: #775800;
    --tnw-strong: #361712;
    --tnw-tint: 191, 75, 58;
    --tn-code-text: #361712;
    --tn-code-cmd: #9d5800;
    --tn-code-val: #903c2f;
    --tn-code-muted: #903c2f;
    --tn-code-scroll: rgb(243 193 184 / 0.6);
    --tnw-code-bg: #ffe6e1;
    --tnw-code-text: #361712;
    --tnw-code-keyword: #b64231;
    --tnw-code-string: #b73e6b;
    --tnw-code-number: #007682;
    --tnw-code-fn: #9d5800;
    --tnw-code-comment: #903c2f;
    --tnw-code-value: #903c2f;
    --tnw-title-shade-rgb: 249 235 232;
    --tnw-series-live: #bd4471;
    --tnw-series-live-rgb: 189 68 113;
    --tnw-series-upg: #a95e00;
    --tnw-series-upg-rgb: 169 94 0;
    --tnw-series-gap: #a12f2f;
    --tnw-series-gap-rgb: 161 47 47;
    --tnw-series-stall: #993d00;
    --tnw-series-stall-rgb: 153 61 0;
    --tnw-series-gap-text: #a12f2f;
    --tnw-orb-1: #fc7864;
    --tnw-orb-2: #e1624f;
    --tnw-orb-3: #da668e;
    --tnw-orb-4: #d37812;
    --tnw-orb-5: #ff9c8b;
    --tnw-orb-6: #00a4b9;
    --tnw-orb-1-ink: #c04531;
    --tnw-orb-2-ink: #c34734;
    --tnw-orb-3-ink: #b9456d;
    --tnw-orb-4-ink: #a55e00;
    --tnw-orb-5-ink: #b45140;
    --tnw-orb-6-ink: #007d87;
}
html[data-theme="apricot-glow"] {
    --tn-bg: #fef4e7;
    --tn-canvas: #fef4e7;
    --tn-canvas-rgb: 254 244 231;
    --tn-bg-deep: #f9ead7;
    --tn-bg-deep-rgb: 249 234 215;
    --tn-panel-solid: #fffbf6;
    --tn-surface-deep: #fffbf6;
    --tn-on-accent: #ffffff;
    --tn-tint-rgb: 39 31 20;
    --tn-shadow-rgb: 71 57 38;
    --tn-teal: #866a43;
    --tn-teal-rgb: 134 106 67;
    --tn-teal-hover: #745932;
    --tn-mint: #645033;
    --tn-mint-rgb: 100 80 51;
    --tn-text: #473926;
    --tn-text-rgb: 71 57 38;
    --tn-text-bright: #271f14;
    --tn-text-bright-rgb: 39 31 20;
    --tn-text-dim: #675336;
    --tn-text-dim-rgb: 103 83 54;
    --tn-text-muted: #675336;
    --tn-kicker: #473926;
    --tn-kicker-rgb: 71 57 38;
    --tn-rot-a: #866a43;
    --tn-rot-b: #675336;
    --tn-rot-c: #a18051;
    --tn-halo-rgb: 255 223 180;
    --tn-code-frame: #fffbf6;
    --tn-code-bg: #f9ead7;
    --tn-code-border: rgb(230 214 193 / 0.9);
    --tnw-bg-2: #f9ead7;
    --tnw-focus: #896d46;
    --tnw-ink: #271f14;
    --tnw-ink-rgb: 39 31 20;
    --tn-wd-swatch-a: #fef4e7;
    --tn-wd-swatch-b: #866a43;
    --tnw-link: #866a43;
    --tnw-link-hover: #745932;
    --tnw-heading: #271f14;
    --tnw-subheading: #645033;
    --tnw-close: #675336;
    --tnw-close-hover: #271f14;
    --tnw-close-ring: rgb(232 183 115 / 0.7);
    --tnw-eco-hover-wash: rgb(134 106 67 / 0.07);
    --tnw-eco-hover-ring: rgb(134 106 67 / 0.5);
    --tn-purple: #797200;
    --tn-purple-rgb: 121 114 0;
    --tn-amber: #3570b9;
    --tn-amber-rgb: 53 112 185;
    --tnw-amber: #3570b9;
    --tn-coral: #a12f2f;
    --tn-coral-rgb: 161 47 47;
    --tn-danger: #a12f2f;
    --tn-danger-rgb: 161 47 47;
    --tn-error: #a12f2f;
    --tn-error-rgb: 161 47 47;
    --tn-success: #00703e;
    --tn-success-rgb: 0 112 62;
    --tn-warn: #775800;
    --tnw-strong: #271f14;
    --tnw-tint: 134, 106, 67;
    --tn-code-text: #271f14;
    --tn-code-cmd: #736c00;
    --tn-code-val: #675336;
    --tn-code-muted: #675336;
    --tn-code-scroll: rgb(232 183 115 / 0.6);
    --tnw-code-bg: #f9ead7;
    --tnw-code-text: #271f14;
    --tnw-code-keyword: #80643d;
    --tnw-code-string: #b54a00;
    --tnw-code-number: #2f6ab3;
    --tnw-code-fn: #736c00;
    --tnw-code-comment: #675336;
    --tnw-code-value: #675336;
    --tnw-title-shade-rgb: 255 223 180;
    --tnw-series-live: #b54a00;
    --tnw-series-live-rgb: 181 74 0;
    --tnw-series-upg: #797200;
    --tnw-series-upg-rgb: 121 114 0;
    --tnw-series-gap: #a12f2f;
    --tnw-series-gap-rgb: 161 47 47;
    --tnw-series-stall: #993d00;
    --tnw-series-stall-rgb: 153 61 0;
    --tnw-series-gap-text: #a12f2f;
    --tnw-orb-1: #b8925c;
    --tnw-orb-2: #a18051;
    --tnw-orb-3: #bc8369;
    --tnw-orb-4: #99955a;
    --tnw-orb-5: #d0a467;
    --tnw-orb-6: #7195c3;
    --tnw-orb-1-ink: #8e6832;
    --tnw-orb-2-ink: #8c6b3c;
    --tnw-orb-3-ink: #9b6248;
    --tnw-orb-4-ink: #757136;
    --tnw-orb-5-ink: #94682b;
    --tnw-orb-6-ink: #4d719f;
}
html[data-theme="azure-calcium"] {
    --tn-bg: #05101b;
    --tn-canvas: #05101b;
    --tn-canvas-rgb: 5 16 27;
    --tn-bg-deep: #020b15;
    --tn-bg-deep-rgb: 2 11 21;
    --tn-panel-solid: #0b1b2b;
    --tn-surface-deep: #020b15;
    --tn-on-accent: #132230;
    --tn-teal: #76bbfc;
    --tn-teal-rgb: 118 187 252;
    --tn-teal-hover: #9bceff;
    --tn-mint: #e5eff9;
    --tn-mint-rgb: 229 239 249;
    --tn-text: #e2edf9;
    --tn-text-rgb: 226 237 249;
    --tn-text-bright: #f2f7fc;
    --tn-text-bright-rgb: 242 247 252;
    --tn-text-dim: #a6b8ca;
    --tn-text-dim-rgb: 166 184 202;
    --tn-text-muted: #a6b8ca;
    --tn-kicker: #a0d0ff;
    --tn-kicker-rgb: 160 208 255;
    --tn-rot-a: #76bbfc;
    --tn-rot-b: #a0d0ff;
    --tn-rot-c: #cbe1f6;
    --tn-halo-rgb: 118 187 252;
    --tn-code-frame: #0b1b2b;
    --tn-code-bg: #020b15;
    --tn-code-border: rgb(37 55 72 / 0.9);
    --tnw-bg-2: #192a3a;
    --tnw-focus: #76bbfc;
    --tnw-ink: #f2f7fc;
    --tnw-ink-rgb: 242 247 252;
    --tn-wd-swatch-a: #05101b;
    --tn-wd-swatch-b: #76bbfc;
    --tnw-link: #76bbfc;
    --tnw-link-hover: #9bceff;
    --tnw-heading: #f2f7fc;
    --tnw-subheading: #cbe1f6;
    --tnw-close: #a6b8ca;
    --tnw-close-hover: #f2f7fc;
    --tnw-close-ring: rgb(64 120 172 / 0.7);
    --tnw-eco-hover-wash: rgb(118 187 252 / 0.08);
    --tnw-eco-hover-ring: rgb(118 187 252 / 0.5);
    --tn-purple: #a4adff;
    --tn-purple-rgb: 164 173 255;
    --tn-amber: #efa246;
    --tn-amber-rgb: 239 162 70;
    --tnw-amber: #efa246;
    --tn-coral: #ffa098;
    --tn-coral-rgb: 255 160 152;
    --tn-danger: #ffa098;
    --tn-danger-rgb: 255 160 152;
    --tn-error: #ffa098;
    --tn-error-rgb: 255 160 152;
    --tn-success: #72d699;
    --tn-success-rgb: 114 214 153;
    --tn-warn: #f1c45e;
    --tnw-strong: #ffffff;
    --tnw-tint: 118, 187, 252;
    --tn-code-text: #f2f7fc;
    --tn-code-cmd: #a4adff;
    --tn-code-val: #cbe1f6;
    --tn-code-muted: #a6b8ca;
    --tn-code-scroll: rgb(64 120 172 / 0.6);
    --tnw-code-bg: #020b15;
    --tnw-code-text: #f2f7fc;
    --tnw-code-keyword: #76bbfc;
    --tnw-code-string: #4ec6e6;
    --tnw-code-number: #efa246;
    --tnw-code-fn: #a4adff;
    --tnw-code-comment: #a6b8ca;
    --tnw-code-value: #cbe1f6;
    --tnw-title-shade-rgb: 2 11 21;
    --tnw-series-live: #4ec6e6;
    --tnw-series-live-rgb: 78 198 230;
    --tnw-series-upg: #a4adff;
    --tnw-series-upg-rgb: 164 173 255;
    --tnw-series-gap: #ffa098;
    --tnw-series-gap-rgb: 255 160 152;
    --tnw-series-stall: #ffa47a;
    --tnw-series-stall-rgb: 255 164 122;
    --tnw-series-gap-text: #ffa098;
    --tnw-orb-1: #cbe1f6;
    --tnw-orb-2: #a0d0ff;
    --tnw-orb-3: #8ad8ef;
    --tnw-orb-4: #bec6ff;
    --tnw-orb-5: #e5eff9;
    --tnw-orb-6: #efc190;
    --tnw-orb-1-ink: #cbe1f6;
    --tnw-orb-2-ink: #a0d0ff;
    --tnw-orb-3-ink: #8ad8ef;
    --tnw-orb-4-ink: #bec6ff;
    --tnw-orb-5-ink: #e5eff9;
    --tnw-orb-6-ink: #efc190;
}
html[data-theme="sirius-blue"] {
    --tn-bg: #080f1c;
    --tn-canvas: #080f1c;
    --tn-canvas-rgb: 8 15 28;
    --tn-bg-deep: #040a16;
    --tn-bg-deep-rgb: 4 10 22;
    --tn-panel-solid: #111a2c;
    --tn-surface-deep: #040a16;
    --tn-on-accent: #0a1c4a;
    --tn-teal: #a2c0fe;
    --tn-teal-rgb: 162 192 254;
    --tn-teal-hover: #bfd4ff;
    --tn-mint: #dee7f9;
    --tn-mint-rgb: 222 231 249;
    --tn-text: #e5ecfa;
    --tn-text-rgb: 229 236 250;
    --tn-text-bright: #f3f6fd;
    --tn-text-bright-rgb: 243 246 253;
    --tn-text-dim: #acb6cb;
    --tn-text-dim-rgb: 172 182 203;
    --tn-text-muted: #acb6cb;
    --tn-kicker: #a2c0fe;
    --tn-kicker-rgb: 162 192 254;
    --tn-rot-a: #a2c0fe;
    --tn-rot-b: #a2c0fe;
    --tn-rot-c: #c0d5ff;
    --tn-halo-rgb: 162 192 254;
    --tn-code-frame: #111a2c;
    --tn-code-bg: #040a16;
    --tn-code-border: rgb(43 53 74 / 0.9);
    --tnw-bg-2: #1f283c;
    --tnw-focus: #a2c0fe;
    --tnw-ink: #f3f6fd;
    --tnw-ink-rgb: 243 246 253;
    --tn-wd-swatch-a: #080f1c;
    --tn-wd-swatch-b: #a2c0fe;
    --tnw-link: #a2c0fe;
    --tnw-link-hover: #bfd4ff;
    --tnw-heading: #f3f6fd;
    --tnw-subheading: #c0d5ff;
    --tnw-close: #acb6cb;
    --tnw-close-hover: #f3f6fd;
    --tnw-close-ring: rgb(62 106 211 / 0.7);
    --tnw-eco-hover-wash: rgb(162 192 254 / 0.08);
    --tnw-eco-hover-ring: rgb(162 192 254 / 0.5);
    --tn-purple: #c4b3ff;
    --tn-purple-rgb: 196 179 255;
    --tn-amber: #e8b94f;
    --tn-amber-rgb: 232 185 79;
    --tnw-amber: #e8b94f;
    --tn-coral: #ffa098;
    --tn-coral-rgb: 255 160 152;
    --tn-danger: #ffa098;
    --tn-danger-rgb: 255 160 152;
    --tn-error: #ffa098;
    --tn-error-rgb: 255 160 152;
    --tn-success: #72d699;
    --tn-success-rgb: 114 214 153;
    --tn-warn: #f1c45e;
    --tnw-strong: #ffffff;
    --tnw-tint: 162, 192, 254;
    --tn-code-text: #f3f6fd;
    --tn-code-cmd: #c4b3ff;
    --tn-code-val: #c0d5ff;
    --tn-code-muted: #acb6cb;
    --tn-code-scroll: rgb(62 106 211 / 0.6);
    --tnw-code-bg: #040a16;
    --tnw-code-text: #f3f6fd;
    --tnw-code-keyword: #a2c0fe;
    --tnw-code-string: #70ccff;
    --tnw-code-number: #e8b94f;
    --tnw-code-fn: #c4b3ff;
    --tnw-code-comment: #acb6cb;
    --tnw-code-value: #c0d5ff;
    --tnw-title-shade-rgb: 4 10 22;
    --tnw-series-live: #70ccff;
    --tnw-series-live-rgb: 112 204 255;
    --tnw-series-upg: #c4b3ff;
    --tnw-series-upg-rgb: 196 179 255;
    --tnw-series-gap: #ffa098;
    --tnw-series-gap-rgb: 255 160 152;
    --tnw-series-stall: #ffa47a;
    --tnw-series-stall-rgb: 255 164 122;
    --tnw-series-gap-text: #ffa098;
    --tnw-orb-1: #c0d5ff;
    --tnw-orb-2: #a2c0fe;
    --tnw-orb-3: #81cbf4;
    --tnw-orb-4: #c4b5f8;
    --tnw-orb-5: #dee7f9;
    --tnw-orb-6: #dcbc78;
    --tnw-orb-1-ink: #c0d5ff;
    --tnw-orb-2-ink: #a2c0fe;
    --tnw-orb-3-ink: #81cbf4;
    --tnw-orb-4-ink: #c4b5f8;
    --tnw-orb-5-ink: #dee7f9;
    --tnw-orb-6-ink: #dcbc78;
}
html[data-theme="carbon-pink"] {
    --tn-bg: #1a090e;
    --tn-canvas: #1a090e;
    --tn-canvas-rgb: 26 9 14;
    --tn-bg-deep: #140509;
    --tn-bg-deep-rgb: 20 5 9;
    --tn-panel-solid: #281219;
    --tn-surface-deep: #140509;
    --tn-on-accent: #31171f;
    --tn-teal: #feacc2;
    --tn-teal-rgb: 254 172 194;
    --tn-teal-hover: #ffcad7;
    --tn-mint: #f9e6ea;
    --tn-mint-rgb: 249 230 234;
    --tn-text: #f8e7eb;
    --tn-text-rgb: 248 231 235;
    --tn-text-bright: #fcf4f6;
    --tn-text-bright-rgb: 252 244 246;
    --tn-text-dim: #c8aeb4;
    --tn-text-dim-rgb: 200 174 180;
    --tn-text-muted: #c8aeb4;
    --tn-kicker: #feacc2;
    --tn-kicker-rgb: 254 172 194;
    --tn-rot-a: #feacc2;
    --tn-rot-b: #feacc2;
    --tn-rot-c: #ffcad7;
    --tn-halo-rgb: 254 172 194;
    --tn-code-frame: #281219;
    --tn-code-bg: #140509;
    --tn-code-border: rgb(71 45 52 / 0.9);
    --tnw-bg-2: #382027;
    --tnw-focus: #feacc2;
    --tnw-ink: #fcf4f6;
    --tnw-ink-rgb: 252 244 246;
    --tn-wd-swatch-a: #1a090e;
    --tn-wd-swatch-b: #feacc2;
    --tnw-link: #feacc2;
    --tnw-link-hover: #ffcad7;
    --tnw-heading: #fcf4f6;
    --tnw-subheading: #ffcad7;
    --tnw-close: #c8aeb4;
    --tnw-close-hover: #fcf4f6;
    --tnw-close-ring: rgb(174 78 109 / 0.7);
    --tnw-eco-hover-wash: rgb(254 172 194 / 0.08);
    --tnw-eco-hover-ring: rgb(254 172 194 / 0.5);
    --tn-purple: #ffb0a0;
    --tn-purple-rgb: 255 176 160;
    --tn-amber: #60e0cd;
    --tn-amber-rgb: 96 224 205;
    --tnw-amber: #60e0cd;
    --tn-coral: #ffa098;
    --tn-coral-rgb: 255 160 152;
    --tn-danger: #ffa098;
    --tn-danger-rgb: 255 160 152;
    --tn-error: #ffa098;
    --tn-error-rgb: 255 160 152;
    --tn-success: #72d699;
    --tn-success-rgb: 114 214 153;
    --tn-warn: #f1c45e;
    --tnw-strong: #ffffff;
    --tnw-tint: 254, 172, 194;
    --tn-code-text: #fcf4f6;
    --tn-code-cmd: #ffb0a0;
    --tn-code-val: #ffcad7;
    --tn-code-muted: #c8aeb4;
    --tn-code-scroll: rgb(174 78 109 / 0.6);
    --tnw-code-bg: #140509;
    --tnw-code-text: #fcf4f6;
    --tnw-code-keyword: #feacc2;
    --tnw-code-string: #ffa1f2;
    --tnw-code-number: #60e0cd;
    --tnw-code-fn: #ffb0a0;
    --tnw-code-comment: #c8aeb4;
    --tnw-code-value: #ffcad7;
    --tnw-title-shade-rgb: 20 5 9;
    --tnw-series-live: #ffa1f2;
    --tnw-series-live-rgb: 255 161 242;
    --tnw-series-upg: #ffb0a0;
    --tnw-series-upg-rgb: 255 176 160;
    --tnw-series-gap: #ffa098;
    --tnw-series-gap-rgb: 255 160 152;
    --tnw-series-stall: #ffa47a;
    --tnw-series-stall-rgb: 255 164 122;
    --tnw-series-gap-text: #ffa098;
    --tnw-orb-1: #ffcad7;
    --tnw-orb-2: #feacc2;
    --tnw-orb-3: #eeafe4;
    --tnw-orb-4: #ffb0a0;
    --tnw-orb-5: #f9e6ea;
    --tnw-orb-6: #76ddcc;
    --tnw-orb-1-ink: #ffcad7;
    --tnw-orb-2-ink: #feacc2;
    --tnw-orb-3-ink: #eeafe4;
    --tnw-orb-4-ink: #ffb0a0;
    --tnw-orb-5-ink: #f9e6ea;
    --tnw-orb-6-ink: #76ddcc;
}
html[data-theme="lime-chiffon"] {
    --tn-bg: #f5f8e9;
    --tn-canvas: #f5f8e9;
    --tn-canvas-rgb: 245 248 233;
    --tn-bg-deep: #ebefda;
    --tn-bg-deep-rgb: 235 239 218;
    --tn-panel-solid: #fbfdf6;
    --tn-surface-deep: #fbfdf6;
    --tn-on-accent: #ffffff;
    --tn-tint-rgb: 32 34 23;
    --tn-shadow-rgb: 59 62 43;
    --tn-teal: #6f744e;
    --tn-teal-rgb: 111 116 78;
    --tn-teal-hover: #5e633d;
    --tn-mint: #505438;
    --tn-mint-rgb: 80 84 56;
    --tn-text: #3b3e2b;
    --tn-text-rgb: 59 62 43;
    --tn-text-bright: #202217;
    --tn-text-bright-rgb: 32 34 23;
    --tn-text-dim: #565a3e;
    --tn-text-dim-rgb: 86 90 62;
    --tn-text-muted: #565a3e;
    --tn-kicker: #3b3e2b;
    --tn-kicker-rgb: 59 62 43;
    --tn-rot-a: #6f744e;
    --tn-rot-b: #565a3e;
    --tn-rot-c: #868d5f;
    --tn-halo-rgb: 231 242 165;
    --tn-code-frame: #fbfdf6;
    --tn-code-bg: #ebefda;
    --tn-code-border: rgb(216 219 199 / 0.9);
    --tnw-bg-2: #ebefda;
    --tnw-focus: #727751;
    --tnw-ink: #202217;
    --tnw-ink-rgb: 32 34 23;
    --tn-wd-swatch-a: #f5f8e9;
    --tn-wd-swatch-b: #6f744e;
    --tnw-link: #6f744e;
    --tnw-link-hover: #5e633d;
    --tnw-heading: #202217;
    --tnw-subheading: #505438;
    --tnw-close: #565a3e;
    --tnw-close-hover: #202217;
    --tnw-close-ring: rgb(197 207 142 / 0.7);
    --tnw-eco-hover-wash: rgb(111 116 78 / 0.07);
    --tnw-eco-hover-ring: rgb(111 116 78 / 0.5);
    --tn-purple: #268231;
    --tn-purple-rgb: 38 130 49;
    --tn-amber: #7562a7;
    --tn-amber-rgb: 117 98 167;
    --tnw-amber: #7562a7;
    --tn-coral: #a12f2f;
    --tn-coral-rgb: 161 47 47;
    --tn-danger: #a12f2f;
    --tn-danger-rgb: 161 47 47;
    --tn-error: #a12f2f;
    --tn-error-rgb: 161 47 47;
    --tn-success: #00703e;
    --tn-success-rgb: 0 112 62;
    --tn-warn: #775800;
    --tnw-strong: #202217;
    --tnw-tint: 111, 116, 78;
    --tn-code-text: #202217;
    --tn-code-cmd: #1e7c2b;
    --tn-code-val: #565a3e;
    --tn-code-muted: #565a3e;
    --tn-code-scroll: rgb(197 207 142 / 0.6);
    --tnw-code-bg: #ebefda;
    --tnw-code-text: #202217;
    --tnw-code-keyword: #696e48;
    --tnw-code-string: #83651e;
    --tnw-code-number: #725fa4;
    --tnw-code-fn: #1e7c2b;
    --tnw-code-comment: #565a3e;
    --tnw-code-value: #565a3e;
    --tnw-title-shade-rgb: 231 242 165;
    --tnw-series-live: #896b25;
    --tnw-series-live-rgb: 137 107 37;
    --tnw-series-upg: #268231;
    --tnw-series-upg-rgb: 38 130 49;
    --tnw-series-gap: #a12f2f;
    --tnw-series-gap-rgb: 161 47 47;
    --tnw-series-stall: #993d00;
    --tnw-series-stall-rgb: 153 61 0;
    --tnw-series-gap-text: #a12f2f;
    --tnw-orb-1: #9ba26e;
    --tnw-orb-2: #868d5f;
    --tnw-orb-3: #a98f57;
    --tnw-orb-4: #73a074;
    --tnw-orb-5: #b0b87e;
    --tnw-orb-6: #9589be;
    --tnw-orb-1-ink: #6e7541;
    --tnw-orb-2-ink: #6e7547;
    --tnw-orb-3-ink: #856b33;
    --tnw-orb-4-ink: #4c794d;
    --tnw-orb-5-ink: #6e763c;
    --tnw-orb-6-ink: #74689d;
}
html[data-theme="pearl-white"] {
    --tn-bg: #f7f4ff;
    --tn-canvas: #f7f4ff;
    --tn-canvas-rgb: 247 244 255;
    --tn-bg-deep: #eee9fc;
    --tn-bg-deep-rgb: 238 233 252;
    --tn-panel-solid: #fcfbff;
    --tn-surface-deep: #fcfbff;
    --tn-on-accent: #ffffff;
    --tn-tint-rgb: 33 31 40;
    --tn-shadow-rgb: 62 56 74;
    --tn-teal: #74698e;
    --tn-teal-rgb: 116 105 142;
    --tn-teal-hover: #63587c;
    --tn-mint: #564e6a;
    --tn-mint-rgb: 86 78 106;
    --tn-text: #3e384a;
    --tn-text-rgb: 62 56 74;
    --tn-text-bright: #211f28;
    --tn-text-bright-rgb: 33 31 40;
    --tn-text-dim: #59516d;
    --tn-text-dim-rgb: 89 81 109;
    --tn-text-muted: #59516d;
    --tn-kicker: #3e384a;
    --tn-kicker-rgb: 62 56 74;
    --tn-rot-a: #74698e;
    --tn-rot-b: #59516d;
    --tn-rot-c: #8b82a2;
    --tn-halo-rgb: 240 239 242;
    --tn-code-frame: #fcfbff;
    --tn-code-bg: #eee9fc;
    --tn-code-border: rgb(218 214 232 / 0.9);
    --tnw-bg-2: #eee9fc;
    --tnw-focus: #776c91;
    --tnw-ink: #211f28;
    --tnw-ink-rgb: 33 31 40;
    --tn-wd-swatch-a: #f7f4ff;
    --tn-wd-swatch-b: #74698e;
    --tnw-link: #74698e;
    --tnw-link-hover: #63587c;
    --tnw-heading: #211f28;
    --tnw-subheading: #564e6a;
    --tnw-close: #59516d;
    --tnw-close-hover: #211f28;
    --tnw-close-ring: rgb(203 200 213 / 0.7);
    --tnw-eco-hover-wash: rgb(116 105 142 / 0.07);
    --tnw-eco-hover-ring: rgb(116 105 142 / 0.5);
    --tn-purple: #9f479e;
    --tn-purple-rgb: 159 71 158;
    --tn-amber: #68742e;
    --tn-amber-rgb: 104 116 46;
    --tnw-amber: #68742e;
    --tn-coral: #a12f2f;
    --tn-coral-rgb: 161 47 47;
    --tn-danger: #a12f2f;
    --tn-danger-rgb: 161 47 47;
    --tn-error: #a12f2f;
    --tn-error-rgb: 161 47 47;
    --tn-success: #00703e;
    --tn-success-rgb: 0 112 62;
    --tn-warn: #775800;
    --tnw-strong: #211f28;
    --tnw-tint: 116, 105, 142;
    --tn-code-text: #211f28;
    --tn-code-cmd: #9f479e;
    --tn-code-val: #59516d;
    --tn-code-muted: #59516d;
    --tn-code-scroll: rgb(203 200 213 / 0.6);
    --tnw-code-bg: #eee9fc;
    --tnw-code-text: #211f28;
    --tnw-code-keyword: #6e6388;
    --tnw-code-string: #54689f;
    --tnw-code-number: #626e28;
    --tnw-code-fn: #9f479e;
    --tnw-code-comment: #59516d;
    --tnw-code-value: #59516d;
    --tnw-title-shade-rgb: 240 239 242;
    --tnw-series-live: #5a6ea5;
    --tnw-series-live-rgb: 90 110 165;
    --tnw-series-upg: #9f479e;
    --tnw-series-upg-rgb: 159 71 158;
    --tnw-series-gap: #a12f2f;
    --tnw-series-gap-rgb: 161 47 47;
    --tnw-series-stall: #993d00;
    --tnw-series-stall-rgb: 153 61 0;
    --tnw-series-gap-text: #a12f2f;
    --tnw-orb-1: #a098b3;
    --tnw-orb-2: #8b82a2;
    --tnw-orb-3: #7d91c4;
    --tnw-orb-4: #ad81ab;
    --tnw-orb-5: #b5b0c4;
    --tnw-orb-6: #8e9960;
    --tnw-orb-1-ink: #736b86;
    --tnw-orb-2-ink: #736a8a;
    --tnw-orb-3-ink: #596da0;
    --tnw-orb-4-ink: #8c608a;
    --tnw-orb-5-ink: #736e82;
    --tnw-orb-6-ink: #6a753c;
}
.tn-theme-chip[data-chip="pale-lithium-green"] { --chip-a: #0b1105; --chip-b: #b4d595; }
.tn-theme-chip[data-chip="coral-ember"] { --chip-a: #fff3f0; --chip-b: #bf4b3a; }
.tn-theme-chip[data-chip="apricot-glow"] { --chip-a: #fef4e7; --chip-b: #866a43; }
.tn-theme-chip[data-chip="azure-calcium"] { --chip-a: #05101b; --chip-b: #76bbfc; }
.tn-theme-chip[data-chip="sirius-blue"] { --chip-a: #080f1c; --chip-b: #a2c0fe; }
.tn-theme-chip[data-chip="carbon-pink"] { --chip-a: #1a090e; --chip-b: #feacc2; }
.tn-theme-chip[data-chip="lime-chiffon"] { --chip-a: #f5f8e9; --chip-b: #6f744e; }
.tn-theme-chip[data-chip="pearl-white"] { --chip-a: #f7f4ff; --chip-b: #74698e; }
/* WD-THEMES:END */

/* ── Type roles ───────────────────────────────────────────────── */
.tn-primary   { color: var(--tn-text-bright); }
.tn-secondary { color: var(--tn-text); }
.tn-muted     { color: var(--tn-text-dim); }
.tn-accent    { color: var(--tn-teal); }
.tn-heading   { color: var(--tnw-subheading); font-size: var(--tn-size-heading); font-weight: var(--tn-font-weight-medium); letter-spacing: var(--tn-track-heading); line-height: var(--tn-line-tight); }
.tn-label     { font-size: var(--tn-size-label); font-weight: var(--tn-font-weight-medium); letter-spacing: var(--tn-track-label); text-transform: uppercase; color: var(--tn-text-dim); }
.tn-caption   { font-size: var(--tn-size-caption); color: var(--tn-text-dim); line-height: 1.45; }
/* Highlight: a marker stroke under the words, in the accent, never a box. */
mark, .tn-hl {
    color: var(--tn-mint);
    background: linear-gradient(transparent 60%, rgb(var(--tn-teal-rgb) / 0.26) 60%, rgb(var(--tn-teal-rgb) / 0.26) 92%, transparent 92%);
    padding: 0 0.08em;
    -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
::selection { background: rgb(var(--tn-teal-rgb) / 0.3); color: var(--tn-text-bright); }
:focus-visible { outline-color: var(--tn-teal); }

/* Permissionless only: highlights and header glow in the theme's hopalong hues
   (the Terp SVG neonglow profile). Other themes keep the styles above. */
html[data-theme="permissionless"] .tn-accent { text-shadow: var(--tn-glow-text); }
html[data-theme="permissionless"] :is(mark, .tn-hl) {
    background: linear-gradient(transparent 58%, rgb(var(--tn-glow-rgb) / calc(0.34 * var(--tn-glow-k))) 58%, rgb(var(--tn-glow-2-rgb) / calc(0.3 * var(--tn-glow-k))) 92%, transparent 92%) no-repeat,
                linear-gradient(90deg, transparent, rgb(var(--tn-glow-2-rgb) / calc(0.14 * var(--tn-glow-k)))) 0 58% / 100% 34% no-repeat;
    text-shadow: var(--tn-glow-text);
}
html[data-theme="permissionless"] ::selection { background: rgb(var(--tn-glow-rgb) / calc(0.34 * var(--tn-glow-k))); color: var(--tn-text-bright); }

/* ── Embedded mode (shell iframe) ─────────────────────────────── */
.embedded .main  { padding-top: 1rem; }
.embedded #glow-canvas { display: none; }
.embedded .fab-container { display: none !important; }

/* ── Body + form controls inherit site face ───────────────────── */
body {
    background-color: var(--tn-bg);
    color: var(--tn-text-bright);
    font-family: var(--tn-font);
    font-weight: var(--tn-font-weight-body);
    font-size: var(--tn-text-base);
    line-height: var(--tn-line-body);
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

button,
input,
select,
textarea,
optgroup {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

/* Code-ish surfaces share one mono stack */
code,
kbd,
samp,
pre,
.mono,
.addr,
.tn-mono {
    font-family: var(--tn-font-mono);
    font-weight: 400;
}

/* ── Links ────────────────────────────────────────────────────── */
/* WD2 semantic tokens: base defaults (Permissionless keeps its original look; WD theme blocks override) */
:root {
    --tnw-link: var(--tn-purple); --tnw-link-hover: var(--tn-purple);
    --tnw-heading: var(--tn-text-bright); --tnw-subheading: var(--tn-mint);
    --tnw-code-bg: var(--tn-code-bg); --tnw-code-text: var(--tn-code-text);
    --tnw-code-keyword: var(--tn-code-cmd); --tnw-code-fn: var(--tn-code-cmd);
    --tnw-code-string: var(--tn-code-val); --tnw-code-value: var(--tn-code-val);
    --tnw-code-number: var(--tn-amber); --tnw-code-comment: var(--tn-code-muted);
    --tnw-title-shade-rgb: 71 50 102;
    --tnw-series-live: #6ea8ff; --tnw-series-live-rgb: 110 168 255;
    --tnw-series-upg: #c9b8ff; --tnw-series-upg-rgb: 201 184 255;
    --tnw-series-gap: #c45c4a; --tnw-series-gap-rgb: 196 92 74; --tnw-series-gap-text: #e07a66;
    --tnw-series-stall: #ff7a59;
}
a { color: var(--tnw-link); text-decoration: none; transition: opacity 0.2s ease, color 0.2s ease; }
a:hover { color: var(--tnw-link-hover); }
html[data-theme="permissionless"] a:hover { opacity: 0.8; }
html:not([data-theme="permissionless"]) :where(h1, h2, h3, h4, h5, h6) { color: var(--tnw-heading); }

/* ── Canvas background ────────────────────────────────────────── */
#glow-canvas {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%; z-index: 0;
    pointer-events: none;
}

/* ── Wallet button ────────────────────────────────────────────── */
.btn-wallet {
    background: rgb(var(--tn-teal-rgb) / 0.1);
    border: 1px solid rgb(var(--tn-teal-rgb) / 0.3);
    color: var(--tn-teal); padding: 0.4rem 0.8rem;
    font-family: var(--tn-font); font-size: 0.75rem;
    font-weight: var(--tn-font-weight-ui);
    cursor: pointer; border-radius: 4px;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.btn-wallet:hover {
    background: rgb(var(--tn-teal-rgb) / 0.2);
    border-color: rgb(var(--tn-teal-rgb) / 0.5);
}
.btn-wallet.connected {
    background: rgb(var(--tn-teal-rgb) / 0.15);
    border-color: rgb(var(--tn-teal-rgb) / 0.4);
}

/* ── Site chrome (in-flow pill nav — matches index design) ───── */
.site-chrome {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.15rem 0.35rem;
    margin: 0 auto 1.75rem;
    max-width: 40rem;
    position: relative;
    z-index: 20;
    width: 100%;
}
.site-chrome a {
    font-family: var(--tn-font);
    font-size: 0.88rem;
    font-weight: var(--tn-font-weight-medium);
    letter-spacing: var(--tn-track-nav);
    color: var(--tn-text) !important;
    text-decoration: none !important;
    padding: 0.42rem 0.6rem;
    border-radius: 0;
    border: 0;
    box-shadow: inset 0 -1px 0 transparent;
    transition: color 0.15s, box-shadow 0.15s;
    opacity: 1 !important;
    line-height: 1.25;
}
.site-chrome a:hover {
    color: var(--tn-mint) !important;
    box-shadow: inset 0 -1px 0 rgb(var(--tn-teal-rgb) / 0.55);
}
.site-chrome a.primary {
    color: var(--tn-on-accent) !important;
    background: var(--tn-teal);
    border-radius: var(--tn-radius-ctl);
}
.site-chrome a.primary:hover {
    background: var(--tn-teal-hover);
    color: var(--tn-on-accent) !important;
}
/* Current page: a solid bar under the word, in the accent. */
.site-chrome a.active,
.site-chrome a[aria-current="page"] {
    color: var(--tn-mint) !important;
    box-shadow: inset 0 -2px 0 var(--tn-teal);
}
html[data-theme="permissionless"] .site-chrome a.active,
html[data-theme="permissionless"] .site-chrome a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--tn-teal), var(--tn-glow-bar); }
.site-chrome .dot {
    width: 3px;
    height: 3px;
    border-radius: 0;
    background: rgb(var(--tn-teal-rgb) / 0.4);
    flex-shrink: 0;
}

/* Wallet / authenticator cluster inside chrome */
.site-chrome-wallet {
    position: relative;
    display: inline-flex;
    align-items: center;
}
/* Connect: the one outlined control in the header, square-cornered. */
.site-chrome-pill {
    font-family: var(--tn-font);
    font-size: 0.88rem;
    font-weight: var(--tn-font-weight-medium);
    letter-spacing: var(--tn-track-nav);
    padding: 0.36rem 0.7rem;
    border-radius: var(--tn-radius-ctl);
    border: 1px solid rgb(var(--tn-teal-rgb) / 0.45);
    background: transparent;
    color: var(--tn-text-bright);
    cursor: pointer;
    white-space: nowrap;
    line-height: 1.25;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.site-chrome-pill:hover {
    color: var(--tn-mint);
    border-color: var(--tn-teal);
    background: rgb(var(--tn-teal-rgb) / 0.06);
}
html[data-theme="permissionless"] .site-chrome-pill { transition: color 0.15s, border-color 0.15s, background 0.15s, box-shadow 0.15s; }
html[data-theme="permissionless"] .site-chrome-pill:hover { box-shadow: var(--tn-glow-ring); }
.site-chrome-pill.connected {
    color: var(--tn-teal);
    border-color: rgb(var(--tn-teal-rgb) / 0.6);
    background: none;
}
.site-chrome-pill:focus-visible,
.site-chrome a:focus-visible,
.tn-theme-btn:focus-visible { outline: 2px solid var(--tn-teal); outline-offset: 2px; }

/* Theme picker: a round swatch button and a grouped menu (WD sun palette,
   Terp originals). Each option has a swatch circle: theme background with the
   accent as an inner disc. Colours for WD chips come from the WD-THEMES block. */
.tn-theme { position: relative; display: inline-flex; align-items: center; }
.tn-theme-btn {
    display: inline-grid; place-items: center;
    width: 2rem; height: 2rem; padding: 0;
    border: 0; border-radius: 50%;
    background: transparent; color: var(--tn-text); cursor: pointer;
    transition: background-color var(--tnw-hover-dur, 140ms), box-shadow var(--tnw-hover-dur, 140ms);
}
.tn-theme-btn:hover { color: var(--tn-mint); background: var(--tnw-hover-wash, rgb(var(--tn-teal-rgb) / 0.07)); box-shadow: inset 0 0 0 1px var(--tnw-hover-ring, rgb(var(--tn-teal-rgb) / 0.45)); }
.tn-theme-btn:focus-visible { outline: 2px solid var(--tnw-focus-ring, var(--tn-teal)); }
.tn-theme-swatch {
    width: 0.95rem; height: 0.95rem; display: block; border-radius: 50%;
    border: 1px solid currentColor;
    background: radial-gradient(circle at center, var(--tn-teal) 0 42%, var(--tn-bg) 44% 100%);
}
.tn-theme-menu {
    min-width: 0; width: min(17.5rem, calc(100vw - 1rem));
    max-height: min(32rem, calc(100vh - 5rem)); overflow-y: auto; overscroll-behavior: contain;
}
.tn-theme-menu[hidden] { display: none; }
.tn-theme-group { margin: 0; padding: 0; }
.tn-theme-group + .tn-theme-group { border-top: 1px solid rgb(var(--tn-tint-rgb) / 0.1); margin-top: 0.25rem; padding-top: 0.15rem; }
.tn-theme-opt { justify-content: flex-start; border-radius: var(--tn-radius-ctl); }
.tn-theme-opt:hover, .tn-theme-opt:focus-visible { background: var(--tnw-hover-wash, rgb(var(--tn-teal-rgb) / 0.08)); box-shadow: inset 0 0 0 1px var(--tnw-hover-ring, rgb(var(--tn-teal-rgb) / 0.45)); outline: none; }
.tn-theme-opt:focus-visible { box-shadow: 0 0 0 2px var(--tnw-focus-ring, var(--tn-teal)); }
.tn-theme-chip {
    --chip-a: #0b0f0d; --chip-b: #98e8c1;
    width: 1.15rem; height: 1.15rem; flex: none; border-radius: 50%;
    border: 1px solid rgb(var(--tn-tint-rgb) / 0.3);
    background: radial-gradient(circle at center, var(--chip-b) 0 40%, var(--chip-a) 42% 100%);
}
.tn-theme-chip[data-chip="permissionless"] { background: radial-gradient(circle at center, #b1ebeb 0 30%, #bd93f9 32% 46%, #08090d 48% 100%); }
.tn-theme-mode { font-size: var(--tn-size-label); color: var(--tn-text-dim); }
.tn-theme-opt[aria-checked="true"] { color: var(--tn-mint); }
.tn-theme-opt[aria-checked="true"] .tn-theme-chip { box-shadow: 0 0 0 2px var(--tn-panel-solid), 0 0 0 3.5px var(--tn-teal); }
.tn-theme-opt .tn-theme-name { flex: 1; }
.tn-theme-menu .tn-theme-link { color: var(--tnw-link); text-decoration: none; border-top: 1px solid rgb(var(--tn-tint-rgb) / 0.1); margin-top: 0.25rem; border-radius: var(--tn-radius-ctl); }
.tn-theme-menu .tn-theme-link:hover, .tn-theme-menu .tn-theme-link:focus-visible { color: var(--tnw-link-hover); }
.tn-theme-credit { font-size: 0.7rem; line-height: 1.35; color: var(--tn-text-dim); padding: 0.35rem 0.55rem 0.2rem; margin: 0.2rem 0 0; border-top: 1px solid rgb(var(--tn-tint-rgb) / 0.1); }

.site-chrome-menu {
    position: absolute;
    top: calc(100% + 0.45rem);
    right: 0;
    min-width: 220px;
    padding: 0.35rem;
    border-radius: var(--tn-radius-ctl);
    background: var(--tn-panel-solid);
    border: 1px solid rgb(var(--tn-teal-rgb) / 0.25);
    box-shadow: 0 12px 40px rgb(var(--tn-shadow-rgb) / calc(0.55 * var(--tn-shadow-k)));
    z-index: 100;
    text-align: left;
    text-shadow: none;
}
.site-chrome-menu-label {
    font-size: var(--tn-size-label);
    font-weight: var(--tn-font-weight-medium);
    text-transform: uppercase;
    letter-spacing: var(--tn-track-label);
    color: var(--tn-text-dim);
    padding: 0.35rem 0.55rem 0.2rem;
}
.site-chrome-menu-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.45rem 0.55rem;
    border: none;
    border-radius: 0;
    background: transparent;
    color: var(--tn-text);
    font-family: var(--tn-font);
    font-size: 0.88rem;
    cursor: pointer;
    text-align: left;
}
.site-chrome-menu-item:hover:not(:disabled),
.site-chrome-menu-item:focus-visible {
    background: rgb(var(--tn-teal-rgb) / 0.08);
    color: var(--tn-text-bright);
    outline: none;
}
.site-chrome-menu-item:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.site-chrome-menu-item .soon {
    font-size: var(--tn-size-label);
    text-transform: uppercase;
    letter-spacing: var(--tn-track-label);
    color: var(--tn-text-dim);
}
.site-chrome-menu-item.faucet { color: var(--tn-amber); }
.site-chrome-menu-divider {
    height: 1px;
    background: rgb(var(--tn-teal-rgb) / 0.12);
    margin: 0.35rem 0.4rem;
}
.site-chrome-menu-status {
    font-size: 0.88rem;
    padding: 0.15rem 0.65rem 0.45rem;
    color: var(--tn-teal);
}
.tn-switch {
    position: relative;
    width: 42px;
    height: 22px;
    border-radius: var(--tn-radius-ctl);
    background: #334155;
    flex-shrink: 0;
}
.tn-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 4px rgb(var(--tn-shadow-rgb) / calc(0.3 * var(--tn-shadow-k)));
    transition: left 0.15s;
}
.tn-switch.on { background: var(--tn-amber); }
.tn-switch.on::after { left: 22px; }

/* Toasts from chrome */
#terp-chrome-toasts {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 320px;
    pointer-events: none;
}
.tn-toast {
    padding: 0.85rem 1.1rem;
    border-radius: 8px;
    background: rgb(var(--tn-shade-rgb) / 0.96);
    border: 1px solid var(--tn-purple);
    color: #fff;
    font-size: 1rem;
    backdrop-filter: blur(12px);
    pointer-events: auto;
    transition: opacity 0.3s;
}
.tn-toast--success { border-color: var(--tn-teal); }
.tn-toast--error { border-color: var(--tn-coral); }
.tn-toast.out { opacity: 0; }

/* Legacy bottom FAB disabled — chrome is in-flow */
.fab-container { display: none !important; }
/* Do not force-hide page .header if reintroduced; sticky overlay removed */
#tn-site-header { display: none !important; }

/* Ecosystem catalog — symmetric grid; open cards span full width */
.eco-catalog { width: 100%; margin-bottom: 1.25rem; }
.eco-toolbar {
    display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center;
    margin-bottom: 0.55rem;
}
.eco-search {
    flex: 1; min-width: 10rem;
    padding: 0.45rem 0.7rem; border-radius: 8px;
    border: 1px solid rgb(var(--tn-teal-rgb) / 0.2);
    background: rgb(var(--tn-shade-rgb) / 0.35);
    color: var(--tn-text-bright);
    font-size: 0.9rem;
}
.eco-search:focus {
    outline: none;
    border-color: rgb(var(--tn-teal-rgb) / 0.45);
}
.eco-status-row, .eco-tags {
    display: flex; flex-wrap: wrap; gap: 0.35rem;
}
.eco-tags { margin-bottom: 0.5rem; }
.eco-chip {
    font-family: var(--tn-font);
    font-size: 0.78rem;
    padding: 0.28rem 0.55rem;
    border-radius: var(--tn-radius-ctl);
    border: 1px solid rgb(var(--tn-teal-rgb) / 0.2);
    background: transparent;
    color: var(--tn-text-dim);
    cursor: pointer;
    text-transform: capitalize;
}
.eco-chip:hover { border-color: rgb(var(--tn-teal-rgb) / 0.4); color: var(--tn-text); }
.eco-chip.active {
    color: var(--tn-teal);
    border-color: rgb(var(--tn-teal-rgb) / 0.45);
    background: rgb(var(--tn-teal-rgb) / 0.1);
}
.eco-count {
    font-size: 0.82rem;
    color: var(--tn-text-dim);
    margin-bottom: 0.55rem;
}
.eco-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    width: 100%;
    align-items: start;
}
@media (min-width: 900px) {
    .eco-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .eco-grid { grid-template-columns: 1fr; }
}
.eco-card {
    border: 1px solid rgb(var(--tn-teal-rgb) / 0.14);
    border-radius: 12px;
    padding: 0.95rem 1rem;
    background: rgb(var(--tn-shade-rgb) / 0.32);
    text-align: left;
    min-width: 0;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.eco-card.is-open {
    grid-column: 1 / -1;
    border-color: rgb(var(--tn-teal-rgb) / 0.35);
    box-shadow: 0 0 32px rgb(var(--tn-halo-rgb) / calc(0.06 * var(--tn-halo-k)));
    background: rgb(var(--tn-shade-rgb) / 0.45);
}
html[data-theme="permissionless"] .eco-card.is-open { box-shadow: 0 0 7.04px rgb(var(--tn-glow-rgb) / calc(0.08 * var(--tn-glow-k))), 0 0 16px rgb(var(--tn-glow-rgb) / calc(0.06 * var(--tn-glow-k))), 0 0 32px rgb(var(--tn-glow-2-rgb) / calc(0.04 * var(--tn-glow-k))); }
.eco-card-face { min-width: 0; }
.eco-card-top {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 0.5rem; margin-bottom: 0.4rem;
}
.eco-card h3 {
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--tn-mint);
    margin: 0;
    line-height: 1.3;
    overflow-wrap: anywhere;
}
.eco-status {
    font-size: var(--tn-size-label);
    text-transform: uppercase;
    letter-spacing: var(--tn-track-label);
    padding: 0.15rem 0.4rem;
    border-radius: var(--tn-radius-ctl);
    border: 1px solid;
    white-space: nowrap;
    flex-shrink: 0;
}
.eco-status--live {
    color: var(--tn-teal);
    border-color: rgb(var(--tn-teal-rgb) / 0.35);
    background: rgb(var(--tn-teal-rgb) / 0.08);
}
.eco-status--beta {
    color: var(--tn-amber);
    border-color: rgb(var(--tn-amber-rgb) / 0.35);
    background: rgb(var(--tn-amber-rgb) / 0.08);
}
.eco-status--soon {
    color: var(--tn-purple);
    border-color: rgb(var(--tn-purple-rgb) / 0.35);
    background: rgb(var(--tn-purple-rgb) / 0.08);
}
.eco-summary {
    font-size: 0.88rem;
    color: var(--tn-text);
    line-height: 1.5;
    margin: 0 0 0.55rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.eco-card.is-open .eco-summary {
    -webkit-line-clamp: unset;
    overflow: visible;
}
.eco-pills { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-bottom: 0.65rem; }
.eco-pill {
    font-size: 0.72rem;
    color: rgb(var(--tn-teal-rgb) / max(0.75, var(--tn-alpha-floor)));
    border: 1px solid rgb(var(--tn-teal-rgb) / 0.15);
    border-radius: var(--tn-radius-ctl);
    padding: 0.12rem 0.4rem;
}
.eco-actions {
    display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center;
}
.eco-open, .eco-link {
    font-family: var(--tn-font);
    font-size: 0.82rem;
    font-weight: 500;
    padding: 0.35rem 0.65rem;
    border-radius: var(--tn-radius-ctl);
    cursor: pointer;
    text-decoration: none !important;
    opacity: 1 !important;
    line-height: 1.25;
}
.eco-open {
    border: 1px solid rgb(var(--tn-teal-rgb) / 0.4);
    background: rgb(var(--tn-teal-rgb) / 0.12);
    color: var(--tn-teal);
}
.eco-open:hover {
    background: rgb(var(--tn-teal-rgb) / 0.2);
}
.eco-card.is-open .eco-open {
    border-color: rgb(var(--tn-coral-rgb) / 0.35);
    background: rgb(var(--tn-coral-rgb) / 0.08);
    color: var(--tn-coral);
}
.eco-link {
    border: 1px solid rgb(var(--tn-teal-rgb) / 0.22);
    color: var(--tn-teal) !important;
    background: transparent;
}
.eco-link:hover { background: rgb(var(--tn-teal-rgb) / 0.1); }

/* Expanded panel body (plane content lives here) */
.eco-card-detail {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgb(var(--tn-teal-rgb) / 0.12);
    min-width: 0;
}
.eco-card-detail[hidden] { display: none !important; }
.eco-card-detail .plane {
    display: block !important;
    width: 100%;
}
.eco-card-detail .plane-card,
.eco-card-detail .name-card {
    max-width: none;
    margin: 0;
}
.eco-card-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.75rem;
    padding-top: 0.65rem;
    border-top: 1px solid rgb(var(--tn-teal-rgb) / 0.1);
}

/* Snapshots page helpers */
.snap-card {
    border: 1px solid rgb(var(--tn-teal-rgb) / 0.16);
    border-radius: 12px;
    padding: 1.25rem 1.35rem;
    background: rgb(var(--tn-shade-rgb) / 0.3);
    margin-bottom: 1rem;
    text-align: left;
    width: 100%;
}
.snap-card h3 {
    color: var(--tn-mint);
    font-size: 1.25rem;
    margin: 0 0 0.75rem;
}
.snap-meta {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.35rem 1rem;
    font-size: 1rem;
    margin-bottom: 0.9rem;
}
.snap-meta dt { color: var(--tn-text-dim); }
.snap-meta dd { color: var(--tn-text); margin: 0; word-break: break-all; }
.snap-code {
    font-family: var(--tn-font-mono);
    font-size: 0.92rem;
    background: rgb(var(--tn-shade-rgb) / 0.45);
    border: 1px solid rgb(var(--tn-teal-rgb) / 0.15);
    border-radius: 8px;
    padding: 0.85rem 1rem;
    overflow-x: auto;
    color: var(--tn-teal);
    white-space: pre-wrap;
    margin: 0 0 0.75rem;
}
.snap-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.snap-actions { align-items: center; }
/* Resources buttons: the site's control (as Connect in the header):
   square corners, hairline accent border, nav type, one height. */
.snap-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 2.25rem;
    font-family: var(--tn-font);
    font-size: 0.88rem;
    font-weight: var(--tn-font-weight-medium);
    letter-spacing: var(--tn-track-nav);
    line-height: 1.25;
    padding: 0.45rem 0.85rem;
    border-radius: var(--tn-radius-ctl);
    border: 1px solid rgb(var(--tn-teal-rgb) / 0.45);
    background: transparent;
    color: var(--tn-text-bright);
    cursor: pointer;
    white-space: nowrap;
    vertical-align: middle;
    text-decoration: none !important;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.snap-btn:hover { color: var(--tn-mint); border-color: var(--tn-teal); background: rgb(var(--tn-teal-rgb) / 0.06); }
.snap-btn:focus-visible { outline: 1px solid var(--tn-teal); outline-offset: 2px; }
.snap-btn.primary {
    background: rgb(var(--tn-teal-rgb) / 0.12);
    color: var(--tn-mint);
    border-color: var(--tn-teal);
}
.snap-btn.primary:hover { background: rgb(var(--tn-teal-rgb) / 0.2); }
/* Toggle / radio / tab state on the same control, and a compact size for tool bars. */
.snap-btn[aria-pressed="true"], .snap-btn[aria-checked="true"], .snap-btn[aria-selected="true"] {
    background: rgb(var(--tn-teal-rgb) / 0.12);
    color: var(--tn-mint);
    border-color: var(--tn-teal);
}
/* Tool-bar buttons (graphs, Resources tabs): the same rectangular control as every other .snap-btn. */
.snap-btn.small { min-height: 2.25rem; padding: 0.45rem 0.85rem; font-size: 0.88rem; border-radius: var(--tn-radius-ctl); }
.snap-btn.small:active { background: rgb(var(--tn-teal-rgb) / 0.18); }

/* Shared page title rhythm (svg / tabs / no-rick / ibc) */
.page-title,
.tn-title {
    font-family: var(--tn-font);
    font-size: clamp(1.55rem, 3.5vw, 1.95rem);
    font-weight: var(--tn-font-weight-medium);
    color: var(--tn-mint);
    text-align: center;
    margin-bottom: 0.35rem;
    letter-spacing: -0.02em;
    line-height: var(--tn-line-tight);
    text-shadow: 0 0 30px rgba(183, 255, 183, 0.07);
    overflow-wrap: anywhere;
    max-width: 100%;
}
html[data-theme="permissionless"] .page-title, html[data-theme="permissionless"] .tn-title { text-shadow: 0 0 9.2px rgb(var(--tn-glow-rgb) / calc(0.070 * var(--tn-glow-tk))), 0 0 30px rgb(var(--tn-glow-rgb) / calc(0.084 * var(--tn-glow-tk))); }
.page-subtitle,
.tn-subtitle {
    font-family: var(--tn-font);
    font-size: clamp(0.78rem, 1.8vw, 0.9rem);
    font-weight: var(--tn-font-weight-body);
    color: #ffffda;
    text-transform: uppercase;
    letter-spacing: var(--tn-track-label);
    text-align: center;
    margin-bottom: 1.25rem;
    line-height: 1.45;
    max-width: 100%;
}

/* Unified content shell + cards */
.tn-shell {
    position: relative;
    z-index: 1;
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
    padding: 5.5rem 1.25rem 3rem;
    box-sizing: border-box;
    font-family: var(--tn-font);
}
.tn-card {
    background: var(--tn-panel);
    border: 1px solid var(--tn-border);
    border-radius: var(--tn-radius);
    overflow: hidden;
    font-family: var(--tn-font);
}
.tn-card-header {
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid var(--tn-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--tn-font);
    font-size: 0.78rem;
    font-weight: var(--tn-font-weight-ui);
    text-transform: uppercase;
    letter-spacing: var(--tn-track-label);
    color: var(--tn-text-dim);
}
.tn-card-body {
    padding: 1.1rem;
    color: var(--tn-text);
    font-family: var(--tn-font);
    font-size: 1rem;
    line-height: var(--tn-line-body);
}
.tn-kicker {
    font-family: var(--tn-font);
    font-size: var(--tn-size-label);
    letter-spacing: var(--tn-letter-kicker);
    text-transform: uppercase;
    color: rgb(var(--tn-teal-rgb) / max(0.75, var(--tn-alpha-floor)));
}

/* Translucent glass panels (shared desk look over glow canvas) */
.tn-glass {
    background: rgb(var(--tn-shade-rgb) / 0.4);
    border: 1px solid rgb(var(--tn-teal-rgb) / 0.15);
    border-radius: 12px;
    box-shadow: 0 0 40px rgb(var(--tn-halo-rgb) / calc(0.03 * var(--tn-halo-k)));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
html[data-theme="permissionless"] .tn-glass { box-shadow: 0 0 8.8px rgb(var(--tn-glow-rgb) / calc(0.04 * var(--tn-glow-k))), 0 0 20px rgb(var(--tn-glow-rgb) / calc(0.03 * var(--tn-glow-k))), 0 0 40px rgb(var(--tn-glow-2-rgb) / calc(0.02 * var(--tn-glow-k))); }
.tn-glass-soft {
    background: rgb(var(--tn-shade-rgb) / 0.28);
    border: 1px solid rgb(var(--tn-teal-rgb) / 0.12);
    border-radius: 10px;
    box-shadow: 0 0 28px rgb(var(--tn-halo-rgb) / calc(0.025 * var(--tn-halo-k)));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
html[data-theme="permissionless"] .tn-glass-soft { box-shadow: 0 0 6.16px rgb(var(--tn-glow-rgb) / calc(0.03 * var(--tn-glow-k))), 0 0 14px rgb(var(--tn-glow-rgb) / calc(0.03 * var(--tn-glow-k))), 0 0 28px rgb(var(--tn-glow-2-rgb) / calc(0.02 * var(--tn-glow-k))); }

/* ── Code blocks ──────────────────────────────────────────────────
   Structure after zakura.com: a framed slab (hairline border, square
   corners), a bar with the language and a Copy button, then the code on a
   deeper ground, scrolling sideways with a thin scrollbar. Colours are the
   theme's --tn-code-* tokens. lib/shell/shell.js wraps every <pre>. */
.tn-code {
    margin: 0.75rem 0 1rem;
    max-width: 100%;
    min-width: 0;
    background: var(--tn-code-frame);
    border: 1px solid var(--tn-code-border);
    border-radius: 0;
    text-shadow: none;
}
.tn-code:has(> pre:empty) { display: none; }
.tn-code-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem 0.75rem;
    min-height: 2.5rem;
    padding: 0.35rem 0.5rem 0.35rem 1rem;
    border-bottom: 1px solid var(--tn-code-border);
}
.tn-code-lang {
    font: 500 0.6875rem/1 var(--tn-font-mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--tn-code-muted);
}
.tn-code-copy {
    margin-left: auto;
    min-height: 28px;
    padding: 0.25rem 0.75rem;
    background: none;
    border: 1px solid var(--tn-code-border);
    border-radius: var(--tn-radius-ctl);
    color: var(--tn-code-muted);
    font: 500 0.6875rem/1.4 var(--tn-font-mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    text-shadow: none;
    transition: background-color 0.12s, border-color 0.12s, color 0.12s;
}
.tn-code-copy:hover { border-color: var(--tn-teal); color: var(--tn-teal); }
.tn-code-copy:focus-visible { outline: 1px solid var(--tn-teal); outline-offset: 2px; }
.tn-code-copy.is-copied { background: var(--tn-teal); border-color: var(--tn-teal); color: var(--tn-on-accent); }
.tn-code-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:root:root .tn-code > pre {
    display: block;
    margin: 0 !important;
    padding: 1rem 1.5rem !important;
    background: var(--tn-code-bg) !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: var(--tn-code-text) !important;
    font-family: var(--tn-font-mono) !important;
    font-size: 0.8125rem !important;
    font-weight: 400;
    line-height: 1.7 !important;
    white-space: pre !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    overflow-x: auto;
    tab-size: 2;
    text-shadow: none !important;
    scrollbar-width: thin;
    scrollbar-color: var(--tn-code-scroll) transparent;
}
:root:root .tn-code > pre:focus-visible { outline: 1px solid var(--tn-teal); outline-offset: -1px; }
.tn-code > pre::-webkit-scrollbar { height: 0.5rem; }
.tn-code > pre::-webkit-scrollbar-thumb { background: var(--tn-code-scroll); border-radius: 999px; }
.tn-code > pre::-webkit-scrollbar-track { background: transparent; }
:root:root .tn-code > pre code { display: block; padding: 0; background: none !important; border: 0; color: inherit; font: inherit; }
.tn-tk-bin { color: var(--tnw-code-keyword); }
.tn-tk-val { color: var(--tnw-code-value); }
.tn-tk-str { color: var(--tnw-code-string); }
.tn-tk-num { color: var(--tnw-code-number); }
.tn-tk-fn { color: var(--tnw-code-fn); }
.tn-tk-op, .tn-tk-cmt { color: var(--tnw-code-comment); }


/* ── fin1: site select (lib/ui/select.js) ─────────────────────────────────────────────────────────
   One control for every dropdown. Same quiet box as the site's inputs (teal hairline, control radius,
   shade fill); the list is a plain panel with a check on the chosen row. Rams 5/10: nothing extra. */
.tn-select { position: relative; display: inline-block; vertical-align: middle; max-width: 100%; min-width: 0; font: inherit; }
.tn-select.is-block { display: block; width: 100%; }
.tn-select[hidden] { display: none !important; }
.tn-select > select.tn-select__native {
    position: absolute !important; left: 0; bottom: 0; width: 1px !important; height: 1px !important; margin: 0 !important;
    padding: 0 !important; border: 0 !important; opacity: 0 !important; pointer-events: none; overflow: hidden; clip-path: inset(50%);
}
.tn-select__box {
    --tns-tint: var(--tn-teal-rgb);
    display: flex; align-items: center; gap: 0.5rem; box-sizing: border-box; width: 100%; min-height: 2.25rem;
    padding: 0.4rem 0.6rem; border: 1px solid rgb(var(--tns-tint) / 0.3); border-radius: var(--tn-radius-ctl, 2px);
    background: rgb(var(--tn-shade-rgb) / 0.35); color: var(--tn-text-bright); font: inherit; font-size: 0.88rem; line-height: 1.3;
    cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; text-align: left;
}
.tn-select__box::after {
    content: ''; flex: none; margin-left: auto; width: 0.42rem; height: 0.42rem; border: solid rgb(var(--tns-tint) / 0.85);
    border-width: 0 1.5px 1.5px 0; transform: translateY(-25%) rotate(45deg); transition: transform 120ms linear;
}
.tn-select.is-open .tn-select__box::after { transform: translateY(20%) rotate(-135deg); }
.tn-select__val { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tn-select.is-empty .tn-select__val { color: var(--tn-text-muted); }
.tn-select__box:hover { border-color: rgb(var(--tns-tint) / 0.55); }
.tn-select__box:focus { outline: none; }
.tn-select__box:focus-visible, .tn-select.is-open .tn-select__box { border-color: rgb(var(--tns-tint) / 0.9); box-shadow: 0 0 0 2px rgb(var(--tns-tint) / 0.18); }
.tn-select__box[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.tn-select.is-invalid .tn-select__box { border-color: rgb(var(--tn-coral-rgb) / 0.8); }
.tn-select__msg { display: block; margin-top: 0.25rem; font-size: 0.78rem; color: var(--tn-coral); }
.tn-select__msg[hidden] { display: none; }
.tn-select__list {
    position: fixed; z-index: 2147483000; box-sizing: border-box; margin: 0; padding: 0.25rem; list-style: none; overflow: auto; overscroll-behavior: contain;
    background: var(--tn-canvas); border: 1px solid rgb(var(--tn-teal-rgb) / 0.45); border-radius: var(--tn-radius-ctl, 2px);
    box-shadow: 0 10px 28px rgb(0 0 0 / 0.45); font-size: 0.88rem; color: var(--tn-text); text-align: left;
}
.tn-select__list[hidden] { display: none; }
.tn-select__opt {
    position: relative; display: flex; align-items: center; min-height: 2.1rem; box-sizing: border-box;
    padding: 0.35rem 0.6rem 0.35rem 1.6rem; border-radius: var(--tn-radius-ctl, 2px); cursor: pointer; line-height: 1.3; overflow-wrap: anywhere;
}
.tn-select__opt.in-group { padding-left: 2rem; }
.tn-select__opt.is-active { background: rgb(var(--tn-teal-rgb) / 0.16); color: var(--tn-text-bright); }
.tn-select__opt[aria-selected="true"] { color: var(--tn-mint); }
.tn-select__opt[aria-selected="true"]::before {
    content: ''; position: absolute; left: 0.6rem; top: 50%; width: 0.32rem; height: 0.6rem; border: solid currentColor;
    border-width: 0 1.5px 1.5px 0; transform: translateY(-62%) rotate(45deg);
}
.tn-select__opt.in-group[aria-selected="true"]::before { left: 1rem; }
.tn-select__opt[aria-disabled="true"] { opacity: 0.45; cursor: default; }
.tn-select__group { padding: 0.45rem 0.6rem 0.2rem; font-size: var(--tn-size-label, 0.7rem); letter-spacing: var(--tn-track-label, 0.06em); text-transform: uppercase; color: var(--tn-text-muted); }
@media (pointer: coarse) {
    .tn-select__box { min-height: 44px; }
    .tn-select__opt { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) { .tn-select__box::after { transition: none; } }

/* ── fin1: one short line, with an optional "why?" (lib/ui/why.js) ─────────────────────────────── */
.tn-why { font-size: 0.82rem; line-height: 1.45; color: var(--tn-text); margin: 0.35rem 0; }
.tn-why__line { display: inline; }
.tn-why details { display: inline; }
.tn-why summary { display: inline; cursor: pointer; margin-left: 0.35rem; color: var(--tn-teal); text-decoration: underline dotted; text-underline-offset: 2px; list-style: none; }
.tn-why summary::-webkit-details-marker { display: none; }
.tn-why details[open] > summary { color: var(--tn-text-muted); }
.tn-why__more { display: block; margin-top: 0.3rem; padding-left: 0.6rem; border-left: 2px solid rgb(var(--tn-teal-rgb) / 0.25); color: var(--tn-text-muted); overflow-wrap: anywhere; }
.tn-why.is-blocked .tn-why__line::before { content: ''; display: inline-block; width: 0.45rem; height: 0.45rem; margin-right: 0.45rem; border-radius: 1px; background: rgb(var(--tn-amber-rgb) / 0.85); vertical-align: 0.06em; }
.tn-why.is-err .tn-why__line::before { content: ''; display: inline-block; width: 0.45rem; height: 0.45rem; margin-right: 0.45rem; border-radius: 1px; background: rgb(var(--tn-coral-rgb) / 0.9); vertical-align: 0.06em; }
