/* House style tokens: the site's, and the ones every app and map of Robin's shares. HOUSE-STYLE.md says how to use
   them. The build publishes this file as /house-style/tokens.css and /house-style/tokens.json.

   The paper, ink and magenta are the printed maps' own colours. The --map-* tokens mirror the map house style in
   ~/maps/scripts/house_style.py: when one of those changes there, change it here too. light-dark() gives each colour
   its light and dark value; the dark ones are for screens only (the maps print on the light paper). */
:root {
  color-scheme: light dark;

  /* The date of the last change here, with .2, .3 … for a second or third change that day. An app keeps its copy of
     this file unedited, so this is how the copy says which house style it follows. Bump it with every change. */
  --house-style-version: "2026-11-19.2";

  /* ground and text */
  --paper: light-dark(#f7f4ec, #151412);
  --paper-sunk: light-dark(#efeadf, #1d1b18);
  --ink: light-dark(#1d1d1b, #ece8df);
  --muted: light-dark(#6b6660, #a39d94);
  --rule: light-dark(#d9d3c7, #34312c);
  --accent: light-dark(#d4145a, #ff5c8d);

  /* good to poor: the one ramp for a measure that is better or worse (the quality of each stretch of a route), on the
     map and off it. Blue-violet through the course's magenta to orange: a middling stretch is simply the course, and
     good and poor pull away from it, cool and warm. Every stop is a strong colour, since a thin line on the basemap
     loses a grey (it reads as a road), a teal (forest, water) or a pale tint. The ends stay apart with any colour
     blindness, and get lighter from good to poor too. A ramp for measures, not status colours: a state still gets words. */
  --ramp-good: light-dark(#463dc3, #7d85f2);
  --ramp-mid: light-dark(#d4145a, #ff5c8d); /* the course's own magenta, neither good nor poor */
  --ramp-poor: light-dark(#df6e07, #fd923e);
  /* the one ramp for places on a map: a measure of each that is better the more there is of it (how good the walking is
     round a station), in the good end's hue alone, the dot filled from this for the least to --ramp-good for the most
     and always ringed in --ramp-good. The least recede and the full colour lands on the best. The pale end is close
     to the water's colour, so the ring is what makes it a place: 7.0:1 on the paper light, 5.7:1 dark. Not the
     good-to-poor ramp, whose middle is the course's magenta. */
  --ramp-good-low: light-dark(#d2d5e8, #252734);

  /* layout */
  --measure: 40rem; /* text column */
  --wide: 60rem; /* map grids break out to this */
  --gutter: clamp(1.25rem, 5vw, 2.5rem);

  /* type scale; the face is Figtree (--font-sans, set by the Astro font loader), water names Charis SIL */
  --step--3: 0.6875rem; /* chart axes and the text in map symbols only */
  --step--2: 0.75rem;
  --step--1: 0.875rem;
  --step-0: clamp(1.0625rem, 1rem + 0.25vw, 1.125rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.4vw, 1.35rem);
  --step-2: clamp(1.6rem, 1.4rem + 1vw, 2.1rem);
  --step-3: clamp(2.4rem, 1.9rem + 2.5vw, 3.6rem);
  --font-water: "Charis SIL", Charter, Georgia, serif;

  /* spacing: gaps and padding in the apps */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;

  --radius: 3px;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.06), 0 4px 16px rgb(0 0 0 / 0.06);

  /* the app layer: for apps with many parts on a page (Logbook first). HOUSE-STYLE.md, "In a data-heavy app".
     The site doesn't use these; a web app with a map takes only --ui and --ui-wash. */
  --app-page: light-dark(#efebe1, #0e0d0c); /* the page behind the panels, a step below the paper */
  --app-panel: light-dark(#faf8f2, #1a1917); /* a panel: one part of the page (numbers, a chart, a table, a map) */
  --app-raised: light-dark(#ffffff, #23211e); /* a row under the pointer, a popover */
  --app-well: light-dark(#f2eee5, #141311); /* an inset inside a panel; dark stretches on a profile */
  --app-edge: light-dark(#e0d9cb, #2b2925); /* a panel's hairline edge */
  --ui: light-dark(#0b6670, #63c3c8); /* the interface colour, petrol: state only (where you are, what is chosen, focus) */
  --ui-wash: light-dark(#0b667017, #63c3c821); /* behind what is chosen */
  --radius-panel: 6px;
  --space-7: 3rem; /* between sections */
  --space-8: 4.5rem; /* between the big parts of a long page (the years of a story) */
  --app-max: 76rem; /* an app page's width */
  --dim: 0.28; /* what is out of focus fades to this opacity */

  /* charts of numbers: an app's page of statistics (Logbook's stats). HOUSE-STYLE.md, "Charts of numbers". Checked
     against --app-panel with the dataviz checks: the pair apart with any colour vision, each ramp one hue in even
     steps whose faintest still shows on the panel. */
  --chart-now: light-dark(#2a6fd0, #4a88e2); /* the span looked at (the last 90 days, this year), and a lone series */
  --chart-then: light-dark(#b07800, #c08a1c); /* what it is set against (the same days a year before, last year) */
  /* either side of a middle (heart-rate zones around the grey zone, zone 3): cool for one side, warm for the other,
     strongest at the ends; in the dark the ends are the light ones */
  --chart-cool-2: light-dark(#2d62bd, #8cb7f1);
  --chart-cool-1: light-dark(#86aee8, #3a6cb6);
  --chart-middle: light-dark(#b5afa4, #5a554d);
  --chart-warm-1: light-dark(#ea9480, #8b3b2f);
  --chart-warm-2: light-dark(#d65a45, #c2513f);
  --chart-warm-3: light-dark(#ad3022, #e7806c);
  --chart-warm-4: light-dark(#741c14, #f7b5a6);
  /* how much, in four steps (a day's time on feet): green, from faint to strong */
  --chart-much-1: light-dark(#7fbf72, #2c5e31);
  --chart-much-2: light-dark(#4a9a44, #3f8f46);
  --chart-much-3: light-dark(#2b7531, #68bd66);
  --chart-much-4: light-dark(#184d1e, #a6e09b);

  /* map overlays: what an app draws on the basemap */
  --map-course: light-dark(#d4145a, #ff5c8d); /* the course or route: the one magenta thing on a map */
  --map-course-casing: light-dark(#ffffff, #151412); /* either side of the course line, and its direction arrows */
  --map-course-fill: light-dark(#f4bccf, #572834); /* the elevation profile's fill at the top; the low end of a ramp on the course */
  --map-course-fill-end: light-dark(#fdf3f6, #211818); /* the profile's fill at the bottom */
  --map-candidate: light-dark(#1d1d1b, #ece8df); /* apps only: routes to choose from, cased like the course */
  /* apps only: the routes open beside the course, each in the colour of its number (violet, blue, ochre), and ink from
     the fourth on. Each stays apart from the others, the course's magenta and ink with any colour vision; a fourth
     colour would not. The light values take white text in a badge, the dark ones dark text. */
  --map-route-1: light-dark(#9e3bed, #aa5bfc);
  --map-route-2: light-dark(#1a3bc5, #8bbcf8);
  --map-route-3: light-dark(#6b6000, #f2c934);
  --map-marker: light-dark(#1d1d1b, #ece8df); /* checkpoint badges, start and finish: dark against the magenta */
  --map-marker-text: light-dark(#ffffff, #151412);
  --map-marker-outline: light-dark(#ffffff, #151412);
  --map-km-disc: light-dark(#ffffff, #151412); /* km markers: a disc ringed in --map-course */
  --map-km-text: light-dark(#3b0a1d, #ffd6e3);

  /* map base: the topographic sheets (house_style.py), and the basemap on tiles.robinmanhaeve.be, which is drawn from
     these (homelab odin/apps/tiles/make-styles.mjs). The light values are the print colours; the dark ones are the
     dark basemap's, for screens only. */
  --map-trail: light-dark(#26211e, #d9d1c7); /* unpaved paths and singletrack */
  --map-track: light-dark(#3f3935, #bdb4aa); /* unpaved tracks */
  --map-paved-path: light-dark(#8c8279, #857c73);
  --map-trail-regional: light-dark(#5b5550, #a39b92); /* tracks and paths at 1:70 000 and smaller */
  --map-contour: light-dark(#a0764a, #8f6a45);
  --map-contour-text: light-dark(#8a6238, #b08a60);
  --map-water: light-dark(#bcd8ee, #1b2935);
  --map-river: light-dark(#3f86c6, #4b86bb);
  --map-stream: light-dark(#5b9bd5, #3f6f9c);
  --map-water-text: light-dark(#2a68a3, #8db6dc);
  --map-forest: light-dark(#d4e6bf, #1c2517);
  --map-forest-edge: light-dark(#89a178, #3d5033);
  --map-forest-text: light-dark(#4b6a37, #9dba88); /* forest and reserve names */
  --map-reserve: light-dark(#5f8a45, #7fae62); /* nature reserve edges */
  --map-building: light-dark(#857b73, #4a443f);
  --map-built-up: light-dark(#ece2d6, #201d1a); /* only where buildings aren't drawn: small scales */
  --map-farmyard: light-dark(#efe7da, #1c1a17);
  --map-industrial: light-dark(#e6dfe2, #1f1c1f);
  --map-rock: light-dark(#e3ddd4, #23211e); /* quarries, bare rock */
  --map-sand: light-dark(#f0e7d0, #25211a); /* beaches and dunes; not on the sheets */
  --map-glacier: light-dark(#f3f6f7, #1f2427); /* not on the sheets */
  --map-park: light-dark(#dfe8d2, #1b2118); /* parks, cemeteries, gardens */
  --map-sports: light-dark(#e5ecd8, #1c2119);
  --map-scrub: light-dark(#e0e9cc, #1d2319); /* scrub, heath */
  --map-wetland: light-dark(#e1ecea, #192224);
  --map-relief-shade: light-dark(#3a2f55, #050409); /* up to 45 % on slopes facing away from the light */
  --map-relief-light: light-dark(#ffefb8, #ffefb8); /* up to 45 % on slopes facing it (dark: far less); flat ground keeps the paper */
  --map-road-motorway: light-dark(#d4b186, #7d6649);
  --map-road-motorway-casing: light-dark(#4f4239, #0b0a09);
  --map-road-main: light-dark(#e0c49c, #6b5a45);
  --map-road-main-casing: light-dark(#5f5249, #0b0a09);
  --map-road-secondary: light-dark(#eddcbd, #564a3d);
  --map-road-secondary-casing: light-dark(#7d7066, #0b0a09);
  --map-road-tertiary: light-dark(#fcf9f2, #47413a);
  --map-road-tertiary-casing: light-dark(#948a80, #0b0a09);
  --map-road-minor: light-dark(#ffffff, #3a3631);
  --map-road-minor-casing: light-dark(#a8a098, #0b0a09);
  --map-road-service: light-dark(#ffffff, #302d29);
  --map-road-service-casing: light-dark(#b8b0a8, #0b0a09);
  --map-rail: light-dark(#3a3a3a, #8f8a84); /* with dashes in the paper colour */
  --map-border: light-dark(#6d5a80, #a593bb); /* national borders: dash-dot on a band */
  --map-border-band: light-dark(#cdbfe096, #5a4a6e80);
  --map-border-region: light-dark(#7a746d, #7d766f); /* regional borders: dash-dot only */
  --map-locality-text: light-dark(#6e5d48, #b3a58f); /* localities: named places that aren't settlements */
  --map-gr: light-dark(#c8102e, #ff6b6b); /* GR routes: red and white, like the waymarks */
  --map-streek-gr: #f5c400; /* Streek-GR: yellow and red */
  --map-walk: light-dark(#f26a00, #ff8a2a); /* local walks: a wash along the way, on the walks basemap */
  --map-walk-node: light-dark(#7b4fa6, #a98be0); /* the walking-node network: a wash, with the number text below */
  --map-walk-node-text: light-dark(#5a3485, #cbb5ee); /* the node network's junction numbers */
  --map-mtb: #7b4fa6;
  --map-running-loop: #0f9a8a;
  --map-grid: #28466e; /* UTM grid lines, at 59 % */
  --map-graticule: #5f4b7a;
  --map-military: light-dark(#c0282d, #e0555a);
}
