/* Holdout — site styles
 *
 * Colour tokens are the app's own (mobile/theme/colors.ts in the app repo), so
 * the site and the app are the same colours, in both schemes. Light is the
 * default; dark follows the device unless the visitor picks one, in which case
 * <html data-theme="light|dark"> wins.
 */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
  color-scheme: light;

  --bg: #f5f3ec;
  --bg-alt: #efebe0;
  --surface: #ffffff;
  --surface-deep: #f0ece1;
  --paper: #f3efe4;
  --line: #e6e1d3;
  --line-strong: #c9c2ac;

  --ink: #1c2b24;
  --ink-soft: #4a5a50;
  --ink-muted: #586760;
  --ink-faint: #8a968d;

  --primary: #1b7a4c;
  --primary-pressed: #14603b;
  --primary-wash: #e2f3e9;
  --on-primary: #ffffff;

  --moss: #2f4739;
  --on-hero: #f3efe4;
  --on-hero-muted: #c9d3cc;
  --hero-pill: #3b5a4a;
  --hero-highlight: #8fe3b8;

  --gold: #b8860b;
  --gold-text: #7d5b07;
  --gold-wash: #f0e7cc;

  /* Rule accents: the same hue for the same rule everywhere, as in the app. */
  --lock: #e0a426;
  --lock-fg: #7d5b07;
  --lock-wash: #f6e7c1;
  --notice: #4f6b8a;
  --notice-fg: #3f5570;
  --notice-wash: #e1e7ee;
  --cap: #d9603b;
  --cap-fg: #a5482a;
  --cap-wash: #f8e1d8;

  --shadow-sm: 0 1px 2px rgba(28, 43, 36, 0.06), 0 1px 1px rgba(28, 43, 36, 0.04);
  --shadow-md: 0 1px 2px rgba(28, 43, 36, 0.05), 0 8px 24px -8px rgba(28, 43, 36, 0.14);
  --shadow-lg: 0 2px 4px rgba(28, 43, 36, 0.05), 0 24px 60px -18px rgba(28, 43, 36, 0.28);
  --header-bg: rgba(245, 243, 236, 0.78);

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --wrap: 1160px;
  --header-h: 68px;
}

