:root {
  --bg: #07100d;
  --panel: rgba(15, 29, 24, 0.74);
  --panel-solid: #0f1d18;
  --line: rgba(184, 224, 197, 0.13);
  --muted: #94a99f;
  --text: #edf8f1;
  --green: #7be0a3;
  --amber: #f4be65;
  --blue: #75b9ff;
  --violet: #bc98ff;
  --danger: #ff846f;
  --radius: 22px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 82% 8%, rgba(52, 127, 83, 0.14), transparent 31rem),
    linear-gradient(180deg, #09130f 0%, #07100d 44%, #050b09 100%);
}

a { color: inherit; }
button { font: inherit; }

.ambient {
  position: fixed;
  z-index: -1;
  width: 36rem;
  height: 36rem;
  border-radius: 50%;
  filter: blur(100px);
  opacity: .08;
  pointer-events: none;
}
.ambient-one { top: 24rem; left: -20rem; background: var(--green); }
.ambient-two { right: -22rem; bottom: -5rem; background: var(--amber); }

.site-header,
main,
footer {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 700;
  letter-spacing: -.02em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 33px;
  height: 33px;
  place-items: center;
  border: 1px solid rgba(123, 224, 163, .45);
  border-radius: 10px;
  color: var(--green);
  font-family: Georgia, serif;
}

.live-state {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: .79rem;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(244, 190, 101, .1);
}
.live-state.online .pulse { background: var(--green); box-shadow: 0 0 0 4px rgba(123, 224, 163, .1); }
.live-state.offline .pulse { background: var(--danger); box-shadow: 0 0 0 4px rgba(255, 132, 111, .1); }

.hero {
  min-height: 450px;
  display: grid;
  grid-template-columns: 1.4fr .8fr;
  gap: 64px;
  align-items: center;
  padding: 72px 0 58px;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--green);
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .18em;
  text-transform: uppercase;
}

h1, h2, p { margin-top: 0; }
h1 {
  margin-bottom: 24px;
  max-width: 780px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 7vw, 6.3rem);
  font-weight: 400;
  letter-spacing: -.055em;
  line-height: .92;
}

.intro {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.7;
}

.hero-reading {
  position: relative;
  display: flex;
  min-height: 245px;
  flex-direction: column;
  justify-content: center;
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 50% 50% 44% 56% / 44% 57% 43% 56%;
  background: radial-gradient(circle at 50% 45%, rgba(123, 224, 163, .12), transparent 68%);
  text-align: center;
}

.hero-label, .hero-meta { color: var(--muted); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; }
.hero-reading strong { margin: 8px 0 12px; font-size: clamp(3.2rem, 6vw, 5.5rem); font-weight: 350; letter-spacing: -.07em; line-height: 1; }
.hero-reading small { color: var(--green); font-size: .26em; font-weight: 700; letter-spacing: 0; }

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(8, 18, 14, .6);
  overflow: hidden;
}

.summary-card { min-height: 154px; padding: 30px; border-right: 1px solid var(--line); }
.summary-card:last-child { border-right: 0; }
.summary-card span { display: block; }
.summary-label { margin-bottom: 17px; color: var(--muted); font-size: .72rem; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; }
.summary-card strong { display: block; margin-bottom: 5px; font-size: 2rem; font-weight: 450; letter-spacing: -.04em; }
.summary-unit { color: var(--muted); font-size: .78rem; }

.panel {
  margin-top: 28px;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .16);
  backdrop-filter: blur(20px);
}

.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.section-heading .eyebrow { margin-bottom: 10px; }
h2 { margin-bottom: 0; font-family: Georgia, serif; font-size: clamp(1.8rem, 3vw, 2.45rem); font-weight: 400; letter-spacing: -.035em; }
.section-heading time { color: var(--muted); font-size: .78rem; }

.channel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.channel-card {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(4, 13, 9, .46);
}
.channel-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.channel-name { font-size: .9rem; font-weight: 700; }
.state-chip { padding: 5px 8px; border-radius: 99px; background: rgba(123, 224, 163, .1); color: var(--green); font-size: .64rem; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.state-chip.degraded { color: var(--amber); background: rgba(244, 190, 101, .1); }
.state-chip.offline, .state-chip.incident { color: var(--danger); background: rgba(255, 132, 111, .1); }
.channel-power { margin: 34px 0 28px; font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 350; letter-spacing: -.065em; }
.channel-power small { color: var(--muted); font-size: .28em; font-weight: 700; }
.channel-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding-top: 17px; border-top: 1px solid var(--line); }
.channel-metrics div { min-width: 0; }
.channel-metrics span { display: block; overflow: hidden; color: var(--muted); font-size: .64rem; letter-spacing: .05em; text-overflow: ellipsis; text-transform: uppercase; }
.channel-metrics strong { display: block; margin-top: 5px; font-size: .85rem; font-weight: 600; }

.chart-heading { align-items: center; }
.range-switcher { display: flex; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: rgba(3, 10, 7, .5); }
.range-switcher button { padding: 7px 12px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; cursor: pointer; font-size: .75rem; }
.range-switcher button:hover, .range-switcher button:focus-visible { color: var(--text); }
.range-switcher button.active { color: #07100d; background: var(--green); font-weight: 750; }
.chart-shell { position: relative; height: 360px; }
#power-chart { width: 100%; height: 100%; }
.chart-empty { position: absolute; inset: 0; display: none; place-items: center; color: var(--muted); font-size: .9rem; }
.chart-empty.visible { display: grid; }
.legend { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 20px; color: var(--muted); font-size: .74rem; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 18px; height: 2px; border-radius: 2px; }

.notice { display: flex; gap: 18px; margin: 28px 0 0; padding: 24px 28px; border: 1px solid var(--line); border-radius: 16px; color: var(--muted); background: rgba(8, 18, 14, .48); }
.notice-icon { display: grid; width: 28px; height: 28px; flex: 0 0 auto; place-items: center; border: 1px solid rgba(123, 224, 163, .35); border-radius: 50%; color: var(--green); font-family: Georgia, serif; }
.notice strong { display: block; margin-bottom: 5px; color: var(--text); }
.notice p { margin: 0; line-height: 1.55; }

footer { display: flex; justify-content: space-between; gap: 30px; padding: 44px 0 56px; color: var(--muted); font-size: .75rem; }
footer p { max-width: 620px; margin: 0; }
footer nav { display: flex; gap: 18px; white-space: nowrap; }
footer a { text-underline-offset: 4px; }

.error-banner { color: var(--danger); }

@media (max-width: 820px) {
  .hero { min-height: auto; grid-template-columns: 1fr; gap: 44px; padding-top: 55px; }
  .hero-reading { max-width: 360px; justify-self: center; width: 100%; }
  .summary-grid, .channel-grid { grid-template-columns: 1fr; }
  .summary-card { border-right: 0; border-bottom: 1px solid var(--line); }
  .summary-card:last-child { border-bottom: 0; }
  .chart-heading, .section-heading { align-items: flex-start; flex-direction: column; }
  .chart-shell { height: 290px; }
  footer { flex-direction: column; }
}

@media (max-width: 520px) {
  .site-header, main, footer { width: min(100% - 24px, 1180px); }
  .site-header { min-height: 72px; }
  h1 { font-size: 2.85rem; }
  .hero { padding-top: 44px; }
  .hero-reading { min-height: 220px; padding: 28px; }
  .panel { padding: 22px 17px; }
  .range-switcher { width: 100%; }
  .range-switcher button { flex: 1; padding-inline: 6px; }
  .chart-shell { height: 250px; }
}

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