/* ==========================================================================
   DermaScan — website + customer portal design system
   --------------------------------------------------------------------------
   One stylesheet, no build step. Every colour, radius, shadow and type size
   is a token below; components only ever reference tokens.

   --brand / --accent are injected per request from the admin Theme
   Settings (see site::partials.theme) — everything else derives from them.
   ========================================================================== */

:root {
  /* Brand (overridden at runtime from Theme Settings) */
  --brand: #123D2E;
  --accent: #C1502C;

  /* Derived brand tones */
  --brand-ink: color-mix(in oklab, var(--brand) 82%, black);
  --brand-600: color-mix(in oklab, var(--brand) 88%, white);
  --brand-100: color-mix(in oklab, var(--brand) 10%, white);
  --brand-50: color-mix(in oklab, var(--brand) 5%, white);
  --accent-ink: color-mix(in oklab, var(--accent) 80%, black);
  --accent-100: color-mix(in oklab, var(--accent) 12%, white);
  --accent-50: color-mix(in oklab, var(--accent) 6%, white);

  /* Neutrals (from the app's light theme) */
  --bg: #FAFAF8;
  --surface: #FFFFFF;
  --surface-2: #F5F4EF;
  --linen: #F3EFE3;
  --ink: #1B2321;
  --ink-2: #4F5D59;
  --ink-3: #7C8783;
  --line: #E3E1D9;
  --line-2: #D4D1C6;
  --on-brand: #FFFFFF;

  /* Status */
  --success: #23794B;
  --success-bg: #E8F4EC;
  --warning: #9A6412;
  --warning-bg: #FBF1DD;
  --danger: #B63B28;
  --danger-bg: #FBE9E5;
  --info: #2D6698;
  --info-bg: #E7F0F8;

  /* Type */
  --font-display: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-xs: 0.78rem;
  --fs-sm: 0.875rem;
  --fs-md: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.3rem;
  --fs-2xl: clamp(1.45rem, 1.2rem + 0.9vw, 1.75rem);
  --fs-3xl: clamp(1.8rem, 1.4rem + 1.6vw, 2.4rem);
  --fs-4xl: clamp(2.2rem, 1.6rem + 2.6vw, 3.4rem);
  --fs-5xl: clamp(2.6rem, 1.8rem + 3.6vw, 4.2rem);

  /* Space (4px grid) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px;
  --s-6: 24px; --s-8: 32px; --s-10: 40px; --s-12: 48px; --s-16: 64px;
  --s-20: 80px; --s-24: 96px;
  --section-y: clamp(64px, 5vw + 40px, 120px);
  --gutter: clamp(16px, 4vw, 32px);
  --container: 1200px;

  /* Shape */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* Elevation */
  --shadow-xs: 0 1px 2px rgba(20, 32, 28, 0.05);
  --shadow-sm: 0 1px 2px rgba(20, 32, 28, 0.05), 0 2px 8px -2px rgba(20, 32, 28, 0.06);
  --shadow-md: 0 2px 4px rgba(20, 32, 28, 0.04), 0 12px 32px -12px rgba(18, 45, 36, 0.16);
  --shadow-lg: 0 4px 8px rgba(20, 32, 28, 0.04), 0 28px 64px -24px rgba(18, 45, 36, 0.24);
  --ring: 0 0 0 3px color-mix(in oklab, var(--brand) 22%, transparent);

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur-1: 140ms;
  --dur-2: 240ms;
  --dur-3: 420ms;

  --header-h: 72px;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  color: var(--ink);
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
  text-wrap: balance;
}
h1 { font-size: var(--fs-4xl); letter-spacing: -0.03em; }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-xl); letter-spacing: -0.01em; }
h4 { font-size: var(--fs-lg); letter-spacing: -0.005em; }
p { margin: 0; }
p + p { margin-top: var(--s-3); }
ul, ol { margin: 0; padding: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s-6) 0; }
::selection { background: var(--brand-100); color: var(--brand-ink); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

.icon { width: 1.25em; height: 1.25em; flex: none; }
.icon-sm { width: 1em; height: 1em; flex: none; }
.icon-lg { width: 1.6em; height: 1.6em; flex: none; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--s-4); top: -60px; z-index: 100;
  background: var(--brand); color: var(--on-brand); padding: var(--s-2) var(--s-4);
  border-radius: var(--r-sm); text-decoration: none; transition: top var(--dur-1);
}
.skip-link:focus { top: var(--s-4); }

/* --------------------------------------------------------------------------
   Layout primitives
   -------------------------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container-narrow { max-width: 820px; }
.container-tight { max-width: 640px; }
.section { padding-block: var(--section-y); }
.section-sm { padding-block: calc(var(--section-y) * 0.6); }
.section-linen { background: var(--linen); }
.section-surface { background: var(--surface); border-block: 1px solid var(--line); }
.section-brand { background: var(--brand); color: var(--on-brand); }
.section-brand h2, .section-brand h3 { color: var(--on-brand); }

.stack > * + * { margin-top: var(--stack, var(--s-4)); }
.stack-sm { --stack: var(--s-2); }
.stack-lg { --stack: var(--s-8); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--gap, var(--s-3)); align-items: center; }
.between { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; }
.grid { display: grid; gap: var(--gap, var(--s-6)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--min, 260px)), 1fr)); }
@media (max-width: 960px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
}
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); } }

.text-center { text-align: center; }
.muted { color: var(--ink-2); }
.subtle { color: var(--ink-3); }
.small { font-size: var(--fs-sm); }
.xsmall { font-size: var(--fs-xs); }
.lead { font-size: var(--fs-lg); color: var(--ink-2); line-height: 1.65; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.w-full { width: 100%; }
.mt-0 { margin-top: 0 !important; }
.mt-2 { margin-top: var(--s-2); } .mt-4 { margin-top: var(--s-4); } .mt-6 { margin-top: var(--s-6); } .mt-8 { margin-top: var(--s-8); } .mt-12 { margin-top: var(--s-12); }
.mb-12 { margin-bottom: var(--s-12); }
/* Phones: two product cards per row instead of one huge card. */
@media (max-width: 560px) { .grid-products { --min: 140px !important; gap: 12px; } .grid-products .product-card { padding: 10px !important; } .grid-products h3 { font-size: .95rem; } }
.mb-2 { margin-bottom: var(--s-2); } .mb-4 { margin-bottom: var(--s-4); } .mb-6 { margin-bottom: var(--s-6); } .mb-8 { margin-bottom: var(--s-8); }

