/* Tell Me Meow website. The single stylesheet.
   Tokens and components come from design/Design System.dc.html ("Cat Café").
   No inline styles anywhere: the CSP in _headers blocks them. */

@font-face { font-family: "Fredoka"; src: url("/fonts/Fredoka.ttf") format("truetype"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("/fonts/Nunito.ttf") format("truetype"); font-weight: 200 1000; font-display: swap; }
@font-face { font-family: "Bagel Fat One"; src: url("/fonts/BagelFatOne-Latin.ttf") format("truetype"); font-display: swap; }

/* ---------- Tokens ---------- */

:root {
  --bg: #FBF6EE;
  --panel: #FFFFFF;
  --panel2: #F4EBDD;
  --line: #E7DCCB;
  --text: #2A2320;
  --muted: #6E625A;
  --accent: #A04E12;
  --accent-ink: #FFFFFF;
  --soft: #FBE3CC;
  --good: #2F7F6C;
  --bad: #B3412F;
  --quiet: #CFC3B2;
  /* Brand colours: the same in both themes. */
  --orange: #F29A52;
  --ink: #2A2320;
  --oat: #FBF6EE;
  /* Animated logo */
  --logo-bubble: #FBF6EE;
  --logo-line: #2A2320;
  --logo-ear: #F4A9A8;
  --logo-ink: #2A2320;

  --font-head: "Fredoka", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, sans-serif;
  --font-name: "Bagel Fat One", "Fredoka", sans-serif;
  --radius-card: 18px;
  --radius-band: 28px;
  --max: 1200px;
  --gutter: 24px;
  color-scheme: light;
}

/* Dark tokens. Keep these two blocks identical (scripts/check_site.py compares them).
   The first applies when theme.js chose dark; the second when JS is off and the
   system is dark. */
:root[data-theme="dark"] {
  --bg: #17120F;
  --panel: #221B17;
  --panel2: #2C2420;
  --line: #3A302A;
  --text: #F5EDE4;
  --muted: #B8AA9E;
  --accent: #F29A52;
  --accent-ink: #17120F;
  --soft: #3A2618;
  --good: #6CC3AC;
  --bad: #EE8E7C;
  --quiet: #4A3F38;
  --logo-bubble: #F5EDE4;
  --logo-line: #17120F;
  --logo-ear: #F29A52;
  --logo-ink: #17120F;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #17120F;
    --panel: #221B17;
    --panel2: #2C2420;
    --line: #3A302A;
    --text: #F5EDE4;
    --muted: #B8AA9E;
    --accent: #F29A52;
    --accent-ink: #17120F;
    --soft: #3A2618;
    --good: #6CC3AC;
    --bad: #EE8E7C;
    --quiet: #4A3F38;
    --logo-bubble: #F5EDE4;
    --logo-line: #17120F;
    --logo-ear: #F29A52;
    --logo-ink: #17120F;
    color-scheme: dark;
  }
}

