/*
 * Same token system and layout scales as web_mscmn2k_cleaner_a45 (type scale, spacing scale, radii,
 * fixed blurred header, ghost hero, pill buttons, 0fr -> 1fr accordion). The palette is Zeva's own,
 * lifted from the Android app's ui/theme/Color.kt — which is dark-only, so this page is too.
 */

:root {
  /* Type scale */
  --font-size-00: 0.8125rem;
  --font-size-0: 0.9375rem;
  --font-size-1: 1.0625rem;
  --font-size-2: 1.1875rem;
  --font-size-3: 1.3125rem;
  --font-size-4: 1.625rem;
  --font-size-5: 2rem;
  --font-size-6: 2.25rem;
  --font-size-7: 2.5rem;
  --font-size-8: 3rem;
  --font-size-9: 4rem;
  --font-size-fluid-2: clamp(1.625rem, 1.023rem + 3.01vw, 3.25rem);
  --font-size-fluid-4: clamp(2.375rem, 1.523rem + 4.26vw, 4.625rem);

  --line-0: 1.1;
  --line-1: 1.2;
  --line-3: 1.55;
  --line-4: 1.75;
  --tracking-tight: -0.02em;

  /* Spacing */
  --size-1: 0.25rem;
  --size-2: 0.5rem;
  --size-3: 0.75rem;
  --size-4: 1rem;
  --size-5: 1.25rem;
  --size-6: 1.5rem;
  --size-7: 1.75rem;
  --size-8: 2rem;
  --size-10: 2.5rem;
  --size-12: 3rem;
  --size-16: 4rem;
  --size-20: 5rem;
  --size-24: 6rem;
  --size-32: 8rem;
  --size-40: 10rem;

  --radius-1: 0.25rem;
  --radius-2: 0.625rem;
  --radius-3: 1rem;
  --radius-4: 2rem;
  --radius-round: 100vmax;

  /* Surfaces — the app's indigo ramp (surface / bgPanel / bgDeep / bgChip). */
  --base: #0c021e;
  --raised: #140331;
  --panel: #170436;
  --panel-strong: #1d0544;
  --chip: #29075f;
  --line: #24084f;
  --line-strong: #37116f;

  /* Accents — primary gold, colorOutline magenta, purpleGradient stops. */
  --gold: #e7c77b;
  --gold-strong: #d2a93e;
  --violet: #c42fe5;
  --violet-glow: #9d26b7;
  --violet-bright: #d059ea;
  --violet-deep: #3a0a87;
  --star: #f79009;

  /* Text — colorTitle / colorTextBody / colorTextSecondary / colorTextTertiary. */
  --ink: #ffffff;
  --body: #d3d5d8;
  --muted: #b9afd1;
  --muted-deep: #7e759b;

  --grad-headline: linear-gradient(135deg, #cce8fe, #cda0ff, #8489f5, #cdf1ff, #b591e9);
  --grad-purple: linear-gradient(180deg, #d059ea, #3a0a87);
  --grad-gold: linear-gradient(135deg, #8c421d, #fbe67b, #fcfbe7, #f7d14e, #d4a041);

  --site-width: 73.75rem;
  --layout-y: clamp(4rem, 2.364rem + 8.18vw, 8.5rem);
  --layout-x: var(--size-8);
  --header-height: 5rem;

  --font-body: Afacad, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-display: "Bricolage Grotesque", var(--font-body);
}

@media (min-width: 30rem) {
  :root { --layout-x: var(--size-16); }
}
@media (min-width: 48rem) {
  :root { --layout-x: var(--size-24); --header-height: 5.4375rem; }
}
@media (min-width: 64rem) {
  :root { --layout-x: var(--size-32); }
}
@media (min-width: 90rem) {
  :root { --layout-x: var(--size-40); }
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  font-family: var(--font-body);
  color: var(--body);
  background-color: var(--base);
  color-scheme: dark;
  -webkit-tap-highlight-color: rgb(0 0 0 / 0);
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + var(--size-4));
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: var(--line-3);
  min-height: 100%;
}

img, svg, video, canvas, picture { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, li { overflow-wrap: break-word; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); }
em { font-style: italic; }

:focus-visible {
  outline: 0.1875rem solid var(--gold);
  outline-offset: 0.1875rem;
}

::selection { background: var(--violet); color: var(--ink); }

.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: var(--size-4);
  top: var(--size-4);
  z-index: 10;
  padding: var(--size-3) var(--size-4);
  color: var(--base);
  background: var(--gold);
  border-radius: var(--radius-2);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------------------------------------------------------------- header */

.header {
  position: fixed;
  z-index: 20;
  inset: 0 0 auto 0;
  isolation: isolate;
  height: var(--header-height);
  padding: var(--size-2) var(--layout-x);
}
.header::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: color-mix(in srgb, var(--base) 82%, transparent);
  backdrop-filter: blur(0.75rem);
  border-bottom: 0.0625rem solid var(--line);
}
.header__content {
  display: flex;
  align-items: center;
  gap: var(--size-4);
  max-width: var(--site-width);
  height: 100%;
  margin: 0 auto;
}
.header-placeholder { height: var(--header-height); }

.logo {
  z-index: 2;
  display: flex;
  align-items: center;
  gap: var(--size-3);
  font-family: var(--font-display);
  font-size: var(--font-size-3);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: var(--tracking-tight);
}
.logo__mark {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-2);
}

