/* Day: the page's default look (Wuff 2026-11-15: "make day the default"). theme.js sets data-theme="light" on <html> unless
   the visitor chose Night. Same layout and pieces; only colour changes. Its colours are the app's Porch Light theme, the light set
   (porchlightLight in design/themes/porchlight.json and Kit.kt), since Wuff 2026-11-20: "Make Porchlight the default for the website."
   tools/sync_theme.js writes the block below and names each variable's slot. Words take the set's deep colours; fills that carry dark
   labels (tags, routine steps, the solid card) take the dark set's full-colour accents, so the labels on them read. */
:root[data-theme="light"] {
  color-scheme: light;
  /* theme:begin. Written by tools/sync_theme.js from design/themes/porchlight.json (Porch Light light; theme-source.txt names the app commit).
     Never edit by hand: change the theme in the app, then run the script. */
  --bg:                #cdeefc;   /* porchlightLight.bg */
  --bg-top:            #f6d9ca;   /* porchlightLight.bgTop */
  --bg-bottom:         #d3f4ff;   /* porchlightLight.bgBottom */
  --card:              #fafdfe;   /* porchlightLight.card */
  --surface:           #b6e5f8;   /* porchlightLight.surface */
  --ink:               #c0d9e3;   /* porchlightLight.ink (outlines) */
  --ink-dark:          #061116;   /* porchlightLight.inkDark */
  --text:              #012b39;   /* porchlightLight.text */
  --muted-text:        #3e606e;   /* porchlightLight.muted */
  --amber:             #de8550;   /* porchlightLight.amber (fills under a label: buttons, chips, the toggle) */
  --amber-line:        #b9642d;   /* porchlightLight amberLine #d47c47 (derive.js), stepped to 3:1 on the page and the card */
  --amber-text:        #b25d26;   /* porchlightLight textLift amber */
  --amber-text-ground: #9b4807;   /* porchlightLight textLift amber #b25d26, stepped to 4.5:1 on the box band and the page */
  --amber-tint:        #f5d8c9;   /* porchlightLight.amberTint */
  --longer:            #fbea7c;   /* porchlightLight.longer */
  --yellow:            #fbea7c;   /* porchlightLight.longer */
  --dim:               #a3d0e2;   /* porchlightLight dim (derive.js): the time-sense bars' track */
  --longer-bar:        #7d6f02;   /* porchlightLight textLift longer #847500, stepped to 3:1 on the dim track */
  --track-off:         #588191;   /* porchlightLight trackOff #8fbacb (derive.js), stepped to 3:1 on the page and the card */
  --green-text:        #3e6c1e;   /* porchlightLight.green (deep: for words) */
  --coral-text:        #b0292a;   /* porchlightLight.coral (deep: for words) */
  --blue-text:         #1d5b8e;   /* porchlightLight.blue (deep: for words) */
  --green:             #90cc43;   /* porchlightDark.green, as a fill */
  --coral:             #f16763;   /* porchlightDark.coral, as a fill */
  --blue:              #5fa6f1;   /* porchlightDark.blue, as a fill */
  --lilac:             #b7a6e0;   /* porchlightDark.lilac, as a fill */
  --tracks:            #bedfed;   /* porchlightLight tracks: the Wander pictures' tint (tools/wander_strips.js) */
  --price:             #fdd4be;   /* porchlightLight soft: the price band */
  --price-text:        #012b39;   /* porchlightLight softText */
  /* theme:end */
}