.eyebrow {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-family: var(--font-body); font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent);
}
.eyebrow::before { content: ""; width: 18px; height: 1.5px; background: currentColor; border-radius: 2px; }
.eyebrow.plain::before { display: none; }
.section-head { max-width: 680px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head > * + * { margin-top: var(--s-4); }
.section-head + * { margin-top: clamp(32px, 4vw, 56px); }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  --btn-bg: var(--surface); --btn-fg: var(--ink); --btn-bd: var(--line-2);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 46px; padding: 0 var(--s-5);
  font-family: var(--font-body); font-size: 0.95rem; font-weight: 600; line-height: 1;
  text-decoration: none; white-space: nowrap;
  color: var(--btn-fg); background: var(--btn-bg);
  border: 1px solid var(--btn-bd); border-radius: var(--r-pill);
  transition: background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), transform var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease), color var(--dur-1);
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { border-color: var(--ink-3); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn[disabled], .btn.is-disabled { opacity: 0.5; pointer-events: none; }
.btn-primary { --btn-bg: var(--brand); --btn-fg: var(--on-brand); --btn-bd: var(--brand); }
.btn-primary:hover { --btn-bg: var(--brand-ink); --btn-bd: var(--brand-ink); }
.btn-accent { --btn-bg: var(--accent); --btn-fg: #fff; --btn-bd: var(--accent); }
.btn-accent:hover { --btn-bg: var(--accent-ink); --btn-bd: var(--accent-ink); }
.btn-ghost { --btn-bg: transparent; --btn-bd: transparent; }
.btn-ghost:hover { --btn-bg: var(--surface-2); --btn-bd: transparent; }
.btn-light { --btn-bg: #fff; --btn-fg: var(--brand-ink); --btn-bd: #fff; }
.btn-light:hover { --btn-bg: var(--brand-50); --btn-bd: var(--brand-50); }
.btn-outline-light { --btn-bg: transparent; --btn-fg: #fff; --btn-bd: rgba(255,255,255,0.4); }
.btn-outline-light:hover { --btn-bd: #fff; }
.btn-danger { --btn-bg: var(--surface); --btn-fg: var(--danger); --btn-bd: color-mix(in oklab, var(--danger) 35%, white); }
.btn-danger:hover { --btn-bg: var(--danger-bg); --btn-bd: var(--danger); }
.btn-sm { min-height: 36px; padding: 0 var(--s-4); font-size: var(--fs-sm); }
.btn-lg { min-height: 54px; padding: 0 var(--s-8); font-size: 1rem; }
.btn-block { width: 100%; }
.btn-icon { width: 42px; min-height: 42px; padding: 0; }
.btn .icon { width: 1.15em; height: 1.15em; }
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--btn-fg); border-right-color: transparent; animation: spin 0.7s linear infinite;
}
.link { color: var(--brand); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.link:hover { text-decoration: underline; }
.link .icon { transition: transform var(--dur-1) var(--ease); }
.link:hover .icon { transform: translateX(2px); }

/* --------------------------------------------------------------------------
   Cards, pills, chips
   -------------------------------------------------------------------------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(20px, 2.4vw, 28px); box-shadow: var(--shadow-xs);
}
.card-flat { box-shadow: none; }
.card-muted { background: var(--surface-2); border-color: transparent; box-shadow: none; }
.card-brand { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.card-brand h2, .card-brand h3, .card-brand h4 { color: var(--on-brand); }
.card-brand .muted { color: color-mix(in oklab, #fff 72%, var(--brand)); }
.card-link { display: block; text-decoration: none; transition: border-color var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease), transform var(--dur-2) var(--ease); }
.card-link:hover { border-color: var(--line-2); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-5); }
.card-head h2, .card-head h3 { font-size: var(--fs-lg); }
.card-title { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-lg); letter-spacing: -0.01em; }

.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px;
  border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 600; line-height: 1.3;
  background: var(--surface-2); color: var(--ink-2); max-width: 100%; overflow-wrap: anywhere;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.85; }
.pill.no-dot::before { display: none; }
.pill-success { background: var(--success-bg); color: var(--success); }
.pill-warning { background: var(--warning-bg); color: var(--warning); }
.pill-danger { background: var(--danger-bg); color: var(--danger); }
.pill-info { background: var(--info-bg); color: var(--info); }
.pill-brand { background: var(--brand-100); color: var(--brand); }
.pill-accent { background: var(--accent-100); color: var(--accent-ink); }
.pill-muted { background: var(--surface-2); color: var(--ink-3); }

.chip {
  display: inline-flex; align-items: center; gap: var(--s-2); padding: 8px 14px;
  border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface);
  font-size: var(--fs-sm); font-weight: 500; color: var(--ink);
}
.chip .icon { color: var(--brand); }

.icon-tile {
  display: inline-grid; place-items: center; width: 48px; height: 48px; flex: none;
  border-radius: var(--r-md); background: var(--brand-100); color: var(--brand);
}
.icon-tile .icon { width: 22px; height: 22px; }
.icon-tile.accent { background: var(--accent-100); color: var(--accent); }
.icon-tile.sm { width: 36px; height: 36px; border-radius: var(--r-sm); }
.icon-tile.sm .icon { width: 18px; height: 18px; }

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.field { display: grid; gap: 6px; }
.field + .field { margin-top: var(--s-4); }
.label { font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }
.label .optional { font-weight: 400; color: var(--ink-3); }
.help { font-size: var(--fs-xs); color: var(--ink-3); }
.error-text { font-size: var(--fs-xs); color: var(--danger); font-weight: 500; }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 11px 14px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-sm);
  font-size: 16px; line-height: 1.4; color: var(--ink);
  transition: border-color var(--dur-1), box-shadow var(--dur-1);
  -webkit-appearance: none; appearance: none;
}
.textarea { min-height: 110px; resize: vertical; }
.select {
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235C6B67' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px;
}
.input::placeholder, .textarea::placeholder { color: var(--ink-3); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-3); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.is-invalid .input, .is-invalid .select, .is-invalid .textarea, .input.is-invalid { border-color: var(--danger); }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }
.form-row .field + .field { margin-top: 0; }
@media (max-width: 560px) { .form-row { grid-template-columns: minmax(0, 1fr); } }
.form-actions { display: flex; gap: var(--s-3); flex-wrap: wrap; margin-top: var(--s-6); }

.check { display: flex; align-items: flex-start; gap: var(--s-3); font-size: var(--fs-sm); color: var(--ink-2); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--brand); flex: none; }

/* Selectable option cards (quiz, payment method, gender, address) */
.choices { display: grid; gap: var(--s-3); }
.choices.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 560px) { .choices.cols-2 { grid-template-columns: minmax(0, 1fr); } }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice-body {
  display: flex; align-items: center; gap: var(--s-4); min-height: 60px; padding: 14px 18px;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-md);
  transition: border-color var(--dur-1) var(--ease), background var(--dur-1) var(--ease), box-shadow var(--dur-1);
}
.choice-body .mark {
  width: 22px; height: 22px; flex: none; border-radius: 50%; border: 1.5px solid var(--line-2);
  display: grid; place-items: center; transition: all var(--dur-1) var(--ease); background: var(--surface);
}
.choice-body .mark::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--on-brand); transform: scale(0); transition: transform var(--dur-1) var(--ease); }
.choice input[type="checkbox"] + .choice-body .mark { border-radius: 6px; }
.choice input[type="checkbox"] + .choice-body .mark::after {
  width: 11px; height: 6px; border-radius: 0; background: none; border: 2px solid var(--on-brand);
  border-top: 0; border-right: 0; transform: rotate(-45deg) scale(0); margin-top: -2px;
}
.choice:hover .choice-body { border-color: var(--line-2); }
.choice input:checked + .choice-body { border-color: var(--brand); background: var(--brand-50); }
.choice input:checked + .choice-body .mark { background: var(--brand); border-color: var(--brand); }
.choice input:checked + .choice-body .mark::after { transform: scale(1); }
.choice input[type="checkbox"]:checked + .choice-body .mark::after { transform: rotate(-45deg) scale(1); }
.choice input:focus-visible + .choice-body { box-shadow: var(--ring); }
.choice-title { font-weight: 600; color: var(--ink); line-height: 1.35; }
.choice-desc { font-size: var(--fs-sm); color: var(--ink-3); }

/* --------------------------------------------------------------------------
   Alerts / flash / empty states
   -------------------------------------------------------------------------- */
.alert {
  display: flex; gap: var(--s-3); align-items: flex-start; padding: 14px 16px;
  border-radius: var(--r-md); font-size: var(--fs-sm); line-height: 1.5;
  background: var(--info-bg); color: var(--info); border: 1px solid color-mix(in oklab, var(--info) 18%, white);
}
.alert .icon { margin-top: 1px; }
.alert strong { color: inherit; }
.alert-success { background: var(--success-bg); color: var(--success); border-color: color-mix(in oklab, var(--success) 18%, white); }
.alert-warning { background: var(--warning-bg); color: var(--warning); border-color: color-mix(in oklab, var(--warning) 20%, white); }
.alert-danger { background: var(--danger-bg); color: var(--danger); border-color: color-mix(in oklab, var(--danger) 18%, white); }
.alert-neutral { background: var(--surface-2); color: var(--ink-2); border-color: var(--line); }
.alert ul { padding-left: 18px; margin-top: 4px; }

.empty {
  text-align: center; padding: clamp(32px, 5vw, 56px) var(--s-6);
  border: 1px dashed var(--line-2); border-radius: var(--r-lg); background: var(--surface);
}
.empty .icon-tile { margin: 0 auto var(--s-4); }
.empty h3 { font-size: var(--fs-lg); }
.empty p { margin: var(--s-2) auto 0; max-width: 420px; color: var(--ink-2); font-size: var(--fs-sm); }
.empty .btn { margin-top: var(--s-5); }

/* Toasts */
.toasts { position: fixed; z-index: 90; left: 50%; bottom: calc(var(--s-6) + env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; gap: var(--s-2); width: min(92vw, 420px); pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; gap: var(--s-3); align-items: flex-start;
  padding: 14px 16px; border-radius: var(--r-md); background: var(--ink); color: #fff;
  box-shadow: var(--shadow-lg); font-size: var(--fs-sm); animation: toast-in var(--dur-2) var(--ease);
}
.toast.is-error { background: var(--danger); }
.toast.is-success { background: var(--brand); }
@media (max-width: 1023px) { .has-bottom-nav .toasts { bottom: calc(84px + env(safe-area-inset-bottom)); } }

/* --------------------------------------------------------------------------
   Progress, steps, timeline
   -------------------------------------------------------------------------- */
.progress { height: 8px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.progress > span { display: block; height: 100%; width: var(--value, 0%); background: var(--brand); border-radius: inherit; transition: width var(--dur-3) var(--ease); }
.progress.accent > span { background: var(--accent); }
.progress.thin { height: 5px; }

.ring {
  --size: 88px; --value: 0; --track: var(--surface-2); --fill: var(--brand);
  width: var(--size); height: var(--size); border-radius: 50%; flex: none;
  background: conic-gradient(var(--fill) calc(var(--value) * 1%), var(--track) 0);
  display: grid; place-items: center; position: relative;
}
.ring::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--surface); }
.ring > * { position: relative; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }

.timeline { list-style: none; display: grid; gap: 0; }
.timeline li { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: var(--s-3); padding-bottom: var(--s-5); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .dot {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); border: 2px solid var(--line-2); color: var(--ink-3); z-index: 1;
}
.timeline .dot .icon { width: 14px; height: 14px; }
.timeline li.is-done .dot { background: var(--brand); border-color: var(--brand); color: #fff; }
.timeline li.is-done::before { background: var(--brand); }
.timeline li.is-current .dot { border-color: var(--brand); color: var(--brand); box-shadow: 0 0 0 4px var(--brand-100); }
.timeline li.is-failed .dot { background: var(--danger); border-color: var(--danger); color: #fff; }
.timeline .t-title { font-weight: 600; line-height: 28px; }
.timeline .t-desc { font-size: var(--fs-sm); color: var(--ink-3); }

/* --------------------------------------------------------------------------
   Tables (stack into cards on small screens)
   -------------------------------------------------------------------------- */
.table-wrap { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.table th { text-align: left; font-weight: 600; font-size: var(--fs-xs); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); background: var(--surface-2); padding: 12px 16px; }
.table td { padding: 14px 16px; border-top: 1px solid var(--line); vertical-align: middle; }
.table tr.is-link { cursor: pointer; transition: background var(--dur-1); }
.table tr.is-link:hover td { background: var(--brand-50); }
.table .t-right { text-align: right; }
@media (max-width: 720px) {
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: 14px 16px; border-top: 1px solid var(--line); }
  .table tr:first-child { border-top: 0; }
  .table td { border: 0; padding: 3px 0; display: flex; justify-content: space-between; gap: var(--s-4); }
  .table td::before { content: attr(data-label); color: var(--ink-3); font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
  .table td.t-right { text-align: left; }
}

/* Definition list */
.dl { display: grid; gap: 10px; font-size: var(--fs-sm); }
.dl > div { display: flex; justify-content: space-between; gap: var(--s-4); }
.dl dt { color: var(--ink-3); }
.dl dd { margin: 0; font-weight: 500; text-align: right; }
.dl .total { padding-top: 10px; border-top: 1px solid var(--line); font-size: var(--fs-md); }
.dl .total dt, .dl .total dd { color: var(--ink); font-weight: 700; }

/* Accordion (native details) */
.accordion { border-top: 1px solid var(--line); }
.accordion details { border-bottom: 1px solid var(--line); }
.accordion summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  padding: 22px 0; font-family: var(--font-display); font-weight: 600; font-size: var(--fs-lg); color: var(--ink);
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary .icon { transition: transform var(--dur-2) var(--ease); color: var(--ink-3); }
.accordion details[open] summary .icon { transform: rotate(45deg); color: var(--brand); }
.accordion .answer { padding: 0 0 22px; color: var(--ink-2); max-width: 72ch; }

/* Dialog */
.dialog {
  border: 0; padding: 0; border-radius: var(--r-lg); width: min(92vw, 480px); max-height: 88vh;
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg);
}
.dialog::backdrop { background: rgba(14, 22, 19, 0.45); backdrop-filter: blur(2px); }
.dialog[open] { animation: dialog-in var(--dur-2) var(--ease); }
.dialog-body { padding: var(--s-6); }
.dialog-actions { display: flex; justify-content: flex-end; gap: var(--s-3); padding: 0 var(--s-6) var(--s-6); flex-wrap: wrap; }

/* Avatars & media */
.avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--brand-100); color: var(--brand); display: inline-grid; place-items: center; font-weight: 700; font-family: var(--font-display); flex: none; }
.avatar.lg { width: 72px; height: 72px; font-size: 1.4rem; }
.media { border-radius: var(--r-md); overflow: hidden; background: var(--surface-2); aspect-ratio: var(--ratio, 4 / 3); }
.media img { width: 100%; height: 100%; object-fit: cover; }
.media.contain img { object-fit: contain; padding: 8%; }
.media-placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: var(--ink-3); background: linear-gradient(135deg, var(--surface-2), var(--linen)); }
.media-placeholder .icon { width: 36px; height: 36px; opacity: 0.6; }

.stars { display: inline-flex; gap: 2px; color: #D59A2B; }
.stars .icon { width: 16px; height: 16px; }
.stars .off { color: var(--line-2); }

/* --------------------------------------------------------------------------
   Public site header / nav / footer
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: color-mix(in oklab, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent; transition: border-color var(--dur-2), background var(--dur-2);
}
.site-header.is-scrolled { border-bottom-color: var(--line); background: color-mix(in oklab, var(--bg) 96%, transparent); }
.site-header .container { height: 100%; display: flex; align-items: center; gap: var(--s-6); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
.brand img { height: 34px; width: auto; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--brand); color: #fff; display: grid; place-items: center; }
.brand-mark svg { width: 20px; height: 20px; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; letter-spacing: -0.02em; }
.nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav a {
  padding: 8px 12px; border-radius: var(--r-pill); font-size: 0.92rem; font-weight: 500; color: var(--ink-2); text-decoration: none;
  transition: color var(--dur-1), background var(--dur-1);
}
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--brand); background: var(--brand-50); }
.header-actions { display: flex; align-items: center; gap: var(--s-2); }
.menu-toggle { display: none; }
@media (max-width: 1080px) {
  .nav, .header-actions .hide-mobile { display: none; }
  .header-actions { margin-left: auto; }
  .menu-toggle { display: inline-flex; }
}
.mobile-menu {
  position: fixed; inset: var(--header-h) 0 0 0; z-index: 49; background: var(--bg);
  padding: var(--s-6) var(--gutter) calc(var(--s-8) + env(safe-area-inset-bottom)); overflow-y: auto;
  display: flex; flex-direction: column; gap: var(--s-1);
  opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease), visibility var(--dur-2);
}
.mobile-menu.is-open { opacity: 1; visibility: visible; transform: none; }
.mobile-menu a.m-link { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; text-decoration: none; padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.mobile-menu .btn { margin-top: var(--s-3); }
body.menu-open { overflow: hidden; }

.site-footer { background: var(--brand-ink); color: color-mix(in oklab, #fff 70%, var(--brand)); padding-top: clamp(56px, 6vw, 88px); font-size: var(--fs-sm); }
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer .brand, .site-footer .brand-name { color: #fff; }
.site-footer .brand-mark { background: #fff; color: var(--brand); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: var(--s-10); }
.footer-grid h4 { color: #fff; font-family: var(--font-body); font-size: var(--fs-xs); letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; margin-bottom: var(--s-4); }
.footer-grid ul { list-style: none; display: grid; gap: 10px; }
.footer-bottom { margin-top: clamp(40px, 5vw, 64px); padding: var(--s-6) 0 calc(var(--s-6) + env(safe-area-inset-bottom)); border-top: 1px solid rgba(255,255,255,0.12); display: flex; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; font-size: var(--fs-xs); }
.footer-disclaimer { margin-top: var(--s-5); max-width: 380px; font-size: var(--fs-xs); line-height: 1.6; opacity: 0.85; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* --------------------------------------------------------------------------
   Public site sections
   -------------------------------------------------------------------------- */
.hero { position: relative; padding: clamp(40px, 6vw, 96px) 0 clamp(56px, 7vw, 112px); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 60% at 85% 20%, color-mix(in oklab, var(--accent) 9%, transparent) 0, transparent 70%),
    radial-gradient(50% 50% at 10% 90%, color-mix(in oklab, var(--brand) 8%, transparent) 0, transparent 70%);
}
.hero h1 { font-size: var(--fs-5xl); max-width: 17ch; }
.hero h1 .nw { white-space: nowrap; }
.hero h1 em { font-style: normal; color: var(--brand); position: relative; white-space: nowrap; }
.hero h1 em::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0.06em; height: 0.12em; background: var(--accent); opacity: 0.35; border-radius: 4px; }
.hero .lead { max-width: 52ch; margin-top: var(--s-6); }
.hero-actions { margin-top: var(--s-8); display: flex; gap: var(--s-3); flex-wrap: wrap; }
.hero-meta { margin-top: var(--s-8); display: flex; gap: var(--s-6); flex-wrap: wrap; color: var(--ink-2); font-size: var(--fs-sm); }
.hero-meta span { display: inline-flex; align-items: center; gap: var(--s-2); }
.hero-meta .icon { color: var(--brand); }

.hero-visual { position: relative; }
.visual-panel {
  position: relative; border-radius: var(--r-xl); background: var(--linen); padding: clamp(24px, 4vw, 44px);
  border: 1px solid color-mix(in oklab, var(--line) 70%, transparent); aspect-ratio: 1 / 1.02; display: grid; place-items: center;
}
.visual-panel .head-figure { width: 72%; color: var(--brand); }
.float-card {
  position: absolute; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-md); padding: 12px 14px; display: flex; align-items: center; gap: var(--s-3);
  font-size: var(--fs-sm); max-width: 250px;
}
.float-card strong { display: block; font-size: var(--fs-sm); line-height: 1.3; }
.float-card small { color: var(--ink-3); font-size: var(--fs-xs); }
.float-card.fc-1 { top: 9%; left: -6%; }
.float-card.fc-2 { top: 44%; right: -7%; }
.float-card.fc-3 { bottom: 8%; left: 4%; }
@media (max-width: 900px) {
  .float-card.fc-1 { left: 2%; } .float-card.fc-2 { right: 2%; }
  .hero-visual { max-width: 520px; margin-inline: auto; width: 100%; }
}
@media (max-width: 480px) { .float-card { max-width: 200px; padding: 10px 12px; } .float-card.fc-2 { top: 50%; } }

.trust-strip { border-block: 1px solid var(--line); background: var(--surface); }
.trust-strip .container { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.trust-item { padding: var(--s-6) var(--s-5); display: flex; gap: var(--s-3); align-items: center; font-size: var(--fs-sm); color: var(--ink-2); }
.trust-item + .trust-item { border-left: 1px solid var(--line); }
.trust-item strong { display: block; color: var(--ink); font-size: var(--fs-md); font-family: var(--font-display); }
@media (max-width: 900px) {
  .trust-strip .container { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0; }
  .trust-item:nth-child(3) { border-left: 0; }
  .trust-item:nth-child(n+3) { border-top: 1px solid var(--line); }
}

.feature { display: grid; gap: var(--s-3); }
.feature h3 { font-size: var(--fs-lg); }
.feature p { color: var(--ink-2); font-size: 0.95rem; }

.steps-list { counter-reset: step; display: grid; gap: var(--s-4); }
.step-card { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s-5); align-items: start; padding: var(--s-6); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.step-num { font-family: var(--font-display); font-weight: 800; font-size: 0.8rem; letter-spacing: 0.1em; color: var(--accent); }
.step-card h3 { font-size: var(--fs-lg); margin-top: 2px; }
.step-card p { color: var(--ink-2); font-size: 0.95rem; margin-top: 6px; }

.cause-card { display: grid; gap: var(--s-4); align-content: start; height: 100%; }
.cause-card p { color: var(--ink-2); font-size: 0.95rem; }

/* Journey / roadmap */
.journey { position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--s-4); }
@media (max-width: 720px) {
  .journey { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(230px, 78%); overflow-x: auto; padding-bottom: var(--s-2); scroll-snap-type: x mandatory; scrollbar-width: thin; }
}
.journey-step { scroll-snap-align: start; position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-6); display: grid; gap: var(--s-3); align-content: start; }
.journey-step .month { display: flex; align-items: center; justify-content: space-between; }
.journey-step .month span { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.journey-step h3 { font-size: var(--fs-lg); }
.journey-step p { font-size: var(--fs-sm); color: var(--ink-2); }
.journey-step.is-done { background: var(--brand-50); border-color: color-mix(in oklab, var(--brand) 18%, white); }
.journey-step.is-current { border-color: var(--brand); box-shadow: var(--shadow-md); }
.journey-step.is-current .month span { color: var(--brand); }
.journey-rail { height: 4px; border-radius: 4px; background: var(--surface-2); margin-bottom: var(--s-5); overflow: hidden; }
.journey-rail > span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--accent)); width: var(--value, 0%); }