.menu-button {
  cursor: pointer;
  z-index: 2;
  margin-left: auto;
  margin-right: calc(var(--size-4) * -1);
  padding: var(--size-4);
  background: transparent;
  border: 0;
}
.menu-button__line {
  display: block;
  width: 1.5rem;
  height: 0.125rem;
  margin-top: 0.3125rem;
  background: var(--ink);
  border-radius: var(--radius-3);
  transform-origin: center;
  transition: transform 0.3s, opacity 0.3s;
}
.menu-button__line:last-child { margin-bottom: 0.3125rem; }
.menu-button[aria-expanded="true"] .menu-button__line:first-child { transform: translateY(0.4375rem) rotate(45deg); }
.menu-button[aria-expanded="true"] .menu-button__line:nth-child(2) { opacity: 0; transform: scale(0.7); }
.menu-button[aria-expanded="true"] .menu-button__line:last-child { transform: translateY(-0.4375rem) rotate(-45deg); }

.nav { display: none; }
.nav.is-open {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--size-1);
  padding: calc(var(--header-height) + var(--size-6)) var(--size-6) var(--size-16);
  overflow-y: auto;
  background: var(--base);
}
.nav__link {
  display: block;
  padding: var(--size-4) var(--size-2);
  font-size: var(--font-size-3);
  color: var(--muted);
  text-align: center;
  transition: color 0.3s;
}
.nav__link--active { color: var(--ink); font-weight: 600; }
.nav__cta { margin-top: var(--size-4); }

@media (min-width: 64rem) {
  .menu-button { display: none; }
  .nav {
    display: flex;
    align-items: center;
    gap: var(--size-1);
    margin-left: auto;
  }
  .nav__link {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    width: auto;
    padding: var(--size-3) var(--size-3);
    font-size: var(--font-size-0);
  }
  /* Reserve the bold width up front so the active state never nudges the row. */
  .nav__link::after {
    content: attr(data-text);
    height: 0;
    overflow: hidden;
    font-weight: 600;
    visibility: hidden;
    pointer-events: none;
  }
  .nav__link:not(.nav__link--active):hover { color: var(--ink); }
  .nav__cta { margin: 0 0 0 var(--size-3); }
}

/* --------------------------------------------------------------- buttons */

.button {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--size-2);
  padding: var(--size-4) var(--size-6);
  font-size: var(--font-size-0);
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  border: 0.0625rem solid transparent;
  border-radius: var(--radius-round);
  transition: box-shadow 0.3s, transform 0.3s, background-color 0.3s, color 0.3s;
}
.button--dark { color: var(--base); background: var(--gold); border-color: var(--gold); }
.button--dark:hover { box-shadow: rgb(231 199 123 / 0.35) 0 0 0 0.25rem; }
.button--brand { color: var(--ink); background: var(--violet-deep); border-color: var(--violet); }
.button--brand:hover { background: var(--violet-glow); border-color: var(--violet-bright); }
.button--small { padding: var(--size-2) var(--size-4); }

.link {
  color: var(--gold);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 0.0625rem;
}
.link:hover { color: var(--ink); }

/* ------------------------------------------------------------------ hero */

