/* TokenAgents — site styles
   One stylesheet, no build step. Tokens first, then layout, then the app mockups.
   Every colour is defined on bare :root so the light theme only has to override. */

:root {
  color-scheme: dark;

  --bg: #000;
  --bg-raised: #0a0a0b;
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --subtle: #71717a;
  --faint: #52525b;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --surface: rgba(255, 255, 255, 0.035);
  --surface-hover: rgba(255, 255, 255, 0.07);
  --track: rgba(255, 255, 255, 0.1);

  --primary-bg: #f4f4f5;
  --primary-text: #09090b;
  --primary-hover: #ffffff;

  /* The app icon is two meters: a warm one over a cool one. The site borrows both. */
  --warm: #ff8a4c;
  --warm-deep: #f2622e;
  --cool: #2dd4bf;
  --claude: #d97757;
  --codex: #8e8e93;
  --warn: #f5a524;
  --danger: #ef4444;

  --glow-a: #f2622e;
  --glow-b: #14b8a6;
  --glow-opacity: 0.42;

  --header-h: 4rem;
  --gutter: 1.25rem;
  --radius: 14px;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", sans-serif;
  --font-thai: "IBM Plex Sans Thai", var(--font);
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f7f5;
  --bg-raised: #ffffff;
  --text: #18181b;
  --muted: #52525b;
  --subtle: #71717a;
  --faint: #a1a1aa;
  --line: rgba(0, 0, 0, 0.1);
  --line-strong: rgba(0, 0, 0, 0.18);
  --surface: rgba(0, 0, 0, 0.035);
  --surface-hover: rgba(0, 0, 0, 0.065);
  --track: rgba(0, 0, 0, 0.1);
  --primary-bg: #18181b;
  --primary-text: #ffffff;
  --primary-hover: #3f3f46;
  --codex: #3f3f46;
  --glow-opacity: 0.2;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Thai needs its own face and more air than SF's tight display tracking allows. */
html[lang="th"] body { font-family: var(--font-thai); }
html[lang="th"] .display,
html[lang="th"] .section-title { letter-spacing: -0.01em; line-height: 1.24; }
html[lang="th"] .eyebrow { letter-spacing: 0.04em; }

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.03em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

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

.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: 50%; top: 0.5rem; z-index: 100;
  transform: translate(-50%, -200%);
  padding: 0.6rem 1rem; border-radius: 10px;
  background: var(--primary-bg); color: var(--primary-text);
  font-size: 14px; font-weight: 600;
}
.skip-link:focus { transform: translate(-50%, 0); }

/* ── shell ─────────────────────────────────────────────────────────────── */

.wrap {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

section { position: relative; }

.band {
  padding-block: clamp(4.5rem, 9vw, 7.5rem);
  border-top: 1px solid var(--line);
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 13px; font-weight: 500; letter-spacing: 0.02em;
  color: var(--subtle);
}

.eyebrow-dot {
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--warm);
  box-shadow: 0 0 0.75rem var(--warm);
}

.section-title {
  max-width: 22ch;
  font-size: clamp(2.1rem, 4.2vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.section-lede {
  max-width: 46ch;
  margin-top: 1.1rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.15vw, 1.15rem);
  line-height: 1.55;
}

/* ── header ────────────────────────────────────────────────────────────── */

.site-header {
  position: sticky; top: 0; z-index: 40;
  height: var(--header-h);
  display: flex; align-items: center;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms var(--ease);
}
.site-header[data-scrolled="true"] { border-bottom-color: var(--line); }

.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}

.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 600; letter-spacing: -0.02em; }
.brand img { width: 26px; height: 26px; border-radius: 7px; }

.site-nav { display: none; gap: 0.35rem; }
.site-nav a {
  padding: 0.4rem 0.7rem; border-radius: 8px;
  font-size: 14px; color: var(--muted);
  transition: color 160ms var(--ease), background-color 160ms var(--ease);
}
.site-nav a:hover { color: var(--text); background: var(--surface-hover); }

.header-tools { display: flex; align-items: center; gap: 0.4rem; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--muted);
  transition: color 160ms var(--ease), background-color 160ms var(--ease), border-color 160ms var(--ease);
}
.icon-btn:hover { color: var(--text); background: var(--surface-hover); border-color: var(--line-strong); }
.icon-btn svg { width: 16px; height: 16px; }

