:root {
  --ink: #18212f;
  --muted: #6e7580;
  --line: #e6e5e1;
  --blue: #123f7b;
  --red: #d52b1e;
  --paper: #f8f8f6;
  --white: #fff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Arial, Helvetica, sans-serif; -webkit-font-smoothing: antialiased; }
button, select { font: inherit; }
button, select, a { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
.noscript-message { max-width: 960px; margin: 16px auto 0; padding: 12px 16px; background: #fff4d8; border: 1px solid #ead8aa; border-radius: 8px; color: #5f522f; font-size: 14px; line-height: 1.5; }
.noscript-message a { color: var(--blue); }

.site-header { max-width: 1040px; height: 70px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-size: 17px; font-weight: 750; letter-spacing: -.02em; }
.brand img { width: 39px; height: 26px; object-fit: cover; border-radius: 4px; box-shadow: 0 1px 4px #1c29401f; }
.source-link { color: #858b93; text-decoration: none; font-size: 12px; }
.source-link:hover { color: var(--blue); }

.app-shell { max-width: 960px; margin: 0 auto; padding: 44px 24px 60px; display: grid; grid-template-columns: 138px minmax(0, 1fr); gap: 42px; }
.year-nav { position: sticky; top: 24px; align-self: start; }
.nav-label, .all-years label { display: block; margin: 0 0 9px; color: #747b84; font-size: 12px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.recent-years { display: grid; gap: 3px; }
.year-button { width: 100%; border: 0; border-radius: 7px; padding: 10px 11px; background: transparent; color: #4e5865; cursor: pointer; text-align: left; font-size: 15px; font-weight: 650; transition: background .15s ease, color .15s ease; }
.year-button:hover { background: #efefec; color: var(--ink); }
.year-button.active { background: var(--blue); color: var(--white); }
.all-years { margin-top: 23px; padding-top: 18px; border-top: 1px solid var(--line); }
.all-years select { width: 100%; height: 42px; border: 1px solid #d9d8d3; border-radius: 7px; padding: 0 8px; background: var(--white); color: var(--ink); cursor: pointer; font-size: 15px; }

.holidays { min-width: 0; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.eyebrow { margin: 0 0 7px; color: var(--red); font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
h1 { margin: 0; color: var(--ink); font-size: clamp(31px, 5vw, 43px); line-height: 1; letter-spacing: -.05em; }
h1 span { color: var(--blue); }
.year-total { margin: 0 0 3px; color: #858b93; font-size: 13px; white-space: nowrap; }
.year-total strong { color: var(--ink); font-size: 18px; }
.summary { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-bottom: 22px; color: #858b93; font-size: 13px; }
.summary b { color: #3e4650; }

.next-holiday { margin-bottom: 30px; padding: 22px 24px; display: grid; grid-template-columns: minmax(180px, 1fr) 300px; align-items: center; gap: 28px; background: #edf4fa; border: 1px solid #d7e5f1; border-radius: 13px; }
.next-label { margin: 0 0 7px; color: var(--red); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.next-intro h2 { margin: 0; color: var(--ink); font-size: 21px; line-height: 1.25; letter-spacing: -.025em; }
.next-date { margin: 7px 0 0; color: #4f5f70; font-size: 14px; }
.next-distance { display: inline-block; margin-top: 11px; color: var(--blue); font-size: 13px; font-weight: 750; }
.next-intro .holiday-meta { margin-top: 10px; }
.next-holiday .week-day.active { background: var(--red); box-shadow: 0 3px 10px #d52b1e24; }

.calendar-card { min-height: 260px; }
.months { display: grid; gap: 32px; }
.month-section { overflow: hidden; background: var(--white); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 7px 25px #26344a08; }
.month-heading { padding: 13px 20px; display: flex; align-items: baseline; justify-content: space-between; gap: 16px; background: #f6f6f3; border-bottom: 1px solid var(--line); }
.month-heading h2 { margin: 0; color: #48515c; font-size: 18px; letter-spacing: -.02em; }
.month-heading span { color: #92979e; font-size: 12px; }
.month-list { display: grid; }
.holiday-card { min-width: 0; padding: 18px 20px; display: grid; grid-template-columns: minmax(180px, 1fr) 300px; align-items: center; gap: 24px; }
.holiday-card + .holiday-card { border-top: 1px solid #ecebe7; }
.holiday-card:hover { background: #fcfcfa; }
.holiday-card.past { opacity: .54; }
.holiday-card.past:hover { opacity: .72; }
.holiday-details { min-width: 0; }
.holiday-details h3 { margin: 0 0 9px; color: #222c39; font-size: 16px; line-height: 1.35; }
.holiday-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.badge, .non-waivable { display: inline-block; border-radius: 99px; padding: 5px 8px; font-size: 11px; font-weight: 750; }
.badge.regional { background: #f1ecf7; color: #695080; }
.non-waivable { background: #fff0ee; color: #a9362d; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.week-day { min-width: 0; height: 52px; display: grid; place-content: center; gap: 4px; border-radius: 8px; color: #7b828b; text-align: center; }
.week-day small { font-size: 11px; font-weight: 650; }
.week-day b { color: #46505c; font-size: 14px; font-weight: 650; }
.week-day.active { background: var(--blue); color: #dce9f7; box-shadow: 0 3px 10px #123f7b26; }
.week-day.active b { color: var(--white); font-size: 17px; }
.state { min-height: 260px; display: flex; justify-content: center; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; }
.loader { width: 17px; height: 17px; border: 2px solid #dfe3e7; border-top-color: var(--blue); border-radius: 50%; animation: spin .7s linear infinite; }
.error-state { flex-direction: column; padding: 30px; text-align: center; }
.error-state strong { color: var(--ink); font-size: 17px; }
.error-state button { margin-top: 5px; border: 0; border-radius: 7px; padding: 8px 12px; background: var(--blue); color: var(--white); cursor: pointer; }
.disclaimer { margin: 16px 2px 0; color: #999da3; font-size: 11px; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 700px) {
  .site-header { height: 62px; padding-inline: 17px; }
  .source-link { width: 24px; overflow: hidden; white-space: nowrap; }
  .source-link span { display: block; font-size: 17px; }
  .app-shell { display: block; padding: 24px 15px 44px; }
  .year-nav { position: static; margin-bottom: 27px; }
  .nav-label { margin-left: 2px; }
  .recent-years { display: flex; gap: 6px; overflow-x: auto; padding: 0 1px 6px; scrollbar-width: none; }
  .recent-years::-webkit-scrollbar { display: none; }
  .year-button { flex: 0 0 auto; width: auto; padding: 8px 13px; text-align: center; }
  .all-years { margin-top: 9px; padding-top: 0; border: 0; }
  .all-years label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .all-years select { height: 36px; }
  .page-heading { align-items: center; }
  .year-total { display: none; }
  .summary { margin-bottom: 19px; font-size: 13px; }
  .next-holiday { margin-bottom: 24px; padding: 18px 15px; display: block; }
  .next-intro h2 { font-size: 20px; }
  .next-holiday .week { margin-top: 18px; }
  .months { gap: 24px; }
  .month-heading { padding: 14px 16px; }
  .month-heading h2 { font-size: 19px; }
  .holiday-card { padding: 17px 15px; display: block; }
  .holiday-details h3 { font-size: 16px; }
  .week { margin-top: 15px; gap: 3px; }
  .week-day { height: 49px; }
  .week-day small { font-size: 10px; }
  .week-day b { font-size: 13px; }
  .week-day.active b { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .loader { animation-duration: 1.5s; } }
