/* MTRTracer site. Same tokens, type and palette as the app (ui/src/design/tokens.css). */

@font-face {
  font-family: 'Geist';
  src: url('fonts/geist-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Geist';
  src: url('fonts/geist-cyrillic-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('fonts/jetbrains-mono-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('fonts/jetbrains-mono-cyrillic-wght-normal.woff2') format('woff2');
  font-weight: 100 800;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  color-scheme: dark;
  --bg: oklch(0.178 0.006 265);
  --bg-raised: oklch(0.205 0.007 265);
  --bg-sunken: oklch(0.158 0.006 265);
  --bg-hover: oklch(0.235 0.008 265);
  --bg-active: oklch(0.265 0.01 265);
  --line: oklch(0.285 0.009 265);
  --line-soft: oklch(0.24 0.008 265);
  --line-strong: oklch(0.36 0.01 265);
  --text: oklch(0.935 0.006 265);
  --text-2: oklch(0.75 0.012 265);
  --text-3: oklch(0.6 0.014 265);
  --text-4: oklch(0.47 0.014 265);
  --accent: oklch(0.76 0.115 272);
  --accent-strong: oklch(0.7 0.14 272);
  --accent-ink: oklch(0.2 0.04 272);
  --accent-soft: oklch(0.76 0.115 272 / 0.14);
  --accent-line: oklch(0.76 0.115 272 / 0.45);
  --lat-0: oklch(0.8 0.135 160);
  --lat-1: oklch(0.85 0.14 125);
  --lat-2: oklch(0.83 0.145 88);
  --lat-3: oklch(0.74 0.16 55);
  --lat-4: oklch(0.67 0.19 27);
  --ok: var(--lat-0);
  --warn: var(--lat-2);
  --bad: var(--lat-4);
  --font: 'Geist', 'Segoe UI Variable Text', 'Segoe UI', system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'Cascadia Mono', ui-monospace, Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --wrap: 1200px;
  --gutter: clamp(18px, 4vw, 40px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'ss01', 'cv11';
}

img,
svg {
  max-width: 100%;
}

a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 3px;
}
a:hover {
  text-decoration: underline;
}

code,
kbd,
.mono {
  font-family: var(--mono);
  font-size: 0.88em;
  letter-spacing: -0.01em;
}
:not(pre) > code {
  padding: 0.1em 0.38em;
  border-radius: 5px;
  background: var(--bg-active);
  color: var(--text);
}
kbd {
  padding: 0.05em 0.4em;
  border-radius: 4px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  color: var(--text-2);
}

pre {
  margin: 0;
  overflow-x: auto;
  padding: 16px 18px;
  border-radius: 10px;
  background: var(--bg-sunken);
  box-shadow: inset 0 0 0 1px var(--line-soft);
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-2);
}
pre .c {
  color: var(--text-4);
}
pre .k {
  color: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection {
  background: oklch(0.76 0.115 272 / 0.35);
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.num {
  font-variant-numeric: tabular-nums;
}

/* ---------- header ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  background: oklch(0.178 0.006 265 / 0.86);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.site-head .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 60px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand:hover {
  text-decoration: none;
}
.nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.nav a {
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--text-2);
  font-size: 14px;
}
.nav a:hover,
.nav a[aria-current='page'] {
  color: var(--text);
  background: var(--bg-hover);
  text-decoration: none;
}
.site-head .menu-btn {
  display: none;
  margin-left: auto;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--bg-raised);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 140ms var(--ease), border-color 140ms var(--ease), transform 140ms var(--ease);
}
.btn:hover {
  background: var(--bg-hover);
  border-color: var(--line-strong);
  text-decoration: none;
}
.btn:active {
  transform: translateY(1px);
}
.btn.primary {
  background: var(--accent);
  border-color: transparent;
  color: var(--accent-ink);
  font-weight: 600;
}
.btn.primary:hover {
  background: oklch(0.8 0.11 272);
}
.btn.sm {
  height: 34px;
  padding: 0 14px;
  font-size: 14px;
}
.btn svg {
  flex: none;
}

/* ---------- hero ---------- */

.hero {
  padding: clamp(56px, 9vw, 120px) 0 40px;
}
.hero h1 {
  margin: 0;
  max-width: 15ch;
  font-size: clamp(42px, 6.6vw, 92px);
  line-height: 1;
  letter-spacing: -0.042em;
  font-weight: 640;
}
.hero h1 .soft {
  color: var(--text-3);
}
.hero-lede {
  max-width: 58ch;
  margin: 28px 0 0;
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.55;
  color: var(--text-2);
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}
.hero-meta {
  margin-top: 18px;
  font-size: 14px;
  color: var(--text-3);
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- app replica ---------- */

.showcase {
  margin-top: clamp(40px, 6vw, 72px);
}
.appwin {
  border-radius: 14px;
  background: var(--bg);
  box-shadow: 0 0 0 1px var(--line), 0 40px 120px oklch(0.06 0.02 272 / 0.7), 0 0 0 9px oklch(0.205 0.007 265 / 0.6);
  overflow: hidden;
}
.aw-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13px;
}
.aw-field {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 380px;
  min-width: 0;
  height: 28px;
  padding: 0 10px;
  border-radius: 6px;
  background: var(--bg-sunken);
  box-shadow: inset 0 0 0 1px var(--line);
  font-family: var(--mono);
  font-size: 12.5px;
}
.aw-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 var(--ok);
  animation: live 1.6s var(--ease) infinite;
  flex: none;
}
@keyframes live {
  0% {
    box-shadow: 0 0 0 0 oklch(0.8 0.135 160 / 0.6);
  }
  100% {
    box-shadow: 0 0 0 8px oklch(0.8 0.135 160 / 0);
  }
}
.aw-chip {
  height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--text-2);
  white-space: nowrap;
}
.aw-chip.on {
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent-line);
  color: var(--accent);
}
.aw-body {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  min-height: 420px;
}
.aw-table {
  overflow-x: auto;
  padding: 6px 4px 10px 8px;
}
.aw-table table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 13px;
}
.aw-table th {
  height: 30px;
  padding: 0 8px;
  text-align: right;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-3);
  border-bottom: 1px solid var(--line-soft);
}
.aw-table th:nth-child(2),
.aw-table td:nth-child(2) {
  text-align: left;
}
.aw-table td {
  height: 32px;
  padding: 0 8px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.aw-table td:first-child {
  color: var(--text-3);
  width: 28px;
}
.aw-table .host {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.aw-table .host span {
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 12px;
  margin-left: 6px;
}
.aw-table tr.dest td:first-child span {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 18px;
  border-radius: 4px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}
.aw-table .loss-warn {
  color: var(--warn);
}
.aw-table .loss-bad {
  color: var(--bad);
  font-weight: 600;
}
.aw-table .muted {
  color: var(--text-4);
}
.dotc {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  vertical-align: 1px;
}
.spark {
  display: block;
}
.aw-map {
  position: relative;
  border-left: 1px solid var(--line-soft);
  background: #111217;
  min-height: 300px;
}
.aw-map svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.aw-map .sum {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  padding: 6px 10px;
  border-radius: 6px;
  background: oklch(0.17 0.006 265 / 0.86);
  box-shadow: 0 0 0 1px var(--line-soft);
  font-size: 12px;
  color: var(--text-2);
}
.aw-map .sum b {
  color: var(--text);
  font-weight: 600;
}
.aw-foot {
  display: flex;
  gap: 18px;
  height: 28px;
  align-items: center;
  padding: 0 14px;
  border-top: 1px solid var(--line-soft);
  background: var(--bg-sunken);
  font-size: 11.5px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
}

/* ---------- sections ---------- */

section {
  padding: clamp(72px, 10vw, 140px) 0 0;
}
.kicker {
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
  margin: 0 0 14px;
}
h2 {
  margin: 0;
  max-width: 22ch;
  font-size: clamp(32px, 4.2vw, 56px);
  line-height: 1.06;
  letter-spacing: -0.034em;
  font-weight: 620;
}
.lede {
  max-width: 62ch;
  margin: 20px 0 0;
  font-size: 18px;
  color: var(--text-2);
}
h3 {
  margin: 0 0 10px;
  font-size: 21px;
  line-height: 1.25;
  letter-spacing: -0.015em;
  font-weight: 600;
}
p {
  margin: 0 0 14px;
}

/* feature rows: text + visual, alternating */
.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding: clamp(40px, 6vw, 80px) 0;
  border-top: 1px solid var(--line-soft);
}
.feature:first-of-type {
  margin-top: 48px;
}
.feature.flip > :first-child {
  order: 2;
}
.feature p {
  color: var(--text-2);
  max-width: 54ch;
}
.feature ul {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  color: var(--text-2);
}
.feature li {
  position: relative;
  padding-left: 22px;
}
.feature li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 2px solid var(--accent);
}
.panel {
  border-radius: 12px;
  background: var(--bg-raised);
  box-shadow: 0 0 0 1px var(--line-soft);
  padding: 20px;
  overflow: hidden;
}

