/* TabSet - taken from the app's Theme.swift. Dark only, by design:
   the palette is built on lime, which only works on dark. */

:root {
  --bg: #0E0F10;
  --surface: #1A1C1E;
  --surface-high: #242629;
  --accent: #CBF43C;
  --on-accent: #0E0F10;
  --text: #FFFFFF;
  --text-dim: rgba(255, 255, 255, 0.55);
  --sets: #FF9500;

  --blue: #0A84FF;
  --yellow: #FFD60A;
  --red: #FF453A;

  /* Hairlines and hovers: --text at low alpha, never a new hue. */
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);

  --r-card: 20px;
  --r-tile: 18px;
  --r-pill: 999px;

  --wrap: 1120px;
  --gut: clamp(20px, 5vw, 40px);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Rounded", "Segoe UI", Inter,
    system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { line-height: 1.1; letter-spacing: -0.022em; margin: 0; font-weight: 700; }
h1 { font-size: clamp(2.25rem, 6.4vw, 4rem); }
h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
h3 { font-size: clamp(1.15rem, 2.2vw, 1.35rem); letter-spacing: -0.015em; }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--text); text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }

img { max-width: 100%; height: auto; display: block; }
svg.i { flex: none; }

.dim { color: var(--text-dim); }
.sm { font-size: 0.9375rem; }
.num { font-variant-numeric: tabular-nums; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }
.lede { font-size: clamp(1.0625rem, 2.1vw, 1.25rem); color: var(--text-dim); max-width: 62ch; }

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

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: var(--on-accent);
  padding: 12px 20px; border-radius: 0 0 var(--r-tile) 0; font-weight: 600;
}
.skip:focus { left: 0; }

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

.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 1.0625rem; letter-spacing: -0.02em; text-decoration: none;
}
.brand__mark { border-radius: 8px; }
.nav__links { display: flex; align-items: center; gap: clamp(16px, 3vw, 28px); }
/* No room for a third target on a narrow phone, and the hero button is one
   scroll away, so the nav keeps only its links. No JavaScript, no hamburger. */
@media (max-width: 599px) {
  .nav__links .btn { display: none; }
  .nav__in { min-height: 58px; }
}
.nav__links a { text-decoration: none; color: var(--text-dim); font-size: 0.9375rem; font-weight: 500; }
.nav__links a:hover { color: var(--text); }
.nav__links a[aria-current="page"] { color: var(--text); }
.nav__links .btn { color: var(--text); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: var(--r-pill);
  font-weight: 650; font-size: 1rem; text-decoration: none;
  border: 1px solid transparent; transition: transform .15s ease, background-color .15s ease;
}
.btn:active { transform: translateY(1px); }
/* Lime is a light colour: it only ever carries near-black text. */
.btn--accent { background: var(--accent); color: var(--on-accent); }
.btn--accent:hover { background: color-mix(in srgb, var(--accent) 88%, #fff); }
.btn--ghost { background: var(--surface); color: var(--text); border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--surface-high); }
.btn--sm { padding: 9px 16px; font-size: 0.9375rem; }

/* ---------- sections ---------- */

.sec { padding-block: clamp(56px, 9vw, 104px); }
.sec + .sec { border-top: 1px solid var(--line); }
.sec__head { max-width: 62ch; }
.sec__head h2 + p { margin-top: 14px; }
.eyebrow {
  display: inline-block; font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.09em; text-transform: uppercase; color: var(--text-dim);
  margin-bottom: 14px;
}

/* ---------- hero ---------- */

.hero { padding-block: clamp(48px, 8vw, 88px) clamp(56px, 9vw, 96px); }
.hero__in { display: grid; gap: clamp(40px, 6vw, 72px); align-items: center; }
@media (min-width: 900px) { .hero__in { grid-template-columns: 1.15fr 0.85fr; } }
.hero h1 { max-width: 15ch; }
.hero__sub { margin-top: 22px; font-size: clamp(1.0625rem, 2.2vw, 1.3125rem); color: var(--text-dim); max-width: 52ch; }
.hero__price {
  margin-top: 26px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px;
  font-size: 1.0625rem;
}
.hero__price strong { font-weight: 650; }
.hero__actions { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero__meta { margin-top: 18px; font-size: 0.875rem; color: var(--text-dim); }
.hero__art { display: flex; justify-content: center; }

/* ---------- device shots ---------- */

/* Real captures in Apple's own device frames. The frame is a transparent PNG,
   so the shadow has to follow the silhouette rather than the image box. */
.shot { margin: 0; }
.shot img { filter: drop-shadow(0 22px 34px rgba(0, 0, 0, 0.55)); }
.shot--watch img { width: 250px; }
.shot--phone img { width: 250px; }
@media (min-width: 700px) {
  .shot--watch img { width: 280px; }
  .shot--phone img { width: 272px; }
}
.hero__art .shot--watch img { width: min(300px, 78vw); }

.shots { display: flex; flex-wrap: wrap; gap: clamp(16px, 3vw, 34px); justify-content: center; align-items: flex-start; }

/* ---------- feature rows ---------- */

.row { display: grid; gap: clamp(32px, 5vw, 64px); align-items: center; }
@media (min-width: 900px) {
  .row { grid-template-columns: 1fr 1fr; }
  .row--flip .row__art { order: -1; }
}
.row__art { display: flex; justify-content: center; }
.row__body h2 + p { margin-top: 16px; }

/* ---------- cards ---------- */

.cards { display: grid; gap: 16px; margin-top: clamp(28px, 4vw, 44px); }
@media (min-width: 620px) { .cards--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 860px) { .cards--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 620px) { .cards--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .cards--4 { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 26px 24px;
}
/* A grid item's automatic minimum is min-content, so a wide <pre> or table
   inside one would push the page sideways. Let them shrink and scroll instead. */
.cards > *, .row > *, .hero__in > *, .price-card > * { min-width: 0; }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--text-dim); font-size: 0.9688rem; }

/* An icon tile is surface-high with a white glyph. Lime is a spotlight, so it is
   spent on the one primary action in a section, never on a row of repeated icons.
   Dilute lime over any real area turns olive, so it never fills a box either. */
.tile {
  width: 46px; height: 46px; border-radius: 14px;
  background: var(--surface-high); color: var(--text);
  display: grid; place-items: center; margin-bottom: 18px;
}
.tile--sets { color: var(--sets); }

/* ---------- ring legend ---------- */

.legend { display: grid; gap: 12px; margin-top: 26px; padding: 0; list-style: none; }
.legend li { display: flex; gap: 14px; align-items: flex-start; }
.legend__key {
  flex: none; margin-top: 4px; width: 14px; height: 14px; border-radius: 50%;
  border: 3px solid var(--accent);
}
.legend__key--sets { border-color: var(--sets); }
.legend b { font-weight: 650; }
.legend span { color: var(--text-dim); }

/* ---------- plain lists ---------- */

.ticks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-dim); }
.ticks .i { margin-top: 4px; color: var(--text); }
.ticks--no .i { color: var(--text-dim); }
.ticks b { color: var(--text); font-weight: 650; }

