:root {
  color-scheme: light;
  --bg-a: #667eea;
  --bg-b: #764ba2;
  --surface: #ffffff;
  --surface-soft: #f8f9fa;
  --surface-glass: rgba(255, 255, 255, 0.82);
  --text: #152033;
  --muted: #667085;
  --line: rgba(21, 32, 51, 0.12);
  --accent: #667eea;
  --accent-strong: #5a67d8;
  --cyan: #0ea5e9;
  --green: #28a745;
  --warning: #ff9800;
  --shadow: 0 16px 45px rgba(0, 0, 0, 0.16);
  --small-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
  color-scheme: dark;
  --surface: #101827;
  --surface-soft: #172033;
  --surface-glass: rgba(15, 23, 42, 0.78);
  --text: #f8fafc;
  --muted: #b8c0cc;
  --line: rgba(255, 255, 255, 0.12);
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
  --small-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background:
    linear-gradient(135deg, var(--bg-a) 0%, var(--bg-b) 100%),
    #667eea;
  min-height: 100vh;
  color: var(--text);
}

a {
  color: inherit;
}

.main-content {
  transition: all 0.3s ease;
}

body.blur-active .main-content {
  filter: blur(12px);
  pointer-events: none;
  user-select: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 16px 20px 0;
}

.nav {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: var(--surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: var(--small-shadow);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-width: max-content;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  color: white;
  font-weight: 800;
}

.brand small,
.brand strong {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

.nav-links a {
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-actions {
  display: flex;
  gap: 8px;
}

.icon-button,
.refresh-controls button {
  border: 0;
  cursor: pointer;
  color: white;
  background: var(--accent);
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
}

.icon-button {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.icon-button:hover,
.refresh-controls button:hover {
  transform: translateY(-2px);
  background: var(--accent-strong);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.hero {
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  align-items: center;
  gap: 34px;
  padding: 44px 0 54px;
}

.hero-copy {
  color: white;
}

.eyebrow,
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(54px, 8vw, 104px);
  line-height: 0.98;
  margin: 16px 0;
}

.hero p,
.lead {
  font-size: 18px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.82);
  max-width: 620px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  border-radius: 8px;
  padding: 0 18px;
  text-decoration: none;
  font-weight: 700;
}

.button.primary {
  background: white;
  color: #25345c;
}

.button.secondary {
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: white;
  background: rgba(255, 255, 255, 0.12);
}

.hero-visual {
  background: rgba(12, 18, 32, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-visual svg {
  display: block;
  width: 100%;
  min-height: 420px;
}

.map-line {
  fill: none;
  stroke: url("#linkGradient");
  stroke-width: 3;
  stroke-linecap: round;
  opacity: 0.72;
}

.map-line.strong {
  stroke-width: 5;
}

.map-line.soft {
  stroke-width: 2;
  stroke-dasharray: 8 10;
  opacity: 0.48;
}

.map-grid {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 1;
}

.map-ring {
  fill: url("#coreGlow");
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 2;
}

.map-ring.thin {
  fill: none;
  stroke-dasharray: 6 10;
}

.node circle {
  fill: rgba(255, 255, 255, 0.1);
  stroke: rgba(255, 255, 255, 0.65);
  stroke-width: 2;
}

.node.core circle {
  fill: rgba(102, 126, 234, 0.28);
  stroke: #38bdf8;
}

.node.region circle {
  fill: rgba(74, 222, 128, 0.14);
  stroke: rgba(74, 222, 128, 0.78);
}

.node.small-node circle {
  fill: rgba(255, 255, 255, 0.12);
  stroke: rgba(167, 139, 250, 0.74);
}

.node text {
  text-anchor: middle;
  dominant-baseline: middle;
  fill: white;
  font-size: 18px;
  font-weight: 800;
}

.node .muted {
  fill: rgba(255, 255, 255, 0.66);
  font-size: 14px;
  font-weight: 600;
}

.small-node text {
  font-size: 14px;
}

.edge-label {
  fill: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.packet circle {
  fill: #4ade80;
  filter: drop-shadow(0 0 10px rgba(74, 222, 128, 0.8));
}

.packet.p1 {
  offset-path: path("M126 126 C230 82 306 92 380 196 S560 278 642 154");
  animation: packetMove 6s linear infinite;
}

.packet.p2 {
  offset-path: path("M126 384 C240 316 304 342 380 250 S564 196 642 376");
  animation: packetMove 7s linear infinite reverse;
}

@keyframes packetMove {
  to {
    offset-distance: 100%;
  }
}

.section {
  margin-bottom: 30px;
}

.section-heading {
  color: white;
  margin-bottom: 16px;
}

.section-copy {
  max-width: 760px;
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.6;
}

.section-heading h2,
.split h2,
.footer-grid h2 {
  color: white;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  margin-top: 6px;
}

.stats-grid,
.feature-grid,
.tool-grid,
.status-summary {
  display: grid;
  gap: 20px;
}

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

.status-summary {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin-bottom: 20px;
}

.stat-card,
.feature-card,
.tool-card,
.panel,
.ops-card,
.legal-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--small-shadow);
}

.stat-card {
  padding: 20px;
  text-align: center;
}

.stat-card i,
.feature-card i,
.tool-card i,
.panel-title i {
  color: var(--accent);
  font-size: 24px;
}

.stat-card span {
  display: block;
  color: var(--muted);
  margin-top: 8px;
}

.stat-number {
  display: block;
  font-size: 2.5em;
  font-weight: 800;
  margin: 10px 0;
}

.compact-stat .stat-number {
  font-size: 2em;
}

.stat-number.good {
  color: var(--green);
}

.stat-number.warn {
  color: var(--warning);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  gap: 20px;
  align-items: stretch;
}

.operations-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.36fr);
  gap: 20px;
  align-items: start;
}

.panel {
  padding: 20px;
}

.glass-panel {
  background: var(--surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.panel-title h2 {
  font-size: 24px;
  line-height: 1.15;
}

.status-panel-title {
  justify-content: space-between;
  flex-wrap: wrap;
}

.source-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  font-size: 12px;
  font-weight: 800;
}

.service-list {
  display: grid;
  gap: 18px;
}

.service-group {
  display: grid;
  gap: 10px;
}

.group-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text);
}

.group-heading h3 {
  font-size: 18px;
}

.group-heading span {
  display: inline-grid;
  place-items: center;
  min-width: 32px;
  height: 28px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-weight: 800;
  font-size: 12px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  box-shadow: var(--small-shadow);
  transition: transform 0.3s, box-shadow 0.3s;
}

.service-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.service-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 10px;
}