.hero {
  position: relative;
  overflow: hidden;
  padding: calc(var(--layout-y) * 0.45) var(--layout-x) var(--layout-y);
  background: var(--base);
}
/* The app's mysticGradient, faded out sideways so the hero has the same glow as the splash. */
.hero::before {
  content: "";
  position: absolute;
  inset: -30% -10% auto -10%;
  height: 120%;
  background: radial-gradient(ellipse at 50% 0%, rgb(58 10 135 / 0.55), rgb(12 2 30 / 0) 65%);
  pointer-events: none;
}
.hero__container {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--size-16);
  max-width: var(--site-width);
  margin: 0 auto;
}

.title { display: flex; flex-direction: column; flex-shrink: 0; }
.title__logo { width: 4.5rem; height: 4.5rem; border-radius: var(--radius-3); }
.title__title {
  margin-top: var(--size-6);
  font-size: var(--font-size-fluid-4);
  font-weight: 700;
  line-height: var(--line-0);
  letter-spacing: var(--tracking-tight);
  color: #cde3ff;
  background: var(--grad-headline);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.title__description {
  margin-top: var(--size-5);
  max-width: 36rem;
  font-size: var(--font-size-1);
  line-height: var(--line-4);
  color: var(--muted);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--size-4);
  margin-top: var(--size-8);
}
.badges__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--size-3);
  padding: var(--size-3) var(--size-5);
  color: var(--base);
  background: var(--gold);
  border: 0.0625rem solid var(--gold);
  border-radius: var(--radius-3);
  transition: transform 0.4s;
}
.badges__badge:hover { transform: scale(1.04); }
.badges__badge--muted { color: var(--ink); background: var(--panel); border-color: var(--line-strong); }
.badges__label { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.badges__label small { font-size: 0.6875rem; letter-spacing: 0.08em; opacity: 0.75; }
.badges__label strong { font-family: var(--font-display); font-size: var(--font-size-2); font-weight: 600; }

.assurances {
  display: flex;
  flex-wrap: wrap;
  gap: var(--size-2) var(--size-4);
  margin-top: var(--size-6);
  padding: 0;
  list-style: none;
  font-size: var(--font-size-0);
  color: var(--muted);
}
.assurances li { display: inline-flex; align-items: center; gap: var(--size-2); }
.assurances li::before {
  content: "";
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--chip) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e7c77b' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 0.75rem no-repeat;
}

@media (min-width: 64rem) {
  .hero__container { flex-direction: row; align-items: center; justify-content: space-between; gap: var(--size-12); }
  .title { max-width: 52%; }
}

/* -------------------------------------------------------------- showcase */

.showcase { width: 100%; max-width: 26rem; margin: 0 auto; }
/* The bezel stays phone-sized while the chip row is free to use the wider column. */
.showcase__device { width: 100%; max-width: 19rem; margin: 0 auto; }
@media (min-width: 64rem) { .showcase { margin: 0; } }

/* The bezel is drawn in CSS so the screenshots stay flat captures with no device chrome baked in. */
.phone {
  position: relative;
  padding: 0.5rem;
  background: linear-gradient(160deg, #3a2a5c, #120426);
  border-radius: 2.25rem;
  box-shadow: 0 1.5rem 3.5rem rgb(157 38 183 / 0.35), 0 0 0 0.0625rem rgb(231 199 123 / 0.22);
}
.phone::after {
  content: "";
  position: absolute;
  top: 0.9rem;
  left: 50%;
  width: 3.5rem;
  height: 0.3rem;
  margin-left: -1.75rem;
  background: rgb(0 0 0 / 0.6);
  border-radius: var(--radius-round);
  pointer-events: none;
}
.phone__screen {
  position: relative;
  aspect-ratio: 640 / 1365;
  overflow: hidden;
  background: var(--base);
  border-radius: 1.85rem;
}
.phone__shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.45s ease;
}
.phone__shot.is-active { opacity: 1; }

.showcase__styles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--size-2);
  margin-top: var(--size-5);
}
.chip {
  cursor: pointer;
  padding: var(--size-2) var(--size-4);
  font-size: var(--font-size-0);
  font-weight: 600;
  color: var(--muted);
  background: var(--panel);
  border: 0.0625rem solid var(--line-strong);
  border-radius: var(--radius-round);
  transition: color 0.2s, background-color 0.2s, border-color 0.2s;
}
.chip:hover { color: var(--ink); border-color: var(--violet); }
.chip--active { color: var(--ink); background: var(--violet-deep); border-color: var(--violet-bright); }