/* Dark — "forest night", from the app. Written twice: once for a device set to
   dark with no explicit choice, once for an explicit choice. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0e1511;
    --bg-alt: #121b16;
    --surface: #17211c;
    --surface-deep: #212e27;
    --paper: #17211c;
    --line: #25322b;
    --line-strong: #34443b;
    --ink: #f3efe4;
    --ink-soft: #c2ccc5;
    --ink-muted: #97a59c;
    --ink-faint: #64736a;
    --primary: #3dbe7f;
    --primary-pressed: #2fa56c;
    --primary-wash: #15382a;
    --on-primary: #052415;
    --moss: #1f5a3e;
    --on-hero: #f3efe4;
    --on-hero-muted: #cfe3d6;
    --hero-pill: #174830;
    --hero-highlight: #9aebc2;
    --gold: #e0a426;
    --gold-text: #ebc667;
    --gold-wash: #2e2711;
    --lock-fg: #ebc667;
    --lock-wash: #2e2711;
    --notice-fg: #a3bad4;
    --notice-wash: #1c2836;
    --cap-fg: #f0936f;
    --cap-wash: #3a1e14;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px -8px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.4), 0 24px 60px -18px rgba(0, 0, 0, 0.7);
    --header-bg: rgba(14, 21, 17, 0.78);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1511;
  --bg-alt: #121b16;
  --surface: #17211c;
  --surface-deep: #212e27;
  --paper: #17211c;
  --line: #25322b;
  --line-strong: #34443b;
  --ink: #f3efe4;
  --ink-soft: #c2ccc5;
  --ink-muted: #97a59c;
  --ink-faint: #64736a;
  --primary: #3dbe7f;
  --primary-pressed: #2fa56c;
  --primary-wash: #15382a;
  --on-primary: #052415;
  --moss: #1f5a3e;
  --on-hero: #f3efe4;
  --on-hero-muted: #cfe3d6;
  --hero-pill: #174830;
  --hero-highlight: #9aebc2;
  --gold: #e0a426;
  --gold-text: #ebc667;
  --gold-wash: #2e2711;
  --lock-fg: #ebc667;
  --lock-wash: #2e2711;
  --notice-fg: #a3bad4;
  --notice-wash: #1c2836;
  --cap-fg: #f0936f;
  --cap-wash: #3a1e14;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px -8px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.4), 0 24px 60px -18px rgba(0, 0, 0, 0.7);
  --header-bg: rgba(14, 21, 17, 0.78);
}

/* ── Base ─────────────────────────────────────────────────────────────── */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Colour changes glide when the theme is switched, and only then. */
html.theme-anim,
html.theme-anim *,
html.theme-anim *::before,
html.theme-anim *::after {
  transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease),
    color 0.35s var(--ease), fill 0.35s var(--ease), box-shadow 0.35s var(--ease) !important;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 6px;
}

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

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--ink);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s var(--ease);
}
.skip-link:focus {
  top: 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Buttons ──────────────────────────────────────────────────────────── */

.btn {
  --btn-bg: var(--primary);
  --btn-fg: var(--on-primary);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: inherit;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--btn-bg) 70%, transparent);
}
.btn:active {
  transform: translateY(0) scale(0.98);
  box-shadow: none;
}
.btn-primary:hover {
  --btn-bg: var(--primary-pressed);
}
.btn-secondary {
  --btn-bg: var(--surface);
  --btn-fg: var(--ink);
  border-color: var(--line-strong);
}
.btn-secondary:hover {
  border-color: var(--ink-faint);
  box-shadow: var(--shadow-md);
}
.btn-on-hero {
  --btn-bg: var(--on-hero);
  --btn-fg: #1c2b24;
}
.btn-ghost-hero {
  --btn-bg: transparent;
  --btn-fg: var(--on-hero);
  border-color: color-mix(in srgb, var(--on-hero) 35%, transparent);
}
.btn-ghost-hero:hover {
  border-color: var(--on-hero);
  box-shadow: none;
}
.btn-sm {
  min-height: 40px;
  padding: 0 16px;
  font-size: 14.5px;
}
.btn .arrow {
  width: 16px;
  height: 16px;
  transition: transform 0.3s var(--ease);
}
.btn:hover .arrow {
  transform: translateX(3px);
}

/* ── Header ───────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.site-header.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 6px 24px -18px rgba(0, 0, 0, 0.35);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 24px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.025em;
  text-decoration: none;
}
.wordmark img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  transition: transform 0.7s var(--ease);
}
.wordmark:hover img {
  transform: rotate(90deg);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 20px;
}
.nav a {
  position: relative;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.nav a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav a:hover {
  color: var(--ink);
}
.nav a:hover::after,
.nav a[aria-current="true"]::after,
.nav a[aria-current="page"]::after {
  transform: scaleX(1);
}
.nav a[aria-current="true"],
.nav a[aria-current="page"] {
  color: var(--ink);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

/* Theme switch: a three-way segmented control (Auto / Light / Dark). */
.theme-switch {
  position: relative;
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-deep);
}
.theme-switch button {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 32px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
  transition: color 0.25s var(--ease);
}
.theme-switch button:hover {
  color: var(--ink);
}
.theme-switch button[aria-pressed="true"] {
  color: var(--ink);
}
.theme-switch button svg {
  width: 16px;
  height: 16px;
  transition: transform 0.5s var(--ease-spring);
}
.theme-switch button[aria-pressed="true"] svg {
  transform: rotate(-20deg) scale(1.08);
}
.theme-switch .thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 32px;
  height: 30px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transform: translateX(calc(var(--i, 0) * 32px));
  transition: transform 0.4s var(--ease-spring);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.35s var(--ease), opacity 0.2s var(--ease);
}
.menu-open .menu-toggle span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.menu-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}
.menu-open .menu-toggle span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  inset: var(--header-h) 0 auto 0;
  z-index: 49;
  padding: 12px 20px 24px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  transform: translateY(-12px);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.35s var(--ease), opacity 0.25s var(--ease), visibility 0s linear 0.35s;
}
.menu-open .mobile-menu {
  transform: none;
  opacity: 1;
  visibility: visible;
  transition: transform 0.35s var(--ease), opacity 0.25s var(--ease);
}
.mobile-menu a:not(.btn) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 17px;
  font-weight: 500;
  text-decoration: none;
}
.mobile-menu .menu-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

