:root {
  --bg: #07080c;
  --bg-2: #0e1018;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-2: rgba(255, 255, 255, 0.075);
  --line: rgba(255, 255, 255, 0.1);
  --text: #f2f3f7;
  --dim: #a3a8b8;
  --faint: #6d7386;
  --amber: #ffc266;
  --amber-ink: #1c1c1e;
  --blue: #7cb7ff;
  --green: #7ee2a8;
  --radius: 18px;
  --wrap: 1180px;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* The sky behind the hero, like the launcher's aurora screensaver. */
body::before {
  content: "";
  position: fixed;
  inset: -20vh -10vw auto;
  height: 90vh;
  background:
    radial-gradient(60% 50% at 20% 30%, rgba(124, 183, 255, 0.16), transparent 70%),
    radial-gradient(50% 45% at 80% 20%, rgba(255, 194, 102, 0.12), transparent 70%),
    radial-gradient(40% 40% at 55% 60%, rgba(126, 226, 168, 0.07), transparent 70%);
  pointer-events: none;
  z-index: -1;
}

a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #a9d0ff; }
code, pre, kbd { font-family: var(--mono); font-size: 0.88em; }
:not(pre) > code {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.08em 0.38em;
  overflow-wrap: anywhere;
}
h1, h2, h3 { font-family: "Outfit", "Inter", sans-serif; letter-spacing: -0.01em; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(2.3rem, 5.6vw, 4.1rem); font-weight: 600; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.6rem); font-weight: 600; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0; }

.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.kicker {
  font: 600 0.78rem/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
}
.lede { color: var(--dim); font-size: 1.15rem; max-width: 62ch; }
.dim { color: var(--dim); }
.small { font-size: 0.88rem; }

/* Header */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: rgba(7, 8, 12, 0.72);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 600 1.05rem "Outfit", sans-serif; }
.brand svg { flex: none; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--dim); text-decoration: none; font-size: 0.93rem; }
.nav a:hover { color: var(--text); }
.lang { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.lang button {
  border: 0; background: transparent; color: var(--dim); font: 600 0.75rem var(--mono);
  padding: 5px 10px; border-radius: 999px; cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--text); color: var(--amber-ink); }
@media (max-width: 820px) { .nav { display: none; } .lang { margin-left: auto; } }

/* Buttons */
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 20px; border-radius: 999px;
  font: 600 0.97rem "Inter", sans-serif; text-decoration: none;
  border: 1px solid var(--line); color: var(--text); background: var(--panel);
  cursor: pointer; transition: transform 0.15s, background 0.15s, box-shadow 0.15s;
}
.btn:hover { background: var(--panel-2); color: var(--text); transform: translateY(-1px); }
.btn:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 2px solid var(--amber); outline-offset: 2px;
}
.btn-main { background: var(--text); color: var(--amber-ink); border-color: transparent; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); }
.btn-main:hover { background: #fff; color: var(--amber-ink); }
.btn-small { padding: 7px 13px; font-size: 0.84rem; }

/* Hero */
.hero { padding: 76px 0 40px; }
.hero .wrap { display: grid; gap: 44px; }
.hero-text { display: grid; gap: 22px; justify-items: start; max-width: 780px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.tags li { font: 500 0.78rem var(--mono); color: var(--dim); border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; }
.tv {
  position: relative; margin: 0;
  border-radius: 22px; padding: 10px; background: linear-gradient(180deg, #23252e, #121319);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 0, 0, 0.6);
}
.tv img { display: block; width: 100%; height: auto; border-radius: 14px; aspect-ratio: 16 / 9; object-fit: cover; }
.tv::after {
  content: ""; position: absolute; left: 50%; bottom: -26px; transform: translateX(-50%);
  width: 26%; height: 16px; border-radius: 0 0 14px 14px; background: linear-gradient(180deg, #1a1b22, #0b0c10);
}

/* Sections */
.sec { padding: 96px 0; }
.sec-head { display: grid; gap: 14px; margin-bottom: 40px; }
.band { background: linear-gradient(180deg, transparent, var(--bg-2) 12%, var(--bg-2) 88%, transparent); }

.cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; display: grid; gap: 12px; align-content: start;
}
.card ul { margin: 0; padding-left: 1.1em; color: var(--dim); display: grid; gap: 6px; }
.card ul b { color: var(--text); font-weight: 600; }
.icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--panel-2); color: var(--amber); }

.gallery {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(560px, 82vw); gap: 18px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 2px 18px; margin-top: 40px;
  scrollbar-color: var(--faint) transparent;
}
.gallery figure { margin: 0; scroll-snap-align: start; display: grid; gap: 10px; }
.gallery img { width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); aspect-ratio: 16 / 9; object-fit: cover; background: var(--bg-2); }
.gallery figcaption { color: var(--dim); font-size: 0.9rem; }