/* Quote / testimonials */
.quote-card { display: grid; gap: var(--s-4); align-content: space-between; height: 100%; }
.quote-card blockquote { margin: 0; font-size: 1.02rem; line-height: 1.65; color: var(--ink); }
.quote-card footer { display: flex; align-items: center; gap: var(--s-3); font-size: var(--fs-sm); }
.quote-card footer strong { display: block; }
.photo-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--s-2); }
.photo-strip figure { margin: 0; position: relative; border-radius: var(--r-sm); overflow: hidden; aspect-ratio: 1; background: var(--surface-2); }
.photo-strip img { width: 100%; height: 100%; object-fit: cover; }
.photo-strip figcaption { position: absolute; left: 6px; bottom: 6px; background: rgba(0,0,0,0.55); color: #fff; font-size: 11px; padding: 2px 8px; border-radius: var(--r-pill); }

.cta-band { border-radius: var(--r-xl); background: var(--brand); color: #fff; padding: clamp(36px, 6vw, 72px); position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.12); box-shadow: 0 0 0 40px rgba(255,255,255,0.03), 0 0 0 80px rgba(255,255,255,0.02); }
.cta-band h2 { color: #fff; max-width: 18ch; }
.cta-band p { color: color-mix(in oklab, #fff 76%, var(--brand)); max-width: 52ch; margin-top: var(--s-4); }
.cta-band .cluster { margin-top: var(--s-8); position: relative; z-index: 1; }

.page-hero { padding: clamp(48px, 6vw, 88px) 0 clamp(32px, 4vw, 56px); border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--linen), var(--bg)); }
.page-hero h1 { font-size: var(--fs-4xl); max-width: 20ch; margin-top: var(--s-4); }
.page-hero .lead { margin-top: var(--s-4); max-width: 60ch; }
.breadcrumbs { display: flex; gap: 6px; flex-wrap: wrap; font-size: var(--fs-xs); color: var(--ink-3); }
.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { color: var(--ink); }

.prose { color: var(--ink-2); line-height: 1.75; max-width: 72ch; }
.prose h2 { font-size: var(--fs-xl); margin-top: var(--s-10); margin-bottom: var(--s-3); color: var(--ink); }
.prose p + p { margin-top: var(--s-4); }
.prose ul { padding-left: 1.2em; margin-top: var(--s-3); }
.prose li + li { margin-top: 6px; }

.product-card { display: grid; gap: var(--s-4); align-content: start; height: 100%; }
.product-card .media { --ratio: 1 / 1; border-radius: var(--r-md); }
.product-card h3 { font-size: var(--fs-md); font-family: var(--font-display); }
.price { display: inline-flex; align-items: baseline; gap: var(--s-2); font-weight: 700; font-family: var(--font-display); font-size: var(--fs-lg); color: var(--ink); }
.price s { font-weight: 500; font-size: var(--fs-sm); color: var(--ink-3); font-family: var(--font-body); }
.ingredients { display: flex; flex-wrap: wrap; gap: 6px; }
.ingredients span { font-size: var(--fs-xs); padding: 3px 9px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--ink-2); }

/* Auth pages */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
.auth-aside { background: var(--brand); color: #fff; padding: clamp(32px, 5vw, 64px); display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-aside .brand, .auth-aside .brand-name { color: #fff; }
.auth-aside .brand-mark { background: #fff; color: var(--brand); }
.auth-aside h2 { color: #fff; font-size: var(--fs-3xl); max-width: 16ch; }
.auth-aside p { color: color-mix(in oklab, #fff 74%, var(--brand)); max-width: 44ch; margin-top: var(--s-4); }
.auth-aside ul { list-style: none; display: grid; gap: var(--s-3); margin-top: var(--s-8); }
.auth-aside li { display: flex; gap: var(--s-3); align-items: center; font-size: var(--fs-sm); }
.auth-aside li .icon { color: color-mix(in oklab, var(--accent) 60%, white); }
.auth-aside .head-figure { position: absolute; right: -60px; bottom: -40px; width: 340px; opacity: 0.12; color: #fff; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: clamp(24px, 5vw, 64px) var(--gutter); }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { font-size: var(--fs-3xl); }
.auth-card .lead { font-size: var(--fs-md); margin-top: var(--s-2); }
.auth-divider { display: flex; align-items: center; gap: var(--s-3); color: var(--ink-3); font-size: var(--fs-xs); margin: var(--s-6) 0; text-transform: uppercase; letter-spacing: 0.1em; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.tabs { display: inline-flex; padding: 4px; border-radius: var(--r-pill); background: var(--surface-2); gap: 2px; }
.tabs button, .tabs a { border: 0; background: transparent; padding: 8px 16px; border-radius: var(--r-pill); font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); text-decoration: none; }
.tabs [aria-selected="true"], .tabs .is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-xs); }
@media (max-width: 900px) {
  .auth-shell { grid-template-columns: minmax(0, 1fr); }
  .auth-aside { display: none; }
  .auth-main { align-items: flex-start; padding-top: var(--s-8); }
}
.auth-mobile-brand { display: none; margin-bottom: var(--s-8); }
@media (max-width: 900px) { .auth-mobile-brand { display: inline-flex; } }

/* --------------------------------------------------------------------------
   Portal shell
   -------------------------------------------------------------------------- */
.portal { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: var(--s-6) var(--s-4);
  background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: var(--s-6);
}
.sidebar .brand { padding: 0 var(--s-3); }
.side-nav { display: grid; gap: 2px; }
.side-nav .group-label { font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); padding: var(--s-4) var(--s-3) var(--s-2); }
.side-nav a {
  display: flex; align-items: center; gap: var(--s-3); padding: 10px 12px; border-radius: var(--r-sm);
  font-size: 0.93rem; font-weight: 500; color: var(--ink-2); text-decoration: none; transition: background var(--dur-1), color var(--dur-1);
}
.side-nav a .icon { color: var(--ink-3); transition: color var(--dur-1); }
.side-nav a:hover { background: var(--surface-2); color: var(--ink); }
.side-nav a[aria-current="page"] { background: var(--brand-50); color: var(--brand); font-weight: 600; }
.side-nav a[aria-current="page"] .icon { color: var(--brand); }
.side-nav .count { margin-left: auto; font-size: 11px; font-weight: 700; background: var(--accent); color: #fff; border-radius: var(--r-pill); padding: 1px 7px; }
.sidebar-foot { margin-top: auto; }
.coach-mini { border-radius: var(--r-md); background: var(--linen); padding: var(--s-4); font-size: var(--fs-sm); }
.coach-mini strong { display: block; font-family: var(--font-display); }

.portal-main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: 68px; display: flex; align-items: center; gap: var(--s-4);
  padding: 0 clamp(16px, 3vw, 40px); background: color-mix(in oklab, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.topbar .brand { display: none; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: var(--s-2); }
.cart-btn { position: relative; }
.cart-btn .badge { position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; }
.user-menu { position: relative; }
.user-menu > button { display: inline-flex; align-items: center; gap: var(--s-2); border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-pill); padding: 4px 12px 4px 4px; font-size: var(--fs-sm); font-weight: 600; }
.user-menu .avatar { width: 32px; height: 32px; font-size: 0.85rem; }
.menu-panel { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-lg); padding: 6px; display: none; }
.menu-panel.is-open { display: block; animation: dialog-in var(--dur-1) var(--ease); }
.menu-panel a, .menu-panel button { display: flex; width: 100%; align-items: center; gap: var(--s-3); padding: 10px 12px; border: 0; background: none; border-radius: var(--r-sm); font-size: var(--fs-sm); text-decoration: none; color: var(--ink); text-align: left; }
.menu-panel a:hover, .menu-panel button:hover { background: var(--surface-2); }
.menu-panel .icon { color: var(--ink-3); }
.menu-panel hr { margin: 6px 0; }

.portal-content { padding: clamp(20px, 3vw, 40px); width: 100%; max-width: 1180px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; margin-bottom: clamp(20px, 3vw, 32px); }
.page-head h1 { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.2rem); }
.page-head p { color: var(--ink-2); margin-top: 6px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--ink-3); text-decoration: none; margin-bottom: var(--s-3); }
.back-link:hover { color: var(--ink); }

.bottom-nav { display: none; }
@media (max-width: 1023px) {
  .portal { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; }
  .topbar .brand { display: inline-flex; }
  .topbar .user-name { display: none; }
  .portal-content { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .bottom-nav {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: color-mix(in oklab, var(--surface) 96%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bottom-nav a, .bottom-nav button { display: grid; justify-items: center; gap: 3px; padding: 6px 2px; font-size: 11px; font-weight: 600; color: var(--ink-3); text-decoration: none; border: 0; background: none; }
  .bottom-nav .icon { width: 22px; height: 22px; }
  .bottom-nav [aria-current="page"] { color: var(--brand); }
}
.more-sheet .side-nav a { font-size: 1rem; padding: 14px 12px; }

/* Portal widgets */
.welcome { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-6); align-items: center; }
.welcome h1 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.3rem); }
.stat { display: grid; gap: 4px; }
.stat .label { font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.stat .value { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-2xl); letter-spacing: -0.02em; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: var(--s-6); align-items: start; }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: minmax(0, 1fr); } }
.list-rows { display: grid; }
.list-rows > * { display: flex; align-items: center; gap: var(--s-4); padding: 14px 0; border-top: 1px solid var(--line); text-decoration: none; }
.list-rows > *:first-child { border-top: 0; padding-top: 0; }
.list-rows > *:last-child { padding-bottom: 0; }
.list-rows .grow { flex: 1 1 140px; min-width: 0; }
.list-rows > a, .list-rows > div { flex-wrap: wrap; }
.list-rows .title { font-weight: 600; font-size: 0.95rem; }
.list-rows .meta { font-size: var(--fs-xs); color: var(--ink-3); }

.routine-group + .routine-group { margin-top: var(--s-5); }
.routine-group h4 { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-sm); color: var(--ink-2); font-family: var(--font-body); font-weight: 600; margin-bottom: var(--s-3); }
.routine-item { display: flex; align-items: center; gap: var(--s-3); width: 100%; text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); transition: all var(--dur-1) var(--ease); }
.routine-item + .routine-item { margin-top: var(--s-2); }
.routine-item .tick { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; flex: none; color: transparent; transition: all var(--dur-2) var(--ease); }
.routine-item .tick .icon { width: 14px; height: 14px; }
.routine-item:hover { border-color: var(--line-2); }
.routine-item[aria-pressed="true"] { background: var(--brand-50); border-color: color-mix(in oklab, var(--brand) 25%, white); }
.routine-item[aria-pressed="true"] .tick { background: var(--brand); border-color: var(--brand); color: #fff; }
.routine-item[aria-pressed="true"] .r-name { color: var(--ink-2); text-decoration: line-through; text-decoration-color: var(--ink-3); }
/* Routine — time windows, rewards, photo check (client compliance tracker) */
.routine-group-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px var(--s-3); margin-bottom: var(--s-3); }
.routine-group-head h4 { margin-bottom: 0; }
.pill-sm { font-size: 0.7rem; padding: 2px 8px; }
.routine-item .r-name { flex: 1; min-width: 0; }
.routine-item .r-state { color: var(--ink-3); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.routine-item .r-state:empty { display: none; }
.routine-item:disabled { cursor: not-allowed; }
.routine-item:disabled:not([aria-pressed="true"]) { background: var(--surface-2); border-style: dashed; }
.routine-item:disabled:not([aria-pressed="true"]) .r-name { color: var(--ink-3); }
.routine-item[data-state="missed"] .r-state { color: var(--danger); }
.routine-item.is-busy { opacity: .6; pointer-events: none; }
.reward-strip { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; padding: 12px 14px; margin-bottom: var(--s-5); border-radius: var(--r-md); background: var(--accent-50); border: 1px solid color-mix(in oklab, var(--accent) 16%, white); }
.reward-strip .grow { flex: 1 1 200px; min-width: 0; }
.reward-strip[data-state="earned"] { background: var(--success-bg); border-color: color-mix(in oklab, var(--success) 18%, white); }
.reward-strip[data-state="earned"] .coin-badge { background: var(--success); }
.coin-badge { flex: none; min-width: 42px; height: 42px; padding: 0 8px; border-radius: var(--r-pill); display: grid; place-items: center; background: var(--accent); color: #fff; font-family: var(--font-display); font-weight: 800; font-size: .95rem; }
.reward-strip.is-celebrating .coin-badge { animation: coin-pop .7s var(--ease); }
@keyframes coin-pop { 0% { transform: scale(1); } 35% { transform: scale(1.25) rotate(-6deg); } 70% { transform: scale(.95); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .reward-strip.is-celebrating .coin-badge { animation: none; } }
.proof-box { padding: var(--s-4); border: 1px dashed var(--line-2); border-radius: var(--r-md); background: var(--surface); }
/* Wallet */
.wallet-hero { display: flex; align-items: center; justify-content: space-between; gap: var(--s-6); flex-wrap: wrap; }
.wallet-balance { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-4xl); letter-spacing: -0.03em; line-height: 1; }
.earn-list { display: grid; gap: var(--s-3); }
.earn-list > div { display: flex; align-items: center; gap: var(--s-3); }
.earn-list .coin-badge { min-width: 52px; height: 32px; font-size: .85rem; }
.amount-plus { color: var(--success); font-weight: 700; }
.amount-minus { color: var(--danger); font-weight: 700; }
.routine-item.is-busy { opacity: 0.6; pointer-events: none; }
.r-name { font-weight: 500; }

.report-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-6); align-items: center; }
@media (max-width: 720px) { .report-hero { grid-template-columns: minmax(0, 1fr); } }
.stage-meter { display: flex; gap: 4px; margin-top: var(--s-3); }
.stage-meter span { flex: 1; height: 8px; border-radius: 4px; background: var(--surface-2); }
.stage-meter span.on { background: var(--brand); }
.stage-meter span.current { background: var(--accent); }
.cause-rank { display: grid; gap: var(--s-3); }
.cause-rank .row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-2) var(--s-4); align-items: center; }
.cause-rank .row .progress { grid-column: 1 / -1; }
.scalp-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s-3); }
@media (max-width: 640px) { .scalp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.scalp-grid figure { margin: 0; }
.scalp-grid .media { --ratio: 1; }
.scalp-grid figcaption { font-size: var(--fs-xs); color: var(--ink-3); text-align: center; margin-top: 6px; }

/* Assessment (quiz) */
.assess { max-width: 720px; margin-inline: auto; }
.assess-top { position: sticky; top: 0; z-index: 20; background: color-mix(in oklab, var(--bg) 94%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); padding: var(--s-4) 0; }
.assess-meta { display: flex; justify-content: space-between; font-size: var(--fs-xs); color: var(--ink-3); font-weight: 600; margin-bottom: var(--s-2); letter-spacing: 0.04em; }
.q-step { padding: clamp(16px, 3vw, 32px) 0; }
.js .q-step { display: none; }
.js .q-step.is-active { display: block; animation: step-in var(--dur-3) var(--ease); }
.q-step h2 { font-size: clamp(1.4rem, 1.15rem + 1vw, 1.9rem); line-height: 1.25; }
.q-step .q-help { margin-top: var(--s-2); color: var(--ink-3); font-size: var(--fs-sm); }
.q-step .choices, .q-step .field { margin-top: var(--s-6); }
.q-nav { display: flex; justify-content: space-between; gap: var(--s-3); padding: var(--s-4) 0 calc(var(--s-4) + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); position: sticky; bottom: 0; background: color-mix(in oklab, var(--bg) 94%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.no-js-only { display: none; }
html:not(.js) .no-js-only { display: block; }
html:not(.js) .js-only { display: none !important; }
.review-list { display: grid; gap: var(--s-2); }
.review-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-3); padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); align-items: center; }
.review-item .q { font-size: var(--fs-sm); color: var(--ink-3); }
.review-item .a { font-weight: 600; margin-top: 2px; }
.review-item .a.missing { color: var(--danger); font-weight: 500; }

