/* Holdout launch page. Tokens and rules: docs/site/BRIEF.md */

:root {
  color-scheme: light dark;
  --paper: #f7f6f2;
  --paper-2: #efede6;
  --card: #ffffff;
  --ink: #14181f;
  --ink-muted: #555d6b;
  --ink-faint: #636a76;
  --rule: #dedbd2;
  --grid: rgb(20 24 31 / 0.055);
  --signal: #0a7d5a;
  --signal-hover: #086a4c;
  --signal-soft: #e1f2ea;
  --on-signal: #ffffff;
  --improved: #047857;
  --worse: #b91c1c;
  --shadow: 0 1px 2px rgb(20 24 31 / 0.05), 0 12px 32px -8px rgb(10 60 45 / 0.14);

  --font-display: "Instrument Serif", ui-serif, Georgia, serif;
  --font-body: "Geist", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --max: 1120px;
  --gutter: 24px;
  --section-y: 128px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0d1014;
    --paper-2: #12161b;
    --card: #161b21;
    --ink: #e9ecef;
    --ink-muted: #a2aab5;
    --ink-faint: #858d99;
    --rule: #262d36;
    --grid: rgb(233 236 239 / 0.04);
    --signal: #34d39a;
    --signal-hover: #5ee0b0;
    --signal-soft: #10291f;
    --on-signal: #06281c;
    --improved: #4ade80;
    --worse: #fb7185;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.5), 0 16px 40px -10px rgb(0 0 0 / 0.6);
  }
}

/* Base */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.sr-defs {
  position: absolute;
}

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
}

.display em {
  font-style: italic;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 20px;
}

.eyebrow::before {
  content: "";
  width: 16px;
  height: 1.5px;
  background: var(--signal);
}

.h2 {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  line-height: 1.02;
  max-width: 18ch;
}

.lead {
  margin-top: 20px;
  max-width: 60ch;
  color: var(--ink-muted);
}

/* Graph paper behind the hero and the real app */

.graph {
  position: relative;
  isolation: isolate;
}

.graph::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent);
  mask-image: linear-gradient(to bottom, #000 70%, transparent);
  pointer-events: none;
}

/* Buttons and links */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  font: 500 15px/1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 120ms ease;
}

.btn-large {
  min-height: 48px;
  padding: 0 22px;
  font-size: 16px;
}

.btn-small {
  min-height: 44px;
  padding: 0 16px;
  font-size: 14px;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--signal);
  color: var(--on-signal);
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  background: var(--signal-hover);
}

.btn:active {
  transform: translateY(1px);
}

.btn .arrow {
  display: inline-block;
  transition: transform 160ms ease;
}

.btn:hover .arrow {
  transform: translateX(3px);
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule);
}

.btn-secondary:hover {
  border-color: var(--ink-muted);
}

.text-link {
  color: var(--signal);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 160ms ease;
}

.text-link:hover {
  color: var(--signal-hover);
  text-decoration-thickness: 2px;
}

.text-link:active {
  opacity: 0.8;
}

/* Header */

.sentinel {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 8px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 64px;
  background: color-mix(in srgb, var(--paper) 85%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--rule);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
  border-radius: 6px;
  min-height: 44px;
}

.logo svg {
  flex: none;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.01em;
  padding-top: 3px;
}

.logo:hover .wordmark {
  color: var(--signal);
}

.logo:active {
  opacity: 0.8;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-size: 15px;
  color: var(--ink-muted);
  text-decoration: none;
  padding: 10px 0;
  transition: color 160ms ease;
}

.nav-link:hover {
  color: var(--ink);
}

.nav-link:active {
  color: var(--signal);
}

/* Hero */

.hero {
  padding-block: 64px 96px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: 64px;
  align-items: center;
  min-height: min(88vh, 860px);
}

.hero h1 {
  font-size: clamp(3.5rem, 8vw, 6.5rem);
  line-height: 0.95;
}

.hero h1 em,
.h2 em {
  color: var(--signal);
}