@media (max-width: 920px) {
  .nav,
  .header-actions .theme-switch,
  .header-actions .btn {
    display: none;
  }
  .menu-toggle {
    display: block;
  }
}
@media (min-width: 921px) {
  .mobile-menu {
    display: none;
  }
}

/* ── Sections ─────────────────────────────────────────────────────────── */

section {
  position: relative;
  padding: 112px 0;
}
.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-head {
  max-width: 720px;
  margin-bottom: 56px;
}
.section-head.center {
  margin-inline: auto;
  text-align: center;
}
.section-head h2 {
  font-size: clamp(32px, 4.2vw, 46px);
}
.section-head p {
  margin-top: 18px;
  color: var(--ink-soft);
  font-size: 19px;
}
.section-head .eyebrow {
  margin-top: 0;
  color: var(--primary);
  font-size: 13px;
}

/* ── Hero ─────────────────────────────────────────────────────────────── */

.hero {
  padding: 72px 0 96px;
  overflow: hidden;
}
.hero::before {
  /* Soft brand glow behind the phone. */
  content: "";
  position: absolute;
  top: -20%;
  right: -10%;
  width: 780px;
  height: 780px;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--primary) 16%, transparent), transparent);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  align-items: center;
  gap: 64px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px;
  padding: 6px 14px 6px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: border-color 0.2s var(--ease), transform 0.25s var(--ease);
}
.badge:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}
.badge .arrow,
.mobile-menu a .arrow {
  width: 15px;
  height: 15px;
  color: var(--ink-muted);
  transition: transform 0.3s var(--ease);
}
.badge:hover .arrow,
.mobile-menu a:hover .arrow {
  transform: translateX(3px);
}
.badge .dot {
  position: relative;
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--primary-wash);
  color: var(--primary);
  font-size: 12px;
  font-weight: 650;
}
.pulse {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
}
.pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse 2.2s var(--ease) infinite;
}
@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  100% {
    transform: scale(3.2);
    opacity: 0;
  }
}

.hero h1 {
  font-size: clamp(44px, 6.4vw, 76px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.02;
}
.hero h1 .accent {
  color: var(--primary);
}
.hero .lede {
  max-width: 560px;
  margin-top: 24px;
  color: var(--ink-soft);
  font-size: clamp(18px, 1.6vw, 20px);
  line-height: 1.55;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}
.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 500;
}
.hero-points li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-points svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
  flex: none;
}

/* The phone: an illustration of the app, built in HTML so it follows the theme. */
.device-stage {
  position: relative;
  display: flex;
  justify-content: center;
  perspective: 1400px;
}
.device {
  position: relative;
  width: 330px;
  padding: 12px;
  border-radius: 48px;
  background: #0b100d;
  box-shadow: var(--shadow-lg), inset 0 0 0 1.5px #2a332d;
  transform: rotateY(-8deg) rotateX(4deg);
  transform-style: preserve-3d;
  transition: transform 0.9s var(--ease);
}
.device-stage:hover .device {
  transform: rotateY(-3deg) rotateX(2deg);
}
.screen {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  padding: 46px 16px 20px;
  border-radius: 38px;
  background: var(--bg);
}
.screen::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 50%;
  width: 96px;
  height: 26px;
  border-radius: 999px;
  background: #0b100d;
  transform: translateX(-50%);
}
.app-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 0 4px;
}
.app-bar .hi {
  color: var(--ink-muted);
  font-size: 12px;
}
.app-bar .name {
  color: var(--ink);
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.app-bar img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
}

