:root {
  color-scheme: light dark;
  --bg: #f6f8fc;
  --panel: #ffffff;
  --text: #172334;
  --muted: #4c5c70;
  --accent: #15559a;
  --line: #bdcad9;
  --topbar: rgba(246, 248, 252, 0.97);
  --raised: #eef3f9;
  --hover: #e8eff8;
  --lede: #334b66;
  --code: #1e4774;
  --pre: #edf2f8;
  --focus: #7b3d00;
  --primary: #1459a3;
  --primary-hover: #084986;
  --on-primary: #ffffff;
  --positive: #146a42;
  --progress: #885114;
  --planned: #623b98;
  --radius: 12px;
  --max: 1120px;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0f14;
    --panel: #151d28;
    --text: #e8eef6;
    --muted: #a4b2c4;
    --accent: #7cbcff;
    --line: #516179;
    --topbar: rgba(11, 15, 20, 0.97);
    --raised: #111821;
    --hover: #1a2432;
    --lede: #bdc9d9;
    --code: #d7e7ff;
    --pre: #0a1018;
    --focus: #f4d03f;
    --primary: #7cbcff;
    --primary-hover: #a9d4ff;
    --on-primary: #041018;
    --positive: #6ee7aa;
    --progress: #ffd18c;
    --planned: #c5b4ff;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 6rem; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(74, 163, 255, 0.12), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover { color: var(--text); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.wrap { width: min(100% - 2rem, var(--max)); margin-inline: auto; }
.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 1rem;
  z-index: 100;
  padding: 0.7rem 1rem;
  background: var(--panel);
  transform: translateY(-200%);
}
.skip-link:focus { transform: translateY(0); }
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--topbar);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  min-height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-block: 0.5rem;
}
.brand { color: var(--text); font-weight: 700; text-decoration: none; white-space: nowrap; }
.brand span { color: var(--muted); font-weight: 400; }
.nav-links, .cta, .section-links { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.92rem;
}
.nav-links a:hover { color: var(--text); background: var(--panel); }
.hero {
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--raised), transparent 80%);
}
.eyebrow {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 600;
  margin: 0 0 0.85rem;
}
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.025em; overflow-wrap: anywhere; }
h1 { font-size: clamp(2.2rem, 5vw, 3.7rem); margin: 0 0 1.2rem; }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); margin: 0 0 1rem; }
h3 { font-size: 1.25rem; margin: 0 0 0.8rem; }
p { margin: 0 0 1rem; }
.lede { max-width: 51rem; color: var(--lede); font-size: 1.2rem; }
.cta { margin-top: 1.5rem; gap: 0.65rem; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.65rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}
.btn:hover { background: var(--hover); border-color: var(--accent); color: var(--text); }
.btn.primary { color: var(--on-primary); background: var(--primary); border-color: transparent; }
.btn.primary:hover { color: var(--on-primary); background: var(--primary-hover); }
.btn:disabled { cursor: not-allowed; color: var(--muted); background: var(--raised); border-color: var(--line); }
.hero-note { max-width: 51rem; color: var(--muted); margin: 1.5rem 0 0; }
.page { padding-block: 2.75rem 1rem; }
section { margin-bottom: 3.5rem; }
.feature-group { margin: 2.5rem 0 3rem; }
.setup-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 1.3rem; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; min-width: 0; }
.card p { font-size: 0.95rem; }
.card .eyebrow { font-size: 0.74rem; }
.card > a { font-size: 0.95rem; }
.callout {
  margin: 1.5rem 0;
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  background: rgba(74, 163, 255, 0.12);
  padding: 1rem 1.15rem;
}
.callout p { margin: 0; }
.callout.warn { border-color: #f0b777; background: rgba(240, 163, 90, 0.09); }
.note { color: var(--muted); font-size: 0.95rem; margin-top: 1rem; }
.status-key { list-style: none; padding: 0; }
.status-key li { margin: 0.7rem 0; }
.status-key .status { margin-right: 0.4rem; }
.status {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  margin-bottom: 0.25rem;
  border: 1px solid currentColor;
  border-radius: 5px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}
.implemented { color: var(--positive); background: rgba(61, 214, 140, 0.07); }
.progress { color: var(--progress); background: rgba(240, 163, 90, 0.07); }
.planned { color: var(--planned); background: rgba(180, 150, 255, 0.07); }
.section-links { gap: 0.6rem 1.2rem; margin: 1.25rem 0; }
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  margin-top: 1rem;
}
table { width: 100%; min-width: 43rem; border-collapse: collapse; font-size: 0.95rem; }
caption { padding: 0.9rem 1rem; text-align: left; font-weight: 600; background: var(--raised); color: var(--muted); }
th, td { text-align: left; vertical-align: top; padding: 0.9rem 1rem; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
thead th { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
tbody th { font-weight: 600; width: 25%; }
td:nth-child(2) { width: 23%; }
td:last-child { width: auto; }
tbody tr:hover { background: rgba(74, 163, 255, 0.035); }
code { font-family: var(--mono); font-size: 0.87em; overflow-wrap: anywhere; }
:not(pre) > code { color: var(--code); }
pre { margin: 1rem 0; padding: 0.9rem; background: var(--pre); border: 1px solid var(--line); border-radius: 8px; overflow-x: auto; line-height: 1.55; }
pre code { font-size: 0.8rem; overflow-wrap: normal; }
.resource-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.resource-list li { padding: 1rem; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.resource-list a { font-weight: 600; }
.resource-list span { display: block; margin-top: 0.4rem; font-size: 0.93rem; color: var(--muted); }
.site-footer { border-top: 1px solid var(--line); padding: 1.75rem 0; color: var(--muted); font-size: 0.9rem; }

.chat-example {
  margin: 1.25rem 0;
  max-width: 44rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--raised);
  overflow: hidden;
}
.chat-example figcaption {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  font-weight: 600;
  font-size: 0.9rem;
}
.chat-messages { list-style: none; padding: 1rem; margin: 0; display: grid; gap: 0.8rem; }
.chat-messages li {
  width: fit-content;
  max-width: 90%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem 0.75rem 0.75rem 0;
  background: var(--panel);
  overflow-wrap: anywhere;
}
.chat-messages li.outgoing {
  justify-self: end;
  border-radius: 0.75rem 0.75rem 0 0.75rem;
  background: var(--hover);
}
.chat-speaker { display: block; font-size: 0.78rem; font-weight: 700; color: var(--muted); margin-bottom: 0.2rem; }
.chat-note { padding: 0 1rem 0.9rem; margin: 0; font-size: 0.9rem; color: var(--muted); }
.management figcaption { border-left: 4px solid var(--accent); }
.tutorial .steps > li { min-width: 0; }
.tutorial .steps > li > p:last-child { margin-bottom: 0; }
.recipe-troubleshooting dt { font-weight: 700; margin-top: 1rem; }
.recipe-troubleshooting dd { margin: 0.3rem 0 1rem; }

.nav-links a[aria-current="page"] { color: var(--text); background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.hero.compact { padding: 2.5rem 0 1.75rem; }
.hero.compact h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.breadcrumb { font-size: 0.9rem; color: var(--muted); margin: 0 0 0.75rem; }
.breadcrumb a { color: var(--muted); }
h4 { font-size: 1.05rem; margin: 1.5rem 0 0.6rem; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; align-items: start; }
.setup-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card h3 a { color: var(--text); }
.card .more { display: inline-block; margin-top: 0.4rem; font-weight: 600; }
.facts { padding-left: 1.2rem; }
.facts li { margin-bottom: 0.6rem; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 1.25rem 0; display: grid; gap: 0.9rem; }
.steps > li { min-width: 0; counter-increment: step; position: relative; padding: 1rem 1.1rem 1rem 3.4rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.steps > li::before {
  content: counter(step);
  position: absolute; left: 1rem; top: 1rem;
  width: 1.75rem; height: 1.75rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--primary); color: var(--on-primary); font-weight: 700; font-size: 0.9rem;
}
.steps h3, .steps h4 { font-size: 1.05rem; margin: 0.1rem 0 0.4rem; }
.steps p:last-child, .steps pre:last-child { margin-bottom: 0; }
.diagram { margin: 1.25rem 0; padding: 1.1rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.diagram figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 0.9rem; }
.load-chart { display: block; width: 100%; height: auto; background: white; }
.arch { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.arch > li { position: relative; padding: 0.75rem 0.9rem; border: 1px solid var(--line); border-radius: 10px; background: var(--raised); }
.arch > li + li { margin-top: 2.1rem; }
.arch > li + li::before {
  content: "";
  position: absolute; left: 50%; top: -1.85rem; height: 1.6rem;
  border-left: 2px solid var(--accent);
}
.arch > li + li::after {
  content: "";
  position: absolute; left: calc(50% - 5px); top: -0.5rem;
  border: 5px solid transparent; border-top: 6px solid var(--accent); border-bottom: 0;
}
.arch .link-label {
  position: absolute; top: -1.6rem; left: calc(50% + 0.75rem);
  font-size: 0.78rem; color: var(--muted); white-space: nowrap;
}
.arch .tier-name { display: block; font-weight: 700; }
.arch .tier-note { display: block; color: var(--muted); font-size: 0.88rem; }
.arch .modem { border-color: var(--accent); background: rgba(74, 163, 255, 0.1); }
.arch .rf { border-style: dashed; }
.chips { list-style: none; padding: 0; margin: 0.5rem 0 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chips li { padding: 0.2rem 0.6rem; border: 1px solid var(--line); border-radius: 999px; font-size: 0.85rem; background: var(--bg); }
.topo { list-style: none; padding: 0; margin: 0.9rem 0 1rem; display: grid; gap: 1.5rem; font-size: 0.88rem; }
.topo li { position: relative; padding: 0.45rem 0.65rem; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.topo li strong { display: block; font-size: 0.9rem; }
.topo li span { color: var(--muted); }
.topo li + li::before {
  content: attr(data-link);
  position: absolute; top: -1.45rem; left: 0.9rem;
  padding-left: 0.9rem; border-left: 2px solid var(--accent);
  height: 1.4rem; line-height: 1.4rem; font-size: 0.74rem; color: var(--muted); white-space: nowrap;
}
.topo li.radio { border-color: var(--accent); }
.topo li.mesh { border-style: dashed; }
.compare th[scope="col"]:not(:first-child) { width: 25%; }
.compare tbody th { width: auto; }
.compare td:nth-child(2) { width: auto; }
details { margin: 1rem 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
details > summary { cursor: pointer; padding: 0.8rem 1rem; font-weight: 600; }
details > summary { min-height: 44px; }
details > summary:hover { color: var(--accent); }
details[open] > summary { border-bottom: 1px solid var(--line); }
details > :not(summary) { margin-inline: 1rem; }
details > :last-child { margin-bottom: 1rem; }
.checklist { padding-left: 1.2rem; }
.checklist li { margin-bottom: 0.5rem; }
.next-pages { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
.next-pages li { padding: 1rem; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.next-pages a { font-weight: 600; }
.next-pages span { display: block; margin-top: 0.4rem; font-size: 0.93rem; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.matrix { min-width: 34rem; }
.matrix th[scope="col"]:not(:first-child), .matrix td:not(:first-child) { width: 20%; text-align: center; }
.matrix tbody th { width: 60%; }
.yes { color: var(--positive); font-size: 1.2rem; font-weight: 700; }
.no { color: var(--muted); font-size: 1.2rem; }
.availability { display: inline-block; color: var(--muted); font-size: 0.8rem; font-weight: 400; }
.install-page { max-width: 920px; }
.install-page label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
.install-page input:not([type="checkbox"]), .install-page select {
  display: block; width: 100%; min-height: 44px; padding: 0.65rem;
  border: 1px solid var(--muted); border-radius: 6px;
  background: var(--panel); color: var(--text); font: inherit;
}
.install-page input::placeholder { color: var(--muted); opacity: 1; }
.install-page input[type="file"] { padding: 0.7rem; }
.install-page input[type="file"]::file-selector-button { font: inherit; margin-right: 0.75rem; padding: 0.5rem; cursor: pointer; }
.install-page fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin: 0 0 1rem; min-width: 0; }
.install-page legend { font-weight: 700; padding-inline: 0.35rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.2rem; }
.form-grid > p { grid-column: 1 / -1; margin: 0; }
.field-help { display: block; font-size: 0.9rem; color: var(--muted); margin: 0.4rem 0 0.75rem; }
.install-page .check, .install-page .choices label { display: flex; align-items: center; gap: 0.65rem; min-height: 44px; font-weight: 400; margin-block: 0.6rem; cursor: pointer; }
.install-page input[type="checkbox"] { width: 1.2rem; height: 1.2rem; flex-shrink: 0; accent-color: var(--primary); }
.guide-shot { display: block; width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); }

@media (max-width: 900px) {
  .setup-grid, .setup-grid.two, .split, .next-pages { grid-template-columns: 1fr; }
  .topbar-inner { flex-wrap: wrap; }
}
@media (max-width: 600px) {
  html { scroll-padding-top: 1rem; }
  .topbar { position: static; }
  .hero { padding: 2.2rem 0 1.8rem; }
  .lede { font-size: 1.07rem; }
  .nav-links { gap: 0.1rem; }
  .brand { white-space: normal; }
  .nav-links a { padding: 0.45rem; }
  .resource-list { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .page { padding-top: 2rem; }
}
@media print {
  :root { color-scheme: light; --bg: white; --panel: white; --line: #777; --text: black; --muted: black; --accent: black; --raised: white; --positive: black; }
  body { background: white; color: black; font-size: 10pt; }
  .topbar, .skip-link, .cta, .section-links { display: none; }
  .diagram, .arch > li, .topo li, .steps > li, details, .next-pages li { background: white; }
  .wrap { width: 100%; }
  .hero { padding: 0 0 1rem; background: none; }
  .table-wrap { overflow: visible; }
  table { min-width: 0; font-size: 9pt; }
  tr { break-inside: avoid; }
  .card, .table-wrap, caption, pre, .callout, .resource-list li { background: white; }
  a, .lede, .hero-note, .note, .eyebrow, caption, thead th, .status, .resource-list span, .next-pages span, .site-footer, .diagram figcaption, .tier-note, .topo li span, :not(pre) > code { color: black; }
}
@media (forced-colors: active) {
  :focus-visible { outline-color: Highlight; }
  .yes, .no, .availability { color: CanvasText; }
  .btn { border: 1px solid ButtonText; }
}