.hero-sub {
  margin-top: 28px;
  font-size: 19px;
  max-width: 34ch;
  color: var(--ink-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.hero-facts {
  margin-top: 20px;
  font-size: 13px;
  color: var(--ink-faint);
}

.hero-stage {
  position: relative;
  padding: 0 18px 18px 0;
}

.card-back {
  position: absolute;
  inset: 18px 0 0 18px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 16px;
  opacity: 0.6;
  transform: rotate(2deg);
  box-shadow: var(--shadow);
}

/* The hero card: the app's Lab-theme experiment card */

.exp-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--shadow);
  transform: rotate(-1.5deg);
  transform-style: preserve-3d;
}

.pill {
  display: inline-block;
  font: 500 11px/1 var(--font-mono);
  letter-spacing: 0.1em;
  color: var(--signal);
  border: 1px solid var(--signal);
  border-radius: 999px;
  padding: 5px 10px;
}

.exp-title {
  margin-top: 16px;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.exp-dataset {
  margin-top: 8px;
  font-size: 14px;
  color: var(--ink-muted);
}

.tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 24px;
}

.tile {
  position: relative;
  padding: 18px 18px 20px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--paper);
  overflow: hidden;
}

.tile-value {
  font-size: 40px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
}

.tile-name {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
}

.tile-delta {
  position: relative;
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.4;
}

.delta-final {
  color: var(--improved);
  transition: opacity 300ms ease;
}

.delta-base {
  display: none;
  color: var(--ink-faint);
}

.tile-note {
  margin-top: 4px;
  font-size: 13px;
  color: var(--ink-faint);
}

.tile-line {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background: var(--improved);
  transform-origin: left;
}

.exp-label {
  margin-top: 24px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
}

