:root {
  color-scheme: dark;
  --bg: #07100e;
  --surface: rgba(17, 29, 26, .78);
  --surface-strong: #12201c;
  --line: rgba(255, 255, 255, .085);
  --text: #f4f7f5;
  --muted: #84948e;
  --green: #66f2a6;
  --blue: #69b6ff;
  --violet: #a98cff;
  --orange: #ffad68;
  --danger: #ff6b73;
  --radius: 22px;
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% -10%, rgba(45, 114, 85, .18), transparent 42%),
    linear-gradient(180deg, #091310 0%, var(--bg) 38%, #060c0b 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
.ambient { position: fixed; border-radius: 50%; filter: blur(90px); pointer-events: none; opacity: .12; }
.ambient-one { width: 280px; height: 280px; top: 18%; right: -170px; background: var(--green); }
.ambient-two { width: 240px; height: 240px; top: 62%; left: -170px; background: var(--blue); }
.shell { width: min(1180px, 100%); margin: 0 auto; padding: max(22px, env(safe-area-inset-top)) 18px max(28px, env(safe-area-inset-bottom)); }
.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 44px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; letter-spacing: .08em; }
.brand > span:last-child { display: flex; flex-direction: column; line-height: 1; }
.brand strong { font-size: 13px; font-weight: 800; }
.brand small { margin-top: 4px; color: var(--green); font-size: 8px; font-weight: 800; letter-spacing: .25em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid rgba(102, 242, 166, .38); border-radius: 11px; transform: rotate(45deg); }
.brand-mark span { width: 10px; height: 10px; border: 2px solid var(--green); border-radius: 3px; }
.sync { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.sync-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.sync-dot.online { background: var(--green); box-shadow: 0 0 0 5px rgba(102, 242, 166, .08), 0 0 18px rgba(102, 242, 166, .7); }

.hero { min-height: 320px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 28px; padding: 56px 4px 34px; }
.eyebrow { margin: 0 0 12px; color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: .2em; }
h1 { max-width: 690px; margin: 0; font-size: clamp(44px, 8vw, 82px); line-height: .96; letter-spacing: -.055em; }
h1 span { color: var(--green); }
.hero-copy { max-width: 540px; margin: 24px 0 0; color: #9aa8a3; font-size: clamp(15px, 2vw, 18px); line-height: 1.6; }
.hero-orbit { position: relative; display: grid; place-items: center; width: 180px; height: 180px; }
.orbit-ring { position: absolute; inset: 0; border: 1px solid rgba(102, 242, 166, .24); border-radius: 50%; box-shadow: inset 0 0 46px rgba(102, 242, 166, .05); }
.orbit-ring::before { content: ""; position: absolute; top: 17px; left: 22px; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 15px var(--green); }
.orbit-core { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 112px; height: 112px; border-radius: 50%; background: rgba(102, 242, 166, .07); border: 1px solid rgba(102, 242, 166, .18); }
.orbit-core span { font-size: 28px; font-weight: 750; letter-spacing: -.04em; }
.orbit-core small { margin-top: 6px; color: var(--green); font-size: 8px; font-weight: 800; letter-spacing: .18em; }

.section-heading { display: flex; align-items: end; justify-content: space-between; margin: 28px 2px 16px; }
.section-heading .eyebrow { margin-bottom: 7px; }
h2 { margin: 0; font-size: clamp(27px, 4vw, 38px); letter-spacing: -.035em; }
.updated { color: var(--muted); font-size: 12px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.metric-card { position: relative; min-width: 0; overflow: hidden; padding: 18px 18px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgba(25, 42, 36, .82), rgba(12, 22, 19, .9)); box-shadow: 0 16px 40px rgba(0, 0, 0, .13); }
.metric-card::after { content: ""; position: absolute; width: 110px; height: 110px; top: -70px; right: -55px; border-radius: 50%; background: currentColor; filter: blur(38px); opacity: .1; }
.accent-green { color: var(--green); }
.accent-blue { color: var(--blue); }
.accent-violet { color: var(--violet); }
.accent-orange { color: var(--orange); }
.metric-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .16em; }
.metric-icon { display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid currentColor; border-radius: 9px; color: inherit; opacity: .8; font-size: 9px; }
.metric-value { display: flex; align-items: baseline; gap: 4px; margin-top: 24px; color: var(--text); }
.metric-value strong { font-size: 38px; letter-spacing: -.05em; }
.metric-value small { color: var(--muted); font-size: 13px; }
.meter { height: 3px; margin-top: 13px; border-radius: 10px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.meter i { display: block; width: 0; height: 100%; border-radius: inherit; background: currentColor; transition: width .55s ease; }
.metric-card p { margin: 10px 0 0; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sparkline { display: block; width: calc(100% + 36px); height: 44px; margin: 10px -18px -12px; opacity: .76; }
.quick-facts { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 12px; border: 1px solid var(--line); border-radius: 18px; background: rgba(12, 23, 20, .68); }
.quick-facts div { min-width: 0; padding: 16px 18px; border-right: 1px solid var(--line); }
.quick-facts div:last-child { border-right: 0; }
.quick-facts span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .13em; }
.quick-facts strong { display: block; overflow: hidden; font-size: 14px; white-space: nowrap; text-overflow: ellipsis; }

.history-section { padding-top: 38px; }
.history-heading { align-items: end; }
.history-panel { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgba(20, 35, 30, .82), rgba(10, 19, 16, .93)); }
.history-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.history-metrics, .history-ranges { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.history-metrics::-webkit-scrollbar, .history-ranges::-webkit-scrollbar { display: none; }
.history-toolbar button { flex: 0 0 auto; padding: 8px 12px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--muted); font: inherit; font-size: 11px; cursor: pointer; }
.history-toolbar button.active { border-color: rgba(102, 242, 166, .25); background: rgba(102, 242, 166, .1); color: var(--green); }
.history-ranges { padding: 3px; border: 1px solid var(--line); border-radius: 11px; background: rgba(0, 0, 0, .12); }
.history-ranges button { min-width: 38px; padding: 5px 8px; border-radius: 7px; }
.history-summary { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); }
.history-summary div { padding: 16px 18px; border-right: 1px solid var(--line); }
.history-summary div:last-child { border-right: 0; }
.history-summary span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .15em; }
.history-summary strong { font-size: 19px; letter-spacing: -.025em; }
.history-chart-wrap { position: relative; min-height: 280px; padding: 18px 18px 0; color: var(--green); }
.history-chart { display: block; width: 100%; height: 280px; overflow: visible; }
.history-grid line { stroke: rgba(255, 255, 255, .065); stroke-width: 1; vector-effect: non-scaling-stroke; }
.history-empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 30px; color: var(--muted); font-size: 12px; text-align: center; }
.history-empty[hidden] { display: none; }
.history-axis { display: flex; justify-content: space-between; padding: 3px 28px 17px; color: #66756f; font-size: 10px; }

.services-section { padding-top: 38px; }
.service-heading { align-items: center; }
.service-total { display: flex; align-items: baseline; gap: 6px; }
.service-total strong { color: var(--green); font-size: 26px; }
.service-total span { color: var(--muted); font-size: 12px; }
.filters { display: flex; gap: 7px; margin: 20px 0 14px; overflow-x: auto; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filters button { flex: 0 0 auto; padding: 9px 15px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
.filters button.active { border-color: rgba(102, 242, 166, .3); background: rgba(102, 242, 166, .1); color: var(--green); }
.service-list { display: grid; gap: 8px; }
.service-card { display: grid; grid-template-columns: 9px minmax(0, 1fr) auto; align-items: center; gap: 17px; padding: 17px 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); backdrop-filter: blur(12px); transition: border-color .2s ease, transform .2s ease; }
.service-card:hover { border-color: rgba(255, 255, 255, .16); transform: translateY(-1px); }
.service-status { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 5px rgba(255,255,255,.025); }
.service-status.up { background: var(--green); box-shadow: 0 0 0 5px rgba(102,242,166,.055), 0 0 14px rgba(102,242,166,.4); }
.service-status.degraded { background: var(--orange); }
.service-status.down { background: var(--danger); }
.service-main { min-width: 0; }
.service-title { display: flex; align-items: center; gap: 9px; }
.service-title h3 { margin: 0; font-size: 15px; letter-spacing: -.015em; }
.status-label { padding: 3px 6px; border-radius: 5px; background: rgba(255,255,255,.05); color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.status-label.up { background: rgba(102,242,166,.08); color: var(--green); }
.status-label.degraded { color: var(--orange); }
.status-label.down { color: var(--danger); }
.service-main p { margin: 6px 0 0; color: #8e9c97; font-size: 12px; line-height: 1.35; }
.service-meta { display: flex; gap: 13px; margin-top: 8px; color: #687670; font-size: 10px; }
.service-action a { display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; color: #bcc8c4; font-size: 11px; text-decoration: none; }
.service-action a:hover { border-color: rgba(102,242,166,.28); color: var(--green); }
.local-badge { color: #65736e; font-size: 10px; }
.service-skeleton { height: 100px; border-radius: 18px; background: linear-gradient(90deg, rgba(255,255,255,.025), rgba(255,255,255,.055), rgba(255,255,255,.025)); background-size: 200% 100%; animation: shimmer 1.5s infinite; }
footer { display: flex; justify-content: space-between; gap: 20px; padding: 34px 3px 5px; color: #52605b; font-size: 9px; font-weight: 700; letter-spacing: .1em; }
@keyframes shimmer { to { background-position: -200% 0; } }

@media (max-width: 820px) {
  .hero { min-height: 290px; padding-top: 48px; }
  .hero-orbit { width: 135px; height: 135px; }
  .orbit-core { width: 88px; height: 88px; }
  .orbit-core span { font-size: 23px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .quick-facts { grid-template-columns: repeat(2, 1fr); }
  .quick-facts div:nth-child(2) { border-right: 0; }
  .quick-facts div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .history-toolbar { align-items: stretch; flex-direction: column; }
  .history-ranges { align-self: flex-start; }
}

@media (max-width: 560px) {
  .shell { padding-left: 14px; padding-right: 14px; }
  .hero { min-height: 288px; grid-template-columns: 1fr; padding: 57px 2px 36px; }
  .hero-orbit { position: absolute; top: 95px; right: -38px; width: 130px; height: 130px; opacity: .35; }
  h1 { max-width: 360px; font-size: 47px; }
  .hero-copy { max-width: 350px; margin-top: 19px; padding-right: 16px; font-size: 14px; }
  .section-heading { align-items: end; }
  .updated { padding-bottom: 3px; font-size: 10px; }
  .metric-grid { gap: 8px; }
  .metric-card { padding: 15px 14px 10px; border-radius: 18px; }
  .metric-value { margin-top: 19px; }
  .metric-value strong { font-size: 32px; }
  .metric-card p { font-size: 10px; }
  .sparkline { width: calc(100% + 28px); margin-left: -14px; margin-right: -14px; margin-bottom: -10px; }
  .quick-facts div { padding: 14px; }
  .quick-facts strong { font-size: 13px; }
  .history-section { padding-top: 28px; }
  .history-panel { border-radius: 18px; }
  .history-toolbar { gap: 12px; padding: 13px; }
  .history-metrics { width: calc(100% + 13px); padding-right: 13px; }
  .history-toolbar button { padding: 8px 11px; }
  .history-summary div { padding: 13px 10px; }
  .history-summary strong { font-size: 15px; }
  .history-chart-wrap { min-height: 220px; padding: 10px 7px 0; }
  .history-chart { height: 220px; }
  .history-axis { padding: 3px 17px 14px; }
  .services-section { padding-top: 28px; }
  .service-card { grid-template-columns: 8px minmax(0, 1fr) auto; gap: 12px; padding: 15px 13px; }
  .service-title { flex-wrap: wrap; gap: 6px; }
  .service-main p { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .service-action a { width: 38px; height: 38px; justify-content: center; padding: 0; font-size: 0; }
  .service-action a span { font-size: 16px; }
  .local-badge { display: none; }
  footer { align-items: flex-end; font-size: 8px; }
  footer span:last-child { max-width: 190px; text-align: right; line-height: 1.5; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
