/* The platform's one look (crates/platform-theme): Solarized (Ethan
   Schoonover's palette), light and dark: base03–base3 for paper and ink,
   cyan the one signal, the accents for state and code. Apps alias their own
   names to these. The switch sets data-theme on <html>; without it the
   system decides. */
:root {
  --paper: #fdf6e3;
  --panel: #fdf6e3;
  --well: #eee8d5;
  --well-2: #e6dfca;
  --ink: #073642;
  --ink-2: #586e75;
  --mute: #52666d;
  --faint: #6f8282;
  --rule: #e2dbc6;
  --rule-2: #cbc3ab;
  --sig: #2aa198;
  --sig-hover: #1f857d;
  --sig-bg: #e4ecda;
  --on-sig: #fdf6e3; --sig-2: #268bd2; --sig-2-bg: #e1eaf0; --gold: #8c6a00; --gold-line: #b58900; --punch: #2aa198; --punch-hover: #1f857d; --punch-bg: #e4ecda; --on-punch: #fdf6e3;
  --ok: #859900;
  --ok-bg: #efebc8;
  --warn: #b58900;
  --warn-bg: #f4e9c8;
  --err: #dc322f;
  --err-bg: #f9dfcd;
  --add: #859900;
  --add-bg: #efebc8;
  --del: #dc322f;
  --del-bg: #f9dfcd;
  --shadow: 0 1px 2px rgba(7, 54, 66, .06), 0 6px 20px rgba(7, 54, 66, .08);
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --font: var(--mono);
  /* Code. */
  --hk: #859900; --ht: #b58900; --hs: #2aa198; --hn: #d33682; --hf: #268bd2; --hm: #cb4b16; --ha: #6c71c4; --hv: #cb4b16; --hl: #6c71c4;
  /* Pajamas' action colours, AA with their text (theme's own test). */
  --action-confirm: #207a74; --action-confirm-hover: #1c6b66; --on-action-confirm: #fdf6e3; --action-danger: #cf2f2c; --action-danger-hover: #b62927; --on-action-danger: #fdf6e3;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #002b36; --panel: #002b36; --well: #073642; --well-2: #0a404e;
    --ink: #eee8d5; --ink-2: #93a1a1; --mute: #93a1a1; --faint: #586e75; --rule: #0d3f4b; --rule-2: #1a5160;
    --sig: #2aa198; --sig-hover: #3cc4b8; --sig-bg: #08404a; --on-sig: #002b36; --sig-2: #268bd2; --sig-2-bg: #0a3a52; --gold: #b58900; --gold-line: #b58900; --punch: #2aa198; --punch-hover: #3cc4b8; --punch-bg: #08404a; --on-punch: #002b36;
    --ok: #859900; --ok-bg: #183f2c; --warn: #b58900; --warn-bg: #213c2c; --err: #dc322f; --err-bg: #282c35;
    --add: #859900; --add-bg: #183f2c; --del: #dc322f; --del-bg: #282c35;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
    --hk: #859900; --ht: #b58900; --hs: #2aa198; --hn: #d33682; --hf: #268bd2; --hm: #cb4b16; --ha: #6c71c4; --hv: #cb4b16; --hl: #6c71c4;
    /* Pajamas' action colours, AA with their text (theme's own test). */
    --action-confirm: #2aa198; --action-confirm-hover: #44aca4; --on-action-confirm: #002b36; --action-danger: #e56765; --action-danger-hover: #e87977; --on-action-danger: #002b36;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #002b36; --panel: #002b36; --well: #073642; --well-2: #0a404e;
  --ink: #eee8d5; --ink-2: #93a1a1; --mute: #93a1a1; --faint: #586e75; --rule: #0d3f4b; --rule-2: #1a5160;
  --sig: #2aa198; --sig-hover: #3cc4b8; --sig-bg: #08404a; --on-sig: #002b36; --sig-2: #268bd2; --sig-2-bg: #0a3a52; --gold: #b58900; --gold-line: #b58900; --punch: #2aa198; --punch-hover: #3cc4b8; --punch-bg: #08404a; --on-punch: #002b36;
  --ok: #859900; --ok-bg: #183f2c; --warn: #b58900; --warn-bg: #213c2c; --err: #dc322f; --err-bg: #282c35;
  --add: #859900; --add-bg: #183f2c; --del: #dc322f; --del-bg: #282c35;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  --hk: #859900; --ht: #b58900; --hs: #2aa198; --hn: #d33682; --hf: #268bd2; --hm: #cb4b16; --ha: #6c71c4; --hv: #cb4b16; --hl: #6c71c4;
  /* Pajamas' action colours, AA with their text (theme's own test). */
  --action-confirm: #2aa198; --action-confirm-hover: #44aca4; --on-action-confirm: #002b36; --action-danger: #e56765; --action-danger-hover: #e87977; --on-action-danger: #002b36;
  color-scheme: dark;
}