.exp-method {
  margin-top: 6px;
  font-size: 15px;
  color: var(--ink-muted);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.chips li {
  font: 500 13px/1 var(--font-mono);
  background: var(--signal-soft);
  color: var(--ink);
  border-radius: 999px;
  padding: 7px 12px;
}

/* Hero animation states, set by main.js */

html.js .exp-card.is-pending {
  opacity: 0;
  transform: translateY(16px) rotate(-1.5deg);
}

.exp-card.is-entering {
  transition:
    opacity 600ms var(--ease-out),
    transform 600ms var(--ease-out);
}

.exp-card.is-counting .delta-final {
  position: absolute;
  inset: 0 auto auto 0;
  opacity: 0;
}

.exp-card.is-counting .delta-base {
  display: inline;
}

.exp-card.is-counting .tile-line {
  transform: scaleX(0);
}

.exp-card.is-resolved .tile-line {
  transition: transform 400ms var(--ease-out);
}

.exp-card.is-tilting {
  transition: transform 120ms linear;
}

.exp-card.is-settling {
  transition: transform 500ms var(--ease-out);
}

/* Proof strip */

.proof {
  background: var(--paper-2);
  border-block: 1px solid var(--rule);
}

.proof-list {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  padding-block: 18px;
  font-size: 14px;
  color: var(--ink-muted);
}

.proof-list li + li::before {
  content: "·";
  color: var(--ink-faint);
  margin-inline: 16px;
}

/* Sections */

.section {
  padding-block: var(--section-y);
}

.section-sunken {
  background: var(--paper-2);
  border-block: 1px solid var(--rule);
}

/* How it works */

.steps-wrap {
  position: relative;
  margin-top: 64px;
}

.connector {
  position: absolute;
  top: 28px;
  left: 0;
  width: 100%;
  height: 2px;
  overflow: visible;
}

.connector-line {
  stroke: var(--rule);
  stroke-width: 1;
  stroke-dasharray: 2 4;
  vector-effect: non-scaling-stroke;
}

html.js .connector {
  -webkit-mask-image: linear-gradient(to right, #000 50%, transparent 50%);
  mask-image: linear-gradient(to right, #000 50%, transparent 50%);
  -webkit-mask-size: 200% 100%;
  mask-size: 200% 100%;
  -webkit-mask-position: 100% 0;
  mask-position: 100% 0;
  transition:
    -webkit-mask-position 1200ms var(--ease-out),
    mask-position 1200ms var(--ease-out);
}

html.js .steps-wrap.is-in .connector {
  -webkit-mask-position: 0 0;
  mask-position: 0 0;
}

.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.step-num {
  display: inline-block;
  font-size: 44px;
  font-weight: 500;
  line-height: 1;
  color: var(--signal);
  background: var(--paper);
  padding-right: 14px;
}

.step h3 {
  margin-top: 24px;
  font-size: 19px;
  font-weight: 600;
}

.step p {
  margin-top: 8px;
  color: var(--ink-muted);
  max-width: 34ch;
}

/* Reveals: only when JS is present */

html.js .reveal {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 600ms var(--ease-out),
    transform 600ms var(--ease-out);
  transition-delay: var(--delay, 0ms);
}

html.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* Features bento */

.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
  margin-top: 64px;
}

.bento-tile {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 32px;
  min-width: 0;
}

html.js .bento-tile.reveal.is-in {
  transition:
    opacity 600ms var(--ease-out),
    transform 200ms ease,
    border-color 200ms ease;
}

.tile-a {
  grid-column: span 7;
}

.tile-b {
  grid-column: span 5;
}

.tile-c,
.tile-d,
.tile-e {
  grid-column: span 4;
}

.bento-tile h3 {
  margin-top: auto;
  padding-top: 28px;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.3;
}

.bento-tile > p {
  margin-top: 8px;
  color: var(--ink-muted);
  font-size: 16px;
}

.illo {
  min-width: 0;
}

/* Tile A */

.mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.mini-table th,
.mini-table td {
  text-align: left;
  padding: 11px 10px 11px 0;
  border-bottom: 1px solid var(--rule);
  font-weight: 400;
  vertical-align: middle;
}

.mini-table thead th {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  padding-top: 0;
}

.mini-table tbody th {
  color: var(--ink);
}

.mini-table td:nth-child(2) {
  font-weight: 500;
}

/* Only the metric names may wrap */
.mini-table td,
.mini-table thead th {
  white-space: nowrap;
}

/* The toggle row reads as part of MAPE */
#mape-row > * {
  border-bottom: 0;
}

.hib-row td {
  padding-top: 0;
}

.improved {
  color: var(--improved);
}

.worse {
  color: var(--worse);
}

.faint {
  color: var(--ink-faint);
}

.delta-cell {
  transition: color 200ms ease;
}

.hib-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  min-height: 32px;
  padding: 4px 10px 4px 6px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-muted);
  font: 500 13px/1 var(--font-mono);
  cursor: pointer;
  white-space: nowrap;
  transition:
    border-color 160ms ease,
    color 160ms ease,
    background-color 160ms ease;
}

.hib-toggle:hover {
  border-color: var(--ink-muted);
  color: var(--ink);
}

.hib-toggle:active {
  transform: translateY(1px);
}

.switch {
  position: relative;
  width: 26px;
  height: 16px;
  border-radius: 999px;
  background: var(--rule);
  transition: background-color 160ms ease;
}

.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--card);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.25);
  transition: transform 160ms ease;
}

.hib-toggle[aria-pressed="true"] .switch {
  background: var(--signal);
}

.hib-toggle[aria-pressed="true"] .switch::after {
  transform: translateX(10px);
}

/* Tile B */

.matrix {
  display: grid;
  gap: 20px;
}

.matrix-cat {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  margin-bottom: 8px;
}

.matrix-row {
  display: grid;
  grid-template-columns: 1fr auto 64px;
  align-items: center;
  gap: 14px;
  padding-block: 6px;
  font-size: 15px;
  border-bottom: 1px solid var(--rule);
}

.dots {
  display: inline-flex;
  gap: 5px;
}

.dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--signal) 45%, transparent);
}

.dots i.on {
  background: var(--signal);
  box-shadow: none;
}

