/* ============================================
   Texas School Calendar Design System
   Palette: Sunshine & Teal (warm white base)
   Typography: Outfit + Inter
   Style: Flat Design + Swiss Modernism
   ============================================ */

/* Fonts loaded via <link preload> in base.njk layout */

/* --- Design Tokens --- */
:root {
  --color-primary: #062a5b;
  --color-primary-dark: #001b3d;
  --color-primary-light: #4b74b5;
  --color-secondary: #0a2540;
  --color-accent: #C59B27;
  --color-accent-hover: #A67C00;
  --color-bg: #FAFAFA;
  --color-bg-alt: #F5F5F4;
  --color-surface: #FFFFFF;
  --color-text: #1C1917;
  --color-text-secondary: #57534E;
  --color-text-muted: #78716C;
  --color-border: #E7E5E4;
  --color-border-light: #F5F5F4;
  --color-holiday: #DC2626;
  --color-holiday-bg: #FEF2F2;
  --color-halfday: #B36B00;
  --color-halfday-bg: #FFF6E5;
  --color-hero-start: #F1F5F9;
  --color-hero-end: #FFFFFF;

  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.1);

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  --transition: 200ms ease;
  --max-width: 1100px;
  --nav-height: 64px;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-text);
}

h1 {
  font-size: 2.2rem;
}

h2 {
  font-size: 1.6rem;
  margin-bottom: var(--space-lg);
}

h3 {
  font-size: 1.2rem;
  margin-bottom: var(--space-md);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-accent);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.section {
  padding: var(--space-2xl) 0;
}

.section-alt {
  background-color: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
  display: flex;
  align-items: center;
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-logo:hover {
  transform: translateY(-1px) scale(1.03);
  text-shadow: 0 0 14px rgba(15, 118, 110, 0.25);
}

.nav-logo svg {
  width: 28px;
  height: 28px;
  color: #062a5b;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-logo:hover svg {
  transform: scale(1.1);
}

.tx-logo-icon {
  display: block;
  flex: 0 0 auto;
}

.tx-logo-outline {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.nav-links {
  display: flex;
  align-items: center;
    gap: var(--space-md);
  list-style: none;
}

.nav-links a {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  padding: 4px 4px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(-50%);
  border-radius: 1px;
}

.nav-links a:hover {
  color: var(--color-primary);
  transform: translateY(-1px);
  text-shadow: 0 0 12px rgba(15, 118, 110, 0.2);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
  color: var(--color-text);
}

.nav-toggle svg {
  width: 24px;
  height: 24px;
}

/* --- Hero --- */
.hero {
  margin-top: var(--nav-height);
  background: linear-gradient(135deg, var(--color-hero-start), var(--color-hero-end));
  color: var(--color-text);
  padding: var(--space-3xl) 0;
  text-align: center;
  position: relative;
  overflow: hidden; /* Added to clip the large background safely */
}

.texas-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  height: 120%; /* Safely make it larger since overflow is hidden */
  width: auto;
  min-width: 600px;
  max-width: none;
  z-index: 0;
  pointer-events: none;
  color: var(--color-primary-dark);
  opacity: 0.8;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  color: var(--color-primary-dark);
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.hero .subtitle {
  font-size: 1.15rem;
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto var(--space-xl);
  line-height: 1.6;
}

/* =========================================
   Search Component (Hero & District Browser)
   ========================================= */
.district-search-wrapper {
  position: relative;
  margin-bottom: var(--space-md);
}

.hero-search-wrapper {
  width: 100%;
  max-width: 600px;
  margin: var(--space-lg) auto var(--space-xl) auto;
  position: relative;
}

.district-search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.2rem;
  height: 1.2rem;
  color: var(--color-text-muted);
}

.hero-search-wrapper .district-search-icon {
  width: 1.4rem;
  height: 1.4rem;
  left: 1.2rem;
}

.district-search {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 1rem;
  background: var(--color-surface);
  color: var(--color-text-main);
  transition: all 0.2s ease;
}

.hero-search-wrapper .district-search {
  padding: 1rem 1.5rem 1rem 3.5rem;
  font-size: 1.1rem;
  border-radius: 3rem; /* Pill shape for hero search */
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255,255,255,0.8);
}

.district-search:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(3, 152, 158, 0.15); /* Tailwind teal-600 with opacity */
}

.hero-search-wrapper .district-search:focus {
  box-shadow: 0 0 0 4px rgba(3, 152, 158, 0.2), var(--shadow-lg);
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}


/* --- Year Switcher --- */
.year-switcher {
  display: flex;
  gap: 10px;
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.global-year-switcher {
  display: flex;
  justify-content: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-2xl);
  background: var(--color-surface);
  padding: 6px;
  border-radius: 40px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.year-tab {
  padding: 8px 24px;
  border-radius: 30px;
  background: transparent;
  color: var(--color-text-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  cursor: pointer;
}

.year-tab:hover {
  color: var(--color-primary-dark);
  background: var(--color-bg-alt);
}

.year-tab.active {
  background: var(--color-primary);
  color: white;
  box-shadow: var(--shadow-sm);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
  text-decoration: none;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: var(--color-accent);
  color: #FFFFFF;
  border-color: var(--color-accent);
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  color: #FFFFFF;
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-secondary:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #FFFFFF;
}

.btn-outline {
  background: var(--color-bg-alt);
  color: var(--color-text-secondary);
  border-color: var(--color-border);
}

.btn-outline:hover {
  background: var(--color-surface);
  border-color: var(--color-primary);
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.85rem;
}


/* --- Cards --- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-featured {
  border-left: 4px solid var(--color-primary);
}

.card-accent {
  border-left: 4px solid var(--color-accent);
}

.card-primary {
  border-left: 4px solid var(--color-primary);
}

.quick-grid-compact {
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--color-primary-dark);
}

.card-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 4px 12px;
  background: var(--color-primary);
  color: #FFFFFF;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* --- Quick Look Grid --- */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.quick-item {
  padding: var(--space-md);
  background: var(--color-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-light);
}

.quick-item-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-xs);
  font-family: var(--font-heading);
}

.quick-item-value {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-text);
}

/* --- Action Bar --- */
.action-bar {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
  padding: var(--space-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-md);
}

/* --- Tables --- */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: var(--space-xl);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: white;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

thead {
  background: rgba(15, 118, 110, 0.04); /* Soft tint of primary color */
}

thead th {
  padding: 16px 20px;
  text-align: left;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--color-border-light);
}

tbody td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border-light);
  color: var(--color-text);
  vertical-align: middle;
  font-weight: 400;
}

tbody tr:nth-child(even) {
  background: var(--color-bg-alt);
}

tbody tr:hover {
  background: var(--color-bg-alt);
}

tbody tr.holiday {
  /* zebra striping handles background; holiday distinguished by text color only */
}

tbody tr.holiday td:first-child {
  color: var(--color-text);
}

tbody tr.halfday {
  background: var(--color-halfday-bg);
}

.date-col {
  white-space: nowrap;
  font-weight: 500;
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-heading);
}

.tag-closed {
  background: #F0F4F8;
  color: #475569;
  border: 1px solid #CBD5E1;
}

.tag-halfday {
  background: #FDF9E6;
  color: #9A7B16;
  border: 1px solid #EBE0A6;
}

.tag-early-release {
  background: #FFF6E5;
  color: #B36B00;
  border: 1px solid #FADAA5;
}

.tag-event {
  background: #F0F4F8;
  color: var(--color-primary);
  border: 1px solid #D1E0F0;
}

.tag-info {
  background: #F5F0EB;
  color: #78716C;
  border: 1px solid #D6D3D1;
}

/* --- Monthly Calendar Sections --- */
.month-section {
  margin-bottom: var(--space-xl);
}

.month-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  background: var(--color-primary);
  color: #FFFFFF;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  cursor: pointer;
  transition: background var(--transition);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.05rem;
}

.month-header:hover {
  background: var(--color-primary-dark);
}

.month-header svg {
  width: 20px;
  height: 20px;
  margin-left: auto;
  transition: transform var(--transition);
}

.month-header.active svg {
  transform: rotate(180deg);
}

.month-body {
  display: none;
  border: 1px solid var(--color-border);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.month-body.open {
  display: block;
}

/* --- Interactive Map & Regions Layout --- */
.regions-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
}

@media (min-width: 900px) {
  .regions-layout {
    grid-template-columns: 350px 1fr;
    align-items: start;
  }
}

.texas-interactive-map {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  position: sticky;
  top: 100px; /* offset for sticky nav */
}

.map-svg {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.05));
}

.map-outline {
  fill: var(--color-bg-alt);
  stroke: var(--color-border);
  stroke-width: 0.5px;
}

.district-mesh {
  fill: none;
  stroke: var(--color-border);
  stroke-width: 0.15px;
  opacity: 0.7;
}

.interactive-regions .region-shape {
  fill: var(--color-primary);
  opacity: 0;
  transition: opacity var(--transition-fast, 0.2s ease);
}

.interactive-regions .region-hover {
  outline: none;
}

.interactive-regions .region-hover:hover .region-shape,
.interactive-regions .region-hover:focus-visible .region-shape {
  opacity: 0.15;
  cursor: pointer;
}

.map-pin {
  cursor: pointer;
  outline: none;
  text-decoration: none;
}

.pin-dot {
  fill: var(--color-accent);
  transition: r var(--transition), fill var(--transition);
}

.pin-label {
  font-family: var(--font-primary);
  font-size: 3.5px;
  font-weight: 600;
  fill: var(--color-text-secondary);
  transition: fill var(--transition), font-weight var(--transition);
  pointer-events: none;
}

.pin-label.text-right {
  text-anchor: end;
}

.map-pin:hover .pin-dot,
.map-pin:focus-visible .pin-dot {
  r: 2.5;
  fill: var(--color-primary);
}

.map-pin:hover .pin-label,
.map-pin:focus-visible .pin-label {
  fill: var(--color-primary-dark);
  font-weight: 700;
}

/* --- Districts Grid --- */
.districts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-sm);
}

.district-group h3 {
  font-size: 1.05rem;
  color: var(--color-primary-dark);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--color-accent);
  display: inline-block;
}

.district-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.district-list li a {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  transition: all var(--transition);
}

.district-list li a:hover {
  background: var(--color-bg-alt);
  color: var(--color-primary);
}

.district-list li a svg {
  width: 16px;
  height: 16px;
  color: var(--color-text-muted);
}

.coming-soon {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-style: italic;
  margin-left: auto;
}

.region-accordion-item.hover-highlight {
  border-color: var(--color-accent);
  background: var(--color-bg-alt);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  transition: all 0.2s ease;
}

/* --- FAQ --- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-question,
.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--space-lg);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text);
  text-align: left;
  transition: color var(--transition);
}

.faq-question:hover,
.faq-q:hover {
  color: var(--color-primary);
}

.faq-question svg,
.faq-q svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--color-text-muted);
  transition: transform var(--transition);
}

.faq-question.active svg,
.faq-q.active svg {
  transform: rotate(180deg);
}

.faq-question.active,
.faq-q.active {
  color: var(--color-primary);
}

.faq-answer,
.faq-a {
  display: none;
  padding: 0 var(--space-lg) var(--space-lg);
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.faq-answer.open,
.faq-a.open {
  display: block;
}

/* --- Related Links --- */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--space-md);
}

.related-link {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: all var(--transition);
  cursor: pointer;
  text-decoration: none;
  color: var(--color-text);
}

.related-link:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  color: var(--color-primary);
}

.related-link svg {
  width: 20px;
  height: 20px;
  color: var(--color-accent);
  flex-shrink: 0;
}

