/* Selfhostr site. Tokens follow web/DESIGN.md (the dashboard), so both feel like one product. */

@font-face {
  font-family: "Inter Variable";
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono Variable";
  src: url("../fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 800;
  font-display: swap;
}

:root,
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0c0e;
  --surface: #111215;
  --surface-raised: #17181c;
  --surface-hover: #1c1d22;
  --border: #23252a;
  --border-strong: #34373e;
  --fg: #ecedef;
  --fg-muted: #a1a4ac;
  --fg-subtle: #858892;
  --fg-on-primary: #0b0c0e;
  --primary: #ecedef;
  --primary-hover: #d4d6da;
  --ring: #8a8e98;
  --family-shell: #5ea6f7;
  --family-web: #d98bcb;
  --family-data: #3cc6a4;
  --family-windows: #e0b341;
  --warning: #f0883e;
  --severe: #f2555a;
  --tint: 14%;
  --shadow: 0 1px 0 0 rgb(255 255 255 / 0.04) inset, 0 24px 60px -24px rgb(0 0 0 / 0.8);
}
[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f7f8;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --surface-hover: #f2f2f4;
  --border: #e4e4e8;
  --border-strong: #d1d2d8;
  --fg: #0f1013;
  --fg-muted: #4f525a;
  --fg-subtle: #6a6d76;
  --fg-on-primary: #ffffff;
  --primary: #16171b;
  --primary-hover: #2b2d33;
  --ring: #6a6d76;
  --family-shell: #1c6bc9;
  --family-web: #a6458f;
  --family-data: #0a7a62;
  --family-windows: #8a6100;
  --warning: #b54708;
  --severe: #c8242b;
  --tint: 10%;
  --shadow: 0 2px 4px 0 rgb(16 17 20 / 0.05), 0 24px 60px -28px rgb(16 17 20 / 0.25);
}

/* The terminal is always dark, in both themes (same rule as the dashboard replay). */
.term,
.guard {
  --t-bg: #0d0e11;
  --t-fg: #d7d9de;
  --t-dim: #8b8f99;
  --t-prompt: #8fbcf3;
  --t-ok: #6fd3b5;
  --t-stop: #f5a35c;
  --t-border: #26282e;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 16px/1.6 "Inter Variable", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-feature-settings: "cv11", "ss03";
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
pre,
figure {
  margin: 0;
}
ul,
ol {
  padding: 0;
  list-style: none;
}
a {
  color: inherit;
}
svg {
  display: block;
}
.mono,
code,
pre {
  font-family: "JetBrains Mono Variable", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-feature-settings: normal;
}
:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 3px;
  border-radius: 4px;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 20;
  padding: 8px 14px;
  background: var(--primary);
  color: var(--fg-on-primary);
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
}
.skip:focus {
  top: 12px;
}
.wrap {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}
@media (min-width: 768px) {
  .wrap {
    padding: 0 40px;
  }
}
.fine {
  font-size: 12px;
  line-height: 18px;
  color: var(--fg-subtle);
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  margin-bottom: 16px;
}
.pill {
  display: inline-block;
  padding: 2px 8px;
  border: 1px dashed var(--border-strong);
  border-radius: 999px;
  font-size: 11px;
  line-height: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-muted);
  font-family: "JetBrains Mono Variable", ui-monospace, monospace;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  background: var(--primary);
  color: var(--fg-on-primary);
  border: 1px solid var(--primary);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 150ms cubic-bezier(0.22, 1, 0.36, 1), border-color 150ms;
}
.btn:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}
.btn-ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--border-strong);
}
.btn-ghost:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
}
.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: 6px;
}
.icon-btn,
.link-btn {
  appearance: none;
  background: none;
  border: 0;
  color: var(--fg-muted);
  cursor: pointer;
  font: inherit;
}
.icon-btn {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
}
.icon-btn:hover {
  background: var(--surface-hover);
  color: var(--fg);
}
.icon-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
[data-theme="dark"] .i-moon,
[data-theme="light"] .i-sun {
  display: none;
}
.link-btn {
  font-size: 12px;
  padding: 4px 6px;
  border-radius: 4px;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--border-strong);
}
.link-btn:hover {
  color: var(--fg);
}

