/*
  Longshadow: UV index and sun-safety app page (Screenery template)
  A 1970s supergraphic wall: flat painted grounds (cream, chocolate, mustard, deep teal, rust) and five-band stripes
  that run along section edges and turn corners in concentric curves. Caprasimo for the rounded display voice,
  Quattrocento Sans for everything you read. The planner chart is the same stripe bundle bent into a UV curve.

  Contents
   1. Tokens
   2. Base and browser surfaces
   3. The bend (concentric stripe corners)
   4. Buttons, fields, segmented controls
   5. Header
   6. Hero and the drawn phone
   7. Planner: controls, chart, readout, table, results
   8. Shadow rule
   9. Reminders
  10. UV scale
  11. Get the app
  12. Questions, footer
  13. Motion
  14. Narrow screens
*/

/* ---------- 1. Tokens ---------- */
:root {
  /* Palette: seven paint colours from a 1970s supergraphic wall */
  --chocolate: #3b2314;   /* text, the dark wall */
  --rust: #a93e17;        /* outer stripe, the FAQ wall */
  --tangerine: #e8762b;   /* middle stripe */
  --mustard: #e0a526;     /* inner stripe, the shadow wall, the "on" colour */
  --cream: #f5e6c8;       /* the light wall */
  --teal: #1f7a78;        /* the odd stripe out */
  --teal-deep: #0d4649;   /* the reminders wall */

  /* Derived tones */
  --cream-2: #efd9ae;                                              /* plaques and wells on cream */
  --choc-soft: color-mix(in srgb, var(--chocolate) 80%, var(--cream));   /* secondary text on cream (7:1) */
  --cream-soft: color-mix(in srgb, var(--cream) 80%, var(--chocolate));  /* secondary text on chocolate */
  --choc-lift: color-mix(in srgb, var(--cream) 9%, var(--chocolate));    /* raised areas on chocolate */
  --choc-rule: color-mix(in srgb, var(--cream) 24%, var(--chocolate));
  --rust-ink: #9a3713;                                             /* rust used as text on cream (5.6:1) */
  --teal-ink: #145f5d;                                             /* teal used as text on cream */

  /* Type */
  --display: "Caprasimo", "Cooper Black", Georgia, serif;
  --sans: "Quattrocento Sans", "Gill Sans", "Trebuchet MS", sans-serif;

  --fs-xs: 0.8125rem;   /* 13 */
  --fs-sm: 0.9375rem;   /* 15 */
  --fs-md: 1.0625rem;   /* 17, body */
  --fs-lg: 1.25rem;     /* 20 */
  --fs-xl: 1.625rem;    /* 26 */
  --fs-h3: 1.5rem;
  --fs-h2: clamp(2.2rem, 1.2rem + 3.2vw, 3.75rem);
  --fs-h1: clamp(2.9rem, 1rem + 5.6vw, 6rem);

  /* Space */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 72px;
  --s-9: 112px;
  --gutter: clamp(16px, 3.6vw, 56px);
  --wrap: 1280px;

  /* Shape: everything 1970s is rounded */
  --r-sm: 10px;
  --r-md: 18px;
  --r-lg: 28px;
  --r-pill: 999px;

  /* Stripes: width of one band, the gap to the wall, radius of the innermost turn */
  --w: clamp(9px, 2.3vw, 34px);
  --bend-gap: clamp(16px, 3vw, 44px);
  --bend-r: clamp(60px, 9vw, 150px);

  /* Depth: a soft offset shadow on the few things that sit on a wall */
  --lift: 0 2px 0 color-mix(in srgb, var(--chocolate) 22%, transparent), 0 18px 34px -18px color-mix(in srgb, var(--chocolate) 70%, transparent);

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 160ms;
  --t-mid: 360ms;
}

/* ---------- 2. Base and browser surfaces ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  scrollbar-color: var(--rust) var(--cream);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: var(--sans);
  font-size: var(--fs-md);
  line-height: 1.55;
  color: var(--chocolate);
  background: var(--cream);
  accent-color: var(--rust);
  caret-color: var(--rust);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

::selection { background: var(--mustard); color: var(--chocolate); }

h1, h2, h3, p, ul, ol, dl, dd, fieldset, legend, address, figure, table { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
address { font-style: normal; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
p { text-wrap: pretty; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; text-wrap: balance; line-height: 1.02; letter-spacing: -0.01em; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.1; }

a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 0.22em; }

:focus-visible {
  outline: 3px solid var(--focus, var(--teal));
  outline-offset: 3px;
  border-radius: var(--r-sm);
}
.planner, .reminders, .faq, .foot { --focus: var(--mustard); }

.icon {
  width: 16px; height: 16px;
  fill: none; stroke: currentColor; stroke-width: 1.75;
  stroke-linecap: round; stroke-linejoin: round;
  flex: none;
}
.defs { position: absolute; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.skip {
  position: absolute; left: var(--s-4); top: -80px; z-index: 60;
  padding: var(--s-3) var(--s-4); border-radius: var(--r-pill);
  background: var(--chocolate); color: var(--cream); font-weight: 700; text-decoration: none;
}
.skip:focus { top: var(--s-3); }

time, .tab, output { font-variant-numeric: tabular-nums; }

/* ---------- 3. The bend ----------
   One rounded box sits mostly off-canvas. Its five spread shadows are concentric rings, so the visible part is five
   bands that run along two edges of the section and turn the corner in parallel curves. --c1 is the innermost band. */
