/* Shenameez design system — mangosteen palette, light theme.
   Single source of truth: every page uses these tokens only. */

:root {
  color-scheme: light;

  /* Brand */
  --peel-900: #241653;
  --peel-700: #4a3bc4;
  --peel-600: #5b4be0;
  --peel-500: #6c5ce7;
  --peel-300: #b3a7f0;
  --peel-100: #ede8ff;
  --leaf-700: #4a7c25;
  --leaf-600: #5c9a2e;
  --leaf-500: #66a83f;
  --leaf-100: #eaf5e2;

  /* Neutrals */
  --ink-900: #1a1130;
  --ink-700: #3a3050;
  --ink-500: #6b6182;
  --ink-300: #a69cb8;
  --ink-150: #ded7e6;
  --ink-100: #ece6f2;
  --ink-50: #f5f0e6;
  --paper: #fbf7ee;
  --paper-warm: #fffdf7;

  /* Semantic */
  --bg: var(--paper);
  --bg-soft: var(--ink-50);
  --bg-brand: var(--peel-100);
  --text: var(--ink-900);
  --text-soft: var(--ink-500);
  --line: var(--ink-100);
  --line-strong: var(--ink-150);
  --focus: var(--peel-600);
  --accent: var(--peel-600);
  --accent-strong: var(--peel-700);
  --accent-bg: var(--peel-600);
  --button-primary-bg: var(--ink-900);
  --deep-surface: #1a1130;
  --cta-leaf: #4a7c25;
  --header-bg: rgba(255, 253, 247, 0.74);
  --header-bg-scrolled: rgba(255, 253, 247, 0.94);
  --header-border: rgba(26, 17, 48, 0.09);
  --header-border-scrolled: rgba(26, 17, 48, 0.12);
  --auth-bg: rgba(255, 253, 247, 0.86);
  --auth-border: rgba(26, 17, 48, 0.1);
  --error-bg: #fdeeec;
  --error-border: #f3c2bc;
  --error-text: #8c2f22;

  /* Type */
  --font: "Inter", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --font-mono: "Geist Mono", "Cascadia Code", ui-monospace, Consolas, monospace;

  --step--1: clamp(0.83rem, 0.8rem + 0.15vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.45vw, 1.45rem);
  --step-2: clamp(1.5rem, 1.32rem + 0.85vw, 2rem);
  --step-3: clamp(1.9rem, 1.55rem + 1.6vw, 2.85rem);
  --step-4: clamp(2.4rem, 1.8rem + 2.8vw, 4.1rem);
  --step-5: clamp(3rem, 2rem + 4.6vw, 5.8rem);

  /* Space & shape */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4.5rem;
  --sp-9: 7rem;
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 32px;
  --r-pill: 999px;

  /* Elevation — soft, never harsh */
  --sh-1: 0 1px 2px rgba(20, 18, 31, 0.05);
  --sh-2: 0 6px 20px -8px rgba(20, 18, 31, 0.14);
  --sh-3: 0 24px 60px -24px rgba(46, 38, 104, 0.28);
  --sh-brand: 0 18px 44px -20px rgba(75, 63, 160, 0.5);

  --wrap: 1180px;
  --lav: #dccfff;
  --lav-hover: #e7ddff;
  --cream: #fbf7ee;
  --wrap-narrow: 760px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* The palette flips, but deep purple surfaces stay deep: the footer and moving
   strip are brand surfaces in both themes, not page backgrounds. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --peel-100: #33284e;
  --peel-300: #a899e8;
  --leaf-700: #b2db8f;
  --leaf-600: #477a28;
  --leaf-100: #26351f;
  --ink-900: #f3edff;
  --ink-700: #d7cde5;
  --ink-500: #afa3c2;
  --ink-300: #a99cba;
  --ink-150: #4b405d;
  --ink-100: #362d46;
  --ink-50: #272033;
  --paper: #211a2d;
  --paper-warm: #282032;
  --bg: #17111f;
  --bg-soft: #211a2d;
  --bg-brand: #33284e;
  --accent: #b7a8ff;
  --accent-strong: #d0c4ff;
  --accent-bg: #5b4be0;
  --button-primary-bg: #5b4be0;
  --deep-surface: #100b17;
  --lav: #3b3063;
  --lav-hover: #4b3d7a;
  --cream: #f5efff;
  --header-bg: rgba(33, 26, 45, 0.78);
  --header-bg-scrolled: rgba(33, 26, 45, 0.94);
  --header-border: rgba(226, 216, 244, 0.12);
  --header-border-scrolled: rgba(226, 216, 244, 0.17);
  --auth-bg: rgba(40, 32, 50, 0.9);
  --auth-border: rgba(226, 216, 244, 0.14);
  --error-bg: #3b2025;
  --error-border: #74403c;
  --error-text: #ffb4a8;
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
/* Any element that sets its own display outranks the browser's [hidden], which
   is how a switched-off divider or hint can stay on the page anyway. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0 0 var(--sp-4); line-height: 1.1; letter-spacing: -0.02em; font-weight: 600; text-wrap: balance; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }
p { margin: 0 0 var(--sp-4); text-wrap: pretty; }
/* Balance keeps a two-line headline from orphaning one word; pretty stops a
   paragraph from ending a line on "the". Both are free, and both are the
   difference between typeset and merely rendered. */

/* Inline links in running text are underlined. Everywhere else they are
   buttons, pills or list items, where the colour and the position already say
   they are clickable. */
main p a, main li a, main td a, main details div a {
  text-decoration: underline;
  text-decoration-color: var(--peel-300);
  text-underline-offset: 3px;
}
main p a:hover, main li a:hover, main td a:hover, main details div a:hover { text-decoration-color: currentColor; }

.display { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.025em; }
.display em { font-style: italic; color: var(--accent); }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

img, svg { max-width: 100%; height: auto; display: block; }
code, pre { font-family: var(--font-mono); font-size: 0.92em; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 2.5rem, var(--wrap-narrow)); margin-inline: auto; }
section { padding-block: clamp(3.25rem, 7vw, 5.5rem); }
.stack > * + * { margin-top: var(--sp-4); }
.center { text-align: center; }
.muted { color: var(--text-soft); }
.lede { font-size: var(--step-1); color: var(--text-soft); line-height: 1.5; max-width: 58ch; }
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-size: var(--step--1); font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: var(--sp-4);
}
.eyebrow::before {
  content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--leaf-500);
}

