/* ============================================================
   MOOX — shared stylesheet
   Tokens (once, in :root) + reusable component classes.
   Pages must NOT redefine :root. Screen-specific CSS goes in
   a tiny inline <style> per page.
   Brand: #00CBDC  ->  oklch(76.9% 0.131 205.5)
   ============================================================ */

/* ---------- 1. DESIGN TOKENS (single source) ---------- */
:root{
  /* brand + hue */
  --hue: 205.5;
  --brand:        oklch(76.9% 0.131 var(--hue));   /* #00CBDC */
  --brand-deep:   oklch(53.6% 0.089 var(--hue));   /* pressed / accents */
  --brand-ink:    oklch(40% 0.07 var(--hue));      /* teal text on light */
  --brand-soft:   color-mix(in oklch, var(--brand) 16%, white);
  --brand-tint:   color-mix(in oklch, var(--brand) 8%, white);

  /* neutrals */
  --ink:      oklch(22.4% 0.026 208);   /* primary text */
  --ink-2:    oklch(45% 0.02 208);      /* secondary text */
  --muted:    oklch(62% 0.015 208);     /* placeholder / captions */
  --line:     oklch(90% 0.008 208);     /* hairlines */
  --line-2:   oklch(94% 0.006 208);
  --bg:       oklch(98.4% 0.004 208);   /* app background */
  --surface:  oklch(100% 0 0);          /* cards / sheets */
  --surface-2:oklch(96.5% 0.006 208);   /* inset / disabled field */
  --on-brand: oklch(99% 0.01 208);      /* text on brand fill */

  /* status */
  --ok:     oklch(72% 0.17 150);        /* connected / battery */
  --warn:   oklch(80% 0.15 85);
  --danger: oklch(63% 0.21 25);

  /* gradients */
  --grad-brand: linear-gradient(160deg,
                  color-mix(in oklch, var(--brand) 92%, white) 0%,
                  var(--brand) 42%,
                  var(--brand-deep) 100%);
  --grad-hero:  radial-gradient(120% 90% at 50% 0%,
                  color-mix(in oklch, var(--brand) 85%, white) 0%,
                  var(--brand) 55%,
                  var(--brand-deep) 120%);

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

  /* spacing scale */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px;
  --s5: 20px; --s6: 24px; --s7: 32px; --s8: 40px;

  /* type */
  --font: "Plus Jakarta Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --t-xs: 11px; --t-sm: 13px; --t-md: 15px; --t-lg: 18px;
  --t-xl: 22px; --t-2xl: 28px; --t-3xl: 34px;

  /* elevation */
  --sh-1: 0 1px 2px oklch(22% 0.02 208 / .06), 0 1px 3px oklch(22% 0.02 208 / .08);
  --sh-2: 0 4px 14px oklch(22% 0.02 208 / .10);
  --sh-3: 0 10px 30px oklch(22% 0.02 208 / .16);
  --sh-brand: 0 8px 24px color-mix(in oklch, var(--brand) 45%, transparent);

  /* device */
  --phone-w: 390px;
  --phone-h: 844px;

  /* motion — header collapse on scroll (home) and similar size tweens */
  --collapse-dur:  .34s;
  --collapse-ease: cubic-bezier(.4, 0, .2, 1);
}

/* Honour the OS "reduce motion" setting: keep the end states, drop the tween. */
@media (prefers-reduced-motion: reduce){
  :root{ --collapse-dur: .01s; }
}

/* ---------- 2. RESET / BASE ---------- */
*,*::before,*::after{ box-sizing:border-box; }
html,body{ margin:0; padding:0; }
body{
  font-family:var(--font);
  color:var(--ink);
  background:
    radial-gradient(60% 50% at 50% 0%, color-mix(in oklch,var(--brand) 8%,transparent), transparent 70%),
    var(--bg);
  -webkit-font-smoothing:antialiased;
  line-height:1.45;
  min-height:100vh;
}
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
button{ font-family:inherit; }
.ico{ width:22px; height:22px; flex:none; stroke:currentColor; stroke-width:1.8;
  fill:none; stroke-linecap:round; stroke-linejoin:round; }
.ico--sm{ width:18px; height:18px; }
.ico--lg{ width:28px; height:28px; }

/* ---------- 3. DEVICE FRAME (mx-phone, light DOM) ---------- */
.page-wrap{ display:flex; flex-wrap:wrap; gap:var(--s7);
  justify-content:center; align-items:flex-start; padding:var(--s7) var(--s4); }

mx-phone{ display:inline-block; }
.phone-frame{
  width:calc(var(--phone-w) + 24px);
  margin:0 auto;
}
.phone-shell{
  position:relative;
  width:calc(var(--phone-w) + 24px);
  height:calc(var(--phone-h) + 24px);
  background:oklch(18% 0.01 208);
  border-radius:54px;
  padding:12px;
  box-shadow:var(--sh-3), inset 0 0 0 2px oklch(30% 0.01 208);
}
.phone-screen{
  position:relative;
  width:var(--phone-w);
  height:var(--phone-h);
  background:var(--bg);
  border-radius:42px;
  overflow:hidden;
  display:flex;
  flex-direction:column;
}
.phone-cap{ text-align:center; margin-top:var(--s3); color:var(--ink-2);
  font-size:var(--t-sm); font-weight:600; }