.bend {
  position: absolute; inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.bend i {
  position: absolute;
  border-radius: var(--bend-r);
  box-shadow:
    0 0 0 var(--w) var(--c1),
    0 0 0 calc(var(--w) * 2) var(--c2),
    0 0 0 calc(var(--w) * 3) var(--c3),
    0 0 0 calc(var(--w) * 4) var(--c4),
    0 0 0 calc(var(--w) * 5) var(--c5);
}
/* Offset from the section edge so all five bands show: five widths plus the gap to the wall edge */
.bend { --off: calc(var(--w) * 5 + var(--bend-gap)); }

/* Light walls */
.bend--hero, .bend--get { --c1: var(--teal); --c2: var(--mustard); --c3: var(--tangerine); --c4: var(--rust); --c5: var(--chocolate); }
/* Dark walls */
.bend--planner, .bend--foot { --c1: var(--cream); --c2: var(--mustard); --c3: var(--tangerine); --c4: var(--rust); --c5: var(--teal); }

/* Hero: bands along the bottom and up the right side, turning the bottom-right corner */
.bend--hero i { left: -300vw; top: -300vh; right: calc(var(--off) + var(--hero-right, 2vw)); bottom: var(--off); }
/* Planner: down the left side and along the bottom, turning the bottom-left corner */
.bend--planner { --w: clamp(6px, 1.25vw, 18px); }
.bend--planner i { left: var(--off); bottom: var(--off); top: -300vh; right: -300vw; }
/* Get: along the top and down the right, turning the top-right corner */
.bend--get { --w: clamp(7px, 1.4vw, 20px); }
.bend--get i { top: var(--off); right: var(--off); left: -300vw; bottom: -300vh; }
/* Footer: along the top and down the left */
.bend--foot { --w: clamp(6px, 1vw, 14px); --bend-gap: clamp(14px, 2vw, 28px); }
.bend--foot i { top: var(--off); left: var(--off); right: -300vw; bottom: -300vh; }

/* ---------- 4. Buttons, fields, segmented controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 48px; padding: 0 var(--s-5);
  border: 2px solid transparent; border-radius: var(--r-pill);
  font-weight: 700; font-size: var(--fs-md); text-decoration: none; white-space: nowrap;
  transition: background var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out);
}
.btn:active { transform: translateY(1px); }
.btn--choc { background: var(--chocolate); color: var(--cream); }
.btn--choc:hover { background: var(--rust-ink); }
.btn--sun { background: var(--mustard); color: var(--chocolate); }
.btn--sun:hover { background: var(--cream); }
.btn--line { border-color: currentColor; color: var(--chocolate); background: transparent; }
.btn--line:hover { background: var(--chocolate); color: var(--cream); }
.btn--wide { width: 100%; }
.btn .icon { width: 18px; height: 18px; }
.btn[disabled] { cursor: progress; opacity: 0.85; }

.field-set legend, .field > label, .field legend {
  display: block; margin-bottom: var(--s-2);
  font-weight: 700; font-size: var(--fs-sm); letter-spacing: 0.02em;
}

/* Segmented control: real radios, painted as a rounded pill strip */
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label { position: relative; flex: 1 1 auto; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 var(--s-4);
  border: 2px solid var(--seg-line, var(--choc-rule)); border-radius: var(--r-pill);
  font-weight: 700; font-size: var(--fs-sm); white-space: nowrap;
  transition: background var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out);
}
.seg label:hover span { border-color: var(--mustard); }
.seg input:checked + span { background: var(--mustard); border-color: var(--mustard); color: var(--chocolate); }
.seg input:focus-visible + span { outline: 3px solid var(--focus, var(--teal)); outline-offset: 2px; }
.seg--sm span { min-height: 44px; padding: 0 var(--s-3); }

