/* Lichi site. Palette from the app: src/config/theme.ts (bg, ink, blush, glow) and src/domain/scoring/band.ts (score bands). */
@property --p { syntax: "<number>"; inherits: false; initial-value: 0; }

:root {
  --bg: #FBFAF9;
  --surface: #FFFFFF;
  --ink: #171513;
  --muted: #67625C;
  --line: #E8E6E2;
  --soft: #F3F2EF;
  --blush: #F6D9D2;
  --peach: #FCE8D6;
  --mint: #E2F3E9;
  --sheet: #FFF8F3;
  --lychee: #D3283B;
  --link: #B4212F;
  --band-poor: #DF4A40;
  --band-weak: #EC7B2E;
  --band-mid: #E4A11B;
  --band-good: #6AA534;
  --band-best: #1F9D63;
  --ink-best: #12744A;
  --ink-good: #4A7A1E;
  --ink-mid: #8F6100;
  --ink-poor: #B2342B;
  --tint-best: #E2F3E9;
  --tint-good: #ECF4E0;
  --tint-poor: #FAE2DF;
  --neutral: #3468C2;
  --glow: rgba(52, 184, 122, 0.55);
  --glow-soft: rgba(52, 184, 122, 0.22);
  --glow-shadow: rgba(31, 157, 99, 0.40);
  --card-shadow: 0 1px 2px rgba(23, 21, 19, 0.05), 0 12px 32px -8px rgba(23, 21, 19, 0.14);
  --head-bg: rgba(251, 250, 249, 0.78);
  --round: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --text: system-ui, -apple-system, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-pop: cubic-bezier(.2, .9, .25, 1.18);
  --section: 96px;
  color-scheme: light dark;
  interpolate-size: allow-keywords;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F0E0D;
    --surface: #1B1917;
    --ink: #F4F1ED;
    --muted: #ABA49C;
    --line: #332F2B;
    --soft: #272421;
    --blush: #3A2321;
    --peach: #2A1F18;
    --mint: #12261C;
    --sheet: #171412;
    --lychee: #F2566A;
    --link: #FF8A97;
    --ink-best: #5FD199;
    --ink-good: #A2D46F;
    --ink-mid: #F5C866;
    --ink-poor: #F28D84;
    --tint-best: rgba(52, 184, 122, 0.16);
    --tint-good: rgba(134, 192, 76, 0.16);
    --tint-poor: rgba(238, 106, 95, 0.16);
    --neutral: #6F9BE6;
    --glow: rgba(52, 184, 122, 0.50);
    --glow-soft: rgba(52, 184, 122, 0.18);
    --glow-shadow: rgba(52, 184, 122, 0.38);
    --card-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 16px 40px -12px rgba(0, 0, 0, 0.6);
    --head-bg: rgba(15, 14, 13, 0.72);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; }
/* Soft glow fields from the app palette, painted on the page itself so nothing is cut at a section edge */
body.page-index { background: radial-gradient(720px 620px at calc(100% - 80px) 40px, var(--blush), transparent 70%), radial-gradient(620px 560px at -40px 700px, var(--mint), transparent 70%), var(--bg); background-repeat: no-repeat; }
body:not(.page-index) { background: radial-gradient(620px 420px at 88% -40px, var(--blush), transparent 70%), radial-gradient(560px 380px at 6% -60px, var(--mint), transparent 70%), var(--bg); background-repeat: no-repeat; }
p { margin: 0 0 14px; }

a { color: var(--link); text-decoration-line: underline; text-decoration-color: color-mix(in srgb, var(--link) 35%, transparent); text-underline-offset: 0.2em; text-decoration-thickness: 1.5px; transition: text-decoration-color .2s, color .2s; }
a:hover { text-decoration-color: currentColor; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--lychee); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(100% - 40px, 1080px); margin-inline: auto; }
.prose-wrap { width: min(100% - 40px, 700px); margin-inline: auto; }
.muted { color: var(--muted); }

