[data-holiday="jul"] {
  --holiday-ink: #174860;
  --holiday-tint: #e7f1f6;
  --holiday-border: #bcd6e4;
}

[data-holiday="nyaar"] {
  --holiday-ink: #36456c;
  --holiday-tint: #ecedf6;
  --holiday-border: #cbd0e5;
}

[data-holiday="midsommar"] {
  --holiday-ink: #365836;
  --holiday-tint: #edf3e7;
  --holiday-border: #cbdcc2;
}

.station-holiday-links { margin-top: 28px; }

.station-holiday-link-grid,
.holiday-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 215px), 1fr));
  gap: 12px;
  margin-top: 14px;
}

.station-holiday-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  padding: 13px 16px;
  border: 1px solid var(--holiday-border);
  border-radius: 8px;
  background: var(--holiday-tint);
  color: var(--holiday-ink);
}

.station-holiday-link > span:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 650;
}

.station-holiday-link > span:last-child { font-size: .85rem; }
.station-holiday-link:hover { border-color: var(--holiday-ink); }

.holiday-page .holiday-intro {
  margin-bottom: 16px;
  border-color: var(--holiday-border);
  background: var(--holiday-tint);
}

.holiday-intro .archive-eyebrow { color: var(--holiday-ink); }

.holiday-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.holiday-tabs a {
  padding: 8px 15px;
  border: 1px solid #d3dfe5;
  border-radius: 6px;
  background: white;
  color: var(--atlas-ink);
  font-size: .875rem;
  font-weight: 600;
}

.holiday-tabs a:hover { border-color: var(--holiday-ink); }
.holiday-tabs a[aria-current="page"] { background: var(--holiday-ink); color: white; border-color: var(--holiday-ink); }

.holiday-panel {
  margin-top: 22px;
  padding: clamp(14px, 3vw, 28px);
  border: 1px solid #d3dfe5;
  border-radius: 12px;
  background: white;
  color: var(--atlas-ink);
}

.holiday-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--holiday-border);
  border-radius: 8px;
  background: var(--holiday-tint);
  color: var(--atlas-muted);
  font-size: .875rem;
}

.holiday-card > p:first-child { font-weight: 650; color: var(--holiday-ink); }
.holiday-card strong { color: var(--holiday-ink); font-size: clamp(1.4rem, 3vw, 2rem); font-variant-numeric: tabular-nums; }
.holiday-card strong span { font-size: .9rem; }

.holiday-snow-heading,
.holiday-table-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
}

.holiday-snow-heading { margin-top: 24px; }
.holiday-snow-heading h3 { font-size: 1.1rem; font-weight: 650; }
.holiday-snow-heading a, .holiday-table-heading p { font-size: .875rem; }

.holiday-note {
  margin-top: 12px;
  color: var(--atlas-muted);
  font-size: .875rem;
}

.holiday-panel a { color: var(--holiday-ink); text-decoration: underline; text-underline-offset: 3px; }
.holiday-panel a:hover { text-decoration-thickness: 2px; }

.holiday-temperature {
  --holiday-plot-height: clamp(160px, 26vw, 242px);
  --holiday-zero: #253d4a;
}

.holiday-temperature [data-temperature-metric="min"] { --temperature-color: #3266a0; }
.holiday-temperature [data-temperature-metric="mean"] { --temperature-color: #167669; }
.holiday-temperature [data-temperature-metric="max"] { --temperature-color: #a74f26; }

.holiday-temperature-jump, .holiday-temperature-help { font-size: .85rem; }

.holiday-temperature-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 14px 0;
}

.holiday-temperature-controls label { font-size: .85rem; font-weight: 650; }
.holiday-temperature-controls select { padding: 5px 36px 5px 12px; border: 1px solid #c5d3db; background-color: white; }

.holiday-temperature-extremes { display: flex; flex-wrap: wrap; gap: 8px; margin-inline-start: auto; }
.holiday-temperature-extremes[hidden], .holiday-temperature [hidden] { display: none; }

.holiday-temperature-extremes button {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 6px;
  padding: 7px 10px;
  border: 1px solid #d3dfe5;
  border-radius: 6px;
  background: #f7fafb;
  font-size: .8rem;
  text-align: left;
}

.holiday-temperature-extremes button:hover { border-color: var(--temperature-color); }
.holiday-temperature-extremes strong { color: var(--temperature-color); white-space: nowrap; }

.holiday-temperature-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .85rem; }
.holiday-temperature-legend li { display: flex; align-items: center; gap: 6px; }
.holiday-temperature-legend li::before { content: ""; width: 9px; height: 9px; border-radius: 2px; background: var(--temperature-color); }
.holiday-temperature-help { margin: 6px 0 2px; color: var(--atlas-muted); }

.holiday-temperature-frame {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  font-variant-numeric: tabular-nums;
}

.holiday-temperature-axis {
  position: relative;
  height: var(--holiday-plot-height);
  margin-top: 12px;
  color: var(--atlas-muted);
  font-size: .75rem;
}

.holiday-temperature-axis span {
  position: absolute;
  top: var(--tick-position);
  right: 8px;
  transform: translateY(-50%);
}

.holiday-temperature-axis .is-zero { color: var(--holiday-zero); font-weight: 750; }
.holiday-temperature-scroll { overflow-x: auto; padding-top: 12px; scrollbar-color: #a7bdc8 #edf2f5; }
.holiday-temperature-plot { position: relative; min-width: max(100%, calc(var(--holiday-year-count) * 22px)); padding-bottom: 32px; }

.holiday-temperature-grid,
.holiday-temperature-years { height: var(--holiday-plot-height); }

.holiday-temperature-grid { position: absolute; inset: 0 0 auto; z-index: 1; pointer-events: none; }
.holiday-temperature-grid span { position: absolute; top: var(--tick-position); inset-inline: 0; border-top: 1px solid #dbe5ea; }
.holiday-temperature-grid .is-zero { border-top: 2px solid var(--holiday-zero); transform: translateY(-1px); }

.holiday-temperature-years {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--holiday-year-count), minmax(0, 1fr));
  background: #f7fafb;
}

.holiday-temperature-year {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 9px));
  gap: 1px;
  justify-content: center;
  padding-inline: 2px;
  background: transparent;
}

