/* ─── NBrowser / NIGHTMARE ORG ─────────────────────────────────────────────
   Flat black, one purple, one lime full stop. Editorial rules instead of
   glowing cards. System fonts only — no third-party requests.
   ──────────────────────────────────────────────────────────────────────── */

:root {
  --bg: #0b0b0f;
  --bg-soft: #0f0f15;
  --panel: #12121a;
  --line: #23232c;
  --line-soft: #1a1a22;
  --text: #f2f2f4;
  --dim: #b4b4bd;
  --muted: #7c7c88;
  --purple: #8b5cf6;
  --purple-deep: #7c3aed;
  --lime: #c8f31d;
  --ok: #86efac;
  --warn: #fbbf24;
  --mono: "Cascadia Code", Consolas, "SF Mono", monospace;
  --sans: "Segoe UI Variable Text", "Segoe UI", Inter, system-ui, sans-serif;
  --max: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

[id] { scroll-margin-top: 76px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(139, 92, 246, 0.35); color: #fff; }

a { color: inherit; }

img { display: block; max-width: 100%; }

code, kbd, pre { font-family: var(--mono); }

code {
  font-size: 0.84em;
  color: #d8c9ff;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.18);
  border-radius: 3px;
  padding: 1px 5px;
  white-space: nowrap;
}

kbd {
  display: inline-block;
  padding: 0 4px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 3px;
  background: #17171f;
  color: var(--dim);
  font-size: 10.5px;
  line-height: 16px;
}

/* Film grain: one 140-byte data URI, no requests. */
.grain {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ─── Top bar ───────────────────────────────────────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 58px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(11, 11, 15, 0.88);
  backdrop-filter: blur(10px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand-mark { width: 26px; height: 26px; }
.brand-name {
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 22px;
}
.topnav a {
  color: var(--dim);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.12s;
}
.topnav a:hover { color: var(--text); }
.topnav-out { color: var(--purple) !important; }

/* ─── Layout ────────────────────────────────────────────────────────────── */

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
}

.section {
  padding: 92px 0 0;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 76px;
}

.kicker {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 14px;
}
.lime-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  vertical-align: middle;
}

h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 760;
  letter-spacing: -0.035em;
  line-height: 1.12;
}

.section-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 44px;
}
.section-sub {
  margin-top: 12px;
  max-width: 640px;
  color: var(--muted);
  font-size: 14.5px;
}

/* ─── Hero ──────────────────────────────────────────────────────────────── */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 64px;
  align-items: end;
  padding: 84px 0 56px;
  border-bottom: 1px solid var(--line-soft);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(40px, 5.6vw, 70px);
  font-weight: 780;
  letter-spacing: -0.045em;
  line-height: 0.99;
  max-width: 750px;
}

.hero-lede {
  max-width: 620px;
  margin-top: 22px;
  color: var(--dim);
  font-size: 16.5px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  white-space: nowrap;
}
.btn svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.btn-primary {
  background: var(--purple);
  border-color: var(--purple);
  color: #fff;
}
.btn-primary:hover { background: var(--purple-deep); border-color: var(--purple-deep); }
.btn-quiet {
  background: transparent;
  border-color: var(--line);
  color: var(--dim);
}
.btn-quiet:hover { border-color: #3a3a46; color: var(--text); }
.btn-block { width: 100%; margin-top: 18px; }
.btn.disabled {
  opacity: 0.4;
  pointer-events: none;
}

.hero-meta {
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.hero-note {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}
.hero-note a { color: var(--purple); text-decoration: none; }
.hero-note a:hover { text-decoration: underline; }

.specs {
  border-top: 1px solid var(--line);
}
.specs > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}
.specs dt {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}
.specs dd {
  text-align: right;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
}
.specs dd span {
  display: block;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 2px;
}
.specs dd.ok { color: var(--ok); }

/* ─── Screenshot ────────────────────────────────────────────────────────── */

.shot {
  margin: 48px 0 0;
}
.shot img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #000;
}
.shot figcaption {
  display: flex;
  gap: 12px;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.shot figcaption span { color: var(--purple); flex-shrink: 0; }

/* ─── Feature list ──────────────────────────────────────────────────────── */

.feature-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 56px;
}
.feature-list li {
  padding: 22px 0 24px;
  border-top: 1px solid var(--line);
}
.feature-list .num {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--purple);
  letter-spacing: 0.1em;
}
.feature-list h3 {
  margin: 6px 0 7px;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.015em;
}
.feature-list p {
  font-size: 13.5px;
  color: var(--dim);
  line-height: 1.68;
}