/* --- Disclaimer --- */
.disclaimer {
  padding: var(--space-lg);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.disclaimer strong {
  color: var(--color-text);
}

.last-updated {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: var(--space-md);
}

/* --- Footer --- */
.footer {
  background: #062a5b;
  color: rgba(255, 255, 255, 0.86);
  padding: 1.6rem 0 0.7rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(250px, 1.55fr) minmax(130px, 0.78fr) minmax(130px, 0.78fr) minmax(260px, 1.25fr);
  gap: clamp(1.35rem, 2.5vw, 2.35rem);
  align-items: start;
}

.footer-about {
  max-width: 310px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.14rem;
  line-height: 1.1;
  color: #FFFFFF;
  margin-bottom: 0.85rem;
}

.footer-brand-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 50px;
  flex: 0 0 auto;
}

.footer-brand-mark svg {
  width: 58px;
  height: 50px;
  display: block;
}

.footer-texas-outline {
  fill: rgba(255, 255, 255, 0.98);
  stroke: rgba(255, 255, 255, 0.98);
  stroke-width: 1.5;
  stroke-linejoin: round;
}

.footer-desc {
  max-width: 280px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
  line-height: 1.55;
}

.footer h4,
.footer-correction h2 {
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 0.85rem;
}

.footer-correction {
  /* Removed box styling for better alignment and cohesion */
}

.footer-correction p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.88rem;
  line-height: 1.45;
  margin: 0 0 1.25rem;
}

.footer-contact-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 1.25rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 700;
  transition: all 0.2s ease;
}

.footer-contact-link:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: #FFFFFF;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.45rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.62);
  flex-wrap: wrap;
}

.footer-bottom-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-legal-links {
  display: flex;
  gap: 1rem;
}

.footer-legal-links a {
  color: rgba(255, 255, 255, 0.62);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-legal-links a:hover {
  color: #fff;
}

.footer-social {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.footer-social-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  color: rgba(255, 255, 255, 0.78);
}

.footer-social svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
  display: block;
}

@media (max-width: 980px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-about,
  .footer-correction {
    grid-column: 1 / -1;
    max-width: none;
  }
}

@media (max-width: 768px) {
  .footer {
    padding-top: 1.5rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .footer-about {
    text-align: center;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .footer-brand {
    font-size: 1.15rem;
    justify-content: center;
  }

  .footer-desc {
    text-align: center;
    margin: 0 auto;
  }

  .footer-correction {
    text-align: center;
    margin-top: 0.5rem;
    padding: 0;
  }

  .footer-contact-link {
    width: 100%;
    padding: 0.75rem;
  }

  .footer-bottom {
    align-items: center;
    flex-direction: column;
    gap: 1rem;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    text-align: center;
  }

  .footer-bottom-links {
    flex-direction: column-reverse;
    gap: 0.85rem;
    justify-content: center;
    width: 100%;
  }

  .footer-legal-links {
    justify-content: center;
    width: 100%;
  }

  .footer-social {
    justify-content: center;
    width: 100%;
    gap: 1rem;
  }

  .footer-social-icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    transition: background 0.2s ease;
  }

  .footer-social-icon:hover {
    background: rgba(255, 255, 255, 0.15);
  }
}

/* --- Projected Badge --- */
.projected-notice {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-halfday-bg);
  border: 1px solid var(--color-halfday);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-accent-hover);
  margin-bottom: var(--space-lg);
}

.projected-notice svg {
  width: 16px;
  height: 16px;
}

/* --- Breadcrumb --- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) 0;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: var(--nav-height);
}

.breadcrumb a {
  color: var(--color-text-muted);
}

.breadcrumb a:hover {
  color: var(--color-primary);
}

.breadcrumb .sep {
  color: var(--color-border);
}

/* --- Visual Calendar Grid --- */
.cal-year {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
}

.cal-month {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: visible; /* Required for sticky header and tooltips to escape */
}

.cal-month-name {
  background: var(--color-primary);
  color: #FFFFFF;
  padding: 10px var(--space-lg);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--color-border-light);
  overflow: visible; /* Required for sticky */
}

.cal-dow {
  background: var(--color-primary-dark);
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  padding: 6px 2px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: sticky;
  top: var(--nav-height);
  z-index: 5;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cal-day {
  background: var(--color-surface);
  padding: 6px 4px;
  min-height: 40px;
  font-size: 0.9rem;
  text-align: center;
  font-weight: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: default;
  position: relative;
}

/* Tooltips for special days */
.cal-day.has-event {
  cursor: help;
}

.cal-day.has-event::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 5px);
  left: 50%;
  transform: translateX(-50%) translateY(5px);
  background-color: var(--color-text);
  color: white;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 50;
  pointer-events: none;
  box-shadow: var(--shadow-md);
}

.cal-day.has-event::after {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(5px);
  border-width: 5px;
  border-style: solid;
  border-color: var(--color-text) transparent transparent transparent;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 50;
  pointer-events: none;
}

.cal-day.has-event:hover {
  z-index: 60; /* Bring hovered cell above others */
}

.cal-day.has-event:hover::before,
.cal-day.has-event:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.cal-day.empty {
  background: var(--color-bg);
}

.cal-day.weekend {
  background: #F5F5F4;
  color: var(--color-text-muted);
}

.cal-day.no-school {
  background: #F5F5F4;
  color: var(--color-text-muted);
  opacity: 0.5;
}

.cal-day.school {
  background: var(--color-surface);
  color: var(--color-text);
}

.cal-day.early-release {
  background: var(--color-surface);
  color: var(--color-text);
}
.cal-day.early-release span {
  border-bottom: 3px solid var(--color-accent);
  padding-bottom: 2px;
  display: inline-block;
  min-width: 18px;
  text-align: center;
}

.cal-day.holiday {
  background: var(--color-holiday-bg);
  color: var(--color-holiday);
  font-weight: 700;
}

.cal-day.break {
  background: var(--color-halfday-bg);
  color: var(--color-accent-hover);
  font-weight: 600;
}

.cal-day.first-day,
.cal-day.last-day {
  background: var(--color-primary);
  color: #FFFFFF;
  font-weight: 700;
  border-radius: 0;
}

.cal-day.exam {
  background: #ECFDF5;
  color: #065F46;
  font-weight: 500;
}

.cal-day.teacher-day {
  background: #F1F5F9;
  color: #334155;
  font-weight: 600;
}

.cal-day .cal-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  margin-top: 2px;
}

.cal-day.holiday .cal-dot {
  background: var(--color-holiday);
}

.cal-day.break .cal-dot {
  background: var(--color-accent);
}

.cal-day.first-day .cal-dot,
.cal-day.last-day .cal-dot {
  background: #FFFFFF;
}

.cal-day.exam .cal-dot {
  background: #065F46;
}

.cal-day.teacher-day .cal-dot {
  background: #475569;
}

.cal-events {
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--color-border-light);
  font-size: 0.82rem;
  color: var(--color-text-secondary);
  line-height: 1.8;
}

.cal-events ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cal-events li {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.cal-events .ev-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cal-events .ev-dot.dot-holiday {
  background: var(--color-holiday);
}

.cal-events .ev-dot.dot-break {
  background: var(--color-accent);
}

.cal-events .ev-dot.dot-event {
  background: var(--color-primary);
}

.cal-events .ev-dot.dot-exam {
  background: #065F46;
}

.cal-events .ev-dot.dot-teacher {
  background: #475569;
}

.cal-events .ev-dot.dot-early-release {
  background: var(--color-accent);
}

.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md) var(--space-xl);
  padding: var(--space-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-xl);
  font-size: 0.85rem;
  color: var(--color-text-secondary);
}

.cal-legend-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.cal-legend-swatch {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid var(--color-border);
}

.cal-legend-swatch.sw-school {
  background: var(--color-surface);
}

.cal-legend-swatch.sw-weekend {
  background: #F5F5F4;
}

.cal-legend-swatch.sw-holiday {
  background: var(--color-holiday-bg);
  border-color: var(--color-holiday);
}

.cal-legend-swatch.sw-break {
  background: var(--color-halfday-bg);
  border-color: var(--color-accent);
}

.cal-legend-swatch.sw-first {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.cal-legend-swatch.sw-exam {
  background: #ECFDF5;
  border-color: #065F46;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  body {
    font-size: 16px;
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.35rem;
  }

  .hero {
    padding: var(--space-2xl) 0;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .hero .subtitle {
    font-size: 1rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .nav-links {
    display: none;
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-lg);
    box-shadow: var(--shadow-lg);
  }

  .nav-toggle {
    display: block;
  }

  .quick-grid {
    grid-template-columns: 1fr;
  }

  .action-bar {
    flex-direction: column;
  }

  .action-bar .btn {
    width: 100%;
  }

  .districts-grid {
    grid-template-columns: 1fr;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .cal-year {
    grid-template-columns: 1fr;
  }

  .cal-day {
    min-height: 34px;
    font-size: 0.8rem;
    padding: 4px 2px;
  }

  .cal-dow {
    font-size: 0.65rem;
    padding: 4px 2px;
  }

  .cal-legend {
    gap: var(--space-sm) var(--space-md);
    font-size: 0.8rem;
  }


  .section {
    padding: var(--space-2xl) 0;
  }

  .container {
    padding: 0 var(--space-md);
  }

  table {
    font-size: 0.85rem;
  }

  thead th,
  tbody td {
    padding: 10px 12px;
  }

  /* P1: Nav overlay backdrop when mobile menu is open */
  .nav-links.open::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: -1;
  }

  /* P1: Year switcher 閳?larger touch targets */
  .year-tab {
    padding: 10px 20px;
    min-height: 44px;
    font-size: 0.9rem;
  }

  /* P1: Hide map on mobile, show accordion first */
  .texas-interactive-map {
    display: none;
  }

  .regions-layout {
    grid-template-columns: 1fr;
  }

  /* P1: Calendar tooltip 閳?tap-to-show on touch devices */
  .cal-day.has-event.tapped::before,
  .cal-day.has-event.tapped::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
  }

  .cal-day.has-event.tapped {
    z-index: 60;
  }
}

/* Lock body scroll when menu is open */
body.menu-open {
  overflow: hidden;
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.5rem;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}

/* --- Print --- Only calendar grid prints ---
   The "printing" class is toggled by script.js on body
   before/after window.print(). This lets us hide
   everything except #full-calendar reliably.
   ============================================ */
/* Hidden on screen, shown only in print */
.print-domain {
  display: none;
}

