:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #eef3f8;
  --ink: #17212f;
  --muted: #526174;
  --subtle: #6d7b8c;
  --line: #d8e0ea;
  --line-strong: #bac7d5;
  --accent: #176d75;
  --accent-strong: #0f4f57;
  --dc: #136f63;
  --dr: #9a5b10;
  --warn: #925321;
  --radius: 8px;
  --sidebar: 292px;
  --shadow: 0 12px 32px -26px rgba(18, 35, 54, 0.55);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.55;
}

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

code {
  background: #edf4f7;
  border: 1px solid #d5e3e8;
  border-radius: 5px;
  color: #16323a;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.9em;
  padding: 0.05rem 0.32rem;
}

.skip {
  left: -999px;
  position: absolute;
  top: 0.75rem;
}

.skip:focus {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  left: 0.75rem;
  padding: 0.55rem 0.75rem;
  z-index: 99;
}

.sidebar {
  background: #122330;
  border-right: 1px solid #0a1721;
  color: #eaf2f8;
  display: flex;
  flex-direction: column;
  height: 100vh;
  left: 0;
  overflow-y: auto;
  position: fixed;
  top: 0;
  width: var(--sidebar);
}

.brand {
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
  display: flex;
  gap: 0.8rem;
  padding: 1.1rem 1rem;
}

.brand-mark {
  align-items: center;
  background: #d9f2ef;
  border-radius: 8px;
  color: #0f4f57;
  display: flex;
  font-size: 0.78rem;
  font-weight: 800;
  height: 40px;
  justify-content: center;
  letter-spacing: 0.04em;
  width: 48px;
}

.brand-title {
  font-weight: 750;
}

.brand-sub,
.sidebar-note {
  color: #b7c6d3;
  font-size: 0.82rem;
}

.nav {
  display: grid;
  gap: 0.18rem;
  padding: 0.8rem;
}

.nav a {
  border-left: 3px solid transparent;
  border-radius: 6px;
  color: #d4e0e8;
  padding: 0.5rem 0.7rem;
  text-decoration: none;
}

.nav a:hover,
.nav a:focus,
.nav a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.08);
  border-left-color: #9ad6d0;
  color: #ffffff;
  outline: none;
}

.sidebar-note {
  border-top: 1px solid rgba(255, 255, 255, 0.11);
  margin-top: auto;
  padding: 0.9rem 1rem;
}

.content {
  margin-left: var(--sidebar);
  max-width: 1180px;
  padding: 2rem 2.25rem 4rem;
}

.page-header {
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.25rem;
  padding-bottom: 1.35rem;
}

.eyebrow,
.section-kicker,
.metric-label {
  color: var(--accent-strong);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  margin: 0;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  color: var(--ink);
  line-height: 1.18;
  margin: 0;
}

h1 {
  font-size: 2.15rem;
  letter-spacing: -0.02em;
  margin-top: 0.35rem;
}

.page-header p {
  color: var(--muted);
  font-size: 1.02rem;
  margin: 0.8rem 0 0;
  max-width: 74ch;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 1rem 0;
  padding: 1.25rem;
}

.section-head {
  margin-bottom: 0.95rem;
}

.section-head h2 {
  font-size: 1.35rem;
  margin-top: 0.2rem;
}

.status-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.metric {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem;
}

.metric strong {
  display: block;
  font-size: 1.35rem;
  margin: 0.15rem 0;
}

.metric span:last-child {
  color: var(--subtle);
  display: block;
  font-size: 0.88rem;
}

.topology {
  align-items: stretch;
  display: grid;
  gap: 0.9rem;
  grid-template-columns: 1fr 0.55fr 1fr;
  margin-bottom: 1rem;
}

.site,
.link {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem;
}

.site {
  background: #f4fbf9;
}

.site.standby {
  background: #fff8ef;
}

.site-label {
  color: var(--muted);
  display: block;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 0.45rem;
  text-transform: uppercase;
}