/* ---------------------------------------------------------------- header */
/* A floating pill rather than a full-width bar. It keeps the cream page
   visible around it, which is what makes the whole page feel lighter. */
.site-header {
  position: sticky; top: 14px; z-index: 50;
  width: min(1180px, calc(100% - 32px));
  margin: 14px auto 0;
  border-radius: 999px;
  background: var(--header-bg);
  backdrop-filter: blur(22px) saturate(170%);
  border: 1px solid var(--header-border);
  box-shadow: 0 12px 30px -24px rgba(26, 17, 48, 0.4);
  transition: background 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.site-header.is-scrolled {
  background: var(--header-bg-scrolled);
  border-color: var(--header-border-scrolled);
  box-shadow: 0 18px 44px -26px rgba(26, 17, 48, 0.5);
}
.header-inner {
  display: flex; align-items: center; gap: var(--sp-5);
  width: 100%;
  min-height: 64px; padding: 6px 8px 6px 18px;
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--ink-900); font-weight: 650; letter-spacing: -0.02em; font-size: 1.075rem; }
.brand:hover { color: var(--ink-900); }
.brand img { width: 30px; border-radius: 8px; }
.brand small { font-weight: 500; color: var(--ink-300); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; }

.nav { display: flex; align-items: center; gap: var(--sp-1); margin-left: var(--sp-3); }
/* Direct children only. The menu also holds the header action and theme control
   on a narrow screen: matching every descendant here used to repaint the
   Download button with nav-link ink, which is white text on the wrong purple. */
.nav > a {
  padding: 0.42rem 0.72rem; border-radius: var(--r-pill);
  color: var(--ink-700); font-size: 0.94rem; font-weight: 500;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}
.nav > a:hover { background: var(--bg-soft); color: var(--ink-900); }
.nav > a[aria-current="page"] { color: var(--accent); background: var(--peel-100); }
.header-cta { margin-left: auto; display: flex; align-items: center; gap: var(--sp-2); }

