:root{
  --bg: #ffffff;
  --text:#0f172a;
  --muted:#475569;
  --card:#f8fafc;
  --border:#e2e8f0;
  --brand-red:#df0000;
  --brand-blue:#00aef0;
  --shadow: 0 10px 24px rgba(2,6,23,.08);
  --radius: 18px;
  --max: 1160px;
}

*{ box-sizing:border-box; }
html, body{ height:100%; }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  background:
    radial-gradient(900px 520px at 10% 0%, rgba(0,174,240,.14), transparent 60%),
    radial-gradient(900px 520px at 90% 0%, rgba(223,0,0,.10), transparent 60%),
    var(--bg);
  line-height:1.4;
}

a{ color: inherit; text-decoration:none; }
a:hover{ text-decoration: underline; }

.wrap{ max-width: var(--max); margin: 0 auto; padding: 16px; }

header{
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.topbar{
  display:flex; align-items:center; justify-content:space-between;
  gap: 12px;
  padding: 10px 0;
}

.brand{
  display:flex; align-items:center; gap: 12px;
  min-width: 220px;
}
.brand img{ height: 44px; width:auto; display:block; }

.tag{
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

nav{
  display:flex; gap: 14px; flex-wrap: wrap;
  justify-content:flex-end;
}
nav a{
  font-size: 14px;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 10px;
}
nav a:hover{ background: rgba(2,6,23,.04); text-decoration:none; }

.hero{
  padding: 22px 0 10px;
  display:grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 18px;
  align-items: start;
}

.panel{
  background: rgba(255,255,255,.78);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

h1{
  margin: 0 0 10px;
  font-size: clamp(26px, 3vw, 40px);
  letter-spacing: -0.02em;
}
.lead{ color: var(--muted); font-size: 16px; margin: 0 0 14px; }

.ctaRow{
  display:flex; flex-wrap:wrap; gap: 10px;
  margin-top: 10px;
}
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  font-weight: 650;
  font-size: 14px;
  min-height: 42px;
}
.btn.primary{
  border-color: rgba(0,174,240,.35);
  box-shadow: 0 10px 18px rgba(0,174,240,.12);
}

.sectionTitle{
  margin: 22px 0 10px;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .10em;
}

.grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: 0 6px 16px rgba(2,6,23,.05);
  min-height: 112px;
}
.card h3{ margin:0 0 6px; font-size: 16px; }
.card p{ margin:0; color: var(--muted); font-size: 13px; }

.small{
  color: var(--muted);
  font-size: 13px;
}

.adSlot{
  margin-top: 14px;
  background:#fff;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 14px;
  color: var(--muted);
  font-size: 13px;
}

.footer{
  margin-top: 26px;
  border-top: 1px solid var(--border);
  padding: 18px 0 30px;
  color: var(--muted);
  font-size: 13px;
}

.footerGrid{
  display:grid;
  grid-template-columns: 2fr 1fr;
  gap: 14px;
  align-items:start;
}
.footerLinks{
  display:flex; flex-wrap:wrap; gap: 10px 14px;
}

.hideMobile{ display:block; }
.showMobile{ display:none; }

/* Responsive */
@media (max-width: 980px){
  .hero{ grid-template-columns: 1fr; }
  .grid{ grid-template-columns: repeat(2, 1fr); }
  nav{ justify-content:flex-start; }
  .brand{ min-width: unset; }
}
@media (max-width: 600px){
  .grid{ grid-template-columns: 1fr; }
  nav a{ padding: 8px 8px; }
  .tag{ display:none; }
  .hideMobile{ display:none; }
  .showMobile{ display:block; }
}


/* === Politics1 Header Theme Overrides (navy bar to match new logo) === */
:root{
  --header-bg: #0B1E3B;
  --header-text: #FFFFFF;
  --header-muted: rgba(255,255,255,.78);
  --header-hover: rgba(255,255,255,.10);
}

header{
  background: var(--header-bg) !important;
  backdrop-filter: none !important;
  border-bottom: 1px solid rgba(255,255,255,.10) !important;
}

.topbar .tag{
  color: var(--header-muted) !important;
  border-color: rgba(255,255,255,.18) !important;
  background: rgba(0,0,0,.10);
}

nav a{
  color: var(--header-muted) !important;
}
nav a:hover{
  background: var(--header-hover) !important;
  text-decoration: none !important;
}

.brand img{
  height: 44px;
}



/* === Hamburger Navigation (desktop/tablet/mobile) === */
.topbar{
  position: relative;
}

.menuButton{
  appearance: none;
  border: 1px solid rgba(255,255,255,.20);
  background: rgba(0,0,0,.12);
  color: #fff;
  border-radius: 12px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.menuButton:hover{
  background: rgba(255,255,255,.10);
}

.menuIcon{
  width: 18px;
  height: 12px;
  position: relative;
  display: inline-block;
}

.menuIcon::before,
.menuIcon::after,
.menuIcon{
  border-top: 2px solid rgba(255,255,255,.92);
}

.menuIcon::before,
.menuIcon::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
}

.menuIcon::before{ top: 5px; }
.menuIcon::after{ top: 10px; }

/* Panel */
.menuPanel{
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(360px, calc(100vw - 32px));
  background: #ffffff;
  border: 1px solid rgba(2,6,23,.10);
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(2,6,23,.22);
  overflow: hidden;
  transform: translateY(-6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 50;
}

.menuPanel.isOpen{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.menuPanelInner{
  padding: 14px;
}

.menuTitle{
  font-size: 12px;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: #475569;
  margin-bottom: 8px;
}

.menuLinks a{
  display: block;
  padding: 12px 12px;
  border-radius: 12px;
  color: #0f172a !important;
  text-decoration: none !important;
  font-weight: 650;
  line-height: 1.1;
}

.menuLinks a:hover{
  background: #f1f5f9;
}

/* Backdrop */
.menuBackdrop{
  position: fixed;
  inset: 0;
  background: rgba(2,6,23,.35);
  z-index: 40;
}

/* Lock scroll when menu open */
html.menuOpen, html.menuOpen body{
  overflow: hidden;
}

/* Hide the old inline nav styles (we now use the panel) */
.topbar > nav[aria-label="Primary"]:not(.menuPanel){
  display: none !important;
}

/* Ensure spacing still works with button */
.topbar{
  justify-content: space-between;
}


/* === State Directory Page Layout (md.htm and similar) === */
.siteHeader .wrap{ padding-top: 10px; padding-bottom: 10px; }

.stateLayout{ padding-top: 16px; padding-bottom: 28px; }

.stateHero{
  /* Hero is inside .wrap, so don't add extra horizontal padding */
  padding: 0;
  margin: 0 0 12px;
  display: block;
}

.stateHero .heroCard{
  width: 100%;
  max-width: none;
  margin: 0;
  /* Inherit padding from .heroCard (18px); don't add extra padding here */
}

.heroCard{
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(226,232,240,.95);
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(2,6,23,.08);
  padding: 18px;
}

.stateKicker{
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .10em;
  color: rgba(15,23,42,.68);
  margin-bottom: 8px;
}

.stateTitle{
  margin: 0 0 8px;
  font-size: clamp(28px, 3.5vw, 44px);
  letter-spacing: -0.02em;
}

.stateLead{ margin: 0 0 12px; color: #475569; font-size: 16px; }

.heroMeta{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 10px;
}

.badge{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(2,6,23,.12);
  background: rgba(2,6,23,.03);
  font-size: 12px;
  color: rgba(15,23,42,.78);
}

.ghostLink{
  color: rgba(15,23,42,.72);
  font-weight: 650;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 999px;
}
.ghostLink:hover{ background: rgba(2,6,23,.04); }

.toc{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.toc a{
  font-size: 13px;
  font-weight: 650;
  color: rgba(15,23,42,.78);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(2,6,23,.10);
  background: rgba(255,255,255,.65);
}
.toc a:hover{ background: rgba(2,6,23,.04); }

.rightRail{
  display: grid;
  gap: 12px;
}

.railCard{
  background: #ffffff;
  border: 1px solid rgba(226,232,240,.95);
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(2,6,23,.08);
  padding: 14px;
}

.railTitle{
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .10em;
  color: rgba(15,23,42,.68);
  margin-bottom: 8px;
}

.stateQuick{ margin-top: 14px; }

.grid2{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.card{
  background: #ffffff;
  border: 1px solid rgba(226,232,240,.95);
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(2,6,23,.08);
  padding: 16px;
}

.card h2{ margin: 0 0 10px; font-size: 18px; }
.muted{ color: #475569; }

.chipRow{ display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip{
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(2,6,23,.12);
  background: rgba(2,6,23,.03);
  font-size: 12px;
  color: rgba(15,23,42,.78);
}

.stateDirectory{ margin-top: 16px; }

.sectionHeader h2{ margin: 0 0 6px; }
.sectionHeader p{ margin: 0 0 12px; }

.legacyCard{
  background: #ffffff;
  border: 1px solid rgba(226,232,240,.95);
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(2,6,23,.08);
  padding: 14px;
  overflow-x: auto;
}

/* Legacy content normalization */
.legacyCard table{ max-width: 100%; }
.legacyCard img{ max-width: 100%; height: auto; }
.legacyCard font, .legacyCard center{ font-family: inherit !important; }
.legacyCard a{ color: #0b5bd3; }
.legacyCard a:visited{ color: #6b21a8; }

.wideAd{
  border: 1px dashed rgba(226,232,240,.95);
  border-radius: 18px;
  padding: 12px;
  background: rgba(255,255,255,.75);
  margin-top: 12px;
}

.stateResources{ margin-top: 16px; }
.resourceLinks{
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}
.resourceLinks a{
  color: rgba(15,23,42,.78);
  text-decoration: none;
  font-weight: 650;
}
.resourceLinks a:hover{ text-decoration: underline; }

.siteFooter{
  margin-top: 22px;
  border-top: 1px solid rgba(226,232,240,.95);
  padding-top: 18px;
}

/* Responsive */
@media (max-width: 980px){
  .grid2{ grid-template-columns: 1fr; }
}


/* === Accordions + anchors for state pages === */
.anchorTarget{
  scroll-margin-top: 90px; /* account for header */
}

details.accordion{
  border: 1px solid rgba(226,232,240,.95);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(2,6,23,.08);
  margin: 12px 0;
  overflow: hidden;
}

details.accordion > summary{
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: none;
}

details.accordion > summary::-webkit-details-marker{ display: none; }

details.accordion > summary::after{
  content: "▾";
  margin-left: auto;
  font-size: 14px;
  color: rgba(15,23,42,.65);
  transition: transform .18s ease;
}

details.accordion[open] > summary::after{
  transform: rotate(180deg);
}

.accTitle{
  font-weight: 800;
  color: rgba(15,23,42,.92);
}

.accBody{
  border-top: 1px solid rgba(226,232,240,.95);
  padding: 12px 14px;
}

.tocWide a{ margin-bottom: 6px; }

.stateLinksGrid{
  display:grid;
  grid-template-columns:repeat(5, minmax(0, 1fr));
  gap:10px;
  max-width:980px;
  margin: 0 auto 16px;
}

.stateLinksGrid .stateLink{
  display:block;
  text-align:center;
  padding:10px 10px;
  border:1px solid var(--border, #d9dde3);
  border-radius:12px;
  background: var(--card, #ffffff);
  font-weight:700;
  text-decoration:none;
  line-height:1.2;
}

.stateLinksGrid .stateLink:hover{
  text-decoration:underline;
}

.stateLinksGrid .stateLink:focus-visible{
  outline:3px solid currentColor;
  outline-offset:2px;
}

@media (max-width: 980px){
  .stateLinksGrid{ grid-template-columns:repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 820px){
  .stateLinksGrid{ grid-template-columns:repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px){
  .stateLinksGrid{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 360px){
  .stateLinksGrid{ grid-template-columns:1fr; }
}
