@font-face { font-family: "Geist"; src: url("/assets/fonts/geist-latin.woff2") format("woff2"); font-weight: 300 600; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/assets/fonts/geist-mono-latin.woff2") format("woff2"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/assets/fonts/newsreader-normal-latin.woff2") format("woff2"); font-weight: 400 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/assets/fonts/newsreader-italic-latin.woff2") format("woff2"); font-weight: 400 500; font-style: italic; font-display: swap; }

:root {
  --void: #070B16;
  --panel: #0E1422;
  --panel-2: #161E31;
  --hair: rgba(125, 211, 252, 0.13);
  --hair-strong: rgba(125, 211, 252, 0.28);
  --text: #DCE6F3;
  --dim: #8A97AD;
  --ice: #7DD3FC;
  --core: #38BDF8;
  --ok: #86EFAC;
  --bad: #FCA5A5;
  --f: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --m: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --s: "Newsreader", "Iowan Old Style", Georgia, serif;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; background: var(--void); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: transparent; color: var(--text); font: 400 17px/1.6 var(--f); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--ice); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--ice); outline-offset: 3px; border-radius: 2px; }
code { font: 0.88em var(--m); color: var(--text); }
img, video { display: block; max-width: 100%; height: auto; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ice); color: var(--void); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }

.nav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px var(--gutter); background: rgba(7, 11, 22, 0.82); backdrop-filter: blur(10px); border-bottom: 1px solid var(--hair); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font: 500 18px/1 var(--f); letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.nav nav { display: flex; gap: clamp(12px, 2.4vw, 28px); overflow-x: auto; }
.nav nav a { color: var(--dim); font: 400 14px/1 var(--f); white-space: nowrap; padding: 8px 0; }
.nav nav a:hover { color: var(--text); text-decoration: none; }