.hero-card {
  padding: 18px;
  border-radius: 22px;
  background: var(--moss);
  color: var(--on-hero);
}
.hero-card .label {
  color: var(--on-hero-muted);
  font-size: 12px;
  font-weight: 500;
}
.hero-card .amount {
  margin-top: 4px;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.hero-card .pills {
  display: flex;
  gap: 6px;
  margin-top: 14px;
}
.hero-card .pill {
  flex: 1;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--hero-pill);
}
.hero-card .pill span {
  display: block;
  color: var(--on-hero-muted);
  font-size: 10.5px;
}
.hero-card .pill b {
  font-size: 13px;
  font-weight: 650;
}
.hero-card .pill b.hl {
  color: var(--hero-highlight);
}

.app-section-title {
  margin: 18px 4px 8px;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 600;
}
.goal {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.goal .disc {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex: none;
  color: #fff;
}
.goal .disc svg {
  width: 18px;
  height: 18px;
}
.goal .meta {
  flex: 1;
  min-width: 0;
}
.goal .meta b {
  display: block;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
}
.goal .meta span {
  color: var(--ink-muted);
  font-size: 11.5px;
}
.goal .val {
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.goal .bar {
  height: 5px;
  margin-top: 7px;
  border-radius: 999px;
  background: var(--surface-deep);
  overflow: hidden;
}
.goal .bar i {
  display: block;
  height: 100%;
  width: var(--w, 0%);
  border-radius: inherit;
  background: var(--primary);
  transition: width 1.6s var(--ease);
}

.request {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--notice) 35%, var(--line));
  border-radius: 16px;
  background: var(--notice-wash);
}
.request .row {
  display: flex;
  justify-content: space-between;
  color: var(--notice-fg);
  font-size: 12px;
  font-weight: 600;
}
.request .row span:last-child {
  font-variant-numeric: tabular-nums;
}
.request .track {
  height: 6px;
  margin-top: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--notice) 20%, transparent);
  overflow: hidden;
}
.request .track i {
  display: block;
  height: 100%;
  width: var(--w, 0%);
  border-radius: inherit;
  background: var(--notice);
  transition: width 1.8s var(--ease);
}

/* Floating notes around the phone. */
.float {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 10px 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  animation: bob 6s ease-in-out infinite;
}
.float small {
  display: block;
  color: var(--ink-muted);
  font-size: 11.5px;
  font-weight: 500;
}
.float .ico {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
}
.float .ico svg {
  width: 17px;
  height: 17px;
}
.float-a {
  top: 44%;
  left: -4%;
}
.float-b {
  bottom: 4%;
  right: -6%;
  animation-delay: -3s;
}
@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@media (max-width: 1020px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 56px;
  }
  .hero-copy {
    text-align: center;
  }
  .hero .lede {
    margin-inline: auto;
  }
  .hero-actions,
  .hero-points {
    justify-content: center;
  }
  .float-a {
    left: 2%;
  }
  .float-b {
    right: 2%;
  }
}
@media (max-width: 520px) {
  .hero {
    padding-top: 40px;
  }
  .device {
    width: 290px;
    transform: none;
  }
  .screen {
    min-height: 560px;
  }
  .float {
    display: none;
  }
  .hero-actions .btn {
    flex: 1 1 100%;
  }
}

/* ── Problem / principle band ─────────────────────────────────────────── */

.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.principle {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}
.principle:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}
.principle .num {
  color: var(--primary);
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}
.principle h3 {
  margin-top: 18px;
  font-size: 20px;
}
.principle p {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 16px;
}
@media (max-width: 860px) {
  .principles {
    grid-template-columns: 1fr;
  }
}

/* ── How it works ─────────────────────────────────────────────────────── */