@media print {

  /* White background, tight page */
  body {
    background: #fff !important;
    margin: 0;
    padding: 0;
    font-size: 9pt;
  }

  @page {
    size: letter portrait;
    margin: 0.25in;
  }

  /* ---------- Hide ALL non-calendar content ---------- */
  body.printing .nav,
  body.printing .footer,
  body.printing .breadcrumb,
  body.printing .action-bar,
  body.printing .projected-notice,
  body.printing .hero,
  body.printing .hero-actions,
  body.printing .nav-toggle,
  body.printing #key-dates,
  body.printing #faq,
  body.printing .faq-list,
  body.printing .related-grid,
  body.printing .related-link,
  body.printing .disclaimer,
  body.printing .last-updated,
  body.printing .table-wrapper,
  body.printing .section:not(#full-calendar) {
    display: none !important;
  }

  /* Also hide the top breadcrumb container (direct child div) */
  body.printing>.container {
    display: none !important;
  }

  body.printing>nav {
    display: none !important;
  }

  body.printing>footer {
    display: none !important;
  }

  body.printing .district-page {
    margin-top: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }

  /* ---------- Show ONLY #full-calendar ---------- */
  body.printing #full-calendar {
    display: block !important;
    padding: 0 !important;
  }

  body.printing #full-calendar .container {
    padding: 0 !important;
    max-width: 100% !important;
  }

  /* Calendar title at top of print */
  body.printing #full-calendar h2 {
    font-size: 16pt;
    font-weight: 800;
    margin-top: 0;
    margin-bottom: 8pt;
    text-align: center;
  }

  /* Domain name floats right on same line as title */
  body.printing .print-domain {
    display: inline !important;
    float: right;
    font-size: 10pt;
    font-weight: 500;
    color: #555;
    margin-top: 4pt;
  }

  /* Hide the subtitle paragraph */
  body.printing #full-calendar>.container>p {
    display: none !important;
  }

  /* ---------- Legend (compact) ---------- */
  body.printing .cal-legend {
    border: 1px solid #ccc;
    padding: 3pt 8pt;
    margin-bottom: 5pt;
    font-size: 7pt;
    gap: 3pt 10pt;
    page-break-after: avoid;
  }

  body.printing .cal-legend-swatch.sw-weekend {
    background: #F8FAFC !important;
    border-color: #F8FAFC !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.printing .cal-legend-swatch.sw-break {
    background: #E5E7EB !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* ---------- Calendar grid: 3 cols, tight (12 months) ---------- */
  body.printing .cal-year {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6pt !important;
  }

  body.printing .cal-month {
    page-break-inside: avoid;
    border: 1px solid #94A3B8 !important;
    box-shadow: none;
  }
  body.printing .cal-grid {
    background: #94A3B8 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.printing .cal-month-name {
    background: #334155 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    color: #fff !important;
    padding: 2pt 6pt;
    font-size: 8pt;
  }

  body.printing .cal-dow {
    background: #1E293B !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    color: #fff !important;
    font-size: 5.5pt;
    padding: 2pt 1pt;
  }

  body.printing .cal-day {
    min-height: 16px;
    font-size: 6.5pt;
    padding: 1pt 1pt;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* --- Print-optimized colors ---
     Deeper same-hue tones that:
     閳?Color printer 閳?vibrant, beautiful output
     閳?B&W printer  閳?well-separated gray levels
     Grayscale luminance targets:
       School  100%  |  Weekend 88%  |  Break 83%
       Exam    80%   |  Holiday 75%  |  First/Last 30%
     -------------------------------------------- */

  body.printing .cal-day.holiday {
    background: #FFFFFF !important;
    color: #000000 !important;
    border: 2px solid #000000 !important;
    font-weight: 800;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.printing .cal-day.break {
    background: #E5E7EB !important;
    color: #000000 !important;
    font-weight: 600;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.printing .cal-day.exam {
    background: #A8D8B8 !important;
    /* sage green 閳?gray 閳?0% */
    color: #064E3B !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.printing .cal-day.first-day,
  body.printing .cal-day.last-day {
    background: #1E293B !important;
    /* deep slate 閳?gray 閳?8% */
    color: #fff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.printing .cal-day.teacher-day {
    background: repeating-linear-gradient(45deg, #FFFFFF, #FFFFFF 4px, #CBD5E1 4px, #CBD5E1 8px) !important;
    color: #334155 !important;
    font-weight: 700;
    text-shadow: -1.5px -1.5px 0 #fff, 1.5px -1.5px 0 #fff, -1.5px 1.5px 0 #fff, 1.5px 1.5px 0 #fff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  
  body.printing .cal-day.teacher-day .cal-dot {
    background: #475569 !important;
    box-shadow: 0 0 0 1.5px #fff !important;
  }

  body.printing .cal-day.weekend {
    background: #F8FAFC !important;
    /* very light slate/gray */
    color: #94A3B8 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.printing .cal-day.no-school {
    background: #ECECEC !important;
    /* lighter gray 閳?gray 閳?3% */
    opacity: 0.7;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.printing .cal-day .cal-dot {
    display: none;
  }

  /* --- Legend swatches: match deeper print colors --- */
  body.printing .cal-legend-swatch.sw-holiday {
    background: #FFFFFF !important;
    border: 2px solid #000000 !important;
  }

  body.printing .cal-legend-swatch.sw-break {
    background: #E5E7EB !important;
    border-color: #9CA3AF !important;
  }

  body.printing .cal-legend-swatch.sw-weekend {
    background: #DCDCDC !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.printing .cal-legend-swatch.sw-exam {
    background: #A8D8B8 !important;
    border-color: #065F46 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.printing .cal-legend-swatch.sw-first {
    background: #1E293B !important;
    border-color: #1E293B !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* --- Event list below each month --- */
  body.printing .cal-events {
    font-size: 7.5pt;
    padding: 4pt 6pt;
    line-height: 1.5;
  }

  body.printing .cal-events ul {
    display: block;
    padding-left: 10pt;
  }

  body.printing .cal-events li {
    display: list-item;
    list-style-type: square;
    margin-bottom: 2pt;
  }

  body.printing .cal-events .ev-dot {
    display: none !important;
  }

  /* Early Release / Half Day — underline survives print */
  body.printing .cal-day.early-release span {
    border-bottom: 2px solid #1C1917 !important;
    padding-bottom: 1px;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* --- Back to Top Button --- */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--color-accent);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  z-index: 99;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--color-accent-hover);
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.back-to-top svg {
  width: 24px;
  height: 24px;
}

@media (max-width: 768px) {
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
  }

  .back-to-top svg {
    width: 20px;
    height: 20px;
  }
}

/* --- Accessibility --- */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ============================================
   District Browser 閳?Search + Accordion + Map
   ============================================ */

.district-browser {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

/* Search box */
.district-search-wrapper {
  position: relative;
}

.district-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--color-text-muted);
  pointer-events: none;
}

.district-search {
  width: 100%;
  padding: 12px 16px 12px 42px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-surface);
  transition: all var(--transition);
}

.district-search:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}

/* Accordion items */
.region-accordion-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow var(--transition);
}

.region-accordion-item:hover {
  box-shadow: var(--shadow-sm);
}

.region-accordion-item.active {
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
}

.region-accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--space-md) var(--space-lg);
  background: var(--color-bg);
  border: none;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-primary-dark);
  text-align: left;
  transition: background var(--transition), color var(--transition);
  gap: var(--space-sm);
}

.region-accordion-header:hover {
  background: var(--color-bg-alt, #F5F5F4);
  color: var(--color-primary);
}

.region-accordion-header .region-count {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-left: var(--space-xs);
}

.region-accordion-header svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--color-text-muted);
  transition: transform 0.3s ease;
}

.region-accordion-header.open svg {
  transform: rotate(180deg);
}

.region-accordion-header.open {
  color: var(--color-primary);
  border-bottom: 1px solid var(--color-border-light);
}

/* Accordion body 閳?smooth collapse */
.region-accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  background: var(--color-surface);
}

.region-accordion-body.open {
  max-height: 420px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
}

.region-accordion-body::-webkit-scrollbar {
  width: 5px;
}

.region-accordion-body::-webkit-scrollbar-track {
  background: transparent;
}

.region-accordion-body::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 3px;
}

@media (max-width: 768px) {
  .region-accordion-body.open {
    max-height: 320px;
  }
}

/* District list inside accordion */
.region-accordion-body ul {
  list-style: none;
  padding: var(--space-sm) 0;
  margin: 0;
}

.region-accordion-body li {
  border-bottom: 1px solid var(--color-border-light);
}

.region-accordion-body li:last-child {
  border-bottom: none;
}

.region-accordion-body li a,
.region-accordion-body li .district-pending {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  font-size: 0.93rem;
  transition: all var(--transition);
}

.region-accordion-body li a {
  color: var(--color-text-secondary);
  text-decoration: none;
}

.region-accordion-body li a:hover {
  background: var(--color-bg-alt, #F5F5F4);
  color: var(--color-primary);
}

.region-accordion-body li a svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--color-accent);
}

/* Districts without a published page yet */
.district-pending {
  color: var(--color-text-muted);
  cursor: default;
}

.district-pending svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--color-border);
}

.district-pending .pending-badge {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--color-bg);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Search no results */
.district-no-results {
  padding: var(--space-xl);
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  display: none;
}

/* Hidden during search */
.region-accordion-body li.search-hidden {
  display: none;
}

/* Map region active/dimmed states */
.interactive-regions .region-hover.map-active .region-shape {
  fill: var(--color-accent);
  fill-opacity: 0.25;
  stroke: var(--color-accent);
  stroke-width: 1.5;
}

.interactive-regions .region-hover.map-dimmed {
  opacity: 0.3;
}

/* --- District Hero Visual Treatment --- */
.district-hero {
  border-top: 4px solid transparent;
  border-image: linear-gradient(90deg, var(--color-accent), var(--color-primary)) 1;
  border-bottom: 1px solid var(--color-border);
}

/* --- Bento Grid Hero Layout --- */

/* --- Year Switcher Tabs --- */
.year-switcher {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.year-tab {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  border: 2px solid var(--color-border);
  color: var(--color-text);
  background: transparent;
  transition: all 0.2s ease;
  cursor: pointer;
}

.year-tab:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.year-tab.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

/* --- Bento Grid Hero Layout --- */
.hero-split {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  align-items: center;
}

@media (min-width: 992px) {
  .hero-split {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }
  .hero-left {
    flex: 1;
    max-width: 60%;
    padding-right: var(--space-2xl);
  }
  .hero-right {
    flex-shrink: 0;
    width: 380px;
  }
}

.bento-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  width: 100%;
}

.bento-card {
  background: var(--color-surface);
  border-radius: 16px;
  padding: var(--space-lg);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.03);
  border: 1px solid rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bento-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
}

.bento-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.bento-bookends {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) var(--space-xl);
}

.bento-half {
  display: flex;
  flex-direction: column;
}

.bento-align-right {
  align-items: flex-end;
  text-align: right;
}

.bento-divider {
  width: 1px;
  height: 40px;
  background: var(--color-border);
  margin: 0 var(--space-md);
}

.bento-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.bento-value {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.2;
}

.bento-bookends .bento-value {
  font-size: 1.35rem;
}

.bento-highlight {
  border: 1px solid rgba(15, 118, 110, 0.15); /* primary tint */
  background: linear-gradient(180deg, #FFFFFF 0%, #F0FDF4 100%);
}

.bento-highlight-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-sm);
}

.bento-highlight .bento-label {
  margin-bottom: 0;
  color: var(--color-primary-dark);
}

.badge-tag {
  background: rgba(15, 118, 110, 0.1);
  color: var(--color-primary-dark);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 100px;
  font-weight: 700;
}

/* --- Status Notice (Official / Projected) --- */
.status-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  border: 1px solid;
  margin: var(--space-lg) 0;
  font-size: 0.9rem;
  line-height: 1.5;
  max-width: 850px;
}

.status-notice svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.status-notice.status-official {
  background: var(--color-accent-light);
  border-color: rgba(13, 148, 136, 0.25);
  color: var(--color-accent-hover);
}

.status-notice.status-projected {
  background: #FFF7ED;
  border-color: rgba(234, 179, 8, 0.35);
  color: #92400E;
}

/* --- Action Bar --- */
.action-bar {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-top: var(--space-xl);
}

.action-bar .btn {
  flex: 1 1 0;
  justify-content: center;
  text-align: center;
}

.action-bar-hint {
  width: 100%;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin: 0;
}

.action-bar-hint a {
  color: var(--color-text-secondary);
  text-decoration: underline;
}

.action-bar-hint a:hover {
  color: var(--color-primary);
}

/* ========================================
   District Detail Page Redesign
   ======================================== */
.district-page {
  margin-top: var(--nav-height);
  background: #f8fafc;
  color: #071d41;
}

.district-page .container {
  max-width: 1180px;
}

.district-page .section {
  padding: 2rem 0;
}

.district-page .section-alt {
  background: transparent;
  border: 0;
}

.district-page h1,
.district-page h2,
.district-page h3 {
  color: #062a5b;
}

.district-breadcrumb-wrap {
  padding-top: 0.9rem;
}

.district-page .breadcrumb {
  margin-top: 0;
  padding: 0;
  color: #52637a;
  font-size: 0.84rem;
}

.district-page .breadcrumb a,
.district-page .breadcrumb span {
  color: #52637a;
}

.district-page .breadcrumb a:hover {
  color: #062a5b;
}

.district-page .breadcrumb .sep {
  color: #a8b5c6;
}