/* ---------- Header: stays on top, gets a hairline once the page scrolls */
.site-head {
  position: sticky; top: 0; z-index: 20;
  background: var(--head-bg);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, background-color .25s;
}
.site-head.scrolled { border-bottom-color: var(--line); }
.js .site-head:not(.scrolled) { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.site-head .wrap { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; min-height: 68px; padding-block: 12px; }
.brand { margin-right: auto; display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--round); font-weight: 800; font-size: 22px; letter-spacing: -0.01em; }
.brand img { width: 36px; height: 36px; border-radius: 10px; box-shadow: 0 1px 3px rgba(23, 21, 19, 0.12); transition: transform .3s var(--ease-pop); }
.brand:hover img { transform: rotate(-8deg) scale(1.06); }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px; font-size: 15px; }
.site-nav a { color: var(--muted); text-decoration: none; padding: 6px 12px; border-radius: 999px; transition: background-color .2s, color .2s; }
.site-nav a:hover { color: var(--ink); background: var(--soft); }
.site-nav a[aria-current="page"] { color: var(--ink); background: var(--soft); }
.lang { color: var(--ink); font-weight: 600; font-size: 15px; text-decoration: none; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); transition: background-color .2s, border-color .2s; }
.lang:hover { background: var(--soft); border-color: transparent; }

/* ---------- Hero: soft glow fields from the app palette, then the scan → score moment */
.hero { position: relative; overflow-x: clip; padding: 56px 0 var(--section); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); gap: 48px; align-items: center; }
.hero h1 { font-family: var(--round); font-weight: 800; font-size: clamp(42px, 6.2vw, 72px); line-height: 1.03; letter-spacing: -0.028em; margin: 0 0 20px; text-wrap: balance; }
.hero .lead { font-size: clamp(18px, 2vw, 21px); line-height: 1.5; color: var(--muted); margin: 0 0 28px; max-width: 31em; text-wrap: pretty; }
.soon { display: inline-flex; align-items: center; gap: 10px; font-family: var(--round); font-weight: 700; font-size: 16px; padding: 12px 20px; border-radius: 999px; background: var(--ink); color: var(--bg); }
.soon::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--band-best); box-shadow: 0 0 0 4px color-mix(in srgb, var(--band-best) 30%, transparent); }

.hero-art { position: relative; justify-self: center; width: min(100%, 400px); }
.hero-art::before { content: ""; position: absolute; inset: -20%; border-radius: 50%; background: radial-gradient(closest-side, var(--glow) 0%, var(--glow) 45%, var(--glow-soft) 70%, transparent 100%); }
.hero-art::after { content: ""; position: absolute; left: 18%; right: 18%; bottom: -2%; height: 9%; border-radius: 50%; background: radial-gradient(closest-side, var(--glow-shadow), transparent); }
.hero-art img { position: relative; z-index: 1; width: 100%; height: auto; display: block; }

/* The 0–10 scale with its example marker */
.scale { margin: 40px 0 0; max-width: 500px; }
.scale-track { position: relative; padding-top: 38px; }
.scale-bar { display: flex; gap: 5px; height: 14px; }
.scale-bar span { border-radius: 7px; }
.scale-bar .poor { flex: 25; background: var(--band-poor); }
.scale-bar .weak { flex: 20; background: var(--band-weak); }
.scale-bar .mid { flex: 20; background: var(--band-mid); }
.scale-bar .good { flex: 15; background: var(--band-good); }
.scale-bar .best { flex: 20; background: var(--band-best); }
.marker { position: absolute; top: 0; left: var(--at); transform: translateX(-50%); }
.marker b { display: block; font-family: var(--round); font-weight: 800; font-size: 15px; line-height: 1; color: #fff; background: var(--band-best); padding: 7px 10px; border-radius: 999px; box-shadow: 0 6px 16px -4px color-mix(in srgb, var(--band-best) 70%, transparent); }
.marker::after { content: ""; position: absolute; left: 50%; bottom: -6px; width: 10px; height: 10px; background: var(--band-best); transform: translateX(-50%) rotate(45deg); border-radius: 2px; z-index: -1; }
.scale-nums { display: flex; justify-content: space-between; font-family: var(--round); font-weight: 700; font-size: 14px; color: var(--muted); margin-top: 8px; }
.scale-note { font-size: 14px; color: var(--muted); margin: 4px 0 0; }

/* ---------- Sections */
.block { padding: var(--section) 0; }
.block h2 { font-family: var(--round); font-weight: 800; font-size: clamp(28px, 3.4vw, 38px); line-height: 1.12; letter-spacing: -0.018em; margin: 0 0 24px; text-wrap: balance; }

.features { background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--soft) 55%, transparent) 40%, transparent); }
.feat-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 64px; align-items: center; }
.points { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; max-width: 34em; }
.points li { position: relative; padding-left: 30px; }
.points li::before { content: ""; position: absolute; left: 2px; top: 0.5em; width: 12px; height: 12px; border-radius: 50%; background: var(--dot, var(--band-best)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--dot, var(--band-best)) 18%, transparent); }
.points li:nth-child(5n+1) { --dot: var(--band-best); }
.points li:nth-child(5n+2) { --dot: var(--band-good); }
.points li:nth-child(5n+3) { --dot: var(--band-mid); }
.points li:nth-child(5n+4) { --dot: var(--band-weak); }
.points li:nth-child(5n+5) { --dot: var(--band-poor); }
.points b { font-weight: 650; }

