@import url('https://fonts.googleapis.com/css2?family=PT+Serif:ital,wght@0,400;0,700;1,400&family=IBM+Plex+Mono:wght@400;500&family=Source+Sans+3:wght@300;400;600&display=swap');

/* ────────────────────────────────────────────────────────────── */
/* CONTROL PANEL                                                  */                
/* ────────────────────────────────────────────────────────────── */
:root {

  /* ── COLORS ─────────────────────────────────────────────── */
  /* Backgrounds */
  --color-bg-page:        #FFFFFF;  /* whole page background */
  --color-bg-card:        #FEECD8;  /* cream card background (stat cards, chart, table) */
  --color-bg-card-alt:    #FDE8D0;  /* slightly darker card shade (striped table rows) */
  --color-bg-hover:       #FDCD99;  /* table row hover */
  --color-bg-hero:        #93b5c4;  /* hero banner background */

  /* Text */
  --color-text-dark:      #2C0E09;  /* darkest text (numbers, headings on light bg) */
  --color-text-body:      #57423E;  /* normal table/body text */
  --color-text-muted:     #705C57;  /* secondary text, nav links, toggle labels */
  --color-text-faint:     #8C7A76;  /* labels, captions, least important text */
  --color-text-hero:      #EDD7CC;  /* light text on the dark hero banner */
  --color-text-hero-sub:  #c5b7b4;  /* subtitle text on hero banner */
  --color-text-footer:    #AC9E9B;  /* footer text */

  /* Accent / brand colors */
  --color-accent-rust:    #B03823;  /* primary brand color: borders, links, "exceeded" text */
  --color-accent-orange:  #F7941E;  /* secondary accent: trend markers, gradient */
  --color-accent-olive:   #537F1C;  /* tertiary accent: toggle "on", gradient end */
  --color-accent-tan:     #CB8367;  /* quaternary accent: some card top-borders */
  --color-accent-green:   #698B4B;  /* fifth accent: median card top-border */

  /* Borders / dividers */
  --color-border:         #E1B9A6; /* the tan border used almost everywhere */

  /* ── FONTS ──────────────────────────────────────────────── */
  --font-serif:  "PT Serif", Georgia, serif;         /* headings, titles, italics */
  --font-mono:   "IBM Plex Mono", monospace;          /* numbers, data, temps */
  --font-sans:   "Source Sans 3", sans-serif;         /* body copy, labels, nav */

  /* ── SIZES to tweak ─────────────────────────────────────── */
  --size-hero-temp:    4rem;      /* the giant "18.6°F" number */
  --size-hero-title:   45px;      /* hero headline */
  --size-stat-value:   2rem;      /* numbers in the 4 stat cards */

  /* ── SHAPE ──────────────────────────────────────────────── */
  --radius-card:   4px;   /* chart card corner roundness */
  --radius-pill:   999px; /* pill buttons — fully round */
}

/* ────────────────────────────────────────────────────────────── */
/* SHARED BASE                                                    */
/* ────────────────────────────────────────────────────────────── */

/* ── Page background ── */
body, .observablehq--root {
  background: #ffffff !important;
}

/* ── Site header ── */
.site-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  border-bottom: 2px solid var(--color-accent-rust);
  padding: 0.6rem 0 0.5rem;
  margin-bottom: 1.75rem;
}
.site-logo {
  height: 80px;
  width: auto;
  display: block;
}
.site-nav {
  display: flex;
  gap: 1.25rem;
  margin-left: auto;
}
.site-nav a {
  font-size: 16px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  text-decoration: none;
}
.site-nav a:hover { color: var(--color-accent-rust); }
.site-nav a[aria-current="page"] { color: var(--color-accent-rust); }

