:root {
  color-scheme: dark;
  --bg: #081116;
  --bg-deep: #050b0f;
  --surface: #0e1a20;
  --surface-2: #13232a;
  --surface-3: #172a32;
  --line: #28404a;
  --line-strong: #3c5964;
  --text: #eef7f7;
  --muted: #a6bac0;
  --dim: #789099;
  --cyan: #6fe5f1;
  --cyan-deep: #20aebe;
  --lime: #b7f568;
  --orange: #ffb562;
  --danger: #ff846f;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.35);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 26px;
  --shell: min(1180px, calc(100% - 40px));
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(111, 229, 241, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(111, 229, 241, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
  z-index: -1;
}

a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
code, .eyebrow, .release-pill, .card-index, .step-number, .recommendation, .footer-label {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.shell { width: var(--shell); margin-inline: auto; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 100; padding: 10px 14px; background: var(--lime); color: #071008; border-radius: 8px; font-weight: 800; }
.skip-link:focus { top: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 17, 22, 0.84);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(60, 89, 100, 0.52);
}
.header-inner { min-height: 72px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font-weight: 760; letter-spacing: -0.01em; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; background: var(--cyan); color: var(--bg-deep); font-size: 14px; font-weight: 900; box-shadow: 0 0 0 1px rgba(255,255,255,.15) inset; }
.brand-name { font-size: 15px; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 680; }
.nav a:hover, .nav a:focus-visible { color: var(--cyan); }
.release-pill { justify-self: end; display: inline-flex; align-items: center; gap: 8px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); font-size: 12px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(183, 245, 104, 0.1); }

.hero { position: relative; overflow: hidden; padding: 96px 0 0; background: radial-gradient(circle at 78% 12%, rgba(32, 174, 190, .18), transparent 31%), radial-gradient(circle at 15% 70%, rgba(183, 245, 104, .07), transparent 28%); }
.hero::after { content: ""; position: absolute; right: -10%; top: 80px; width: 520px; aspect-ratio: 1; border: 1px solid rgba(111, 229, 241, .1); border-radius: 50%; box-shadow: 0 0 0 70px rgba(111, 229, 241, .025), 0 0 0 140px rgba(111, 229, 241, .018); pointer-events: none; }
.hero-grid { position: relative; z-index: 1; }
.hero-copy { max-width: 860px; }
.eyebrow { margin: 0 0 13px; color: var(--cyan); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3 { margin-top: 0; line-height: 1.08; letter-spacing: -.04em; }
h1 { max-width: 760px; margin-bottom: 24px; font-size: clamp(3.25rem, 7vw, 6.7rem); font-weight: 780; }
h1 span { color: var(--lime); }
h2 { margin-bottom: 22px; font-size: clamp(2.15rem, 4.5vw, 4rem); font-weight: 740; }
h3 { margin-bottom: 14px; font-size: 1.45rem; font-weight: 720; letter-spacing: -.025em; }
.hero-lede { max-width: 690px; margin: 0; color: #c7d8dc; font-size: clamp(1.08rem, 1.5vw, 1.3rem); line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; padding: 12px 18px; border: 1px solid transparent; border-radius: var(--radius-sm); text-decoration: none; font-size: 14px; font-weight: 800; transition: transform .18s ease, background-color .18s ease, border-color .18s ease; }
.button:hover { transform: translateY(-2px); }
.button:focus-visible, .copy-button:focus-visible, .source-link:focus-visible, .dialog-close:focus-visible, a:focus-visible { outline: 3px solid rgba(111, 229, 241, .4); outline-offset: 3px; }
.button-primary { background: var(--cyan); color: #051014; box-shadow: 0 10px 34px rgba(32, 174, 190, .2); }
.button-primary:hover { background: #97f0f7; }
.button-secondary { background: var(--surface-3); color: var(--text); border-color: var(--line-strong); }
.button-secondary:hover, .button-ghost:hover { border-color: var(--cyan-deep); background: rgba(111, 229, 241, .08); }
.button-ghost { color: var(--text); border-color: var(--line-strong); background: rgba(8, 17, 22, .4); }
.revision-note { max-width: 650px; margin: 22px 0 0; color: var(--dim); font-size: 13px; }
.revision-note code { color: var(--muted); }

.proof-strip { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 84px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.proof-strip div { padding: 25px 24px; border-right: 1px solid var(--line); }
.proof-strip div:last-child { border-right: 0; }
.proof-strip strong, .proof-strip span { display: block; }
.proof-strip strong { font-size: 15px; }
.proof-strip span { margin-top: 3px; color: var(--dim); font-size: 12px; }

.section { padding: 116px 0; }
.section-heading { max-width: 780px; margin-bottom: 48px; }
.section-heading > p:last-child, .split-heading > p { color: var(--muted); }
.split-heading { max-width: none; display: grid; grid-template-columns: 1.15fr .85fr; gap: 80px; align-items: end; }
.split-heading > p { max-width: 500px; margin: 0 0 9px; font-size: 1.05rem; }

.safe-section { background: var(--bg-deep); }
.safety-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.safety-card { min-height: 280px; padding: 27px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgba(19, 35, 42, .83), rgba(10, 20, 25, .72)); }
.card-index { display: inline-grid; place-items: center; width: 40px; height: 40px; margin-bottom: 48px; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--cyan); font-size: 12px; }
.safety-card p { color: var(--muted); margin-bottom: 0; }
.safety-card code { color: var(--lime); font-size: .93em; }

.recommendation { display: inline-block; padding: 5px 8px; border-radius: 6px; font: 800 11px/1.3 "SFMono-Regular", Consolas, monospace; letter-spacing: .05em; text-transform: uppercase; }
.recommendation { background: var(--lime); color: #0b1608; }
.hash-block { position: relative; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 15px; align-items: center; padding: 16px 0; border-top: 1px solid var(--line); }
.hash-block span { display: block; margin-bottom: 5px; color: var(--dim); font-size: 12px; }
.hash-block code { display: block; max-width: 100%; overflow-wrap: anywhere; color: #dcebec; font-size: 11px; line-height: 1.55; }
.muted-hash code { color: var(--muted); }
.copy-button { flex: 0 0 auto; min-width: 58px; min-height: 34px; padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: rgba(7, 15, 19, .55); color: var(--muted); font: inherit; font-size: 12px; font-weight: 760; cursor: pointer; }
.copy-button:hover { border-color: var(--cyan); color: var(--cyan); }
.copy-button.copied { border-color: var(--lime); color: var(--lime); }
.bundle-card { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 26px 40px; align-items: center; margin-bottom: 52px; padding: 34px; border: 1px solid rgba(111,229,241,.55); border-radius: var(--radius-lg); background: linear-gradient(150deg, rgba(23,50,57,.95), rgba(11,25,30,.95)); box-shadow: 0 26px 70px rgba(0,0,0,.2); }
.bundle-copy h3 { margin: 17px 0 10px; }
.bundle-copy p { max-width: 730px; margin: 0; color: var(--muted); }
.bundle-commands { grid-column: 1 / -1; padding-top: 4px; border-top: 1px solid var(--line); }
.bundle-commands > p { margin-bottom: 0; color: var(--muted); font-size: 13px; }
.individual-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.individual-heading h3, .individual-heading p { margin: 0; }
.individual-heading p { color: var(--dim); font-size: 13px; }

.ports-section { background: #0a151a; }
.port-figure { margin: 54px 0 28px; }
.port-image-stage { position: relative; overflow: hidden; max-width: 900px; margin: 0 auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow); }
.port-image-stage img { display: block; width: 100%; height: auto; }
.port-marker { position: absolute; top: 44%; display: grid; place-items: center; width: 34px; height: 34px; transform: translate(-50%, -50%); border: 3px solid #081116; border-radius: 50%; background: var(--cyan); color: #071014; font: 900 13px/1 "SFMono-Regular", Consolas, monospace; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.marker-wifi { left: 45.2%; }
.marker-main { left: 57.3%; }
.marker-wan { left: 69.4%; background: var(--orange); }
.port-figure figcaption { max-width: 900px; margin: 10px auto 0; color: var(--dim); font-size: 12px; text-align: right; }
.port-figure figcaption a { color: var(--muted); }
.port-key { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.port-key article { display: grid; grid-template-columns: 36px 1fr; gap: 15px; padding: 23px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.port-key h3 { margin: 1px 0 9px; font-size: 18px; }
.port-key h3 code { color: var(--cyan); }
.port-key p { margin: 0; color: var(--muted); font-size: 13px; }
.port-number { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--cyan); color: #071014; font: 900 12px/1 "SFMono-Regular", Consolas, monospace; }
.wan-number { background: var(--orange); }

.install-section { background: var(--bg-deep); }
.install-flow { position: relative; max-width: 930px; margin: 60px auto 0; padding: 0; list-style: none; }
.install-flow::before { content: ""; position: absolute; left: 23px; top: 48px; bottom: 48px; width: 1px; background: linear-gradient(var(--cyan), var(--line), var(--lime)); }
.install-step { position: relative; display: grid; grid-template-columns: 48px 1fr; gap: 30px; padding-bottom: 66px; }
.install-step:last-child { padding-bottom: 0; }
.step-number { position: relative; z-index: 1; display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid var(--cyan-deep); border-radius: 50%; background: var(--bg-deep); color: var(--cyan); font-size: 12px; font-weight: 800; }
.step-content { padding-top: 3px; }
.step-kicker { margin: 0 0 8px; color: var(--cyan); font-size: 12px; font-weight: 760; text-transform: uppercase; letter-spacing: .08em; }
.step-content > p:not(.step-kicker):not(.step-warning) { color: var(--muted); }
.command-box { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 16px; margin-top: 22px; padding: 17px 18px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #071014; }
.command-box code { overflow-x: auto; color: #d7f4f5; font-size: 13px; line-height: 1.85; white-space: nowrap; }
.command-box.multi-line { align-items: start; }
.step-warning { padding-left: 13px; border-left: 2px solid var(--orange); color: #e7c89f; font-size: 13px; }

.ssh-section { border-top: 1px solid var(--line); background: radial-gradient(circle at 8% 50%, rgba(255,181,98,.08), transparent 32%); }
.ssh-card { display: grid; grid-template-columns: .85fr 1.15fr; gap: 64px; align-items: center; padding: 38px; border: 1px solid rgba(255,181,98,.42); border-radius: var(--radius-lg); background: rgba(42,29,18,.2); }
.ssh-card h2 { font-size: clamp(2rem, 3.5vw, 3.15rem); }
.ssh-card p { color: var(--muted); }
.ssh-warning { padding-left: 13px; border-left: 2px solid var(--orange); color: #e7c89f !important; font-size: 13px; }
.ssh-card .command-box { margin-top: 0; }
.client-command { margin: 16px 0 0; font-size: 13px; }
.client-command code { color: var(--cyan); }

.details-section { background: var(--bg-deep); }
.details-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.details-grid article { display: flex; flex-direction: column; gap: 13px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.details-grid h3 { margin-bottom: 9px; font-size: 18px; }
.details-grid a { width: fit-content; color: var(--muted); }
.details-grid a::after { content: " ↗"; color: var(--cyan); }
.details-grid p { margin: 0 0 9px; color: var(--muted); font-size: 13px; }
.file-type { color: var(--cyan); font: 800 10px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: .1em; }
.image-file-card { grid-column: 1 / -1; }
.file-hashes { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 10px; }
.file-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.source-link { appearance: none; padding: 0; border: 0; background: transparent; color: var(--cyan); font: inherit; font-size: 13px; font-weight: 720; cursor: pointer; }
.source-link:hover { text-decoration: underline; text-underline-offset: 4px; }

.site-footer { padding: 64px 0 30px; border-top: 1px solid var(--line); background: #050a0d; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 70px; }
.footer-grid > div { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; }
.footer-brand { margin-bottom: 10px; }
.footer-grid p { max-width: 390px; margin: 0; color: var(--dim); font-size: 13px; }
.footer-grid a:not(.brand) { color: var(--muted); text-decoration: none; font-size: 13px; }
.footer-grid a:hover { color: var(--cyan); }
.footer-label { margin-bottom: 6px; color: var(--dim); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }
.footer-bottom { display: flex; justify-content: space-between; margin-top: 54px; padding-top: 22px; border-top: 1px solid #1a2a31; color: #637982; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }

.source-dialog { width: min(980px, calc(100% - 32px)); max-height: min(82vh, 860px); padding: 0; border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: #091217; color: var(--text); box-shadow: var(--shadow); }
.source-dialog::backdrop { background: rgba(2,7,9,.82); backdrop-filter: blur(5px); }
.source-dialog-header { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 24px; border-bottom: 1px solid var(--line); background: rgba(9,18,23,.96); }
.source-dialog-header .eyebrow { margin-bottom: 6px; }
.source-dialog-header h2 { margin: 0; font-size: 22px; }
.dialog-close { padding: 9px 13px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-size: 13px; font-weight: 760; cursor: pointer; }
.source-dialog-note { margin: 20px 24px 0; color: var(--muted); font-size: 13px; }
.source-dialog pre { margin: 16px 24px 24px; padding: 20px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #050b0f; }
.source-dialog pre code { font-size: 12px; line-height: 1.7; white-space: pre; }

.toast { position: fixed; right: 22px; bottom: 22px; z-index: 80; max-width: calc(100% - 44px); padding: 11px 15px; border: 1px solid rgba(183,245,104,.38); border-radius: 10px; background: #111f17; color: var(--lime); box-shadow: var(--shadow); font-size: 13px; opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .18s ease, transform .18s ease; }
.toast.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 980px) {
  .header-inner { grid-template-columns: 1fr auto; }
  .nav { display: none; }
  .hero-copy { max-width: 780px; }
  .proof-strip { grid-template-columns: 1fr 1fr; }
  .proof-strip div:nth-child(2) { border-right: 0; }
  .proof-strip div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .split-heading { grid-template-columns: 1fr; gap: 24px; }
  .bundle-card { grid-template-columns: 1fr; }
  .bundle-card > .button { justify-self: start; }
  .details-grid { grid-template-columns: 1fr 1fr; }
  .ssh-card { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 720px) {
  :root { --shell: min(100% - 28px, 1180px); }
  .site-header { position: relative; }
  .header-inner { min-height: 64px; gap: 12px; }
  .brand-name { display: none; }
  .release-pill { font-size: 11px; }
  .hero { padding-top: 62px; }
  h1 { font-size: clamp(3.1rem, 16vw, 4.6rem); }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .button { width: 100%; }
  .proof-strip { margin-top: 58px; }
  .proof-strip div { padding: 20px 12px; }
  .section { padding: 82px 0; }
  .safety-grid, .details-grid, .port-key, .footer-grid { grid-template-columns: 1fr; }
  .safety-card { min-height: 0; }
  .card-index { margin-bottom: 34px; }
  .bundle-card, .ssh-card { padding: 24px; }
  .bundle-card > .button { justify-self: stretch; }
  .individual-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
  .file-hashes { grid-template-columns: 1fr; gap: 0; }
  .hash-block { grid-template-columns: 1fr; }
  .hash-block .copy-button { justify-self: start; }
  .port-marker { width: 30px; height: 30px; border-width: 2px; }
  .install-step { gap: 18px; }
  .command-box { grid-template-columns: 1fr; }
  .command-box .copy-button { justify-self: start; }
  .footer-grid { gap: 36px; }
  .footer-bottom { flex-direction: column; gap: 8px; }
  .source-dialog-header { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .001ms !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}