/* Monokai (the palette picker's other choice), light and dark. */
:root[data-palette="monokai"] {
  --paper: #fdf9f3; --panel: #fdf9f3; --well: #f0ece4; --well-2: #e6e1d7;
  --ink: #272822; --ink-2: #49483e; --mute: #65614f; --faint: #a59f85; --rule: #e2ddd2; --rule-2: #cbc5b8;
  --sig: #1290bf; --sig-hover: #0d7096; --sig-bg: #e1eff3; --on-sig: #fdf9f3; --sig-2: #7c5cd6; --sig-2-bg: #ece6f8; --gold: #8f7f00; --gold-line: #c9b400; --punch: #1290bf; --punch-hover: #0d7096; --punch-bg: #e1eff3; --on-punch: #fdf9f3;
  --ok: #5c8a0a; --ok-bg: #ecf1dc; --warn: #c86a00; --warn-bg: #f8ead8; --err: #d9185c; --err-bg: #f9e0e6;
  --add: #5c8a0a; --add-bg: #ecf1dc; --del: #d9185c; --del-bg: #f9e0e6;
  --hk: #d9185c; --ht: #1290bf; --hs: #8f7f00; --hn: #7c5cd6; --hf: #5c8a0a; --hm: #c86a00; --ha: #5c8a0a; --hv: #c86a00; --hl: #c86a00;
  /* Pajamas' action colours, AA with their text (theme's own test). */
  --action-confirm: #0f79a0; --action-confirm-hover: #0d6a8d; --on-action-confirm: #fdf9f3; --action-danger: #d9185c; --action-danger-hover: #bf1551; --on-action-danger: #fdf9f3;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root[data-palette="monokai"]:not([data-theme="light"]) {
    --paper: #272822; --panel: #272822; --well: #3e3d32; --well-2: #49483e;
    --ink: #f8f8f2; --ink-2: #cfcfc2; --mute: #bab59f; --faint: #75715e; --rule: #3e3d32; --rule-2: #57584f;
    --sig: #66d9ef; --sig-hover: #8ce5f5; --sig-bg: #2f4448; --on-sig: #272822; --sig-2: #ae81ff; --sig-2-bg: #3a3350; --gold: #e6db74; --gold-line: #e6db74; --punch: #66d9ef; --punch-hover: #8ce5f5; --punch-bg: #2f4448; --on-punch: #272822;
    --ok: #a6e22e; --ok-bg: #384523; --warn: #fd971f; --warn-bg: #4a3a24; --err: #f92672; --err-bg: #4a2733;
    --add: #a6e22e; --add-bg: #384523; --del: #f92672; --del-bg: #4a2733;
    --hk: #f92672; --ht: #66d9ef; --hs: #e6db74; --hn: #ae81ff; --hf: #a6e22e; --hm: #fd971f; --ha: #a6e22e; --hv: #fd971f; --hl: #fd971f;
    /* Pajamas' action colours, AA with their text (theme's own test). */
    --action-confirm: #66d9ef; --action-confirm-hover: #78def1; --on-action-confirm: #272822; --action-danger: #fa4d8b; --action-danger-hover: #fb6299; --on-action-danger: #272822;
    color-scheme: dark;
  }
}
:root[data-palette="monokai"][data-theme="dark"] {
  --paper: #272822; --panel: #272822; --well: #3e3d32; --well-2: #49483e;
  --ink: #f8f8f2; --ink-2: #cfcfc2; --mute: #bab59f; --faint: #75715e; --rule: #3e3d32; --rule-2: #57584f;
  --sig: #66d9ef; --sig-hover: #8ce5f5; --sig-bg: #2f4448; --on-sig: #272822; --sig-2: #ae81ff; --sig-2-bg: #3a3350; --gold: #e6db74; --gold-line: #e6db74; --punch: #66d9ef; --punch-hover: #8ce5f5; --punch-bg: #2f4448; --on-punch: #272822;
  --ok: #a6e22e; --ok-bg: #384523; --warn: #fd971f; --warn-bg: #4a3a24; --err: #f92672; --err-bg: #4a2733;
  --add: #a6e22e; --add-bg: #384523; --del: #f92672; --del-bg: #4a2733;
  --hk: #f92672; --ht: #66d9ef; --hs: #e6db74; --hn: #ae81ff; --hf: #a6e22e; --hm: #fd971f; --ha: #a6e22e; --hv: #fd971f; --hl: #fd971f;
  /* Pajamas' action colours, AA with their text (theme's own test). */
  --action-confirm: #66d9ef; --action-confirm-hover: #78def1; --on-action-confirm: #272822; --action-danger: #fa4d8b; --action-danger-hover: #fb6299; --on-action-danger: #272822;
  color-scheme: dark;
}

