/* Tokens. Spacing is a 4px scale; type follows a fixed scale. */
:root {
  --bg: #0b0b0c;
  --surface: #121214;
  --surface-2: #17171a;
  --border: #232326;
  --border-strong: #2e2e33;
  --text: #ededef;
  --text-2: #a1a1aa;
  --text-3: #71717a;
  --accent: #4a6cf7;
  --accent-hover: #5b7bff;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px;
  --s8: 32px; --s10: 40px; --s12: 48px; --s16: 64px; --s20: 80px; --s24: 96px; --s32: 128px;

  --r-md: 8px; --r-lg: 12px;

  --t-xs: 12px; --t-sm: 14px; --t-base: 16px; --t-lg: 18px; --t-xl: 20px;
  --t-2xl: 24px; --t-3xl: 32px; --t-4xl: 44px; --t-5xl: 60px;

  --container: 1200px;
  --shadow: 0 24px 64px -24px rgba(0,0,0,.6), 0 2px 6px rgba(0,0,0,.25);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 var(--t-base)/1.6 Inter, -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01";
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; color: var(--text); font-weight: 600; letter-spacing: -0.02em; }
p { margin: 0; }
figure { margin: 0; }
code, kbd, pre { font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--s6); }

/* Icons: Lucide, 20px, 1.5 stroke, currentColor */
.i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: var(--s2); height: 40px; padding: 0 var(--s4);
  border-radius: var(--r-md); font-size: var(--t-sm); font-weight: 500; border: 1px solid transparent;
  transition: background-color .15s ease, border-color .15s ease; white-space: nowrap;
}
.btn .i { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn-secondary:hover { background: var(--surface-2); }
.btn:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Header */
.header { position: sticky; top: 0; z-index: 10; background: rgba(11,11,12,.92); border-bottom: 1px solid var(--border); }
.header .container { display: flex; align-items: center; height: 64px; gap: var(--s8); }
.brand { display: flex; align-items: center; gap: var(--s3); font-weight: 600; font-size: var(--t-sm); }
.brand img { width: 24px; height: 24px; }
.nav { display: flex; gap: var(--s6); font-size: var(--t-sm); color: var(--text-2); }
.nav a:hover { color: var(--text); }
.header-actions { margin-left: auto; display: flex; gap: var(--s3); }

/* Hero */
.hero { padding: var(--s24) 0 var(--s16); }
.hero-grid { display: grid; grid-template-columns: 7fr 5fr; gap: var(--s16); align-items: start; }
.label { display: inline-flex; align-items: center; gap: var(--s2); font-size: var(--t-xs); font-weight: 500; color: var(--text-2); text-transform: uppercase; letter-spacing: .08em; }
.hero h1 { font-size: var(--t-5xl); line-height: 1.05; letter-spacing: -0.035em; font-weight: 700; max-width: 14ch; }
.hero-copy { color: var(--text-2); font-size: var(--t-lg); line-height: 1.6; max-width: 46ch; }
.hero-actions { display: flex; gap: var(--s3); flex-wrap: wrap; margin-top: var(--s8); }
.hero-meta { margin-top: var(--s4); font-size: var(--t-xs); color: var(--text-3); }

.shot-frame { margin-top: var(--s16); border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); padding: var(--s2); box-shadow: var(--shadow); }
.shot-frame img { border-radius: var(--r-md); width: 100%; }