/* status bar — platform aware */
.statusbar{
  height:44px; flex:none; display:flex; align-items:center;
  justify-content:space-between; padding:0 22px;
  font-size:var(--t-sm); font-weight:700; color:var(--ink);
  position:relative; z-index:5;
}
.statusbar .sb-right{ display:flex; align-items:center; gap:6px; }
.statusbar .ico{ width:17px; height:17px; }
/* iOS notch / Android punch-hole */
.phone-screen[data-os="ios"] .statusbar::after{
  content:""; position:absolute; top:8px; left:50%; transform:translateX(-50%);
  width:118px; height:28px; background:oklch(18% 0.01 208); border-radius:16px;
}
.phone-screen[data-os="android"] .sb-punch{
  position:absolute; top:14px; left:50%; transform:translateX(-50%);
  width:11px; height:11px; border-radius:50%; background:oklch(18% 0.01 208); z-index:6;
}
.phone-screen[data-os="ios"] .sb-punch{ display:none; }
.phone-screen[data-os="android"] .statusbar::after{ display:none; }

/* home indicator / nav */
.navhint{ height:26px; flex:none; display:flex; align-items:center; justify-content:center; }
.phone-screen[data-os="ios"] .navhint::before{
  content:""; width:140px; height:5px; border-radius:3px; background:oklch(30% 0.01 208); }
.phone-screen[data-os="android"] .navhint{ gap:46px; color:var(--ink-2); }
.phone-screen[data-os="android"] .navhint .ico{ width:18px; height:18px; opacity:.7; }

/* the scrollable app area */
.screen{ flex:1; min-height:0; overflow-y:auto; position:relative; display:flex; flex-direction:column; }
.screen::-webkit-scrollbar{ width:0; }
.screen-pad{ padding:var(--s4) var(--s4) var(--s8); }

/* ---------- 4. APP BARS / NAV ---------- */
.appbar{
  flex:none; display:flex; align-items:center; gap:var(--s3);
  padding:var(--s3) var(--s4); min-height:60px; background:var(--surface);
  border-bottom:1px solid var(--line);
}
.appbar__title{ flex:1; text-align:center; font-size:var(--t-lg); font-weight:800; }
.appbar__btn{
  width:40px; height:40px; display:grid; place-items:center; border-radius:var(--r-sm);
  border:1px solid var(--line); background:var(--surface); color:var(--ink); cursor:pointer;
}
.appbar__link{ color:var(--brand-ink); font-weight:700; font-size:var(--t-md); }
.appbar--plain{ background:transparent; border-bottom:0; }

/* top nav used on home / transfer / ai (segmented + avatar) */
.topnav{ flex:none; display:flex; align-items:center; gap:var(--s3);
  padding:var(--s3) var(--s4); }
.topnav--onbrand{ color:var(--on-brand); }
.seg{ display:inline-flex; background:color-mix(in oklch,var(--ink) 12%, transparent);
  border-radius:var(--r-pill); padding:4px; gap:2px; }
.topnav--onbrand .seg{ background:oklch(100% 0 0 / .22); }
.seg a, .seg button{ border:0; background:transparent; cursor:pointer; color:inherit;
  font-weight:700; font-size:var(--t-sm); padding:8px 16px; border-radius:var(--r-pill);
  opacity:.7; }
.seg a[aria-current="page"], .seg .is-active{
  background:var(--surface); color:var(--ink); opacity:1; box-shadow:var(--sh-1); }
.topnav__spacer{ flex:1; }
.avatar{ width:36px; height:36px; border-radius:50%; flex:none; display:grid; place-items:center;
  background:var(--brand-deep); color:var(--on-brand); font-weight:800; font-size:var(--t-sm); }

/* floating action button (TanyaMoo / AI) */
.fab{
  position:absolute; right:18px; bottom:22px; z-index:20;
  width:62px; height:62px; border-radius:50%; border:0; cursor:pointer;
  background:var(--grad-brand); color:var(--on-brand);
  display:grid; place-items:center;
  box-shadow:var(--sh-brand), 0 0 0 6px color-mix(in oklch,var(--brand) 18%, transparent);
}
.fab .ico{ width:30px; height:30px; stroke-width:2; }

/* sticky bottom action bar for drill-down pages */
.actionbar{
  flex:none; position:sticky; bottom:0; padding:var(--s3) var(--s4) var(--s4);
  background:linear-gradient(to top, var(--surface) 70%, transparent);
  display:flex; gap:var(--s3); border-top:1px solid var(--line-2);
}