.district-page .district-hero {
  position: relative;
  overflow: hidden;
  padding: 1.05rem 0 1.55rem;
  background: linear-gradient(180deg, #f4f8fc 0%, #f8fafc 100%);
  border-top: 0;
  border-bottom: 1px solid #dbe4f0;
  border-image: none;
}

.district-page .hero-split {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.85fr);
  gap: 1rem;
  align-items: stretch;
}

.district-page .hero-left {
  max-width: none;
  padding: 1.45rem;
  padding-right: 1.45rem;
  background: #fff;
  border: 1px solid #d7e2ef;
  border-radius: 8px;
  box-shadow: 0 14px 32px rgba(15, 37, 73, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.district-page .hero-right {
  width: auto;
}

/* --- New Hero UI Styles --- */
.district-page .hero-badges {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
}

.district-page .year-static-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  background: var(--color-primary);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--color-primary);
  height: 32px;
  box-sizing: border-box;
}

.district-page .year-dropdown {
  position: relative;
  display: inline-block;
  z-index: 20;
}

.district-page .year-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  background: var(--color-primary);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--color-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  height: 32px;
  box-sizing: border-box;
}

.district-page .year-dropdown-trigger:hover,
.district-page .year-dropdown.open .year-dropdown-trigger {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
}

.district-page .year-dropdown-trigger svg {
  transition: transform 0.2s ease;
}

.district-page .year-dropdown.open .year-dropdown-trigger svg {
  transform: rotate(180deg);
}

.district-page .year-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 180px;
  background: #ffffff;
  border-radius: 6px;
  box-shadow: 0 10px 25px rgba(15, 37, 73, 0.15);
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

.district-page .year-dropdown.open .year-dropdown-menu {
  display: block;
  animation: dropdownFade 0.2s ease;
}

@keyframes dropdownFade {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.district-page .year-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.8rem;
  color: #334155;
  font-size: 0.85rem;
  font-weight: 500;
  border-bottom: 1px solid #f1f5f9;
  text-decoration: none;
  transition: background 0.15s ease;
}

.district-page .year-dropdown-item:last-child {
  border-bottom: none;
}

.district-page .year-dropdown-item:hover {
  background: #f8fafc;
  color: #062a5b;
}

.district-page .year-dropdown-item.active {
  background: #f1f5f9;
  color: var(--color-primary);
  font-weight: 700;
}

.district-page .year-dropdown-item .current-tag {
  font-size: 0.7rem;
  color: var(--color-primary);
  font-weight: 600;
  opacity: 0.8;
}

.district-page .status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  height: 32px;
  box-sizing: border-box;
}

.district-page .status-badge.status-official {
  background: #F0FDF4;
  color: #166534;
  border: 1px solid #BBF7D0;
}

.district-page .status-badge.status-projected {
  background: #FFF7ED;
  color: #b45309;
  border: 1px solid #FED7AA;
}

.district-page .hero-actions-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.district-page .hero-actions-inline .btn-primary {
  background: #062a5b;
  border-color: #062a5b;
  color: #fff;
}

.district-page .hero-actions-inline .btn-primary:hover {
  background: #0a3974;
  border-color: #0a3974;
  transform: translateY(-1px);
}

.district-page .hero-actions-inline .btn-outline {
  background: #f8fafc;
  border-color: #cbd6e4;
  color: #10223d;
}

.district-page .hero-actions-inline .btn-outline:hover {
  background: #ffffff;
  border-color: #062a5b;
  color: #062a5b;
  box-shadow: 0 4px 12px rgba(15, 37, 73, 0.05);
}

.district-page .unified-bento {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  height: 100%;
}

.district-page .unified-bento .bento-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 16px rgba(15, 118, 110, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  min-height: 100px;
}

.district-page .unified-bento .bento-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 118, 110, 0.1);
  background: rgba(255, 255, 255, 0.9);
}

.district-page .unified-bento .bento-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.district-page .unified-bento .bento-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.district-page .unified-bento .bento-value {
  font-size: 1.15rem;
  color: #0f172a;
  font-weight: 700;
}

.district-page .unified-bento .bento-break {
  background: rgba(241, 246, 250, 0.9);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.district-page .unified-bento .bento-break:hover {
  background: rgba(232, 239, 245, 1);
  border-color: rgba(203, 213, 225, 0.9);
}

/* --- End New Hero UI Styles --- */

.district-page .hero-update-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 500;
  margin-left: 0.2rem;
}

.district-page .hero-update-inline::before {
  content: "•";
  margin-right: 0.35rem;
  color: #cbd5e1;
}

.district-page .hero-update-inline svg {
  width: 14px;
  height: 14px;
  opacity: 0.8;
}

.district-page .hero-left h1 {
  max-width: 820px;
  margin-bottom: 0.9rem;
  color: #062a5b;
  font-size: 2.45rem;
  font-weight: 800;
  line-height: 1.08;
}

.district-intro {
  max-width: 850px;
  margin-bottom: 1rem;
  color: #20314e;
  font-size: 1rem;
  line-height: 1.62;
}

.district-page .year-switcher {
  gap: 0.5rem;
  margin-top: 0.95rem;
}

.district-page .year-tab {
  min-height: 38px;
  padding: 0.45rem 0.8rem;
  border: 1px solid #cbd6e4;
  border-radius: 5px;
  background: #f8fafc;
  color: #10223d;
  font-size: 0.86rem;
  font-weight: 700;
}

.district-page .year-tab:hover {
  border-color: #062a5b;
  background: #eef5ff;
  color: #062a5b;
}

.district-page .year-tab.active {
  border-color: #062a5b;
  background: #062a5b;
  color: #fff;
  box-shadow: none;
}

.district-page .status-notice {
  max-width: none;
  margin: 1rem 0 0;
  padding: 0.8rem 0.9rem;
  border-radius: 6px;
  font-size: 0.9rem;
}

.district-page .status-notice.status-official {
  background: #eef8f3;
  border-color: #bbdccd;
  color: #145c3d;
}

.district-page .status-notice.status-projected {
  background: #fff8ed;
  border-color: #f2d6a8;
  color: #835214;
}

.district-page .bento-grid {
  height: 100%;
  gap: 0.75rem;
}

.district-page .bento-card {
  min-height: 108px;
  padding: 1rem;
  border: 1px solid #d7e2ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 37, 73, 0.07);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.district-page .bento-card:hover {
  transform: none;
  border-color: #b8c8db;
  box-shadow: 0 12px 26px rgba(15, 37, 73, 0.1);
}

.district-page .bento-bookends {
  min-height: 132px;
  padding: 1.05rem 1.15rem;
  border-color: #062a5b;
  background: #062a5b;
}

.district-page .bento-row {
  gap: 0.75rem;
}

.district-page .bento-label {
  color: #607086;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}

.district-page .bento-value {
  color: #10223d;
  font-size: 1.05rem;
}

.district-page .bento-bookends .bento-label,
.district-page .bento-bookends .bento-value {
  color: #fff;
}

.district-page .bento-bookends .bento-label {
  color: rgba(255, 255, 255, 0.72);
}

.district-page .bento-divider {
  background: rgba(255, 255, 255, 0.28);
}



.district-page .bento-highlight {
  min-height: 116px;
  border-color: #ffd2d0;
  border-left: 4px solid #ff4b45;
  background: #fff;
}

.district-page .bento-highlight .bento-label {
  color: #062a5b;
}

.district-page .badge-tag {
  border-radius: 4px;
  background: #eef5ff;
  color: #062a5b;
}

.district-page .action-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: stretch;
  gap: 0.7rem;
  margin: 1rem 0 0;
  padding: 0.8rem;
  background: #fff;
  border: 1px solid #d7e2ef;
  border-radius: 8px;
  box-shadow: 0 14px 32px rgba(15, 37, 73, 0.08);
}

.district-page .action-bar .btn {
  flex: initial;
  justify-content: flex-start;
  min-height: 54px;
  width: 100%;
  padding: 0.82rem 0.95rem;
  border-width: 1px;
  border-radius: 6px;
  font-size: 0.88rem;
  text-align: left;
}

.district-page .action-bar .btn-primary {
  background: #062a5b;
  border-color: #062a5b;
  color: #fff;
}

.district-page .action-bar .btn-primary:hover {
  background: #0a3974;
  border-color: #0a3974;
  transform: none;
}

.district-page .action-bar .btn-outline {
  background: #f8fafc;
  border-color: #d4deea;
  color: #10223d;
}

.district-page .action-bar .btn-outline:hover {
  background: #eef5ff;
  border-color: #062a5b;
  color: #062a5b;
  box-shadow: none;
}

.district-page .action-bar-hint {
  grid-column: 1 / -1;
  padding: 0.15rem 0.1rem 0;
  color: #607086;
  font-size: 0.84rem;
}

.district-page .action-bar-hint a {
  color: #062a5b;
}

.district-section h2 {
  margin-bottom: 1rem;
  color: #062a5b;
  font-size: 1.55rem;
  font-weight: 800;
}

.district-section-intro {
  max-width: 780px;
  margin-bottom: 1rem;
  color: #52637a;
}

.district-page .table-wrapper {
  margin-bottom: 0;
  border: 1px solid #d7e2ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 37, 73, 0.07);
  overflow-x: auto;
  overflow-y: hidden;
}

.district-page table {
  min-width: 620px;
  color: #10223d;
}

.district-page thead {
  background: #062a5b;
}

.district-page thead th {
  padding: 0.88rem 1rem;
  border-bottom: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.76rem;
  letter-spacing: 0.05em;
}

.district-page tbody td {
  padding: 0.88rem 1rem;
  border-bottom: 1px solid #e5edf6;
  color: #10223d;
}

.district-page tbody tr:nth-child(even),
.district-page tbody tr:hover {
  background: #f8fafc;
}

.district-page .tag {
  border-radius: 4px;
  font-size: 0.72rem;
}

.district-page .tag-event {
  background: #eef8f3;
  color: #145c3d;
  border-color: #bbdccd;
}

.district-page .tag-closed {
  background: #eef2f7;
  color: #43566f;
  border-color: #cbd6e4;
}

.district-page .tag-info {
  background: #eef5ff;
  color: #062a5b;
  border-color: #cbdaf0;
}

.district-page .cal-legend {
  gap: 0.8rem 1.25rem;
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  background: #fff;
  border: 1px solid #d7e2ef;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(15, 37, 73, 0.06);
  color: #52637a;
}

.district-page .cal-legend-swatch {
  border-radius: 4px;
}

.district-page .cal-year {
  gap: 0.9rem;
}

.district-page .cal-month {
  border: 1px solid #d7e2ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 24px rgba(15, 37, 73, 0.06);
}

.district-page .cal-month-name {
  background: #062a5b;
  color: #fff;
  font-size: 0.96rem;
  font-weight: 700;
}

.district-page .cal-grid {
  background: #dbe4f0;
}

.district-page .cal-dow {
  background: #0a3974;
  color: rgba(255, 255, 255, 0.9);
}

.district-page .cal-day {
  min-height: 38px;
  color: #10223d;
}

.district-page .cal-day.empty,
.district-page .cal-day.weekend,
.district-page .cal-day.no-school {
  background: #f1f5f9;
}

.district-page .cal-day.holiday {
  background: #e0f2fe;
  color: #0369a1;
}

.district-page .cal-day.holiday .cal-dot {
  background: #0ea5e9;
}

.district-page .cal-day.break {
  background: #ccfbf1;
  color: #0f766e;
}

.district-page .cal-day.break .cal-dot {
  background: #14b8a6;
}

.district-page .cal-legend-swatch.sw-holiday {
  background: #e0f2fe;
  border-color: #0ea5e9;
}

.district-page .cal-legend-swatch.sw-break {
  background: #ccfbf1;
  border-color: #14b8a6;
}

.district-page .cal-events .ev-dot.dot-holiday {
  background: #0ea5e9;
}