/* Nano (all year): black and midnight purple, IBM Carbon's. Dark is
   Carbon's Gray 100 paper and its grays for ink, midnight purple tinting
   the wells, the rules and the signal's ground, Purple 40 the signal.
   Light turns it over: white paper with lavender wells, Carbon's black
   for ink, Purple 70 the signal. */
:root[data-palette="nano"] {
  --paper: #ffffff; --panel: #ffffff; --well: #f5f3fa; --well-2: #ece7f6;
  --ink: #161616; --ink-2: #393939; --mute: #6f6f6f; --faint: #8d8d8d; --rule: #e4e0ec; --rule-2: #c9c2d8;
  --sig: #6929c4; --sig-hover: #491d8b; --sig-bg: #e8daff; --on-sig: #ffffff; --sig-2: #0f62fe; --sig-2-bg: #edf5ff; --gold: #8e6a00; --gold-line: #b28600; --punch: #6929c4; --punch-hover: #491d8b; --punch-bg: #e8daff; --on-punch: #ffffff;
  --ok: #198038; --ok-bg: #defbe6; --warn: #8e6a00; --warn-bg: #fcf4d6; --err: #da1e28; --err-bg: #fff1f1;
  --add: #198038; --add-bg: #defbe6; --del: #da1e28; --del-bg: #fff1f1;
  --shadow: 0 1px 2px rgba(22, 22, 22, .06), 0 6px 20px rgba(41, 16, 74, .08);
  --hk: #6929c4; --ht: #0072c3; --hs: #198038; --hn: #9f1853; --hf: #0f62fe; --hm: #8a3800; --ha: #005d5d; --hv: #8a3800; --hl: #9f1853;
  /* Pajamas' action colours, AA with their text (theme's own test). */
  --action-confirm: #6929c4; --action-confirm-hover: #5c24ac; --on-action-confirm: #ffffff; --action-danger: #da1e28; --action-danger-hover: #c01a23; --on-action-danger: #ffffff;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root[data-palette="nano"]:not([data-theme="light"]) {
    --paper: #161616; --panel: #161616; --well: #1c1826; --well-2: #251e36;
    --ink: #f4f4f4; --ink-2: #c6c6c6; --mute: #a8a8a8; --faint: #6f6f6f; --rule: #262230; --rule-2: #3b3150;
    --sig: #a56eff; --sig-hover: #be95ff; --sig-bg: #2e1a47; --on-sig: #161616; --sig-2: #78a9ff; --sig-2-bg: #1c2a47; --gold: #f1c21b; --gold-line: #d2a106; --punch: #a56eff; --punch-hover: #be95ff; --punch-bg: #2e1a47; --on-punch: #161616;
    --ok: #42be65; --ok-bg: #12291b; --warn: #f1c21b; --warn-bg: #2e2810; --err: #fa4d56; --err-bg: #3a1519;
    --add: #42be65; --add-bg: #12291b; --del: #fa4d56; --del-bg: #3a1519;
    --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 8px 24px rgba(0, 0, 0, .45);
    --hk: #be95ff; --ht: #82cfff; --hs: #6fdc8c; --hn: #ff7eb6; --hf: #78a9ff; --hm: #ffb784; --ha: #3ddbd9; --hv: #ffb784; --hl: #ff7eb6;
    /* Pajamas' action colours, AA with their text (theme's own test). */
    --action-confirm: #a56eff; --action-confirm-hover: #b07fff; --on-action-confirm: #161616; --action-danger: #fa4d56; --action-danger-hover: #fb626a; --on-action-danger: #161616;
    color-scheme: dark;
  }
}
:root[data-palette="nano"][data-theme="dark"] {
  --paper: #161616; --panel: #161616; --well: #1c1826; --well-2: #251e36;
  --ink: #f4f4f4; --ink-2: #c6c6c6; --mute: #a8a8a8; --faint: #6f6f6f; --rule: #262230; --rule-2: #3b3150;
  --sig: #a56eff; --sig-hover: #be95ff; --sig-bg: #2e1a47; --on-sig: #161616; --sig-2: #78a9ff; --sig-2-bg: #1c2a47; --gold: #f1c21b; --gold-line: #d2a106; --punch: #a56eff; --punch-hover: #be95ff; --punch-bg: #2e1a47; --on-punch: #161616;
  --ok: #42be65; --ok-bg: #12291b; --warn: #f1c21b; --warn-bg: #2e2810; --err: #fa4d56; --err-bg: #3a1519;
  --add: #42be65; --add-bg: #12291b; --del: #fa4d56; --del-bg: #3a1519;
  --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 8px 24px rgba(0, 0, 0, .45);
  --hk: #be95ff; --ht: #82cfff; --hs: #6fdc8c; --hn: #ff7eb6; --hf: #78a9ff; --hm: #ffb784; --ha: #3ddbd9; --hv: #ffb784; --hl: #ff7eb6;
  /* Pajamas' action colours, AA with their text (theme's own test). */
  --action-confirm: #a56eff; --action-confirm-hover: #b07fff; --on-action-confirm: #161616; --action-danger: #fa4d56; --action-danger-hover: #fb626a; --on-action-danger: #161616;
  color-scheme: dark;
}