/* ---------- 5. Header ---------- */
.top {
  position: sticky; top: 0; z-index: 40;
  background: var(--chocolate); color: var(--cream);
}
.top__in {
  max-width: var(--wrap); margin: 0 auto; padding: 10px var(--gutter);
  display: flex; align-items: center; gap: var(--s-5);
}
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-size: 1.5rem; line-height: 1; }
.logo__mark { width: 34px; height: 34px; }
.nav { display: flex; gap: var(--s-5); margin-left: auto; }
.nav a { font-weight: 700; font-size: var(--fs-sm); text-decoration: none; padding: 10px 0; }
.nav a:hover { text-decoration: underline; text-decoration-color: var(--mustard); }
.top__cta { min-height: 42px; }

/* ---------- 6. Hero ---------- */
.hero {
  position: relative; isolation: isolate;
  background: var(--cream);
  min-height: min(calc(100svh - 62px), 900px);
  display: flex;
}
.hero__in {
  position: relative; z-index: 1;
  width: 100%; max-width: var(--wrap); margin: 0 auto;
  padding: clamp(40px, 7vh, 96px) var(--gutter) calc(var(--w) * 5 + var(--bend-gap) + clamp(36px, 6vh, 72px));
  padding-right: calc(var(--w) * 5 + var(--bend-gap) + 2vw + var(--s-6));
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(250px, 0.65fr); gap: clamp(24px, 4vw, 64px);
  align-items: center;
}
.hero h1 { font-size: var(--fs-h1); max-width: 11ch; }
.hero__lede { margin-top: var(--s-5); max-width: 52ch; font-size: var(--fs-lg); color: var(--choc-soft); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-6); }
.hero__note { margin-top: var(--s-4); font-size: var(--fs-sm); color: var(--choc-soft); }

/* The drawn phone */
.phone { justify-self: center; width: min(100%, 290px); }
.phone__body {
  position: relative;
  aspect-ratio: 9 / 18.5;
  padding: 12px;
  border-radius: 46px;
  background: var(--chocolate);
  box-shadow: var(--lift), inset 0 0 0 2px var(--choc-lift);
}
.phone__notch { position: absolute; top: 20px; left: 50%; width: 76px; height: 20px; translate: -50% 0; border-radius: var(--r-pill); background: var(--chocolate); z-index: 2; }
.phone__screen {
  height: 100%; border-radius: 36px; overflow: hidden;
  padding: 52px 20px 20px;
  display: flex; flex-direction: column;
  background: var(--teal-deep); color: var(--cream);
}
.ph__place { display: flex; align-items: center; gap: 6px; font-weight: 700; }
.ph__date { font-size: var(--fs-xs); color: var(--cream); }
.ph__big { margin-top: 26px; font-family: var(--display); font-size: 4.6rem; line-height: 0.9; display: flex; align-items: baseline; gap: 8px; }
.ph__big small { font-family: var(--sans); font-size: var(--fs-sm); font-weight: 700; }
.ph__cat { font-weight: 700; color: var(--mustard); }
.ph__curve { width: 100%; height: 72px; margin: auto 0 var(--s-2); overflow: visible; }
.ph__hours { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-bottom: var(--s-3); text-align: center; }
.ph__hours li { padding: 6px 4px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--cream) 10%, var(--teal-deep)); line-height: 1.15; }
.ph__hours span { display: block; font-size: 11px; font-weight: 700; color: var(--cream); }
.ph__hours b { font-family: var(--display); font-weight: 400; font-size: 1.1rem; }
.ph__curve path { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.ph__curve .b1 { stroke: var(--rust); stroke-width: 15; }
.ph__curve .b2 { stroke: var(--tangerine); stroke-width: 10; }
.ph__curve .b3 { stroke: var(--mustard); stroke-width: 5; }
.ph__window { font-size: var(--fs-sm); font-weight: 700; }
.ph__next { display: flex; gap: 6px; align-items: center; margin-top: var(--s-2); padding: 10px 12px; border-radius: var(--r-md); background: color-mix(in srgb, var(--cream) 12%, var(--teal-deep)); font-size: var(--fs-xs); font-weight: 700; }

/* ---------- 7. Planner ---------- */
.planner {
  position: relative; isolation: isolate;
  background: var(--chocolate); color: var(--cream);
}
.planner__in {
  position: relative; z-index: 1;
  max-width: calc(var(--wrap) + 120px); margin: 0 auto;
  padding: var(--s-9) var(--gutter) calc(var(--w-p) * 5 + var(--bend-gap) + var(--s-8));
  padding-left: calc(var(--w-p) * 5 + var(--bend-gap) + var(--s-6));
  --w-p: clamp(6px, 1.25vw, 18px);
}
.planner__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-6); align-items: end; }
.planner__head p { color: var(--cream-soft); max-width: 60ch; }
.planner__grid {
  margin-top: var(--s-7);
  display: grid; grid-template-columns: minmax(300px, 0.8fr) minmax(0, 2fr); gap: var(--s-5) var(--s-6);
  grid-template-areas: "ctl chart" "ctl res";
  align-items: start;
}
.controls { grid-area: ctl; }
.chart { grid-area: chart; }
.results { grid-area: res; }
.controls { display: grid; gap: var(--s-5); --seg-line: var(--choc-rule); }