/* ---------- 5. BUTTONS ---------- */
.btn{
  appearance:none; border:0; cursor:pointer; font-family:inherit; font-weight:700;
  font-size:var(--t-md); padding:14px 20px; border-radius:var(--r-md);
  display:inline-flex; align-items:center; justify-content:center; gap:var(--s2);
  background:var(--surface-2); color:var(--ink); transition:filter .15s, transform .05s;
}
.btn:active{ transform:translateY(1px); }
.btn--block{ display:flex; width:100%; }
.btn--lg{ padding:16px 22px; font-size:var(--t-lg); border-radius:var(--r-lg); }
/* flat solid cyan CTA — matches Figma (no gradient, no heavy shadow) */
.btn--primary{ background:var(--brand); color:#fff; box-shadow:none; }
.btn--primary:hover{ filter:brightness(1.02); }
.btn--primary:active{ background:color-mix(in oklch,var(--brand) 88%, black); }
.btn--ghost{ background:transparent; color:var(--brand-ink); border:1.5px solid var(--brand); }
.btn--soft{ background:var(--brand-soft); color:var(--brand-ink); }
.btn--google{ background:var(--surface); border:1.5px solid var(--line); color:var(--ink); }
.btn--disabled, .btn[aria-disabled="true"]{
  background:color-mix(in oklch,var(--brand-deep) 28%, var(--surface-2));
  color:color-mix(in oklch, white 70%, var(--muted)); box-shadow:none; cursor:not-allowed; }
.btn--pill{ border-radius:var(--r-pill); }
.btn--sm{ padding:9px 14px; font-size:var(--t-sm); border-radius:var(--r-pill); }

/* ---------- 6. FIELDS ---------- */
.field{ display:block; margin-bottom:var(--s5); }
.field__label{ display:block; font-size:var(--t-xs); font-weight:800; letter-spacing:.08em;
  text-transform:uppercase; color:var(--ink-2); margin:0 0 var(--s2) 4px; }
.input-wrap{ position:relative; display:flex; align-items:center; }
.input{
  width:100%; font-family:inherit; font-size:var(--t-md); color:var(--ink);
  background:var(--surface); border:1.5px solid var(--line); border-radius:var(--r-md);
  padding:15px 16px; outline:none; transition:border-color .15s, box-shadow .15s;
}
.input::placeholder{ color:var(--muted); }
.input:focus{ border-color:var(--brand); box-shadow:0 0 0 4px color-mix(in oklch,var(--brand) 18%,transparent); }
.input--trail{ padding-right:50px; }
.input__trail{ position:absolute; right:8px; width:38px; height:38px; border:0; background:transparent;
  display:grid; place-items:center; color:var(--ink-2); cursor:pointer; }

/* checkbox row */
.check{ display:flex; align-items:flex-start; gap:var(--s3); font-size:var(--t-sm); color:var(--ink-2); }
.check input{ width:20px; height:20px; accent-color:var(--brand); margin-top:1px; flex:none; }
.check a, .check b{ color:var(--brand-ink); font-weight:700; }

/* ---------- 6b. FORM STATES (validation / error / loading) ---------- */
/* invalid field: red border on input + inline message below */
.field.is-invalid .input{ border-color:var(--danger);
  box-shadow:0 0 0 4px color-mix(in oklch,var(--danger) 15%,transparent); }
.field.is-valid .input{ border-color:var(--ok); }
.field__msg{ display:none; align-items:center; gap:6px; margin:var(--s2) 0 0 4px;
  font-size:var(--t-xs); font-weight:700; line-height:1.35; color:var(--danger); }
.field__msg .ico{ width:14px; height:14px; flex:none; stroke-width:2; }
.field.is-invalid .field__msg{ display:flex; }
.field.is-valid .field__msg--ok{ display:flex; color:var(--ok); }

/* form banner (server-side result at top of the form) */
.form-banner{ display:flex; align-items:flex-start; gap:var(--s2); border-radius:var(--r-md);
  padding:12px var(--s3); margin-bottom:var(--s4); font-size:var(--t-sm); font-weight:700; line-height:1.35; }
.form-banner .ico{ width:18px; height:18px; flex:none; margin-top:1px; }
.form-banner a{ margin-left:auto; white-space:nowrap; font-weight:800; text-decoration:underline; }
.form-banner--error{ color:var(--danger);
  background:color-mix(in oklch,var(--danger) 10%, white);
  border:1px solid color-mix(in oklch,var(--danger) 28%, white); }
.form-banner--success{ color:oklch(45% 0.13 150);
  background:color-mix(in oklch,var(--ok) 14%, white);
  border:1px solid color-mix(in oklch,var(--ok) 30%, white); }

/* spinner (used inside loading buttons / overlays) */
.spinner{ display:inline-block; width:18px; height:18px; border-radius:50%;
  border:2.5px solid color-mix(in oklch, white 55%, transparent); border-top-color:#fff;
  animation:mx-spin .7s linear infinite; }
.spinner--ink{ border-color:color-mix(in oklch, var(--ink) 20%, transparent); border-top-color:var(--brand-deep); }
@keyframes mx-spin{ to{ transform:rotate(360deg); } }

/* busy button: swap label for spinner, block taps */
.btn--busy-host{ position:relative; }
.btn.is-loading{ pointer-events:none; }
.btn.is-loading .btn__label{ visibility:hidden; }
.btn .spinner{ display:none; position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); }
.btn.is-loading .spinner{ display:inline-block; }

/* ---------- 7. CHIPS / SEGMENTED FILTER ---------- */
.chips{ display:flex; gap:var(--s2); overflow-x:auto; padding:2px 0; }
.chips::-webkit-scrollbar{ height:0; }
.chip{ flex:none; border:1.5px solid var(--line); background:var(--surface); color:var(--ink-2);
  font-weight:700; font-size:var(--t-sm); padding:8px 16px; border-radius:var(--r-pill); cursor:pointer; }
.chip[aria-pressed="true"], .chip.is-active{
  background:var(--ink); color:var(--on-brand); border-color:var(--ink); }

/* ---------- 8. CARDS ---------- */
/* NOTE: cards used as <a> with block children MUST be display:block/flex
   or the background fragments into stray bars. Enforced here. */
.card{ display:block; background:var(--surface); border:1px solid var(--line);
  border-radius:var(--r-lg); padding:var(--s4); box-shadow:var(--sh-1); }
.card--pad0{ padding:0; overflow:hidden; }

/* device card (glasses + battery + status) */
.device-card{ display:block; border-radius:var(--r-lg); padding:var(--s4);
  background:var(--grad-brand); color:var(--on-brand); box-shadow:var(--sh-2); }