/* --punch: the loud accent (primary buttons, badges, counts, the brand
   mark); the signal itself everywhere but Christmas.

   The seasons' palettes (each offered in its month only, choice.rs; the
   admin site previews them in any month). */

/* Christmas (December): red and green, half and half. Pine carries the
   structure (links, tabs, focus, selection, chart series 1, the rules'
   tint); cranberry is the punch (--punch: primary buttons, badges, the
   brand mark, chart series 2); gold warns and draws the hairline. Cream
   paper with pine-tinted wells, or the evergreen night. */
:root[data-palette="christmas"] {
  --paper: #fbf7ee; --panel: #fcf9f2; --well: #eef0e2; --well-2: #e3e8d5;
  --ink: #1d2b22; --ink-2: #3f5146; --mute: #55655a; --faint: #77826f; --rule: #dde3d0; --rule-2: #bfcbb2;
  --sig: #1d6a47; --sig-hover: #15523a; --sig-bg: #dfede3; --on-sig: #fbf7ee; --sig-2: #ae2338; --sig-2-bg: #f6dfe0; --gold: #855f00; --gold-line: #c9a03a; --punch: #ae2338; --punch-hover: #8c1b2c; --punch-bg: #f6dfe0; --on-punch: #fbf7ee;
  --ok: #3f6e1c; --ok-bg: #e7efd9; --warn: #855f00; --warn-bg: #f6ead0; --err: #ae2338; --err-bg: #f8e1e0;
  --add: #3f6e1c; --add-bg: #e7efd9; --del: #ae2338; --del-bg: #f8e1e0;
  --hk: #ae2338; --ht: #1d6a47; --hs: #855f00; --hn: #8a3a6e; --hf: #256a80; --hm: #a64d12; --ha: #3f6e1c; --hv: #a64d12; --hl: #8a3a6e;
  /* Pajamas' action colours, AA with their text (theme's own test). */
  --action-confirm: #1d6a47; --action-confirm-hover: #1a5d3e; --on-action-confirm: #fbf7ee; --action-danger: #ae2338; --action-danger-hover: #991f31; --on-action-danger: #fbf7ee;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root[data-palette="christmas"]:not([data-theme="light"]) {
    --paper: #0f1f19; --panel: #11221b; --well: #16291f; --well-2: #1c3127;
    --ink: #efe7d4; --ink-2: #b9c1b0; --mute: #95a293; --faint: #6f8475; --rule: #1d3329; --rule-2: #2c4a3c;
    --sig: #56b98c; --sig-hover: #74cba2; --sig-bg: #18362a; --on-sig: #0f1f19; --sig-2: #f06b7c; --sig-2-bg: #3a1c23; --gold: #e2b54d; --gold-line: #b8913a; --punch: #f06b7c; --punch-hover: #f4808f; --punch-bg: #3a1c23; --on-punch: #0f1f19;
    --ok: #9cc25a; --ok-bg: #233620; --warn: #e2b54d; --warn-bg: #36321f; --err: #f06b7c; --err-bg: #3b2228;
    --add: #9cc25a; --add-bg: #233620; --del: #f06b7c; --del-bg: #3b2228;
    --hk: #f06b7c; --ht: #56b98c; --hs: #e2b54d; --hn: #cf9fe0; --hf: #7fc8c3; --hm: #eb945c; --ha: #9cc25a; --hv: #eb945c; --hl: #cf9fe0;
    /* Pajamas' action colours, AA with their text (theme's own test). */
    --action-confirm: #56b98c; --action-confirm-hover: #6ac19a; --on-action-confirm: #0f1f19; --action-danger: #f06b7c; --action-danger-hover: #f27d8c; --on-action-danger: #0f1f19;
    color-scheme: dark;
  }
}
:root[data-palette="christmas"][data-theme="dark"] {
  --paper: #0f1f19; --panel: #11221b; --well: #16291f; --well-2: #1c3127;
  --ink: #efe7d4; --ink-2: #b9c1b0; --mute: #95a293; --faint: #6f8475; --rule: #1d3329; --rule-2: #2c4a3c;
  --sig: #56b98c; --sig-hover: #74cba2; --sig-bg: #18362a; --on-sig: #0f1f19; --sig-2: #f06b7c; --sig-2-bg: #3a1c23; --gold: #e2b54d; --gold-line: #b8913a; --punch: #f06b7c; --punch-hover: #f4808f; --punch-bg: #3a1c23; --on-punch: #0f1f19;
  --ok: #9cc25a; --ok-bg: #233620; --warn: #e2b54d; --warn-bg: #36321f; --err: #f06b7c; --err-bg: #3b2228;
  --add: #9cc25a; --add-bg: #233620; --del: #f06b7c; --del-bg: #3b2228;
  --hk: #f06b7c; --ht: #56b98c; --hs: #e2b54d; --hn: #cf9fe0; --hf: #7fc8c3; --hm: #eb945c; --ha: #9cc25a; --hv: #eb945c; --hl: #cf9fe0;
  /* Pajamas' action colours, AA with their text (theme's own test). */
  --action-confirm: #56b98c; --action-confirm-hover: #6ac19a; --on-action-confirm: #0f1f19; --action-danger: #f06b7c; --action-danger-hover: #f27d8c; --on-action-danger: #0f1f19;
  color-scheme: dark;
}

