:root {
  color-scheme: light;
  --ink: #17211c;
  --muted: #5e6b63;
  --paper: #f7f7f2;
  --panel: #ffffff;
  --line: #d9ded7;
  --green: #2f6f4e;
  --blue: #2d6f8f;
  --gold: #b98224;
  --shadow: 0 18px 50px rgba(23, 33, 28, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

img,
iframe {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

.hero {
  min-height: 78vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-image: linear-gradient(
      90deg,
      rgba(14, 23, 18, 0.7),
      rgba(14, 23, 18, 0.22)
    ),
    var(--hero-image);
  background-position: center;
  background-size: cover;
  color: #fff;
}

.subpage-header {
  background: #203027;
  color: #fff;
}

.topbar {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-size: 1.2rem;
  font-weight: 800;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.nav-links a {
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
}

.nav-links a[aria-current="page"] {
  color: #f4c06b;
}

.hero-content {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0 86px;
}

.page-title {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 62px;
}

.hero-content h1 {
  width: min(760px, 100%);
  margin: 0;
  font-size: clamp(2.4rem, 7vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.page-title h1 {
  margin: 0;
  font-size: clamp(2.2rem, 6vw, 4.6rem);
  line-height: 1;
  letter-spacing: 0;
}

.hero-content p:last-child {
  width: min(620px, 100%);
  margin: 22px 0 0;
  font-size: 1.18rem;
  line-height: 1.6;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0;
}

.intro-band {
  padding: 26px 0 0;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  transform: translateY(-56px);
}

.status-grid article,
.panel,
.news-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.status-grid article {
  min-height: 106px;
  padding: 22px;
}

.status-label,
.weather-grid span,
.news-date {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.status-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 1.15rem;
}

.split {
  display: grid;
  grid-template-columns: minmax(240px, 0.82fr) minmax(0, 1.18fr);
  align-items: center;
  gap: 42px;
}

.split.reverse {
  grid-template-columns: minmax(0, 1.18fr) minmax(240px, 0.82fr);
}

.split.reverse .section-heading {
  order: 2;
}

.section-heading h2,
.panel h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.section-heading p:not(.eyebrow),
.note,
.footer p {
  color: var(--muted);
  line-height: 1.7;
}

.camera-frame {
  overflow: hidden;
  min-height: 320px;
  border-radius: 8px;
  background: #202723;
  box-shadow: var(--shadow);
}

.media-page {
  display: grid;
  gap: 26px;
}

.media-text {
  width: min(760px, 100%);
}

.camera-frame.wide {
  width: 100%;
  min-height: 560px;
}

.camera-frame img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
}

.camera-frame.wide img {
  min-height: 560px;
}

.camera-frame.still img {
  aspect-ratio: 16 / 9;
}

.dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 22px;
}

.home-dashboard {
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.18fr);
  align-items: start;
  gap: 28px;
}

.panel {
  padding: 22px;
}

.solar-cloud-page {
  display: grid;
  gap: 22px;
}

.solar-cloud-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.metric-card {
  min-height: 126px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  padding: 22px;
}

.metric-card span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.metric-card strong {
  display: block;
  margin-top: 14px;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1;
}

.chart-panel canvas {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f9faf7;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.button {
  flex: 0 0 auto;
  border-radius: 6px;
  background: var(--green);
  color: #fff;
  padding: 11px 14px;
  font-weight: 800;
  text-decoration: none;
}

.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 11px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

iframe {
  width: 100%;
  height: 430px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.weather-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.solar-summary {
  margin-top: 22px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.solar-summary-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.solar-summary h3 {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.15;
}

.solar-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.weather-grid div {
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px;
  background: #f9faf7;
}

.solar-grid div {
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px;
  background: #f9faf7;
}

.solar-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.weather-grid strong,
.solar-grid strong {
  display: block;
  margin-top: 12px;
  font-size: 1.75rem;
}

.narrow {
  width: min(700px, 100%);
}

.news-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.news-list.compact {
  grid-template-columns: 1fr;
}

.news-card {
  min-height: 190px;
  padding: 22px;
}

.news-card h3 {
  margin: 12px 0 10px;
  font-size: 1.25rem;
}

.news-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 28px 16px;
  text-align: center;
}

code {
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.95em;
}

@media (max-width: 850px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 16px 0;
  }

  .status-grid,
  .split,
  .split.reverse,
  .dashboard,
  .home-dashboard,
  .solar-cloud-grid,
  .news-list {
    grid-template-columns: 1fr;
  }

  .split.reverse .section-heading {
    order: 0;
  }

  .status-grid {
    transform: none;
  }

  .intro-band {
    padding-top: 18px;
  }

  .section {
    padding: 42px 0;
  }

  .camera-frame.wide,
  .camera-frame.wide img {
    min-height: 380px;
  }
}

@media (max-width: 560px) {
  .hero {
    min-height: 72vh;
  }

  .nav-links {
    gap: 12px;
  }

  .weather-grid,
  .solar-grid {
    grid-template-columns: 1fr;
  }

  .panel-header {
    flex-direction: column;
  }

  .button {
    width: 100%;
    text-align: center;
  }

  .camera-frame.wide,
  .camera-frame.wide img {
    min-height: 260px;
  }
}
