/* =========================================================
   Useful Garden — shared styles
   Used by the main site and every project under /projects.
   ========================================================= */

/* Every colour of the time of day changes together: the tokens are registered
   so the root can fade them all at once (no per-element fades), and they
   change instantly while the sun or moon is being dragged. */
@property --accent { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --accent-soft-0 { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --ambient { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --ambient-glow { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --bed-shadow { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --bg-0 { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --bg-soft-0 { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --board-bg-0 { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --board-ink { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --brand { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --brand-ink { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --brand-soft-0 { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --clay-bg-0 { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --clay-ink { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --cloud { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --firefly { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --footer-bg-0 { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --footer-ink { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --footer-muted { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --glow { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --halo { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --heather-bg-0 { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --heather-ink { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --hill-far-0 { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --hill-far-tree-0 { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --hill-mid-0 { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --hill-mid-tree-0 { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --ink { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --ink-2 { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --ink-3 { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --lawn-0 { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --lawn-stripe { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --leaf { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --leaf-1 { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --leaf-2 { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --line-0 { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --line-strong-0 { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --moon { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --moss-bg-0 { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --moss-ink { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --mound-0 { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --olive-bg-0 { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --olive-ink { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --on-brand { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --path-0 { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --path-stone-0 { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --plot-0 { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --shrub-0 { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --shrub-2-0 { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --sky-bg-0 { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --sky-bottom { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --sky-ink { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --sky-top { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --soil-0 { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --soil-dot { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --sparkle { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --stem { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --sun { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --surface-0 { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --tag-bg { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --tag-ink { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --trail-0 { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --trunk { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --wash { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --wheat-bg-0 { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --wheat-ink { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --wood { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --wood-dark { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --wood-light { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --day { syntax: "<number>"; inherits: true; initial-value: 1; }
@property --night { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --stars { syntax: "<number>"; inherits: true; initial-value: 1; }
@property --season { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --season-tree { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --season-sky { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --season-sky-k { syntax: "<percentage>"; inherits: true; initial-value: 0%; }
@property --wx-sky { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --wx-k { syntax: "<percentage>"; inherits: true; initial-value: 0%; }
@property --season-k { syntax: "<percentage>"; inherits: true; initial-value: 0%; }
@property --season-tree-k { syntax: "<percentage>"; inherits: true; initial-value: 0%; }
@property --wash-k { syntax: "<percentage>"; inherits: true; initial-value: 0%; }
:root { transition-property: --accent, --accent-soft-0, --ambient, --ambient-glow, --bed-shadow, --bg-0, --bg-soft-0, --board-bg-0, --board-ink, --brand, --brand-ink, --brand-soft-0, --clay-bg-0, --clay-ink, --cloud, --firefly, --footer-bg-0, --footer-ink, --footer-muted, --glow, --halo, --heather-bg-0, --heather-ink, --hill-far-0, --hill-far-tree-0, --hill-mid-0, --hill-mid-tree-0, --ink, --ink-2, --ink-3, --lawn-0, --lawn-stripe, --leaf, --leaf-1, --leaf-2, --line-0, --line-strong-0, --moon, --moss-bg-0, --moss-ink, --mound-0, --olive-bg-0, --olive-ink, --on-brand, --path-0, --path-stone-0, --plot-0, --shrub-0, --shrub-2-0, --sky-bg-0, --sky-bottom, --sky-ink, --sky-top, --soil-0, --soil-dot, --sparkle, --stem, --sun, --surface-0, --tag-bg, --tag-ink, --trail-0, --trunk, --wash, --wheat-bg-0, --wheat-ink, --wood, --wood-dark, --wood-light, --day, --night, --stars, --wash-k, --season, --season-tree, --season-k, --season-tree-k, --season-sky, --season-sky-k, --wx-sky, --wx-k; transition-duration: .5s; transition-timing-function: ease-out; }
:root.sky-instant { transition: none; }

:root {
  --bg-0: #f7f4ec;
  --bg-soft-0: #efeadd;
  --surface-0: #fffdf8;
  --ink: #1f2b1c;
  --ink-2: #485445;
  --ink-3: #6b7666;
  --line-0: #e2dbca;
  --line-strong-0: #cfc6b1;

  --brand: #2f5d2a;
  --brand-ink: #2f5d2a;
  --brand-soft-0: #e3edd8;
  --leaf: #a8d08d;
  --accent: #b8662f;
  --accent-soft-0: #f6e3d1;
  --on-brand: #f6f1e3;

  --footer-bg-0: #243f20;
  --footer-ink: #dfe8d6;
  --footer-muted: #a9bba0;

  /* section tints: background / ink */
  --moss-bg-0: #e3edd6;    --moss-ink: #33612b;
  --sky-bg-0: #dcebe9;     --sky-ink: #28625f;
  --wheat-bg-0: #f3e7c6;   --wheat-ink: #7a5a12;
  --olive-bg-0: #e9ebcf;   --olive-ink: #5a6320;
  --clay-bg-0: #f4e0d5;    --clay-ink: #8b472b;
  --heather-bg-0: #e8e2ef; --heather-ink: #5b4978;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 18px;
  --leaf-radius: 24px 24px 24px 8px;
  --shadow-sm: 0 1px 2px rgba(35, 50, 30, .06);
  --shadow: 0 1px 2px rgba(35, 50, 30, .05), 0 8px 24px -12px rgba(35, 50, 30, .18);
  --shadow-lg: 0 2px 4px rgba(35, 50, 30, .05), 0 22px 44px -20px rgba(35, 50, 30, .28);

  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
  --day: 1;
  --night: 0;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-0: #131a12;
    --bg-soft-0: #182117;
    --surface-0: #1c2619;
    --ink: #e8eee2;
    --ink-2: #bcc8b4;
    --ink-3: #8f9c88;
    --line-0: #2b3828;
    --line-strong-0: #3a4a36;
    --brand: #6ea85f;
    --brand-ink: #a8d08d;
    --brand-soft-0: #22321f;
    --accent: #e39a5f;
    --accent-soft-0: #3a2a1d;
    --on-brand: #0f160e;
    --footer-bg-0: #0e140d;
    --footer-ink: #d6e2cd;
    --footer-muted: #8c9b85;
    --moss-bg-0: #24361f;    --moss-ink: #b3d89d;
    --sky-bg-0: #1e3433;     --sky-ink: #9fd4cf;
    --wheat-bg-0: #3a3119;   --wheat-ink: #e8cf8a;
    --olive-bg-0: #2f331b;   --olive-ink: #d2d98f;
    --clay-bg-0: #3d271d;    --clay-ink: #f0b594;
    --heather-bg-0: #2f2839; --heather-ink: #cdbdea;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 10px 26px -14px rgba(0, 0, 0, .6);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, .25), 0 24px 44px -20px rgba(0, 0, 0, .7);
    --day: 0;
    --night: 1;
    color-scheme: dark;
  }
}

/* explicit choice from the day/night toggle */
:root[data-theme="dark"] {
  --bg-0: #131a12;
  --bg-soft-0: #182117;
  --surface-0: #1c2619;
  --ink: #e8eee2;
  --ink-2: #bcc8b4;
  --ink-3: #8f9c88;
  --line-0: #2b3828;
  --line-strong-0: #3a4a36;
  --brand: #6ea85f;
  --brand-ink: #a8d08d;
  --brand-soft-0: #22321f;
  --accent: #e39a5f;
  --accent-soft-0: #3a2a1d;
  --on-brand: #0f160e;
  --footer-bg-0: #0e140d;
  --footer-ink: #d6e2cd;
  --footer-muted: #8c9b85;
  --moss-bg-0: #24361f;    --moss-ink: #b3d89d;
  --sky-bg-0: #1e3433;     --sky-ink: #9fd4cf;
  --wheat-bg-0: #3a3119;   --wheat-ink: #e8cf8a;
  --olive-bg-0: #2f331b;   --olive-ink: #d2d98f;
  --clay-bg-0: #3d271d;    --clay-ink: #f0b594;
  --heather-bg-0: #2f2839; --heather-ink: #cdbdea;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 10px 26px -14px rgba(0, 0, 0, .6);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, .25), 0 24px 44px -20px rgba(0, 0, 0, .7);
  --day: 0;
  --night: 1;
  color-scheme: dark;
}

/* Time of day: the colours above (-0) are washed with the hour's colour
   (--wash at --wash-k, set by the script in the page head), so the whole
   page shifts — mint mornings, amber afternoons, coral sunsets, violet
   dusk, blue nights. Cards take less of it so text stays easy to read. */
:root {
  --wash: #ffffff;
  --wash-k: 0%;
  --bg: color-mix(in srgb, var(--wash) var(--wash-k), color-mix(in srgb, var(--season) calc(var(--season-k) * .45), var(--bg-0)));
  --bg-soft: color-mix(in srgb, var(--wash) var(--wash-k), color-mix(in srgb, var(--season) calc(var(--season-k) * .45), var(--bg-soft-0)));
  --sky-top-s: color-mix(in srgb, var(--wx-sky) var(--wx-k), color-mix(in srgb, var(--season-sky) var(--season-sky-k), var(--sky-top)));
  --sky-bottom-s: color-mix(in srgb, var(--wx-sky) calc(var(--wx-k) * .85), color-mix(in srgb, var(--season-sky) calc(var(--season-sky-k) * .8), var(--sky-bottom)));
  --surface: color-mix(in srgb, var(--wash) calc(var(--wash-k) * .45), color-mix(in srgb, var(--season) calc(var(--season-k) * .15), var(--surface-0)));
  --line: color-mix(in srgb, var(--wash) calc(var(--wash-k) * .8), var(--line-0));
  --line-strong: color-mix(in srgb, var(--wash) calc(var(--wash-k) * .8), var(--line-strong-0));
  --brand-soft: color-mix(in srgb, var(--wash) calc(var(--wash-k) * .6), var(--brand-soft-0));
  --accent-soft: color-mix(in srgb, var(--wash) calc(var(--wash-k) * .6), var(--accent-soft-0));
  --footer-bg: color-mix(in srgb, var(--wash) calc(var(--wash-k) * .9), var(--footer-bg-0));
  --moss-bg: color-mix(in srgb, var(--wash) calc(var(--wash-k) * .6), var(--moss-bg-0));
  --sky-bg: color-mix(in srgb, var(--wash) calc(var(--wash-k) * .6), var(--sky-bg-0));
  --wheat-bg: color-mix(in srgb, var(--wash) calc(var(--wash-k) * .6), var(--wheat-bg-0));
  --olive-bg: color-mix(in srgb, var(--wash) calc(var(--wash-k) * .6), var(--olive-bg-0));
  --clay-bg: color-mix(in srgb, var(--wash) calc(var(--wash-k) * .6), var(--clay-bg-0));
  --heather-bg: color-mix(in srgb, var(--wash) calc(var(--wash-k) * .6), var(--heather-bg-0));
}

.tint-moss    { --tint-bg: var(--moss-bg);    --tint-ink: var(--moss-ink); }
.tint-sky     { --tint-bg: var(--sky-bg);     --tint-ink: var(--sky-ink); }
.tint-wheat   { --tint-bg: var(--wheat-bg);   --tint-ink: var(--wheat-ink); }
.tint-olive   { --tint-bg: var(--olive-bg);   --tint-ink: var(--olive-ink); }
.tint-clay    { --tint-bg: var(--clay-bg);    --tint-ink: var(--clay-ink); }
.tint-heather { --tint-bg: var(--heather-bg); --tint-ink: var(--heather-ink); }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
main { flex: 1; }
img, svg { display: block; max-width: 100%; }
a { color: var(--brand-ink); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--leaf); color: #1f2b1c; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.icon { width: 20px; height: 20px; flex: none; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--brand); color: var(--on-brand); padding: 8px 14px; border-radius: 10px; }
.skip-link:focus { top: 12px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; gap: 16px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; letter-spacing: -.01em; }
.brand:hover { color: var(--ink); }
.brand img { border-radius: 10px; }
.brand span { white-space: nowrap; }
@media (max-width: 420px) { .brand { gap: 8px; font-size: 1.08rem; } .brand img { width: 30px; height: 30px; } }
@media (max-width: 370px) { .brand { font-size: 1rem; gap: 6px; } }
.brand--light, .brand--light:hover { color: var(--footer-ink); }

.site-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.site-nav a { color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: .95rem; padding: 8px 14px; border-radius: 999px; transition: background .15s, color .15s; }
.site-nav a:hover { background: var(--brand-soft); color: var(--brand-ink); }
.site-nav a[aria-current="page"] { color: var(--brand-ink); background: var(--brand-soft); }
.site-nav .nav-search { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong); margin-left: 8px; }
.site-nav .nav-search .icon { width: 17px; height: 17px; }

.nav-toggle { display: none; background: none; border: 1px solid var(--line-strong); color: var(--ink); width: 42px; height: 42px; border-radius: 12px; cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 68px;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 16px;
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 12px 14px; border-radius: 12px; }
  .site-nav .nav-search { margin: 6px 0 0; justify-content: center; }
}

/* ---------- project breadcrumb bar ---------- */
.project-bar { background: var(--tint-bg); color: var(--tint-ink); }
.project-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .9rem; }
.crumbs a { color: inherit; text-decoration: none; opacity: .85; }
.crumbs a:hover { opacity: 1; text-decoration: underline; color: inherit; }
.crumbs span[aria-hidden] { opacity: .45; }
.crumbs [aria-current] { font-weight: 600; }

/* ---------- buttons & form bits ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 .95rem/1 var(--font-body);
  padding: 13px 20px; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform .15s, background .15s, border-color .15s, color .15s;
}
.btn .icon { width: 18px; height: 18px; }
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: color-mix(in srgb, var(--brand) 88%, #000); color: var(--on-brand); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-ink); }
.btn-sm { padding: 9px 14px; font-size: .88rem; }

.search-field { position: relative; display: flex; align-items: center; }
.search-field .icon { position: absolute; left: 18px; color: var(--ink-3); pointer-events: none; }
.search-field input {
  width: 100%; font: inherit; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 999px; padding: 15px 20px 15px 50px;
  box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s;
}
.search-field input::placeholder { color: var(--ink-3); }
.search-field input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.search-field kbd { position: absolute; right: 16px; font: 500 .78rem var(--font-body); color: var(--ink-3); border: 1px solid var(--line-strong); border-radius: 6px; padding: 2px 7px; }
@media (max-width: 720px), (hover: none) { .search-field kbd { display: none; } }

/* ---------- small labels ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-ink); margin-bottom: 14px; }
.eyebrow .icon { width: 16px; height: 16px; }

.stage { display: inline-flex; align-items: center; gap: 5px; font-size: .75rem; font-weight: 600; padding: 4px 10px 4px 7px; border-radius: 999px; white-space: nowrap; }
.stage .icon { width: 15px; height: 15px; }
.stage--bloom { background: var(--brand-soft); color: var(--brand-ink); }
.stage--sprout { background: var(--accent-soft); color: var(--accent); }
.stage--seed { background: var(--bg-soft); color: var(--ink-3); border: 1px dashed var(--line-strong); }
.project-bar .stage { background: color-mix(in srgb, var(--surface) 70%, transparent); }

.access { font-size: .78rem; font-weight: 600; color: var(--ink-2); }
.access--paid, .access--freemium { color: var(--accent); }

/* ---------- sections of a page ---------- */
.block { padding: clamp(56px, 8vw, 96px) 0; }
.block--tight { padding-top: 0; }
.block-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; flex-wrap: wrap; }
.block-head h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); margin: 0; }
.block-head p { color: var(--ink-2); margin: 10px 0 0; max-width: 56ch; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; }
.link-arrow .icon { width: 18px; height: 18px; transition: transform .15s; }
.link-arrow:hover .icon { transform: translateX(3px); }

/* ---------- project cards ---------- */
.icon-tile { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 14px 14px 14px 5px; background: var(--tint-bg); color: var(--tint-ink); flex: none; }
.icon-tile .icon { width: 22px; height: 22px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 18px; }
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--leaf-radius); padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.card:not(.card--seed):hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--tint-ink) 30%, var(--line)); }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.card-title { font-size: 1.25rem; margin: 0 0 6px; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card-title a:focus-visible { outline: none; }
.card:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.card-text { color: var(--ink-2); font-size: .95rem; margin-bottom: 18px; }
.card-meta { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 14px; border-top: 1px dashed var(--line); }
.card-section { font-size: .8rem; color: var(--ink-3); }
.card--seed { background: transparent; box-shadow: none; border-style: dashed; border-color: var(--line-strong); }
.card--seed .icon-tile { opacity: .7; }
.card--seed .card-title { color: var(--ink-2); }

/* ---------- soft panel (a "clearing") ---------- */
.panel { background: var(--bg-soft); border-radius: 36px 36px 36px 12px; padding: clamp(32px, 5vw, 56px); position: relative; overflow: hidden; }
.panel-split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 56px); align-items: center; }
@media (max-width: 800px) { .panel-split { grid-template-columns: 1fr; } }
.panel h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.panel p { color: var(--ink-2); }


.cta { text-align: center; }
.cta h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin-bottom: 12px; }
.cta p { color: var(--ink-2); max-width: 52ch; margin: 0 auto 26px; }
.cta-sprig { width: 64px; height: 64px; margin: 0 auto 14px; color: var(--brand-ink); }

/* ---------- page header (inner pages) ---------- */
.page-head { padding: clamp(40px, 6vw, 72px) 0 28px; position: relative; }
.page-head::before {
  content: ""; position: absolute; inset: -68px 0 0; z-index: -1; pointer-events: none;
  -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent);
  background: radial-gradient(40% 70% at 90% 10%, color-mix(in srgb, var(--leaf) 22%, transparent), transparent 70%);
}
.page-head h1 { font-size: clamp(2.1rem, 4.6vw, 3.2rem); font-weight: 450; letter-spacing: -.02em; }
.page-head p { color: var(--ink-2); font-size: 1.1rem; max-width: 60ch; margin: 0; }

/* ---------- explore ---------- */
.filters { display: grid; gap: 16px; margin-bottom: 28px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip {
  font: 500 .88rem var(--font-body); color: var(--ink-2);
  background: var(--surface); border: 1px solid var(--line);
  padding: 8px 14px; border-radius: 999px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  transition: background .15s, border-color .15s, color .15s;
}
.chip:hover { border-color: var(--line-strong); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.chip .swatch { width: 9px; height: 9px; border-radius: 50%; background: var(--tint-ink); }
.chip[aria-pressed="true"] .swatch { background: var(--on-brand); }
.filter-label { font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-right: 6px; }
.results-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; color: var(--ink-3); font-size: .9rem; flex-wrap: wrap; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--brand-ink); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.empty { text-align: center; padding: 56px 20px; border: 1px dashed var(--line-strong); border-radius: var(--leaf-radius); color: var(--ink-2); }
.empty .icon { width: 40px; height: 40px; margin: 0 auto 12px; color: var(--ink-3); }
.empty h3 { font-size: 1.3rem; }
[hidden] { display: none !important; }

/* ---------- prose (about) ---------- */
.prose { max-width: 68ch; font-size: 1.07rem; color: var(--ink-2); }
.prose h2 { font-size: 1.7rem; color: var(--ink); margin-top: 1.6em; }
.principles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.principle { background: var(--surface); border: 1px solid var(--line); border-radius: var(--leaf-radius); padding: 24px; }
.principle h3 { font-size: 1.2rem; margin: 14px 0 6px; }
.principle p { color: var(--ink-2); font-size: .95rem; margin: 0; }

/* ---------- footer ---------- */
.site-footer { margin-top: clamp(24px, 4vw, 48px); color: var(--footer-ink); }
.footer-hedge { width: 100%; height: 48px; display: block; margin-bottom: -1px; }
.footer-hedge path { fill: var(--footer-bg); }
.footer-body { background: var(--footer-bg); padding: 40px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer-brand p { color: var(--footer-muted); max-width: 42ch; margin-top: 14px; font-size: .95rem; }
.footer-title { font: 600 .8rem var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--footer-muted); margin-bottom: 14px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-links a { color: var(--footer-ink); text-decoration: none; font-size: .95rem; }
.footer-links a:hover { color: #fff; text-decoration: underline; }
.footer-base { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .1); color: var(--footer-muted); font-size: .85rem; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* =========================================================
   Tool kit — shared building blocks for side projects
   ========================================================= */
.tool { padding: clamp(28px, 5vw, 56px) 0; }
.tool-head { max-width: 680px; margin-bottom: 28px; }
.tool-head h1 { font-size: clamp(2rem, 4.4vw, 2.9rem); font-weight: 450; letter-spacing: -.02em; margin-bottom: 10px; }
.tool-head p { color: var(--ink-2); font-size: 1.08rem; margin: 0; }
.tool-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 860px) { .tool-grid { grid-template-columns: 1fr; } }
.tool-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--leaf-radius); padding: clamp(18px, 3vw, 28px); box-shadow: var(--shadow-sm); }
.tool-card h2 { font-size: 1.15rem; font-family: var(--font-body); font-weight: 600; letter-spacing: 0; margin-bottom: 14px; }
.tool-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label, .field .label { font-size: .88rem; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: .82rem; color: var(--ink-3); }
.input, .field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line-strong);
  border-radius: 12px; padding: 11px 14px;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 280px; line-height: 1.65; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent); }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; }
.input-affix { position: relative; }
.input-affix span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.input-affix input { padding-left: 30px; }

.segmented { display: flex; flex-wrap: wrap; gap: 6px; }
.segmented button { flex: 1 1 auto; font: 500 .9rem var(--font-body); padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink-2); cursor: pointer; }
.segmented button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }

.checkbox { display: flex; align-items: center; gap: 10px; font-size: .95rem; color: var(--ink-2); cursor: pointer; }
.checkbox input { width: 18px; height: 18px; accent-color: var(--brand); }

.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat { background: var(--bg); border-radius: 14px 14px 14px 5px; padding: 14px 16px; }
.stat strong { display: block; font-family: var(--font-display); font-size: 1.7rem; font-weight: 500; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat span { font-size: .82rem; color: var(--ink-3); }
.stat--hero { grid-column: 1 / -1; background: var(--brand-soft); }
.stat--hero strong { font-size: 2.6rem; color: var(--brand-ink); }

.result-lines { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; font-size: .95rem; }
.result-lines li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); color: var(--ink-2); }
.result-lines li strong { color: var(--ink); font-variant-numeric: tabular-nums; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-size: .9rem; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 60; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- day / night toggle ---------- */
.theme-toggle { position: relative; width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--ink-2); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.theme-toggle:hover { color: var(--brand-ink); border-color: var(--brand); }
.theme-toggle .icon { position: absolute; width: 18px; height: 18px; transition: opacity .3s, transform .4s; }
.theme-toggle .icon-moon { opacity: var(--day); transform: rotate(calc(var(--night) * -90deg)); }
.theme-toggle .icon-sun { opacity: var(--night); transform: rotate(calc(var(--day) * 90deg)); }
.header-tools { display: flex; align-items: center; gap: 8px; margin-left: 8px; }
@media (max-width: 720px) { .header-tools { margin-left: auto; } }

/* =========================================================
   Time of day across the whole page
   ========================================================= */

/* Ambient light: soft washes of the time of day over everything (lawn, beds,
   cards, header, footer). Colours and strengths come from the visitor's clock
   (--ambient and --ambient-glow, set by the script in the page head). */
body::after, body::before {
  content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none;
}
/* light filter: warm or fresh by day, darkening in the deep night */
body::after { background: var(--ambient, transparent); mix-blend-mode: multiply; }
/* night glow: twilight and evening */
body::before { background: var(--ambient-glow, transparent); mix-blend-mode: screen; }
@media print { body::after, body::before { display: none; } }

/* The header's little sky window: current sky colours with a tiny sun or moon
   on its path. Drag it to change the time of day, click to swap day and night. */
.sky-pill {
  position: relative; flex: none; width: 74px; height: 38px; padding: 0; border: 0; background: none;
  border-radius: 999px; cursor: grab; touch-action: none; -webkit-tap-highlight-color: transparent;
}
.sky-pill.is-dragging { cursor: grabbing; }
.sky-pill-track {
  position: absolute; inset: 0; overflow: hidden; border-radius: inherit;
  background: radial-gradient(120% 90% at 50% 110%, var(--glow, transparent), transparent 70%), linear-gradient(var(--sky-top-s), var(--sky-bottom-s));
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.sky-pill-body {
  position: absolute; width: 16px; height: 16px; border-radius: 50%;
  left: calc(5px + var(--cx, .5) * (100% - 26px));
  top: calc(5px + var(--cy, .2) * 16px);
}
.sky-pill.is-placed .sky-pill-body { transition: left 1.2s cubic-bezier(.4, 0, .2, 1), top 1.2s cubic-bezier(.4, 0, .2, 1); }
.sky-pill.is-dragging .sky-pill-body { transition: none; }
.sky-pill-body .sun, .sky-pill-body .moon { position: absolute; inset: 0; border-radius: 50%; }
.sky-pill-body .sun { background: radial-gradient(circle at 40% 38%, #fbe3a0, var(--sun, #f6c863) 65%); box-shadow: 0 0 8px 2px color-mix(in srgb, var(--sun, #f6c863) 55%, transparent); opacity: var(--day); }
.sky-pill-body .moon { box-shadow: inset -4px 2px 0 0 #f3ecd4; opacity: var(--night); transform: rotate(-20deg); }
.sky-pill:hover .sky-pill-track, .sky-pill:focus-visible .sky-pill-track { box-shadow: inset 0 0 0 1.5px var(--brand); }
.sky-pill .celestial-label {
  position: absolute; left: 50%; top: calc(100% + 8px); transform: translate(-50%, -4px); z-index: 5;
  font: 600 .78rem var(--font-body); white-space: nowrap; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  padding: 4px 10px; border-radius: 999px; pointer-events: none; opacity: 0; transition: opacity .25s, transform .25s;
}
.sky-pill:hover .celestial-label, .sky-pill:focus-visible .celestial-label, .sky-pill.is-dragging .celestial-label { opacity: 1; transform: translate(-50%, 0); }
/* Plain words beside the little sky: what a click does ("Night" by day, "Day" by night). */
.sky-pill.has-swap { display: inline-flex; align-items: center; width: auto; padding: 0 12px 0 0; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); font: 600 .84rem var(--font-body); gap: 8px; }
.sky-pill.has-swap .sky-pill-track { position: relative; inset: auto; display: block; width: 56px; height: 36px; flex: none; box-shadow: none; border-radius: 999px 0 0 999px; }
.sky-pill.has-swap:hover, .sky-pill.has-swap:focus-visible { border-color: var(--brand); color: var(--brand-ink); }
.sky-pill.has-swap:hover .sky-pill-track, .sky-pill.has-swap:focus-visible .sky-pill-track { box-shadow: none; }
.sky-pill.has-swap { cursor: pointer; }
.sky-pill.has-swap .sky-pill-track { cursor: grab; }
.sky-pill.is-dragging .sky-pill-track { cursor: grabbing; }
.sky-pill-swap { display: inline-flex; }
.sky-pill-swap > span { display: inline-flex; align-items: center; gap: 5px; }
.sky-pill-swap .icon { width: 16px; height: 16px; }
:root[data-theme="dark"] .sky-pill-swap .to-night, :root:not([data-theme="dark"]) .sky-pill-swap .to-day { display: none; }
/* Phones: just a round sun/moon button (what a click switches to). */
@media (max-width: 720px) {
  .sky-pill { width: 64px; height: 36px; }
  .sky-pill.has-swap { width: 38px; height: 38px; padding: 0; gap: 0; justify-content: center; cursor: pointer; }
  .sky-pill.has-swap .sky-pill-track, .sky-pill.has-swap .celestial-label { display: none; }
  .sky-pill-swap .icon { width: 18px; height: 18px; }
  .sky-pill-swap > span { font-size: 0; gap: 0; }
  .header-tools { gap: 6px; }
}

/* =========================================================
   Seasons (data-season on <html>, set by the script in the page head)
   ========================================================= */

/* What each season does to the ground (--season) and to trees and shrubs
   (--season-tree): blossom in spring, sun-dried gold in summer, lush green
   in the monsoon, orange leaves in autumn, frost in winter. */
:root[data-season="spring"]  { --season: #92dc58; --season-k: 30%; --season-tree: #86dc44; --season-tree-k: 50%; --season-sky: #cdeeff; --season-sky-k: 30%; }
:root[data-season="summer"]  { --season: #f0c440; --season-k: 42%; --season-tree: #cfa83a; --season-tree-k: 38%; --season-sky: #ffd98a; --season-sky-k: 38%; }
:root[data-season="monsoon"] { --season: #1d7a3e; --season-k: 40%; --season-tree: #135a2a; --season-tree-k: 45%; --season-sky: #6e7c8c; --season-sky-k: 55%; }
:root[data-season="autumn"]  { --season: #e09a38; --season-k: 38%; --season-tree: #e2581a; --season-tree-k: 70%; --season-sky: #ffc890; --season-sky-k: 30%; }
:root[data-season="winter"]  { --season: #f6f9fd; --season-k: 62%; --season-tree: #ffffff; --season-tree-k: 70%; --season-sky: #c4d6ee; --season-sky-k: 45%; }
:root[data-theme="dark"][data-season="winter"]  { --season: #b4c4d8; --season-k: 38%; --season-tree: #d0dcea; --season-tree-k: 50%; --season-sky: #3a4a66; --season-sky-k: 35%; }
:root[data-theme="dark"][data-season="summer"]  { --season-k: 26%; --season-sky-k: 18%; }
:root[data-theme="dark"][data-season="monsoon"] { --season-sky: #2a3442; --season-sky-k: 45%; }
:root[data-theme="dark"][data-season="autumn"]  { --season-sky-k: 14%; }
:root[data-theme="dark"][data-season="spring"]  { --season-sky-k: 12%; }

/* Header button: shows the season; click to preview the next one. */
.season-btn { font: 600 .84rem var(--font-body); cursor: pointer; }
.season-btn {
  display: inline-flex; align-items: center; height: 38px; padding: 0 12px; flex: none;
  border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2);
}
.season-btn:hover, .season-btn:focus-visible { border-color: var(--brand); color: var(--brand-ink); }
.season-btn [data-s] { display: none; align-items: center; gap: 6px; }
.season-btn .icon { width: 16px; height: 16px; }
:root[data-season="spring"] .season-btn [data-s="spring"],
:root[data-season="summer"] .season-btn [data-s="summer"],
:root[data-season="monsoon"] .season-btn [data-s="monsoon"],
:root[data-season="autumn"] .season-btn [data-s="autumn"],
:root[data-season="winter"] .season-btn [data-s="winter"] { display: inline-flex; }
@media (max-width: 1000px) and (min-width: 721px) { .season-btn .season-name { display: none; } .season-btn { padding: 0 11px; } }
/* Phones: season & weather stays in the header as a compact icon + temperature;
   its panel opens as a sheet under the header. */
@media (max-width: 720px) {
  .season-btn { height: 38px; padding: 0 11px; gap: 6px; }
  .season-btn .season-name { display: none; }
  .wx-temp { padding-left: 6px; }
  .wx-wrap { position: static; }
}

/* Falling and floating things across the whole page (built by garden.js);
   below the header (z-index 40) so its menus and panel stay clear. */
.season-fx { position: fixed; inset: 0; z-index: 35; pointer-events: none; overflow: hidden; }
.season-fx i { position: absolute; top: -6vh; left: var(--x); display: block; animation: fx-fall var(--dur) linear var(--delay) infinite; }
.season-fx i::before { content: ""; display: block; animation: fx-sway calc(var(--dur) / 3) ease-in-out var(--delay) infinite alternate; }
@keyframes fx-fall { to { transform: translate3d(var(--drift, 0), 112vh, 0); } }
@keyframes fx-sway { from { transform: translateX(-18px) rotate(-35deg); } to { transform: translateX(18px) rotate(35deg); } }
/* spring: blossom petals */
.fx-spring i::before { width: calc(var(--s) * 1px); height: calc(var(--s) * .75px); border-radius: 80% 0 80% 0; background: var(--c, #f6b6c9); opacity: 1; box-shadow: 0 1px 2px rgba(160, 60, 90, .25); }
/* summer: dandelion seeds and pollen drifting up */
.fx-summer i { top: auto; bottom: -4vh; animation-name: fx-rise; }
@keyframes fx-rise { to { transform: translate3d(var(--drift, 0), -112vh, 0); } }
.fx-summer i::before { width: calc(var(--s) * .5px); height: calc(var(--s) * .5px); border-radius: 50%; background: #ffe680; box-shadow: 0 0 10px 4px rgba(255, 205, 80, .7); opacity: .95; }
/* monsoon: rain */
.fx-monsoon i { animation-timing-function: linear; }
.fx-monsoon i::before { width: 2px; height: calc(var(--s) * 2.4px); border-radius: 1px; background: linear-gradient(transparent, rgba(70, 110, 170, .8)); transform: rotate(12deg); animation: none; }
/* autumn: leaves */
.fx-autumn i::before { width: calc(var(--s) * 1px); height: calc(var(--s) * 1px); border-radius: 0 80% 0 80%; background: var(--c, #e2803a); opacity: 1; box-shadow: 0 1px 2px rgba(90, 40, 10, .3); }
/* winter: snow */
.fx-winter i::before { width: calc(var(--s) * .55px); height: calc(var(--s) * .55px); border-radius: 50%; background: #fff; box-shadow: 0 0 1px 1px rgba(90, 115, 150, .55), 0 0 8px rgba(120, 150, 190, .6); opacity: 1; animation-name: fx-flake; }
@keyframes fx-flake { from { transform: translateX(-10px); } to { transform: translateX(10px); } }
:root[data-season="monsoon"]:not([data-weather]) .cloud { fill: color-mix(in srgb, #7c8794 45%, var(--cloud)); }
:root[data-season="monsoon"]:not([data-weather]) .celestial .sun { filter: saturate(.5) brightness(.95); opacity: calc(var(--day) * .55); }
@media print { .season-fx { display: none; } }

/* Season and weather panel (opens from the season button) */
.wx-wrap { position: relative; flex: none; }
.season-btn { gap: 8px; }
.wx-temp { font-variant-numeric: tabular-nums; padding-left: 8px; border-left: 1px solid var(--line-strong); }
.wx-panel {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 70; width: 320px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow-lg); padding: 14px 16px 12px;
}
.wx-panel[hidden] { display: none; }
@media (max-width: 720px) { .wx-panel { position: fixed; left: 16px; right: 16px; top: 68px; width: auto; max-height: calc(100vh - 84px); overflow: auto; } }
.wx-h { margin: 4px 0 8px; font: 600 .74rem var(--font-body); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.wx-h--small { margin-top: 12px; }
.wx-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.wx-chips button {
  display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-strong); background: transparent; color: var(--ink-2); font: 500 .82rem var(--font-body);
}
.wx-chips button[hidden] { display: none; }
.wx-chips button .icon { width: 15px; height: 15px; }
.wx-chips button:hover { border-color: var(--brand); color: var(--brand-ink); }
.wx-chips button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.wx-now { margin: 0 0 8px; font-size: .9rem; color: var(--ink); }
.wx-exact { border: 0; background: none; padding: 0; color: var(--brand-ink); font: 600 .84rem var(--font-body); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.wx-credit { margin: 6px 0 0; font-size: .74rem; color: var(--ink-3); }
.wx-credit a { color: inherit; }

/* Weather on top of the season: greyer skies, a dimmer sun, haze, lightning. */
:root[data-weather="partly"]  { --wx-sky: #c4ccd6; --wx-k: 18%; }
:root[data-weather="cloudy"]  { --wx-sky: #8f99a6; --wx-k: 48%; }
:root[data-weather="fog"]     { --wx-sky: #c9cfd4; --wx-k: 60%; }
:root[data-weather="drizzle"] { --wx-sky: #8e98a4; --wx-k: 45%; }
:root[data-weather="rain"]    { --wx-sky: #747f8c; --wx-k: 55%; }
:root[data-weather="heavy"]   { --wx-sky: #5c6672; --wx-k: 65%; }
:root[data-weather="storm"]   { --wx-sky: #454d5a; --wx-k: 72%; }
:root[data-weather="snow"]    { --wx-sky: #d6dde6; --wx-k: 55%; }
:root[data-theme="dark"]:is([data-weather="cloudy"], [data-weather="drizzle"], [data-weather="rain"], [data-weather="heavy"], [data-weather="storm"]) { --wx-sky: #252b33; }
:root[data-theme="dark"][data-weather="fog"] { --wx-sky: #3a4048; --wx-k: 50%; }
:root:is([data-weather="cloudy"], [data-weather="fog"], [data-weather="drizzle"], [data-weather="rain"], [data-weather="heavy"], [data-weather="storm"], [data-weather="snow"]) .cloud { fill: color-mix(in srgb, #7c8794 50%, var(--cloud)); }
:root:is([data-weather="cloudy"], [data-weather="drizzle"], [data-weather="rain"], [data-weather="snow"]) .celestial .sun { opacity: calc(var(--day) * .45); filter: saturate(.5); }
:root:is([data-weather="fog"], [data-weather="heavy"], [data-weather="storm"]) .celestial .sun { opacity: calc(var(--day) * .2); filter: saturate(.3); }
:root[data-weather="heavy"] .fx-monsoon i::before, :root[data-weather="storm"] .fx-monsoon i::before { background: linear-gradient(transparent, rgba(60, 95, 150, .9)); }
:root[data-theme="dark"] .fx-monsoon i::before { background: linear-gradient(transparent, rgba(170, 195, 230, .55)); }

/* fog: soft drifting haze over the page */
:root[data-weather="fog"] .season-fx-haze, :root[data-weather="storm"] .season-fx-haze { display: block; }
.season-fx-haze { display: none; position: fixed; inset: 0; z-index: 36; pointer-events: none; }
:root[data-weather="fog"] .season-fx-haze {
  background: linear-gradient(transparent 20%, rgba(235, 238, 240, .3) 65%, rgba(235, 238, 240, .45)),
              radial-gradient(60% 30% at 30% 60%, rgba(255, 255, 255, .3), transparent),
              radial-gradient(50% 25% at 75% 45%, rgba(255, 255, 255, .28), transparent);
  background-size: 100% 100%, 200% 100%, 200% 100%;
  animation: fog-drift 40s ease-in-out infinite alternate;
}
:root[data-theme="dark"][data-weather="fog"] .season-fx-haze { opacity: .35; }
@keyframes fog-drift { to { background-position: 0 0, 100% 0, -100% 0; } }
/* storm: lightning flashes now and then */
:root[data-weather="storm"] .season-fx-haze { background: #f4f6ff; mix-blend-mode: overlay; opacity: 0; animation: lightning 9s infinite; }
@keyframes lightning { 0%, 61%, 63.5%, 65%, 100% { opacity: 0; } 62% { opacity: .85; } 64% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .season-fx-haze { animation: none !important; } :root[data-weather="storm"] .season-fx-haze { display: none; } }