.mark, .tag { font: italic 400 18px/1.3 var(--s); color: var(--dim); margin: 0 0 18px; }
.mark { display: flex; align-items: center; gap: 14px; }
.mark .num { font-style: normal; font-weight: 500; color: var(--ice); display: inline-flex; align-items: center; gap: 14px; }
.mark .num::after { content: ""; width: 40px; height: 1px; background: linear-gradient(90deg, var(--ice), rgba(125, 211, 252, 0)); }
/* big headings: SF Pro Display where the system has it (Apple devices), Geist elsewhere */
.display { font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Geist", system-ui, sans-serif; font-weight: 600; letter-spacing: -0.035em; line-height: 1.03; margin: 0 0 20px; color: #F5F7FA; text-wrap: balance; -webkit-font-smoothing: antialiased; }
.display em { font-style: normal; color: var(--ice); background: linear-gradient(100deg, #E0F2FE 0%, #7DD3FC 45%, #38BDF8 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; padding-bottom: 0.06em; }
h1.display { font-size: clamp(46px, 7.4vw, 104px); letter-spacing: -0.042em; line-height: 1.0; }
h2.display { font-size: clamp(34px, 5vw, 64px); max-width: 18ch; letter-spacing: -0.032em; line-height: 1.05; }
.lede { color: var(--dim); font-size: clamp(17px, 1.5vw, 20px); max-width: 60ch; margin: 0 0 28px; }
.dim { color: var(--dim); }
.ice { color: var(--ice); }

/* hero */
.hero { position: relative; min-height: min(92vh, 860px); display: grid; align-items: center; padding: 64px var(--gutter); overflow: hidden; border-bottom: 1px solid var(--hair); }
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media video { width: 100%; height: 100%; object-fit: cover; object-position: 15% 50%; }
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--void) 0%, rgba(7, 11, 22, 0.9) 38%, rgba(7, 11, 22, 0.55) 50%, rgba(7, 11, 22, 0.12) 66%, rgba(7, 11, 22, 0) 100%), linear-gradient(0deg, var(--void) 0%, rgba(7, 11, 22, 0) 22%); }
.hero-copy { position: relative; z-index: 1; max-width: 560px; }
.hero .lede { max-width: 44ch; }
.hero .mark { color: var(--ice); }
.install { display: flex; align-items: stretch; max-width: 560px; border: 1px solid var(--hair-strong); background: rgba(14, 20, 34, 0.75); margin-bottom: 18px; }
.install code { flex: 1; padding: 14px 16px; font-size: 14px; overflow-x: auto; white-space: nowrap; }
.copy { font: 500 14px/1 var(--f); color: var(--void); background: var(--ice); border: 0; padding: 0 18px; cursor: pointer; min-height: 44px; }
.copy:hover { background: #a5e3fd; }
.links { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; font: 400 15px/1 var(--f); }
.links span { color: var(--dim); }
.corner { position: absolute; width: 18px; height: 18px; border-color: var(--hair-strong); border-style: solid; z-index: 1; }
.corner.tl { top: 20px; left: 20px; border-width: 1px 0 0 1px; }
.corner.tr { top: 20px; right: 20px; border-width: 1px 1px 0 0; }
.corner.bl { bottom: 20px; left: 20px; border-width: 0 0 1px 1px; }
.corner.br { bottom: 20px; right: 20px; border-width: 0 1px 1px 0; }

/* sections */
.section { position: relative; max-width: var(--max); margin: 0 auto; padding: clamp(80px, 11vw, 140px) var(--gutter) 0; }
.section::before { content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); height: 1px; background: linear-gradient(90deg, rgba(125, 211, 252, 0), rgba(125, 211, 252, 0.22) 30%, rgba(186, 230, 253, 0.55) 50%, rgba(125, 211, 252, 0.22) 70%, rgba(125, 211, 252, 0)); }
.section::after { content: ""; position: absolute; top: -3px; left: 50%; width: 7px; height: 7px; margin-left: -3px; border-radius: 50%; background: #E0F6FF; box-shadow: 0 0 12px 3px rgba(56, 189, 248, 0.55); }
.intro-row { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: end; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.card { background: linear-gradient(180deg, rgba(22, 30, 49, 0.72), rgba(11, 16, 29, 0.72)); border: 1px solid var(--hair); padding: 22px 24px 20px; position: relative; }
.card::before { content: ""; position: absolute; left: 24px; right: 24px; top: -1px; height: 1px; background: linear-gradient(90deg, rgba(125, 211, 252, 0), rgba(125, 211, 252, 0.5), rgba(125, 211, 252, 0)); }
.card.lit { border-color: var(--hair-strong); box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.06), 0 24px 60px -30px rgba(56, 189, 248, 0.35); }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font: italic 400 16px/1.4 var(--s); color: var(--dim); padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--hair); }
.card .q { color: var(--dim); margin: 0 0 10px; }
.card .a { font-size: 20px; margin: 0 0 22px; }
.card .foot { font: 400 13px/1.4 var(--m); margin: 0; }
.ok { color: var(--ok); }
.bad { color: var(--bad); }

.anatomy { list-style: none; padding: 0; margin: 48px 0 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; border: 1px solid var(--hair); }
.anatomy li { padding: 0 20px 26px; border-right: 1px solid var(--hair); }
.anatomy li:last-child { border-right: 0; }
.anatomy img { mix-blend-mode: screen; margin: 0 -20px 6px; width: calc(100% + 40px); max-width: none; transition: transform 0.4s ease, filter 0.4s ease; }
.anatomy li:hover img { transform: translateY(-4px); filter: brightness(1.15); }
.anatomy h3 { font-weight: 400; font-size: 22px; margin: 0 0 8px; }
.anatomy li p:last-child { color: var(--dim); font-size: 15px; margin: 0; }
.anatomy .tag { margin-bottom: 8px; color: var(--ice); }

.kv { margin: 0; display: grid; gap: 12px; }
.kv div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; }
.kv dt { font: italic 400 16px/1.5 var(--s); color: var(--dim); }
.kv dd { margin: 0; font: 400 14px/1.6 var(--m); min-width: 0; }
.kv .hash { overflow-wrap: anywhere; color: var(--dim); }
.kv .raw { color: var(--ice); overflow-wrap: anywhere; }