.service-card p {
  color: var(--muted);
  line-height: 1.45;
  min-height: 40px;
}

.service-header h3,
.service-header h4 {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 17px;
}

.service-header i {
  color: var(--accent);
}

.status-card-maintenance {
  border-left: 4px solid #0ea5e9;
}

.status-card-degraded,
.status-card-down {
  border-left: 4px solid var(--warning);
}

.service-meta {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
}

.service-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.service-meta i {
  color: var(--accent);
  width: 14px;
}

.service-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.service-actions a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 11px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
}

.service-actions a:first-child {
  background: var(--accent);
  color: white;
}

.status-badge {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
}

.status-operational {
  background: #d4edda;
  color: #155724;
}

.status-degraded {
  background: #fff3cd;
  color: #856404;
}

.status-down {
  background: #f8d7da;
  color: #721c24;
}

.status-maintenance {
  background: #d1ecf1;
  color: #0c5460;
}

.response-time {
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
}

.incident-panel {
  position: sticky;
  top: 96px;
}

.incident-card {
  background: linear-gradient(135deg, #fff3cd, #ffe8a1);
  border-left: 6px solid var(--warning);
  color: #2f2500;
  padding: 18px;
  display: flex;
  gap: 14px;
  animation: pulseWarning 2s infinite;
}

.incident-card i {
  color: #b86600;
  font-size: 28px;
  margin-top: 3px;
}

.incident-detail {
  border-radius: 12px;
  padding: 16px;
  background: linear-gradient(135deg, #fff3cd, #ffe8a1);
  color: #2f2500;
  border-left: 5px solid var(--warning);
}

.incident-detail + .incident-detail {
  margin-top: 12px;
}

.incident-detail h3 {
  margin: 8px 0;
}

.incident-detail p {
  line-height: 1.5;
}

.incident-detail small {
  display: block;
  margin-top: 10px;
  color: rgba(47, 37, 0, 0.72);
}

.severity {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(255, 152, 0, 0.2);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.quiet-state {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 8px;
  padding: 28px 18px;
  border-radius: 12px;
  background: var(--surface-soft);
}

.quiet-state i {
  color: var(--green);
  font-size: 30px;
}

.quiet-state p,
.muted-text {
  color: var(--muted);
  line-height: 1.55;
}

@keyframes pulseWarning {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 152, 0, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(255, 152, 0, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 152, 0, 0);
  }
}

.update-info {
  background: var(--surface-soft);
  border-radius: 8px;
  padding: 15px;
  margin-top: 20px;
  text-align: center;
}

.countdown-timer {
  font-size: 2em;
  font-weight: 800;
  color: var(--accent);
  margin: 10px 0;
}

.last-update {
  color: var(--muted);
  font-size: 14px;
}

.auto-refresh-badge {
  display: inline-flex;
  align-items: center;
  background: var(--green);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
}

.refresh-controls {
  margin-top: 10px;
}

.refresh-controls button {
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 650;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

.live-badge {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--green);
  border-radius: 50%;
  margin-right: 5px;
  animation: pulse 2s infinite;
}

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

.feature-card {
  padding: 22px;
}

.feature-card h3 {
  margin: 14px 0 8px;
}

.feature-card p,
.ops-card p,
.legal-section p {
  color: var(--muted);
  line-height: 1.6;
}

.prefix-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.3fr) 1fr;
  gap: 18px;
  align-items: start;
  margin-top: 20px;
  padding: 22px;
  border-radius: 12px;
  background: var(--surface-glass);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--small-shadow);
}