/* Spec strip */
.specs { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.spec { padding: var(--s8) var(--s6); border-left: 1px solid var(--border); }
.spec:first-child { border-left: 0; padding-left: 0; }
.spec dt { font-size: var(--t-2xl); font-weight: 600; letter-spacing: -0.02em; }
.spec dd { margin: var(--s1) 0 0; color: var(--text-2); font-size: var(--t-sm); }

/* Sections */
.section { padding: var(--s32) 0 0; }
.section-head { display: grid; grid-template-columns: 5fr 7fr; gap: var(--s16); margin-bottom: var(--s16); }
.section-head h2 { font-size: var(--t-4xl); line-height: 1.1; letter-spacing: -0.03em; }
.section-head p { color: var(--text-2); font-size: var(--t-lg); align-self: end; max-width: 56ch; }

/* Feature grid: hairline grid, no nested cards */
.features { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--border); border-left: 1px solid var(--border); }
.feature { padding: var(--s8); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.feature .i { color: var(--text-2); }
.feature h3 { font-size: var(--t-base); margin-top: var(--s5); }
.feature p { margin-top: var(--s2); color: var(--text-2); font-size: var(--t-sm); line-height: 1.6; }

/* Showcase rows */
.row { display: grid; grid-template-columns: 4fr 8fr; gap: var(--s16); align-items: start; }
.row.reverse { grid-template-columns: 8fr 4fr; }
.row.reverse .row-copy { order: 2; }
.row + .row { margin-top: var(--s32); }
.row-copy { position: sticky; top: calc(64px + var(--s12)); }
.row-copy h3 { font-size: var(--t-3xl); line-height: 1.15; letter-spacing: -0.025em; margin-top: var(--s4); }
.row-copy > p { margin-top: var(--s4); color: var(--text-2); }
.list { list-style: none; margin: var(--s8) 0 0; padding: 0; border-top: 1px solid var(--border); }
.list li { display: flex; gap: var(--s3); padding: var(--s3) 0; border-bottom: 1px solid var(--border); font-size: var(--t-sm); color: var(--text-2); }
.list li .i { width: 16px; height: 16px; margin-top: 3px; color: var(--text-3); }
.list li b { color: var(--text); font-weight: 500; }
.row .shot-frame { margin-top: 0; }
.shot-frame.narrow { max-width: 560px; justify-self: end; }
/* Window captures with macOS's own shadow: no extra frame. */
.shot { margin-top: var(--s12); }
.shot img { width: 100%; }
.row .shot { margin-top: 0; }
.shot.narrow { max-width: 600px; justify-self: end; }
/* A phone screenshot: shown at phone size, with the screen's rounded corners. */
.shot.phone { max-width: 320px; justify-self: center; }
.shot.phone img { border-radius: 40px; border: 1px solid var(--border-strong); }

/* Two-column technical blocks */
.columns { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s16); }
.block h3 { display: flex; align-items: center; gap: var(--s3); font-size: var(--t-xl); }
.block h3 .i { color: var(--text-2); }
.block > p { margin-top: var(--s3); color: var(--text-2); }

/* Shortcuts */
.keys { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: var(--s16); border-top: 1px solid var(--border); }
.key { display: flex; justify-content: space-between; align-items: center; gap: var(--s4); padding: var(--s3) 0; border-bottom: 1px solid var(--border); font-size: var(--t-sm); color: var(--text-2); }
kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 var(--s2); margin-left: var(--s1); border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface); font-size: var(--t-xs); color: var(--text); }

/* Install */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); column-gap: var(--s6); border-top: 1px solid var(--border); counter-reset: step; }
.steps li { padding-top: var(--s8); counter-increment: step; min-width: 0; }
.steps li::before { content: counter(step, decimal-leading-zero); display: block; font-size: var(--t-xs); font-weight: 500; color: var(--text-3); margin-bottom: var(--s4); font-variant-numeric: tabular-nums; }
.steps h4 { font-size: var(--t-base); }
.steps p { margin-top: var(--s2); color: var(--text-2); font-size: var(--t-sm); }
.steps a { color: var(--text); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
pre { margin: var(--s3) 0 0; padding: var(--s3) var(--s4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); font-size: var(--t-xs); color: var(--text); overflow-x: auto; }
.inline-code { font-family: ui-monospace, Menlo, monospace; font-size: .9em; padding: 1px 6px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); }

/* CTA */
.cta { margin-top: var(--s32); padding: var(--s16) 0; border-top: 1px solid var(--border); display: grid; grid-template-columns: 1fr auto; gap: var(--s8); align-items: center; }
.cta h2 { font-size: var(--t-3xl); letter-spacing: -0.025em; }
.cta p { margin-top: var(--s2); color: var(--text-2); }
.cta .hero-actions { margin-top: 0; }

.footer { border-top: 1px solid var(--border); padding: var(--s8) 0 var(--s12); font-size: var(--t-xs); color: var(--text-3); }
.footer .container { display: flex; justify-content: space-between; gap: var(--s6); flex-wrap: wrap; }
.footer nav { display: flex; gap: var(--s6); }
.footer a:hover { color: var(--text); }

@media (max-width: 1024px) {
  .nav { display: none; }
  .hero-grid, .section-head, .row, .row.reverse, .columns { grid-template-columns: 1fr; gap: var(--s8); }
  .row.reverse .row-copy { order: 0; }
  .row-copy { position: static; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: var(--s8); }
}
@media (max-width: 640px) {
  .container { padding: 0 var(--s4); }
  .hero { padding: var(--s16) 0 var(--s8); }
  .hero h1 { font-size: 40px; }
  .section { padding-top: var(--s20); }
  .section-head { margin-bottom: var(--s10); }
  .section-head h2 { font-size: var(--t-3xl); }
  .row-copy h3 { font-size: var(--t-2xl); }
  .header-actions .btn-secondary { display: none; }
  .specs { grid-template-columns: 1fr 1fr; }
  .spec { padding: var(--s6) var(--s4); }
  .spec:nth-child(odd) { border-left: 0; padding-left: 0; }
  .spec:nth-child(n+3) { border-top: 1px solid var(--border); }
  .features, .keys, .steps { grid-template-columns: 1fr; }
  .feature { padding: var(--s6); }
  .row + .row { margin-top: var(--s20); }
  .cta { grid-template-columns: 1fr; margin-top: var(--s20); }
}