/* ---------- pricing closer ---------- */

.price-card {
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--r-card); padding: clamp(28px, 5vw, 44px);
  display: grid; gap: 28px; align-items: center;
}
@media (min-width: 820px) { .price-card { grid-template-columns: 1.1fr 0.9fr; } }
.price-card__amt { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.price-card__amt b { font-size: clamp(2.5rem, 6vw, 3.25rem); font-weight: 700; letter-spacing: -0.03em; }

/* ---------- code ---------- */

.code {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); overflow: hidden; margin: 22px 0 0; max-width: 100%;
}
.code__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface-high);
  font-size: 0.8125rem; color: var(--text-dim);
}
.code__name { font-family: var(--mono); }
.code pre {
  margin: 0; padding: 20px 18px; overflow-x: auto;
  font-family: var(--mono); font-size: 0.8125rem; line-height: 1.7; tab-size: 2;
}
.code code { color: var(--text); }
code:not(pre code) {
  font-family: var(--mono); font-size: 0.875em; background: var(--surface-high);
  border-radius: 6px; padding: 0.15em 0.42em; color: var(--text);
}

/* ---------- tables ---------- */

.tbl-wrap { overflow-x: auto; max-width: 100%; margin-top: 22px; border: 1px solid var(--line); border-radius: var(--r-card); }
table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 0.9375rem; }
th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--surface-high); font-weight: 650; font-size: 0.8125rem;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-dim); }
tbody tr:last-child td { border-bottom: 0; }
td:first-child, th:first-child { white-space: nowrap; }
td code { white-space: nowrap; }
.t-req { color: var(--text-dim); font-size: 0.8125rem; white-space: nowrap; }

/* ---------- steps ---------- */

.steps { counter-reset: s; list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 14px; }
.steps li { counter-increment: s; display: flex; gap: 14px; align-items: flex-start; color: var(--text-dim); }
.steps li::before {
  content: counter(s); flex: none;
  width: 26px; height: 26px; border-radius: 50%; margin-top: 2px;
  background: var(--surface-high); color: var(--text);
  display: grid; place-items: center; font-size: 0.8125rem; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.steps b { color: var(--text); font-weight: 650; }

/* ---------- chips ---------- */

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding: 0; list-style: none; }
/* Tinted lime is fine on a lone chip, but seventeen of them tile into one large
   dilute-lime area, which goes olive. A wall of values is surface, not accent. */