.showcase__hint {
  margin-top: var(--size-3);
  font-size: var(--font-size-00);
  color: var(--muted-deep);
  text-align: center;
}

/* ----------------------------------------------------------------- stats */

.stats-strip {
  padding: var(--size-10) var(--layout-x);
  background: var(--raised);
  border-top: 0.0625rem solid var(--line);
  border-bottom: 0.0625rem solid var(--line);
}
.stats {
  display: grid;
  gap: var(--size-8) var(--size-4);
  grid-template-columns: repeat(2, 1fr);
  max-width: var(--site-width);
  margin: 0 auto;
  text-align: center;
}
@media (min-width: 48rem) { .stats { grid-template-columns: repeat(5, 1fr); } }
.stat { display: flex; flex-direction: column; gap: var(--size-1); }
.stat__value {
  font-family: var(--font-display);
  font-size: var(--font-size-7);
  font-weight: 700;
  line-height: 1;
  color: var(--gold);
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat__label { font-size: var(--font-size-00); color: var(--muted-deep); }

/* -------------------------------------------------------------- sections */

.section { padding: var(--layout-y) var(--layout-x); }
/* A section right under the page banner already has the banner's breathing room above it, and the
   last one already has the footer's own top padding below it — otherwise the gaps stack twice. */
.page-title + .section { padding-top: var(--size-16); }
main > .section:last-child { padding-bottom: var(--size-16); }
.section--alt { background: var(--raised); }
.section__container { max-width: var(--site-width); margin: 0 auto; }
.section__container--narrow { max-width: 48rem; }

.eyebrow {
  margin-bottom: var(--size-3);
  font-size: var(--font-size-00);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-strong);
}
.section__title {
  font-size: var(--font-size-fluid-2);
  font-weight: 700;
  line-height: var(--line-1);
  letter-spacing: var(--tracking-tight);
}
.section__title--center { text-align: center; }
.section__title--small { margin-top: var(--size-16); font-size: var(--font-size-4); }
.section__lead {
  max-width: 42rem;
  margin-top: var(--size-4);
  font-size: var(--font-size-2);
  color: var(--muted);
}
.section__more { margin-top: var(--size-8); }

/* ----------------------------------------------------------------- cards */

.cards {
  display: grid;
  gap: var(--size-4);
  margin-top: var(--size-12);
  grid-template-columns: 1fr;
}
@media (min-width: 40rem) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .cards { grid-template-columns: repeat(3, 1fr); } }

.card {
  padding: var(--size-6);
  background: var(--panel);
  border: 0.0625rem solid var(--line);
  border-radius: var(--radius-3);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.card:hover {
  border-color: var(--violet);
  transform: translateY(-0.125rem);
  box-shadow: 0 0.5rem 1.5rem rgb(157 38 183 / 0.2);
}
.card__icon {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  color: var(--gold);
  background: var(--chip);
  border-radius: var(--radius-round);
}
.card__title { margin-top: var(--size-5); font-size: var(--font-size-2); font-weight: 700; }
.card__body { margin-top: var(--size-2); font-size: var(--font-size-1); color: var(--muted); }

/* --------------------------------------------------------------- spreads */

.spreads {
  display: flex;
  gap: var(--size-4);
  margin-top: var(--size-12);
  padding: 0 var(--layout-x) var(--size-4);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.spread {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  width: min(17rem, 78vw);
  overflow: hidden;
  background: var(--panel);
  border: 0.0625rem solid var(--line-strong);
  border-radius: var(--radius-3);
  scroll-snap-align: center;
  transition: border-color 0.2s, transform 0.2s;
}
.spread:hover { border-color: var(--gold); transform: translateY(-0.125rem); }
.spread__art { width: 100%; height: auto; aspect-ratio: 430 / 573; object-fit: cover; }
.spread__text { display: flex; flex-direction: column; flex: 1; padding: var(--size-5) var(--size-5) var(--size-6); }
.spread__name { font-size: var(--font-size-2); font-weight: 700; color: var(--gold); }
.spread__count {
  margin-top: var(--size-1);
  font-size: var(--font-size-00);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-deep);
}
.spread__body { margin-top: var(--size-3); font-size: var(--font-size-0); color: var(--muted); }

/* ----------------------------------------------------------------- steps */

.steps {
  display: grid;
  gap: var(--size-6);
  margin-top: var(--size-12);
  padding: 0;
  list-style: none;
  grid-template-columns: 1fr;
}
@media (min-width: 56rem) { .steps { grid-template-columns: repeat(3, 1fr); } }

.step { padding-top: var(--size-5); border-top: 0.125rem solid var(--line-strong); }
.step__index {
  font-size: var(--font-size-0);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--gold-strong);
}
.step__title { margin-top: var(--size-3); font-size: var(--font-size-3); font-weight: 700; }
.step__body { margin-top: var(--size-2); color: var(--muted); }

