:root {
  --bg: #f6f8fb;
  --bg-accent: #edf3f8;
  --panel: rgba(255, 255, 255, 0.96);
  --panel-soft: #f8fbfd;
  --panel-strong: #ffffff;
  --border: rgba(125, 147, 166, 0.22);
  --border-strong: rgba(125, 147, 166, 0.34);
  --text: #13232d;
  --muted: #637582;
  --accent: #186d67;
  --accent-strong: #0f5752;
  --accent-soft: rgba(24, 109, 103, 0.10);
  --danger: #a03c48;
  --danger-soft: rgba(160, 60, 72, 0.10);
  --warn: #986126;
  --warn-soft: rgba(152, 97, 38, 0.12);
  --ok: #2f7a4a;
  --ok-soft: rgba(47, 122, 74, 0.10);
  --shadow: 0 18px 44px rgba(19, 35, 45, 0.05);
  --shadow-soft: 0 8px 24px rgba(19, 35, 45, 0.04);
  --radius: 22px;
  --radius-sm: 16px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  line-height: 1.55;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.98), transparent 34%),
    radial-gradient(circle at top right, rgba(216, 235, 244, 0.65), transparent 26%),
    linear-gradient(180deg, #fbfdff 0%, var(--bg) 100%);
}

a {
  color: var(--accent);
}

code,
.mono,
textarea {
  font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
}

.page-shell {
  width: min(1680px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 18px;
}

.brand-block h1 {
  margin: 0;
  font-family: "IBM Plex Serif", Georgia, serif;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 0.98;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.brand-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 7px 12px;
  border: 1px solid rgba(125, 147, 166, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
}

.brand-subtitle {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-soft);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.nav a,
.nav button,
.ghost-button,
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  text-decoration: none;
  font: inherit;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
  overflow-wrap: anywhere;
}

.nav a,
.ghost-button {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
}

.nav a.active {
  border-color: rgba(24, 109, 103, 0.16);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.nav button,
.primary-button {
  border: 1px solid transparent;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 26px rgba(24, 109, 103, 0.18);
}

.nav a:hover,
.ghost-button:hover {
  border-color: var(--border-strong);
  background: #fff;
}

.nav button:hover,
.primary-button:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
}

.layout-stack {
  display: grid;
  gap: 18px;
}

.grid {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  gap: 18px;
}

.sites-layout {
  grid-template-columns: minmax(360px, 460px) minmax(0, 1fr);
}

.panel,
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel {
  padding: 22px;
}

.section-gap {
  margin-top: 18px;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 253, 0.98)),
    var(--panel);
}

.hero h2,
.panel h2 {
  margin: 0;
  font-family: "IBM Plex Serif", Georgia, serif;
  font-size: clamp(26px, 3vw, 32px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.hero p,
.panel p,
.small {
  color: var(--muted);
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.legend-item::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(125, 147, 166, 0.4);
}

.legend-item.vpn::before {
  background: #1f8f87;
}

.legend-item.direct::before {
  background: #d57b42;
}

.legend-item.neutral::before {
  background: rgba(125, 147, 166, 0.35);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: stretch;
  gap: 10px;
}

.hero-actions form {
  display: flex;
}

.routing-policy-banner {
  display: grid;
  grid-template-columns: minmax(320px, 1.5fr) repeat(2, minmax(190px, 0.55fr));
  align-items: stretch;
  gap: 14px;
  margin-bottom: 18px;
  padding: 20px;
  border: 1px solid rgba(24, 109, 103, 0.22);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.92), transparent 42%),
    linear-gradient(135deg, rgba(24, 109, 103, 0.13), rgba(213, 123, 66, 0.08));
  box-shadow: var(--shadow);
}

.routing-policy-copy {
  align-self: center;
  padding: 4px 8px;
}

.routing-policy-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.routing-policy-kicker span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #2f9a5d;
  box-shadow: 0 0 0 5px rgba(47, 154, 93, 0.12);
}

.routing-policy-copy h2 {
  margin: 0;
  font-family: "IBM Plex Serif", Georgia, serif;
  font-size: clamp(23px, 2.3vw, 31px);
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.routing-policy-copy p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.routing-policy-copy code {
  color: var(--text);
}

.routing-route-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(125, 147, 166, 0.18);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.82);
}

.routing-route-card.direct {
  border-color: rgba(213, 123, 66, 0.22);
  background: rgba(255, 250, 245, 0.9);
}

.routing-route-card.upstream {
  border-color: rgba(24, 109, 103, 0.18);
}