.district-page .cal-events .ev-dot.dot-break {
  background: #14b8a6;
}

.district-page .cal-day.early-release span {
  border-bottom-color: #6366f1;
}

.district-page .cal-events .ev-dot.dot-early-release {
  background: #6366f1;
}

.district-page .cal-day.first-day,
.district-page .cal-day.last-day {
  background: #062a5b;
  color: #fff;
}

.district-page .cal-day.exam {
  background: #eef8f3;
  color: #145c3d;
}

.district-page .cal-events {
  border-top-color: #e5edf6;
  color: #52637a;
}

.district-page .content-block,
.district-page .faq-item,
.district-page .related-link,
.district-page .disclaimer {
  background: #fff;
  border: 1px solid #d7e2ef;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(15, 37, 73, 0.06);
}

.district-page .content-block {
  padding: 1.15rem 1.25rem;
  color: #20314e;
}

.district-page .content-block p + p {
  margin-top: 0.9rem;
}

.district-page .calendar-notes-lead {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e5edf6;
  color: #10223d;
  font-weight: 600;
}

.district-page .calendar-notes-manual + p {
  margin-top: 0;
}

.district-page .calendar-notes-list {
  margin: 0 0 1rem 1.2rem;
  padding: 0 0 1rem;
  border-bottom: 1px solid #e5edf6;
}

.district-page .calendar-notes-list li + li {
  margin-top: 0.35rem;
}

.district-page .faq-list {
  gap: 0.75rem;
}

.district-page .faq-item {
  overflow: hidden;
}

.district-page .faq-q {
  padding: 1rem 1.15rem;
  color: #10223d;
  font-weight: 700;
}

.district-page .faq-q:hover,
.district-page .faq-q.active {
  color: #062a5b;
}

.district-page .faq-q svg {
  color: #607086;
}

.district-page .faq-a {
  color: #52637a;
}

.district-page .related-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.8rem;
}

.district-page .related-link {
  align-items: flex-start;
  padding: 1rem;
  color: #10223d;
}

.district-page .related-link:hover {
  border-color: #062a5b;
  color: #062a5b;
  box-shadow: 0 12px 26px rgba(15, 37, 73, 0.1);
}

.district-page .related-link svg {
  box-sizing: border-box;
  width: 36px;
  height: 36px;
  padding: 8px;
  border-radius: 6px;
  background: #eef5ff;
  color: #062a5b;
}

.related-subtitle {
  margin-top: 0.1rem;
  color: #607086;
  font-size: 0.85rem;
  line-height: 1.45;
}

.district-page .disclaimer {
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--color-accent);
  background: var(--color-surface);
  color: #52637a;
}

.district-page .disclaimer strong {
  color: #10223d;
}

.disclaimer-note {
  margin-top: 1rem;
}

.district-page .last-updated {
  color: #607086;
}

@media (max-width: 992px) {
  .district-page .hero-split {
    grid-template-columns: 1fr;
  }

  .district-page .hero-left h1 {
    font-size: 2.05rem;
  }
}

@media (max-width: 768px) {
  .district-page .section {
    padding: 1.4rem 0;
  }

  .district-page .district-hero {
    padding: 0.8rem 0 1.15rem;
  }

  .district-page .hero-left {
    padding: 1rem;
  }

  .district-page .hero-left h1 {
    font-size: 1.75rem;
  }

  .district-intro {
    font-size: 0.94rem;
  }

  .district-page .bento-row,
  .district-page .action-bar {
    grid-template-columns: 1fr;
  }

  .district-page .bento-grid {
    gap: 0.55rem;
  }

  .district-page .bento-card {
    min-height: 82px;
    padding: 0.85rem;
  }

  .district-page .cal-day.has-event::before {
    position: fixed;
    left: 50%;
    right: auto;
    bottom: 1rem;
    max-width: calc(100vw - 32px);
    white-space: normal;
    text-align: center;
  }

  .district-page .cal-day.has-event::after {
    display: none;
  }

  .district-page .bento-bookends {
    min-height: 96px;
    padding: 0.9rem;
  }

  .district-page .bento-highlight {
    min-height: 88px;
  }

  .district-page .bento-bookends .bento-value {
    font-size: 1.08rem;
  }

  .district-page .bento-value {
    font-size: 0.98rem;
  }

  .district-page .badge-tag {
    font-size: 0.58rem;
  }

  .district-section h2 {
    font-size: 1.35rem;
  }

  .district-page table {
    min-width: 0;
    table-layout: fixed;
    font-size: 0.8rem;
  }

  .district-page thead th,
  .district-page tbody td {
    padding: 0.62rem 0.55rem;
    overflow-wrap: anywhere;
  }

  .district-page thead th:nth-child(1),
  .district-page tbody td:nth-child(1) {
    width: 34%;
  }

  .district-page thead th:nth-child(2),
  .district-page tbody td:nth-child(2) {
    width: 40%;
  }

  .district-page thead th:nth-child(3),
  .district-page tbody td:nth-child(3) {
    width: 26%;
  }

  .district-page .tag {
    padding: 3px 5px;
    font-size: 0.62rem;
  }
}


/* ========================================
   Hero Dropdown Autocomplete
   ======================================== */
.relative { position: relative; }
.hero-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-top: var(--space-xs);
  box-shadow: var(--shadow-xl);
  max-height: 240px;
  overflow-y: auto;
  z-index: 100;
  list-style: none;
  padding: var(--space-xs) 0;
  text-align: left;
}
.hero-dropdown.hidden {
  display: none;
}
.hero-dropdown li {
  padding: var(--space-sm) var(--space-md);
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.hero-dropdown li:hover {
  background-color: var(--color-bg-alt);
}
/* ========================================
   Phase 2: UI/UX Audit Improvements
   ======================================== */

/* 2. Mobile Horizontal Scroll (Featured Districts) */
.districts-grid#top5-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

@media (max-width: 768px) {
  .districts-grid#top5-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding-bottom: var(--space-md);
    margin-left: calc(-1 * var(--space-md));
    margin-right: calc(-1 * var(--space-md));
    padding-left: var(--space-md);
    padding-right: var(--space-md);
  }
  .districts-grid#top5-grid::-webkit-scrollbar {
    display: none;
  }
  .districts-grid#top5-grid .card {
    flex: 0 0 85%;
    scroll-snap-align: center;
    max-width: 280px;
  }
}

/* 3. Mobile Calendar List View Visibility */
.hidden-desktop { display: none !important; }
@media (max-width: 768px) {
  .hidden-desktop { display: block !important; }
  .hidden-mobile { display: none !important; }
}

/* 4. Perfect Print Styles */
@media print {
  .nav, footer, .region-map-container, .interactive-regions, .map-pins, .hero, .hero-actions, .faq-list, #back-to-top, .district-search-wrapper, .btn, .map-svg, #region-accordion, .global-year-switcher {
    display: none !important;
  }
  body, .section {
    background-color: transparent !important;
    background: none !important;
    color: #000 !important;
  }
  .card, .calendar-container {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
  }
  .calendar-container {
    page-break-inside: avoid;
  }
  .calendar-month {
    page-break-inside: avoid;
  }
  a { text-decoration: none; color: #000; }
}

/* 5. Modern CSS Polish (Micro-interactions) */
/* Glassmorphism for nav */
.nav {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background-color: rgba(255, 255, 255, 0.85);
}

/* Enhanced Card Hover */
.card {
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -4px rgba(0,0,0,0.08), 0 4px 8px -2px rgba(0,0,0,0.04);
}

/* FadeUp Animation */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up {
  opacity: 0;
  animation: fadeUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }

/* ========================================
   Quick Pills (Hero Section)
   ======================================== */
.hero-quick-pills {
  margin-top: var(--space-md);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  font-size: 0.9rem;
}
.pill-label {
  color: var(--color-text-muted);
  margin-right: 4px;
}
.quick-pill {
  padding: 6px 14px;
  border-radius: 999px;
  background-color: rgba(0, 150, 136, 0.08); /* slight teal tint */
  color: var(--color-primary-dark);
  text-decoration: none;
  font-weight: 500;
  border: 1px solid rgba(0, 150, 136, 0.2);
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.quick-pill:hover {
  background-color: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0, 150, 136, 0.2);
}

/* ========================================
   Quick Pills (Hero Section)
   ======================================== */
.hero-quick-pills {
  margin-top: var(--space-md);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  font-size: 0.9rem;
}
.pill-label {
  color: var(--color-text-muted);
  margin-right: 4px;
}
.quick-pill {
  padding: 6px 14px;
  border-radius: 999px;
  background-color: rgba(0, 150, 136, 0.08); /* slight teal tint */
  color: var(--color-primary-dark);
  text-decoration: none;
  font-weight: 500;
  border: 1px solid rgba(0, 150, 136, 0.2);
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.quick-pill:hover {
  background-color: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0, 150, 136, 0.2);
}

/* ========================================
   Mobile Footer Accordions
   ======================================== */
.footer-details summary {
  list-style: none; /* standard reset */
}
.footer-details summary::-webkit-details-marker {
  display: none; /* Safari reset */
}

@media (max-width: 768px) {
  .footer-details {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: var(--space-xs);
  }
  .footer-details summary {
    cursor: pointer;
    position: relative;
    padding: var(--space-sm) 0;
  }
  .footer-details summary h4 {
    margin-bottom: 0;
  }
  /* Toggle Icon */
  .footer-details summary::after {
    content: '';
    position: absolute;
    right: 8px;
    top: 50%;
    width: 10px;
    height: 10px;
    border-right: 2px solid rgba(255,255,255,0.7);
    border-bottom: 2px solid rgba(255,255,255,0.7);
    transform: translateY(-50%) rotate(45deg);
    transition: transform 0.2s ease;
  }
  .footer-details[open] summary::after {
    transform: translateY(-50%) rotate(-135deg);
  }
  .footer-details .footer-links {
    padding-bottom: var(--space-md);
  }
}

@media (min-width: 769px) {
  .footer-details summary {
    cursor: default;
    pointer-events: none;
  }
}
@media (min-width: 769px) { .footer-details[open] > *:not(summary), .footer-details:not([open]) > *:not(summary) { display: block !important; } }

/* ========================================
   Mobile Footer Accordions (Polished)
   ======================================== */
.footer-details {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: var(--space-md);
}
.footer-details summary {
  list-style: none !important;
  cursor: pointer;
  padding: var(--space-sm) 0;
  position: relative;
}
.footer-details summary::-webkit-details-marker {
  display: none !important;
}
.footer-details summary::marker {
  display: none !important;
}
.footer-heading {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-block;
}
.footer-details summary::after {
  content: '';
  position: absolute;
  right: 8px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid rgba(255,255,255,0.7);
  border-bottom: 2px solid rgba(255,255,255,0.7);
  transform: translateY(-50%) rotate(45deg);
  transition: transform 0.2s ease;
}
.footer-details[open] summary::after {
  transform: translateY(-50%) rotate(-135deg);
}
.footer-details .footer-links {
  padding-bottom: var(--space-sm);
  margin-top: 0;
}

@media (min-width: 769px) {
  .footer-correction {
    padding-top: 5px;
  }

  .footer-details {
    border-bottom: none;
    margin-bottom: 0;
  }
  .footer-details summary {
    cursor: default;
    pointer-events: none;
    padding: 0 0 var(--space-sm) 0;
  }
  .footer-details summary::after {
    display: none;
  }
  .footer-details[open] > *:not(summary),
  .footer-details:not([open]) > *:not(summary) {
    display: block !important;
  }
}

@media (max-width: 768px) {
  .footer-grid { gap: 0.75rem !important; }
  .footer-details { margin-bottom: 0 !important; }
  .footer-details summary { padding: 10px 0 !important; }
  .footer-details:not([open]) > *:not(summary) { display: none; }
  .footer-details:last-child { border-bottom: none !important; }
}