/* -------------------------------------------------------------- promise */

.promise { display: grid; gap: var(--size-10); }
@media (min-width: 64rem) {
  .promise { grid-template-columns: 1fr 1fr; gap: var(--size-16); align-items: start; }
  .promise__text { position: sticky; top: calc(var(--header-height) + var(--size-8)); }
}
.promise__list {
  display: grid;
  gap: var(--size-4);
  margin: 0;
  padding: 0;
  list-style: none;
}
.promise__list li {
  padding: var(--size-5) var(--size-6);
  color: var(--muted);
  background: var(--panel-strong);
  border: 0.0625rem solid var(--line);
  border-radius: var(--radius-3);
}
.promise__list strong { display: block; font-family: var(--font-display); color: var(--ink); }

/* ------------------------------------------------------------------- faq */

.faq { display: flex; flex-direction: column; gap: var(--size-4); margin-top: var(--size-10); }
.faq__item {
  overflow: hidden;
  background: var(--panel);
  border: 0.0625rem solid var(--line-strong);
  border-radius: var(--size-3);
  transition: border-color 0.2s ease;
}
.faq__item--open { border-color: var(--gold); }
.faq__question { margin: 0; }
.faq__button {
  cursor: pointer;
  display: flex;
  gap: var(--size-4);
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--size-5) var(--size-6);
  font-family: var(--font-display);
  font-size: var(--font-size-1);
  font-weight: 600;
  color: var(--ink);
  text-align: left;
  background: transparent;
  border: 0;
}
.faq__icon {
  flex-shrink: 0;
  font-size: var(--font-size-4);
  font-weight: 300;
  line-height: 1;
  color: var(--gold);
  transition: transform 0.32s ease;
}
.faq__item--open .faq__icon { transform: rotate(45deg); }
.faq__answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.32s ease;
}
.faq__item--open .faq__answer { grid-template-rows: 1fr; }
.faq__answer-inner { overflow: hidden; padding: 0 var(--size-6); }
.faq__item--open .faq__answer-inner { padding-bottom: var(--size-6); }
.faq__answer-inner p { color: var(--muted); }

/* ----------------------------------------------------------------- facts */

.facts {
  margin-top: var(--size-10);
  background: var(--panel);
  border: 0.0625rem solid var(--line-strong);
  border-radius: var(--radius-3);
  overflow: hidden;
}
.facts__row {
  display: grid;
  gap: var(--size-1);
  padding: var(--size-4) var(--size-6);
  border-bottom: 0.0625rem solid var(--line);
}
.facts__row:last-child { border-bottom: 0; }
.facts__row dt { font-size: var(--font-size-0); font-weight: 600; color: var(--muted-deep); }
.facts__row dd { margin: 0; color: var(--body); overflow-wrap: anywhere; }
@media (min-width: 40rem) {
  .facts__row { grid-template-columns: 14rem 1fr; align-items: baseline; gap: var(--size-6); }
}

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--size-6);
  margin-top: var(--size-12);
  padding: var(--size-8);
  color: var(--ink);
  background: var(--grad-purple);
  border: 0.0625rem solid var(--violet);
  border-radius: var(--radius-3);
}
.cta--soft { background: var(--panel); border-color: var(--line-strong); }
.cta__title { font-size: var(--font-size-4); font-weight: 700; letter-spacing: var(--tracking-tight); }
.cta__body { margin-top: var(--size-2); opacity: 0.85; }

.prose-list {
  margin-top: var(--size-6);
  padding-left: var(--size-6);
  display: grid;
  gap: var(--size-3);
  color: var(--muted);
}
.prose-list strong { color: var(--ink); }