/* ── Hero ── */
.hero {
  background: #93b5c4;
  padding: 1.85rem 1.75rem 1.6rem;
  margin-bottom: 1.4rem;
  position: relative;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='200'%3E%3Cellipse cx='200' cy='100' rx='180' ry='70' fill='none' stroke='%23EDD7CC' stroke-width='0.8'/%3E%3Cellipse cx='200' cy='100' rx='150' ry='55' fill='none' stroke='%23EDD7CC' stroke-width='0.8'/%3E%3Cellipse cx='200' cy='100' rx='120' ry='42' fill='none' stroke='%23EDD7CC' stroke-width='0.8'/%3E%3Cellipse cx='200' cy='100' rx='90' ry='30' fill='none' stroke='%23EDD7CC' stroke-width='0.8'/%3E%3Cellipse cx='200' cy='100' rx='60' ry='20' fill='none' stroke='%23EDD7CC' stroke-width='0.8'/%3E%3Cellipse cx='80' cy='160' rx='120' ry='50' fill='none' stroke='%23EDD7CC' stroke-width='0.6'/%3E%3Cellipse cx='330' cy='40' rx='100' ry='45' fill='none' stroke='%23EDD7CC' stroke-width='0.6'/%3E%3C/svg%3E");
  background-size: 600px 300px;
  opacity: 0.06;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.hero-left .hero-eyebrow,
.hero > .hero-eyebrow {
  font-family: var(--font-sans);
  font-size: 18px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #000000;
  margin: 0 0 0.4rem;
  position: relative;
}
.hero-left .hero-title,
.hero > .hero-title {
  font-family: var(--font-serif);
  font-size: var(--size-hero-title);
  max-width: 800px;
  font-weight: 400;
  color: #251F21;
  line-height: 1.15;
  margin: 0 0 0.4rem;
  border: none;
  padding: 0;
  position: relative;
}
.hero-left .hero-sub {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 300;
  color: #000000d9;
  margin: 0;
}
.hero > .hero-sub {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 300;
  color: #000000d9;
  margin: 0;
  position: relative;
}

.hero-content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.hero-left { flex: 1; }
.hero-right {
  text-align: right;
  flex-shrink: 0;
}
.hero-temp {
  font-family: var(--font-mono);
  font-size: var(--size-hero-temp);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
  color: rgb(176 56 35);
}
.hero-temp-unit {
  font-size: 1.6rem;
  font-weight: 400;
  opacity: 0.8;
}

.hero-temp-sep {
  font-size: 1.6rem;
  font-weight: 300;
  color: rgb(176 56 35);
  opacity: 0.45;
  margin-left: 0.35rem;
  margin-right: 0.35rem;
}
.hero-temp-c {
  font-size: 1rem;
  font-weight: 400;
  color: rgb(176 56 35);
  opacity: 0.75;
}
.hero-temp-label {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 0.25rem;
  color: rgb(176 56 35);
}
.hero-temp-date {
  font-family: var(--font-sans);
  font-size: 20px;
  color: #000000;
  margin-top: 0.2rem;
}

/* ── Last updated ── */
.last-updated {
  font-family: var(--font-serif);
  font-size: 18px;
  font-style: normal;
  color: var(--color-text-faint);
  border-left: 2px solid #D69D84;
  padding-left: 8px;
  margin: 0 0 1.25rem;
  max-width: 130ch;   
  line-height: 1.5; 
}

/* ── Stat row (shared grid + card shell) ── */
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 0 0 1.75rem;
}
.stat-card {
  padding: 0.9rem 1.05rem;
  border-right: 1.5px solid #b3b3b3d9;
  background: #ffffff;
  position: relative;
}
.stat-card:last-child { border-right: none; }

/* top borders removed from all stat-card variants per request */
.stat-card--trend,
.stat-card--days,
.stat-card--threshold,
.stat-card--median,
.stat-card--temp,
.stat-card--peak { border-top: none; }

