:root {
  --bg: #f7f7f5;
  --card: #ffffff;
  --text: #1f2328;
  --muted: #646b78;
  --line: #e5e7eb;
  --accent: #4f46e5;
  /* Filled buttons and chips (white text): darker than --accent in dark mode, for contrast. */
  --accent-fill: #4f46e5;
  --accent-soft: #eef0ff;
  --done: #6b7280;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111214;
    --card: #1a1b1e;
    --text: #e6e6e6;
    --muted: #9aa0a6;
    --line: #2c2e33;
    --accent: #8b85ff;
    --accent-fill: #635bf0;
    --accent-soft: #23223a;
    --done: #858b94;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
}
h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.15; margin: 0; }
p { margin: 0; }

.logo { color: inherit; text-decoration: none; font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }
.logo::before { content: "∞ "; color: var(--accent); }
.logo.small { font-size: 16px; }

.button {
  display: inline-block; text-decoration: none; font-weight: 600;
  background: var(--accent-fill); color: #fff; border: 1px solid var(--accent-fill);
  border-radius: 9px; padding: 7px 16px; white-space: nowrap;
}
.button:hover { filter: brightness(1.08); }
.button.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.button.ghost:hover { border-color: var(--accent); color: var(--accent); filter: none; }
.button.big { padding: 12px 24px; font-size: 17px; border-radius: 11px; }
.text-link { color: var(--muted); }
.text-link:hover { color: var(--accent); }

.site-header, main > section, .site-footer { max-width: 1080px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.site-header { display: flex; align-items: center; justify-content: space-between; padding-top: 20px; padding-bottom: 20px; }
.site-header nav { display: flex; align-items: center; gap: 22px; }
.nav-link { color: var(--muted); text-decoration: none; }
.nav-link:hover { color: var(--text); }

/* Hero: the pitch beside a drawn example of the app. */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; padding-top: 56px; padding-bottom: 88px; }
.hero h1 { font-size: clamp(36px, 5vw, 54px); }
.lede { font-size: 19px; color: var(--muted); margin-top: 20px; max-width: 34em; }
.cta { display: flex; align-items: center; gap: 22px; margin-top: 32px; flex-wrap: wrap; }
.cta-note { flex-basis: 100%; color: var(--muted); font-size: 15px; margin-top: -8px; }
.lede-short { display: none; }
.sticky-cta { display: none; }