/* Scalp photo capture */
.angle-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s-3); }
@media (max-width: 860px) { .angle-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.angle-tile { position: relative; border: 1.5px dashed var(--line-2); border-radius: var(--r-md); background: var(--surface); aspect-ratio: 3 / 4; display: grid; place-items: center; text-align: center; overflow: hidden; cursor: pointer; transition: border-color var(--dur-1), background var(--dur-1); }
.angle-tile:hover { border-color: var(--brand); background: var(--brand-50); }
.angle-tile input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.angle-tile .ph { display: grid; gap: var(--s-2); justify-items: center; padding: var(--s-3); color: var(--ink-3); font-size: var(--fs-xs); pointer-events: none; }
.angle-tile .ph strong { color: var(--ink); font-size: var(--fs-sm); }
.angle-tile .ph svg.head { width: 64px; color: var(--brand); }
.angle-tile img.preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.angle-tile.has-photo { border-style: solid; border-color: var(--line); }
.angle-tile .tag { position: absolute; left: 8px; bottom: 8px; z-index: 1; pointer-events: none; }
.angle-tile .state { position: absolute; top: 8px; right: 8px; z-index: 1; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); box-shadow: var(--shadow-sm); pointer-events: none; }
.angle-tile.is-passed .state { background: var(--success); color: #fff; }
.angle-tile.is-flagged { border-color: var(--danger); border-style: solid; }
.angle-tile.is-flagged .state { background: var(--danger); color: #fff; }
.angle-tile .state .icon { width: 14px; height: 14px; }

.checklist { list-style: none; display: grid; gap: var(--s-2); }
.checklist li { display: flex; align-items: center; gap: var(--s-3); padding: 12px 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); font-size: var(--fs-sm); }
.checklist .st { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--ink-3); }
.checklist .st .icon { width: 14px; height: 14px; }
.checklist li.is-checking .st { background: none; border: 2px solid var(--brand); border-right-color: transparent; animation: spin 0.8s linear infinite; }
.checklist li.is-passed .st { background: var(--success); color: #fff; }
.checklist li.is-flagged .st { background: var(--danger); color: #fff; }
.checklist li.is-flagged { border-color: color-mix(in oklab, var(--danger) 30%, white); }

.analyzing { text-align: center; padding: clamp(40px, 8vw, 96px) var(--s-6); }
.analyzing .pulse { width: 120px; height: 120px; margin: 0 auto var(--s-8); border-radius: 50%; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); position: relative; }
.analyzing .pulse::before, .analyzing .pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--brand); opacity: 0; animation: pulse-ring 2.4s var(--ease) infinite; }
.analyzing .pulse::after { animation-delay: 1.2s; }
.analyzing .pulse svg { width: 56px; }