.how-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 72px;
  align-items: start;
}
.how-grid .section-head {
  position: sticky;
  top: calc(var(--header-h) + 48px);
  margin-bottom: 0;
}
.steps {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps::before,
.steps::after {
  content: "";
  position: absolute;
  left: 23px;
  top: 24px;
  bottom: 24px;
  width: 2px;
  border-radius: 2px;
  background: var(--line);
}
.steps::after {
  background: var(--primary);
  transform-origin: top;
  transform: scaleY(var(--progress, 0));
  transition: transform 0.2s linear;
}
.step {
  position: relative;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 24px;
  padding-bottom: 44px;
}
.step:last-child {
  padding-bottom: 0;
}
.step .n {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  background: var(--bg);
  color: var(--ink-muted);
  font-weight: 700;
  transition: border-color 0.4s var(--ease), background-color 0.4s var(--ease),
    color 0.4s var(--ease), transform 0.5s var(--ease-spring);
}
.step.active .n {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--on-primary);
  transform: scale(1.06);
}
.step .card {
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}
.step.active .card {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}
.step h3 {
  font-size: 21px;
}
.step p {
  margin-top: 8px;
  color: var(--ink-soft);
}
.step .note {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--primary-wash);
  color: var(--ink);
  font-size: 14.5px;
}
.step .note svg {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: var(--primary);
  flex: none;
}
@media (max-width: 920px) {
  .how-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .how-grid .section-head {
    position: static;
  }
}

/* ── Rules ────────────────────────────────────────────────────────────── */

.rules {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.rule {
  --c: var(--notice);
  --fg: var(--notice-fg);
  --wash: var(--notice-wash);
  display: flex;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}
.rule:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--c) 45%, var(--line));
}
.rule.lock {
  --c: var(--lock);
  --fg: var(--lock-fg);
  --wash: var(--lock-wash);
}
.rule.cap {
  --c: var(--cap);
  --fg: var(--cap-fg);
  --wash: var(--cap-wash);
}
.rule .icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--wash);
  color: var(--fg);
  transition: transform 0.5s var(--ease-spring);
}
.rule:hover .icon {
  transform: rotate(-8deg) scale(1.08);
}
.rule .icon svg {
  width: 24px;
  height: 24px;
}
.rule h3 {
  margin-top: 20px;
  font-size: 21px;
}
.rule > p {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 16px;
}

.demo {
  margin-top: auto;
  padding-top: 24px;
}
.demo-box {
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface-deep);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  padding: 6px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  font: inherit;
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease),
    transform 0.2s var(--ease);
}
.chip:hover {
  border-color: var(--c);
  color: var(--ink);
}
.chip:active {
  transform: scale(0.95);
}
.chip[aria-pressed="true"] {
  border-color: var(--c);
  background: var(--c);
  color: #fff;
}
.rule.lock .chip[aria-pressed="true"] {
  color: #4a3400;
}
.demo-out {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  color: var(--ink-muted);
  font-size: 13.5px;
}
.demo-out b {
  color: var(--fg);
  font-size: 15px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.flip {
  display: inline-block;
  animation: flip 0.45s var(--ease);
}
@keyframes flip {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.windows {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 5px;
  margin-top: 14px;
}
.windows i {
  height: 26px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.35s var(--ease-spring);
}
.windows i.on {
  background: var(--c);
  border-color: var(--c);
  transform: scale(1.04);
}
.windows i.blocked {
  background: repeating-linear-gradient(-45deg, var(--surface), var(--surface) 3px, var(--wash) 3px, var(--wash) 6px);
}
.range {
  --v: 12;
  width: 100%;
  height: 22px;
  margin: 6px 0 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.range::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--c) calc((var(--v) - 1) / 59 * 100%), var(--line) 0);
}
.range::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: var(--line);
}
.range::-moz-range-progress {
  height: 6px;
  border-radius: 999px;
  background: var(--c);
}
.range::-webkit-slider-thumb {
  width: 20px;
  height: 20px;
  margin-top: -7px;
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--c);
  box-shadow: var(--shadow-md);
  -webkit-appearance: none;
  appearance: none;
  transition: transform 0.25s var(--ease-spring);
}
.range::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--c);
  box-shadow: var(--shadow-md);
}
.range:active::-webkit-slider-thumb,
.range:hover::-webkit-slider-thumb {
  transform: scale(1.18);
}

