:root {
  --ink: #121214;
  --charcoal: #1a1a1d;
  --panel: #222226;
  --raised: #2a2a2e;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.15);
  --text: #ececec;
  --text-2: #a6a6ad;
  --text-3: #75757c;
  --accent: #62c3cf;
  --accent-weak: rgba(98, 195, 207, 0.14);
  --ok: #4cc38a;
  --sans: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Atkinson Hyperlegible Mono", ui-monospace, Menlo, Consolas, monospace;
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(0.2, 0, 0, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  background: var(--charcoal);
  color: var(--text);
  font: 400 1rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
a:hover { text-decoration-color: currentColor; }
::selection { background: var(--accent-weak); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
img { max-width: 100%; display: block; -webkit-user-drag: none; user-drag: none; pointer-events: none; }
code, .mono { font-family: var(--mono); font-size: 0.875em; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--text); color: var(--ink); padding: 8px 12px; }
.skip:focus { left: 8px; }

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

.top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--ink) 86%, transparent);
  backdrop-filter: saturate(1.3) blur(12px);
  -webkit-backdrop-filter: saturate(1.3) blur(12px);
  border-bottom: 1px solid var(--line);
}
.bar { display: flex; align-items: center; gap: 32px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.0625rem; letter-spacing: -0.01em; text-decoration: none; color: var(--text); }
.mark { color: var(--text); flex: none; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { padding: 6px 10px; color: var(--text-2); text-decoration: none; font-size: 0.9375rem; }
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  font: 600 0.9375rem/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.12s var(--ease), border-color 0.12s var(--ease);
  white-space: nowrap;
}
.btn:hover { background: rgba(255, 255, 255, 0.06); border-color: var(--text-3); }
.btn.primary { background: var(--text); color: var(--ink); border-color: var(--text); }
.btn.primary:hover { background: #ffffff; }
.btn.small { height: 36px; padding: 0 14px; font-size: 0.875rem; }
.btn.ghost { border-color: var(--line); }

.hero { position: relative; min-height: calc(100svh - 60px); display: flex; align-items: center; overflow: hidden; background: var(--ink); border-bottom: 1px solid var(--line); }
.scene { position: absolute; inset: 0; }
.scene canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.scene .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; display: none; }
.scene.static .poster { display: block; }
.scene.static canvas, .scene.static .labels { display: none; }
.scene::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, var(--ink) 0%, rgba(18, 18, 20, 0.92) 30%, rgba(18, 18, 20, 0.35) 55%, rgba(18, 18, 20, 0) 75%); }
.labels { position: absolute; inset: 0; pointer-events: none; }
.tag {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -100%);
  font: 500 0.75rem/1 var(--mono);
  color: var(--text-2);
  background: rgba(18, 18, 20, 0.82);
  border: 1px solid var(--line-strong);
  padding: 5px 7px;
  white-space: nowrap;
  will-change: transform;
}
.tag.server { color: var(--ink); background: var(--text); border-color: var(--text); font-weight: 600; }
.tag i { display: inline-block; width: 7px; height: 7px; margin-right: 6px; vertical-align: 0; }

.hero-grid { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 640px); gap: 48px; align-items: end; padding-top: 72px; padding-bottom: 72px; pointer-events: none; }
.hero-grid > * { pointer-events: auto; min-width: 0; }
h1 { font-size: clamp(2.5rem, 1.5rem + 3.4vw, 4.5rem); line-height: 1.04; letter-spacing: -0.032em; font-weight: 650; margin: 0 0 24px; text-wrap: balance; }
.lede { font-size: 1.1875rem; line-height: 1.55; color: var(--text-2); margin: 0 0 32px; max-width: 34em; }

.cmd { display: flex; align-items: stretch; border: 1px solid var(--line-strong); background: rgba(34, 34, 38, 0.9); max-width: 640px; }
.cmd code { flex: 1; min-width: 0; padding: 13px 16px; font-size: 0.8125rem; line-height: 1.5; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmd code::before { content: "$ "; color: var(--text-3); }
.cmd.big { max-width: none; }
.cmd.big code { font-size: 0.875rem; padding: 16px 18px; white-space: pre-wrap; word-break: break-all; }
.copy { flex: none; border: none; border-left: 1px solid var(--line-strong); background: transparent; color: var(--text-2); font: 600 0.8125rem var(--sans); padding: 0 18px; cursor: pointer; min-width: 84px; }
.copy:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.copy.done { color: var(--ok); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 36px; }
.facts { list-style: none; margin: 0; padding: 20px 0 0; display: flex; flex-wrap: wrap; gap: 8px 28px; border-top: 1px solid var(--line); color: var(--text-2); font-size: 0.9375rem; }
.facts b { color: var(--text); font-weight: 650; font-size: 1.0625rem; margin-right: 4px; }


.band { padding: clamp(72px, 9vw, 128px) 0; border-bottom: 1px solid var(--line); }
.band.dark { background: #161618; }
.band.ink { background: var(--ink); }
.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 32px clamp(32px, 6vw, 96px); align-items: start; }
.split.head { align-items: end; margin-bottom: 36px; }
.side h2, h2 { font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem); line-height: 1.12; letter-spacing: -0.022em; font-weight: 650; margin: 0 0 16px; text-wrap: balance; }
.split.head h2 { margin: 0; }
.side p, .side-note { color: var(--text-2); font-size: 1.0625rem; margin: 0; max-width: 32em; }
.side { position: sticky; top: 100px; }
.split.head .side { position: static; }

