/* Aster site — monochrome "ink" theme that follows the OS color scheme. */

:root {
  --bg: #f9f8f5;
  --bg-tint: #f2f0eb;
  --surface: #ffffff;
  --fg: #161921;
  --fg-muted: #5c6170;
  --border: #e3dfd6;
  --border-strong: #cfcac0;
  --ink-btn-bg: #161921;
  --ink-btn-fg: #ffffff;
  --ink-btn-hover: #2a2e38;
  --code-bg: #161921;
  --code-fg: #e6e8ee;
  --code-muted: #9298a6;
  --code-border: #161921;
  --code-head: #1f232b;
  --dot: #d9d5cc;
  --shadow: 0 1px 2px rgb(22 25 33 / 0.04), 0 8px 24px -6px rgb(22 25 33 / 0.10), 0 32px 64px -24px rgb(22 25 33 / 0.16);
  --shadow-sm: 0 1px 2px rgb(22 25 33 / 0.05), 0 6px 20px -10px rgb(22 25 33 / 0.14);
  --radius: 14px;
  --radius-sm: 10px;
  --container: 1200px;
  --gutter: 24px;
  --nav-h: 60px;
  --font-sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  color-scheme: light dark;
}

:root[data-theme="light"] { color-scheme: light; }

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101216;
  --bg-tint: #14161b;
  --surface: #171a20;
  --fg: #e6e8ee;
  --fg-muted: #9aa0ad;
  --border: #262a32;
  --border-strong: #353a44;
  --ink-btn-bg: #e6e8ee;
  --ink-btn-fg: #101216;
  --ink-btn-hover: #ffffff;
  --code-bg: #0b0c0f;
  --code-fg: #e6e8ee;
  --code-muted: #8f95a3;
  --code-border: #262a32;
  --code-head: #14161b;
  --dot: #3a3f49;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 12px 32px -8px rgb(0 0 0 / 0.55), 0 40px 80px -30px rgb(0 0 0 / 0.6);
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 24px -12px rgb(0 0 0 / 0.5);
}

/* No saved choice: follow the OS. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101216;
    --bg-tint: #14161b;
    --surface: #171a20;
    --fg: #e6e8ee;
    --fg-muted: #9aa0ad;
    --border: #262a32;
    --border-strong: #353a44;
    --ink-btn-bg: #e6e8ee;
    --ink-btn-fg: #101216;
    --ink-btn-hover: #ffffff;
    --code-bg: #0b0c0f;
    --code-fg: #e6e8ee;
    --code-muted: #8f95a3;
    --code-border: #262a32;
    --code-head: #14161b;
    --dot: #3a3f49;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 12px 32px -8px rgb(0 0 0 / 0.55), 0 40px 80px -30px rgb(0 0 0 / 0.6);
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 24px -12px rgb(0 0 0 / 0.5);
  }
}

/* Theme-matched media: every screenshot and clip ships a light and a dark variant. */
.only-dark { display: none; }
:root[data-theme="dark"] .only-light { display: none; }
:root[data-theme="dark"] .only-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .only-light { display: none; }
  :root:not([data-theme="light"]) .only-dark { display: block; }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + 12px);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
svg { flex-shrink: 0; }

h1, h2, h3 { margin: 0; color: var(--fg); font-weight: 650; }
p { margin: 0; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

code,
.mono { font-family: var(--font-mono); font-size: 0.875em; }
.nw { white-space: nowrap; }

:not(pre) > code {
  padding: 0.1em 0.38em;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  overflow-wrap: anywhere;
  white-space: normal;
}

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
  border-radius: 6px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px; top: -48px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--ink-btn-bg);
  color: var(--ink-btn-fg);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

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

/* ---------- Logo ---------- */

.logo-mark rect { fill: currentColor; }
.logo-mark path {
  fill: none;
  stroke: var(--bg);
  stroke-width: 2.7;
  stroke-linecap: round;
}