/* Light/dark artwork pairs (logos, screenshots): show the one for the current theme. */
:root[data-theme="dark"] .for-light,
:root:not([data-theme="dark"]) .for-dark { display: none !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .for-light { display: none !important; }
  :root:not([data-theme]) .for-dark { display: block !important; }
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, p, dl, dd, ol, ul { margin: 0; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; }
strong { font-weight: 800; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  background: var(--accent); color: var(--accent-ink);
  padding: 10px 18px; border-radius: 999px; font-family: var(--font-head); font-weight: 600;
}
.skip-link:focus { top: 12px; text-decoration: none; }

.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.stack { display: flex; flex-direction: column; }
.muted { color: var(--muted); }

/* ---------- Type ---------- */

.display { font-size: clamp(44px, 6vw, 76px); line-height: 1.02; letter-spacing: -0.01em; text-wrap: balance; }
.page-title { font-size: clamp(40px, 5vw, 64px); line-height: 1.05; }
.title { font-size: clamp(32px, 4vw, 44px); line-height: 1.1; }
.title--sm { font-size: clamp(30px, 3.6vw, 42px); line-height: 1.1; }
.title--xs { font-size: clamp(28px, 3.4vw, 38px); line-height: 1.1; }
.lede { font-size: 18px; color: var(--muted); text-wrap: pretty; }
.lede--lg { font-size: 20px; line-height: 1.5; }
.eyebrow { font-size: 13px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.small-print { font-size: 14px; color: var(--muted); max-width: 720px; text-wrap: pretty; }

/* ---------- Header ---------- */

.site-header {
  max-width: var(--max); margin: 0 auto; padding: 18px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.brand-link { display: flex; align-items: center; gap: 10px; }
.brand-link:hover { text-decoration: none; }
.brand-link img { width: 46px; height: 37px; display: block; }
.wordmark { font-family: var(--font-name); font-size: 24px; color: var(--accent); line-height: 1; }
.site-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.site-nav a {
  font-family: var(--font-head); font-weight: 500; font-size: 17px; color: var(--text);
  padding: 10px 16px; border-radius: 999px;
}
.site-nav a:hover { background: var(--panel2); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--accent); background: var(--soft); }
.theme-toggle {
  font-family: var(--font-head); font-weight: 500; font-size: 15px; color: var(--text);
  background: var(--panel); border: 2px solid var(--line); border-radius: 999px;
  min-height: 44px; padding: 0 16px; cursor: pointer; margin-left: 6px;
}
.theme-toggle[hidden] { display: none; }

/* ---------- Buttons ---------- */

.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 54px; padding: 0 28px;
  border-radius: 999px; border: 2px solid transparent;
  background: var(--accent); color: var(--accent-ink);
  font-family: var(--font-head); font-weight: 600; font-size: 17px; cursor: pointer;
}
.btn:hover { text-decoration: none; filter: brightness(1.06); }
.btn--quiet { background: var(--panel); border-color: var(--line); color: var(--text); font-weight: 500; padding: 0 26px; }
.btn--ink { background: var(--ink); color: var(--oat); }
.btn--sm { min-height: 44px; padding: 0 16px; font-size: 15px; }
.btn--self { align-self: flex-start; }
.text-link { align-self: flex-start; font-family: var(--font-head); font-weight: 500; font-size: 17px; }

.badge {
  align-self: flex-start; font-family: var(--font-head); font-weight: 500; font-size: 15px;
  color: var(--accent); background: var(--soft); border: 1px solid var(--accent);
  border-radius: 999px; padding: 6px 14px;
}

/* ---------- Cards and bands ---------- */

.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-card);
  padding: 22px; display: flex; flex-direction: column; gap: 6px;
}
.card h3 { font-size: 20px; }
.card p { font-size: 16px; color: var(--muted); }
.band--panel { background: var(--panel2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band--orange { background: var(--orange); color: var(--ink); }
.band--orange h2, .band--orange p { color: var(--ink); }
.section { padding-top: 88px; padding-bottom: 88px; display: flex; flex-direction: column; gap: 40px; }
.section--flush-top { padding-top: 0; }
.section-head { display: flex; flex-direction: column; gap: 12px; max-width: 640px; }

.grid { display: grid; gap: 16px; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.grid--steps { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 20px; }
.grid--moods { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 48px; align-items: center; }

.callout {
  background: var(--soft); border: 1px solid var(--accent); border-radius: var(--radius-band);
  padding: clamp(28px, 5vw, 56px);
  display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between;
}
.callout__lead { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.callout__text { display: flex; flex-direction: column; gap: 8px; max-width: 520px; }
.callout h2 { font-size: clamp(28px, 3.4vw, 38px); line-height: 1.1; }
.callout p { font-size: 18px; }
.callout--compact { padding: clamp(28px, 5vw, 48px); }
.callout--compact h2 { font-size: clamp(26px, 3vw, 34px); line-height: 1.15; }

/* ---------- Cat avatars ---------- */

/* A host element that cat-avatar.js fills with an SVG. Without JS it stays an empty circle. */
.cat { display: flex; align-items: center; justify-content: center; }
.cat svg { display: block; width: 100%; height: 100%; overflow: hidden; }
.avatar {
  flex: none; border-radius: 50%; background: var(--panel2); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.avatar .cat { width: 100%; height: 100%; padding: 4%; }
.avatar--84 { width: 84px; height: 84px; }
.avatar--96 { width: 96px; height: 96px; }
.avatar--104 { width: 104px; height: 104px; }
.avatar--140 { width: 140px; height: 140px; }

/* ---------- Paw meter ---------- */

.paws { display: flex; gap: 6px; }
.paw { width: 24px; height: 24px; fill: var(--line); }
.paw.is-on { fill: var(--accent); }
.paws--sm .paw { width: 22px; height: 22px; }
.meter {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-card);
  padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.meter__word { font-family: var(--font-head); font-weight: 600; font-size: 17px; }
.meter-list { display: flex; flex-direction: column; gap: 10px; }
.meter-list .meter { padding: 12px 16px; }

/* ---------- Speech bubbles ---------- */

.bubble {
  background: var(--panel); border: 2px solid var(--accent); border-radius: 22px;
  padding: 14px 18px; display: flex; flex-direction: column; gap: 2px;
}
.bubble__who { font-size: 13px; color: var(--muted); }
.bubble__main { font-family: var(--font-head); font-weight: 600; font-size: 26px; line-height: 1.15; color: var(--text); }
.bubble__sub { font-size: 16px; font-weight: 600; color: var(--accent); }

/* ---------- Screenshots ---------- */

/* Real screenshots only, in a plain ink frame. No fake device chrome. */
.phone {
  justify-self: center; width: 280px; aspect-ratio: 1206 / 2622; border-radius: 44px;
  border: 10px solid var(--ink); background: var(--panel2); overflow: hidden;
}
.phone img, .peek img, .shot img { display: block; width: 100%; height: auto; }
/* The top of a phone screen peeking up from the bottom of a 4:3 card image. */
.peek {
  aspect-ratio: 4 / 3; background: var(--panel2); border-bottom: 1px solid var(--line);
  display: flex; justify-content: center; align-items: flex-end; overflow: hidden; padding-top: 22px;
}
.peek__frame {
  width: 62%; height: 100%; overflow: hidden;
  border: 6px solid var(--ink); border-bottom: 0; border-radius: 30px 30px 0 0; background: var(--panel2);
}

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--line); background: var(--panel2); }
.site-footer__grid {
  padding-top: 56px; padding-bottom: 28px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 32px;
}
.site-footer__col { display: flex; flex-direction: column; gap: 10px; }
.site-footer__col a { font-size: 15px; color: var(--text); }
.site-footer__head { margin-bottom: 4px; font-family: var(--font-head); font-weight: 600; font-size: 16px; }
.site-footer__brand { gap: 12px; }
.site-footer__brand img { width: 120px; height: 96px; display: block; }
.site-footer__brand p { font-size: 15px; color: var(--muted); line-height: 1.5; max-width: 240px; }
.site-footer__base {
  padding-top: 20px; padding-bottom: 36px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 13px; color: var(--muted);
}
.site-footer__base p:first-child { max-width: 640px; line-height: 1.5; text-wrap: pretty; }

/* ---------- Home ---------- */

.hero {
  padding-top: 40px; padding-bottom: 88px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 48px; align-items: center;
}
.hero__text { display: flex; flex-direction: column; gap: 24px; }
.hero__text .lede { max-width: 520px; }
.hero__stage { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.hero__figure { position: relative; width: min(100%, 460px); }
.hero__circle {
  width: 100%; aspect-ratio: 1; border-radius: 50%; background: var(--panel2);
  display: flex; align-items: flex-end; justify-content: center; overflow: hidden;
}
.hero__circle .cat { width: 91.3%; aspect-ratio: 1; }
.hero__bubble { position: absolute; top: -8px; right: -12px; max-width: 280px; box-shadow: 0 6px 0 var(--line); }
.hero__meter { width: min(100%, 420px); }
@media (max-width: 520px) {
  .hero__bubble { right: 0; max-width: 220px; }
  .hero__bubble .bubble__main { font-size: 21px; }
}

.step-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-card);
  overflow: hidden; display: flex; flex-direction: column;
}
.step-card__body { padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.step-card__num { font-family: var(--font-head); font-weight: 600; font-size: 15px; color: var(--accent); }
.step-card h3 { font-size: 24px; }
.step-card p { font-size: 16px; color: var(--muted); text-wrap: pretty; }

.mood-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-card);
  padding: 18px; display: flex; gap: 14px; align-items: center;
}
.mood-card__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mood-card__head { font-family: var(--font-head); font-weight: 600; font-size: 19px; line-height: 1.2; }
.mood-card__short { font-size: 14px; font-weight: 700; color: var(--accent); }

.learns {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-band);
  padding: clamp(28px, 5vw, 56px);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 40px; align-items: center;
}
.learns h2 { font-size: clamp(30px, 3.6vw, 40px); line-height: 1.1; }
.learns__text { display: flex; flex-direction: column; gap: 16px; }
.learns__demo { display: flex; flex-direction: column; gap: 14px; }
.learns__said { display: flex; gap: 10px; align-items: flex-start; }
.learns__said .bubble { flex: 1; margin-top: 8px; padding: 14px 16px; gap: 4px; }
.learns__said .bubble__main { font-size: 22px; line-height: 1.2; }
.progress-card {
  background: var(--panel2); border: 1px solid var(--line); border-radius: var(--radius-card);
  padding: 14px 16px; display: flex; flex-direction: column; gap: 10px;
}
.progress-card__head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.progress-card__head strong { font-family: var(--font-head); font-weight: 600; font-size: 16px; }
.progress-card__head span { font-size: 13px; color: var(--muted); }
.progress { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.progress__fill { height: 100%; background: var(--accent); border-radius: 999px; }
.progress__fill--75 { width: 75%; }
.progress-card__hint { font-size: 13px; color: var(--muted); }

.teaser {
  padding-top: 80px; padding-bottom: 80px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 40px; align-items: center;
}
.teaser__text { display: flex; flex-direction: column; gap: 16px; }
.teaser__text h2 { font-size: clamp(32px, 4vw, 44px); line-height: 1.1; }
.teaser__text p { font-size: 18px; text-wrap: pretty; }
.teaser__cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.teaser__cat {
  aspect-ratio: 1; border-radius: 50%; background: var(--oat); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.teaser__cat .cat { width: 100%; height: 100%; padding: 4%; }

/* Animated logo: the bubble springs in, ears rise, letters pop, the right ear flicks.
   Static without JS or with reduced motion; home.js adds .is-playing when visible. */
.alogo { display: block; width: 180px; height: 144px; overflow: visible; flex: none; }
.alogo__line { fill: var(--logo-bubble); stroke: var(--logo-line); stroke-width: 10; stroke-linejoin: round; }
.alogo__inner { fill: var(--logo-ear); }
.alogo__letters { fill: var(--logo-ink); }
.alogo__ear, .alogo__bubble, .alogo__letters path { transform-box: fill-box; }
.alogo__ear, .alogo__letters path { transform-origin: 50% 100%; }
.alogo__bubble { transform-origin: 30% 100%; }
.alogo.is-playing .alogo__bubble { animation: tmmBubble .7s cubic-bezier(.25,1.5,.45,1) .1s both; }
.alogo.is-playing .alogo__ear--l { animation: tmmEar .45s cubic-bezier(.3,1.8,.5,1) .6s both; }
.alogo.is-playing .alogo__ear--r { animation: tmmEar .45s cubic-bezier(.3,1.8,.5,1) .7s both, tmmFlick .3s linear 2.6s 2, tmmFlick .34s linear 4.5s 1; }
.alogo.is-playing .alogo__letters path { animation: tmmLetter .55s cubic-bezier(.2,1.5,.4,1) both; }
.alogo.is-playing .alogo__letters path:nth-child(1) { animation-delay: .75s; }
.alogo.is-playing .alogo__letters path:nth-child(2) { animation-delay: .81s; }
.alogo.is-playing .alogo__letters path:nth-child(3) { animation-delay: .86s; }
.alogo.is-playing .alogo__letters path:nth-child(4) { animation-delay: .92s; }
.alogo.is-playing .alogo__letters path:nth-child(5) { animation-delay: .97s; }
.alogo.is-playing .alogo__letters path:nth-child(6) { animation-delay: 1.02s; }
.alogo.is-playing .alogo__letters path:nth-child(7) { animation-delay: 1.1s; }
.alogo.is-playing .alogo__letters path:nth-child(8) { animation-delay: 1.16s; }
.alogo.is-playing .alogo__letters path:nth-child(9) { animation-delay: 1.21s; }
.alogo.is-playing .alogo__letters path:nth-child(10) { animation-delay: 1.26s; }
@keyframes tmmBubble { from { transform: scale(0); opacity: 0; } }
@keyframes tmmEar { from { transform: translateY(60%) scale(.5); opacity: 0; } }
@keyframes tmmFlick {
  0% { transform: rotate(0); animation-timing-function: cubic-bezier(.2,0,.4,1); }
  22% { transform: rotate(17deg); animation-timing-function: cubic-bezier(.5,0,.6,1); }
  62% { transform: rotate(-4deg); animation-timing-function: ease-out; }
  100% { transform: rotate(0); }
}
@keyframes tmmLetter { from { opacity: 0; transform: translateY(35%) scale(.4); } }
@media (prefers-reduced-motion: reduce) {
  .alogo.is-playing * { animation: none !important; }
}

/* ---------- Inner pages ---------- */

.page-head { padding-top: 32px; padding-bottom: 56px; display: flex; flex-direction: column; gap: 14px; }
.page-head .lede { font-size: 20px; max-width: 640px; }
.page-head--tight { padding-bottom: 40px; gap: 12px; }

/* How it works */
.how-step { border-top: 1px solid var(--line); }
.how-step .split { padding-top: 64px; padding-bottom: 64px; }
.how-step__text { display: flex; flex-direction: column; gap: 14px; }
.step-pill {
  align-self: flex-start; font-family: var(--font-head); font-weight: 600; font-size: 15px;
  color: var(--accent); background: var(--soft); border-radius: 999px; padding: 4px 12px;
}
.tips { list-style: none; padding: 0; margin-top: 4px; display: flex; flex-direction: column; gap: 8px; }
.tips li { display: flex; gap: 10px; align-items: baseline; font-size: 16px; }
.tips li::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  flex: none; transform: translateY(-2px);
}
.paw-band .split { padding-top: 80px; padding-bottom: 80px; }
/* How the listening works: four numbered steps beside a screenshot, then three cards. */
.listening { padding-top: 80px; padding-bottom: 80px; display: flex; flex-direction: column; gap: 40px; scroll-margin-top: 16px; }
.listening__head { display: flex; flex-direction: column; gap: 10px; max-width: 680px; }
.listening__body { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 48px; align-items: start; }
.listening__steps { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.listen-step {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-card);
  padding: 20px; display: flex; gap: 16px;
}
.listen-step__num {
  width: 40px; height: 40px; border-radius: 50%; background: var(--soft); color: var(--accent);
  font-family: var(--font-head); font-weight: 600; font-size: 19px;
  display: flex; align-items: center; justify-content: center; flex: none;
}
.listen-step__text { display: flex; flex-direction: column; gap: 6px; }
.listen-step__text h3 { font-size: 21px; }
.listen-step__text p { font-size: 16px; color: var(--muted); text-wrap: pretty; }
.listening__shot { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.listening__shot figcaption { font-size: 15px; color: var(--muted); max-width: 300px; text-align: center; text-wrap: pretty; }
.listen-cards { list-style: none; padding: 0; margin: 0; }

/* Support */
.support-head {
  padding-top: 32px; padding-bottom: 48px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 32px; align-items: end;
}
.support-head__text { display: flex; flex-direction: column; gap: 14px; }
.support-head__text .lede { font-size: 20px; max-width: 560px; }
.contact-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-card);
  padding: 20px; display: flex; gap: 16px; align-items: center;
}
.contact-card__text { display: flex; flex-direction: column; gap: 4px; }
.contact-card__text strong { font-family: var(--font-head); font-weight: 600; font-size: 19px; }
.contact-card__text a { font-size: 17px; font-weight: 700; overflow-wrap: anywhere; }
.contact-card__text span { font-size: 14px; color: var(--muted); }
.howto { padding-top: 64px; padding-bottom: 64px; display: flex; flex-direction: column; gap: 28px; }
.howto ol {
  list-style: none; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 14px;
}
.howto li {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-card);
  padding: 18px; display: flex; gap: 14px;
}
.howto__num {
  width: 36px; height: 36px; border-radius: 50%; background: var(--soft); color: var(--accent);
  font-family: var(--font-head); font-weight: 600; font-size: 17px;
  display: flex; align-items: center; justify-content: center; flex: none;
}
.howto__text { display: flex; flex-direction: column; gap: 4px; }
.howto__text strong { font-family: var(--font-head); font-weight: 600; font-size: 18px; }
.howto__text span { font-size: 16px; color: var(--muted); }
.faq-section { max-width: 880px; padding-top: 72px; padding-bottom: 88px; display: flex; flex-direction: column; gap: 24px; }
.faq { display: flex; flex-direction: column; gap: 10px; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-card); overflow: hidden; }
.faq details[open] { border-color: var(--accent); }
.faq summary {
  min-height: 60px; padding: 14px 20px; list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-family: var(--font-head); font-weight: 600; font-size: 18px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; width: 32px; height: 32px; border-radius: 50%; background: var(--panel2); color: var(--accent);
  display: flex; align-items: center; justify-content: center; flex: none; font-size: 20px; line-height: 1;
}
.faq details[open] summary::after { content: "\2013"; }
.faq details p { padding: 0 20px 18px; font-size: 16px; color: var(--muted); text-wrap: pretty; }