/* Header */
header.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--border);
}
.bar {
  display: flex;
  align-items: center;
  height: 60px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  font-size: 16px;
  letter-spacing: -0.02em;
  text-decoration: none;
  margin-right: auto;
}
.mark {
  width: 24px;
  height: 24px;
}
.mark rect {
  fill: var(--fg);
}
.mark path {
  fill: none;
  stroke: var(--bg);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
nav.links {
  display: flex;
  align-items: center;
  gap: 2px;
}
nav.links a:not(.btn) {
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}
nav.links a:not(.btn):hover {
  color: var(--fg);
  background: var(--surface-hover);
}
nav.links .btn {
  margin: 0 6px 0 10px;
}
@media (max-width: 899px) {
  .hide-sm {
    display: none;
  }
}

/* Hero */
.hero {
  padding: 56px 0 72px;
  border-bottom: 1px solid var(--border);
}
.hero-grid {
  display: grid;
  gap: 48px;
}
@media (min-width: 1024px) {
  .hero {
    padding: 88px 0 104px;
  }
  .hero-grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
    gap: 64px;
    align-items: center;
  }
}
h1 {
  font-size: clamp(36px, 10vw, 50px);
  line-height: 1.06;
  letter-spacing: -0.035em;
  font-weight: 650;
}
@media (min-width: 1024px) {
  h1 {
    font-size: clamp(44px, 3.5vw, 52px);
  }
}
h1 .dim {
  color: var(--fg-subtle);
}
.lede {
  margin-top: 24px;
  max-width: 34em;
  font-size: 18px;
  line-height: 1.6;
  color: var(--fg-muted);
}
.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 28px;
  font-size: 12px;
  color: var(--fg-subtle);
}
.facts li::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 8px;
  vertical-align: 2px;
  border-radius: 1px;
  background: var(--border-strong);
}

/* Replay */
.replay {
  min-width: 0;
}
.stages {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 12px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-subtle);
}
.stages li {
  padding-top: 8px;
  border-top: 2px solid var(--border);
  transition: color 300ms, border-color 300ms;
}
.stages li.on {
  color: var(--fg);
  border-top-color: var(--fg);
}
.stages li.coming {
  border-top-style: dashed;
}
.term {
  background: var(--t-bg);
  border: 1px solid var(--t-border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
[data-theme="light"] .term {
  border-color: #1b1c20;
}
.term-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 38px;
  padding: 0 14px;
  border-bottom: 1px solid var(--t-border);
  color: var(--t-dim);
  font-size: 12px;
}
.dots {
  display: inline-flex;
  gap: 6px;
}
.dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #2c2e34;
}
.term-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.term-body {
  height: 236px;
  padding: 14px 16px;
  overflow: auto hidden;
  color: var(--t-fg);
  font-size: 12.5px;
  line-height: 20px;
  white-space: pre;
}
.t-dim {
  color: var(--t-dim);
}
.t-prompt {
  color: var(--t-prompt);
}
.t-ok {
  color: var(--t-ok);
}
.t-cursor {
  display: inline-block;
  width: 8px;
  height: 15px;
  vertical-align: -3px;
  background: var(--t-fg);
  opacity: 0.7;
}
.cards {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}
@media (min-width: 600px) {
  .report .kv {
    grid-template-columns: 1fr 1fr;
    gap: 8px 20px;
  }
  .card.report .kv div {
    grid-template-columns: 1fr;
    gap: 0;
  }
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}
[data-theme="light"] .card {
  box-shadow: 0 1px 2px rgb(16 17 20 / 0.05);
}
.card > * {
  transition: opacity 400ms cubic-bezier(0.22, 1, 0.36, 1), transform 400ms cubic-bezier(0.22, 1, 0.36, 1);
}
.card.wait > * {
  opacity: 0;
  transform: translateY(6px);
}
.card-label {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  margin-bottom: 10px;
}
.story-text {
  font-size: 14px;
  line-height: 22px;
  font-weight: 500;
}
.chip {
  font-size: 12.5px;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  line-height: 20px;
  padding: 0 7px;
  border-radius: 4px;
  border: 1px solid var(--border-strong);
  color: var(--fg-muted);
}
.tag-severe {
  color: var(--fg);
}
.diamond {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--severe);
  transform: rotate(45deg);
  border-radius: 1px;
  flex: none;
}
.meta {
  font-size: 11.5px;
  color: var(--fg-subtle);
  margin-left: auto;
}
.kv {
  display: grid;
  gap: 6px;
  font-size: 12px;
  line-height: 18px;
}
.kv div {
  display: grid;
  grid-template-columns: 9.5em minmax(0, 1fr);
  gap: 8px;
}
.kv dt {
  color: var(--fg-subtle);
}
.kv dd {
  overflow-wrap: anywhere;
}
.report .kv div {
  grid-template-columns: 8.5em minmax(0, 1fr);
}
.report .kv dd {
  overflow-wrap: normal;
}
.kv .ok::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  vertical-align: 1px;
  border-radius: 50%;
  background: var(--fg);
}
.replay-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