.device-card--light{ background:var(--surface); color:var(--ink); border:1px solid var(--line);
  box-shadow:var(--sh-1); }
.device-card__row{ display:flex; align-items:center; gap:var(--s3); }
.device-card__icon{ width:46px; height:46px; border-radius:var(--r-sm); flex:none; display:grid;
  place-items:center; background:oklch(100% 0 0 / .22); }
.device-card--light .device-card__icon{ background:var(--brand-tint); color:var(--brand-ink); }
.device-card__name{ font-weight:800; font-size:var(--t-lg); }
.device-card__meta{ font-size:var(--t-sm); opacity:.9; display:flex; align-items:center; gap:8px; }
.device-card__glasses{ display:grid; place-items:center; padding:var(--s4) 0 var(--s2); }
.device-card__glasses .ico{ width:120px; height:64px; stroke-width:1.4; }

.badge{ display:inline-flex; align-items:center; gap:6px; font-size:var(--t-xs); font-weight:800; }
.badge::before{ content:""; width:8px; height:8px; border-radius:50%; background:currentColor; }
.badge--ok{ color:var(--ok); }
.badge--off{ color:var(--muted); }

.battery{ display:inline-flex; align-items:center; gap:6px; font-weight:800; font-size:var(--t-sm); }
.battery__bar{ width:34px; height:14px; border-radius:4px; border:1.5px solid currentColor;
  position:relative; padding:2px; }
.battery__bar::after{ content:""; position:absolute; right:-4px; top:4px; width:3px; height:6px;
  background:currentColor; border-radius:0 2px 2px 0; }
.battery__fill{ height:100%; border-radius:2px; background:var(--ok); }

/* ---------- 9. MEDIA GRID (glasses captures) ---------- */
.media-head{ display:flex; align-items:center; gap:var(--s3); margin:var(--s5) 0 var(--s3); }
.media-head__title{ font-size:var(--t-xl); font-weight:800; color:var(--brand-ink); flex:1; }
.media-head__tool{ width:38px; height:38px; display:grid; place-items:center; border-radius:var(--r-sm);
  border:1px solid var(--line); background:var(--surface); color:var(--ink-2); cursor:pointer; }
.media-group{ font-size:var(--t-sm); font-weight:800; color:var(--ink-2); margin:var(--s5) 0 var(--s2); }
.media-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:6px; }
.media-card{ display:block; position:relative; aspect-ratio:1/1; border-radius:var(--r-sm);
  overflow:hidden; background:var(--surface-2); cursor:pointer; }
.media-card img{ width:100%; height:100%; object-fit:cover; }
.media-card__dur{ position:absolute; right:6px; bottom:6px; font-size:11px; font-weight:800;
  color:white; background:oklch(0% 0 0 / .55); padding:2px 7px; border-radius:var(--r-pill);
  display:inline-flex; align-items:center; gap:4px; }
.media-card__play{ position:absolute; inset:0; display:grid; place-items:center; color:white; }
.media-card__play .ico{ width:30px; height:30px; filter:drop-shadow(0 1px 3px oklch(0% 0 0 /.5)); fill:white; stroke:white; }
.media-card__check{ position:absolute; left:6px; top:6px; width:22px; height:22px; border-radius:50%;
  border:2px solid white; background:oklch(0% 0 0 /.25); display:grid; place-items:center; color:white; }
.media-card.is-selected .media-card__check{ background:var(--brand); border-color:var(--brand); }
.media-card.is-selected::after{ content:""; position:absolute; inset:0; border:3px solid var(--brand);
  border-radius:var(--r-sm); }

/* PRODUCT RULE: glasses media is a low-res preview (watermarked) until imported.
   data-state="preview" => locked/watermarked; data-state="imported" => clean. */
.media-card[data-state="preview"]::before{
  content:"MOOX"; position:absolute; inset:0; z-index:2;
  display:grid; place-items:center; font-weight:900; letter-spacing:.12em;
  color:oklch(100% 0 0 / .5); background:
    repeating-linear-gradient(135deg, oklch(0% 0 0 /.18) 0 10px, oklch(0% 0 0 /.05) 10px 20px);
  backdrop-filter:blur(2px);
}
.media-card[data-state="preview"] .media-card__lock{ position:absolute; left:6px; top:6px; z-index:3;
  color:white; }

/* ---------- 10. LIST ROWS (device discovery, settings) ---------- */
.rows{ display:flex; flex-direction:column; gap:var(--s2); }
.row{ display:flex; align-items:center; gap:var(--s3); width:100%; text-align:left;
  background:var(--surface); border:1px solid var(--line); border-radius:var(--r-md);
  padding:var(--s3) var(--s4); cursor:pointer; }
.row__icon{ width:40px; height:40px; flex:none; border-radius:var(--r-sm); display:grid;
  place-items:center; background:var(--brand-tint); color:var(--brand-ink); }
.row__main{ flex:1; min-width:0; }
.row__title{ font-weight:800; font-size:var(--t-md); }
.row__sub{ font-size:var(--t-sm); color:var(--ink-2); }

/* actionable settings row: span-wrapped title/value + trailing chevron */
.row--go{ display:flex; align-items:center; gap:var(--s3); }
.row--go > span{ flex:1; min-width:0; }
.row--go .ico{ flex:none; width:18px; height:18px; color:var(--muted); }

/* ---------- 11. BANNERS / SHEETS / TOAST ---------- */
.banner{ display:flex; align-items:center; gap:var(--s3); padding:var(--s3) var(--s4);
  border-radius:var(--r-md); background:oklch(100% 0 0 / .16); color:var(--on-brand);
  font-size:var(--t-sm); font-weight:600; }
