/* Meanwhile site. Tokens mirror src/theme/tokens.ts (Dusk: twilight indigo, apricot accent). */

:root {
  color-scheme: light dark;

  --paper: #F4F2F7;
  --raised: #FCFBFE;
  --ink: #211E2C;
  --ink-soft: #5B5770;
  --primary: #4A4787;
  --primary-hover: #3D3A74;
  --on-primary: #FFFFFF;
  --accent: #B8653A;
  --night: #2B2A4A;
  --success: #3F6B4F;
  --line: #E3E0EC;
  --line-strong: #8A86A0;
  --shadow: 0 6px 16px rgba(33, 30, 44, 0.08);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;
  --space-2xl: 32px;
  --space-3xl: 48px;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --gutter: 24px;
  --measure: 34em;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #13121A;
    --raised: #1C1A27;
    --ink: #ECE9F6;
    --ink-soft: #ABA7C2;
    --primary: #B9B6F2;
    --primary-hover: #CCCAF6;
    --on-primary: #1A1838;
    --accent: #F0A57A;
    --night: #2A2950;
    --success: #9CC7A8;
    --line: #2C2A3A;
    --line-strong: #6E6A86;
    --shadow: none;
  }
}

@media (max-width: 375px) {
  :root { --gutter: 16px; }
}

/* Base */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem; /* 17px */
  line-height: 1.5;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { text-decoration-thickness: 2px; }

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

h1, h2, h3 { margin: 0; color: var(--ink); }

h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.875rem; /* 30px: title */
  line-height: 1.2;
  font-optical-sizing: auto;
}

h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.625rem; /* 26px */
  line-height: 1.25;
  font-optical-sizing: auto;
  margin-top: var(--space-3xl);
  margin-bottom: var(--space-md);
}

h3 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.3;
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
}

p { margin: 0 0 var(--space-lg); }
ul, ol { margin: 0 0 var(--space-lg); padding-left: 1.25em; }
li { margin-bottom: var(--space-sm); }
li::marker { color: var(--ink-soft); }
strong { font-weight: 600; }

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: var(--space-2xl) 0;
}

/* Utilities */

.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;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: var(--space-sm) var(--space-lg);
  background: var(--raised);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
}
.skip-link:focus { top: var(--space-lg); }

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

[hidden] { display: none !important; }

/* Layout */

.page {
  width: 100%;
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  padding-top: var(--space-xl);
  padding-bottom: var(--space-xl);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-md);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  min-height: 44px;
}
.brand:hover { text-decoration: none; }
.brand .mark { width: 48px; height: 16px; }

.site-nav {
  display: flex;
  gap: var(--space-lg);
  font-size: 0.9375rem;
}
.site-nav a {
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.site-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }

.site-footer {
  margin-top: var(--space-3xl);
  padding-top: var(--space-xl);
  padding-bottom: var(--space-2xl);
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.9375rem;
  line-height: 1.4;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-xl);
  margin-bottom: var(--space-sm);
}
.site-footer a {
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.site-footer p { margin: 0; }

/* The mark: three dots, the middle one apricot */

.mark .dot { fill: var(--ink); }
.mark .mid { fill: var(--accent); }
.mark .glow { fill: var(--accent); opacity: 0.18; }

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  min-height: 52px;
  padding: 0 var(--space-xl);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: var(--on-primary);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.button:hover { background: var(--primary-hover); text-decoration: none; }

.button-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
  box-shadow: none;
}
.button-secondary:hover { background: var(--raised); }

.button-block { width: 100%; }

@media (prefers-reduced-motion: no-preference) {
  .button { transition: background-color 180ms cubic-bezier(0.2, 0, 0, 1); }
}

/* Cards */

.card {
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
}

/* Landing (one screen) */

.landing {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}
.landing main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: var(--space-xl);
  padding-bottom: var(--space-xl);
}
.landing .site-footer { margin-top: 0; }

.hero .mark { width: 96px; height: 32px; margin-bottom: var(--space-xl); }

.hero h1 {
  font-size: clamp(2.5rem, 9vw, 2.75rem); /* 44px display */
  line-height: 1.09;
  letter-spacing: -0.01em;
}

.tagline {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.625rem;
  line-height: 1.25;
  margin: var(--space-sm) 0 var(--space-lg);
}

.lede {
  color: var(--ink-soft);
  max-width: var(--measure);
  margin-bottom: var(--space-xl);
}

.features {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-2xl);
  border-top: 1px solid var(--line);
  max-width: var(--measure);
}
.features li {
  margin: 0;
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--line);
}
.features strong { display: block; }
.features span { color: var(--ink-soft); font-size: 0.9375rem; }

.cta { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-md); }
.cta p { margin: 0; color: var(--ink-soft); font-size: 0.9375rem; }

@media (max-width: 480px) {
  .cta .button { width: 100%; }
}