.mech { display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--hair); margin-top: 48px; }
.mech article { padding: 24px 20px; border-right: 1px solid var(--hair); display: flex; flex-direction: column; }
.mech article:last-child { border-right: 0; }
.mech svg { width: 28px; height: 28px; fill: none; stroke: var(--ice); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 20px; }
.mech .tag { margin-bottom: 6px; }
.mech h3 { font-weight: 400; font-size: 21px; margin: 0 0 10px; }
.mech p { color: var(--dim); font-size: 15px; margin: 0 0 18px; }
.mech .meta { margin-top: auto; font: italic 400 15px/1.4 var(--s); color: var(--ice); padding-top: 14px; border-top: 1px solid var(--hair); margin-bottom: 0; }

.begin { text-align: center; }
.begin h2, .begin .lede { margin-left: auto; margin-right: auto; }
.term { text-align: left; max-width: 860px; margin: 0 auto 32px; background: rgba(8, 13, 24, 0.86); border: 1px solid var(--hair-strong); }
.term-head { font: italic 400 15px/1 var(--s); color: var(--dim); padding: 12px 16px; border-bottom: 1px solid var(--hair); }
.term pre { margin: 0; padding: 18px 20px; overflow-x: auto; }
.term code { font-size: 13px; line-height: 1.7; color: var(--text); }
.term .p { color: var(--ice); }
.center { justify-content: center; }
.btn { display: inline-flex; align-items: center; min-height: 46px; padding: 0 22px; border: 1px solid var(--ice); background: rgba(125, 211, 252, 0.08); color: var(--text); font: 500 15px/1 var(--f); }
.btn.ghost { border-color: var(--hair-strong); background: transparent; }
.btn:hover { text-decoration: none; background: rgba(125, 211, 252, 0.16); }

.status { width: 100%; border-collapse: collapse; margin-top: 40px; font-size: 16px; }
.status th { text-align: left; font: italic 400 16px/1.4 var(--s); color: var(--dim); padding: 0 0 12px; border-bottom: 1px solid var(--hair-strong); }
.status td { padding: 14px 0; border-bottom: 1px solid var(--hair); }
.status td:last-child { text-align: right; font: italic 400 16px/1 var(--s); }
.status .live { color: var(--ok); }
.status .planned { color: var(--dim); }

.foot-cat { max-width: var(--max); margin: clamp(90px, 12vw, 150px) auto 0; padding: 40px var(--gutter) 48px; border-top: 1px solid var(--hair); display: grid; grid-template-columns: 2fr 1fr; gap: 32px; }
.brand-line { display: flex; align-items: center; gap: 10px; font-size: 22px; margin: 0 0 10px; }
.foot-cat ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.foot-cat .legal { grid-column: 1 / -1; font-size: 13px; margin: 0; }

