/* ==========================================================================
   Sakra — prototype design system
   Front-end only. No external requests.
   ========================================================================== */

/* --- Webfont ------------------------------------------------------------
   Mulish, self-hosted (SIL OFL, assets/fonts/OFL.txt) and subset to the
   Latin range this site actually uses. It replaces Avenir Next as the sans
   because Avenir Next has no schwa: Ə (U+018F) and ə (U+0259) are absent
   from the family, so every Azerbaijani word containing them fell back to a
   different typeface mid-word. Mulish keeps Avenir's geometric-humanist
   proportions, so the existing spacing and rhythm are unchanged.

   One variable file covers the 400-700 range the design uses. Still no
   external requests -- the file ships in assets/ and needs no build step.

   Russian needs Cyrillic, which the Latin file leaves out. It is a second
   file with a unicode-range, so the browser only fetches it when Cyrillic
   is on the page: Azerbaijani and English visitors never download it.
   ------------------------------------------------------------------------ */
@font-face {
  font-family: "Mulish";
  src: url("assets/fonts/mulish-var.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Mulish";
  src: url("assets/fonts/mulish-cyrillic-var.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0400-045F, U+2116;
}
/* While Mulish loads, Arial stands in at Mulish's own size and line metrics,
   so the text does not jump when it swaps. Arial carries Ə and ə, like every
   font in the stack (see CLAUDE.md). Measured from the two files: Mulish sets
   2.7% wider; ascent 1005 / descent 250 per 1000. */
@font-face {
  font-family: "Mulish Fallback";
  src: local("Arial"), local("ArialMT");
  size-adjust: 102.7%;
  ascent-override: 97.9%;
  descent-override: 24.3%;
  line-gap-override: 0%;
}
/* Source Serif 4, the one serif (design system, October 2026; SIL OFL,
   assets/fonts/source-serif-4-OFL.txt). It replaces Iowan Old Style, which had
   no capital Ə and was not on Windows or Android. Regular only, as headings are
   400. Three files by unicode-range: Latin, Latin Extended (Ə, ə and the other
   Azerbaijani letters) and Cyrillic, each fetched only when the page needs it. */
@font-face {
  font-family: "Source Serif 4";
  src: url("assets/fonts/source-serif-4-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("assets/fonts/source-serif-4-latin-ext-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("assets/fonts/source-serif-4-cyrillic-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* --- Tokens ------------------------------------------------------------ */
:root {
  /* Brand */
  --header-h: 80px;
  --cream:        #F8F6F2;
  --rust-deep:    #664A3A;
  --rust:         #A85A3A;
  --rose:         #D4949E;

  /* Derived neutrals (all mixed from the four brand colours) */
  --cream-2:      #F2EEE8;   /* quiet panel */
  --cream-3:      #EAE4DB;   /* hairline / inset */
  --ink:          var(--rust-deep);
  --ink-soft:     #7A6154;   /* body copy, still AA on cream */
  --ink-muted:    #77604F;   /* meta / captions, placeholders */
  --rust-dark:    #8E4A2E;   /* CTA hover */
  --rust-text:    #93482B;   /* rust used as small text (AA on cream + tints) */
  --rust-tint:    #F2E4DB;   /* soft rust wash */
  --rose-tint:    #F6EBEC;
  --line:         #E3DBD1;
  --line-strong:  #D3C7B9;
  --white:        #FFFFFF;

  /* Type */
  --serif: "Source Serif 4", "Baskerville", "Palatino Linotype", "Book Antiqua", "Times New Roman", serif;
  /* Mulish first; the fallbacks are ordered so that every one of them also
     carries Ə/ə, in case the webfont fails to load. */
  --sans:  "Mulish", "Mulish Fallback", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  /* The type scale. Text up to a small heading uses one of these and nothing
     in between (h4 down to 2xs); the larger display sizes and prices are set
     where they are used. */
  --fs-display: clamp(2.35rem, 1.7rem + 2.7vw, 4.35rem);
  --fs-h1:      clamp(2.1rem, 1.45rem + 2.7vw, 3.9rem);
  --fs-h2:      clamp(1.75rem, 1.32rem + 1.8vw, 2.9rem);
  --fs-h3:      clamp(1.24rem, 1.1rem + 0.6vw, 1.6rem);
  --fs-lead:    clamp(1.03rem, 0.98rem + 0.35vw, 1.24rem);
  --fs-body:    clamp(1rem, 0.97rem + 0.16vw, 1.075rem);
  --fs-h4:      1.25rem;
  --fs-sm:      0.9375rem;
  --fs-xs:      0.8125rem;
  --fs-2xs:     0.72rem;    /* micro labels: counts, stamps, eyebrows on a phone */

  /* Space */
  --gutter: clamp(1.25rem, 0.7rem + 2.2vw, 2.75rem);
  --sect-y:  clamp(2.75rem, 1.6rem + 4vw, 5.25rem);
  --sect-y-sm: clamp(2.25rem, 1.4rem + 2.6vw, 3.5rem);
  --maxw: 1240px;
  --maxw-narrow: 720px;

  /* Shape */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-pill: 999px;

  /* One elevation scale, tinted with the brand's rust rather than grey. */
  --shadow-soft: 0 1px 2px rgba(102,74,58,.06), 0 10px 30px -16px rgba(168,90,58,.26);
  --shadow-lift: 0 2px 6px rgba(102,74,58,.07), 0 24px 52px -22px rgba(168,90,58,.38);
  --shadow-press: 0 1px 2px rgba(102,74,58,.08), 0 4px 12px -6px rgba(168,90,58,.3);
  --spring: cubic-bezier(.34, 1.36, .64, 1);

  --ease: cubic-bezier(.22,.61,.36,1);
  --dur: .42s;
}

/* --- Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* Behind the page: a soft cream gradient, never the browser's white. It shows
   only while the page is hidden for translating (.i18n-pending) or fading in
   after a language switch, so the switch reads as one calm cream moment. */
html { background-color: #F8F6F2; }
html.i18n-pending, html.lang-arrive { background-image: linear-gradient(165deg, #F8F6F2 0%, #F4EDE6 48%, #F6ECEC 100%); background-attachment: fixed; }
body, h1, h2, h3, h4, p, figure, blockquote, ul, ol, dl, dd, fieldset { margin: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }
fieldset { border: 0; padding: 0; min-width: 0; }
img, svg, video { display: block; max-width: 100%; }
/* An image with an AVIF copy is wrapped in <picture>; the wrapper takes no
   part in layout, so the image sits exactly where it did. */
picture { display: contents; }
/* With the wrapper out of layout, its <source> would otherwise become a grid
   or flex item of its own and push the image along a column. */
picture > source { display: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }

html { overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h, 80px) + 16px); }
/* Sakra's own scrollbar: a rose-to-rust pill floating on cream. Chrome, Edge
   and Safari draw it from the ::-webkit-scrollbar parts below, which they
   ignore the moment scrollbar-width or scrollbar-color is set on an element,
   so those two appear only in the Firefox block. (Phones draw their own
   overlay bars and cannot be styled; the quiz's answer lists get a drawn rail
   instead, .answer-rail.) */
::-webkit-scrollbar { width: 12px; height: 12px; background: transparent; }
::-webkit-scrollbar-track { background: transparent; }
/* The thumb is drawn only while its element scrolls (.is-scrolling, set by
   initScrollbars() in app.js) or while the pointer is on it; the rest of the
   time the bar is invisible. */
::-webkit-scrollbar-thumb {
  background: transparent; border: 3px solid transparent; border-radius: 999px; min-height: 40px;
}
.is-scrolling::-webkit-scrollbar-thumb, ::-webkit-scrollbar-thumb:hover, ::-webkit-scrollbar-thumb:active {
  background: linear-gradient(180deg, #D4949E, #A85A3A) padding-box;
}
.is-scrolling::-webkit-scrollbar-thumb:horizontal, ::-webkit-scrollbar-thumb:horizontal:hover {
  background: linear-gradient(90deg, #D4949E, #A85A3A) padding-box;
}
::-webkit-scrollbar-thumb:hover { border-width: 2px; }
::-webkit-scrollbar-corner { background: transparent; }
/* The page's own scrollbar is Sakra's (.page-rail, initPageScrollbar() in
   app.js), floating over the page. The browser's is hidden, so no strip is
   reserved beside the full-width hero. Chrome styles the page's scrollbar
   from body::-webkit-scrollbar, not html's. Lists and panels inside the
   page keep the styling above. The dashboard (html.dash-on) keeps the
   browser's own, as its design does. */
html:not(.dash-on) { scrollbar-width: none; }
html:not(.dash-on)::-webkit-scrollbar, html:not(.dash-on) body::-webkit-scrollbar { width: 0; height: 0; display: none; }
@supports (-moz-appearance: none) {
  * { scrollbar-width: thin; scrollbar-color: transparent transparent; }
  .is-scrolling { scrollbar-color: #C0786A transparent; }
  html:not(.dash-on) { scrollbar-width: none; }
  html.dash-on { scrollbar-width: auto; scrollbar-color: auto; }
}
.page-rail {
  position: fixed; top: 6px; bottom: 6px; right: 2px; z-index: 250; width: 12px;
  opacity: 0; transition: opacity .35s var(--ease); pointer-events: none;
}
.page-rail[hidden], html.cam-open .page-rail { display: none; }
.page-rail.is-on, .page-rail.is-drag { opacity: 1; }
@media (hover: hover) and (pointer: fine) { .page-rail { pointer-events: auto; } .page-rail:hover { opacity: 1; } }
.page-rail__thumb {
  position: absolute; top: 0; right: 2px; width: 6px; min-height: 36px; border-radius: 999px;
  background: linear-gradient(180deg, #D4949E, #A85A3A);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .55), 0 2px 8px -2px rgba(102, 74, 58, .35);
  transition: width .2s var(--ease);
  cursor: grab; touch-action: none;
}
.page-rail:hover .page-rail__thumb, .page-rail.is-drag .page-rail__thumb { width: 8px; }
.page-rail.is-drag .page-rail__thumb { cursor: grabbing; }
@media print { .page-rail { display: none !important; } }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.65;
  letter-spacing: .002em;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1, h2, h3, .serif { font-family: var(--serif); font-weight: 400; letter-spacing: -.012em; }
h1 { font-size: var(--fs-h1); line-height: 1.06; }
h2 { font-size: var(--fs-h2); line-height: 1.1; }
h3 { font-size: var(--fs-h3); line-height: 1.24; letter-spacing: -.006em; }
p { max-width: 66ch; }
a { color: inherit; }

::selection { background: var(--rust-tint); color: var(--rust-deep); }
/* The rest of the "selected" look a page controls on a phone: the flash on
   tap, the text caret and native controls. (The copy menu itself is the
   system's.) */
html { -webkit-tap-highlight-color: rgba(168, 90, 58, .14); accent-color: var(--rust); }
input, textarea { caret-color: var(--rust); }

:focus-visible {
  outline: 2px solid var(--rust);
  outline-offset: 3px;
  border-radius: 3px;
  box-shadow: 0 0 0 7px rgba(168, 90, 58, .14);   /* a soft halo that follows the shape */
}

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 200;
  background: var(--rust-deep); color: var(--cream);
  padding: .7rem 1.1rem; border-radius: var(--r-sm); font-size: var(--fs-sm);
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 1rem; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* --- Layout helpers ----------------------------------------------------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: 860px; }
.section { padding-block: var(--sect-y); }
.section--tight { padding-block: var(--sect-y-sm); }
.section--panel { background: var(--cream-2); }
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

.eyebrow {
  font-size: var(--fs-xs);
  letter-spacing: .02em;
  font-weight: 600;
  color: var(--rust-text);
  margin-bottom: .9rem;
}
.eyebrow--onDark { color: #F6DFDF; }

.lead { font-size: var(--fs-lead); color: var(--ink-soft); line-height: 1.6; }
.muted { color: var(--ink-muted); }
.small { font-size: var(--fs-sm); }
.xs { font-size: var(--fs-xs); }

.stack > * + * { margin-top: 1.1rem; }
.stack-sm > * + * { margin-top: .55rem; }
.stack-lg > * + * { margin-top: 1.9rem; }

/* --- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 52px; padding: .85rem 1.65rem;
  font-size: var(--fs-sm); font-weight: 600; letter-spacing: .005em;
  border-radius: 11px;   /* softer than --r-sm: 6 px read as hard and bold */
  text-decoration: none; text-align: center;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease), transform .2s var(--ease), box-shadow var(--dur) var(--ease);
  border: 1.5px solid transparent;
}
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--rust); color: #FFF9F4; box-shadow: 0 10px 24px -14px rgba(168,90,58,.75); }
.btn--primary:hover { background: var(--rust-dark); box-shadow: 0 14px 30px -14px rgba(142,74,46,.8); }

.btn--ghost { border-color: var(--line-strong); color: var(--rust-deep); background: transparent; }
.btn--ghost:hover { border-color: var(--rust-deep); background: rgba(102,74,58,.045); }

.btn--onDark { border-color: rgba(248,246,242,.6); color: var(--cream); background: rgba(248,246,242,.06); }
.btn--onDark:hover { background: var(--cream); color: var(--rust-deep); border-color: var(--cream); }

.btn--light { background: var(--cream); color: var(--rust-deep); }
.btn--light:hover { background: #fff; }

.btn--quiet { min-height: 44px; padding: .55rem .95rem; font-weight: 600; color: var(--ink-soft); }
.btn--quiet:hover { color: var(--rust-deep); background: rgba(102,74,58,.05); }

.btn[disabled], .btn[aria-disabled="true"] {
  opacity: .45; cursor: not-allowed; transform: none; box-shadow: none;
}

/* Destructive: always behind a confirm step that names what will be lost. */
.btn--danger { background: #93482B; color: #FFFDFB; }
.btn--danger:hover { background: #8E2C23; }

/* Loading: the label says what is happening and a 14 px ring turns beside it.
   Set aria-busy="true" with the class; the width holds and taps are ignored. */
.btn.is-loading { pointer-events: none; opacity: .85; }
.btn.is-loading::before {
  content: ""; flex: none; width: 14px; height: 14px; box-sizing: border-box;
  border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent;
  opacity: .9; animation: btn-ring .8s linear infinite;
}
@keyframes btn-ring { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .btn.is-loading::before { animation: none; } }

.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }

.link-arrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: var(--fs-sm); font-weight: 600; color: var(--rust-text);
  text-decoration: none; padding: .35rem 0; min-height: 44px;
  border-bottom: 1.5px solid var(--rust-tint);
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease), gap var(--dur) var(--ease);
}
.link-arrow:hover { border-color: var(--rust); gap: .8rem; color: var(--rust-dark); }
.link-arrow::after { content: "\2192"; font-size: 1.05em; line-height: 1; }

/* --- Header ------------------------------------------------------------- */
.header {
  position: sticky; top: 0; z-index: 90;
  padding-block: .85rem;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color .35s var(--ease), border-color .35s var(--ease), backdrop-filter .35s var(--ease), padding .35s var(--ease);
  padding-top: max(.85rem, env(safe-area-inset-top));
}
.header.is-stuck {
  background: rgba(248,246,242,.93);
  -webkit-backdrop-filter: saturate(1.15) blur(12px);
  backdrop-filter: saturate(1.15) blur(12px);
  border-bottom-color: var(--line);
  padding-block: .6rem;
}
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; flex-shrink: 0; }
.brand__mark { width: 38px; height: 38px; object-fit: contain; }
.brand__word {
  font-family: var(--serif); font-size: 1.32rem; letter-spacing: .19em;
  text-transform: uppercase; color: var(--rust-deep); line-height: 1;
  padding-left: .08em;
}
.brand--footer .brand__mark { width: 44px; height: 44px; filter: brightness(0) invert(1); }
.brand--footer .brand__word { color: var(--cream); font-size: 1.5rem; }

.nav { display: flex; align-items: center; gap: .35rem; }
.nav__link {
  text-decoration: none; font-size: var(--fs-sm); font-weight: 500;
  color: var(--ink-soft); padding: .6rem .85rem; border-radius: var(--r-sm);
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.nav__link:hover { color: var(--rust-deep); background: rgba(102,74,58,.055); }
button.nav__link { border: 0; background: none; font: inherit; font-size: var(--fs-sm); font-weight: 500; cursor: pointer; }

/* Transparent-over-hero state: everything in the header goes light. */
@media (min-width: 901px) {
  .header--overlay:not(.is-stuck) .brand__word { color: #FFF9F4; }
  .header--overlay:not(.is-stuck) .brand__mark { filter: brightness(0) invert(1) opacity(.94); }
  .header--overlay:not(.is-stuck) .nav__link { color: #FFF9F4; }
  .header--overlay:not(.is-stuck) .nav__link:hover { color: #fff; background: rgba(255,255,255,.14); }
}
.header--overlay:not(.is-stuck) .menu-toggle { border-color: rgba(253,246,239,.5); }
.header--overlay:not(.is-stuck) .menu-toggle__bars::before,
.header--overlay:not(.is-stuck) .menu-toggle__bars::after { background: #FFF9F4; }
.header--overlay:not(.is-stuck) .menu-toggle[aria-expanded="true"] .menu-toggle__bars::before,
.header--overlay:not(.is-stuck) .menu-toggle[aria-expanded="true"] .menu-toggle__bars::after { background: var(--rust-deep); }
.header--overlay:not(.is-stuck) .menu-toggle[aria-expanded="true"] { border-color: var(--line-strong); }
@media (max-width: 900px) {
  .header--overlay:not(.is-stuck) .brand__word { color: #FFF9F4; }
  .header--overlay:not(.is-stuck) .brand__mark { filter: brightness(0) invert(1) opacity(.94); }
}
.brand__word, .brand__mark { transition: color .35s var(--ease), filter .35s var(--ease); }
.nav .btn { margin-left: .6rem; }

.menu-toggle {
  display: none;
  position: relative; z-index: 96;
  width: 46px; height: 46px; border-radius: 11px;
  align-items: center; justify-content: center;
  border: 1.5px solid var(--line-strong);
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.menu-toggle:hover { border-color: var(--rust-deep); }
.menu-toggle__bars { display: block; width: 19px; height: 11px; position: relative; }
.menu-toggle__bars::before, .menu-toggle__bars::after {
  content: ""; position: absolute; left: 0; right: 0; height: 1.6px;
  background: var(--rust-deep); border-radius: 2px;
  transition: transform .3s var(--ease), top .3s var(--ease);
}
.menu-toggle__bars::before { top: 0; }
.menu-toggle__bars::after  { top: 9.4px; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::before { top: 4.7px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::after  { top: 4.7px; transform: rotate(-45deg); }

@media (max-width: 900px) {
  .menu-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: 0 0 0 auto; width: min(340px, 88vw);
    background: var(--cream); border-left: 1px solid var(--line);
    flex-direction: column; align-items: stretch; justify-content: flex-start;
    gap: .2rem; padding: 6.2rem var(--gutter) 2rem;
    padding-top: max(6.2rem, calc(env(safe-area-inset-top) + 5.4rem));
    transform: translateX(102%);
    visibility: hidden;
    transition: transform .38s var(--ease), visibility 0s linear .38s;
    box-shadow: -24px 0 60px -30px rgba(102,74,58,.5);
    overflow-y: auto;
    z-index: 95;
  }
  .nav.is-open { transform: translateX(0); visibility: visible; transition: transform .38s var(--ease), visibility 0s; }
  .nav__link { font-family: var(--serif); font-size: var(--fs-h4); padding: .8rem .2rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav__link:hover { background: transparent; }
  .nav .btn { margin: 1.4rem 0 0; width: 100%; }
  /* The header's blur would hold the fixed menu inside the header (at the top
     of the page); while the menu is open, the header has none. */
  body.nav-locked .header { -webkit-backdrop-filter: none; backdrop-filter: none; }
  /* The menu: a floating sheet with rounded corners, numbered links that
     slide in one after another, and the quiz button at the foot. */
  .nav {
    inset: .6rem .6rem .6rem auto; width: min(360px, calc(100vw - 2.4rem)); height: auto;
    border: 1px solid var(--line); border-radius: 24px;
    background: radial-gradient(120% 60% at 100% 0%, rgba(212, 148, 158, .18), rgba(212, 148, 158, 0) 60%), var(--cream);
    padding: 5.2rem 1.4rem calc(1.4rem + env(safe-area-inset-bottom));
    box-shadow: 0 30px 80px -30px rgba(72, 50, 38, .55);
    counter-reset: navi;
  }
  .nav__link {
    display: flex; align-items: baseline; gap: .9rem; padding: 1rem .2rem;
    font-size: clamp(1.35rem, 1.1rem + 1.2vw, 1.6rem); color: var(--rust-deep);
    opacity: 0; transform: translateX(18px); transition: opacity .4s var(--ease), transform .45s var(--ease), color .25s var(--ease);
  }
  .nav__link::before { counter-increment: navi; content: counter(navi, decimal-leading-zero); flex: none; font-family: var(--sans); font-size: var(--fs-2xs); font-weight: 700; color: var(--rust-text); letter-spacing: .04em; transform: translateY(-.2em); }
  .nav__link::after { content: ""; margin-left: auto; flex: none; width: 8px; height: 8px; border-right: 2px solid currentColor; border-top: 2px solid currentColor; transform: rotate(45deg); opacity: .45; transition: opacity .25s var(--ease), transform .25s var(--ease); }
  .nav__link:hover::after, .nav__link:focus-visible::after { opacity: 1; transform: translateX(3px) rotate(45deg); }
  .nav.is-open .nav__link { opacity: 1; transform: none; }
  .nav.is-open .nav__link:nth-child(1) { transition-delay: .08s; }
  .nav.is-open .nav__link:nth-child(2) { transition-delay: .13s; }
  .nav.is-open .nav__link:nth-child(3) { transition-delay: .18s; }
  .nav.is-open .nav__link:nth-child(4) { transition-delay: .23s; }
  .nav .btn { margin-top: auto; opacity: 0; transform: translateY(10px); transition: opacity .4s var(--ease) .28s, transform .45s var(--ease) .28s; }
  .nav.is-open .btn { opacity: 1; transform: none; }
  .menu-toggle { position: relative; z-index: 96; }
  .nav-scrim { -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
  @media (prefers-reduced-motion: reduce) {
    .nav__link, .nav .btn { opacity: 1; transform: none; transition: none; }
  }
  .nav-scrim {
    position: fixed; inset: 0; background: rgba(72,50,38,.42);
    opacity: 0; pointer-events: none; transition: opacity .35s var(--ease); z-index: 85;
  }
  .nav-scrim.is-open { opacity: 1; pointer-events: auto; }
  html.nav-locked { overflow: hidden; }
}
@media (min-width: 901px) { .nav-scrim { display: none; } }

/* --- Hero --------------------------------------------------------------- */
.hero { position: relative; }
.hero__media {
  position: relative;
  min-height: 100svh;
  display: grid;
  isolation: isolate;
  overflow: hidden;
  margin-top: calc(-1 * var(--header-h, 80px)); /* slide under the transparent header */
  padding-top: var(--header-h, 80px);
}
.hero__video, .hero__fallback {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
}
/* Stacking order matters: fallback behind, video over it, scrim over both. */
.hero__fallback { z-index: -3; }
.hero__video    { z-index: -2; }
.hero__video { opacity: 0; transition: opacity .8s var(--ease); }
.hero__video.is-playing { opacity: 1; }

/* Warm, intentional brand-gradient fallback with a soft grain/light wash */
.hero__fallback {
  background:
    radial-gradient(58% 52% at 72% 24%, rgba(255,226,206,.62) 0%, rgba(255,226,206,0) 66%),
    radial-gradient(72% 62% at 88% 8%, rgba(212,148,158,.55) 0%, rgba(212,148,158,0) 62%),
    radial-gradient(90% 74% at 6% 96%, rgba(74,50,38,.82) 0%, rgba(74,50,38,0) 64%),
    linear-gradient(152deg, #CE8055 0%, #B4643D 30%, #9A5537 56%, #6E4C39 82%, #55392C 100%);
}
.hero__fallback::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(102deg, rgba(255,255,255,.05) 0 1px, rgba(255,255,255,0) 1px 7px),
    radial-gradient(58% 46% at 66% 30%, rgba(255,245,235,.22) 0%, rgba(255,245,235,0) 70%);
  mix-blend-mode: soft-light;
}
.hero__scrim {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(48,30,22,.56) 0%, rgba(48,30,22,.34) 34%, rgba(48,30,22,.5) 62%, rgba(48,30,22,.82) 100%),
    linear-gradient(96deg, rgba(48,30,22,.34) 0%, rgba(48,30,22,.1) 46%, rgba(48,30,22,0) 72%);
}
@media (max-width: 900px) {
  .hero__scrim {
    background:
      linear-gradient(180deg, rgba(44,27,20,.62) 0%, rgba(44,27,20,.5) 34%, rgba(44,27,20,.62) 62%, rgba(44,27,20,.86) 100%);
  }
}
.hero__placeholder-tag {
  position: absolute; right: var(--gutter); bottom: clamp(1.1rem, .6rem + 1.2vw, 1.9rem); z-index: 2;
  font-size: var(--fs-xs); letter-spacing: .02em;
  color: rgba(250,245,240,.92);
  border: 1px solid rgba(248,246,242,.42);
  border-radius: var(--r-pill); padding: .35rem .8rem;
  background: rgba(40,25,18,.5);
}
.hero__video.is-playing ~ .hero__placeholder-tag { display: none; }

.hero__content {
  position: relative; z-index: 1;
  align-self: center;
  width: 100%; max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(2rem, 4vw, 3.5rem) var(--gutter);
  color: var(--cream);
}
.hero__inner { max-width: 54ch; }
.hero h1 { max-width: 15ch; }
.hero h1 { font-size: var(--fs-display); color: #FFF9F4; text-shadow: 0 2px 26px rgba(48,30,22,.4); }
.hero__sub { font-size: var(--fs-lead); color: rgba(252,247,241,.93); margin-top: 1.15rem; max-width: 48ch; }
.hero__note {
  margin-top: 1.6rem; font-size: var(--fs-xs); color: rgba(252,247,242,.95);
}
.hero .btn-row { margin-top: 2rem; }
.hero__signin { margin-top: 1.1rem; font-size: var(--fs-sm); color: rgba(252,247,241,.93); }
.hero__signin-btn { min-height: 44px; border: 0; padding: .35rem .15rem; background: none; font: inherit; font-weight: 700; color: #FFF9F4; text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
.hero__signin-btn:hover { color: #fff; }

/* Short landscape phones: let the hero shrink to its content so the CTAs stay near the fold. */
@media (orientation: landscape) and (max-height: 560px) {
  .hero__media { min-height: 0; padding-bottom: 2.25rem; }
  .hero__content { padding-bottom: 0; }
  .hero h1 { font-size: clamp(2rem, 1.2rem + 3vw, 3rem); }
  .hero__sub { margin-top: .8rem; }
  .hero .btn-row { margin-top: 1.4rem; }
  .hero__note { margin-top: 1rem; }
  .hero__placeholder-tag { display: none; }
}

/* Hero entrance */
.hero__inner > * { opacity: 0; transform: translateY(16px); animation: heroIn .95s var(--ease) forwards; }
.hero__inner > *:nth-child(1) { animation-delay: .06s; }
.hero__inner > *:nth-child(2) { animation-delay: .16s; }
.hero__inner > *:nth-child(3) { animation-delay: .26s; }
.hero__inner > *:nth-child(4) { animation-delay: .36s; }
.hero__inner > *:nth-child(5) { animation-delay: .46s; }
@keyframes heroIn { to { opacity: 1; transform: none; } }

/* --- Insight capsule (hero) ----------------------------------------------
   The liquid-glass pill at the top of the hero, and the insight it opens
   (initCapsule in app.js; design_handoff_hero_insight_capsule/README.md).
   app.js writes the shell's size and place every frame; these rules hold its
   layers, the type and the dialog's layout. */
.hero__media {
  --cap-top: calc(92px + env(safe-area-inset-top));
  /* Type from the site's scale, fluid between two steps like --fs-body: the full
     --fs-xs / --fs-sm from about 440 px, a step down on the smallest phones, so the
     messages fit. The pill's width is measured from the text, so it follows. */
  --cap-h: 56px; --cap-icon: 40px; --cap-gap: 12px; --cap-pad: 0 14px 0 8px;
  --cap-label: clamp(var(--fs-2xs), calc(.45rem + 1.2vw), var(--fs-xs));
  --cap-msg: clamp(var(--fs-xs), calc(.5rem + 1.6vw), var(--fs-sm));
}
@media (max-width: 999px) {
  .hero__media { --cap-h: 52px; --cap-icon: 36px; --cap-gap: 10px; --cap-pad: 0 10px 0 8px; }
}
/* The copy stays centred, but never starts under the capsule on a short window. */
.hero__media:has(> .capsule) {
  grid-template-rows: minmax(max(0px, calc(var(--cap-top) + var(--cap-h) + 20px - var(--header-h, 80px) - clamp(2rem, 4vw, 3.5rem))), 1fr) auto 1fr;
}
.hero__media:has(> .capsule) > .hero__content { grid-row: 2; }

.capsule {
  position: absolute; left: 0; right: 0; top: var(--cap-top); z-index: 2;
  display: flex; justify-content: center; padding: 0 20px;
  pointer-events: none;
}
.capsule__slot { position: relative; width: min(560px, 100%); height: var(--cap-h); }
.capsule__defs { position: absolute; width: 0; height: 0; }
.capsule__shell {
  position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 1000; opacity: 0;
  border-radius: 999px; overflow: hidden;
  -webkit-backdrop-filter: blur(12px) saturate(1.45); backdrop-filter: blur(12px) saturate(1.45);
  box-shadow: 0 14px 34px -16px rgba(36,22,15,.62), 0 2px 8px -3px rgba(36,22,15,.28);
  transform: translateZ(0); will-change: width, height, left, top;
}
.capsule__shell > * { position: absolute; inset: 0; pointer-events: none; }
.capsule__tint { background-color: rgba(44,27,19,.3); transition: background-color 1.2s ease; }
.capsule__gloss { background: linear-gradient(180deg, rgba(255,246,238,.18) 0%, rgba(255,246,238,.05) 42%, rgba(255,246,238,0) 58%, rgba(255,236,222,.07) 100%); }
.capsule__drift {
  inset: auto; top: -60%; left: 0; width: 55%; height: 220%;
  background: radial-gradient(closest-side, rgba(255,226,204,.2), rgba(255,226,204,0));
  mix-blend-mode: screen;
  animation: capsuleDrift 19s ease-in-out infinite alternate;
}
@keyframes capsuleDrift { from { transform: translateX(-40%); } to { transform: translateX(190%); } }
.capsule.is-paused .capsule__drift { animation-play-state: paused; }
.capsule__glint {
  inset: auto; top: -80%; left: 0; width: 220px; height: 260%; opacity: 0;
  background: radial-gradient(closest-side, rgba(255,236,220,.34), rgba(255,236,220,0));
  mix-blend-mode: screen; transition: opacity .5s ease;
}
/* Opened, the pointer's light is a round glow that follows it both ways,
   not the pill's tall band (which in a large dialog reads as a vertical line). */
.capsule__glint.is-round {
  top: 0; width: var(--glint-d, 480px); height: var(--glint-d, 480px);
  background: radial-gradient(circle closest-side, rgba(255,236,220,.3), rgba(255,236,220,.11) 48%, rgba(255,236,220,0));
  transition: opacity .5s ease, transform .16s ease-out;
}
.capsule__sheen {
  opacity: 0; transform: translateX(-110%);
  background: linear-gradient(100deg, rgba(255,246,238,0) 30%, rgba(255,246,238,.2) 50%, rgba(255,246,238,0) 70%);
}
.capsule__rim {
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255,250,244,.45), inset 0 0 0 1px rgba(255,240,230,.16), inset 0 -1px 0 rgba(255,236,220,.12), inset 0 -12px 20px -14px rgba(255,214,186,.35);
}

.capsule__btn {
  position: absolute; left: 0; top: 0; width: 0; height: var(--cap-h); z-index: 1001;
  border-radius: 999px; outline: none; cursor: pointer; pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}
.capsule__btn:focus-visible { outline: 2px solid rgba(255,246,238,.75); outline-offset: 3px; }
.capsule__row { display: flex; align-items: center; gap: var(--cap-gap); height: 100%; padding: var(--cap-pad); white-space: nowrap; }
.capsule__btn .capsule__row { opacity: 0; will-change: opacity, transform; }
.capsule__icon { position: relative; flex: none; width: var(--cap-icon); height: var(--cap-icon); }
.capsule__disc {
  position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center;
  background: rgba(168,90,58,.62);
  box-shadow: inset 0 1px 0 rgba(255,236,222,.3), inset 0 0 0 1px rgba(255,230,214,.12);
}
.capsule__disc > [data-icon] { grid-area: 1 / 1; display: none; }
.capsule__disc > [data-icon].is-on { display: block; }
.capsule__disc svg { width: 18px; height: 18px; fill: none; stroke: #FFF9F4; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.capsule__disc img { width: 20px; height: 20px; filter: brightness(0) invert(1); opacity: .95; }
.capsule__ring {
  /* max-width: none, or the site's img/svg max-width: 100% narrows it off centre. */
  position: absolute; inset: -3px; width: calc(100% + 6px); height: calc(100% + 6px); max-width: none;
  transform: rotate(-90deg); fill: none; stroke: rgba(255,240,230,.24); stroke-width: 1.6; pointer-events: none;
}
/* The time to the next insight: bright enough to read at a glance on a phone. */
.capsule__ring-on { stroke: #FFF9F4; stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset .12s linear; filter: drop-shadow(0 0 2px rgba(255,236,220,.55)); }
.capsule__text { display: flex; flex-direction: column; gap: 1px; flex: 1 1 auto; min-width: 0; line-height: 1.25; }
.capsule__label, .capsule__msg { overflow: hidden; text-overflow: ellipsis; }
.capsule__label { font-size: var(--cap-label); letter-spacing: .01em; color: rgba(253,244,236,.86); }
.capsule__msg { font-size: var(--cap-msg); font-weight: 600; color: #FFF9F4; text-shadow: 0 1px 10px rgba(36,22,15,.28); }
/* The UV card: one serif figure, its WHO band (0-2, 3-5, 6-7, 8-10, 11+) and a scale,
   0 to 12, that takes the rest of the line: one smooth gradient in the palette's warm
   tones in WHO's order, with a marker at the peak. The card's two lines fill the pill's
   height, so there is no room for tick labels. */
.capsule { --uv-0: #C3C9A0; --uv-1: #EEC77C; --uv-2: #E4925E; --uv-3: #C9623F; --uv-4: #A45A80; }
.capsule__msg--uv { display: flex; align-items: center; gap: .4em; overflow: visible; }
.capsule__uv-num { flex: none; font-family: var(--serif); font-size: 1.3em; font-weight: 400; line-height: .9; font-variant-numeric: lining-nums; }
.capsule__msg--uv > span:nth-child(2) { flex: none; white-space: nowrap; }
.capsule__uv-bar {
  position: relative; flex: 1 1 auto; width: 6em; min-width: 4em; height: 7px; margin: 0 2px 0 .5em; border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--uv-0) 0%, var(--uv-0) 12%, var(--uv-1) 37%, var(--uv-2) 58%, var(--uv-3) 79%, var(--uv-4) 96%);
  box-shadow: 0 0 0 1px rgba(36,22,15,.14), inset 0 1px 0 rgba(255,250,244,.3);
}
/* Kept within the bar's rounded ends, so 0 and 12 stay on it. */
.capsule__uv-mark {
  position: absolute; top: 50%; left: calc(7px + var(--p, 0) * (100% - 14px)); width: 14px; height: 14px; border-radius: 50%;
  transform: translate(-50%, -50%); background: var(--c, #FFF9F4);
  box-shadow: 0 0 0 2px #FFF9F4, 0 1px 6px rgba(36,22,15,.55);
}
.capsule__chev {
  flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,244,236,.12); box-shadow: inset 0 0 0 1px rgba(255,240,230,.2);
}
.capsule__chev svg { width: 12px; height: 12px; fill: none; stroke: #FFF9F4; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.capsule__measure { position: absolute; left: 0; top: 0; width: max-content; height: var(--cap-h); visibility: hidden; pointer-events: none; }
.capsule__measure .capsule__chev { background: none; box-shadow: none; }

.capsule__back {
  position: fixed; inset: 0; z-index: 999; display: none; opacity: 0; pointer-events: auto;
  background: rgba(30,18,12,.42); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: opacity .45s ease;
}
.capsule__back.is-on { display: block; }
/* Behind a full-screen dialog only 8 px of it shows: no blur to redraw every frame. */
.capsule__back.is-full { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(30,18,12,.6); }

.capsule-dialog {
  position: fixed; left: 0; top: 0; width: 0; height: 0; z-index: 1002;
  display: none; opacity: 0; color: #FFF9F4; pointer-events: auto;
  touch-action: pan-y; /* a sideways swipe browses; scrolling stays the browser's */
}
.capsule-dialog.is-on { display: block; }
.capsule-dialog__inner { position: absolute; inset: 0; display: flex; gap: 8px; padding: 14px; }
.capsule-dialog__media {
  position: relative; flex: 0 0 42%; min-height: 0; overflow: hidden;
  border-radius: 26px; box-shadow: 0 0 0 1px rgba(255,240,230,.14);
}
.capsule-dialog__media { background: rgba(255,240,230,.06); }
.capsule-dialog__img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; transition: opacity .3s ease; }
.capsule-dialog__media.is-loading .capsule-dialog__img { opacity: 0; transition: none; }
.capsule-dialog__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(40,25,18,0) 55%, rgba(40,25,18,.35) 100%); }
.capsule-dialog__col { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.capsule-dialog__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 18px 6px 28px; }
.capsule-dialog__tag { display: inline-flex; align-items: center; gap: 10px; min-width: 0; font-size: var(--fs-xs); letter-spacing: .02em; color: #F6DFDF; }
.capsule-dialog__tag::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: #D4949E; }
.capsule-dialog__place {
  margin: -12px -6px; padding: 12px 6px; border: 0; background: none; cursor: pointer;
  font: inherit; letter-spacing: inherit; color: #FFF9F4;
  text-decoration: underline dotted rgba(255,249,244,.7); text-underline-offset: .25em;
}
.capsule-dialog__place:hover, .capsule-dialog__place[aria-expanded="true"] { text-decoration-style: solid; }
.capsule-dialog__place:focus-visible, .capsule-dialog__locate:focus-visible { outline: 2px solid rgba(255,246,238,.75); outline-offset: 2px; border-radius: 6px; }
.capsule-dialog__where { margin: 0; font-size: var(--fs-xs); color: rgba(252,244,236,.86); }
.capsule-dialog__locate {
  margin: -10px 0; padding: 10px 2px; border: 0; background: none; cursor: pointer;
  font: inherit; font-weight: 700; color: #FFF9F4; text-decoration: underline; text-underline-offset: .2em;
}
.capsule-dialog__locate[aria-busy="true"] { opacity: .6; cursor: progress; }
.capsule-dialog__status:empty { display: none; }
.capsule-dialog__status { display: block; margin-top: 6px; }

.capsule-dialog__close {
  flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  color: #FFF9F4; background: rgba(255,244,236,.12); box-shadow: inset 0 0 0 1px rgba(255,240,230,.22);
  transition: background-color var(--dur) var(--ease);
}
.capsule-dialog__close:hover { background: rgba(255,244,236,.22); }
.capsule-dialog__close:focus-visible { outline: 2px solid rgba(255,246,238,.75); outline-offset: 3px; }
.capsule-dialog__close svg { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.capsule-dialog__body {
  flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; touch-action: pan-y;
  display: flex; flex-direction: column; gap: 18px; padding: 8px 36px 24px 28px;
}
.capsule-dialog__title {
  margin: 0; font-family: var(--serif); font-weight: 400; letter-spacing: 0;
  font-size: clamp(2rem, 1.4rem + 1.4vw, 2.7rem); line-height: 1.1; color: #FFF9F4; text-wrap: balance;
}
.capsule-dialog__msg { margin: 0; font-size: var(--fs-body); font-weight: 600; line-height: 1.45; }
.capsule-dialog__para { margin: 0; max-width: 56ch; font-size: var(--fs-body); line-height: 1.65; color: rgba(252,244,236,.9); text-wrap: pretty; }
.capsule-dialog__points { list-style: none; margin: 4px 0 0; padding: 0; }
.capsule-dialog__points li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid rgba(255,240,230,.16); font-size: var(--fs-sm); }
.capsule-dialog__points li::before {
  content: ""; flex: none; width: 16px; height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F3C9B4' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.capsule-dialog__source { margin: 0; font-size: var(--fs-xs); color: rgba(252,244,236,.72); }
.capsule-dialog__source a { color: #FFF9F4; text-underline-offset: .2em; }
.capsule-dialog__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 18px 28px 16px; border-top: 1px solid rgba(255,240,230,.16); }
.capsule-dialog__cta { flex: 0 0 auto; padding: 0 26px; border-radius: var(--r-pill); font-size: var(--fs-body); font-weight: 700; }
.capsule-dialog__help { flex: 1 1 auto; font-size: var(--fs-xs); color: rgba(252,244,236,.86); }
.capsule-dialog__inner { will-change: opacity, transform; }
/* The button and the browsing controls share a row, the note sits under them. */
.capsule-dialog__nav { flex: none; order: 2; margin-left: auto; display: flex; align-items: center; gap: 6px; }
.capsule-dialog__foot .capsule-dialog__help { order: 3; flex: 1 1 100%; }
.capsule-dialog__step {
  flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  color: #FFF9F4; background: rgba(255,244,236,.1); box-shadow: inset 0 0 0 1px rgba(255,240,230,.22);
  transition: background-color var(--dur) var(--ease);
}
.capsule-dialog__step:hover { background: rgba(255,244,236,.2); }
.capsule-dialog__step svg { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.capsule-dialog__dots { display: flex; }
.capsule-dialog__dot { width: 24px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.capsule-dialog__dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: rgba(255,240,230,.32); transition: background-color var(--dur) var(--ease), transform var(--dur) var(--ease); }
.capsule-dialog__dot:hover::before { background: rgba(255,240,230,.6); }
.capsule-dialog__dot[aria-current="true"]::before { background: #FFF9F4; transform: scale(1.2); }
.capsule-dialog__step:focus-visible, .capsule-dialog__dot:focus-visible { outline: 2px solid rgba(255,246,238,.75); outline-offset: 3px; }
/* Under 640 px the dialog fills the screen (app.js insets it 8 px inside the safe area). */
.capsule-dialog.is-full .capsule-dialog__inner { flex-direction: column; gap: 0; padding: 10px; }
.capsule-dialog.is-full .capsule-dialog__media { flex: 0 0 34%; border-radius: 22px; }
.capsule-dialog.is-full .capsule-dialog__head { padding: 16px 10px 4px 12px; }
.capsule-dialog.is-full .capsule-dialog__body { padding: 6px 12px 20px; }
.capsule-dialog.is-full .capsule-dialog__title { font-size: 1.85rem; }
.capsule-dialog.is-full .capsule-dialog__foot { padding: 14px 10px 10px; }
.capsule-dialog.is-full .capsule-dialog__cta { flex: 1 1 100%; }
.capsule-dialog.is-full .capsule-dialog__foot { row-gap: 6px; }
/* On a phone the controls come first, centred, then the button. */
.capsule-dialog.is-full .capsule-dialog__nav { order: -1; flex: 1 1 100%; margin-left: 0; justify-content: center; }
.capsule-dialog.is-full .capsule-dialog__help { text-align: center; }
@media (prefers-reduced-motion: reduce) { .capsule__drift { animation: none; opacity: 0; } }
@media print { .capsule { display: none !important; } }

/* --- Section headings --------------------------------------------------- */
.sect-head { max-width: 62ch; }
.sect-head p { margin-top: 1rem; }
.sect-head--split {
  display: grid; grid-template-columns: minmax(0,1.05fr) minmax(0,.95fr);
  gap: clamp(1.5rem, 4vw, 4rem); align-items: end; max-width: none;
}
@media (max-width: 860px) { .sect-head--split { grid-template-columns: 1fr; align-items: start; } }

/* --- Editorial two-column ----------------------------------------------- */
.split {
  display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.08fr);
  gap: clamp(2rem, 5vw, 5rem); align-items: center;
}
.split--reverse .split__media { order: -1; }
@media (min-width: 901px) {
  .split--balanced { align-items: stretch; }
  .split--balanced .split__copy { align-self: center; }
  .split--balanced .split__media,
  .split--balanced .media-stack { height: 100%; }
  .split--balanced .media-stack__img {
    height: 100%;
    min-height: clamp(380px, 34vw, 540px);
    object-fit: cover;
  }
}
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 2.25rem; }
  .split--reverse .split__media { order: 0; }
}
.split__copy { max-width: 56ch; }

/* "Professional support" only: the copy column matches the photograph's width
   and takes a looser vertical rhythm, so five list items beside a picture read
   as editorial rather than packed. Scoped — .split and .flist are shared with
   several other layouts that should not change. */
@media (min-width: 901px) {
  .split--roomy { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
.split--roomy .split__copy { max-width: none; }
.split--roomy .stack > * + * { margin-top: 1.35rem; }
.split--roomy .flist li { padding: 1.35rem 0; }
.split--roomy .flist strong { margin-bottom: .3rem; }
.split--roomy .flist span { line-height: 1.7; }

/* --- Photographs -------------------------------------------------------- */
.figure {
  margin: 0; border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--line); background: var(--cream-2);
  box-shadow: var(--shadow-soft);
}
.figure img { display: block; width: 100%; height: auto; }

/* A photograph and a panel read as one composed block. */
.media-stack { display: grid; gap: 1rem; }
.media-stack__img {
  display: block; width: 100%; height: auto;
  border-radius: var(--r-lg); border: 1px solid var(--line);
  box-shadow: var(--shadow-soft); background: var(--cream-3);
}

/* --- Mock UI surfaces --------------------------------------------------- */
.mock {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.mock__bar {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding: 1.15rem 1.35rem .85rem; border-bottom: 1px solid var(--line);
  background: var(--white); flex-wrap: wrap;
}
@media (max-width: 520px) {
  .mock__bar { gap: .35rem .75rem; }
  .mock__tag { white-space: normal; }
}
.mock__title { font-size: var(--fs-xs); letter-spacing: .02em; color: var(--ink-muted); font-weight: 600; }
.mock__tag {
  font-size: var(--fs-xs); color: var(--ink-muted); background: transparent;
  border-radius: 0; padding: 0; font-weight: 500; white-space: nowrap;
  letter-spacing: .02em;
}
.mock__body { padding: clamp(1.15rem, 3vw, 1.85rem); }

/* Metric rows */
.metric + .metric { margin-top: 1.4rem; }
.metric__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .5rem; }
.metric__name { font-weight: 600; font-size: var(--fs-sm); }
.metric__val { font-size: var(--fs-xs); color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.meter { height: 7px; background: var(--cream-3); border-radius: var(--r-pill); overflow: hidden; }
.meter__fill {
  height: 100%; border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--rust) 0%, #C0714C 100%);
  width: var(--v, 50%);
  transform-origin: left;
  transition: width 1.1s var(--ease);
}
.meter--soft .meter__fill { background: linear-gradient(90deg, #B98A79 0%, var(--rose) 100%); }
.metric__note { font-size: var(--fs-xs); color: var(--ink-muted); margin-top: .4rem; }

/* Portrait-led skin analysis */
.analysis-visual {
  position: relative;
  min-height: clamp(540px, 52vw, 680px);
  isolation: isolate;
}
.analysis-portrait {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: calc(var(--r-lg) * 1.25);
  background: var(--cream);
}
.analysis-portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    linear-gradient(90deg, var(--cream) 0%, rgba(248,246,242,0) 11%, rgba(248,246,242,0) 89%, var(--cream) 100%),
    linear-gradient(180deg, var(--cream) 0%, rgba(248,246,242,0) 10%, rgba(248,246,242,0) 86%, var(--cream) 100%);
}
.analysis-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 48%;
}
.analysis-callouts {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
.analysis-callout {
  --connector: clamp(88px, 10vw, 142px);
  --angle: 0deg;
  position: absolute;
  width: clamp(190px, 18vw, 226px);
  padding: .9rem 1rem .85rem;
  border: 1px solid rgba(211,199,185,.92);
  border-radius: var(--r-md);
  background: rgba(255,255,255,.9);
  box-shadow: 0 12px 34px -18px rgba(102,74,58,.48);
  -webkit-backdrop-filter: blur(10px) saturate(1.05);
  backdrop-filter: blur(10px) saturate(1.05);
  color: var(--ink);
}
.analysis-callout__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .8rem;
}
.analysis-callout h3 {
  font-family: var(--sans);
  font-size: var(--fs-2xs);
  line-height: 1.25;
  letter-spacing: .02em;
  font-weight: 700;
}
.analysis-callout strong {
  font-family: var(--serif);
  font-size: 1.5rem;
  line-height: 1;
  font-weight: 400;
  color: var(--rust-text);
  font-variant-numeric: tabular-nums;
}
.analysis-callout p {
  margin-top: .28rem;
  font-size: var(--fs-2xs);
  color: var(--ink-muted);
}
.analysis-callout__meter {
  height: 4px;
  margin-top: .65rem;
  overflow: hidden;
  border-radius: var(--r-pill);
  background: var(--cream-3);
}
.analysis-callout__meter span {
  display: block;
  width: var(--v);
  height: 100%;
  border-radius: inherit;
  background: var(--rust);
}
.analysis-callout__meter--rose span { background: var(--rose); }
.analysis-callout__line {
  position: absolute;
  top: 50%;
  left: 100%;
  width: var(--connector);
  border-top: 1.5px dashed rgba(142,74,46,.72);
  transform: rotate(var(--angle));
  transform-origin: left center;
}
.analysis-callout__line::after {
  content: "";
  position: absolute;
  right: -4px;
  top: -4px;
  width: 7px;
  height: 7px;
  border: 2px solid var(--cream);
  border-radius: 50%;
  background: var(--rust);
  box-shadow: 0 0 0 1px rgba(142,74,46,.28);
}
.analysis-callout--right .analysis-callout__line {
  left: auto;
  right: 100%;
  transform-origin: right center;
}
.analysis-callout--right .analysis-callout__line::after {
  right: auto;
  left: -4px;
}
.analysis-callout--hydration { left: 1.5%; top: 12%; --connector: clamp(140px, 20vw, 280px); --angle: 14deg; }
.analysis-callout--sensitivity { left: 0; top: 42%; --connector: clamp(145px, 20.5vw, 300px); --angle: 0deg; }
.analysis-callout--texture { left: 3.5%; top: 72%; --connector: clamp(130px, 18vw, 240px); --angle: -14deg; }
.analysis-callout--tone { right: 1.5%; top: 22%; --connector: clamp(135px, 18vw, 245px); --angle: -8deg; }
.analysis-callout--barrier { right: 2%; top: 61%; --connector: clamp(145px, 20.5vw, 300px); --angle: 9deg; }

@media (max-width: 760px) {
  .analysis-visual {
    min-height: 0;
    display: grid;
    gap: 1rem;
  }
  .analysis-portrait {
    position: relative;
    inset: auto;
    aspect-ratio: 4 / 5;
    border-radius: var(--r-lg);
  }
  .analysis-portrait::after {
    background:
      linear-gradient(90deg, var(--cream) 0%, rgba(248,246,242,0) 8%, rgba(248,246,242,0) 92%, var(--cream) 100%),
      linear-gradient(180deg, rgba(248,246,242,.32) 0%, rgba(248,246,242,0) 12%, rgba(248,246,242,0) 82%, var(--cream) 100%);
  }
  .analysis-portrait img {
    object-position: center;
  }
  .analysis-callouts {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: .75rem;
    pointer-events: auto;
  }
  .analysis-callout__top { flex-wrap: wrap; column-gap: .5rem; }
  .analysis-callout {
    position: relative;
    inset: auto;
    width: auto;
    padding: .85rem;
    background: var(--white);
    box-shadow: var(--shadow-soft);
  }
  .analysis-callout--texture { grid-column: 1 / -1; }
  .analysis-callout__line { display: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .analysis-visual.is-in .analysis-callout {
    animation: analysisCardIn .68s var(--ease) both;
  }
  .analysis-visual.is-in .analysis-callout:nth-child(2) { animation-delay: .08s; }
  .analysis-visual.is-in .analysis-callout:nth-child(3) { animation-delay: .16s; }
  .analysis-visual.is-in .analysis-callout:nth-child(4) { animation-delay: .24s; }
  .analysis-visual.is-in .analysis-callout:nth-child(5) { animation-delay: .32s; }
}
@keyframes analysisCardIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* Magnifying lens over the portrait ---------------------------------------
   The photograph rests slightly desaturated; a soft lens follows the pointer,
   showing that spot in full colour and magnified. Two identical <img> layers
   in the same box with the same object-fit/position, so they align exactly:
   the lower one carries the real alt text and the resting filter, the upper
   one is scaled about the pointer and masked to a feathered circle.

   Scaling about transform-origin is what makes the magnification accurate —
   the point at (--lens-x, --lens-y) is the fixed point of the transform, so
   whatever sits under the pointer stays under the pointer while everything
   around it grows. No object-fit crop maths needed, and it stays correct
   through every responsive change of the frame.

   The resting desaturation is applied by .is-lens-ready, which app.js adds
   only after confirming soft masks are supported — so with scripting off, or
   on an engine without mask-image, the visitor simply gets the normal
   full-colour portrait rather than a permanently grey one. */
.analysis-portrait {
  --lens-x: 50%;
  --lens-y: 48%;
  --lens-r: 115px;      /* half of a ~230px lens */
  --lens-solid: 74%;    /* feather runs from here to the rim */
  --lens-mag: 1.3;
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
}
/* Resting state of the photograph itself. Tuned against this actual
   photograph rather than to a number: below about half saturation its warm
   skin tones collapse to grey, and the lens then reads as a scanner
   highlight instead of a closer look. The 1.6x magnification is doing most
   of the work of making the lens obvious. */
.analysis-portrait.is-lens-ready > img, .analysis-portrait.is-lens-ready > picture > img {
  filter: saturate(.6) brightness(.96);
  transition: filter .45s var(--ease);
}
.analysis-portrait__lens {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  opacity: 0;
  transition: opacity .26s var(--ease);
  -webkit-mask-image: radial-gradient(circle var(--lens-r) at var(--lens-x) var(--lens-y),
                      #000 0%, #000 var(--lens-solid), transparent 100%);
  mask-image: radial-gradient(circle var(--lens-r) at var(--lens-x) var(--lens-y),
              #000 0%, #000 var(--lens-solid), transparent 100%);
}
.analysis-portrait.is-lens-on .analysis-portrait__lens { opacity: 1; }
.analysis-portrait__lens img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 48%;
  transform: scale(var(--lens-mag));
  transform-origin: var(--lens-x) var(--lens-y);
}

/* The focusable surface. A transparent overlay rather than a wrapping button,
   so the photograph keeps its own alt text. touch-action is off so a finger
   can scrub in any direction; the portrait is well short of a full mobile
   viewport, and page scrolling resumes the moment the finger lifts. */
.analysis-portrait__hit {
  position: absolute; inset: 0; z-index: 2;
  width: 100%; height: 100%; cursor: crosshair; background: transparent;
  touch-action: none;
}
.analysis-portrait__hit:focus-visible { outline: 2px solid var(--rust); outline-offset: -4px; border-radius: calc(var(--r-lg) * 1.25); }

@media (hover: none) { .analysis-portrait__hit { touch-action: auto; pointer-events: none; cursor: default; } }
@media (max-width: 900px) { .analysis-portrait { --lens-r: 100px; } }
@media (max-width: 560px) { .analysis-portrait { --lens-r: 76px; --lens-solid: 70%; } }

@media (prefers-reduced-motion: reduce) {
  /* Magnification stays — the visitor drives it directly. Only the fade goes. */
  .analysis-portrait__lens { transition: none; }
  .analysis-portrait.is-lens-ready > img, .analysis-portrait.is-lens-ready > picture > img { transition: none; }
}

/* Profile petal ----------------------------------------------------------
   Chart and its text equivalent, side by side. The list is the source of
   record: it is present with scripting off, needs no hover, and carries the
   same five values the chart draws. */
.petal {
  display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1fr);
  gap: clamp(1.6rem, 4vw, 3.5rem); align-items: center;
  margin-top: clamp(2rem, 4vw, 3.25rem);
}
/* Reserved square, so the lazy widget cannot shift the page when it lands. */
.petal__chart {
  aspect-ratio: 1 / 1; width: 100%; max-width: 420px; margin-inline: auto;
  min-height: 0;
}
.petal__copy { display: grid; gap: .9rem; justify-items: start; }
.petal__copy h3 { margin-top: .1rem; }
.petal__copy p { font-size: var(--fs-sm); color: var(--ink-soft); }
.petal__copy .xs { font-size: var(--fs-xs); }
.petal__list { display: grid; gap: 0; width: 100%; max-width: 30rem; border-top: 1px solid var(--line); }
.petal__list li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding: .6rem 0; border-bottom: 1px solid var(--line);
  font-size: var(--fs-sm);
}
.petal__list span { color: var(--ink-soft); }
.petal__list strong {
  font-family: var(--serif); font-weight: 400; font-size: var(--fs-h4); line-height: 1;
  color: var(--rust-text); font-variant-numeric: tabular-nums;
}
.petal__list small { font-family: var(--sans); font-size: var(--fs-xs); color: var(--ink-muted); }

@media (max-width: 860px) {
  .petal { grid-template-columns: 1fr; }
  .petal__chart { max-width: 360px; }
}

/* Timeline / progress mock */
.timeline { display: grid; gap: .1rem; }
.tl-row {
  display: grid; grid-template-columns: 74px minmax(0,1fr) auto;
  gap: 1rem; align-items: center; padding: .8rem 0;
  border-bottom: 1px dashed var(--line);
}
.tl-row:last-child { border-bottom: 0; }
.tl-date { font-size: var(--fs-xs); color: var(--ink-muted); letter-spacing: .02em; font-weight: 600; }
.tl-bar { height: 8px; background: var(--cream-3); border-radius: var(--r-pill); overflow: hidden; }
.tl-bar > span { display: block; height: 100%; border-radius: var(--r-pill); background: var(--rust); opacity: var(--o, 1); }
.tl-note { font-size: var(--fs-xs); color: var(--ink-soft); white-space: nowrap; }
@media (max-width: 520px) {
  .tl-row { grid-template-columns: 62px minmax(0,1fr); }
  .tl-note { grid-column: 1 / -1; white-space: normal; }
}

/* --- Plans -------------------------------------------------------------- */
.plans { display: grid; gap: 1.25rem; grid-template-columns: repeat(3, minmax(0,1fr)); }
@media (max-width: 940px) { .plans { grid-template-columns: 1fr; } }

.plan {
  display: flex; flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: clamp(1.5rem, 3vw, 2.1rem);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.plan:hover { border-color: var(--line-strong); box-shadow: var(--shadow-soft); }
/* The recommended plan is Guided, not the most expensive one. It is marked by
   a ring and a badge rather than by inverting the card, so Concierge never
   reads as "the best" simply for costing more. */
.plan--rec { border-color: var(--rust); box-shadow: 0 0 0 1.5px var(--rust), var(--shadow-soft); }

.plan__label {
  font-size: var(--fs-xs); letter-spacing: .02em; font-weight: 700;
  color: var(--rust-text); border: 1px solid var(--rust-tint); background: var(--rust-tint);
  border-radius: var(--r-pill); padding: .22rem .7rem; align-self: flex-start; margin-bottom: .9rem;
}
.plan--rec .plan__label { color: #FFF9F4; background: var(--rust); border-color: var(--rust); }
/* Keeps the three plan headings on one baseline while the grid is 3-up. */
.plan__label--spacer { visibility: hidden; }
@media (max-width: 940px) { .plan__label--spacer { display: none; } }
.plan__name { font-family: var(--serif); font-size: 1.65rem; line-height: 1.1; }

/* Who the plan is for, read before the price. */
.plan__for { font-size: var(--fs-xs); color: var(--ink-muted); line-height: 1.5; margin-bottom: .55rem; }
.plan__price { font-family: var(--serif); font-size: 2.35rem; line-height: 1; margin-top: .85rem; color: var(--rust-deep); }
.plan__price small { font-family: var(--sans); font-size: var(--fs-xs); letter-spacing: .02em; color: var(--ink-muted); margin-left: .35rem; font-weight: 600; }
/* The outcome, in the plan's own words — the line that decides it. */
.plan__promise {
  margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line);
  font-family: var(--serif); font-size: var(--fs-h4); line-height: 1.35; color: var(--rust-deep);
}
.plan__incl-head {
  margin-top: 1.4rem; font-size: var(--fs-xs); letter-spacing: .02em; font-weight: 700; color: var(--ink-muted);
}
.plan__list { margin-top: .85rem; display: grid; gap: .6rem; font-size: var(--fs-sm); color: var(--ink-soft); }
.plan__list li { position: relative; padding-left: 1.35rem; }
.plan__list li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--rust);
}
/* Everything inherited from the tier below lives here, so the scan path stays
   short. Native <details> — keyboard accessible with no JS. */
.plan__more { margin-top: 1.1rem; border-top: 1px solid var(--line); padding-top: .9rem; }
.plan__more > summary {
  cursor: pointer; list-style: none;
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: .02em;
  color: var(--rust-text); display: flex; align-items: center; gap: .45rem;
  padding: .25rem 0; border-radius: var(--r-sm);
}
.plan__more > summary::-webkit-details-marker { display: none; }
.plan__more > summary::after { content: "+"; font-size: 1.05rem; line-height: 1; }
.plan__more[open] > summary::after { content: "\2212"; }
.plan__more > summary:hover { color: var(--rust-dark); }
.plan__more .plan__list { margin-top: .8rem; }

.plan__foot { margin-top: auto; padding-top: 1.7rem; }
.plan__foot .btn { width: 100%; padding-inline: 1rem; }

.plan[aria-pressed="true"], .plan.is-selected { border-color: var(--rust); box-shadow: 0 0 0 1.5px var(--rust), var(--shadow-soft); }

/* Landing plan preview (no prices) */
.plan-preview { display: grid; gap: 1.25rem; grid-template-columns: repeat(3, minmax(0,1fr)); }
@media (max-width: 900px) { .plan-preview { grid-template-columns: 1fr; } }
.pcard {
  display: flex; flex-direction: column;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.pcard__media {
  width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover;
  display: block; background: var(--cream-3);
}
.pcard__body {
  display: flex; flex-direction: column; gap: .8rem; flex: 1;
  padding: clamp(1.35rem, 2.6vw, 1.85rem) clamp(1.3rem, 2.4vw, 1.7rem) clamp(1.5rem, 2.8vw, 2rem);
}
.pcard__num {
  font-family: var(--serif); font-size: var(--fs-body); color: var(--rust-text);
  letter-spacing: .16em; margin-bottom: .3rem;
}
.pcard__name { font-family: var(--serif); font-size: clamp(1.7rem, 1.4rem + 1vw, 2.15rem); line-height: 1.05; }
.pcard__price { font-family: var(--serif); font-size: 1.75rem; line-height: 1; color: var(--rust-deep); margin-top: -.2rem; }
.pcard__price small { font-family: var(--sans); font-size: var(--fs-2xs); letter-spacing: .02em; color: var(--ink-muted); margin-left: .3rem; font-weight: 600; }
.pcard__for { font-size: var(--fs-xs); color: var(--ink-muted); line-height: 1.5; }
.pcard__desc { color: var(--ink-soft); font-size: var(--fs-sm); }
.pcard__list {
  display: grid; gap: .5rem; flex: 1; align-content: start;
  font-size: var(--fs-sm); color: var(--ink-soft);
  padding-top: .9rem; border-top: 1px solid var(--line);
}
.pcard__list li { position: relative; padding-left: 1.35rem; align-self: start; }
.pcard__list li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--rust);
}
.pcard__day { margin-top: auto; padding-top: .9rem; border-top: 1px dashed var(--line); font-size: var(--fs-sm); font-weight: 600; color: var(--rust-deep); font-variant-numeric: tabular-nums; }
.pcard__btn { align-self: stretch; justify-content: center; margin-top: .6rem; }
.pcard__btn.btn--quiet { border: 1.5px solid var(--line-strong); background: var(--white); color: var(--rust-deep); }
.pcard__btn.btn--quiet:hover { border-color: var(--rust); }

/* Focus, not "winner": whichever card the reader is attending to steps
   forward, and the others let their photograph settle back. Only the images
   quieten — every card's text keeps its full contrast, and the CTA of a
   quietened card stays immediately usable. Hover is gated behind a real
   pointer so a first tap on a phone never leaves a card stuck in a
   half-active state; :focus-within covers keyboard on every device. */
.pcard:focus-within {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
  border-color: var(--rust);
}
.plan-preview:has(.pcard:focus-within) .pcard:not(:focus-within) .pcard__media { opacity: .78; }
@media (hover: hover) and (pointer: fine) {
  .pcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: var(--rust); }
  .plan-preview:has(.pcard:hover) .pcard:not(:hover) .pcard__media { opacity: .78; }
}
.pcard__media { transition: opacity var(--dur) var(--ease); }

/* --- Journey timeline ("How it works") ----------------------------------
   Four stages on one connected rail. The rail is drawn per stage as a
   segment reaching down to the next stage's dot, so with JavaScript off it
   still renders as one complete, correct line — app.js only scales the rust
   fill inside each segment as the reader travels down. Decorative
   throughout; the ordered list, the step numbers and the headings carry the
   sequence on their own. */
.journey {
  --journey-col: 62px;
  --journey-gap: clamp(2.2rem, 3.4vw, 3rem);
  --journey-dot-y: .55rem;
  display: grid; gap: var(--journey-gap);
  max-width: 1000px;
}
.journey__stage {
  display: grid;
  grid-template-columns: var(--journey-col) clamp(150px, 19vw, 236px) minmax(0, 1fr);
  gap: 0 clamp(1.4rem, 3vw, 2.6rem);
  align-items: start;
}
.journey__marker { position: relative; align-self: stretch; }
.journey__dot {
  position: absolute; left: 50%; top: var(--journey-dot-y);
  width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px;
  border-radius: 50%; background: var(--cream);
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
  transition: box-shadow var(--dur) var(--ease), background-color var(--dur) var(--ease);
  z-index: 1;
}
.journey__stage.is-current .journey__dot { background: var(--rust); box-shadow: inset 0 0 0 1.5px var(--rust), 0 0 0 4px var(--rust-tint); }
/* Rail segment: from this stage's dot down to the next stage's dot. */
.journey__marker::before,
.journey__marker::after {
  content: ""; position: absolute; left: 50%; width: 1.5px; margin-left: -.75px;
  top: var(--journey-dot-y);
  bottom: calc(-1 * (var(--journey-gap) + var(--journey-dot-y)));
}
.journey__marker::before { background: var(--line); }
.journey__marker::after {
  background: var(--rust);
  transform: scaleY(var(--seg-fill, 0)); transform-origin: top center;
}
.journey__stage:last-child .journey__marker::before,
.journey__stage:last-child .journey__marker::after { content: none; }

.journey__media {
  width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover;
  display: block; border-radius: var(--r-md); background: var(--cream-3);
  opacity: .74; transition: opacity var(--dur) var(--ease);
}
.journey__stage.is-current .journey__media { opacity: 1; }
/* The rule under the step number reads as the copy's underline. */
.journey__n {
  padding-top: 1.1rem; border-top: 1.5px solid var(--rust-deep);
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: .12em;
  color: var(--rust-text); margin-bottom: .55rem;
}
.journey__body h3 { margin-bottom: .45rem; }
.journey__body p { font-size: var(--fs-sm); color: var(--ink-soft); max-width: 52ch; }

@media (max-width: 860px) {
  .journey { --journey-col: 34px; --journey-gap: 2.1rem; }
  .journey__stage { grid-template-columns: var(--journey-col) minmax(0, 1fr); }
  .journey__marker { grid-row: 1 / span 2; }
  .journey__media { grid-column: 2; max-width: 320px; }
  .journey__body { grid-column: 2; margin-top: 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  /* Completed state, immediately: filled rail, every stage at full presence. */
  .journey__marker::after { transform: scaleY(1); }
  .journey__media { opacity: 1; }
  .journey__dot { background: var(--rust); box-shadow: inset 0 0 0 1.5px var(--rust), 0 0 0 4px var(--rust-tint); }
}

/* --- Feature list (professional support) -------------------------------- */
.flist { display: grid; gap: 0; }
.flist li { padding: 1.05rem 0; border-bottom: 1px solid var(--line); }
.flist li:first-child { border-top: 1px solid var(--line); }
.flist strong { display: block; font-size: var(--fs-body); font-weight: 600; }
.flist span { font-size: var(--fs-sm); color: var(--ink-soft); }

/* --- Quote / callout band ----------------------------------------------- */
.band {
  /* Base is lifted so that base + scrim lands back on the original rust when the
     film is absent or still loading. Once the film plays it covers this entirely. */
  background: #BA633B;
  color: #FFF9F4;
  padding-block: clamp(3.5rem, 2rem + 6vw, 7rem);
  position: relative; overflow: hidden;
  isolation: isolate;
}
.band__video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0;
  opacity: 0; transition: opacity .9s var(--ease);
}
.band__video.is-playing { opacity: 1; }
.band__scrim {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, rgba(66,34,20,.40) 0%, rgba(66,34,20,.30) 45%, rgba(66,34,20,.50) 100%),
    linear-gradient(96deg, rgba(66,34,20,.24) 0%, rgba(66,34,20,.06) 55%, rgba(66,34,20,.20) 100%);
}
.band::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: radial-gradient(70% 120% at 88% -10%, rgba(212,148,158,.22) 0%, rgba(212,148,158,0) 62%);
  pointer-events: none;
}
.band__inner {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,.9fr);
  gap: clamp(1.75rem, 4vw, 4.5rem); align-items: end;
}
@media (max-width: 880px) { .band__inner { grid-template-columns: 1fr; align-items: start; gap: 1.75rem; } }
.band h2 { color: #FFF9F4; max-width: 17ch; font-size: var(--fs-h1); }
.band p { color: #FFF9F4; max-width: 42ch; }
.band .btn-row { margin-top: 1.9rem; }

.final-cta-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .92fr);
  gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
}
@media (max-width: 900px) { .final-cta-grid { grid-template-columns: 1fr; gap: 2.25rem; } }
.final-cta { max-width: 620px; }
.cta-figure { margin: 0; }
.cta-figure img {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: var(--r-lg); border: 1px solid var(--line);
  box-shadow: var(--shadow-soft); background: var(--cream-3);
}
.final-cta__title { font-size: var(--fs-h1); max-width: 18ch; }

.callout {
  background: var(--rust-deep); color: var(--cream);
  border-radius: var(--r-md); padding: clamp(1.6rem, 3vw, 2.3rem);
}
.callout p { color: rgba(248,246,242,.94); }
.callout .serif { font-size: clamp(1.3rem, 1.1rem + .9vw, 1.75rem); line-height: 1.25; color: #FFF9F4; }

/* --- Check-in comparison -------------------------------------------------
   Each of the four states is an exact quarter of one supplied file
   (assets/skin-progress-weeks-0-2-4-6.webp) — nothing is stretched or paired
   up to manufacture a before/after. See assets/README.txt for what that file
   actually is and how a replacement must be shaped.

   No JavaScript: a native radio group carries the state, :has() reads it, and
   every week's own label text is always visible, so the whole thing works
   with scripting off. app.js only adds the two-second auto-advance on top. */
.checkin { --i: 0; margin: 0; }
.checkin:has(.checkin__opt input[value="1"]:checked) { --i: 1; }
.checkin:has(.checkin__opt input[value="2"]:checked) { --i: 2; }
.checkin:has(.checkin__opt input[value="3"]:checked) { --i: 3; }

.checkin__head {
  display: flex; align-items: baseline; justify-content: space-between; gap: .75rem;
  flex-wrap: wrap; margin-bottom: .7rem;
}
.checkin__frame {
  aspect-ratio: 4 / 5; overflow: hidden;
  border-radius: var(--r-lg); border: 1px solid var(--line);
  background: var(--cream-3); box-shadow: var(--shadow-soft);
}
.checkin__img {
  width: 400%; height: 100%; max-width: none;
  object-fit: cover; object-position: 50% 8%;
  transform: translateX(calc(var(--i) * -25%));
  transition: transform .38s var(--ease);
}

.checkin__pick {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  position: relative; margin-top: 1rem;
}
/* Decorative rail behind the four markers, first marker centre to last. */
.checkin__pick::before {
  content: ""; position: absolute; left: 12.5%; right: 12.5%; top: 14px;
  height: 1.5px; background: var(--line);
}
.checkin__opt { cursor: pointer; }
.checkin__opt input {
  position: absolute; width: 1px; height: 1px;
  opacity: 0; margin: 0; pointer-events: none;
}
.checkin__optbox {
  position: relative; display: grid; justify-items: center; gap: .28rem;
  min-height: 52px; padding: .5rem .3rem .3rem; border-radius: var(--r-sm);
  text-align: center;
}
.checkin__marker {
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--cream); box-shadow: inset 0 0 0 1.5px var(--line-strong);
  transition: box-shadow var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.checkin__optbox strong { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .06em; color: var(--ink-soft); }
.checkin__optbox small { font-size: var(--fs-xs); color: var(--ink-muted); line-height: 1.4; }
/* Selection is carried by the marker's ring and the weight/colour of its
   label, not by colour alone — and the radio itself announces it. */
.checkin__opt input:checked + .checkin__optbox .checkin__marker {
  background: var(--rust); box-shadow: inset 0 0 0 1.5px var(--rust), 0 0 0 4px var(--rust-tint);
}
.checkin__opt input:checked + .checkin__optbox strong { color: var(--rust-text); }
.checkin__opt input:focus-visible + .checkin__optbox { outline: 2px solid var(--rust); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
  .checkin__opt:hover .checkin__marker { box-shadow: inset 0 0 0 1.5px var(--rust); }
}
/* Once the split stacks, the check-in photograph would otherwise run the full
   column width and tower over the copy beside it. */
@media (max-width: 900px) {
  .checkin { max-width: 440px; }
}
/* Each week keeps its own description at every width — it wraps rather than
   disappearing, so the narrowest screens lose no information. */
@media (max-width: 430px) {
  .checkin__optbox { padding-inline: .15rem; }
  .checkin__optbox small { line-height: 1.3; }
}

/* --- Comparison slider -------------------------------------------------- */
.compare {
  position: relative; border-radius: var(--r-md); overflow: hidden;
  border: 1px solid var(--line); background: var(--cream-2);
  aspect-ratio: 4 / 3;
  touch-action: pan-y;
}
@media (max-width: 560px) { .compare { aspect-ratio: 1 / 1; } }
/* Two stacked panes rather than bare <img>, so a not-yet-supplied photograph
   can fall back to the .imgph placeholder without breaking the wipe. The child
   selector is deliberate: .imgph also sets position, and would otherwise win
   on source order and drop both panes back into normal flow. */
.compare > .compare__pane { position: absolute; inset: 0; width: 100%; height: 100%; }
.compare > .compare__pane--b { clip-path: inset(0 0 0 var(--pos, 50%)); }

/* Two pending photographs would stack two placeholder labels on top of each
   other and the captions — show one for the pair instead. */
.compare .imgph.is-missing::after { content: none; }
.compare:has(.imgph.is-missing)::after {
  content: "Photographs pending";
  position: absolute; top: .9rem; left: 50%; transform: translateX(-50%); z-index: 3;
  padding: .3rem .7rem; border-radius: var(--r-pill);
  font-size: var(--fs-xs); letter-spacing: .02em;
  color: var(--ink-muted); background: rgba(255,252,248,.86);
}

.compare__caption {
  position: absolute; bottom: .9rem; z-index: 3;
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: .02em;
  background: rgba(255,252,248,.9); color: var(--rust-deep);
  padding: .3rem .7rem; border-radius: var(--r-pill);
}
.compare__caption--a { left: .9rem; }
.compare__caption--b { right: .9rem; }
.compare__handle {
  position: absolute; top: 0; bottom: 0; left: var(--pos, 50%);
  width: 2px; background: rgba(255,250,245,.95); z-index: 4;
  transform: translateX(-1px); pointer-events: none;
}
.compare__handle::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 42px; height: 42px; transform: translate(-50%,-50%);
  border-radius: 50%; background: rgba(255,250,245,.96);
  box-shadow: 0 4px 14px rgba(72,46,34,.3);
}
.compare__range {
  position: absolute; inset: 0; z-index: 5;
  width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize;
  -webkit-appearance: none; appearance: none; background: transparent;
}
.compare:has(.compare__range:focus-visible) { outline: 2px solid var(--rust); outline-offset: 3px; }
.compare__range:focus-visible { outline: 2px solid var(--rust); outline-offset: -4px; border-radius: var(--r-md); }

/* --- FAQ ---------------------------------------------------------------- */
.faq-layout {
  display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 3.5rem); align-items: start;
}
@media (max-width: 900px) { .faq-layout { grid-template-columns: 1fr; } }
.faq-figure { margin: 0; }
.faq-figure img {
  display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover;
  border-radius: var(--r-lg); border: 1px solid var(--line);
  box-shadow: var(--shadow-soft); background: var(--cream-3);
}
@media (max-width: 900px) { .faq-figure img { aspect-ratio: 4 / 3; } }

.faq { border-top: 1px solid var(--line); max-width: 860px; }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__btn {
  width: 100%; display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem;
  text-align: left; padding: 1.3rem 0; font-family: var(--serif);
  font-size: var(--fs-h4); line-height: 1.3; color: var(--rust-deep);
  transition: color var(--dur) var(--ease);
}
.faq__btn:hover { color: var(--rust); }
.faq__icon { flex: 0 0 auto; position: relative; width: 16px; height: 16px; margin-top: .45em; }
.faq__icon::before, .faq__icon::after {
  content: ""; position: absolute; background: var(--rust); border-radius: 2px;
  transition: transform .35s var(--ease), opacity .35s var(--ease);
}
.faq__icon::before { top: 7px; left: 0; width: 16px; height: 2px; }
.faq__icon::after  { left: 7px; top: 0; width: 2px; height: 16px; }
.faq__btn[aria-expanded="true"] .faq__icon::after { transform: rotate(90deg); opacity: 0; }
.faq__panel { overflow: hidden; height: 0; transition: height .38s var(--ease); }
.faq__panel-inner { padding: 0 0 1.5rem; max-width: 68ch; }
.faq__panel-inner p { color: var(--ink-soft); font-size: var(--fs-sm); }
.faq__panel-inner p + p { margin-top: .75rem; }

/* --- Footer ------------------------------------------------------------- */
.footer {
  background: var(--rust-deep); color: var(--cream);
  padding-block: clamp(3.5rem, 2rem + 5vw, 6rem) 2rem;
}
.footer__top {
  display: grid; grid-template-columns: minmax(0,1.3fr) minmax(0,1fr) minmax(0,1fr);
  gap: clamp(2rem, 5vw, 4rem);
}
@media (max-width: 800px) { .footer__top { grid-template-columns: 1fr 1fr; } .footer__brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer__top { grid-template-columns: 1fr; gap: 2.2rem; } }
.footer__tag { margin-top: 1.1rem; font-family: var(--serif); font-size: var(--fs-h4); color: rgba(248,246,242,.86); }
.footer h4 {
  font-size: var(--fs-xs); letter-spacing: .02em;
  color: #F6DFDF; font-weight: 700; margin-bottom: 1rem;
}
.footer__links { display: grid; gap: .55rem; }
.footer__links a {
  text-decoration: none; color: rgba(248,246,242,.9); font-size: var(--fs-sm);
  transition: color var(--dur) var(--ease);
  display: inline-flex; align-items: center; min-height: 44px; padding: 0; margin-block: -7px; /* 44px to tap, the old 30px in the flow */
}
.footer__links a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.footer__bottom {
  margin-top: clamp(2.5rem, 5vw, 4rem); padding-top: 1.6rem;
  border-top: 1px solid rgba(248,246,242,.18);
  display: flex; flex-wrap: wrap; gap: .8rem 1.75rem; align-items: center;
  font-size: var(--fs-xs); color: rgba(248,246,242,.85);
}
.footer__disclaimer { flex-basis: 100%; max-width: 78ch; line-height: 1.7; }

/* --- Pending photograph -------------------------------------------------
   Images that have not been supplied yet keep their real src so dropping the
   file in needs no code change; app.js flags the 404 and this shows a warm
   placeholder in the meantime. Same pattern as the hero video. */
.imgph { position: relative; overflow: hidden; background: var(--cream-3); }
.imgph > img, .imgph > picture > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.imgph.is-missing {
  background:
    radial-gradient(120% 90% at 22% 8%, rgba(212,148,158,.26) 0%, rgba(212,148,158,0) 62%),
    linear-gradient(148deg, #EFE6DC 0%, #E4D5C7 56%, #D9C4B5 100%);
}
.imgph.is-missing > img, .imgph.is-missing > picture > img { visibility: hidden; }
.imgph.is-missing::after {
  content: "Photograph pending";
  position: absolute; inset: auto 0 0 0;
  padding: .45rem .8rem;
  font-size: var(--fs-xs); letter-spacing: .02em;
  color: var(--ink-muted); background: rgba(255,252,248,.84);
}

/* --- Learn: editorial index --------------------------------------------- */
.learn-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(1.4rem, 3.5vw, 3rem);
  align-items: stretch;
}
@media (max-width: 900px) { .learn-hero { grid-template-columns: 1fr; } }
.learn-hero__media {
  margin: 0; aspect-ratio: 4 / 3;
  border-radius: var(--r-lg); border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}
@media (max-width: 900px) { .learn-hero__media { aspect-ratio: 16 / 10; } }
.learn-hero__copy {
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(1.5rem, 3.5vw, 2.9rem);
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-soft);
}
.learn-hero__copy h2 { font-size: var(--fs-h2); max-width: 17ch; margin-top: .2rem; }
.learn-hero__copy .lead { margin-top: 1rem; max-width: 44ch; }
.learn-hero__copy .btn-row { margin-top: 1.8rem; }

.rail + .rail { margin-top: clamp(2.6rem, 5vw, 4.25rem); }
.rail__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; padding-bottom: .85rem;
  border-bottom: 1.5px solid var(--rust-deep);
}
.rail__head h2 { font-size: var(--fs-h3); }
.rail__note { font-size: var(--fs-xs); color: var(--ink-muted); letter-spacing: .02em; }
/* Side by side, the heading and its note squeeze each other on a phone. */
@media (max-width: 620px) {
  .rail__head { flex-direction: column; align-items: flex-start; gap: .35rem; }
}
.rail__track {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1rem, 2.2vw, 1.75rem);
}
@media (max-width: 1000px) { .rail__track { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* On phones the rail scrolls sideways. Cards are links, so Tab still walks
   them and the browser scrolls each one into view — no arrow buttons needed. */
@media (max-width: 620px) {
  .rail__track {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(220px, 76%);
    overflow-x: auto;
    scroll-snap-type: x proximity;
    margin-inline: calc(var(--gutter) * -1);
    padding: .35rem var(--gutter) .8rem;
  }
  .lcard { scroll-snap-align: start; }
}

.lcard {
  display: grid; grid-template-rows: auto 1fr;
  text-decoration: none; color: inherit;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-md); overflow: hidden;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.lcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: var(--line-strong); }
.lcard__media { aspect-ratio: 4 / 3; }
.lcard__body { display: grid; align-content: start; gap: .42rem; padding: 1rem 1.1rem 1.25rem; }
.lcard__kicker { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .02em; color: var(--rust-text); }
.lcard__title { font-family: var(--serif); font-size: var(--fs-h4); line-height: 1.24; color: var(--rust-deep); }
.lcard__deck { font-size: var(--fs-sm); color: var(--ink-soft); line-height: 1.55; }

/* --- Learn: a single article -------------------------------------------- */
.crumb {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: var(--fs-sm); font-weight: 600; color: var(--ink-soft);
  text-decoration: none; padding: .4rem 0; min-height: 44px; display: inline-flex; align-items: center;
}
.crumb:hover { color: var(--rust-deep); }

.article { max-width: 780px; margin-inline: auto; }
.article__head h1 { font-size: clamp(2rem, 1.5rem + 2vw, 3.05rem); max-width: 20ch; }
.article__deck { margin-top: 1.05rem; font-size: var(--fs-lead); color: var(--ink-soft); max-width: 52ch; line-height: 1.6; }
.article__figure {
  margin: clamp(1.9rem, 4vw, 2.9rem) 0 0;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-lg); border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}
.article__body { margin-top: clamp(1.9rem, 4vw, 2.9rem); max-width: 66ch; }
.article__body > * + * { margin-top: 1.15rem; }
.article__body h2 { font-size: var(--fs-h3); margin-top: clamp(2rem, 4vw, 2.75rem); }
.article__body p { color: var(--ink-soft); line-height: 1.75; }
.article__body strong { color: var(--rust-deep); font-weight: 600; }
.article__body ul { display: grid; gap: .55rem; padding-left: 1.2rem; }
.article__body li { color: var(--ink-soft); line-height: 1.7; }
.article__body li::marker { color: var(--rust); }
/* The privacy and terms pages: the article layout, no picture, the version under the deck. */
.legal__date { margin-top: .9rem; font-size: var(--fs-xs); color: var(--ink-muted); }
.article--legal .article__body h2 { font-size: var(--fs-h4); }
.article__foot {
  margin-top: clamp(2.4rem, 5vw, 3.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

/* --- Scroll reveal ------------------------------------------------------ */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ==========================================================================
   Prototype journey
   ========================================================================== */
.proto-body { background: var(--cream); }

.proto-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(248,246,242,.95);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.proto-header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-block: .7rem;
}
.proto-exit {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: var(--fs-sm); font-weight: 600; color: var(--ink-soft);
  text-decoration: none; padding: .5rem .7rem; border-radius: var(--r-sm);
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.proto-exit:hover { color: var(--rust-deep); background: rgba(102,74,58,.06); }

.progress { padding-bottom: .75rem; }
.progress__meta {
  display: flex; justify-content: space-between; gap: 1rem;
  font-size: var(--fs-xs); color: var(--ink-muted); margin-bottom: .45rem;
  letter-spacing: .04em;
}
.progress__where { display: inline-flex; align-items: center; gap: .6rem; }
.progress__chapters { display: inline-flex; gap: 4px; }
.progress__chapters[hidden] { display: none; }
.progress__chapters i { width: 14px; height: 4px; border-radius: 2px; background: var(--cream-3); transition: background-color var(--dur) var(--ease); }
.progress__chapters i.is-done { background: var(--rust); }
.progress__chapters i.is-current { background: var(--rose); }
/* Three stages side by side: the quiz (the longest, so the widest), the scan
   with your details, and the results. Each bar fills on its own. */
.progress__track { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 6px; }
.progress__stage { display: grid; gap: .35rem; min-width: 0; }
.progress__seg { display: block; height: 4px; background: var(--cream-3); border-radius: var(--r-pill); overflow: hidden; }
.progress__fill {
  display: block; height: 100%; background: var(--rust); border-radius: var(--r-pill);
  width: 0%; transition: width .5s var(--ease);
}
.progress__name {
  font-size: var(--fs-2xs); letter-spacing: .02em; color: var(--ink-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.progress__stage.is-done .progress__name { color: var(--ink-soft); }
.progress__stage.is-current .progress__name { color: var(--rust-text); font-weight: 700; }
.progress__num { display: none; font-variant-numeric: tabular-nums; }   /* phones only: the count above says it on wider screens */

.proto-main { padding-block: clamp(2.2rem, 1.4rem + 3.5vw, 4.5rem) clamp(7rem, 5rem + 6vw, 6rem); }
.proto-main .wrap { max-width: 860px; transition: max-width .4s var(--ease); }
.proto-main .wrap.is-wide { max-width: 1120px; }

.step-panel { display: none; }
.step-panel.is-active { display: block; animation: panelIn .45s var(--ease); }
@keyframes panelIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
/* A transformed ancestor becomes the containing block for fixed descendants.
   On small screens that made the fixed step navigation render inside the
   entering panel for one frame, then snap back to the viewport. */
@media (max-width: 700px) {
  .step-panel.is-active { animation: none; }
}

.step-panel h1 { font-size: clamp(1.85rem, 1.4rem + 2vw, 3rem); }
.step-panel > .eyebrow { margin-bottom: .7rem; }
.step-intro { margin-top: 1rem; color: var(--ink-soft); font-size: var(--fs-lead); }

.notice {
  display: flex; gap: .8rem; align-items: flex-start;
  background: var(--cream-2); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: .95rem 1.15rem;
  font-size: var(--fs-sm); color: var(--ink-soft);
}
.notice strong { color: var(--rust-deep); }
.notice--rust { background: var(--rust-tint); border-color: var(--rust-tint); }

/* Quiz options */
.qgroup { margin-top: 2rem; }
.qgroup legend { font-family: var(--serif); font-size: clamp(1.4rem, 1.2rem + 1.1vw, 2.1rem); line-height: 1.18; margin-bottom: .5rem; }
.qgroup__hint { font-size: var(--fs-sm); color: var(--ink-muted); margin-bottom: 1.4rem; }
.options { display: grid; gap: .7rem; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt__box {
  display: flex; align-items: center; gap: .95rem;
  min-height: 62px; padding: .9rem 1.15rem;
  background: var(--white); border: 1.5px solid var(--line);
  border-radius: var(--r-md); cursor: pointer;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.opt__box:hover { border-color: var(--line-strong); }
.opt__dot {
  flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid var(--line-strong); position: relative;
  transition: border-color var(--dur) var(--ease);
}
.opt__dot::after {
  content: ""; position: absolute; inset: 3.5px; border-radius: 50%;
  background: var(--rust); transform: scale(0); transition: transform .28s var(--ease);
}
.opt__text { font-size: var(--fs-body); font-weight: 500; }
.opt__text small { display: block; font-size: var(--fs-xs); color: var(--ink-muted); font-weight: 400; margin-top: .1rem; }
.opt input:checked + .opt__box {
  border-color: var(--rust); background: #FFFDFB;
  box-shadow: 0 0 0 1px var(--rust), 0 10px 26px -18px rgba(168,90,58,.7);
}
.opt input:checked + .opt__box .opt__dot { border-color: var(--rust); }
.opt input:checked + .opt__box .opt__dot::after { transform: scale(1); }
.opt input:focus-visible + .opt__box { outline: 2px solid var(--rust); outline-offset: 3px; }
/* Multi-choice questions keep the same card with a square mark, so a checkbox
   never reads as a radio. */
.opt input[type="checkbox"] + .opt__box .opt__dot { border-radius: 6px; }
.opt input[type="checkbox"] + .opt__box .opt__dot::after { border-radius: 2.5px; }
.opt-reveal { margin-top: 1rem; max-width: 420px; }

/* Long multi-choice lists (Q1, Q11, Q13) as tap-the-words chips in small
   labelled groups. A dozen full cards read as a scattered wall; chips keep the
   whole list in one glance. The groups are contiguous runs of the original list,
   so the answer order (which decides the profile for Q1) is unchanged. */
.options--chips { display: grid; gap: 1.15rem; }
.chipset__label {
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: .02em; color: var(--ink-muted); margin-bottom: .55rem;
}
.chipset__list { display: flex; flex-wrap: wrap; gap: .5rem; }
.chipset--none { padding-top: 1.15rem; border-top: 1px solid var(--line); }
.options--chips .opt__box {
  min-height: 44px; padding: .5rem 1.05rem; gap: 0;
  border-radius: 999px; border-width: 1.5px;
}
.options--chips .opt__text { font-size: var(--fs-sm); line-height: 1.3; }
.options--chips .opt__dot,
.options--tiles .opt__dot { display: none; }
.options--chips .opt input:checked + .opt__box,
.options--tiles .opt input:checked + .opt__box {
  background: var(--rust-tint); color: var(--rust-deep);
  box-shadow: 0 0 0 1px var(--rust);
}
/* A tick on the chosen answer, so the state never rests on colour alone. It
   sits in a badge on the corner rather than beside the words, so choosing an
   answer never widens it, rewraps it or moves its neighbours. */
.options--chips .opt__box, .options--tiles .opt__box, .options--support .opt__box { position: relative; }
.options--chips .opt input:checked + .opt__box .opt__text::before,
.options--tiles .opt input:checked + .opt__box .opt__text::before {
  content: ""; position: absolute; top: -6px; right: -4px; z-index: 1;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--rust) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.6 6.3l2.3 2.3 4.5-4.9' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 11px no-repeat;
  box-shadow: 0 0 0 2px var(--cream);
}
.chips__count {
  display: inline-block; margin-left: .4rem; padding: .05rem .55rem;
  border-radius: 999px; background: var(--cream-2);
  font-size: var(--fs-xs); font-weight: 700; color: var(--rust-text);
  font-variant-numeric: tabular-nums;
}

/* Short single-choice questions (Q2, Q4, Q5, Q12, Q15) as a row of tiles. */
.qgroup legend + .options--tiles { margin-top: 1rem; }
.options--tiles { grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.5rem), 1fr)); }
.options--tiles-wide { grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.5rem), 1fr)); }
.options--tiles .opt__box {
  height: 100%; min-height: 84px; justify-content: center; text-align: center;
  padding: 1rem 1.1rem;
}
.options--tiles .opt__text { line-height: 1.35; }
@media (max-width: 520px) {
  .options--tiles:not(.options--tiles-wide) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Chapter ribbon on the first question of each of the four quiz chapters. */
.chapter {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: .25rem .6rem;
  margin-bottom: 1.4rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line);
  color: var(--ink-soft); font-size: var(--fs-sm);
}
.chapter__num {
  align-self: center; display: inline-grid; place-items: center;
  width: 1.75rem; height: 1.75rem; border-radius: 50%;
  background: var(--rust); color: var(--cream);
  font-family: var(--serif); font-size: var(--fs-body);
}
.chapter__name { font-family: var(--serif); font-size: var(--fs-h4); color: var(--rust-deep); }
@media (prefers-reduced-motion: no-preference) {
  .step-panel.is-active .chapter { animation: chapter-in .6s var(--ease) both; }
  @keyframes chapter-in { from { opacity: 0; transform: translateY(6px); } }
}

/* Question artwork: one line drawing beside each question without a visual of
   its own, in the style of the Q3 face. Layers marked data-show light up while
   one of their values is chosen in the same .qsplit (syncArt() in app.js);
   data-hide layers go out, data-idle layers show only before any answer.
   Display-only and aria-hidden — the inputs stay the control. */
.art { margin: 0; display: grid; justify-items: center; gap: .8rem; }
.art svg { width: min(100%, 260px); height: auto; overflow: visible; }
.art [data-show], .art [data-idle] { opacity: 0; transition: opacity .45s var(--ease); }
.art [data-hide] { transition: opacity .45s var(--ease); }
.art .is-on { opacity: var(--on, 1); }
.art .is-off { opacity: 0; }
.qsplit:not(.has-pick) .art [data-idle] { opacity: 1; }
.art .ln  { fill: none; stroke: var(--rust-deep); stroke-width: 1.6px; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.art .ln2 { fill: none; stroke: var(--rust-deep); stroke-width: 1.15px; stroke-linecap: round; stroke-linejoin: round; stroke-opacity: .6; vector-effect: non-scaling-stroke; }
.art .lnb { fill: none; stroke: var(--rust-deep); stroke-width: 2.6px; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.art .rl  { fill: none; stroke: var(--rose); stroke-width: 1.5px; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.art .rs  { fill: none; stroke: var(--rust); stroke-width: 2px; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.art .hd  { fill: none; stroke: var(--rust-deep); stroke-width: 5px; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.art .stl { fill: none; stroke: #F8EDE3; stroke-width: 1.5px; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.art .sk  { fill: #FFFBF7; }
.art .t1  { fill: #F2E4DB; }
.art .t2  { fill: #E9B79A; }
.art .r1  { fill: #F3DCDF; }
.art .r2  { fill: #D4949E; }
.art .ru  { fill: var(--rust); }
.art .dk  { fill: var(--rust-deep); }
.art .wh  { fill: #FFFFFF; }
.art .or  { fill: #F4CFA8; }
.art .orl { fill: #F9E2C8; }
.art .calm { fill: #F7E7DC; }
.art .dull { fill: #CFC4BA; --on: .45; }
.art .spot { fill: #D8B49C; --on: .75; }
.art .mark { fill: #C39A84; --on: .8; }
.art .dc  { fill: #CDB1A8; --on: .7; }
.art .nt  { fill: #5E4436; }
.art .st  { fill: #F8EDE3; }
.art .mn  { fill: #F6E3CF; }
.art .mnd { fill: #EAD2BB; }
.art .pt-base { fill: #FFFBF7; stroke: var(--line-strong); stroke-width: 1.5; }
.art .pt-on   { fill: #F2E4DB; stroke: var(--rust-deep); stroke-width: 1.5; }
.art .pt-lit  { fill: #E9B79A; stroke: var(--rust-deep); stroke-width: 1.6; }
.art .sky { fill: #F4EEE6; }
/* Q16's timer: --range (0-1) comes from the slider, set by syncArt(). */
.art .dial-track { fill: none; stroke: var(--cream-3); stroke-width: 10; }
.art .dial-arc {
  fill: none; stroke: var(--rust); stroke-width: 10; stroke-linecap: round;
  stroke-dasharray: var(--dial);
  stroke-dashoffset: calc(var(--dial) * (1 - var(--range, 0)));
  transform: rotate(-90deg); transform-origin: 100px 106px;
  transition: stroke-dashoffset .25s var(--ease);
}
.art .dial-hand {
  transform: rotate(calc(var(--range, 0) * 360deg)); transform-origin: 100px 106px;
  transition: transform .25s var(--ease);
}
.facezone__key {
  display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; justify-content: center;
  font-size: var(--fs-xs); color: var(--ink-muted);
}
.facezone__swatch { width: .8rem; height: .8rem; border-radius: 50%; margin-left: .6rem; }
.facezone__swatch:first-child { margin-left: 0; }
.facezone__swatch--shine { background: #E9B79A; }
.facezone__swatch--dry { background: #F3DCDF; box-shadow: inset 0 0 0 1.5px var(--rose); }
@media (max-width: 760px) {
  /* Above the answers on a phone: small enough to keep them in view. */
  .art svg { width: auto; height: 112px; max-width: 100%; }
  .art { gap: .35rem; }
  .qsplit:has(> .art) { gap: .9rem; }
}
/* Beside a drawing the answer column is narrower: short tiles pair up, long
   ones stack as a list. */
.qsplit .options--tiles:not(.options--tiles-wide) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.qsplit .options--tiles-wide { grid-template-columns: 1fr; }
.qsplit .options--tiles-wide .opt__box { justify-content: flex-start; text-align: left; min-height: 64px; }

/* The closing screen: the Q2 plant, grown and in bloom. */
.closing__art { justify-items: start; margin: 0 0 1.2rem; }
.closing__art svg { width: clamp(120px, 22vw, 170px); height: auto; }
@media (prefers-reduced-motion: no-preference) {
  .step-panel.is-active .closing__art svg { animation: closing-in .8s var(--ease) both; }
  @keyframes closing-in { from { opacity: 0; transform: translateY(10px) scale(.96); } }
}

/* Held back until i18n.js has translated the page (see the snippet in each <head>). */
.i18n-pending body { visibility: hidden; }

/* Breather globe — a shared problem, shown at world scale. */
.community-globe {
  display: grid;
  grid-template-columns: minmax(260px, .9fr) minmax(250px, 1.1fr);
  align-items: center;
  gap: clamp(1.5rem, 5vw, 4rem);
  padding: clamp(1.2rem, 3vw, 2.1rem);
  border-block: 1px solid var(--line);
}
.community-globe__copy { max-width: 29rem; }
.community-globe__copy .serif {
  margin-top: .7rem;
  font-size: clamp(1.6rem, 2.8vw, 2.35rem);
  line-height: 1.12;
}
.community-globe__copy .small { margin-top: 1rem; }
.map-frame {
  aspect-ratio: 1 / 1; width: min(100%, 340px); margin-inline: auto;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #FFF 0%, var(--cream-2) 64%, transparent 72%);
  overflow: hidden; display: grid; place-items: center;
}
.community-globe__copy h1.serif { font-weight: 400; color: var(--rust-deep); }
#panel-notalone .community-globe { border-top: 0; padding-top: 0; }
@media (max-width: 660px) {
  .community-globe { grid-template-columns: 1fr; text-align: center; gap: .8rem; }
  .community-globe__copy { max-width: 34rem; margin-inline: auto; }
  .community-globe__copy > * { margin-inline: auto; }
  /* Sized from the screen height, so the globe and its lines fit at once. */
  #panel-notalone .map-frame { width: min(100%, 340px, 44dvh); }
  #panel-notalone .community-globe { padding-inline: 0; border-bottom: 0; }
  #panel-notalone .community-globe__copy .serif { font-size: clamp(1.3rem, 5.4vw, 1.6rem); margin-top: .3rem; }
  #panel-notalone .community-globe__copy .small { margin-top: .6rem; }
}
@media (max-width: 660px) and (max-height: 720px) {
  #panel-notalone .map-frame { width: min(100%, 36dvh); }
  #panel-notalone .community-globe__copy .small { font-size: var(--fs-xs); }
}

/* Editorial comparison chart — deliberately not a pill-headed mock card. */
.care-chart {
  border-block: 1px solid var(--line);
  padding-block: clamp(1.15rem, 3vw, 1.8rem);
}
.care-chart__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem 1.5rem;
  flex-wrap: wrap;
  padding-inline: clamp(.25rem, 2vw, 1rem);
}
.care-chart__period { font-size: var(--fs-xs); color: var(--ink-muted); }
.care-chart__body { margin-top: .8rem; }
.care-chart__body > .xs { padding-inline: clamp(.25rem, 2vw, 1rem); margin-top: .35rem; }

/* Four-stage progression for the milestone step. Labelled in the markup as a
   simulation — see the caption there; it is not a customer result. */
.progress-strip {
  padding-block: clamp(.8rem, 2vw, 1.2rem);
  border-block: 1px solid var(--line);
}
.progress-strip__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: .5rem 1.5rem; flex-wrap: wrap; margin-bottom: .9rem;
}
.progress-strip__image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--r-md);
  background: var(--cream-2);
}
.progress-strip__labels {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: .9rem;
}
.progress-strip__labels span {
  display: grid;
  gap: .1rem;
  padding-inline: .7rem;
  text-align: center;
  border-left: 1px solid var(--line);
}
.progress-strip__labels span:first-child { border-left: 0; }
.progress-strip__labels strong {
  font-size: var(--fs-xs);
  color: var(--rust-deep);
  letter-spacing: .04em;
}
.progress-strip__labels small { font-size: var(--fs-2xs); color: var(--ink-muted); }
.progress-strip__cap { margin-top: 1rem; }
@media (max-width: 520px) {
  .progress-strip__labels span { padding-inline: .25rem; }
  .progress-strip__labels small { font-size: var(--fs-2xs); line-height: 1.25; }
}

/* Scratch-card promo reveal.
   The code underneath is always real text in the DOM — the canvas over it is
   decorative and aria-hidden, so a screen reader never has to scratch. */
.scratch-wrap { margin-top: 1.8rem; display: grid; gap: .7rem; justify-items: center; }
.scratch {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--line); background: var(--white);
  min-height: 132px; display: grid; place-items: center; align-content: center; gap: .25rem;
  padding: 1.5rem; width: 100%; max-width: 420px;
  transition: box-shadow .4s var(--ease), border-color .4s var(--ease);
}
.scratch:focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; }
.scratch__label {
  font-size: var(--fs-xs); letter-spacing: .02em;
  color: var(--ink-muted);
}
.scratch__code { font-family: var(--serif); font-size: clamp(1.35rem, 1.1rem + 1vw, 1.7rem); letter-spacing: .04em; color: var(--rust-deep); }
.scratch__canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.scratch__canvas.is-fading { opacity: 0; transition: opacity .3s var(--ease); }
/* The celebration: one quiet settle of the card and a warm rim. No confetti,
   no sound, nothing flashing. */
.scratch.is-revealed {
  border-color: var(--rust);
  box-shadow: 0 0 0 1px var(--rust), 0 14px 34px -20px rgba(168,90,58,.75);
  animation: scratchSettle .5s var(--ease);
}
@keyframes scratchSettle {
  0%   { transform: scale(.985); }
  55%  { transform: scale(1.012); }
  100% { transform: scale(1); }
}
.scratch__done {
  font-size: var(--fs-sm); color: var(--rust-text); font-weight: 600;
  animation: fadeUp .45s var(--ease);
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.eyebrow__name { text-transform: none; }

@media (prefers-reduced-motion: reduce) {
  .scratch.is-revealed { animation: none; }
  .scratch__done { animation: none; }
}

/* Scan step */
.scan-choice { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; margin-top: 1.8rem; }
@media (max-width: 620px) { .scan-choice { grid-template-columns: 1fr; } }
.scan-card {
  background: var(--white); border: 1.5px solid var(--line);
  border-radius: var(--r-md); padding: 1.4rem; text-align: left;
  display: flex; flex-direction: column; gap: .5rem; min-height: 168px;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.scan-card:hover { border-color: var(--line-strong); }
.scan-card[aria-pressed="true"] { border-color: var(--rust); box-shadow: 0 0 0 1px var(--rust); background: #FFFDFB; }
.scan-card__name { font-family: var(--serif); font-size: var(--fs-h4); }
.scan-card__desc { font-size: var(--fs-sm); color: var(--ink-soft); }
.scan-card__meta { margin-top: auto; font-size: var(--fs-xs); color: var(--rust-text); font-weight: 600; letter-spacing: .02em; }

.file-field { margin-top: 1.1rem; }
.file-field input[type="file"] {
  width: 100%; font-size: var(--fs-sm); padding: .7rem;
  border: 1.5px dashed var(--line-strong); border-radius: var(--r-sm); background: var(--cream-2);
}
.file-field input[type="file"]::file-selector-button {
  font: inherit; font-size: var(--fs-xs); font-weight: 600; margin-right: .8rem;
  padding: .5rem .9rem; border-radius: 11px; border: 1.5px solid var(--line-strong);
  background: var(--white); color: var(--rust-deep); cursor: pointer;
}
.preview-frame {
  margin-top: 1rem; border-radius: var(--r-md); overflow: hidden;
  border: 1px solid var(--line); background: var(--cream-2); max-width: 260px;
}
.preview-frame img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1; }

/* --- Results loader -----------------------------------------------------
   One circular progress ring and the five stages beside it. The ring is a
   plain SVG circle whose dash offset is driven by a single --p custom property
   (0 to 1) that app.js only ever increases, so progress cannot run backwards
   even if a frame is missed. Everything the visitor needs to read is ordinary
   text: if the ring never animates, the stage list still says where things
   are. */
.loader {
  display: grid; justify-items: center; gap: 1.6rem;
  padding: clamp(2rem, 5vw, 3.5rem) 0;
  text-align: center;
}
.loader__ring { position: relative; width: clamp(132px, 30vw, 168px); aspect-ratio: 1; }
.loader__ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.loader__ring circle { fill: none; stroke-width: 6; }
.loader__track { stroke: var(--cream-3); }
.loader__arc {
  stroke: var(--rust); stroke-linecap: round;
  /* 2πr, r = 52 */
  stroke-dasharray: 326.73;
  stroke-dashoffset: calc(326.73 * (1 - var(--p, 0)));
  transition: stroke-dashoffset .18s linear;
}
.loader__pct {
  position: absolute; inset: 0; display: grid; place-items: end center; padding-bottom: 20%;
  font-family: var(--serif); font-size: clamp(1.05rem, .95rem + .6vw, 1.3rem);
  color: var(--rust-deep);
}
/* A sprout in the ring that grows with the ring's progress (--p, 0-1): the
   stem draws in first, then one leaf opens, then the other. */
.loader__ring .loader__sprout { position: absolute; left: 50%; top: 16%; width: 42%; height: auto; transform: translateX(-50%); overflow: visible; }
.loader__ground, .loader__stem { fill: none; stroke: var(--rust-deep); stroke-width: 2.2; stroke-linecap: round; }
.loader__stem { stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--p, 0)); transition: stroke-dashoffset .18s linear; }
.loader__leaf { fill: #F3DCDF; stroke: var(--rust-deep); stroke-width: 1.8; stroke-linejoin: round; transition: transform .25s var(--ease); }
.loader__leaf--1 { transform-origin: 30px 42px; transform: scale(clamp(0, calc(var(--p, 0) * 2.5 - .6), 1)); }
.loader__leaf--2 { transform-origin: 30px 35px; transform: scale(clamp(0, calc(var(--p, 0) * 2.5 - 1.3), 1)); }
/* At 100% the sprout flowers, then the ring holds on it (app.js). */
.loader__bloom { transform-origin: 30px 20px; transform: scale(0); opacity: 0; transition: transform .6s cubic-bezier(.34, 1.4, .64, 1), opacity .3s var(--ease); }
.loader__ring .loader__petal { fill: #F3DCDF; stroke: var(--rust-deep); stroke-width: 1.4; }
.loader__ring .loader__heart { fill: #E9B79A; stroke: var(--rust-deep); stroke-width: 1.2; }
.loader__ring.is-complete .loader__bloom { transform: scale(1); opacity: 1; }
.loader__lede {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 1.05rem + .9vw, 1.75rem);
  color: var(--rust-deep);
}
.loader__stages { display: grid; gap: .55rem; text-align: left; margin: 0; padding: 0; list-style: none; }
.loader__stage {
  display: grid; grid-template-columns: 22px 1fr; align-items: center; gap: .7rem;
  font-size: var(--fs-sm); color: var(--ink-muted);
  transition: color var(--dur) var(--ease);
}
.loader__mark {
  width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid var(--line-strong); position: relative;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.loader__stage.is-current { color: var(--rust-deep); font-weight: 600; }
.loader__stage.is-current .loader__mark { border-color: var(--rust); }
.loader__stage.is-current .loader__mark::after {
  content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--rust);
}
.loader__stage.is-done { color: var(--ink-soft); }
.loader__stage.is-done .loader__mark { border-color: var(--rust); background: var(--rust); }
/* Tick drawn with two borders rather than an SVG, so it inherits the stage's
   own transition and needs no extra element. */
.loader__stage.is-done .loader__mark::after {
  content: ""; position: absolute; left: 6px; top: 2.5px;
  width: 5px; height: 9px;
  border: solid var(--white); border-width: 0 1.8px 1.8px 0;
  transform: rotate(45deg);
}
.loader__note { max-width: 46ch; }
.loader__error {
  display: grid;
  justify-items: center;
  gap: 1rem;
  max-width: 580px;
  text-align: center;
}
.loader__error[hidden] { display: none; }
.loader__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .7rem;
}

/* Forms */
.form { margin-top: 2rem; display: grid; gap: 1.25rem; max-width: 560px; }
/* The details form with its drawing beside it (above it on a phone). */
.details-split { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: clamp(1.2rem, 3vw, 2.4rem); align-items: start; }
.details-split__art { margin-top: 2.4rem; }
@media (max-width: 760px) {
  .details-split { grid-template-columns: 1fr; gap: 0; }
  .details-split__art { order: -1; margin-top: 1.2rem; }
  .details-split__art svg { width: auto; height: 104px; }
}
.field { display: grid; gap: .4rem; }
.field[hidden] { display: none; }
.field label { font-size: var(--fs-sm); font-weight: 600; }
.field input[type="text"], .field input[type="tel"], .field input[type="email"] {
  min-height: 52px; padding: .8rem 1rem;
  background: var(--white); border: 1.5px solid var(--line); border-radius: var(--r-sm);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  width: 100%;
}
.field input:hover { border-color: var(--line-strong); }
::placeholder { color: var(--ink-muted); opacity: 1; }
.field input:focus { border-color: var(--rust); box-shadow: 0 0 0 1px var(--rust); outline: none; }
.field input[aria-invalid="true"] { border-color: #A3352B; box-shadow: 0 0 0 1px #A3352B; }
.field__err { font-size: var(--fs-xs); color: #8E2C23; font-weight: 600; min-height: 1.1em; display: flex; gap: .35rem; align-items: center; }
.field__err:not(:empty)::before { content: "!"; display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: #8E2C23; color: #fff; font-size: var(--fs-2xs); flex: 0 0 auto; }
.field__hint { font-size: var(--fs-xs); color: var(--ink-muted); }
#detailsKnownMail { margin: -.35rem 0 1rem; font-weight: 600; color: var(--ink); }

.check { display: flex; gap: .8rem; align-items: flex-start; cursor: pointer; }
.check input { flex: 0 0 auto; width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--rust); cursor: pointer; }
.check span { font-size: var(--fs-sm); color: var(--ink-soft); }

/* Profile results */
.profile-overview {
  display: block;
  padding-bottom: clamp(1.4rem, 3vw, 2rem);
  margin-bottom: clamp(1.4rem, 3vw, 2rem);
  border-bottom: 1px solid var(--line);
}
.profile-overview__media {
  display: block;
  width: 100%;
  min-width: 0;
}
.profile-overview__photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 43%;
}
/* The lens on the profile portrait. Same component and same behaviour as the
   homepage one — it simply lives in the profile's own square media box rather
   than the landing page's full-bleed figure, so it fills its parent instead of
   pinning itself to the page, and it drops the edge vignette, which only makes
   sense over the large hero portrait. A smaller lens too: 115px was half the
   width of this box. */
.profile-overview__media .analysis-portrait {
  position: relative; inset: auto;
  width: 100%; height: 100%;
  border-radius: 0;
  --lens-r: 74px;
  --lens-solid: 72%;
  --lens-mag: 1.5;
}
.profile-overview__media .analysis-portrait::after { content: none; }
/* Base photograph and magnified copy must share a crop, or the lens shows a
   different part of the face than the one under the pointer. */
.profile-overview__media .analysis-portrait img,
.profile-overview__media .analysis-portrait__lens img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 43%;
}
@media (max-width: 560px) {
  .profile-overview__media .analysis-portrait { --lens-r: 58px; }
}

.profile-overview__summary {
  max-width: 70ch;
  margin-bottom: clamp(1.4rem, 3vw, 2rem);
  color: var(--ink-soft);
  font-size: clamp(1rem, .94rem + .3vw, 1.16rem);
  line-height: 1.75;
}
/* Nobody uploaded a photo, so there is no portrait to show: the summary takes
   the whole row rather than sitting beside a stand-in face. display:block on
   .profile-overview__media outranks the UA's [hidden] rule, same as the promo
   row below — it has to be turned off explicitly. */
.profile-overview--nophoto { grid-template-columns: 1fr; }
.profile-overview__media[hidden] { display: none; }
.skin-report { display: grid; gap: clamp(2rem, 5vw, 3.5rem); min-width: 0; }
.skin-report__overview {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, .8fr);
  gap: clamp(1.25rem, 4vw, 2.5rem);
  align-items: stretch;
}
.skin-report__original { display: grid; gap: .6rem; }
.skin-report__original img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 500px;
  margin-inline: auto;
  object-fit: contain;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  background: var(--cream-2);
  box-shadow: var(--shadow-sm);
}
.skin-report__summary {
  display: grid;
  align-content: center;
  gap: 1rem;
  padding: clamp(1.25rem, 4vw, 2rem);
  border-radius: var(--r-lg);
  background: var(--rust-deep);
  color: var(--white);
}
.skin-report__summary h2 { font-family: var(--serif); font-size: var(--fs-h2); line-height: 1.05; }
.skin-report__summary > p:last-child { color: rgba(255,255,255,.72); font-size: var(--fs-xs); }
.skin-report__summary .eyebrow { color: rgba(255,255,255,.7); }
.skin-report__stats { display: grid; gap: .65rem; }
.skin-report__stats > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: baseline;
  gap: .35rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid rgba(255,255,255,.16);
}
.skin-report__stats span { font-size: var(--fs-xs); color: rgba(255,255,255,.72); }
.skin-report__stats strong { font-family: var(--serif); font-size: 1.55rem; }
.skin-report__stats small { color: rgba(255,255,255,.7); }
.skin-report__annotated { display: grid; gap: 1.1rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.skin-report__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem 2rem;
}
.skin-report__head h2 { font-family: var(--serif); font-size: var(--fs-h2); }
.skin-report__head > p { max-width: 36ch; color: var(--ink-muted); font-size: var(--fs-sm); }
.skin-report__viewer {
  display: grid;
  grid-template-columns: minmax(300px, 500px);
  grid-template-rows: auto auto auto auto;
  gap: .75rem;
  justify-content: center;
  min-width: 0;
}
.skin-report__stage {
  grid-column: 1;
  grid-row: 2;
  position: relative;
  width: 100%;
  max-width: 500px;
  justify-self: center;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  background: radial-gradient(circle at 50% 40%, var(--white), var(--cream-2));
  box-shadow: var(--shadow-sm);
  touch-action: pan-y;
  cursor: grab;
}
.skin-report__stage > img,
.skin-report__overlay,
.skin-report__overlay img, .skin-report__stage > picture > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 5px;
  object-fit: contain;
  object-position: center;
  border-radius: calc(var(--r-lg) - 1px);
}
.skin-report__overlay { pointer-events: none; }
.skin-report__overlay.is-entering-next { animation: skin-map-next .24s var(--ease); }
.skin-report__overlay.is-entering-previous { animation: skin-map-previous .24s var(--ease); }
@keyframes skin-map-next {
  from { opacity: .35; transform: translateX(18px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes skin-map-previous {
  from { opacity: .35; transform: translateX(-18px); }
  to { opacity: 1; transform: translateX(0); }
}
.skin-report__arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  transform: translateY(-50%);
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 50%;
  background: rgba(35,25,20,.68);
  color: var(--white);
  font: 400 1.55rem/1 var(--sans);
  opacity: .68;
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: opacity var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.skin-report__arrow--previous { left: .65rem; }
.skin-report__arrow--next { right: .65rem; }
.skin-report__stage:hover .skin-report__arrow,
.skin-report__arrow:focus-visible { opacity: 1; background: rgba(35,25,20,.86); }
.skin-report__counter {
  position: absolute;
  left: .75rem;
  bottom: .75rem;
  padding: .35rem .6rem;
  border-radius: var(--r-pill);
  background: rgba(35,25,20,.7);
  color: var(--white);
  font-size: var(--fs-xs);
  font-variant-numeric: tabular-nums;
  backdrop-filter: blur(8px);
  pointer-events: none;
}
.skin-report__toggle {
  position: absolute;
  right: .75rem;
  bottom: .75rem;
  min-height: 44px;
  padding: .55rem .85rem;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: var(--r-pill);
  background: rgba(35,25,20,.8);
  color: var(--white);
  font: 600 var(--fs-xs)/1.2 var(--sans);
  backdrop-filter: blur(8px);
  cursor: pointer;
}
.skin-report__concerns {
  display: flex;
  grid-column: 1;
  grid-row: 3;
  gap: .45rem;
  max-width: 500px;
  overflow-x: auto;
  padding: .15rem .15rem .5rem;
  scroll-snap-type: x proximity;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}
.skin-report__concern {
  display: grid;
  flex: 0 0 88px;
  gap: .35rem;
  min-width: 0;
  padding: .4rem;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--white);
  color: var(--ink-soft);
  text-align: center;
  cursor: pointer;
  scroll-snap-align: start;
}
.skin-report__thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: calc(var(--r-sm) - 3px);
  background: var(--cream-2);
}
.skin-report__thumb > img,
.skin-report__thumb-masks,
.skin-report__thumb-masks img, .skin-report__thumb > picture > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 43%;
}
.skin-report__thumb-masks { pointer-events: none; }
.skin-report__concern-meta { display: grid; gap: .05rem; font-size: var(--fs-2xs); line-height: 1.2; }
.skin-report__concern-meta > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.skin-report__concern-meta strong { font-size: var(--fs-2xs); font-variant-numeric: tabular-nums; }
.skin-report__concern[aria-selected="true"] {
  border-color: var(--rust);
  background: var(--rust-tint);
  color: var(--rust-deep);
  box-shadow: 0 0 0 1px var(--rust);
}
.skin-report__concern:focus-visible,
.skin-report__toggle:focus-visible,
.skin-report__arrow:focus-visible,
.skin-report__stage:focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; }
.skin-report__detail {
  grid-column: 1;
  grid-row: 1;
  display: grid;
  gap: .5rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--white);
  color: var(--ink-soft);
}
.skin-report__detail-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  color: var(--rust-deep);
}
.skin-report__detail-head h3 { font-family: var(--serif); font-size: var(--fs-h3); }
.skin-report__detail-head strong {
  padding: .3rem .55rem;
  border-radius: var(--r-pill);
  background: var(--rust-tint);
  color: var(--rust-deep);
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
}
.skin-report__detail small,
.skin-report__fallback { color: var(--ink-muted); }
.skin-report__fallback {
  grid-column: 1;
  grid-row: 4;
  padding: .8rem;
  border-radius: var(--r-sm);
  background: var(--cream-2);
}
.skin-report__summary[hidden],
.skin-report__annotated[hidden],
.skin-report__overlay[hidden],
.skin-report__toggle[hidden],
.skin-report__fallback[hidden] { display: none; }
.analysis-score-note {
  margin-top: 1.5rem;
  padding: .8rem 1rem;
  border-radius: var(--r-sm);
  background: var(--cream-2);
}
.analysis-score-note[hidden] { display: none; }
.profile-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 1.25rem; margin-top: 1.8rem; }
@media (max-width: 900px) {
  .skin-report__overview { grid-template-columns: 1fr; }
  .skin-report__original img { max-height: 440px; }
}
@media (max-width: 780px) {
  .profile-overview__photo { object-position: 50% 40%; }
  .skin-report__viewer {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
  }
  .skin-report__stage { grid-column: 1; grid-row: 2; justify-self: center; }
  .skin-report__concerns {
    display: flex;
    grid-column: 1;
    grid-row: 3;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: .45rem;
  }
  .skin-report__concern { flex: 0 0 112px; min-width: 112px; }
  .skin-report__detail { grid-column: 1; grid-row: 1; }
  .skin-report__fallback { grid-column: 1; grid-row: 4; }
  .profile-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .skin-report__head { display: grid; gap: .35rem; }
  .skin-report { gap: 2rem; }
  .skin-report__summary { gap: .8rem; padding: 1.1rem; }
  .skin-report__summary h2 { font-size: clamp(1.55rem, 8vw, 2rem); }
  .skin-report__stats > div { padding-bottom: .5rem; }
  .skin-report__stats strong { font-size: var(--fs-h4); }
  .skin-report__annotated { padding-top: 1.5rem; }
  .skin-report__viewer { gap: .6rem; }
  .skin-report__arrow { width: 44px; height: 44px; }
  .skin-report__arrow--previous { left: .45rem; }
  .skin-report__arrow--next { right: .45rem; }
  .skin-report__counter { left: .5rem; bottom: .5rem; }
  .skin-report__toggle { right: .5rem; bottom: .5rem; min-height: 44px; }
  .skin-report__concerns { gap: .4rem; padding-inline: 0; scroll-padding-inline: .4rem; }
  .skin-report__concern { flex-basis: 104px; min-width: 104px; }
  .skin-report__detail { padding: .85rem .9rem; }
  .skin-report__detail-head { flex-wrap: wrap; }
  .skin-report__detail-head h3 { font-size: var(--fs-h4); }
}
@media (max-width: 360px) {
  .mock__body { padding-inline: .85rem; }
  .skin-report__summary { padding: 1rem; }
  .skin-report__concern { flex-basis: 96px; min-width: 96px; }
  .skin-report__toggle { padding-inline: .7rem; }
}

.chiprow { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.2rem; }
.chip {
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: .04em;
  padding: .35rem .8rem; border-radius: var(--r-pill);
  background: var(--rust-tint); color: var(--rust-text);
}
.chip--rose { background: var(--rose-tint); color: #7E3D48; }

.ing-list { display: grid; gap: 0; margin-top: 1.6rem; border-top: 1px solid var(--line); }
.ing {
  display: grid; grid-template-columns: minmax(0,.9fr) minmax(0,1.4fr);
  gap: .35rem 2rem; padding: 1.25rem 0; border-bottom: 1px solid var(--line);
}
@media (max-width: 680px) { .ing { grid-template-columns: 1fr; gap: .35rem; } }
.ing__name { font-family: var(--serif); font-size: var(--fs-h4); line-height: 1.25; }
.ing__why { font-size: var(--fs-sm); color: var(--ink-soft); }

/* Scan entry — what a guided check-in is, before choosing how to add a photo. */
.scan-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.4rem, 4vw, 2.5rem);
  margin-top: 1.8rem;
}
@media (max-width: 700px) { .scan-intro { grid-template-columns: 1fr; } }
.scan-intro__media { margin: 0; aspect-ratio: 4 / 3; border-radius: var(--r-md); border: 1px solid var(--line); }

/* A button that reads as a link — used for the quiet opt-out on the capture step. */
.linkish {
  font: inherit; font-size: var(--fs-sm);
  color: var(--rust-text); text-decoration: underline; text-underline-offset: 3px;
  padding: .35rem; border-radius: var(--r-sm);
}
.linkish:hover { color: var(--rust-dark); }

/* Touch targets. Under a coarse pointer these three sat at 29-36px, short of
   the 44px minimum. The text does not move — only the box around it grows, so
   the layout on a mouse-driven screen is unchanged. */
@media (pointer: coarse) {
  .linkish { display: inline-flex; align-items: center; min-height: 44px; padding-inline: .5rem; }
  .plan__more > summary { min-height: 44px; padding-block: .6rem; }
  /* The box itself stays 22px so it still reads as a checkbox; the label it
     sits in becomes the target. */
  .check { min-height: 44px; align-items: center; padding-block: .35rem; }
  .check input { width: 24px; height: 24px; margin-top: 0; }
}

/* Product-type silhouettes. Deliberately generic and unbranded; these are
   placeholders for photography that will replace them (assets/README.txt). */
.pt-icon {
  width: 100%; height: 100%; display: block;
  fill: none; stroke: var(--rust); stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
}

/* Free routine suggestions — three cards, generic types, no brands or prices. */
.rec-list { display: grid; gap: 1rem; margin-top: 1.6rem; }
.rec {
  display: grid; grid-template-columns: 76px minmax(0, 1fr);
  align-items: center; gap: 1.15rem;
  padding: 1.1rem 1.25rem;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md);
}
.rec__media {
  width: 76px; height: 92px; padding: .6rem;
  display: grid; place-items: center;
  background: var(--cream-2); border: 1px solid var(--line); border-radius: var(--r-sm);
}
.rec__type { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .02em; color: var(--rust-text); }
.rec__name { font-family: var(--serif); font-size: var(--fs-h4); line-height: 1.25; margin-top: .2rem; }
.rec__why { font-size: var(--fs-sm); color: var(--ink-soft); margin-top: .35rem; line-height: 1.6; }
@media (max-width: 520px) {
  .rec { grid-template-columns: 58px minmax(0, 1fr); gap: .9rem; padding: .95rem 1rem; }
  .rec__media { width: 58px; height: 72px; padding: .45rem; }
}

/* Mid-experience upgrade prompt, so the plans are reachable without a long scroll. */
.upgrade {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-top: clamp(1.3rem, 3vw, 1.9rem);
  padding: 1.15rem 1.3rem;
  background: var(--rust-tint); border-radius: var(--r-md);
}
.upgrade__copy { max-width: 48ch; }
.upgrade__copy strong { display: block; font-family: var(--serif); font-weight: 400; font-size: var(--fs-h4); color: var(--rust-deep); }
.upgrade__copy span { display: block; font-size: var(--fs-sm); color: var(--ink-soft); margin-top: .3rem; line-height: 1.6; }
.upgrade .btn { flex: 0 0 auto; }

/* --- Paid report -------------------------------------------------------- */
.rtabs {
  display: flex; gap: .3rem;
  margin-top: 1.7rem; padding: .3rem;
  background: var(--cream-2); border: 1px solid var(--line); border-radius: var(--r-pill);
  overflow-x: auto; scrollbar-width: none;
}
.rtabs::-webkit-scrollbar { display: none; }
.rtab {
  flex: 1 0 auto; white-space: nowrap;
  padding: .68rem 1.15rem; border-radius: var(--r-pill);
  font-size: var(--fs-sm); font-weight: 600; color: var(--ink-soft);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.rtab:hover { color: var(--rust-deep); }
.rtab[aria-selected="true"] { background: var(--white); color: var(--rust-deep); box-shadow: var(--shadow-soft); }

.rpanel { margin-top: 1.7rem; }
.rpanel:focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; border-radius: var(--r-sm); }
.rsec + .rsec { margin-top: clamp(1.7rem, 3.5vw, 2.5rem); }
.rsec__head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: .4rem 1rem; padding-bottom: .7rem; border-bottom: 1.5px solid var(--rust-deep);
}
.rsec__head h2 { font-size: var(--fs-h3); }

.focus-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1.2rem; }
@media (max-width: 700px) { .focus-list { grid-template-columns: 1fr; } }
.focus-card { padding: 1.15rem 1.25rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); }
.focus-card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.focus-card__name { font-weight: 600; font-size: var(--fs-sm); }
.focus-card__val { font-size: var(--fs-xs); color: var(--ink-muted); }
.focus-card .meter { margin-top: .6rem; }
.focus-card__note { margin-top: .6rem; font-size: var(--fs-sm); color: var(--ink-soft); line-height: 1.6; }

.routine-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 2.5vw, 1.75rem); margin-top: 1.2rem; }
@media (max-width: 700px) { .routine-cols { grid-template-columns: 1fr; } }
.routine-col { padding: 1.2rem 1.35rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); }
.routine-col h3 { font-size: var(--fs-xs); letter-spacing: .02em; color: var(--rust-text); }
.routine-col ol { margin: .95rem 0 0; padding-left: 1.3rem; display: grid; gap: .65rem; }
.routine-col li { font-size: var(--fs-sm); color: var(--ink-soft); line-height: 1.6; }
.routine-col li strong { color: var(--rust-deep); font-weight: 600; }
.routine-col li::marker { color: var(--rust); font-weight: 600; }

/* Progress starts empty and says so — never a fabricated before/after. */
.empty-state {
  margin-top: 1.2rem; padding: clamp(1.5rem, 3.5vw, 2.3rem);
  background: var(--cream-2); border: 1.5px dashed var(--line-strong); border-radius: var(--r-md);
  text-align: center;
}
.empty-state .serif { font-size: clamp(1.15rem, 1rem + .7vw, 1.45rem); color: var(--rust-deep); }
.empty-state p { max-width: 48ch; margin-inline: auto; color: var(--ink-soft); }
.empty-state p + p { margin-top: .7rem; }

/* Checkout */
.summary {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: clamp(1.4rem, 3vw, 2rem); margin-top: 1.8rem;
}
.summary__row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding: .85rem 0; border-bottom: 1px dashed var(--line);
}
.summary__row:last-of-type { border-bottom: 0; }
/* display:flex above outranks the UA's [hidden] rule, so the promo row has to
   opt out explicitly or it shows even when no code was revealed. */
.summary__row[hidden] { display: none; }
.summary__row--total { border-top: 1.5px solid var(--rust-deep); border-bottom: 0; margin-top: .5rem; padding-top: 1.1rem; }
.summary__row--total dt { font-weight: 600; }
.summary__row--total dd { font-family: var(--serif); font-size: 1.85rem; color: var(--rust-deep); }
.summary dt { font-size: var(--fs-sm); color: var(--ink-soft); }
.summary dd { margin: 0; font-weight: 600; text-align: right; }

/* Compact selected-plan strip at the top of checkout, replacing the old
   standalone "review your selection" step. */
.co-head {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: .35rem 1rem;
  margin-top: 1.8rem; padding: 1.15rem 1.35rem;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md);
}
.co-head__plan { font-family: var(--serif); font-size: var(--fs-h4); line-height: 1.2; color: var(--rust-deep); }
.co-head__terms { grid-column: 1 / -1; font-size: var(--fs-xs); color: var(--ink-muted); }
.co-head .co-change { min-height: 44px; padding: 0; font-size: var(--fs-xs); white-space: nowrap; }
/* The total: the price before the code struck through above it. */
.summary__row--total dd s { display: block; font-family: var(--sans); font-size: var(--fs-sm); font-weight: 600; color: var(--ink-muted); line-height: 1.2; }
.summary dt { flex: 0 0 auto; white-space: nowrap; }
.summary dd { flex: 1 1 auto; min-width: 0; }

/* Mock payment. Deliberately collects nothing — no card fields exist to fill. */
.pay {
  margin-top: 1.4rem; padding: clamp(1.3rem, 3vw, 1.9rem);
  background: var(--cream-2); border: 1.5px dashed var(--line-strong); border-radius: var(--r-md);
}
.pay__mark {
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: .02em;
  color: var(--rust-text);
}
.pay p { margin-top: .6rem; font-size: var(--fs-sm); color: var(--ink-soft); max-width: 58ch; }
.pay .field { margin-top: 1.2rem; }

/* --- Results module ------------------------------------------------------
   A layout study only. Every card is labelled, and the module is gated behind
   SHOW_RESULTS_PREVIEW in app.js so production ships with it hidden until
   Sakra has real, permissioned evidence. */
.results-note {
  margin-top: 1.2rem; padding: .95rem 1.15rem;
  background: var(--rose-tint); border-radius: var(--r-sm);
  font-size: var(--fs-sm); color: #7E3D48;
}
.results { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 1.2rem; }
@media (max-width: 900px) { .results { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .results { grid-template-columns: 1fr; } }
.rcard {
  display: grid; align-content: start; gap: .7rem;
  padding: .9rem; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--r-md);
}
.rcard__stamp {
  font-size: var(--fs-2xs); font-weight: 700; letter-spacing: .02em;
  color: #7E3D48; background: var(--rose-tint);
  border-radius: var(--r-pill); padding: .3rem .6rem; justify-self: start;
}
/* Where a permissioned before/after pair would sit. Empty on purpose. */
.rcard__pair { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem; }
.rcard__slot {
  aspect-ratio: 3 / 4; display: grid; place-items: center; padding: .5rem;
  border: 1.5px dashed var(--line-strong); border-radius: var(--r-sm);
  background: var(--cream-2);
  font-size: var(--fs-2xs); letter-spacing: .02em; color: var(--ink-muted);
  text-align: center; line-height: 1.4;
}
.rcard__name { font-family: var(--serif); font-size: var(--fs-body); color: var(--rust-deep); }
.rcard__chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.rcard__chips .chip { font-size: var(--fs-2xs); padding: .25rem .6rem; }
.rcard__quote {
  font-size: var(--fs-xs); color: var(--ink-muted); line-height: 1.6;
  font-style: italic;
}
.rcard__types { display: flex; gap: .4rem; }
.rcard__type {
  flex: 1; aspect-ratio: 3 / 4; padding: .4rem;
  display: grid; place-items: center;
  background: var(--cream-2); border: 1px solid var(--line); border-radius: var(--r-sm);
}

.done { text-align: center; padding-block: clamp(1.5rem, 4vw, 3rem); }
.done__mark {
  width: 84px; height: 84px; margin: 0 auto 1.8rem;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--rust-tint); border: 1.5px solid var(--rust);
}
.done__mark svg { width: 34px; height: 34px; }
.done p { margin-inline: auto; max-width: 46ch; }
.done .btn-row { justify-content: center; margin-top: 2.2rem; }
.done__media {
  margin: clamp(2.2rem, 5vw, 3.2rem) auto 0;
  max-width: 560px; overflow: hidden;
  border-radius: var(--r-md); border: 1px solid var(--line);
}
.done__media img { display: block; width: 100%; height: auto; }

/* Sticky mobile action bar */
.stepnav {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  margin-top: 2.5rem;
}
.stepnav .btn--primary { flex: 0 0 auto; }
/* Back reads as a real button beside Continue, not a stray word. The arrow is
   decoration: its alternative text is empty, so it is never read aloud. */
.stepnav .btn--quiet { border: 1.5px solid var(--line-strong); background: var(--white); color: var(--ink-soft); padding-inline: 1rem 1.15rem; }
@media (max-width: 700px) {
  .stepnav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    margin: 0; padding: .75rem var(--gutter);
    padding-bottom: max(.75rem, env(safe-area-inset-bottom));
    background: rgba(248,246,242,.96);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
  }
  .stepnav .btn--primary { flex: 1 1 auto; }
  /* On a phone Back is the word alone, centred in its button. */
  .stepnav .btn--quiet { justify-content: center; text-align: center; min-width: 5.4rem; padding-inline: .9rem; flex: 0 0 auto; }
  /* A button label never breaks onto a second line. */
  .stepnav .btn { white-space: nowrap; }
  .stepnav .btn--primary { min-width: 0; padding-inline: 1rem; }
  .stepnav .btn--quiet::before { content: none; }
}

.proto-foot {
  border-top: 1px solid var(--line);
  padding-block: 1.6rem;
  padding-bottom: max(1.6rem, calc(env(safe-area-inset-bottom) + 1rem));
  font-size: var(--fs-xs); color: var(--ink-muted);
}
@media (max-width: 700px) { .proto-foot { padding-bottom: 7rem; } }
.proto-foot__legal { margin-top: .6rem; display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.proto-foot__legal a, .footer__bottom a { color: inherit; text-underline-offset: 3px; display: inline-flex; align-items: center; min-height: 44px; line-height: 24px; }
.footer__bottom a:hover { color: #fff; }


/* ==========================================================================
   Quiz interactions
   --------------------------------------------------------------------------
   The seven enhanced questions and the moments around them. Everything here
   is an enhancement over markup that already works: each question keeps its
   real radio group, and these styles only apply once the matching widget has
   mounted and taken the plain list out of sight.

   All of it is built from the same tokens as the rest of the file — the same
   card surface, the same rust focus ring, the same radii, the same durations.
   ========================================================================== */

/* The host each widget renders into. Empty until its panel first opens. */
.qenhance { margin-bottom: 1.1rem; }
.qenhance:empty { display: none; }

/* The native list, once a widget is driving it. Present, still holding the
   answer, but neither seen nor reachable — two tab stops for one question is
   worse than either on its own. */
.options--replaced {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

/* --- Two-column questions ------------------------------------------------
   Q3, Q4 and Q10 put the ordinary radio list on the left and a visual that
   answers back on the right. The radios stay the only control, so one click
   selects — the earlier card and carousel versions needed one click to bring a
   card forward and a second to choose it. */
.qsplit {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(1.2rem, 3vw, 2.4rem);
  align-items: start;
}
@media (max-width: 760px) {
  /* The visual goes first on a narrow screen: it is the thing that changes,
     and it is worth seeing without scrolling back up. */
  .qsplit { grid-template-columns: 1fr; }
  .qsplit__visual { order: -1; }
}
.qsplit__visual { position: sticky; top: calc(var(--header-h, 80px) + 1.2rem); }
@media (max-width: 760px) { .qsplit__visual { position: static; } }
/* --- Q3 the shelf -------------------------------------------------------- */
.shelf { margin: 0; display: grid; gap: .9rem; }
.shelf__stage {
  position: relative;
  min-height: 250px;
  display: grid; align-items: end; justify-items: center;
  padding: 1rem .5rem .6rem;
  background: var(--cream-2); border: 1px solid var(--line); border-radius: var(--r-md);
}
.shelf__tower { display: flex; flex-direction: column-reverse; align-items: center; gap: 4px; width: 100%; }
.shelf__item {
  width: min(86%, 240px); min-height: 30px;
  display: grid; place-items: center; padding: .3rem .7rem;
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: .03em;
  color: var(--rust-deep);
  background: var(--white); border: 1.5px solid var(--line-strong);
  border-radius: var(--r-sm);
  box-shadow: 0 2px 8px -5px rgba(102,74,58,.4);
  transform: translateX(calc(var(--drift) * 5px)) rotate(calc(var(--drift) * .5deg));
  animation: shelfIn .34s var(--ease);
}
/* Past five, the shelf is visibly crowded — which is the answer, not a fault. */
.shelf__item:nth-child(n+6) { background: var(--rust-tint); border-color: var(--rust); }
@keyframes shelfIn { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; } }
.shelf__board {
  order: -1;   /* column-reverse puts the first child at the bottom */
  width: min(94%, 260px); height: 3px; margin-bottom: 6px;
  background: var(--line-strong); border-radius: 2px;
}
.shelf__empty {
  position: absolute; inset: auto 1rem 45%; text-align: center;
  font-size: var(--fs-sm); color: var(--ink-muted);
}
.shelf__cap { display: grid; gap: .15rem; font-size: var(--fs-sm); color: var(--ink-soft); }
.shelf__cap strong { color: var(--rust-deep); }
.shelf__cap-wait { color: var(--ink-muted); }

/* --- Q4 the support map --------------------------------------------------
   Four seats around a centre, laid out on a 3x3 grid rather than by angle.
   The earlier versions positioned each item at a radius and collided with the
   hub whenever the labels were wide; a grid cannot overlap, needs no
   trigonometry, and reflows on its own at any width. */
.smap { margin: 0; display: grid; gap: .9rem; }
.smap__field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  align-items: center; justify-items: center;
  gap: .75rem;
  width: min(100%, 360px); margin-inline: auto;
}
.smap__hub {
  grid-area: 2 / 2;
  width: 100%; aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center; align-content: center; gap: .15rem;
  padding: .7rem; text-align: center;
  background: var(--cream-2); border: 1.5px solid var(--line);
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.smap__hub.is-filled { background: var(--rust-tint); border-color: var(--rust); }
.smap__hub-eyebrow {
  font-size: var(--fs-2xs); letter-spacing: .02em; color: var(--ink-muted);
}
.smap__hub-name {
  font-family: var(--serif); font-size: clamp(.88rem, .78rem + .45vw, 1.05rem);
  line-height: 1.15; color: var(--rust-deep);
}
.smap__seat {
  width: 100%; min-height: 40px;
  display: grid; place-items: center; padding: .4rem .5rem;
  text-align: center; font-size: var(--fs-2xs); font-weight: 600; line-height: 1.2;
  color: var(--ink-soft);
  background: var(--white); border: 1.5px solid var(--line); border-radius: var(--r-pill);
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease),
              color var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
/* North, east, west — the order the component renders the three seats in. */
.smap__seat:nth-of-type(1) { grid-area: 1 / 2; }
.smap__seat:nth-of-type(2) { grid-area: 2 / 3; }
.smap__seat:nth-of-type(3) { grid-area: 2 / 1; }
.smap__seat.is-on {
  border-color: var(--rust); background: var(--rust); color: var(--white);
  box-shadow: 0 10px 24px -16px rgba(168,90,58,.9);
}
.smap__seat.is-quiet { opacity: .55; }
/* The seats are the control (Q22): buttons in a radiogroup, one tap chooses. */
button.smap__seat { font: inherit; font-size: var(--fs-2xs); font-weight: 600; cursor: pointer; min-height: 44px; }
button.smap__seat:hover { border-color: var(--line-strong); }
button.smap__seat.is-on:hover { border-color: var(--rust); }
button.smap__seat:focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; }
.smap__cap { font-size: var(--fs-sm); color: var(--ink-soft); text-align: center; }
/* The smallest phones: a slimmer hub so the side seats keep room for two lines. */
@media (max-width: 360px) {
  .smap__field { grid-template-columns: minmax(0, 1.1fr) minmax(0, .8fr) minmax(0, 1.1fr); gap: .5rem; }
  button.smap__seat { font-size: var(--fs-2xs); padding: .35rem .4rem; }
  .smap__hub-name { font-size: var(--fs-xs); }
}

/* --- Q10 the scene ------------------------------------------------------- */
.sview { margin: 0; display: grid; gap: .8rem; }
.sview__media {
  display: block; aspect-ratio: 4 / 3;
  border-radius: var(--r-md); border: 1px solid var(--line);
  background: var(--cream-3);
  /* Clip the picture to the rounded frame. The mask is for Safari, which
     otherwise paints a playing video's square corners over the radius. */
  overflow: hidden; isolation: isolate;
  -webkit-mask-image: -webkit-radial-gradient(white, black);
}
.sview__media img,
.sview__media .sview__video { width: 100%; height: 100%; object-fit: cover; }
/* The ambient loop sits in the same frame as a scene photograph, so it
   inherits the crop rather than defining its own. */
.sview__video { display: block; }
.sview__cap { display: grid; gap: .15rem; font-size: var(--fs-sm); color: var(--ink-soft); }
.sview__cap strong { color: var(--rust-deep); }
.sview__cap-wait { color: var(--ink-muted); }
@media (max-width: 760px) {
  /* Stacked, the photograph sits above the choices — a shorter crop keeps the
     first option on screen rather than pushing it below the fold. */
  .sview__media { aspect-ratio: 16 / 9; }
  .shelf__stage { min-height: 190px; }
}


/* --- Q8 option wheel ---------------------------------------------------- */
.wheel { display: grid; gap: 1.1rem; justify-items: center; }
.wheel__stage {
  --wheel-r: 126px;
  --wheel-iw: 122px;
  position: relative; width: min(100%, 380px); aspect-ratio: 1;
  touch-action: none;   /* the dial is turned by dragging round it */
}
.wheel__marker {
  position: absolute; top: -2px; left: 50%; z-index: 3;
  width: 0; height: 0; margin-left: -9px;
  border-left: 9px solid transparent; border-right: 9px solid transparent;
  border-top: 15px solid var(--rust);
}
.wheel__ring {
  position: absolute; inset: 0; border-radius: 50%;
  background: var(--cream-2); border: 1.5px solid var(--line);
  transform: rotate(var(--rot));
  transition: transform .5s var(--ease);
  cursor: grab;
}
.wheel__ring.is-dragging { transition: none; cursor: grabbing; }
.wheel__slot {
  position: absolute; left: 50%; top: 50%; width: 0; height: 0;
  transform: rotate(var(--a)) translateY(calc(var(--wheel-r) * -1));
}
.wheel__seg {
  position: absolute; left: 50%; top: 50%;
  width: var(--wheel-iw); min-height: 44px;
  display: grid; place-items: center; padding: .5rem .6rem;
  background: var(--white); border: 1.5px solid var(--line);
  border-radius: var(--r-pill);
  /* Centre on the point, then undo the slot angle and the ring's rotation
     together, so labels stay upright through a drag as well as after it. The
     transform transition matches the ring's exactly, or a label would tilt for
     half a second every time the dial settles. */
  transform: translate(-50%, -50%) rotate(calc((var(--a) + var(--rot)) * -1));
  transition: transform .5s var(--ease), border-color var(--dur) var(--ease),
              background-color var(--dur) var(--ease);
}
.wheel__ring.is-dragging .wheel__seg { transition: none; }
.wheel__seg.is-on {
  border-color: var(--rust); background: var(--rust); color: var(--white);
  box-shadow: 0 10px 24px -16px rgba(168,90,58,.9);
}
.wheel__seg:focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; }
.wheel__seg-label { font-size: var(--fs-sm); font-weight: 600; line-height: 1.15; text-align: center; }
.wheel__hub {
  position: absolute; top: 50%; left: 50%; z-index: 2;
  width: 30%; aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%; background: var(--cream); border: 1.5px solid var(--line);
}
.wheel__read { font-size: var(--fs-body); color: var(--ink-soft); text-align: center; max-width: 42ch; }
.wheel__read strong { color: var(--rust-deep); }

/* --- Q9 elastic slider -------------------------------------------------- */
.eslider { display: grid; gap: .9rem; max-width: 520px; margin-inline: auto; }
.eslider__read { text-align: center; display: grid; gap: .1rem; }
.eslider__read strong {
  font-family: var(--serif); font-size: clamp(1.4rem, 1.15rem + 1.2vw, 1.95rem);
  color: var(--rust-deep); line-height: 1.15;
}
.eslider__read strong.is-quiet { color: var(--ink-soft); }
.eslider__mins { font-size: var(--fs-sm); color: var(--ink-muted); }
.eslider__track {
  position: relative; padding: .8rem 0;
  /* The give: the whole track stretches a little past either end and settles
     back on release. Capped at 18px in JS — a hint, not a bounce. */
  transform: translateX(var(--pull, 0px));
  transition: transform .42s var(--ease), opacity var(--dur) var(--ease);
}
.eslider__track.is-pulling { transition: none; }
.eslider__track.is-off { opacity: .45; }
/* Before any answer: a small arrow at the start of the track says "drag". */
.eslider__nudge {
  justify-self: start; width: 46px; height: 14px; margin-top: -.5rem;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 46 14'%3E%3Cpath d='M2 7h38M34 2l6 5-6 5' fill='none' stroke='%23A85A3A' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
@media (prefers-reduced-motion: no-preference) {
  .eslider__nudge { animation: eslider-nudge 1.3s ease-in-out infinite; }
  @keyframes eslider-nudge { 0%, 100% { transform: translateX(0); opacity: .55; } 50% { transform: translateX(14px); opacity: 1; } }
}
.eslider__range {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 44px; margin: 0; background: transparent; cursor: pointer;
}
.eslider__range::-webkit-slider-runnable-track {
  height: 8px; border-radius: var(--r-pill);
  background: linear-gradient(to right, var(--rust) var(--fill), var(--cream-3) var(--fill));
}
.eslider__range::-moz-range-track { height: 8px; border-radius: var(--r-pill); background: var(--cream-3); }
.eslider__range::-moz-range-progress { height: 8px; border-radius: var(--r-pill); background: var(--rust); }
.eslider__range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 30px; height: 30px; margin-top: -11px; border-radius: 50%;
  background: var(--white); border: 2.5px solid var(--rust);
  box-shadow: 0 4px 12px -4px rgba(102,74,58,.45);
}
.eslider__range::-moz-range-thumb {
  width: 30px; height: 30px; border-radius: 50%; border: 2.5px solid var(--rust);
  background: var(--white); box-shadow: 0 4px 12px -4px rgba(102,74,58,.45);
}
.eslider__range:focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; border-radius: var(--r-pill); }
.eslider__scale {
  display: flex; justify-content: space-between;
  font-size: var(--fs-xs); color: var(--ink-muted); padding-inline: 2px;
}
.eslider__varies {
  min-height: 52px; display: grid; gap: .1rem; padding: .7rem 1.1rem;
  text-align: left;
  background: var(--white); border: 1.5px solid var(--line); border-radius: var(--r-md);
  font-size: var(--fs-body); font-weight: 500; color: var(--rust-deep);
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.eslider__varies small { font-size: var(--fs-xs); color: var(--ink-muted); font-weight: 400; }
.eslider__varies:hover { border-color: var(--line-strong); }
.eslider__varies.is-on {
  border-color: var(--rust); background: #FFFDFB;
  box-shadow: 0 0 0 1px var(--rust), 0 10px 26px -18px rgba(168,90,58,.7);
}
.eslider__varies:focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; }

/* --- Q11 focus cards ----------------------------------------------------
   The unattended cards sit back and their surface cools. Their text does not
   fade, blur, or lose contrast — three of these are real choices and all four
   have to stay readable and selectable at all times. */
.fcards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
@media (max-width: 620px) { .fcards { grid-template-columns: 1fr; } }
/* Beside a drawing (Q20): all four at once, two by two, phones included. */
.qsplit .fcards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.qsplit .fcard { min-height: 0; padding: .9rem .95rem; }
.qsplit .fcard__name { font-size: var(--fs-sm); }
.qsplit .fcard__state { display: none; }
.fcard {
  position: relative; display: grid; gap: .25rem; align-content: start;
  min-height: 118px; padding: 1.15rem 1.25rem; text-align: left;
  background: var(--white); border: 1.5px solid var(--line);
  border-radius: var(--r-md); box-shadow: var(--shadow-soft);
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease),
              background-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.fcards.is-attending .fcard { transform: scale(.985); background: var(--cream-2); }
.fcards.is-attending .fcard.is-attended,
.fcard.is-attended { transform: none; background: var(--white); box-shadow: var(--shadow-lift); }
.fcard:focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; }
.fcard.is-on {
  border-color: var(--rust); background: #FFFDFB;
  box-shadow: 0 0 0 1px var(--rust), 0 14px 34px -22px rgba(168,90,58,.75);
}
.fcard__mark {
  width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid var(--line-strong); position: relative; margin-bottom: .2rem;
  transition: border-color var(--dur) var(--ease);
}
.fcard.is-on .fcard__mark { border-color: var(--rust); }
.fcard.is-on .fcard__mark::after {
  content: ""; position: absolute; inset: 3.5px; border-radius: 50%; background: var(--rust);
}
.fcard__name { font-size: var(--fs-body); font-weight: 600; color: var(--rust-deep); line-height: 1.25; }
.fcard__detail { font-size: var(--fs-xs); color: var(--ink-muted); line-height: 1.4; }
.fcard__state {
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: .02em; color: var(--rust-text); min-height: 1.2em; margin-top: .2rem;
}

/* --- Milestones: timeline + compare ------------------------------------- */
.progress-strip.is-interactive .progress-strip__static { display: none; }
/* The picture first, the four weeks in one row beneath it: no sideways scroll. */
#panel-milestones .progress-strip { margin-top: 1.2rem; }
.mstone { display: grid; gap: .6rem; }
.mstone__rail {
  position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .2rem;
  padding: .1rem 0 .2rem;
}
.mstone__point { min-width: 0; }
.mstone__btn {
  position: relative; z-index: 1;
  width: 100%; min-height: 44px;
  display: grid; justify-items: center; gap: .2rem; padding: var(--mpad, .5rem) .3rem;
  background: none; text-align: center;
}
.mstone__dot {
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--cream); border: 2px solid var(--line-strong);
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}
.mstone__btn.is-past .mstone__dot { background: var(--rust); border-color: var(--rust); }
.mstone__btn.is-on .mstone__dot { background: var(--rust); border-color: var(--rust); transform: scale(1.25); }
.mstone__label { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .05em; color: var(--ink-muted); }
.mstone__btn.is-on .mstone__label { color: var(--rust-text); }
.mstone__note { font-size: var(--fs-2xs); color: var(--ink-muted); line-height: 1.25; }
.mstone__btn:focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; border-radius: var(--r-sm); }
/* The rail behind the dots, from the first dot's centre to the last one's
   (four equal columns: 12.5% in from each side) and through their middle, so
   --at fills exactly to the chosen dot. */
.mstone__rail { --mpad: .5rem; }
.mstone__line {
  position: absolute; left: 12.5%; right: 12.5%; top: calc(.1rem + var(--mpad) + 6.5px); height: 2px;
  background: linear-gradient(to right,
    var(--rust) 0 calc(var(--at) * 100%), var(--line-strong) calc(var(--at) * 100%) 100%);
  transition: background var(--dur) var(--ease);
}
/* Portrait, because the panels of the sprite are portrait. A landscape frame
   here is what stretched the face sideways. */
.mstone__compare { aspect-ratio: 4 / 5; width: 100%; }
/* The picture and its week labels: the frame carries the width, so the
   labels line up with the picture's edges at every size. */
.mstone__frame { width: min(100%, 380px); margin-inline: auto; }
.mstone__caps { display: flex; justify-content: space-between; gap: .5rem; margin-top: .45rem; font-size: var(--fs-xs); font-weight: 600; letter-spacing: .02em; color: var(--rust-deep); line-height: 1.3; }
.mstone__frame.is-playing .mstone__caps { justify-content: center; }
.mstone__frame.is-playing .mstone__cap--a { display: none; }
.mstone__compare .compare__pane { background-repeat: no-repeat; }
@media (max-width: 560px) { .mstone__frame { width: min(100%, 300px); } }
/* Phones: sized from the screen height, so the picture, the weeks and
   Continue all fit at once. */
@media (max-width: 700px) {
  #panel-milestones .step-intro { font-size: var(--fs-sm); margin-top: .5rem; }
  #panel-milestones .progress-strip { margin-top: .8rem; padding-block: .7rem .5rem; }
  #panel-milestones .progress-strip__head { margin-bottom: .5rem; }
  .mstone__frame { width: min(100%, max(124px, calc((100dvh - 607px) * .9))); }   /* room for the labels under it */
  /* Russian week notes wrap to two lines ("Отправная точка"): a slightly smaller picture. */
  :lang(ru) .mstone__frame { width: min(100%, max(124px, calc((100dvh - 635px) * .9))); }
  /* The strip ends without a rule: the Back / Continue bar's own line is
     right below it. */
  #panel-milestones .progress-strip { border-bottom: 0; padding-bottom: 0; margin-top: .5rem; }
}
@media (max-width: 700px) and (max-height: 680px) {
  /* Short phones: the tag in the strip's head already says the picture is
     illustrative, so the sentence under it goes, and the intro is smaller. */
  #panel-milestones .progress-strip > p.xs { display: none; }
  #panel-milestones .step-intro { font-size: var(--fs-xs); }
  #panel-milestones h1 { font-size: 1.55rem; }
  .mstone__caps { display: none; }   /* the weeks below say it */
  .mstone__frame { width: min(100%, max(124px, calc((100dvh - 584px) * .9))); }
  :lang(ru) .mstone__frame { width: min(100%, max(124px, calc((100dvh - 612px) * .9))); }
  .mstone__rail { --mpad: .35rem; }
  .mstone__btn { padding-inline: .1rem; min-height: 44px; }
  .mstone__note { display: none; }
  .mstone__label { letter-spacing: .02em; white-space: nowrap; }
  .progress-strip__cap { margin-top: .5rem; }
}

/* --- Profile shape ------------------------------------------------------ */
.pshape {
  display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: clamp(1.2rem, 3vw, 2.4rem); align-items: center;
  margin-top: 1.8rem; padding-top: 1.6rem; border-top: 1px solid var(--line);
}
@media (max-width: 700px) { .pshape { grid-template-columns: 1fr; } }
.pshape__chart { width: 100%; max-width: 340px; margin-inline: auto; }
.pshape__title { font-family: var(--serif); font-size: var(--fs-h3); line-height: 1.2; margin-bottom: .6rem; }
.pshape__list { display: grid; gap: .3rem; margin-top: 1rem; }
.pshape__list li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding: .35rem 0; border-bottom: 1px solid var(--line);
  font-size: var(--fs-sm);
}
.pshape__list li:last-child { border-bottom: 0; }
.pshape__list strong { font-family: var(--serif); font-size: var(--fs-h4); color: var(--rust-deep); }
.pshape__list small { font-size: var(--fs-xs); color: var(--ink-muted); font-weight: 400; }

/* --- What else the answers changed -------------------------------------- */
.shaped { margin-top: 1.8rem; padding: clamp(1.1rem, 3vw, 1.7rem); background: var(--cream-2); border: 1px solid var(--line); border-radius: var(--r-md); }
.shaped__title { font-family: var(--serif); font-size: var(--fs-h3); line-height: 1.2; }
.shaped__list { display: grid; gap: .75rem; margin-top: .9rem; }
.shaped__list li {
  position: relative; padding-left: 1.15rem;
  font-size: var(--fs-sm); color: var(--ink-soft); line-height: 1.55;
}
.shaped__list li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--rose);
}

/* --- Guidance, shaped by the answers ------------------------------------ */
.gshape { display: grid; gap: .8rem; margin-top: 1.6rem; }
.gshape__line {
  font-size: var(--fs-sm); color: var(--ink-soft); line-height: 1.6;
  padding: .6rem .85rem; border-radius: var(--r-sm); background: var(--cream-2);
}
/* The sunscreen answers this would change most get the emphatic treatment. */
.gshape__line--lead {
  border-left-color: var(--rust); color: var(--rust-deep); font-weight: 500;
}

/* --- Suggested plan ----------------------------------------------------- */
.plan__suggested {
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: .02em; color: var(--rust-text); margin-bottom: .6rem;
}
.plan.is-suggested { border-color: var(--rust); }

/* --- Mystery box --------------------------------------------------------
   Warm, closed, and not remotely a casino. It hides three cards that are
   already in the document, and opening it is the only thing it does. */
.mbox { display: grid; justify-items: center; margin-top: 1.8rem; }
.mbox__lid {
  display: grid; justify-items: center; gap: 1rem;
  padding: clamp(1.6rem, 4vw, 2.4rem) clamp(1.5rem, 5vw, 3rem);
  width: min(100%, 460px); text-align: center;
  background: linear-gradient(168deg, #FFFDFB 0%, var(--rust-tint) 100%);
  border: 1.5px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-soft);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}
.mbox__lid:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); border-color: var(--rust); }
.mbox__lid:focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; }
.mbox__art { position: relative; width: 92px; height: 78px; display: block; }
.mbox__body {
  position: absolute; left: 6px; right: 6px; bottom: 0; height: 52px;
  background: var(--rust); border-radius: 0 0 var(--r-sm) var(--r-sm);
}
.mbox__top {
  position: absolute; left: 0; right: 0; top: 14px; height: 18px;
  background: var(--rust-dark); border-radius: var(--r-sm);
  transition: transform .4s var(--ease);
}
.mbox__lid:hover .mbox__top { transform: translateY(-5px) rotate(-3deg); }
.mbox__ribbon {
  position: absolute; left: 50%; top: 14px; bottom: 0; width: 13px; margin-left: -6.5px;
  background: var(--rose); z-index: 1;
}
.mbox__copy { display: grid; gap: .25rem; }
.mbox__title { font-family: var(--serif); font-size: clamp(1.2rem, 1.05rem + .8vw, 1.6rem); color: var(--rust-deep); line-height: 1.2; }
.mbox__hint { font-size: var(--fs-xs); letter-spacing: .02em; color: var(--ink-muted); }

/* The recommendations are in the DOM the whole time; this only decides
   whether they are on screen yet. */
.rec-list:not(.is-revealed) { display: none; }
.rec-list.is-revealed > .rec { animation: recIn .5s var(--ease) backwards; }
.rec-list.is-revealed > .rec:nth-child(2) { animation-delay: .09s; }
.rec-list.is-revealed > .rec:nth-child(3) { animation-delay: .18s; }
@keyframes recIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* --- Learning wheel -----------------------------------------------------
   Chooses a reading order. Nothing else — no prize, no score, no effect on
   anything the visitor gets, and all four topics open to everyone regardless. */
.lwheel { margin-top: 2rem; padding-top: 1.8rem; border-top: 1px solid var(--line); }
.lwheel__title { font-family: var(--serif); font-size: var(--fs-h3); line-height: 1.2; }
.lwheel__lede { margin-top: .5rem; max-width: 52ch; }
.lwheel__stage {
  display: flex; flex-wrap: wrap; align-items: center; gap: clamp(1.2rem, 4vw, 2.5rem);
  margin-top: 1.4rem;
}
.lwheel__dial { position: relative; width: min(100%, 210px); aspect-ratio: 1; }
.lwheel__svg {
  width: 100%; height: 100%; border-radius: 50%;
  transform: rotate(var(--turn, 0deg));
  transition: transform 1.1s cubic-bezier(.16,.84,.36,1);
}
.lwheel__wedge { stroke: var(--white); stroke-width: 1.5; }
.lwheel__wedge--a { fill: var(--rust-tint); }
.lwheel__wedge--b { fill: var(--rose-tint); }
.lwheel__wedge-label {
  font-family: var(--sans); font-size: var(--fs-xs); font-weight: 600;
  fill: var(--rust-deep);
  /* Undo the dial's rotation about each label's own centre, matching its
     transition exactly, so the words stay upright and readable throughout the
     turn rather than ending up sideways or upside down. */
  transform-box: fill-box;
  transform-origin: center;
  rotate: calc(var(--turn, 0deg) * -1);
  transition: rotate 1.1s cubic-bezier(.16,.84,.36,1);
}
.lwheel__pin {
  position: absolute; top: -3px; left: 50%; margin-left: -8px;
  width: 0; height: 0;
  border-left: 8px solid transparent; border-right: 8px solid transparent;
  border-top: 14px solid var(--rust);
}
.lwheel__side { display: grid; gap: .7rem; flex: 1 1 240px; }
.lwheel__spin { min-height: 44px; justify-self: start; }
.lwheel__result { font-size: var(--fs-sm); color: var(--rust-text); min-height: 1.4em; max-width: 40ch; }
.lwheel__topics { display: grid; gap: .6rem; margin-top: 1.6rem; }
.lwheel__topic {
  width: 100%; min-height: 56px; display: grid; gap: .1rem;
  padding: .8rem 1.1rem; text-align: left;
  background: var(--white); border: 1.5px solid var(--line); border-radius: var(--r-md);
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.lwheel__topic:hover { border-color: var(--line-strong); }
.lwheel__topic:focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; }
.lwheel__topic.is-open { border-color: var(--rust); background: #FFFDFB; }
.lwheel__topic-name { font-size: var(--fs-body); font-weight: 600; color: var(--rust-deep); }
.lwheel__topic-hint { font-size: var(--fs-xs); color: var(--ink-muted); }
.lwheel__panel {
  display: grid; gap: .7rem;
  padding: 1rem 1.15rem 1.2rem;
  font-size: var(--fs-sm); color: var(--ink-soft); line-height: 1.6;
  background: var(--cream-2); border: 1px solid var(--line); border-top: 0;
  border-radius: 0 0 var(--r-md) var(--r-md);
}

/* --- Capture practice ---------------------------------------------------
   Optional, unscored, and skippable from anywhere. Closed by default so it
   never stands between anyone and the next screen. */
.practice {
  margin-top: 1.6rem; border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--cream-2); overflow: hidden;
}
.practice__summary {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .8rem;
  min-height: 52px; padding: .9rem 1.15rem; cursor: pointer;
  list-style: none;
}
.practice__summary::-webkit-details-marker { display: none; }
.practice__summary::after {
  content: "+"; margin-left: auto; font-size: 1.3rem; line-height: 1; color: var(--ink-muted);
}
.practice[open] .practice__summary::after { content: "−"; }
.practice__summary:focus-visible { outline: 2px solid var(--rust); outline-offset: -3px; }
.practice__summary-title { font-size: var(--fs-body); font-weight: 600; color: var(--rust-deep); }
.practice__summary-hint { font-size: var(--fs-xs); color: var(--ink-muted); }
.practice__body { display: grid; gap: .9rem; justify-items: center; padding: 0 1.15rem 1.3rem; text-align: center; }
.practice__body > .small { max-width: 46ch; }
.practice__stage { position: relative; width: 260px; height: 260px; }
.practice__canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2;
  touch-action: none; cursor: crosshair;
}
.practice__guide {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 62%; height: 80%;
  border: 2px dashed var(--line-strong); border-radius: 50%;
  background: var(--white);
}
.practice__read { font-size: var(--fs-sm); color: var(--ink-soft); max-width: 42ch; min-height: 2.8em; }
.practice__actions { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; justify-content: center; }
.practice__actions .btn { min-height: 44px; }

/* The `hidden` attribute only sets `display: none` at user-agent weight, so any
   of these components that declares its own `display` would ignore it and stay
   on screen. Everything JS hides by attribute has to say so explicitly. */
.mbox[hidden],
.gshape[hidden],
.lwheel__panel[hidden] { display: none; }

/* --- Quiz interactions: narrow screens ---------------------------------- */
@media (max-width: 560px) {
  .wheel__stage { --wheel-r: 100px; --wheel-iw: 96px; width: min(100%, 300px); }
  .wheel__seg-label { font-size: var(--fs-xs); }
  .practice__stage { width: 220px; height: 220px; }
  .lwheel__dial { margin-inline: auto; }
}

/* --- Reduced motion ----------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  /* Page-to-page and language cross-fades (view transitions) are motion too. */
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  .hero__inner > * { opacity: 1; transform: none; }
  /* The ring still fills — it is the only thing saying how far along the run
     is — but it steps rather than eases, and the run itself is much shorter. */
  .loader__arc { transition: none; }

  /* Quiz interactions. Every one of these stays fully usable; what goes is
     the decoration. The orbit holds still, the wheel jumps rather than turns,
     the slider loses its give, and the recommendations are simply there. */
  .wheel__ring, .wheel__seg { transition: none !important; }
  .lwheel__svg, .lwheel__wedge-label { transition: none !important; }
  .eslider__track { transform: none !important; transition: none !important; }
  .shelf__item { animation: none !important; }
  .rec-list.is-revealed > .rec { animation: none !important; }
  .mbox__lid:hover .mbox__top { transform: none; }
}

@media print { .header, .nav-scrim, .stepnav { display: none !important; } }

/* Language control: the site's quiet pill treatment, available outside the
   mobile menu and throughout the quiz. AZ uses the same system font palette. */
.language-switch {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 3px;
  gap: 2px;
  border: 1px solid var(--line, #d9cec4);
  border-radius: 999px;
  background: var(--cream, #f8f6f2);
}
.language-switch button {
  min-width: 44px;
  min-height: 44px;
  padding: 6px 9px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #664a3a;
  font: 600 var(--fs-xs)/1.2 var(--sans, sans-serif);
  letter-spacing: .04em;
  cursor: pointer;
}
.language-switch button[aria-pressed="true"] { background: #664a3a; color: #f8f6f2; }
.language-switch button:hover { box-shadow: inset 0 0 0 1px #a85a3a; }
.language-switch button:focus-visible { outline: 2px solid #a85a3a; outline-offset: 3px; }
.header__inner > .language-switch { margin-left: auto; }
.header__inner > .nav { order: 1; }
.header__inner > .language-switch { order: 2; }
.header__inner > .menu-toggle { order: 3; }
.proto-header__inner > .language-switch { margin-left: auto; }
html[lang="az"] .nav__link { padding-inline: .65rem; }
html[lang="az"] .btn { white-space: normal; text-align: center; }
html[lang="az"] .eslider__mins { display: inline-flex; flex-wrap: wrap; gap: .25em; }
@media (max-width: 900px) {
  .header__inner { gap: .6rem; }
  .header__inner > .nav { order: initial; }
}
@media (max-width: 480px) {
  .language-switch button { min-width: 40px; min-height: 44px; padding-inline: 7px; }
  .proto-header__inner { flex-wrap: wrap; gap: .5rem; }
  html[lang="az"] .proto-header__inner > a:last-child { font-size: var(--fs-2xs); }
}
.scratch__prompt {
  position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  color: rgba(248,246,242,.8); font: 600 var(--fs-xs)/1.2 var(--sans);
  pointer-events: none;
}
.scratch.is-revealed .scratch__prompt,
.scratch:has(.scratch__canvas[hidden]) .scratch__prompt { display: none; }
html[lang="az"] .imgph.is-missing::after { content: "Şəkil hazırlanır"; }
html[lang="az"] .compare .imgph.is-missing::after { content: none; }
html[lang="az"] .compare:has(.imgph.is-missing)::after { content: "Şəkillər hazırlanır"; }
html[lang="az"] .recharts-polar-angle-axis-tick-value { font-size: 11px; }
.file-picker {
  position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: .8rem;
  padding: .7rem; border: 1.5px dashed var(--line-strong);
  border-radius: var(--r-sm); background: var(--cream-2); font-size: var(--fs-sm);
}
/* The camera, full screen (openGuidedCamera() in app.js). The picture sits
   between a top bar (close, screen light) and a bottom bar (note, the phone's
   own camera). With the screen light on, everything round the picture is a
   bright warm, neutral or cool white: the phone's screen lights the face. */
.camera-kit {
  --ring: #FFE2C4;
  position: fixed; inset: 0; z-index: 300;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto; justify-items: center;
  gap: .6rem; padding: max(.6rem, env(safe-area-inset-top)) clamp(14px, 4.5vw, 40px) max(.7rem, env(safe-area-inset-bottom));
  background: #241C18; color: #F8F6F2;
  transition: background-color .45s var(--ease);
}
.camera-kit[hidden] { display: none; }
.camera-kit.is-lit { background: var(--ring); color: var(--rust-deep); }
.camera-kit.is-lit[data-tone="neutral"] { --ring: #FFFFFF; }
.camera-kit.is-lit[data-tone="cool"] { --ring: #E4EEFF; }
html.cam-open, html.cam-open body { overflow: hidden; }
.camera-kit__head, .camera-kit__foot { width: 100%; max-width: 560px; display: flex; align-items: center; justify-content: space-between; gap: .5rem .8rem; }
.camera-kit__foot { flex-direction: column; gap: .15rem; text-align: center; }
.camera-kit__close {
  position: relative; flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .28);
}
.camera-kit.is-lit .camera-kit__close { background: rgba(255, 255, 255, .7); border-color: rgba(102, 74, 58, .2); }
.camera-kit__close span::before, .camera-kit__close span::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 18px; height: 2px; border-radius: 2px;
  background: currentColor; translate: -50% -50%; rotate: 45deg;
}
.camera-kit__close span::after { rotate: -45deg; }
.camera-kit__close:focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; }
.camera-kit .cam-stage { width: 100%; max-width: 560px; height: 100%; border-radius: 22px; overflow: hidden; background: #000; box-shadow: 0 10px 40px -16px rgba(0, 0, 0, .5); }
#YMK-module { display: grid; place-items: center; width: 100%; height: 100%; overflow: hidden; background: #000; }
.camera-kit .camera-kit__note { color: inherit; opacity: .78; }
.camera-kit .linkish { color: inherit; font-weight: 700; min-height: 44px; }
.camera-kit .camlight__toggle { color: inherit; }
.camera-kit .camlight__tone { width: 44px; height: 44px; padding: 0; justify-content: center; background: rgba(255, 255, 255, .7); }
.camera-kit .camlight__swatch { width: 16px; height: 16px; }
.file-picker input[type="file"] {
  position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer;
}
.file-picker__button {
  padding: .5rem .9rem; border: 1.5px solid var(--line-strong);
  border-radius: var(--r-sm); background: var(--white); font-size: var(--fs-xs); font-weight: 600;
}
.file-picker:focus-within { outline: 2px solid var(--rust); outline-offset: 3px; }

/* --- Breather: a short pause every seven questions --------------------------
   Shown by runBreather() in app.js while the next stretch of the quiz loads.
   A sprout draws itself, the halo breathes and a thin bar fills for the
   pause's length (--breath). Under reduced motion it is simply still. */
.breather {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center; padding: 1.5rem;
  background: var(--cream);
}
.breather[hidden] { display: none; }
.breather__card { display: grid; justify-items: center; gap: 1.1rem; max-width: 26rem; text-align: center; }
.breather__art { width: 120px; height: 120px; }
.breather__halo { fill: var(--rust-tint); }
.breather__draw {
  fill: none; stroke: var(--rust-deep); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.breather__leaf { fill: #F3DCDF; }
.breather__line { font-family: var(--serif); font-size: clamp(1.25rem, 1.1rem + .8vw, 1.6rem); line-height: 1.3; color: var(--rust-deep); }
.breather__bar { display: block; width: 160px; height: 3px; border-radius: 2px; background: var(--cream-3); overflow: hidden; }
.breather__bar span { display: block; height: 100%; width: 100%; background: var(--rust); transform-origin: left; transform: scaleX(1); }
@media (prefers-reduced-motion: no-preference) {
  .breather:not([hidden]) .breather__card { animation: breather-in .45s var(--ease) both; }
  .breather:not([hidden]) .breather__halo { animation: breather-halo 2.4s ease-in-out infinite; transform-origin: 60px 60px; }
  .breather:not([hidden]) .breather__draw { stroke-dasharray: 140; animation: breather-draw 1.1s var(--ease) both; }
  .breather:not([hidden]) .breather__leaf { animation-delay: .35s; }
  .breather:not([hidden]) .breather__leaf--2 { animation-delay: .55s; }
  .breather:not([hidden]) .breather__bar span { animation: breather-bar var(--breath, 1.8s) linear both; }
  @keyframes breather-in { from { opacity: 0; transform: translateY(8px); } }
  @keyframes breather-halo { 50% { transform: scale(.9); } }
  @keyframes breather-draw { from { stroke-dashoffset: 140; } to { stroke-dashoffset: 0; } }
  @keyframes breather-bar { from { transform: scaleX(0); } }
}

/* Chapter ribbons: a small drawn symbol per chapter instead of a number. */
.chapter__num svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: var(--cream); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* --- Phones: a full-screen quiz -------------------------------------------
   A minimal header (the mark, the three progress stages, the languages), and
   each question fitted to the screen by fitStep(): the drawing holds a fixed
   band and only the answers scroll, if they must. */
@media (max-width: 700px) {
  .proto-header__inner { padding-block: .4rem; gap: .6rem; }
  .proto-header .brand__word, .proto-exit { display: none; }
  .proto-header .brand__mark { width: 30px; height: 30px; }
  .proto-header .language-switch button { min-width: 30px; min-height: 30px; padding-inline: 6px; font-size: var(--fs-2xs); }
  /* One row: the mark, the stages between, the languages. The current
     stage's name (and question count) sits above its bars. */
  .proto-header > .wrap {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center;
    column-gap: .8rem; padding-block: .4rem;
  }
  .proto-header__inner { display: contents; }
  .proto-header .brand { grid-column: 1; grid-row: 1; }
  .proto-header .language-switch { grid-column: 3; grid-row: 1; margin: 0; }
  .proto-header .progress { grid-column: 2; grid-row: 1; padding: 0; }
  .proto-header .progress__meta { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .proto-header .progress__track { position: relative; gap: 3px; padding-top: 15px; }
  .proto-header .progress__seg { height: 3px; }
  .proto-header .progress__name { display: none; }
  .proto-header .progress__num { display: inline; }
  .proto-header .progress__stage.is-current .progress__name {
    display: block; position: absolute; top: 0; left: 0; right: 0;
    font-size: var(--fs-2xs); line-height: 1.2;
  }

  /* One frame for every question, so moving between them changes the
     content and never the layout: the drawing in a fixed band at the top,
     the question text always starting on the same line under it (the title
     and hint each keep room for two lines), then the answers. The chapter
     label sits on the band instead of pushing the question down. */
  .proto-main:has(.step-panel.is-fit.is-active) { padding-block: .7rem 0; }
  /* Every other step starts as close under the header as a question does. */
  .proto-main:has(.step-panel.is-active:not(.is-fit)) { padding-top: .7rem; }
  /* Room under the last line for the fixed Back / Continue bar, and no more. */
  .proto-main:has(.step-panel.is-quiz.is-active:not(.is-fit)) { padding-bottom: calc(5.1rem + env(safe-area-inset-bottom)); }
  .step-panel.is-active:not(.is-fit) > .eyebrow:first-child { margin-top: 0; }
  .step-panel.is-fit { --band: clamp(84px, 15dvh, 130px); position: relative; padding-top: calc(var(--band) + .55rem); }
  .step-panel.is-fit .qsplit__visual {
    position: absolute; top: 0; left: 0; right: 0; height: var(--band);
    display: grid; grid-template-rows: minmax(0, 1fr) auto; justify-items: center; align-items: center; gap: .2rem;
  }
  .step-panel.is-fit .qsplit__visual.art svg { width: auto; height: 100%; max-width: 100%; }
  .step-panel.is-fit .facezone__key { font-size: var(--fs-2xs); }
  .step-panel.is-fit .sview { width: 100%; gap: 0; }
  .step-panel.is-fit .sview__media { aspect-ratio: auto; width: 100%; height: 100%; }
  .step-panel.is-fit .sview__media video, .step-panel.is-fit .sview__media img { width: 100%; height: 100%; object-fit: cover; }
  /* Q18's water: a taller band than the drawings get, framed on the top of
     the bowl, where the drops land. */
  #panel-q18.is-fit { --band: clamp(110px, calc(100dvh - 608px), 240px); }
  #panel-q18 .sview__media video, #panel-q18 .sview__media img { object-position: 50% 22%; }
  .step-panel.is-fit > .chapter {
    position: absolute; top: 0; left: 0; z-index: 1; margin: 0; padding: .2rem .6rem .2rem .2rem;
    border: 0; border-radius: 999px; background: rgba(248, 246, 242, .92); font-size: var(--fs-xs);
  }
  .step-panel.is-fit .chapter__num { width: 1.45rem; height: 1.45rem; }
  .step-panel.is-fit .chapter__name { font-size: var(--fs-sm); }
  .step-panel.is-fit .chapter__line { display: none; }
  .step-panel.is-fit > .eyebrow { margin-bottom: .15rem; }
  .step-panel.is-fit .qgroup { margin-top: .35rem; }
  .step-panel.is-fit .qgroup legend { font-size: clamp(1.25rem, 1.12rem + 1.2vw, 1.5rem); line-height: 1.2; min-height: 2.4em; margin-bottom: .25rem; }
  .step-panel.is-fit .qgroup__hint { margin-bottom: .6rem; font-size: var(--fs-xs); line-height: 1.45; min-height: 2.9em; }
  /* No hint: the same room, left empty, so the answers still start in place. */
  .step-panel.is-fit .qgroup:not(:has(> .qgroup__hint)) > legend { margin-bottom: calc(.25rem + .86rem * 2.9 + .6rem); }
  .step-panel.is-fit .qsplit { gap: 0; }

  /* The answers: the only part that may scroll, and a little padding so
     rings and borders are not clipped at its edges. */
  .step-panel.is-fit .qsplit > :not(.qsplit__visual) {
    position: relative;   /* so a widget's hidden radio list stays inside it */
    overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
    padding: 3px; margin: -3px;
  }
  .step-panel.is-fit .options { gap: .5rem; }
  .step-panel.is-fit .opt__box { min-height: 50px; padding: .6rem .95rem; gap: .8rem; }
  .step-panel.is-fit .options--tiles .opt__box { min-height: 60px; }

  /* Long chip lists on a phone: the group headings stay, and each group is a
     two-column list of answers with the picture beside the words, so long
     labels keep a readable size. The order is the list order, unchanged. */
  .step-panel.is-fit .options--chips { gap: .7rem; padding-top: 6px; }
  .step-panel.is-fit .chipset__label { margin-bottom: .3rem; font-size: var(--fs-2xs); }
  .step-panel.is-fit .chipset__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; }
  .step-panel.is-fit .chipset--none { padding-top: .65rem; }
  .step-panel.is-fit .chipset--none .chipset__list { grid-template-columns: minmax(0, 1fr); }
  .step-panel.is-fit .options--chips .opt__box {
    height: 100%; min-height: 46px; padding: .45rem .6rem; border-radius: 14px;
    justify-content: flex-start; text-align: left; gap: .45rem;
  }
  .step-panel.is-fit .options--chips .opt__box:has(.opt__icon) { padding-left: .5rem; }
  .step-panel.is-fit .options--chips .opt__icon { margin: 0; width: 22px; height: 26px; }
  .step-panel.is-fit .options--chips .opt__text { font-size: var(--fs-xs); line-height: 1.25; overflow-wrap: anywhere; hyphens: auto; }
  .step-panel.is-fit .options--chips .opt input:checked + .opt__box .opt__text::before { top: -5px; right: -3px; width: 16px; height: 16px; background-size: 10px; }

  /* When the answers run past the screen: the list fades at its lower edge,
     Sakra's own rail shows beside it (the phone's scrollbar is hidden), and
     a small arrow says there is more below. markMore() in app.js places the
     rail and the arrow and sets .has-more until the list reaches its end. */
  .step-panel.is-fit .qsplit > :not(.qsplit__visual) { scrollbar-width: none; }
  .step-panel.is-fit .qsplit > :not(.qsplit__visual)::-webkit-scrollbar { display: none; }
  .step-panel.is-fit .qsplit.has-more > :not(.qsplit__visual) {
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 44px), rgba(0,0,0,.15));
            mask-image: linear-gradient(to bottom, #000 calc(100% - 44px), rgba(0,0,0,.15));
  }

  /* Q17 (options--pair): four answers with a line each, two by two, so all
     four show at once. The tick badge replaces the hidden dot. */
  .step-panel.is-fit .options--pair { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-top: 6px; }
  .step-panel.is-fit .options--pair .opt__box { position: relative; height: 100%; align-items: flex-start; padding: .6rem .7rem; }
  .step-panel.is-fit .options--pair .opt__dot { display: none; }
  .step-panel.is-fit .options--pair .opt__text small { font-size: var(--fs-2xs); line-height: 1.3; }
  .step-panel.is-fit .options--pair .opt input:checked + .opt__box { background: var(--rust-tint); box-shadow: 0 0 0 1px var(--rust); }
  .step-panel.is-fit .options--pair .opt input:checked + .opt__box .opt__text::before {
    content: ""; position: absolute; top: -5px; right: -3px; z-index: 1; width: 16px; height: 16px; border-radius: 50%;
    background: var(--rust) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.6 6.3l2.3 2.3 4.5-4.9' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 10px no-repeat;
    box-shadow: 0 0 0 2px var(--cream);
  }

  /* Q20's cards: two by two, compact. */
  .step-panel.is-fit .fcards { gap: .45rem; }
  .step-panel.is-fit .fcard { padding: .7rem .75rem; gap: .15rem; }
  .step-panel.is-fit .fcard__mark { width: 16px; height: 16px; margin-bottom: .1rem; }
  .step-panel.is-fit .fcard.is-on .fcard__mark::after { inset: 2.5px; }
  .step-panel.is-fit .fcard__name { font-size: var(--fs-sm); }
  .step-panel.is-fit .fcard__detail { font-size: var(--fs-2xs); line-height: 1.3; }

  /* Q14's wheel, a size smaller so it sits under its drawing. */
  .step-panel.is-fit .wheel__stage { --wheel-r: 84px; --wheel-iw: 82px; width: min(100%, 236px); }
  .step-panel.is-fit .wheel { gap: .6rem; }
}
/* Short phones (iPhone SE and the like): a smaller drawing band and slimmer
   answers, so most questions still fit without their list scrolling. */
@media (max-width: 700px) and (max-height: 720px) {
  .step-panel.is-fit { --band: clamp(60px, 11dvh, 84px); }
  .step-panel.is-fit .qgroup__hint { font-size: var(--fs-xs); margin-bottom: .45rem; }
  .step-panel.is-fit .qgroup:not(:has(> .qgroup__hint)) > legend { margin-bottom: calc(.25rem + .8rem * 2.9 + .45rem); }
  .step-panel.is-fit .qgroup legend { font-size: var(--fs-h4); }
  .step-panel.is-fit .opt__box { min-height: 44px; padding: .45rem .85rem; }
  .step-panel.is-fit .opt__text { font-size: var(--fs-sm); line-height: 1.3; }
  .step-panel.is-fit .opt__text small { margin-top: 0; }
  .step-panel.is-fit .options { gap: .4rem; }
}

/* --- Plans: tap a card to choose it; the chosen card fills with colour ------
   Yearly (two months free) or monthly billing above; renderPlans() sets the
   prices and .is-chosen. Spacious on purpose: a drawing, one line on who it is
   for, a big price, and a short ticked list. */
.billing {
  display: inline-flex; gap: 4px; padding: 4px; margin-top: 1.5rem;
  background: var(--cream-2); border: 1px solid var(--line); border-radius: 999px;
}
.billing__opt { position: relative; display: inline-flex; align-items: center; }
.billing__opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.billing__opt span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 1.15rem; border-radius: 999px;
  font-size: var(--fs-sm); font-weight: 600; color: var(--ink-soft);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.billing__opt input:checked + span { background: var(--rust-deep); color: var(--cream); }
.billing__opt input:focus-visible + span { outline: 2px solid var(--rust); outline-offset: 3px; }
/* "Two months free" belongs to Yearly, so it sits inside that pill and is
   chosen along with it. */
.billing__save {
  margin-left: .55rem; padding: .18rem .55rem; border-radius: 999px;
  font-style: normal; font-size: var(--fs-2xs); font-weight: 700; color: #7E3D48; background: var(--rose-tint);
  pointer-events: none; transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.billing__opt input:checked + span .billing__save { background: var(--rose); color: #241C18; }

.plans--pick {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem;
  margin-top: 1.5rem; align-items: stretch;
}
.plans--pick .plan {
  position: relative; display: grid; align-content: start; gap: .45rem;
  padding: 1.5rem 1.45rem 1.7rem; margin: 0;
  background: var(--white); border: 1.5px solid var(--line); border-radius: 22px;
  box-shadow: var(--shadow-soft); cursor: pointer;
  transition: background-color .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease),
              transform .3s var(--ease), box-shadow .3s var(--ease);
}
.plans--pick .plan:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.plan__radio { position: absolute; width: 1px; height: 1px; opacity: 0; }
.plan__pick { position: absolute; inset: 0; z-index: 1; border-radius: inherit; cursor: pointer; }
.plans--pick .plan:has(.plan__radio:focus-visible) { outline: 2px solid var(--rust); outline-offset: 3px; }
/* Chosen: colour and a deeper shadow, no lift, so the three cards keep their
   prices and buttons on the same lines. */
.plans--pick .plan.is-chosen {
  background: var(--rust); border-color: var(--rust); color: var(--cream);
  box-shadow: 0 24px 46px -26px rgba(168, 90, 58, .95);
}
.plan__top { display: flex; justify-content: space-between; align-items: flex-start; gap: .6rem; }
.plan__art { display: grid; place-items: center; width: 96px; height: 70px; border-radius: 16px; background: var(--cream-2); overflow: hidden; }
.plan__art svg { width: auto; height: 100%; }
.plan__art--photo img { width: 100%; height: 100%; object-fit: cover; }
.plans--pick .plan__art--photo img { transform: none; }
.plans--pick .plan.is-chosen .plan__art { background: #FFF9F4; }
.plan__badges { display: grid; justify-items: end; gap: .35rem; }
.plans--pick .plan__label, .plans--pick .plan__suggested {
  margin: 0; padding: .26rem .7rem; border: 0; border-radius: 999px;
  font-size: var(--fs-2xs); font-weight: 700; letter-spacing: .02em; white-space: nowrap;
}
.plans--pick .plan__label { background: var(--rust-tint); color: var(--rust-text); }
.plans--pick .plan__suggested { background: var(--rose-tint); color: #7E3D48; }
.plans--pick .plan.is-chosen :is(.plan__label, .plan__suggested) { background: rgba(255, 249, 244, .18); color: var(--cream); }
.plans--pick .plan__name { font-family: var(--serif); font-size: 1.65rem; line-height: 1.1; margin-top: .55rem; color: var(--rust-deep); }
.plans--pick .plan__for { font-size: var(--fs-sm); line-height: 1.45; color: var(--ink-soft); min-height: 2.9em; }
.plans--pick .plan__price { display: flex; align-items: baseline; gap: .45rem; margin-top: .35rem; font-size: var(--fs-body); }
.plan__amount { font-family: var(--serif); font-size: clamp(2.6rem, 2rem + 2vw, 3.4rem); line-height: 1; color: var(--rust-deep); font-variant-numeric: lining-nums; }
.plan__was { font-size: var(--fs-h4); color: var(--ink-muted); text-decoration-thickness: 1.5px; }
.plans--pick .plan__price small { font-size: var(--fs-sm); color: var(--ink-soft); }
.plan__billed { font-size: var(--fs-xs); color: var(--ink-muted); min-height: 1.4em; }
.plans--pick .plan__list {
  list-style: none; display: grid; gap: .6rem; margin: .9rem 0 0; padding: 1rem 0 0;
  border-top: 1px solid var(--line);
}
.plans--pick .plan__list li { position: relative; padding-left: 1.7rem; font-size: var(--fs-sm); line-height: 1.45; color: var(--ink-soft); }
.plans--pick .plan__list li::before {
  content: ""; position: absolute; left: .15rem; top: .36em; width: .72em; height: .38em;
  border-left: 2px solid var(--rust); border-bottom: 2px solid var(--rust); transform: rotate(-45deg);
  background: none; border-radius: 0;
}
.plans--pick .plan.is-chosen :is(.plan__name, .plan__amount, .plan__for, .plan__billed, .plan__list li, .plan__price small) { color: var(--cream); }
.plans--pick .plan.is-chosen .plan__was { color: rgba(248, 246, 242, .7); }
.plans--pick .plan.is-chosen .plan__list { border-top-color: rgba(255, 249, 244, .25); }
.plans--pick .plan.is-chosen .plan__list li::before { border-color: var(--cream); }
.plans__note { margin-top: 1.4rem; }
@media (max-width: 900px) {
  /* Phones and narrow tablets: the three plans stacked, each whole on the
     screen, nothing cut at an edge. */
  .plans--pick { grid-template-columns: minmax(0, 1fr); gap: .9rem; max-width: 560px; margin-inline: auto; }
  .plans--pick .plan:hover { transform: none; }
}
@media (max-width: 700px) {
  /* A compact card: the drawing beside the name, the badges above it, then
     the price, the list and the button across the full width. */
  .plans--pick .plan {
    grid-template-columns: 72px minmax(0, 1fr); column-gap: .9rem; row-gap: .2rem;
    grid-template-areas: "art badges" "art name" "art for" "price price" "billed billed" "save save" "day day" "trial trial" "list list" "cta cta";
    padding: 1.15rem 1.1rem 1.2rem;
  }
  .plans--pick .plan__top { display: contents; }
  .plans--pick .plan__art { grid-area: art; align-self: start; width: 72px; height: 72px; border-radius: 14px; }
  .plans--pick .plan__art svg { transform: scale(1.75); }
  .plans--pick .plan__badges { grid-area: badges; display: flex; flex-wrap: wrap; justify-content: flex-start; gap: .3rem; }
  .plans--pick .plan__badges:not(:has(> :not([hidden]))) { display: none; }
  .plans--pick :is(.plan__label, .plan__suggested) { white-space: normal; font-size: var(--fs-2xs); padding: .2rem .6rem; }
  .plans--pick .plan__name { grid-area: name; margin-top: 0; font-size: 1.4rem; }
  .plans--pick .plan__for { grid-area: for; font-size: var(--fs-xs); line-height: 1.4; }
  .plans--pick .plan__price { grid-area: price; margin-top: .7rem; }
  .plans--pick .plan__billed { grid-area: billed; }
  .plans--pick .plan__save { grid-area: save; }
  .plans--pick .plan__day { grid-area: day; }
  .plans--pick .plan__trial { grid-area: trial; justify-self: start; }
  .plans--pick .plan__list { grid-area: list; margin-top: .6rem; }
  .plans--pick .plan__list li { font-size: var(--fs-xs); }
  .plans--pick .plan__cta { grid-area: cta; margin-top: .8rem; }
}

/* Answer chips with a small picture (Q11 ingredients, Q13 products). */
.opt__icon { display: inline-grid; place-items: center; width: 26px; height: 30px; margin: -4px .45rem -4px -.2rem; flex: 0 0 auto; }
.opt__icon.art { display: inline-grid; gap: 0; }
.step-panel .opt__icon.art svg { width: 100%; height: 100%; }
.options--chips .opt__box:has(.opt__icon) { padding-left: .75rem; }
.options--chips .opt input:checked + .opt__box .opt__icon { transform: scale(1.06); }

/* Sakra's scrollbar for an answer list on a phone (markMore() in app.js):
   a slim rose track beside the list with a rust thumb that follows it, and
   a small arrow at the list's lower edge while there is more below. */
.answer-rail {
  position: fixed; z-index: 65; width: 4px; border-radius: 999px;
  background: rgba(212, 148, 158, .28); pointer-events: none;
}
.answer-rail__thumb {
  display: block; width: 100%; border-radius: 999px;
  background: linear-gradient(180deg, #D4949E, #A85A3A);
}
.answer-more {
  position: fixed; z-index: 65; width: 30px; height: 30px; border-radius: 50%;
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%23A85A3A' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
  border: 1px solid var(--line); box-shadow: var(--shadow-soft); pointer-events: none;
}
.answer-rail[hidden], .answer-more[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .answer-more { animation: more-below 1.6s ease-in-out infinite; }
  @keyframes more-below { 50% { transform: translateY(3px); } }
}

/* Q21 support: three cards in order of how much help, each with a small
   picture and a one-to-three bar meter. The right-hand drawing still follows
   the choice. */
.options--support { gap: .6rem; }
.options--support .opt__box { min-height: 72px; gap: .9rem; padding: .8rem 1rem; }
.options--support .opt__dot { display: none; }
.options--support .opt__icon { width: 40px; height: 48px; margin: 0; }
.options--support .opt__text { flex: 1 1 auto; font-weight: 600; }
.opt__level { display: inline-flex; align-items: flex-end; gap: 3px; flex: 0 0 auto; }
.opt__level i { width: 5px; border-radius: 2px; background: var(--line-strong); }
.opt__level i:nth-child(1) { height: 8px; }
.opt__level i:nth-child(2) { height: 13px; }
.opt__level i:nth-child(3) { height: 18px; }
.opt__level[data-level="1"] i:nth-child(-n+1),
.opt__level[data-level="2"] i:nth-child(-n+2),
.opt__level[data-level="3"] i { background: var(--rust); }
.options--support .opt input:checked + .opt__box { background: var(--rust-tint); box-shadow: 0 0 0 1px var(--rust); border-color: var(--rust); }
.options--support .opt input:checked + .opt__box .opt__icon { transform: scale(1.06); }

/* "Welcome back": a saved draft of the quiz was restored. */
.resume {
  display: flex; align-items: center; justify-content: space-between; gap: .4rem 1rem; flex-wrap: wrap;
  margin-bottom: 1.2rem; padding: .55rem .6rem .55rem 1rem;
  background: var(--rust-tint); border-radius: var(--r-md);
  font-size: var(--fs-sm); color: var(--rust-deep);
}
.resume[hidden] { display: none; }
.resume__again { min-height: 44px; padding: .3rem .8rem; font-size: var(--fs-sm); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 700px) {
  .resume { margin-bottom: .6rem; padding: .35rem .4rem .35rem .8rem; font-size: var(--fs-xs); }
  .resume__again { min-height: 44px; font-size: var(--fs-xs); }
}

/* The consistency screen: the quote is the headline. */

/* The scan screen's two steps: one tutorial photo in two halves, and each
   step's number and words directly under its half. */
.scan-guide { display: grid; gap: .6rem; }
.scan-guide__media { margin: 0; aspect-ratio: 3 / 2; border-radius: var(--r-md); border: 1px solid var(--line); }
.scan-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.scan-steps--pair { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.scan-steps li {
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: .6rem;
  padding: .6rem .75rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md);
  font-size: var(--fs-sm); line-height: 1.3;
}
.scan-steps__n {
  display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--rust); color: var(--cream); font-family: var(--serif); font-size: var(--fs-body);
}
.scan-steps strong { font-weight: 600; color: var(--rust-deep); }

/* Plans: a warm stage, an accent per plan, a button on every card. */
.plans-stage {
  margin-top: 1.5rem; padding: clamp(1rem, 3vw, 2rem); border-radius: 28px;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(212, 148, 158, .28), transparent 55%),
    radial-gradient(120% 90% at 100% 100%, rgba(168, 90, 58, .20), transparent 55%),
    var(--cream-2);
}
.plans-stage .plans--pick { margin-top: 0; }
.plans--pick .plan { overflow: hidden; }
.plan--essential { --accent: #D4949E; --accent-tint: var(--rose-tint); }
.plan--guided { --accent: #A85A3A; --accent-tint: var(--rust-tint); }
.plan--concierge { --accent: #664A3A; --accent-tint: #EDE3DC; }
.plans--pick .plan__art { background: var(--accent-tint, var(--cream-2)); }
.plan__cta {
  position: relative; z-index: 2; justify-self: stretch; margin-top: 1.1rem;
  background: var(--accent, var(--rust)); color: var(--cream); border: 0;
}
.plan__cta:hover { filter: brightness(1.06); }
.plans--pick .plan--essential .plan__cta { background: #9A5261; }   /* white on the light rose is too faint */
.plans--pick .plan.is-chosen .plan__cta { background: var(--cream); color: var(--rust-deep); }
/* Chosen, Təməl and Tam dəstək turn a deep matte near-black (warm, not
   blue-black); Birlikdə keeps its rust. */
.plans--pick .plan.plan--essential.is-chosen, .plans--pick .plan.plan--concierge.is-chosen {
  background: #241C18; border-color: #241C18; box-shadow: 0 24px 46px -26px rgba(36, 28, 24, .85);
}
.plans--pick .plan.plan--essential.is-chosen .plan__art, .plans--pick .plan.plan--concierge.is-chosen .plan__art { background: #EDE3DC; }
@media (max-width: 900px) {
  .plans-stage { margin-inline: calc(-1 * var(--gutter)); border-radius: 0; padding-inline: var(--gutter); }
}

/* --- Wider screens: the quiz fits the window ------------------------------
   Back and Continue are fixed to the bottom of the window on every quiz step
   (.is-quiz, set in app.js), the empty band above the question is trimmed and
   the answers are a little more compact, so a question fits without the page
   scrolling. fitStep() caps an answer list that still would not fit, which
   then scrolls inside its own column. The panel fades rather than slides in:
   a transformed panel would briefly hold the fixed bar inside itself. */
@media (min-width: 701px) {
  .proto-main:has(.step-panel.is-quiz.is-active) { padding-block: clamp(1rem, 3.5vh, 2.2rem) 5.4rem; }
  .step-panel.is-quiz.is-active { animation: panelFade .4s var(--ease); }
  @keyframes panelFade { from { opacity: 0; } }
  .step-panel.is-quiz .stepnav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; margin: 0;
    padding: .8rem max(var(--gutter), calc((100vw - 860px) / 2 + var(--gutter)));
    background: rgba(248, 246, 242, .96);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
  }
  .step-panel.is-fit .qgroup legend { margin-bottom: .35rem; }
  .step-panel.is-fit .qgroup__hint { margin-bottom: 1rem; }
  .step-panel.is-fit .options { gap: .55rem; }
  .step-panel.is-fit .opt__box { min-height: 54px; padding: .7rem 1.05rem; }
  .step-panel.is-fit .qsplit > :not(.qsplit__visual) {
    position: relative;   /* so a widget's hidden radio list stays inside it */
    overflow-y: auto; overscroll-behavior: contain;
    padding: 3px 10px 3px 3px; margin: -3px -10px -3px -3px;
  }
  .step-panel.is-fit .qsplit__visual.art svg { max-height: var(--fit-room, calc(100dvh - var(--header-h, 130px) - 14rem)); }
  .step-panel.is-fit .sview__media { max-height: var(--fit-room); }
  .step-panel.is-fit .qsplit__visual.facezone svg { max-height: calc(var(--fit-room, 60vh) - 2.2rem); }
  /* Long chip lists take most of the width; the drawing narrows beside them. */
  .step-panel.is-fit .qsplit:has(.options--chips) { grid-template-columns: minmax(0, 1.55fr) minmax(0, .45fr); }
  .step-panel.is-fit .options--chips { gap: .75rem; }
  .step-panel.is-fit .options--chips .opt__box { min-height: 44px; padding: .3rem .85rem; }
  .step-panel.is-fit .chipset__label { margin-bottom: .35rem; }
  .step-panel.is-fit .chipset--none { padding-top: .75rem; }

  /* The milestones step: the picture and its weeks on the left, sized from
     the window's height, and the words on the right. */
  #panel-milestones.is-active {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto auto 1fr;
    column-gap: clamp(1.5rem, 4vw, 3rem);
  }
  #panel-milestones > .progress-strip { grid-column: 1; grid-row: 1 / 4; margin: 0; padding: 0; border: 0; }
  #panel-milestones > :is(.eyebrow, h1, .step-intro) { grid-column: 2; }
  #panel-milestones > .eyebrow { margin-top: 2.5rem; }
  #panel-milestones .progress-strip__head { margin-bottom: .6rem; }
  #panel-milestones .mstone__frame { width: min(100%, max(170px, calc((100dvh - 526px) * .8))); }

  /* Q14's dial is sized from the room it has (its parts in cqw of the dial),
     so its column never needs to scroll. */
  .step-panel.is-fit .qsplit > :not(.qsplit__visual) { overflow-x: hidden; }
  .step-panel.is-fit .wheel__stage {
    container-type: inline-size;
    width: min(100%, 380px, calc(var(--fit-room, 480px) - 4.5rem));
    --wheel-r: 33.2cqw; --wheel-iw: 32cqw;
  }

  /* The globe: large and centred, its words beneath it. */
  #panel-notalone .community-globe { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; gap: 1.2rem; padding: 0; border: 0; }
  #panel-notalone .map-frame { width: min(100%, 620px, calc(100dvh - var(--header-h, 130px) - 19.5rem)); }
  #panel-notalone .community-globe__copy { max-width: 40rem; margin-inline: auto; }
  #panel-notalone .community-globe__copy > * { margin-inline: auto; }
  #panel-notalone .community-globe__copy .serif { font-size: clamp(1.5rem, 1.1rem + 1.3vw, 2.1rem); margin-top: .35rem; }
  #panel-notalone .community-globe__copy .small { margin-top: .6rem; }

  /* Plans: the cards higher up, so they are on screen at once. */
  #panel-plans h1 { font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.4rem); }
  #panel-plans .step-intro { margin-top: .5rem; font-size: var(--fs-body); }
  #panel-plans .billing { margin-top: 1rem; }
  #panel-plans .plans-stage { margin-top: 1rem; }
}

/* The step panels take focus so a screen reader starts at the new step; they
   are not controls, so they never show a focus ring (the brown frame). */
/* Nor does anything else that only takes focus from script (tabindex="-1"). */
.step-panel:focus, .step-panel:focus-visible, [tabindex="-1"]:focus:not(:focus-visible) { outline: none; box-shadow: none; }


/* The scratch card's hint: a drawn hand rubbing back and forth over the
   panel until the first touch. */
.scratch__hand {
  position: absolute; left: 50%; top: 50%; z-index: 3; width: 58px; height: 62px;
  margin: -14px 0 0 -29px; pointer-events: none;
  filter: drop-shadow(0 4px 6px rgba(102, 74, 58, .25));
}
.scratch__hand svg { width: 100%; height: 100%; }
.scratch.is-scratching .scratch__hand, .scratch.is-revealed .scratch__hand,
.scratch:has(.scratch__canvas[hidden]) .scratch__hand { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .scratch__hand { animation: scratch-hint 2.4s ease-in-out infinite; }
  @keyframes scratch-hint {
    0%, 100% { transform: translate(-70px, 6px) rotate(-10deg); }
    25% { transform: translate(-8px, -6px) rotate(0deg); }
    50% { transform: translate(64px, 6px) rotate(10deg); }
    75% { transform: translate(4px, -4px) rotate(0deg); }
  }
}

/* The scan choice cards: a small drawing on each. */
.scan-card__art {
  display: grid; place-items: center; width: 100%; height: 88px; margin-bottom: .35rem;
  border-radius: 12px; background: var(--cream-2);
  transition: background-color var(--dur) var(--ease);
}
.scan-card__art { height: 112px; }
.scan-card__art svg { width: auto; height: 104px; }
.scan-card[aria-pressed="true"] .scan-card__art { background: var(--rust-tint); }
@media (max-width: 620px) {
  /* Stacked on a phone: the picture beside the words keeps both cards short. */
  .scan-card {
    display: grid; grid-template-columns: 92px minmax(0, 1fr); column-gap: .9rem; row-gap: .25rem;
    align-items: start; min-height: 0; padding: 1rem;
  }
  .scan-card__art { grid-row: 1 / span 3; width: 92px; height: 92px; margin: 0; }
  .scan-card__art svg { height: 84px; max-width: 100%; }
  .scan-card__name { font-size: var(--fs-h4); line-height: 1.25; }
}

/* Sign in (index.html, initSignIn in app.js). */
.signin {
  width: min(420px, calc(100% - 2rem)); max-height: calc(100dvh - 2rem);
  margin: auto; padding: 1.7rem 1.6rem 1.4rem; border: 0; border-radius: 26px;
  background: var(--cream); color: var(--ink);
  box-shadow: 0 30px 70px -30px rgba(102, 74, 58, .55);
}
.signin::backdrop { background: rgba(102, 74, 58, .38); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.signin__x { position: absolute; top: .8rem; right: .8rem; width: 44px; height: 44px; border: 0; border-radius: 999px; background: var(--cream-2); color: var(--ink-soft); display: grid; place-items: center; cursor: pointer; }
.signin__title { margin-top: .2rem; font-family: var(--serif); font-weight: 400; font-size: clamp(1.6rem, 1.3rem + 1vw, 2rem); color: var(--rust-deep); line-height: 1.15; }
.signin__sub { margin-top: .35rem; color: var(--ink-soft); }
.signin__google { margin-top: 1.2rem; width: 100%; min-height: 52px; display: flex; align-items: center; justify-content: center; gap: .6rem; border: 1.5px solid var(--line-strong); border-radius: 11px; background: var(--white); font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.signin__google:hover { border-color: var(--rust); box-shadow: 0 8px 22px -14px rgba(102,74,58,.5); }
.signin__or { display: flex; align-items: center; gap: .8rem; margin: 1.1rem 0 .9rem; font-size: var(--fs-xs); color: var(--ink-muted); }
.signin__or::before, .signin__or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.signin__form { display: grid; gap: .55rem; }
.signin__row { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; }
.signin__link { min-height: 44px; border: 0; padding: .2rem 0; background: none; font: inherit; font-size: var(--fs-xs); font-weight: 700; color: var(--rust-text); cursor: pointer; }
.signin__pass { position: relative; }
.field .signin__pass input { min-height: 52px; padding: .8rem 5rem .8rem 1rem; background: var(--white); border: 1.5px solid var(--line); border-radius: var(--r-sm); width: 100%; transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.signin__show { position: absolute; top: 50%; right: .4rem; transform: translateY(-50%); min-height: 44px; padding: 0 .7rem; border: 0; border-radius: 11px; background: none; font: inherit; font-size: var(--fs-xs); font-weight: 700; color: var(--rust-text); cursor: pointer; }
.signin__note { padding: .7rem .85rem; border-radius: 12px; background: var(--cream-2); font-size: var(--fs-sm); color: var(--ink-soft); }
.signin__go { width: 100%; justify-content: center; margin-top: .3rem; }
.signin__go[aria-busy="true"] { opacity: .7; pointer-events: none; }
.signin__form { margin-top: 1.1rem; }
.signin__code { display: grid; gap: .55rem; }
.signin__form .field { display: grid; gap: .35rem; font-size: var(--fs-xs); font-weight: 700; color: var(--ink); }
.signin__form .field[hidden] { display: none; }
.signin__form .field input { min-height: 52px; padding: .8rem 1rem; background: var(--white); border: 1.5px solid var(--line); border-radius: var(--r-sm); width: 100%; font: inherit; font-weight: 400; }
.signin__new { margin-top: 1rem; text-align: center; font-size: var(--fs-sm); color: var(--ink-soft); }
.signin__new a { font-weight: 700; color: var(--rust-text); }
@media (prefers-reduced-motion: no-preference) {
  .signin[open] { animation: resume-in .35s var(--ease); }
}

/* "Welcome back": opening the quiz fresh with an unfinished draft saved.
   The drawing is the quiz as a path of 21 dots, filled as far as the visitor
   got, with a pin on that dot and a flower at the end. */
.resume-dialog {
  width: min(440px, calc(100% - 2rem)); max-height: calc(100dvh - 2rem);
  margin: auto; padding: 1.6rem 1.6rem 1.3rem; border: 0; border-radius: 26px;
  background: var(--cream); color: var(--ink); text-align: center;
  box-shadow: 0 30px 70px -30px rgba(102, 74, 58, .55);
}
.resume-dialog::backdrop { background: rgba(102, 74, 58, .38); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.resume-dialog__art { margin: 0 auto .6rem; padding: .6rem; border-radius: 18px; background: var(--cream-2); }
.resume-dialog__art svg { width: 100%; height: auto; max-height: 160px; }
.resume-dialog__title { font-family: var(--serif); font-weight: 400; font-size: clamp(1.6rem, 1.3rem + 1vw, 2rem); color: var(--rust-deep); line-height: 1.15; }
.resume-dialog__where { margin: .45rem auto 0; font-weight: 700; color: var(--rust-text); }
.resume-dialog__ask { margin: .35rem auto 0; color: var(--ink-soft); }
.resume-dialog__actions { display: grid; gap: .5rem; margin-top: 1.2rem; }
.resume-dialog__actions .btn { width: 100%; justify-content: center; }
.resume-dialog__actions .btn--quiet { border: 1.5px solid var(--line-strong); background: var(--white); }
.resume-dialog__note { margin: .8rem auto 0; font-size: var(--fs-xs); color: var(--ink-muted); }
.resume-dialog .signin__google + .field__err:empty { display: none; }
.inapp__link { width: 100%; margin-top: 1rem; padding: .7rem .8rem; border: 1.5px solid var(--line-strong); border-radius: 11px; background: var(--white); font: inherit; font-size: var(--fs-sm); color: var(--ink); }
.inapp__how { margin: .8rem 0 0; padding: 0; list-style: none; font-size: var(--fs-xs); color: var(--ink-muted); }
.inapp__how li + li { margin-top: .25rem; }
#inappChrome[hidden] { display: none; }
.signin__google + .signin__note { margin-top: .9rem; }
.co-head__signed { font-size: var(--fs-sm); color: var(--ink-soft); }
.co-head__signed[hidden] { display: none; }
.resume__track { fill: none; stroke: var(--line-strong); stroke-width: 2; stroke-dasharray: 2 6; stroke-linecap: round; }
.resume__dot { fill: var(--white); stroke: var(--line-strong); stroke-width: 1.5; }
.resume__dot.is-done { fill: var(--rust); stroke: var(--rust); }
@media (prefers-reduced-motion: no-preference) {
  .resume-dialog[open] { animation: resume-in .35s var(--ease); }
  .resume-dialog[open] .resume__pin { animation: resume-pin .6s .2s cubic-bezier(.34, 1.4, .64, 1) both; }
  @keyframes resume-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
  @keyframes resume-pin { from { opacity: 0; translate: 0 -14px; } }
}


/* ==========================================================================
   Finish: type, surfaces, and the small moments
   ========================================================================== */

/* Headings balance their lines and paragraphs avoid a lone last word, which
   long Azerbaijani words otherwise leave behind. */
h1, h2, h3, legend, .quote-card__text, .breather__line, .resume-dialog__title { text-wrap: balance; }
p, li, .opt__text, .fcard__detail, .scan-card__desc { text-wrap: pretty; }


/* A barely-there paper grain on the cream, for warmth. */
body {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .4 0 0 0 0 .29 0 0 0 0 .23 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 240px 240px;
}

/* Rounded corners drawn as squircles where the browser can (Apple's
   continuous curve); elsewhere they stay ordinary rounded corners. */
@supports (corner-shape: squircle) {
  .opt__box, .fcard, .scan-card, .plan, .plans-stage, .resume-dialog, .notice, .mock,
  .scan-card__art, .plan__art, .resume-dialog__art, .field input, .btn:not(.btn--quiet) { corner-shape: squircle; }
}

/* Branded input details. */
input, textarea, select { caret-color: var(--rust); accent-color: var(--rust); }
.opt input:focus-visible + .opt__box { box-shadow: 0 0 0 6px rgba(168, 90, 58, .14); }

/* A soft press on everything tappable, like an iOS control. The individual
   scale property leaves each element's own transform alone. */
.opt__box, .btn, .fcard, .scan-card, .plan, .rtab, .billing__opt span, .language-switch button {
  transition-property: background-color, border-color, color, box-shadow, transform, scale, filter;
}
@media (prefers-reduced-motion: no-preference) {
  .opt:active .opt__box, .btn:active, .fcard:active, .scan-card:active, .rtab:active,
  .billing__opt:active span, .language-switch button:active { scale: .97; }
  .plan:active { scale: .99; }
  .opt__box, .btn, .fcard, .scan-card, .plan { transition-duration: .22s; transition-timing-function: var(--spring); }
}

/* Continue warms up: quiet until the question is answered, then full colour
   with a little lift. It still works when quiet — it says what is missing. */
.step-panel:has(.qgroup) .stepnav .btn--primary[data-require] { transition: background-color .35s var(--ease), box-shadow .35s var(--ease), opacity .35s var(--ease), transform .35s var(--spring); }
.step-panel:has(.qgroup):not(:has(.options input:checked)) .stepnav .btn--primary[data-require] {
  background: #EBDDD3; color: #6B4A3A; box-shadow: none;
}
.step-panel:has(.options input:checked) .stepnav .btn--primary[data-require] { box-shadow: var(--shadow-lift); }

/* Answers arrive one after another the first time a question is shown (not
   on Back): app.js numbers them (--i) and marks a step .is-seen once left. */
@media (prefers-reduced-motion: no-preference) {
  .step-panel.is-active:not(.is-seen) .options .opt {
    animation: opt-in .42s var(--ease) both; animation-delay: calc(var(--i, 0) * 30ms + 60ms);
  }
  @keyframes opt-in { from { opacity: 0; translate: 0 8px; } }
  /* A revealed field eases open instead of popping in. */
  .opt-reveal:not([hidden]) { animation: reveal-in .32s var(--ease) both; }
  @keyframes reveal-in { from { opacity: 0; translate: 0 -6px; } }
}

/* Progress: the bars fill with a spring, and a stage that completes gets a
   passing glint. */
.progress__fill { transition: width .7s var(--spring); }
.progress__seg { position: relative; }
@media (prefers-reduced-motion: no-preference) {
  .progress__stage.is-done .progress__seg::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    background: linear-gradient(90deg, transparent 0, rgba(255, 255, 255, .85) 50%, transparent 100%) no-repeat;
    background-size: 40% 100%; background-position: -60% 0;
    animation: stage-glint 1.1s .15s var(--ease) 1 both;
  }
  @keyframes stage-glint { to { background-position: 160% 0; } }
}

/* A soft light that follows the pointer across answer cards (desktop). */
@media (hover: hover) and (pointer: fine) {
  .opt__box, .fcard, .scan-card {
    background-image: radial-gradient(180px circle at var(--mx, -200px) var(--my, -200px), rgba(212, 148, 158, .16), transparent 70%);
  }
}

/* The language control: the dark pill slides to the chosen language. */
.language-switch { position: relative; isolation: isolate; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
.language-switch::before {
  content: ""; position: absolute; z-index: -1; top: 3px; bottom: 3px; left: 3px;
  width: calc((100% - 6px - 4px) / 3); border-radius: 999px; background: #664a3a;
  translate: calc(var(--lang-at, 0) * (100% + 2px)) 0; transition: translate .4s var(--spring);
}
.language-switch:has([data-language="en"][aria-pressed="true"]) { --lang-at: 1; }
.language-switch:has([data-language="ru"][aria-pressed="true"]) { --lang-at: 2; }
.language-switch button[aria-pressed="true"] { background: transparent; transition: color .3s var(--ease); }

/* Moving between pages (landing, Learn, quiz) cross-fades, with the logo
   holding still. */
@view-transition { navigation: auto; }
.header__inner > .brand, .proto-header__inner > .brand { view-transition-name: sakra-brand; }   /* the header's logo only: a name must be unique */

/* The loader's marks: each tick draws itself; the ring glows as it closes. */
@media (prefers-reduced-motion: no-preference) {
  .loader__stage.is-done .loader__mark::after { animation: tick-draw .35s var(--ease) both; }
  @keyframes tick-draw { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
  .loader__ring.is-complete { filter: drop-shadow(0 0 18px rgba(212, 148, 158, .55)); transition: filter .6s var(--ease); }
}

/* Results unfold as you scroll: sections ease in as they arrive (app.js). */
.unfold { opacity: 0; translate: 0 18px; transition: opacity .7s var(--ease), translate .7s var(--ease); }
.unfold.is-in { opacity: 1; translate: 0 0; }
@media (prefers-reduced-motion: reduce) { .unfold { opacity: 1; translate: none; transition: none; } }

/* Yearly savings on each plan, worked out from its own prices. */
.plan__save { margin: .1rem 0 0; font-size: var(--fs-xs); font-weight: 700; color: var(--rust-text); }
.plans--pick .plan.is-chosen .plan__save { color: #FFE9DC; }
.plan__save[hidden] { display: none; }

/* Report: tabs cross-fade, and it prints (or saves as PDF) as one document. */
@media (prefers-reduced-motion: no-preference) {
  .rpanel:not([hidden]) { animation: rpanel-in .35s var(--ease) both; }
  @keyframes rpanel-in { from { opacity: 0; translate: 0 6px; } }
}
.report__print { margin-top: 1rem; }
@media print {
  @page { margin: 16mm 14mm; }
  body { background: #fff; }
  .proto-header, .proto-foot, .stepnav, .rtabs, .report__print, .resume, .breather, .answer-rail, .answer-more, #reportDataNotice + .rtabs { display: none !important; }
  .step-panel:not(.is-active) { display: none !important; }
  #panel-report .rpanel[hidden] { display: block !important; }
  #panel-report .rpanel { animation: none; margin-top: 1.2rem; }
  .rsec, .mock, .notice { break-inside: avoid; }
  .proto-main { padding: 0; }
}

/* View transitions between quiz steps (app.js): the drawing and the Back /
   Continue bar keep their places while the rest cross-fades. */
::view-transition-group(quiz-art), ::view-transition-group(quiz-nav) { animation-duration: .45s; animation-timing-function: var(--ease); }
/* The two drawings keep their own size, centred, and cross-fade while their
   frame moves: never stretched. A chip question's narrower drawing column
   would otherwise scale the next drawing up as it arrived (Q1 to Q2). */
::view-transition-old(quiz-art), ::view-transition-new(quiz-art) {
  width: auto; height: auto; inset: 0; margin: auto; object-fit: none;
}
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; }
.vt-quiz .step-panel.is-active .qsplit__visual { view-transition-name: quiz-art; }
.vt-quiz .step-panel.is-quiz.is-active .stepnav { view-transition-name: quiz-nav; }

/* "Aysel," above a few questions once we know a first name (app.js). Wider
   screens only: on a phone the question keeps its fixed place. */
.legend__name { display: block; margin-bottom: .1rem; font-family: var(--serif); font-style: italic; font-size: .6em; color: var(--rust-text); }
.legend__name[hidden] { display: none; }
@media (max-width: 700px) { .legend__name { display: none; } }
@media print { .unfold { opacity: 1 !important; translate: none !important; } }

/* Milestones while playing (milestones.tsx): the full frame, one week fading
   over the last, no wipe handle or Week 0 label until it is touched. */
.mstone__compare.is-playing .compare__handle { opacity: 0; }
.mstone__compare .compare__handle { transition: opacity .3s var(--ease); }
@media (prefers-reduced-motion: no-preference) {
  .mstone__compare .compare__pane--b.is-fading { animation: week-in .42s var(--ease) both; }
  @keyframes week-in { from { opacity: 0; } }
}

/* The scan steps and the details form on wider screens: fitted to the window
   like the questions, above the fixed Back / Continue bar. */
@media (min-width: 701px) {
  :is(#panel-scan, #panel-capture, #panel-details, #panel-closing) h1 { font-size: clamp(1.7rem, 1.25rem + 1.5vw, 2.5rem); }
  :is(#panel-scan, #panel-capture, #panel-details) .step-intro { margin-top: .5rem; }
  #panel-scan .scan-intro { margin-top: 1.1rem; }
  /* The two pictures line up: the photo takes the full height of the
     tutorial and its steps beside it, top edge to bottom edge. */
  #panel-scan .scan-intro { align-items: stretch; }
  #panel-scan .scan-intro__media { aspect-ratio: auto; height: 100%; min-height: 0; }
  #panel-scan .scan-intro__media img { height: 100%; object-fit: cover; object-position: 40% 50%; }
  #panel-scan .scan-guide { align-content: start; }
  #panel-scan .scan-guide__media { max-height: calc(100dvh - var(--header-h, 130px) - 23.5rem); width: 100%; }
  #panel-scan .scan-guide__media img { height: 100%; object-fit: cover; }
  #panel-capture .scan-choice { margin-top: 1.1rem; }
  #panel-capture .scan-card__art { height: clamp(64px, 12dvh, 112px); }
  #panel-capture .scan-card__art svg { height: clamp(56px, calc(12dvh - 8px), 104px); }   /* a length, not %: a % here does not resolve */
}
@media (min-width: 701px) and (max-height: 800px) {
  :is(#panel-scan, #panel-capture, #panel-details) .notice { margin-top: .8rem !important; padding-block: .6rem; }
  #panel-capture .scan-card { min-height: 0; padding: 1rem 1.1rem; gap: .3rem; }
  #panel-details .form { margin-top: .8rem; gap: .5rem; }
  #panel-details .field { gap: .25rem; }
  #panel-details .details-split__art { margin-top: 1rem; }
  #panel-details .details-split__art svg { max-height: 30dvh; }
  #panel-details .step-intro { font-size: var(--fs-body); line-height: 1.5; }
  #panel-details .field input { min-height: 44px; padding-block: .45rem; }
  #panel-details .field__err:empty { min-height: 0; }
  #panel-details .check { font-size: var(--fs-xs); line-height: 1.45; }
  #panel-capture .scan-card__desc { font-size: var(--fs-xs); }
  #panel-capture .scan-card__name { font-size: var(--fs-h4); }
}

/* Plan cards on wider screens: the same parts on the same lines in all three
   (the one-line "for" keeps room for two), and the button on the bottom edge. */
@media (min-width: 701px) {
  .plans--pick .plan { display: flex; flex-direction: column; gap: .45rem; }
  .plans--pick .plan__for { min-height: calc(2 * 1.45em); }
  .plans--pick .plan__list { margin-bottom: 1.1rem; }
  .plans--pick .plan__cta { margin-top: auto; }
}
/* On a phone the scan screen shows the tutorial photo alone: it carries both
   steps, and two photos stacked would push the screen past the Continue bar. */
@media (max-width: 700px) {
  #panel-scan .scan-intro__media { display: none; }
  #panel-scan .scan-intro { margin-top: 1rem; }
  #panel-scan .step-intro { margin-top: .4rem; font-size: var(--fs-body); }
  #panel-scan .notice { margin-top: .8rem !important; padding-block: .55rem; font-size: var(--fs-xs); }
}
/* On tiles and two-by-two answers the tick sits inside the corner, clear of
   the border, rather than half over it. (Chips keep it on the edge, where it
   does not cover their words.) */
.options--tiles .opt input:checked + .opt__box .opt__text::before,
.step-panel.is-fit .options--pair .opt input:checked + .opt__box .opt__text::before {
  top: 7px; right: 7px; box-shadow: none;
}
.options--tiles .opt__box { padding-inline: 1.6rem; }

/* Flakes of the scratch coating falling away (app.js, flake()). */
.scratch-wrap { position: relative; }
.scratch__flake {
  position: absolute; z-index: 5; pointer-events: none; border-radius: 1px;
  animation: flake-fall .9s cubic-bezier(.45, 0, .85, .55) forwards;
}
@keyframes flake-fall {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  70% { opacity: .9; }
  100% { transform: translate(var(--dx, 0), var(--dy, 60px)) rotate(var(--turn, 180deg)); opacity: 0; }
}

/* ==========================================================================
   "They thought of this": the small-details batch (Sept 2026)
   ========================================================================== */

/* Landing and Learn: a saved quiz turns "Start" into "Continue". */
.btn--continue { flex-direction: column; gap: .05rem; line-height: 1.2; }
.btn__sub { display: block; font-size: var(--fs-2xs); font-weight: 600; opacity: .8; letter-spacing: .01em; }

/* Learn: the cards that suit your answers. */
.lcard__for {
  align-self: start; justify-self: start; margin-bottom: .35rem; padding: .18rem .6rem; border-radius: 999px;
  background: var(--rust-tint); color: var(--rust-text); font-size: var(--fs-2xs); font-weight: 700; letter-spacing: .01em;
}
.lcard.is-suited { box-shadow: 0 0 0 1.5px var(--rust); }

/* An article: reading time, a thin bar under the header, and a way back. */
.article__time { margin-top: .8rem; font-size: var(--fs-xs); font-weight: 600; color: var(--ink-muted); letter-spacing: .02em; }
.read-bar { position: fixed; left: 0; right: 0; top: var(--header-h, 72px); z-index: 55; height: 2px; pointer-events: none; }
.read-bar span { display: block; height: 100%; background: linear-gradient(90deg, #D4949E, #A85A3A); transform: scaleX(0); transform-origin: left; transition: transform .15s linear; }
.article__resume {
  margin-top: .8rem; min-height: 44px; padding: .45rem .9rem; border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--white); color: var(--rust-text); font: inherit; font-size: var(--fs-sm); font-weight: 600; cursor: pointer;
}
.article__resume::after { content: " ↓"; }

/* "Why we ask" on the safety questions. */
/* The popover hangs from its own hint line. (Not from the fieldset: a
   positioned fieldset would capture the phone layout's drawing band.) */
.qgroup__hint:has(.why) { position: relative; }
.why {
  display: inline-flex; align-items: center; gap: .3rem; margin-left: .35rem; padding: .05rem .5rem .05rem .15rem;
  border: 1px solid var(--line-strong); border-radius: 999px; background: var(--white);
  font: inherit; font-size: var(--fs-2xs); font-weight: 600; color: var(--rust-text); cursor: pointer; vertical-align: .05em;
}
/* A 44px tap area around the small pill, without changing how it looks (design system). */
.why { position: relative; }
.why::after { content: ""; position: absolute; left: 50%; top: 50%; width: max(100%, 44px); height: 44px; transform: translate(-50%, -50%); }
.why__i { display: inline-grid; place-items: center; width: 1.05rem; height: 1.05rem; border-radius: 50%; background: var(--rust); color: var(--cream); font-family: var(--serif); font-style: italic; font-size: var(--fs-2xs); }
.why[aria-expanded="true"] { background: var(--rust-tint); border-color: var(--rust); }
.why__pop {
  display: block; position: absolute; z-index: 20; left: 0; right: 0; top: 100%; max-width: 34rem; margin-top: .4rem; padding: .75rem .95rem;
  border-radius: var(--r-md); background: var(--rust-deep); color: var(--cream); font-size: var(--fs-sm); line-height: 1.5;
  box-shadow: var(--shadow-lift);
}
.why__pop[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) { .why__pop:not([hidden]) { animation: reveal-in .25s var(--ease) both; } }

/* Q1 at its limit: the unchosen answers step back. */
.options.is-full .opt:not(:has(input:checked)) .opt__box { opacity: .45; }
.options.is-full + * .chips__count, .qgroup:has(.options.is-full) .chips__count { background: var(--rust); color: var(--cream); }

/* Progress: an honest time left beside the count. */

/* The camera: Sakra's guides over the kit's picture. */
.cam-stage { position: relative; width: 100%; margin-inline: auto; }
.cam-guide { position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: var(--r-md); transition: box-shadow .35s var(--ease); }
.cam-guide__cue {
  position: absolute; left: 50%; bottom: 3%; translate: -50% 0; width: max-content; max-width: 90%; padding: .5rem 1rem;
  border-radius: 16px; background: rgba(36, 28, 24, .62); color: #FFF9F4;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  font-size: var(--fs-sm); font-weight: 700; line-height: 1.3; text-align: center; white-space: normal; text-wrap: balance;
  transition: background-color .35s var(--ease);
}
/* Everything right: a green tint all round, and the guides turn green. */
.cam-stage.is-ready .cam-guide { box-shadow: inset 0 0 0 4px #7FA37A, inset 0 0 70px rgba(127, 163, 122, .35); }
.cam-stage.is-ready .cam-guide__cue { background: rgba(77, 107, 73, .82); }
.cam-guide__count {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%; display: grid; place-items: center;
  width: 96px; height: 96px; border-radius: 50%; background: rgba(77, 107, 73, .72); color: #FFFFFF;
  font-family: var(--serif); font-size: 3.2rem; line-height: 1;
}
.cam-guide__count[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .cam-guide__count.is-tick { animation: count-tick .9s var(--ease) both; }
  @keyframes count-tick { from { scale: 1.35; opacity: 0; } 25% { opacity: 1; } to { scale: 1; } }
}
.cam-guide__ok, .preview-frame__ok {
  display: inline-flex; align-items: center; gap: .5rem; padding: .55rem 1.1rem; border-radius: 999px;
  background: #4D6B49; color: #FFFFFF; font-weight: 700; font-size: var(--fs-body); box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .5);
}
.cam-guide__ok { position: absolute; left: 50%; top: 50%; translate: -50% -50%; }
.cam-guide__ok[hidden] { display: none; }
.cam-guide__tick { width: 1.2rem; height: 1.2rem; border-radius: 50%; background: #FFFFFF url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.6 6.3l2.3 2.3 4.5-4.9' fill='none' stroke='%233F7A4A' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 11px no-repeat; }
.cam-stage.is-accepted .cam-guide { box-shadow: inset 0 0 0 4px #7FA37A, inset 0 0 0 999px rgba(77, 107, 73, .28); }
@media (prefers-reduced-motion: no-preference) {
  .cam-guide__ok:not([hidden]) { animation: ok-in .5s var(--spring) both; }
  @keyframes ok-in { from { scale: .6; opacity: 0; } }
}
/* An uploaded photo: "Accepted" for a moment, then the photo alone. */
.preview-frame { position: relative; }
.preview-frame__ok { position: absolute; left: 50%; top: 50%; translate: -50% -50%; opacity: 0; font-size: var(--fs-sm); }
.preview-frame.is-accepted .preview-frame__ok { animation: ok-flash 1.6s var(--ease) both; }
@keyframes ok-flash { 0% { opacity: 0; scale: .7; } 15%, 70% { opacity: 1; scale: 1; } 100% { opacity: 0; scale: 1; } }

/* Details form: the email suggestion. */
.field__suggest { font-size: var(--fs-sm); color: var(--ink-soft); }
.field__suggest[hidden] { display: none; }
.field__suggest .linkish { font-weight: 700; color: var(--rust-text); }

/* "Because you said…" under a result line. */
.said { display: block; margin-top: .3rem; font-size: var(--fs-xs); color: var(--ink-muted); }
.said q { font-weight: 700; color: var(--rust-text); }
.said q::before { content: "“"; } .said q::after { content: "”"; }
html[lang="ru"] .said q::before { content: "«"; } html[lang="ru"] .said q::after { content: "»"; }

/* Plans: billing and the differences switch side by side; per-day price. */
.plans-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.4rem; margin-top: 1rem; }
.plans-controls .billing { margin-top: 0; }
.diff-toggle { position: relative; display: inline-flex; align-items: center; gap: .55rem; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-soft); cursor: pointer; }
.diff-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.diff-toggle__track { position: relative; width: 38px; height: 22px; border-radius: 999px; background: var(--line-strong); transition: background-color .3s var(--ease); }
.diff-toggle__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: translate .3s var(--spring); }
.diff-toggle input:checked + .diff-toggle__track { background: var(--rust); }
.diff-toggle input:checked + .diff-toggle__track::after { translate: 16px 0; }
.diff-toggle input:focus-visible + .diff-toggle__track { outline: 2px solid var(--rust); outline-offset: 3px; }
.plan__day { margin: 0; font-size: var(--fs-xs); color: var(--ink-muted); }
.plans--pick .plan.is-chosen .plan__day { color: rgba(248, 246, 242, .75); }
.plans-diff .plan__inherit { display: none; }
main:not(.plans-diff) .plan__all { display: none; }
.plans--pick .plan__list li.plan__inherit { opacity: .62; }

/* Report: the date, and a cover that only prints. */
.report__date { margin-top: .5rem; font-size: var(--fs-sm); color: var(--ink-muted); }
.print-cover { display: none; }
.rsec__head .btn--sm { min-height: 36px; padding: .35rem .9rem; font-size: var(--fs-sm); }

/* The shopping list: one screen, to screenshot or copy. */
.shop-dialog {
  width: min(460px, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); margin: auto; padding: 1.6rem;
  border: 0; border-radius: 26px; background: var(--cream); color: var(--ink); box-shadow: 0 30px 70px -30px rgba(102, 74, 58, .55);
}
.shop-dialog::backdrop { background: rgba(102, 74, 58, .38); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.shop-dialog__title { font-family: var(--serif); font-weight: 400; font-size: clamp(1.6rem, 1.3rem + 1vw, 2rem); color: var(--rust-deep); }
.shop-dialog__lede { margin-top: .3rem; font-size: var(--fs-sm); color: var(--ink-soft); }
.shop-dialog__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin-top: 1rem; }
.shop-dialog__cols > div { padding: .9rem 1rem; border-radius: var(--r-md); background: var(--white); border: 1px solid var(--line); }
.shop-dialog__cols h3 { font-family: var(--serif); font-weight: 400; font-size: var(--fs-h4); color: var(--rust-deep); }
.shop-dialog__cols ul { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; gap: .45rem; }
.shop-dialog__cols li { position: relative; padding-left: 1.1rem; font-size: var(--fs-sm); line-height: 1.35; }
.shop-dialog__cols li::before { content: ""; position: absolute; left: 0; top: .45em; width: .45rem; height: .45rem; border-radius: 50%; background: var(--rose); }
.shop-dialog__tip { margin-top: .9rem; font-size: var(--fs-xs); color: var(--ink-muted); text-align: center; }
.shop-dialog__actions { display: grid; gap: .5rem; margin-top: .8rem; }
.shop-dialog__actions .btn { width: 100%; justify-content: center; }
@media (max-width: 420px) { .shop-dialog__cols { grid-template-columns: 1fr; } }

/* Offline: a calm note at the bottom. */
.offline-note {
  position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 92px); z-index: 90; translate: -50% 0;
  margin: 0; padding: .55rem 1rem; border-radius: 999px; background: var(--rust-deep); color: var(--cream);
  font-size: var(--fs-sm); font-weight: 600; box-shadow: var(--shadow-lift); white-space: nowrap;
}
.offline-note[hidden] { display: none; }

/* The finish: one clear next step. */
.next-step {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem 1.4rem; align-items: center; text-align: left;
  max-width: 560px; margin: 1.8rem auto 0; padding: 1.2rem 1.4rem; border-radius: var(--r-lg);
  background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow-soft);
}
.next-step__art { width: 110px; }
.next-step__art svg { width: 100%; height: auto; }
.next-step__kicker { font-size: var(--fs-xs); font-weight: 700; color: var(--rust-text); letter-spacing: .02em; }
.next-step__title { margin-top: .2rem; font-family: var(--serif); font-size: var(--fs-h4); line-height: 1.3; color: var(--rust-deep); }
.next-step__text { margin-top: .35rem; font-size: var(--fs-sm); color: var(--ink-soft); }
.next-step .btn { margin-top: .8rem; }
@media (max-width: 520px) { .next-step { grid-template-columns: 1fr; justify-items: center; text-align: center; } }

/* The 404 page. */
.lost { min-height: calc(100dvh - var(--header-h, 72px)); display: grid; align-items: center; padding-block: 2rem 3rem; }
.lost__inner { display: grid; justify-items: center; text-align: center; max-width: 620px; }
.lost__art { width: min(100%, 360px); margin: 0 0 1rem; }
.lost__art svg { width: 100%; height: auto; }
.lost h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); margin-top: .3rem; }
.lost__text { margin: .8rem auto 0; color: var(--ink-soft); font-size: var(--fs-lead); }
.lost__actions { justify-content: center; margin-top: 1.6rem; }

/* The report as a PDF: a cover line, the date, every section one after
   another with room to breathe, nothing interactive. */
@media print {
  .print-cover { display: flex; align-items: center; gap: .6rem; margin-bottom: 1.2rem; padding-bottom: .8rem; border-bottom: 1.5px solid #664A3A; }
  .print-cover img { width: 28px; height: 28px; }
  .print-cover__word { font-family: var(--serif); letter-spacing: .28em; font-size: 1rem; color: #664A3A; }
  #panel-report .eyebrow, #shopOpen, .report__print, .next-step .btn { display: none !important; }
  #panel-report h1 { font-size: 26pt; margin-top: 0; }
  .report__date { font-size: 10pt; }
  #panel-report .rpanel { break-before: page; }
  #rpanel-summary { break-before: auto !important; }
  #panel-report .rsec__head { border-bottom-width: 1px; }
  body { font-size: 10.5pt; }
  * { box-shadow: none !important; }
}

/* The quiz's way out: quiet on purpose, so it never competes with the
   question. It asks first, if there are answers to keep (app.js). */
.proto-exit { color: var(--ink-muted); font-weight: 500; opacity: .8; padding-inline: .5rem; }
.proto-exit:hover { opacity: 1; color: var(--ink-soft); background: transparent; }

/* Plans on a phone: every card has its own button, so there is no fixed
   bar over the cards. Back sits as a plain link at the end of the page. */
@media (max-width: 700px) {
  #panel-plans .stepnav {
    position: static; margin: 1.6rem 0 0; padding: 0; justify-content: center;
    background: none; border: 0; -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  #panel-plans #planContinue { display: none; }
  #panel-plans .stepnav .btn--quiet { border: 0; background: none; min-width: 0; text-decoration: underline; text-underline-offset: 3px; color: var(--ink-muted); }
  .proto-main:has(#panel-plans.is-active) { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
}

/* Switching language (i18n.js): the pill slides, the content fades out, the
   other language's page fades in. The switch itself holds still through a
   page-to-page cross-fade. In the quiz the words fade in where they are. */
.header .language-switch, .proto-header .language-switch { view-transition-name: sakra-lang; }
/* A language switch between pages: the old page stays in place underneath
   and the new one fades in over it (the pagereveal script sets .lang-vt). */
html.lang-vt::view-transition-old(root) { animation: none; }
html.lang-vt::view-transition-new(root) { animation: lang-in .45s var(--ease) both; }
@keyframes lang-in { from { opacity: 0; } }
@media (prefers-reduced-motion: no-preference) {
  .lang-arrive body { animation: lang-arrive .4s var(--ease) both; }
  @keyframes lang-arrive { from { opacity: 0; } }
  .lang-swap main, .lang-swap .progress__meta, .lang-swap .progress__name { animation: lang-swap .38s var(--ease); }
  @keyframes lang-swap { from { opacity: .15; } }
}
.lang-instant .language-switch::before, .lang-instant .language-switch button { transition: none !important; }

/* --- Camera, round two ----------------------------------------------------- */
/* Scan intro: three reminders, each with a small drawing. */
.scan-checks { margin-top: 1.4rem; }
.scan-checks__head { margin: 0 0 .55rem; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .02em; color: var(--ink-soft); }
.scan-checks__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.scan-checks__list li {
  display: grid; justify-items: center; gap: .35rem; padding: .7rem .5rem .75rem; text-align: center;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md);
  font-size: var(--fs-xs); line-height: 1.3; font-weight: 600; color: var(--rust-deep);
}
.scan-checks__art { width: 58px; height: 44px; }
.scan-checks__art svg { width: 100%; height: 100%; }

/* The screen light: a switch and three warmths. */
.camlight { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem .8rem; }
.camlight__toggle {
  display: inline-flex; align-items: center; gap: .55rem; min-height: 44px; padding: 0 .2rem;
  background: none; font-size: var(--fs-sm); font-weight: 600; color: var(--rust-deep);
}
.camlight__switch {
  position: relative; width: 38px; height: 22px; border-radius: 999px; background: var(--line-strong);
  transition: background-color var(--dur) var(--ease);
}
.camlight__switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--white); box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform var(--dur) var(--spring);
}
.camlight__toggle[aria-pressed="true"] .camlight__switch { background: var(--rust); }
.camlight__toggle[aria-pressed="true"] .camlight__switch::after { transform: translateX(16px); }
.camlight__tones { display: inline-flex; gap: .35rem; }
.camlight__tone {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: 0 .7rem;
  border: 1px solid var(--line); border-radius: 999px; background: var(--white);
  font-size: var(--fs-xs); font-weight: 600; color: var(--ink-soft);
}
.camlight__tone[aria-pressed="true"] { border-color: var(--rust); box-shadow: 0 0 0 1px var(--rust); color: var(--rust-deep); }
.camlight__swatch { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(102, 74, 58, .25); }
.camlight__tone[data-tone="warm"] .camlight__swatch { background: #FFE2C4; }
.camlight__tone[data-tone="neutral"] .camlight__swatch { background: #FFFFFF; }
.camlight__tone[data-tone="cool"] .camlight__swatch { background: #DDE9FF; }
.camlight__toggle:focus-visible, .camlight__tone:focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; border-radius: 999px; }

/* A light line down the middle of the face, against head tilt. */
.cam-guide__face { position: absolute; inset: 0; width: 100%; height: 100%; }
.cam-guide__shade { fill: rgba(20, 14, 11, .38); }
.cam-guide__outline { fill: none; stroke: rgba(255, 250, 245, .95); stroke-width: 3; transition: stroke .35s var(--ease); }
.cam-guide__axis { fill: none; stroke: rgba(255, 250, 245, .5); stroke-width: 1.5; stroke-dasharray: 4 5; transition: stroke .35s var(--ease); }
.cam-stage.is-ready .cam-guide__outline { stroke: #7FA37A; stroke-width: 4; }
.cam-stage.is-ready .cam-guide__axis { stroke: rgba(127, 163, 122, .75); }
.camera-kit__note { margin: 0; font-size: var(--fs-xs); line-height: 1.45; color: var(--ink-muted); text-align: center; }

/* The photo: shown whole, as it will be sent, and what was measured on it. */
.preview-frame img { aspect-ratio: auto; height: auto; max-height: 340px; object-fit: contain; }
.photo-checks { margin-top: .8rem; max-width: 30rem; display: grid; gap: .45rem; justify-items: start; }
.photo-checks[hidden] { display: none; }
.photo-checks__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.photo-checks__list li {
  display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .7rem .3rem .35rem;
  border-radius: 999px; background: var(--white); border: 1px solid var(--line);
  font-size: var(--fs-xs); font-weight: 600; color: var(--ink-soft);
}
.photo-checks__list li[hidden] { display: none; }
.photo-checks__mark { width: 18px; height: 18px; border-radius: 50%; background: var(--line-strong) center / 11px no-repeat; }
.photo-checks__list li.is-ok { color: #35532F; border-color: rgba(77, 107, 73, .35); }
.photo-checks__list li.is-ok .photo-checks__mark { background-color: #4D6B49; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.6 6.3l2.3 2.3 4.5-4.9' fill='none' stroke='%23fff' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.photo-checks__list li.is-warn { color: var(--rust-deep); border-color: var(--rust); }
.photo-checks__list li.is-warn .photo-checks__mark { background-color: var(--rust); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M6 2.6v4.2' stroke='%23fff' stroke-width='1.9' stroke-linecap='round'/%3E%3Ccircle cx='6' cy='9.2' r='1.05' fill='%23fff'/%3E%3C/svg%3E"); }
.photo-checks__advice { margin: 0; font-size: var(--fs-sm); color: var(--rust-deep); }
.photo-checks__advice[hidden] { display: none; }
.photo-checks__scope { margin: 0; font-size: var(--fs-xs); color: var(--ink-muted); }
.photo-checks .linkish { font-size: var(--fs-sm); font-weight: 700; }
@media (max-width: 700px) {
  /* Phones: the scan intro must still fit above Continue. */
  .scan-checks { margin-top: .8rem; }
  .scan-checks__head { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .scan-checks__list { gap: .4rem; }
  .scan-checks__list li { gap: .2rem; padding: .45rem .3rem .5rem; font-size: var(--fs-2xs); }
  .scan-checks__art { width: 44px; height: 32px; }
}
@media (max-width: 520px) {
  .camlight__tone { padding: 0 .55rem; }
}

/* Q1's count: the number rolls (rollCount() in app.js). */
.chips__count { font-variant-numeric: tabular-nums; }
.odo { position: relative; display: inline-block; overflow: hidden; vertical-align: bottom; height: 1.25em; line-height: 1.25em; }
.odo__new { display: inline-block; }
.odo::before { content: attr(data-was); position: absolute; left: 0; top: 0; visibility: hidden; }
@media (prefers-reduced-motion: no-preference) {
  .odo::before { visibility: visible; }
  .odo--up::before { animation: odo-out-up .34s var(--ease) both; }
  .odo--up .odo__new { animation: odo-in-up .34s var(--ease) both; }
  .odo--down::before { animation: odo-out-down .34s var(--ease) both; }
  .odo--down .odo__new { animation: odo-in-down .34s var(--ease) both; }
  @keyframes odo-out-up { to { transform: translateY(-100%); opacity: 0; } }
  @keyframes odo-in-up { from { transform: translateY(100%); opacity: 0; } }
  @keyframes odo-out-down { to { transform: translateY(100%); opacity: 0; } }
  @keyframes odo-in-down { from { transform: translateY(-100%); opacity: 0; } }
}

/* The finish screen's leaves: four, once (app.js). */
.leaffall { position: fixed; inset: 0; z-index: 57; pointer-events: none; overflow: hidden; }
.leaffall__leaf {
  position: absolute; top: -40px; width: calc(22px * var(--s, 1)); height: calc(30px * var(--s, 1));
  background: center / contain no-repeat;
  animation: leaf-fall 5.6s cubic-bezier(.45, .05, .55, .95) both;
}
.leaffall__leaf--rust { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 30'%3E%3Cpath d='M11 1C19 8 20 19 11 29C2 19 3 8 11 1Z' fill='%23E9B79A' stroke='%23A85A3A' stroke-width='1.2'/%3E%3Cpath d='M11 5V27M11 12l-4-3M11 17l4-3M11 22l-4-3' fill='none' stroke='%23A85A3A' stroke-width='1' stroke-linecap='round'/%3E%3C/svg%3E"); }
.leaffall__leaf--rose { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 30'%3E%3Cpath d='M11 1C19 8 20 19 11 29C2 19 3 8 11 1Z' fill='%23F3DCDF' stroke='%23D4949E' stroke-width='1.2'/%3E%3Cpath d='M11 5V27M11 12l-4-3M11 17l4-3M11 22l-4-3' fill='none' stroke='%23D4949E' stroke-width='1' stroke-linecap='round'/%3E%3C/svg%3E"); }
@keyframes leaf-fall {
  0% { transform: translate(0, 0) rotate(-20deg); opacity: 0; }
  8% { opacity: 1; }
  30% { transform: translate(28px, 30vh) rotate(25deg); }
  55% { transform: translate(-22px, 58vh) rotate(-15deg); }
  80% { transform: translate(18px, 84vh) rotate(30deg); opacity: 1; }
  100% { transform: translate(0, 108vh) rotate(-10deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .leaffall { display: none; } }

/* Q5 and Q12 tiles carry a small picture: above the words on a short tile,
   beside them on a long one. */
.options--tiles .opt__box:has(.opt__icon) { flex-direction: column; gap: .3rem; }
.options--tiles .opt__icon { margin: 0; width: 34px; height: 40px; }
.options--tiles .opt input:checked + .opt__box .opt__icon { transform: scale(1.06); }
.qsplit .options--tiles-wide .opt__box:has(.opt__icon) { flex-direction: row; gap: .7rem; }
.step-panel.is-fit .options--tiles .opt__icon { width: 28px; height: 32px; }

/* "Not sure which plan?": three yes-or-no questions under the cards. */
.planfit { margin: 1rem auto 0; max-width: 40rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--white); }
.planfit__summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 48px; padding: .6rem 1rem;
  cursor: pointer; list-style: none; font-weight: 700; color: var(--rust-deep); font-size: var(--fs-sm);
}
.planfit__summary::-webkit-details-marker { display: none; }
.planfit__summary::after {
  content: ""; width: 10px; height: 10px; flex: 0 0 auto; margin-top: -4px;
  border-right: 2px solid var(--rust); border-bottom: 2px solid var(--rust); transform: rotate(45deg);
  transition: transform var(--dur) var(--ease);
}
.planfit[open] .planfit__summary::after { transform: rotate(-135deg); margin-top: 4px; }
.planfit__summary:focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; border-radius: var(--r-md); }
.planfit__body { display: grid; gap: .8rem; padding: 0 1rem 1rem; }
.planfit__q { margin: 0; padding: 0; border: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .5rem; }
.planfit__q legend { float: left; width: 100%; margin-bottom: .35rem; font-size: var(--fs-sm); color: var(--ink); }
.planfit__opt { position: relative; }
.planfit__opt input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.planfit__opt span {
  display: inline-grid; place-items: center; min-width: 4.5rem; min-height: 44px; padding: 0 1rem;
  border: 1px solid var(--line-strong); border-radius: 999px; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-soft);
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.planfit__opt input:checked + span { background: var(--rust-tint); border-color: var(--rust); box-shadow: 0 0 0 1px var(--rust); color: var(--rust-deep); }
.planfit__opt input:focus-visible + span { outline: 2px solid var(--rust); outline-offset: 3px; }
.planfit__result { margin: 0; font-weight: 700; color: var(--rust-text); font-size: var(--fs-sm); }
.planfit__result:empty { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .plan.is-fit-pick { animation: fit-pick .9s var(--ease); }
  @keyframes fit-pick { 30% { box-shadow: 0 0 0 6px rgba(168, 90, 58, .25); } }
}

/* Landing hero: a soft light that follows the pointer (initHeroLight()). */
.hero__light {
  position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0;
  background: radial-gradient(34% 48% at var(--lx, 62%) var(--ly, 30%), rgba(255, 228, 204, .2), rgba(255, 228, 204, 0) 72%);
  mix-blend-mode: screen; transition: opacity 1s var(--ease);
}
.hero__media.has-light .hero__light { opacity: 1; }
.hero__media.has-light :is(.hero__video, .hero__fallback) {
  transform: translate(calc((62% - var(--lx, 62%)) * .025), calc((30% - var(--ly, 30%)) * .025)) scale(1.03);
}

/* "How it works", tried out (initHowDemo()). */
.demo {
  margin-top: clamp(2rem, 4vw, 3rem); padding: clamp(1rem, 3vw, 2rem);
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--white);
}
.demo[hidden] { display: none; }
.demo__tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: clamp(1rem, 2.5vw, 1.6rem); }
.demo__tab {
  display: inline-flex; align-items: center; gap: .55rem; min-height: 44px; padding: 0 1.05rem 0 .5rem;
  border: 1px solid var(--line); border-radius: 999px; background: var(--cream);
  font-weight: 600; font-size: var(--fs-sm); color: var(--ink-soft);
}
.demo__n {
  display: grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 50%;
  background: var(--cream-2); color: var(--rust-deep); font-family: var(--serif); font-size: var(--fs-sm);
}
.demo__tab[aria-selected="true"] { border-color: var(--rust); box-shadow: 0 0 0 1px var(--rust); color: var(--rust-deep); background: var(--rust-tint); }
.demo__tab[aria-selected="true"] .demo__n { background: var(--rust); color: var(--cream); }
.demo__tab:focus-visible { outline: 2px solid var(--rust); outline-offset: 2px; }
.demo__panel { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(1rem, 3vw, 2.4rem); align-items: center; }
.demo__panel[hidden] { display: none; }
.demo__copy { display: grid; gap: .8rem; justify-items: start; }
.demo__q { margin: 0; padding: 0; border: 0; }
.demo__q legend { font-family: var(--serif); font-size: var(--fs-h3); color: var(--rust-deep); line-height: 1.25; margin-bottom: .9rem; }
.demo__opts { display: grid; gap: .45rem; }
.demo__opt { position: relative; display: block; }
.demo__opt input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.demo__opt span {
  display: block; padding: .7rem 1rem; border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--cream); font-size: var(--fs-sm); color: var(--ink);
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.demo__opt input:checked + span { background: var(--rust-tint); border-color: var(--rust); box-shadow: 0 0 0 1px var(--rust); }
.demo__opt input:focus-visible + span { outline: 2px solid var(--rust); outline-offset: 2px; }
.demo__note { margin: 0; font-size: var(--fs-xs); color: var(--ink-muted); }
.demo__title { font-size: var(--fs-h3); }
.demo__art svg { width: min(100%, 240px); }
.art-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
@media (max-width: 700px) {
  .demo__tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .35rem; }
  .demo__tab { justify-content: center; gap: .35rem; padding: 0 .45rem 0 .3rem; font-size: var(--fs-xs); min-width: 0; }
  .demo__n { width: 1.45rem; height: 1.45rem; font-size: var(--fs-xs); flex: 0 0 auto; }
  .demo__panel { grid-template-columns: 1fr; }
  .demo__art { order: -1; }
  .demo__art svg { width: min(60%, 180px); }
}


/* Phones: the capture choices are two compact rows, so the step (and the
   "continue without a photo" link under them) fits above Back / Continue. */
@media (max-width: 700px) {
  #panel-capture .step-intro { font-size: var(--fs-sm); margin-top: .5rem; }
  #panel-capture .scan-choice { margin-top: .9rem; gap: .6rem; }
  #panel-capture .scan-card { grid-template-columns: 64px minmax(0, 1fr); column-gap: .8rem; padding: .75rem .9rem; }
  #panel-capture .scan-card__art { width: 64px; height: 64px; }
  #panel-capture .scan-card__art svg { height: 58px; }
  #panel-capture .scan-card__desc { line-height: 1.35; }
  #panel-capture .field__err:empty { display: none; }
  #panel-capture > p:last-of-type { margin-top: .6rem !important; }
  .scan-guide__media { aspect-ratio: 16 / 9; }
}
@media (max-width: 700px) and (max-height: 680px) {
  .scan-guide__media { aspect-ratio: 2 / 1; }
  #panel-scan .step-intro, #panel-capture .step-intro { display: none; }
  .scratch { min-height: 112px; }
  #panel-scratch .scratch-wrap { margin-top: 1.1rem; }
}

/* "Download PDF" (savePdf() in app.js): a copy of the report laid out as an
   A4 sheet, off screen, the way it prints. */
.pdf-sheet {
  position: fixed; left: -12000px; top: 0; z-index: -1;
  width: 794px; padding: 0 48px; background: #FFFFFF; color: var(--ink);
}
.pdf-sheet .step-panel { display: block !important; animation: none !important; }
.pdf-sheet .rpanel { margin-top: 1.2rem; }
.pdf-sheet .rtabs, .pdf-sheet .report__print, .pdf-sheet .eyebrow, .pdf-sheet #shopOpen,
.pdf-sheet .next-step .btn, .pdf-sheet .stepnav, .pdf-sheet .rsec .btn { display: none !important; }
.pdf-sheet .print-cover { display: flex; align-items: center; gap: .6rem; margin-bottom: 1.2rem; padding: 1.2rem 0 .8rem; border-bottom: 1.5px solid #664A3A; }
.pdf-sheet .print-cover img { width: 28px; height: 28px; }
.pdf-sheet .print-cover__word { font-family: var(--serif); letter-spacing: .28em; font-size: 1rem; color: #664A3A; }
.pdf-sheet h1 { font-size: 2.1rem; margin-top: 0; }
.pdf-sheet .unfold { opacity: 1 !important; translate: none !important; }
.pdf-sheet, .pdf-sheet * { box-shadow: none !important; animation: none !important; transition: none !important; }
.pdf-sheet .rcard__type { height: 64px; }
.pdf-sheet .rcard__types { grid-auto-rows: 64px; }

/* The consistency screen: the quote in a frame, the one who said it clearly
   underneath (text only, no logo or photo). */
.quote-card {
  position: relative; margin: 1.4rem 0 0; max-width: 44rem;
  padding: clamp(2.2rem, 5vw, 3.2rem) clamp(1.3rem, 4vw, 2.6rem) clamp(1.3rem, 3vw, 2rem);
  border-radius: 24px; border: 1px solid var(--line);
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(212, 148, 158, .18), transparent 60%),
    radial-gradient(120% 90% at 100% 100%, rgba(168, 90, 58, .12), transparent 60%),
    var(--white);
  box-shadow: var(--shadow-soft);
}
.quote-card__mark {
  position: absolute; top: -.18em; left: clamp(1rem, 3.5vw, 2.2rem);
  font-family: var(--serif); font-size: clamp(5rem, 14vw, 7rem); line-height: 1; color: var(--rust);
}
.step-panel .quote-card__text {
  margin: 0; font-family: var(--serif); font-size: clamp(1.75rem, min(1.2rem + 2.4vw, 6dvh), 2.9rem); line-height: 1.18; color: var(--rust-deep);
}
.quote-card__by {
  display: flex; align-items: center; gap: .9rem; margin-top: clamp(1.2rem, 3vw, 1.8rem);
  padding-top: clamp(1rem, 2.5vw, 1.4rem); border-top: 1px solid var(--line);
}
.quote-card__monogram {
  flex: 0 0 auto; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  background: var(--rust); color: var(--cream); font-family: var(--serif); font-size: var(--fs-h4); letter-spacing: .04em;
}
.quote-card__who { display: grid; gap: .1rem; min-width: 0; }
.quote-card__name { font-family: var(--serif); font-size: var(--fs-h4); font-weight: 400; color: var(--rust-deep); line-height: 1.2; }
.quote-card__role { font-size: var(--fs-sm); font-weight: 700; color: var(--rust-text); letter-spacing: .02em; }
.quote-card__source { font-size: var(--fs-xs); color: var(--ink-muted); }
.quote-card__source a { color: inherit; font-weight: 600; }
@media (max-width: 700px) {
  .quote-card { margin-top: 2.2rem; }
  .step-panel .quote-card__text { font-size: clamp(1.6rem, min(10vw, 4.8dvh), 2.6rem); }
}
/* The Harvard Health quote over the linen photograph (27 Sept 2026). The
   picture is a background, so the quote stays real, selectable text; a soft
   cream wash sits behind the words and fades out towards the edges, where the
   flowers and glass are. Cover keeps the quiet middle behind the text on a
   narrow phone. */
.quote-card--photo {
  isolation: isolate;
  background-color: var(--cream);
  background-image: url("assets/quiz-consistency-bg.webp");
  background-image: image-set(url("assets/quiz-consistency-bg.avif") type("image/avif"), url("assets/quiz-consistency-bg.webp") type("image/webp"));
  background-size: cover;
  background-position: 50% 50%;
}
.quote-card--photo::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: radial-gradient(ellipse 80% 75% at 50% 50%, rgba(250, 247, 242, .8) 0%, rgba(250, 247, 242, .6) 60%, rgba(250, 247, 242, .32) 100%);
}
.step-panel .quote-card--photo .quote-card__text { font-size: clamp(1.4rem, min(.95rem + 2vw, 4.2dvh), 2.35rem); line-height: 1.22; }
.quote-card--photo .quote-card__by { border-top-color: rgba(102, 74, 58, .22); }
.quote-card--photo .quote-card__role { color: var(--rust-deep); font-weight: 600; }
.quote-card--photo .quote-card__source { color: var(--ink-soft); }
.quote-card--photo .quote-card__source a { color: var(--rust-deep); font-weight: 700; text-underline-offset: 3px; border-radius: 4px; }
.quote-card--photo .quote-card__source a:focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; }
@media (max-width: 700px) {
  .step-panel .quote-card--photo .quote-card__text { font-size: clamp(1.2rem, min(6.2vw, 3.7dvh), 1.85rem); }
}
/* Tall phones: the card takes the room down to the bar, the words centred in
   it and a size larger, so the step does not end in an empty strip. */
@media (max-width: 700px) and (min-height: 740px) {
  .quote-card--photo { min-height: calc(100dvh - 15rem); display: flex; flex-direction: column; justify-content: center; }
  .step-panel .quote-card--photo .quote-card__text { font-size: clamp(1.3rem, 6.8vw, 2rem); }
}

/* Scan intro reminders as three rows: the drawing, then what to do and why.
   Short phones fall back to three small cards side by side. */
.scan-checks__list { grid-template-columns: 1fr; gap: .5rem; }
.scan-checks__list li { grid-template-columns: 56px minmax(0, 1fr); justify-items: start; align-items: center; column-gap: .85rem; padding: .6rem .9rem; text-align: left; }
.scan-checks__art { width: 56px; height: 42px; }
.scan-checks__txt { display: grid; gap: .1rem; }
.scan-checks__txt strong { font-size: var(--fs-sm); font-weight: 700; color: var(--rust-deep); }
.scan-checks__why { font-size: var(--fs-xs); font-weight: 500; color: var(--ink-muted); line-height: 1.35; }
@media (min-width: 701px) { .scan-checks__list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .scan-checks__list { gap: .4rem; }
  .scan-checks__list li { padding: .4rem .8rem; }
  .scan-checks__art { width: 48px; height: 36px; }
  .scan-guide__media { aspect-ratio: 2 / 1; }
}
@media (max-width: 700px) and (max-height: 819px) { .scan-checks__why { display: none; } }
/* Short desktop windows (1280x720): the reminders without their "why", and a
   shorter tutorial photo, so the step fits above the bar. */
@media (min-width: 701px) and (max-height: 819px) {
  .scan-checks__why { display: none; }
  #panel-scan .scan-guide__media { max-height: calc(100dvh - var(--header-h, 130px) - 26rem); }
  #panel-scan > .eyebrow { display: none; }   /* the header's stage label says the same */
  #panel-scan .scan-checks__head { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (max-width: 700px) and (max-height: 745px) {
  .scan-checks__list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; }
  .scan-checks__list li { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: .45rem .3rem .5rem; row-gap: .2rem; }
  .scan-checks__art { width: 44px; height: 32px; }
  .scan-checks__txt strong { font-size: var(--fs-2xs); font-weight: 600; }
}

/* ==========================================================================
   Results (redesign, Sept 2026): the step the loader opens (#results),
   built from the Claude Design "Results Page" (app.js, "results redesign").
   The earlier profile step keeps its own styles above.
   ========================================================================== */
.proto-main .wrap.is-results { max-width: 1240px; }
@media (min-width: 701px) {
  #panel-results .stepnav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; margin: 0;
    padding: .8rem max(var(--gutter), calc((100vw - 860px) / 2 + var(--gutter)));   /* where the quiz has its Back and Continue */
    background: rgba(248, 246, 242, .96);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
  }
  .proto-main:has(#panel-results.is-active) { padding-bottom: 10.75rem; }
}
.rx-hero h1 { margin: .15em 0 .3em; }
.rx-hero > .eyebrow, .rx-sec > .eyebrow { margin-bottom: 0; }
.rx-lead { margin: 0; max-width: 62ch; color: var(--ink-soft); font-size: var(--fs-lead); }
.rx-chips { list-style: none; padding: 0; margin: 1.1rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; }

/* Overview: the one dark card */
.rx-ov {
  margin-top: 1.75rem; background: var(--rust-deep); color: var(--cream);
  border-radius: var(--r-lg); padding: clamp(1.25rem, 1rem + 2vw, 2.25rem); box-shadow: var(--shadow-lift);
}
.rx-ov__head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem 1rem; border-bottom: 1px solid rgba(248, 246, 242, .2); padding-bottom: .75rem; }
.rx-ov__head h2 { margin: 0; font-size: var(--fs-h4); color: var(--cream); }
.rx-tag { display: inline-block; padding: .15rem .65rem; border-radius: var(--r-pill); background: var(--rose-tint); color: #7E3D48; font-size: var(--fs-xs); font-weight: 600; }
.rx-ov__body { display: flex; flex-wrap: wrap; gap: 1.5rem 2.25rem; margin-top: 1.25rem; align-items: stretch; }
.rx-ov__photo { position: relative; flex: 0 0 auto; width: clamp(150px, 22vw, 230px); aspect-ratio: 3 / 4; border-radius: 16px; overflow: hidden; margin: 0 auto; box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .5); }
.rx-ov__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rx-ov__photo .rx-ov__map { opacity: 0; transition: opacity 1.2s var(--ease); }
.rx-ov__photo .rx-ov__map.is-on { opacity: 1; }
.rx-ov__label { position: absolute; left: 10px; bottom: 10px; padding: .15rem .6rem; border-radius: var(--r-pill); background: rgba(255, 255, 255, .93); color: var(--rust-deep); font-size: var(--fs-2xs); font-weight: 700; }
.rx-ov__stats { flex: 1 1 320px; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 1.4rem 2rem; align-content: center; }
.rx-stat p { margin: 0; }
.rx-stat .rx-stat__label { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .02em; color: #E6D9CE; }
.rx-stat .rx-stat__big { font-family: var(--serif); font-size: clamp(2.35rem, 1.7rem + 2.7vw, 3.4rem); line-height: 1.1; font-variant-numeric: tabular-nums; }
.rx-stat__big small { font-family: var(--sans); font-size: var(--fs-sm); color: #E6D9CE; margin-left: 4px; }
.rx-stat .rx-stat__mid { font-family: var(--serif); font-size: var(--fs-h3); line-height: 1.2; margin-top: .35rem; text-wrap: balance; }
.rx-stat .rx-stat__note { font-size: var(--fs-xs); color: #E6D9CE; margin-top: .25rem; max-width: 34ch; }

.rx-sec { margin-top: var(--sect-y); }
.rx-sec > h2 { margin: .15em 0 .35em; }
.rx-card-plain { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-soft); }
.rx-thumb { position: relative; display: block; overflow: hidden; background: #241C18; aspect-ratio: 3 / 4; }
.rx-thumb--square { aspect-ratio: 1 / 1; }
.rx-thumb__zoom { position: absolute; inset: 0; }
.rx-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rx-small { margin: .75rem 0 0; font-size: var(--fs-xs); color: var(--ink-muted); }
.rx-fine { margin: 1.25rem 0 0; max-width: 720px; padding: .75rem 1rem; background: var(--cream-2); border-radius: var(--r-md); font-size: var(--fs-xs); }
.rx-note { margin: .6rem 0 0; padding: .5rem .75rem; background: var(--cream-2); border-radius: var(--r-md); font-size: var(--fs-xs); line-height: 1.45; }
.rx-pill { display: inline-block; padding: .1rem .6rem; border-radius: var(--r-pill); font-size: var(--fs-2xs); font-weight: 700; line-height: 1.5; }
/* Read at a glance: green is doing well, a warm red is where to look after first. */
.rx-pill--strong { background: #4D6B49; color: #FFFFFF; }
.rx-pill--well { background: #E3EDDD; color: #35532F; }
.rx-pill--care { background: #F6EBEC; color: #8E2C23; }
.rx-pill--focus { background: #93482B; color: #FFF9F4; }

/* Where to focus */
.rx-focus { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: .75rem; }
.rx-focus__group { padding: 1rem 1.1rem; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .9rem; align-items: start; }
.rx-focus__pos { width: 42px; height: 42px; border-radius: 50%; background: var(--rust-tint); color: var(--rust-text); display: grid; place-items: center; font-family: var(--serif); font-size: var(--fs-h4); }
.rx-focus__pos.is-first { background: var(--rose-tint); }
.rx-focus__head { margin: 0; font-size: var(--fs-sm); }
.rx-focus__head span { color: var(--ink-muted); }
.rx-focus__items { margin-top: .75rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 112px), 1fr)); gap: .6rem; max-width: 640px; }
.rx-fitem { display: flex; flex-direction: column; padding: 0; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--white); text-align: left; overflow: hidden; transition: box-shadow .3s var(--ease); }
.rx-fitem:hover { box-shadow: var(--shadow-lift); }
.rx-fitem__label { padding: .5rem .6rem .6rem; font-size: var(--fs-xs); font-weight: 700; line-height: 1.3; }
.rx-skip { display: inline-block; margin-top: .5rem; font-size: var(--fs-sm); font-weight: 600; color: var(--rust-text); }

/* The depth stage */
.rx-stage { position: relative; margin-top: .75rem; }
.rx-sticky {
  position: sticky; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas: 'photo' 'deck'; row-gap: .75rem; column-gap: 40px; justify-content: center; align-items: center;
  overflow: hidden; padding: 8px 0; border-radius: var(--r-md);
}
.rx-sticky.is-desk { grid-template-rows: minmax(0, 1fr); grid-template-areas: 'rail photo deck'; padding: 16px 28px 16px 4px; }
.rx-sticky.is-flat { position: relative; display: block; overflow: visible; padding: 0; }
.rx-rail { grid-area: rail; align-self: stretch; overflow-y: auto; overflow-x: hidden; padding: 4px 6px 12px 0; }
.rx-rail__fam { margin: .9rem 0 .25rem .5rem; font-size: var(--fs-xs); font-weight: 600; letter-spacing: .02em; color: var(--rust-text); }
.rx-rail__row { display: flex; align-items: center; gap: .6rem; width: 100%; min-height: 44px; padding: 3px 8px; border-radius: 10px; text-align: left; color: var(--ink); transition: background-color .3s var(--ease); }
.rx-rail__row:hover { background: var(--cream-2); }
.rx-rail__row[aria-current="true"] { background: var(--rust-tint); font-weight: 700; }
.rx-rail__row.is-sub { min-height: 32px; padding-left: 22px; }
.rx-rail__row[hidden] { display: none; }
.rx-thumb--rail { width: 27px; height: 36px; border-radius: 6px; flex: none; }
.rx-thumb--rail-sub { width: 21px; height: 28px; border-radius: 5px; flex: none; }
.rx-rail__label { flex: 1; min-width: 0; font-size: var(--fs-xs); line-height: 1.3; }
.rx-rail__score { font-size: var(--fs-2xs); color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.rx-photocol { grid-area: photo; position: relative; z-index: 10; display: flex; flex-direction: column; align-items: center; gap: .6rem; min-height: 0; }
.rx-photorow { display: flex; align-items: center; gap: .5rem; }
.rx-photorow__side { display: flex; flex-direction: column; gap: .75rem; align-items: center; }
.rx-photo { position: relative; flex: none; border-radius: var(--r-md); overflow: hidden; background: #241C18; box-shadow: var(--shadow-lift); touch-action: pan-y; }
.rx-photo__zoom { position: absolute; inset: 0; transition: transform .8s var(--ease); }
.rx-photo__zoom img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rx-photo__zoom .rx-photo__layer { opacity: 0; transition: opacity .6s var(--ease); }
.rx-photo__zoom .rx-photo__layer.is-on { opacity: 1; }
.rx-badge {
  position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); z-index: 2; white-space: nowrap;
  padding: .15rem .6rem; border-radius: var(--r-pill); background: rgba(255, 255, 255, .92); color: var(--rust-deep);
  font-size: var(--fs-2xs); font-weight: 700;
}
.rx-badge--wide { left: 8px; right: 8px; transform: none; white-space: normal; text-align: center; border-radius: var(--r-md); padding: .4rem .6rem; line-height: 1.35; }
.rx-badge--quiet { background: rgba(242, 238, 232, .95); font-weight: 600; }
.rx-badge[hidden] { display: none; }
.rx-round { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 1px solid var(--line); background: var(--white); display: grid; place-items: center; box-shadow: var(--shadow-press); transition: background-color .3s var(--ease); }
.rx-round:disabled { opacity: .4; cursor: default; }
.rx-round[aria-pressed="true"] { background: var(--rust-deep); }
.rx-round__icon { display: block; position: relative; }
.rx-round--prev .rx-round__icon { width: 9px; height: 9px; border-left: 2px solid var(--rust-deep); border-bottom: 2px solid var(--rust-deep); transform: translateX(2px) rotate(45deg); }
.rx-round--next .rx-round__icon { width: 9px; height: 9px; border-right: 2px solid var(--rust-deep); border-top: 2px solid var(--rust-deep); transform: translateX(-2px) rotate(45deg); }
.rx-round--eye .rx-round__icon { width: 20px; height: 12px; border: 1.8px solid var(--rust-deep); border-radius: 50%; }
.rx-round--eye .rx-round__icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; border-radius: 50%; background: var(--rust-deep); transform: translate(-50%, -50%); }
.rx-round--eye[aria-pressed="true"] .rx-round__icon { border-color: var(--cream); }
.rx-round--eye[aria-pressed="true"] .rx-round__icon::after { background: var(--cream); }
.rx-round--grid .rx-round__icon { width: 6px; height: 6px; border-radius: 2px; background: var(--rust-deep); box-shadow: 9px 0 0 var(--rust-deep), 0 9px 0 var(--rust-deep), 9px 9px 0 var(--rust-deep); transform: translate(-4.5px, -4.5px); }
.rx-controls { display: flex; align-items: center; justify-content: center; gap: .5rem; }
.rx-controls__counter { min-width: 58px; text-align: center; font-size: var(--fs-xs); font-weight: 700; font-variant-numeric: tabular-nums; }
.rx-controls__rule { width: 1px; height: 24px; background: var(--line); margin: 0 6px; }
.rx-deck { grid-area: deck; position: relative; align-self: stretch; justify-self: center; width: 100%; max-width: 560px; min-width: 0; perspective: 900px; perspective-origin: 50% -40%; transform-style: preserve-3d; }
.is-desk .rx-deck { max-width: none; perspective: 1200px; perspective-origin: 50% 30%; }
.rx-card {
  position: absolute; top: 6px; left: 0; right: 0; transform-origin: 50% 0;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-soft);
  padding: 14px 16px; display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start;
}
.is-desk .rx-card { top: 50%; padding: 20px 22px; }
.is-flat .rx-deck { max-width: 760px; perspective: none; margin: 0 auto; }
.is-flat .rx-card { position: relative; top: auto; margin: 0 0 14px; }
.rx-card__img { flex: 0 0 38%; position: relative; aspect-ratio: 3 / 4; border-radius: var(--r-md); overflow: hidden; background: #241C18; }
.is-desk.is-flat .rx-card__img { flex-basis: 220px; }
.rx-card__imgzoom { position: absolute; inset: 0; }
.rx-card__imgzoom img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rx-card__body { flex: 1 1 160px; min-width: 0; }
.rx-card__top { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; justify-content: space-between; }
.rx-card__eyebrow { margin: 0; font-size: var(--fs-xs); font-weight: 600; letter-spacing: .02em; color: var(--rust-text); line-height: 1.4; }
.rx-card__count { font-size: var(--fs-2xs); color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.rx-card h3 { margin: 2px 0; font-size: var(--fs-h3); line-height: 1.15; }
.rx-card__line { margin: 0; font-size: var(--fs-sm); color: var(--ink-soft); line-height: 1.5; }
.rx-card__rank { margin-top: .6rem; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.rx-card__say { font-size: var(--fs-xs); font-weight: 600; line-height: 1.35; }
.rx-card__score { font-weight: 400; color: var(--ink-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rx-kv { margin: .6rem 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: .5rem; }
.rx-kv > div { background: var(--cream-2); border-radius: var(--r-md); padding: .5rem .75rem; }
.rx-kv dt { font-size: var(--fs-2xs); color: var(--ink-muted); }
.rx-kv dd { margin: 0; font-weight: 700; font-size: var(--fs-sm); }
.rx-legend { list-style: none; padding: 0; margin: .6rem 0 0; display: grid; gap: 6px; }
.rx-legend li { display: flex; gap: .6rem; align-items: center; font-size: var(--fs-xs); line-height: 1.35; }
.rx-swatch { width: 28px; height: 20px; border-radius: 6px; background: #77604F; display: grid; place-items: center; flex: none; }
.rx-swatch--wide { width: 60px; }
.rx-swatch__mark--ring { width: 10px; height: 10px; border-radius: 50%; border: 2px solid; }
.rx-swatch__mark--dot, .rx-swatch__mark--dots2 { width: 4px; height: 4px; border-radius: 50%; }
.rx-swatch__mark--line { width: 17px; height: 3px; border-radius: 3px; transform: rotate(-22deg); }
.rx-swatch__mark--area { width: 17px; height: 11px; border-radius: 6px; opacity: .92; }
.rx-swatch__mark--outline { width: 17px; height: 11px; border-radius: 6px; border: 1.5px solid; }
.rx-swatch__mark--dash { width: 17px; height: 11px; border-radius: 6px; border: 1.5px dashed; }
.rx-swatch__mark--grad { width: 48px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #4F74E0, #46C06A, #F59A38); }
.rx-flatbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; margin: 0 0 .9rem; font-size: var(--fs-xs); color: var(--ink-muted); }
.rx-toggle { min-height: 44px; padding: 0 .9rem; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--white); font-size: var(--fs-xs); font-weight: 600; color: var(--rust-deep); }
.rx-toggle[aria-pressed="true"] { background: var(--rust-deep); color: var(--cream); border-color: var(--rust-deep); }

/* No photo (illustrative version) */
.rx-nophoto { margin-top: 1.25rem; display: flex; flex-wrap: wrap; gap: 1.25rem 1.75rem; align-items: center; padding: clamp(1.1rem, .9rem + 1.5vw, 2rem); max-width: 880px; }
.rx-nophoto__face { flex: none; width: 120px; aspect-ratio: 3 / 4; border-radius: var(--r-md); background: var(--cream-2); display: grid; place-items: center; border: 1px dashed var(--line-strong); }
.rx-nophoto__face span { width: 62px; height: 82px; border-radius: 50%; border: 1.6px solid var(--rust-deep); background: #FFFBF7; }
.rx-nophoto > div { flex: 1 1 240px; min-width: 0; }
.rx-nophoto h3 { margin: 0; font-size: var(--fs-h3); }
.rx-nophoto p { margin: .4rem 0 .9rem; font-size: var(--fs-sm); color: var(--ink-soft); }

/* Profile shape */
.rx-radar { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 1.75rem 3rem; align-items: center; }
.rx-radar__copy > h2 { margin: .15em 0 .35em; }
.rx-radar__copy > .eyebrow { margin-bottom: 0; }
.rx-radar__list { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 6px; max-width: 420px; }
.rx-radar__list li { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: .6rem; align-items: center; font-size: var(--fs-sm); }
.rx-radar__n { width: 24px; height: 24px; border-radius: 50%; background: var(--rust-tint); color: var(--rust-text); font-size: var(--fs-2xs); font-weight: 700; display: grid; place-items: center; }
.rx-radar__score { font-size: var(--fs-xs); color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.rx-radar__fig { position: relative; width: 100%; max-width: 400px; justify-self: center; }
.rx-radar__fig svg { display: block; width: 100%; overflow: visible; }
.rx-radar__ring { fill: none; stroke: var(--line); stroke-width: 1; }
.rx-radar__shape { fill: rgba(168, 90, 58, .14); stroke: var(--rust); stroke-width: 2; stroke-linejoin: round; }
.rx-radar__dot { fill: var(--rust); }
.rx-radar__pin { position: absolute; width: 26px; height: 26px; transform: translate(-50%, -50%); }

/* Every score, by family */
.rx-tag--light { margin: .4rem 0 0; }
.rx-fams { display: grid; gap: 1.1rem; margin-top: 1.5rem; }
.rx-fam { padding: clamp(16px, 1rem + 1vw, 24px); }
.rx-fam__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; margin-bottom: .9rem; }
.rx-fam__head h3 { margin: 0; font-size: var(--fs-h3); }
.rx-fam__head p { margin: 0; font-size: var(--fs-sm); color: var(--ink-soft); }
.rx-members { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .75rem; align-items: stretch; }
/* Cards grow to fill their row, so none is left half-empty beside a tall one. */
.rx-member { flex: 1 1 300px; min-width: 0; background: var(--cream); border: 1px solid var(--cream-3); border-radius: 16px; padding: .9rem; display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: .9rem; align-items: start; }
.rx-member.has-zones { flex-basis: 100%; }
.rx-member__zones { grid-column: 1 / -1; }
@media (min-width: 900px) {
  .rx-member.has-zones { grid-template-columns: 72px minmax(0, 300px) minmax(0, 1fr); column-gap: 1.25rem; }
  .rx-member.has-zones .rx-member__zones { grid-column: 3; }
}
.rx-member.is-text { grid-template-columns: minmax(0, 1fr); }
.rx-member__thumb { display: block; width: 72px; padding: 0; border-radius: var(--r-md); overflow: hidden; }
.rx-member__top { display: flex; justify-content: space-between; gap: .6rem; align-items: baseline; margin-bottom: .35rem; }
.rx-member__label { font-weight: 700; line-height: 1.3; }
.rx-member__score { font-size: var(--fs-xs); color: var(--ink-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rx-member__say { margin: .5rem 0 0; font-size: var(--fs-xs); line-height: 1.5; }
.rx-tease { display: block; margin-top: .5rem; min-height: 32px; padding: 0; color: var(--rust-text); font-size: var(--fs-xs); font-weight: 700; text-align: left; }
/* The arrow follows the last word, however the line wraps. */
.rx-tease::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 7px; vertical-align: .1em; border-right: 2px solid currentColor; border-top: 2px solid currentColor; transform: rotate(45deg); }
.rx-tease:hover { color: var(--rust-dark); }
.rx-member__area { margin: .1rem 0 .45rem; font-size: var(--fs-2xs); font-weight: 700; color: var(--ink-muted); }
/* Each area as a small picture of that part of the face, lowest first. */
.rx-zones { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: .5rem; }
.rx-zone { display: flex; flex-direction: column; padding: 0; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--white); text-align: left; color: var(--ink); transition: box-shadow .3s var(--ease); }
.rx-zone:hover:not(:disabled) { box-shadow: var(--shadow-lift); }
.rx-zone:disabled { cursor: default; }
.rx-zone__meta { display: flex; justify-content: space-between; align-items: flex-start; gap: .4rem; padding: .4rem .5rem .5rem; font-size: var(--fs-2xs); font-weight: 700; line-height: 1.3; }
.rx-zone__score { font-weight: 400; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.rx-skinbox { margin-top: .75rem; padding: .9rem 1rem; border-radius: 16px; background: var(--cream-2); }
.rx-skinbox__title { margin: 0; font-weight: 700; font-size: var(--fs-sm); }
.rx-skinbox .rx-kv > div { background: var(--white); }


/* The AI simulation, beside today's photo (landing) */
.compare.compare--portrait { aspect-ratio: 3 / 4; }
.compare--portrait .compare__pane img { display: block; width: 100%; height: 100%; object-fit: cover; }
.split__media .compare--portrait { max-width: 440px; margin-inline: auto; }

/* Your next six weeks */
.rx-weeks { margin-top: var(--sect-y); background: var(--rust-deep); color: var(--cream); border-radius: var(--r-lg); padding: clamp(1.25rem, 1rem + 2vw, 2.5rem); box-shadow: var(--shadow-lift); }
.rx-weeks h2 { color: var(--cream); margin: .15em 0 .35em; }
.rx-weeks .rx-weeks__eyebrow { margin: 0; font-size: var(--fs-xs); font-weight: 600; letter-spacing: .02em; color: #E6D9CE; }
.rx-weeks .rx-weeks__lead { margin: 0; max-width: 60ch; color: #E6D9CE; }
.rx-weeks__grid {
  margin-top: 1.5rem; display: grid; gap: .5rem .9rem; align-items: start;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas: 'today sim' 'ctoday csim' 'side side' 'fine fine';
}
@media (min-width: 820px) {
  /* The unlock sits level with the bottom of the two photos. */
  .rx-weeks__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.35fr); grid-template-areas: 'today sim side' 'ctoday csim fine'; column-gap: 1.1rem; }
  .rx-weeks__side { align-self: stretch; }
}
.rx-weeks__today { grid-area: today; } .rx-weeks__sim { grid-area: sim; }
.rx-weeks__ctoday { grid-area: ctoday; } .rx-weeks__csim { grid-area: csim; }
.rx-weeks__side { grid-area: side; display: flex; flex-direction: column; gap: 1rem; padding: .25rem 0 0 .25rem; }
.rx-weeks .rx-weeks__fine { grid-area: fine; margin: 0; font-size: var(--fs-2xs); color: #E6D9CE; }
.rx-weeks__frame { position: relative; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; background: #241C18; }
.rx-weeks__frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rx-weeks__tag { position: absolute; left: 8px; bottom: 8px; padding: .15rem .6rem; border-radius: var(--r-pill); background: rgba(255, 255, 255, .93); color: var(--rust-deep); font-size: var(--fs-2xs); font-weight: 700; }
.rx-weeks__frame.is-dashed { background: none; border: 1.5px dashed rgba(248, 246, 242, .45); display: grid; place-items: center; text-align: center; padding: .75rem; font-family: var(--serif); font-size: 1.6rem; line-height: 1.1; }
.rx-weeks__cap p { margin: 0; font-size: var(--fs-xs); color: #E6D9CE; }
.rx-weeks .rx-weeks__capt { margin-top: .15rem; font-weight: 700; color: var(--cream); }
/* The weeks as a timeline: a dot for each, joined by a dashed line. */
.rx-weeks__list { list-style: none; padding: 0; margin: 0; display: grid; }
.rx-weeks__list li { position: relative; padding: 0 0 1.25rem 2rem; }
.rx-weeks__list li:last-child { padding-bottom: 0; }
.rx-weeks__list li::before { content: ""; position: absolute; left: 3px; top: .3rem; width: 13px; height: 13px; border-radius: 50%; background: var(--rose-tint); box-shadow: 0 0 0 4px rgba(248, 246, 242, .12); }
.rx-weeks__list li::after { content: ""; position: absolute; left: 8.5px; top: 1.35rem; bottom: .15rem; border-left: 2px dashed rgba(248, 246, 242, .32); }
.rx-weeks__list li:last-child::after { display: none; }
.rx-weeks__when { display: block; font-size: var(--fs-2xs); font-weight: 700; letter-spacing: .02em; color: var(--rose-tint); }
.rx-weeks__what { display: block; margin-top: .15rem; font-size: var(--fs-sm); line-height: 1.45; }
.rx-weeks .rx-weeks__btn { margin-top: auto; width: 100%; background: var(--cream); color: var(--rust-deep); font-weight: 700; }
.rx-weeks .rx-weeks__btn:hover { background: var(--white); }

.rx-short { margin-top: var(--sect-y); padding: clamp(1.25rem, 1rem + 2vw, 2.25rem); display: flex; flex-wrap: wrap; gap: 1.25rem 2rem; align-items: center; justify-content: space-between; box-shadow: var(--shadow-lift); }
.rx-short > div { flex: 1 1 320px; min-width: 0; }
.rx-short h2 { margin: 0; font-size: var(--fs-h3); line-height: 1.15; }
.rx-short p { margin: .4rem 0 0; color: var(--ink-soft); max-width: 56ch; }

/* All maps: a sheet from the bottom */
.rx-sheet {
  width: 100%; max-width: 900px; max-height: 86vh; margin: auto auto 0; border: 0; border-radius: 20px 20px 0 0;
  padding: 18px clamp(1rem, .7rem + 2vw, 2rem) 28px; background: var(--cream); color: var(--ink);
  box-shadow: 0 -10px 40px -20px rgba(102, 74, 58, .4);
}
.rx-sheet::backdrop { background: rgba(36, 28, 24, .4); }
.rx-sheet__head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; }
.rx-sheet__head h2 { margin: 0; font-size: var(--fs-h3); }
.rx-sheet .rx-sheet__fam { margin: 1.1rem 0 .5rem; }
.rx-sheet__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: .7rem; align-items: stretch; }
/* A tile: the picture (cropped to the map's area, its score in the level's
   colour on top), then the name on two reserved lines and the level. */
.rx-sheet__item { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; padding: 0; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--white); text-align: left; overflow: hidden; color: var(--ink); }
.rx-sheet__item[aria-current="true"] { border-color: var(--rust); }
.rx-sheet__item .rx-thumb { width: 100%; flex: none; }
.rx-sheet__badge { position: absolute; top: 7px; left: 7px; z-index: 2; min-width: 2.1em; padding: .15rem .5rem; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; box-shadow: 0 2px 8px -3px rgba(0, 0, 0, .45); }
.rx-sheet__body { display: grid; gap: .15rem; padding: 7px 9px 9px; }
.rx-sheet__label { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; min-height: 2.6em; font-size: var(--fs-2xs); font-weight: 700; line-height: 1.3; }
.rx-sheet__score { display: block; font-size: var(--fs-2xs); font-weight: 700; color: var(--ink-muted); line-height: 1.3; }
.rx-sheet__score.is-focus { color: #93482B; }
.rx-sheet__score.is-care { color: #8E2C23; }
.rx-sheet__score.is-well { color: #35532F; }
.rx-sheet__score.is-strong { color: #4D6B49; }
.rx-sheet__key { list-style: none; margin: .7rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem 1rem; font-size: var(--fs-xs); color: var(--ink-soft); }
.rx-sheet__key li { display: inline-flex; align-items: center; gap: .4rem; }
.rx-sheet__dot { width: 11px; height: 11px; border-radius: 50%; padding: 0; }
.rx-sheet__dot.rx-pill--well { box-shadow: inset 0 0 0 1px #7FA37A; }
.rx-sheet__dot.rx-pill--care { box-shadow: inset 0 0 0 1px #E8C9CE; }
.rx-sheet { overflow-y: auto; overscroll-behavior: contain; }
html.sheet-open { overflow: hidden; }
@media (max-width: 480px) { .rx-sheet__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; } .rx-sheet__body { padding: 6px 7px 8px; } }

/* The same soft press as the rest of the site. */
@media (prefers-reduced-motion: no-preference) {
  .rx-fitem, .rx-round, .rx-zone, .rx-sheet__item, .rx-member__thumb, .rx-toggle { transition-property: background-color, border-color, color, box-shadow, scale; transition-duration: .22s; transition-timing-function: var(--spring); }
  .rx-fitem:active, .rx-round:active:not(:disabled), .rx-zone:active:not(:disabled), .rx-sheet__item:active, .rx-member__thumb:active, .rx-toggle:active { scale: .97; }
}

/* Results: the routine, blurred behind the unlock, right after "Start with these". */
.rx-lock { margin-top: 1.25rem; padding: clamp(1.1rem, .9rem + 1.5vw, 1.9rem); display: grid; gap: 1rem; }
.rx-lock__copy > h2 { margin: .1em 0 .3em; font-size: var(--fs-h3); line-height: 1.15; }
.rx-lock__copy > .eyebrow { margin-bottom: 0; }
.rx-lock__box { position: relative; border-radius: var(--r-md); background: var(--cream); border: 1px solid var(--cream-3); padding: 1rem; overflow: hidden; }
.rx-lock__halves { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 1rem 1.5rem; }
.rx-lock__half h3 { margin: 0 0 .5rem; font-size: var(--fs-h4); }
.rx-lock__steps { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.rx-lock__steps li { display: flex; align-items: center; gap: .6rem; font-size: var(--fs-sm); font-weight: 600; }
.rx-lock__steps li.is-hidden .rx-lock__n { background: var(--cream-3); color: transparent; }
.rx-lock__bar { display: block; height: 11px; border-radius: var(--r-pill); background: linear-gradient(90deg, rgba(102, 74, 58, .16), rgba(102, 74, 58, .09)); filter: blur(1.5px); }
.rx-lock__steps li { min-height: 24px; }
.rx-lock__n { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--rust-tint); color: var(--rust-text); font-size: var(--fs-2xs); font-weight: 700; display: grid; place-items: center; }
/* The list fades out toward the bottom; the unlock sits under it. */
.rx-lock__veil { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; }
.rx-lock__hint { margin: 0; font-size: var(--fs-sm); font-weight: 700; color: var(--rust-deep); }

/* Results: one question when the photo and the answer disagree on skin type. */
.rx-ask { margin-top: .6rem; }
.rx-ask__q { margin: .7rem 0 .45rem; font-weight: 700; font-size: var(--fs-sm); }
.rx-ask__group { display: grid; gap: .45rem; }
.rx-ask__opt { min-height: 44px; padding: .5rem .85rem; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--white); text-align: left; font-size: var(--fs-sm); font-weight: 600; color: var(--ink); transition: border-color .3s var(--ease), background-color .3s var(--ease); }
.rx-ask__opt:hover { border-color: var(--line-strong); background: var(--cream); }

/* Capture: the check before a photo is sent. */
.photo-gate { margin-top: 1rem; flex-direction: column; }
.photo-gate p { margin: 0; }
.photo-gate__actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .6rem; }
.photo-gate[hidden] { display: none; }

/* Results: what else the answers changed, as a slider with the quiz's drawings. */
.rx-said__track {
  margin-top: 1.1rem; display: flex; gap: .9rem; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-padding-inline: 0; padding-bottom: .4rem; scrollbar-width: none; overscroll-behavior-x: contain;
}
.rx-said__track::-webkit-scrollbar { display: none; }
.rx-said__card {
  flex: 0 0 min(88%, 760px); scroll-snap-align: start; display: grid; grid-template-columns: minmax(0, 1fr); gap: .9rem;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-soft); padding: 1rem;
}
@media (min-width: 760px) {
  .rx-said__card { grid-template-columns: minmax(0, 250px) minmax(0, 1fr); align-items: center; padding: 1.25rem 1.5rem 1.25rem 1.25rem; min-height: 250px; }
}
.rx-said__art { display: grid; place-items: center; background: var(--cream); border-radius: var(--r-md); min-height: 170px; padding: .75rem; overflow: hidden; }
.rx-said__art .art { gap: 0; }
.rx-said__art .art svg { width: auto; height: 160px; max-width: 100%; }
.rx-said__art .art figcaption { display: none; }
.rx-said__art > img { width: 100%; height: 170px; object-fit: cover; border-radius: var(--r-md); }
.rx-said__art.is-empty { display: none; }
.rx-said__body .rx-pill { margin-bottom: .5rem; }
.rx-said__quote { margin: 0 0 .5rem; font-size: var(--fs-xs); color: var(--ink-muted); }
.rx-said__quote q { color: var(--rust-deep); font-weight: 700; }
.rx-said__text { margin: 0; font-family: var(--serif); font-size: var(--fs-h3); line-height: 1.3; color: var(--rust-deep); text-wrap: pretty; }
.rx-said__bar { margin-top: .75rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.rx-said__dots { display: flex; flex-wrap: wrap; margin-inline: -7px; }
/* Each dot is a 24px target; the dot itself is drawn inside it. */
.rx-said__dot { display: grid; place-items: center; width: 24px; height: 24px; padding: 0; background: none; transition: width .3s var(--ease); }
.rx-said__dot::before { content: ""; width: 10px; height: 10px; border-radius: var(--r-pill); background: var(--line-strong); transition: width .3s var(--ease), background-color .3s var(--ease); }
.rx-said__dot[aria-current="true"] { width: 40px; }
.rx-said__dot { position: relative; }
.rx-said__dot::after { content: ""; position: absolute; left: 50%; top: 50%; width: max(100%, 32px); height: 44px; transform: translate(-50%, -50%); }
.rx-said__dot[aria-current="true"]::before { width: 26px; background: var(--rust); }
@media (max-width: 700px) {
  /* Phones: the simulation label as a strip along the bottom of its photo. */
  .rx-weeks__tag { left: 6px; right: 6px; bottom: 6px; text-align: center; border-radius: var(--r-sm); line-height: 1.3; }
  /* Shorter slides, and area pictures three to a row. */
  .rx-said__art { min-height: 0; padding: .5rem; }
  .rx-said__art .art svg { height: 104px; }
  .rx-said__art > img { height: 120px; }
  .rx-said__text { font-size: var(--fs-h4); }
  .rx-zones { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: .4rem; }
  .rx-zone__meta { flex-direction: column; gap: 0; padding: .3rem .4rem .4rem; }
}

/* Checkout reassurance (Sept 2026): Guided's free trial on its card, the
   welcome code applied for everyone, and no lock-in beside the pay button. */
.plan__trial { display: inline-block; margin: .35rem 0 0; padding: .15rem .6rem; border-radius: var(--r-pill); background: #E3EDDD; color: #35532F; font-size: var(--fs-xs); font-weight: 700; }
.plans--pick .plan.is-chosen .plan__trial { background: rgba(255, 255, 255, .92); color: #35532F; }
.plan__trial[hidden] { display: none; }
.summary__note { margin: .6rem 0 0; font-size: var(--fs-xs); color: var(--ink-muted); }
.summary__note[hidden] { display: none; }
.pay-assure {
  margin: 1rem 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: .15rem .4rem;
  padding: .7rem .9rem; border-radius: var(--r-md); background: #E3EDDD; color: #35532F; font-size: var(--fs-sm);
}
.pay-assure strong { color: #35532F; }
.pay-assure [hidden] { display: none; }
.pay-assure__date { font-weight: 700; }

/* Phones, depth view: a secondary note would push the card under the bar. */
.rx-sticky:not(.is-desk):not(.is-flat) .rx-note.is-minor { display: none; }
@media (max-height: 699px) {
  .rx-sticky:not(.is-desk):not(.is-flat) .rx-card { padding: 11px 13px; gap: .6rem; }
  .rx-sticky:not(.is-desk):not(.is-flat) .rx-card h3 { font-size: var(--fs-h4); }
  .rx-sticky:not(.is-desk):not(.is-flat) .rx-card__line { font-size: var(--fs-xs); }
  .rx-sticky:not(.is-desk):not(.is-flat) .rx-legend li { font-size: var(--fs-2xs); }
}
/* A phone card never scrolls inside: rxLayoutStage() tightens a long one
   in steps until it fits (smaller type, then no note, then no line). */
.rx-sticky:not(.is-desk):not(.is-flat) .rx-card { overflow: hidden; }
.rx-card.is-tight { padding: 11px 13px; gap: .6rem; }
.rx-card.is-tight h3 { font-size: var(--fs-h4); }
.rx-card.is-tight .rx-card__line, .rx-card.is-tight .rx-card__say { font-size: var(--fs-xs); }
.rx-card.is-tight .rx-card__rank { margin-top: .4rem; }
.rx-card.is-tight .rx-legend { margin-top: .4rem; gap: 3px; }
.rx-card.is-tight .rx-legend li { font-size: var(--fs-2xs); }
.rx-card.is-tight .rx-note { margin-top: .4rem; padding: 0; background: none; font-size: var(--fs-2xs); color: var(--ink-muted); }
.rx-card.is-tighter .rx-note { display: none; }
.rx-card.is-tightest .rx-card__line { display: none; }

/* ==========================================================================
   Round 2 (Sept 2026): the results tease the products; the products step;
   "your routine is being created"; the dashboard. From the Claude Design
   round 2 pages. Built in app.js ("products, routine and dashboard").
   ========================================================================== */
@media (min-width: 701px) {
  #panel-results.is-active,
  #panel-products.is-active,
  #panel-plans.is-active,
  #panel-checkout.is-active,
  #panel-changeplan.is-active {
    animation: panelFade .4s var(--ease);
  }
  #panel-products .stepnav,
  #panel-plans .stepnav,
  #panel-checkout .stepnav,
  #panel-changeplan .stepnav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; margin: 0;
    padding: .8rem max(var(--gutter), calc((100vw - 860px) / 2 + var(--gutter)));
    background: rgba(248, 246, 242, .96); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
  }
  #panel-plans .stepnav {
    padding: .8rem max(var(--gutter), calc((100vw - 1120px) / 2 + var(--gutter)));
  }
  .proto-main:has(#panel-products.is-active),
  .proto-main:has(#panel-plans.is-active) { padding-bottom: 10.75rem; }
}
.proto-main:has(#panel-checkout.is-active),
.proto-main:has(#panel-changeplan.is-active) { padding-bottom: calc(10.75rem + env(safe-area-inset-bottom)); }

/* Results: "Your products are ready" */
.rx-ready { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "copy" "list" "btn"; gap: 1.25rem; }
.rx-ready__copy { grid-area: copy; }
.rx-ready__copy > h2 { margin: .1em 0 .3em; font-size: var(--fs-h3); line-height: 1.15; }
.rx-ready__copy > .eyebrow { margin-bottom: 0; }
.rx-ready__copy .rx-lead { font-size: var(--fs-body); }
.rx-ready__list { grid-area: list; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.rx-ready__list li { min-width: 0; display: grid; gap: .6rem; align-content: start; padding: .5rem .5rem .75rem; border-radius: 16px; background: var(--cream); border: 1px solid var(--line); }
.rx-ready__img { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 12px; background: var(--white); overflow: hidden; }
.rx-ready__img img { position: absolute; inset: 8%; width: 84%; height: 84%; object-fit: contain; }
.rx-ready__img.is-soft img { filter: blur(7px) saturate(.7); opacity: .5; transform: scale(.92); }
.rx-ready__ph { position: absolute; inset: 22%; border-radius: 10px; background: var(--cream-3); filter: blur(2px); }
.rx-ready__txt { min-width: 0; display: grid; gap: 5px; padding: 0 .2rem; }
.rx-ready__step { font-size: var(--fs-2xs); font-weight: 700; color: var(--rust-text); }
.rx-ready__name { font-size: var(--fs-xs); font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rx-ready__txt .rx-lock__bar { height: 9px; margin-top: 3px; }
.rx-ready__btn { grid-area: btn; justify-self: start; display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.rx-ready.is-wait .rx-ready__ph { animation: rx-ready-ph 1.2s ease-in-out infinite; }
@keyframes rx-ready-ph { 50% { opacity: .4; } }
@media (prefers-reduced-motion: reduce) { .rx-ready.is-wait .rx-ready__ph { animation: none; } }
@media (min-width: 900px) {
  .rx-ready { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); grid-template-areas: "copy list" "btn list"; grid-template-rows: auto 1fr; column-gap: clamp(1.5rem, 1rem + 2.5vw, 3rem); align-items: start; }
  .rx-ready__btn { align-self: end; }
  .rx-ready__list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rx-ready__img { aspect-ratio: 1; }
}

/* Products */
.px-head { max-width: 880px; }
.px-head h1 { margin: .15em 0 .3em; }
.px-headchips { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.px-safety { margin-top: 1.1rem; padding: .85rem 1.1rem; border-radius: var(--r-md); background: var(--cream-2); border: 1px solid var(--line); font-size: var(--fs-sm); }
.px-notes { margin: .5rem 0 0; padding-left: 1.1rem; display: grid; gap: .3rem; }
.px-step { margin-top: clamp(2.5rem, 1.6rem + 3vw, 4.5rem); scroll-margin-top: 90px; }
.px-step__head { display: flex; align-items: center; gap: .9rem; padding-bottom: .9rem; border-bottom: 1px solid var(--line); }
.px-step__n { flex: none; width: 36px; height: 36px; border-radius: var(--r-pill); background: var(--rust-tint); color: var(--rust-text); display: grid; place-items: center; font-size: var(--fs-sm); font-weight: 700; }
.px-step__head h2 { margin: 0; font-size: var(--fs-h3); line-height: 1.15; }
.px-step__head p { margin: .1rem 0 0; font-size: var(--fs-sm); color: var(--ink-soft); }
.px-grid { margin-top: 1.1rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.1rem; align-items: start; }
@media (min-width: 900px) { .px-grid { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); } }
.px-main { display: grid; gap: .75rem; min-width: 0; }
.px-top { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-soft); padding: clamp(1rem, .8rem + 1vw, 1.5rem); display: flex; flex-wrap: wrap; gap: 1.1rem 1.5rem; }
.px-top__img { flex: 1 1 220px; max-width: 100%; position: relative; aspect-ratio: 4 / 3; border-radius: 14px; background: var(--cream-2); overflow: hidden; }
@media (min-width: 900px) { .px-top__img { aspect-ratio: 1 / 1; } }
.px-top__img img, .px-alt__img img, .px-oos__img img { position: absolute; inset: 6%; width: 88%; height: 88%; object-fit: contain; mix-blend-mode: multiply; }
.px-top__tag { position: absolute; top: 10px; left: 10px; padding: .15rem .6rem; border-radius: var(--r-pill); background: var(--rust-deep); color: var(--cream); font-size: var(--fs-2xs); font-weight: 700; }
.px-noimg { position: absolute; left: 0; right: 0; bottom: 10px; text-align: center; font-size: var(--fs-2xs); color: var(--ink-muted); }
.px-top__body { flex: 1.3 1 260px; min-width: 0; display: flex; flex-direction: column; gap: .65rem; }
.px-brand { margin: 0; font-size: var(--fs-xs); font-weight: 600; color: var(--ink-muted); }
.px-name { margin: .1rem 0 0; font-size: var(--fs-h4); line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.px-top.is-open .px-name { -webkit-line-clamp: unset; }
.px-price { margin: 0; font-size: var(--fs-h4); font-weight: 700; font-variant-numeric: tabular-nums; }
.px-est { display: flex; align-items: center; gap: .5rem; }
.px-est__mark { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--rust-tint); color: #93482B; display: grid; place-items: center; font-size: var(--fs-sm); font-weight: 700; line-height: 1; }
.px-alt__price .px-est__mark { width: 20px; height: 20px; font-size: var(--fs-xs); }
.px-price.is-link, .px-alt__price.is-link { font-size: var(--fs-sm); color: var(--rust-text); }
.px-note { margin: 0; font-size: var(--fs-xs); color: var(--ink-muted); }
.px-label { margin: 0 0 .4rem; font-size: var(--fs-xs); font-weight: 700; }
.px-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.px-chip { padding: .2rem .75rem; border-radius: var(--r-pill); background: var(--rust-tint); color: var(--rust-text); font-size: var(--fs-xs); font-weight: 600; line-height: 1.45; }
.px-chip--when { background: var(--cream-2); color: var(--ink); }
.px-explain { display: grid; gap: .35rem; margin-top: .7rem; font-size: var(--fs-xs); line-height: 1.5; color: var(--ink); }
.px-explain p { margin: 0; }
.px-explain__quote { font-style: italic; }
.px-explain__src, .px-explain__use { color: var(--ink-soft); }
.px-explain__safe { color: var(--rust-text); }
.px-foot { margin-top: auto; display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; align-items: center; padding-top: .4rem; border-top: 1px solid var(--line); }
.px-foot .bm-btn { flex: 1 1 auto; }
/* Birmarket, the partner store: its link is a main button in its own pink
   (#EA207E deepened to #D81B72 so white text passes 4.5:1), its logo as the icon. */
.bm-btn {
  min-height: 48px; padding: .6rem 1.25rem .6rem .75rem; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  background: #D81B72; color: #fff; font-size: var(--fs-sm); font-weight: 700; text-decoration: none; white-space: nowrap;
  box-shadow: 0 10px 22px -12px rgba(216, 27, 114, .7);
  transition: background-color .3s var(--ease), box-shadow .3s var(--ease), transform .3s var(--spring);
}
.bm-btn:hover { background: #C0155F; color: #fff; }
.bm-btn:focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; }
.bm-btn__logo { flex: none; width: 22px; height: 22px; border-radius: 6px; }
.bm-btn--small { min-height: 42px; padding: .45rem 1rem .45rem .55rem; font-size: var(--fs-xs); box-shadow: none; }
.bm-btn--small .bm-btn__logo { width: 20px; height: 20px; }
.px-alt > .px-chips, .px-alt > .bm-btn { grid-column: 1 / -1; }
.px-chips--small .px-chip { font-size: var(--fs-2xs); }
.px-side { min-width: 0; }
.px-alts { display: flex; gap: .75rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .4rem; margin-right: calc(-1 * var(--gutter)); padding-right: var(--gutter); scrollbar-width: none; }
.px-alts::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { .px-alts { flex-direction: column; overflow: visible; margin-right: 0; padding-right: 0; } }
.px-alt { flex: 0 0 min(84%, 320px); scroll-snap-align: start; background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: .75rem; display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: .75rem; align-items: start; }
@media (min-width: 900px) { .px-alt { flex: none; } }
.px-alt__img { position: relative; width: 84px; height: 84px; border-radius: 10px; background: var(--cream-2); overflow: hidden; }
.px-alt__body { min-width: 0; display: grid; gap: .2rem; }
.px-instead { justify-self: start; padding: .1rem .6rem; border-radius: var(--r-pill); background: var(--rose-tint); color: #7E3D48; font-size: var(--fs-2xs); font-weight: 700; line-height: 1.5; }
.px-instead-row { display: flex; flex-wrap: wrap; gap: .3rem; }
.px-alt__caution { margin: 0; font-size: var(--fs-2xs); line-height: 1.4; color: var(--ink-soft); }
.px-alt__name { margin: 0; font-size: var(--fs-sm); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.px-alt__price { margin: 0; font-size: var(--fs-sm); font-weight: 700; font-variant-numeric: tabular-nums; }
.px-oos { display: flex; gap: .9rem; align-items: center; padding: .75rem .9rem; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--cream-2); }
.px-oos__img { position: relative; flex: none; width: 56px; height: 56px; border-radius: 10px; background: var(--cream-3); overflow: hidden; filter: grayscale(1); opacity: .55; }
.px-oos p { margin: 0; font-size: var(--fs-xs); }
.px-oos__title { font-weight: 700; }
.px-oos__name { color: var(--ink-muted); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.px-none { margin-top: 1.1rem; padding: clamp(1.25rem, 1rem + 1.5vw, 2rem); border-radius: var(--r-lg); border: 1.5px dashed var(--line-strong); background: var(--cream-2); }
.px-none h3 { margin: 0; font-size: var(--fs-h4); }
.px-none p { margin: .4rem 0 .6rem; font-size: var(--fs-sm); color: var(--ink-soft); max-width: 56ch; }
.px-none ul { margin: 0; padding-left: 1.1em; display: grid; gap: .4rem; font-size: var(--fs-sm); }
.px-together { margin-top: clamp(3rem, 2rem + 4vw, 5.5rem); background: var(--rust-deep); color: var(--cream); border-radius: var(--r-lg); padding: clamp(1.25rem, 1rem + 2vw, 2.5rem); box-shadow: var(--shadow-lift); scroll-margin-top: 90px; }
.px-together h2 { color: var(--cream); margin: .15em 0 .3em; }
.px-together .px-together__eyebrow { margin: 0; font-size: var(--fs-xs); font-weight: 600; letter-spacing: .02em; color: #E6D9CE; }
.px-together .px-together__lead { margin: 0; max-width: 60ch; color: #E6D9CE; }
.px-together__cols { margin-top: 1.4rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: .9rem; }
.px-col { padding: 1rem; border-radius: 14px; background: rgba(248, 246, 242, .08); }
.px-col h3 { margin: 0 0 .6rem; font-size: var(--fs-h4); color: var(--cream); }
.px-col ol { margin: 0; padding: 0; list-style: none; display: grid; gap: .6rem; }
.px-col li { display: grid; grid-template-columns: 28px 40px minmax(0, 1fr); gap: .6rem; align-items: center; }
.px-col__n { width: 28px; height: 28px; border-radius: var(--r-pill); background: rgba(248, 246, 242, .14); display: grid; place-items: center; font-size: var(--fs-xs); font-weight: 700; }
.px-col__img { position: relative; width: 40px; height: 40px; border-radius: 10px; background: var(--cream-2); overflow: hidden; }
.px-col__img img { position: absolute; inset: 8%; width: 84%; height: 84%; object-fit: contain; mix-blend-mode: multiply; }
.px-col li.is-hidden .px-col__img img { filter: blur(3px) saturate(.7); }
.px-col__txt { min-width: 0; display: grid; gap: 5px; }
.px-col__name { font-size: var(--fs-sm); font-weight: 600; line-height: 1.3; }
.px-col__bar { display: block; height: 10px; border-radius: var(--r-pill); background: rgba(248, 246, 242, .28); filter: blur(1.5px); }
.px-col__bar.is-short { width: 48%; height: 8px; background: rgba(248, 246, 242, .16); }
.px-locked { margin: 1.1rem 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; }
.px-locked li { padding: .35rem .75rem; border-radius: var(--r-pill); border: 1px solid rgba(248, 246, 242, .3); font-size: var(--fs-xs); font-weight: 600; }
.px-locked li { display: inline-flex; align-items: center; gap: .45rem; }
/* A drawn padlock, in the chip's own colour. */
.px-locked li::before {
  content: ""; flex: none; width: 12px; height: 14px; background: currentColor; opacity: .85;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 14' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M3.2 6.2V4.3a2.8 2.8 0 0 1 5.6 0v1.9'/%3E%3Crect x='1.3' y='6.2' width='9.4' height='6.9' rx='2' fill='%23000' stroke='none'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 14' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M3.2 6.2V4.3a2.8 2.8 0 0 1 5.6 0v1.9'/%3E%3Crect x='1.3' y='6.2' width='9.4' height='6.9' rx='2' fill='%23000' stroke='none'/%3E%3C/svg%3E") center / contain no-repeat;
}
.px-together__act { margin-top: 1.4rem; display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.px-together__act p { margin: 0; font-size: var(--fs-xs); color: #E6D9CE; }
.px-together .px-together__btn { background: var(--cream); color: var(--rust-deep); font-weight: 700; }
.px-together .px-together__btn:hover { background: var(--white); }
.px-footrow { margin-top: 1.75rem; display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: center; justify-content: space-between; }
.px-footrow p { margin: 0; font-size: var(--fs-xs); color: var(--ink-muted); }

/* Routine is being created */
.proto-header.is-home .progress { display: none; }
/* One window, no scrolling: the button waits in the fixed bar (.is-quiz),
   quiet until the routine is ready; Skip goes once it is. */
.cr-wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(1.5rem, 1rem + 3vw, 3.5rem); align-items: start; }
#crSee { margin-left: auto; transition: background-color .5s var(--ease), box-shadow .5s var(--ease); }
#panel-creating:not(.is-done) #crSee { background: #EBDDD3; color: #6B4A3A; box-shadow: none; }
#crSkip[hidden] { display: none; }
/* The results opened from the dashboard: one way back, on the right. */
#rxBack[hidden] { display: none; }
#rxContinue { margin-left: auto; }
.cr-left { min-width: 0; display: grid; gap: clamp(.8rem, 2.2vh, 1.3rem); align-content: start; }
.cr-head { display: flex; align-items: center; gap: 1.1rem; }
.cr-head > div { min-width: 0; }
.cr-left h1 { margin: .15em 0 0; font-size: var(--fs-h2); line-height: 1.1; }
.cr-head .eyebrow { margin-bottom: 0; }
.cr-ring { position: relative; flex: none; width: 104px; height: 104px; display: grid; place-items: center; }
.cr-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.cr-ring__track, .cr-ring__fill { fill: none; stroke-width: 3; }
.cr-ring__track { stroke: var(--cream-3); }
.cr-ring__fill { stroke: var(--rust); stroke-linecap: round; stroke-dasharray: 377; stroke-dashoffset: 377; transition: stroke-dashoffset 1.2s var(--ease); }
.cr-halo { position: absolute; inset: 18px; border-radius: 50%; background: radial-gradient(circle, rgba(212, 148, 158, .35), rgba(212, 148, 158, 0) 70%); }
.cr-logo { width: 64px; height: 64px; }
@media (prefers-reduced-motion: no-preference) {
  .cr-halo { animation: cr-halo 3.2s var(--ease) infinite; }
  .cr-logo { animation: cr-breathe 3.2s cubic-bezier(.45, 0, .55, 1) infinite; }
  @keyframes cr-halo { 0% { transform: scale(.8); opacity: .55; } 100% { transform: scale(1.6); opacity: 0; } }
  @keyframes cr-breathe { 0%, 100% { transform: scale(.95); } 50% { transform: scale(1.04); } }
}
.cr-now { margin: 0; min-height: 1.65em; font-size: var(--fs-lead); color: var(--ink-soft); }
.cr-checks { margin: 0; padding: 0; list-style: none; display: grid; gap: clamp(.35rem, 1.2vh, .6rem); }
.cr-checks li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: .75rem; align-items: start; font-size: var(--fs-sm); opacity: .4; transition: opacity .9s var(--ease); }
.cr-checks li.is-done, .cr-checks li.is-now { opacity: 1; }
.cr-checks li.is-now { font-weight: 700; }
.cr-dot { position: relative; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--line-strong); background: transparent; transition: background-color .8s var(--spring), border-color .8s; }
.cr-checks li.is-now .cr-dot { border-color: var(--rust); }
.cr-checks li.is-done .cr-dot { border-color: var(--rust); background: var(--rust); }
.cr-checks li.is-done .cr-dot::after { content: ""; position: absolute; left: 6.5px; top: 6.5px; width: 9px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg); }
.cr-cols { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.cr-col { padding: .9rem; border-radius: var(--r-lg); border: 1px solid var(--line); box-shadow: var(--shadow-soft); display: grid; gap: .55rem; align-content: start; }
.cr-col--morning { background: #FFFBF7; }
.cr-col--evening { background: #FBF4F4; }
.cr-col__head { display: flex; align-items: center; gap: .75rem; }
.cr-col__name { display: block; font-family: var(--serif); font-size: var(--fs-h4); line-height: 1.2; }
.cr-col__time { display: block; font-size: var(--fs-xs); color: var(--ink-muted); }
.cr-sun { position: relative; flex: none; width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--rust-deep); }
.cr-sun--morning { background: radial-gradient(circle at 40% 40%, #FFFBF7, #F2E4DB 55%, #E9B79A); box-shadow: 0 0 0 6px rgba(233, 183, 154, .25); }
.cr-sun--evening { background: #F3DCDF; overflow: hidden; }
.cr-sun--evening::after { content: ""; position: absolute; width: 36px; height: 36px; border-radius: 50%; background: #F6EBEC; border: 1.5px solid var(--rust-deep); left: 13px; top: -8px; }
.cr-item { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: .75rem; align-items: center; padding: .45rem; border-radius: 14px; background: rgba(255, 255, 255, .7); opacity: 0; filter: blur(10px); transform: translateY(16px) scale(.97); transition: opacity 1.8s var(--ease), filter 2.2s var(--ease), transform 1.8s var(--ease); }
.cr-item.is-on { opacity: 1; filter: none; transform: none; }
.cr-item__img { position: relative; flex: none; width: 52px; height: 52px; border-radius: 12px; background: var(--cream-2); overflow: hidden; }
.cr-item__img img { position: absolute; inset: 6%; width: 88%; height: 88%; object-fit: contain; mix-blend-mode: multiply; }
.cr-item__step { display: block; font-size: var(--fs-2xs); font-weight: 700; color: var(--rust-text); }
.cr-item__how { display: block; font-size: var(--fs-xs); line-height: 1.35; color: var(--ink-soft); }
@media (prefers-reduced-motion: reduce) { .cr-item { transition: none; } }
/* Centred in the room between the header and the bar, so no empty band is
   left at the bottom. The same sums as the padding .is-quiz gives the page. */
@media (min-width: 701px) {
  .cr-wrap { min-height: calc(100dvh - var(--header-h, 70px) - 5.4rem - clamp(1rem, 3.5vh, 2.2rem) - 2px); align-items: center; align-content: center; }
}
@media (max-width: 700px) {
  .cr-wrap { min-height: calc(100dvh - var(--header-h, 52px) - 5.1rem - .7rem - env(safe-area-inset-bottom) - 2px); align-content: center; }
}
/* A short desktop window: the how lines go, the steps stay. */
@media (min-width: 701px) and (max-height: 800px) {
  .cr-item__how { display: none; }
  .cr-ring { width: 88px; height: 88px; }
}
/* A phone: the title beside a smaller ring, then the checklist, then the two
   halves as rows of product photos that fade in slowly under it. */
@media (max-width: 700px) {
  .cr-wrap { grid-template-columns: minmax(0, 1fr); gap: clamp(.8rem, 2.5dvh, 1.4rem); }
  .cr-head { gap: .85rem; }
  .cr-ring { width: 68px; height: 68px; }
  .cr-halo { inset: 10px; }
  .cr-ring .cr-logo { width: 44px; height: 44px; }
  .cr-left h1 { font-size: var(--fs-h3); }
  .cr-now { font-size: var(--fs-sm); line-height: 1.4; min-height: 1.4em; }
  .cr-checks li { font-size: var(--fs-xs); line-height: 1.35; grid-template-columns: 20px minmax(0, 1fr); gap: .6rem; }
  .cr-dot { width: 20px; height: 20px; }
  .cr-checks li.is-done .cr-dot::after { left: 5px; top: 5px; width: 7px; height: 4px; }
  .cr-cols { grid-template-columns: minmax(0, 1fr); gap: .5rem; }
  .cr-col { display: flex; align-items: center; gap: .45rem; padding: .4rem .6rem; box-shadow: none; }
  .cr-col__head { flex: 0 0 5.6rem; gap: .5rem; }
  .cr-col__name { font-size: var(--fs-sm); }
  .cr-col__time { display: none; }
  .cr-sun { width: 26px; height: 26px; }
  .cr-sun--morning { box-shadow: 0 0 0 4px rgba(233, 183, 154, .25); }
  .cr-sun--evening::after { width: 24px; height: 24px; left: 9px; top: -6px; }
  .cr-item { display: block; padding: 0; background: none; }
  .cr-item > span:last-child { display: none; }
  .cr-item__img { display: block; width: 44px; height: 44px; background: #fff; }
}

/* The petal relay (assets/sakra-loader.webp, made by scripts/build-logo-loader.py)
   wherever someone is genuinely waiting. Under reduced motion each place shows
   the still logo instead. */
/* Routine is being created: the relay replaces the breathing logo. */
.cr-logo.is-relay { width: 64px; height: 64px; animation: none; }
/* Preparing a photo: a small relay beside "Preparing your photo…". */
#scanFileStatus.is-busy::before {
  content: ""; display: inline-block; width: 28px; height: 28px; margin-right: .45rem; vertical-align: -9px;
  background: url("assets/sakra-loader.webp") center / contain no-repeat;
}
/* The guided camera: in the middle of the frame until the camera is live. */
.cam-waking { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; transform: translate(-50%, -50%); z-index: 2; pointer-events: none; }
.cam-waking[hidden] { display: none; }
/* Ready for buttons that wait on a server (payments, uploads): add .is-busy. */
.btn.is-busy { pointer-events: none; }
.btn.is-busy::before { content: ""; width: 22px; height: 22px; background: url("assets/sakra-loader.webp") center / contain no-repeat; }
@media (prefers-reduced-motion: reduce) {
  #scanFileStatus.is-busy::before, .btn.is-busy::before { background-image: url("assets/sakra-logo.png"); }
}

/* Changing plan (from the dashboard): rows rather than the plans page's big
   cards. The plan you are on is marked and not selectable. */
.cp h1 { margin: .15em 0 .3em; }
.cp > div > .eyebrow { margin-bottom: 0; }
.cp-list { margin-top: 1.5rem; display: grid; gap: .75rem; }
.cp-opt {
  position: relative; display: grid; gap: .35rem; width: 100%; text-align: left;
  padding: 1rem 1.1rem; border-radius: var(--r-lg); border: 1.5px solid var(--line); background: var(--white); color: var(--ink);
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease), transform .3s var(--spring);
}
button.cp-opt { cursor: pointer; }
@media (hover: hover) { button.cp-opt:hover { border-color: var(--line-strong); box-shadow: var(--shadow-soft); } }
.cp-opt.is-picked { border-color: var(--rust); box-shadow: 0 0 0 3px var(--rust-tint), var(--shadow-soft); }
.cp-opt.is-now { background: var(--cream-2); border-style: dashed; }
.cp-opt.is-now > * { opacity: .75; }
.cp-opt__head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.cp-opt__name { font-family: var(--serif); font-size: var(--fs-h4); line-height: 1.2; }
.cp-opt__now { padding: .15rem .6rem; border-radius: var(--r-pill); background: var(--white); border: 1px solid var(--line); font-size: var(--fs-2xs); font-weight: 700; color: var(--ink-soft); }
.cp-opt__dot { position: relative; flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-strong); background: var(--white); }
.cp-opt.is-picked .cp-opt__dot { border-color: var(--rust); }
.cp-opt.is-picked .cp-opt__dot::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--rust); }
.cp-opt__for { font-size: var(--fs-sm); color: var(--ink-soft); }
.cp-opt__price { font-size: var(--fs-sm); color: var(--ink-soft); }
.cp-opt__price strong { font-size: var(--fs-h4); color: var(--ink); font-variant-numeric: tabular-nums; }
.cp-opt__diff { margin-left: .6rem; font-size: var(--fs-xs); font-weight: 700; color: var(--rust-text); }
.cp-opt__feats { display: flex; flex-wrap: wrap; gap: .3rem .5rem; }
.cp-opt__feats span { padding: .15rem .55rem; border-radius: var(--r-pill); background: var(--cream); font-size: var(--fs-2xs); color: var(--ink-soft); }
.cp-note { margin: 1.1rem 0 .3rem; min-height: 1.5em; font-size: var(--fs-sm); font-weight: 600; }
#cpConfirm.is-waiting { background: #EBDDD3; color: #6B4A3A; box-shadow: none; }

/* The details step fits a phone without scrolling: no drawing, a shorter
   intro, the fields closer together. */
@media (max-width: 700px) {
  #panel-details .details-split__art { display: none; }
  #panel-details h1 { font-size: var(--fs-h2); }
  #panel-details .step-intro { margin-top: .5rem; font-size: var(--fs-sm); line-height: 1.5; }
  #panel-details .form { margin-top: 1rem; gap: .7rem; }
  #panel-details .field { gap: .3rem; }
  #panel-details .field__err:empty { min-height: 0; margin: 0; }
  #panel-details .check span { font-size: var(--fs-xs); line-height: 1.45; }
}
@media (max-width: 700px) and (max-height: 700px) {
  #panel-details > .eyebrow { display: none; }
  #panel-details h1 { font-size: var(--fs-h3); }
  #panel-details .form { margin-top: .75rem; gap: .55rem; }
  #panel-details .field input { min-height: 44px; padding-block: .45rem; }
}


/* Dashboard, the week as days: a strip of seven, then that day's morning
   and evening. A dot marks the serum days. */

/* Paid: the journey's last step. A tick draws itself in a ring while the
   progress bar above stands full, then the routine is built (app.js). */
.paid { text-align: center; padding: clamp(2rem, 8vh, 5rem) 0 2rem; }
.paid.is-active { display: grid; justify-items: center; }
.paid__mark { width: 104px; height: 104px; margin-bottom: 1.2rem; border-radius: 50%; background: var(--rust-tint); display: grid; place-items: center; }
.paid__mark svg { width: 84px; height: 84px; }
.paid__ring { fill: none; stroke: var(--rust); stroke-width: 3; stroke-dasharray: 264; stroke-dashoffset: 264; transform: rotate(-90deg); transform-origin: 50% 50%; }
.paid__tick { fill: none; stroke: var(--rust); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; }
.paid.is-active .paid__ring { animation: paid-draw .8s var(--ease) .1s forwards; }
.paid.is-active .paid__tick { animation: paid-draw .5s var(--ease) .75s forwards; }
@keyframes paid-draw { to { stroke-dashoffset: 0; } }
.paid h1 { margin: 0; max-width: 20ch; }
.paid .step-intro { max-width: 44ch; margin-left: auto; margin-right: auto; }
@media (prefers-reduced-motion: reduce) {
  .paid__ring, .paid__tick { stroke-dashoffset: 0; animation: none !important; }
}

/* The two ways to add a photo: centred, the same height, each ending in a
   real button; "Recommended" and "Just as good" are badges on the drawing. */
.scan-card { position: relative; }
.scan-card__badge { position: absolute; top: .85rem; right: .85rem; z-index: 1; padding: .15rem .6rem; border-radius: var(--r-pill); background: var(--white); border: 1px solid var(--line); font-size: var(--fs-2xs); font-weight: 700; color: var(--rust-text); }
.scan-card__cta { margin-top: auto; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .5rem 1.2rem; border-radius: 11px; border: 1.5px solid var(--line-strong); background: var(--white); color: var(--rust-deep); font-size: var(--fs-sm); font-weight: 700; transition: background-color .3s var(--ease), border-color .3s var(--ease); }
.scan-card__cta.is-primary { background: var(--rust); border-color: var(--rust); color: #fff; }
.scan-card:hover .scan-card__cta { border-color: var(--rust); }
.scan-card:hover .scan-card__cta.is-primary { background: var(--rust-deep); border-color: var(--rust-deep); }
@media (min-width: 701px) {
  .scan-choice { align-items: stretch; }
  .scan-card { align-items: center; text-align: center; }
  .scan-card__art { align-self: stretch; }
  .scan-card__desc { max-width: 34ch; }
  .scan-card__cta { align-self: center; min-width: 12rem; margin-top: auto; }
}
@media (min-width: 701px) and (max-height: 820px) {
  #panel-capture .scan-choice { margin-top: .8rem; }
  #panel-capture .scan-card { gap: .2rem; padding-block: .8rem; }
  #panel-capture .scan-card__art { height: clamp(56px, 9dvh, 96px); }
  #panel-capture .scan-card__art svg { height: clamp(50px, calc(9dvh - 8px), 88px); }
  #panel-capture .scan-card__cta { min-height: 38px; padding-block: .3rem; margin-top: .35rem; }
}
@media (max-width: 700px) {
  /* A phone: the badge is a small label above the title, not over it. */
  .scan-card__badge { position: static; grid-column: 2; justify-self: start; padding: 0; border: 0; background: none; line-height: 1.2; }
  .scan-card__cta { grid-column: 2; justify-self: start; min-height: 34px; padding: .3rem .9rem; font-size: var(--fs-xs); margin-top: .2rem; }
}
@media (max-width: 700px) and (max-height: 700px) {
  #panel-capture .scan-card { padding: .55rem .8rem; row-gap: .1rem; }
  #panel-capture .scan-card__cta { min-height: 32px; margin-top: .15rem; }
  #panel-capture .scan-choice { gap: .5rem; }
}

/* Map cards, what makes them worth reading: "you mentioned this" beside the
   status, at-a-glance rows on the first card, and the product chosen for
   the concern at the foot of its card. Each stays one quiet line. */
.rx-flag { padding: .1rem .55rem; border-radius: var(--r-pill); background: var(--rose-tint); color: #7E3D48; font-size: var(--fs-2xs); font-weight: 700; white-space: nowrap; }
.rx-take { list-style: none; margin: .75rem 0 0; padding: 0; display: grid; gap: .4rem; }
.rx-take__row { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: baseline; gap: .6rem; padding: .55rem .75rem; border-radius: 12px; background: var(--cream); color: var(--ink); text-align: left; transition: background-color .25s var(--ease); }
.rx-take__row:hover { background: var(--cream-2); }
.rx-take__label { font-size: var(--fs-2xs); font-weight: 700; color: var(--rust-text); white-space: nowrap; }
.rx-take__name { font-size: var(--fs-sm); font-weight: 600; min-width: 0; line-height: 1.25; }   /* wraps rather than cut: "Məsamə görünüşü" at 360 px */
.rx-take__value { font-size: var(--fs-sm); color: var(--ink-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rx-fix { margin-top: .7rem; width: 100%; display: flex; align-items: center; gap: .65rem; padding: .45rem .6rem .45rem .45rem; border-radius: 12px; border: 1px solid var(--line); background: var(--white); color: var(--ink); text-align: left; transition: border-color .25s var(--ease), background-color .25s var(--ease); }
.rx-fix:hover { border-color: var(--rust); }
.rx-fix__img { position: relative; flex: none; width: 36px; height: 36px; border-radius: 9px; background: var(--cream-2); overflow: hidden; }
.rx-fix__img img { position: absolute; inset: 6%; width: 88%; height: 88%; object-fit: contain; mix-blend-mode: multiply; }
.rx-fix__txt { flex: 1; min-width: 0; display: grid; }
.rx-fix__label { font-size: var(--fs-2xs); font-weight: 700; color: var(--rust-text); }
.rx-fix__name { font-size: var(--fs-xs); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rx-fix__go { flex: none; width: 8px; height: 8px; margin-right: .3rem; border-right: 2px solid var(--rust); border-top: 2px solid var(--rust); transform: rotate(45deg); }
.rx-card.is-tight .rx-fix { margin-top: .45rem; padding-block: .3rem; }
.rx-card.is-tight .rx-fix__img { width: 30px; height: 30px; }
.rx-card.is-tight .rx-take { margin-top: .45rem; gap: .25rem; }
.rx-card.is-tight .rx-take__row { padding: .4rem .6rem; }

/* Breathers give something back: a few facts from the answers so far. */
.breather__insight { margin: 1rem auto 0; padding: .85rem 1rem; max-width: 22rem; width: 100%; border-radius: var(--r-md); background: var(--cream-2); text-align: left; display: grid; gap: .55rem; }
.breather__insight[hidden] { display: none; }
.breather__insight-head { margin: 0; font-size: var(--fs-2xs); font-weight: 700; color: var(--rust-text); letter-spacing: .02em; }
.breather__fact { display: grid; gap: 1px; opacity: 0; transform: translateY(6px); animation: breather-fact .5s var(--ease) forwards; animation-delay: calc(.35s + var(--i, 0) * .35s); }
.breather__fact dt { font-size: var(--fs-xs); color: var(--ink-muted); }
.breather__fact dd { margin: 0; font-family: var(--serif); font-size: var(--fs-h4); line-height: 1.25; color: var(--rust-deep); }
@keyframes breather-fact { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .breather__fact { opacity: 1; transform: none; animation: none; } }

/* Dashboard from day 2: the week's dots (done, half, missed, today), the one
   thing worth saying today, and the test-only preview bar. */

/* ?emailpreview: the two emails for people who do not pay, for review. */
.em-preview { width: min(680px, calc(100vw - 1.5rem)); height: min(88dvh, 900px); padding: 0; border: 0; border-radius: 20px; background: var(--cream); box-shadow: var(--shadow-lift); display: none; flex-direction: column; }
.em-preview[open] { display: flex; }
.em-preview::backdrop { background: rgba(72, 50, 38, .45); }
.em-preview__head { display: flex; align-items: center; justify-content: space-between; padding: .7rem .8rem; border-bottom: 1px solid var(--line); }
.em-preview__tabs { display: flex; gap: .35rem; }
.em-preview__tab { padding: .35rem .8rem; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--white); font-size: var(--fs-xs); font-weight: 700; color: var(--ink-soft); }
.em-preview__tab[aria-pressed="true"] { background: var(--rust-deep); border-color: var(--rust-deep); color: var(--cream); }
.em-preview__close { width: 36px; height: 36px; border-radius: 50%; font-size: 1.4rem; color: var(--ink-soft); }
.em-preview__subject { margin: 0; padding: .5rem .9rem; font-size: var(--fs-sm); font-weight: 700; }
.em-preview__frame { flex: 1; width: 100%; border: 0; background: var(--cream); }

/* Email consent step (Sept 2026): the drawing, the question, one tick box.
   Skip waits two seconds, then fades in pale; a ticked box moves on. */
.emails { display: grid; justify-items: center; text-align: center; max-width: 34rem; margin-inline: auto; padding-top: clamp(.5rem, 4dvh, 2.5rem); }
.emails__art { width: clamp(96px, 20dvh, 160px); margin: 0 0 .4rem; }
.emails .step-intro { font-size: var(--fs-body); }
.emails .options--consent { margin-top: 1.3rem; width: 100%; text-align: left; }
.emails__note { margin-top: .9rem; font-size: var(--fs-xs); color: var(--ink-muted); }
.emails__note a { color: var(--rust-text); font-weight: 600; text-underline-offset: 3px; }
.emails__skip { visibility: hidden; opacity: 0; transition: opacity .6s var(--ease), visibility 0s linear .6s; }
.emails__skip.is-shown { visibility: visible; opacity: .45; transition: opacity .6s var(--ease); }
.emails__skip.is-shown:hover { opacity: .7; }
.emails__skip.is-shown:focus-visible, .emails__skip.btn--primary.is-shown { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .emails__skip, .emails__skip.is-shown { transition: none; } }
.field__legal { margin-top: .35rem; padding-left: 1.9rem; font-size: var(--fs-xs); }
.field__legal a { color: var(--rust-text); font-weight: 600; text-underline-offset: 3px; display: inline-block; min-height: 24px; line-height: 24px; }

/* Waiting on the server after the payment page: the ring turns until it answers. */
.confirming__ring { fill: none; stroke: var(--rust); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 66 198; transform-origin: 50% 50%; animation: confirm-spin 1.1s linear infinite; }
@keyframes confirm-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .confirming__ring { animation-duration: 3s; } }
.confirming__actions { justify-content: center; margin-top: 1.4rem; }
.lead__err:empty, #payErr:empty { display: none; }

/* Cancelling a plan: one step to confirm, inside the plan card. */
/* The scan intro's leftover height on tall phones (fitScan in app.js), split
   between the gaps above the tutorial and above the reminders. */
@media (max-width: 700px) {
  #panel-scan .scan-intro { margin-top: calc(1rem + var(--scan-spare, 0px) / 2); }
  #panel-scan .scan-checks { margin-top: calc(.8rem + var(--scan-spare, 0px) / 2); }
}
.check__link { color: var(--rust-text); font-weight: 600; text-underline-offset: 3px; }
@media (min-width: 701px) and (max-height: 820px) { .emails__art { width: clamp(80px, 13dvh, 120px); } .emails { padding-top: .5rem; } }
/* Short screens: the consent small print one size down, so the details form
   (with its privacy link) still fits above the bar in Russian. */
@media (max-height: 820px) { #panel-details .check > span { font-size: var(--fs-xs); line-height: 1.4; } }
@media (max-width: 700px) and (max-height: 740px) { .emails__art { width: clamp(64px, 12dvh, 96px); margin-bottom: .2rem; } .emails { padding-top: 0; } .emails .step-intro { font-size: var(--fs-sm); } .emails .options--consent { margin-top: 1rem; } }

/* Moisture: a labelled scale, drier (warm) to more moisture (cool), with its
   sentence under it. YouCam's map colours, read as their assistant suggested. */
.rx-legend li.rx-legend__scale { display: grid; gap: .35rem; align-items: start; }
.rx-scale { display: flex; align-items: center; gap: .4rem; min-width: 0; max-width: 100%; font-size: var(--fs-2xs); font-weight: 700; color: var(--ink-soft); letter-spacing: .02em; }
.rx-scale__bar { flex: 1 1 auto; min-width: 24px; max-width: 180px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #E2483C, #EE86A4, #F59A38, #E8C24A, #46C06A, #3FA6DE, #4F74E0); }
.rx-scale__end { white-space: nowrap; }

/* --- The dashboard (the paid home) ---------------------------------------
   The design handoff's dashboard draws itself in a shadow root
   (widgets/src/dashboard), so none of the rules above reach it. While it is
   open (html.dash-on, set by show()) the page is the dashboard's: the quiz's
   header, footer and padding step aside, and the page takes the design's own
   background and view transitions (what its stylesheet put on html and body). */
html.dash-on { scroll-padding-top: 24px; scroll-behavior: auto; }
html.dash-on body { background: radial-gradient(55% 45% at 92% 0%, #F6EBEC 0, rgba(246,235,236,0) 70%) fixed, radial-gradient(45% 40% at 0% 100%, #F2E4DB 0, rgba(242,228,219,0) 70%) fixed, #F8F6F2; }
html.dash-on .skip-link, html.dash-on .proto-header, html.dash-on .proto-foot, html.dash-on .page-rail { display: none; }
html.dash-on .proto-main { padding: 0 !important; }   /* over the phone rules that start each step .7rem down */
html.dash-on .proto-main > .wrap { max-width: none; padding: 0; }
html.dash-on #panel-dashboard { animation: none; }
#dashboardRoot { display: block; }
@keyframes sdb-vt-out { to { opacity: 0; transform: translateX(calc(var(--vt-d, 1) * -8px)); } }
@keyframes sdb-vt-in { from { opacity: 0; transform: translateX(calc(var(--vt-d, 1) * 8px)); } }
@keyframes sdb-blur-out { to { opacity: 0; filter: blur(6px); transform: scale(.995); } }
@keyframes sdb-blur-in { from { opacity: 0; filter: blur(8px); transform: scale(1.005); } }
@keyframes sdb-fade { from { opacity: 0; } }
html.dash-on[data-vt-dir="back"] { --vt-d: -1; }
html.dash-on::view-transition { pointer-events: none; }
html.dash-on::view-transition-group(root),
html.dash-on::view-transition-group(dock), html.dash-on::view-transition-new(dock),
html.dash-on::view-transition-group(site-rail), html.dash-on::view-transition-new(site-rail) { animation: none; }
html.dash-on::view-transition-old(dock), html.dash-on::view-transition-old(site-rail) { display: none; }
html.dash-on::view-transition-old(root), html.dash-on::view-transition-new(root) { animation-duration: .25s; }
html.dash-on::view-transition-old(dash-view) { animation: sdb-vt-out .22s cubic-bezier(.22,.61,.36,1) both; }
html.dash-on::view-transition-new(dash-view) { animation: sdb-vt-in .42s cubic-bezier(.22,.61,.36,1) both; }
html.dash-on[data-vt-mode="blur"]::view-transition-old(dash-view) { animation: sdb-blur-out .2s cubic-bezier(.22,.61,.36,1) both; }
html.dash-on[data-vt-mode="blur"]::view-transition-new(dash-view) { animation: sdb-blur-in .4s cubic-bezier(.22,.61,.36,1) .05s both; }
@media (prefers-reduced-motion: reduce) {
  html.dash-on::view-transition-old(dash-view), html.dash-on::view-transition-new(dash-view) { animation: sdb-fade .2s linear both; }
}

/* Public advisor chatbot (initAdvisorChat in app.js). Panel and scrim are moved to body. */
.advisor { position: relative; }
.advisor__fab {
  position: fixed; z-index: 260;
  right: max(1.75rem, calc(env(safe-area-inset-right) + 22px));
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: .65rem; max-width: calc(100vw - 2.5rem);
  padding: 5px 1rem 5px 5px; border-radius: var(--r-pill);
  border: 1px solid rgba(255,255,255,.85); background: rgba(255,253,251,.9);
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: var(--shadow-lift);
  color: var(--rust-deep); font: inherit; font-weight: 700; cursor: pointer;
  transform-origin: right center; transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
@media (min-width: 701px) {
  html[data-page="quiz.html"]:not(.dash-on):has(.step-panel.is-active:is(.is-quiz, #panel-results, #panel-products, #panel-plans, #panel-checkout, #panel-changeplan) .stepnav) .advisor__fab {
    bottom: max(6.35rem, calc(5.5rem + env(safe-area-inset-bottom)));
  }
}
@media (max-width: 700px) {
  html[data-page="quiz.html"]:not(.dash-on):has(.step-panel.is-active:not(#panel-plans) .stepnav) .advisor__fab {
    bottom: max(6.35rem, calc(5.5rem + env(safe-area-inset-bottom)));
  }
}
html.dash-on .advisor__fab {
  right: auto;
  left: max(1rem, env(safe-area-inset-left));
  bottom: max(5.6rem, calc(4.85rem + env(safe-area-inset-bottom)));
}
.advisor__fab:hover { transform: translateY(-2px); }
.advisor__fab:focus-visible { outline: 2px solid #A85A3A; outline-offset: 3px; }
.advisor__fab-face {
  position: relative; width: 44px; height: 44px; border-radius: var(--r-pill); background: var(--rust); color: #FFFDFB;
  display: grid; place-items: center; flex: none;
}
.advisor__fab-face svg { width: 20px; height: 20px; }
.advisor__fab-on {
  position: absolute; right: 1px; bottom: 1px; width: 11px; height: 11px; border-radius: var(--r-pill);
  background: #C4B5A8; border: 2px solid #FFFDFB;
}
.advisor__fab-on[data-status="ok"] { background: #7FA37A; }
.advisor__fab-on[data-status="down"] { background: #C0786A; }
.advisor__fab-label { font-size: var(--fs-sm); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.advisor.is-open .advisor__fab { display: none; }
.advisor__scrim {
  position: fixed; inset: 0; z-index: 258;
  background: rgba(72, 50, 38, .42); display: none;
}
html.advisor-open .advisor__scrim { display: block; }
.advisor__panel {
  position: fixed; z-index: 261;
  right: max(1.25rem, env(safe-area-inset-right));
  bottom: max(1.25rem, calc(env(safe-area-inset-bottom) + var(--advisor-kb, 0px)));
  width: min(28rem, calc(100vw - 2.5rem));
  height: min(34rem, calc(100svh - 2.5rem - env(safe-area-inset-bottom, 0px) - var(--advisor-kb, 0px)));
  max-height: calc(100svh - 2rem - env(safe-area-inset-bottom, 0px) - var(--advisor-kb, 0px));
  display: none; flex-direction: column; overflow: hidden;
  border-radius: 1.35rem; background: var(--cream); border: 1px solid var(--line);
  box-shadow: var(--shadow-lift);
  color: var(--ink);
}
html.advisor-open .advisor__panel { display: flex; }
.advisor__head {
  flex: none; display: flex; flex-direction: column; gap: .2rem;
  padding: .6rem .5rem .55rem .9rem; border-bottom: 1px solid var(--line); background: var(--cream);
}
.advisor__head-row { display: flex; align-items: center; gap: .65rem; min-width: 0; }
.advisor__mark {
  flex: none; width: 2.25rem; height: 2.25rem; border-radius: var(--r-pill); background: var(--rust); color: #FFFDFB;
  display: grid; place-items: center;
}
.advisor__mark svg { width: 18px; height: 18px; }
.advisor__title {
  margin: 0; min-width: 0; flex: 1 1 auto;
  font-family: var(--serif); font-weight: 400; font-size: 1.125rem; letter-spacing: -.01em;
  color: var(--rust-deep); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.advisor__sub {
  margin: 0 0 0 2.9rem; font-size: var(--fs-2xs); line-height: 1.35; color: var(--ink-soft);
}
.advisor__tools { flex: none; display: flex; align-items: center; gap: 2px; }
.advisor__new, .advisor__x {
  flex: none; width: 2.75rem; height: 2.75rem; padding: 0; border: 0; border-radius: var(--r-pill);
  background: transparent; color: var(--ink-soft); display: grid; place-items: center; cursor: pointer;
}
.advisor__new:hover, .advisor__x:hover { background: var(--cream-2); color: var(--rust-deep); }
.advisor__new:focus-visible, .advisor__x:focus-visible { outline: 2px solid #A85A3A; outline-offset: 3px; }
.advisor__thread {
  flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: .55rem;
  padding: 1rem 1.05rem .75rem;
  scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
}
ol.advisor__log {
  flex: none; width: 100%; max-width: 100%; box-sizing: border-box;
  margin: 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; gap: .7rem;
}
.advisor__msg {
  display: block; box-sizing: border-box; width: fit-content; max-width: calc(100% - 2.25rem); min-width: 0;
  margin: 0; padding: .7rem .9rem; border-radius: 1.05rem;
  font-size: var(--fs-sm); font-weight: 500; line-height: 1.45;
  white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word;
}
.advisor__msg a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.advisor__msg--bot {
  align-self: flex-start; margin-right: 2.25rem; background: var(--white); color: var(--ink);
  border: 1px solid var(--line); border-bottom-left-radius: .35rem;
}
.advisor__msg--me {
  align-self: flex-end; margin-left: auto; margin-right: 0; max-width: calc(100% - 2.75rem);
  background: var(--rust); color: #FFF9F4; border-bottom-right-radius: .35rem;
}
.advisor__typing {
  align-self: flex-start; display: inline-flex; align-items: center; gap: .5rem;
  width: fit-content; max-width: calc(100% - 2.25rem); margin: 0 2.25rem 0 0; padding: .55rem .8rem;
  border-radius: 1.05rem; border-bottom-left-radius: .35rem; background: var(--white);
  border: 1px solid var(--line); color: var(--ink-soft); font-size: var(--fs-xs); line-height: 1.3;
}
.advisor__typing-dots { display: inline-flex; gap: 4px; }
.advisor__typing-dots i {
  width: 6px; height: 6px; border-radius: var(--r-pill); background: var(--rust);
  animation: advisorPulse 1.2s ease-in-out infinite;
}
.advisor__typing-dots i:nth-child(2) { animation-delay: .2s; }
.advisor__typing-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes advisorPulse {
  0%, 80%, 100% { opacity: .3; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-2px); }
}
.advisor__dock {
  flex: none; display: grid; gap: .45rem;
  padding: .55rem .75rem .8rem; background: var(--cream);
  border-top: 1px solid var(--line);
}
.advisor__chips {
  flex: none; display: flex; flex-wrap: nowrap; gap: .4rem;
  margin: 0; padding: 0 1.25rem .15rem 0;
  overflow-x: auto; overscroll-behavior-x: contain;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.advisor__chips::-webkit-scrollbar { display: none; }
.advisor__chips[hidden] { display: none; }
.advisor__chip {
  flex: none; min-height: 36px; padding: .3rem .8rem; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: var(--white); color: var(--rust-deep);
  font: inherit; font-size: var(--fs-2xs); font-weight: 700; cursor: pointer;
  white-space: nowrap;
}
.advisor__chip:hover { border-color: var(--rust); }
.advisor__chip:focus-visible { outline: 2px solid #A85A3A; outline-offset: 3px; }
.advisor__signin { margin: 0; }
.advisor__signin[hidden] { display: none; }
.advisor__signin-btn {
  display: block; width: 100%; min-height: 36px; padding: 0; border: 0; background: none;
  font: inherit; font-size: var(--fs-2xs); font-weight: 700; color: var(--rust-text); cursor: pointer; text-align: left;
  position: relative;
}
.advisor__signin-btn::after {
  content: ""; position: absolute; inset: -4px 0; min-height: 44px;
}
.advisor__signin-btn:focus-visible { outline: 2px solid #A85A3A; outline-offset: 3px; }
.advisor__form {
  display: flex; align-items: center; gap: .35rem;
  margin: 0; padding: .28rem .28rem .28rem .9rem;
  background: var(--white); border: 1px solid var(--line); border-radius: 1.35rem;
}
.advisor__form textarea {
  flex: 1 1 auto; min-width: 0; width: 100%; min-height: 44px; max-height: 6rem; resize: none;
  padding: .55rem 0; background: transparent; border: 0; border-radius: 0;
  font: inherit; font-size: var(--fs-sm); line-height: 1.4; color: var(--ink);
}
.advisor__form textarea:focus { outline: none; box-shadow: none; }
.advisor__form:focus-within { border-color: var(--rust); box-shadow: 0 0 0 1px var(--rust); }
.advisor__form textarea::placeholder { color: var(--ink-muted); }
.advisor__send {
  flex: none; width: 2.75rem; height: 2.75rem; padding: 0; border: 0; border-radius: var(--r-pill);
  background: var(--rust); color: #FFF9F4; display: grid; place-items: center; cursor: pointer;
}
.advisor__send:hover { background: var(--rust-dark); }
.advisor__send:focus-visible { outline: 2px solid #A85A3A; outline-offset: 3px; }
.advisor__send[aria-busy="true"], .advisor__send:disabled { opacity: .55; pointer-events: none; }
html.advisor-open { overflow: hidden; }
html.cam-open .advisor,
html.cam-open .advisor__panel,
html.cam-open .advisor__scrim { display: none !important; }
@media (max-width: 640px) {
  .advisor__fab {
    right: max(1.15rem, calc(env(safe-area-inset-right) + 18px));
    bottom: max(.85rem, env(safe-area-inset-bottom));
  }
  html[data-page="quiz.html"]:not(.dash-on):has(.step-panel.is-active:not(#panel-plans) .stepnav) .advisor__fab {
    bottom: max(6.35rem, calc(5.5rem + env(safe-area-inset-bottom)));
  }
  html.dash-on .advisor__fab {
    left: max(.85rem, env(safe-area-inset-left)); right: auto;
    bottom: max(5.6rem, calc(4.85rem + env(safe-area-inset-bottom)));
  }
  .advisor__panel {
    left: max(.45rem, env(safe-area-inset-left));
    right: max(.45rem, env(safe-area-inset-right));
    top: max(.45rem, env(safe-area-inset-top));
    bottom: max(.45rem, calc(env(safe-area-inset-bottom) + var(--advisor-kb, 0px)));
    width: auto; height: auto; max-height: none;
    border-radius: 1.15rem;
  }
  .advisor__thread { padding: 1.2rem 1.2rem 1rem; }
  ol.advisor__log { width: 100%; }
  .advisor__msg, .advisor__typing {
    max-width: calc(100% - 2.75rem);
  }
  .advisor__msg--bot, .advisor__typing { margin-right: 2.75rem; }
  .advisor__msg--me { max-width: calc(100% - 3rem); margin-left: auto; }
  .advisor__chips {
    padding: 0 1.5rem .2rem 0;
    mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 1.15rem), transparent);
    -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 1.15rem), transparent);
  }
}
@media (prefers-reduced-motion: reduce) {
  .advisor__fab { transition: none; }
  .advisor__typing-dots i { animation: none; opacity: .8; }
}
html.dash-on .advisor,
html.dash-on .advisor__fab,
html.dash-on .advisor__panel,
html.dash-on .advisor__scrim { display: none !important; }
@media print { .advisor, .advisor__panel, .advisor__scrim { display: none !important; } }
