/* rohin.me - design tokens.
   Two attributes on <html>, both set before first paint by the small script in index.html:
     data-theme   = "dark" | "light"                          (the header switch: auto follows the device)
     data-palette = "almanac" | "chart" | "poster" | "mono" | "classic"  (the colour version; almanac is the default)
   A palette sets the BASE colours for both modes (surfaces, ink, accent, data colours, maps). Everything else is
   derived from those below, once, so a new palette is one pair of blocks. Scenes use only these variables, never
   raw colours; canvas and three.js code reads them with ctx.colors() and reads again in ctx.onTheme().
   tests/run-tests --palettes checks every palette in both modes (4.5:1 text, 3:1 marks and large shapes).

   THE LOOK. Every version but "classic" shares one structure: no rounded corners, no glass, no shadows; rules and
   space instead of boxes; three type families with fixed jobs. Light and dark are two designs on that structure:
     light  "almanac"     paper, titles and names in the serif, labels in small capitals of the sans, ink for what is on
     dark   "instrument"  graphite, titles and labels in capitals of the monospace, names in the sans, the accent for what is on
   Capitals come from a face, never from text-transform: see "Capitals without text-transform" below.
   The roles are tokens (--font-head --font-title --font-label --font-num, --title-*, --label-*, --rule, --on) so a
   page built against them changes with the mode. "classic" keeps the first look (one rounded sans, pills, glass). */

/* Fonts: self-hosted, SIL Open Font License 1.1. Newsreader (Production Type), IBM Plex Sans and IBM Plex Mono (IBM).
   Latin and Latin Extended only; a file is fetched only when a page uses that face and range. */