/* columns visual */
.cols {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 8px;
}
.col {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--bg-sunken);
}
.col b {
  display: block;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text);
}
.col span {
  font-size: 12.5px;
  color: var(--text-3);
  line-height: 1.35;
  display: block;
  margin-top: 2px;
}

/* physics visual */
.verdicts {
  display: grid;
  gap: 2px;
  font-size: 14px;
}
.v-row {
  display: grid;
  grid-template-columns: 18px 150px 1fr;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 6px;
  align-items: baseline;
}
.v-row.ok .m {
  color: var(--ok);
}
.v-row.no .m {
  color: var(--bad);
}
.v-row.no .pl {
  color: var(--text-3);
  text-decoration: line-through;
  text-decoration-color: oklch(0.67 0.19 27 / 0.6);
}
.v-row .why {
  grid-column: 3;
  font-size: 12.5px;
  color: var(--text-3);
}
.v-row .src {
  color: var(--text-2);
}
.formula {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--bg-sunken);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.7;
}
.formula b {
  color: var(--accent);
  font-weight: 500;
}

/* vpn path visual */
.vpnpath {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.vp-node {
  display: grid;
  justify-items: center;
  gap: 6px;
  text-align: center;
  color: var(--text-2);
}
.vp-node i {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.vp-node i.sq {
  border-radius: 3px;
  background: oklch(0.85 0.07 272);
}
.vp-node i.t {
  background: var(--ok);
  box-shadow: 0 0 0 4px oklch(0.8 0.135 160 / 0.2);
}
.vp-link {
  position: relative;
  height: 2px;
  background: var(--lat-0);
}
.vp-link.tunnel {
  background: repeating-linear-gradient(90deg, var(--accent) 0 8px, transparent 8px 13px);
}
.vp-link small {
  position: absolute;
  top: 8px;
  left: 0;
  right: 0;
  text-align: center;
  color: var(--text-3);
  font-size: 11.5px;
  white-space: nowrap;
}
.vp-rows {
  margin-top: 34px;
  display: grid;
  gap: 6px;
  font-size: 13px;
}
.vp-rows div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--bg-sunken);
}
.vp-rows div.t {
  background: var(--accent-soft);
}
.vp-rows span:last-child {
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

/* history visual */
.hist svg {
  display: block;
  width: 100%;
  height: auto;
}
.hist-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--text-3);
}

