:root {
  --bg: #fafafa;
  --bg-elev: #ffffff;
  --fg: #0a0a0c;
  --fg-muted: #5a5a64;
  --fg-soft: #8a8a94;
  --line: rgba(10, 10, 12, 0.08);
  --line-strong: rgba(10, 10, 12, 0.16);
  --accent: #ff5a1f;
  --accent-ink: #ffffff;
  --focus: #0a84ff;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(10, 10, 12, 0.04);
  --shadow-md: 0 8px 32px rgba(10, 10, 12, 0.06);
  --maxw: 1080px;
  --gutter: clamp(20px, 4vw, 40px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0c;
    --bg-elev: #131316;
    --fg: #f4f4f6;
    --fg-muted: #a4a4ae;
    --fg-soft: #74747e;
    --line: rgba(244, 244, 246, 0.08);
    --line-strong: rgba(244, 244, 246, 0.16);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 12px 40px rgba(0, 0, 0, 0.45);
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--fg);
  background: var(--bg);
  font-feature-settings: "ss01", "ss02", "cv11";
}

.visually-hidden {
  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;
  top: -100px;
  left: 16px;
  padding: 10px 14px;
  background: var(--fg);
  color: var(--bg);
  border-radius: var(--radius-sm);
  text-decoration: none;
  z-index: 999;
}
.skip-link:focus {
  top: 16px;
}

a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ============ Header ============ */