.level {
  font-size: 13px;
  color: var(--ink-muted);
}

/* Tile C: theme switcher with the app's real theme values */

.segmented {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--paper);
}

.segmented button {
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-muted);
  font: 500 13px/1 var(--font-body);
  cursor: pointer;
  transition:
    background-color 160ms ease,
    color 160ms ease;
}

.segmented button:hover {
  color: var(--ink);
}

.segmented button:active {
  transform: translateY(1px);
}

.segmented button[aria-pressed="true"] {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.12);
}

.mini-site {
  --t-bg: #f4f5fa;
  --t-surface: #ffffff;
  --t-text: #161a2b;
  --t-muted: #5a6178;
  --t-accent: #4338ca;
  --t-border: #e1e4ef;
  --t-heading: var(--font-body);
  --t-figures: var(--font-body);
  --t-radius: 12px;
  margin-top: 14px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--rule);
  background: var(--t-bg);
  transition: background-color 200ms ease;
}

.mini-site[data-theme="midnight"] {
  --t-bg: #0a0f14;
  --t-surface: #111a21;
  --t-text: #e3ecef;
  --t-muted: #8fa1aa;
  --t-accent: #2dd4bf;
  --t-border: #22313b;
  --t-figures: var(--font-mono);
  --t-radius: 6px;
}

.mini-site[data-theme="journal"] {
  --t-bg: #f3ecdf;
  --t-surface: #fbf7ee;
  --t-text: #2a221d;
  --t-muted: #6a5c51;
  --t-accent: #b0502a;
  --t-border: #e2d6c2;
  --t-heading: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, ui-serif, serif;
  --t-figures: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, ui-serif, serif;
}

.mini-card {
  background: var(--t-surface);
  color: var(--t-text);
  border: 1px solid var(--t-border);
  border-top: 3px solid var(--t-accent);
  border-radius: var(--t-radius);
  padding: 14px;
  transition:
    background-color 200ms ease,
    color 200ms ease,
    border-color 200ms ease;
}

.mini-title {
  font-family: var(--t-heading);
  font-size: 15px;
  font-weight: 600;
}

.mini-tile {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 10px;
}

.mini-value {
  font-family: var(--t-figures);
  font-variant-numeric: tabular-nums;
  font-size: 26px;
  font-weight: 600;
  color: var(--t-accent);
  transition: color 200ms ease;
}

.mini-name {
  font-size: 13px;
  color: var(--t-muted);
  transition: color 200ms ease;
}

/* Tile D */

.files {
  display: grid;
  gap: 10px;
}

.file-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--paper);
  font-size: 13px;
  min-width: 0;
}

.file-chip svg {
  flex: none;
  color: var(--signal);
}

.file-name {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.file-size {
  color: var(--ink-faint);
}

/* Tile E: the résumé paper stays white on purpose */

.paper-wrap {
  display: flex;
  justify-content: center;
}

.paper {
  width: 132px;
  aspect-ratio: 1 / 1.3;
  background: #ffffff;
  color: #111111;
  padding: 16px 14px;
  border-radius: 3px;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.08), 0 8px 20px -10px rgb(0 0 0 / 0.25);
  transform: rotate(1deg);
}

.paper-name {
  font-family: ui-serif, Georgia, serif;
  font-size: 15px;
  line-height: 1.2;
}

.paper hr {
  border: 0;
  border-top: 1px solid #d4d4d4;
  margin: 8px 0 10px;
}

.paper .bar {
  display: block;
  height: 5px;
  margin-bottom: 8px;
  border-radius: 2px;
  background: #d9d9d9;
}

@media (hover: hover) {
  .bento-tile:hover {
    border-color: var(--ink-faint);
    transform: translateY(-2px);
  }

  html.js .bento-tile.reveal.is-in:hover {
    transform: translateY(-2px);
  }
}

/* The real app */

.app-desktop {
  margin-top: 48px;
}

