/* site/css/tokens.css · OWNER: the design system (Chart & Label, design/DESIGN.md).
   = design/tokens.css (generated by design/tools/build-tokens.mjs from palette.mjs and shapes.mjs) + the SITE additions
   marked "SITE:" below (the basemap's three token names, the brand mark's fixed inks). When design/tokens.css is
   regenerated, copy it here and re-apply the SITE lines (or add them to design/tools/palette.mjs).
   The ONLY file in site/css that may contain color, font or other literal values. The build reads --theme-color
   (light + dark), --fonts-href, --fonts-preload and every --sheet-<region>{,-tint,-ink,-on,-edge} from here. */
/* ======================================================================
   tokens.css · Tampa Bay Chartbook · design system "Chart & Label"
   A nautical chartbook printed like an Ybor City cigar-box label.
   Navy ink on cream chart paper; chart magenta for the house ink (links, focus, the live flare);
   cigar gold for ornament; one ink per sheet (region), always with its code and shape.

   Drop-in for the Cincy Week engine (site/css/tokens.css), same structure and token names:
     1. @font-face        self-hosted woff2 (SIL OFL 1.1), latin + latin-ext, + metric-matched fallbacks
     2. :root             non-color tokens: type, space, layout, shape, rules, ornaments, sheets, masks, motion
     3. :root, [data-theme="light"]   Day chart (default)
     4. [data-theme="dark"]           Night chart
     5. @media (prefers-color-scheme: dark) :root:not([data-theme])   the Night chart again, for readers without JS
   GENERATED by design/tools/build-tokens.mjs from palette.mjs and shapes.mjs. Edit those, not this file.
   Contrast is checked by design/tools/contrast.mjs (the table is in design/DESIGN.md §4).
   The partials read ONLY these custom properties. No color literal may appear anywhere else.
   Font URLs are relative to this file (served as docs/assets/tokens.css next to docs/assets/fonts/).
   ====================================================================== */

/* ---------- 1. fonts: files live in fonts/ next to this file ---------- */
/* Bodoni Moda (display): opsz axis clamped to 11–28 in the file, so headings never go hairline-thin on screens.
   Figtree (text and UI). Archivo (labels and numerals): wdth 100–125, set expanded for spaced caps. */