.places { display: flex; flex-wrap: wrap; gap: 6px; }
.place { position: relative; }
.place input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.place span {
  display: flex; flex-direction: column; justify-content: center;
  min-height: 52px; padding: 6px 14px;
  border: 2px solid var(--choc-rule); border-radius: var(--r-md);
  line-height: 1.2;
  transition: background var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out);
}
.place b { font-weight: 700; }
.place small { font-size: var(--fs-xs); color: var(--cream-soft); }
.place:hover span { border-color: var(--mustard); }
.place input:checked + span { background: var(--mustard); border-color: var(--mustard); color: var(--chocolate); }
.place input:checked + span small { color: var(--chocolate); }
.place input:focus-visible + span { outline: 3px solid var(--mustard); outline-offset: 2px; }
.noscript { color: var(--cream-soft); font-size: var(--fs-sm); }

.skins { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.skin { position: relative; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 10px 6px 6px; border: 2px solid var(--choc-rule); border-radius: var(--r-md); cursor: pointer; transition: border-color var(--t-fast) var(--ease-out), background var(--t-fast) var(--ease-out); }
.skin input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.skin__n { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--choc-lift); font-family: var(--display); font-size: 1.05rem; }
.skin__t { font-size: var(--fs-xs); line-height: 1.25; font-weight: 700; }
.skin:hover { border-color: var(--mustard); }
.skin:has(input:checked) { background: var(--mustard); border-color: var(--mustard); color: var(--chocolate); }
.skin:has(input:checked) .skin__n { background: var(--chocolate); color: var(--mustard); }
.skin:has(input:focus-visible) { outline: 3px solid var(--mustard); outline-offset: 2px; }

.twin { display: grid; gap: var(--s-5); }
.seg--wear span { padding: 0 var(--s-3); }

/* Chart plaque */
.chart {
  background: var(--cream); color: var(--chocolate);
  border-radius: var(--r-lg);
  padding: var(--s-5) var(--s-5) var(--s-4);
  box-shadow: var(--lift);
}
.chart__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-2) var(--s-5); align-items: baseline; }
.chart__title { font-size: var(--fs-md); }
.chart__title strong { font-family: var(--display); font-weight: 400; font-size: var(--fs-xl); margin-right: var(--s-2); }
.chart__title span { color: var(--choc-soft); font-size: var(--fs-sm); white-space: nowrap; }
.chart__peak { font-weight: 700; }
.chart__peak strong { font-family: var(--display); font-weight: 400; font-size: var(--fs-xl); color: var(--rust-ink); }

.chart__plot { margin-top: var(--s-3); border-radius: var(--r-md); cursor: crosshair; touch-action: pan-y; --focus: var(--teal); }
#chart { display: block; width: 100%; height: auto; overflow: visible; }
.band { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.band--1 { stroke: var(--rust); stroke-width: 34; }
.band--2 { stroke: var(--tangerine); stroke-width: 25; }
.band--3 { stroke: var(--mustard); stroke-width: 16; }
.band--4 { stroke: var(--teal-deep); stroke-width: 5; }
.ch-grid line { stroke: var(--cream-2); stroke-width: 2; }
.ch-grid line.lvl { stroke: color-mix(in srgb, var(--chocolate) 18%, var(--cream)); stroke-dasharray: 2 8; stroke-linecap: round; }
.ch-grid text, .ch-axis text { fill: var(--choc-soft); font: 700 var(--fs, 14px) var(--sans); }
.ch-grid text.lvl { fill: var(--choc-soft); font-weight: 400; }
.ch-care rect.care { fill: color-mix(in srgb, var(--teal) 16%, var(--cream)); }
.ch-care rect.edge { fill: color-mix(in srgb, var(--mustard) 20%, var(--cream)); }
.ch-care text { fill: var(--teal-ink); font: 700 var(--fs, 14px) var(--sans); }
.ch-care text.edge-t { fill: var(--choc-soft); }
.ch-care line { stroke: var(--teal); stroke-width: 2; stroke-dasharray: 6 6; }
.ch-read line { stroke: var(--chocolate); stroke-width: 2; }
.ch-read circle { fill: var(--cream); stroke: var(--chocolate); }
.ch-night { fill: color-mix(in srgb, var(--chocolate) 7%, var(--cream)); }

.readout {
  display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: var(--s-2) var(--s-5); align-items: baseline;
  margin-top: var(--s-3); padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md); background: var(--cream-2);
}
.readout__time { font-family: var(--display); font-size: var(--fs-xl); font-variant-numeric: tabular-nums; }
.readout__uv { font-weight: 700; white-space: nowrap; }
.readout__uv strong { font-family: var(--display); font-weight: 400; font-size: var(--fs-xl); color: var(--rust-ink); }
.readout__say { font-size: var(--fs-sm); color: var(--choc-soft); }