.routing-route-card > span,
.routing-route-card small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.routing-route-card > span {
  margin-bottom: 5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.routing-route-card strong {
  font-size: 17px;
}

.routing-route-card code {
  margin: 2px 0 5px;
  color: var(--text);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.stat-card {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--panel-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.stat-label {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stat-value {
  font-family: "IBM Plex Serif", Georgia, serif;
  font-size: 30px;
  line-height: 1.02;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

.stat-note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.notice-stack,
.form-stack,
.meta-stack {
  display: grid;
  gap: 12px;
}

.notice {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel-strong);
  line-height: 1.5;
}

.notice.ok {
  border-color: rgba(47, 122, 74, 0.18);
  background: var(--ok-soft);
  color: var(--ok);
}

.notice.info {
  border-color: rgba(24, 109, 103, 0.16);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.notice.warn {
  border-color: rgba(152, 97, 38, 0.18);
  background: var(--warn-soft);
  color: var(--warn);
}

label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 14px;
  background: #fff;
  color: var(--text);
  font: inherit;
  line-height: 1.5;
  box-shadow: inset 0 1px 2px rgba(19, 35, 45, 0.02);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: rgba(24, 109, 103, 0.42);
  box-shadow:
    0 0 0 4px rgba(24, 109, 103, 0.08),
    inset 0 1px 2px rgba(19, 35, 45, 0.02);
}

textarea {
  min-height: 112px;
  resize: vertical;
  overflow-wrap: anywhere;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(125, 147, 166, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
}

table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: auto;
}

.service-table {
  table-layout: fixed;
}

.service-table .col-service {
  width: 22%;
}

.service-table .col-history {
  width: 16%;
}

.service-table .col-vpn,
.service-table .col-direct {
  width: 21%;
}

.service-table .col-details {
  width: 20%;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(125, 147, 166, 0.14);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(248, 251, 253, 0.96);
}

th.section {
  background: rgba(24, 109, 103, 0.06);
  color: var(--accent-strong);
}

.service {
  font-weight: 700;
  white-space: normal;
}

.service-name {
  margin-bottom: 8px;
}

.service-host {
  margin-bottom: 8px;
}

.prod-route-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.prod-route-pill.vpn {
  border-color: rgba(31, 143, 135, 0.18);
  background: rgba(31, 143, 135, 0.10);
  color: #136a63;
}

.prod-route-pill.direct {
  border-color: rgba(213, 123, 66, 0.20);
  background: rgba(213, 123, 66, 0.10);
  color: #a15a2a;
}

.prod-route-check,
.badge-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

.badge-list,
.preview-grid {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.preview-grid {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  max-width: 100%;
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

.badge.is-prod-route {
  gap: 7px;
  min-height: 34px;
  padding-inline: 12px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.badge.up {
  border-color: rgba(47, 122, 74, 0.14);
  background: var(--ok-soft);
  color: var(--ok);
}

.badge.warn {
  border-color: rgba(152, 97, 38, 0.16);
  background: var(--warn-soft);
  color: var(--warn);
}

.badge.down {
  border-color: rgba(160, 60, 72, 0.14);
  background: var(--danger-soft);
  color: var(--danger);
}

.preview-trigger {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.preview-tile {
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 20px rgba(19, 35, 45, 0.05);
}

.preview-tile.is-prod-route {
  border-color: rgba(24, 109, 103, 0.24);
  box-shadow:
    0 12px 24px rgba(19, 35, 45, 0.06),
    0 0 0 2px rgba(24, 109, 103, 0.07);
}

.preview-thumb-wrap {
  display: block;
  border: 1px solid rgba(125, 147, 166, 0.18);
  border-radius: 12px;
  overflow: hidden;
  background: #f2f6fa;
}

.preview-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #f2f6fa;
}

.preview-thumb.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 16 / 10;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  padding: 12px;
}

.preview-caption {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.preview-card {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 10px);
  z-index: 40;
  width: min(680px, calc(100vw - 40px));
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 28px 60px rgba(19, 35, 45, 0.18);
}

.preview-trigger:hover .preview-card {
  display: block;
}

.preview-card img {
  display: block;
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border: 1px solid rgba(125, 147, 166, 0.18);
  border-radius: 12px;
  background: #f2f6fa;
}

.preview-missing {
  display: none;
  padding: 12px;
  border-radius: 12px;
  background: #f4f7fa;
  color: var(--muted);
  font-size: 12px;
}

.preview-missing-inline {
  display: block;
}

.preview-meta {
  display: block;
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 11px;
  line-height: 1.45;
}

.preview-meta.fresh {
  background: var(--ok-soft);
  color: var(--ok);
}

.preview-meta.stale {
  background: var(--warn-soft);
  color: var(--warn);
}

.preview-url {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.service-table .service-cell {
  min-width: 0;
}

.service-table .service-cell code {
  display: inline-block;
  white-space: normal;
}

.service-table .history-cell {
  min-width: 0;
}

.service-table .status-cell {
  min-width: 0;
}

.service-table .summary-cell {
  min-width: 0;
}

.summary {
  display: grid;
  gap: 4px;
  min-width: 0;
  font-size: 12px;
}

.contour-empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.details-stack {
  display: grid;
  gap: 10px;
}

.kv {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.k {
  min-width: 58px;
  color: var(--muted);
}

.inspect {
  margin-top: 9px;
}

.inspect summary {
  cursor: pointer;
  color: var(--accent);
  font-size: 12px;
  font-weight: 500;
}

.summary-panel {
  min-width: 0;
}

.summary-toggle {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  list-style: none;
}

.summary-toggle::-webkit-details-marker {
  display: none;
}

.summary-panel[open] .summary-toggle {
  margin-bottom: 10px;
  background: var(--accent-soft);
  border-color: rgba(24, 109, 103, 0.16);
}

.summary-note {
  margin-top: 10px;
}

.probe-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.probe-item {
  padding: 11px 12px;
  border: 1px solid rgba(125, 147, 166, 0.14);
  border-radius: 14px;
  background: rgba(248, 251, 253, 0.95);
}

.probe-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.probe-head strong,
.probe-note,
.probe-meta,
.meta,
.muted-code,
code {
  overflow-wrap: anywhere;
}

.probe-meta,
.probe-note,
.meta,
.small {
  color: var(--muted);
}

.client {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(125, 147, 166, 0.14);
}

.client h3,
.meta {
  overflow-wrap: anywhere;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.owner-form {
  margin-top: 12px;
}

.owner-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 4px;
}

.owner-form .owner-limit {
  font-weight: 500;
  font-size: 12px;
  color: var(--muted);
  margin-left: 6px;
}

.owner-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.owner-controls select {
  min-width: 200px;
}

.public-user .page-shell {
  max-width: 720px;
}

.public-user .client textarea {
  min-height: 120px;
}

.public-user .link-row {
  gap: 8px;
}

.split-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.checkbox-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  margin-bottom: 0;
}

.checkbox-pill input {
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  box-shadow: none;
}

.compact-badges {
  gap: 6px;
}

.danger-button {
  border-color: rgba(160, 60, 72, 0.18);
  color: var(--danger);
}

.danger-button:hover {
  border-color: rgba(160, 60, 72, 0.3);
  background: rgba(160, 60, 72, 0.06);
}

.route-form {
  display: grid;
  gap: 8px;
  min-width: 132px;
}

.history-chart {
  display: grid;
  gap: 8px;
}

.history-chart svg {
  display: block;
  width: min(100%, 220px);
  height: 70px;
  border: 1px solid rgba(125, 147, 166, 0.16);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(246, 248, 251, 0.96)),
    #fff;
}

.history-axis,
.history-grid {
  stroke: rgba(125, 147, 166, 0.18);
  stroke-width: 1;
}

.history-grid {
  stroke-dasharray: 3 4;
}

.history-line {
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.history-line.vpn,
.history-dot.vpn {
  stroke: #1f8f87;
  fill: #ffffff;
}

.history-line.direct,
.history-dot.direct {
  stroke: #d57b42;
  fill: #ffffff;
}

.history-dot {
  stroke-width: 2;
}

.history-meta,
.history-samples {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.history-samples {
  flex-wrap: wrap;
}

.history-empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 22px;
}

.auth-card {
  width: min(460px, 100%);
  padding: 30px;
}

.auth-title {
  margin: 0 0 8px;
  font-family: "IBM Plex Serif", Georgia, serif;
  font-size: clamp(30px, 4vw, 38px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.auth-form {
  margin-top: 18px;
}

.form-actions {
  margin-top: 4px;
}

.form-actions .primary-button {
  width: 100%;
}

.docs-surface {
  padding: 20px 22px 26px;
}

.docs-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.docs-meta .muted-code {
  border-radius: 14px;
}

.docs-content {
  color: var(--text);
}

.docs-content > :first-child {
  margin-top: 0;
}

.docs-content h1,
.docs-content h2,
.docs-content h3 {
  margin: 0 0 14px;
  font-family: "IBM Plex Serif", Georgia, serif;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.docs-content h1 {
  font-size: clamp(36px, 4vw, 44px);
}

.docs-content h2 {
  margin-top: 34px;
  padding-top: 16px;
  border-top: 1px solid rgba(125, 147, 166, 0.14);
  font-size: 25px;
}

.docs-content h3 {
  margin-top: 20px;
  font-size: 18px;
}

.docs-content p,
.docs-content li {
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.docs-content ul,
.docs-content ol {
  padding-left: 22px;
}

.docs-content .lede {
  max-width: 920px;
  color: var(--muted);
  font-size: 17px;
}

.docs-content .pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin: 0 8px 10px 0;
  padding: 0 12px;
  border: 1px solid rgba(24, 109, 103, 0.10);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.docs-content .note,
.docs-content .warn,
.docs-content .panel {
  margin-top: 16px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: none;
}

.docs-content .note {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.docs-content .warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.docs-content .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.docs-content .kv {
  display: block;
  margin: 0;
}

.docs-content .kv dt {
  margin-bottom: 6px;
  color: var(--muted);
  font-weight: 700;
}

.docs-content .kv dd {
  margin: 0 0 12px;
}

.docs-content code {
  padding: 1px 6px;
  border-radius: 8px;
  background: rgba(19, 35, 45, 0.05);
  font-size: 0.95em;
}

.docs-content pre {
  overflow-x: auto;
  padding: 15px 16px;
  border: 1px solid rgba(19, 35, 45, 0.06);
  border-radius: 16px;
  background: #f4f7fa;
  color: #17232d;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.docs-content table {
  min-width: 100%;
  margin-top: 16px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.84);
  table-layout: auto;
}

.docs-content th {
  background: rgba(248, 251, 253, 0.96);
  color: var(--accent-strong);
}

.docs-content .muted {
  color: var(--muted);
}

.muted-code {
  display: inline-block;
  max-width: 100%;
  padding: 5px 9px;
  border: 1px solid rgba(125, 147, 166, 0.14);
  border-radius: 999px;
  background: rgba(248, 251, 253, 0.94);
  color: var(--text);
  white-space: normal;
}

.docs-raw-shell {
  max-width: 1180px;
}

.docs-content-raw {
  padding: 8px 0 24px;
}

@media (max-width: 1100px) {
  .routing-policy-banner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .routing-policy-copy {
    grid-column: 1 / -1;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .sites-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1400px) {
  .table-wrap {
    overflow: visible;
    border: none;
    background: transparent;
  }

  .service-table {
    min-width: 0;
  }

  .service-table thead {
    display: none;
  }

  .service-table tbody {
    display: grid;
    gap: 16px;
  }

  .service-table .group-row,
  .service-table .service-row,
  .service-table .group-row th,
  .service-table .service-row td {
    display: block;
    width: 100%;
  }

  .service-table .group-row th.section {
    padding: 8px 2px 2px;
    border: none;
    background: transparent;
    color: var(--accent-strong);
  }

  .service-table .service-row {
    padding: 18px;
    border: 1px solid rgba(125, 147, 166, 0.16);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-soft);
  }

  .service-table .service-row td {
    min-width: 0;
    padding: 0;
    border: none;
  }

  .service-table .service-row td + td {
    margin-top: 16px;
  }

  .service-table .service-row td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  .service-table .service-cell,
  .service-table .history-cell,
  .service-table .status-cell,
  .service-table .summary-cell {
    min-width: 0;
  }

  .service-table .status-cell {
    width: 100%;
  }

  .service-table .summary-cell {
    width: 100%;
  }

  .preview-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 20px, 100%);
    padding: 18px 0 28px;
  }

  .page-header,
  .hero {
    flex-direction: column;
  }

  .hero {
    padding: 22px 18px;
  }

  .hero-actions {
    width: 100%;
    justify-content: stretch;
  }

  .hero-actions form {
    width: 100%;
  }

  .hero-actions .ghost-button,
  .hero-actions .primary-button {
    flex: 1 1 auto;
  }

  .topbar,
  .nav {
    align-items: stretch;
  }

  .nav a,
  .nav button {
    flex: 1 1 100%;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .routing-policy-banner {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .routing-policy-copy {
    grid-column: auto;
    padding: 2px;
  }

  .docs-surface,
  .panel,
  .auth-card {
    padding: 18px;
  }

  .service-table .status-cell,
  .service-table .summary-cell,
  .service-table .history-cell {
    min-width: 180px;
  }

  .preview-grid {
    grid-template-columns: 1fr;
  }

  .preview-card {
    left: auto;
    right: 0;
    width: min(88vw, 560px);
  }

  .split-fields {
    grid-template-columns: 1fr;
  }
}