.site-header {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 22px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand:hover {
  text-decoration: none;
}
.brand-mark {
  width: 22px;
  height: 22px;
  color: var(--fg);
}
.brand-wordmark {
  font-size: 18px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14.5px;
  color: var(--fg-muted);
}
.site-nav a:hover {
  color: var(--fg);
}

@media (max-width: 640px) {
  .site-nav {
    gap: 14px;
    font-size: 13px;
  }
  .site-nav a:nth-child(n + 4) {
    display: none;
  }
}

/* ============ Trust bar ============ */

/*
 * Sprint 4.6 originally added a subtle background and a border-bottom
 * to .trust-bar so it would read as a separate strip in light mode.
 * In dark mode (--bg: #0a0a0c) the rgba(148,163,184,0.07) fallback
 * reads as a 10–13 RGB-unit lighter band against the near-black page,
 * combined with the rgba(148,163,184,0.2) bottom border that becomes
 * a visible 1-px line — together they look like a "black bar across
 * the page" to dark-mode users. The page is supposed to read as one
 * continuous flow: trust signals are inline under the header, not
 * their own strip. The .hero below already provides a clean
 * `border-top: 1px solid var(--line)` for the section break.
 */
.trust-bar {
  /* no background, no border — trust signals sit on the page bg */
}
.trust-bar ul {
  list-style: none;
  margin: 0 auto;
  padding: 10px var(--gutter);
  max-width: var(--maxw, 72rem);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: center;
  font-size: 0.82rem;
  color: var(--color-fg-muted, rgba(0, 0, 0, 0.65));
}
.trust-bar li {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.trust-bar strong {
  color: var(--color-fg, inherit);
  font-weight: 600;
}
@media (max-width: 720px) {
  .trust-bar ul {
    gap: 4px 16px;
    font-size: 0.76rem;
  }
}

/* ============ Hero ============ */

.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(48px, 10vw, 110px) var(--gutter) clamp(48px, 8vw, 96px);
  text-align: center;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 24px;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-muted);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.hero-title {
  margin: 0 0 22px;
  font-size: clamp(38px, 7vw, 76px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.035em;
  color: var(--fg);
}

.hero-sub {
  max-width: 640px;
  margin: 0 auto 40px;
  font-size: clamp(17px, 1.6vw, 19.5px);
  line-height: 1.55;
  color: var(--fg-muted);
}

.hero-cta {
  margin: 0 auto 24px;
  max-width: 480px;
}

.hero-foot {
  margin: 8px auto 0;
  font-size: 14.5px;
  color: var(--fg-muted);
}
.hero-foot a {
  color: var(--fg);
  font-weight: 500;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 1px;
}
.hero-foot a:hover {
  text-decoration: none;
  border-bottom-color: var(--fg);
}

/* ============ Waitlist form ============ */

.waitlist {
  display: flex;
  gap: 8px;
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 6px;
  box-shadow: var(--shadow-sm);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.waitlist:focus-within {
  border-color: var(--fg-muted);
  box-shadow: var(--shadow-md);
}

.waitlist input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 12px 14px;
  font: inherit;
  color: var(--fg);
}
.waitlist input::placeholder {
  color: var(--fg-soft);
}

.waitlist button {
  border: 0;
  background: var(--fg);
  color: var(--bg);
  padding: 0 18px;
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 80ms ease, opacity 120ms ease;
}
.waitlist button:hover {
  opacity: 0.88;
}
.waitlist button:active {
  transform: translateY(1px);
}
.waitlist button[disabled] {
  cursor: progress;
  opacity: 0.7;
}

.waitlist .label-loading {
  display: none;
}
.waitlist.is-loading .label-default {
  display: none;
}
.waitlist.is-loading .label-loading {
  display: inline;
}

.waitlist-status {
  margin: 14px 0 0;
  min-height: 1.5em;
  font-size: 14px;
  color: var(--fg-muted);
}
.waitlist-status.is-error {
  color: #d8301a;
}
@media (prefers-color-scheme: dark) {
  .waitlist-status.is-error {
    color: #ff7a6e;
  }
}
.waitlist-status.is-success {
  color: #1e7d3a;
}
@media (prefers-color-scheme: dark) {
  .waitlist-status.is-success {
    color: #7be39a;
  }
}

@media (max-width: 520px) {
  .waitlist {
    flex-direction: column;
    padding: 8px;
  }
  .waitlist button {
    padding: 12px;
    justify-content: center;
  }
}

.waitlist-wide {
  max-width: 520px;
  margin: 28px auto 0;
}

/* ============ Sections ============ */

.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(48px, 8vw, 96px) var(--gutter);
  border-top: 1px solid var(--line);
}

.section-title {
  margin: 0 0 40px;
  font-size: clamp(26px, 3.2vw, 36px);
  font-weight: 600;
  letter-spacing: -0.025em;
  text-align: center;
}

.section-sub {
  max-width: 640px;
  margin: -20px auto 0;
  text-align: center;
  color: var(--fg-muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 880px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

/* ---- "Three ways to try it" CTA grid ---- */
.section-cta {
  border-top: 1px solid var(--color-line);
  margin-top: 32px;
  padding-top: 32px;
}
.cta-grid {
  /* Inherits the .grid layout: three columns desktop, one column mobile. */
}
.cta-card {
  border: 1px solid var(--color-line);
  border-radius: 16px;
  padding: 20px;
  background: var(--color-surface-1);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cta-card h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-fg);
}
.cta-card p {
  margin: 0;
  color: var(--color-fg-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}
.cta-card p:last-child {
  margin-top: auto;
  padding-top: 8px;
}
.cta-card .btn {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--color-line);
  background: var(--color-surface-2);
  color: var(--color-fg);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: background 120ms ease, border-color 120ms ease;
}
.cta-card .btn:hover {
  background: var(--color-surface-1);
  border-color: var(--color-fg-muted);
}
.cta-card .btn-primary {
  background: var(--color-fg);
  color: var(--color-bg);
  border-color: var(--color-fg);
}
.cta-card .btn-primary:hover {
  background: var(--color-fg-muted);
  border-color: var(--color-fg-muted);
}

.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  box-shadow: var(--shadow-sm);
}
.card-num {
  font-variant-numeric: tabular-nums;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--fg-soft);
  margin-bottom: 14px;
}
.card h3 {
  margin: 0 0 10px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.card p {
  margin: 0;
  color: var(--fg-muted);
  font-size: 15.5px;
  line-height: 1.55;
}

/* ============ Split ============ */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 880px;
  margin: 0 auto;
}
@media (max-width: 720px) {
  .split {
    grid-template-columns: 1fr;
  }
}