.rule-notes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}
.callout {
  display: flex;
  gap: 18px;
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.callout .icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--primary-wash);
  color: var(--primary);
  flex: none;
}
.callout .icon svg {
  width: 22px;
  height: 22px;
}
.callout.gold .icon {
  background: var(--gold-wash);
  color: var(--gold-text);
}
.callout h3 {
  font-size: 18px;
}
.callout p {
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 15.5px;
}
.ratchet {
  display: flex;
  gap: 4px;
  margin-top: 14px;
}
.ratchet i {
  width: 22px;
  height: 8px;
  border-radius: 3px;
  background: var(--line);
}
.in .ratchet i {
  animation: ratchet 3.6s var(--ease) infinite;
}
.ratchet i:nth-child(2) {
  animation-delay: 0.15s !important;
}
.ratchet i:nth-child(3) {
  animation-delay: 0.3s !important;
}
.ratchet i:nth-child(4) {
  animation-delay: 0.45s !important;
}
.ratchet i:nth-child(5) {
  animation-delay: 0.6s !important;
}
@keyframes ratchet {
  0%,
  10% {
    background: var(--line);
  }
  20%,
  85% {
    background: var(--gold);
  }
  100% {
    background: var(--line);
  }
}

@media (max-width: 520px) {
  .callout {
    flex-direction: column;
    padding: 24px;
  }
}
@media (max-width: 980px) {
  .rules {
    grid-template-columns: 1fr;
  }
  .rule-notes {
    grid-template-columns: 1fr;
  }
}

/* ── Control / security ───────────────────────────────────────────────── */

.control-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.feature {
  position: relative;
  overflow: hidden;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.feature::after {
  /* A spotlight that follows the pointer. */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%),
      color-mix(in srgb, var(--primary) 9%, transparent), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}
.feature:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.feature:hover::after {
  opacity: 1;
}
.feature .icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--primary-wash);
  color: var(--primary);
}
.feature .icon svg {
  width: 22px;
  height: 22px;
}
.feature h3 {
  margin-top: 20px;
  font-size: 20px;
}
.feature p {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 16px;
}
.feature.plain .icon {
  background: var(--gold-wash);
  color: var(--gold-text);
}
@media (max-width: 760px) {
  .control-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Pricing ──────────────────────────────────────────────────────────── */

.pricing {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 32px;
  align-items: stretch;
  padding: 44px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}
.price {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  margin-top: 18px;
  font-size: 88px;
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
}
.price sup {
  margin-top: 14px;
  font-size: 34px;
  letter-spacing: 0;
}
.pricing .sub {
  margin-top: 12px;
  color: var(--ink-soft);
}
.checklist {
  margin: 0;
  padding: 0;
  list-style: none;
}
.checklist li {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 16px;
}
.checklist li:last-child {
  border-bottom: 0;
}
.checklist li span {
  color: var(--ink-muted);
  font-size: 14.5px;
}
.checklist svg {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: var(--primary);
  flex: none;
}
.fine {
  margin-top: 18px;
  color: var(--ink-muted);
  font-size: 13.5px;
}
@media (max-width: 860px) {
  .pricing {
    grid-template-columns: 1fr;
    padding: 28px;
  }
}

/* ── FAQ ──────────────────────────────────────────────────────────────── */

.faq-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 72px;
  align-items: start;
}
.faq-grid .section-head {
  position: sticky;
  top: calc(var(--header-h) + 48px);
  margin-bottom: 0;
}
.faq {
  border-top: 1px solid var(--line);
}
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 4px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  list-style: none;
  cursor: pointer;
  transition: color 0.2s var(--ease);
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary:hover {
  color: var(--primary);
}
.faq .plus {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-deep);
  flex: none;
  transition: background-color 0.25s var(--ease), transform 0.4s var(--ease);
}
.faq .plus::before,
.faq .plus::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink-soft);
  transform: translate(-50%, -50%);
  transition: transform 0.4s var(--ease);
}
.faq .plus::after {
  transform: translate(-50%, -50%) rotate(90deg);
}
.faq details[open] .plus {
  background: var(--primary-wash);
  transform: rotate(180deg);
}
.faq details[open] .plus::after {
  transform: translate(-50%, -50%) rotate(0deg);
}
.faq .answer {
  overflow: hidden;
}
.faq .answer-inner {
  padding: 0 44px 24px 4px;
  color: var(--ink-soft);
}
.faq .answer-inner p + p {
  margin-top: 10px;
}
@media (max-width: 920px) {
  .faq-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .faq-grid .section-head {
    position: static;
  }
}