.rows { border-top: 1px solid var(--line-strong); }
.row { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 8px 32px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.row h3 { margin: 0; font-size: 1.0625rem; font-weight: 650; letter-spacing: -0.005em; }
.row p { margin: 0; color: var(--text-2); }

.tabs { display: flex; flex-wrap: wrap; gap: 0; border-bottom: 1px solid var(--line-strong); margin-bottom: 24px; }
.tabs button { background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--text-2); font: 600 0.9375rem var(--sans); padding: 12px 16px; cursor: pointer; }
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.tabs.os { margin-bottom: 16px; }

.shot { margin: 0; }
.frame { border: 1px solid var(--line-strong); background: var(--panel); }
.chrome { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-bottom: 1px solid var(--line); }
.chrome i { width: 9px; height: 9px; background: var(--raised); border: 1px solid var(--line-strong); }
.chrome span { margin-left: 12px; font: 0.75rem var(--mono); color: var(--text-3); }
.shot img { width: 100%; height: auto; aspect-ratio: 1440 / 900; background: var(--charcoal); }
.shot figcaption { margin-top: 14px; color: var(--text-2); font-size: 0.9375rem; }

.note { color: var(--text-3); font-size: 0.875rem; margin: 10px 0 0; }
.steps { list-style: none; counter-reset: step; margin: 40px 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line-strong); }
.steps li { counter-increment: step; padding: 20px 24px 4px 0; }
.steps li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.steps li::before { content: counter(step); display: block; font: 600 0.8125rem var(--mono); color: var(--accent); margin-bottom: 10px; }
.steps h3 { margin: 0 0 6px; font-size: 1.0625rem; font-weight: 650; }
.steps p { margin: 0; color: var(--text-2); font-size: 0.9375rem; }

table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
caption { text-align: left; font-weight: 650; padding-bottom: 12px; font-size: 1.0625rem; }
th, td { text-align: left; vertical-align: top; padding: 14px 24px 14px 0; border-bottom: 1px solid var(--line); }
td:last-child, th:last-child { padding-right: 0; }
thead th { font-size: 0.8125rem; font-weight: 600; color: var(--text-3); border-bottom-color: var(--line-strong); padding-top: 0; }
tbody th { font-weight: 600; width: 34%; }
tbody td { color: var(--text-2); }
.spec td code { color: var(--text); }
.table-wrap { overflow-x: auto; }
.platforms td.mono { font-size: 0.8125rem; line-height: 1.7; }

.cta { display: flex; flex-wrap: wrap; gap: 12px; align-content: start; }

.foot { padding: 48px 0 64px; background: var(--ink); color: var(--text-3); font-size: 0.875rem; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 24px clamp(32px, 6vw, 96px); }
.foot p { margin: 12px 0 0; max-width: 40em; }
.foot .brand { font-size: 1rem; }
.foot .legal { margin: 0; }

@media (max-width: 1060px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .scene::after { background: linear-gradient(180deg, rgba(18, 18, 20, 0.2) 0%, rgba(18, 18, 20, 0.85) 55%, var(--ink) 100%); }
}

@media (max-width: 860px) {
  .nav { display: none; }
  .bar { justify-content: space-between; }
  .split, .foot-grid { grid-template-columns: 1fr; }
  .side { position: static; }
  .row { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .steps li + li { padding-left: 0; border-left: none; border-top: 1px solid var(--line); }
  .hero { align-items: flex-end; min-height: 0; }
  .scene { bottom: auto; height: 62vh; }
  .hero-grid { padding-top: 46vh; padding-bottom: 48px; }
  tbody th { width: auto; }
  .compat tr, .platforms tr { display: grid; }
  .compat th, .compat td, .platforms th, .platforms td { border-bottom: none; padding: 4px 0; }
  .compat tr, .platforms tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .compat thead, .platforms thead { display: none; }
  .tag:not(.server) { display: none !important; }
  .hero .cmd code { font-size: 0.75rem; }
}

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

@media print {
  body { display: none !important; }
  .top, .scene, .copy { display: none !important; }
  body, .band, .hero, .foot { background: #fff; color: #000; }
}