.split-col {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.split-col h3 {
  margin: 0 0 14px;
  font-size: 17px;
  font-weight: 600;
}
.split-col .muted {
  color: var(--fg-soft);
  font-size: 14px;
  margin-top: 14px;
}

ul.clean {
  list-style: none;
  padding: 0;
  margin: 0;
}
ul.clean li {
  position: relative;
  padding: 7px 0 7px 22px;
  color: var(--fg-muted);
  border-bottom: 1px solid var(--line);
  font-size: 15.5px;
}
ul.clean li:last-child {
  border-bottom: 0;
}
ul.clean li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fg-soft);
}

/* ============ Footer ============ */

.section-cta {
  text-align: center;
  border-bottom: 1px solid var(--line);
}

.site-footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 48px var(--gutter) 64px;
  color: var(--fg-muted);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
  margin-bottom: 32px;
}
@media (max-width: 720px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

.footer-brand {
  font-weight: 600;
  font-size: 17px;
  color: var(--fg);
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.footer-tag {
  margin: 0;
  font-size: 14px;
  max-width: 280px;
}
.footer-head {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-soft);
  margin: 0 0 12px;
}
.site-footer ul.clean li {
  border-bottom: 0;
  padding: 4px 0;
  font-size: 14.5px;
}
.site-footer ul.clean li::before {
  display: none;
}

.copyright {
  margin: 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--fg-soft);
}

/* ============ Doc pages (self-host, pricing, privacy, imprint) ============ */

.doc {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 64px) var(--gutter) clamp(64px, 10vw, 120px);
}
.doc h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0 0 12px;
}
.doc .lede {
  font-size: 18px;
  color: var(--fg-muted);
  margin: 0 0 40px;
}
.doc h2 {
  margin: 40px 0 12px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.doc h3 {
  margin: 28px 0 8px;
  font-size: 17px;
  font-weight: 600;
}
.doc p,
.doc li {
  font-size: 16px;
  line-height: 1.65;
  color: var(--fg);
}
.doc code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.92em;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  padding: 1px 6px;
  border-radius: 6px;
}
.doc pre {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  overflow-x: auto;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 14px;
  line-height: 1.55;
}
.doc pre code {
  background: none;
  border: 0;
  padding: 0;
}
.doc ul,
.doc ol {
  padding-left: 22px;
}
.doc li + li {
  margin-top: 4px;
}
.doc hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 40px 0;
}
.doc a {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.callout {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  margin: 24px 0;
  font-size: 15.5px;
  color: var(--fg-muted);
}
.callout strong {
  color: var(--fg);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* --------------------------------------------------------------------------
   Status page (status.html) — component cards, pills, lists, table
   -------------------------------------------------------------------------- */

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  max-width: 64rem;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.status-card {
  border: 1px solid var(--border, rgba(127, 127, 127, 0.25));
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
  background: var(--card-bg, rgba(127, 127, 127, 0.04));
}

.status-card h2 {
  margin: 0 0 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
}

.status-card dl {
  margin: 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.25rem 0.75rem;
  font-size: 0.875rem;
}

.status-card dt {
  font-weight: 600;
  color: var(--muted, rgba(127, 127, 127, 0.85));
}

.status-card dd {
  margin: 0;
  word-break: break-word;
}

.status-foot {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  color: var(--muted, rgba(127, 127, 127, 0.85));
}

.status-pill {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.25;
  border: 1px solid transparent;
}

.status-pill-ok {
  background: rgba(34, 197, 94, 0.15);
  color: rgb(34, 197, 94);
  border-color: rgba(34, 197, 94, 0.35);
}

.status-pill-warn {
  background: rgba(250, 204, 21, 0.15);
  color: rgb(202, 138, 4);
  border-color: rgba(250, 204, 21, 0.35);
}

.status-pill-err {
  background: rgba(239, 68, 68, 0.15);
  color: rgb(220, 38, 38);
  border-color: rgba(239, 68, 68, 0.35);
}

.status-pill-info {
  background: rgba(148, 163, 184, 0.15);
  color: rgb(100, 116, 139);
  border-color: rgba(148, 163, 184, 0.35);
}

/* ---- Pricing status table ---- */
.pricing-status {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.92rem;
}
.pricing-status th,
.pricing-status td {
  text-align: left;
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid var(--color-line, rgba(148, 163, 184, 0.25));
}
.pricing-status th {
  font-weight: 600;
  background: rgba(148, 163, 184, 0.06);
}
.pricing-status td:not(:first-child),
.pricing-status th:not(:first-child) {
  text-align: center;
}
.pill {
  display: inline-block;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
  border: 1px solid transparent;
  white-space: nowrap;
}
.pill-shipped {
  background: rgba(34, 197, 94, 0.15);
  color: rgb(22, 163, 74);
  border-color: rgba(34, 197, 94, 0.35);
}
.pill-beta {
  background: rgba(250, 204, 21, 0.15);
  color: rgb(161, 98, 7);
  border-color: rgba(250, 204, 21, 0.4);
}
.pill-planned {
  background: rgba(148, 163, 184, 0.15);
  color: rgb(71, 85, 105);
  border-color: rgba(148, 163, 184, 0.4);
}
.pill-muted {
  color: rgba(148, 163, 184, 0.7);
  background: transparent;
  border-color: transparent;
  font-weight: 400;
}
@media (max-width: 720px) {
  .pricing-status {
    font-size: 0.82rem;
  }
  .pricing-status th,
  .pricing-status td {
    padding: 0.4rem 0.4rem;
  }
}

.security-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.92rem;
}
.security-table th,
.security-table td {
  text-align: left;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--color-line, rgba(148, 163, 184, 0.25));
  vertical-align: top;
}
.security-table th {
  font-weight: 600;
  color: var(--color-fg, inherit);
  background: rgba(148, 163, 184, 0.06);
}
.security-table td code {
  font-size: 0.85rem;
  padding: 0.05rem 0.3rem;
  border-radius: 4px;
  background: rgba(148, 163, 184, 0.12);
}
@media (max-width: 720px) {
  .security-table th:nth-child(4),
  .security-table td:nth-child(4) {
    display: none;
  }
}