/* Long-form pages (privacy, support) */

.doc {
  padding-bottom: var(--space-xl);
}
.doc > header { margin-bottom: var(--space-2xl); }
.doc > header p { color: var(--ink-soft); margin: var(--space-sm) 0 0; }
.doc p, .doc li { max-width: var(--measure); }

.summary {
  margin: var(--space-xl) 0 0;
}
.summary h2 { margin-top: 0; }
.summary ul { margin-bottom: 0; }

.toc {
  margin: var(--space-xl) 0 0;
  padding: var(--space-lg) var(--space-xl);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--raised);
}
.toc h2 {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.3;
  color: var(--ink-soft);
  margin: 0 0 var(--space-sm);
}
.toc ul { margin: 0; padding-left: 1.1em; }
.toc li { margin: 0; }
.toc a { display: inline-block; padding: 6px 0; }

.table-wrap {
  overflow-x: auto;
  margin: 0 0 var(--space-lg);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--raised);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.4;
}
caption {
  text-align: left;
  padding: var(--space-md) var(--space-lg) 0;
  color: var(--ink-soft);
  font-size: 0.875rem;
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--line);
}
tr:last-child th, tr:last-child td { border-bottom: 0; }
thead th {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  font-weight: 600;
}
tbody th { font-weight: 600; min-width: 8em; }

.faq h3 { margin-top: var(--space-2xl); }
.faq h2 + h3 { margin-top: var(--space-lg); }

.contact {
  margin-top: var(--space-3xl);
}
.contact h2 { margin-top: 0; }
.contact p:last-child { margin-bottom: 0; }

.quote {
  margin: 0 0 var(--space-sm);
  font-weight: 600;
}

/* Invite (pair) page */

.invite {
  text-align: center;
  padding-top: var(--space-xl);
  padding-bottom: var(--space-xl);
}
.invite .mark { width: 96px; height: 32px; margin: 0 auto var(--space-xl); }
.invite h1 { margin-bottom: var(--space-md); }
.invite .intro { color: var(--ink-soft); margin: 0 auto var(--space-xl); max-width: 26em; }

.code {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 48px));
  justify-content: center;
  gap: var(--space-sm);
  margin: 0 auto var(--space-xl);
  padding: 0;
  list-style: none;
}
.code span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  background: var(--raised);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.75rem; /* 28px */
  line-height: 1;
  color: var(--ink);
}

.actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  max-width: 22rem;
  margin: 0 auto var(--space-xl);
}

.copy-status {
  min-height: 1.5em;
  margin: 0 0 var(--space-lg);
  color: var(--success);
  font-size: 0.9375rem;
  font-weight: 500;
}

.steps {
  text-align: left;
  max-width: 26rem;
  margin: var(--space-xl) auto 0;
}
.steps h2 {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 0 0 var(--space-sm);
}
.steps ol { margin: 0; }
.steps p { margin: var(--space-md) 0 0; color: var(--ink-soft); font-size: 0.9375rem; }

.get-app { margin: 0; }

/* 404 */

.not-found main {
  padding-top: var(--space-3xl);
  padding-bottom: var(--space-3xl);
}
.not-found .mark { width: 96px; height: 32px; margin-bottom: var(--space-xl); }
.not-found .lede { margin-bottom: var(--space-xl); }

/* Waitlist */

.waitlist { max-width: var(--measure); margin: 0 0 var(--space-2xl); }
.waitlist h2 { margin: 0 0 var(--space-sm); font-family: var(--font-display); font-weight: 600; font-size: 1.625rem; line-height: 1.2; }
.waitlist .soft { margin: 0 0 var(--space-lg); }
.waitlist label { display: block; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.03em; color: var(--ink-soft); margin-bottom: var(--space-sm); }
.field-row { display: flex; gap: var(--space-sm); }
.field-row input {
  flex: 1;
  min-width: 0;
  min-height: 52px;
  padding: 0 var(--space-lg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}
.field-row input:focus { outline: 2px solid var(--primary); outline-offset: 1px; border-color: var(--primary); }
.field-row input[aria-invalid="true"] { border-color: var(--accent); }
.field-row .button { flex-shrink: 0; }
.field-row .button:disabled { opacity: 0.7; cursor: progress; }
.form-error { min-height: 1.4em; margin: var(--space-sm) 0 0; color: var(--accent); font-size: 0.9375rem; font-weight: 500; }
.form-error:empty { min-height: 0; }
.fine-print { margin: var(--space-sm) 0 0; color: var(--ink-soft); font-size: 0.8125rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
#joined:focus { outline: none; }
#joined p { margin: 0 0 var(--space-lg); }
.small { font-size: 0.9375rem; margin: 0; }

@media (max-width: 480px) {
  .field-row { flex-direction: column; }
  .field-row .button { width: 100%; }
}
