:root {
  --bg: #0b1220;
  --panel: #111b2b;
  --panel-2: #0f1a2a;
  --panel-3: #0a1322;
  --text: #e8eef7;
  --muted: #a9b7ca;
  --soft: #d7e2f1;
  --line: #253348;
  --line-2: #34465f;
  --blue: #67b7ff;
  --blue-2: #2f7ab8;
  --good-bg: #d7f7e4;
  --good: #0f5132;
  --warn-bg: #fff0bd;
  --warn: #70480f;
  --bad-bg: #ffd9dc;
  --bad: #842029;
  --shadow: 0 18px 50px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
.site-header {
  padding: 20px clamp(20px, 4vw, 64px) 42px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #0e1726 0%, #0b1220 100%);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 34px;
}
.brand {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .01em;
  color: var(--soft);
}
.nav-links {
  display: flex;
  gap: 18px;
  font-size: 14px;
  color: var(--muted);
}
.nav-links a:hover { color: var(--text); }
.intro { max-width: 980px; padding-top: 14px; }
.label {
  color: #9cc9ef;
  text-transform: uppercase;
  letter-spacing: .11em;
  font-size: 12px;
  font-weight: 700;
  margin: 0 0 10px;
}
h1, h2, h3 { color: var(--text); }
h1 {
  font-size: clamp(38px, 5.4vw, 66px);
  line-height: 1.03;
  letter-spacing: -.035em;
  font-weight: 750;
  margin: 0 0 18px;
  max-width: 1040px;
}
h2 {
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.12;
  letter-spacing: -.025em;
  font-weight: 720;
  margin: 0 0 14px;
}
h3 {
  font-size: 18px;
  line-height: 1.25;
  font-weight: 700;
  margin: 0 0 10px;
}
p { color: var(--muted); margin-top: 0; }
.lede { font-size: clamp(17px, 1.7vw, 20px); max-width: 830px; }
.status-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}
.status-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(17, 27, 43, .86);
  padding: 15px 16px;
}
.status-card strong {
  display: block;
  font-size: 25px;
  letter-spacing: -.02em;
  color: var(--text);
}
.status-card span { display: block; color: var(--muted); font-size: 14px; margin-top: 3px; }
main { padding: 28px clamp(20px, 4vw, 64px) 72px; }
.panel {
  background: linear-gradient(180deg, rgba(17, 27, 43, .96), rgba(15, 25, 40, .96));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(22px, 3vw, 36px);
  margin-bottom: 22px;
  box-shadow: var(--shadow);
}
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.section-note { max-width: 450px; margin: 0; }
.two-column {
  display: grid;
  grid-template-columns: minmax(320px, .92fr) minmax(420px, 1.08fr);
  gap: 24px;
  align-items: stretch;
}
.work-grid, .tools-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.work-item, .tool-item, .detail-card, .command-card {
  border: 1px solid var(--line-2);
  background: rgba(10, 19, 34, .55);
  border-radius: 14px;
  padding: 17px;
}
.work-item strong, .tool-item strong { display: block; color: var(--text); font-weight: 700; }
.work-item small, .tool-item small { color: var(--muted); display: block; margin-top: 7px; line-height: 1.5; }
.topology-card { border: 1px solid var(--line-2); border-radius: 14px; background: var(--panel-3); overflow: hidden; min-height: 440px; }
#topologySvg { width: 100%; min-height: 610px; display: block; }
.detail-card { margin-top: 20px; }
.detail-card dl { display: grid; grid-template-columns: 118px 1fr; gap: 8px 12px; margin: 0; }
.detail-card dt { color: var(--muted); }
.detail-card dd { margin: 0; color: var(--soft); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line-2); border-radius: 14px; background: rgba(10, 19, 34, .38); }
table { width: 100%; border-collapse: collapse; min-width: 920px; }
th, td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: #9cc9ef; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; background: rgba(10, 19, 34, .62); }
tr:last-child td { border-bottom: none; }
td { color: var(--soft); }
.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid rgba(255,255,255,.08);
}
.badge.allowed, .badge.pass { color: var(--good); background: var(--good-bg); }
.badge.blocked, .badge.fail { color: var(--bad); background: var(--bad-bg); }
.badge.inspected, .badge.warn, .badge.planned { color: var(--warn); background: var(--warn-bg); }
.finding-list { display: grid; gap: 10px; margin-top: 18px; }
.finding { border: 1px solid var(--line-2); border-radius: 14px; padding: 14px; background: rgba(10, 19, 34, .52); }
.finding strong { display: block; margin: 8px 0 4px; color: var(--text); }
.finding p { margin-bottom: 0; }
.command-card { background: #0c1728; }
pre { overflow-x: auto; margin: 12px 0 0; padding: 16px; background: #070d18; color: #e7edf7; border: 1px solid var(--line); border-radius: 12px; font-size: 13px; }
code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; }
.plain-list { color: var(--muted); line-height: 1.75; padding-left: 20px; }
footer { padding: 24px clamp(20px, 4vw, 64px); border-top: 1px solid var(--line); background: #0b1220; }
footer p { margin: 0; font-size: 14px; }

/* Topology SVG */
.region-box { fill: rgba(17, 27, 43, .45); stroke: #253a56; stroke-width: 1.4; stroke-dasharray: 5 5; }
.region-label { fill: #9cc9ef; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.node { cursor: pointer; }
.node rect { fill: #172234; stroke: #435872; stroke-width: 1.4; }
.node.selected rect { stroke: var(--blue); stroke-width: 3; fill: #1a2b42; }
.node text { fill: var(--text); font-weight: 740; font-size: 17px; }
.node .subtext { fill: var(--muted); font-size: 13px; font-weight: 600; }
.link { stroke: #3d6f9c; stroke-width: 3; fill: none; opacity: .82; }
.link.inspection { stroke: #e0b75b; stroke-dasharray: 7 7; }
.link.cross-region { stroke: #8ac7ff; stroke-width: 3.2; stroke-dasharray: 10 8; }
.link.replication { stroke: #75d9b6; stroke-width: 2.4; stroke-dasharray: 4 7; }
.core { fill: #18314f; stroke: var(--blue); stroke-width: 2; }
.core.secondary { fill: #172a42; stroke: #8ac7ff; }
.core-text { fill: var(--text); font-weight: 800; font-size: 20px; }
.core-subtext { fill: var(--muted); font-size: 13px; font-weight: 700; }
.link-label { fill: #c6d8ec; font-size: 13px; font-weight: 700; }
.link-label.muted { fill: var(--muted); }
.legend rect { fill: rgba(10, 19, 34, .7); stroke: var(--line-2); stroke-width: 1.2; }
.legend text { fill: var(--soft); font-size: 13px; font-weight: 650; }
.legend-title { fill: #9cc9ef !important; font-size: 13px !important; font-weight: 800 !important; letter-spacing: .06em; text-transform: uppercase; }
.legend-line { stroke-width: 3; fill: none; }
.legend-line.standard { stroke: #3d6f9c; }
.legend-line.inspection { stroke: #e0b75b; stroke-dasharray: 7 7; }
.legend-line.cross-region { stroke: #8ac7ff; stroke-dasharray: 10 8; }
.legend-line.replication { stroke: #75d9b6; stroke-dasharray: 4 7; }

@media (max-width: 980px) {
  .nav-links { display: none; }
  .status-row, .two-column, .work-grid, .tools-grid { grid-template-columns: 1fr; }
  .section-heading { display: block; }
  h1 { font-size: clamp(34px, 10vw, 50px); }
  #topologySvg { min-height: 460px; }
}