.prefix-panel h3 {
  color: white;
  font-size: 28px;
  margin-top: 6px;
}

.prefix-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.prefix-list a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 800;
}

.ops-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.ops-card {
  padding: 22px;
  position: relative;
  overflow: hidden;
}

.ops-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
}

.ops-card i {
  color: var(--accent);
  font-size: 24px;
}

.ops-card h3 {
  margin: 12px 0 8px;
}

.lead {
  color: rgba(255, 255, 255, 0.84);
}

.peering-list {
  display: grid;
  gap: 12px;
  align-content: center;
}

.peering-list div {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--small-shadow);
}

.peering-list i {
  color: var(--green);
}

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

.tool-card {
  min-height: 118px;
  display: grid;
  place-items: center;
  gap: 10px;
  text-decoration: none;
  text-align: center;
  font-weight: 800;
  transition: transform 0.2s, box-shadow 0.2s;
}

.tool-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr minmax(230px, 0.45fr);
  gap: 20px;
}

.legal-links {
  display: grid;
  gap: 12px;
}

.legal-links a {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  box-shadow: var(--small-shadow);
}

.legal-section {
  padding: 22px;
}

.legal-section h2 {
  margin-bottom: 10px;
}

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

.legal-content article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.legal-content h3 {
  margin-bottom: 10px;
  font-size: 16px;
}

.legal-content p {
  color: var(--muted);
  line-height: 1.65;
}

.legal-content a {
  color: var(--accent);
  font-weight: 700;
}

.admin-link {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  background: var(--accent);
  color: white;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  z-index: 100;
  box-shadow: var(--small-shadow);
}

.privacy-banner-overlay {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 20px;
  pointer-events: none;
}

.privacy-banner {
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 20px 30px;
  max-width: 550px;
  width: 100%;
  box-shadow: 0 20px 35px -12px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  pointer-events: auto;
  animation: slideUp 0.4s ease-out;
  text-align: center;
}

.privacy-banner-overlay.is-hidden {
  display: none;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.privacy-banner .icon {
  font-size: 32px;
  margin-bottom: 12px;
  color: #95a4ff;
}

.privacy-banner h3 {
  color: white;
  font-size: 1.1rem;
  margin-bottom: 8px;
  font-weight: 600;
}

.privacy-banner p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.85rem;
  margin-bottom: 15px;
  line-height: 1.4;
}

.privacy-banner .button-group {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.privacy-banner .btn-link,
.privacy-banner .btn-accept {
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.3s;
}

.privacy-banner .btn-link {
  background: rgba(102, 126, 234, 0.2);
  color: #9ca9ff;
  text-decoration: none;
  padding: 8px 20px;
  border: 1px solid rgba(102, 126, 234, 0.3);
}

.privacy-banner .btn-link:hover,
.privacy-banner .btn-accept:hover {
  transform: translateY(-2px);
}

.privacy-banner .btn-accept {
  background: var(--accent);
  color: white;
  border: none;
  padding: 8px 25px;
  cursor: pointer;
}

@media (max-width: 920px) {
  .nav {
    align-items: flex-start;
  }

  .nav-links {
    display: none;
  }

  .hero,
  .split,
  .footer-grid,
  .operations-layout,
  .prefix-panel {
    grid-template-columns: 1fr;
  }

  .incident-panel {
    position: static;
  }

  .hero {
    min-height: auto;
    padding-top: 50px;
  }

  .hero-visual svg {
    min-height: 320px;
  }

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

@media (max-width: 768px) {
  .site-header {
    padding: 10px 10px 0;
  }

  main {
    padding: 14px;
  }

  .service-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .countdown-timer {
    font-size: 1.5em;
  }

  .button,
  .hero-actions {
    width: 100%;
  }

  .button {
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .brand small {
    display: none;
  }

  .hero h1 {
    font-size: clamp(44px, 15vw, 66px);
  }

  .privacy-banner {
    padding: 15px 20px;
  }

  .privacy-banner .button-group {
    flex-direction: column;
  }

  .privacy-banner .btn-link,
  .privacy-banner .btn-accept {
    width: 100%;
    text-align: center;
  }
}