@font-face { font-family: 'Newsreader'; font-style: normal; font-weight: 200 800; font-display: swap; src: url(../../../fonts/newsreader-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Newsreader'; font-style: normal; font-weight: 200 800; font-display: swap; src: url(../../../fonts/newsreader-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Newsreader'; font-style: italic; font-weight: 400; font-display: swap; src: url(../../../fonts/newsreader-italic-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url(../../../fonts/plex-sans-400-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url(../../../fonts/plex-sans-400-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url(../../../fonts/plex-sans-600-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url(../../../fonts/plex-sans-600-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url(../../../fonts/plex-sans-700-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url(../../../fonts/plex-sans-700-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(../../../fonts/plex-mono-400-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(../../../fonts/plex-mono-400-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(../../../fonts/plex-mono-500-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* Capitals without text-transform. Labels and the dark page titles are set in capitals, but the words in the page stay
   as written ("Data", not "DATA"): a screen reader, a copy, a test that reads the text all get the real word. These
   three small files are cuts of the faces above in which a to z draw as A to Z (made with fontTools from the same
   files, Basic Latin and Latin-1). font-display: block, and index.html preloads them: a label never shows in the
   wrong case first. */
@font-face { font-family: 'Plex Sans Caps'; font-style: normal; font-weight: 400 700; font-display: block; src: url(../../../fonts/plex-sans-600-caps.woff2) format('woff2'); }
@font-face { font-family: 'Plex Mono Caps'; font-style: normal; font-weight: 400; font-display: block; src: url(../../../fonts/plex-mono-400-caps.woff2) format('woff2'); }
@font-face { font-family: 'Plex Mono Caps'; font-style: normal; font-weight: 500 700; font-display: block; src: url(../../../fonts/plex-mono-500-caps.woff2) format('woff2'); }
/* What shows until a face has arrived: a face of the device, scaled to the same width and height of line, so words
   do not move when the real one swaps in. */
@font-face { font-family: 'Newsreader Fallback'; src: local('Times New Roman'), local('Times'), local('Tinos'); size-adjust: 103.8%; ascent-override: 70.8%; descent-override: 25.5%; line-gap-override: 0%; }
@font-face { font-family: 'Plex Sans Fallback'; src: local('Arial'), local('Roboto'), local('Helvetica Neue'), local('Liberation Sans'); size-adjust: 101.2%; ascent-override: 101.3%; descent-override: 27.2%; line-gap-override: 0%; }
@font-face { font-family: 'Plex Mono Fallback'; src: local('Menlo'), local('Courier New'), local('Liberation Mono'); ascent-override: 102.5%; descent-override: 27.5%; line-gap-override: 0%; }
/* The classic version's face. */
@font-face {
  font-family: 'Jakarta Classic'; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(../../../fonts/plus-jakarta-sans-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Jakarta Classic'; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(../../../fonts/plus-jakarta-sans-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}


/* Labels drawn on canvas by a few pages (the hikes map, a hike's land, the owners picture, the shelf) ask for
   'Plus Jakarta Sans' by name. Under that name they now get the sans of the look, so pictures and page agree;
   when those pages read the face from the page instead, these four lines can go. */
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 400 500; font-display: swap; src: url(../../../fonts/plex-sans-400-latin.woff2) format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 600 800; font-display: swap; src: url(../../../fonts/plex-sans-600-latin.woff2) format('woff2'); }

:root {
  /* ---------- the same in every palette and mode ---------- */
  /* things that keep their colour: a trail drawn over an aerial photo, a QR code tile */
  --on-photo: #ffe2a6;
  --on-photo-shade: #10130f;
  --paper: #fbfaf7;
  --paper-ink: #14130f;
  /* the offline hike card (a page for paper as well as screens) */
  --print-bg: #f5f3ee; --print-paper: #fbfaf7; --print-ink: #1b1a17; --print-ink-2: #5c574d; --print-line: #ddd8cc; --print-accent: #8a5a12;
  --print-land: #f2efe8; --print-relief: #c2bcae; --print-contour: #a39d8f;

  /* type */
  --font-serif: 'Newsreader', 'Newsreader Fallback', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --font-sans: 'IBM Plex Sans', 'Plex Sans Fallback', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Plex Mono Fallback', ui-monospace, 'SF Mono', Menlo, Consolas, 'Courier New', monospace;
  --font-caps-sans: 'Plex Sans Caps', var(--font-sans);
  --font-caps-mono: 'Plex Mono Caps', var(--font-mono);
  --font: var(--font-sans);                        /* running text, controls */
  --font-num: var(--font-mono);                    /* numbers that are read as numbers: counts, times, measures */
  --font-sci: var(--font-serif);                   /* set in italic: a bird's scientific name, a quotation */
  --t-display: var(--title-size);                  /* a page's title: one or two words */
  --t-title: clamp(1.375rem, 1.1rem + 1vw, 1.875rem);
  --t-lede: clamp(1.0625rem, .98rem + .35vw, 1.3125rem);
  --t-big: clamp(1.75rem, 1.2rem + 2vw, 3rem);      /* big numbers */
  --t-body: 1rem;
  --t-small: .875rem;
  --t-tiny: .75rem;

  /* space (4px base) */
  --s-1: .25rem; --s-2: .5rem; --s-3: .75rem; --s-4: 1rem; --s-5: 1.5rem; --s-6: 2rem; --s-7: 3rem; --s-8: 4.5rem; --s-9: 7rem;
  --gutter: clamp(.875rem, 4vw, 3.5rem);
  --measure: 38rem;
  --wide: 76rem;
  --bar-h: 3.5rem;
  --tap: 2.75rem;                                   /* the smallest thing a finger is asked to hit: 44px */
  /* the notch, the home bar, rounded corners */
  --safe-t: env(safe-area-inset-top, 0px); --safe-r: env(safe-area-inset-right, 0px); --safe-b: env(safe-area-inset-bottom, 0px); --safe-l: env(safe-area-inset-left, 0px);

  /* shape + motion */
  --r-1: 0px; --r-2: 0px; --r-3: 0px; --r-pill: 0px;      /* square; classic rounds them again */
  --ease: cubic-bezier(.22, .8, .22, 1);
  --ease-in-out: cubic-bezier(.6, 0, .2, 1);
  --fast: 140ms; --med: 320ms; --slow: 700ms;
  --blur: 0px;

  /* ---------- derived from the palette's base colours, and the roles of the type (dark = instrument; light differs just below) ---------- */
  color-scheme: dark;
  --glass: transparent;
  --glass-strong: var(--bg);
  --line: color-mix(in srgb, var(--ink) 16%, transparent);
  --line-strong: color-mix(in srgb, var(--ink) 42%, transparent);
  --accent-soft: color-mix(in srgb, var(--accent) 16%, transparent);
  --shade: rgba(0, 0, 0, .6);
  --shadow: none;
  --rule: var(--line-strong); --rule-w: 1px;       /* the rule under a page's title and over a block */
  --on: var(--accent); --on-ink: var(--accent-ink);  /* what is switched on, and the one filled button */
  --font-head: var(--font-caps-mono); --title-size: clamp(1.125rem, .8rem + 2.2vw, 2.25rem); --title-weight: 500; --title-case: none; --title-track: .12em; --title-ink: var(--accent); --title-lh: 1.2;
  --font-title: var(--font-sans); --name-weight: 600; --name-scale: 1;     /* --font-title: names of things (a bird, a film, a hike, a show) and titles inside a page */
  --font-label: var(--font-caps-mono); --label-size: .6875rem; --label-weight: 400; --label-track: .1em; --label-case: none;   /* small capitals over a number or a block (the capitals are in the face) */
  --num-weight: 400; --num-space: -.28em;          /* a space inside a monospaced figure ("86 mi") is a whole cell: draw it narrower */
  --sub-font: var(--font-caps-mono); --sub-size: .75rem; --sub-weight: 500; --sub-case: none; --sub-track: .1em;   /* a heading inside a page */
  --brand-size: .8125rem; --brand-weight: 500; --head-pad: .5rem;
}
:root[data-theme="light"] {
  color-scheme: light;
  --line: color-mix(in srgb, var(--ink) 17%, transparent);
  --line-strong: color-mix(in srgb, var(--ink) 50%, transparent);
  --accent-soft: color-mix(in srgb, var(--accent) 11%, transparent);
  --shade: color-mix(in srgb, var(--ink) 30%, transparent);
  --rule: var(--ink); --rule-w: 2px;
  --on: var(--ink); --on-ink: var(--bg);
  --font-head: var(--font-serif); --title-size: clamp(2rem, 1.4rem + 2.7vw, 3.375rem); --title-weight: 400; --title-case: none; --title-track: 0em; --title-ink: var(--ink); --title-lh: 1;
  --font-title: var(--font-serif); --name-weight: 500; --name-scale: 1.1;
  --font-label: var(--font-caps-sans); --label-size: .6875rem; --label-weight: 600; --label-track: .08em;
  --sub-font: var(--font-serif); --sub-size: 1.1875rem; --sub-weight: 600; --sub-case: none; --sub-track: 0em;
  --brand-size: 1.1875rem; --brand-weight: 600; --head-pad: .375rem;
}
/* poster: the third design on the same structure. One heavy sans for titles and numbers, thick rules, no capitals,
   no serif, no monospace; the accent fills what is on. The same in light and dark apart from the colours. */
:root[data-palette="poster"] {
  --rule: var(--ink); --rule-w: 4px;
  --on: var(--accent); --on-ink: var(--accent-ink);
  --font-head: var(--font-sans); --title-size: clamp(2.375rem, 1.6rem + 3.4vw, 4.25rem); --title-weight: 700; --title-case: none; --title-track: 0em; --title-ink: var(--ink); --title-lh: 1;
  --font-title: var(--font-sans); --name-weight: 600; --name-scale: 1;
  --font-label: var(--font-sans); --label-size: .75rem; --label-weight: 600; --label-track: 0em; --label-case: none;
  --font-num: var(--font-sans); --num-weight: 700; --num-space: 0em; --font-sci: var(--font-sans);
  --sub-font: var(--font-sans); --sub-size: 1.125rem; --sub-weight: 700; --sub-case: none; --sub-track: 0em;
  --brand-size: 1.0625rem; --brand-weight: 700; --head-pad: .5rem;
}
/* classic: THE DEFAULT, the soft look (the menu calls it Soft; the key stays "classic"). One friendly sans for
   everything, round corners, glass, a soft shadow, the drifting specks. What was wrong with it is fixed here and in
   look.css ("the soft look"): no negative letter-spacing anywhere (the face's own word gap is narrow, 0.17em, so
   --word-gap widens it to an ordinary one), a plain type scale, tabular figures where numbers are read. */
:root[data-palette="classic"] {
  --font: 'Jakarta Classic', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-title: var(--font); --font-head: var(--font); --font-label: var(--font); --font-num: var(--font); --font-sci: var(--font); --num-space: 0em;
  --title-size: clamp(1.625rem, 1.25rem + 1.6vw, 2.375rem); --title-weight: 600; --title-case: none; --title-track: 0em; --title-ink: var(--ink); --title-lh: 1.12;
  --sub-font: var(--font); --sub-size: 1.0625rem; --sub-weight: 600; --sub-case: none; --sub-track: 0em; --head-pad: 0px; --rule-w: 0px;
  --label-case: none; --label-track: 0em; --num-weight: 600; --word-gap: .09em;
  --r-1: 8px; --r-2: 14px; --r-3: 22px; --r-pill: 999px; --blur: 16px;
  --glass: color-mix(in srgb, var(--ink) 4.5%, transparent);
  --glass-strong: color-mix(in srgb, var(--bg-raise) 78%, transparent);
  --line: color-mix(in srgb, var(--ink) 10%, transparent);
  --line-strong: color-mix(in srgb, var(--ink) 20%, transparent);
  --accent-soft: color-mix(in srgb, var(--accent) 14%, transparent);
  --shade: rgba(0, 0, 0, .5);
  --shadow: 0 1px 0 color-mix(in srgb, var(--ink) 4%, transparent) inset, 0 18px 40px -22px rgba(0, 0, 0, .7);
}
:root[data-palette="classic"][data-theme="light"] {
  --glass: color-mix(in srgb, var(--bg-raise) 62%, transparent);
  --glass-strong: color-mix(in srgb, var(--bg-raise) 86%, transparent);
  --line: color-mix(in srgb, var(--ink) 11%, transparent);
  --line-strong: color-mix(in srgb, var(--ink) 23%, transparent);
  --accent-soft: color-mix(in srgb, var(--accent) 11%, transparent);
  --shade: color-mix(in srgb, var(--ink) 22%, transparent);
  --shadow: 0 1px 0 color-mix(in srgb, var(--bg-raise) 70%, transparent) inset, 0 16px 34px -22px color-mix(in srgb, var(--ink) 40%, transparent);
}

/* =====================================================================================================
   Palettes. Base colours only. The selectors are not tied to <html>, so a swatch in the colour menu can carry
   data-palette + data-theme itself and show another palette's colours.
     surfaces  --bg (page) --bg-raise (cards, charts) --bg-sunk
     ink       --ink --ink-2 --ink-3 (all three pass 4.5:1 on --bg and --bg-raise) --ink-inverse
     accent    --accent (links, the current page, the house) --accent-ink (text on the accent)
     data      --c-sky (aircraft) --c-yard (birds) --c-sea (vessels) --c-quiet --c-good --c-warn --c-bad (private equity) : marks only, never text
     maps      --map-water --map-land --map-relief --map-line --map-coast
   ===================================================================================================== */

/* ---- almanac (the default). Light: a field guide on paper, ink-red for the accent. Dark: an instrument panel, graphite, one amber signal. */
:root, [data-palette="almanac"] {
  --bg: #0f1112; --bg-raise: #16191b; --bg-sunk: #090a0b;
  --ink: #e9ebe6; --ink-2: #adb2ab; --ink-3: #878d86; --ink-inverse: #0f1112;
  --accent: #ffb000; --accent-ink: #14110a;
  --c-sky: #7fb2ff; --c-yard: #f0d277; --c-sea: #45d6a8; --c-quiet: #5d6468; --c-good: #45d6a8; --c-warn: #ff7a45; --c-bad: #ff4d5e;
  --map-water: #0a0c0d; --map-land: #181c1f; --map-relief: #3f484d; --map-line: #6f7a80; --map-coast: #b6bfc3;
}
[data-theme="light"], [data-palette="almanac"][data-theme="light"] {
  --bg: #f3efe5; --bg-raise: #f9f6ee; --bg-sunk: #e8e3d6;
  --ink: #17150f; --ink-2: #4a463a; --ink-3: #696455; --ink-inverse: #f9f6ee;
  --accent: #a8281a; --accent-ink: #fff7ee;
  --c-sky: #1f4fa3; --c-yard: #9a5d0a; --c-sea: #0b7a66; --c-quiet: #a29c8b; --c-good: #0b7a66; --c-warn: #b4541a; --c-bad: #c42232;
  --map-water: #d3dfe3; --map-land: #f1ecdf; --map-relief: #b9b19c; --map-line: #968d78; --map-coast: #4f4b3f;
}

/* ---- chart. Light: a sea chart, buff land and pale blue water, navy ink, the magenta of chart notes. Dark: the same chart at night. */
[data-palette="chart"] {
  --bg: #08131d; --bg-raise: #0e1b28; --bg-sunk: #050d15;
  --ink: #e2ebf3; --ink-2: #a5b4c3; --ink-3: #8092a3; --ink-inverse: #08131d;
  --accent: #6fd6ee; --accent-ink: #04141b;
  --c-sky: #f0a6d8; --c-yard: #f1c75b; --c-sea: #5fe0b4; --c-quiet: #4f6072; --c-good: #5fe0b4; --c-warn: #ff8a5c; --c-bad: #ff4d5e;
  --map-water: #050d15; --map-land: #122231; --map-relief: #35506a; --map-line: #63809b; --map-coast: #a9c0d6;
}
[data-palette="chart"][data-theme="light"] {
  --bg: #f1f3ef; --bg-raise: #f9faf7; --bg-sunk: #e3e7e2;
  --ink: #10222f; --ink-2: #3f5263; --ink-3: #5a6b7a; --ink-inverse: #f9faf7;
  --accent: #9c1f76; --accent-ink: #fff5fb;
  --c-sky: #9c1f76; --c-yard: #8f5b08; --c-sea: #0c6f8f; --c-quiet: #98a4ab; --c-good: #0b7a66; --c-warn: #b4541a; --c-bad: #c42232;
  --map-water: #cfe2ee; --map-land: #f4edd4; --map-relief: #c3b78f; --map-line: #9d936f; --map-coast: #4b5a66;
}

/* ---- poster: white and black with one vermilion */
[data-palette="poster"] {
  --bg: #0b0b0b; --bg-raise: #161616; --bg-sunk: #050505;
  --ink: #f4f2ec; --ink-2: #b9b6ae; --ink-3: #8f8c85; --ink-inverse: #0b0b0b;
  --accent: #ff5a2a; --accent-ink: #140600;
  --c-sky: #7fb2ff; --c-yard: #f0d277; --c-sea: #45d6a8; --c-quiet: #5c5c5c; --c-good: #45d6a8; --c-warn: #ff9a3d; --c-bad: #ff4d5e;
  --map-water: #050505; --map-land: #161616; --map-relief: #3d3d3d; --map-line: #707070; --map-coast: #b5b5b5;
}
[data-palette="poster"][data-theme="light"] {
  --bg: #f7f6f2; --bg-raise: #ffffff; --bg-sunk: #ebe9e3;
  --ink: #0c0c0c; --ink-2: #45433f; --ink-3: #66635d; --ink-inverse: #ffffff;
  --accent: #c93408; --accent-ink: #ffffff;
  --c-sky: #1f4fa3; --c-yard: #9a5d0a; --c-sea: #0b7a66; --c-quiet: #a3a09a; --c-good: #0b7a66; --c-warn: #a4560e; --c-bad: #c42232;
  --map-water: #d9e2e6; --map-land: #f4f2ec; --map-relief: #bdb9ae; --map-line: #99958a; --map-coast: #4a4843;
}

/* ---- mono: black and white, nothing else (data marks are steps of grey) */
[data-palette="mono"] {
  --bg: #000000; --bg-raise: #0c0c0c; --bg-sunk: #000000;
  --ink: #f5f5f5; --ink-2: #b8b8b8; --ink-3: #8e8e8e; --ink-inverse: #000000;
  --accent: #ffffff; --accent-ink: #000000;
  --c-sky: #f0f0f0; --c-yard: #c8c8c8; --c-sea: #7c7c7c; --c-quiet: #555555; --c-good: #f0f0f0; --c-warn: #a6a6a6; --c-bad: #ececec;
  --map-water: #000000; --map-land: #111111; --map-relief: #3d3d3d; --map-line: #707070; --map-coast: #b5b5b5;
}
[data-palette="mono"][data-theme="light"] {
  --bg: #ffffff; --bg-raise: #fafafa; --bg-sunk: #eeeeee;
  --ink: #0a0a0a; --ink-2: #474747; --ink-3: #636363; --ink-inverse: #ffffff;
  --accent: #000000; --accent-ink: #ffffff;
  --c-sky: #111111; --c-yard: #3c3c3c; --c-sea: #7a7a7a; --c-quiet: #a8a8a8; --c-good: #111111; --c-warn: #5a5a5a; --c-bad: #1c1c1c;
  --map-water: #e2e2e2; --map-land: #f7f7f7; --map-relief: #c4c4c4; --map-line: #a0a0a0; --map-coast: #666666;
}

/* ---- classic: near-black with a lamp-lit accent, or warm paper-white (the first look) */
[data-palette="classic"] {
  --bg: #090b0e; --bg-raise: #0f1216; --bg-sunk: #06080a;
  --ink: #edebe6; --ink-2: #b3b1aa; --ink-3: #8b8a85; --ink-inverse: #0b0d10;
  --accent: #e2c08f; --accent-ink: #1a1408;
  --c-sky: #6892e0; --c-yard: #bf8a2e; --c-sea: #2fa98b; --c-quiet: #5b6068; --c-good: #2fa98b; --c-warn: #d08a3a; --c-bad: #ff4d5e;
  --map-water: #06090d; --map-land: #12161c; --map-relief: #39414c; --map-line: #6c7683; --map-coast: #aab3bf;
}
[data-palette="classic"][data-theme="light"] {
  --bg: #f5f3ee; --bg-raise: #fbfaf7; --bg-sunk: #ebe8e1;
  --ink: #1b1a17; --ink-2: #55524b; --ink-3: #6b675e; --ink-inverse: #fbfaf7;
  --accent: #8a5a12; --accent-ink: #fff8ea;
  --c-sky: #3564b5; --c-yard: #a96c12; --c-sea: #0e8a72; --c-quiet: #9a968c; --c-good: #0e8a72; --c-warn: #a8611a; --c-bad: #c42232;
  --map-water: #dde4e9; --map-land: #f2efe8; --map-relief: #c2bcae; --map-line: #a39d8f; --map-coast: #6f6a5f;
}