/* Sections */
.section {
  padding: 80px 0;
  border-bottom: 1px solid var(--border);
}
@media (min-width: 1024px) {
  .section {
    padding: 112px 0;
  }
}
.sec-head {
  max-width: 40em;
  margin-bottom: 48px;
}
h2 {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 650;
  text-wrap: balance;
}
.sec-lede {
  margin-top: 16px;
  font-size: 17px;
  color: var(--fg-muted);
  max-width: 36em;
}
h3 {
  font-size: 17px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.split {
  display: grid;
  gap: 40px;
}
@media (min-width: 1024px) {
  .split {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 72px;
    align-items: start;
  }
  .split > .sec-head {
    margin-bottom: 0;
    position: sticky;
    top: 104px;
  }
  .split-rev {
    align-items: center;
  }
  .split-rev > .sec-head {
    position: static;
  }
}

/* How it works: a rail of four steps */
.rail {
  display: grid;
  gap: 0;
  position: relative;
}
.step {
  position: relative;
  padding: 0 0 36px 28px;
  border-left: 1px solid var(--border-strong);
}
.step:last-child {
  padding-bottom: 0;
}
.step::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--fg);
}
.step-coming {
  border-left-style: dashed;
}
.step-coming::before {
  border-style: dashed;
  border-color: var(--fg-subtle);
}
.step-n {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--fg-subtle);
  margin-bottom: 8px;
}
.step h3 + p {
  margin-top: 8px;
  color: var(--fg-muted);
  font-size: 15px;
  line-height: 1.6;
}
.snip {
  margin-top: 16px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12px;
  line-height: 19px;
  color: var(--fg-muted);
  white-space: pre;
  overflow-x: auto;
}
@media (min-width: 900px) {
  .rail {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 32px;
  }
  .step {
    display: flex;
    flex-direction: column;
    padding: 28px 0 0;
    border-left: 0;
    border-top: 1px solid var(--border-strong);
  }
  .step-coming {
    border-top-style: dashed;
  }
  .step::before {
    left: 0;
    top: -5px;
  }
  .step .snip {
    margin-top: auto;
    min-height: 102px;
  }
  .step h3 + p {
    margin-bottom: 20px;
  }
}

/* Sensors: a port table */
.legend {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  gap: 10px 28px;
  margin-top: 28px;
  font-size: 12px;
  color: var(--fg-muted);
}
.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  margin-right: 8px;
  vertical-align: 0;
  background: var(--c);
}
.f-shell {
  --c: var(--family-shell);
}
.f-web {
  --c: var(--family-web);
}
.f-data {
  --c: var(--family-data);
}
.f-win {
  --c: var(--family-windows);
}
.ports {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
[data-theme="light"] .ports {
  box-shadow: 0 1px 2px rgb(16 17 20 / 0.05);
}
.ports-head,
.port {
  display: grid;
  grid-template-columns: 4.5em 6.5em minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  padding: 0 18px;
}
.ports-head {
  height: 40px;
  align-items: center;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  border-bottom: 1px solid var(--border);
}
.port {
  position: relative;
  padding-top: 11px;
  padding-bottom: 11px;
  font-size: 14px;
  line-height: 20px;
  border-bottom: 1px solid var(--border);
}
.port:last-child {
  border-bottom: 0;
}
.port::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--c);
}
.port span:first-child {
  color: var(--c);
  font-size: 13px;
  font-weight: 500;
}
.port span:nth-child(2) {
  font-weight: 550;
}
.port span:nth-child(3) {
  color: var(--fg-muted);
}
@media (max-width: 599px) {
  .ports-head,
  .port {
    grid-template-columns: 3.6em minmax(0, 1fr);
    gap: 2px 12px;
    padding-left: 16px;
    padding-right: 16px;
  }
  .ports-head span:nth-child(3) {
    display: none;
  }
  .port span:nth-child(3) {
    grid-column: 2;
    font-size: 13px;
  }
}