.node {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  margin: 0.55rem 0;
  padding: 0.75rem;
}

.node.primary {
  border-color: #a6d6cf;
}

.node strong,
.node span {
  display: block;
}

.node span {
  color: var(--subtle);
  font-size: 0.9rem;
  margin-top: 0.1rem;
}

.link {
  align-items: center;
  background: #f0f4f8;
  color: var(--muted);
  display: flex;
  font-weight: 700;
  justify-content: center;
  text-align: center;
}

.plain-list {
  color: var(--muted);
  margin: 0.5rem 0 0;
  padding-left: 1.15rem;
}

.plain-list li {
  margin: 0.35rem 0;
}

.cards {
  display: grid;
  gap: 0.85rem;
}

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

.cards.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.detail-grid,
.page-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.page-card {
  background: #fbfdff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  display: block;
  min-height: 126px;
  padding: 1rem;
  text-decoration: none;
}

.page-card:hover,
.page-card:focus {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  outline: none;
}

.page-card strong,
.page-card span {
  display: block;
}

.page-card strong {
  color: var(--ink);
  font-size: 1.02rem;
  margin-bottom: 0.35rem;
}

.card {
  background: #fbfdff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
}

.card.compact p {
  margin-bottom: 0;
}

.card-title {
  align-items: center;
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.pill {
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 0.18rem 0.55rem;
  text-transform: uppercase;
}

.pill.dc {
  background: #dff4ef;
  color: var(--dc);
}

.pill.dr {
  background: #fff0db;
  color: var(--dr);
}

dl {
  display: grid;
  gap: 0.3rem 0.8rem;
  grid-template-columns: 130px 1fr;
  margin: 0.85rem 0 0;
}

dl.wide {
  grid-template-columns: 185px 1fr;
}

dt {
  color: var(--subtle);
  font-weight: 700;
}

dd {
  margin: 0;
}

table {
  border-collapse: collapse;
  margin: 0.5rem 0 1rem;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 0.68rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--subtle);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

td {
  color: var(--muted);
}

.steps {
  counter-reset: item;
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.steps li {
  border-left: 3px solid #c8d9e2;
  color: var(--muted);
  margin: 0.6rem 0;
  padding: 0.15rem 0 0.15rem 0.85rem;
}

.callout {
  background: #fff8ec;
  border: 1px solid #eed2a7;
  border-radius: var(--radius);
  color: #583714;
  margin-top: 0.85rem;
  padding: 0.85rem 1rem;
}

.command {
  background: #10212d;
  border-radius: var(--radius);
  color: #e8f3f6;
  overflow-x: auto;
  padding: 1rem;
}

.command code {
  background: transparent;
  border: 0;
  color: inherit;
  padding: 0;
}

.next-link {
  margin: 1rem 0 0;
}

.roadmap {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.roadmap article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem;
}

.roadmap span {
  align-items: center;
  background: var(--accent);
  border-radius: 50%;
  color: #ffffff;
  display: inline-flex;
  font-weight: 800;
  height: 28px;
  justify-content: center;
  margin-bottom: 0.6rem;
  width: 28px;
}

.roadmap p,
.card p,
.panel > p {
  color: var(--muted);
}

.page-footer {
  color: var(--subtle);
  font-size: 0.9rem;
  padding: 1rem 0 0;
}

body.not-found .content {
  margin-left: 0;
}

@media (max-width: 980px) {
  :root {
    --sidebar: 248px;
  }

  .content {
    padding: 1.5rem;
  }

  .status-grid,
  .cards.three,
  .roadmap,
  .page-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 720px) {
  .sidebar {
    height: auto;
    position: relative;
    width: 100%;
  }

  .content {
    margin-left: 0;
    padding: 1rem;
  }

  h1 {
    font-size: 1.75rem;
  }

  .status-grid,
  .cards.two,
  .cards.three,
  .roadmap,
  .detail-grid,
  .page-grid {
    grid-template-columns: 1fr;
  }

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

  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}