.status-section {
  max-width: 64rem;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.status-section h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.status-list {
  padding-left: 1.25rem;
  line-height: 1.6;
}

.status-list li + li {
  margin-top: 0.5rem;
}

.status-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.status-table th,
.status-table td {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border, rgba(127, 127, 127, 0.2));
}

.status-table th {
  font-weight: 600;
  color: var(--muted, rgba(127, 127, 127, 0.85));
}

.status-table code {
  font-size: 0.8125rem;
}

/* ===== Sprint 13.2 / 14+ UI redesign ===== */

/* Hero layout: text + visual side-by-side on wide screens, stacked on narrow */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(32px, 5vw, 56px);
  padding: clamp(40px, 8vw, 96px) var(--gutter) clamp(40px, 6vw, 80px);
  max-width: var(--maxw);
  margin: 0 auto;
  align-items: center;
}

@media (min-width: 880px) {
  .hero {
    grid-template-columns: 1.1fr 1fr;
  }
}

.hero-text {
  min-width: 0;
}

.hero-title {
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 12px 0 20px;
  color: var(--fg);
}

.hero-highlight {
  background: linear-gradient(120deg, var(--accent) 0%, #ff8a4a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: clamp(16px, 1.8vw, 18px);
  line-height: 1.55;
  color: var(--fg-muted);
  margin: 0 0 28px;
  max-width: 56ch;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 24px;
}

.btn-large {
  padding: 14px 22px;
  font-size: 16px;
  border-radius: var(--radius);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--fg);
}
.btn-ghost:hover {
  border-color: var(--fg);
}

.hero-trust {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 13px;
  color: var(--fg-muted);
}
.hero-trust li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.dot-green {
  background: #1aa864;
  box-shadow: 0 0 0 4px rgba(26, 168, 100, 0.18);
}

/* Hero visual: Mac + arrow + iPhone */
.hero-visual {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 24px 12px;
}