.tag-early-release {
  background: #FFF7ED;
  color: #C2410C;
  border: 1px solid #FED7AA;
}

.footer-details:last-child{border-bottom:none!important}
details.footer-details:last-of-type{border-bottom:none!important}

.footer-heading {
  font-family: var(--font-heading);
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.2;
  text-transform: none;
  letter-spacing: 0;
}



/* ========================================
   Texas Homepage Redesign
   ======================================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.home-page {
  margin-top: var(--nav-height);
  background: #f8fafc;
  color: #071d41;
}

.site-nav {
  background: #062a5b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 12px 30px rgba(3, 21, 49, 0.16);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.site-nav .container {
  max-width: 1260px;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-nav-logo {
  color: #fff;
  gap: 0.75rem;
}

.site-nav-logo:hover {
  color: #fff;
  text-shadow: none;
  transform: none;
}

.site-nav-logo span:last-child {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.site-nav-logo strong {
  font-size: 1.1rem;
}

.site-nav-logo small {
  color: rgba(255, 255, 255, 0.78);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  margin-top: 0.12rem;
}

.site-logo-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #fff;
  flex: 0 0 auto;
}

.site-logo-mark svg {
  width: 38px;
  height: 38px;
  color: currentColor;
}

.site-nav-links {
  gap: 1.6rem;
  margin-left: auto;
}

.site-nav-links a {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.86rem;
}

.site-nav-links a:hover {
  color: #fff;
  text-shadow: none;
}

.site-nav-links a::after {
  background: #ff4b45;
}

.site-nav-toggle {
  margin-left: auto;
  color: #fff;
}

.home-hero {
  position: relative;
  min-height: 530px;
  overflow: hidden;
  background: #f4f8fc;
  border-bottom: 1px solid #dbe4f0;
}

.home-hero-media {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(248, 251, 255, 0.99) 0%, rgba(248, 251, 255, 0.96) 28%, rgba(248, 251, 255, 0.52) 49%, rgba(248, 251, 255, 0.05) 74%),
    url("/img/texas-hero-flag.png");
  background-position: left center, right top;
  background-repeat: no-repeat;
  background-size: auto, min(72vw, 1380px) auto;
}

.home-hero-inner {
  max-width: 1260px;
  position: relative;
  min-height: 530px;
  display: flex;
  align-items: center;
}

.home-hero-copy {
  width: min(620px, 100%);
  padding: 3.8rem 0 3.2rem;
}

.home-hero h1 {
  color: #062a5b;
  font-size: clamp(2.4rem, 5vw, 4.05rem);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 1.15rem;
}

.home-hero p {
  width: min(440px, 100%);
  color: #20314e;
  font-size: 1.08rem;
  line-height: 1.55;
  margin-bottom: 1.45rem;
}

.home-search {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  width: min(610px, 100%);
  min-height: 58px;
  background: #fff;
  border: 1px solid #bdc9da;
  border-radius: 6px;
  box-shadow: 0 15px 38px rgba(15, 37, 73, 0.08);
}

.home-search-icon {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  width: 22px;
  height: 22px;
  color: #22344f;
  transform: translateY(-50%);
  pointer-events: none;
}

.home-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #10223d;
  font-family: var(--font-body);
  font-size: 0.98rem;
  padding: 0 1rem 0 3.4rem;
}

.home-search input:focus {
  outline: none;
}

.home-search:focus-within {
  border-color: #062a5b;
  box-shadow: 0 0 0 3px rgba(6, 42, 91, 0.12), 0 15px 38px rgba(15, 37, 73, 0.08);
}

.home-search button {
  margin: 3px;
  border: 0;
  border-radius: 4px;
  background: #062a5b;
  color: #fff;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 700;
}

.home-search button:hover {
  background: #0a3974;
}

.home-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 20;
  max-height: 310px;
  overflow-y: auto;
  list-style: none;
  background: #fff;
  border: 1px solid #d5deea;
  border-radius: 6px;
  box-shadow: 0 18px 40px rgba(4, 25, 57, 0.18);
  padding: 0.35rem;
}

.home-search-results a,
.home-search-results span {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.72rem 0.78rem;
  border-radius: 4px;
  color: #10223d;
  font-size: 0.9rem;
}

.home-search-results a:hover {
  background: #eef4fb;
  color: #062a5b;
}

.home-search-results small {
  color: #617089;
  flex: 0 0 auto;
}

.home-quick-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.25rem;
  max-width: 610px;
}

.home-quick-pills span {
  flex: 1 0 100%;
  color: #061f46;
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 800;
}

.home-quick-pills a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 1rem;
  border: 1px solid #c8d3e2;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.82);
  color: #062a5b;
  font-size: 0.82rem;
  font-weight: 700;
}

.home-quick-pills a:hover {
  border-color: #062a5b;
  background: #fff;
}

.home-band {
  padding: 1.65rem 0;
  background: #fff;
  border-bottom: 1px solid #dce4ef;
}

.home-band .container,
.home-trust-strip .container {
  max-width: 1260px;
}

.home-region-band {
  padding: 1.45rem 0;
}

.home-region-layout {
  display: grid;
  grid-template-columns: 170px 330px minmax(0, 1fr);
  gap: 1.45rem;
  align-items: center;
}

.home-section-kicker h2,
.home-section-header h2 {
  color: #061f46;
  font-size: 1.28rem;
  font-weight: 800;
  line-height: 1.2;
  margin: 0;
}

.home-section-kicker p {
  color: #43526b;
  font-size: 0.92rem;
  line-height: 1.45;
  margin: 0.75rem 0 1.5rem;
}

.home-primary-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 1rem;
  background: #062a5b;
  border-radius: 4px;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 0.86rem;
  font-weight: 700;
}

.home-primary-link:hover {
  background: #0a3974;
  color: #fff;
}

.home-texas-map svg {
  width: 100%;
  height: auto;
  display: block;
}

.tx-region-map path,
.tx-region-map use {
  vector-effect: non-scaling-stroke;
}

.tx-map-region-link {
  cursor: pointer;
  outline: none;
}

.tx-map-region {
  stroke: currentColor;
  stroke-width: 2;
  stroke-linejoin: round;
  paint-order: stroke fill;
  transition: fill 0.18s ease, opacity 0.18s ease, transform 0.18s ease;
  transform-box: fill-box;
  transform-origin: center;
}

.tx-map-region-link:hover .tx-map-region,
.tx-map-region-link:focus-visible .tx-map-region {
  opacity: 0.88;
  transform: scale(1.015);
}

.tx-map-region-link:focus-visible .tx-map-region {
  stroke: #062a5b;
  stroke-width: 3;
}

.tx-map-region-north { fill: #315ec7; color: #315ec7; }
.tx-map-region-houston { fill: #e85d54; color: #e85d54; }
.tx-map-region-central { fill: #f0a534; color: #f0a534; }
.tx-map-region-east { fill: #62aa70; color: #62aa70; }
.tx-map-region-west { fill: #747b89; color: #747b89; }
.tx-map-region-valley { fill: #2aa98f; color: #2aa98f; }

.tx-map-bg {
  fill: #5a6472;
  stroke: none;
}

.tx-map-outline {
  fill: none;
  pointer-events: none;
  stroke: rgba(76, 119, 162, 0.42);
  stroke-width: 1.8;
  stroke-linejoin: round;
}

.home-region-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.05rem;
}

.home-region-card {
  display: flex;
  align-items: stretch; /* Stretch to equal height */
  gap: 1.15rem;
  min-height: 92px;
  padding: 1.25rem 1.15rem; /* Slightly more padding */
  background: #fff;
  border: 1px solid #dce4ef;
  border-radius: 7px;
  color: #061f46;
  box-shadow: 0 6px 18px rgba(9, 39, 81, 0.04);
  text-align: left; /* Force left alignment */
}

.home-region-card:hover {
  border-color: #b9c8db;
  box-shadow: 0 12px 24px rgba(9, 39, 81, 0.08);
  color: #061f46;
  transform: translateY(-1px);
}

.home-region-text {
  flex: 1;
  text-align: left;
  display: flex;
  flex-direction: column;
}

.home-region-text strong,
.home-region-text small,
.home-region-text em {
  display: block;
}

.home-region-text strong {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
  line-height: 1.2;
}

.home-region-text small {
  color: #64748b; /* Softer gray */
  font-size: 0.78rem;
  line-height: 1.35;
}

.home-region-text em {
  color: #64748b;
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 600;
  margin-top: auto;
  padding-top: 0.8rem;
}

.region-cta {
  color: #062a5b; /* Brand color */
  font-weight: 800;
  margin-left: 0.15rem;
  transition: transform 0.2s ease;
  display: inline-block;
}

.home-region-card:hover .region-cta {
  transform: translateX(3px); /* Subtle slide effect on hover */
}

.region-icon {
  align-self: flex-start; /* Keep icon from stretching vertically */
  flex: 0 0 auto;
  margin-top: 0.15rem;
}

.region-icon svg {
  width: 38px;
  height: 38px;
  stroke-width: 2.2px;
}

/* Darkened colors for high contrast without background */
.region-icon-skyline { color: #254db0; }
.region-icon-tower { color: #d64a41; }
.region-icon-capitol { color: #e0921f; }
.region-icon-trees { color: #4b945a; }
.region-icon-mountains { color: #616876; }
.region-icon-palms { color: #1e947c; }

.home-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.home-section-header a,
.home-text-link {
  color: #062a5b;
  font-size: 0.86rem;
  font-weight: 750;
}

.home-section-header a:hover,
.home-text-link:hover {
  color: #e73535;
}

.home-district-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
}

.home-district-card {
  background: #fff;
  border: 1px solid #d9e2ee;
  border-radius: 7px;
  padding: 1rem;
  box-shadow: 0 8px 22px rgba(9, 39, 81, 0.05);
}

.district-card-top {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  min-height: 58px;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid #e2e9f2;
}

.district-badge {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #eef4fb;
  color: #062a5b;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0;
  flex: 0 0 auto;
}


.district-card-top strong,
.district-card-top small {
  display: block;
}

.district-card-top strong {
  color: #061f46;
  font-family: var(--font-heading);
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.2;
}

.district-card-top small {
  color: #5c687d;
  font-size: 0.78rem;
  line-height: 1.3;
  margin-top: 0.18rem;
}

.district-date-list {
  margin: 0.9rem 0 1rem;
}

.district-date-list div {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.42rem 0;
  border-bottom: 1px solid #edf1f6;
}

.district-date-list dt {
  color: #24334d;
  font-size: 0.72rem;
}

.district-date-list dd {
  color: #071d41;
  font-size: 0.72rem;
  font-weight: 700;
  text-align: right;
  margin: 0;
}

.district-card-actions {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 0.65rem;
}

.district-card-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border-radius: 4px;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 800;
}

.pdf-link {
  background: #fff;
  border: 1px solid #cbd5e1;
  color: #475569;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  transition: all 0.2s ease;
}

.pdf-link::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 0.35rem;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='7 10 12 15 17 10'/%3E%3Cline x1='12' y1='15' x2='12' y2='3'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='7 10 12 15 17 10'/%3E%3Cline x1='12' y1='15' x2='12' y2='3'/%3E%3C/svg%3E") center/contain no-repeat;
  border: none;
}

.pdf-link:hover {
  background: #f8fafc;
  color: #0f172a;
  border-color: #94a3b8;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.05);
}

.calendar-link {
  background: #062a5b;
  color: #fff;
}

.calendar-link:hover {
  background: #0a3974;
  color: #fff;
}

.home-tools-band {
  background: #f8fafc;
}

.home-tools-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.7fr) minmax(0, 1.3fr);
  gap: 1.25rem;
  align-items: start;
}

.home-panel {
  background: #fff;
  border: 1px solid #dce4ef;
  border-radius: 8px;
  padding: 1.25rem;
  box-shadow: 0 8px 22px rgba(9, 39, 81, 0.04);
}

.home-updates-panel {
  display: flex;
  flex-direction: column;
}

.home-section-header.compact {
  align-items: flex-start;
  margin-bottom: 0.85rem;
}

.home-section-header.compact p {
  color: #516177;
  font-size: 0.86rem;
  line-height: 1.4;
  margin: 0.25rem 0 0;
}

.home-update-list {
  --update-row-height: 58px;
  display: grid;
  min-height: calc(var(--update-row-height) * 7);
}

.home-update-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.8rem;
  height: var(--update-row-height);
  padding: 0.55rem 0;
  border-bottom: 1px solid #edf1f6;
  color: #061f46;
}