/* Before/after compare */
.compare { position: relative; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 1; background: var(--surface-2); user-select: none; touch-action: pan-y; }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.compare .after { clip-path: inset(0 0 0 var(--pos, 50%)); }
.compare .handle { position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 2px; background: #fff; transform: translateX(-1px); box-shadow: 0 0 12px rgba(0,0,0,0.3); }
.compare .handle::after { content: ""; position: absolute; top: 50%; left: 50%; width: 36px; height: 36px; border-radius: 50%; transform: translate(-50%, -50%); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23123D2E' stroke-width='2'%3E%3Cpath d='m9 6-6 6 6 6M15 6l6 6-6 6'/%3E%3C/svg%3E") center / 20px no-repeat; box-shadow: var(--shadow-md); }
.compare input[type="range"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.compare .lbl { position: absolute; top: 12px; font-size: var(--fs-xs); font-weight: 600; background: rgba(0,0,0,0.55); color: #fff; padding: 3px 10px; border-radius: var(--r-pill); }

.slot-days { display: flex; gap: var(--s-2); overflow-x: auto; padding-bottom: var(--s-2); scroll-snap-type: x mandatory; }
.slot-day { scroll-snap-align: start; flex: none; min-width: 72px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--surface); text-align: center; font-size: var(--fs-xs); color: var(--ink-3); }
.slot-day strong { display: block; font-family: var(--font-display); font-size: 1.15rem; color: var(--ink); }
.slot-day[aria-selected="true"] { border-color: var(--brand); background: var(--brand-50); color: var(--brand); }
.slot-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: var(--s-2); margin-top: var(--s-4); }
.slot-times .choice-body { min-height: 44px; padding: 8px; justify-content: center; font-weight: 600; font-size: var(--fs-sm); }
.slot-times .mark { display: none; }

.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: var(--r-pill); overflow: hidden; }
.qty button { width: 36px; height: 36px; border: 0; background: var(--surface); display: grid; place-items: center; }
.qty button:hover { background: var(--surface-2); }
.qty span, .qty input { width: 36px; text-align: center; font-weight: 600; font-size: var(--fs-sm); border: 0; background: none; }

.sticky-aside { position: sticky; top: 92px; }

/* --------------------------------------------------------------------------
   Motion
   -------------------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); transition-delay: var(--delay, 0ms); }
.reveal.is-visible { opacity: 1; transform: none; }
html:not(.js) .reveal { opacity: 1; transform: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(6px) scale(0.98); } }
@keyframes step-in { from { opacity: 0; transform: translateX(12px); } }
@keyframes pulse-ring { 0% { transform: scale(0.9); opacity: 0.6; } 100% { transform: scale(1.5); opacity: 0; } }
.page-enter { animation: fade-up var(--dur-3) var(--ease); }
@keyframes fade-up { from { opacity: 0; transform: translateY(6px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .site-footer, .sidebar, .topbar, .bottom-nav, .btn, .toasts { display: none !important; }
  .portal { display: block; }
  body { background: #fff; }
}

.capture-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--s-6); align-items: start; }
@media (max-width: 960px) { .capture-layout { grid-template-columns: minmax(0, 1fr); } }

.steps-grid { display: grid; gap: var(--s-5); grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); }
@media (max-width: 1100px) { .steps-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); } }

@media (max-width: 1023px) {
  .has-bottom-nav .q-nav { bottom: calc(62px + env(safe-area-inset-bottom)); }
}
@media (max-width: 560px) {
  .q-nav { flex-wrap: wrap; }
  .q-nav [data-photos-count] { display: none; }
  .angle-tile { aspect-ratio: 1; }
  .angle-tile .ph svg.head { width: 48px; }
}
@media (max-width: 640px) {
  .visual-panel { aspect-ratio: 16 / 11; }
  .visual-panel .head-figure { width: 44%; }
  .hero-visual { display: grid; gap: var(--s-2); }
  .float-card { position: static; max-width: none; box-shadow: var(--shadow-xs); }
  .welcome { grid-template-columns: minmax(0, 1fr); gap: var(--s-4); }
}
@media (max-width: 560px) {
  .trust-strip .container { grid-template-columns: minmax(0, 1fr); }
  .trust-item + .trust-item { border-left: 0; border-top: 1px solid var(--line); }
  .trust-item { padding: var(--s-4) var(--gutter); }
}

/* --------------------------------------------------------------------------
   Hero v2 — scalp sketch
   -------------------------------------------------------------------------- */
.announce { background: var(--brand-ink); color: color-mix(in oklab, #fff 88%, var(--brand)); font-size: var(--fs-sm); }
.announce .container { display: flex; align-items: center; justify-content: center; gap: var(--s-3); min-height: 40px; padding-block: 8px; text-align: center; flex-wrap: wrap; }
.announce a { color: #fff; font-weight: 600; }

.hero2 { position: relative; overflow: hidden; padding: clamp(32px, 5vw, 80px) 0 clamp(56px, 7vw, 104px); }
.hero2::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(55% 60% at 78% 38%, color-mix(in oklab, var(--brand) 9%, transparent) 0, transparent 70%),
    radial-gradient(40% 45% at 8% 100%, color-mix(in oklab, var(--accent) 8%, transparent) 0, transparent 70%);
}
.hero2::after {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: radial-gradient(color-mix(in oklab, var(--brand) 14%, transparent) 1px, transparent 1.2px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(60% 70% at 75% 45%, #000 20%, transparent 75%); mask-image: radial-gradient(60% 70% at 75% 45%, #000 20%, transparent 75%);
}
.hero2 .container { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
@media (max-width: 960px) { .hero2 .container { grid-template-columns: minmax(0, 1fr); } }
.hero-pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 8px; border-radius: var(--r-pill);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-xs);
  font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2);
}
.hero-pill .dot { position: relative; width: 22px; height: 22px; border-radius: 50%; background: var(--brand-100); display: grid; place-items: center; }
.hero-pill .dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.hero-pill .dot::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--accent); animation: pulse-ring 2.4s var(--ease) infinite; opacity: 0; }
.hero2 h1 { font-size: clamp(2.5rem, 1.6rem + 3vw, 4.1rem); line-height: 1.04; letter-spacing: -0.035em; margin-top: var(--s-6); }
.hero2 h1 .hl { position: relative; color: var(--brand); white-space: nowrap; }
.hero2 h1 .hl svg { position: absolute; left: -2%; bottom: -0.02em; width: 104%; height: .22em; color: var(--accent); overflow: visible; }
.hero2 h1 .hl svg path { stroke-dasharray: 260; stroke-dashoffset: 260; animation: draw 1.1s .35s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.hero2 .lead { margin-top: var(--s-6); max-width: 50ch; font-size: clamp(1.05rem, 1rem + .25vw, 1.2rem); }
.hero2 .hero-actions { margin-top: var(--s-8); }
.hero2 .hero-meta { margin-top: var(--s-8); padding-top: var(--s-6); border-top: 1px solid var(--line); gap: var(--s-3) var(--s-6); }

.scan-stage { position: relative; aspect-ratio: 560 / 600; width: 100%; max-width: 640px; margin-inline: auto; }
.scan-stage .frame {
  position: absolute; left: 3%; top: 9%; width: 90%; aspect-ratio: 1; border-radius: 50%;
  background: linear-gradient(160deg, color-mix(in oklab, var(--linen) 90%, white), var(--linen));
  border: 1px solid color-mix(in oklab, var(--line) 80%, transparent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), var(--shadow-md);
}
.scan-stage .frame::before { content: ""; position: absolute; inset: 18px; border-radius: 50%; border: 1px dashed color-mix(in oklab, var(--brand) 16%, transparent); }
.scan-stage .scalp-sketch, .scan-stage .hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; }
.scan-stage .hero-photo { inset: 6% 4% 2% 4%; width: 92%; height: 92%; object-fit: cover; border-radius: 40px; }

.scalp-sketch { --skin: color-mix(in oklab, var(--accent) 9%, #f6efe4); overflow: visible; }
.scalp-sketch .ss-ring { fill: none; stroke: color-mix(in oklab, var(--brand) 22%, transparent); stroke-width: 1; stroke-dasharray: 2 6; }
.scalp-sketch .ss-ring.faint { stroke: color-mix(in oklab, var(--brand) 10%, transparent); stroke-dasharray: none; }
.scalp-sketch .ss-ticks line { stroke: color-mix(in oklab, var(--brand) 30%, transparent); stroke-width: 1.2; stroke-linecap: round; }
.scalp-sketch .ss-ear { fill: var(--skin); stroke: var(--brand); stroke-width: 1.6; stroke-linecap: round; }
.scalp-sketch .ss-head { stroke: none; }
.scalp-sketch .ss-outline { fill: none; stroke: var(--brand); stroke-width: 2; }
.scalp-sketch .ss-hair { fill: none; stroke: var(--brand-ink); stroke-linecap: round; }
.scalp-sketch .ss-hair.h1 { stroke-width: .8; opacity: .35; }
.scalp-sketch .ss-hair.h2 { stroke-width: 1.05; opacity: .72; }
.scalp-sketch .ss-hair.h3 { stroke-width: .95; opacity: .5; }
.scalp-sketch .ss-hairline { fill: none; stroke: var(--brand); stroke-width: 1.2; stroke-dasharray: 3 4; opacity: .7; }
.scalp-sketch .ss-zone { fill: color-mix(in oklab, var(--accent) 10%, transparent); stroke: var(--accent); stroke-width: 1.2; stroke-dasharray: 3 4; }
.scalp-sketch .ss-scan { animation: ss-scan 5.5s cubic-bezier(.45,.05,.55,.95) infinite; }
.scalp-sketch .ss-scanline { stroke: var(--accent); stroke-width: 1.2; opacity: .45; }
@keyframes ss-scan { 0% { transform: translateY(0); } 50% { transform: translateY(410px); } 100% { transform: translateY(0); } }
.scalp-sketch .ss-marker circle { fill: var(--brand); }
.scalp-sketch .ss-marker circle.pulse { fill: none; stroke: var(--brand); stroke-width: 1.5; transform-box: fill-box; transform-origin: center; animation: ss-pulse 2.6s var(--ease) infinite; }
.scalp-sketch .ss-marker.accent circle { fill: var(--accent); }
.scalp-sketch .ss-marker.accent circle.pulse { fill: none; stroke: var(--accent); animation-delay: 1.2s; }
@keyframes ss-pulse { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.9); opacity: 0; } }
.scalp-sketch .ss-leader { fill: none; stroke: var(--brand); stroke-width: 1.3; stroke-dasharray: 3 4; }
.scalp-sketch .ss-lens-halo { fill: color-mix(in oklab, var(--surface) 70%, transparent); stroke: color-mix(in oklab, var(--brand) 12%, transparent); }
.scalp-sketch .ss-lens { fill: #fbf8f2; }
.scalp-sketch .ss-lens-rim { fill: none; stroke: var(--brand); stroke-width: 2.4; }
.scalp-sketch .dermis { fill: color-mix(in oklab, var(--accent) 10%, #fbefe6); }
.scalp-sketch .epi { fill: color-mix(in oklab, var(--accent) 22%, #f3d9c9); }
.scalp-sketch .surface { fill: none; stroke: color-mix(in oklab, var(--accent) 55%, var(--brand)); stroke-width: 1.4; }
.scalp-sketch .fl { fill: none; stroke: color-mix(in oklab, var(--brand) 70%, var(--accent)); stroke-width: 1.3; }
.scalp-sketch .bulb { fill: color-mix(in oklab, var(--accent) 25%, white); stroke: color-mix(in oklab, var(--brand) 70%, var(--accent)); stroke-width: 1.3; }
.scalp-sketch .pap { fill: var(--accent); }
.scalp-sketch .shaft { fill: none; stroke: var(--brand-ink); stroke-linecap: round; }
.scalp-sketch .gland { fill: color-mix(in oklab, #e8c36a 55%, white); stroke: color-mix(in oklab, #b88a2a 60%, white); stroke-width: 1; }

.ss-label {
  position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: 6px; transform: translate(-50%, -50%);
  padding: 5px 10px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line);
  font-size: 11.5px; font-weight: 600; letter-spacing: .02em; color: var(--ink-2); box-shadow: var(--shadow-sm); white-space: nowrap;
}
.ss-label::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.ss-label.accent::before { background: var(--accent); }
.scan-stage .float-card { z-index: 3; }
.scan-stage .fc-1 { top: 2%; left: -4%; }
.scan-stage .fc-2 { top: 80%; right: -5%; }
.scan-stage .fc-3 { bottom: -3%; left: 2%; }
@media (max-width: 1100px) { .scan-stage .fc-2 { right: -1%; } .scan-stage .fc-1 { left: 0; } }
@media (max-width: 640px) {
  .scan-stage { aspect-ratio: auto; display: grid; gap: var(--s-2); }
  .scan-stage .visual { position: relative; aspect-ratio: 560 / 600; }
  .scan-stage .float-card { position: static; }
  .ss-label { font-size: 10px; padding: 3px 8px; }
}
@media (min-width: 641px) { .scan-stage .visual { position: absolute; inset: 0; } }
@media (prefers-reduced-motion: reduce) { .scalp-sketch .ss-scan { display: none; } .hero2 h1 .hl svg path { stroke-dashoffset: 0; } }
.site-footer .social { display: flex; gap: 8px; flex-wrap: wrap; }
.site-footer .social a { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.18); transition: background var(--dur-1), border-color var(--dur-1); }
.site-footer .social a:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.4); }
.prose.rich h2 { font-size: var(--fs-xl); }
.prose.rich h3 { font-size: var(--fs-lg); margin-top: var(--s-8); margin-bottom: var(--s-2); color: var(--ink); }
.prose.rich a { color: var(--brand); }
.prose.rich blockquote { margin: var(--s-6) 0; padding-left: var(--s-5); border-left: 3px solid var(--accent); color: var(--ink); }
.prose.rich ol { padding-left: 1.2em; margin-top: var(--s-3); }
.featured-post { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); align-items: center; padding: 16px; }
@media (max-width: 800px) { .featured-post { grid-template-columns: minmax(0, 1fr); } }
.post-card { padding: 12px; display: grid; align-content: start; }
.tabs a.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-xs); }
.contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); }