/* insights visual */
.insights {
  display: grid;
  gap: 6px;
}
.ins {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-2);
  background: var(--bg-sunken);
}
.ins b {
  color: var(--text);
  font-weight: 500;
}
.ins .i {
  font-weight: 700;
}
.ins.ok .i {
  color: var(--ok);
}
.ins.info .i {
  color: var(--text-3);
}
.ins.warn .i {
  color: var(--warn);
}
.ins.err {
  background: oklch(0.67 0.19 27 / 0.12);
}
.ins.err .i {
  color: var(--bad);
}

/* comparison */
.compare-wrap {
  margin-top: 40px;
  overflow-x: auto;
  border-radius: 12px;
  box-shadow: 0 0 0 1px var(--line-soft);
}
table.compare {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 14.5px;
}
.compare th,
.compare td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
.compare thead th {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-3);
  background: var(--bg-raised);
}
.compare thead th.us {
  color: var(--accent);
}
.compare td.us {
  background: oklch(0.76 0.115 272 / 0.06);
}
.compare tbody tr:last-child td {
  border-bottom: 0;
}
.y {
  color: var(--ok);
  font-weight: 600;
}
.n {
  color: var(--text-4);
}
.p {
  color: var(--warn);
}

/* limits */
.limits {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px 48px;
}
.limit h3 {
  font-size: 18px;
}
.limit p {
  color: var(--text-2);
  font-size: 15.5px;
}

