:root {
  --bg-top: #e4ebdc;
  --bg-bottom: #fffced;
  --navy: #374c2e;
  --navy-soft: rgba(55, 76, 46, 0.72);
  --ivy: #374c2e;
  --ivy-soft: rgba(55, 76, 46, 0.14);
  --sand: #fffced;
  --sun: #ffd46b;
  --panel: rgba(252, 253, 250, 0.8);
  --panel-strong: rgba(255, 255, 255, 0.94);
  --stroke: rgba(55, 76, 46, 0.14);
  --shadow: 0 24px 60px rgba(55, 76, 46, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  color: var(--navy);
  background:
    linear-gradient(180deg, rgba(255, 255, 237, 0.46), rgba(255, 255, 237, 0) 30%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("https://img.mlbstatic.com/mlb-images/image/private/t_16x9/t_w1024/mlb/r1ejmucra4ux6bxnczko");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
  opacity: 0.32;
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 237, 0.72), transparent 28%),
    linear-gradient(90deg, rgba(255, 255, 237, 0.88), rgba(255, 255, 237, 0.5));
  pointer-events: none;
}

.page-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 28px 40px 32px;
  display: flex;
  flex-direction: column;
}

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

.site-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 112px;
  width: min(100%, calc((100% - 34px) / 2));
}

.site-logo {
  display: block;
  width: auto;
  height: clamp(80px, 8vw, 100px);
  object-fit: contain;
  flex: 0 0 auto;
}

.site-title {
  font-family: "Fraunces", "Georgia", serif;
  font-size: clamp(2.2rem, 3.1vw, 3.15rem);
  line-height: 0.98;
  color: var(--ivy);
  white-space: nowrap;
  max-width: 100%;
  text-align: right;
  margin-left: auto;
}

.eyebrow,
.kicker,
.card-heading p,
.meta-label,
.card-heading span,
.forecast-item span,
.service-status {
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.eyebrow,
.kicker {
  margin: 0 0 10px;
  font-size: 0.88rem;
  color: var(--ivy);
}

h1,
p {
  margin: 0;
}

h1 {
  font-family: "Fraunces", "Georgia", serif;
  line-height: 0.96;
}

h1 {
  font-size: clamp(2.6rem, 3vw, 3.8rem);
}

.dashboard-layout {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 34px;
  align-items: start;
}

.service-status {
  margin-top: 6px;
  padding-left: 2px;
  font-size: 0.8rem;
  color: var(--ivy);
}

.service-status.is-error {
  color: #8a2d1d;
}

.column-panel {
  display: grid;
  gap: 18px;
  align-content: start;
}

.weather-panel {
  grid-template-rows: auto auto auto;
}

.analytics-panel {
  grid-template-rows: auto auto;
}

.weather-card {
  border: 1px solid var(--stroke);
  border-radius: 28px;
  background: linear-gradient(180deg, var(--panel-strong), var(--panel));
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.current-weather {
  padding: 24px 24px 22px;
  min-height: 300px;
}

.forecast-card {
  padding: 18px 22px 20px;
}

.analytics-card {
  padding: 18px 22px 20px;
}

.primary-analytics-card {
  min-height: 300px;
}

.analytics-placeholder-card {
  min-height: 260px;
}

.card-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 18px;
}

.card-heading p {
  font-size: 0.92rem;
  color: var(--ivy);
}

.card-heading span,
.forecast-item span,
.feels-like {
  color: var(--navy-soft);
}

.current-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.2fr) auto;
  gap: 18px;
  align-items: center;
}

.status {
  font-size: 1.45rem;
  color: var(--ivy);
  margin-bottom: 6px;
}

.current-summary {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.temperature {
  font-size: clamp(4.7rem, 8vw, 6.8rem);
  line-height: 0.88;
  font-weight: 700;
}

.feels-like {
  font-size: 1.2rem;
  margin-top: 8px;
}

.current-side-stats {
  display: grid;
  grid-template-columns: repeat(3, 88px);
  gap: 12px;
  align-items: stretch;
  justify-content: start;
  max-width: 100%;
}

.stat {
  min-height: 88px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(248, 250, 246, 0.9);
  display: grid;
  align-content: space-between;
  aspect-ratio: 1 / 1;
}

.stat span,
.forecast-item span {
  display: block;
  font-size: 0.82rem;
}

.stat strong {
  display: block;
  margin-top: 5px;
  font-size: 1.14rem;
  line-height: 1.05;
}

.stat-comparison {
  grid-column: 1 / -1;
  min-height: 0;
  aspect-ratio: auto;
  align-content: start;
  gap: 8px;
}

.stat-comparison[data-trend="above"] {
  background: rgba(255, 212, 107, 0.2);
}

.stat-comparison[data-trend="below"] {
  background: rgba(55, 76, 46, 0.12);
}

.stat-comparison p {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.2;
  color: var(--navy-soft);
}

.comparison-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stat-comparison strong {
  margin-top: 0;
  font-size: 2rem;
  line-height: 0.95;
  letter-spacing: -0.04em;
  flex: 0 0 auto;
}

.forecast-list {
  display: grid;
  gap: 10px;
}

.forecast-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid rgba(55, 76, 46, 0.1);
}

.forecast-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.forecast-empty {
  opacity: 0.75;
}

.forecast-item strong,
.forecast-item p {
  font-size: 1.25rem;
}

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

.analytics-stat {
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(244, 247, 242, 0.96));
  border: 1px solid rgba(55, 76, 46, 0.1);
}

.analytics-stat-baseline {
  background: linear-gradient(180deg, rgba(247, 249, 244, 0.95), rgba(240, 245, 237, 0.98));
}

.analytics-stat span {
  display: block;
  font-size: 0.82rem;
  color: var(--navy-soft);
}

.analytics-stat strong {
  display: block;
  margin-top: 10px;
  font-size: clamp(2rem, 4vw, 2.7rem);
  line-height: 0.95;
}

.analytics-stat p {
  margin-top: 8px;
  font-size: 0.95rem;
  color: var(--navy-soft);
  line-height: 1.3;
}

.analytics-placeholder {
  min-height: 180px;
  border-radius: 18px;
  border: 1px dashed rgba(55, 76, 46, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.46), rgba(248, 250, 246, 0.7));
}

@media (max-width: 1100px) {
  .page-shell {
    padding: 24px;
  }

  .dashboard-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .current-weather,
  .primary-analytics-card {
    min-height: 0;
  }
}

@media (max-width: 720px) {
  .page-shell {
    min-height: auto;
    padding: 20px 16px 24px;
  }

  .site-header {
    display: grid;
  }

  .current-grid,
  .analytics-grid {
    grid-template-columns: 1fr;
  }

  .current-side-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .stat:not(.stat-comparison) {
    min-height: 0;
    padding: 10px 10px 9px;
    aspect-ratio: auto;
    gap: 6px;
  }

  .stat:not(.stat-comparison) span {
    font-size: 0.72rem;
  }

  .stat:not(.stat-comparison) strong {
    margin-top: 0;
    font-size: 1rem;
  }

  .stat-comparison {
    margin-bottom: 2px;
  }

  .comparison-row {
    gap: 10px;
  }

  .stat-comparison p {
    font-size: 0.88rem;
  }
}