/* --------------------------------------------------------------------------
   How it works — process timeline
   -------------------------------------------------------------------------- */
.process-section { position: relative; overflow: hidden; background: var(--brand-ink); color: #fff; }
.process-section::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(45% 60% at 100% 0%, color-mix(in oklab, var(--accent) 22%, transparent), transparent 70%),
    radial-gradient(40% 50% at 0% 100%, color-mix(in oklab, var(--brand) 60%, transparent), transparent 70%);
  opacity: .55;
}
.process-section::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .09;
  background-image: linear-gradient(rgba(255,255,255,.6) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.6) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent); mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
}
.process-section .container { position: relative; z-index: 1; }
.process-section .eyebrow { color: color-mix(in oklab, var(--accent) 55%, white); }
.process-section h2 { color: #fff; font-size: clamp(2rem, 1.4rem + 2.4vw, 3.1rem); letter-spacing: -0.03em; margin-top: var(--s-4); max-width: 16ch; }
.process-head { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--s-8); align-items: end; margin-bottom: clamp(40px, 5vw, 72px); }
.process-head-side { display: grid; gap: var(--s-6); justify-items: start; }
.process-head-side p { color: color-mix(in oklab, #fff 72%, var(--brand)); font-size: 1.05rem; line-height: 1.65; max-width: 46ch; }
@media (max-width: 860px) { .process-head { grid-template-columns: minmax(0, 1fr); align-items: start; } }

.process { list-style: none; position: relative; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: var(--s-5); }
.process-rail { position: absolute; left: calc(100% / var(--n) / 2); right: calc(100% / var(--n) / 2); top: 27px; height: 2px; background: rgba(255,255,255,.14); border-radius: 2px; }
.process-rail span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, color-mix(in oklab, var(--accent) 70%, white), var(--accent)); box-shadow: 0 0 16px color-mix(in oklab, var(--accent) 60%, transparent); transition: width 1.6s var(--ease) .2s; }
.process.is-visible .process-rail span { width: 100%; }

.process-step { position: relative; display: grid; grid-template-rows: auto 1fr; align-content: start; justify-items: center; gap: var(--s-5); }
.process-node {
  position: relative; z-index: 1; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand-ink); border: 2px solid rgba(255,255,255,.18);
  transition: border-color .4s var(--ease), background .4s var(--ease), transform .4s var(--ease), box-shadow .4s var(--ease);
  transition-delay: calc(.25s + var(--i) * (1.4s / var(--n)));
}
.process-num { font-family: var(--font-display); font-weight: 800; font-size: .95rem; letter-spacing: .02em; color: rgba(255,255,255,.55); transition: color .4s var(--ease); transition-delay: inherit; }
.process.is-visible .process-node { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 6px color-mix(in oklab, var(--accent) 22%, transparent); }
.process.is-visible .process-num { color: #fff; }

.process-card {
  width: 100%; height: 100%; padding: var(--s-6); border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.1);
  opacity: 0; transform: translateY(14px);
  transition: opacity .6s var(--ease), transform .6s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
  transition-delay: calc(.35s + var(--i) * (1.4s / var(--n))), calc(.35s + var(--i) * (1.4s / var(--n))), 0s, 0s;
}
.process.is-visible .process-card { opacity: 1; transform: none; }
.process-step:hover .process-card { border-color: color-mix(in oklab, var(--accent) 55%, transparent); background: linear-gradient(180deg, rgba(255,255,255,.1), rgba(255,255,255,.04)); }
.process-step:hover .process-node { transform: scale(1.08); }
.process-icon { width: 44px; height: 44px; border-radius: var(--r-sm); display: grid; place-items: center; background: rgba(255,255,255,.08); color: color-mix(in oklab, var(--accent) 45%, white); margin-bottom: var(--s-5); }
.process-icon .icon { width: 20px; height: 20px; }
.process-icon img { width: 26px; height: 26px; object-fit: contain; }
.process-kicker { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.45); }
.process-card h3 { color: #fff; font-size: 1.12rem; line-height: 1.3; margin-top: 0; letter-spacing: -0.01em; }
.process-text { margin-top: var(--s-3); font-size: .92rem; line-height: 1.6; color: rgba(255,255,255,.66); }

/* Tablet & mobile: vertical stepper */
@media (max-width: 1023px) {
  .process { grid-template-columns: minmax(0, 1fr); gap: var(--s-4); }
  .process-rail { left: 27px; right: auto; top: 28px; bottom: 28px; width: 2px; height: auto; }
  .process-rail span { width: 100% !important; height: 0; transition: height 1.6s var(--ease) .2s; background: linear-gradient(180deg, color-mix(in oklab, var(--accent) 70%, white), var(--accent)); }
  .process.is-visible .process-rail span { height: 100%; }
  .process-step { grid-template-columns: 56px minmax(0, 1fr); justify-items: stretch; align-items: start; gap: var(--s-4); }
  .process-card { padding: var(--s-5); }
}
html:not(.js) .process-card, .process.no-anim .process-card { opacity: 1; transform: none; }
html:not(.js) .process-rail span { width: 100%; }
@media (prefers-reduced-motion: reduce) {
  .process-card { opacity: 1; transform: none; }
  .process-rail span { transition: none; }
}

/* --------------------------------------------------------------------------
   Hair coach — home section
   -------------------------------------------------------------------------- */
.coach-card {
  display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); align-items: stretch;
  background: var(--surface); border: 1px solid color-mix(in oklab, var(--line) 80%, transparent);
  border-radius: 36px; box-shadow: var(--shadow-lg); overflow: hidden;
}
.coach-visual {
  position: relative; min-height: 520px; display: grid; place-items: end center; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(70% 60% at 50% 100%, color-mix(in oklab, var(--accent) 16%, transparent), transparent 70%),
    linear-gradient(160deg, var(--brand-50), color-mix(in oklab, var(--linen) 70%, var(--brand-100)));
}
.coach-ring { position: absolute; left: 50%; top: 54%; border-radius: 50%; transform: translate(-50%, -50%); border: 1px solid color-mix(in oklab, var(--brand) 16%, transparent); z-index: -1; }
.coach-ring.r1 { width: 78%; aspect-ratio: 1; }
.coach-ring.r2 { width: 104%; aspect-ratio: 1; border-style: dashed; opacity: .7; }
.coach-arch {
  position: relative; width: min(72%, 380px); aspect-ratio: 4 / 5; margin-top: 56px;
  border-radius: 999px 999px 0 0; overflow: hidden;
  background: linear-gradient(180deg, color-mix(in oklab, var(--brand) 14%, white), color-mix(in oklab, var(--brand) 26%, white));
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--brand) 10%, transparent);
}
.coach-arch img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; mix-blend-mode: multiply; }
.coach-arch .coach-figure { position: absolute; left: 12%; bottom: 0; width: 76%; color: var(--brand); }
.coach-chip {
  position: absolute; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 12px;
  background: color-mix(in oklab, var(--surface) 94%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-md); max-width: 260px;
}
.coach-chip strong { display: block; font-size: var(--fs-sm); line-height: 1.25; }
.coach-chip small { display: block; font-size: var(--fs-xs); color: var(--ink-3); line-height: 1.35; margin-top: 2px; }
.coach-chip.chip-top { top: 28px; left: 24px; }
.coach-chip.chip-bottom { bottom: 28px; right: 24px; }
.coach-dot { position: relative; width: 12px; height: 12px; margin: 0 4px; border-radius: 50%; background: var(--success); flex: none; }
.coach-dot::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--success); opacity: 0; animation: pulse-ring 2.4s var(--ease) infinite; }