/* privacy */
.netlist {
  margin-top: 36px;
  display: grid;
  gap: 2px;
}
.netrow {
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr auto;
  gap: 24px;
  padding: 16px 0;
  border-top: 1px solid var(--line-soft);
  align-items: baseline;
}
.netrow b {
  font-weight: 600;
}
.netrow p {
  margin: 0;
  color: var(--text-2);
  font-size: 15px;
}
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  background: var(--bg-active);
  color: var(--text-2);
}
.tag.ok {
  background: oklch(0.8 0.135 160 / 0.12);
  color: var(--ok);
}
.tag.warn {
  background: oklch(0.83 0.145 88 / 0.12);
  color: var(--warn);
}

/* install tabs */
.tabs {
  margin-top: 36px;
}
.tablist {
  display: inline-flex;
  padding: 3px;
  border-radius: 9px;
  background: var(--bg-sunken);
  box-shadow: inset 0 0 0 1px var(--line);
}
.tablist button {
  height: 34px;
  padding: 0 16px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-3);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.tablist button[aria-selected='true'] {
  background: var(--bg-active);
  color: var(--text);
}
.tabpanel {
  margin-top: 22px;
}
.steps {
  display: grid;
  gap: 18px;
  counter-reset: s;
  margin: 0;
  padding: 0;
  list-style: none;
}
.steps > li {
  counter-increment: s;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 14px;
}
.steps > li::before {
  content: counter(s);
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
}
.steps p {
  color: var(--text-2);
  margin-bottom: 10px;
}

/* faq */
.faq {
  margin-top: 36px;
  max-width: 860px;
}
.faq details {
  border-top: 1px solid var(--line-soft);
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 32px 18px 0;
  font-size: 17px;
  font-weight: 500;
  position: relative;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '+';
  position: absolute;
  right: 4px;
  top: 14px;
  font-size: 22px;
  color: var(--text-3);
  transition: transform 200ms var(--ease);
}
.faq details[open] summary::after {
  transform: rotate(45deg);
}
.faq details p {
  color: var(--text-2);
  max-width: 70ch;
  padding-bottom: 8px;
}

/* final */
.final {
  padding: clamp(80px, 12vw, 160px) 0 clamp(60px, 8vw, 100px);
}
.final h2 {
  max-width: 18ch;
}

.site-foot {
  border-top: 1px solid var(--line-soft);
  padding: 28px 0 calc(28px + env(safe-area-inset-bottom, 0px));
  color: var(--text-3);
  font-size: 13.5px;
}
.site-foot .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  justify-content: space-between;
}

/* ---------- docs ---------- */

.docs {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 56px;
  padding-top: 36px;
}
.toc {
  position: sticky;
  top: 76px;
  align-self: start;
  max-height: calc(100vh - 92px);
  overflow-y: auto;
  padding-bottom: 24px;
}
.toc input {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-sunken);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  outline: none;
}
.toc input:focus {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.toc ol {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 1px;
}
.toc a {
  display: block;
  padding: 5px 10px;
  border-radius: 6px;
  color: var(--text-3);
  font-size: 14px;
  line-height: 1.35;
}
.toc a:hover {
  color: var(--text);
  background: var(--bg-hover);
  text-decoration: none;
}
.toc a.active {
  color: var(--accent);
  background: var(--accent-soft);
}
.toc .sub a {
  padding-left: 22px;
  font-size: 13px;
}
.doc {
  max-width: 820px;
  padding-bottom: 120px;
}
.doc > header h1 {
  margin: 0;
  font-size: clamp(36px, 4.6vw, 60px);
  letter-spacing: -0.04em;
  line-height: 1.05;
  font-weight: 640;
}
.doc > header p {
  font-size: 18px;
  color: var(--text-2);
  max-width: 62ch;
  margin-top: 16px;
}
.doc section {
  padding: 56px 0 0;
}
.doc h2 {
  font-size: clamp(26px, 3vw, 34px);
  max-width: none;
  padding-top: 8px;
  margin-bottom: 18px;
}
.doc h3 {
  margin-top: 32px;
  font-size: 19px;
}
.doc p,
.doc li {
  color: var(--text-2);
}
.doc p strong,
.doc li strong {
  color: var(--text);
  font-weight: 600;
}
.doc ul,
.doc ol {
  padding-left: 22px;
  margin: 0 0 14px;
}
.doc li {
  margin-bottom: 6px;
}
.doc pre {
  margin: 14px 0 18px;
}
.tbl {
  margin: 16px 0 22px;
  overflow-x: auto;
  border-radius: 10px;
  box-shadow: 0 0 0 1px var(--line-soft);
}
.tbl table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 560px;
}
.tbl th,
.tbl td {
  padding: 9px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
.tbl th {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-3);
  background: var(--bg-raised);
  white-space: nowrap;
}
.tbl td {
  color: var(--text-2);
}
.tbl td:first-child {
  color: var(--text);
  white-space: nowrap;
}
.tbl tr:last-child td {
  border-bottom: 0;
}
.note {
  margin: 18px 0;
  padding: 14px 16px 14px 44px;
  border-radius: 10px;
  background: var(--accent-soft);
  position: relative;
  color: var(--text-2);
  font-size: 15px;
}
.note::before {
  content: 'i';
  position: absolute;
  left: 14px;
  top: 14px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 12px;
}
.note.warn {
  background: oklch(0.83 0.145 88 / 0.1);
}
.note.warn::before {
  content: '!';
  background: var(--warn);
}
.note p:last-child {
  margin-bottom: 0;
}
.doc .hidden-by-search {
  display: none;
}
.search-empty {
  display: none;
  padding: 40px 0;
  color: var(--text-3);
}