.table-alt { margin-top: var(--s-3); }
.table-alt summary { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px; cursor: pointer; font-weight: 700; font-size: var(--fs-sm); color: var(--teal-ink); list-style: none; }
.table-alt summary::-webkit-details-marker { display: none; }
.table-alt summary:hover { text-decoration: underline; }
.table-wrap { max-height: 320px; overflow: auto; border-radius: var(--r-md); border: 2px solid var(--cream-2); }
.table-alt table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.table-alt th, .table-alt td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--cream-2); }
.table-alt thead th { position: sticky; top: 0; background: var(--cream-2); }
.table-alt tr.is-care td { background: color-mix(in srgb, var(--teal) 10%, var(--cream)); }

/* Results: a big window, a schedule list, an SPF label with teaspoons */
.results {
  display: grid; grid-template-columns: 0.95fr 1.05fr 1.1fr; gap: var(--s-4);
}
.res { padding: var(--s-5) var(--s-4) var(--s-5) var(--s-5); border-radius: var(--r-lg); }
.res h3 { font-size: var(--fs-lg); }
.res__text { margin-top: var(--s-3); font-size: var(--fs-sm); }
.res__foot { margin-top: var(--s-3); font-size: var(--fs-xs); }

.res--window { background: var(--mustard); color: var(--chocolate); }
.res__big { margin-top: var(--s-3); font-family: var(--display); font-size: clamp(1.9rem, 1.2rem + 1.2vw, 2.4rem); line-height: 1; font-variant-numeric: tabular-nums; }
.res--window.is-none .res__big { font-size: clamp(1.6rem, 1.2rem + 1vw, 2.1rem); }

.res--schedule { border: 2px solid var(--choc-rule); }
.res--schedule .res__foot { color: var(--cream-soft); }
.sched { margin-top: var(--s-4); display: grid; gap: 0; }
.sched li { position: relative; display: grid; grid-template-columns: 52px 1fr; gap: var(--s-3); padding: 8px 0 8px 0; font-size: var(--fs-sm); border-top: 1px solid var(--choc-rule); }
.sched li:first-child { border-top: 0; }
.sched time { font-weight: 700; color: var(--mustard); }
.sched .is-empty { grid-template-columns: 1fr; color: var(--cream-soft); }

.res--spf { background: var(--cream); color: var(--chocolate); }
.spf { margin-top: var(--s-3); display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.spf__n { font-family: var(--display); font-size: clamp(1.9rem, 1.2rem + 1.2vw, 2.4rem); line-height: 1; color: var(--rust-ink); }
.spf__t { font-size: var(--fs-sm); font-weight: 700; }
.spoons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--s-3); min-height: 32px; }
.spoons svg { width: 16px; height: 32px; fill: var(--tangerine); stroke: var(--chocolate); stroke-width: 1.75; stroke-linecap: round; }
.spoons svg.half { clip-path: inset(0 50% 0 0); }

.careful { max-width: 78ch; font-size: var(--fs-xs); line-height: 1.5; color: var(--cream-soft); }

/* ---------- 8. Shadow rule ---------- */
.shadow { position: relative; background: var(--mustard); color: var(--chocolate); }
.shadow__in {
  max-width: var(--wrap); margin: 0 auto; padding: var(--s-9) var(--gutter);
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 80px); align-items: center;
}
.shadow__copy > p { margin-top: var(--s-4); max-width: 56ch; }
.hour { display: flex; justify-content: space-between; align-items: baseline; margin-top: var(--s-6); font-weight: 700; }
.hour output { font-family: var(--display); font-size: var(--fs-xl); font-weight: 400; }
#hour { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; margin-top: var(--s-2); background: transparent; cursor: pointer; }
#hour::-webkit-slider-runnable-track { height: 12px; border-radius: var(--r-pill); background: var(--chocolate); }
#hour::-moz-range-track { height: 12px; border-radius: var(--r-pill); background: var(--chocolate); }
#hour::-webkit-slider-thumb { -webkit-appearance: none; width: 32px; height: 32px; margin-top: -10px; border-radius: 50%; background: var(--cream); border: 5px solid var(--rust); }
#hour::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--cream); border: 5px solid var(--rust); }
#hour:focus-visible { outline: 3px solid var(--chocolate); outline-offset: 4px; }
.shadow__say { margin-top: var(--s-3); font-weight: 700; min-height: 3em; }