@font-face {
  font-family: "Bodoni Moda"; font-style: normal; font-weight: 500 900; font-display: swap;
  src: url("fonts/bodoni-moda-roman-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: "Bodoni Moda"; font-style: normal; font-weight: 500 900; font-display: swap;
  src: url("fonts/bodoni-moda-roman-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: "Bodoni Moda"; font-style: italic; font-weight: 500 900; font-display: swap;
  src: url("fonts/bodoni-moda-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: "Bodoni Moda"; font-style: italic; font-weight: 500 900; font-display: swap;
  src: url("fonts/bodoni-moda-italic-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: "Figtree"; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url("fonts/figtree-roman-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: "Figtree"; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url("fonts/figtree-roman-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: "Figtree"; font-style: italic; font-weight: 300 800; font-display: swap;
  src: url("fonts/figtree-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: "Figtree"; font-style: italic; font-weight: 300 800; font-display: swap;
  src: url("fonts/figtree-italic-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: "Archivo"; font-style: normal; font-weight: 500 800; font-stretch: 100% 125%; font-display: swap;
  src: url("fonts/archivo-roman-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: "Archivo"; font-style: normal; font-weight: 500 800; font-stretch: 100% 125%; font-display: swap;
  src: url("fonts/archivo-roman-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;
}
/* metric-matched fallbacks (design/tools/fonts.py --metrics): text does not reflow when the web fonts swap in */
@font-face {
  font-family: "Figtree Fallback";
  src: local("Arial"), local("Liberation Sans"), local("Arimo"), local("Helvetica Neue"), local("Helvetica");
  size-adjust: 101.53%; ascent-override: 93.57%; descent-override: 24.62%; line-gap-override: 0%;
}
@font-face {
  font-family: "Bodoni Moda Fallback";
  src: local("Times New Roman Bold"), local("TimesNewRomanPS-BoldMT"), local("Liberation Serif Bold"), local("Tinos Bold"), local("Times New Roman"), local("Liberation Serif");
  size-adjust: 113.36%; ascent-override: 99.24%; descent-override: 35.29%; line-gap-override: 0%;
}
@font-face {
  font-family: "Archivo Fallback";
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Liberation Sans Bold"), local("Arimo Bold"), local("Arial"), local("Liberation Sans");
  size-adjust: 105.97%; ascent-override: 82.85%; descent-override: 19.82%; line-gap-override: 0%;
}

/* ---------- 2. non-color tokens ---------- */
:root {
  /* families */
  --font-display: "Bodoni Moda", "Bodoni Moda Fallback", "Didot", "Bodoni 72", "Iowan Old Style", Georgia, serif;
  --font-body: "Figtree", "Figtree Fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-label: "Archivo", "Archivo Fallback", "Arial", sans-serif;   /* caps labels, kickers, badges, codes, numerals */
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --fonts-href: none;            /* self-hosted: the shell preloads the files below instead of a Google CSS link */
  --fonts-preload: "fonts/figtree-roman-latin.woff2 fonts/bodoni-moda-roman-latin.woff2 fonts/archivo-roman-latin.woff2";
  --label-stretch: 108%;         /* Archivo width for 12px caps labels (font-stretch) */
  --label-stretch-wide: 125%;    /* ribbons, the masthead's TAMPA BAY, sheet codes */

  /* type scale (16px root; fluid sizes clamp between 390 and 1440 px). The floor is 12px: nothing is smaller. */
  --fs-label: 0.75rem;           /* 12px expanded caps: labels, badges, kickers, codes */
  --fs-xs: 0.8125rem;            /* 13px meta lines, captions, credits */
  --fs-sm: 0.875rem;             /* 14px secondary text, chips, nav */
  --fs-base: 1rem;               /* 16px body, UI */
  --fs-md: 1.1875rem;            /* 19px card titles (Bodoni) */
  --fs-lg: 1.4375rem;            /* 23px h3, deks on desktop */
  --fs-xl: clamp(1.625rem, 1.3rem + 1.35vw, 2.375rem);   /* h2 26 to 38 */
  --fs-2xl: clamp(2.125rem, 1.45rem + 2.8vw, 3.75rem);   /* h1 34 to 60 */
  --fs-3xl: clamp(3rem, 1.85rem + 5.2vw, 6.5rem);        /* masthead 48 to 104 (usually the outlined SVG) */
  --fs-numeral: clamp(2.25rem, 1.8rem + 1.9vw, 3.5rem);  /* Bodoni stat numerals and date blocks */
  --fs-time: 1rem;               /* times, tabular */
  --fs-daynum: 1.5rem;           /* day numerals in date tabs (Bodoni) */

  --lh-tight: 1.02; --lh-head: 1.08; --lh-snug: 1.24; --lh-body: 1.6; --lh-ui: 1.35;

  --wght-body: 400;              /* Night chart drops to 380 */
  --wght-ui: 500;
  --wght-strong: 650;            /* Figtree is variable (300–900) */
  --wght-head: 700;              /* Bodoni Moda headlines (500–900); Night chart 680 */
  --wght-mast: 880;
  --wght-label: 680;             /* Archivo caps */
  --track-label: 0.12em; --track-label-wide: 0.26em; --track-head: -0.004em; --track-mast: -0.012em;

  /* space (4px base) */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px;
  --sp-6: 32px; --sp-7: 48px; --sp-8: 64px; --sp-9: 96px;
  --gutter: clamp(16px, 3.4vw, 40px);   /* 16px side gutter on phones */
  --col-gap: clamp(16px, 2.2vw, 28px);
  --measure: 66ch;

  /* layout (engine contract names) */
  --tap: 44px;                   /* minimum touch target, everywhere */
  --topbar-h: 60px;
  --sidebar-w: 272px;
  --dock-h: 64px;
  --content-max: 1220px;
  --sched-bar-h: 76px;           /* sticky filter bar on What's On */
  --rail-time-w: 84px;
  --map-pin: 30px;               /* visible buoy height; hit area is always --tap */
  --map-buoy-w: 26px;            /* the numbered can buoy */
  --map-cluster: 40px;           /* the cluster medallion */

  /* shape: square-cut like a printed label; concave "cartouche" notches only on plates and frames;
     pills only for the live pill and switches; circles only for buoys and the compass */
  --radius-xs: 1px; --radius-sm: 2px; --radius-md: 3px; --radius-lg: 6px; --radius-pill: 999px;
  --notch: 10px;                 /* concave corner radius of the cartouche (plates, frames) */

  /* rules: the main structural device */
  --rule-hair: 1px;              /* between items and columns */
  --rule-mid: 2px;               /* the coast line of a water-lining rule, input underlines */
  --rule-heavy: 4px;             /* facts panels, tables */
  --stripe-w: 5px;               /* sheet stripe on cards */
  --line-w: 6px;                 /* month lanes on What's On */

  /* ornaments */
  --frame-w: 2px;                /* label frame: outer rule */
  --frame-inner-w: 1px;          /* label frame: inner hairline */
  --frame-gap: 5px;              /* space between the two rules */
  --corner: 20px;                /* corner star size (a four-point compass star, centered on the outer rule's corner) */
  --ribbon-h: 30px;              /* kicker ribbon band height */
  --ribbon-tail: 14px;           /* how far each tail sticks out */
  --ribbon-notch: 7px;           /* swallowtail cut depth */
  --wl-h: 22px;                  /* water-lining rule: coast line + four echoes (2, 5, 9, 14, 21 px) */
  --grat-w: 5px;                 /* graticule tick band width */
  --grat-step: 24px;             /* one tick (alternating ink / paper) */

  /* sheet geometry: every sheet is code + shape + ink (+ its name in text) */
  --sheet-tampa-code: "TP"; --sheet-tampa-n: "1"; --sheet-tampa-shape: path("M2.88 0H15.12A2.88 2.88 0 0 0 18 2.88V9.12A2.88 2.88 0 0 0 15.12 12H2.88A2.88 2.88 0 0 0 0 9.12V2.88A2.88 2.88 0 0 0 2.88 0Z");
  --sheet-stpete-code: "SP"; --sheet-stpete-n: "2"; --sheet-stpete-shape: path("M0 6A9 6 0 1 0 18 6A9 6 0 1 0 0 6Z");
  --sheet-beaches-code: "GB"; --sheet-beaches-n: "3"; --sheet-beaches-shape: path("M3.6 0H14.4L18 6L14.4 12H3.6L0 6Z");
  --sheet-clearwater-code: "CW"; --sheet-clearwater-n: "4"; --sheet-clearwater-shape: path("M0 0H18V5.04C18 8.64 13.32 10.8 9 12C4.68 10.8 0 8.64 0 5.04Z");
  --sheet-around-code: "AB"; --sheet-around-n: "5"; --sheet-around-shape: path("M3.6 0H18L14.4 12H0Z");
  --sheet-daytrips-code: "DT"; --sheet-daytrips-n: "6"; --sheet-daytrips-shape: path("M0 0H18L13.92 6L18 12H0Z");

  /* masks: alpha sources only (painted with a color token through background-color + mask) */
  --mask-ink: #000;
  --mask-corner: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2020%2020'%3E%3Cpath%20fill-rule%3D'evenodd'%20d%3D'M10%200l1.9%207.2L19.9%2010l-8%202.8L10%2020l-1.9-7.2L.1%2010l8-2.8z%20M10%208.3a1.7%201.7%200%201%200%200%203.4a1.7%201.7%200%201%200%200-3.4z'%2F%3E%3C%2Fsvg%3E");
  --mask-ripple: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2020%206'%3E%3Cpath%20d%3D'M0%203.6c2.5%200%202.5-2.4%205-2.4s2.5%202.4%205%202.4%202.5-2.4%205-2.4%202.5%202.4%205%202.4'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'1.1'%2F%3E%3C%2Fsvg%3E");
  --mask-rose: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2064%2064'%3E%3Ccircle%20cx%3D'32'%20cy%3D'32'%20r%3D'22'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'1.2'%2F%3E%3Ccircle%20cx%3D'32'%20cy%3D'32'%20r%3D'19.5'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'.6'%2F%3E%3Cpath%20d%3D'M32%202l4.2%2025.8L62%2032l-25.8%204.2L32%2062l-4.2-25.8L2%2032l25.8-4.2z'%2F%3E%3Cpath%20d%3D'M32%2014l2.6%2015.4L50%2032l-15.4%202.6L32%2050l-2.6-15.4L14%2032l15.4-2.6z'%20transform%3D'rotate(45%2032%2032)'%2F%3E%3C%2Fsvg%3E");

  /* SITE: the brand mark (the compass medallion in the cigar band) keeps the Day chart's inks in both editions,
     exactly like design/brand/mark.svg and favicon.svg; it sits on the topbar as a printed label would */
  --mark-ink: #12264c; --mark-paper: #fcf8eb; --mark-gold: #c5953b; --mark-gold-hi: #e4c87c; --mark-north: #a7186f;

  /* effect toggles */
  --photo-filter: none;          /* e.g. sepia(.15) to unify a grid of archival photos */

  /* motion */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --speed: 160ms;                /* hovers, toggles */
  --speed-slow: 280ms;           /* drawer, dialogs, sheets */
  --pulse: 2400ms;               /* the live flare; 0s under reduced motion */

  /* stacking */
  --z-sticky: 40; --z-topbar: 60; --z-dock: 65; --z-scrim: 69; --z-drawer: 70; --z-modal: 80; --z-toast: 90;
}

/* ================= LIGHT · Day chart (default) ================= */
:root,
:root[data-theme="light"] {
  color-scheme: light;

  /* paper and ink */
  --bg: #f6ecd5;  /* cream chart paper */
  --surface: #fcf8eb;
  --surface-alt: #eee2c8;
  --surface-sunken: #e6d8bc;
  --past-bg: #f0e7d5;
  --border: #d6c7ac;
  --border-strong: #63768f;  /* 3:1 on paper: chips, fields, frames of controls */
  --rule-ink: #12264c;
  --text: #12264c;  /* chart navy */
  --text-muted: #364865;
  --text-faint: #4d5d76;

  /* actions and the house ink: chart magenta (Day chart) */
  --primary: #12264c;
  --primary-contrast: #fcf8eb;
  --accent: #a7186f;
  --accent-strong: #8d0e5d;
  --accent-contrast: #fcf8eb;
  --accent-tint: #fbdfeb;
  --link: #8d0e5d;
  --link-hover: #73054b;
  --focus: #a7186f;

  /* the two label inks: chart magenta and cigar gold (ornament, signature, courses, the live flare) */
  --magenta: #a7186f;
  --magenta-ink: #8d0e5d;
  --magenta-tint: #fbdfeb;
  --gold: #c5953b;  /* ornament fill only (never text on paper in the Day chart) */
  --gold-ink: #7f5714;  /* gold as text: 4.5:1 on paper */
  --gold-tint: #f2e1be;
  --gold-leaf: linear-gradient(100deg, #a8742a 0%, #e4c87c 34%, #c5953b 50%, #e4c87c 66%, #a8742a 100%);  /* foil: masthead rule, signature seal; sparingly */
  --gold-leaf-ink: #12264c;  /* text on gold or gold leaf */

  /* states (always a word too, never color alone) */
  --success: #006c4d;
  --success-tint: #d6efe3;
  --warning: #8d5406;
  --warning-tint: #fae5c3;
  --warning-edge: #bf8532;
  --danger: #ac2724;
  --danger-tint: #ffe0db;
  --live: #a7186f;  /* the live flare: a lit light is magenta on a chart */
  --live-tint: #fbdfeb;
  --live-ink: #8d0e5d;
  --soon: #12264c;

  /* shell surfaces (engine names) */
  --hero-bg: #f6ecd5;
  --hero-text: #12264c;
  --hero-muted: #364865;
  --sidebar-bg: #eee2c8;
  --topbar-bg: rgb(246 236 213 / 0.92);
  --dock-bg: rgb(246 236 213 / 0.96);
  --code-bg: #eee2c8;
  --kbd-bg: #fcf8eb;
  --scrim: rgb(10 25 54 / 0.52);
  --plate: #ffffff;  /* logo plates (org logos keep their own colors) */
  --plate-dark: #000000;
  --plate-border: #d6c7ac;
  --plate-ink: #12264c;
  --plate-dark-ink: #ffffff;
  --theme-color: #f6ecd5;

  /* ornaments: label frame, ribbon, water lining, graticule, seal */
  --frame-outer: #12264c;  /* outer rule of the label frame (2px) */
  --frame-inner: #c5953b;  /* inner hairline (1px) */
  --corner-ink: #c5953b;  /* corner blocks */
  --ribbon-bg: #12264c;
  --ribbon-ink: #fcf8eb;
  --ribbon-fold: #0a1936;  /* the tails' shadowed fold */
  --ribbon-rule: #c5953b;  /* hairlines inside the band */
  --fold-shade: #0a1936;  /* mixed into a sheet ink for a ribbon's fold (color-mix) */
  --water-line: #6693ab;  /* the engraved echo lines under a coast or a rule */
  --grat-ink: #12264c;
  --grat-paper: #fcf8eb;
  --seal: #c5953b;
  --seal-ink: #12264c;

  /* sheet inks: fill (badges, stripes, pin rings) · -ink (text on paper and tint) · -on (text on fill) · -tint (quiet ground) · -edge (keyline, 3:1) */
  --sheet-tampa: #af3436; --sheet-tampa-ink: #95282b; --sheet-tampa-on: #fcf8eb; --sheet-tampa-tint: #fededb; --sheet-tampa-edge: #af3436;  /* 1 TP Tampa · Ybor brick */
  --sheet-stpete: #9b4f00; --sheet-stpete-ink: #834100; --sheet-stpete-on: #fcf8eb; --sheet-stpete-tint: #fae1cf; --sheet-stpete-edge: #9b4f00;  /* 2 SP St. Petersburg · sunshine orange */
  --sheet-beaches: #007678; --sheet-beaches-ink: #006365; --sheet-beaches-on: #fcf8eb; --sheet-beaches-tint: #cceeee; --sheet-beaches-edge: #007678;  /* 3 GB Gulf Beaches · Gulf turquoise */
  --sheet-clearwater: #2668ab; --sheet-clearwater-ink: #1d5791; --sheet-clearwater-on: #fcf8eb; --sheet-clearwater-tint: #d6e8fe; --sheet-clearwater-edge: #2668ab;  /* 4 CW Clearwater & North Pinellas · sponge-dock blue */
  --sheet-around: #3f7632; --sheet-around-ink: #336328; --sheet-around-on: #fcf8eb; --sheet-around-tint: #daedd6; --sheet-around-edge: #3f7632;  /* 5 AB Around the Bay · palmetto green */
  --sheet-daytrips: #7052a6; --sheet-daytrips-ink: #5e448d; --sheet-daytrips-on: #fcf8eb; --sheet-daytrips-tint: #e9e2fc; --sheet-daytrips-edge: #7052a6;  /* 6 DT Day Trips · sunset violet */

  /* map: land, water with water lining, roads, labels, buoys, clusters */
  --map-bg: #f5e6c4;  /* land (the paper of the chart) */
  --map-land: #f5e6c4;
  --map-water: #b9ddea;
  --map-water-line: #73a7be;  /* water lining strokes */
  --map-water-edge: #6693ab;  /* first echo, hugging the coast */
  --map-coast: #2f506f;  /* the shoreline */
  --map-park: #cce1bc;
  --map-sand: #faeec9;  /* beaches */
  --map-road-minor: #fcf8eb;
  --map-road: #fdfaf1;
  --map-road-major: #edcd87;  /* highways and bridges in label gold */
  --map-casing: #c4b59b;
  --map-road-casing: #c4b59b;  /* SITE: the basemap's name for road casings */
  --map-bridge: #8f7c58;  /* SITE: bridge and causeway casings over water */
  --map-inland-water: #b9ddea;  /* SITE: lakes and rivers inside the land */
  --map-rail: #12264c;
  --map-label: #364865;
  --map-label-water: #195579;  /* water names, italic, as on a chart */
  --map-label-halo: #f5e6c4;
  --map-pin-ink: #12264c;
  --map-pin-bg: #fcf8eb;
  --map-cluster-bg: #12264c;
  --map-cluster-ink: #fcf8eb;
  --map-cluster-ring: #c5953b;
  --map-graticule: #12264c;
  --map-select-ring: #a7186f;

  /* elevation: flat by default; rules do the structural work, shadows only float things */
  --shadow-1: 0 1px 0 rgb(18 38 76 / 0.07);
  --shadow-2: 0 10px 24px -12px rgb(18 38 76 / 0.32), 0 2px 6px -2px rgb(18 38 76 / 0.1);
  --shadow-3: 0 24px 48px -16px rgb(18 38 76 / 0.4), 0 6px 14px -6px rgb(18 38 76 / 0.14);
}

/* ================= DARK · Night chart ================= */
:root[data-theme="dark"] {
  color-scheme: dark;

  /* paper and ink */
  --bg: #0c1d34;  /* deep bay navy */
  --surface: #13263e;
  --surface-alt: #1d2f47;
  --surface-sunken: #07162a;
  --past-bg: #112136;
  --border: #304157;
  --border-strong: #74889e;  /* 3:1 on paper: chips, fields, frames of controls */
  --rule-ink: #f5ecd7;
  --text: #f5ecd7;  /* cream ink */
  --text-muted: #d6cdb8;
  --text-faint: #bab09c;

  /* actions and the house ink: gold (Night chart) */
  --primary: #f5ecd7;
  --primary-contrast: #0c1d34;
  --accent: #e9bb5b;
  --accent-strong: #f0d186;
  --accent-contrast: #0c1d34;
  --accent-tint: #412f0d;
  --link: #f0d186;
  --link-hover: #f5ecd7;
  --focus: #e9bb5b;

  /* the two label inks: chart magenta and cigar gold (ornament, signature, courses, the live flare) */
  --magenta: #ee8ab2;
  --magenta-ink: #f6a0c1;
  --magenta-tint: #482232;
  --gold: #e9bb5b;  /* ornament fill only (never text on paper in the Day chart) */
  --gold-ink: #f0d186;  /* gold as text: 4.5:1 on paper */
  --gold-tint: #412f0d;
  --gold-leaf: linear-gradient(100deg, #c79443 0%, #f3dd99 34%, #e9bb5b 50%, #f3dd99 66%, #c79443 100%);  /* foil: masthead rule, signature seal; sparingly */
  --gold-leaf-ink: #0c1d34;  /* text on gold or gold leaf */

  /* states (always a word too, never color alone) */
  --success: #7cd2ae;
  --success-tint: #18382b;
  --warning: #f7c473;
  --warning-tint: #3f2c10;
  --warning-edge: #c9934b;
  --danger: #fe8b83;
  --danger-tint: #4a2321;
  --live: #ee8ab2;  /* the live flare: a lit light is magenta on a chart */
  --live-tint: #482232;
  --live-ink: #f6a0c1;
  --soon: #f5ecd7;

  /* shell surfaces (engine names) */
  --hero-bg: #0c1d34;
  --hero-text: #f5ecd7;
  --hero-muted: #d6cdb8;
  --sidebar-bg: #07162a;
  --topbar-bg: rgb(12 29 52 / 0.92);
  --dock-bg: rgb(12 29 52 / 0.96);
  --code-bg: #1d2f47;
  --kbd-bg: #1d2f47;
  --scrim: rgb(7 22 42 / 0.78);
  --plate: #ffffff;  /* logo plates (org logos keep their own colors) */
  --plate-dark: #000000;
  --plate-border: #304157;
  --plate-ink: #12264c;
  --plate-dark-ink: #ffffff;
  --theme-color: #0c1d34;

  /* ornaments: label frame, ribbon, water lining, graticule, seal */
  --frame-outer: #e9bb5b;  /* outer rule of the label frame (2px) */
  --frame-inner: #c79443;  /* inner hairline (1px) */
  --corner-ink: #e9bb5b;  /* corner blocks */
  --ribbon-bg: #e9bb5b;
  --ribbon-ink: #0c1d34;
  --ribbon-fold: #966b26;  /* the tails' shadowed fold */
  --ribbon-rule: #f3dd99;  /* hairlines inside the band */
  --fold-shade: #07162a;  /* mixed into a sheet ink for a ribbon's fold (color-mix) */
  --water-line: #305e77;  /* the engraved echo lines under a coast or a rule */
  --grat-ink: #f5ecd7;
  --grat-paper: #13263e;
  --seal: #e9bb5b;
  --seal-ink: #0c1d34;

  /* sheet inks: fill (badges, stripes, pin rings) · -ink (text on paper and tint) · -on (text on fill) · -tint (quiet ground) · -edge (keyline, 3:1) */
  --sheet-tampa: #f6787f; --sheet-tampa-ink: #ffa5a9; --sheet-tampa-on: #0c1d34; --sheet-tampa-tint: #482426; --sheet-tampa-edge: #f6787f;  /* 1 TP Tampa · Ybor brick */
  --sheet-stpete: #fd9958; --sheet-stpete-ink: #ffb27f; --sheet-stpete-on: #0c1d34; --sheet-stpete-tint: #462814; --sheet-stpete-edge: #fd9958;  /* 2 SP St. Petersburg · sunshine orange */
  --sheet-beaches: #6dd2cb; --sheet-beaches-ink: #8bd8d2; --sheet-beaches-on: #0c1d34; --sheet-beaches-tint: #003936; --sheet-beaches-edge: #6dd2cb;  /* 3 GB Gulf Beaches · Gulf turquoise */
  --sheet-clearwater: #81b4f6; --sheet-clearwater-ink: #a1caff; --sheet-clearwater-on: #0c1d34; --sheet-clearwater-tint: #1c314c; --sheet-clearwater-edge: #81b4f6;  /* 4 CW Clearwater & North Pinellas · sponge-dock blue */
  --sheet-around: #94d186; --sheet-around-ink: #a6d79c; --sheet-around-on: #0c1d34; --sheet-around-tint: #21371c; --sheet-around-edge: #94d186;  /* 5 AB Around the Bay · palmetto green */
  --sheet-daytrips: #bfa4f0; --sheet-daytrips-ink: #d0bbf9; --sheet-daytrips-on: #0c1d34; --sheet-daytrips-tint: #352a48; --sheet-daytrips-edge: #bfa4f0;  /* 6 DT Day Trips · sunset violet */

  /* map: land, water with water lining, roads, labels, buoys, clusters */
  --map-bg: #1c2c41;  /* land (the paper of the chart) */
  --map-land: #1c2c41;
  --map-water: #04182b;
  --map-water-line: #13425b;  /* water lining strokes */
  --map-water-edge: #245571;  /* first echo, hugging the coast */
  --map-coast: #bd9851;  /* the shoreline */
  --map-park: #1a3728;
  --map-sand: #41361f;  /* beaches */
  --map-road-minor: #2d3b4f;
  --map-road: #3c4b60;
  --map-road-major: #8d6f35;  /* highways and bridges in label gold */
  --map-casing: #132237;
  --map-road-casing: #132237;  /* SITE: the basemap's name for road casings */
  --map-bridge: #6e5c38;  /* SITE: bridge and causeway casings over water */
  --map-inland-water: #04182b;  /* SITE: lakes and rivers inside the land */
  --map-rail: #f5ecd7;
  --map-label: #d6cdb8;
  --map-label-water: #8bc8de;  /* water names, italic, as on a chart */
  --map-label-halo: #1c2c41;
  --map-pin-ink: #f5ecd7;
  --map-pin-bg: #13263e;
  --map-cluster-bg: #e9bb5b;
  --map-cluster-ink: #0c1d34;
  --map-cluster-ring: #f3dd99;
  --map-graticule: #d6cdb8;
  --map-select-ring: #ee8ab2;

  /* elevation: flat by default; rules do the structural work, shadows only float things */
  --shadow-1: 0 1px 0 rgb(0 0 0 / 0.4);
  --shadow-2: 0 10px 24px -12px rgb(0 0 0 / 0.7), 0 2px 6px -2px rgb(0 0 0 / 0.5);
  --shadow-3: 0 24px 48px -16px rgb(0 0 0 / 0.8), 0 6px 14px -6px rgb(0 0 0 / 0.5);

  /* type compensation: light text on a dark ground reads heavier */
  --wght-body: 380;
  --wght-head: 680;
}

/* ============ Night chart for readers without JS (generated from the same table as the block above) ============ */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;

    /* paper and ink */
    --bg: #0c1d34;  /* deep bay navy */
    --surface: #13263e;
    --surface-alt: #1d2f47;
    --surface-sunken: #07162a;
    --past-bg: #112136;
    --border: #304157;
    --border-strong: #74889e;  /* 3:1 on paper: chips, fields, frames of controls */
    --rule-ink: #f5ecd7;
    --text: #f5ecd7;  /* cream ink */
    --text-muted: #d6cdb8;
    --text-faint: #bab09c;

    /* actions and the house ink: gold (Night chart) */
    --primary: #f5ecd7;
    --primary-contrast: #0c1d34;
    --accent: #e9bb5b;
    --accent-strong: #f0d186;
    --accent-contrast: #0c1d34;
    --accent-tint: #412f0d;
    --link: #f0d186;
    --link-hover: #f5ecd7;
    --focus: #e9bb5b;

    /* the two label inks: chart magenta and cigar gold (ornament, signature, courses, the live flare) */
    --magenta: #ee8ab2;
    --magenta-ink: #f6a0c1;
    --magenta-tint: #482232;
    --gold: #e9bb5b;  /* ornament fill only (never text on paper in the Day chart) */
    --gold-ink: #f0d186;  /* gold as text: 4.5:1 on paper */
    --gold-tint: #412f0d;
    --gold-leaf: linear-gradient(100deg, #c79443 0%, #f3dd99 34%, #e9bb5b 50%, #f3dd99 66%, #c79443 100%);  /* foil: masthead rule, signature seal; sparingly */
    --gold-leaf-ink: #0c1d34;  /* text on gold or gold leaf */

    /* states (always a word too, never color alone) */
    --success: #7cd2ae;
    --success-tint: #18382b;
    --warning: #f7c473;
    --warning-tint: #3f2c10;
    --warning-edge: #c9934b;
    --danger: #fe8b83;
    --danger-tint: #4a2321;
    --live: #ee8ab2;  /* the live flare: a lit light is magenta on a chart */
    --live-tint: #482232;
    --live-ink: #f6a0c1;
    --soon: #f5ecd7;

    /* shell surfaces (engine names) */
    --hero-bg: #0c1d34;
    --hero-text: #f5ecd7;
    --hero-muted: #d6cdb8;
    --sidebar-bg: #07162a;
    --topbar-bg: rgb(12 29 52 / 0.92);
    --dock-bg: rgb(12 29 52 / 0.96);
    --code-bg: #1d2f47;
    --kbd-bg: #1d2f47;
    --scrim: rgb(7 22 42 / 0.78);
    --plate: #ffffff;  /* logo plates (org logos keep their own colors) */
    --plate-dark: #000000;
    --plate-border: #304157;
    --plate-ink: #12264c;
    --plate-dark-ink: #ffffff;
    --theme-color: #0c1d34;

    /* ornaments: label frame, ribbon, water lining, graticule, seal */
    --frame-outer: #e9bb5b;  /* outer rule of the label frame (2px) */
    --frame-inner: #c79443;  /* inner hairline (1px) */
    --corner-ink: #e9bb5b;  /* corner blocks */
    --ribbon-bg: #e9bb5b;
    --ribbon-ink: #0c1d34;
    --ribbon-fold: #966b26;  /* the tails' shadowed fold */
    --ribbon-rule: #f3dd99;  /* hairlines inside the band */
    --fold-shade: #07162a;  /* mixed into a sheet ink for a ribbon's fold (color-mix) */
    --water-line: #305e77;  /* the engraved echo lines under a coast or a rule */
    --grat-ink: #f5ecd7;
    --grat-paper: #13263e;
    --seal: #e9bb5b;
    --seal-ink: #0c1d34;

    /* sheet inks: fill (badges, stripes, pin rings) · -ink (text on paper and tint) · -on (text on fill) · -tint (quiet ground) · -edge (keyline, 3:1) */
    --sheet-tampa: #f6787f; --sheet-tampa-ink: #ffa5a9; --sheet-tampa-on: #0c1d34; --sheet-tampa-tint: #482426; --sheet-tampa-edge: #f6787f;  /* 1 TP Tampa · Ybor brick */
    --sheet-stpete: #fd9958; --sheet-stpete-ink: #ffb27f; --sheet-stpete-on: #0c1d34; --sheet-stpete-tint: #462814; --sheet-stpete-edge: #fd9958;  /* 2 SP St. Petersburg · sunshine orange */
    --sheet-beaches: #6dd2cb; --sheet-beaches-ink: #8bd8d2; --sheet-beaches-on: #0c1d34; --sheet-beaches-tint: #003936; --sheet-beaches-edge: #6dd2cb;  /* 3 GB Gulf Beaches · Gulf turquoise */
    --sheet-clearwater: #81b4f6; --sheet-clearwater-ink: #a1caff; --sheet-clearwater-on: #0c1d34; --sheet-clearwater-tint: #1c314c; --sheet-clearwater-edge: #81b4f6;  /* 4 CW Clearwater & North Pinellas · sponge-dock blue */
    --sheet-around: #94d186; --sheet-around-ink: #a6d79c; --sheet-around-on: #0c1d34; --sheet-around-tint: #21371c; --sheet-around-edge: #94d186;  /* 5 AB Around the Bay · palmetto green */
    --sheet-daytrips: #bfa4f0; --sheet-daytrips-ink: #d0bbf9; --sheet-daytrips-on: #0c1d34; --sheet-daytrips-tint: #352a48; --sheet-daytrips-edge: #bfa4f0;  /* 6 DT Day Trips · sunset violet */

    /* map: land, water with water lining, roads, labels, buoys, clusters */
    --map-bg: #1c2c41;  /* land (the paper of the chart) */
    --map-land: #1c2c41;
    --map-water: #04182b;
    --map-water-line: #13425b;  /* water lining strokes */
    --map-water-edge: #245571;  /* first echo, hugging the coast */
    --map-coast: #bd9851;  /* the shoreline */
    --map-park: #1a3728;
    --map-sand: #41361f;  /* beaches */
    --map-road-minor: #2d3b4f;
    --map-road: #3c4b60;
    --map-road-major: #8d6f35;  /* highways and bridges in label gold */
    --map-casing: #132237;
    --map-road-casing: #132237;  /* SITE: the basemap's name for road casings */
    --map-bridge: #6e5c38;  /* SITE: bridge and causeway casings over water */
    --map-inland-water: #04182b;  /* SITE: lakes and rivers inside the land */
    --map-rail: #f5ecd7;
    --map-label: #d6cdb8;
    --map-label-water: #8bc8de;  /* water names, italic, as on a chart */
    --map-label-halo: #1c2c41;
    --map-pin-ink: #f5ecd7;
    --map-pin-bg: #13263e;
    --map-cluster-bg: #e9bb5b;
    --map-cluster-ink: #0c1d34;
    --map-cluster-ring: #f3dd99;
    --map-graticule: #d6cdb8;
    --map-select-ring: #ee8ab2;

    /* elevation: flat by default; rules do the structural work, shadows only float things */
    --shadow-1: 0 1px 0 rgb(0 0 0 / 0.4);
    --shadow-2: 0 10px 24px -12px rgb(0 0 0 / 0.7), 0 2px 6px -2px rgb(0 0 0 / 0.5);
    --shadow-3: 0 24px 48px -16px rgb(0 0 0 / 0.8), 0 6px 14px -6px rgb(0 0 0 / 0.5);

    /* type compensation: light text on a dark ground reads heavier */
    --wght-body: 380;
    --wght-head: 680;
  }
}

/* ============ reduced motion: every duration collapses, the flare stops ============ */
@media (prefers-reduced-motion: reduce) {
  :root { --speed: 0.01ms; --speed-slow: 0.01ms; --pulse: 0s; }
}