/* ------------------------------------------------------------ page title */

.page-title {
  padding: var(--size-16) var(--layout-x);
  background: linear-gradient(94.67deg, var(--panel-strong), rgb(29 5 68 / 0) 96.68%, var(--panel-strong));
  border-bottom: 0.0625rem solid var(--line);
}
.page-title__container { max-width: var(--site-width); margin: 0 auto; }
.page-title__title {
  font-size: var(--font-size-fluid-4);
  font-weight: 700;
  line-height: var(--line-0);
  letter-spacing: var(--tracking-tight);
}
.page-title__description { margin-top: var(--size-6); max-width: 46rem; font-size: var(--font-size-2); color: var(--muted); }
.page-title__meta { margin-top: var(--size-4); font-size: var(--font-size-0); color: var(--muted-deep); }

/* ----------------------------------------------------------------- legal */

.legal { padding: var(--size-16) var(--layout-x) var(--layout-y); }
.legal__container { display: grid; gap: var(--size-8); max-width: var(--site-width); margin: 0 auto; }
/* Grid items default to min-width:auto, which lets the wide permissions table push the page
   sideways instead of scrolling inside its own .table-scroll box. */
.legal__container > * { min-width: 0; }
/* A <details> so phones get the document first and the index on demand; forced open and
   stripped back to a plain sidebar heading once there is a column to put it in. */
.legal__toc {
  padding: var(--size-4) var(--size-5);
  background: var(--panel);
  border: 0.0625rem solid var(--line-strong);
  border-radius: var(--radius-2);
}
.legal__toc-title {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--size-4);
  list-style: none;
  font-size: var(--font-size-0);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-deep);
}
.legal__toc-title::-webkit-details-marker { display: none; }
.legal__toc-title::after {
  content: "";
  flex-shrink: 0;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 0.125rem solid currentColor;
  border-bottom: 0.125rem solid currentColor;
  transform: translateY(-0.125rem) rotate(45deg);
  transition: transform 0.2s ease;
}
.legal__toc[open] > .legal__toc-title::after { transform: translateY(0.0625rem) rotate(-135deg); }
/* Section titles already carry their own "1." prefix — a list marker would double it. */
.legal__toc ol { margin: var(--size-4) 0 0; padding: 0; list-style: none; display: grid; gap: var(--size-3); }
.legal__toc a { font-size: var(--font-size-0); color: var(--muted); }
.legal__toc a:hover { color: var(--gold); }

@media (min-width: 64rem) {
  .legal__container { grid-template-columns: 18rem 1fr; gap: var(--size-16); align-items: start; }
  .legal__toc {
    position: sticky;
    top: calc(var(--header-height) + var(--size-6));
    max-height: calc(100vh - var(--header-height) - var(--size-12));
    overflow-y: auto;
    padding: 0;
    background: none;
    border: 0;
  }
  .legal__toc-title { cursor: default; pointer-events: none; }
  .legal__toc-title::after { display: none; }
  .legal__toc ol { gap: var(--size-2); }
}

.legal__body { line-height: var(--line-4); color: var(--body); }
.legal__section + .legal__section { margin-top: var(--size-12); }
.legal__section h2 {
  margin-bottom: var(--size-5);
  font-size: var(--font-size-4);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
}
.legal__section h3 { margin: var(--size-8) 0 var(--size-3); font-size: var(--font-size-2); }
.legal__section p { margin-bottom: var(--size-4); }
.legal__section strong { color: var(--ink); }
.legal__section ul, .legal__section ol { margin: 0 0 var(--size-4); padding-left: var(--size-6); display: grid; gap: var(--size-2); }
.legal__section a { color: var(--gold); text-decoration: underline; text-underline-offset: 0.2em; overflow-wrap: anywhere; }
.legal__section code {
  padding: 0.1em 0.35em;
  font-size: 0.875em;
  color: var(--muted);
  background: var(--chip);
  border-radius: var(--radius-1);
  overflow-wrap: anywhere;
}
.legal__mirror {
  margin-top: var(--size-12);
  padding-top: var(--size-6);
  font-size: var(--font-size-0);
  color: var(--muted-deep);
  border-top: 0.0625rem solid var(--line-strong);
}
.legal__mirror a { color: var(--muted); text-decoration: underline; overflow-wrap: anywhere; }

