/* Nightwire website — shared styles (download, install, changelog pages) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@500&display=swap');

:root {
  --bg: #05060d;
  --panel: #0b0c1a;
  --surface: #11132a;
  --line: #1f2342;
  --text: #eceefb;
  --muted: #9a9fc4;
  --dim: #626889;
  --accent: #5a5cff;
  --accent-2: #8a8cff;
  --cyan: #3ee0ff;
  --green: #2fd17a;
  --amber: #f2b84b;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: Inter, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { color: var(--cyan); }
.wrap { width: min(1100px, calc(100% - 32px)); margin: 0 auto; }
svg.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* top */
.top { background: radial-gradient(900px 420px at 50% -20%, rgba(90, 92, 255, 0.28), transparent 65%), linear-gradient(180deg, #08081a, var(--bg)); border-bottom: 1px solid var(--line); }
nav { height: 76px; display: flex; align-items: center; gap: 34px; }
.logo { display: flex; align-items: center; gap: 11px; font-size: 22px; font-weight: 900; letter-spacing: -0.03em; color: var(--text); }
.logo:hover { color: var(--text); }
nav .links { display: flex; gap: 26px; font-size: 15px; font-weight: 500; }
nav .links a { color: var(--muted); }
nav .links a:hover, nav .links a.on { color: var(--text); }
nav .right { margin-left: auto; }
.btn { height: 44px; padding: 0 20px; border-radius: 10px; display: inline-flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 700; color: var(--text); border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); cursor: pointer; }
.btn:hover { color: var(--text); border-color: #2f3566; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 10px 30px rgba(90, 92, 255, 0.35); }
.btn.primary:hover { filter: brightness(1.1); color: #fff; }
.hero { padding: 56px 0 48px; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 0.16em; color: var(--accent-2); text-transform: uppercase; }
h1 { margin-top: 12px; font-size: 52px; line-height: 1.05; font-weight: 900; letter-spacing: -0.04em; }
.lead { margin-top: 14px; max-width: 680px; font-size: 18px; color: var(--muted); }

/* content */
main { padding: 48px 0 80px; }
h2 { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; margin: 56px 0 14px; scroll-margin-top: 24px; }
h2:first-child { margin-top: 0; }
h3 { font-size: 18px; font-weight: 700; margin: 28px 0 8px; }
p, li { color: var(--muted); font-size: 16px; }
p + p { margin-top: 10px; }
ul, ol { padding-left: 22px; }
li { margin: 6px 0; }
li::marker { color: var(--dim); }
strong, b { color: var(--text); font-weight: 650; }
code { font-family: 'JetBrains Mono', monospace; font-size: 0.88em; padding: 2px 6px; border-radius: 5px; background: var(--surface); border: 1px solid var(--line); color: #c9cdf5; }
pre { margin: 14px 0; padding: 16px 18px; border-radius: 12px; background: #04050b; border: 1px solid var(--line); overflow-x: auto; position: relative; }
pre code { padding: 0; border: none; background: none; font-size: 14px; line-height: 1.7; color: #c9cdf5; }
pre .c { color: var(--dim); }
.copy { position: absolute; top: 9px; right: 9px; height: 30px; padding: 0 11px; border-radius: 7px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: 600 12.5px Inter, sans-serif; cursor: pointer; }
.copy:hover { color: var(--text); }
table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 15px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--dim); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
td { color: var(--muted); }
td:first-child { color: var(--text); white-space: nowrap; }
.note { margin: 18px 0; padding: 14px 18px; border-radius: 12px; border: 1px solid #2a2f5c; background: rgba(90, 92, 255, 0.07); color: var(--muted); font-size: 15px; display: flex; gap: 12px; }
.note.warn { border-color: #4a3a1a; background: rgba(242, 184, 75, 0.07); }
.note svg { color: var(--accent-2); margin-top: 2px; }
.note.warn svg { color: var(--amber); }

/* side nav layout (install page) */
.doc { display: grid; grid-template-columns: 220px 1fr; gap: 56px; }
.toc { position: sticky; top: 24px; align-self: start; display: flex; flex-direction: column; gap: 4px; font-size: 14.5px; }
.toc b { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); margin: 14px 0 4px; }
.toc b:first-child { margin-top: 0; }
.toc a { color: var(--muted); padding: 3px 0; }
.toc a:hover { color: var(--text); }

footer { border-top: 1px solid var(--line); padding: 28px 0 40px; }
footer .wrap { display: flex; align-items: center; gap: 24px; color: var(--dim); font-size: 14px; flex-wrap: wrap; }
footer a { color: var(--dim); }
footer .wrap span:last-child { margin-left: auto; }

@media (max-width: 820px) {
  nav { gap: 18px; }
  nav .links { display: none; }
  h1 { font-size: 38px; }
  .doc { grid-template-columns: 1fr; gap: 0; }
  .toc { display: none; }
}

/* Compact mobile typography and spacing for documentation subpages only. */
@media (max-width: 600px) {
  body:has(.top:not(.home)) .wrap { width: calc(100% - 32px); }
  body:has(.top:not(.home)) nav { height: 56px; gap: 12px; justify-content: space-between; }
  body:has(.top:not(.home)) nav .logo { font-size: 17px; gap: 7px; white-space: nowrap; }
  body:has(.top:not(.home)) nav .logo img { width: 25px; height: 25px; }
  body:has(.top:not(.home)) nav .right { margin-left: 0; }
  body:has(.top:not(.home)) nav .right .btn { height: 34px; padding: 0 11px; font-size: 11px; white-space: nowrap; }
  body:has(.top:not(.home)) .hero { padding: 29px 0 25px; }
  body:has(.top:not(.home)) .eyebrow { font-size: 10px; letter-spacing: .13em; }
  body:has(.top:not(.home)) h1 { margin-top: 8px; font-size: clamp(27px, 7vw, 33px); line-height: 1.12; }
  body:has(.top:not(.home)) .lead { margin-top: 10px; font-size: 13px; line-height: 1.55; }
  body:has(.top:not(.home)) main { padding: 25px 0 42px; }
  body:has(.top:not(.home)) h2 { margin: 29px 0 9px; font-size: 23px; line-height: 1.2; }
  body:has(.top:not(.home)) h3 { margin: 21px 0 6px; font-size: 15px; }
  body:has(.top:not(.home)) p,
  body:has(.top:not(.home)) li { font-size: 12.5px; line-height: 1.6; }
  body:has(.top:not(.home)) p + p { margin-top: 7px; }
  body:has(.top:not(.home)) ul, body:has(.top:not(.home)) ol { padding-left: 18px; }
  body:has(.top:not(.home)) li { margin: 4px 0; }
  body:has(.top:not(.home)) .btn { min-height: 39px; height: auto; padding: 9px 13px; border-radius: 9px; font-size: 12px; justify-content: center; }
  body:has(.top:not(.home)) .btn svg.i { width: 16px; height: 16px; }
  body:has(.top:not(.home)) pre { margin: 10px 0; padding: 12px; border-radius: 9px; max-width: 100%; overflow-x: auto; font-size: 11px; }
  body:has(.top:not(.home)) pre code { font-size: 10.5px; line-height: 1.6; }
  body:has(.top:not(.home)) .note { padding: 12px; margin: 13px 0; gap: 9px; border-radius: 9px; font-size: 12px; }
  body:has(.top:not(.home)) .note svg { width: 17px; height: 17px; flex-shrink: 0; }
  body:has(.top:not(.home)) table { display: block; overflow-x: auto; font-size: 12px; }
  body:has(.top:not(.home)) th, body:has(.top:not(.home)) td { padding: 8px 9px; }
  body:has(.top:not(.home)) footer { padding: 20px 0 26px; }
  body:has(.top:not(.home)) footer .wrap { gap: 10px 14px; font-size: 11px; }
  body:has(.top:not(.home)) footer .wrap span:last-child { margin-left: 0; width: 100%; }
}

/* Compact download cards; scoped to the download page. */
@media (max-width: 600px) {
  body:has(#windows.card) .cards { gap: 9px; }
  body:has(#windows.card) .card { padding: 16px; border-radius: 11px; min-width: 0; }
  body:has(#windows.card) .card .head { gap: 10px; }
  body:has(#windows.card) .card .head > div { min-width: 0; }
  body:has(#windows.card) .card .ic { width: 35px; height: 35px; flex: 0 0 35px; border-radius: 9px; }
  body:has(#windows.card) .card .ic svg { width: 18px; height: 18px; }
  body:has(#windows.card) .card h3 { font-size: 15px; margin: 0; }
  body:has(#windows.card) .card .meta { font-size: 11px; line-height: 1.45; }
  body:has(#windows.card) .card p { margin-top: 10px; font-size: 12px; line-height: 1.55; }
  body:has(#windows.card) .card .acts { margin-top: 12px; gap: 8px; }
  body:has(#windows.card) .card .small { font-size: 10px; }
  body:has(#windows.card) .ver { font-size: 10px; padding: 3px 8px; }
  body:has(#windows.card) .server { margin-top: 0; }
  body:has(#windows.card) .server pre code { white-space: pre-wrap; overflow-wrap: anywhere; }
}

/* Audited phone layout — rendered at 360/393px and tuned for real mobile widths. */
@media (max-width: 600px) {
  .page-download .wrap,
  .page-install .wrap,
  .page-changelog .wrap { width: calc(100% - 28px); }

  .page-download nav,
  .page-install nav,
  .page-changelog nav { height: 52px; gap: 10px; }

  .page-download nav .logo,
  .page-install nav .logo,
  .page-changelog nav .logo { font-size: 16px; gap: 6px; }

  .page-download nav .logo img,
  .page-install nav .logo img,
  .page-changelog nav .logo img { width: 23px; height: 23px; }

  .page-download nav .right .btn,
  .page-install nav .right .btn,
  .page-changelog nav .right .btn { min-height: 32px; height: 32px; padding: 0 10px; font-size: 10.5px; border-radius: 8px; }

  .page-download .hero,
  .page-install .hero,
  .page-changelog .hero { padding: 22px 0 20px; }

  .page-download .eyebrow,
  .page-install .eyebrow,
  .page-changelog .eyebrow { font-size: 9px; letter-spacing: .12em; }

  .page-download h1,
  .page-install h1,
  .page-changelog h1 { margin-top: 6px; font-size: 25px; line-height: 1.12; }

  .page-download .lead,
  .page-install .lead,
  .page-changelog .lead { margin-top: 8px; font-size: 12px; line-height: 1.5; }

  .page-download main,
  .page-install main,
  .page-changelog main { padding: 20px 0 36px; }

  .page-download h2,
  .page-install h2,
  .page-changelog h2 { margin: 24px 0 7px; font-size: 20px; line-height: 1.18; }

  .page-download h3,
  .page-install h3,
  .page-changelog h3 { margin: 17px 0 5px; font-size: 14px; }

  .page-download p, .page-download li,
  .page-install p, .page-install li,
  .page-changelog p, .page-changelog li { font-size: 11.5px; line-height: 1.52; }

  .page-download .btn,
  .page-install .btn,
  .page-changelog .btn { min-height: 36px; height: auto; padding: 8px 11px; font-size: 11px; border-radius: 8px; }

  .page-download footer,
  .page-install footer,
  .page-changelog footer { padding: 18px 0 22px; }

  .page-download footer .wrap,
  .page-install footer .wrap,
  .page-changelog footer .wrap { gap: 9px 12px; font-size: 10px; }

  /* Download */
  .page-download .cards { gap: 8px; }
  .page-download .card { padding: 13px; border-radius: 10px; }
  .page-download .card .head { gap: 9px; }
  .page-download .card .ic { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 8px; }
  .page-download .card .ic svg { width: 16px; height: 16px; }
  .page-download .card h3 { margin: 0; font-size: 14px; }
  .page-download .card .meta { font-size: 10px; line-height: 1.4; }
  .page-download .card p { margin-top: 8px; font-size: 11.5px; line-height: 1.48; }
  .page-download .card .acts { margin-top: 10px; gap: 7px; }
  .page-download .ver { font-size: 9px; padding: 2px 7px; }
  .page-download .card .small { font-size: 9.5px; }
  .page-download .server .acts { display: grid; grid-template-columns: 1fr; }
  .page-download .note[style] { margin-top: 14px !important; }

  /* Install — fix the grid item's intrinsic width that was forcing a 454px layout viewport. */
  .page-install .doc { display: block; min-width: 0; width: calc(100% - 28px); }
  .page-install .doc > article { min-width: 0; width: 100%; max-width: 100%; }
  .page-install .doc article > * { max-width: 100%; }
  .page-install pre { width: 100%; max-width: 100%; overflow-x: auto; }
  .page-install pre code { font-size: 9.5px; line-height: 1.5; }
  .page-install table { display: block; width: 100%; max-width: 100%; overflow-x: auto; font-size: 10.5px; }
  .page-install th, .page-install td { padding: 6px 7px; }
  .page-install td:first-child { white-space: normal; }
  .page-install .note { padding: 10px; margin: 11px 0; font-size: 11px; }
  .page-install ul, .page-install ol { padding-left: 16px; }
  .page-install li { margin: 3px 0; }

  /* Changelog */
  .page-changelog .rel { gap: 7px; padding: 15px 0; }
  .page-changelog .rel .v { font-size: 15px; }
  .page-changelog .rel .d { font-size: 9.5px; }
  .page-changelog .tag { margin-top: 4px; padding: 1px 6px; font-size: 8px; }
  .page-changelog .rel li { font-size: 11px; line-height: 1.48; margin: 4px 0; }
  .page-changelog .k { min-width: 42px; margin-right: 4px; padding: 1px 4px; font-size: 8px; border-radius: 4px; }
}

@media (max-width: 600px) {
  body.page-download .hero h1,
  body.page-install .hero h1,
  body.page-changelog .hero h1 { font-size: 24px; }

  body.page-download main h2,
  body.page-install main h2,
  body.page-changelog main h2 { font-size: 19px; margin-top: 21px; }

  body.page-download main h3,
  body.page-install main h3,
  body.page-changelog main h3 { font-size: 13.5px; }

  body.page-install pre code { white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; font-size: 9px; }
  body.page-install code { overflow-wrap: anywhere; word-break: break-word; }

  body.page-download .card { padding: 12px; }
  body.page-download .card p { font-size: 11px; line-height: 1.45; }
  body.page-download .card .acts { margin-top: 9px; }
}

@media (max-width: 600px) {
  body.page-install main .doc h2 { font-size: 19px; margin-top: 21px; }
  body.page-install main .doc h3 { font-size: 13.5px; margin-top: 16px; }
}