.browser {
  border: 1px solid var(--rule);
  border-radius: 14px;
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow);
}

.browser-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  background: var(--paper-2);
  border-bottom: 1px solid var(--rule);
}

.browser-dots {
  position: absolute;
  left: 16px;
  display: flex;
  gap: 7px;
}

.browser-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--rule);
}

.browser-address {
  font-size: 13px;
  color: var(--ink-muted);
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 3px 14px;
}

.browser iframe {
  display: block;
  width: 100%;
  height: 720px;
  border: 0;
  background: var(--card);
}

.fullscreen {
  margin-top: 20px;
  text-align: center;
}

.welcome-card {
  display: none;
  margin-top: 40px;
  padding: 28px 24px 24px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 16px;
  box-shadow: var(--shadow);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 160ms ease;
}

.welcome-card:hover {
  border-color: var(--ink-faint);
}

.welcome-card:hover .btn-primary {
  background: var(--signal-hover);
}

.welcome-card:active .btn-primary {
  transform: translateY(1px);
}

.welcome-title {
  display: block;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 20px;
}

.choice {
  display: block;
  padding: 16px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  margin-bottom: 12px;
  font-size: 15px;
  color: var(--ink-muted);
}

.choice strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 2px;
}

.choice-tinted {
  background: var(--signal-soft);
  border-color: transparent;
}

.welcome-card .btn {
  margin-top: 8px;
}

/* Privacy */

