@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Space+Mono:wght@400;700&display=swap');

:root {
  --yellow: #FFE74D;
  --black: #050505;
  --muted: #666666;
  --line: #E8E8E4;
  --soft: #F7F7F2;
  --card: rgba(255, 255, 255, 0.88);
  --green: #27AE60;
  --shadow: 0 18px 70px rgba(0, 0, 0, 0.07);
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "Space Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--black);
  font-family: var(--sans);
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 231, 77, 0.24), transparent 34rem),
    linear-gradient(180deg, #fff 0%, #fbfbf8 48%, #f5f5ef 100%);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
:where(main, .footer) a:not(.button):not(.card) {
  color: var(--black);
  font-weight: 800;
  text-decoration-line: underline;
  text-decoration-color: rgba(255, 231, 77, .9);
  text-decoration-thickness: .12em;
  text-underline-offset: .18em;
  transition: color .15s ease, text-decoration-color .15s ease;
}
:where(main, .footer) a:not(.button):not(.card):hover {
  color: #000;
  text-decoration-color: currentColor;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  background: rgba(15, 15, 15, 0.72);
  color: #F5F5F5;
  backdrop-filter: blur(18px);
}
.nav {
  max-width: 1440px;
  margin: 0 auto;
  padding: 16px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.brand-logo { height: 25px; width: auto; display: block; color: #F5F5F5; }
html[data-theme="light"] .brand-logo { color: #0F0F0F; }
.brand-sub { font-family: var(--mono); font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: #9A9A9A; border-left: 1px solid #383838; padding-left: 12px; }
html[data-theme="light"] .brand-sub { color: #6A6A6A; border-left-color: rgba(15, 15, 15, .18); }
.nav-links { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nav-links a { font-family: var(--mono); font-size: 12px; color: #9A9A9A; padding: 8px 11px; border: 1px solid transparent; border-radius: 8px; }
.nav-links a:hover,
.nav-links a.active { color: var(--yellow); border-color: #383838; background: rgba(255, 255, 255, .04); }
html[data-theme="light"] .nav-links a { color: #555; }
html[data-theme="light"] .nav-links a:hover,
html[data-theme="light"] .nav-links a.active { color: #0F0F0F; border-color: rgba(255, 231, 77, .75); background: rgba(255, 231, 77, .22); }
.nav-links a.active::after { display: none; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.nav-status { display: inline-flex; align-items: center; gap: 8px; border: 1px solid #383838; border-radius: 999px; background: #161616; color: #9A9A9A; padding: 7px 10px !important; font-family: var(--mono); font-size: 11px; white-space: nowrap; }
html[data-theme="light"] .nav-status { border-color: rgba(15, 15, 15, .16); background: rgba(255, 255, 255, .55); color: #555; }
.nav-status::after { display: none; }
.nav-status span { width: 7px; height: 7px; border-radius: 50%; background: #999; }
.nav-status.ok span { background: var(--green); box-shadow: 0 0 0 5px rgba(39,174,96,.12); }
.nav-status.alert span { background: #FF4444; box-shadow: 0 0 0 5px rgba(255,68,68,.12); }
.nav-status strong { font-weight: 700; }
.theme-toggle { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 1px solid #383838; border-radius: 999px; background: #161616; color: #F5F5F5; cursor: pointer; font-size: 15px; }
html[data-theme="light"] .theme-toggle { border-color: rgba(15, 15, 15, .16); background: rgba(255, 255, 255, .55); color: #0F0F0F; }
.menu-toggle { display: none; width: 38px; height: 36px; border: 1px solid #383838; border-radius: 9px; background: #161616; color: #F5F5F5; place-items: center; padding: 8px; }
.menu-toggle span { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 999px; margin: 2px 0; }
html[data-theme="light"] .menu-toggle { border-color: rgba(15, 15, 15, .16); background: rgba(255, 255, 255, .55); color: #0F0F0F; }
.theme-sun { display: none; }
html[data-theme="light"] .theme-sun { display: inline; }
html[data-theme="light"] .theme-moon { display: none; }
.external-link { display: inline-flex; align-items: center; gap: 6px; }
.external-icon { width: 15px; height: 15px; stroke: currentColor; stroke-width: 2.25; fill: none; stroke-linecap: round; stroke-linejoin: round; transition: transform .18s ease; }
.external-link:hover .external-icon { transform: translate(3px, -3px); }
.card.external-link { display: block; position: relative; }
.card.external-link .external-icon { position: absolute; right: 24px; bottom: 24px; }
.card.external-link:hover .external-icon { transform: translate(3px, -3px); }

main { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 144px 24px 72px; }
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) 360px; gap: 40px; align-items: center; }
.hero-simple { display: block; max-width: 860px; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; font-family: var(--mono); font-size: 13px; color: #222; }
.dot { position: relative; width: 8px; height: 8px; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 6px rgba(39, 174, 96, 0.12); }
.dot::after { content: ""; position: absolute; inset: -10px; border-radius: 999px; background: rgba(39, 174, 96, 0.22); animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(.35); opacity: .9; } 80%, 100% { transform: scale(1.25); opacity: 0; } }
h1 { margin: 14px 0 16px; font-family: var(--mono); font-weight: 700; font-size: clamp(34px, 4.4vw, 56px); line-height: 1; letter-spacing: -0.045em; text-wrap: balance; }
h2 { margin: 0 0 10px; font-size: clamp(22px, 2.35vw, 32px); line-height: 1.12; letter-spacing: -0.035em; }
h3 { margin: 0 0 8px; font-size: 18px; line-height: 1.2; letter-spacing: -0.02em; }
.card h2 { font-size: clamp(20px, 1.8vw, 26px); line-height: 1.15; }
p { color: var(--muted); line-height: 1.65; margin: 0; }
.lede { max-width: 640px; font-size: 19px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button { display: inline-flex; align-items: center; justify-content: center; border-radius: 11px; padding: 11px 15px; font-size: 14px; font-weight: 700; border: 1px solid var(--black); background: var(--black); color: #fff; transition: transform .15s ease, box-shadow .15s ease; }
.button:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(0,0,0,.10); }
.button.yellow { background: var(--yellow); color: #000; border-color: var(--yellow); }
.button.light { background: #fff; color: #000; border-color: var(--line); }

.card { border: 1px solid var(--line); border-radius: 22px; background: var(--card); box-shadow: var(--shadow); padding: 24px; }
.panel { background: #0f0f0f; color: #fff; border-color: #222; }
.panel p { color: #aaa; }
.metric { display: grid; gap: 16px; }
.metric-row { display: flex; justify-content: space-between; gap: 20px; padding-bottom: 14px; border-bottom: 1px solid #272727; font-family: var(--mono); font-size: 13px; }
.metric-row:last-child { border-bottom: 0; padding-bottom: 0; }
.metric-row strong { color: var(--yellow); text-align: right; font-weight: 700; }

.section { margin-top: 76px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid.two { grid-template-columns: repeat(2, 1fr); }
.badge { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; border-radius: 999px; padding: 6px 10px; background: #fff; border: 1px solid var(--line); color: #333; margin-bottom: 16px; }
.code { font-family: var(--mono); background: var(--soft); border: 1px solid var(--line); border-radius: 9px; padding: 2px 6px; font-size: .92em; }
.status-list { display: grid; gap: 12px; margin-top: 18px; }
.status-item { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); padding-top: 14px; color: var(--muted); }
.status-item strong { color: var(--black); }
.prefix-list { margin-top: 18px; }
.prefix-table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 14px; }
.prefix-table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 560px; }
.prefix-table th, .prefix-table td { padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.prefix-table th { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); background: var(--soft); }
.prefix-table tr:last-child td { border-bottom: 0; }
.prefix-table td { font-size: 14px; }
.prefix-table td:first-child { font-family: var(--mono); font-weight: 700; overflow-wrap: anywhere; }
.prefix-table a { color: var(--black); font-weight: 800; text-decoration: underline; text-decoration-color: var(--yellow); text-underline-offset: 3px; }
.prefix-empty { border: 1px dashed var(--line); border-radius: 14px; padding: 18px; color: var(--muted); }
.lg-console { display: grid; gap: 18px; }
.lg-toolbar { display: grid; grid-template-columns: minmax(120px, .7fr) minmax(150px, .9fr) minmax(110px, .55fr) minmax(180px, 1fr) auto; gap: 12px; align-items: end; }
.lg-toolbar label { display: grid; gap: 7px; min-width: 0; }
.lg-toolbar label span { font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; }
.lg-toolbar input { width: 100%; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--black); font: 700 13px var(--mono); padding: 10px; }
.lg-toolbar input:disabled { opacity: .5; }
.lg-turnstile { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.lg-status { border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; color: var(--muted); background: var(--soft); font-size: 13px; }
.lg-status.ok { color: var(--green); border-color: rgba(39,174,96,.25); background: rgba(39,174,96,.08); }
.lg-status.error { color: #ff4444; border-color: rgba(255,68,68,.25); background: rgba(255,68,68,.08); }
.lg-results { display: grid; gap: 12px; }
.lg-summary { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--card); }
.lg-summary > div { display: grid; gap: 7px; padding: 14px; border-right: 1px solid var(--line); min-width: 0; }
.lg-summary > div:last-child { border-right: 0; }
.lg-summary span { color: var(--muted); font-family: var(--mono); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; }
.lg-summary strong { color: var(--black); font-size: 15px; overflow-wrap: anywhere; }
.lg-table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.lg-table { width: 100%; min-width: 980px; border-collapse: separate; border-spacing: 0; }
.lg-table th, .lg-table td { padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.lg-table tr:last-child td { border-bottom: 0; }
.lg-table th { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); background: var(--soft); white-space: nowrap; }
.lg-table td { font-size: 13px; color: var(--muted); }
.lg-table td strong { display: block; color: var(--black); font-weight: 800; }
.lg-table td > span:not(.lg-spark) { display: block; margin-top: 3px; }
.lg-table td.metric { color: var(--green); font: 800 13px var(--mono); white-space: nowrap; }
.lg-table td.metric.danger, .lg-table tr.error td.metric.danger { color: #ff4444; }
.lg-table tr.pending td { color: var(--muted); }
.lg-row-num { color: var(--muted) !important; font: 700 13px var(--mono) !important; }
.lg-spark { display: inline-flex !important; align-items: end; gap: 3px; height: 24px; min-width: 58px; margin-top: 0 !important; vertical-align: middle; }
.lg-spark i { display: block; width: 6px; height: 18px; border-radius: 999px; background: rgba(130, 130, 130, .14); }
.lg-spark i.active { background: var(--green); }
.lg-spark.danger i.active { background: #ff4444; }
.lg-detail-row td { padding-top: 0; background: rgba(0, 0, 0, .012); }
.lg-detail-row details { border-top: 1px solid var(--line); padding-top: 11px; }
.lg-table details { min-width: 160px; }
.lg-table summary { cursor: pointer; color: var(--black); font-weight: 800; }
.lg-table pre { margin: 10px 0 0; max-width: 560px; max-height: 280px; overflow: auto; white-space: pre-wrap; word-break: break-word; color: var(--black); font: 12px/1.55 var(--mono); }
.lg-table.route-table, .lg-table.trace-table { min-width: 760px; }
.lg-table.probe-table { min-width: 820px; }
.lg-table.route-table pre, .lg-table.trace-table pre { max-width: 1040px; }
.lg-summary small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; }
.lg-metrics-cell { min-width: 320px; }
.lg-chart-cell { width: 96px; }
.lg-ping-metrics { display: grid; grid-template-columns: repeat(5, minmax(54px, 1fr)); gap: 9px; max-width: 520px; }
.lg-ping-metrics div { display: grid; gap: 3px; min-width: 0; }
.lg-ping-metrics em { color: var(--muted); font: 700 10px var(--mono); letter-spacing: .12em; text-transform: uppercase; font-style: normal; }
.lg-ping-metrics strong { color: var(--green) !important; font: 800 13px var(--mono); white-space: nowrap; }
.lg-ping-metrics strong.danger { color: #ff4444 !important; }
.lg-detail-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 10px 0 12px; }
.lg-detail-metrics span { display: grid; gap: 4px; border: 1px solid var(--line); border-radius: 10px; padding: 9px; background: var(--soft); }
.lg-detail-metrics em { color: var(--muted); font: 700 10px var(--mono); letter-spacing: .12em; text-transform: uppercase; font-style: normal; }
.lg-detail-metrics strong { font: 800 14px var(--mono); }
.lg-hop-row td { padding-top: 10px; background: rgba(0, 0, 0, .012); }
.lg-hop-row .lg-hop-table { margin-top: 0; }
.lg-mini-table, .lg-hop-table { width: 100%; border-collapse: separate; border-spacing: 0; margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.lg-mini-table th, .lg-mini-table td, .lg-hop-table th, .lg-hop-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); font-size: 12px; }
.lg-mini-table tr:last-child td, .lg-hop-table tr:last-child td { border-bottom: 0; }
.lg-mini-table th, .lg-hop-table th { background: var(--soft); color: var(--muted); font: 700 10px var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.lg-hop-table td:nth-child(2), .lg-mini-table td:first-child { font-family: var(--mono); color: var(--black); }
.lg-hop-table td strong { font-size: 12px; }
.lg-hop-table td span { margin-top: 2px !important; }
.lg-raw { margin-top: 12px; }
.lg-raw > span { display: block; color: var(--muted); font: 700 10px var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.lg-raw pre { max-width: none; width: 100%; }
.lg-result { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--soft); }
.lg-result.error { border-color: rgba(255,68,68,.28); }
.lg-result > div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.lg-result strong { font-family: var(--mono); }
.lg-result span { color: var(--muted); font-size: 13px; text-align: right; }
.lg-result pre { margin: 0; padding: 14px; overflow: auto; white-space: pre-wrap; word-break: break-word; color: var(--black); font: 12px/1.55 var(--mono); max-height: 420px; }
.status-map-card { display: grid; gap: 22px; }
.status-map { min-height: 430px; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: linear-gradient(180deg, #fff, var(--soft)); color: var(--muted); display: grid; place-items: center; }
.status-rsm-map { width: 100%; height: 100%; min-height: 430px; }
.status-country { fill: rgba(0, 0, 0, .045); stroke: rgba(0, 0, 0, .14); stroke-width: .45; }
.status-marker-ring { fill: none; stroke: var(--yellow); stroke-width: 2.25; opacity: .86; }
.status-marker-dot { fill: var(--green); stroke: #fff; stroke-width: 3; }
.status-marker.degraded .status-marker-dot { fill: #ff4444; }
.status-marker.unknown .status-marker-dot { fill: #f5a623; }
.status-marker-label { font-family: var(--mono); font-size: 14px; font-weight: 700; fill: var(--black); paint-order: stroke; stroke: #fff; stroke-width: 5; stroke-linejoin: round; }
.pop-status-list { display: grid; grid-template-columns: 1fr; gap: 0; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--soft); }
.pop-status-item { border-bottom: 1px solid var(--line); padding: 15px 16px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; background: transparent; }
.pop-status-item:last-child { border-bottom: 0; }
.pop-status-item > div { display: grid; grid-template-columns: minmax(190px, .55fr) minmax(0, 1fr); align-items: center; gap: 16px; }
.pop-status-item strong { display: block; font-family: var(--mono); font-size: 14px; color: var(--black); }
.pop-status-item span { display: block; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.pop-status-item em { font-style: normal; font-weight: 800; font-size: 12px; color: var(--green); border: 1px solid rgba(39, 174, 96, .22); border-radius: 999px; padding: 6px 10px; background: rgba(39, 174, 96, .08); }
.pop-status-item.degraded em { color: #ff4444; border-color: rgba(255, 68, 68, .22); background: rgba(255, 68, 68, .08); }
.pop-status-item.unknown em { color: #f5a623; border-color: rgba(245, 166, 35, .24); background: rgba(245, 166, 35, .08); }
.contact-list { display: grid; gap: 12px; margin-top: 18px; }
.contact-row { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.contact-row span { color: var(--muted); }
.contact-row a, .contact-row strong { font-weight: 800; }
.policy-list { display: grid; gap: 14px; margin: 18px 0 0; padding: 0; list-style: none; color: var(--muted); line-height: 1.6; }
.policy-list li { border-top: 1px solid var(--line); padding-top: 14px; }
.footer { margin-top: auto; border-top: 1px solid var(--line); padding: 28px 24px; color: var(--muted); font-size: 14px; }
.footer-inner { max-width: 1080px; margin: 0 auto; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

html[data-theme="dark"] {
  --black: #f5f5f5;
  --muted: #a8a8a8;
  --line: #2c2c2c;
  --soft: #191919;
  --card: rgba(24, 24, 24, 0.9);
  --shadow: 0 18px 70px rgba(0, 0, 0, 0.32);
  color-scheme: dark;
}
html[data-theme="dark"] body {
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 231, 77, 0.12), transparent 34rem),
    linear-gradient(180deg, #0f0f0f 0%, #111 50%, #0a0a0a 100%);
}
html[data-theme="light"] .header { border-bottom-color: rgba(15, 15, 15, .12); background: rgba(247, 247, 242, .42); color: var(--black); }
html[data-theme="dark"] :where(main, .footer) a:not(.button):not(.card):hover { color: var(--yellow); }
html[data-theme="dark"] .button.light { background: #151515; color: #f5f5f5; border-color: var(--line); }
html[data-theme="dark"] .button:not(.yellow):not(.light) { background: #f5f5f5; color: #0f0f0f; border-color: #f5f5f5; }
html[data-theme="dark"] .card { background: var(--card); }
html[data-theme="dark"] .code { background: #151515; border-color: var(--line); }
html[data-theme="dark"] .status-map { background: #101010; }
html[data-theme="dark"] .status-country { fill: rgba(255, 255, 255, .06); stroke: rgba(255, 255, 255, .18); }
html[data-theme="dark"] .status-marker-dot { stroke: #0f0f0f; }
html[data-theme="dark"] .status-marker-label { stroke: #0f0f0f; }
html[data-theme="dark"] .pop-status-list { background: #151515; }

@media (max-width: 840px) {
  .hero, .grid, .grid.two, .pop-status-list, .pop-status-item, .pop-status-item > div { grid-template-columns: 1fr; }
  .lg-summary { grid-template-columns: 1fr 1fr; }
  .lg-summary > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .lg-toolbar { grid-template-columns: 1fr; }
  .lg-ping-metrics { grid-template-columns: repeat(2, minmax(72px, 1fr)); }
  .hero-simple { max-width: none; }
  .nav { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .menu-toggle { display: grid; }
  .nav-links, .top-actions { display: none; grid-column: 1 / -1; width: 100%; flex-wrap: wrap; }
  .header.open .nav-links, .header.open .top-actions { display: flex; }
  main { padding-top: 170px; }
}

/* Management dashboard */
.brand-word { font-weight: 900; letter-spacing: -.04em; font-size: 21px; }
.manage-page main.manage-main { max-width: 1360px; }
.manage-hero { max-width: 960px; }
.manage-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.manage-meta span { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 7px 10px; color: var(--muted); font-family: var(--mono); font-size: 11px; }
.manage-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat-card { display: grid; gap: 8px; min-height: 128px; }
.stat-card span { color: var(--muted); font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; }
.stat-card strong { font-size: clamp(25px, 3vw, 38px); line-height: 1; letter-spacing: -.055em; overflow-wrap: anywhere; }
.stat-card em { font-style: normal; color: var(--muted); font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.manage-grid { grid-template-columns: minmax(0, 1.4fr) minmax(360px, .8fr); align-items: stretch; }
.manage-map-card, .traffic-chart-card { min-width: 0; }
.card-heading-row, .section-heading-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 18px; }
.card-heading-row p, .section-heading-row p { max-width: 720px; }
.manage-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toggle-pill { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 999px; padding: 9px 11px; color: var(--muted); font-family: var(--mono); font-size: 12px; white-space: nowrap; }
.toggle-pill input { accent-color: var(--yellow); }
.select-control { border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--black); font: 700 13px var(--mono); padding: 9px 10px; }
.manage-map { min-height: 520px; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: linear-gradient(180deg, #fff, var(--soft)); color: var(--muted); display: grid; place-items: center; }
.manage-rsm-map { width: 100%; height: 100%; min-height: 520px; }
.traffic-map-link-base { fill: none; stroke: rgba(30, 144, 255, .16); stroke-linecap: round; }
.traffic-map-link { fill: none; stroke-linecap: round; stroke-dasharray: 1 12; filter: drop-shadow(0 0 7px rgba(30, 144, 255, .36)); animation: trafficDash var(--dash-seconds, 5s) linear infinite; }
.traffic-map-link.idle { stroke: rgba(90, 160, 255, .42); }
.traffic-map-link.cool { stroke: #30A8FF; }
.traffic-map-link.warm { stroke: #8C5CFF; }
.traffic-map-link.hot { stroke: #FF4FD8; filter: drop-shadow(0 0 11px rgba(255, 79, 216, .45)); }
@keyframes trafficDash { to { stroke-dashoffset: -130; } }
.traffic-link-label text { text-anchor: middle; font-family: var(--mono); font-size: 10px; font-weight: 800; fill: #168BE8; paint-order: stroke; stroke: #fff; stroke-width: 4; stroke-linejoin: round; }
.traffic-link-label text + text { fill: #8C5CFF; font-size: 8px; font-weight: 700; }
.backend-marker-box { fill: var(--yellow); stroke: #111; stroke-width: 2.5; }
.backend-marker.degraded .backend-marker-box { fill: #ff4444; }
.backend-marker-label, .backend-marker-sub { font-family: var(--mono); font-weight: 900; fill: var(--black); paint-order: stroke; stroke: #fff; stroke-width: 5; stroke-linejoin: round; }
.backend-marker-label { font-size: 14px; }
.backend-marker-sub { font-size: 9px; font-weight: 700; }
.traffic-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 10px; margin-top: 14px; }
.legend-link { display: grid; grid-template-columns: 34px auto; grid-template-areas: "line code" "line bits" "line source"; align-items: center; gap: 2px 10px; border: 1px solid var(--line); border-radius: 14px; padding: 10px; background: var(--soft); }
.legend-link span { grid-area: line; display: block; width: 34px; border-radius: 999px; background: #30A8FF; box-shadow: 0 0 10px rgba(48,168,255,.35); }
.legend-link.warm span { background: #8C5CFF; }
.legend-link.hot span { background: #FF4FD8; }
.legend-link strong { grid-area: code; font-family: var(--mono); font-size: 13px; }
.legend-link em { grid-area: bits; font-style: normal; color: var(--muted); font-size: 12px; }
.legend-link small { grid-area: source; color: var(--muted); font-family: var(--mono); font-size: 10px; }
.traffic-chart { min-height: 350px; border: 1px solid var(--line); border-radius: 18px; background: var(--soft); display: grid; place-items: center; overflow: hidden; }
.traffic-chart svg { width: 100%; height: auto; display: block; }
.chart-grid line { stroke: var(--line); stroke-width: 1; }
.chart-grid text, .chart-axis-label { fill: var(--muted); font-family: var(--mono); font-size: 11px; text-anchor: end; }
.chart-axis-label { text-anchor: start; }
.chart-axis-label.end { text-anchor: end; }
.chart-line { fill: none; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 6px 10px rgba(0,0,0,.10)); }
.chart-line.rx { stroke: #30A8FF; }
.chart-line.tx { stroke: #8C5CFF; }
.chart-legend { display: flex; gap: 14px; flex-wrap: wrap; padding: 0 18px 16px; margin-top: -8px; font-family: var(--mono); font-size: 12px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); }
.chart-legend span::before { content: ""; width: 10px; height: 10px; border-radius: 999px; background: currentColor; }
.chart-legend .rx { color: #30A8FF; }
.chart-legend .tx { color: #8C5CFF; }
.chart-empty { padding: 24px; color: var(--muted); }
.pop-ops-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.pop-op-card { display: grid; gap: 14px; align-content: start; }
.pop-op-card.degraded { border-color: rgba(255,68,68,.35); }
.pop-op-card.unknown { border-color: rgba(245,166,35,.35); }
.pop-op-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.pop-code { display: inline-flex; font-family: var(--mono); font-weight: 900; color: #000; background: var(--yellow); border-radius: 8px; padding: 4px 7px; margin-bottom: 9px; }
.pop-op-card h3 { margin: 0 0 4px; }
.pop-op-card p { font-size: 12px; overflow-wrap: anywhere; }
.state-badge { border-radius: 999px; padding: 6px 9px; font-size: 11px; font-weight: 900; color: var(--green); background: rgba(39,174,96,.09); border: 1px solid rgba(39,174,96,.24); }
.state-badge.degraded { color: #ff4444; background: rgba(255,68,68,.08); border-color: rgba(255,68,68,.26); }
.state-badge.unknown { color: #f5a623; background: rgba(245,166,35,.08); border-color: rgba(245,166,35,.26); }
.pop-traffic-row, .instance-row { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 12px; color: var(--muted); font-size: 12px; }
.pop-traffic-row strong, .instance-row strong { color: var(--black); text-align: right; }
.check-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.check-pill { display: inline-grid; gap: 2px; border: 1px solid var(--line); border-radius: 10px; padding: 6px 7px; background: var(--soft); min-width: 76px; }
.check-pill em { font-style: normal; color: var(--muted); font-size: 9px; font-family: var(--mono); text-transform: uppercase; }
.check-pill strong { font-size: 11px; color: var(--black); }
.check-pill.ok { border-color: rgba(39,174,96,.25); }
.check-pill.degraded { border-color: rgba(255,68,68,.28); }
.check-pill.unknown { border-color: rgba(245,166,35,.28); }
.pop-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.button:disabled { opacity: .45; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.service-list, .action-list, .runbook-list { display: grid; gap: 12px; margin-top: 18px; }
.service-item { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; border: 1px solid var(--line); border-radius: 14px; padding: 13px; background: var(--soft); }
.service-item strong, .service-item span { display: block; }
.service-item span { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.service-item em { font-style: normal; font-weight: 900; color: var(--green); font-size: 12px; }
.service-item.degraded em { color: #ff4444; }
.service-checks { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 7px; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.action-result { color: var(--muted); font-size: 13px; }
.runbook-list h3 { margin-top: 8px; }
.runbook-item { display: grid; gap: 7px; border-top: 1px solid var(--line); padding-top: 12px; }
.runbook-item span { font-weight: 800; }
.runbook-item code { display: block; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); overflow-x: auto; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.runbook-item button { justify-self: start; border: 1px solid var(--line); border-radius: 9px; background: var(--card); color: var(--black); padding: 7px 9px; font-weight: 800; cursor: pointer; }
.aup-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; background: rgba(0,0,0,.55); backdrop-filter: blur(10px); }
.aup-modal[hidden] { display: none; }
.aup-dialog { max-width: 520px; display: grid; gap: 18px; }
.aup-check { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); line-height: 1.5; }
.aup-check input { margin-top: 4px; accent-color: var(--yellow); }
html[data-theme="dark"] .manage-map { background: #101010; }
html[data-theme="dark"] .traffic-link-label text, html[data-theme="dark"] .backend-marker-label, html[data-theme="dark"] .backend-marker-sub { stroke: #0f0f0f; }
html[data-theme="dark"] .backend-marker-box { stroke: #f5f5f5; }
html[data-theme="dark"] .traffic-chart { background: #151515; }

@media (max-width: 1180px) {
  .manage-stats, .pop-ops-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .manage-grid { grid-template-columns: 1fr; }
}
@media (max-width: 840px) {
  .manage-stats, .pop-ops-grid { grid-template-columns: 1fr; }
  .card-heading-row, .section-heading-row { display: grid; }
  .manage-map, .manage-rsm-map { min-height: 380px; }
}
