:root {
  --bg-top: #06111d;
  --bg-bottom: #10263c;
  --panel: rgba(255, 255, 255, 0.08);
  --panel-border: rgba(255, 255, 255, 0.14);
  --panel-soft: rgba(255, 255, 255, 0.045);
  --text: #f4f8ff;
  --muted: #aac0d4;
  --accent: #7dcdf6;
  --accent-strong: #9fe3ff;
  --shadow: rgba(0, 0, 0, 0.22);
  --radius: 22px;
  --page-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(64, 150, 214, 0.16), transparent 34%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}

.page-shell,
.footer-shell {
  width: min(calc(100% - 24px), var(--page-width));
  margin: 0 auto;
}

.page-shell {
  padding: max(24px, env(safe-area-inset-top)) 0 28px;
}

.hero-card,
.card,
.section,
.year-block {
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 40px var(--shadow);
}

.hero-card {
  padding: 30px 24px 24px;
}

.eyebrow,
.section-label,
.kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.77rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-subtitle,
.sub,
.footer-note,
.note,
.meta,
.row span {
  color: var(--muted);
}

.hero-subtitle,
.sub {
  margin: 12px 0 0;
  max-width: 46rem;
  font-size: 1rem;
  line-height: 1.55;
  font-weight: 600;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.hero-meta-pill,
.page-nav a,
.back-btn {
  padding: 8px 12px;
  border: 1px solid rgba(125, 205, 246, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.92rem;
  text-decoration: none;
  color: var(--text);
}

.page-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.page-nav-top {
  margin-top: 18px;
}

.page-nav-bottom {
  justify-content: center;
  margin: 0 0 18px;
}

.page-nav a.is-active,
.back-btn:hover,
.btn:hover,
.mini:hover {
  background: rgba(125, 205, 246, 0.16);
  border-color: rgba(125, 205, 246, 0.45);
}

.content-stack {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.card,
.section,
.year-block {
  padding: 20px;
}

.card {
  display: grid;
  gap: 12px;
  min-height: 220px;
}

.card h2,
.section h2,
.year-block h2 {
  margin: 0 0 10px;
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  font-weight: 600;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: auto;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(125, 205, 246, 0.25);
  background: rgba(125, 205, 246, 0.12);
  color: var(--accent-strong);
  text-decoration: none;
  font-weight: 800;
}

.list,
.month-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 10px;
}

.mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--panel-soft);
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  text-align: center;
}

.footer-shell {
  padding: 0 0 28px;
}

.site-footer {
  padding: 0 8px 8px;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 18px;
}

.records-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(285px, 1fr));
  gap: 14px;
}

.record {
  background: var(--panel-soft);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 18px;
}

.label {
  margin: 0 0 14px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
}

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

.values div {
  background: rgba(0, 0, 0, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 14px;
}

.values span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.values strong {
  display: block;
  margin-top: 6px;
  font-size: 1.5rem;
  line-height: 1.05;
}

.meta {
  margin-top: 6px;
  font-size: 0.82rem;
  line-height: 1.35;
  font-weight: 600;
}

.hero-grid,
.small-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: baseline;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.row:first-of-type {
  border-top: 0;
}

.row span {
  font-size: 0.98rem;
  font-weight: 600;
}

.row strong {
  text-align: right;
  font-size: 1.08rem;
}

.daylight {
  font-size: clamp(1.4rem, 4vw, 2.1rem);
  line-height: 1.2;
  font-weight: 800;
  color: var(--accent-strong);
}

.note {
  margin: 0;
  font-size: 0.92rem;
}

.graph-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.card-header.compact {
  margin-bottom: 12px;
}

.graph-toolbar-card {
  min-height: 0;
}

.graph-period-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.graph-period {
  appearance: none;
  border: 1px solid rgba(125, 205, 246, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 9px 14px;
}

.graph-period.is-active {
  background: rgba(125, 205, 246, 0.16);
  border-color: rgba(125, 205, 246, 0.45);
  color: var(--accent-strong);
}

.graph-frame {
  position: relative;
  min-height: 220px;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(4, 14, 25, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.graph-image {
  display: block;
  width: 100%;
  height: auto;
}

.graph-unavailable {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  background: rgba(4, 14, 25, 0.78);
  font-weight: 700;
}

.graph-unavailable[hidden] {
  display: none !important;
}

.station-information-grid {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.station-information-grid p {
  margin: 0;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--panel-soft);
}

.station-information-grid strong {
  color: var(--accent-strong);
}

.subtle-note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

.sun h2 {
  color: #ffd388;
}

.moon h2 {
  color: #c9d7ff;
}

@media (max-width: 760px) {
  .hero-grid,
  .small-grid,
  .values {
    grid-template-columns: 1fr;
  }

  .graph-frame {
    min-height: 180px;
  }

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

  .row strong {
    text-align: left;
  }
}

.graphs-page .page-shell,
.graphs-page .footer-shell {
  width: min(calc(100% - 24px), 1520px);
}

.graphs-page .content-stack {
  gap: 22px;
  margin-top: 22px;
}

.graphs-page .graph-toolbar-card,
.graphs-page .graph-card {
  min-height: 0;
}

.graphs-page .graph-toolbar-card {
  padding: 22px 28px;
}

.graphs-page .graph-card {
  gap: 10px;
  padding: 22px 24px 24px;
}

.graphs-page .card-header.compact {
  margin-bottom: 10px;
}

.graphs-page .graph-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  align-items: start;
}

.graphs-page .graph-frame {
  min-height: 0;
  padding: 14px;
  background:
    radial-gradient(circle at top center, rgba(88, 168, 233, 0.14), transparent 52%),
    linear-gradient(180deg, rgba(24, 53, 84, 0.96), rgba(8, 24, 39, 0.98));
  border: 1px solid rgba(121, 189, 243, 0.16);
  box-shadow:
    inset 0 0 0 1px rgba(142, 205, 255, 0.08),
    inset 0 22px 40px rgba(54, 118, 182, 0.12);
}

.graphs-page .graph-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  background: rgba(6, 17, 29, 0.88);
  box-shadow: 0 10px 26px rgba(1, 8, 16, 0.42);
}

.graphs-page .graph-period-toggle {
  gap: 12px;
}

.graphs-page .graph-period {
  min-width: 92px;
  padding: 11px 18px;
  font-size: 1rem;
}

@media (max-width: 980px) {
  .graphs-page .graph-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .graphs-page .graph-toolbar-card,
  .graphs-page .graph-card {
    padding: 18px;
  }

  .graphs-page .graph-frame {
    padding: 10px;
  }
}