.theme-toggle {
  display: inline-grid; place-items: center; flex: none;
  width: 42px; height: 42px; padding: 0;
  border: 1px solid var(--line-strong); border-radius: var(--r-pill);
  background: var(--paper); color: var(--ink-700); cursor: pointer;
  transition: background 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.theme-toggle:hover { background: var(--bg-soft); color: var(--ink-900); border-color: var(--peel-300); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-icon-sun { display: none; }
:root[data-theme="dark"] .theme-icon-moon { display: none; }
:root[data-theme="dark"] .theme-icon-sun { display: block; }
.auth-theme-toggle { position: absolute; top: var(--sp-4); right: var(--sp-4); }

.nav-toggle {
  display: none; place-items: center; margin-left: auto; width: 44px; height: 44px;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--paper); cursor: pointer; color: var(--ink-700);
  -webkit-tap-highlight-color: transparent;
}
.nav-toggle svg { margin: auto; }
/* One button, two glyphs. aria-expanded is the single source of truth: site.js
   sets it, and these rules swap the hamburger for a cross so the icon and the
   screen-reader label can never disagree. */
.nav-toggle .nav-icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-icon-close { display: block; }
.nav-toggle[aria-expanded="true"] {
  background: var(--peel-100); border-color: var(--peel-300); color: var(--accent);
}

/* The menu's copy of the header action and theme control. Hidden until the menu
   exists to hold them, so nobody sees two controls on a wide screen. */
.nav-actions { display: none; gap: var(--sp-2); padding-top: var(--sp-3); margin-top: var(--sp-2); border-top: 1px solid var(--line); }
.nav-actions .btn { flex: 1; }
.nav-actions .theme-toggle { flex: 0 0 44px; }
@media (max-width: 1040px) { .nav-actions { display: flex; } }

@media (max-width: 1040px) {
  .nav-toggle { display: grid; place-items: center; }
  .nav {
    position: absolute; inset: 100% 0 auto 0; flex-direction: column; align-items: stretch;
    gap: 0; margin: 0; padding: var(--sp-3);
    background: var(--paper-warm); border: 1px solid var(--line);
    border-radius: 22px; margin-top: 8px;
    box-shadow: var(--sh-3);
    display: none;
  }
  /* A short fade keeps the drop-down from appearing as a hard flash. The menu
     also scrolls inside itself so it stays usable on short phone screens.
     Fade only, no transform: a transformed ancestor makes Chrome quantise a
     child's bounding box to subpixels mid-animation, so a 44px control can
     measure 43.99997 and fail a tap-target check. */
  .nav.is-open {
    display: flex;
    max-height: calc(100vh - 90px); overflow-y: auto;
    animation: nav-in 0.18s var(--ease);
  }
  @keyframes nav-in {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  .nav > a { padding: 0.8rem 1rem; border-radius: var(--r-sm); }
  /* Download stays in the phone header. The theme control moves into the menu
     with it rather than crowding the brand and menu button at 375px. */
  .header-cta { margin-left: var(--sp-2); gap: var(--sp-1); }
  .header-cta .theme-toggle { display: none; }
  .header-cta .btn-ghost { display: none; }
  .header-cta .btn { padding: 0.45rem 0.8rem; font-size: 0.85rem; }
}
@media (max-width: 400px) {
  .header-cta .btn { padding: 0.4rem 0.65rem; font-size: 0.8rem; }
}

/* ---------------------------------------------------------------- buttons */
.btn {
  --btn-bg: var(--accent-bg); --btn-fg: #fff; --btn-bd: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  padding: 0.72rem 1.25rem; border-radius: 12px;
  background: var(--btn-bg); color: var(--btn-fg); border: 1px solid var(--btn-bd);
  font: inherit; font-size: 0.97rem; font-weight: 600; letter-spacing: -0.01em;
  cursor: pointer; white-space: nowrap;
  transition: transform 0.16s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}
.btn:hover { color: var(--btn-fg); transform: translateY(-1px); box-shadow: var(--sh-brand); }
.btn:active { transform: translateY(0); }
.btn-primary { --btn-bg: var(--button-primary-bg); }
.btn-lav { --btn-bg: var(--lav); --btn-fg: var(--ink-900); --btn-bd: rgba(26, 17, 48, 0.22); }
.btn-lav:hover { --btn-bg: var(--lav-hover); box-shadow: 0 16px 34px -18px rgba(91, 75, 224, 0.55); }
.btn-leaf { --btn-bg: var(--leaf-600); }
.btn-dark { --btn-bg: var(--button-primary-bg); }
.btn-ghost { --btn-bg: transparent; --btn-fg: var(--ink-700); --btn-bd: var(--line-strong); }
.btn-ghost:hover { --btn-fg: var(--ink-900); box-shadow: var(--sh-1); }
.btn-lg { padding: 0.95rem 1.7rem; font-size: 1.05rem; }
.btn-sm { padding: 0.5rem 0.95rem; font-size: 0.9rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.55; pointer-events: none; }

/* ---------------------------------------------------------------- live download */
/* Hydrated by scripts/download.js. The markup inside a [data-live-download]
   host is the no-JavaScript fallback, so it has to look like a finished button
   before the script ever runs. */
.live-download { display: flex; flex-direction: column; gap: 0.4rem; min-width: min(100%, 320px); }
.live-download[data-state="checking"] .dl-button { opacity: 0.75; }
.dl-button { justify-content: flex-start; }
.dl-button::before {
  content: ""; width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.9); flex: none;
}
.live-download[data-state="ready"] .dl-button::before { background: var(--leaf-500); box-shadow: 0 0 0 3px rgba(102, 168, 63, 0.25); }
.live-download[data-state="checking"] .dl-button::before { background: rgba(255, 255, 255, 0.55); animation: dl-pulse 1.1s var(--ease) infinite; }
/* Neutral, not red: the file being briefly unreadable is not an error the
   visitor caused, and there is no warning role in this palette to borrow. */
.live-download[data-state="unreachable"] .dl-button::before { background: var(--ink-300); }
@keyframes dl-pulse { 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) {
  .live-download[data-state="checking"] .dl-button::before { animation: none; }
}
.dl-facts { margin: 0; font-size: 0.85rem; font-weight: 600; color: var(--ink-700); }
.dl-status, .dl-note { margin: 0; font-size: 0.78rem; color: var(--ink-500); }
.dl-note { color: var(--ink-500); }
.cta-band .dl-facts, .cta-band .dl-status, .cta-band .dl-note { color: rgba(255, 255, 255, 0.82); }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; overflow: clip; padding-block: var(--sp-8) var(--sp-7); }
.hero-bg {
  position: absolute; inset: -20% -10% auto -10%; height: 120%; z-index: -1;
  background:
    radial-gradient(60% 55% at 22% 12%, rgba(169, 159, 228, 0.35), transparent 65%),
    radial-gradient(50% 50% at 88% 8%, rgba(102, 168, 63, 0.18), transparent 60%),
    linear-gradient(180deg, var(--paper-warm), var(--paper));
}
.hero-grid { display: grid; gap: var(--sp-7); align-items: center; }
@media (min-width: 980px) { .hero-grid { grid-template-columns: 1.05fr 0.95fr; } }
.hero h1 { font-size: var(--step-5); line-height: 1.02; }
/* Narrow/centred heroes cannot carry the full display size without the line
   breaks falling in the middle of a phrase. */