.home-update-row:hover {
  color: #061f46;
}

.update-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 5px;
  background: #eef4fb;
  color: #062a5b;
  font-family: var(--font-heading);
  font-size: 0.62rem;
  font-weight: 800;
}

.home-update-row strong,
.home-update-row small,
.home-update-row em {
  display: block;
}

.home-update-row strong {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  line-height: 1.25;
}

.home-update-row small {
  color: #5b687d;
  font-size: 0.74rem;
  line-height: 1.3;
}

.home-update-row em {
  color: #31415a;
  font-size: 0.68rem;
  font-style: normal;
  line-height: 1.3;
  text-align: right;
}

.home-compare-layout {
  display: grid;
  grid-template-columns: 175px minmax(0, 1fr);
  gap: 1.25rem;
}

.home-compare-controls {
  display: grid;
  gap: 0.75rem;
  align-content: start;
}

.home-compare-controls select,
.home-compare-controls button {
  width: 100%;
  min-height: 40px;
  border-radius: 5px;
  font-family: var(--font-body);
  font-size: 0.84rem;
}

.home-compare-controls select {
  border: 1px solid #d7e0eb;
  color: #263650;
  background: #fff;
  padding: 0 0.8rem;
}

.home-compare-controls button {
  border: 0;
  background: #062a5b;
  color: #fff;
  font-weight: 750;
  cursor: pointer;
}

.home-compare-controls button:hover {
  background: #0a3974;
}

.home-compare-controls button:disabled {
  background: #e8edf4;
  color: #9aa6b8;
  cursor: not-allowed;
}

.home-compare-message {
  min-height: 1.1rem;
  color: #9a3412;
  font-size: 0.74rem;
  line-height: 1.35;
  margin: -0.25rem 0 0;
}

.home-compare-table-wrap {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(6, 42, 91, 0.25) transparent;
  padding-bottom: 0.25rem;
}

.home-compare-table-wrap::-webkit-scrollbar {
  height: 6px;
}

.home-compare-table-wrap::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 6px;
}

.home-compare-table-wrap::-webkit-scrollbar-thumb {
  background-color: rgba(6, 42, 91, 0.25);
  border-radius: 6px;
}

.home-compare-table-wrap::-webkit-scrollbar-thumb:hover {
  background-color: rgba(6, 42, 91, 0.4);
}

.home-compare-table {
  min-width: 520px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.78rem;
}

.home-compare-table th,
.home-compare-table td {
  border-bottom: 1px solid #e6edf5;
  border-left: 1px solid #e6edf5;
  padding: 0.75rem;
  color: #071d41;
  vertical-align: middle;
}

.home-compare-table th:first-child,
.home-compare-table td:first-child {
  border-left: 0;
}

.home-compare-table th {
  font-family: var(--font-heading);
  font-size: 0.76rem;
  font-weight: 800;
  background: #fff;
}

.home-compare-table td:first-child {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 750;
}


.home-trust-strip {
  padding: 1.65rem 0;
  background: #fff;
  border-bottom: 1px solid #dce4ef;
}

.home-trust-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
}

.home-trust-grid div {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  column-gap: 0.9rem;
  align-items: center;
  min-height: 66px;
}

.home-trust-grid div + div {
  border-left: 1px solid #dce4ef;
  padding-left: 1.5rem;
}

.home-trust-grid strong,
.home-trust-grid small {
  grid-column: 2;
  display: block;
}

.home-trust-grid strong {
  color: #061f46;
  font-family: var(--font-heading);
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.2;
}

.home-trust-grid small {
  color: #3f5068;
  font-size: 0.78rem;
  line-height: 1.35;
  margin-top: 0.25rem;
}

.trust-icon {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: #062a5b;
}

.trust-icon::before {
  content: none;
  display: none;
}

.trust-icon.shield::before { clip-path: polygon(50% 0, 88% 14%, 82% 66%, 50% 100%, 18% 66%, 12% 14%); }
.trust-icon.download::before { border-radius: 50%; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
.trust-icon.calendar::before { border-radius: 4px; }
.trust-icon.family::before { border-radius: 50% 50% 35% 35%; }

.trust-icon svg {
  width: 46px;
  height: 46px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 1120px) {
  .site-nav-links {
    gap: 1rem;
  }

  .home-region-layout {
    grid-template-columns: 170px minmax(290px, 320px) minmax(0, 1fr);
    gap: 1.25rem;
  }

  .home-region-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-district-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .home-page {
    margin-top: var(--nav-height);
  }

  .site-nav .nav-links {
    background: #062a5b;
  }

  .home-hero,
  .home-hero-inner {
    min-height: auto;
  }

  .home-hero-media {
    background-image:
      linear-gradient(90deg, rgba(248, 251, 255, 0.98) 0%, rgba(248, 251, 255, 0.94) 55%, rgba(248, 251, 255, 0.55) 100%),
      url("/img/texas-hero-flag.png");
    background-position: left center, 66% top;
    background-repeat: no-repeat;
    background-size: auto, auto 100%;
  }

  .home-hero-copy {
    padding: 3rem 0;
  }

  .home-region-layout,
  .home-tools-grid,
  .home-compare-layout {
    grid-template-columns: 1fr;
  }

  .home-texas-map {
    max-width: 320px;
    margin: 0 auto;
  }

  .home-trust-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-trust-grid div + div {
    border-left: 0;
    padding-left: 0;
  }
}

@media (max-width: 640px) {
  .site-nav-logo strong {
    font-size: 0.98rem;
  }

  .site-nav-logo small {
    display: none;
  }

  .site-logo-mark,
  .site-logo-mark svg {
    width: 32px;
    height: 32px;
  }

  .home-hero-copy {
    padding: 2.2rem 0 2.4rem;
  }

  .home-hero h1 {
    font-size: 2.25rem;
  }

  .home-hero p {
    font-size: 0.98rem;
  }

  .home-search {
    grid-template-columns: 1fr;
    gap: 0.65rem;
    min-height: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .home-search:focus-within {
    border-color: transparent;
    box-shadow: none;
  }

  .home-search-icon {
    left: 1.35rem;
    top: 24px;
    transform: translateY(-50%);
  }

  .home-search input {
    background: #fff;
    border: 1px solid #bdc9da;
    border-radius: 6px;
    box-shadow: 0 10px 26px rgba(15, 37, 73, 0.08);
    min-height: 56px;
    padding-left: 3.65rem;
    padding-right: 0.85rem;
  }

  .home-search input:focus {
    border-color: #062a5b;
    box-shadow: 0 0 0 3px rgba(6, 42, 91, 0.12), 0 10px 26px rgba(15, 37, 73, 0.08);
  }

  .home-search button {
    min-height: 44px;
    margin: 0;
    border-radius: 6px;
  }

  .home-quick-pills a {
    flex: 1 1 auto;
    justify-content: center;
  }

  .home-region-cards,
  .home-district-grid,
  .home-trust-grid {
    grid-template-columns: 1fr;
  }

  .home-band {
    padding: 1.25rem 0;
  }

  .home-section-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35rem;
  }

  .district-card-actions {
    grid-template-columns: 1fr 1fr;
  }
}

/* ========================================
   Guides Hub + Article Pages
   ======================================== */
.section-header {
  margin-bottom: var(--space-xl);
}

.section-header-split {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-lg);
}

.section-eyebrow {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-xs);
}

.nav-links a[aria-current="page"] {
  color: var(--color-accent);
}

.article-page {
  margin-top: var(--nav-height);
}

.guides-page {
  margin-top: 0;
}

.guides-empty-section {
  margin-top: var(--nav-height);
  padding: 0.5rem 0 1.5rem;
  background: linear-gradient(135deg, #F0FDFA 0%, #FFFFFF 62%, #FFF7ED 100%);
  border-bottom: 1px solid var(--color-border);
}

.guides-breadcrumb {
  margin-top: 0;
  padding: 0.35rem 0 0.45rem;
}

.guides-hero-header {
  max-width: 800px;
  margin: 2rem auto 3.5rem;
  text-align: center;
}

.guides-hero-header h1 {
  color: var(--color-primary-dark);
  font-size: 2.5rem;
  margin: 0;
  line-height: 1.2;
}

.guides-hero-header .section-eyebrow {
  justify-content: center;
  margin-bottom: 0.8rem;
}

.guides-hero {
  background: linear-gradient(135deg, #F0FDFA 0%, #FFFFFF 62%, #FFF7ED 100%);
  border-bottom: 1px solid var(--color-border);
  margin-top: var(--nav-height);
  padding: 1rem 0 1.2rem;
}

.guides-hero h1 {
  max-width: 760px;
  color: var(--color-primary-dark);
  font-size: 2.05rem;
  margin-bottom: 0.55rem;
}

.guides-hero p:not(.section-eyebrow) {
  max-width: 720px;
  color: var(--color-text-secondary);
  font-size: 1rem;
  line-height: 1.55;
}

.guide-section {
  padding: 1.5rem 0;
}

.guide-section + .guide-section {
  padding-top: 1.5rem;
}

.guide-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.guide-toolbar h2 {
  margin-bottom: var(--space-xs);
}

.guide-results-label {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.guide-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.guide-filter-tab {
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-text-secondary);
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 14px;
  transition: all var(--transition);
}

.guide-filter-tab:hover,
.guide-filter-tab.is-active {
  border-color: var(--color-primary);
  background: rgba(15, 118, 110, 0.08);
  color: var(--color-primary-dark);
}

.guide-list {
  display: grid;
  gap: var(--space-md);
}

.guide-list-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
}

.guide-list-item[hidden] {
  display: none;
}

.guide-list-meta,
.guide-list-footer {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  color: var(--color-text-muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.guide-list-meta {
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.guide-list-item h3 {
  margin-bottom: var(--space-sm);
}

.guide-list-item h3 a {
  color: var(--color-text);
}

.guide-list-item h3 a:hover {
  color: var(--color-primary);
}

.guide-list-item p {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-md);
  max-width: 760px;
}

.guide-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  align-items: stretch;
  max-width: 1000px;
  margin: 0 auto;
}

.guide-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 1.75rem;
  background: var(--color-surface);
  border: 1px solid rgba(15, 37, 73, 0.08);
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(15, 37, 73, 0.04);
  color: var(--color-text);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.guide-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary-light), var(--color-primary));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.guide-card:hover {
  border-color: rgba(15, 37, 73, 0.12);
  box-shadow: 0 12px 32px rgba(15, 37, 73, 0.08);
  transform: translateY(-4px);
}

.guide-card:hover::before {
  opacity: 1;
}