.scene { width: 100%; height: auto; border-radius: var(--r-lg); background: var(--cream); box-shadow: var(--lift); }
.scene__sky path { fill: var(--cream); }
.scene__rays path { fill: none; stroke-linecap: round; }
.scene__sun { fill: var(--tangerine); stroke: var(--rust); stroke-width: 8; }
.scene__ground { fill: var(--tangerine); }
.scene__shadow { fill: var(--chocolate); }
.scene__fig { fill: var(--chocolate); }
.scene__label { fill: var(--chocolate); font: 700 17px var(--sans); }
.scene.is-night .scene__sky path { fill: color-mix(in srgb, var(--teal-deep) 30%, var(--cream)); }

/* ---------- 9. Reminders ---------- */
.reminders { background: var(--teal-deep); color: var(--cream); }
.reminders__in {
  max-width: var(--wrap); margin: 0 auto; padding: var(--s-9) var(--gutter);
  display: grid; grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1.25fr); gap: clamp(28px, 6vw, 96px); align-items: center;
}
.lock { justify-self: center; width: min(100%, 340px); }
.lock__body {
  padding: 56px 16px 28px; border-radius: 46px;
  background: var(--chocolate);
  box-shadow: inset 0 0 0 12px var(--chocolate), inset 0 0 0 14px var(--choc-lift), 0 24px 40px -22px rgb(0 0 0 / 0.6);
  text-align: center;
}
.lock__time { font-family: var(--display); font-size: 4rem; line-height: 1; color: var(--mustard); }
.lock__date { font-size: var(--fs-sm); font-weight: 700; color: var(--cream-soft); margin-bottom: var(--s-5); }
.notes { display: grid; gap: 8px; text-align: left; }
.note { padding: 10px 14px 12px; border-radius: var(--r-md); background: var(--cream); color: var(--chocolate); font-size: var(--fs-sm); line-height: 1.35; }
.note__app { display: block; font-size: var(--fs-xs); font-weight: 700; color: var(--choc-soft); margin-bottom: 2px; }
.note strong { display: block; }
.note--done { background: var(--mustard); }
.note--done .note__app { color: var(--chocolate); }
.reminders__copy > p { margin-top: var(--s-4); max-width: 60ch; color: color-mix(in srgb, var(--cream) 88%, var(--teal-deep)); font-size: var(--fs-lg); }
.rules { margin-top: var(--s-6); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5) var(--s-6); }
.rules div { padding-top: var(--s-3); border-top: 4px solid var(--mustard); }
.rules div:nth-child(2) { border-color: var(--tangerine); }
.rules div:nth-child(3) { border-color: var(--rust); }
.rules div:nth-child(4) { border-color: var(--teal); }
.rules dt { font-family: var(--display); font-size: var(--fs-xl); line-height: 1.1; }
.rules dd { margin-top: var(--s-2); color: color-mix(in srgb, var(--cream) 88%, var(--teal-deep)); }

/* ---------- 10. UV scale: a stepped band ---------- */
.scale { background: var(--cream); }
.scale__in { max-width: var(--wrap); margin: 0 auto; padding: var(--s-9) var(--gutter); }
.scale__lede { margin-top: var(--s-4); max-width: 62ch; font-size: var(--fs-lg); color: var(--choc-soft); }
.steps {
  margin-top: var(--s-7);
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: end; gap: 0;
}
.step {
  display: flex; flex-direction: column;
  padding: var(--s-5) var(--s-4) var(--s-5);
  min-height: calc(220px + var(--i) * 52px);
}
.step:first-child { border-radius: var(--r-lg) 0 0 var(--r-lg); }
.step:last-child { border-radius: 0 var(--r-lg) var(--r-lg) 0; border-top-right-radius: var(--bend-r); }
.step__n { font-weight: 700; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.step h3 { margin-top: var(--s-1); font-size: var(--fs-xl); }
.step p:last-child { margin-top: auto; padding-top: var(--s-4); font-size: var(--fs-sm); }
.step--1 { --i: 0; background: var(--teal-deep); color: var(--cream); }
.step--2 { --i: 1; background: var(--mustard); color: var(--chocolate); }
.step--3 { --i: 2; background: var(--tangerine); color: var(--chocolate); }
.step--4 { --i: 3; background: var(--rust); color: var(--cream); }
.step--5 { --i: 4; background: var(--chocolate); color: var(--cream); }
.scale__foot { margin-top: var(--s-5); max-width: 70ch; font-size: var(--fs-sm); color: var(--choc-soft); }

/* ---------- 11. Get the app ---------- */
.get { position: relative; isolation: isolate; background: var(--cream-2); }
.get__in {
  position: relative; z-index: 1;
  max-width: var(--wrap); margin: 0 auto;
  padding: calc(var(--w-g) * 5 + var(--bend-gap) + var(--s-8)) calc(var(--w-g) * 5 + var(--bend-gap) + var(--s-6)) var(--s-9) var(--gutter);
  --w-g: clamp(7px, 1.4vw, 20px);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr); gap: clamp(28px, 5vw, 80px); align-items: start;
}
.get__copy > p { margin-top: var(--s-4); max-width: 56ch; color: var(--choc-soft); }
.facts { margin-top: var(--s-5); display: grid; gap: var(--s-2); }
.facts li { display: flex; gap: var(--s-2); align-items: center; font-weight: 700; }
.facts .icon { color: var(--teal-ink); width: 18px; height: 18px; }