/* ── Beta CTA ─────────────────────────────────────────────────────────── */

.cta {
  padding: 0 0 112px;
}
.cta-card {
  position: relative;
  overflow: hidden;
  padding: 64px;
  border-radius: 32px;
  background: var(--moss);
  color: var(--on-hero);
}
.cta-card::before {
  content: "";
  position: absolute;
  right: -120px;
  top: -120px;
  width: 460px;
  height: 460px;
  border: 38px solid var(--gold);
  border-radius: 50%;
  opacity: 0.14;
  animation: spin 60s linear infinite;
}
.cta-card::after {
  content: "";
  position: absolute;
  right: 40px;
  top: 40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--hero-highlight) 30%, transparent), transparent);
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.cta-card h2 {
  position: relative;
  max-width: 640px;
  color: var(--on-hero);
  font-size: clamp(32px, 4.4vw, 50px);
}
.cta-card p {
  position: relative;
  max-width: 580px;
  margin-top: 16px;
  color: var(--on-hero-muted);
  font-size: 18px;
}
.platforms {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 320px));
  gap: 16px;
  margin-top: 36px;
}
.platform {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  border: 1px solid color-mix(in srgb, var(--on-hero) 16%, transparent);
  border-radius: 20px;
  background: var(--hero-pill);
}
.platform .top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.platform svg.logo {
  width: 26px;
  height: 26px;
  color: var(--on-hero);
}
.platform b {
  display: block;
  font-size: 17px;
}
.platform span {
  color: var(--on-hero-muted);
  font-size: 14px;
}
.platform .btn {
  align-self: flex-start;
}
.cta-card .fine {
  position: relative;
  margin-top: 28px;
  color: var(--on-hero-muted);
  font-size: 13.5px;
}
@media (max-width: 720px) {
  .cta-card {
    padding: 36px 24px;
  }
  .platforms {
    grid-template-columns: 1fr;
  }
}

/* ── Footer ───────────────────────────────────────────────────────────── */

.site-footer {
  padding: 72px 0 40px;
  border-top: 1px solid var(--line);
  background: var(--bg-alt);
  color: var(--ink-soft);
  font-size: 15px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 40px;
}
.footer-brand p {
  max-width: 300px;
  margin-top: 14px;
}
.footer-col h4 {
  margin-bottom: 14px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.footer-col ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-col li + li {
  margin-top: 10px;
}
.footer-col a {
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
.footer-col a:hover {
  color: var(--primary);
}
.disclosure {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 1.65;
}
.disclosure p + p {
  margin-top: 10px;
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
  color: var(--ink-muted);
  font-size: 13.5px;
}
@media (max-width: 860px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}

/* ── Legal pages ──────────────────────────────────────────────────────── */

.legal-hero {
  padding: 64px 0 40px;
  border-bottom: 1px solid var(--line);
}
.doc-tabs {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 28px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-deep);
}
.doc-tabs a {
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 14.5px;
  font-weight: 550;
  text-decoration: none;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.doc-tabs a:hover {
  color: var(--ink);
}
.doc-tabs a[aria-current="page"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.legal-hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  letter-spacing: -0.03em;
}
.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}
.doc-meta span {
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 13.5px;
}
.doc-meta b {
  color: var(--ink);
  font-weight: 600;
}

.legal-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 64px;
  padding-top: 48px;
  padding-bottom: 112px;
}
.toc {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  align-self: start;
  max-height: calc(100vh - var(--header-h) - 48px);
  overflow: auto;
  padding-right: 8px;
  scrollbar-width: thin;
}
.toc summary {
  display: none;
}
.toc .toc-title {
  margin-bottom: 10px;
  color: var(--ink-muted);
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 1px solid var(--line);
}
.toc a {
  position: relative;
  display: block;
  margin-left: -1px;
  padding: 6px 0 6px 16px;
  border-left: 2px solid transparent;
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), padding 0.25s var(--ease);
}
.toc a:hover {
  color: var(--ink);
}
.toc a.current {
  border-left-color: var(--primary);
  color: var(--ink);
  font-weight: 550;
  padding-left: 20px;
}