/* Changelog page */
.nav a[aria-current="page"] { color: var(--text); }
.changelog { padding: var(--s24) 0 var(--s32); }
.release { display: grid; grid-template-columns: 3fr 9fr; gap: var(--s16); padding: var(--s12) 0; border-top: 1px solid var(--border); }
.release-meta { position: sticky; top: calc(64px + var(--s8)); align-self: start; }
.release-meta h2 { font-size: var(--t-2xl); display: flex; align-items: center; gap: var(--s3); font-variant-numeric: tabular-nums; }
.release-meta p { margin-top: var(--s1); color: var(--text-3); font-size: var(--t-sm); }
.tag { font-size: var(--t-xs); font-weight: 500; letter-spacing: 0; color: var(--accent-hover); border: 1px solid var(--border-strong); border-radius: 6px; padding: 2px var(--s2); }
.release-body > p { color: var(--text-2); }
.release-body > * + * { margin-top: var(--s4); }
.release-body h3 { font-size: var(--t-xs); font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); }
.release-body h3:not(:first-child) { margin-top: var(--s8); }
.release-body .list { margin-top: var(--s3); }
@media (max-width: 1024px) {
  .release { grid-template-columns: 1fr; gap: var(--s4); }
  .release-meta { position: static; }
}

/* Install guide (thanks.html) */
.guide { padding: var(--s24) 0 var(--s32); }
.guide-head { display: grid; grid-template-columns: 7fr 5fr; gap: var(--s16); align-items: start; padding-bottom: var(--s16); }
.guide-head h1 { font-size: var(--t-5xl); line-height: 1.05; letter-spacing: -0.035em; font-weight: 700; max-width: 12ch; }
.guide-head h1 + .label { display: block; margin-top: var(--s5); }
.guide-head p { color: var(--text-2); font-size: var(--t-lg); }
.guide-head p + p { margin-top: var(--s4); }
.guide-head .guide-meta { font-size: var(--t-sm); color: var(--text-3); }
.guide a:not(.btn) { color: var(--text); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
.install-steps { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.install-steps > li { display: grid; grid-template-columns: 3fr 9fr; gap: var(--s16); padding: var(--s12) 0; border-bottom: 1px solid var(--border); }
.step-number { width: 40px; height: 40px; border-radius: var(--r-md); border: 1px solid var(--border-strong); background: var(--surface); display: grid; place-items: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.step-body { min-width: 0; }
.step-body h2 { font-size: var(--t-2xl); }
.step-body > p { margin-top: var(--s3); color: var(--text-2); max-width: 64ch; }
.step-body b { color: var(--text); font-weight: 500; }
.step-body .note { font-size: var(--t-sm); color: var(--text-3); }
.choice { margin-top: var(--s6); padding: var(--s6); border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.choice h3 { font-size: var(--t-base); }
.choice > p { margin-top: var(--s2); color: var(--text-2); }
.substeps { margin: var(--s3) 0 0; padding-left: var(--s5); color: var(--text-2); }
.substeps li { padding: var(--s1) 0; }
.substeps li::marker { color: var(--text-3); font-variant-numeric: tabular-nums; }
.command { display: flex; align-items: center; gap: var(--s3); margin-top: var(--s3); padding: var(--s2) var(--s2) var(--s2) var(--s4); background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-md); }
.command code { flex: 1; min-width: 0; font-size: var(--t-sm); color: var(--text); overflow-x: auto; white-space: nowrap; }
.command .btn { height: 32px; flex: none; }
.guide-help { display: grid; grid-template-columns: 3fr 9fr; gap: var(--s16); padding-top: var(--s16); }
.guide-help h2 { font-size: var(--t-2xl); }
.guide-help .list { margin-top: 0; }
@media (max-width: 1024px) {
  .guide-head, .install-steps > li, .guide-help { grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
}
@media (max-width: 640px) {
  .guide { padding-top: var(--s16); }
  .guide-head h1 { font-size: 40px; }
  .choice { padding: var(--s4); }
}