.hero-narrow h1 { font-size: var(--step-4); }
.hero .lede { margin-top: var(--sp-5); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-6); align-items: center; }
.hero-note { font-size: var(--step--1); color: var(--ink-500); }

.platforms { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-5); }
.platform {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.4rem 0.8rem; border-radius: var(--r-pill);
  background: var(--paper); border: 1px solid var(--line);
  font-size: 0.85rem; color: var(--ink-700); box-shadow: var(--sh-1);
}

/* ---------------------------------------------------------------- surfaces */
/* Panels no longer draw a container. The site separates content with
   whitespace and hairlines instead of boxed cards. Pricing is the one
   exception: a plan comparison needs an outline to read across. */
.panel {
  background: transparent; border: 0;
  border-radius: 0; box-shadow: none;
}
.panel-pad { padding: 0; }
.panel.plan, .plan.panel {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-xl); box-shadow: var(--sh-2);
  padding: var(--sp-6);
}
.tint { background: linear-gradient(160deg, var(--paper-warm), var(--peel-100)); }

.stats { display: grid; gap: var(--sp-5); grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.stat b { display: block; font-family: var(--font-display); font-size: var(--step-3); color: var(--accent); line-height: 1; }
.stat span { font-size: var(--step--1); color: var(--text-soft); }

.grid { display: grid; gap: var(--sp-5); }
@media (min-width: 720px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }

/* Feature cells read as columns of writing, not tiles: a hairline above each
   one, no fill, no lift on hover. */
.card { padding: var(--sp-4) 0 0; border-radius: 0; background: transparent; border: 0; border-top: 1px solid var(--line); transition: none; }
.card:hover { transform: none; box-shadow: none; border-color: var(--line); }
.card h3, .card h4 { font-size: var(--step-1); margin-bottom: var(--sp-2); }
.card p { margin: 0; color: var(--text-soft); font-size: 0.96rem; }
.icon {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: var(--peel-100); color: var(--accent); margin-bottom: var(--sp-4);
}
.icon-leaf { background: var(--leaf-100); color: var(--leaf-700); }

/* ---------------------------------------------------------------- tabs */
.tabs { display: grid; gap: var(--sp-6); }
.tablist { display: flex; flex-wrap: wrap; gap: var(--sp-2); justify-content: center; }
.tab {
  padding: 0.7rem 1.15rem; border-radius: var(--r-pill); border: 1px solid var(--line-strong);
  background: var(--paper); font: inherit; font-size: 0.95rem; font-weight: 550;
  color: var(--ink-700); cursor: pointer; transition: all 0.18s var(--ease);
}
.tab:hover { border-color: var(--peel-300); color: var(--ink-900); }
.tab[aria-selected="true"] { background: var(--accent-bg); border-color: var(--accent-bg); color: #fff; box-shadow: var(--sh-brand); }
.tabpanel[hidden] { display: none; }
.tabpanel { display: grid; gap: var(--sp-6); align-items: center; }
@media (min-width: 900px) { .tabpanel { grid-template-columns: 1fr 1fr; } }

/* ---------------------------------------------------------------- demo frame */
.frame { position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--bg-soft); border: 1px solid var(--line); box-shadow: var(--sh-3); }
.frame-bar { display: flex; align-items: center; gap: 0.4rem; padding: 0.7rem 0.9rem; background: var(--paper); border-bottom: 1px solid var(--line); }
.frame-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-150); }
.frame-body { padding: clamp(1rem, 2.5vw, 1.75rem); font-size: 0.95rem; }
.frame-body .row { display: flex; gap: 0.6rem; align-items: baseline; padding: 0.5rem 0; border-bottom: 1px dashed var(--line); }
.frame-body .row:last-child { border-bottom: 0; }
.frame-body .k { color: var(--ink-500); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.07em; min-width: 84px; }
.frame-body .v { color: var(--ink-900); }
.frame-body .v ins { text-decoration: none; background: var(--leaf-100); color: var(--leaf-700); padding: 0 0.2em; border-radius: 4px; }
.frame-body .v s { color: var(--ink-300); }