/* Typography unified (index.css was ~2px larger than 2026.css) */
.stat-label {
  font-family: var(--font-serif);
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #251f21d9;
  margin-bottom: 0.3rem;
}
.stat-value {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 500;
  line-height: 1;
  color: var(--color-text-dark);
  margin-bottom: 0.22rem;
}
/* Secondary °C reading inline with a stat-value (currently used on the
   Cool Mix Threshold card only). Sized down and muted relative to the
   °F figure it follows, so °F still reads as the headline number. */
.stat-value-c {
  font-size: 0.52em;
  font-weight: 400;
  color: var(--color-text-muted);
  opacity: 0.8;
  margin-left: 0.25em;
  letter-spacing: 0;
}
.stat-sub {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 350;
  color: #000000d9;
}

/* Threshold card: cream background matching the threshold band in the chart */
.stat-card--threshold {
  background: #f9f1ef;
}

/* Threshold text explicitly set to IBM Plex Mono */
.stat-card--threshold .stat-label,
.stat-card--threshold .stat-value {
  font-family: var(--font-mono);
}

/* ── Site footer ── */
.site-footer {
  margin-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  padding-top: 0.6rem;
}
.site-footer p {
  margin: 0;
  margin-bottom: 1rem;

}
.site-footer-citation {
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin-bottom: 0.3rem;
}
.site-footer-credit {
  font-family: var(--font-serif);
  font-size: 13px;
  font-style: italic;
  line-height: 1.4;
  color: var(--color-text-footer);
}

/* ── Observable block spacing (extra breathing room between blocks) ── */
.observablehq--block {
  margin: 2rem 0;
}

/* ────────────────────────────────────────────────────────────── */
/* INDEX PAGE ONLY (overview chart, pills, toggles, export)       */
/* ────────────────────────────────────────────────────────────── */

.controls-row {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}
.controls-left { flex: 1; }
.controls-right {
  flex-shrink: 0;
  padding-top: 0;
  border-top: none;
  border-left: 1px solid var(--color-border);
  padding-left: 1.5rem;
}

.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "Source Sans 3", sans-serif;
  font-size: 16px;
  letter-spacing: 0.02em;
  color: var(--color-text-dark);
  background: #c5b7b4;
  border: 1px solid #ffffff;
  border-radius: 5px;
  padding: 0.35rem 0.85rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.pill:hover { border-color: #561B11; color: #561B11; }
.pill-selected {
  background: #B03823;
  color: #ffffff;
}
.pill-selected:hover { border-color: #561B11; color: #ffffff; }

.toggle-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 1.75rem;
  align-items: center;
  margin: 0;
  padding-top: 0;
  border-top: none;
}
.toggle-wrap { display: inline-flex; }
.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 16px;
  color: #2C0E09;
  white-space: nowrap;
}
.toggle-track {
  position: relative;
  display: inline-block;
  width: 30px;
  height: 16px;
  background: #c5b7b4;
  border-radius: var(--radius-pill);
  transition: background 0.15s ease;
  flex: none;
}
.toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  background: #2c0e09;
  border-radius: 50%;
  transition: transform 0.15s ease;
}
.toggle-on .toggle-track { background: #B03823; }
.toggle-on .toggle-thumb { transform: translateX(14px); }
.toggle-label { letter-spacing: 0.01em; }

.chart-card {
  background: #ffffff;
  border: none;
  border-radius: var(--radius-card);
  padding: 0.75rem 0.25rem 0.5rem;
  margin-bottom: 0.5rem;
}

/* Historical line hover highlight */
.hist-line {
  transition: stroke-opacity 0.12s ease, stroke-width 0.12s ease;
}
.hist-line-active {
  stroke-opacity: 0.9 !important;
  stroke-width: 1.8px !important;
}

.legend { margin: 0.5rem 0 1rem; }
.legend-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  align-items: center;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--color-text-faint);
}

/* Row that holds the SVG + JPEG export buttons side by side. The
   margin-top that used to live on .export-btn now lives here instead,
   so adding a second button doesn't create doubled-up spacing. */