.signup {
  background: var(--cream); border-radius: var(--r-lg); padding: var(--s-6);
  box-shadow: var(--lift); --seg-line: color-mix(in srgb, var(--chocolate) 30%, var(--cream));
}
.signup__body { display: grid; gap: var(--s-5); }
.field input, .select select {
  width: 100%; min-height: 50px; padding: 0 var(--s-4);
  border: 2px solid color-mix(in srgb, var(--chocolate) 45%, var(--cream)); border-radius: var(--r-pill);
  background: #fffaf0; color: var(--chocolate);
  font-size: var(--fs-md);
}
.field input::placeholder { color: color-mix(in srgb, var(--chocolate) 62%, var(--cream)); }
.field input:focus-visible, .select select:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.field.is-bad input { border-color: var(--rust-ink); background: color-mix(in srgb, var(--rust) 7%, #fffaf0); }
.field.is-bad .seg span { border-color: var(--rust-ink); }
.select { position: relative; }
.select select { appearance: none; padding-right: 44px; cursor: pointer; }
.select .icon { position: absolute; right: 18px; top: 50%; translate: 0 -50%; pointer-events: none; }
.err { min-height: 0; margin-top: 6px; font-size: var(--fs-sm); font-weight: 700; color: var(--rust-ink); }
.err:empty { display: none; }
.signup__small { font-size: var(--fs-xs); color: var(--choc-soft); }
.seg--sm label { flex: 1 1 0; }
.seg--sm span { color: var(--chocolate); }

.spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 3px solid color-mix(in srgb, var(--cream) 35%, transparent); border-top-color: var(--mustard); }
.is-loading .spinner { display: inline-block; animation: spin 0.8s linear infinite; }

.state { display: grid; gap: var(--s-4); justify-items: start; }
.state[hidden] { display: none; }
.state h3 { display: flex; gap: var(--s-2); align-items: center; font-size: var(--fs-xl); }
.state h3 .icon { width: 24px; height: 24px; color: var(--rust-ink); }
.state__mark { width: 72px; height: 72px; }
.state--err { padding: var(--s-4); border-radius: var(--r-md); background: color-mix(in srgb, var(--rust) 10%, var(--cream)); border: 2px solid var(--rust-ink); }
.state__row { display: flex; flex-wrap: wrap; gap: var(--s-3); }

/* ---------- 12. Questions, footer ---------- */
.faq { background: var(--rust); color: var(--cream); }
.faq__in { max-width: var(--wrap); margin: 0 auto; padding: var(--s-9) var(--gutter); display: grid; grid-template-columns: minmax(0, 0.6fr) minmax(0, 1.4fr); gap: var(--s-6); }
.faq__list { display: grid; }
.faq details { border-top: 2px solid color-mix(in srgb, var(--cream) 40%, var(--rust)); }
.faq details:last-child { border-bottom: 2px solid color-mix(in srgb, var(--cream) 40%, var(--rust)); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); min-height: 60px; padding: var(--s-3) 0; cursor: pointer; font-weight: 700; font-size: var(--fs-lg); list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { width: 22px; height: 22px; transition: rotate var(--t-mid) var(--ease-out); }
.faq details[open] summary .icon { rotate: 45deg; }
.faq details p { padding: 0 0 var(--s-5); max-width: 64ch; }

.foot { position: relative; isolation: isolate; background: var(--chocolate); color: var(--cream); }
.foot__in {
  position: relative; z-index: 1; max-width: var(--wrap); margin: 0 auto;
  --w-f: clamp(6px, 1vw, 14px);
  padding: calc(var(--w-f) * 5 + clamp(14px, 2vw, 28px) + var(--s-7)) var(--gutter) var(--s-7) calc(var(--w-f) * 5 + clamp(14px, 2vw, 28px) + var(--s-6));
  display: grid; grid-template-columns: auto 1fr auto; gap: var(--s-5) var(--s-7); align-items: start;
}
.foot__brand { font-family: var(--display); font-size: var(--fs-xl); line-height: 1; }
.foot address { color: var(--cream-soft); font-size: var(--fs-sm); }
.foot__nav { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); font-weight: 700; font-size: var(--fs-sm); }
.foot__nav a { padding: 6px 0; }
.foot__small { grid-column: 1 / -1; max-width: 80ch; font-size: var(--fs-xs); color: var(--cream-soft); }