/* ─── Tor ───────────────────────────────────────────────────────────────── */

.tor,
.shield,
.control {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: 64px;
  align-items: start;
}
.tor-copy p,
.shield-copy p,
.control-copy p {
  margin-top: 16px;
  color: var(--dim);
  font-size: 14.5px;
  max-width: 620px;
}
.tor-copy .fine,
.shield-copy .fine,
.control-copy .fine { color: var(--muted); font-size: 12.5px; }
.shield .shot,
.control .shot {
  grid-column: 1 / -1;
  margin-top: 8px;
}
.plain-list {
  list-style: none;
  margin: 20px 0 4px;
  border-left: 1px solid var(--line);
}
.plain-list li {
  padding: 7px 0 7px 16px;
  font-size: 13.5px;
  color: var(--dim);
}
.tor-spec {
  border-top: 1px solid var(--line);
}
.tor-spec > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12px;
}
.tor-spec span { color: var(--muted); }
.tor-spec code {
  background: none;
  border: none;
  padding: 0;
  color: var(--dim);
  font-size: 10.5px;
}
.tor-spec code.warn { color: var(--warn); }

/* ─── Downloads ─────────────────────────────────────────────────────────── */

.downloads {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
}
.download {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: var(--bg-soft);
}
.download-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.download h3 {
  font-size: 17px;
  font-weight: 680;
  letter-spacing: -0.02em;
}
.download-head p {
  margin-top: 5px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 360px;
}
.tag {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.12em;
  color: var(--purple);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 3px;
  padding: 3px 6px;
}
.download-meta {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1.75;
  color: var(--muted);
  word-break: break-all;
  white-space: pre-line;
}

.download-notes {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  max-width: 760px;
}
.download-notes p {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.7;
}
.download-notes p + p { margin-top: 10px; }
.download-notes pre {
  margin: 10px 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #08080c;
  overflow-x: auto;
}
.download-notes pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--dim);
  font-size: 11px;
  white-space: pre;
}
.download-notes strong { color: var(--text); }

/* Progress */
.dl-progress {
  margin-top: 20px;
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 7px;
  padding: 14px 16px;
  background: rgba(139, 92, 246, 0.05);
}
.dl-progress.hidden { display: none; }
.dlp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}
.dlp-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dlp-pct { font-family: var(--mono); color: var(--purple); flex-shrink: 0; }
.dlp-bar {
  height: 4px;
  margin: 9px 0;
  border-radius: 2px;
  background: #1d1d27;
  overflow: hidden;
}
.dlp-bar span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--purple);
  transition: width 0.15s linear;
}
.dlp-meta {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--muted);
}
.dl-progress[data-state="done"] { border-color: rgba(134, 239, 172, 0.35); background: rgba(134, 239, 172, 0.04); }
.dl-progress[data-state="done"] .dlp-bar span { background: var(--ok); }
.dl-progress[data-state="error"] { border-color: rgba(239, 68, 68, 0.4); background: rgba(239, 68, 68, 0.05); }
.dl-progress[data-state="error"] .dlp-name,
.dl-progress[data-state="error"] .dlp-pct { color: #fca5a5; }
.dl-progress[data-state="error"] .dlp-bar span { background: #ef4444; }

/* ─── Built / release notes ─────────────────────────────────────────────── */

.built {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 64px;
  align-items: start;
}
.built-copy p {
  margin-top: 16px;
  font-size: 14.5px;
  color: var(--dim);
  max-width: 620px;
}
.built-copy .fine { color: var(--muted); font-size: 12.5px; }
.built-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 22px !important;
}
.built-links a {
  color: var(--purple);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}
.built-links a:hover { text-decoration: underline; }
.built-links a[aria-disabled="true"] { color: var(--muted); pointer-events: none; }
#source-meta { font-family: var(--mono); font-size: 10px; word-break: break-all; }

.release-notes {
  list-style: none;
  border-top: 1px solid var(--line);
}
.release-notes li {
  padding: 16px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.65;
}
.release-notes span {
  display: block;
  margin-bottom: 4px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--text);
}