.device {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.device-mac .device-bezel {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: linear-gradient(180deg, #1a1a1c 0%, #0e0e10 100%);
  border-radius: 14px;
  padding: 10px;
  box-shadow: 0 12px 40px rgba(10, 10, 12, 0.18);
}

.device-mac .device-screen {
  width: 100%;
  height: 100%;
  background: #f6f6f8;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.device-mac .device-base {
  width: 65%;
  height: 6px;
  background: linear-gradient(180deg, #2a2a2c 0%, #14141a 100%);
  border-radius: 0 0 12px 12px;
  margin-top: -1px;
}

.screen-content {
  flex: 1;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.screen-dock {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(20, 20, 24, 0.72);
  border-radius: 8px;
  backdrop-filter: blur(20px);
}
.screen-dock span {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.18);
}

.screen-window {
  margin: 20px auto 0;
  width: 86%;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(10, 10, 12, 0.10);
  overflow: hidden;
  border: 1px solid var(--line);
}
.screen-window .window-bar {
  height: 28px;
  background: #efeff2;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 6px;
}
.screen-window .window-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d8d8de;
}
.screen-window .window-bar span:first-child { background: #ff6058; }
.screen-window .window-bar span:nth-child(2) { background: #ffbd2e; }
.screen-window .window-bar span:nth-child(3) { background: #28c840; }
.screen-window .window-body {
  padding: 18px;
  text-align: center;
}
.screen-window .window-body p {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
}
.screen-window .window-body .muted {
  font-size: 12px;
  font-weight: 400;
  color: var(--fg-muted);
  margin: 2px 0 14px;
}

.qr-frame {
  width: 90px;
  height: 90px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px;
}
.qr {
  width: 100%;
  height: 100%;
  background:
    conic-gradient(from 90deg at 50% 50%,
      #000 0deg 90deg, transparent 90deg 180deg,
      #000 180deg 270deg, transparent 270deg 360deg);
  background-size: 14px 14px;
  background-position: 0 0;
  -webkit-mask: radial-gradient(circle at 12% 12%, #000 4px, transparent 5px),
    radial-gradient(circle at 88% 12%, #000 4px, transparent 5px),
    radial-gradient(circle at 12% 88%, #000 4px, transparent 5px);
  border-radius: 3px;
}

.hero-arrow {
  width: 80px;
  height: 32px;
  color: var(--accent);
}

.device-iphone .device-bezel {
  width: 70%;
  aspect-ratio: 9 / 19;
  background: linear-gradient(180deg, #1a1a1c 0%, #0e0e10 100%);
  border-radius: 28px;
  padding: 8px;
  position: relative;
  box-shadow: 0 12px 40px rgba(10, 10, 12, 0.18);
}

.device-iphone .device-notch {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 50%;
  height: 16px;
  background: #000;
  border-radius: 0 0 12px 12px;
  z-index: 2;
}

.device-screen-iphone {
  border-radius: 20px;
  background: linear-gradient(180deg, #f6f6f8 0%, #ececef 100%);
}

.screen-content-iphone {
  padding: 32px 14px 14px;
  align-items: center;
  justify-content: center;
  position: relative;
}
.screen-content-iphone .muted {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-muted);
  margin: 0 0 12px;
}

.iphone-frame {
  width: 92%;
  aspect-ratio: 16 / 11;
  background: linear-gradient(180deg, #ffffff 0%, #f4f4f6 100%);
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: 0 6px 16px rgba(10, 10, 12, 0.06);
  padding: 6px;
}
.frame-bar {
  width: 100%;
  height: 100%;
  background:
    linear-gradient(180deg, #ff5a1f 0%, #ff7c40 100%);
  border-radius: 4px;
}

.touch-dot {
  position: absolute;
  bottom: 28%;
  right: 24%;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 90, 31, 0.85) 0%, rgba(255, 90, 31, 0) 70%);
  filter: blur(2px);
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50%      { transform: scale(1.4); opacity: 0.3;  }
}

/* Header CTA on desktop */
.header-cta {
  margin-left: 8px;
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 10px;
}

@media (max-width: 720px) {
  .header-cta { display: none; }
}

/* CTA card icons */
.cta-card {
  position: relative;
}
.cta-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 90, 31, 0.10), rgba(255, 138, 80, 0.06));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  color: var(--accent);
}
.cta-icon svg {
  width: 22px;
  height: 22px;
}

/* Steps */
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: clamp(28px, 4vw, 48px);
}
.step {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: center;
}
@media (min-width: 720px) {
  .step {
    grid-template-columns: 1fr 1.4fr;
  }
  .step:nth-child(even) {
    grid-template-columns: 1.4fr 1fr;
  }
  .step:nth-child(even) .step-visual { order: 2; }
  .step:nth-child(even) .step-text   { order: 1; }
}
.step-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.step-text {
  min-width: 0;
}
.step-num {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 6px;
}
.step h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.device-mac-small .device-bezel { aspect-ratio: 16 / 10; }
.device-iphone-small .device-bezel { aspect-ratio: 9 / 19; }

.qr-iphone {
  width: 100%;
  height: 100%;
  background-size: 10px 10px;
}

@media (prefers-color-scheme: dark) {
  .device-mac .device-screen { background: #1c1c1e; }
  .device-screen-iphone { background: linear-gradient(180deg, #1c1c1e 0%, #131316 100%); }
  .screen-window { background: #232326; border-color: rgba(255, 255, 255, 0.06); }
  .screen-window .window-bar { background: #2a2a2c; border-color: rgba(255, 255, 255, 0.06); }
  .screen-window .window-body p { color: #f1f1f4; }
  .qr-frame { background: #232326; border-color: rgba(255, 255, 255, 0.06); }
  .iphone-frame { background: linear-gradient(180deg, #232326 0%, #1c1c1e 100%); border-color: rgba(255, 255, 255, 0.06); }
}

/* Sprint 16 roadmap pills: shipped / beta / planned / not started */
.status-pill-beta {
  background: rgba(10, 132, 255, 0.12);
  color: #0a84ff;
}
.status-pill-muted {
  background: rgba(10, 10, 12, 0.06);
  color: var(--fg-muted);
}
@media (prefers-color-scheme: dark) {
  .status-pill-muted { background: rgba(255, 255, 255, 0.06); }
}

/* ===== Mobile fix 2026-06-24 ===== */

/* iOS safe-area for full-bleed layouts (notch + home indicator) */
:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

.site-header {
  padding-top: max(16px, var(--safe-top));
  padding-left: max(20px, var(--safe-left));
  padding-right: max(20px, var(--safe-right));
}

main {
  padding-left: max(20px, var(--safe-left));
  padding-right: max(20px, var(--safe-right));
  padding-bottom: max(32px, var(--safe-bottom));
}

/* Min body font-size 16px (iOS accessibility + readability) */
body {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

/* All touch-targets >= 44x44px (Apple HIG) */
.btn,
.btn-large,
.btn-ghost,
.btn-primary,
.cta-card .btn,
.header-cta,
.site-nav a,
.tab-pill,
.cta-card a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
  padding-top: max(10px, 0.5em);
  padding-bottom: max(10px, 0.5em);
}

/* Override .header-cta on mobile (already display:none, but ensure) */
@media (max-width: 720px) {
  .header-cta { display: none; }
  .cta-card .btn { min-height: 44px; padding: 10px 14px; }
}

/* Tables: responsive (horizontal scroll on overflow) */
.doc table,
table {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-collapse: collapse;
  font-size: 14.5px;
}
.doc thead,
.doc tbody {
  display: table;
  width: 100%;
}

/* Code blocks: horizontal scroll, prevent layout break */
.doc pre,
.doc code,
pre,
code {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  word-break: break-word;
  white-space: pre-wrap;
}

/* No horizontal overflow on body */
html, body { overflow-x: hidden; }

/* Hero / device-iphone: shrink on small viewports so they don't overflow */
@media (max-width: 480px) {
  .device-iphone { transform: scale(0.78); transform-origin: top center; }
  .device-mac { transform: scale(0.85); transform-origin: top center; }
  .hero-title { font-size: clamp(28px, 8vw, 38px) !important; }
  .hero-highlight { font-size: 0.6em !important; }
  .hero-text h1, .hero-text .h1 { font-size: 28px; }
}

/* Step-cards + cta-cards: full width on mobile */
@media (max-width: 640px) {
  .step, .step-card { width: 100%; }
  .cta-card { padding: 20px 16px; }
  .cta-grid { grid-template-columns: 1fr; gap: 12px; }
}

/* Trust-badges: wrap nicely */
.trust-badges { flex-wrap: wrap; gap: 8px; }
.trust-badge { min-height: 32px; padding: 6px 12px; }