.preview { margin: 0; }
.window {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  box-shadow: 0 24px 60px -24px color-mix(in srgb, var(--accent) 35%, transparent), 0 2px 6px rgba(0, 0, 0, 0.05);
}
.window-bar { display: flex; gap: 6px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.window-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.window-body { padding: 18px 20px 22px; font-size: 15px; }
.crumbs { color: var(--muted); font-size: 13px; }
.crumbs b { font-weight: 400; margin: 0 4px; }
.list-title { font-weight: 700; font-size: 18px; margin: 6px 0 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.pill { font-size: 12px; font-weight: 400; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 8px; font-variant-numeric: tabular-nums; }
.tree, .tree ul { list-style: none; margin: 0; padding: 0; }
.tree ul { margin-left: 8px; padding-left: 16px; border-left: 1px dashed var(--line); }
.tree li { padding: 3px 0; }
.tree li > i {
  display: inline-block; width: 15px; height: 15px; border: 1.5px solid var(--muted); border-radius: 4px;
  vertical-align: -2px; margin-right: 9px;
}
.tree li.done { color: var(--done); text-decoration: line-through; }
.tree li.done > i { background: var(--accent); border-color: var(--accent); }
.tree li.done > i::after { content: "✓"; display: block; color: #fff; font-size: 11px; line-height: 12px; text-align: center; font-style: normal; }
.tree li.done li { text-decoration: none; }
.tree li.open > .pill, .tree li.open > i + .pill { margin-left: 8px; }
.tree li.current { background: var(--accent-soft); border-radius: 8px; margin-left: -8px; padding: 4px 8px 6px; }
.tree li.current > i, .tree li.current > .stack { vertical-align: top; }
.stack { display: inline-flex; flex-direction: column; line-height: 1.3; }
.stack small { color: var(--muted); font-size: 12px; }
.tree li.current ul { margin-top: 4px; }

/* Features */
.features { padding-top: 24px; padding-bottom: 88px; }
.features h2, .groups h2, .keyboard h2, .closing h2 { font-size: clamp(26px, 3.2vw, 34px); }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 32px; }
.grid article { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.glyph {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-size: 20px; margin-bottom: 14px;
}
.grid h3 { font-size: 17px; margin-bottom: 6px; }
.grid p { color: var(--muted); font-size: 15px; }

/* Keyboard */
.keyboard { display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; align-items: center; padding-bottom: 88px; }
.keyboard p { color: var(--muted); font-size: 18px; margin-top: 14px; }
.keys { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.keys div { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.keys dt { display: flex; gap: 5px; flex: none; min-width: 64px; }
.keys dd { margin: 0; color: var(--muted); font-size: 15px; }
kbd {
  font: 600 13px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px;
  padding: 5px 8px; min-width: 26px; text-align: center; display: inline-block;
}

/* Groups */
.groups { padding-bottom: 88px; }
.groups .lede { margin-top: 14px; }
.checks { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 32px; }
.checks li { padding-left: 30px; position: relative; color: var(--muted); }
.checks li b { color: var(--text); }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--accent); font-weight: 700; }

/* Pricing */
.pricing { padding-bottom: 88px; }
.pricing h2 { font-size: clamp(26px, 3.2vw, 34px); }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 32px; max-width: 820px; }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.plan.featured { border-color: var(--accent); box-shadow: 0 18px 44px -26px color-mix(in srgb, var(--accent) 55%, transparent); }
.plan h3 { font-size: 19px; }
.price { color: var(--muted); }
.price b { color: var(--text); font-size: 34px; letter-spacing: -0.02em; margin-right: 4px; }
.plan .checks { grid-template-columns: 1fr; align-content: start; margin: 0; gap: 10px; flex: 1; }
.plan .button { align-self: flex-start; }
.plan-note { color: var(--muted); font-size: 14px; margin: 0; }

/* Closing call to action */
.closing { text-align: center; padding-bottom: 96px; }
.closing h2 { margin-bottom: 26px; }

.site-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; padding-bottom: 32px; border-top: 1px solid var(--line); color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }

@media (max-width: 900px) {
  .hero, .keyboard { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding-top: 24px; }
  .grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .nav-link { display: none; }
  .grid, .keys, .checks, .plans { grid-template-columns: 1fr; }

  /* The first screen on a phone: what it is, the sign-up button, and the
     start of the example list, without scrolling (sized for a phone's
     in-app browser, e.g. Facebook's, which leaves about 360x600). */
  .site-header, main > section, .site-footer { padding-left: 16px; padding-right: 16px; }
  .site-header { padding-top: 12px; padding-bottom: 12px; }
  .hero { gap: 24px; padding-top: 8px; padding-bottom: 64px; }
  .hero h1 { font-size: clamp(28px, 8.4vw, 34px); }
  .hero .lede { font-size: 17px; margin-top: 12px; }
  .lede-long { display: none; }
  .lede-short { display: inline; }
  .cta { margin-top: 20px; gap: 0 16px; justify-content: space-between; }
  .cta .button.big { flex: 1 1 100%; text-align: center; padding: 13px 20px; }
  /* Under the button: the note on the left, the log-in link on the right. */
  .cta-note { order: 1; flex-basis: auto; margin-top: 0; font-size: 14px; }
  .cta .text-link { order: 2; font-size: 14px; padding: 12px 0; }
  .window-bar { display: none; }
  .window-body { padding: 12px 14px 14px; font-size: 15px; }
  .list-title { font-size: 17px; margin: 4px 0 6px; padding-bottom: 6px; }
  .tree li { padding: 2px 0; }

  /* Pinned to the bottom while no other sign-up button is on screen. */
  .sticky-cta {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    border-top: 1px solid var(--line);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  }
  .sticky-cta .button { display: block; text-align: center; }
  .site-footer { padding-bottom: 96px; }

  /* Readable: body text at least 16px; small labels (breadcrumbs, counts,
     notes beside a button) at least 13-14px. */
  .window-body { font-size: 16px; }
  .crumbs { font-size: 14px; }
  .pill, .stack small { font-size: 13px; }
  .grid p, .plan-note { font-size: 16px; }
  /* The keyboard section is about keys a phone doesn't have. */
  .keyboard { display: none; }

  /* Tappable: links and buttons at least 44px tall. */
  .logo { display: inline-flex; align-items: center; min-height: 44px; }
  .site-header .button { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; }
  .plan .button { align-self: stretch; text-align: center; padding: 12px 16px; }
  .footer-links { gap: 0 8px; }
  .footer-links .text-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; }
  .site-footer { flex-wrap: wrap; gap: 4px 12px; }
}
