:root {
  color-scheme: light;
  /* Palette & tokens (codex branch) */
  --bg: #f1f6f3;
  --surface: #ffffff;
  --surface-subtle: #e6eeea;
  --surface-tint: #dfe8e3;
  --ink: #091d16;
  --muted: #27483d;
  --muted-soft: #436257;
  --accent: #1f6e5c;
  --accent-dark: #145143;
  --accent-on: #fdfcfb;
  --border: #bed1c9;
  --border-strong: #739184;
  --shadow-soft: 0 28px 60px -38px rgba(16, 37, 29, 0.45);
  --focus-outline: 2px solid var(--accent);
  --focus-offset: 3px;
  --max-width: 1120px;
  --font-stack: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-stack);
  background: linear-gradient(180deg, #f6faf8 0%, #eef4f1 48%, #e6efe9 100%);
  color: var(--ink);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover,
a:focus {
  text-decoration: underline;
  color: var(--accent-dark);
}
a:focus-visible,
button:focus-visible {
  outline: var(--focus-outline);
  outline-offset: var(--focus-offset);
}

/* Accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 16px;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: var(--accent-on);
  font-weight: 600;
  border-radius: 6px; /* unify */
  transition: top 0.3s ease;
  z-index: 1000;
}
.skip-link:focus { top: 16px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem clamp(1rem, 4vw, 2rem);
  background: rgba(246, 250, 247, 0.94);
  border-bottom: 1px solid rgba(190, 209, 201, 0.9);
  backdrop-filter: blur(12px);
}
.logo {
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--ink);
  font-size: clamp(1.05rem, 2.5vw, 1.2rem);
}
.logo:hover,
.logo:focus { text-decoration: none; }

.header-cta {
  padding: 0.6rem 1.5rem;
  background: var(--accent);
  color: var(--accent-on);
  font-weight: 700;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
  box-shadow: 0 14px 26px rgba(31, 110, 92, 0.25);
}
.header-cta:hover,
.header-cta:focus-visible {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

/* Page shell */
.page {
  flex: 1;
  width: min(100%, var(--max-width));
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 3.75rem) clamp(1.25rem, 4vw, 2.65rem) clamp(3.5rem, 6vw, 4.5rem);
  display: flex;
  flex-direction: column;
  gap: clamp(2.15rem, 4.5vw, 2.85rem);
}
.page > section { position: relative; }