.banner--light{ background:var(--brand-tint); color:var(--brand-ink); }
.banner__link{ margin-left:auto; font-weight:800; }

.scrim{ position:absolute; inset:0; background:oklch(15% 0.02 208 / .45); z-index:30;
  display:flex; align-items:flex-end; }
.scrim--center{ align-items:center; justify-content:center; padding:var(--s5); }
.sheet{ width:100%; background:var(--surface); border-radius:var(--r-xl) var(--r-xl) 0 0;
  padding:var(--s6) var(--s5) var(--s5); box-shadow:var(--sh-3); }
.sheet--card{ border-radius:var(--r-xl); max-width:320px; text-align:center; }
.sheet__grip{ width:40px; height:4px; border-radius:3px; background:var(--line); margin:0 auto var(--s4); }
.sheet__title{ font-size:var(--t-xl); font-weight:800; text-align:center; }
.sheet__body{ color:var(--ink-2); font-size:var(--t-sm); text-align:center; margin-top:var(--s2); }
.sheet__close{ position:absolute; right:var(--s4); top:var(--s4); width:34px; height:34px;
  border-radius:50%; border:0; background:var(--surface-2); display:grid; place-items:center; cursor:pointer; }

/* ---------- 12. HERO (onboarding) ---------- */
.hero{ position:relative; flex:1; display:flex; flex-direction:column; justify-content:flex-end;
  background:var(--grad-hero); color:var(--on-brand); padding:var(--s6); overflow:hidden; }
.hero__logo{ position:absolute; top:8%; left:var(--s6); display:flex; align-items:center; gap:10px;
  font-weight:900; font-size:var(--t-xl); letter-spacing:.02em; }
.hero__logo .ico{ width:34px; height:34px; }
.hero__title{ font-size:var(--t-3xl); font-weight:900; line-height:1.05; margin:0 0 var(--s5); }
.hero__sub{ font-size:var(--t-md); opacity:.92; margin-bottom:var(--s5); }

/* big glyph used in pairing states */
.glyph{ display:grid; place-items:center; gap:var(--s4); text-align:center; padding:var(--s7) var(--s4); }
.glyph__disc{ width:120px; height:120px; border-radius:50%; display:grid; place-items:center;
  background:var(--grad-brand); color:var(--on-brand); box-shadow:var(--sh-brand); }
.glyph__disc .ico{ width:58px; height:58px; stroke-width:2; }
.glyph__disc--muted{ background:var(--surface-2); color:var(--muted); box-shadow:none; }
.glyph__title{ font-size:var(--t-xl); font-weight:800; }
.glyph__text{ color:var(--ink-2); font-size:var(--t-sm); max-width:280px; margin:0 auto; }
.spin{ animation:mx-spin 1.1s linear infinite; }
@keyframes mx-spin{ to{ transform:rotate(360deg); } }

/* numbered steps (prepare device) */
.steps{ counter-reset:step; display:flex; flex-direction:column; gap:var(--s4); }
.step{ display:flex; gap:var(--s3); }
.step__num{ counter-increment:step; flex:none; width:28px; height:28px; border-radius:50%;
  background:var(--brand-tint); color:var(--brand-ink); font-weight:800; display:grid; place-items:center;
  font-size:var(--t-sm); }
.step__num::before{ content:counter(step); }
.step__text{ font-size:var(--t-sm); color:var(--ink-2); }

/* ---------- 13. AI CHAT (TanyaMoo) ---------- */
.chat-screen{ background:var(--grad-hero); }
.chat{ flex:1; display:flex; flex-direction:column; gap:var(--s4); padding:var(--s4); overflow-y:auto; }
.msg{ max-width:78%; padding:var(--s3) var(--s4); border-radius:var(--r-lg); font-size:var(--t-sm);
  box-shadow:var(--sh-1); }
.msg--ai{ align-self:flex-start; background:var(--surface); color:var(--ink);
  border-bottom-left-radius:6px; }
.msg--me{ align-self:flex-end; background:oklch(100% 0 0 / .9); color:var(--ink);
  border-bottom-right-radius:6px; }
.msg__media{ border-radius:var(--r-md); overflow:hidden; margin-bottom:var(--s2); }
.wave{ display:flex; align-items:center; gap:3px; height:30px; }
.wave i{ width:3px; border-radius:3px; background:var(--brand-deep); display:block; }
.composer{ flex:none; display:flex; align-items:center; gap:var(--s2); padding:var(--s3) var(--s4) var(--s4); }
.composer .input{ border-radius:var(--r-pill); background:oklch(100% 0 0 / .9); border-color:transparent; }
.composer__btn{ width:46px; height:46px; flex:none; border-radius:50%; border:0; cursor:pointer;
  background:var(--grad-brand); color:var(--on-brand); display:grid; place-items:center; box-shadow:var(--sh-brand); }
.chat-hint{ margin:auto; text-align:center; color:var(--on-brand); padding:var(--s6); }
.chat-hint .glyph__disc{ margin:0 auto var(--s4); }

/* ---------- 14. UTILITIES ---------- */
.stack{ display:grid; gap:var(--s3); }
.row-flex{ display:flex; align-items:center; gap:var(--s3); }
.spacer{ flex:1; }
.grow{ flex:1; }
.center{ text-align:center; }
.muted{ color:var(--muted); }
.divider{ display:flex; align-items:center; gap:var(--s3); color:var(--muted);
  font-size:var(--t-xs); font-weight:700; letter-spacing:.1em; margin:var(--s4) 0; }