/* ---------------------------------------------------------------- marquee */
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: var(--sp-4); width: max-content; animation: slide 42s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* ---------------------------------------------------------------- ribbon marquee
   The purple strap on the landing page is decorative (aria-hidden in the
   markup). Its track holds two identical copies of the phrase set, so moving
   it by exactly half its width lands on an identical frame: the loop has no
   visible seam. Keep the two halves identical when editing the copy. */
.w-ribbon-track {
  display: flex;
  width: max-content;
  will-change: transform;
  animation: w-ribbon-marquee 34s linear infinite;
}
.w-ribbon:hover .w-ribbon-track { animation-play-state: paused; }
@keyframes w-ribbon-marquee {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .w-ribbon-track { animation: none; transform: none; }
}

.quote { width: min(88vw, 400px); padding: var(--sp-5); }
.quote p { font-size: 1rem; color: var(--ink-700); margin-bottom: var(--sp-4); }
.quote footer { display: flex; align-items: center; gap: 0.7rem; font-size: 0.85rem; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--peel-100); color: var(--accent-strong); font-weight: 700; font-size: 0.8rem; }

/* ---------------------------------------------------------------- faq */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: var(--sp-4) 0; font-weight: 600; display: flex; justify-content: space-between; gap: var(--sp-4); align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--accent); font-weight: 400; transition: transform 0.2s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 0 var(--sp-4); color: var(--text-soft); max-width: 70ch; }

/* ---------------------------------------------------------------- pricing */
.plan { display: flex; flex-direction: column; gap: var(--sp-4); padding: var(--sp-6); }
.plan .price { font-family: var(--font-display); font-size: var(--step-4); line-height: 1; }
.plan .price small { font-family: var(--font); font-size: 0.9rem; color: var(--text-soft); }
.plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; font-size: 0.95rem; }
.plan li { display: flex; gap: 0.6rem; color: var(--ink-700); }
.plan li::before { content: "✓"; color: var(--leaf-600); font-weight: 700; }
.plan.is-featured { border: 2px solid var(--peel-600); box-shadow: var(--sh-3); position: relative; }
.badge { position: absolute; top: -13px; left: var(--sp-5); padding: 0.25rem 0.7rem; border-radius: var(--r-pill); background: var(--leaf-600); color: #fff; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }

/* ---------------------------------------------------------------- tables */
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { text-align: left; padding: 0.85rem 1rem; border-bottom: 1px solid var(--line); }
th { font-size: 0.78rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-500); font-weight: 600; }
tbody tr:hover { background: var(--bg-soft); }

/* ---------------------------------------------------------------- forms */
.field { display: grid; gap: 0.4rem; margin-bottom: var(--sp-4); }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--ink-700); }
input[type="email"], input[type="password"], input[type="text"], input[type="number"], textarea, select {
  width: 100%; padding: 0.8rem 0.95rem; font: inherit; font-size: 1rem;
  color: var(--ink-900); background: var(--paper);
  border: 1px solid var(--line-strong); border-radius: var(--r-md);
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}
input:focus, textarea:focus, select:focus { border-color: var(--peel-500); box-shadow: 0 0 0 4px var(--peel-100); outline: none; }
input::placeholder { color: var(--ink-300); }
/* The code boxes declare no type attribute, so the typed-input rules above
   never match them; they need their own geometry or six default-width boxes
   overflow the auth card. Equal grid columns keep the row centred at any
   width, and the paste-to-fill handler in site.js drives them by index. */