/* Checks list */
.checks {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}
.checks li {
  position: relative;
  padding-left: 26px;
  color: var(--fg-muted);
  font-size: 15px;
  line-height: 1.55;
}
.checks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 7px;
  width: 10px;
  height: 6px;
  border-left: 1.5px solid var(--fg);
  border-bottom: 1.5px solid var(--fg);
  transform: rotate(-45deg);
}

/* Payload sample card */
.sample {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px 20px 18px;
  box-shadow: var(--shadow);
}
.sample-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 44px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-subtle);
}
.sample-head .fine {
  text-transform: none;
  letter-spacing: 0;
}
.kv-wide {
  font-size: 13px;
  line-height: 20px;
  gap: 10px;
}
.kv-wide div {
  grid-template-columns: 6.5em minmax(0, 1fr);
}
.sev {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Anonymity: the egress road */
.egress {
  display: grid;
  gap: 0;
  margin-bottom: 48px;
}
.eg-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
}
.eg-gate {
  border-color: var(--border-strong);
}
.eg-out {
  background: transparent;
  border-style: dashed;
}
.eg-label {
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--fg);
}
.eg-note {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--fg-muted);
}
.eg-list {
  margin-top: 8px;
  font-size: 13px;
  line-height: 22px;
  color: var(--fg-muted);
}
.eg-list li::before {
  content: "→ ";
  color: var(--fg-subtle);
}
.eg-arrow {
  position: relative;
  height: 28px;
  margin-left: 28px;
  border-left: 1px solid var(--fg-subtle);
}
.eg-arrow::after {
  content: "";
  position: absolute;
  left: -4.5px;
  bottom: 0;
  border: 4px solid transparent;
  border-top: 6px solid var(--fg-subtle);
  border-bottom: 0;
}
.eg-blocked {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 10px 14px;
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  font-size: 12px;
  color: var(--fg-muted);
}
.eg-x {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  color: var(--fg);
  font-size: 13px;
  line-height: 1;
}
.eg-x::after {
  content: "\00d7";
}
@media (min-width: 900px) {
  .egress {
    grid-template-columns: 1fr 44px 1fr 44px 1fr 44px 0.8fr;
    align-items: stretch;
  }
  .eg-arrow {
    height: auto;
    margin: 0;
    border-left: 0;
    align-self: center;
    border-top: 1px solid var(--fg-subtle);
  }
  .eg-arrow::after {
    left: auto;
    right: 0;
    bottom: auto;
    top: -4.5px;
    border: 4px solid transparent;
    border-left: 6px solid var(--fg-subtle);
    border-right: 0;
  }
  .eg-blocked {
    grid-column: 1 / -1;
  }
}
.split-tight {
  gap: 32px;
}
@media (min-width: 1024px) {
  .split-tight {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 48px;
    align-items: center;
  }
}
.split-tight .checks {
  margin-top: 0;
}
.guard {
  background: var(--t-bg);
  border: 1px solid var(--t-border);
  border-radius: 12px;
  padding: 18px 20px;
  color: var(--t-fg);
  font-size: 12.5px;
  line-height: 22px;
  white-space: pre;
  overflow-x: auto;
}
.g-ok {
  color: var(--t-ok);
}
.g-stop {
  color: var(--t-stop);
  font-weight: 600;
}
.g-res {
  color: #ffffff;
  font-weight: 600;
}

