:root {
  --bg: #f7f8fa; --fg: #1a1d21; --muted: #5b6573; --card: #fff; --line: #dde1e7;
  --accent: #1c7ed6; --accent-fg: #fff; --good: #2b8a3e; --bad: #c92a2a; --warn-bg: #fff4e0;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171c; --fg: #e6e9ee; --muted: #9aa4b2; --card: #1c2027; --line: #2b313b;
    --accent: #4dabf7; --accent-fg: #0b1118; --good: #69db7c; --bad: #ff8787; --warn-bg: #3a2f1a;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
a { color: var(--accent); }
h1 { font-size: 1.9rem; line-height: 1.2; margin: 1.4rem 0 .6rem; }
h2 { font-size: 1.15rem; margin: 0 0 .5rem; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 46rem; }
.muted { color: var(--muted); font-size: .92rem; }
.note { background: var(--warn-bg); padding: .5rem .7rem; border-radius: 8px; font-size: .92rem; }

.top { border-bottom: 1px solid var(--line); background: var(--card); }
.bar { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: center; justify-content: space-between; padding-top: .8rem; padding-bottom: .8rem; }
.brand { color: var(--fg); text-decoration: none; font-size: 1.15rem; display: flex; align-items: center; gap: .55rem; }
.brand img { display: block; height: 36px; width: auto; }
.brand span { margin-left: .1rem; }
nav { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; }
nav a { color: var(--muted); text-decoration: none; padding: .2rem 0; border-bottom: 2px solid transparent; }
nav a:hover, nav a[aria-current] { color: var(--fg); border-bottom-color: var(--accent); }

main { padding-bottom: 2rem; }
.hero { padding: 1.5rem 0 1rem; }
.hero h1 { font-size: 2.2rem; max-width: 40rem; }
.cta { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.2rem; }
.btn { display: inline-block; padding: .65rem 1.2rem; background: var(--accent); color: var(--accent-fg); border-radius: 8px; text-decoration: none; font-weight: 600; }
.btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.2rem; margin: 1rem 0; }
.grid3 { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid3 .card { margin: 0; }
.steps { list-style: none; padding: 0; margin: 0; }

.stats { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; }
.stats > div { display: flex; flex-direction: column; }
.num { font-size: 2rem; font-weight: 700; line-height: 1.1; }
.lbl { color: var(--muted); font-size: .9rem; }

.map { height: 420px; border-radius: 12px; border: 1px solid var(--line); margin: 1rem 0 .5rem; }
.legend { list-style: none; padding: 0; display: flex; gap: 1.4rem; flex-wrap: wrap; color: var(--muted); font-size: .9rem; }
.dot { display: inline-block; width: .8rem; height: .8rem; border-radius: 50%; margin-right: .3rem; vertical-align: -1px; }
.dot.r { background: #d9480f; } .dot.c { background: #1c7ed6; }

.calc { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
.calc .card { margin: 0; }
label { display: block; font-size: .92rem; color: var(--muted); margin: .6rem 0; }
input, select { display: block; width: 100%; margin-top: .2rem; padding: .5rem .6rem; font: inherit; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
dl { margin: 0; }
dt { color: var(--muted); font-size: .9rem; margin-top: .6rem; }
dd { margin: 0; font-weight: 600; }
dd.big { font-size: 1.6rem; }
.verdict { margin: .8rem 0 0; font-weight: 600; }
.verdict.good { color: var(--good); } .verdict.bad { color: var(--bad); }

.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; padding: 1rem 0; }
@media (max-width: 520px) { .hero h1 { font-size: 1.7rem; } }
.kicker { margin: 0 0 .4rem; color: var(--accent); font-weight: 700; letter-spacing: .02em; text-transform: uppercase; font-size: .85rem; }
.chart { width: 100%; height: auto; max-width: 640px; display: block; }
.chart .bar { fill: var(--accent); }
.chart .none { fill: var(--line); }
.chart text { fill: var(--fg); font-size: 10px; }
.chart text.day { fill: var(--muted); font-size: 8.5px; }
.ico { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 12px; margin-bottom: .7rem; color: var(--accent); background: var(--bg); background: color-mix(in srgb, var(--accent) 16%, transparent); }
.ico svg { width: 26px; height: 26px; }
.graph { width: 100%; max-width: 560px; height: auto; display: block; margin: 0 auto; }
.graph .ring { fill: none; stroke: var(--line); stroke-width: 1; }
.graph .ringlbl { fill: var(--muted); font-size: 9px; }
.graph .e0 { stroke: var(--accent); stroke-opacity: .4; stroke-width: 1; }
.graph .e1 { stroke: var(--muted); stroke-opacity: .35; stroke-width: 1; stroke-dasharray: 3 3; }
.graph .node { fill: var(--accent); }
.graph .node.router { fill: #d9480f; }
.ln { display: inline-block; width: 1.4rem; height: 0; border-top: 2px solid var(--accent); margin-right: .3rem; vertical-align: 3px; }
.ln.dashed { border-top-style: dashed; border-top-color: var(--muted); }
.big { font-size: 2.4rem; font-weight: 700; line-height: 1.1; margin: .2rem 0 0; }
details { margin: .8rem 0; }
summary { cursor: pointer; color: var(--accent); }
details[open] > summary { margin-bottom: .4rem; }
.badge { display: inline-block; margin: 0 0 .4rem; padding: .15rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 600; color: var(--accent); background: var(--bg); background: color-mix(in srgb, var(--accent) 16%, transparent); }
.specs { padding-left: 1.2rem; }
.graphbox { position: relative; max-width: 560px; margin: 0 auto; }
.graph .e0.w1 { stroke-width: 1; } .graph .e0.w2 { stroke-width: 1.8; } .graph .e0.w3 { stroke-width: 2.8; }
.graph .e1.w1 { stroke-width: 1; } .graph .e1.w2 { stroke-width: 1.6; } .graph .e1.w3 { stroke-width: 2.4; }
.graph .node { fill: var(--accent); stroke: none; cursor: pointer; outline: none; }
.graph .node.router, .lg .node.router { fill: #d9480f; }
.graph .node.me, .lg .node.me { fill: #2f9e44; }
.graph .node.outline, .lg .node.outline { fill: none; stroke: var(--accent); stroke-width: 1.6; }
.graph .node.router.outline, .lg .node.router.outline { stroke: #d9480f; }
.lg .node { fill: var(--accent); }
.lg { width: 14px; height: 14px; vertical-align: -2px; margin-right: .3rem; }
.graph.dim .e0, .graph.dim .e1 { stroke-opacity: .07; }
.graph.dim .node { opacity: .3; }
.graph.dim .hl { opacity: 1; stroke-opacity: .95; }
.graph .e0.hl { stroke: var(--accent); } .graph .e1.hl { stroke: var(--fg); }
.graph .node:focus-visible { outline: 2px solid var(--fg); }
.graph.zoomed { cursor: grab; touch-action: none; }
.gctl { position: absolute; top: 4px; right: 4px; display: flex; flex-direction: column; gap: 4px; }
.gctl button { width: 32px; height: 32px; font: inherit; font-size: 1.1rem; line-height: 1; color: var(--fg); background: var(--card); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.gctl button:hover { border-color: var(--accent); }
.defs0 { position: absolute; width: 0; height: 0; overflow: hidden; }
.graph .nl { fill: var(--muted); font-size: 8px; pointer-events: none; }
.graph.dim .nl { opacity: .15; }
.graph.dim .nl.hl { opacity: 1; fill: var(--fg); }
.mk { background: none; border: 0; }
.mk-label { background: var(--card); color: var(--fg); border: 1px solid var(--line); box-shadow: none; padding: 0 5px; font-size: 11px; }
.mk-label::before { display: none; }
label { position: relative; }
.lt { display: block; margin-bottom: .2rem; }
.hint { width: 1.25rem; height: 1.25rem; padding: 0; margin-left: .25rem; border: 1px solid var(--line); border-radius: 50%; background: var(--card); color: var(--accent); font: inherit; font-size: .75rem; line-height: 1; cursor: help; vertical-align: middle; }
.hint:hover, .hint:focus-visible { border-color: var(--accent); }
.hint::after { content: attr(data-tip); display: none; position: absolute; left: 0; right: 0; top: 1.7rem; z-index: 5; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--fg); box-shadow: 0 6px 20px rgba(0, 0, 0, .25); font-size: .85rem; font-weight: 400; line-height: 1.4; text-align: left; white-space: normal; }
.hint:hover::after, .hint:focus::after { display: block; }