.coach-content { padding: clamp(28px, 4.5vw, 64px); display: flex; flex-direction: column; justify-content: center; }
.coach-content h2 { margin-top: var(--s-4); font-size: clamp(2rem, 1.4rem + 2.2vw, 3rem); letter-spacing: -0.03em; }
.coach-content .lead { margin-top: var(--s-4); max-width: 46ch; }
.coach-points { list-style: none; display: grid; gap: var(--s-3); margin-top: var(--s-8); }
.coach-points li {
  display: flex; align-items: center; gap: var(--s-4); padding: 14px 16px; border-radius: var(--r-md);
  background: var(--surface-2); border: 1px solid transparent; font-weight: 500; color: var(--ink);
  transition: border-color var(--dur-2) var(--ease), background var(--dur-2) var(--ease), transform var(--dur-2) var(--ease);
}
.coach-points li:hover { background: var(--surface); border-color: var(--line); transform: translateX(3px); }
.coach-point-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--brand); color: #fff; }
.coach-point-icon .icon { width: 18px; height: 18px; }
.coach-actions { margin-top: var(--s-8); --gap: var(--s-3); }
.coach-actions .btn { min-height: 50px; padding: 0 var(--s-6); }

@media (max-width: 900px) {
  .coach-card { grid-template-columns: minmax(0, 1fr); border-radius: 28px; }
  .coach-visual { min-height: 420px; }
  .coach-arch { width: min(62%, 300px); }
}
@media (max-width: 520px) {
  .coach-visual { min-height: 440px; }
  .coach-chip small { display: none; }
  .coach-chip { max-width: 210px; padding: 10px 12px 10px 10px; }
  .coach-chip.chip-top { top: 16px; left: 14px; }
  .coach-chip.chip-bottom { bottom: 16px; right: 14px; }
  .coach-arch { width: 68%; margin-top: 96px; }
}

/* --------------------------------------------------------------------------
   Stories carousel
   -------------------------------------------------------------------------- */
.stories-section { position: relative; overflow: hidden; background: linear-gradient(180deg, var(--surface) 0%, var(--linen) 100%); border-block: 1px solid var(--line); }
.stories-section::before {
  content: "\201C"; position: absolute; right: 4%; top: -60px; font-family: Georgia, serif; font-size: 420px; line-height: 1;
  color: color-mix(in oklab, var(--brand) 5%, transparent); pointer-events: none;
}
.stories-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-8); flex-wrap: wrap; margin-bottom: clamp(28px, 4vw, 48px); }
.stories-head h2 { margin-top: var(--s-4); font-size: clamp(2rem, 1.4rem + 2.2vw, 3rem); letter-spacing: -0.03em; }
.stories-side { display: flex; align-items: center; gap: var(--s-6); flex-wrap: wrap; }
.stories-score { display: flex; align-items: center; gap: var(--s-3); padding: 10px 16px 10px 12px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.stories-score strong { font-family: var(--font-display); font-size: 2rem; line-height: 1; letter-spacing: -0.03em; }
.stories-score > div { display: grid; gap: 2px; }
.stories-controls { display: flex; gap: var(--s-2); }
.stories-controls .btn-icon { width: 46px; min-height: 46px; }
.stories-controls .i-play { display: none; }
.stories-controls [aria-pressed="true"] .i-play { display: block; }
.stories-controls [aria-pressed="true"] .i-pause { display: none; }

.stories-viewport {
  --edge: max(var(--gutter), calc((100vw - var(--container)) / 2 + var(--gutter)));
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--edge);
  padding: 8px var(--edge) 28px; scrollbar-width: none; overscroll-behavior-x: contain; outline: none;
}
.stories-viewport::-webkit-scrollbar { display: none; }
.stories-viewport:focus-visible { box-shadow: inset 0 0 0 2px var(--brand); border-radius: var(--r-md); }
.stories-track { list-style: none; display: flex; gap: var(--s-5); width: max-content; }
.story { scroll-snap-align: start; width: clamp(290px, calc((min(100vw, var(--container)) - 2 * var(--gutter) - 2 * var(--s-5)) / 3), 400px); flex: none; }
.story-card {
  height: 100%; display: flex; flex-direction: column; gap: var(--s-5); padding: clamp(22px, 2.4vw, 30px);
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-sm);
  transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease), border-color var(--dur-2);
}
.story-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--line-2); }
.story-top { display: flex; align-items: center; justify-content: space-between; }
.story-quote { width: 34px; height: 26px; color: var(--accent); opacity: .9; }
.story-card blockquote { margin: 0; flex: 1; font-size: 1.04rem; line-height: 1.7; color: var(--ink); }
.story-card footer { display: flex; align-items: center; gap: var(--s-3); padding-top: var(--s-5); border-top: 1px solid var(--line); }
.story-card footer .avatar { background: var(--brand); color: #fff; }
.story-who { display: grid; min-width: 0; flex: 1; }
.story-who strong { font-size: .95rem; }
.story-who span { font-size: var(--fs-xs); color: var(--ink-3); }
.story-photos { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; margin: calc(-1 * clamp(10px, 1vw, 14px)); margin-bottom: 0; }
.story-photos figure { position: relative; margin: 0; aspect-ratio: 1; overflow: hidden; border-radius: 16px; background: var(--surface-2); }
.story-photos img { width: 100%; height: 100%; object-fit: cover; }
.story-photos figcaption { position: absolute; left: 8px; bottom: 8px; padding: 2px 9px; border-radius: var(--r-pill); background: rgba(0,0,0,.55); color: #fff; font-size: 11px; font-weight: 600; }

.stories-progress { height: 3px; border-radius: 3px; background: color-mix(in oklab, var(--brand) 12%, transparent); overflow: hidden; max-width: 240px; }
.stories-progress span { display: block; height: 100%; width: 0; background: var(--brand); border-radius: inherit; }

@media (max-width: 1023px) { .story { width: clamp(280px, 46vw, 400px); } }
@media (max-width: 640px) {
  .story { width: 84vw; }
  .stories-head { align-items: flex-start; }
  .stories-side { width: 100%; justify-content: space-between; }
  .stories-section::before { font-size: 260px; top: -30px; }
}
.story-card:not(.has-photos) blockquote { font-family: var(--font-display); font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem); font-weight: 500; line-height: 1.55; letter-spacing: -0.01em; }
.story-card:not(.has-photos) .story-quote { width: 44px; height: 33px; }

/* ---- PROFOLIQ AI scalp scan findings ---------------------------------- */
.density-bar { height: 12px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.density-bar span { display: block; height: 100%; width: var(--value); border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--brand)); animation: density-fill .9s cubic-bezier(.2,.8,.2,1) both; transform-origin: left; }
.scan-findings .scan-patch { animation: patch-in .35s ease both; animation-delay: calc(.25s + var(--i, 0) * .08s); }
.stage-meter span { animation: patch-in .3s ease both; }
@keyframes density-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes patch-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .density-bar span, .scan-findings .scan-patch, .stage-meter span { animation: none; } }