.chip {
  font-family: var(--mono); font-size: 0.8125rem; padding: 5px 11px;
  border-radius: var(--r-pill); background: var(--surface-high); color: var(--text);
}

/* ---------- validator ---------- */

.tool { margin-top: 26px; }
.tool textarea {
  width: 100%; min-height: 230px; resize: vertical;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: var(--r-card);
  padding: 16px 18px; font-family: var(--mono); font-size: 0.8125rem; line-height: 1.7;
}
.tool textarea:focus-visible { outline-offset: 1px; }
.tool__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; align-items: center; }
.tool__out { margin-top: 18px; }
.tool__out:empty { display: none; }

.result { border-radius: var(--r-tile); border: 1px solid var(--line); background: var(--surface); padding: 18px 20px; }
.result h3 { font-size: 1.0625rem; margin-bottom: 6px; }
.result ul { margin: 12px 0 0; padding-left: 0; list-style: none; display: grid; gap: 9px; }
.result li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9375rem; color: var(--text-dim); }
.result li .i { margin-top: 3px; }
.result code { font-size: 0.85em; }
.is-ok .i { color: var(--accent); }
.is-err .i { color: var(--red); }
.is-warn .i { color: var(--yellow); }
.result__sum { display: flex; gap: 10px; align-items: flex-start; }
.result__sum .i { margin-top: 4px; }
.tool__note { margin-top: 12px; font-size: 0.875rem; color: var(--text-dim); }

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

.faq { margin-top: 26px; display: grid; gap: 12px; }
.faq details {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-tile); padding: 4px 20px;
}
.faq summary {
  cursor: pointer; padding: 16px 0; font-weight: 650; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .i { color: var(--text-dim); transition: transform .18s ease; }
.faq details[open] summary .i { transform: rotate(90deg); }
.faq details > div { padding-bottom: 18px; color: var(--text-dim); }
.faq details > div > :first-child { margin-top: 0; }

/* ---------- prose (legal pages) ---------- */

.prose { max-width: 68ch; }
.prose h2 { font-size: clamp(1.3rem, 2.6vw, 1.6rem); margin-top: 42px; }
.prose h2:first-of-type { margin-top: 30px; }
.prose p, .prose li { color: var(--text-dim); }
.prose strong { color: var(--text); font-weight: 650; }
.prose ul { padding-left: 20px; display: grid; gap: 8px; margin: 14px 0; }
.prose a { color: var(--text); }

/* ---------- footer ---------- */

.foot { border-top: 1px solid var(--line); padding-block: clamp(40px, 6vw, 64px) 32px; margin-top: 0; }
.foot__in { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; align-items: flex-start; }
.foot__brand { display: flex; gap: 12px; align-items: center; }
.foot__name { font-weight: 700; margin: 0; letter-spacing: -0.02em; }
.foot__brand p { margin: 0; }
.foot__links { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.foot__links a { color: var(--text-dim); text-decoration: none; font-size: 0.9375rem; }
.foot__links a:hover { color: var(--text); }
.foot__legal { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); display: grid; gap: 6px; }

/* ---------- 404 ---------- */

.mid { min-height: 52vh; display: grid; place-items: center; text-align: center; }
.mid .btn { margin-top: 26px; }

/* ---------- spacing utilities ---------- */
/* These exist as classes rather than style attributes because the site's own
   Content-Security-Policy sets style-src 'self', which drops inline styles. */

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 14px; }
.mt-3 { margin-top: 18px; }
.mt-4 { margin-top: 22px; }
.mt-5 { margin-top: 26px; }
.mt-6 { margin-top: 30px; }
.mt-7 { margin-top: 44px; }
.mt-shots { margin-top: clamp(32px, 5vw, 52px); }
.measure { max-width: 62ch; }
.measure-wide { max-width: 70ch; }
.lede--center { margin: 16px auto 0; }
.is-centered { justify-content: center; }
.sec--tight { padding-bottom: 0; }

/* ---------- release list ---------- */

.rel { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 14px; }
.rel__item {
  display: grid; gap: 18px; padding: 26px 24px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
}
@media (min-width: 760px) { .rel__item { grid-template-columns: 190px 1fr; } }
.rel__meta { display: grid; gap: 6px; align-content: start; }
.rel__v { font-size: 1.5rem; }
.rel__meta p { margin: 0; }
.rel__body p { color: var(--text-dim); }
.chip--sm { font-size: 0.75rem; padding: 4px 9px; justify-self: start; font-family: var(--font); }
.card__h { font-size: clamp(1.15rem, 2.2vw, 1.35rem); letter-spacing: -0.015em; margin-bottom: 10px; }
