/* Flinglet's own pages (/ideas, /wishes, an idea's page) in Dusk, like the rest of fling.md and flinger.ai.
   Day (data-theme="light") keeps base.css's own light tokens; Dusk and Terminal get the dark ones.
   1. Flinglet's dark tokens for Dusk and Terminal, and its light tokens for Day (both copied from
      static/css/base.css; test/site.test.js keeps them in step), so the pages follow the sun / moon / star,
      not the device's setting.
   2. edition.css's two rules that only apply in dark.
   3. Flinglet's own links (Make, Ideas, Wishes) as a row under the site header.
   The header and footer themselves are /chrome.css, the same file as every other page. */

:root:not([data-theme="light"]) {
  color-scheme: dark;
  --lilac: #152316;
  --sky: #152316;
  --bg: #080E0A;            /* night */
  --surface: #0E1B0F;       /* card */
  --surface-2: #152316;     /* forest */
  --surface-3: #1C2F1E;     /* not in the book */
  --hairline: #26392A;
  --line-strong: #8AC969;   /* leaf: card edges */
  --hover: rgba(212, 237, 204, 0.07);
  --ink: #D4EDCC;           /* mint */
  --muted: #86A681;         /* moss */
  --brand: #B8FF53;         /* acid */
  --mint: #B8FF53;
  --on-mint: #080E0A;
  --mark: #CEFF3F;          /* lime: the book's "night, lime logo" */
  --primary: #D4EDCC;       /* mint field, night words */
  --on-primary: #080E0A;
  --cta: #D4EDCC;
  --on-cta: #080E0A;
  --cta-hover: #E6F6E0;
  --machine: #10180E;       /* terminal */
  --on-machine: #D4EDCC;
  --machine-signal: #B8FF53;
  --machine-line: #26392A;
  --field: #080E0A;
  --on-field: #D4EDCC;
  --on-field-soft: #86A681;
  --on-field-twist: #B8FF53;
  --field-line: #8AC969;
  --success: #8AC969;
  --success-bg: #1C3313;
  --warn: #F5B524;
  --warn-bg: #2B2208;
  --danger: #FF8A7A;
  --danger-bg: #33140F;
  --focus: #B8FF53;
  --font-head: var(--font-mono);
  --head-weight: 700;
  --head-tracking: -.01em;
  --head-case: uppercase;
  --font-twist: var(--font-mono);
  --twist-style: normal;
  --twist-weight: 400;
  --twist-colour: #B8FF53;
}
:root[data-theme="light"] {
  color-scheme: light;
  --orange: #FF6B35;
  --lilac: #F2D7F2;
  --sky: #C2D4F6;
  --purple: #6228BF;
  --bg: #F4F0E5;
  --surface: #FFFBEE;
  --surface-2: #E6E3D6;
  --surface-3: #DAD7C9;
  --hairline: #CFCCBF;
  --line-strong: #1C2119;
  --hover: rgba(28, 33, 25, 0.06);
  --ink: #1C2119;
  --muted: #55594E;
  --brand: #1C2119;
  --mint: #CEFF3F;
  --on-mint: #1C2119;
  --mark: #1C2119;
  --primary: #1C2119;
  --on-primary: #F4F0E5;
  --cta: #FF6B35;
  --on-cta: #1C2119;
  --cta-hover: #FF8254;
  --machine: #1C2119;
  --on-machine: #F4F0E5;
  --machine-signal: #CEFF3F;
  --machine-line: #3A4034;
  --field: #FF6B35;
  --on-field: #1C2119;
  --on-field-soft: #1C2119;
  --on-field-twist: #1C2119;
  --field-line: #1C2119;
  --success: #3F6E0E;
  --success-bg: #E4F7B0;
  --warn: #8A5200;
  --warn-bg: #FBE7BE;
  --danger: #A82A20;
  --danger-bg: #FBDFD8;
  --focus: #1C2119;
  --font-ui: "Arimo", Arial, system-ui, sans-serif;
  --font-serif: "Gelasio", Georgia, serif;
  --font-mono: "Inconsolata", ui-monospace, Menlo, monospace;
  --serif: var(--font-serif);
  --sans: var(--font-ui);
  --font-head: var(--font-ui);
  --head-weight: 700;
  --head-tracking: -.05em;
  --head-case: none;
  --font-twist: var(--font-serif);
  --twist-style: italic;
  --twist-weight: 400;
  --twist-colour: inherit;
  --r-sm: 3px;
  --r: 7px;
  --r-xl: 16px;
  --edge: 2px;
}
body { background: var(--bg); color: var(--ink); }   /* every theme: Day uses base.css's own light tokens */

:root:not([data-theme="light"]) .stage[data-phase=hero]::after { display: none; }
@media (max-width: 650px) {
  :root:not([data-theme="light"]) :is(.stage[data-phase=hero] .hero-title, .gallery h1, .wall h1, .detail-opening h1) { font-size: clamp(34px, 10.5vw, 56px); overflow-wrap: anywhere; }
}

/* the fixed site header sits over the page: start below it */
body:has(> .top) { padding-top: 64px; }

.flinglet-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; padding-block: .5rem; border-block: 1px solid var(--hairline);
  padding-inline: max(var(--gutter, 20px), calc((100vw - 1240px) / 2));
}
.flinglet-bar b { font: 700 .72rem var(--font-mono); letter-spacing: .12em; color: var(--muted); margin-right: .25rem; }
.flinglet-bar a { display: inline-flex; align-items: center; min-height: 2.75rem; font: 700 .9rem var(--font-mono); color: var(--ink); text-decoration: none; border-bottom: 2px solid transparent; }
.flinglet-bar a:hover, .flinglet-bar a[aria-current="page"] { border-bottom-color: var(--brand); color: var(--brand); }
.flinglet-bar a:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