/* ---------- 13. Motion ----------
   Signature: the hero stripes are rolled onto the wall from left to right, like a painter's roller, once.
   The planner curve bends from one day to the next in script.js. Both are off under reduced motion. */
@keyframes spin { to { rotate: 1turn; } }
@keyframes roll { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes rise { from { translate: 0 18px; } to { translate: 0 0; } }
@media (prefers-reduced-motion: no-preference) {
  .bend--hero { animation: roll 1.5s var(--ease-out) 0.1s both; }
  .phone { animation: rise 1.1s var(--ease-out) 0.3s both; }
  @supports (animation-timeline: view()) {
    .step { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 60%; }
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; }
}

/* ---------- 14. Narrow screens ---------- */
@media (max-width: 1100px) {
  .nav { display: none; }
  .top__cta { margin-left: auto; }
  .planner__grid { grid-template-columns: 1fr; grid-template-areas: "ctl" "chart" "res"; }
  .controls { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-5) var(--s-6); }
  .controls > .field-set:first-child { grid-column: 1 / -1; }
  .results { grid-template-columns: 1fr 1fr; }
  .res--spf { grid-column: 1 / -1; }
  .get__in { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .hero__in { grid-template-columns: 1fr; }
  .phone { width: min(76vw, 260px); }
  .planner__head { grid-template-columns: 1fr; gap: var(--s-4); }
  .shadow__in, .reminders__in, .faq__in { grid-template-columns: 1fr; }
  .reminders__copy { order: -1; }
  .steps { grid-template-columns: 1fr; gap: 0; }
  .step { min-height: 0; padding: var(--s-4) var(--s-5); display: grid; grid-template-columns: 7.5em 1fr; column-gap: var(--s-4); }
  .step__n { grid-column: 1; grid-row: 1; align-self: center; }
  .step h3 { grid-column: 1; grid-row: 2; margin: 0; }
  .step p:last-child { grid-column: 2; grid-row: 1 / span 2; margin: 0; padding: 0; align-self: center; }
  .step:first-child { border-radius: var(--r-lg) var(--r-lg) 0 0; }
  .step:last-child { border-radius: 0 0 var(--r-lg) var(--r-lg); }
  .step { margin-right: calc((4 - var(--i)) * 14px); }
  @media (prefers-reduced-motion: no-preference) { .step { animation: none; } }
  .foot__in { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  :root { --fs-md: 1.0625rem; --fs-lg: 1.125rem; }
  .bend--hero { --hero-right: 0px; }
  .hero__in { padding-top: var(--s-6); }
  .hero__actions .btn { flex: 1 1 100%; }
  .top__in { gap: var(--s-3); }
  .logo { font-size: 1.3rem; }
  .top__cta { padding: 0 var(--s-4); }
  .controls { grid-template-columns: 1fr; }
  .places { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skins { grid-template-columns: 1fr 1fr; }
  .chart { padding: var(--s-4) var(--s-3) var(--s-3); border-radius: var(--r-md); }
  .readout { grid-template-columns: auto 1fr; }
  .readout__say { grid-column: 1 / -1; }
  .results { grid-template-columns: 1fr; }
  .rules { grid-template-columns: 1fr; }
  .signup { padding: var(--s-5) var(--s-4); }
  .step { grid-template-columns: 6.4em 1fr; padding: var(--s-4); }
  .step { margin-right: calc((4 - var(--i)) * 8px); }
}

/* Phones: the scale steps stack their text, the scene label and the planner margins scale with the drawing */
@media (max-width: 600px) {
  .step { display: block; }
  .step h3 { margin: 2px 0 6px; }
  .step p:last-child { padding: 0; }
  .scene__label { font-size: 28px; }
  .planner__in { padding-left: calc(var(--w-p) * 5 + var(--bend-gap) + 14px); padding-right: 16px; }
}
.signup__body[hidden] { display: none; }
.state:focus { outline: none; }
.res--schedule.is-none .res__foot { display: none; }