.otp {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(0.3rem, 1.8vw, 0.55rem);
}
.otp input {
  width: 100%; min-width: 0; height: 3.4rem; padding: 0;
  text-align: center; letter-spacing: 0;
  font: inherit; font-size: 1.35rem; font-family: var(--font-mono);
  color: var(--ink-900); background: var(--paper);
  border: 1px solid var(--line-strong); border-radius: var(--r-md);
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease), transform 0.16s var(--ease);
}
.otp input.is-filled {
  border-color: var(--peel-500);
  background: var(--peel-100);
  animation: otp-in 0.18s var(--ease);
}
.otp input:focus { transform: translateY(-2px); }
.otp input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px var(--paper) inset; }
@keyframes otp-in {
  from { transform: scale(0.94); }
  to { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .otp input { transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease); }
  .otp input.is-filled { animation: none; }
  .otp input:focus { transform: none; }
}
.alert { padding: 0.85rem 1rem; border-radius: var(--r-md); font-size: 0.92rem; margin-bottom: var(--sp-4); border: 1px solid; }
.alert-err { background: var(--error-bg); border-color: var(--error-border); color: var(--error-text); }
.alert-ok { background: var(--leaf-100); border-color: #bfdca6; color: var(--leaf-700); }
.alert-info { background: var(--peel-100); border-color: var(--peel-300); color: var(--accent-strong); }
.hint { font-size: 0.85rem; color: var(--ink-500); }

.code-shown {
  margin-bottom: var(--sp-4); padding: var(--sp-4);
  text-align: center; background: var(--peel-100);
  border: 1px solid var(--peel-300); border-radius: var(--r-md);
}
.code-shown-value {
  margin: 0 0 0.45rem; font-family: var(--font-mono); font-size: 2.3rem;
  letter-spacing: 0.3em; text-indent: 0.3em; color: var(--ink-900);
}
.code-shown .hint { color: var(--ink-700); }

/* ---------------------------------------------------------------- auth shell */
.auth-body { display: grid; place-items: center; min-height: 100vh; padding: var(--sp-5); background:
  radial-gradient(70% 60% at 15% 0%, rgba(169, 159, 228, 0.28), transparent 60%),
  radial-gradient(55% 50% at 95% 100%, rgba(102, 168, 63, 0.14), transparent 60%),
  var(--paper-warm); }
.auth-card {
  width: min(100%, 430px);
  padding: clamp(1.6rem, 4vw, 2.4rem);
  background: var(--auth-bg);
  border: 1px solid var(--auth-border);
  border-radius: 28px;
  box-shadow: 0 50px 90px -55px rgba(26, 17, 48, 0.55);
  backdrop-filter: blur(14px);
  position: relative;
  z-index: 1;
}
.auth-card h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.1rem, 4.5vw, 2.7rem);
  letter-spacing: -0.03em;
  line-height: 1;
}
.auth-card .brand { justify-content: center; margin-bottom: var(--sp-5); }
.auth-body::before {
  content: "";
  position: fixed; left: 50%; top: 50%;
  width: min(90vw, 760px); aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(91, 75, 224, 0.14);
  box-shadow: 0 0 0 80px rgba(91, 75, 224, 0.035), 0 0 0 160px rgba(91, 75, 224, 0.02);
  pointer-events: none;
}
.auth-alt { margin-top: var(--sp-5); text-align: center; font-size: 0.9rem; color: var(--text-soft); }
/* Used on the sign-in card for the create-account / forgot-password pair. */
.auth-link { display: inline-block; margin-top: 0.35rem; font-weight: 600; color: var(--accent); }
.auth-link:hover { color: var(--accent-strong); text-decoration: underline; }
.divider { display: flex; align-items: center; gap: var(--sp-3); color: var(--ink-500); font-size: 0.8rem; margin: var(--sp-5) 0; }
.divider::before, .divider::after { content: ""; height: 1px; background: var(--line); flex: 1; }

/* ---------------------------------------------------------------- google oauth */
.oauth-block { margin-bottom: var(--sp-1); animation: oauth-in 0.45s var(--ease) both; }
.btn-google {
  --btn-bg: var(--auth-bg, #fff);
  --btn-fg: var(--ink-900);
  --btn-bd: var(--line-strong);
  box-shadow: var(--sh-1);
  position: relative;
  overflow: hidden;
}
.btn-google:hover { box-shadow: 0 18px 34px -24px rgba(26, 17, 48, 0.55); }
.btn-google::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.65) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: google-sheen 2.6s var(--ease) 0.4s 1;
  pointer-events: none;
}
.google-mark { flex: 0 0 auto; }
@keyframes oauth-in { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }
@keyframes google-sheen { to { transform: translateX(120%); } }
@media (prefers-reduced-motion: reduce) {
  .oauth-block { animation: none; }
  .btn-google::after { animation: none; display: none; }
}

/* ---------------------------------------------------------------- live + motion */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60;
  background: transparent; pointer-events: none;
}
.scroll-progress::after {
  content: ""; display: block; height: 100%;
  width: var(--progress, 0%);
  background: linear-gradient(90deg, var(--peel-600), var(--leaf-500));
  transition: width 0.1s linear;
}

.live-strip {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3) var(--sp-5);
  padding: 0.85rem 1.2rem; border-radius: var(--r-pill);
  background: var(--paper); border: 1px solid var(--line);
  font-size: 0.85rem; color: var(--ink-500); box-shadow: var(--sh-1);
}
.live-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--leaf-500);
  box-shadow: 0 0 0 0 rgba(102, 168, 63, 0.55); animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(102, 168, 63, 0.5); }
  70% { box-shadow: 0 0 0 9px rgba(102, 168, 63, 0); }
  100% { box-shadow: 0 0 0 0 rgba(102, 168, 63, 0); }
}
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
.live-strip b { color: var(--ink-900); font-weight: 600; }
.live-strip .sep { color: var(--ink-500); }