/* Install */
.prep { margin-bottom: 18px; }
.routes { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.route { padding: 30px; }
.route .tag-line { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { font: 600 0.72rem var(--mono); text-transform: uppercase; letter-spacing: 0.08em; border-radius: 999px; padding: 4px 10px; background: var(--panel-2); color: var(--dim); }
.pill-amber { background: rgba(255, 194, 102, 0.14); color: var(--amber); }
.steps { list-style: none; counter-reset: step; margin: 6px 0 0; padding: 0; display: grid; gap: 18px; }
.steps > li { counter-increment: step; display: grid; grid-template-columns: 30px 1fr; gap: 0 14px; }
.steps > li::before {
  content: counter(step); grid-row: span 2;
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--panel-2); color: var(--amber); font: 600 0.85rem var(--mono);
}
.steps > li > * { grid-column: 2; min-width: 0; }
.steps p { color: var(--dim); }
.steps p b { color: var(--text); }

.code {
  position: relative; margin-top: 10px;
  background: #050609; border: 1px solid var(--line); border-radius: 12px;
}
.code pre { margin: 0; padding: 14px 16px; overflow-x: auto; color: #dfe3ee; line-height: 1.55; }
.code .copy {
  position: absolute; top: 8px; right: 8px;
  border: 1px solid var(--line); background: var(--bg-2); color: var(--dim);
  border-radius: 8px; font: 600 0.72rem var(--mono); padding: 4px 9px; cursor: pointer;
}
.code .copy:hover { color: var(--text); }
.code pre .c { color: var(--faint); }

.note {
  margin-top: 22px; padding: 16px 18px; border-radius: 14px;
  background: rgba(255, 194, 102, 0.07); border: 1px solid rgba(255, 194, 102, 0.22); color: var(--dim);
}
.note b { color: var(--text); }

/* Generator */
.gen { display: grid; gap: 22px; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 980px) { .gen { grid-template-columns: 1fr; } }
.form { display: grid; gap: 18px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin: 0; display: grid; gap: 16px; background: var(--panel); min-width: 0; }
legend { padding: 0 8px; font: 600 1rem "Outfit", sans-serif; }
.row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
label.f { display: grid; gap: 6px; font-size: 0.86rem; color: var(--dim); min-width: 0; }
label.check { display: flex; gap: 10px; align-items: center; font-size: 0.93rem; color: var(--text); }
input[type="text"], input[type="password"], input[type="number"], select, textarea {
  width: 100%; min-width: 0;
  background: #050609; color: var(--text);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; font: 0.93rem "Inter", sans-serif;
}
textarea { font-family: var(--mono); font-size: 0.84rem; resize: vertical; min-height: 92px; }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--amber); }
.hint { font-size: 0.8rem; color: var(--faint); }
.inline { display: flex; gap: 8px; }
.inline > :first-child { flex: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  border: 1px solid var(--line); background: transparent; color: var(--dim);
  border-radius: 999px; padding: 5px 11px; font-size: 0.8rem; cursor: pointer;
}
.chip:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.25); }
.chip[aria-pressed="true"] { background: rgba(255, 194, 102, 0.15); color: var(--amber); border-color: rgba(255, 194, 102, 0.4); }
.cities { display: grid; gap: 6px; }
.cities button { text-align: left; }

.buttons-table { display: grid; gap: 10px; }
.btn-row { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr); gap: 10px; align-items: center; }
.btn-row .name { font-size: 0.9rem; }
.btn-row .name small { display: block; color: var(--faint); font: 0.72rem var(--mono); }
.btn-row input { margin-top: 6px; }

.out { position: sticky; top: 76px; display: grid; gap: 14px; }
@media (max-width: 980px) { .out { position: static; } }
.out .code pre { max-height: 46vh; font-size: 0.8rem; }
.out-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.seg button { border: 0; background: transparent; color: var(--dim); font: 600 0.8rem "Inter", sans-serif; padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--panel-2); color: var(--text); }
.warn { color: #ffb4a2; font-size: 0.85rem; }

/* Reference */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font: 600 0.75rem var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); background: var(--panel); }
tr:last-child td { border-bottom: 0; }
.after-table { margin-top: 16px; }
td:first-child { white-space: nowrap; }
td { color: var(--dim); }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 44px 0 60px; color: var(--faint); font-size: 0.88rem; }
.foot .wrap { display: grid; gap: 10px; }
.foot a { color: var(--dim); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Grid children with long code lines must be allowed to shrink, or the page scrolls sideways. */
.card > *, .out > *, .form > *, .gen > *, .code { min-width: 0; max-width: 100%; }