/* Halloween (October): pumpkin leads, violet follows (--sig-2), gold
   for warnings; on bone paper with pumpkin-tinted wells, or an aubergine
   night. */
:root[data-palette="halloween"] {
  --paper: #faf5ea; --panel: #fbf6ee; --well: #f5e7d6; --well-2: #eedcc6;
  --ink: #231a26; --ink-2: #4a3d4e; --mute: #645766; --faint: #847785; --rule: #ead9c4; --rule-2: #d6bc9c;
  --sig: #a8460b; --sig-hover: #8f3b08; --sig-bg: #f8e1cd; --on-sig: #faf5ea; --sig-2: #6b3fa0; --sig-2-bg: #ece3f4; --gold: #806005; --gold-line: #c9a03a; --punch: #a8460b; --punch-hover: #8f3b08; --punch-bg: #f8e1cd; --on-punch: #faf5ea;
  --ok: #557018; --ok-bg: #ebeed6; --warn: #806005; --warn-bg: #f5ebcd; --err: #b0203a; --err-bg: #f7e0e0;
  --add: #557018; --add-bg: #ebeed6; --del: #b0203a; --del-bg: #f7e0e0;
  --hk: #6b3fa0; --ht: #a8460b; --hs: #557018; --hn: #a1306a; --hf: #2f6b86; --hm: #a8460b; --ha: #6b3fa0; --hv: #8f3b08; --hl: #a1306a;
  /* Pajamas' action colours, AA with their text (theme's own test). */
  --action-confirm: #a8460b; --action-confirm-hover: #943e0a; --on-action-confirm: #faf5ea; --action-danger: #b0203a; --action-danger-hover: #9b1c33; --on-action-danger: #faf5ea;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root[data-palette="halloween"]:not([data-theme="light"]) {
    --paper: #17121b; --panel: #1a141d; --well: #241a21; --well-2: #2e2128;
    --ink: #efe6d8; --ink-2: #c0b4c2; --mute: #9e91a1; --faint: #74687a; --rule: #2e2128; --rule-2: #46323a;
    --sig: #f08a3c; --sig-hover: #f7a462; --sig-bg: #3d2617; --on-sig: #17121b; --sig-2: #b693ee; --sig-2-bg: #2e2440; --gold: #e2b54d; --gold-line: #b8913a; --punch: #f08a3c; --punch-hover: #f7a462; --punch-bg: #3d2617; --on-punch: #17121b;
    --ok: #9cc25a; --ok-bg: #26301f; --warn: #e2b54d; --warn-bg: #362d1e; --err: #f06b7c; --err-bg: #3b1f2a;
    --add: #9cc25a; --add-bg: #26301f; --del: #f06b7c; --del-bg: #3b1f2a;
    --hk: #b693ee; --ht: #f08a3c; --hs: #a9c46a; --hn: #ef7fae; --hf: #7fc0d8; --hm: #f08a3c; --ha: #b693ee; --hv: #f0a35c; --hl: #ef7fae;
    /* Pajamas' action colours, AA with their text (theme's own test). */
    --action-confirm: #f08a3c; --action-confirm-hover: #f29853; --on-action-confirm: #17121b; --action-danger: #f06b7c; --action-danger-hover: #f27d8c; --on-action-danger: #17121b;
    color-scheme: dark;
  }
}
:root[data-palette="halloween"][data-theme="dark"] {
  --paper: #17121b; --panel: #1a141d; --well: #241a21; --well-2: #2e2128;
  --ink: #efe6d8; --ink-2: #c0b4c2; --mute: #9e91a1; --faint: #74687a; --rule: #2e2128; --rule-2: #46323a;
  --sig: #f08a3c; --sig-hover: #f7a462; --sig-bg: #3d2617; --on-sig: #17121b; --sig-2: #b693ee; --sig-2-bg: #2e2440; --gold: #e2b54d; --gold-line: #b8913a; --punch: #f08a3c; --punch-hover: #f7a462; --punch-bg: #3d2617; --on-punch: #17121b;
  --ok: #9cc25a; --ok-bg: #26301f; --warn: #e2b54d; --warn-bg: #362d1e; --err: #f06b7c; --err-bg: #3b1f2a;
  --add: #9cc25a; --add-bg: #26301f; --del: #f06b7c; --del-bg: #3b1f2a;
  --hk: #b693ee; --ht: #f08a3c; --hs: #a9c46a; --hn: #ef7fae; --hf: #7fc0d8; --hm: #f08a3c; --ha: #b693ee; --hv: #f0a35c; --hl: #ef7fae;
  /* Pajamas' action colours, AA with their text (theme's own test). */
  --action-confirm: #f08a3c; --action-confirm-hover: #f29853; --on-action-confirm: #17121b; --action-danger: #f06b7c; --action-danger-hover: #f27d8c; --on-action-danger: #17121b;
  color-scheme: dark;
}