/* ---------- Header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--nav-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 8px;
  color: var(--fg-muted);
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.nav-links a:hover { color: var(--fg); background: color-mix(in srgb, var(--fg) 6%, transparent); }

.nav-links .nav-gh::after {
  content: "↗";
  margin-left: 4px;
  font-size: 0.85em;
  opacity: 0.7;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  margin-left: -16px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--fg-muted);
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.theme-toggle:hover { color: var(--fg); border-color: var(--border-strong); background: color-mix(in srgb, var(--fg) 6%, transparent); }
.theme-toggle svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: inline; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: inline; }
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  margin-right: -8px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--fg);
  cursor: pointer;
}
.nav-toggle svg path { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.nav-toggle .i-close { display: none; }
.nav-open .nav-toggle .i-open { display: none; }
.nav-open .nav-toggle .i-close { display: inline; }

@media (max-width: 859px) {
  .js .nav-toggle { display: inline-flex; margin-left: -16px; }
  .js .theme-toggle { margin-left: auto; }
  .js .nav-links {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 8px var(--gutter) 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
  }
  .js.nav-open .nav-links { display: flex; }
  .js .nav-links a { padding: 12px 10px; font-size: 16px; color: var(--fg); }
  .no-js .nav { flex-wrap: wrap; gap: 4px 12px; padding-block: 8px; }
  .no-js .nav-links { overflow-x: auto; }
}

/* ---------- Buttons ---------- */

.cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 10px;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.btn svg path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn .gh-mark path { fill: currentColor; stroke: none; }

.btn-primary {
  background: var(--ink-btn-bg);
  color: var(--ink-btn-fg);
  border: 1px solid var(--ink-btn-bg);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.12), inset 0 1px 0 rgb(255 255 255 / 0.08);
}
.btn-primary:hover { background: var(--ink-btn-hover); border-color: var(--ink-btn-hover); }

.btn-secondary {
  background: var(--surface);
  color: var(--fg);
  border: 1px solid var(--border-strong);
}
.btn-secondary:hover { border-color: var(--fg-muted); }

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

.cta-meta {
  margin-top: 16px;
  color: var(--fg-muted);
  font-size: 14px;
}

.cta-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 10px;
  margin-top: 6px;
  color: var(--fg-muted);
  font-size: 14px;
}
.cta-links a { color: var(--fg); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding-top: clamp(56px, 9vw, 112px);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 720px;
  background-image: radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--fg) 14%, transparent) 1px, transparent 0);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 0%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 0%, transparent 75%);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  padding: 5px 13px 5px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--fg-muted);
  font-size: 13px;
  font-weight: 500;
}
.pill-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--fg);
}