/* Network figure */
.netfig {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 20px 16px;
}
.netfig svg {
  width: 100%;
  max-width: 460px;
  height: auto;
  margin: 0 auto;
}
.netfig figcaption {
  display: grid;
  gap: 4px;
  text-align: center;
  margin-top: 12px;
}
.net-cap-line {
  font-size: 12.5px;
  color: var(--fg);
}
.net-lines path {
  fill: none;
  stroke: var(--border-strong);
  stroke-width: 1.5;
  stroke-dasharray: 4 5;
}
.net-nodes circle {
  fill: var(--bg);
  stroke: var(--fg-muted);
  stroke-width: 1.5;
}
.net-labels text {
  fill: var(--fg-subtle);
  font-size: 11px;
}
.net-target rect {
  fill: color-mix(in srgb, var(--severe) var(--tint), var(--surface));
  stroke: var(--severe);
  stroke-width: 1.25;
}
.net-target text {
  fill: var(--fg);
  font-size: 12px;
  font-weight: 500;
}
.net-cap {
  fill: var(--fg-muted);
  font-size: 11px;
}
.netfig.live .net-lines path {
  animation: flow 2.4s linear infinite;
}
@keyframes flow {
  to {
    stroke-dashoffset: -18;
  }
}

/* Install */
.install {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}
@media (min-width: 900px) {
  .install {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.install li {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}
.install h3 + p {
  margin: 6px 0 18px;
  color: var(--fg-muted);
  font-size: 14px;
  line-height: 1.55;
}
.install .mono {
  font-size: 0.92em;
}
.code {
  margin-top: auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.code-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 34px;
  padding: 0 6px 0 14px;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  color: var(--fg-subtle);
}
.code pre {
  padding: 12px 14px;
  min-height: 64px;
  font-size: 12.5px;
  line-height: 20px;
  white-space: pre;
  overflow-x: auto;
}
.copy {
  height: 24px;
  padding: 0 8px;
  border-radius: 5px;
  border: 1px solid transparent;
  background: none;
  color: var(--fg-muted);
  font: inherit;
  cursor: pointer;
}
.copy:hover {
  color: var(--fg);
  border-color: var(--border-strong);
}

/* FAQ */
.faq {
  border-top: 1px solid var(--border);
}
.faq details {
  border-bottom: 1px solid var(--border);
}
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  font-size: 17px;
  font-weight: 550;
  letter-spacing: -0.01em;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  flex: none;
  width: 24px;
  text-align: center;
  font-family: "JetBrains Mono Variable", ui-monospace, monospace;
  font-weight: 400;
  color: var(--fg-subtle);
}
.faq details[open] summary::after {
  content: "−";
}
.faq details p {
  padding: 0 40px 22px 0;
  color: var(--fg-muted);
  font-size: 15px;
  line-height: 1.65;
}

/* Footer */
.foot {
  padding: 48px 0 56px;
}
.foot-grid {
  display: grid;
  gap: 24px;
}
.foot-grid .brand {
  margin-bottom: 10px;
}
.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-size: 14px;
}
.foot-links a {
  color: var(--fg-muted);
  text-decoration: none;
}
.foot-links a:hover {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 3px;
}
@media (min-width: 900px) {
  .foot-grid {
    grid-template-columns: 1fr auto;
    align-items: start;
  }
  .foot-note {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Policy page: long text in one column, with the notice under the hero */
.policy {
  max-width: 42em;
}
.policy > p {
  margin-top: 16px;
  color: var(--fg-muted);
  font-size: 16px;
  line-height: 1.65;
}
.policy h3 {
  margin-top: 40px;
}
.policy .checks {
  margin-top: 16px;
}
.policy .cards {
  margin-top: 28px;
}
.policy-notice,
.policy-outcomes {
  max-width: 42em;
}
.policy-notice {
  margin-top: 32px;
}
.policy-date {
  margin-top: 16px;
}

/* Small screens */
@media (max-width: 599px) {
  .cta .btn {
    flex: 1 1 100%;
  }
  .term-body {
    font-size: 11.5px;
    line-height: 19px;
    height: 220px;
    padding: 12px 14px;
  }
  .lede {
    font-size: 17px;
  }
}