.lang-btn { width: auto; padding-inline: 0.7rem; font-size: 13px; font-weight: 600; letter-spacing: 0.02em; }

.theme-btn .sun { display: none; }
:root[data-theme="light"] .theme-btn .sun { display: block; }
:root[data-theme="light"] .theme-btn .moon { display: none; }

/* ── buttons ───────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  height: 44px; padding-inline: 1.15rem;
  border-radius: 11px; border: 1px solid transparent;
  font-size: 15px; font-weight: 600; letter-spacing: -0.01em;
  white-space: nowrap;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease), transform 160ms var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; }

.btn-primary { background: var(--primary-bg); color: var(--primary-text); }
.btn-primary:hover { background: var(--primary-hover); }

.btn-ghost { border-color: var(--line); background: var(--surface); color: var(--text); }
.btn-ghost:hover { background: var(--surface-hover); border-color: var(--line-strong); }

.btn-sm { height: 36px; padding-inline: 0.9rem; font-size: 14px; border-radius: 9px; }

.header-cta { display: none; }

/* ── hero ──────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  padding-top: clamp(3rem, 7vw, 5.5rem);
  padding-bottom: clamp(3rem, 7vw, 6rem);
  overflow: hidden;
  isolation: isolate;
}

.hero-glow {
  position: absolute; inset-inline: -20%; top: -32vh; z-index: -1;
  height: 90vh;
  pointer-events: none;
  opacity: var(--glow-opacity);
  background:
    radial-gradient(38% 46% at 24% 42%, var(--glow-a) 0%, transparent 68%),
    radial-gradient(42% 44% at 76% 30%, var(--glow-b) 0%, transparent 66%);
  filter: blur(70px);
}

.hero-grid {
  display: grid;
  gap: clamp(2.5rem, 5vw, 3.5rem);
  align-items: center;
}

.hero-copy { max-width: 34rem; }

.display {
  margin-top: 1.1rem;
  font-size: clamp(2.6rem, 5.6vw, 4.1rem);
  line-height: 0.99;
  letter-spacing: -0.055em;
  text-wrap: balance;
}
.display .grad {
  background: linear-gradient(96deg, var(--warm) 0%, var(--cool) 92%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

.hero-lede {
  margin-top: 1.35rem;
  max-width: 34rem;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.3vw, 1.18rem);
  line-height: 1.58;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.9rem; }

.hero-note { margin-top: 1.1rem; font-size: 13.5px; color: var(--faint); }
.hero-note b { color: var(--subtle); font-weight: 600; }

/* ── reveal ────────────────────────────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 560ms var(--ease) var(--reveal-delay, 0ms),
    transform 560ms var(--ease) var(--reveal-delay, 0ms);
}
.reveal.is-in { opacity: 1; transform: none; }

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

/* ── the Mac mockup ────────────────────────────────────────────────────── */
/* The app's own surfaces, rebuilt in the DOM rather than screenshotted, so they
   stay crisp at every density and follow the site's theme. */

