/* Reps for Mac: the same tokens as the app's Theme.swift (near-monochrome,
   two-tone headlines, black capsule actions, one soft accent gradient). */
:root {
  --background: #ffffff;
  --ink: #0d1214;
  --muted-title: #b5b5b5;
  --secondary: #5f6366;
  --tertiary: #9a9da0;
  --panel: #f4f4f4;
  --card: #ffffff;
  --border: #e3e3e3;
  --pill: #f2f2f2;
  --primary-fill: #0d1214;
  --primary-text: #ffffff;
  --incoming: #e9e9eb;
  --outgoing: #1f8bff;
  --success: #2bb673;
  --accent: linear-gradient(90deg, #c3a3f7, #f27ba0);
  --radius-panel: 40px;
  --radius-card: 22px;
  --gutter: 16px;
  --max: 1180px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #0e0f10;
    --ink: #f4f4f5;
    --muted-title: #5e5e63;
    --secondary: #a1a1a6;
    --tertiary: #6e6e73;
    --panel: #1c1c1e;
    --card: #2a2a2d;
    --border: #2f2f33;
    --pill: #1f1f22;
    --primary-fill: #f4f4f5;
    --primary-text: #0d1214;
    --incoming: #3a3a3c;
  }
}

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

/* `hidden` must win over component display rules (the header button is a flex box). */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { display: block; }

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

.muted-title { color: var(--muted-title); }

/* Navigation */
.nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px var(--gutter);
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; text-decoration: none; letter-spacing: -0.01em; }
.brand img { border-radius: 8px; }
.brand-muted { color: var(--tertiary); font-weight: 500; }
.nav-links { display: flex; gap: 22px; margin-left: auto; font-size: 14px; }
.nav-links a { color: var(--secondary); text-decoration: none; }
.nav-links a:hover { color: var(--ink); }

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: var(--primary-fill);
  color: var(--primary-text);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease;
}
.button:hover { opacity: 0.88; }
.button:active { transform: scale(0.98); }
.button:focus-visible, .nav-links a:focus-visible, summary:focus-visible, .brand:focus-visible {
  outline: 2px solid var(--outgoing);
  outline-offset: 3px;
}
.button-small { height: 36px; padding: 0 16px; font-size: 14px; }
.button-large { height: 54px; padding: 0 30px; font-size: 16px; }
.button-quiet { background: var(--pill); color: var(--ink); }

/* Hero */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 56px var(--gutter) 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 56px;
  align-items: center;
}
.pill {
  display: inline-block;
  margin: 0 0 22px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--pill);
  color: var(--secondary);
  font-size: 13px;
  font-weight: 500;
}
.pill::before {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: 1px;
}
h1, h2 { font-weight: 600; letter-spacing: -0.025em; margin: 0; }
h1 { font-size: clamp(36px, 5.2vw, 56px); line-height: 1.06; }
h2 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.1; margin-bottom: 36px; }
h3 { font-size: 17px; font-weight: 600; margin: 0 0 6px; letter-spacing: -0.01em; }
.lede { margin: 22px 0 32px; max-width: 34em; color: var(--secondary); font-size: 18px; }
.meta { margin: 14px 0 0; color: var(--tertiary); font-size: 13px; }
.aside { margin: 26px 0 0; color: var(--tertiary); font-size: 14px; }
.aside a { color: var(--secondary); }

.elsewhere {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--card);
  max-width: 30em;
}
.elsewhere-title { margin: 0 0 6px; font-weight: 600; }
.elsewhere-body { margin: 0 0 16px; color: var(--secondary); font-size: 15px; }
.elsewhere-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* App mock */
.window {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--background);
  box-shadow: 0 30px 80px -30px rgba(13, 18, 20, 0.28), 0 2px 6px rgba(13, 18, 20, 0.05);
  overflow: hidden;
}
.window-bar { display: flex; gap: 8px; padding: 14px 16px; }
.window-bar span { width: 12px; height: 12px; border-radius: 50%; background: var(--border); }
.window-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 18px;
  padding: 8px 18px 18px 28px;
  align-items: center;
}
.window-title { margin: 0 0 16px; font-size: 22px; font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; }
.stats {
  margin: 0;
  padding: 4px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  font-size: 13px;
}
.stats div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; }
.stats div + div { border-top: 1px solid var(--border); }
.stats dt { color: var(--secondary); }
.stats dd { margin: 0; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.window-actions { display: flex; gap: 8px; margin-top: 16px; }
.fake-button {
  flex: 1;
  display: grid;
  place-items: center;
  height: 36px;
  border-radius: 999px;
  background: var(--primary-fill);
  color: var(--primary-text);
  font-size: 13px;
  font-weight: 500;
}
.fake-back { flex: 0 0 auto; padding: 0 16px; }
.window-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 360px;
  padding: 26px 18px 18px;
  border-radius: 26px;
  background: var(--panel);
}
.bubbles { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 20px; background: var(--card); }
.bubble { margin: 0; max-width: 82%; padding: 8px 12px; border-radius: 16px; font-size: 13px; line-height: 1.35; }
.bubble.in { align-self: flex-start; background: var(--incoming); color: var(--ink); }
.bubble.out { align-self: flex-end; background: var(--outgoing); color: #ffffff; }
.panel-note { margin: 14px 0 0; text-align: center; color: var(--tertiary); font-size: 12px; }

/* Sections */
.section { max-width: var(--max); margin: 0 auto; padding: 72px var(--gutter); border-top: 1px solid var(--border); }
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.steps li { padding: 24px; border-radius: var(--radius-card); background: var(--panel); }
.steps p { margin: 0; color: var(--secondary); font-size: 15px; }
.step-number {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--primary-fill);
  color: var(--primary-text);
  font-size: 14px;
  font-weight: 600;
}

.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; max-width: 46em; }
.checks li { position: relative; padding-left: 34px; color: var(--secondary); }
.checks li strong { color: var(--ink); font-weight: 600; }
.checks li::before {
  content: "";
  position: absolute;
  left: 0; top: 3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--success) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M4.5 8.5l2.2 2.2 4.8-5'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.faq { max-width: 46em; }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  font-weight: 500;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--tertiary); font-size: 20px; line-height: 1; transition: transform 160ms ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 18px; color: var(--secondary); }

.footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px var(--gutter) 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  border-top: 1px solid var(--border);
  color: var(--tertiary);
  font-size: 13px;
}
.footer a { color: var(--secondary); text-decoration: none; }
.footer a:hover { color: var(--ink); }

/* Narrow screens */
@media (max-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 44px; padding-top: 32px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .nav { gap: 12px; }
  .nav-links { display: none; }
  .nav .button-small { margin-left: auto; }
  .window-body { grid-template-columns: minmax(0, 1fr); padding: 4px 14px 14px; }
  .window-panel { min-height: 0; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .section { padding: 56px var(--gutter); }
  .button-large { width: 100%; }
}