@media (max-width: 980px) {
  .anatomy { grid-template-columns: repeat(2, 1fr); }
  .anatomy li { border-bottom: 1px solid var(--hair); }
  .anatomy li:nth-child(2n) { border-right: 0; }
  .mech { grid-template-columns: repeat(2, 1fr); }
  .mech article { border-bottom: 1px solid var(--hair); }
  .mech article:nth-child(2n) { border-right: 0; }
  .intro-row { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 1024px) {
  .hero { min-height: auto; padding-top: 0; padding-bottom: 56px; display: block; }
  .hero-media { position: relative; inset: auto; margin: 0 calc(-1 * var(--gutter)); aspect-ratio: 16 / 9; }
  .hero-media video { object-position: 64% 50%; }
  .hero-media::after { background: linear-gradient(0deg, var(--void) 0%, rgba(7, 11, 22, 0) 45%); }
  .hero-copy { max-width: 680px; }
  .corner { display: none; }
}
@media (max-width: 720px) {
  .nav nav a:not(.gh) { display: none; }
  .hero-media { aspect-ratio: 4 / 3; }
  .split { grid-template-columns: 1fr; }
  .anatomy, .mech { grid-template-columns: 1fr; }
  .anatomy li, .mech article { border-right: 0; }
  .anatomy img { width: 70%; margin: 0 auto 6px; }
  .kv div { grid-template-columns: 1fr; gap: 2px; }
  .foot-cat { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .anatomy img { transition: none; }
}

.nf { min-height: 70vh; }
.nf h1.display { font-size: clamp(40px, 6vw, 72px); }

/* page background: deep field, ledger rules, grain, drifting light */
.bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bg::before { content: ""; position: absolute; inset: -10%; background:
  radial-gradient(60% 45% at 78% 0%, rgba(56, 189, 248, 0.16), rgba(56, 189, 248, 0) 70%),
  radial-gradient(45% 40% at 0% 55%, rgba(99, 102, 241, 0.07), rgba(99, 102, 241, 0) 70%),
  radial-gradient(50% 50% at 100% 100%, rgba(56, 189, 248, 0.07), rgba(56, 189, 248, 0) 70%),
  linear-gradient(180deg, #070B16 0%, #060A14 55%, #04070F 100%); }
.bg::after { content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(180deg, rgba(125, 211, 252, 0.045) 0 1px, transparent 1px 72px), url("/assets/grain.svg");
  background-size: auto, 240px 240px;
  -webkit-mask-image: radial-gradient(80% 70% at 50% 40%, #000 30%, transparent 100%);
  mask-image: radial-gradient(80% 70% at 50% 40%, #000 30%, transparent 100%); opacity: 0.9; }
.bg canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
main, .foot-cat { position: relative; }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; z-index: 2; background: linear-gradient(90deg, rgba(125, 211, 252, 0), rgba(186, 230, 253, 0.5) 50%, rgba(125, 211, 252, 0)); }

/* GitHub mark: the official Octicon, icon only, 40px tap area */
a.gh { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; margin: -10px; color: var(--dim); transition: color .2s; }
.nav nav a.gh { padding: 0; margin: 0; min-height: 32px; min-width: 32px; }
a.gh:hover, a.gh:focus-visible { color: var(--text); }
.foot-cat a.gh { margin: -10px -10px -10px -10px; justify-content: flex-start; padding-left: 10px; }
.gh-mark { display: block; }

/* desktop: the hero copy lines up with the content column below instead of hugging the edge */
@media (min-width: 1025px) {
  .hero-copy { margin-left: max(0px, calc((100vw - var(--max)) / 3)); }
  .hero-media video { transform: translateX(15%); }
}

/* Begin: the recorded demo sits in the terminal frame; the transcript stays one click away */
.term video { width: 100%; background: #272822; }
.begin-install { margin: 0 auto 18px; text-align: left; }
.transcript { max-width: 860px; margin: 0 auto 32px; text-align: left; border: 1px solid var(--hair); }
.transcript summary { cursor: pointer; padding: 12px 16px; font: italic 400 16px/1.4 var(--s); color: var(--dim); min-height: 44px; }
.transcript summary:hover { color: var(--text); }
.transcript pre { margin: 0; padding: 4px 20px 18px; overflow-x: auto; }
.transcript code { font-size: 13px; line-height: 1.7; }
.transcript .p { color: var(--ice); }

/* footer: release line and icon row */
.release { font: italic 400 15px/1.4 var(--s); color: var(--dim); margin: 14px 0 0; }
.foot-cat li.icons { display: flex; gap: 18px; padding-left: 10px; margin-top: 4px; }
.foot-cat li.icons a.gh { margin: -10px; padding-left: 0; justify-content: center; }
.nav nav a[aria-current="page"] { color: var(--text); }

/* secondary pages: docs, security, changelog */
.doc { max-width: 880px; padding-top: clamp(56px, 8vw, 96px); }
.doc::before, .doc::after { display: none; }
.doc h1.display { font-size: clamp(38px, 5.4vw, 64px); max-width: 20ch; }
.doc h2 { font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Geist", system-ui, sans-serif; font-weight: 600; font-size: clamp(24px, 2.6vw, 30px); letter-spacing: -0.025em; margin: 64px 0 14px; padding-top: 22px; border-top: 1px solid var(--hair); scroll-margin-top: 80px; }
.doc h2 .when { font: italic 400 16px/1.4 var(--s); margin-left: 10px; letter-spacing: 0; }
.doc p, .doc li { color: #C3CEDD; max-width: 68ch; }
.doc p strong, .doc li strong { color: var(--text); font-weight: 500; }
.doc .term { margin: 18px 0 22px; max-width: none; }
.toc { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 16px 0; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); font-size: 15px; }
.table-wrap { overflow-x: auto; margin: 16px 0 8px; }
.ref { width: 100%; border-collapse: collapse; font-size: 15px; }
.ref th { text-align: left; font: italic 400 15px/1.4 var(--s); color: var(--dim); padding: 0 16px 10px 0; border-bottom: 1px solid var(--hair-strong); }
.ref td { padding: 12px 16px 12px 0; border-bottom: 1px solid var(--hair); vertical-align: top; color: #C3CEDD; }
.ref td:first-child { white-space: nowrap; color: var(--text); }
ul.plain { padding-left: 18px; }
ul.plain li { margin-bottom: 12px; }
ul.plain li::marker { color: var(--ice); }
@media (max-width: 720px) {
  .ref td:first-child { white-space: normal; }
  .doc h2 .when { display: block; margin: 4px 0 0; }
}

/* links inside running text carry an underline, not only a color */
.lede a, .release a, .doc p a, .doc li a, .doc td a, .doc .when a { text-decoration: underline; text-decoration-color: rgba(125, 211, 252, 0.45); text-underline-offset: 3px; }
.lede a:hover, .release a:hover, .doc p a:hover, .doc li a:hover { text-decoration-color: var(--ice); }
.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; }

/* /vote: roadmap vote for holders */
.vote { margin: 40px 0 8px; padding: clamp(20px, 3vw, 32px); border: 1px solid var(--hair-strong); background: linear-gradient(170deg, rgba(16, 26, 46, 0.6), rgba(7, 11, 22, 0.6)); }
.vote .vote-title { margin: 0 0 8px; padding: 0; border: 0; }
.vote-head > p { margin: 0 0 20px; max-width: 62ch; }
.vote-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px 24px; margin: 0 0 24px; padding: 16px 0; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.vote-meta dt { font: italic 400 15px/1.3 var(--s); color: var(--dim); }
.vote-meta dd { margin: 4px 0 0; font-size: 15px; overflow-wrap: anywhere; }
.vote-options { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; }
.vote-opt { position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: 6px 14px; align-items: start; padding: 16px 18px 20px; border: 1px solid var(--hair); cursor: pointer; transition: border-color .2s; }
.vote-opt:hover, .vote-opt.on { border-color: var(--ice); }
.vote-opt.lead { border-color: var(--ice); background: rgba(125, 211, 252, 0.05); }
.vote-opt input { margin: 4px 0 0; accent-color: var(--ice); width: 18px; height: 18px; }
.vote-opt-text { display: grid; gap: 4px; font-size: 15px; }
.vote-opt-text strong { font-size: 17px; font-weight: 500; color: var(--text); }
.vote-num { display: grid; justify-items: end; font: 500 17px/1.3 var(--m); color: var(--text); }
.vote-num .dim { font-size: 13px; font-weight: 400; }
.vote-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(125, 211, 252, 0.08); }
.vote-bar span { display: block; height: 100%; background: linear-gradient(90deg, #38BDF8, #7DD3FC); }
.vote-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin-top: 22px; }
.vote-actions .btn[disabled] { opacity: .45; cursor: not-allowed; }
.vote-note { margin: 18px 0 0; padding: 12px 16px; border-left: 2px solid var(--ice); background: rgba(125, 211, 252, 0.06); }
.vote-note.bad { border-left-color: #FF8A8A; background: rgba(255, 138, 138, 0.06); }
@media (max-width: 560px) {
  .vote-opt { grid-template-columns: auto 1fr; }
  .vote-num { grid-column: 2; justify-items: start; }
}