.table-scroll { overflow-x: auto; margin-bottom: var(--size-6); border: 0.0625rem solid var(--line-strong); border-radius: var(--radius-2); }
.table-scroll table { width: 100%; min-width: 34rem; border-collapse: collapse; font-size: var(--font-size-0); }
.table-scroll th, .table-scroll td { padding: var(--size-3) var(--size-4); text-align: left; vertical-align: top; border-bottom: 0.0625rem solid var(--line); }
.table-scroll th { font-family: var(--font-display); font-weight: 700; color: var(--ink); background: var(--panel-strong); }
.table-scroll tbody tr:last-child td { border-bottom: 0; }

@media (max-width: 47.99rem) {
  .legal { padding-top: var(--size-10); }
  .legal__section + .legal__section { margin-top: var(--size-10); }
  .legal__section h2 { font-size: var(--font-size-3); }
  .legal__section h3 { margin-top: var(--size-6); font-size: var(--font-size-1); }
  .legal__body { font-size: var(--font-size-0); line-height: var(--line-3); }

  .table-scroll { overflow: visible; border: 0; border-radius: 0; }
  .table-scroll table { display: block; min-width: 0; }
  .table-scroll thead { display: none; }
  .table-scroll tbody, .table-scroll tr, .table-scroll td { display: block; width: 100%; }
  .table-scroll tr {
    margin-bottom: var(--size-3);
    padding: var(--size-2) 0;
    background: var(--panel);
    border: 0.0625rem solid var(--line-strong);
    border-radius: var(--radius-2);
  }
  .table-scroll td { padding: var(--size-2) var(--size-4); border-bottom: 0; }
  .table-scroll td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: var(--size-1);
    font-size: var(--font-size-00);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted-deep);
  }
  /* Permission and partner tables are name-then-explanation, so the name is the row's heading. */
  .table--defs td:first-child { padding-bottom: 0; font-weight: 700; color: var(--ink); }
  .table--defs td:first-child code { background: none; padding: 0; color: var(--gold); }

  .page-title { padding-top: var(--size-10); padding-bottom: var(--size-10); }
  .page-title__description { margin-top: var(--size-4); font-size: var(--font-size-1); }
}

/* ------------------------------------------------------------- not found */

.not-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--size-4);
  min-height: 60vh;
  padding: var(--size-16) var(--layout-x);
  text-align: center;
}
.not-found__title {
  font-family: var(--font-display);
  font-size: var(--font-size-9);
  font-weight: 700;
  line-height: var(--line-0);
  color: var(--gold);
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.not-found__subtitle { font-family: var(--font-display); font-size: var(--font-size-fluid-2); font-weight: 700; color: var(--ink); }
.not-found__description { max-width: 30rem; color: var(--muted); }
.not-found .button { margin-top: var(--size-4); }

/* ---------------------------------------------------------------- footer */

.footer { padding: var(--size-20) var(--layout-x) var(--size-8); background: var(--raised); border-top: 0.0625rem solid var(--line); }
.footer__container {
  display: grid;
  gap: var(--size-12);
  max-width: var(--site-width);
  margin: 0 auto;
}
@media (min-width: 56rem) { .footer__container { grid-template-columns: 1.2fr 2fr; } }
.footer__pitch { margin-top: var(--size-4); max-width: 26rem; font-size: var(--font-size-0); color: var(--muted); }
.footer__links { display: grid; gap: var(--size-8); grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); }
.footer__group { display: grid; gap: var(--size-2); align-content: start; }
.footer__group a { font-size: var(--font-size-0); color: var(--muted); }
.footer__group a:hover { color: var(--gold); }
.footer__group-title { font-size: var(--font-size-00); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); }

.footer__note {
  max-width: var(--site-width);
  margin: var(--size-12) auto 0;
  font-size: var(--font-size-00);
  line-height: var(--line-4);
  color: var(--muted-deep);
}

.copyright {
  display: flex;
  flex-wrap: wrap;
  gap: var(--size-2) var(--size-6);
  justify-content: space-between;
  max-width: var(--site-width);
  margin: var(--size-6) auto 0;
  padding-top: var(--size-6);
  font-size: var(--font-size-00);
  color: var(--muted-deep);
  border-top: 0.0625rem solid var(--line-strong);
}