/* Hero */
.hero {
  display: grid;
  gap: clamp(1.2rem, 3vw, 1.75rem);
  padding: clamp(2.1rem, 3vw, 2.75rem) clamp(1.8rem, 3.2vw, 2.75rem);
  border: 1px solid rgba(190, 209, 201, 0.8);
  border-radius: 16px;
  background: linear-gradient(130deg, rgba(31, 110, 92, 0.14) 0%, rgba(223, 232, 227, 0.62) 46%, rgba(255, 255, 255, 0.96) 100%);
  box-shadow: 0 28px 62px -38px rgba(16, 37, 29, 0.4);
}
.hero h1 {
  margin: 0;
  font-size: clamp(2.6rem, 6.2vw, 3.5rem);
  line-height: 1.05;
}
.lede {
  margin: 0;
  max-width: 760px;
  font-size: clamp(1.05rem, 2.4vw, 1.2rem);
  color: var(--muted);
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Hero notes (codex) */
.hero-notes {
  margin: 0;
  padding: clamp(1rem, 2vw, 1.3rem) 0 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  border-top: 1px solid rgba(196, 214, 207, 0.75);
  color: var(--muted);
  font-size: 0.97rem;
  font-weight: 500;
}
.hero-notes li { position: relative; padding-left: 1.35rem; }
.hero-notes li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.8rem;
  width: 0.85rem; height: 2px;
  background: var(--accent);
  border-radius: 999px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  border-radius: 4px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.btn-primary { background: var(--accent); color: var(--accent-on); }
.btn-primary:hover,
.btn-primary:focus-visible { background: var(--accent-dark); transform: translateY(-1px); }

.btn-secondary {
  background: var(--surface);
  border-color: rgba(31, 110, 92, 0.35);
  color: var(--accent);
}
.btn-secondary:hover,
.btn-secondary:focus-visible { background: var(--surface-subtle); }

.btn-tertiary {
  background: var(--surface-subtle);
  border-color: rgba(16, 37, 29, 0.08);
  color: var(--ink);
}
.btn-tertiary:hover,
.btn-tertiary:focus-visible { background: var(--surface-tint); }

/* Support links */
.support-links {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 0.96rem;
  color: var(--muted-soft);
}
.support-links .divider { color: var(--border-strong); }

/* Calendar block */
.calendar {
  display: grid;
  gap: 1.2rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(230, 238, 234, 0.88) 100%);
  border: 1px solid rgba(190, 209, 201, 0.75);
  border-radius: 14px;
  padding: clamp(1.65rem, 3vw, 2.35rem) clamp(1.6rem, 4vw, 2.75rem);
  box-shadow: 0 20px 42px -34px rgba(16, 37, 29, 0.45);
}
.calendar h2 { margin: 0; }
.tip { margin: 0; color: var(--muted-soft); font-size: 0.95rem; font-style: italic; }
.calendar-frame {
  width: 100%;
  min-height: 560px;
  border: 1px solid rgba(196, 214, 207, 0.9);
  background: var(--surface-subtle);
  border-radius: 8px;
}
.calendar-fallback { margin: 0; font-size: 0.95rem; }

/* Disclaimer */
.disclaimer {
  display: grid;
  gap: 0.85rem;
  font-size: 0.98rem;
  background: linear-gradient(135deg, rgba(223, 232, 227, 0.7) 0%, rgba(255, 255, 255, 0.95) 100%);
  border: 1px solid rgba(190, 209, 201, 0.75);
  border-radius: 14px;
  padding: clamp(1.7rem, 3vw, 2.3rem) clamp(1.7rem, 4vw, 2.6rem);
  box-shadow: 0 20px 40px -36px rgba(16, 37, 29, 0.4);
}
.disclaimer h2 { margin: 0; }

/* News */
.news {
  display: grid;
  gap: 1.5rem;
}
.coverage-note { margin: 0; color: var(--muted-soft); font-size: 0.95rem; }

.news-feed {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  padding: clamp(1.4rem, 3vw, 2rem) clamp(1.4rem, 4vw, 2.4rem);
  box-shadow: 0 20px 40px -36px rgba(16, 37, 29, 0.36);
}

.news-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: clamp(1rem, 3vw, 1.5rem);
}

.news-item {
  display: grid;
  gap: 0.65rem;
  padding: clamp(1.05rem, 3vw, 1.3rem);
  border: 1px solid rgba(190, 209, 201, 0.75);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(223, 232, 227, 0.32) 0%, rgba(255, 255, 255, 0.86) 100%);
}

.news-item--message {
  justify-items: center;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-soft);
}

.news-descriptor {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-soft);
}

.news-item h3 {
  margin: 0;
  font-size: clamp(1.05rem, 2.4vw, 1.28rem);
}

.news-item a {
  color: var(--ink);
  font-weight: 650;
  text-decoration: none;
}

.news-item a:hover,
.news-item a:focus-visible {
  color: var(--accent-dark);
  text-decoration: underline;
}

.news-summary {
  margin: 0;
  color: var(--muted);
}

.news-meta {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.news-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.news-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(248, 113, 113, 0.32);
  background: rgba(248, 113, 113, 0.14);
  color: rgba(194, 52, 52, 0.86);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.news-tags {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-soft);
}

.news-tags span {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(31, 110, 92, 0.12);
  border: 1px solid rgba(31, 110, 92, 0.28);
  color: var(--accent);
}