.divider::before,.divider::after{ content:""; height:1px; background:var(--line); flex:1; }
.t-xl{ font-size:var(--t-xl); font-weight:800; }
.t-lg{ font-size:var(--t-lg); font-weight:800; }
.pad{ padding:var(--s4); }
.onbrand{ color:var(--on-brand); }

/* ---------- 14b. FIGMA-ACCURATE SURFACES ---------- */
/* MOOX brand mark wordmark (moo + star) */
.brand{ display:inline-flex; align-items:center; gap:2px; font-weight:800; font-size:26px;
  letter-spacing:-.01em; color:var(--brand-deep); }
.brand .ico{ width:30px; height:30px; color:var(--brand-deep); margin-left:-2px; }

/* welcome / onboarding: teal gradient band at top, light page below */
.welcome{ flex:1; display:flex; flex-direction:column; position:relative;
  background:
   linear-gradient(180deg,
     #0d6f78 0%, #1398a4 13%, #2bc3cf 24%, #7fe0e7 35%, #cbf1f3 43%, var(--bg) 52%); }
.welcome__art{ position:absolute; inset:0 0 auto 0; height:46%; overflow:hidden; opacity:.5;
  background:radial-gradient(60% 60% at 75% 12%, rgba(255,255,255,.5), transparent 60%); }

/* pale-aqua background with soft concentric ripple rings (pairing search/list) */
.aqua-bg{ flex:1; display:flex; flex-direction:column; position:relative;
  background-color:#a9dfe2;
  background-image:radial-gradient(circle at 50% 43%,
    #c4ebed 0%, #bce8ea 12%,
    #afe2e5 23%, #afe2e5 31%,
    #a4dcdf 41%, #a4dcdf 50%,
    #aee1e4 61%, #aee1e4 71%,
    #b9e7e9 83%, #c3eaec 100%); }
.lite-bg{ flex:1; display:flex; flex-direction:column; background:var(--bg); }

/* Figma disc asset (icon_pulse.png); --d = the SOLID disc diameter.
   The glow in the asset is off-centre, so we centre on the solid-disc centre
   (bbox 155x155 at 126,378 in 412x917) and pad the box 0.25d each side for glow. */
.pulse-disc{ --d:140px; display:block;
  width:calc(var(--d) * 1.5); height:calc(var(--d) * 1.5);
  background:url(img/icon_pulse.png) no-repeat;
  background-size:calc(var(--d) * 412 / 155) auto;
  background-position:calc(var(--d) * -0.563) calc(var(--d) * -2.189); }

/* glossy teal disc holding the white star mark, with glow */
.mark-disc{ width:150px; height:150px; border-radius:50%; display:grid; place-items:center;
  background:radial-gradient(circle at 48% 40%, #1aa6b1 0%, #11808b 55%, #0c6a74 100%);
  box-shadow:0 18px 40px rgba(12,106,116,.35),
             0 0 60px color-mix(in oklch,var(--brand) 55%, transparent),
             inset 0 -8px 22px rgba(0,0,0,.18), inset 0 8px 18px rgba(255,255,255,.18); }
.mark-disc .ico{ width:74px; height:74px; color:#fff;
  filter:drop-shadow(0 3px 6px rgba(0,0,0,.25)); }
.mark-disc--sm{ width:120px; height:120px; }
.mark-disc--sm .ico{ width:58px; height:58px; }
.mark-disc--glow{ box-shadow:0 0 50px 12px color-mix(in oklch,var(--brand) 50%, transparent),
             0 18px 50px rgba(12,106,116,.3),
             inset 0 -8px 22px rgba(0,0,0,.18), inset 0 8px 18px rgba(255,255,255,.18); }

/* plain (transparent) appbar over coloured surfaces: borderless back, dark text */
.appbar--plain{ background:transparent; border-bottom:0; }
.appbar--plain .appbar__btn{ background:transparent; border-color:transparent; }
/* numbered instruction list (decimal, hanging indent) */
.numlist{ margin:var(--s4) 0 0; padding:0 0 0 var(--s5); }
.numlist li{ margin-bottom:var(--s3); font-size:var(--t-md); color:var(--ink); line-height:1.5; }
.numlist li::marker{ font-weight:700; }
.ph-img{ width:100%; aspect-ratio:5/4; border-radius:var(--r-md); background:#d8dada; }
.dim{ background:oklch(62% 0.006 208); }

/* black wayfarer used big (paired/explore/import) */
.specs-hero{ display:grid; place-items:center; }
.specs-hero .ico{ width:200px; height:96px; color:#15171a; }

/* teal header band for home/explore (dark top, fades to app bg) */
.head-grad{ background:linear-gradient(180deg,
   #0b6f78 0%, #129aa6 34%, #34c4cf 66%, #bfeef0 100%); }
.topnav--onbrand .seg a[aria-current="page"]{ color:var(--ink); }

/* AI screens: gradient header fading to light page */
.ai-screen{ flex:1; display:flex; flex-direction:column; position:relative;
  background:linear-gradient(180deg,
    #0a6a72 0%, #149dab 18%, #4fd1db 30%, #c4f0f3 40%, var(--bg) 50%); }
.ai-screen .appbar{ background:transparent; border:0; }
.ai-screen .appbar__title{ color:#fff; text-align:left; font-size:var(--t-xl); }
.ai-screen .appbar__btn{ background:transparent; border:1.5px solid rgba(255,255,255,.6); color:#fff; }
.ai-empty{ flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center;
  text-align:center; gap:var(--s3); padding:0 var(--s6); }
.ai-empty__hi{ color:var(--ink-2); font-size:var(--t-md); margin:var(--s3) 0 0; }
.ai-empty__title{ font-size:var(--t-xl); font-weight:800; color:var(--ink); line-height:1.25; }

/* dark AI mark disc (near-black core, cyan glow) */
.mark-disc--dark{ width:128px; height:128px;
  background:radial-gradient(circle at 50% 42%, #06262b 0%, #0a3b43 48%, #128591 100%);
  box-shadow:0 0 46px 8px color-mix(in oklch,var(--brand) 55%, transparent),
             inset 0 -8px 22px rgba(0,0,0,.4), inset 0 8px 18px rgba(255,255,255,.12); }
.mark-disc--dark .ico{ width:62px; height:62px; }

/* AI voice / text input pill */
.ai-input{ margin:var(--s4); display:flex; align-items:center; gap:var(--s3);
  background:#d3f2f4; border-radius:var(--r-pill); padding:15px 20px;
  box-shadow:0 0 0 7px color-mix(in oklch,var(--brand) 12%, transparent); }
.ai-input input{ flex:1; border:0; background:transparent; font-family:inherit; font-size:var(--t-md);
  color:var(--ink); outline:none; }
.ai-input input::placeholder{ color:var(--ink-2); }
.ai-input .ico{ color:var(--brand-deep); }
.ai-input--rec{ gap:var(--s2); }
.ai-rec-cancel{ width:26px; height:26px; flex:none; border:0; border-radius:50%;
  background:var(--danger); color:#fff; display:grid; place-items:center; cursor:pointer; }
.ai-rec-cancel .ico{ width:15px; height:15px; color:#fff; }

/* chat message avatars + wave */
.bubble-row{ display:flex; align-items:flex-end; gap:8px; }
.bubble-row--me{ flex-direction:row-reverse; }
.av{ width:26px; height:26px; flex:none; border-radius:50%; display:grid; place-items:center; }
.av--me{ background:#7b5cc4; color:#fff; font-weight:800; font-size:11px; }
.av--ai{ background:#d3f2f4; color:var(--brand-deep); }
.av--ai .ico{ width:16px; height:16px; }
.chat-photo{ max-width:200px; border-radius:var(--r-md); overflow:hidden; }
.chat-photo .ph{ height:150px; }
.wave--teal i{ background:var(--brand-deep); }
.msg-dots{ align-self:flex-start; color:var(--ink-2); font-weight:800; letter-spacing:2px; padding-left:34px; }

/* ---------- 14c. STATE SELECTOR (beside the phone frame) ---------- */
.state-panel{ width:212px; align-self:flex-start; background:var(--surface); border:1px solid var(--line);
  border-radius:var(--r-lg); padding:var(--s4); box-shadow:var(--sh-1); }
.state-panel h3{ font-size:var(--t-xs); text-transform:uppercase; letter-spacing:.08em;
  color:var(--ink-2); margin:0 0 var(--s3); }
.state-chip{ display:flex; width:100%; align-items:center; gap:8px; text-align:left; cursor:pointer;
  border:1px solid var(--line); background:var(--surface); border-radius:var(--r-pill);
  padding:9px 14px; margin-bottom:8px; font-family:inherit; font-weight:700; font-size:var(--t-sm); color:var(--ink-2); }
.state-chip b{ margin-left:auto; font-size:10px; color:var(--muted); font-weight:700; }
.state-chip.is-active{ background:var(--ink); color:#fff; border-color:var(--ink); }
.state-chip.is-active b{ color:rgba(255,255,255,.6); }

/* ---------- 14d. ON-SCREEN KEYBOARD (state mock) ---------- */
.mx-kbd{ display:none; position:absolute; left:0; right:0; bottom:0; z-index:8;
  padding:8px 4px 10px; user-select:none;
  background:oklch(91% 0.006 250); border-top:1px solid color-mix(in oklch,var(--ink) 12%, transparent);
  box-shadow:0 -10px 30px rgba(15,23,42,.14); }
.mx-kbd.is-open{ display:block; animation:mx-kbd-up .22s ease-out; }
@keyframes mx-kbd-up{ from{ transform:translateY(100%); } to{ transform:translateY(0); } }
.kbd-row{ display:flex; justify-content:center; gap:6px; padding:0 4px; margin-bottom:8px; }
.kbd-row:last-child{ margin-bottom:0; }
.key{ flex:1 1 0; min-width:0; height:42px; border-radius:7px; background:#fff; color:var(--ink);
  display:grid; place-items:center; font-size:17px; font-weight:500; line-height:1;
  box-shadow:0 1px 0 rgba(15,23,42,.28); }
.key .ico{ width:20px; height:20px; stroke-width:1.6; }
.key--fn{ flex:1.5 1 0; background:oklch(80% 0.008 250); color:var(--ink-2); }
.key--fn .ico{ fill:currentColor; stroke:none; }
.key--space{ flex:5 1 0; }
.key--go{ flex:1.7 1 0; background:var(--brand); color:#fff; }
.key--go .ico{ stroke:#fff; }
/* android: flatter keys */
.phone-screen[data-os="android"] .mx-kbd{ background:oklch(97% 0.004 250); }
.phone-screen[data-os="android"] .key{ background:transparent; box-shadow:none; font-weight:600; }
.phone-screen[data-os="android"] .key--fn{ background:color-mix(in oklch,var(--ink) 7%, transparent); }
.phone-screen[data-os="android"] .key--go{ background:var(--brand); }

/* ---------- 15. INDEX HUB + GALLERY (non-device pages) ---------- */
.doc{ max-width:980px; margin:0 auto; padding:var(--s7) var(--s5) var(--s8); }
.doc h1{ font-size:var(--t-3xl); margin:0 0 var(--s2); }
.doc .lead{ color:var(--ink-2); margin:0 0 var(--s6); }
.hub-group{ margin-bottom:var(--s6); }
.hub-group h2{ font-size:var(--t-md); text-transform:uppercase; letter-spacing:.08em;
  color:var(--brand-ink); margin:0 0 var(--s3); }
.hub-row{ display:flex; align-items:center; gap:var(--s3); padding:var(--s3) var(--s4);
  border:1px solid var(--line); border-radius:var(--r-md); background:var(--surface);
  margin-bottom:var(--s2); box-shadow:var(--sh-1); }
.hub-row__no{ width:34px; height:34px; flex:none; border-radius:var(--r-sm); display:grid;
  place-items:center; background:var(--brand-tint); color:var(--brand-ink); font-weight:800; font-size:var(--t-sm); }
.hub-row__main{ flex:1; }
.hub-row__title{ font-weight:800; }
.hub-row__file{ font-size:var(--t-xs); color:var(--muted); font-family:ui-monospace,monospace; }
.hub-row__go{ color:var(--brand-ink); }

.gal-card{ border:1px solid var(--line); border-radius:var(--r-lg); background:var(--surface);
  margin-bottom:var(--s5); overflow:hidden; box-shadow:var(--sh-1); }
.gal-card__head{ display:flex; align-items:baseline; gap:var(--s3); padding:var(--s4);
  border-bottom:1px solid var(--line-2); }
.gal-card__name{ font-weight:800; }
.gal-card__tag{ margin-left:auto; font-family:ui-monospace,monospace; font-size:var(--t-xs);
  color:var(--brand-ink); background:var(--brand-tint); padding:3px 8px; border-radius:var(--r-pill); }
.gal-demo{ padding:var(--s5); display:flex; flex-wrap:wrap; gap:var(--s4); align-items:center;
  background:var(--bg); }
.gal-code{ margin:0; padding:var(--s4); background:oklch(20% 0.02 208); color:oklch(92% 0.02 208);
  font-family:ui-monospace,monospace; font-size:12px; overflow-x:auto; white-space:pre; }
.swatch{ width:120px; }
.swatch__chip{ height:56px; border-radius:var(--r-sm); border:1px solid var(--line); }
.swatch__name{ font-weight:700; font-size:var(--t-sm); margin-top:6px; }
.swatch__val{ font-family:ui-monospace,monospace; font-size:11px; color:var(--ink-2); }
.icogrid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(92px,1fr)); gap:var(--s3); }
.icocell{ border:1px solid var(--line); border-radius:var(--r-sm); padding:var(--s3); text-align:center;
  background:var(--surface); }
.icocell .ico{ width:26px; height:26px; color:var(--ink); }
.icocell span{ display:block; font-size:10px; font-family:ui-monospace,monospace; color:var(--ink-2); margin-top:6px; }

/* ---------- 14e. SHARED PHASE-1 CLASSES (centralized) ---------- */
/* Previously duplicated inline in ~30 pages. Single source now. */

/* section label — uppercase, small, bold, brand-tinted */
.eyebrow{ color:var(--brand-ink); font-size:var(--t-xs); font-weight:800;
  letter-spacing:.08em; text-transform:uppercase; }

/* info/warning banner */
.notice{ display:flex; gap:var(--s3); align-items:flex-start; padding:var(--s3);
  border-radius:var(--r-md); background:var(--brand-tint); color:var(--ink-2);
  font-size:var(--t-sm); }
.notice--error{ background:color-mix(in oklch,var(--danger) 10%,white); color:var(--danger); }

/* centered empty-state circle (icon inside) */
.empty-disc{ width:120px; height:120px; border-radius:50%; display:grid; place-items:center;
  background:var(--surface-2); color:var(--muted); margin:0 auto; }
.empty-disc .ico{ width:48px; height:48px; }

/* thin progress bar */
.progress{ height:6px; border-radius:3px; background:var(--surface-2); overflow:hidden; }
.progress i{ display:block; height:100%; border-radius:3px; background:var(--brand); }

/* media placeholder tile */
.media-tile{ display:grid; place-items:center; aspect-ratio:16/9; border-radius:var(--r-md);
  background:var(--surface-2); color:var(--muted); font-size:var(--t-sm); font-weight:600; }

/* iOS-style toggle switch */
.switch{ position:relative; width:51px; height:31px; border-radius:16px;
  background:var(--line); cursor:pointer; transition:background .2s; }
.switch i{ display:block; position:absolute; left:2px; top:2px; width:27px; height:27px;
  border-radius:50%; background:white; box-shadow:var(--sh-1); transition:transform .2s; }
.switch.is-on{ background:var(--ok); }
.switch.is-on i{ transform:translateX(20px); }

/* device choice row (card + switch) */
.choice{ display:flex; align-items:center; justify-content:space-between; gap:var(--s3); }

/* large display number/text */
.kpi{ font-size:var(--t-2xl); font-weight:900; color:var(--ink); line-height:1.1; }

/* row children: bold title + muted subtitle */
.row strong{ display:block; }
.row small{ color:var(--muted); }
.row.row--block{ display:block; }