.hero h1 {
  max-width: 15em;
  font-size: clamp(2.35rem, 5.2vw, 4.25rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 670;
  text-wrap: balance;
}

.hero-sub {
  max-width: 40em;
  margin-top: 22px;
  color: var(--fg-muted);
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.55;
  text-wrap: pretty;
}

.hero .cta { margin-top: 36px; }

.hero-shot {
  position: relative;
  margin-top: clamp(48px, 7vw, 80px);
}

/* ---------- Window frame ---------- */

.window {
  position: relative;
  container-type: inline-size;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.window img { width: 100%; }
.window video {
  width: 100%;
  height: auto;
  aspect-ratio: 1440 / 900;
  background: var(--surface);
  object-fit: cover;
}
.window video.only-light { display: block; }
:root[data-theme="dark"] .window video.only-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .window video.only-light { display: none; }
}

.window-dots {
  position: absolute;
  top: 0.78cqw;
  left: 1.25cqw;
  z-index: 1;
  display: flex;
  gap: 0.56cqw;
}
/* screenshots follow the page theme, so the dots do too */
.window-dots i {
  display: block;
  width: 0.84cqw; height: 0.84cqw;
  border-radius: 50%;
  background: var(--dot);
}
@media (max-width: 559px) {
  .window-dots { display: none; }
}

.window-hero { border-radius: 16px; }

/* ---------- Sections ---------- */

.section {
  padding-block: clamp(80px, 11vw, 136px);
}
.section-tint {
  background: var(--bg-tint);
  border-block: 1px solid var(--border);
}

.section-head {
  max-width: 760px;
  margin-bottom: clamp(40px, 6vw, 64px);
}

.eyebrow {
  margin-bottom: 14px;
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.lead {
  margin-top: 18px;
  color: var(--fg-muted);
  font-size: clamp(1.02rem, 1.3vw, 1.125rem);
  line-height: 1.65;
  text-wrap: pretty;
}

/* ---------- Value grid ---------- */

.value-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}
.value-grid li {
  padding: 28px 28px 32px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.value-grid h3 {
  margin-top: 18px;
  font-size: 1.06rem;
  letter-spacing: -0.012em;
}
.value-grid p {
  margin-top: 8px;
  color: var(--fg-muted);
  font-size: 15px;
  line-height: 1.6;
}

.value-icon {
  width: 22px; height: 22px;
}
.value-icon path,
.value-icon circle,
.value-icon rect {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 959px) {
  .value-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 599px) {
  .value-grid { grid-template-columns: minmax(0, 1fr); }
  .value-grid li { padding: 24px 20px 26px; }
}

/* ---------- Flow diagram ---------- */

.flow {
  margin: 0 0 clamp(56px, 8vw, 88px);
  padding: clamp(24px, 3.5vw, 40px) clamp(20px, 3vw, 36px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  --line: color-mix(in srgb, var(--fg) 45%, transparent);
  --arc-h: 30px;
}

.flow-grid {
  display: grid;
  grid-template-columns:
    minmax(0, 0.72fr) minmax(56px, 0.5fr)
    minmax(0, 1fr) minmax(76px, 0.78fr)
    minmax(0, 1fr) minmax(76px, 0.74fr)
    minmax(0, 1.3fr) minmax(56px, 0.42fr)
    minmax(0, 1.1fr);
  grid-template-rows: auto auto auto;
  align-items: center;
}

.node {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-height: 116px;
  justify-content: center;
  padding: 16px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--bg);
  text-align: center;
}
.node strong {
  font-size: 14.5px;
  font-weight: 620;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.node strong .mono { font-size: 0.95em; }
.node-sub {
  color: var(--fg-muted);
  font-size: 12.5px;
  line-height: 1.45;
}
.node-sub.mono { font-size: 11.5px; overflow-wrap: anywhere; }

.node-icon {
  width: 22px; height: 22px;
  margin-bottom: 6px;
}
.node-icon path,
.node-icon circle,
.node-icon rect,
.node-icon ellipse {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.node-icon-logo rect { fill: currentColor; stroke: none; }
.node-icon-logo path { stroke: var(--bg); stroke-width: 2.8; }

.node-you { border-radius: 999px; min-height: 96px; }
.node-app {
  background: var(--ink-btn-bg);
  border-color: var(--ink-btn-bg);
  color: var(--ink-btn-fg);
}
.node-app strong { color: var(--ink-btn-fg); }
.node-app .node-sub { color: color-mix(in srgb, var(--ink-btn-fg) 72%, var(--ink-btn-bg)); }
.node-app .node-icon-logo rect { fill: var(--ink-btn-fg); }
.node-app .node-icon-logo path { stroke: var(--ink-btn-bg); }

.edge {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding-inline: 4px;
}
.edge-label {
  min-width: 0;
  min-height: 2.9em;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  align-content: flex-end;
  justify-content: center;
  column-gap: 0.45em;
  color: var(--fg-muted);
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
}
.edge-label.mono { font-size: 11px; }
.edge-line {
  position: relative;
  display: block;
  height: 1.5px;
  margin-bottom: 2.9em;
  background: var(--line);
}
.edge-line::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 50%;
  width: 7px; height: 7px;
  border-top: 1.5px solid var(--line);
  border-right: 1.5px solid var(--line);
  transform: translateY(-50%) rotate(45deg);
}

.flow-arc {
  position: relative;
  height: var(--arc-h);
  border-color: var(--line);
  border-style: dashed;
  border-width: 0;
}
.flow-arc-top { grid-row: 1; align-self: end; }
.flow-arc-bottom { grid-row: 3; align-self: start; }

.flow-arc-top.flow-arc-l { grid-column: 1; margin-left: 50%; border-left-width: 1.5px; border-top-width: 1.5px; border-top-left-radius: 12px; }
.flow-arc-top.flow-arc-m { grid-column: 2 / 9; border-top-width: 1.5px; }
.flow-arc-top.flow-arc-r { grid-column: 9; margin-right: 50%; border-right-width: 1.5px; border-top-width: 1.5px; border-top-right-radius: 12px; }

.flow-arc-bottom.flow-arc-l { grid-column: 3; margin-left: 50%; border-left-width: 1.5px; border-bottom-width: 1.5px; border-bottom-left-radius: 12px; }
.flow-arc-bottom.flow-arc-m { grid-column: 4 / 9; border-bottom-width: 1.5px; }
.flow-arc-bottom.flow-arc-r { grid-column: 9; margin-right: 50%; border-right-width: 1.5px; border-bottom-width: 1.5px; border-bottom-right-radius: 12px; }

/* arrowheads: down into Aster (top arc), up into the agent (bottom arc) */
.flow-arc-top.flow-arc-r::after,
.flow-arc-bottom.flow-arc-l::after {
  content: "";
  position: absolute;
  width: 7px; height: 7px;
  border-color: var(--line);
  border-style: solid;
  border-width: 0;
}
.flow-arc-top.flow-arc-r::after {
  right: -4.5px; bottom: 1px;
  border-right-width: 1.5px; border-bottom-width: 1.5px;
  transform: rotate(45deg);
}
.flow-arc-bottom.flow-arc-l::after {
  left: -4.5px; top: 1px;
  border-left-width: 1.5px; border-top-width: 1.5px;
  transform: rotate(45deg);
}

.flow-arc-m span {
  position: absolute;
  left: 50%;
  padding: 0 10px;
  background: var(--surface);
  color: var(--fg-muted);
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}
.flow-arc-top.flow-arc-m span { top: -0.75px; }
.flow-arc-bottom.flow-arc-m span { top: 100%; margin-top: 0.75px; }

.flow-caption {
  display: none;
}

@media (max-width: 1023px) {
  .flow { max-width: 520px; margin-inline: auto; }
  .flow-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
  }
  .flow-arc { display: none; }
  .node { min-height: 0; padding: 16px; }
  .node-you { padding: 12px; }
  .edge {
    flex-direction: row-reverse;
    justify-content: flex-end;
    align-items: center;
    gap: 14px;
    min-height: 52px;
    padding: 6px 0 6px calc(50% - 0.75px);
  }
  .edge-label {
    min-height: 0;
    justify-content: flex-start;
    text-align: left;
  }
  .edge-line {
    align-self: stretch;
    width: 1.5px;
    height: auto;
    min-height: 40px;
    margin: 0;
  }
  .edge-line::after {
    right: auto;
    left: 50%;
    top: auto;
    bottom: 0;
    transform: translateX(-50%) rotate(135deg);
  }
  .flow-caption {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px dashed var(--border-strong);
    color: var(--fg-muted);
    font-size: 13.5px;
    line-height: 1.5;
  }
  .flow-caption strong { color: var(--fg); font-weight: 600; }
}

/* ---------- Steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 44px 40px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  padding-top: 20px;
  border-top: 1px solid var(--border-strong);
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 12px;
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
}
.steps h3 {
  font-size: 1.12rem;
  letter-spacing: -0.015em;
}
.steps p {
  margin-top: 8px;
  color: var(--fg-muted);
  font-size: 15px;
  line-height: 1.65;
}
.steps p strong { color: var(--fg); font-weight: 600; }

@media (max-width: 959px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 599px) {
  .steps { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}

/* ---------- Layout tree ---------- */

.layout-split {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
  margin-top: clamp(64px, 9vw, 104px);
}
.layout-copy h3 {
  font-size: 1.4rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.layout-copy p {
  margin-top: 12px;
  color: var(--fg-muted);
}
@media (max-width: 959px) {
  .layout-split { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Code blocks ---------- */

.code-block {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--code-border);
  border-radius: var(--radius-sm);
  background: var(--code-bg);
  color: var(--code-fg);
  box-shadow: var(--shadow-sm);
}
.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  padding: 0 10px 0 16px;
  border-bottom: 1px solid rgb(255 255 255 / 0.08);
  background: var(--code-head);
  color: var(--code-muted);
  font-family: var(--font-mono);
  font-size: 12px;
}
.code-block pre {
  margin: 0;
  padding: 18px 20px 20px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.7;
  tab-size: 2;
}
.code-block pre code {
  font-size: inherit;
  white-space: pre;
}
.code-block .c { color: var(--code-muted); }

.copy-btn {
  min-width: 64px;
  padding: 5px 10px;
  border: 1px solid rgb(255 255 255 / 0.14);
  border-radius: 7px;
  background: transparent;
  color: var(--code-fg);
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
}
.copy-btn:hover { background: rgb(255 255 255 / 0.08); }
.copy-btn:focus-visible { outline-color: var(--code-fg); }

.code-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-right: 8px;
}
.code-inline pre {
  flex: 1 1 auto;
  min-width: 0;
  padding: 13px 16px;
  font-size: 13px;
}
.code-inline pre code {
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

/* ---------- Features ---------- */

.features {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(72px, 10vw, 128px);
}

.feature {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.feature:nth-child(even) { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.feature:nth-child(even) .feature-text { order: 2; }

.feature-text { max-width: 30rem; }
.feature-num {
  margin-bottom: 14px;
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
}
.feature h3 {
  font-size: clamp(1.45rem, 2.2vw, 1.85rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
}
.feature-text p:not(.feature-num) {
  margin-top: 14px;
  color: var(--fg-muted);
  font-size: 16px;
  line-height: 1.65;
}
.feature-text strong { color: var(--fg); font-weight: 600; }

.feature-media { margin: 0; }

.media-caption {
  margin-top: 14px;
  color: var(--fg-muted);
  font-size: 13px;
  text-align: center;
}
.media-caption a { color: var(--fg-muted); }
.media-caption a:hover { color: var(--fg); }

@media (max-width: 959px) {
  .feature,
  .feature:nth-child(even) { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .feature:nth-child(even) .feature-text { order: 0; }
  .feature-text { max-width: 40rem; }
}

/* A feature shown with a clip: copy above, the full-width app window below. */
.feature.feature-wide { grid-template-columns: minmax(0, 1fr); gap: clamp(28px, 4vw, 44px); }
.feature.feature-wide .feature-text {
  order: 0;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 0 clamp(32px, 5vw, 72px);
  max-width: none;
}
.feature-wide .feature-body p:first-child { margin-top: 0; }
@media (max-width: 959px) {
  .feature.feature-wide .feature-text { grid-template-columns: minmax(0, 1fr); max-width: 40rem; }
  .feature-wide .feature-body p:first-child { margin-top: 14px; }
}

/* ---------- Clips ---------- */

.clip { margin: 0; }
.clip .window { cursor: pointer; }

.clip-toggle {
  position: absolute;
  left: 50%; top: 50%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px; height: 60px;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--fg);
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.92);
  transition: opacity 0.2s ease, transform 0.2s ease, background-color 0.15s ease;
}
.clip-toggle[hidden] { display: none; }
.clip-toggle svg { width: 22px; height: 22px; }
.clip-toggle svg path { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.clip-toggle .i-play path { fill: currentColor; }
.clip-toggle .i-play { display: none; margin-left: 3px; }
.clip.is-paused .clip-toggle .i-play { display: inline; }
.clip.is-paused .clip-toggle .i-pause { display: none; }
/* Shown when you paused the clip (or reduced motion holds it), or when it has keyboard focus. */
.clip.is-paused .clip-toggle,
.clip-toggle:focus-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}
.clip-toggle:focus-visible { outline-offset: 4px; border-radius: 999px; }
.clip-toggle:hover { background: var(--surface); }

.clip-caption {
  max-width: 50rem;
  margin-inline: auto;
  line-height: 1.55;
  text-wrap: pretty;
}
.clip-caption strong { color: var(--fg); font-weight: 600; }
.clip-caption code { font-size: 0.92em; }

/* ---------- Writing ---------- */

#writing .clip + .points { margin-top: clamp(48px, 7vw, 72px); }
#writing .points + .clip { margin-top: clamp(48px, 7vw, 72px); }

.points {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.points li {
  padding-top: 18px;
  border-top: 1px solid var(--border-strong);
}
.points h3 {
  font-size: 1.06rem;
  letter-spacing: -0.012em;
}
.points p {
  margin-top: 8px;
  color: var(--fg-muted);
  font-size: 15px;
  line-height: 1.6;
}
.points p strong { color: var(--fg); font-weight: 600; }
@media (max-width: 1023px) {
  .points { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 32px; }
}
@media (max-width: 599px) {
  .points { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}

/* ---------- Harness ---------- */

.harness {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.harness-copy > p:not(.eyebrow) {
  margin-top: 18px;
  color: var(--fg-muted);
  font-size: 1.06rem;
  line-height: 1.65;
}
.rules {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}
.rules li {
  position: relative;
  padding-left: 26px;
  color: var(--fg-muted);
  font-size: 15px;
  line-height: 1.6;
}
.rules li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.5em;
  width: 10px; height: 6px;
  border-left: 1.6px solid var(--fg);
  border-bottom: 1.6px solid var(--fg);
  transform: rotate(-45deg);
}
@media (max-width: 959px) {
  .harness { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Download ---------- */

.download-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 720px;
  margin: 0 auto clamp(56px, 8vw, 80px);
  text-align: center;
}
.download-logo { width: 56px; height: 56px; margin-bottom: 24px; }
.download-logo path { stroke-width: 2.5; }
.download-hero .lead { margin-top: 12px; }
.download-hero .cta { margin-top: 28px; }

.install {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 24px;
  align-items: start;
}
.install-card {
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.install-card h3 {
  font-size: 1.2rem;
  letter-spacing: -0.015em;
}

.install-steps {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: install;
}
.install-steps li {
  position: relative;
  padding-left: 40px;
  counter-increment: install;
}
.install-steps li::before {
  content: counter(install);
  position: absolute;
  left: 0; top: 0;
  display: grid;
  place-items: center;
  width: 26px; height: 26px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--fg);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}
.install-steps p {
  color: var(--fg-muted);
  font-size: 15px;
  line-height: 1.65;
}
.install-steps p strong { color: var(--fg); font-weight: 600; }

.req-list {
  display: grid;
  gap: 14px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}
.req-list li {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  color: var(--fg-muted);
  font-size: 15px;
  line-height: 1.55;
}
.req-tag {
  justify-self: start;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--ink-btn-bg);
  color: var(--ink-btn-fg);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.req-tag.req-optional {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--fg-muted);
}
.install-note {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  color: var(--fg-muted);
  font-size: 14px;
  line-height: 1.6;
}

@media (max-width: 959px) {
  .install { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 479px) {
  .install-card { padding: 22px 20px; }
  .install-steps li { padding-left: 36px; }
  .code-inline {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-left: -36px;
    padding: 0 0 10px;
  }
  .code-inline pre { padding: 14px 16px 8px; }
  .code-inline .copy-btn { align-self: flex-end; margin-right: 10px; }
  .req-list li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}

/* ---------- FAQ ---------- */

.faq {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin: 0;
  border-bottom: 1px solid var(--border-strong);
}
.faq > div {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 8px 48px;
  padding: 26px 0 28px;
  border-top: 1px solid var(--border-strong);
}
.faq dt {
  font-size: 1.06rem;
  font-weight: 620;
  line-height: 1.5;
  letter-spacing: -0.012em;
}
.faq dd {
  margin: 0;
  color: var(--fg-muted);
  font-size: 15.5px;
  line-height: 1.65;
}
@media (max-width: 767px) {
  .faq > div { grid-template-columns: minmax(0, 1fr); padding: 22px 0 24px; }
}

/* ---------- Footer ---------- */

.site-footer {
  padding-block: 48px 56px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.footer-brand p {
  margin-top: 8px;
  color: var(--fg-muted);
  font-size: 14px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}
.footer-links a {
  color: var(--fg-muted);
  text-decoration: none;
}
.footer-links a:hover { color: var(--fg); text-decoration: underline; }

/* ---------- Small screens ---------- */

@media (max-width: 479px) {
  :root { --gutter: 20px; }
  .btn { width: 100%; }
  .hero .cta,
  .download-hero .cta { width: 100%; max-width: 340px; }
  .code-block pre { font-size: 12.5px; padding: 16px; }
}