.type-caret {
  display: inline-block; width: 2px; height: 1em; margin-left: 2px;
  background: var(--peel-600); vertical-align: -0.15em; animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.drift { position: relative; }
.drift::before, .drift::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(60px);
  z-index: -1; opacity: 0.5; pointer-events: none;
}
.drift::before { width: 42vw; height: 42vw; left: -8vw; top: -10vw; background: radial-gradient(circle, var(--peel-300), transparent 65%); animation: float 22s var(--ease) infinite alternate; }
.drift::after { width: 34vw; height: 34vw; right: -6vw; top: 4vw; background: radial-gradient(circle, var(--leaf-300, #b7dd94), transparent 65%); animation: float 28s var(--ease) infinite alternate-reverse; }
@keyframes float { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(3vw,-4vw,0) scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .drift::before, .drift::after { animation: none; } }

/* Staggered reveal. Gated on motion preference so the hidden state can never
   outlive the script that removes it for people who asked for less animation. */
@media (prefers-reduced-motion: no-preference) {
  .js .line-mask > * {
    opacity: 0; transform: translateY(18px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  }
}
.line-mask.is-in > * { opacity: 1; transform: none; }
.line-mask.is-in > *:nth-child(2) { transition-delay: 0.08s; }
.line-mask.is-in > *:nth-child(3) { transition-delay: 0.16s; }
.line-mask.is-in > *:nth-child(4) { transition-delay: 0.24s; }

/* open, unboxed sections: rules instead of cards */
.rows { border-top: 1px solid var(--line); }
.rows > div {
  display: grid; gap: var(--sp-4); padding: var(--sp-6) 0;
  border-bottom: 1px solid var(--line); align-items: start;
}
@media (min-width: 860px) { .rows > div { grid-template-columns: 4rem 1fr; gap: var(--sp-6); } }
/* Numbered rows are section-level items, so their titles are h2. The h3 rule
   stays because older pages still mark them that way, and a heading level is
   not something the reader should be able to see change. */
.rows h2, .rows h3 { font-size: var(--step-1); margin: 0 0 var(--sp-3); }
.rows p { margin: 0; color: var(--text-soft); }
.rows .num { font-family: var(--font-display); color: var(--peel-500); font-size: var(--step-2); line-height: 1; }
@media (max-width: 859px) { .rows .num { order: -1; } }

/* ---------------------------------------------------------------- footer */
.site-footer { background: var(--deep-surface); color: var(--ink-300); padding: var(--sp-8) 0 var(--sp-5); margin-top: var(--sp-8); }
.site-footer a { color: var(--ink-300); font-size: 0.92rem; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; gap: var(--sp-6); grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
/* .footer-title is an h2 wearing the old h4's clothes: the footer follows page
   sections, and h2 -> h4 is a hole in the outline a screen reader builds. */
.footer-grid h4, .footer-grid .footer-title { color: #fff; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: var(--sp-4); font-weight: 600; line-height: 1.1; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.footer-brand { max-width: 34ch; }
.footer-brand .brand { color: #fff; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: var(--sp-4); justify-content: space-between; align-items: center; margin-top: var(--sp-7); padding-top: var(--sp-5); border-top: 1px solid #2b2840; font-size: 0.85rem; }

/* ---------------------------------------------------------------- misc */
/* A closing call sits in its own band with no drop shadow; the corners stay
   curved like the rest of the site. */
/* The band carries white body text, so every stop has to clear 4.5:1 against
   white on its own. leaf-600 was the light stop and sat at 3.43 -- pretty, and
   not readable for the sentence under the heading. */
.cta-band { text-align: center; padding: var(--sp-8) var(--sp-5); border-radius: var(--r-xl); background: linear-gradient(150deg, var(--peel-700), var(--peel-600) 55%, var(--cta-leaf)); color: #fff; box-shadow: none; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, 0.85); max-width: 55ch; margin-inline: auto; }
.cta-band a:not(.btn) { color: #fff; text-decoration-color: rgba(255, 255, 255, 0.7); }
.cta-band a:not(.btn):hover { color: #fff; }
.cta-band .btn { --btn-bg: #fff; --btn-fg: var(--peel-700); }
.cta-band .btn-ghost { --btn-bg: transparent; --btn-fg: #fff; --btn-bd: rgba(255, 255, 255, 0.5); }
.cta-band .btn-ghost:hover { --btn-fg: #fff; }
.cta-band .btn:hover { box-shadow: 0 18px 44px -20px rgba(0, 0, 0, 0.45); }

.breadcrumb { font-size: 0.85rem; color: var(--ink-500); margin-bottom: var(--sp-5); }
.breadcrumb a { color: var(--ink-500); }
.breadcrumb a:hover { color: var(--accent); }

.prose { max-width: 72ch; }
.prose h2 { margin-top: var(--sp-7); font-size: var(--step-2); }
.prose h3 { margin-top: var(--sp-6); font-size: var(--step-1); }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin-bottom: 0.5rem; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: var(--sp-6) 0; }

.pill-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.pill { padding: 0.35rem 0.8rem; border-radius: var(--r-pill); background: var(--bg-soft); border: 1px solid var(--line); font-size: 0.82rem; color: var(--ink-700); }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--sp-4); top: var(--sp-4); z-index: 99; background: var(--paper); padding: 0.6rem 1rem; border-radius: var(--r-sm); border: 1px solid var(--peel-600); }

/* reveal on scroll — only when motion is welcome */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
  .reveal.is-in { opacity: 1; transform: none; }
}

/* ================================================================ mobile
   Added after the first phone pass: a wide comparison table was pushing the
   whole layout viewport to 456px on a 390px screen, and the decorative hero
   background extended past the edge. Tables now scroll inside their own
   section instead of widening the page. */
html, body { overflow-x: clip; }

@media (max-width: 760px) {
  :root { --step-4: clamp(2rem, 10vw, 2.6rem); }

  .site-header .wrap { gap: var(--sp-2); }
  /* Download is the reason this site exists, so it stays on the phone header.
     The theme control is reachable inside the menu at this width. */
  .header-cta .btn-ghost { display: none; }
  .header-cta { margin-left: auto; }
  .nav-toggle, .theme-toggle { min-width: 44px; min-height: 44px; }

  .hero { padding-block: var(--sp-6) var(--sp-7); }
  .hero-bg { max-width: 100%; }
  .hero-actions { flex-direction: column; align-items: stretch; gap: var(--sp-3); }
  .hero-actions .btn { width: 100%; min-height: 48px; }

  /* Any table wider than the screen scrolls in place. min-width:0 matters:
     without it a grid/flex parent refuses to shrink below its content. */
  .wrap, .wrap-narrow, .panel, .card, .rows > div { min-width: 0; }
  table { display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table > thead, table > tbody, table > tr, table > caption { display: table; width: 100%; }
  th, td { padding: 0.65rem 0.7rem; }

  .rows > div { grid-template-columns: 1fr; gap: var(--sp-3); padding: var(--sp-5) 0; }
  .rows .num { font-size: var(--step-1); }

  .grid-2, .grid-3, .grid-4, .hero-grid, .tabpanel { grid-template-columns: 1fr !important; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: var(--sp-5); }
  .faq summary { padding-right: var(--sp-5); }
  .live-strip { flex-wrap: wrap; }
  .btn { min-height: 44px; }
}

@media (max-width: 420px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* Real product screenshots. No frame chrome, no fake browser controls: the
   image is the evidence, so it sits on a hairline and is allowed to be read. */
.shot img { width: 100%; height: auto; display: block; border: 1px solid var(--line); border-radius: var(--r-lg); }
.shot figcaption { margin-top: var(--sp-3); color: var(--ink-500); }


/* Shaikhu sky break: text over the photograph with a scrim, no plates, no boxes. */
.sky-break{position:relative;overflow:hidden;min-height:min(78vh,720px);display:flex;align-items:center;padding-block:var(--sp-8)}
.sky-break .sky-img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:0}
.sky-break::after{content:"";position:absolute;inset:0;z-index:1;background:linear-gradient(100deg,rgba(22,9,30,.88),rgba(22,9,30,.55) 58%,rgba(22,9,30,.18))}
.sky-break .sky-copy{position:relative;z-index:2}
.sky-break .sky-copy h2,.sky-break .sky-copy p,.sky-break .sky-copy .display{color:#fff}
.sky-break .sky-copy .eyebrow{color:rgba(255,255,255,.76)}
.sky-break .sky-copy a{color:#fff;text-underline-offset:3px}
@media (max-width:760px){.sky-break{min-height:70vh}.sky-break::after{background:linear-gradient(180deg,rgba(22,9,30,.9),rgba(22,9,30,.62))}}

/* ---------------------------------------------------------------- site ribbon */
.site-ribbon {
  position: relative;
  margin: 0;
  padding: clamp(1.8rem, 4vw, 3rem) 0;
  background: var(--deep-surface);
  overflow: hidden;
  transform: rotate(-1.4deg) scale(1.03);
  box-shadow: 0 30px 60px -40px rgba(26, 17, 48, 0.7);
}
.site-ribbon-track {
  display: flex;
  width: max-content;
  animation: site-marquee 30s linear infinite;
  will-change: transform;
}
.site-ribbon-track span {
  display: inline-flex;
  align-items: center;
  gap: 1.2rem;
  padding-right: 1.2rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.1vw, 2.6rem);
  font-style: italic;
  white-space: nowrap;
  color: var(--cream);
}
.site-ribbon-track span::after {
  content: "✳";
  font-style: normal;
  font-size: 0.6em;
  color: var(--leaf-500);
}
@keyframes site-marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .site-ribbon-track { animation: none; transform: none; } }