.guide-card-kicker {
  color: var(--color-accent);
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.guide-card h2 {
  color: var(--color-text);
  font-size: 1.18rem;
  line-height: 1.3;
  margin: 0.55rem 0 0.65rem;
}

.guide-card p {
  color: var(--color-text-secondary);
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0 0 var(--space-md);
}

.guide-card a {
  margin-top: auto;
  color: var(--color-primary-dark);
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 700;
}

.guide-card a:hover {
  color: var(--color-accent-hover);
}

.guides-page .article-content h2:first-child {
  margin-top: 0;
}

.guide-card strong {
  color: var(--color-primary-dark);
  font-family: var(--font-heading);
  font-size: 1.08rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.guide-card > span:not(.guide-card-kicker) {
  color: var(--color-text-secondary);
  font-size: 0.92rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.guide-read-more {
  margin-top: auto;
  padding-top: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--color-primary);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  transition: color 0.2s ease;
}

.guide-read-more svg {
  transition: transform 0.2s ease;
}

.guide-card:hover .guide-read-more {
  color: var(--color-accent);
}

.guide-card:hover .guide-read-more svg {
  transform: translateX(4px);
}

.guides-content-area {
  padding-bottom: 4rem;
}

.guide-list-empty {
  min-height: 42px;
}

.article-page {
  background: var(--color-surface);
  padding-bottom: var(--space-3xl);
}

.article-breadcrumb {
  margin-top: 0;
}

.article-shell {
  max-width: 780px;
  margin: 0 auto;
}

.article-header {
  padding: var(--space-xl) 0 var(--space-lg);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-2xl);
  text-align: center;
}

.back-to-guides {
  display: inline-flex;
  align-items: center;
  color: var(--color-text-secondary);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
  margin-right: auto;
}

.back-to-guides:hover {
  color: var(--color-primary);
}

.article-kicker-row {
  display: flex;
  align-items: center;
  margin-bottom: var(--space-md);
  position: relative;
}

.article-kicker {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: var(--color-accent);
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(197, 155, 39, 0.1);
  padding: 4px 12px;
  border-radius: 999px;
}

.article-reading-time,
.article-meta {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.article-header .article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--color-text-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.article-meta-author {
  color: var(--color-text-muted);
  font-weight: 650;
}

.article-meta-label {
  color: var(--color-text-muted);
  font-weight: 400;
}

.article-meta-name {
  color: var(--color-text-secondary);
  font-weight: 650;
}

.article-meta-detail {
  color: var(--color-text-muted);
  font-weight: 400;
}

.article-header .article-meta > span + span::before {
  content: "\2022";
  color: var(--color-border);
  margin: 0 0.55rem;
}

.article-header h1 {
  color: var(--color-primary-dark);
  font-size: 2.3rem;
  margin: var(--space-sm) 0 var(--space-md);
}

.article-dek {
  color: var(--color-text-secondary);
  font-size: 1.08rem;
  line-height: 1.7;
  margin-bottom: var(--space-md);
}

.article-content {
  color: var(--color-text);
  font-size: 1.02rem;
}

.article-content p,
.article-content ul,
.article-content ol,
.article-content table,
.article-content blockquote {
  margin-bottom: var(--space-lg);
}

.article-content h2,
.article-content h3 {
  color: var(--color-primary-dark);
  margin-top: var(--space-2xl);
}

.article-content a {
  color: var(--color-primary-dark);
  font-weight: 650;
  text-decoration: underline;
  text-decoration-color: rgba(249, 115, 22, 0.65);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.article-content a:hover {
  color: var(--color-accent-hover);
  text-decoration-color: currentColor;
}

.article-content ul,
.article-content ol {
  padding-left: 1.4rem;
}

.article-content li {
  margin-bottom: 0.5rem;
}

.article-content li:last-child {
  margin-bottom: 0;
}

.article-content blockquote {
  border-left: 4px solid var(--color-accent);
  padding-left: var(--space-md);
  color: var(--color-text-secondary);
}

.article-content pre,
.article-callout {
  margin-bottom: var(--space-lg);
}

.article-callout {
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius-md);
  padding: var(--space-md);
}

.article-callout h3 {
  font-size: 1rem;
  margin: 0 0 var(--space-xs);
}

.article-callout p:last-child {
  margin-bottom: 0;
}

.article-callout-compact p {
  margin-bottom: var(--space-xs);
}

.article-content pre {
  background: var(--color-primary-dark);
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 0.92rem;
  line-height: 1.65;
  overflow-x: auto;
  padding: var(--space-md);
}

.article-related {
  margin: var(--space-3xl) auto 0;
  max-width: 960px;
}

.article-related h2 {
  margin-bottom: var(--space-lg);
}

/* ========================================
   Regions Index Page
   ======================================== */
.regions-page {
  margin-top: var(--nav-height);
  background: #f8fafc;
  color: #071d41;
}

.regions-hero {
  padding: 0.6rem 0 1.25rem;
  background: linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
  border-bottom: 1px solid #dce4ef;
}

.regions-breadcrumb {
  margin-top: 0;
  margin-bottom: 0.5rem;
  padding: 0.35rem 0 0.25rem;
}

.regions-hero-copy {
  max-width: 780px;
}

.regions-hero-copy h1 {
  color: #062a5b;
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.08;
  margin-bottom: 0.8rem;
}

.regions-hero-copy p:not(.section-eyebrow) {
  color: #40516c;
  font-size: 1rem;
  line-height: 1.65;
}

.regions-search {
  max-width: 560px;
  margin-top: 1rem;
}

.regions-search input {
  width: 100%;
  min-height: 44px;
  padding: 0.7rem 0.85rem;
  border: 1px solid #c7d3e2;
  border-radius: 6px;
  background: #fff;
  color: #071d41;
  font: inherit;
  font-size: 0.95rem;
  box-shadow: 0 8px 18px rgba(9, 39, 81, 0.05);
}

.regions-search input:focus {
  border-color: #0a5fb4;
  box-shadow: 0 0 0 3px rgba(10, 95, 180, 0.14);
  outline: none;
}

.regions-search input::placeholder {
  color: #7b8798;
}

.regions-search-status {
  min-height: 1.2rem;
  margin: 0.45rem 0 0;
  color: #53647a;
  font-size: 0.82rem;
  line-height: 1.4;
}

.regions-search-status:empty {
  display: none;
}

.regions-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.regions-quick-links a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0.35rem 0.75rem;
  border: 1px solid #cfd9e7;
  border-radius: 5px;
  background: #fff;
  color: #20314e;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 750;
}

.regions-quick-links a:hover {
  border-color: #062a5b;
  color: #062a5b;
}

.regions-source-note {
  max-width: 780px;
  margin: 0.8rem 0 0;
  color: #53647a;
  font-size: 0.84rem;
  line-height: 1.55;
}

.regions-source-note a {
  color: #0a5fb4;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.regions-index-section {
  padding: 1.1rem 0 2.5rem;
}

.regions-index-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.regions-side-nav {
  position: sticky;
  top: calc(var(--nav-height) + 1rem);
  display: grid;
  gap: 0.2rem;
  padding: 0.9rem;
  border: 1px solid #dce4ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(9, 39, 81, 0.04);
}

.regions-side-nav strong {
  color: #062a5b;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.regions-side-nav a {
  padding: 0.42rem 0.5rem;
  border-radius: 5px;
  color: #4b5d76;
  font-size: 0.82rem;
  font-weight: 650;
}

.regions-side-nav a:hover {
  background: #f1f6fb;
  color: #062a5b;
}

.regions-list {
  display: grid;
  gap: 1rem;
}

.region-group {
  scroll-margin-top: calc(var(--nav-height) + 1rem);
  padding: 1rem;
  border: 1px solid #dce4ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(9, 39, 81, 0.04);
}

.region-group-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid #e7edf5;
  margin-bottom: 0.9rem;
}

.region-group-header h2 {
  color: #062a5b;
  font-size: 1.35rem;
  line-height: 1.2;
  margin: 0 0 0.35rem;
}

.region-group-header p {
  color: #52637a;
  font-size: 0.9rem;
  line-height: 1.55;
  margin: 0;
  max-width: 760px;
}

.region-group-kicker {
  color: var(--color-accent) !important;
  font-family: var(--font-heading);
  font-size: 0.72rem !important;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.2 !important;
  margin-bottom: 0.28rem !important;
  text-transform: uppercase;
}

.region-group-header > span {
  flex: 0 0 auto;
  align-self: flex-start;
  padding: 0.35rem 0.6rem;
  border-radius: 5px;
  background: #eef5ff;
  color: #062a5b;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 800;
}

.region-district-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.region-district-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: center;
  min-height: 82px;
  padding: 0.75rem 0.85rem;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fbfdff;
  color: #071d41;
}

.region-district-card:hover {
  border-color: #b9c8db;
  background: #fff;
  color: #062a5b;
  box-shadow: 0 8px 16px rgba(9, 39, 81, 0.06);
}

.region-group[hidden],
.region-district-card[hidden] {
  display: none;
}

.region-district-card strong,
.region-district-card small,
.region-district-card em {
  display: block;
}

.region-district-card strong {
  color: #071d41;
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.25;
}

.region-district-card small {
  color: #627089;
  font-size: 0.74rem;
  line-height: 1.35;
  margin-top: 0.18rem;
}

.region-district-meta {
  min-width: 118px;
  text-align: right;
}

.region-district-meta em {
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.region-district-meta em.status-official {
  color: #166534;
}

.region-district-meta em.status-projected,
.region-district-meta em.status-draft {
  color: #b45309;
}

@media (max-width: 768px) {
  .section-header-split,
  .guide-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .guides-hero h1,
  .article-header h1 {
    font-size: 1.8rem;
  }

  .guide-filter-tabs {
    width: 100%;
  }

  .guide-filter-tab {
    flex: 1 1 auto;
  }

  .article-header {
    padding-top: var(--space-lg);
  }

  .article-header .article-meta {
    font-size: 0.88rem;
  }

  .regions-page.is-searching .regions-quick-links,
  .regions-page.is-searching .regions-source-note,
  .regions-page.is-searching .regions-side-nav {
    display: none;
  }

  .regions-page.is-searching .regions-hero {
    padding-bottom: 0.75rem;
  }

  .regions-page.is-searching .regions-index-section {
    padding-top: 0.65rem;
  }

  .regions-page.is-searching .regions-search-status {
    display: block;
    color: #20314e;
    font-weight: 700;
  }

  .regions-page.is-searching .region-group {
    padding: 0.75rem;
  }

  .regions-page.is-searching .region-group-header {
    align-items: center;
    gap: 0.65rem;
    padding-bottom: 0.55rem;
    margin-bottom: 0.55rem;
  }

  .regions-page.is-searching .region-group-kicker,
  .regions-page.is-searching .region-group-header p {
    display: none;
  }

  .regions-page.is-searching .region-group-header h2 {
    font-size: 1.05rem;
    margin: 0;
  }

  .regions-page.is-searching .region-group-header > span {
    font-size: 0.72rem;
    padding: 0.3rem 0.5rem;
  }

  .regions-hero-copy h1 {
    font-size: 1.8rem;
  }

  .regions-index-layout {
    grid-template-columns: 1fr;
  }

  .regions-side-nav {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .regions-side-nav strong {
    flex-basis: 100%;
  }

  .regions-side-nav a {
    border: 1px solid #dce4ef;
  }

  .region-group-header {
    flex-direction: column;
  }

  .region-district-grid {
    grid-template-columns: 1fr;
  }

  .region-district-card {
    grid-template-columns: 1fr;
  }

  .region-district-meta {
    min-width: 0;
    text-align: left;
  }
}

/* ========================================
   Mobile Compact Spacing Override
   ======================================== */
@media (max-width: 768px) {
  .section { padding: var(--space-xl) 0 !important; }
  .hero { padding: var(--space-xl) 0 var(--space-lg) !important; }
  .section-header { margin-bottom: var(--space-md) !important; }
  .section-header h2 { font-size: 1.4rem !important; }
  .section-header p { font-size: 0.9rem !important; margin-top: var(--space-xs) !important; }
  .container { padding: 0 var(--space-md) !important; }
  .hero .container { padding: 0 var(--space-lg) !important; }
  .hero h1 { font-size: 1.6rem !important; }
  .hero p { font-size: 0.95rem !important; }
  .card { padding: var(--space-md) !important; }
  .essentials-grid { gap: var(--space-md) !important; }
  .faq-list { gap: var(--space-sm) !important; }
  .footer { padding: var(--space-xl) 0 var(--space-md) !important; }
}