.news-status {
  margin-bottom: clamp(0.5rem, 2vw, 0.75rem);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-soft);
}
.news-status[hidden] { display: none; }

/* Resources + Newsletter */
.resources {
  display: grid;
  gap: 1.5rem;
}

.resource-layout {
  display: grid;
  gap: clamp(1.5rem, 4vw, 2.3rem);
}

.resource-links {
  margin: 0; padding: 0; list-style: none;
  display: grid; gap: 1rem;
}
.resource-links li {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.15rem 1.4rem;
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(16, 37, 29, 0.08);
  display: grid; gap: 0.4rem;
  position: relative;
}
.resource-links li::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: 12px;
  border-left: 4px solid var(--accent);
  pointer-events: none;
}
.resource-links a { font-weight: 600; color: var(--ink); }
.link-note { font-size: 0.9rem; color: var(--muted-soft); }

.newsletter {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.4rem 1.6rem 1.8rem;
  background: linear-gradient(145deg, var(--surface), var(--surface-subtle));
  box-shadow: 0 12px 28px rgba(16, 37, 29, 0.08);
  display: grid; gap: 0.9rem;
}
.newsletter h3 { margin: 0; }
.newsletter p { margin: 0; color: var(--muted); }
.newsletter-fallback { font-size: 0.88rem; color: var(--muted-soft); }

/* Footer */
.site-footer {
  width: min(100%, var(--max-width));
  margin: 0 auto clamp(3rem, 6vw, 4.5rem);
  padding: 1.65rem clamp(1.25rem, 4vw, 2.5rem) 0;
  display: grid;
  gap: 1.1rem;
  color: var(--muted-soft);
  font-size: 0.95rem;
}
.site-footer p { margin: 0; }
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.footer-nav a { color: var(--accent); font-weight: 600; }

/* Sticky CTA */
.sticky-cta {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--surface);
  border: 1px solid rgba(190, 209, 201, 0.85);
  padding: 0.75rem 0.95rem 0.75rem 1.1rem;
  box-shadow: 0 18px 36px rgba(16, 37, 29, 0.18);
  border-radius: 12px;
  transform: translateY(140%);
  transition: transform 0.3s ease;
  z-index: 900;
}
.sticky-cta.is-visible { transform: translateY(0); }
.sticky-cta-text { font-size: 0.95rem; color: var(--muted); }

/* Layout tweaks */
@media (min-width: 960px) {
  .hero {
    display: grid;
    grid-template-columns: minmax(0, 0.63fr) minmax(0, 0.37fr);
    column-gap: clamp(1.75rem, 4vw, 2.85rem);
    align-items: start;
  }
  .hero h1,
  .hero .lede,
  .hero .cta-row,
  .hero .support-links { grid-column: 1 / 2; }
  .hero-notes {
    grid-column: 2 / 3;
    border-top: none; padding-top: 0;
    border-left: 1px solid rgba(190, 209, 201, 0.75);
    padding-left: clamp(1.4rem, 3vw, 2.35rem);
    gap: 0.85rem;
  }
  .hero-notes li { padding-left: 1.15rem; }
}

@media (min-width: 640px) {
  .news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 900px) {
  .news-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .resource-layout {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: start;
  }
}

/* Mobile */
@media (max-width: 820px) {
  .site-header { position: static; }
}
@media (max-width: 700px) {
  .page { gap: 1.75rem; }
  .hero { padding: 1.75rem 1.5rem; }
  .cta-row { flex-direction: column; align-items: stretch; }
  .calendar-frame { min-height: 520px; }
  .sticky-cta {
    left: 16px; right: 16px; bottom: 16px;
    flex-direction: column; align-items: stretch;
    padding: 0.85rem 1rem;
  }
  .sticky-cta-text { text-align: center; }
}
@media (max-width: 480px) {
  .site-header { padding-inline: 1rem; }
  .header-cta { font-size: 0.95rem; }
  .hero h1 { font-size: 2.2rem; }
  .calendar-frame { min-height: 480px; }
}