html { background: var(--paper); color: var(--ink); }
/* No scrollbars (owner, 2026-12-04: never a sideways one, and the
   vertical ones are clutter too): everything still scrolls, by wheel,
   touch and keys, without a bar showing. Nothing may scroll sideways at
   all; what's too wide is a layout bug the page audit (chat-e2e --shoot)
   catches. Not by clipping the root: a clipped root stops sticky
   elements (home's story stage) from sticking. */
* { scrollbar-width: none; }
*::-webkit-scrollbar { display: none; }
body { font-family: var(--font); }

/* The first screen appears whole (owner, 2026-12-04: never the frame first
   and the data snapping in after). A page that loads its data in the
   browser is served with data-loading on <body> and the splash
   (platform_theme::with_splash): the app's mark drawing itself over a
   hairline sweep, in the page's own colours. The app removes data-loading
   once everything on its first screen is in; the page then fades in under
   the splash fading out. The splash waits a moment before it shows, so a
   quick load is never a flash of it; past 10 s the page shows regardless.
   An app's own colours: --splash-bg, --splash-ink, --splash-accent. */
body[data-loading] > :not(.platform-splash) { opacity: 0; animation: platform-held 0s 10s forwards; }
body > :not(.platform-splash) { transition: opacity .18s ease-out; }
body[data-loading] .platform-splash { animation: platform-splash-held 0s 10s forwards; }
@keyframes platform-held { to { opacity: 1; } }
@keyframes platform-splash-held { to { opacity: 0; visibility: hidden; } }
.platform-splash {
  position: fixed; inset: 0; z-index: 2147483000; display: grid; place-items: center;
  background: var(--splash-bg, var(--paper)); color: var(--splash-ink, var(--ink));
  pointer-events: none; transition: opacity .22s ease-out, visibility 0s .22s;
}
body:not([data-loading]) .platform-splash { opacity: 0; visibility: hidden; }
.platform-splash-in {
  display: grid; justify-items: center; gap: 18px;
  opacity: 0; animation: platform-splash-in .3s cubic-bezier(.2, .7, .2, 1) .28s forwards;
}
.platform-splash-mark { position: relative; width: 56px; height: 56px; }
.platform-splash-mark svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5; overflow: visible; }
.platform-splash-ghost { stroke: currentColor; opacity: .14; }
.platform-splash-draw { stroke: var(--splash-accent, var(--sig)); }
.platform-splash-draw > * { stroke-dasharray: 1 1; stroke-dashoffset: 1; animation: platform-splash-draw 1.8s cubic-bezier(.65, 0, .35, 1) infinite; }
.platform-splash-draw > :nth-child(2) { animation-delay: .08s; }
.platform-splash-draw > :nth-child(3) { animation-delay: .16s; }
.platform-splash-draw > :nth-child(4) { animation-delay: .24s; }
.platform-splash-draw > :nth-child(n+5) { animation-delay: .32s; }
.platform-splash-name { font: 500 13px/1 var(--mono); color: var(--splash-ink, var(--ink)); opacity: .72; }
.platform-splash-bar { position: relative; width: 96px; height: 1px; overflow: hidden; background: color-mix(in srgb, currentColor 14%, transparent); }
.platform-splash-bar::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 32%; background: var(--splash-accent, var(--sig)); animation: platform-splash-sweep 1.1s cubic-bezier(.65, 0, .35, 1) infinite; }
/* The sign-in handoff (platform-auth's continue page): the same screen,
   standing on its own; its Continue button only if the page hasn't moved
   on by itself after a few seconds. */