/* Example product card (an illustration, not real data) */
.example { margin: 0; }
.example figcaption { font-size: 14px; color: var(--muted); margin: 0 0 10px 6px; }
.ex-card { background: var(--surface); border-radius: 28px; padding: 24px; box-shadow: var(--card-shadow); border: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.ex-top { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.ring { --p: var(--score); flex: none; width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--band-good) calc(var(--p) * 1%), var(--soft) 0); position: relative; transition: --p .7s var(--ease-out) .05s; }
.ring::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--surface); }
.ring span { position: relative; font-family: var(--round); font-weight: 800; font-size: 24px; }
.ex-name { font-family: var(--round); font-weight: 750; font-size: 19px; margin: 0 0 2px; }
.ex-band { margin: 0; font-size: 15px; font-weight: 600; color: var(--ink-good); }
.ex-h { font-size: 13px; font-weight: 650; color: var(--muted); margin: 18px 0 8px; }
.ex-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ex-list li { font-size: 15px; font-weight: 600; padding: 6px 12px; border-radius: 999px; }
.ex-list.plus li { background: var(--tint-best); color: var(--ink-best); }
.ex-list.minus li { background: var(--tint-poor); color: var(--ink-poor); }
.ex-ingr { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.ex-ingr li { display: flex; align-items: center; gap: 10px; font-size: 15px; padding: 9px 0; border-top: 1px solid var(--line); }
.ex-ingr li:first-child { border-top: 0; padding-top: 2px; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot.green { background: var(--band-best); }
.dot.amber { background: var(--band-mid); }
.dot.blue { background: var(--neutral); }

/* Database and plans on one warm sheet */
.sheet { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; padding: 56px; border-radius: 36px; background: radial-gradient(120% 140% at 0% 0%, var(--peach), transparent 60%), radial-gradient(120% 140% at 100% 100%, var(--mint), transparent 60%), var(--sheet); border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.big-num { font-family: var(--round); font-weight: 800; font-size: clamp(54px, 7vw, 84px); line-height: 1; letter-spacing: -0.035em; margin: 0 0 6px; color: var(--ink); }
.block .num-h { font-size: clamp(20px, 2.2vw, 24px); font-weight: 700; letter-spacing: -0.01em; margin: 0 0 18px; color: var(--muted); }
.plans { margin: 0 0 18px; display: grid; gap: 12px; }
.plans div { background: var(--surface); border-radius: 20px; padding: 16px 18px; box-shadow: 0 1px 2px rgba(23, 21, 19, 0.05); }
.plans dt { font-family: var(--round); font-weight: 800; font-size: 18px; margin: 0 0 4px; }
.plans dd { margin: 0; color: var(--muted); }
.plans .pro { outline: 2px solid color-mix(in srgb, var(--band-best) 55%, transparent); outline-offset: -2px; }
.plans .pro dt { color: var(--ink-best); }
.note { display: flex; gap: 14px; align-items: flex-start; margin: 28px 0 0; padding: 18px 22px; border-radius: 20px; background: var(--soft); color: var(--muted); font-size: 16px; max-width: 760px; }
.note::before { content: "i"; flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-family: var(--round); font-weight: 800; font-size: 14px; color: var(--bg); background: var(--neutral); margin-top: 1px; }

.dev-block { padding-top: 0; }
.sheet-block { padding-top: 0; }
.dev { display: flex; gap: 20px; align-items: center; }
.dev > img { width: 72px; height: 72px; border-radius: 18px; flex: none; box-shadow: 0 6px 18px -6px rgba(23, 21, 19, 0.25); }
.dev p { margin: 0; }
.dev .social { margin-top: 10px; }

/* Instagram: the official gradient glyph from Meta's brand pack, unaltered */
.ig { display: inline-flex; align-items: center; gap: 8px; vertical-align: middle; font-weight: 600; }
.ig img { width: 22px; height: 22px; display: block; transition: transform .25s var(--ease-pop); }
.ig:hover img { transform: scale(1.12); }
.ig-only { display: inline-flex; padding: 4px; border-radius: 10px; }
.ig-only img { width: 24px; height: 24px; display: block; transition: transform .25s var(--ease-pop); }
.ig-only:hover img { transform: scale(1.12); }

/* Ingredient breakdown illustration: a made-up pack, arrows to what is good, what to watch and what is neutral */
.anatomy { padding-top: 0; }
.anatomy h2, .anatomy .sub { text-align: center; margin-inline: auto; }
.anatomy .sub { color: var(--muted); font-size: 18px; max-width: 34em; margin-bottom: 48px; text-wrap: balance; }
.anat { display: grid; grid-template-columns: minmax(0, 1fr) 280px minmax(0, 1fr); grid-template-areas: "left pack right" ". bottom ."; column-gap: 96px; row-gap: 28px; align-items: center; }
.anat-left { grid-area: left; }
.anat-right { grid-area: right; }
.anat-pack { grid-area: pack; position: relative; }
.anat-bottom { grid-area: bottom; }
.anat ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.call { position: relative; background: var(--surface); border-radius: 22px; padding: 16px 18px 16px 20px; box-shadow: var(--card-shadow); display: grid; gap: 2px; }
.call .tag { justify-self: start; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; margin-bottom: 6px; }
.call b { font-family: var(--round); font-weight: 800; font-size: 18px; line-height: 1.25; }
.call-note { color: var(--muted); font-size: 15px; line-height: 1.45; }
.call.good .tag { background: var(--tint-best); color: var(--ink-best); }
.call.bad .tag { background: var(--tint-poor); color: var(--ink-poor); }
.call.neutral .tag { background: color-mix(in srgb, var(--neutral) 14%, transparent); color: var(--neutral); }
.call.good { --arrow: var(--band-best); }
.call.bad { --arrow: var(--band-poor); }
.call.neutral { --arrow: var(--neutral); text-align: center; }
.call.neutral .tag { justify-self: center; }
.arw { position: absolute; width: 72px; height: 40px; overflow: visible; }
.arw path { fill: none; stroke: var(--arrow); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.anat-left .arw { right: -84px; top: 50%; margin-top: -20px; }
.anat-right .arw { left: -84px; top: 50%; margin-top: -20px; transform: scaleX(-1); }
.call.up .arw { width: 40px; height: 56px; left: 50%; top: -64px; margin-left: -20px; }
.anat-pack::before { content: ""; position: absolute; inset: 4% -10% 2%; border-radius: 50%; background: radial-gradient(closest-side, rgba(236, 140, 64, 0.22), transparent); }
.pack-svg { position: relative; display: block; width: 100%; height: auto; }
.pk-t1 { font-family: var(--round); font-weight: 800; font-size: 24px; fill: #5A3218; }
.pk-t2 { font-family: var(--round); font-weight: 700; font-size: 17px; fill: #FFF8F0; }
.pack-score { position: absolute; top: -18px; right: -30px; display: grid; justify-items: center; gap: 6px; }
.pack-score .ring { width: 64px; height: 64px; box-shadow: var(--card-shadow); background: conic-gradient(var(--ring-color, var(--band-good)) calc(var(--p) * 1%), var(--soft) 0); }
.pack-score .ring::before { inset: 7px; }
.pack-score .ring span { font-size: 20px; }
.ring-weak { --ring-color: var(--band-weak); }
.pack-band { font-size: 12px; font-weight: 700; color: #fff; background: var(--band-weak); padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.anat-note { text-align: center; font-size: 13px; color: var(--muted); margin: 32px 0 0; }

@media (max-width: 980px) {
  .anat { grid-template-columns: 1fr; grid-template-areas: "pack" "left" "right" "bottom"; row-gap: 22px; max-width: 520px; margin-inline: auto; }
  .anat-pack { width: 220px; justify-self: center; margin-bottom: 18px; }
  .arw { display: none; }
  .call { padding-left: 22px; border-left: 5px solid var(--arrow); }
  .call.neutral { text-align: left; }
  .call.neutral .tag { justify-self: start; }
  .pack-score { right: -54px; }
}

@media (prefers-reduced-motion: no-preference) {
  .js .anat:not(.in) .anat-pack { opacity: 0; transform: scale(.9); }
  .js .anat:not(.in) .call { opacity: 0; }
  .js .anat:not(.in) .anat-left .call { transform: translateX(-16px); }
  .js .anat:not(.in) .anat-right .call { transform: translateX(16px); }
  .js .anat:not(.in) .anat-bottom .call { transform: translateY(16px); }
  .js .anat:not(.in) .arw path { stroke-dashoffset: 1; }
  .js .anat:not(.in) .pack-score { opacity: 0; transform: scale(.6); }
  .js .anat:not(.in) .pack-score .ring { --p: 0; }
  .anat-pack { transition: opacity .3s var(--ease-out), transform .35s var(--ease-pop); }
  .call { transition: opacity .28s var(--ease-out), transform .28s var(--ease-out); transition-delay: calc(var(--i) * 40ms + .05s); }
  .arw path { stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-dashoffset .28s var(--ease-out); transition-delay: calc(var(--i) * 40ms + .12s); }
  .arw path.head { transition-delay: calc(var(--i) * 40ms + .36s); transition-duration: .1s; }
  .pack-score { transition: opacity .25s var(--ease-pop) .12s, transform .3s var(--ease-pop) .12s; }
  .pack-score .ring { transition: --p .5s var(--ease-out) .15s; }
}

/* ---------- Legal and support pages */
.doc { position: relative; isolation: isolate; padding: 40px 0 var(--section); }
.doc h1 { font-family: var(--round); font-weight: 800; font-size: clamp(36px, 5vw, 52px); line-height: 1.06; letter-spacing: -0.024em; margin: 8px 0 8px; text-wrap: balance; }
.doc .updated { color: var(--muted); font-size: 15px; margin: 0 0 28px; }
.doc .intro { font-size: 19px; line-height: 1.55; margin: 0 0 28px; text-wrap: pretty; }
.doc h2 { font-family: var(--round); font-weight: 750; font-size: 24px; line-height: 1.25; letter-spacing: -0.01em; margin: 44px 0 12px; }
.doc ul { margin: 0 0 14px; padding-left: 22px; }
.doc li { margin-bottom: 8px; }
.doc li::marker { color: var(--muted); }
.summary { background: var(--surface); border-radius: 22px; padding: 20px 24px; margin: 0 0 8px; box-shadow: var(--card-shadow); }
.summary ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.summary li { position: relative; padding-left: 30px; margin: 0; }
.summary li::before { content: ""; position: absolute; left: 0; top: 0.32em; width: 18px; height: 18px; border-radius: 50%; background: var(--tint-best); }
.summary li::after { content: ""; position: absolute; left: 6px; top: 0.58em; width: 6px; height: 3px; border-left: 2px solid var(--ink-best); border-bottom: 2px solid var(--ink-best); transform: rotate(-45deg); }
.contact { background: var(--surface); border-radius: 22px; padding: 20px 24px; margin: 0 0 12px; box-shadow: var(--card-shadow); line-height: 1.9; }
.contact p { margin: 0; }
.contact a { font-weight: 650; }
.contact .muted { display: block; line-height: 1.5; margin-top: 6px; }

.doc-grid { width: min(100% - 40px, 700px); margin-inline: auto; }
.toc { display: none; }
@media (min-width: 1080px) {
  .doc-grid { width: min(100% - 40px, 1080px); display: grid; grid-template-columns: 220px minmax(0, 700px); gap: 72px; }
  .toc { display: block; position: sticky; top: 100px; align-self: start; font-size: 14px; padding-top: 16px; }
  .toc-h { font-weight: 650; color: var(--ink); margin: 0 0 10px; }
  .toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
  .toc li { margin: 0; }
  .toc a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; transition: color .2s, border-color .2s; }
  .toc a:hover { color: var(--ink); border-left-color: var(--band-best); }
}

/* FAQ */
.faq { border-top: 1px solid var(--line); margin-bottom: 8px; }
details { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 650; list-style: none; position: relative; padding: 16px 44px 16px 0; transition: color .2s; }
summary:hover { color: var(--link); }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; margin-top: -7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .25s var(--ease-out); }
details[open] summary::after { transform: rotate(225deg); margin-top: -2px; }
details p { margin: 0 0 18px; padding-right: 32px; color: var(--muted); }
details::details-content { block-size: 0; overflow: hidden; opacity: 0; transition: block-size .28s var(--ease-out), opacity .28s, content-visibility .28s allow-discrete; }
details[open]::details-content { block-size: auto; opacity: 1; }

/* ---------- Footer */
.site-foot { border-top: 1px solid var(--line); padding: 32px 0 44px; font-size: 15px; color: var(--muted); background: color-mix(in srgb, var(--soft) 45%, transparent); }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: space-between; align-items: center; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; }
.site-foot a { color: var(--muted); }
.site-foot a:hover { color: var(--ink); }

/* ---------- Small screens */
@media (max-width: 860px) {
  :root { --section: 64px; }
  body { font-size: 16px; }
  .hero { padding-top: 24px; }
  .hero-grid { grid-template-columns: 1fr; gap: 12px; }
  .hero-art { order: -1; width: 200px; justify-self: center; margin: 4px auto 8px; }
  .feat-grid { grid-template-columns: 1fr; gap: 40px; }
  .sheet { grid-template-columns: 1fr; gap: 36px; padding: 32px 24px; border-radius: 28px; }
  .site-nav { margin-inline: -12px; }
}
@media (max-width: 640px) {
  .site-head { position: static; }
  .site-head .wrap { min-height: 0; padding-block: 14px 6px; }
  .site-nav { order: 3; gap: 0; font-size: 14px; width: 100%; }
  .site-nav a { padding: 6px 10px; }
  .lang { font-size: 14px; padding: 5px 11px; }
}
@media (max-width: 420px) {
  .wrap, .prose-wrap, .doc-grid { width: min(100% - 32px, 1080px); }
  .ex-card { padding: 20px; }
  .dev { align-items: flex-start; }
  .dev > img { width: 56px; height: 56px; border-radius: 14px; }
}

/* ---------- Motion: one load sequence in the hero, one reveal for the example card */
@media (prefers-reduced-motion: no-preference) {
  .hero h1, .hero .lead, .soon { animation: rise .45s var(--ease-out) both; }
  .hero .lead { animation-delay: .05s; }
  .soon { animation-delay: .1s; }
  .hero-art img { animation: pop-in .5s var(--ease-pop) both; }
  .hero-art::before, .hero-art::after { animation: fade-in .5s var(--ease-out) .15s both; }
  .scale-bar span { transform-origin: left center; animation: grow .6s var(--ease-out) both; }
  .scale-bar span { animation-duration: .4s; }
  .scale-bar span:nth-child(1) { animation-delay: .1s; }
  .scale-bar span:nth-child(2) { animation-delay: .14s; }
  .scale-bar span:nth-child(3) { animation-delay: .18s; }
  .scale-bar span:nth-child(4) { animation-delay: .22s; }
  .scale-bar span:nth-child(5) { animation-delay: .26s; }
  .marker { animation: drop .4s var(--ease-pop) .4s both; }

  .js .example:not(.in) .ex-card { opacity: 0; transform: translateY(24px) scale(.98); }
  .js .example:not(.in) .ring { --p: 0; }
  .js .example:not(.in) .ex-list li, .js .example:not(.in) .ex-ingr li { opacity: 0; transform: translateY(6px); }
  .ex-card { transition: opacity .4s var(--ease-out), transform .4s var(--ease-out); }
  .ex-list li, .ex-ingr li { transition: opacity .25s var(--ease-out), transform .25s var(--ease-out); transition-delay: calc(var(--i, 0) * 35ms + .1s); }
}
/* «Reduce motion» on (also Windows with animation effects off): nothing moves, things only fade in quickly */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  details::details-content { transition: none; }
  .hero h1, .hero .lead, .soon, .hero-art img, .hero-art::before, .hero-art::after, .scale { animation: fade-in .4s ease-out both; }
  .hero .lead { animation-delay: .05s; }
  .soon, .hero-art img, .hero-art::before, .hero-art::after { animation-delay: .1s; }
  .scale { animation-delay: .15s; }
  .js .example:not(.in) .ex-card, .js .anat:not(.in) .anat-pack, .js .anat:not(.in) .call, .js .anat:not(.in) .pack-score { opacity: 0; }
  .ex-card, .anat-pack, .call, .pack-score { transition: opacity .35s ease-out; }
  .call { transition-delay: calc(var(--i, 0) * 40ms); }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pop-in { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes grow { from { transform: scaleX(0); opacity: 0; } to { transform: scaleX(1); opacity: 1; } }
@keyframes drop { from { opacity: 0; transform: translate(-50%, -12px) scale(.7); } to { opacity: 1; transform: translateX(-50%); } }
