/* DukaSafi. One token source: every colour is a light-dark() pair below, generated by tools/brand/derive_palette.py
   from six Crown Paints Kenya shades: Real Teal AP161-5 #07727E, Paradise Waters AP71-4 #00AF9D, Coronette Orange
   AP153-5 #ED902A, Tempest Sea AP171-4 #3C5B60, Soothing Blue AP11-2 #E9F2EE, Cotillion Red AP156-2 #BD413C (errors
   only). Other values are screen-only mixes of those shades. WCAG contrast checked by the script 2026-11-23
   (0 failures). Fonts: Gabarito (display) and Onest (text), both SIL OFL, self-hosted, Latin subset. */
@font-face { font-family: "Gabarito"; src: url("/assets/fonts/gabarito.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Onest"; src: url("/assets/fonts/onest.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: light dark;
  --ground: light-dark(#E9F2EE, #070F11);      /* Soothing Blue / Tempest Sea night */
  --surface: light-dark(#F8FBFA, #101C1E);
  --ink: light-dark(#0B1517, #E4F0EB);
  --muted: light-dark(#2A4145, #B2C2C1);
  --heading: light-dark(#07727E, #00AF9D);
  --logo-ink: light-dark(#19292C, #E9F2EE);    /* "duka" in the wordmark */
  --logo-safi: light-dark(#07727E, #00AF9D);   /* "safi" in the wordmark */
  --line: light-dark(#607A7D, #758D8F);        /* control borders, 3:1+ */
  --hair: light-dark(#D1DDDA, #1C2E31);        /* decorative borders */
  --action: light-dark(#07727E, #00AF9D);
  --on-action: light-dark(#F8FBFA, #070F11);
  --focus: light-dark(#07727E, #00AF9D);
  --halo: light-dark(#ED902A, #070F11);
  --accent: #ED902A;
  --fresh: #00AF9D;
  --band: light-dark(#3C5B60, #17272A);
  --tag: light-dark(#FDEAD9, #2E261C);
  --tag-ink: light-dark(#0B1517, #EBE7D9);
  --tag-muted: light-dark(#283F43, #EECEAC);
  --price: light-dark(#693D0D, #ED902A);
  --selected: light-dark(#D9EFEB, #0F383E);
  --notice-bg: light-dark(#E1F2EF, #0E2A29); --notice-ink: light-dark(#19292C, #B2DFD7);
  --error-bg: light-dark(#FAE9E6, #2C1C1B); --error-ink: light-dark(#5D1C19, #ECB8B2);
  --danger: light-dark(#9F3531, #E19991);
  --foot-bg: light-dark(#3C5B60, #030607); --foot-ink: #E2ECE8; --foot-muted: #CFDBD9; --foot-line: #A0B3B3;
  --on-accent: #081113;
  --art-a: light-dark(#07727E, #00AF9D);
  --art-b: light-dark(#A8DBD2, #0F4C55);
  --shade: light-dark(rgb(60 91 96 / 0.10), rgb(0 0 0 / 0.45));
  --shade-deep: light-dark(rgb(60 91 96 / 0.28), rgb(0 0 0 / 0.70));
  --shadow: 0 1px 2px var(--shade), 0 12px 32px -14px var(--shade-deep);
  --shadow-lift: 0 2px 4px var(--shade), 0 28px 56px -18px var(--shade-deep);
  --display: "Gabarito", system-ui, sans-serif;
  --text: "Onest", system-ui, sans-serif;
  --gutter: max(clamp(1rem, 3.5vw, 1.5rem), env(safe-area-inset-left), env(safe-area-inset-right));
  --tabbar: 4.5rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; scroll-padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 1rem); }
@media (min-width: 56rem) { html { scroll-padding-bottom: 0; } }
body {
  margin: 0; min-height: 100dvh; display: flex; flex-direction: column;
  background: var(--ground); color: var(--ink);
  font: 400 clamp(1rem, 0.95rem + 0.25vw, 1.125rem)/1.55 var(--text);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overflow-wrap: break-word;
  overscroll-behavior-y: none;
  padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom));
}
.join > *, .field > *, .card > *, .prose > *, .faq > *, .cards li > *, .how li > * { min-width: 0; }
h1, h2 { font-family: var(--display); line-height: 1.04; margin: 0; letter-spacing: -0.015em; color: var(--heading); text-wrap: balance; overflow-wrap: break-word; }
h3 { font: 700 1.125rem/1.25 var(--display); margin: 0; color: var(--heading); text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 6px var(--halo); border-radius: 6px; }
main:focus { outline: none; }
.nb { white-space: nowrap; }
.skip { position: absolute; left: 0.5rem; top: 0.5rem; transform: translateY(calc(-100% - 1rem)); z-index: 30; padding: 0.75rem 1rem; border-radius: 0.75rem; background: var(--action); color: var(--on-action); font-weight: 700; }
.skip:focus { transform: none; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Signature: the 24-hour dial, unrolled. A tall mango tick every "hour", fine mint minutes, on the deep shelf band. */
.dial {
  height: 18px; flex: none;
  background:
    linear-gradient(90deg, var(--accent) 0 3px, transparent 3px) 0 0 / 48px 100% repeat-x,
    linear-gradient(90deg, var(--fresh) 0 2px, transparent 2px) 0 100% / 8px 45% repeat-x,
    var(--band);
  border-bottom: 3px solid var(--fresh);
}
footer .dial { border-bottom: 0; border-top: 3px solid var(--fresh); transform: scaleY(-1); }

/* App bar: sticky, translucent, safe-area aware. Phones get the tab bar; wide screens get the rail. */
.bar {
  position: sticky; top: 0; z-index: 10;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem;
  padding: max(0.5rem, env(safe-area-inset-top)) max(var(--gutter), calc((100% - 75rem) / 2 + var(--gutter))) 0.5rem;
  background: color-mix(in oklab, var(--ground) 84%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in oklab, var(--hair) 70%, transparent);
}
.back { display: inline-flex; align-items: center; min-height: 48px; justify-self: start; font-weight: 600; color: var(--heading); text-decoration: none; }
.back::before { content: "‹" / ""; margin-right: 0.5rem; font-size: 1.25em; line-height: 1; }
.wordmark { display: inline-grid; align-items: center; min-height: 48px; margin-right: auto; text-decoration: none; }
.wm { display: block; height: min(2.1rem, 9vw); width: auto; overflow: visible; }
.wm-duka { fill: var(--logo-ink); }
.wm-safi { fill: var(--logo-safi); }
.wm-spark { fill: var(--accent); }
@media (forced-colors: active) { .wm path { fill: LinkText; } }
.pill, .lang {
  display: inline-grid; place-items: center; min-height: 48px; padding: 0 1rem; border-radius: 999px;
  font-weight: 600; font-size: min(0.95rem, 4.5vw); color: var(--heading); text-decoration: none;
}
.pill { display: none; border: 1.5px solid var(--line); background: var(--surface); }
.pill:hover, .lang:hover { background: var(--selected); }
@media (max-height: 36rem) { .bar { position: static; } }  /* short screens keep the room for content */

/* The one navigation: bottom tab bar on phones … */
.tabbar {
  position: fixed; inset: auto 0 0 0; z-index: 20;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  min-height: var(--tabbar); padding: 0.25rem max(0.5rem, env(safe-area-inset-left)) env(safe-area-inset-bottom);
  background: color-mix(in oklab, var(--surface) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(16px); backdrop-filter: saturate(1.4) blur(16px);
  border-top: 1px solid var(--hair);
}
.tabbar a {
  display: grid; justify-items: center; align-content: center; gap: 0.25rem; min-height: 3.5rem; min-width: 0; border-radius: 1rem;
  color: var(--muted); text-decoration: none; font-size: min(0.75rem, 3.6vw); font-weight: 600; text-align: center; line-height: 1.1;
  overflow-wrap: normal; transition: transform 150ms var(--ease); user-select: none;
}
.tabbar svg { width: 24px; height: 24px; padding: 2px 14px; box-sizing: content-box; border-radius: 999px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a[aria-current] { color: var(--heading); }
.tabbar a[aria-current] svg { background: var(--selected); }
.tabbar a:active { transform: scale(0.96); }
/* … and a left navigation rail on wide screens. */
@media (min-width: 56rem) {
  body { padding-bottom: 0; padding-left: 6rem; }
  .tabbar {
    inset: 0 auto 0 0; width: 6rem; grid-template-columns: 1fr; grid-auto-rows: max-content; align-content: center; gap: 0.75rem;
    padding: 1rem 0.5rem; border-top: 0; border-right: 1px solid var(--hair);
  }
  .pill { display: inline-grid; }
}

main { flex: 1; width: 100%; max-width: 75rem; margin: 0 auto; padding: 0 var(--gutter) 4rem; container: page / inline-size; }
main > * { min-width: 0; }

/* Hero */
.hero { display: grid; gap: 1.5rem; padding-top: 1.25rem; }
.hero > * { min-width: 0; }
.hero-text { container: herotext / inline-size; display: grid; gap: 1rem; align-content: center; }
.status {
  justify-self: start; display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.375rem 0.875rem 0.375rem 0.625rem;
  border-radius: 1.25rem; background: var(--surface); border: 1px solid var(--hair); color: var(--muted);
  font-weight: 600; font-size: 0.875rem; line-height: 1.3; box-shadow: var(--shadow);
}
.status .dot { width: 0.625rem; height: 0.625rem; flex: none; border-radius: 50%; background: var(--fresh); box-shadow: 0 0 0 4px var(--selected); }
/* Sized from its own column, so the longest word never splits. */
.hero h1 { font-size: min(clamp(2.1rem, 1rem + 5.2vw, 4.6rem), 13cqi); font-weight: 800; max-width: 13ch; }
.hero h1 > span { display: block; }  /* one sentence per line: "The ten things you buy most." / "Any hour." */
.hero h1 > span + span { color: var(--logo-ink); }
.lede { font-size: 1.12em; color: var(--muted); max-width: 38ch; }
.hero .actions { margin-top: 0.25rem; }
.facts { list-style: none; margin: 0.25rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.facts li {
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.25rem 0.75rem; border-radius: 0.5rem;
  background: var(--tag); color: var(--tag-ink); font-weight: 600; font-size: 0.875rem;
}
.facts li::before { content: "" / ""; width: 0.6rem; height: 0.6rem; background: var(--accent); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
.hero-visual {
  border-radius: 2rem; padding: clamp(0.75rem, 3cqi, 2rem);
  background:
    radial-gradient(120% 90% at 85% 10%, color-mix(in oklab, var(--accent) 22%, transparent), transparent 60%),
    radial-gradient(90% 80% at 10% 100%, color-mix(in oklab, var(--fresh) 26%, transparent), transparent 65%),
    var(--surface);
  border: 1px solid var(--hair); box-shadow: var(--shadow-lift);
}
.hero-art { display: block; width: 100%; height: auto; }
.h-shadow { fill: var(--shade-deep); opacity: 0.35; }
.h-body { fill: var(--surface); stroke: var(--art-a); stroke-width: 5; }
.h-awning, .h-scallop { fill: var(--accent); }
.h-stripe { stroke: var(--surface); stroke-width: 10; opacity: 0.55; }
.h-glass { fill: var(--selected); }
.h-shelf { stroke: var(--art-a); stroke-width: 6; stroke-linecap: round; }
.h-i1 { fill: var(--art-a); }
.h-i2 { fill: var(--fresh); }
.h-i3 { fill: var(--accent); }
.h-i4 { fill: var(--surface); stroke: var(--art-a); stroke-width: 3; }
.h-tag { fill: var(--tag); stroke: var(--price); stroke-width: 2; }
.h-tagline { stroke: var(--price); stroke-width: 4; stroke-linecap: round; }
.h-spark { fill: var(--accent); }
.h-clock > circle:first-child { fill: var(--band); }
.h-face { fill: var(--surface); }
.h-ticks { stroke: var(--ink); stroke-width: 4; stroke-linecap: round; }
.h-24 { font: 800 34px var(--display); fill: var(--heading); }
.h-phone > rect:first-child { fill: var(--band); }
.h-screen { fill: var(--surface); }
.h-ok { fill: var(--fresh); }
.h-check { fill: none; stroke: var(--surface); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.h-lines { stroke: var(--hair); stroke-width: 6; stroke-linecap: round; }

h2 { font-size: min(clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem), 9cqi); font-weight: 800; }
.how, .ten, .places, .why, .partner, .join-section { margin-top: clamp(3.5rem, 2.5rem + 4vw, 6.5rem); }
.section-lede { margin-top: 0.75rem; max-width: 56ch; color: var(--muted); }

/* Line art */
.art { display: block; width: 3rem; height: 3rem; fill: none; stroke: var(--art-a); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.art .f { fill: var(--art-b); }
.art .a { stroke: var(--accent); }
.art circle.a { fill: none; }
.art-lg { width: 7rem; height: auto; margin-bottom: 0.25rem; }

/* How it works: three numbered steps. */
.how ol { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 1rem; }
.how li {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem; align-items: start;
  background: var(--surface); border: 1px solid var(--hair); border-radius: 1.25rem; padding: 1.25rem; box-shadow: var(--shadow);
}
.how p { margin-top: 0.25rem; color: var(--muted); }
.step-n {
  position: absolute; top: -0.75rem; right: 1rem; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); font: 800 1rem/1 var(--display);
}

/* The ten: a rail of shelf price tags. */
.tags { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.tag {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 0.75rem;
  align-items: center; min-height: 5.5rem; padding: 0.875rem 0.875rem 0.875rem 1.75rem;
  background: var(--tag); color: var(--tag-ink); border-radius: 0.75rem 1.25rem 1.25rem 0.75rem;
  clip-path: polygon(1.1rem 0, 100% 0, 100% 100%, 1.1rem 100%, 0 50%);
  transition: transform 160ms var(--ease);
}
.tag::before { /* the tag's hole */
  content: ""; position: absolute; left: 0.85rem; top: 50%; width: 0.6rem; height: 0.6rem; margin-top: -0.3rem; border-radius: 50%;
  background: var(--ground); box-shadow: inset 0 0 0 2px var(--price);
}
.tag .art { grid-row: 1 / 3; width: 2.75rem; height: 2.75rem; }
.tag-n { font: 800 0.8rem/1 var(--display); color: var(--price); letter-spacing: 0.06em; align-self: end; }
.tag-name { font: 700 clamp(0.98rem, 0.9rem + 0.3vw, 1.1rem)/1.2 var(--display); align-self: start; margin-top: 0.15rem; overflow-wrap: anywhere; hyphens: auto; }
.tag:hover { transform: translateY(-2px) rotate(-0.4deg); }
.note {
  margin-top: 1rem; max-width: 60ch; padding: 0.875rem 1rem; border-left: 4px solid var(--fresh); border-radius: 0 0.75rem 0.75rem 0;
  background: var(--surface); color: var(--muted);
}

/* Cards: places and reasons. */
.cards { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(16rem, 100%), 1fr)); gap: 0.75rem; }
.cards li {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem; align-items: start;
  background: var(--surface); border: 1px solid var(--hair); border-radius: 1.25rem; padding: 1.125rem 1.25rem;
}
.cards p { margin-top: 0.25rem; color: var(--muted); }
.why .cards li { background: transparent; border-style: dashed; border-color: var(--line); }
@container page (min-width: 44rem) { .places .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container page (min-width: 64rem) {
  .why .cards { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .why .cards li { grid-template-columns: 1fr; }
}

/* Host or supply */
.partner-grid { display: grid; gap: 1rem; margin-top: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr)); }
.partner .card { align-content: start; }
.partner .card .art { margin-bottom: 0.25rem; }
.partner .card p:last-child { margin-top: 0.5rem; }

/* Forms */
.join-section {
  position: relative; background: var(--surface); border: 1px solid var(--hair); border-radius: 1.75rem;
  padding: clamp(1.25rem, 4cqi, 2.5rem); max-width: 44rem; box-shadow: var(--shadow-lift); overflow: hidden;
  padding-inline: min(clamp(1.25rem, 4cqi, 2.5rem), 5vw);  /* large text must not starve the column */
}
.join-section::before { content: ""; position: absolute; inset: 0 0 auto; height: 6px; background: linear-gradient(90deg, var(--action), var(--fresh) 60%, var(--accent)); }
.join-section > p { margin-top: 0.5rem; color: var(--muted); }
.join { display: grid; gap: 1.25rem; margin-top: 1.5rem; }
.field { display: grid; gap: 0.5rem; font-weight: 600; }
em { font-style: normal; font-weight: 400; color: var(--muted); }
.field input, .field select {
  font: inherit; font-weight: 400; min-height: 3.25rem; padding: 0.75rem 1rem; width: 100%; min-width: 0;
  border: 1.5px solid var(--line); border-radius: 1rem; background-color: var(--surface); color: var(--ink);
  transition: border-color 150ms var(--ease);
}
.field select {
  appearance: none; padding-right: 2.75rem; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 1.4rem) 50%, calc(100% - 1rem) 50%; background-size: 0.4rem 0.4rem; background-repeat: no-repeat;
}
.field input::placeholder { color: var(--muted); opacity: 1; }
.field input:focus-visible, .field select:focus-visible { border-color: var(--focus); }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field-error { color: var(--danger); font-weight: 600; font-size: 0.95em; }
.chips { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; min-width: 0; }
.chips legend { font-weight: 600; margin-bottom: 0.5rem; padding: 0; }
.chips .field-error { flex-basis: 100%; }
.chips label { position: relative; max-width: 100%; }
.chips input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chips label > span {
  display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; max-width: 100%; padding: 0.375rem 1.125rem; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--surface); font-weight: 600; color: var(--muted); line-height: 1.2; text-align: center;
  transition: background-color 160ms var(--ease), color 160ms var(--ease), transform 150ms var(--ease);
}
.chips input:checked + span { background: var(--action); border-color: var(--action); color: var(--on-action); }
.chips input:checked + span::before { content: "✓" / ""; margin-right: 0.5rem; }
.chips input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 6px var(--halo); }
.chips label:active > span { transform: scale(0.95); }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.fine { font-size: 0.92em; color: var(--muted); }
.textlink { display: inline-grid; align-items: center; min-height: 48px; font-weight: 600; color: var(--heading); }

.button {
  display: inline-grid; place-items: center; min-height: 3.25rem; max-width: 100%; padding: 0.5rem 1.5rem; border: 0; border-radius: 999px;
  background: var(--action); color: var(--on-action); font: 700 1.05rem/1.2 var(--display); text-align: center;
  text-decoration: none; cursor: pointer; box-shadow: var(--shadow); transition: transform 150ms var(--ease), filter 150ms var(--ease);
}
.button:hover { filter: brightness(1.08); }
.button:active { transform: scale(0.97); }
form[aria-busy="true"] .button[type="submit"] { filter: saturate(0.6); cursor: progress; }
.button.quiet { background: transparent; color: var(--heading); border: 1.5px solid var(--line); box-shadow: none; }
.button.danger { background: transparent; color: var(--danger); border: 1.5px solid var(--danger); box-shadow: none; }

/* App-like pages */
main.narrow { max-width: 42rem; padding-top: 1.25rem; display: grid; gap: 1.25rem; align-content: start; }
main.narrow h1 { font-size: min(clamp(2.1rem, 1.4rem + 3vw, 3.1rem), 11cqi); font-weight: 800; }
.card { background: var(--surface); border: 1px solid var(--hair); border-radius: 1.5rem; padding: 1.5rem; display: grid; gap: 0.5rem; box-shadow: var(--shadow); }
.card p { color: var(--muted); }
.notice { background: var(--notice-bg); color: var(--notice-ink); border-radius: 1rem; padding: 0.875rem 1rem; font-weight: 600; }
.errors { background: var(--error-bg); color: var(--error-ink); border-radius: 1rem; padding: 0.875rem 1rem; font-weight: 600; display: grid; gap: 0.25rem; }
.remove { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1.5px solid var(--hair); display: grid; gap: 0.75rem; justify-items: start; }
.remove p { color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
/* Inline links keep their place in the text but get a 48px-tall tap area. */
footer a, .fine a, .prose a, .notice a { display: inline-block; padding-block: 0.875rem; margin-block: -0.875rem; }
.faq { display: grid; gap: 0.5rem; }
.faq details { background: var(--surface); border: 1px solid var(--hair); border-radius: 1rem; }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.5rem; padding: 0.75rem 1rem;
  font: 700 1.05rem/1.3 var(--display); color: var(--heading); cursor: pointer; list-style: none;
}
.faq summary > span { min-width: 0; flex: 1; overflow-wrap: break-word; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+" / ""; font: 700 1.35rem/1 var(--display); color: var(--accent); transition: rotate 150ms var(--ease); }
.faq details[open] summary::after { rotate: 45deg; }
.faq details p { padding: 0 1rem 1rem; color: var(--muted); }
.prose { display: grid; gap: 0.5rem; }
.prose h2 { font-size: 1.2rem; margin-top: 1rem; }
.prose p { color: var(--muted); max-width: 65ch; }

/* Footer */
footer { background: var(--foot-bg); color: var(--foot-ink); padding-bottom: 2rem; }
.foot { max-width: 75rem; margin: 0 auto; padding: 2rem var(--gutter) 0; display: grid; gap: 0.5rem; container: foot / inline-size; }
.saying { font: 800 min(clamp(1.6rem, 1rem + 2.4vw, 2.4rem), 11cqi)/1.1 var(--display); color: var(--accent); text-wrap: balance; }
.saying-en { color: var(--foot-muted); }
footer .contact { margin-top: 1rem; }
.contact, .legal { font-size: 0.95rem; }
footer a { color: inherit; }
.theme { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; margin-top: 0.75rem; font-size: 0.9rem; }
.theme span { margin-right: 0.25rem; color: var(--foot-muted); }
.theme button {
  min-height: 48px; padding: 0 1rem; border-radius: 999px; border: 1.5px solid var(--foot-line); background: transparent;
  color: var(--foot-ink); font: 600 0.9rem/1 var(--text); cursor: pointer;
}
.theme button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
footer :focus-visible { outline-color: var(--accent); box-shadow: none; }

/* Small phones: padding never grows with large text at the expense of the words. */
@media (max-width: 26rem) { .card, .how li, .cards li, .note, .faq summary, .faq details p { padding-inline: min(1.25rem, 5vw); } }
/* Very narrow containers (small phones, or large text): stack, and let brand words wrap. */
@container page (max-width: 22rem) {
  .how li, .cards li { grid-template-columns: 1fr; }
  .tags { grid-template-columns: 1fr; }
  .nb { white-space: normal; }
}
/* Wider containers */
@container page (min-width: 40rem) {
  .tags { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@container page (min-width: 56rem) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 3.5rem; padding-top: 2.5rem; }
  .how ol { grid-template-columns: repeat(3, 1fr); }
  .how li { grid-template-columns: 1fr; }
  .tags { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .tag { grid-template-columns: 1fr; padding: 1rem 1rem 1rem 1.9rem; }
  .tag .art { grid-row: auto; margin-bottom: 0.5rem; }
  .join-section { margin-inline: auto; }
}

/* Motion: one short load moment, page transitions, press feedback. */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: no-preference) {
  .hero-visual { animation: settle 320ms var(--ease) both; }
  .h-clock { animation: spin-in 700ms var(--ease) 120ms both; transform-origin: 428px 96px; }
  .status .dot { animation: pulse 2.4s var(--ease) infinite; }
  @keyframes settle { from { transform: translateY(14px) scale(0.985); } }
  @keyframes spin-in { from { transform: rotate(-60deg) scale(0.8); } }
  @keyframes pulse { 50% { box-shadow: 0 0 0 7px var(--selected); } }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: 220ms; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, ::view-transition-group(*) { animation: none !important; transition: none !important; }
}
@media (forced-colors: active) {
  .chips input:checked + span, .tabbar a[aria-current], .theme button[aria-pressed="true"] { outline: 2px solid CanvasText; }
  .art, .tabbar svg { stroke: CanvasText; }
  .tag { border: 1px solid CanvasText; }
}