/* ─── Final CTA ─────────────────────────────────────────────────────────── */

.final { border-bottom: none; }
.final-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 36px 0 8px;
  border-top: 1px solid var(--line);
}
.final-inner img { flex-shrink: 0; }
.final-inner h2 { font-size: clamp(24px, 2.6vw, 32px); }
.final-inner p {
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--muted);
  max-width: 560px;
}
.final-inner .hero-actions { margin-top: 20px; }

/* ─── Footer ────────────────────────────────────────────────────────────── */

.footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 36px 28px 56px;
  border-top: 1px solid var(--line-soft);
}
.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
}
.footer nav { display: flex; gap: 20px; }
.footer nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
}
.footer nav a:hover { color: var(--text); }
.footer p {
  margin-top: 18px;
  max-width: 760px;
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--muted);
}
.footer .fine { font-size: 10.5px; opacity: 0.8; }

/* ─── Trust page ────────────────────────────────────────────────────────── */

.page-head {
  padding: 72px 0 40px;
  border-bottom: 1px solid var(--line-soft);
}
.page-head h1 {
  font-size: clamp(34px, 4.6vw, 56px);
  font-weight: 780;
  letter-spacing: -0.045em;
  line-height: 1.02;
}
.page-head p {
  margin-top: 16px;
  max-width: 680px;
  color: var(--dim);
  font-size: 15px;
}
.page-head .updated {
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
}

.trust-grid {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 48px;
  padding: 44px 0;
  border-bottom: 1px solid var(--line-soft);
}
.trust-grid > * { min-width: 0; }
.trust-grid > h2 {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.5;
}
.trust-body { min-width: 0; overflow-wrap: anywhere; }
.trust-body p {
  font-size: 14px;
  color: var(--dim);
  line-height: 1.75;
}
.trust-body p + p { margin-top: 12px; }
.trust-body .fine { color: var(--muted); font-size: 12.5px; margin-top: 14px; }
.trust-body h3 {
  margin-top: 26px;
  font-size: 13px;
  font-weight: 650;
  color: var(--text);
}
.trust-body ul {
  margin: 10px 0 0 18px;
  color: var(--dim);
  font-size: 13.5px;
}
.trust-body li { margin: 6px 0; }
.trust-body code { white-space: normal; word-break: break-word; }
.trust-body pre {
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #08080c;
  overflow-x: auto;
}
.trust-body pre code { background: none; border: none; padding: 0; font-size: 11px; color: var(--dim); white-space: pre; }

.fact-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  margin-top: 14px;
  font-size: 13px;
}
.fact-table th,
.fact-table td {
  text-align: left;
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
.fact-table th {
  width: 38%;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
.fact-table td { color: var(--dim); }

.hash-box {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #08080c;
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.8;
  color: var(--muted);
  word-break: break-all;
  overflow-wrap: anywhere;
}
.hash-box span { word-break: break-all; overflow-wrap: anywhere; }
.hash-box strong { color: var(--text); font-weight: 600; }
.hash-box .row + .row { margin-top: 8px; }

.callout {
  margin-top: 18px;
  padding: 14px 16px;
  border-left: 2px solid var(--purple);
  background: rgba(139, 92, 246, 0.05);
  font-size: 13px;
  color: var(--dim);
  line-height: 1.7;
}
.callout strong { color: var(--text); }

.trust-shot { margin-top: 28px; }
.trust-shot img {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #000;
}

/* ─── Responsive ────────────────────────────────────────────────────────── */

@media (max-width: 940px) {
  .hero,
  .tor,
  .shield,
  .control,
  .built {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .specs { max-width: 520px; }
  .downloads { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: 1fr; gap: 16px; }
  .trust-grid > h2 { font-size: 18px; }
}

@media (max-width: 720px) {
  .topbar { padding: 0 18px; }
  .topnav a:not(.topnav-out) { display: none; }
  main { padding: 0 18px; }
  .hero { padding-top: 56px; }
  .hero h1 { font-size: clamp(34px, 10vw, 52px); }
  .feature-list { grid-template-columns: 1fr; }
  .section { padding-top: 68px; padding-bottom: 56px; }
  .final-inner { align-items: flex-start; }
  .footer { padding: 28px 18px 44px; }
  .shot figcaption { flex-direction: column; gap: 4px; }
}