/* Privacy */
.legal { padding-bottom: 88px; display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.legal__toc { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 4px; flex: 0 0 220px; }
.legal__toc a { font-family: var(--font-head); font-weight: 500; font-size: 16px; color: var(--text); padding: 8px 14px; border-radius: 999px; }
.legal__toc a:hover { background: var(--panel2); text-decoration: none; }
.legal__body { flex: 1 1 480px; display: flex; flex-direction: column; gap: 40px; max-width: 760px; min-width: 0; line-height: 1.6; }
.legal__body a { text-decoration: underline; }
.legal__body a:hover { text-decoration: none; }
.legal__body section { display: flex; flex-direction: column; gap: 12px; scroll-margin-top: 16px; }
.legal__body h2 { font-size: 28px; }
.legal__short { background: var(--soft); border: 1px solid var(--accent); border-radius: var(--radius-card); padding: 24px; gap: 10px !important; }
.legal__short h2 { font-size: 24px; }
.updated { font-size: 15px; color: var(--muted); }
.legal__body ul, .legal__body ol { padding-left: 1.4em; display: flex; flex-direction: column; gap: 6px; }
.legal__body li { padding-left: 2px; }
.legal__body li::marker { color: var(--accent); font-weight: 700; }
@media (max-width: 760px) {
  .legal__toc { position: static; flex: 1 1 100%; flex-direction: row; flex-wrap: wrap; }
}
/* User guide: a small screenshot under a section heading. */
.guide-shot { margin: 4px 0; }
.guide-shot .phone { width: 200px; border-width: 8px; border-radius: 34px; }

/* Fact lists (privacy, press) */
.facts {
  display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 20px;
}
.facts dt { color: var(--muted); }
.facts dd { min-width: 0; overflow-wrap: anywhere; }
.facts--panel { background: var(--panel2); gap: 12px 28px; padding: 24px; align-self: end; }
.facts--panel dd:first-of-type { font-weight: 700; }

/* Press */
.press-head {
  padding-top: 32px; padding-bottom: 56px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 40px;
}
.press-head__text { display: flex; flex-direction: column; gap: 14px; }
.press-head__text .lede { font-size: 19px; }
.about-card { margin-top: 8px; padding: 22px; gap: 10px; }
.about-card p { font-size: 17px; color: var(--text); text-wrap: pretty; }
.press-section { padding-top: 64px; padding-bottom: 64px; display: flex; flex-direction: column; gap: 24px; }
.press-section--last { padding-top: 0; padding-bottom: 88px; }
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.asset {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-card);
  overflow: hidden; display: flex; flex-direction: column;
}
.asset__preview {
  height: 200px; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid var(--line);
}
.asset__preview img { max-width: 70%; max-height: 150px; }
.asset__preview--oat { background: #FBF6EE; }
.asset__preview--night { background: #17120F; }
.asset__preview--orange { background: #F29A52; }
.asset__preview--panel { background: #F4EBDD; }
.asset__preview .app-icon { border-radius: 22%; }
.asset__meta { padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.asset__meta div { display: flex; flex-direction: column; }
.asset__name { font-family: var(--font-head); font-weight: 600; font-size: 17px; }
.asset__fmt { font-size: 13px; color: var(--muted); }
.note { font-size: 15px; color: var(--muted); max-width: 720px; }
.shot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 20px; }
.shot { display: flex; flex-direction: column; gap: 10px; }
.shot__frame { aspect-ratio: 1206 / 2622; border-radius: 28px; overflow: hidden; border: 1px solid var(--line); background: var(--panel2); }
.shot__label { font-family: var(--font-head); font-weight: 600; font-size: 16px; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); gap: 12px; }
.swatch { border: 1px solid var(--line); border-radius: var(--radius-card); overflow: hidden; background: var(--panel); }
.swatch__chip { height: 90px; }
.swatch__chip--orange { background: #F29A52; }
.swatch__chip--ginger { background: #A04E12; }
.swatch__chip--oat { background: #FBF6EE; }
.swatch__chip--ink { background: #2A2320; }
.swatch__chip--night { background: #17120F; }
.swatch__chip--pink { background: #F4A9A8; }
.swatch__meta { padding: 10px 14px; display: flex; flex-direction: column; }
.swatch__meta strong { font-family: var(--font-head); font-weight: 600; font-size: 16px; }
.swatch__meta span { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.type-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.type-sample { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 20px; }
.type-sample__name { font-family: var(--font-name); font-size: 36px; color: var(--accent); line-height: 1.1; }
.type-sample__head { font-family: var(--font-head); font-weight: 600; font-size: 34px; line-height: 1.1; }
.type-sample__body { font-size: 22px; line-height: 1.3; }
.type-sample__note { font-size: 14px; color: var(--muted); margin-top: 8px; }

/* Dress up */
.dress-head { padding-top: 32px; padding-bottom: 24px; display: flex; flex-direction: column; gap: 12px; }
.dress-head .lede { font-size: 19px; max-width: 620px; }
.builder {
  padding-top: 16px; padding-bottom: 80px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 32px; align-items: start;
}
.builder__stage { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 16px; }
@media (max-width: 900px) { .builder__stage { position: static; } }
.builder__canvas {
  background: var(--panel2); border-radius: var(--radius-band); aspect-ratio: 1; width: 100%; max-width: 520px;
  align-self: center; display: flex; align-items: flex-end; justify-content: center; overflow: hidden;
}
.builder__canvas .cat { width: 100%; height: 100%; }
.builder__actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.builder__actions button {
  min-height: 50px; border-radius: 999px; background: var(--panel); border: 2px solid var(--line); color: var(--text);
  font-family: var(--font-head); font-weight: 500; font-size: 17px; cursor: pointer; padding: 0 8px;
}
.builder__actions button.is-primary { background: var(--soft); border-color: var(--accent); font-weight: 600; }
.builder__controls { display: flex; flex-direction: column; gap: 20px; }
.builder__noscript { background: var(--panel2); border-radius: var(--radius-card); padding: 20px; color: var(--muted); }
.tabs {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px;
  background: var(--panel2); border-radius: 999px; padding: 4px;
}
.tabs button {
  min-height: 44px; border-radius: 999px; border: none; background: transparent; color: var(--text);
  font-family: var(--font-head); font-weight: 600; font-size: 16px; cursor: pointer; padding: 0 4px;
}
.tabs button[aria-selected="true"] { background: var(--panel); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 44px; padding: 0 16px; border-radius: 999px; background: transparent;
  border: 1px solid var(--line); color: var(--text);
  font-family: var(--font-body); font-weight: 700; font-size: 15px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
}
.chip[aria-pressed="true"] { background: var(--soft); border-color: var(--accent); color: var(--accent); }
.chip--swatch { padding-left: 8px; }
.chip__swatch { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); flex: none; }
.chip-label { margin-top: 10px; }
.chip-label:first-child { margin-top: 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 12px; }
.tile {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: none; border: none; padding: 0; cursor: pointer; color: var(--text);
  font-family: var(--font-body); font-weight: 600; font-size: 14px;
}
.tile__pic {
  width: 84px; height: 84px; border-radius: 16px; background: var(--panel2); border: 1px solid var(--line);
  overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.tile__pic .cat { width: 80px; height: 80px; }
.tile[aria-pressed="true"] { color: var(--accent); font-weight: 800; }
.tile[aria-pressed="true"] .tile__pic { background: var(--soft); border: 3px solid var(--accent); }
.colour-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid var(--line); padding-top: 18px;
}
.colours { display: flex; gap: 10px; }
.colour {
  width: 44px; height: 44px; border-radius: 50%; border: 3px solid transparent;
  box-shadow: inset 0 0 0 3px var(--bg); cursor: pointer; padding: 0;
}
.colour[aria-pressed="true"] { border-color: var(--accent); }
.colour--teal, .chip__swatch--teal { background: #2F9E8F; }
.colour--red { background: #D9534F; }
.colour--blue { background: #4A78C9; }
.colour--pink { background: #E78FB3; }
.colour--yellow { background: #F2C14E; }
.builder__note { font-size: 15px; color: var(--muted); text-wrap: pretty; }
.gallery { padding-top: 80px; padding-bottom: 80px; display: flex; flex-direction: column; gap: 32px; }
.gallery__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 16px; }
.gallery__item {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 16px;
  display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--text);
  font-family: var(--font-head); font-weight: 600; font-size: 18px;
}
button.gallery__item { cursor: pointer; }
button.gallery__item:hover { border-color: var(--accent); }

/* 404 */
.notfound { padding-top: 24px; padding-bottom: 96px; display: flex; flex-wrap: wrap; gap: 32px; align-items: center; }
.notfound__text { display: flex; flex-direction: column; gap: 20px; max-width: 560px; }