.privacy-inner {
  max-width: calc(560px + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
  text-align: center;
}

.padlock {
  color: var(--signal);
}

.privacy-title {
  margin-top: 16px;
  font-family: var(--font-body);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.privacy-inner p {
  margin-top: 14px;
  color: var(--ink-muted);
}

/* Closing call to action */

.closing {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: var(--section-y);
  background: var(--ink);
  color: var(--paper);
  text-align: center;
}

.closing::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(to right, rgb(255 255 255 / 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(255 255 255 / 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
}

.closing-line {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: visible;
}

.closing-base {
  stroke: rgb(255 255 255 / 0.4);
  stroke-width: 1.5;
  stroke-dasharray: 4 6;
}

.closing-result {
  fill: none;
  stroke: #34d39a;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.closing-dot {
  position: absolute;
  left: 90%;
  top: 40%;
  z-index: -1;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: #34d39a;
}

html.js .closing-draw {
  -webkit-mask-image: linear-gradient(to right, #000 50%, transparent 50%);
  mask-image: linear-gradient(to right, #000 50%, transparent 50%);
  -webkit-mask-size: 200% 100%;
  mask-size: 200% 100%;
  -webkit-mask-position: 100% 0;
  mask-position: 100% 0;
}

html.js .closing-dot {
  opacity: 0;
  transform: scale(0.4);
}

html.js .closing.is-in .closing-draw {
  -webkit-mask-position: 0 0;
  mask-position: 0 0;
  transition:
    -webkit-mask-position 1400ms var(--ease-out),
    mask-position 1400ms var(--ease-out);
}

html.js .closing.is-in .closing-dot {
  opacity: 1;
  transform: none;
  transition:
    opacity 200ms ease 1300ms,
    transform 300ms var(--ease-out) 1300ms;
}

.closing-inner {
  position: relative;
}

.closing-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.02;
  max-width: 16ch;
  margin-inline: auto;
}

.closing-title em {
  color: #34d39a;
}

.closing-sub {
  margin-top: 18px;
  font-size: 19px;
  opacity: 0.8;
}

.btn-closing {
  margin-top: 36px;
  background: #34d39a;
  color: #06281c;
  box-shadow: 0 12px 32px -8px rgb(52 211 154 / 0.35);
}

.btn-closing:hover {
  background: #5ee0b0;
}

.closing :focus-visible {
  outline-color: #34d39a;
}

@media (prefers-color-scheme: dark) {
  .closing {
    background: var(--card);
    color: var(--ink);
    border-top: 1px solid var(--rule);
  }
}

/* Footer */

.site-footer {
  background: var(--paper);
  border-top: 1px solid var(--rule);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-block: 20px;
}

.logo-small .wordmark {
  font-size: 20px;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 20px;
  font-size: 13px;
  color: var(--ink-faint);
}

.footer-meta .text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* Desktop iframe vs phone welcome card */

@media (max-width: 899px) {
  .app-desktop {
    display: none;
  }

  .welcome-card {
    display: block;
  }

  .tile-a,
  .tile-b {
    grid-column: span 12;
  }

  .tile-c,
  .tile-d,
  .tile-e {
    grid-column: span 6;
  }

  .tile-e {
    grid-column: span 12;
  }
}

@media (min-width: 900px) {
  .welcome-card {
    display: none;
  }
}

/* Phones */

@media (max-width: 720px) {
  :root {
    --gutter: 20px;
    --section-y: 80px;
  }

  body {
    font-size: 16px;
  }

  .nav-link {
    display: none;
  }

  .hero {
    padding-block: 40px 72px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 48px;
    min-height: 0;
  }

  .hero h1 {
    font-size: 3.25rem;
  }

  .hero-sub {
    font-size: 17px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-stage {
    padding: 0;
  }

  .card-back {
    display: none;
  }

  .exp-card,
  html.js .exp-card.is-pending {
    transform: none;
  }

  html.js .exp-card.is-pending {
    transform: translateY(16px);
  }

  .exp-card {
    padding: 22px;
  }

  .exp-title {
    font-size: 20px;
  }

  .tiles {
    gap: 10px;
  }

  .tile {
    padding: 14px 12px 16px;
  }

  .tile-value {
    font-size: 30px;
  }

  .proof-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .proof-list li {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .proof-list li::before,
  .proof-list li + li::before {
    margin: 0;
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--signal);
  }

  .steps-wrap {
    margin-top: 48px;
  }

  .connector {
    top: 0;
    left: 21px;
    width: 2px;
    height: 100%;
  }

  .connector line {
    display: none;
  }

  .connector {
    border-left: 1px dashed var(--rule);
    -webkit-mask-image: none;
    mask-image: none;
  }

  html.js .connector {
    -webkit-mask-image: linear-gradient(to bottom, #000 50%, transparent 50%);
    mask-image: linear-gradient(to bottom, #000 50%, transparent 50%);
    -webkit-mask-size: 100% 200%;
    mask-size: 100% 200%;
    -webkit-mask-position: 0 100%;
    mask-position: 0 100%;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .step {
    display: grid;
    grid-template-columns: 44px 1fr;
    column-gap: 16px;
  }

  .step-num {
    grid-row: span 2;
    font-size: 28px;
    padding: 0 0 8px;
    text-align: center;
  }

  .step h3 {
    margin-top: 0;
  }

  .bento {
    margin-top: 48px;
    gap: 16px;
  }

  .bento-tile,
  .tile-a,
  .tile-b,
  .tile-c,
  .tile-d,
  .tile-e {
    grid-column: 1 / -1;
    padding: 24px;
  }

  .mini-table th,
  .mini-table td {
    padding-right: 6px;
    font-size: 13px;
  }

  .hib-toggle {
    min-height: 44px;
  }

  .closing-line {
    inset: auto 0 0 0;
    height: 96px;
  }

  .closing-dot {
    top: auto;
    bottom: 57.6px;
  }

  .segmented button {
    min-height: 44px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    padding-block: 24px;
  }

  .footer-meta {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Reduced motion: final states at once, nothing moves */

@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: 0ms !important;
  }

  html.js .reveal {
    opacity: 1;
    transform: none;
  }

  html.js .connector {
    -webkit-mask-image: none;
    mask-image: none;
  }

  html.js .closing-draw {
    -webkit-mask-image: none;
    mask-image: none;
  }

  html.js .closing-dot {
    opacity: 1;
    transform: none;
  }

  .bento-tile:hover,
  html.js .bento-tile.reveal.is-in:hover {
    transform: none;
  }
}