/* Ground: the day ground with the Wander tracks in their day colour (see body in style.css). */
[data-theme="light"] body {
  background:
    url("wander-day.webp") 0 calc(var(--wander, 0) * -1 * var(--sq)) / var(--sq) auto repeat-y,
    url("wander-day.webp") var(--sq) calc((var(--wander, 0) + 6) * -1 * var(--sq)) / var(--sq) auto repeat-y,
    linear-gradient(var(--bg-top), var(--bg) 45%, var(--bg-bottom)) fixed var(--bg);
}
[data-theme="light"] .top { --patch: none; }
[data-theme="light"] .hero__text { background: none; text-shadow: none; }
[data-theme="light"] .band--phone { background: color-mix(in srgb, var(--surface) 75%, transparent); border-color: var(--ink); }
[data-theme="light"] .band--box { background: color-mix(in srgb, var(--amber-tint) 65%, transparent); border-color: var(--ink); }
[data-theme="light"] .wrap--narrow .card,
[data-theme="light"] .sense-row .card { background: color-mix(in srgb, var(--card) 97%, transparent); }
[data-theme="light"] .card { border-color: var(--ink); }
[data-theme="light"] .zoom figure:hover > :is(img, svg),
[data-theme="light"] .zoom figure:focus > :is(img, svg) { box-shadow: 0 0 0 100vmax color-mix(in srgb, var(--text) 45%, transparent); }
[data-theme="light"] .qr img { background: #fff; border-color: var(--text); }
[data-theme="light"] .learn__line { background: color-mix(in srgb, var(--text) 18%, transparent); }

/* Bars in the time-sense card: the set's deep colours, which show on the pale track (tools/sync_theme.js measures them). */
[data-theme="light"] .sense__fill--took,
[data-theme="light"] .sense__fill--longer { background: var(--longer-bar); }
[data-theme="light"] .sense__fill--target { background: var(--green-text); }
[data-theme="light"] .sense__fill--shorter { background: var(--blue-text); }
/* Dark words on the quiet-words fill were 2.82:1; the card's pale colour reads on it (the set's onStatus). */
[data-theme="light"] .tag--reason { color: var(--card); }
/* The arrow buttons are dark by day too, so their arrows are pale (the day text colour on them was 1.33:1). */
[data-theme="light"] .carousel__btn { color: var(--card); }

/* Headings and labels the night page draws in a bright accent: deepened so they read on the pale cards. */
[data-theme="light"] .tool h3 { color: var(--text); }
[data-theme="light"] .tool--solid h3 { color: var(--ink-dark); }
[data-theme="light"] .phones__label,
[data-theme="light"] .routine__name { color: var(--green-text); }
[data-theme="light"] .beta .thanks__title { color: var(--amber-text); }
/* The wordmark's cream spots would vanish on the pale ground: a thin dark edge keeps every letter whole. */
[data-theme="light"] .lockup__word {
  filter: drop-shadow(1px 0 0 var(--text)) drop-shadow(-1px 0 0 var(--text)) drop-shadow(0 1px 0 var(--text)) drop-shadow(0 -1px 0 var(--text));
}

/* Lookout on the pale ground: his cream fur has no line on the side toward the light, so by day his chest and cheeks
   faded into the ground. A thin ink edge round him at half strength (Wuff 2026-11-16: "give me the day edge, but like 50%"). */
[data-theme="light"] .lockup__pup,
[data-theme="light"] img[src^="lookout"] {
  filter: drop-shadow(1px 0 0 color-mix(in srgb, var(--text) 50%, transparent)) drop-shadow(-1px 0 0 color-mix(in srgb, var(--text) 50%, transparent)) drop-shadow(0 1px 0 color-mix(in srgb, var(--text) 50%, transparent)) drop-shadow(0 -1px 0 color-mix(in srgb, var(--text) 50%, transparent));
}

/* The Day/Night button, top right, below the tape. */
.theme {
  position: fixed;
  top: calc(var(--tape, 0px) + 0.5rem);
  right: 1.25rem;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.5rem;
  padding: 0 0.875rem 0 0.75rem;
  border: 2px solid var(--ink-dark);
  border-radius: 999px;
  background: var(--amber);
  color: var(--ink-dark);
  font: 800 0.9375rem/1 "Barlow", system-ui, sans-serif;
  cursor: pointer;
}
.theme svg { width: 1.25rem; height: 1.25rem; flex: none; }
.theme:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }
@media (max-width: 40rem) {
  .theme { top: calc(var(--tape, 0px) + 0.375rem); right: 0.5rem; min-height: 2.25rem; padding: 0 0.625rem; }
}

/* Timers that learn: the "your plan" chip is filled with the text colour, which is dark by day, so its words go cream. */
[data-theme="light"] .learn__plan { color: var(--card); }
[data-theme="light"] .hero__call .thanks__title { color: var(--amber-text); }

/* Screenshots: day mode shows the day capture where one exists (tools/day_shots.js puts
   it beside the night one). Hidden copies are never fetched: both are loading="lazy". */
:is(.watches, .phones) img.shot--day { display: none; }
[data-theme="light"] :is(.watches, .phones) img.shot--day { display: block; }
[data-theme="light"] :is(.watches, .phones) img.shot--night { display: none; }

/* The drawn countdown follows the day watch captures: pale ground, soft track. These two are the captures' own colours, not a
   Porch Light slot (the captures' ground is #d8e9ef; the theme's watch.light.bg is #F3D6C7); tools/sync_theme.js DAY_WATCH. */
[data-theme="light"] .countdown__ground { fill: #dde8eb; }
[data-theme="light"] .countdown__track { stroke: #bccdd2; }
/* Amber as a mark was 2.71:1 on that pale track; the amber words colour for off-card use shows. */
[data-theme="light"] .countdown__ring { stroke: var(--amber-text-ground); }