.holiday-temperature-year:hover { background: #edf2f6; }
.holiday-temperature-year[aria-pressed="true"] { background: #e3edf3; box-shadow: 0 2px var(--holiday-ink); }
.holiday-temperature-year:focus-visible { outline: 2px solid var(--holiday-ink); outline-offset: -2px; }
.holiday-temperature-lane { position: relative; pointer-events: none; }

.holiday-temperature-bar {
  position: absolute;
  inset-inline: 0;
  z-index: 2;
  border-radius: 1px;
  background: var(--temperature-color);
}

.holiday-temperature-bar.is-zero { min-height: 4px; transform: translateY(-50%); }

.holiday-temperature-year-tick {
  position: absolute;
  top: calc(100% + 5px);
  left: 50%;
  transform: translateX(-50%);
  color: var(--atlas-muted);
  font-size: .7rem;
  pointer-events: none;
}

.holiday-temperature-year:first-child .holiday-temperature-year-tick { left: 2px; transform: none; }
.holiday-temperature-year:last-child .holiday-temperature-year-tick { left: auto; right: 2px; transform: none; }

.holiday-temperature-detail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 18px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #d3dfe5;
  border-radius: 6px;
  background: #f7fafb;
  font-size: .85rem;
}

.holiday-temperature-values, .holiday-temperature-values dl { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 20px; }
.holiday-temperature-selected-year { font-size: 1.2rem; }
.holiday-temperature-values dt { font-size: .72rem; color: var(--atlas-muted); }
.holiday-temperature-values dd { font-weight: 650; color: var(--temperature-color); }
.holiday-temperature-extremes button:focus-visible { outline: 2px solid var(--holiday-ink); outline-offset: 2px; }

.holiday-snow-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-top: 8px;
  color: var(--atlas-muted);
  font-size: .8rem;
}

.holiday-snow-legend li { display: inline-flex; align-items: center; gap: 6px; }

.holiday-snow-legend li::before {
  content: "";
  width: 12px;
  height: 12px;
  border: 1px solid var(--snow-border);
  border-radius: 3px;
  background: var(--snow-fill);
}

.holiday-snow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(66px, 1fr));
  gap: 5px;
  margin-top: 10px;
  font-variant-numeric: tabular-nums;
}

[data-snow="white"] { --snow-fill: #dceff8; --snow-border: #a9cfe2; }
[data-snow="little"] { --snow-fill: #f7f3e8; --snow-border: #dfd6bf; }
[data-snow="coded"] { --snow-fill: #f0eaf8; --snow-border: #cdc1e0; }
[data-snow="missing"] {
  --snow-fill: repeating-linear-gradient(135deg, #f5f6f8 0 4px, #e9edf0 4px 5px);
  --snow-border: #d6dfe4;
}

.holiday-snow-grid :is(a, .holiday-snow-tile) {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 5px 4px;
  border: 1px solid var(--snow-border);
  border-radius: 6px;
  background: var(--snow-fill);
  color: var(--atlas-muted);
  font-size: .75rem;
  text-align: center;
  text-decoration: none;
}

.holiday-snow-grid a:hover { border-color: var(--holiday-ink); text-decoration: underline; }
.holiday-snow-grid strong { color: var(--holiday-ink); font-size: .875rem; }
.holiday-snow-grid [data-snow="coded"] :is(a, .holiday-snow-tile) { padding-inline: 2px; }
.holiday-snow-grid [data-snow="coded"] strong { font-size: .6875rem; }

.holiday-table-scroll {
  overflow-x: auto;
  margin-top: 14px;
  border: 1px solid #d3dfe5;
  border-radius: 8px;
}

.holiday-table {
  width: 100%;
  color: var(--atlas-ink);
  font-size: .875rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.holiday-table :is(th, td) { padding: 7px 12px; text-align: right; }
.holiday-table :is(th:first-child, .holiday-day), .holiday-table thead th:nth-child(2) { text-align: left; }
.holiday-table thead { background: var(--holiday-tint); color: var(--holiday-ink); }
.holiday-table thead span { color: var(--atlas-muted); font-size: .75rem; font-weight: 400; }
.holiday-table tbody { border-top: 1px solid #d3dfe5; }
.holiday-table tbody:nth-of-type(even) { background: #f7f9fa; }
.holiday-table tbody:has(:target) { background: var(--holiday-tint); }
.holiday-table .holiday-year { vertical-align: top; scroll-margin-top: 12px; }
.holiday-day { font-weight: 600; }
.holiday-day time { display: block; color: var(--atlas-muted); font-size: .75rem; font-weight: 400; }
.holiday-missing { color: var(--atlas-muted); }

:is(.holiday-page, .station-holiday-links) :is(a, .holiday-table-scroll):focus-visible {
  outline: 2px solid var(--atlas-accent);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .holiday-temperature-extremes { margin-inline-start: 0; }
  .holiday-table :is(th, td) { padding-inline: 8px; }
  .holiday-snow-grid { grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); }
}