.mac {
  position: relative;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(168deg, #1c1c20 0%, #0c0c0e 62%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 30px 80px -30px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  container-type: inline-size;
}
:root[data-theme="light"] .mac {
  background: linear-gradient(168deg, #f1f1ef 0%, #dcdcd8 62%);
  box-shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.mac-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  height: 30px; padding-inline: 0.7rem;
  background: rgba(0, 0, 0, 0.42);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 11.5px; color: rgba(255, 255, 255, 0.82);
}
:root[data-theme="light"] .mac-bar {
  background: rgba(255, 255, 255, 0.66);
  border-bottom-color: rgba(0, 0, 0, 0.08);
  color: rgba(0, 0, 0, 0.78);
}

.mac-bar-left, .mac-bar-right { display: flex; align-items: center; gap: 0.7rem; }
.mac-bar-left .mb-app { font-weight: 600; }
.mac-bar-left span:not(.mb-app) { opacity: 0.62; }
.mac-bar-right .mb-sys { display: flex; align-items: center; gap: 0.55rem; opacity: 0.72; }
.mac-bar-right svg { width: 14px; height: 14px; }
.mb-clock { font-variant-numeric: tabular-nums; opacity: 0.85; }

/* the app's own menu bar item */
.mb-item {
  display: inline-flex; align-items: center; gap: 0.32rem;
  padding: 0.15rem 0.4rem; border-radius: 6px;
  background: rgba(255, 255, 255, 0.11);
  font-size: 11px; font-weight: 600; letter-spacing: -0.01em;
  color: #fff;
}
:root[data-theme="light"] .mb-item { background: rgba(0, 0, 0, 0.08); color: #18181b; }
.mb-item .pill { font-size: 9px; padding: 0.05rem 0.3rem; }
.mb-item .meter { width: 34px; height: 6px; }
.mb-item .mb-lab { opacity: 0.7; font-weight: 500; }

.mac-body {
  position: relative;
  min-height: 330px;
  padding: 0.55rem 0.7rem 1.6rem;
  display: flex; justify-content: flex-end;
  background-image:
    radial-gradient(70% 60% at 70% 0%, rgba(255, 138, 76, 0.14), transparent 70%),
    radial-gradient(60% 70% at 20% 90%, rgba(45, 212, 191, 0.12), transparent 72%);
}

/* ── the dropdown ──────────────────────────────────────────────────────── */

.popover {
  width: min(330px, 100%);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(30, 30, 32, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 20px 46px -18px rgba(0, 0, 0, 0.8);
  color: #f4f4f5;
  overflow: hidden;
}
:root[data-theme="light"] .popover {
  border-color: rgba(0, 0, 0, 0.1);
  background: rgba(250, 250, 249, 0.94);
  color: #18181b;
  box-shadow: 0 20px 46px -22px rgba(0, 0, 0, 0.4);
}

.popover-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
}
:root[data-theme="light"] .popover-head { border-bottom-color: rgba(0, 0, 0, 0.08); }
.popover-head strong { font-weight: 600; letter-spacing: -0.01em; }
.popover-head span { color: #a1a1aa; }

.popover-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.55rem 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11.5px; color: #a1a1aa;
}
:root[data-theme="light"] .popover-foot { border-top-color: rgba(0, 0, 0, 0.08); }
.popover-foot kbd {
  font-family: var(--font-mono); font-size: 10.5px;
  padding: 0.1rem 0.32rem; border-radius: 5px;
  background: rgba(255, 255, 255, 0.1);
}
:root[data-theme="light"] .popover-foot kbd { background: rgba(0, 0, 0, 0.07); }

/* ── provider rows and meters ──────────────────────────────────────────── */

.prow { padding: 0.85rem 0.85rem 0.95rem; }
.prow + .prow { border-top: 1px solid rgba(255, 255, 255, 0.06); }
:root[data-theme="light"] .prow + .prow { border-top-color: rgba(0, 0, 0, 0.06); }

.prow-head { display: flex; align-items: center; gap: 0.45rem; margin-bottom: 0.65rem; }
.prow-head .pname { font-size: 14.5px; font-weight: 600; letter-spacing: -0.02em; }
.prow-head .pstamp { margin-inline-start: auto; font-size: 10.5px; color: #8c8c94; }

.pico {
  display: grid; place-items: center;
  width: 20px; height: 20px; border-radius: 6px;
  background: var(--accent);
  color: #fff;
  flex: none;
}
.pico svg { width: 13px; height: 13px; }

.pill {
  padding: 0.1rem 0.42rem; border-radius: 999px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.03em;
  background: color-mix(in srgb, var(--accent) 26%, transparent);
  color: color-mix(in srgb, var(--accent) 78%, white);
}
:root[data-theme="light"] .pill { color: color-mix(in srgb, var(--accent) 72%, black); }

.win {
  display: grid;
  grid-template-columns: 2.1rem 1fr auto;
  align-items: center;
  column-gap: 0.55rem;
  row-gap: 0.18rem;
}
.win + .win { margin-top: 0.7rem; }
.wlabel { font-size: 12px; font-weight: 700; color: var(--accent); letter-spacing: -0.01em; }
.wpct { text-align: end; line-height: 1.05; }
.wpct b { font-size: 14px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.wpct small { display: block; font-size: 9.5px; color: #8c8c94; }
.wnote { grid-column: 2 / -1; font-size: 10.5px; color: #9a9aa2; letter-spacing: -0.005em; }

.meter {
  position: relative;
  height: 9px; border-radius: 999px;
  background: var(--track);
  overflow: hidden;
}
.meter i {
  display: block; height: 100%;
  width: var(--pct, 0%);
  border-radius: 999px;
  background: var(--accent);
  transition: width 900ms var(--ease);
}
.meter[data-state="warn"] i { background: var(--warn); }
.meter[data-state="danger"] i { background: var(--danger); }

/* ── surface cards ─────────────────────────────────────────────────────── */

.card-grid {
  display: grid;
  gap: 0.9rem;
  margin-top: clamp(2.2rem, 4vw, 3.2rem);
  grid-template-columns: 1fr;
}

.card {
  position: relative;
  padding: 1.35rem 1.35rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 220ms var(--ease), background-color 220ms var(--ease), transform 220ms var(--ease);
}
.card:hover { border-color: var(--line-strong); background: var(--surface-hover); transform: translateY(-2px); }

.card::after {
  content: "";
  position: absolute; inset-inline: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent, var(--warm)) 55%, transparent), transparent);
  opacity: 0; transition: opacity 220ms var(--ease);
}
.card:hover::after { opacity: 1; }

.card-icon {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 10px;
  margin-bottom: 0.9rem;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--accent, var(--warm)) 14%, transparent);
  color: var(--accent, var(--warm));
}
.card-icon svg { width: 17px; height: 17px; }

.card h3 { font-size: 1.05rem; letter-spacing: -0.025em; }
.card p { margin-top: 0.45rem; color: var(--muted); font-size: 14.5px; line-height: 1.55; }

.card-tag {
  display: inline-block; margin-top: 0.85rem;
  padding: 0.14rem 0.5rem; border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 11px; font-weight: 600; letter-spacing: 0.02em;
  color: var(--subtle);
}
.card-tag[data-soon="true"] { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }

/* ── split feature blocks ──────────────────────────────────────────────── */

.split {
  display: grid;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
}
.split + .split { margin-top: clamp(3.5rem, 7vw, 6rem); }

.split-copy h3 {
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.split-copy p { margin-top: 0.9rem; color: var(--muted); font-size: 1rem; line-height: 1.6; max-width: 42ch; }

.bullets { margin-top: 1.4rem; display: grid; gap: 0.7rem; }
.bullets li { display: flex; gap: 0.65rem; font-size: 14.5px; color: var(--muted); line-height: 1.5; }
.bullets svg { width: 16px; height: 16px; flex: none; margin-top: 0.18rem; color: var(--cool); }
.bullets b { color: var(--text); font-weight: 600; }

.panel {
  padding: 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-raised);
  box-shadow: 0 20px 50px -30px rgba(0, 0, 0, 0.8);
}
:root[data-theme="light"] .panel { box-shadow: 0 18px 44px -30px rgba(0, 0, 0, 0.35); }

.panel .popover { width: 100%; }

/* ── providers ─────────────────────────────────────────────────────────── */

.provider-list { display: grid; gap: 0.75rem; margin-top: clamp(2rem, 4vw, 2.8rem); }

.provider {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: start;
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
}
.provider .pico { width: 34px; height: 34px; border-radius: 10px; }
.provider .pico svg { width: 20px; height: 20px; }
.provider h3 { display: flex; align-items: center; gap: 0.5rem; font-size: 1.02rem; letter-spacing: -0.025em; }
.provider p { margin-top: 0.35rem; color: var(--muted); font-size: 14px; line-height: 1.55; }
.provider code {
  font-family: var(--font-mono); font-size: 12.5px;
  color: var(--subtle);
  background: var(--surface-hover);
  padding: 0.08rem 0.34rem; border-radius: 5px;
}

.provider-note {
  margin-top: 1.1rem;
  font-size: 13.5px; color: var(--faint); line-height: 1.6;
  max-width: 62ch;
}

/* ── terminal ──────────────────────────────────────────────────────────── */

.term {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #08080a;
  overflow: hidden;
  box-shadow: 0 24px 60px -34px rgba(0, 0, 0, 0.9);
}
:root[data-theme="light"] .term { background: #101014; border-color: rgba(0, 0, 0, 0.14); }

.term-bar {
  display: flex; align-items: center; gap: 0.45rem;
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.term-bar i { width: 10px; height: 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.18); }
.term-bar i:nth-child(1) { background: #ff5f57; }
.term-bar i:nth-child(2) { background: #febc2e; }
.term-bar i:nth-child(3) { background: #28c840; }
.term-bar span { margin-inline-start: 0.5rem; font-family: var(--font-mono); font-size: 11px; color: #71717a; }

.term pre {
  margin: 0; padding: 1.05rem 1.1rem 1.3rem;
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.75;
  color: #d4d4d8;
  overflow-x: auto;
}
.term .c-dim { color: #71717a; }
.term .c-warm { color: #ff8a4c; }
.term .c-cool { color: #2dd4bf; }
.term .c-warn { color: #f5a524; }
.term .cursor {
  display: inline-block; width: 7px; height: 1em;
  background: #d4d4d8; vertical-align: text-bottom;
  animation: blink 1.1s steps(2, start) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.copy-row {
  display: flex; align-items: center; gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.55rem 0.55rem 0.55rem 0.9rem;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-family: var(--font-mono); font-size: 13px; color: var(--muted);
  max-width: max-content;
}
.copy-row button { color: var(--subtle); padding: 0.3rem; border-radius: 7px; display: grid; place-items: center; }
.copy-row button:hover { color: var(--text); background: var(--surface-hover); }
.copy-row svg { width: 15px; height: 15px; }

/* ── widgets strip ─────────────────────────────────────────────────────── */

.widget-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.85rem;
  margin-top: clamp(2rem, 4vw, 2.8rem);
}

.widget {
  aspect-ratio: 1 / 1;
  padding: 0.95rem;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015));
  display: flex; flex-direction: column; justify-content: space-between;
}
:root[data-theme="light"] .widget { background: linear-gradient(165deg, #fff, #f0f0ee); }
.widget-head { display: flex; align-items: center; gap: 0.4rem; font-size: 11.5px; color: var(--subtle); }
.widget-head .pico { width: 16px; height: 16px; border-radius: 5px; }
.widget-head .pico svg { width: 10px; height: 10px; }
.widget-num { font-size: clamp(1.6rem, 4vw, 2.1rem); font-weight: 700; letter-spacing: -0.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.widget-sub { font-size: 11px; color: var(--faint); margin-top: 0.25rem; }
.widget .meter { height: 7px; margin-top: 0.6rem; }
.widget-caption { margin-top: 0.7rem; font-size: 11.5px; color: var(--faint); text-align: center; }

/* ── email capture ─────────────────────────────────────────────────────── */

.notify {
  position: relative;
  padding: clamp(2.4rem, 5vw, 4rem) clamp(1.4rem, 4vw, 3.5rem);
  border-radius: 22px;
  border: 1px solid var(--line);
  background:
    radial-gradient(80% 130% at 12% 0%, color-mix(in srgb, var(--warm) 15%, transparent), transparent 62%),
    radial-gradient(70% 120% at 92% 100%, color-mix(in srgb, var(--cool) 14%, transparent), transparent 60%),
    var(--surface);
  overflow: hidden;
}

.notify h2 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); line-height: 1.06; letter-spacing: -0.045em; text-wrap: balance; max-width: 20ch; }
.notify p { margin-top: 0.9rem; color: var(--muted); max-width: 48ch; line-height: 1.6; }

.notify-form { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.8rem; max-width: 30rem; }
.notify-form input {
  flex: 1 1 15rem;
  height: 44px; padding-inline: 0.9rem;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
}
.notify-form input::placeholder { color: var(--faint); }
.notify-form input:focus { outline: none; border-color: var(--warm); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warm) 22%, transparent); }

.notify-status { margin-top: 0.9rem; font-size: 13.5px; min-height: 1.4em; }
.notify-status[data-tone="ok"] { color: var(--cool); }
.notify-status[data-tone="err"] { color: var(--warn); }
.notify-fine { margin-top: 1.1rem; font-size: 12.5px; color: var(--faint); max-width: 46ch; line-height: 1.55; }
.notify-fine a { color: var(--subtle); text-decoration: underline; text-underline-offset: 3px; }

/* ── technical grid ────────────────────────────────────────────────────── */

.detail-grid {
  display: grid; gap: 1.6rem 2rem;
  grid-template-columns: 1fr;
  margin-top: clamp(1.8rem, 3.5vw, 2.6rem);
}
.detail h3 { font-size: 14px; letter-spacing: -0.01em; }
.detail p { margin-top: 0.45rem; color: var(--muted); font-size: 13.5px; line-height: 1.6; }
.detail code { font-family: var(--font-mono); font-size: 12.5px; color: var(--subtle); }

/* ── footer ────────────────────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 2.6rem 3.2rem;
}
.footer-grid { display: flex; flex-wrap: wrap; gap: 1.6rem; justify-content: space-between; align-items: flex-start; }
.footer-brand { display: grid; gap: 0.6rem; }
.footer-brand p { font-size: 13px; color: var(--faint); max-width: 30ch; line-height: 1.55; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.6rem; }
.footer-col { display: grid; gap: 0.5rem; align-content: start; }
.footer-col h4 { font-size: 12px; color: var(--faint); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.footer-col a { font-size: 13.5px; color: var(--muted); }
.footer-col a:hover { color: var(--text); }
.footer-bottom { margin-top: 2.2rem; padding-top: 1.4rem; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--faint); display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: space-between; }

/* ── prose pages (privacy, support) ────────────────────────────────────── */

.prose-head { padding-block: clamp(3rem, 6vw, 4.5rem) 0; }
.prose-head h1 { font-size: clamp(2.2rem, 4.5vw, 3.2rem); letter-spacing: -0.045em; line-height: 1.05; }
.prose-head .stamp { margin-top: 0.9rem; font-size: 13.5px; color: var(--faint); }

.prose { max-width: 68ch; padding-block: clamp(2.2rem, 4vw, 3rem) clamp(4rem, 8vw, 6rem); }
.prose h2 {
  margin-top: 2.6rem; margin-bottom: 0.75rem;
  font-size: 1.28rem; letter-spacing: -0.03em;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.8rem; margin-bottom: 0.5rem; font-size: 1rem; letter-spacing: -0.02em; }
.prose p, .prose li { color: var(--muted); font-size: 15.5px; line-height: 1.72; }
.prose p + p { margin-top: 0.9rem; }
.prose ul { margin-top: 0.8rem; display: grid; gap: 0.5rem; }
.prose ul li { position: relative; padding-inline-start: 1.1rem; }
.prose ul li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 0.68em;
  width: 5px; height: 5px; border-radius: 999px; background: var(--faint);
}
.prose strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.prose a:hover { text-decoration-color: var(--warm); }
.prose code { font-family: var(--font-mono); font-size: 13.5px; background: var(--surface); padding: 0.1rem 0.36rem; border-radius: 5px; color: var(--text); }
.prose .callout {
  margin-top: 1.2rem; padding: 1rem 1.15rem;
  border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface);
}
.prose .callout p { font-size: 14.5px; }

.toc { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.6rem; }
.toc a {
  padding: 0.35rem 0.7rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  font-size: 13px; color: var(--muted);
}
.toc a:hover { color: var(--text); border-color: var(--line-strong); }

/* ── responsive ────────────────────────────────────────────────────────── */

@media (min-width: 640px) {
  :root { --gutter: 2rem; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .site-nav { display: flex; }
  .header-cta { display: inline-flex; }
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); gap: clamp(2rem, 4vw, 3.5rem); }
  .split { grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); }
  .split--flip .split-copy { order: 2; }
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .provider-list { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1100px) {
  :root { --gutter: 3rem; }
  .mac-body { min-height: 380px; }
}

/* ── downloads ─────────────────────────────────────────────────────────── */

.download-grid {
  display: grid;
  gap: 0.9rem;
  margin-top: clamp(2.2rem, 4vw, 3.2rem);
  grid-template-columns: 1fr;
}

.download-card { display: flex; flex-direction: column; }
.download-card p { flex: none; }

.download-cta { margin-top: 1.3rem; align-self: flex-start; }

/* The App Store button before there is a listing to point at.
   It stays visible and stops being a link: a button that looks live and goes nowhere is
   worse than one that says it is not ready. */
.download-cta.is-pending {
  cursor: default;
  opacity: 0.62;
  border-style: dashed;
}
.download-cta.is-pending:hover { background: var(--surface); border-color: var(--line); }

.download-meta {
  margin-top: 0.7rem;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--faint);
}

.download-verified {
  margin-top: 0.5rem;
  font-size: 12.5px;
  color: var(--cool);
  display: flex; align-items: center; gap: 0.4rem;
}
.download-verified::before {
  content: "";
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--cool);
  flex: none;
}

.copy-row button.did-copy { color: var(--cool); }

@media (min-width: 640px) {
  .download-grid { grid-template-columns: repeat(2, 1fr); }
}