.prose {
  max-width: 760px;
  color: var(--ink-soft);
  font-size: 16.5px;
  line-height: 1.75;
}
.prose h2 {
  margin: 56px 0 18px;
  padding-top: 8px;
  font-size: 26px;
  letter-spacing: -0.02em;
}
.prose h3 {
  margin: 32px 0 12px;
  font-size: 19px;
}
.prose p,
.prose ul,
.prose ol {
  margin: 0 0 16px;
}
.prose ul {
  padding-left: 22px;
}
.prose li {
  margin-bottom: 8px;
}
.prose li::marker {
  color: var(--ink-faint);
}
.prose strong {
  color: var(--ink);
  font-weight: 600;
}
.prose hr {
  display: none;
}
.prose code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--surface-deep);
  font-size: 0.9em;
}
.prose .short {
  margin-bottom: 8px;
  padding: 28px 32px;
  border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--line));
  border-radius: var(--radius-lg);
  background: var(--primary-wash);
  color: var(--ink);
}
.prose .short h2 {
  margin-top: 0;
  padding-top: 0;
  font-size: 22px;
}
.prose .short ul {
  margin-bottom: 0;
}
.prose .short p:last-child {
  margin-bottom: 0;
}
.table-wrap {
  overflow-x: auto;
  margin: 0 0 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  line-height: 1.55;
}
.prose th,
.prose td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.prose th {
  background: var(--surface-deep);
  color: var(--ink);
  font-weight: 600;
}
.prose tr:last-child td {
  border-bottom: 0;
}
.prose .contact {
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px) scale(0.9);
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.35s var(--ease-spring);
}
.to-top.show {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.to-top svg {
  width: 18px;
  height: 18px;
}
.read-progress {
  position: fixed;
  top: var(--header-h);
  left: 0;
  z-index: 51;
  width: 100%;
  height: 2px;
  background: var(--primary);
  transform-origin: left;
  transform: scaleX(var(--p, 0));
}

@media (max-width: 980px) {
  .legal-layout {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 28px;
    padding-bottom: 72px;
  }
  .toc {
    position: static;
    max-height: none;
    overflow: visible;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
  }
  .toc summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    color: var(--ink);
    font-weight: 600;
    list-style: none;
    cursor: pointer;
  }
  .toc summary::-webkit-details-marker {
    display: none;
  }
  .toc summary svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s var(--ease);
  }
  .toc[open] summary svg {
    transform: rotate(180deg);
  }
  .toc .toc-title {
    display: none;
  }
  .toc ol {
    margin: 0 18px 16px;
  }
}

/* ── 404 ──────────────────────────────────────────────────────────────── */

.notfound {
  display: grid;
  place-items: center;
  min-height: calc(100vh - var(--header-h) - 300px);
  padding: 96px 0;
  text-align: center;
}
.notfound .code {
  color: var(--primary);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0.1em;
}
.notfound h1 {
  margin-top: 12px;
  font-size: clamp(36px, 5vw, 52px);
}
.notfound p {
  max-width: 460px;
  margin: 16px auto 32px;
  color: var(--ink-soft);
}

/* ── Motion ───────────────────────────────────────────────────────────── */

/* Content is visible by default; only when JS has run does .reveal hide it
   until it scrolls into view. */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.js .reveal.in {
  opacity: 1;
  transform: none;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--bg);
  font-size: 14.5px;
  font-weight: 550;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translate(-50%, 16px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.4s var(--ease-spring);
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.toast svg {
  width: 18px;
  height: 18px;
  color: var(--hero-highlight);
}

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

@media print {
  .site-header,
  .site-footer,
  .toc,
  .to-top,
  .read-progress,
  .doc-tabs,
  .mobile-menu {
    display: none !important;
  }
  .legal-layout {
    display: block;
    padding: 0;
  }
  body {
    background: #fff;
    color: #000;
  }
}