body:not([data-loading]) .platform-splash.handoff { opacity: 1; visibility: visible; pointer-events: auto; }
.handoff-later { opacity: 0; pointer-events: none; animation: platform-handoff-later 0s 4s forwards; }
.handoff-later form { margin: 8px 0 0; }
@keyframes platform-handoff-later { to { opacity: 1; pointer-events: auto; } }
@keyframes platform-splash-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes platform-splash-draw {
  0% { stroke-dashoffset: 1; }
  45%, 60% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -1; }
}
@keyframes platform-splash-sweep { from { transform: translateX(-100%); } to { transform: translateX(312%); } }
@media (prefers-reduced-motion: reduce) {
  body > :not(.platform-splash), .platform-splash { transition: none; }
  .platform-splash-in { animation-duration: .01s; }
  .platform-splash-draw > * { animation: none; stroke-dashoffset: 0; }
  .platform-splash-bar::after { animation: none; width: 100%; opacity: .5; }
}
:focus-visible { outline: 2px solid var(--sig); outline-offset: 2px; }
::selection { background: var(--sig-bg); }

/* Tooltips: data-tip="…" on any element, never the browser's own title
   box. Shows on hover and keyboard focus after a short wait, hides at once.
   data-tip-pos="top|bottom|left|right" (top by default); data-tip-align=
   "start|end" pins a top/bottom tip to the element's left or right edge
   (for elements near the screen's edge). Drawn with ::after, so it can't go
   on void elements (input, img): put it on their button or wrapper. Pair it
   with aria-label on icon-only buttons. */
:where([data-tip]) { position: relative; }
[data-tip]::after {
  content: attr(data-tip); position: absolute; z-index: 2147483100; pointer-events: none;
  left: 50%; bottom: calc(100% + 6px); translate: -50% 2px;
  box-sizing: border-box; width: max-content; max-width: min(280px, calc(100vw - 32px));
  padding: 5px 8px; font: 400 12px/1.45 var(--mono); letter-spacing: 0; text-align: left; text-transform: none;
  white-space: pre-line; overflow-wrap: anywhere;
  color: var(--paper); background: var(--ink); border: 1px solid var(--ink); border-radius: 0; box-shadow: var(--shadow);
  opacity: 0; visibility: hidden;
}
/* Hidden, a tip takes no room: an invisible one by a button at the
   window's edge would still widen the page (a sideways scroll). */
[data-tip]:not(:hover, :focus-visible)::after { max-width: 0; max-height: 0; padding: 0; border-width: 0; overflow: hidden; }
[data-tip]:hover::after, [data-tip]:focus-visible::after {
  opacity: 1; visibility: visible; translate: -50% 0;
  transition: opacity .12s ease .35s, translate .12s ease .35s, visibility 0s linear .35s;
}
[data-tip=""]::after { display: none; }
/* A tip inside another's element: only the inner one shows. */
[data-tip]:has([data-tip]:hover, [data-tip]:focus-visible)::after { opacity: 0; visibility: hidden; transition: none; }
[data-tip][data-tip-pos="bottom"]::after { bottom: auto; top: calc(100% + 6px); translate: -50% -2px; }
[data-tip][data-tip-pos="left"]::after { left: auto; right: calc(100% + 6px); bottom: auto; top: 50%; translate: 2px -50%; }
[data-tip][data-tip-pos="right"]::after { left: calc(100% + 6px); bottom: auto; top: 50%; translate: -2px -50%; }
[data-tip][data-tip-pos="left"]:is(:hover, :focus-visible)::after,
[data-tip][data-tip-pos="right"]:is(:hover, :focus-visible)::after { translate: 0 -50%; }
[data-tip][data-tip-align="start"]::after { left: 0; right: auto; translate: 0 2px; }
[data-tip][data-tip-align="end"]::after { left: auto; right: 0; translate: 0 2px; }
[data-tip][data-tip-align]:is(:hover, :focus-visible)::after { translate: 0 0; }
/* Dark: a raised surface, not a glaring light box. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) [data-tip]::after { color: var(--ink); background: var(--well-2); border-color: var(--rule-2); }
}
:root[data-theme="dark"] [data-tip]::after { color: var(--ink); background: var(--well-2); border-color: var(--rule-2); }
@media (prefers-reduced-motion: reduce) {
  [data-tip]::after, [data-tip]:is(:hover, :focus-visible)::after { transition-duration: 0s; }
}
@media print { [data-tip]::after { display: none; } }

/* Every native select: no browser arrow; a Lucide chevron-down, 12px from
   the right edge and centred, with room so the text never reaches it.
   Multi-line lists (multiple, size) keep the browser's look. */