/* ---------- responsive ---------- */

@media (max-width: 1000px) {
  .aw-body {
    grid-template-columns: 1fr;
  }
  .aw-map {
    min-height: 320px;
    border-left: 0;
    border-top: 1px solid var(--line-soft);
  }
  .feature,
  .feature.flip {
    grid-template-columns: 1fr;
  }
  .feature.flip > :first-child {
    order: 0;
  }
  .docs {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .toc {
    position: static;
    max-height: none;
    margin-bottom: 20px;
  }
  .toc ol {
    display: none;
  }
  .toc.open ol {
    display: grid;
  }
}

@media (max-width: 940px) {
  .nav {
    display: none;
    position: absolute;
    top: calc(60px + env(safe-area-inset-top, 0px));
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 10px var(--gutter) 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--line-soft);
  }
  .nav.open {
    display: flex;
  }
  .site-head .menu-btn {
    display: inline-flex;
  }
  .site-head .head-cta {
    display: none;
  }
}

@media (max-width: 760px) {
  .netrow {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .vpnpath {
    grid-template-columns: 1fr;
    justify-items: start;
  }
  .vp-link {
    width: 2px;
    height: 28px;
    margin-left: 6px;
  }
  .vp-link.tunnel {
    background: repeating-linear-gradient(180deg, var(--accent) 0 8px, transparent 8px 13px);
  }
  .vp-link small {
    top: 6px;
    left: 14px;
    text-align: left;
  }
  .v-row {
    grid-template-columns: 18px 1fr;
  }
  .v-row .pl,
  .v-row .why {
    grid-column: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

.pre-wrap {
  position: relative;
  margin: 14px 0 18px;
}
.pre-wrap pre {
  margin: 0;
  padding-right: 120px;
}
.pre-wrap .copy {
  position: absolute;
  top: 8px;
  right: 8px;
  height: 28px;
  padding: 0 10px;
  font-size: 12.5px;
  opacity: 0;
  transition: opacity 140ms var(--ease);
}
.pre-wrap:hover .copy,
.pre-wrap .copy:focus-visible {
  opacity: 1;
}
@media (hover: none) {
  .pre-wrap .copy {
    opacity: 1;
  }
}
.aw-map .pulse {
  transform-box: fill-box;
  transform-origin: center;
  animation: ring 2.2s var(--ease) infinite;
}
@keyframes ring {
  0% {
    transform: scale(0.7);
    opacity: 0.9;
  }
  100% {
    transform: scale(2.4);
    opacity: 0;
  }
}
.toc-toggle {
  display: none;
  margin-top: 10px;
  width: 100%;
}
@media (max-width: 1000px) {
  .toc-toggle {
    display: inline-flex;
    justify-content: center;
  }
}
@media (max-width: 760px) {
  .aw-bar .aw-chip:not(.on) {
    display: none;
  }
  .aw-field {
    flex: 1 1 auto;
  }
}