.export-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.export-btn {
  font-family: var(--font-serif);
  font-size: 16px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.45rem 1.1rem;
  background: transparent;
  border: 1px solid var(--color-accent-tan);
  color: var(--color-text-muted);
  cursor: pointer;
  margin-top: 0;
  display: inline-block;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.export-btn:hover {
  background: var(--color-accent-rust);
  border-color: var(--color-accent-rust);
  color: var(--color-bg-card);
}
.export-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

/* ────────────────────────────────────────────────────────────── */
/* 2026 SEASON PAGE ONLY (section cards, table)                   */
/* ────────────────────────────────────────────────────────────── */

.section-card {
  background: #ffffff;
  border-radius: 6px;
  padding: 1.25rem 1.25rem 1rem;
  margin: 0 0 8rem;
}
.section-card--table {
  padding-bottom: 0;
  overflow: hidden;
}
.section-card--secondary { }
.section-card-header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0.6rem;
}
.section-card-title {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-text-dark);
  margin: 0;
  border: none;
  padding: 0;
}
.section-card-sub {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 300;
  color: var(--color-text-faint);
  margin: 0;
  letter-spacing: 0.04em;
}

.trend-summary {
  font-family: var(--font-serif);
  font-size: 16px;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #251f21d9;
  border-left: 2px solid var(--color-accent-orange);
  padding-left: 10px;
  margin: -1rem 0 2rem;
}

.inline-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1rem;
  align-items: center;
  margin-top: 0.6rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--color-border);
}
.il-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--color-text-muted);
}

.recent-table-scroll {
  max-height: 480px;
  overflow-y: auto;
}
.recent-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.recent-table thead th {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-faint);
  text-align: left;
  padding: 0.4rem 0.9rem;
  border-bottom: 2px solid var(--color-accent-rust);
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 1;
}
.recent-table tbody td {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 300;
  color: var(--color-text-body);
  padding: 0.35rem 0.9rem;
  border-bottom: 1px solid var(--color-border);
  background: #ffffff;
}
.recent-table tbody tr:nth-child(even) td {
  background: #FAF7F5;
}
.recent-table .cell-temp {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--color-text-dark);
}
.recent-table .cell-delta {
  font-family: var(--font-mono);
  font-size: 16px;
}
.recent-table .cell-flow {
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--color-text-muted);
}
.recent-table tbody tr:last-child td {
  border-bottom: none;
}
.recent-table tbody tr:hover td {
  background: var(--color-bg-hover) !important;
}
.recent-table tbody tr.row-above .cell-temp {
  color: var(--color-accent-rust);
}
.recent-table tbody tr.row-above td:first-child {
  box-shadow: inset 3px 0 0 var(--color-accent-rust);
}
.recent-table tbody tr:not(.row-above) td:first-child {
  box-shadow: inset 3px 0 0 var(--color-accent-olive);
}

/* ────────────────────────────────────────────────────────────── */
/* RESPONSIVE                                                     */
/* ────────────────────────────────────────────────────────────── */
@media (max-width: 700px) {
  /* shared */
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .stat-card:nth-child(2) { border-right: none; }
  .stat-card:nth-child(1),
  .stat-card:nth-child(2) { border-bottom: 1px solid var(--color-border); }

  /* index-only */
  .hero-content { flex-direction: column; }
  .hero-right { text-align: left; }
  .hero-temp { font-size: 2.2rem; }
  .pill { font-size: 16px; padding: 0.3rem 0.65rem; }
  .controls-row { flex-direction: column; }
  .controls-right { border-left: none; padding-left: 0; border-top: 1px solid var(--color-border); padding-top: 0.75rem; }
  .toggle-row { gap: 1rem; flex-wrap: wrap; }
  .export-row { flex-direction: column; align-items: stretch; }

  /* 2026-only */
  .section-card { padding: 1rem; }
}