:root { --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-opacity='.6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-opacity='.7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
}
:root[data-theme="dark"] { --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-opacity='.7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
:where(select) { color: var(--ink); background-color: var(--panel); border: 1px solid var(--rule-2); border-radius: 0; font: inherit; }
select:not([multiple]):not([size]) {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  background-image: var(--chev); background-repeat: no-repeat; background-position: right 12px center; background-size: 12px 12px;
  padding-right: 36px; text-overflow: ellipsis;
}
select:not([multiple]):not([size]):focus-visible { outline: 2px solid var(--sig); outline-offset: 2px; }
select:not([multiple]):not([size]):disabled { opacity: .55; }
select option { color: var(--ink); background: var(--panel); }

/* The mark every app carries at its foot (platform_theme::LEGAL). */
.legal { margin: 24px auto 16px; padding: 0 16px; max-width: 720px; font: 11px/1.5 var(--mono); color: var(--faint); text-align: center; }

/* Code (platform-highlight's classes). */
.hk { color: var(--hk); } .ht { color: var(--ht); } .hs { color: var(--hs); } .hc { color: var(--faint); font-style: italic; }
.hn { color: var(--hn); } .hf { color: var(--hf); } .hm { color: var(--hm); } .ha { color: var(--ha); } .hv { color: var(--hv); } .hl { color: var(--hl); }

/* The switch: the palette and light/dark, bottom left, on a page with no
   place for it (data-theme-switch, data-theme-slot). */
.theme-switch {
  position: fixed; left: 12px; bottom: 12px; z-index: 2147483000; display: inline-flex;
  font: 12px var(--font); background: var(--panel); border: 1px solid var(--rule);
}
.theme-switch button, .theme-switch select {
  height: 30px; margin: 0; font: inherit; color: var(--mute); background: transparent; border: 0; cursor: pointer;
}
.theme-switch button { width: 30px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-left: 1px solid var(--rule); } /* nosemgrep: bare-element-padding-reset (icon buttons, sized) */
/* The select's chevron is every select's (above). */
.theme-switch select { padding-left: 10px; }
.theme-switch .pick { position: relative; display: inline-flex; color: var(--mute); }
.theme-switch .pick:hover { color: var(--ink); }
.theme-switch .pick select { color: inherit; }
.theme-switch button:hover, .theme-switch select:hover { color: var(--ink); }
.theme-switch svg { width: 16px; height: 16px; }
/* In a page's own place for it (data-theme-slot, e.g. the sign-in card's
   footer): in the flow, the palette and a light | dark pair (the one on,
   pressed). Set in full, so a page's own button and label rules don't leak in. */
.theme-switch.inline { position: static; z-index: auto; align-items: center; gap: 8px; background: none; border: 0; }
.theme-switch.inline select { height: 30px; padding-left: 10px; color: var(--ink); background-color: var(--panel); border: 1px solid var(--rule-2); }
.theme-switch.inline .seg { display: inline-flex; border: 1px solid var(--rule-2); }
.theme-switch.inline .seg button { /* nosemgrep: bare-element-padding-reset (icon buttons, sized) */
  display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 28px; margin: 0; padding: 0;
  color: var(--mute); background: transparent; border: 0; border-radius: 0; letter-spacing: 0; transform: none;
}
.theme-switch.inline .seg button + button { border-left: 1px solid var(--rule-2); }
.theme-switch.inline .seg button:hover { color: var(--ink); background: transparent; }
.theme-switch.inline .seg button[aria-pressed="true"] { color: var(--ink); background: var(--well-2); }
.theme-switch.inline .seg svg { width: 15px; height: 15px; }
/* In a page's header (data-theme-switch): one icon button, the palette and
   light | dark in a box under it. The attribute's value is the page's own
   classes for the button, so it matches its neighbours; these are the
   defaults under them. */
[data-theme-switch] { display: inline-flex; flex: none; align-items: center; align-self: center; }
:where(.theme-open) {
  display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; margin: 0; padding: 0;
  font: inherit; color: var(--mute); background: transparent; border: 0; border-radius: 0; cursor: pointer;
}
:where(.theme-open):hover, :where(.theme-open)[aria-expanded="true"] { color: var(--ink); }
.theme-open svg { width: 16px; height: 16px; flex: none; }
.theme-open[aria-expanded="true"]::after { display: none; }
.theme-pop {
  position: fixed; top: 0; left: 16px; z-index: 2147483000; box-sizing: border-box; max-width: calc(100vw - 32px); padding: 8px;
  font: 12px var(--font); color: var(--ink); background: var(--panel); border: 1px solid var(--rule-2); border-radius: 0; box-shadow: var(--shadow);
}
.theme-pop[hidden] { display: none; }
.theme-pop .theme-switch.inline { display: flex; }
.theme-pop .theme-switch.inline .pick { flex: 0 1 auto; min-width: 0; }
.theme-pop .theme-switch.inline select { width: auto; max-width: 100%; margin: 0; font: inherit; box-shadow: none; }
.theme-pop .theme-switch.inline .seg button { font: inherit; box-shadow: none; }
@media print { .theme-switch, [data-theme-switch], .theme-pop { display: none; } }
