/*
  State forecast landing standardization layer
  Scope: body.cmep-state-page (/state/)
  Purpose: align the state directory with the finalized House/Senate/Governor visual system.
*/

body.cmep-state-page{
  --house-bg:#f3f5f8;
  --house-bg-soft:#eef2f7;
  --house-surface:#ffffff;
  --house-surface-2:#f8fafc;
  --house-surface-3:#eef2f7;
  --house-border:#d8dee8;
  --house-border-strong:#b9c3d1;
  --house-text:#172033;
  --house-strong:#08111f;
  --house-muted:#5d6b7f;
  --house-subtle:#7b8798;
  --house-shadow:0 18px 38px rgba(15,23,42,.08);
  --house-shadow-soft:0 8px 20px rgba(15,23,42,.06);
  --house-radius:22px;
  --house-radius-sm:16px;
  --house-shell:1360px;

  --bg-page:var(--house-bg);
  --bg-card:var(--house-surface);
  --bg-card-subtle:var(--house-surface-2);
  --border-subtle:var(--house-border);
  --text-main:var(--house-text);
  --text-muted:var(--house-muted);
  --text-strong:var(--house-strong);
  --shadow-soft:var(--house-shadow);
  --shadow-subtle:var(--house-shadow-soft);

  margin:0 !important;
  padding-top:var(--header-offset,0px);
  background:
    radial-gradient(circle at 12% 18%, rgba(100,116,139,.12), transparent 28rem),
    linear-gradient(180deg,var(--house-bg),var(--house-bg-soft)) !important;
  color:var(--house-text) !important;
  color-scheme:light;
}

@media (prefers-color-scheme:dark){
  html:not([data-theme="light"]):not(.light) body.cmep-state-page:not(.light):not(.light-mode){
    --house-bg:#050b16;
    --house-bg-soft:#020617;
    --house-surface:#0c1422;
    --house-surface-2:#111b2a;
    --house-surface-3:#162235;
    --house-border:#263347;
    --house-border-strong:#384861;
    --house-text:#d9e3f0;
    --house-strong:#f8fafc;
    --house-muted:#aeb9c8;
    --house-subtle:#8fa0b5;
    --house-shadow:0 22px 50px rgba(0,0,0,.34);
    --house-shadow-soft:0 12px 26px rgba(0,0,0,.26);
    background:
      radial-gradient(circle at 12% 18%, rgba(148,163,184,.12), transparent 32rem),
      linear-gradient(180deg,var(--house-bg),var(--house-bg-soft)) !important;
    color-scheme:dark;
  }
}
html[data-theme="dark"] body.cmep-state-page,
html.dark body.cmep-state-page,
body.cmep-state-page.dark,
body.cmep-state-page.dark-mode{
  --house-bg:#050b16;
  --house-bg-soft:#020617;
  --house-surface:#0c1422;
  --house-surface-2:#111b2a;
  --house-surface-3:#162235;
  --house-border:#263347;
  --house-border-strong:#384861;
  --house-text:#d9e3f0;
  --house-strong:#f8fafc;
  --house-muted:#aeb9c8;
  --house-subtle:#8fa0b5;
  --house-shadow:0 22px 50px rgba(0,0,0,.34);
  --house-shadow-soft:0 12px 26px rgba(0,0,0,.26);
  background:
    radial-gradient(circle at 12% 18%, rgba(148,163,184,.12), transparent 32rem),
    linear-gradient(180deg,var(--house-bg),var(--house-bg-soft)) !important;
  color-scheme:dark;
}
html[data-theme="light"] body.cmep-state-page,
html.light body.cmep-state-page,
body.cmep-state-page.light,
body.cmep-state-page.light-mode{
  --house-bg:#f3f5f8;
  --house-bg-soft:#eef2f7;
  --house-surface:#ffffff;
  --house-surface-2:#f8fafc;
  --house-surface-3:#eef2f7;
  --house-border:#d8dee8;
  --house-border-strong:#b9c3d1;
  --house-text:#172033;
  --house-strong:#08111f;
  --house-muted:#5d6b7f;
  --house-subtle:#7b8798;
  --house-shadow:0 18px 38px rgba(15,23,42,.08);
  --house-shadow-soft:0 8px 20px rgba(15,23,42,.06);
  background:
    radial-gradient(circle at 12% 18%, rgba(100,116,139,.12), transparent 28rem),
    linear-gradient(180deg,var(--house-bg),var(--house-bg-soft)) !important;
  color-scheme:light;
}

body.cmep-state-page *,
body.cmep-state-page *::before,
body.cmep-state-page *::after{box-sizing:border-box;}

/* Injected/global header: match House/Senate/Governor. */
body.cmep-state-page .cm-header,
body.cmep-state-page .cm-header header,
body.cmep-state-page header.cm-header,
body.cmep-state-page #cm-header{
  position:sticky !important;
  top:0 !important;
  z-index:50 !important;
  background:var(--house-surface) !important;
  border-bottom:1px solid var(--house-border) !important;
  box-shadow:none !important;
  color:var(--house-text) !important;
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
}
body.cmep-state-page .header-inner{
  max-width:1150px !important;
  padding:.8rem 1rem 1rem !important;
  gap:.55rem !important;
}
body.cmep-state-page .logo-link,
body.cmep-state-page .site-title,
body.cmep-state-page #cm-header a{color:var(--house-strong) !important;}
body.cmep-state-page #cm-nav{
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;
  padding:0 !important;
  gap:.45rem !important;
}
body.cmep-state-page #cm-nav a{
  background:transparent !important;
  color:var(--house-muted) !important;
  border:0 !important;
  border-radius:999px !important;
  padding:.42rem .85rem !important;
  font-size:.92rem !important;
  line-height:1.1 !important;
  font-weight:800 !important;
  box-shadow:none !important;
}
body.cmep-state-page #cm-nav a:hover,
body.cmep-state-page #cm-nav a.active,
body.cmep-state-page #cm-nav a.is-active,
body.cmep-state-page #cm-nav a.selected,
body.cmep-state-page #cm-nav a.current,
body.cmep-state-page #cm-nav a[aria-current="page"]{
  background:var(--house-surface-3) !important;
  color:var(--house-strong) !important;
  box-shadow:none !important;
}

body.cmep-state-page .container{
  width:min(var(--house-shell), calc(100% - 2rem)) !important;
  max-width:var(--house-shell) !important;
  margin:0 auto !important;
  padding:1.4rem 0 2.25rem !important;
}

body.cmep-state-page .page-head{
  margin:0 0 1.1rem !important;
  width:100% !important;
}
body.cmep-state-page .us-hero{
  width:100% !important;
  max-width:1120px !important;
  margin:0 auto !important;
  padding:clamp(1.55rem,3.2vw,2.45rem) clamp(1.1rem,3vw,2rem) !important;
  border:1px solid var(--house-border) !important;
  border-radius:var(--house-radius) !important;
  background:
    radial-gradient(circle at 50% 0%, rgba(148,163,184,.16), transparent 28rem),
    linear-gradient(180deg,var(--house-surface),var(--house-surface-2)) !important;
  box-shadow:var(--house-shadow) !important;
  text-align:center !important;
  overflow:hidden !important;
}
body.cmep-state-page .us-outline-wrap{
  width:min(560px, 86vw) !important;
  height:clamp(118px,18vw,190px) !important;
  margin:.1rem auto .35rem !important;
  color:var(--house-muted) !important;
  opacity:.94 !important;
}
body.cmep-state-page .cm-h1{
  margin:0 !important;
  color:var(--house-strong) !important;
  font-size:clamp(2.15rem,4.2vw,4.35rem) !important;
  line-height:.96 !important;
  letter-spacing:-.06em !important;
  font-weight:950 !important;
  text-wrap:balance !important;
}
body.cmep-state-page .sub{
  max-width:54rem !important;
  margin:.72rem auto 0 !important;
  color:var(--house-muted) !important;
  font-size:clamp(1rem,1.5vw,1.18rem) !important;
  line-height:1.48 !important;
  font-weight:650 !important;
  text-wrap:balance !important;
}

body.cmep-state-page .controls{
  max-width:1120px !important;
  margin:1rem auto 1.05rem !important;
  justify-content:center !important;
  gap:.72rem !important;
}
body.cmep-state-page .search{
  flex:1 1 420px !important;
  max-width:560px !important;
  min-height:2.75rem !important;
  border-radius:999px !important;
  border:1px solid var(--house-border) !important;
  background:var(--house-surface-2) !important;
  box-shadow:var(--house-shadow-soft) !important;
  padding:.66rem 1rem !important;
  color:var(--house-muted) !important;
}
body.cmep-state-page .search:focus-within{
  border-color:var(--house-border-strong) !important;
  box-shadow:0 0 0 3px rgba(100,116,139,.16), var(--house-shadow-soft) !important;
}
body.cmep-state-page .search span{
  width:1.1rem !important;
  display:inline-flex !important;
  justify-content:center !important;
  opacity:.62 !important;
  filter:grayscale(1) !important;
}
body.cmep-state-page .search input{
  color:var(--house-strong) !important;
  font-size:.95rem !important;
  line-height:1.2 !important;
  font-weight:700 !important;
  min-width:0 !important;
}
body.cmep-state-page .search input::placeholder{color:var(--house-subtle) !important;font-weight:650 !important;}
body.cmep-state-page .pill,
body.cmep-state-page #countPill{
  min-height:2.25rem !important;
  padding:.42rem .78rem !important;
  border-radius:999px !important;
  border:1px solid var(--house-border) !important;
  background:var(--house-surface-2) !important;
  color:var(--house-muted) !important;
  box-shadow:none !important;
  font-size:.78rem !important;
  line-height:1 !important;
  font-weight:850 !important;
}

body.cmep-state-page .cm-card{
  max-width:1120px !important;
  margin:0 auto !important;
  padding:clamp(1rem,2vw,1.25rem) !important;
  border-radius:var(--house-radius) !important;
  border:1px solid var(--house-border) !important;
  background:var(--house-surface) !important;
  box-shadow:var(--house-shadow) !important;
}
body.cmep-state-page .grid{
  display:grid !important;
  grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr)) !important;
  gap:.78rem !important;
}
body.cmep-state-page .tile{
  grid-column:auto !important;
  min-height:5.45rem !important;
  padding:1rem !important;
  border-radius:18px !important;
  border:1px solid var(--house-border) !important;
  background:var(--house-surface-2) !important;
  box-shadow:var(--house-shadow-soft) !important;
  color:inherit !important;
  transition:transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease !important;
}
body.cmep-state-page .tile:hover,
body.cmep-state-page .tile:focus-visible{
  transform:translateY(-2px) !important;
  border-color:var(--house-border-strong) !important;
  background:var(--house-surface) !important;
  box-shadow:var(--house-shadow) !important;
  outline:none !important;
}
body.cmep-state-page .left{gap:.18rem !important;}
body.cmep-state-page .abbr{
  color:var(--house-muted) !important;
  font-size:.72rem !important;
  letter-spacing:.14em !important;
  font-weight:900 !important;
}
body.cmep-state-page .name{
  color:var(--house-strong) !important;
  font-size:1.06rem !important;
  line-height:1.15 !important;
  font-weight:900 !important;
  letter-spacing:-.02em !important;
}
body.cmep-state-page .hint{
  color:var(--house-muted) !important;
  font-size:.86rem !important;
  font-weight:700 !important;
}
body.cmep-state-page .chev{
  width:2.15rem !important;
  height:2.15rem !important;
  border-radius:999px !important;
  border:1px solid var(--house-border) !important;
  background:var(--house-surface) !important;
  color:var(--house-muted) !important;
  box-shadow:none !important;
  font-size:1.2rem !important;
}
body.cmep-state-page .empty{
  color:var(--house-muted) !important;
  font-weight:700 !important;
  text-align:center !important;
  padding:1rem !important;
}

@media (max-width:760px){
  body.cmep-state-page .header-inner{
    padding:.58rem .45rem .72rem !important;
    gap:.42rem !important;
  }
  body.cmep-state-page #cm-nav{gap:.22rem !important;}
  body.cmep-state-page #cm-nav a{
    padding:.38rem .58rem !important;
    font-size:.82rem !important;
  }
  body.cmep-state-page .container{
    width:min(100% - .9rem, var(--house-shell)) !important;
    padding:.85rem 0 1.5rem !important;
  }
  body.cmep-state-page .us-hero{
    padding:1.05rem .9rem 1.25rem !important;
    border-radius:19px !important;
  }
  body.cmep-state-page .us-outline-wrap{
    height:clamp(94px,30vw,130px) !important;
    margin-bottom:.25rem !important;
  }
  body.cmep-state-page .cm-h1{font-size:clamp(1.9rem,9vw,2.75rem) !important;}
  body.cmep-state-page .sub{font-size:.95rem !important;}
  body.cmep-state-page .controls{
    flex-direction:column !important;
    align-items:stretch !important;
    margin:.85rem auto .9rem !important;
  }
  body.cmep-state-page .search{
    max-width:none !important;
    width:100% !important;
    flex-basis:auto !important;
  }
  body.cmep-state-page #countPill{align-self:center !important;}
  body.cmep-state-page .cm-card{border-radius:19px !important;padding:.75rem !important;}
  body.cmep-state-page .grid{gap:.6rem !important;}
  body.cmep-state-page .tile{min-height:5rem !important;padding:.9rem !important;border-radius:16px !important;}
}

/* 2026-06-29 — state page parity pass: election-night state header, district-search input, House-style list. */
body.cmep-state-page .container{
  width:min(1150px, calc(100% - 2.4rem)) !important;
  max-width:1150px !important;
  padding:1.2rem 0 2.25rem !important;
}

/* Header: match election-night/primary/state: outline + prefix + title, no forecast-card shell. */
body.cmep-state-page .page-head{
  margin:.25rem 0 1.2rem !important;
  display:flex !important;
  flex-direction:column !important;
  gap:.35rem !important;
  align-items:center !important;
  text-align:center !important;
}
body.cmep-state-page .us-hero,
body.cmep-state-page .state-hero{
  width:100% !important;
  max-width:none !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
  justify-content:center !important;
  gap:.35rem !important;
  overflow:visible !important;
}
body.cmep-state-page .us-outline-wrap,
body.cmep-state-page .state-outline-wrap{
  width:min(460px, 82vw) !important;
  height:clamp(120px,18vw,200px) !important;
  aspect-ratio:2.25 / 1 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  color:var(--text-muted) !important;
  margin:.15rem auto !important;
  opacity:1 !important;
}
body.cmep-state-page .us-outline-wrap svg,
body.cmep-state-page .state-outline-wrap svg{
  display:block !important;
  width:100% !important;
  height:100% !important;
  overflow:visible !important;
}
body.cmep-state-page .state-prefix{
  font-size:.8rem !important;
  text-transform:uppercase !important;
  letter-spacing:.12em !important;
  font-weight:700 !important;
  color:var(--text-muted) !important;
  margin:0 !important;
}
body.cmep-state-page .state-name,
body.cmep-state-page .cm-h1.state-name{
  font-size:clamp(1.8rem,2.6vw,2.6rem) !important;
  font-weight:800 !important;
  letter-spacing:-.03em !important;
  line-height:1.05 !important;
  color:var(--text-strong) !important;
  margin:0 !important;
  text-wrap:balance !important;
}
body.cmep-state-page .state-subtitle,
body.cmep-state-page .sub{
  font-size:.95rem !important;
  color:var(--text-muted) !important;
  margin:.1rem 0 0 !important;
  line-height:1.35 !important;
  font-weight:500 !important;
  max-width:50rem !important;
  text-wrap:balance !important;
}

/* Remove the former freestanding controls; list card owns the controls now. */
body.cmep-state-page .controls{display:none !important;}

/* Card/list shell: match House/Senate/Governor All Seats list treatment. */
body.cmep-state-page #cmep-state-by-state-card.card{
  width:100% !important;
  max-width:1120px !important;
  margin:0 auto 1.2rem !important;
  padding:0 !important;
  border:1px solid var(--house-border) !important;
  border-radius:var(--house-radius) !important;
  background:var(--house-surface) !important;
  color:var(--house-text) !important;
  box-shadow:var(--house-shadow) !important;
  overflow:visible !important;
}
body.cmep-state-page #cmep-state-by-state-card .card-header,
body.cmep-state-page #cmep-state-by-state-card .card-header > div{
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
  justify-content:center !important;
  text-align:center !important;
  gap:.34rem !important;
  width:100% !important;
}
body.cmep-state-page #cmep-state-by-state-card .card-header{
  padding:1.22rem 1.25rem .7rem !important;
  border-bottom:0 !important;
}
body.cmep-state-page #cmep-state-by-state-card .card-title{
  margin:0 !important;
  color:var(--house-strong) !important;
  font-size:clamp(1.34rem,2vw,1.72rem) !important;
  line-height:1.08 !important;
  font-weight:950 !important;
  letter-spacing:-.035em !important;
}
body.cmep-state-page #cmep-state-by-state-card .card-subtitle{
  max-width:46rem !important;
  margin:0 auto !important;
  color:var(--house-muted) !important;
  font-size:.94rem !important;
  line-height:1.42 !important;
  font-weight:650 !important;
}
body.cmep-state-page #cmep-state-by-state-card .card-body{
  padding:0 1.1rem 1.15rem !important;
}

/* Search bar: exact treatment from /house/districts standardized search field. */
body.cmep-state-page #cmep-state-by-state-card .cmep-by-state-controls{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto !important;
  align-items:center !important;
  gap:.75rem !important;
  margin:.4rem 0 1rem !important;
}
body.cmep-state-page #cmep-state-by-state-card .state-directory-search,
body.cmep-state-page #cmep-state-by-state-card .cmep-by-state-filter{
  width:100% !important;
  appearance:none !important;
  -webkit-appearance:none !important;
  box-sizing:border-box !important;
  border:1px solid var(--border-subtle, var(--house-border)) !important;
  background:var(--bg-card-subtle, var(--house-surface-2)) !important;
  color:var(--text-strong, var(--house-strong)) !important;
  border-radius:12px !important;
  min-height:3.15rem !important;
  padding:.72rem 1rem !important;
  font:inherit !important;
  font-size:.95rem !important;
  line-height:1.2 !important;
  font-weight:650 !important;
  box-shadow:var(--shadow-subtle, var(--house-shadow-soft)) !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}
body.cmep-state-page #cmep-state-by-state-card .state-directory-search::placeholder,
body.cmep-state-page #cmep-state-by-state-card .cmep-by-state-filter::placeholder{
  color:var(--text-muted, var(--house-muted)) !important;
  opacity:1 !important;
  text-overflow:ellipsis !important;
}
body.cmep-state-page #cmep-state-by-state-card .state-directory-search:focus,
body.cmep-state-page #cmep-state-by-state-card .cmep-by-state-filter:focus{
  outline:none !important;
  border-color:rgba(0,118,186,.36) !important;
  box-shadow:0 0 0 3px rgba(0,118,186,.12) !important;
}
body.dark.cmep-state-page #cmep-state-by-state-card .state-directory-search:focus,
body.dark-mode.cmep-state-page #cmep-state-by-state-card .state-directory-search:focus,
html.dark body.cmep-state-page #cmep-state-by-state-card .state-directory-search:focus,
html[data-theme="dark"] body.cmep-state-page #cmep-state-by-state-card .state-directory-search:focus{
  border-color:rgba(0,162,255,.36) !important;
  box-shadow:0 0 0 3px rgba(0,162,255,.14) !important;
}
body.cmep-state-page #cmep-state-by-state-card .cmep-by-state-meta{
  color:var(--house-muted) !important;
  font-size:.82rem !important;
  font-weight:850 !important;
  white-space:nowrap !important;
}

body.cmep-state-page #cmep-state-by-state-card .cmep-by-state-list{
  display:grid !important;
  grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr)) !important;
  gap:.85rem !important;
  align-items:start !important;
}
body.cmep-state-page #cmep-state-by-state-card .cmep-collapse,
body.cmep-state-page #cmep-state-by-state-card a.cmep-state-link{
  display:block !important;
  color:inherit !important;
  text-decoration:none !important;
  border:1px solid var(--house-border) !important;
  border-radius:18px !important;
  background:var(--house-surface-2) !important;
  box-shadow:var(--house-shadow-soft) !important;
  overflow:hidden !important;
  transition:transform 160ms ease,border-color 160ms ease,box-shadow 160ms ease,background-color 160ms ease !important;
}
body.cmep-state-page #cmep-state-by-state-card a.cmep-state-link:hover,
body.cmep-state-page #cmep-state-by-state-card a.cmep-state-link:focus-visible{
  transform:translateY(-2px) !important;
  border-color:var(--house-border-strong) !important;
  background:var(--house-surface) !important;
  box-shadow:var(--house-shadow) !important;
  outline:none !important;
}
body.cmep-state-page #cmep-state-by-state-card .cmep-collapse-summary{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:1rem !important;
  width:100% !important;
  min-height:5.25rem !important;
  padding:1rem 1.05rem !important;
  cursor:pointer !important;
  list-style:none !important;
}
body.cmep-state-page #cmep-state-by-state-card .cmep-collapse-left{
  min-width:0 !important;
  display:flex !important;
  flex-direction:column !important;
  gap:.22rem !important;
}
body.cmep-state-page #cmep-state-by-state-card .cmep-collapse-title{
  color:var(--house-strong) !important;
  font-size:1.04rem !important;
  line-height:1.14 !important;
  font-weight:920 !important;
  letter-spacing:-.02em !important;
}
body.cmep-state-page #cmep-state-by-state-card .cmep-collapse-subtitle{
  color:var(--house-muted) !important;
  font-size:.84rem !important;
  line-height:1.28 !important;
  font-weight:700 !important;
}
body.cmep-state-page #cmep-state-by-state-card .cmep-collapse-right{
  display:flex !important;
  align-items:center !important;
  gap:.55rem !important;
  flex:0 0 auto !important;
}
body.cmep-state-page #cmep-state-by-state-card .pill-neutral{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-width:2.2rem !important;
  min-height:1.75rem !important;
  padding:.32rem .58rem !important;
  border-radius:999px !important;
  border:1px solid var(--house-border) !important;
  background:var(--house-surface) !important;
  color:var(--house-muted) !important;
  font-size:.74rem !important;
  font-weight:900 !important;
  line-height:1 !important;
  box-shadow:none !important;
}
body.cmep-state-page #cmep-state-by-state-card .cmep-collapse-chevron{
  position:relative !important;
  display:inline-flex !important;
  width:2rem !important;
  height:2rem !important;
  border-radius:999px !important;
  border:1px solid var(--house-border) !important;
  background:var(--house-surface) !important;
  flex:0 0 auto !important;
}
body.cmep-state-page #cmep-state-by-state-card .cmep-collapse-chevron::before{
  content:"" !important;
  position:absolute !important;
  left:50% !important;
  top:50% !important;
  width:.46rem !important;
  height:.46rem !important;
  border-right:2px solid var(--house-muted) !important;
  border-bottom:2px solid var(--house-muted) !important;
  transform:translate(-62%,-50%) rotate(-45deg) !important;
}
body.cmep-state-page #cmep-state-by-state-card .empty{
  margin-top:.85rem !important;
  color:var(--house-muted) !important;
  font-weight:700 !important;
  text-align:center !important;
  padding:1rem !important;
}

/* Neutralize older tile/grid rules after the markup migration. */
body.cmep-state-page #cmep-state-by-state-card .grid,
body.cmep-state-page #cmep-state-by-state-card .tile,
body.cmep-state-page #cmep-state-by-state-card .left,
body.cmep-state-page #cmep-state-by-state-card .abbr,
body.cmep-state-page #cmep-state-by-state-card .name,
body.cmep-state-page #cmep-state-by-state-card .hint,
body.cmep-state-page #cmep-state-by-state-card .chev{
  all:unset;
}

@media (max-width:760px){
  body.cmep-state-page .container{
    width:min(100% - .9rem, 1150px) !important;
    padding:.85rem 0 1.5rem !important;
  }
  body.cmep-state-page .us-outline-wrap,
  body.cmep-state-page .state-outline-wrap{
    height:clamp(94px,30vw,130px) !important;
  }
  body.cmep-state-page .state-name,
  body.cmep-state-page .cm-h1.state-name{
    font-size:clamp(1.85rem,8vw,2.55rem) !important;
  }
  body.cmep-state-page #cmep-state-by-state-card.card{
    border-radius:19px !important;
  }
  body.cmep-state-page #cmep-state-by-state-card .card-header{
    padding:1rem .9rem .6rem !important;
  }
  body.cmep-state-page #cmep-state-by-state-card .card-body{
    padding:0 .75rem .85rem !important;
  }
  body.cmep-state-page #cmep-state-by-state-card .cmep-by-state-controls{
    grid-template-columns:1fr !important;
    gap:.55rem !important;
  }
  body.cmep-state-page #cmep-state-by-state-card .cmep-by-state-meta{
    justify-self:center !important;
  }
  body.cmep-state-page #cmep-state-by-state-card .state-directory-search,
  body.cmep-state-page #cmep-state-by-state-card .cmep-by-state-filter{
    min-height:3.05rem !important;
    padding:.78rem .92rem !important;
    font-size:.9rem !important;
  }
  body.cmep-state-page #cmep-state-by-state-card .cmep-by-state-list{
    grid-template-columns:1fr !important;
    gap:.62rem !important;
  }
  body.cmep-state-page #cmep-state-by-state-card .cmep-collapse-summary{
    min-height:4.85rem !important;
    padding:.9rem !important;
  }
}


/* 2026-06-30 — state page cleanup: correct copy, accurate count, House-width shell. */
body.cmep-state-page .container{
  width:min(var(--house-shell), calc(100% - 2rem)) !important;
  max-width:var(--house-shell) !important;
}
body.cmep-state-page #cmep-state-by-state-card.card{
  max-width:var(--house-shell) !important;
}
body.cmep-state-page #cmep-state-by-state-card .cmep-collapse-subtitle{
  max-width:100% !important;
}
@media (max-width:760px){
  body.cmep-state-page .container{
    width:min(100% - .9rem, var(--house-shell)) !important;
    max-width:var(--house-shell) !important;
  }
}


/* Final state-directory polish: match /house/district/ search field and simplify cards. */
body.cmep-state-page #cmep-state-by-state-card .cmep-by-state-controls{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto !important;
  align-items:center !important;
  gap:.75rem !important;
  margin:.4rem 0 1rem !important;
}
body.cmep-state-page #cmep-state-by-state-card .state-directory-search-wrap,
body.cmep-state-page #cmep-state-by-state-card .county-search-wrap{
  display:block !important;
  min-width:0 !important;
  width:100% !important;
}
body.cmep-state-page #cmep-state-by-state-card .state-directory-search,
body.cmep-state-page #cmep-state-by-state-card .cmep-by-state-filter,
body.cmep-state-page #cmep-state-by-state-card .county-search-input{
  width:100% !important;
  appearance:none !important;
  -webkit-appearance:none !important;
  box-sizing:border-box !important;
  border:1px solid var(--border-subtle, var(--house-border)) !important;
  background:var(--bg-card-subtle, var(--house-surface-2)) !important;
  color:var(--text-strong, var(--house-strong)) !important;
  border-radius:12px !important;
  min-height:3.15rem !important;
  padding:.72rem 1rem !important;
  font:inherit !important;
  font-size:.95rem !important;
  line-height:1.2 !important;
  font-weight:inherit !important;
  box-shadow:var(--shadow-subtle, var(--house-shadow-soft)) !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}
body.cmep-state-page #cmep-state-by-state-card .state-directory-search::placeholder,
body.cmep-state-page #cmep-state-by-state-card .cmep-by-state-filter::placeholder,
body.cmep-state-page #cmep-state-by-state-card .county-search-input::placeholder{
  color:var(--text-muted, var(--house-muted)) !important;
  opacity:1 !important;
  text-overflow:ellipsis !important;
  font-weight:inherit !important;
}
body.cmep-state-page #cmep-state-by-state-card .state-directory-search:focus,
body.cmep-state-page #cmep-state-by-state-card .cmep-by-state-filter:focus,
body.cmep-state-page #cmep-state-by-state-card .county-search-input:focus{
  outline:none !important;
  border-color:rgba(0,118,186,.36) !important;
  box-shadow:0 0 0 3px rgba(0,118,186,.12) !important;
}
body.dark.cmep-state-page #cmep-state-by-state-card .state-directory-search:focus,
body.dark-mode.cmep-state-page #cmep-state-by-state-card .state-directory-search:focus,
html.dark body.cmep-state-page #cmep-state-by-state-card .state-directory-search:focus,
html[data-theme="dark"] body.cmep-state-page #cmep-state-by-state-card .state-directory-search:focus,
body.dark.cmep-state-page #cmep-state-by-state-card .county-search-input:focus,
body.dark-mode.cmep-state-page #cmep-state-by-state-card .county-search-input:focus,
html.dark body.cmep-state-page #cmep-state-by-state-card .county-search-input:focus,
html[data-theme="dark"] body.cmep-state-page #cmep-state-by-state-card .county-search-input:focus{
  border-color:rgba(0,162,255,.36) !important;
  box-shadow:0 0 0 3px rgba(0,162,255,.14) !important;
}
body.cmep-state-page #cmep-state-by-state-card .state-directory-search::-webkit-search-cancel-button{
  opacity:.65 !important;
}
body.cmep-state-page #cmep-state-by-state-card .cmep-by-state-meta{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-height:2.15rem !important;
  min-width:7.8rem !important;
  padding:.42rem .8rem !important;
  border-radius:999px !important;
  border:1px solid var(--house-border) !important;
  background:var(--house-surface) !important;
  color:var(--house-muted) !important;
  font-size:.78rem !important;
  font-weight:900 !important;
  line-height:1 !important;
  text-align:center !important;
  white-space:nowrap !important;
  box-shadow:none !important;
  justify-self:end !important;
}
body.cmep-state-page #cmep-state-by-state-card .cmep-collapse-title{
  font-size:1.2rem !important;
  line-height:1.12 !important;
  font-weight:940 !important;
}
body.cmep-state-page #cmep-state-by-state-card .cmep-collapse-left{
  justify-content:center !important;
}
body.cmep-state-page #cmep-state-by-state-card .cmep-collapse-summary{
  min-height:5rem !important;
}
body.cmep-state-page #cmep-state-by-state-card .cmep-collapse-subtitle{
  display:none !important;
}
@media (max-width:760px){
  body.cmep-state-page #cmep-state-by-state-card .cmep-by-state-controls{
    grid-template-columns:1fr !important;
    gap:.55rem !important;
  }
  body.cmep-state-page #cmep-state-by-state-card .cmep-by-state-meta{
    justify-self:center !important;
    min-width:7.8rem !important;
  }
  body.cmep-state-page #cmep-state-by-state-card .state-directory-search,
  body.cmep-state-page #cmep-state-by-state-card .cmep-by-state-filter,
  body.cmep-state-page #cmep-state-by-state-card .county-search-input{
    min-height:3.05rem !important;
    padding:.78rem .92rem !important;
    font-size:.9rem !important;
  }
  body.cmep-state-page #cmep-state-by-state-card .cmep-collapse-title{
    font-size:1.12rem !important;
  }
}

/*
 * Safari can defer painting a below-the-fold card that inherits
 * content-visibility:auto until a resize or Web Inspector invalidates layout.
 * These links are already present in the initial HTML, so render this directory
 * normally and reserve containment optimizations for genuinely heavy modules.
 */
body.cmep-state-page #cmep-state-by-state-card,
body.cmep-state-page #cmep-state-by-state-card .card-body,
body.cmep-state-page #cmep-state-by-state-card #grid,
body.cmep-state-page #cmep-state-by-state-card #grid > a{
  content-visibility:visible !important;
  contain:none !important;
  contain-intrinsic-size:auto !important;
}

/* 2026-06-30 — final state search radius parity with /house/district/. */
body.cmep-state-page #cmep-state-by-state-card .cmep-by-state-controls{
  align-items:center !important;
}
body.cmep-state-page #cmep-state-by-state-card .county-search-wrap.state-directory-search-wrap,
body.cmep-state-page #cmep-state-by-state-card .state-directory-search-wrap{
  display:block !important;
  width:100% !important;
  min-width:0 !important;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  border-radius:14px !important;
  overflow:visible !important;
}
body.cmep-state-page #cmep-state-by-state-card input#q.county-search-input.state-directory-search,
body.cmep-state-page #cmep-state-by-state-card .county-search-input.state-directory-search,
body.cmep-state-page #cmep-state-by-state-card .state-directory-search{
  display:block !important;
  width:100% !important;
  appearance:none !important;
  -webkit-appearance:none !important;
  box-sizing:border-box !important;
  border:1px solid var(--border-subtle, var(--house-border)) !important;
  background:var(--bg-card-subtle, var(--house-surface-2)) !important;
  color:var(--text-strong, var(--house-strong)) !important;
  border-radius:14px !important;
  min-height:3.15rem !important;
  padding:.72rem 1rem !important;
  font:inherit !important;
  font-size:.95rem !important;
  line-height:1.2 !important;
  font-weight:inherit !important;
  box-shadow:var(--shadow-subtle, var(--house-shadow-soft)) !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}
body.cmep-state-page #cmep-state-by-state-card input#q.county-search-input.state-directory-search::placeholder{
  color:var(--text-muted, var(--house-muted)) !important;
  opacity:1 !important;
  font-weight:inherit !important;
}
body.cmep-state-page #cmep-state-by-state-card input#q.county-search-input.state-directory-search:focus{
  outline:none !important;
  border-color:rgba(0,118,186,.36) !important;
  box-shadow:0 0 0 3px rgba(0,118,186,.12) !important;
}
body.dark.cmep-state-page #cmep-state-by-state-card input#q.county-search-input.state-directory-search:focus,
body.dark-mode.cmep-state-page #cmep-state-by-state-card input#q.county-search-input.state-directory-search:focus,
html.dark body.cmep-state-page #cmep-state-by-state-card input#q.county-search-input.state-directory-search:focus,
html[data-theme="dark"] body.cmep-state-page #cmep-state-by-state-card input#q.county-search-input.state-directory-search:focus{
  border-color:rgba(0,162,255,.36) !important;
  box-shadow:0 0 0 3px rgba(0,162,255,.14) !important;
}
body.cmep-state-page #cmep-state-by-state-card #countPill.cmep-by-state-meta{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  text-align:center !important;
  line-height:1 !important;
  padding:.42rem .8rem !important;
}
@media (max-width:760px){
  body.cmep-state-page #cmep-state-by-state-card input#q.county-search-input.state-directory-search{
    min-height:3.05rem !important;
    padding:.78rem .92rem !important;
    font-size:.9rem !important;
  }
}

/* 2026-06-30 — state directory search: visually match /house/district/ pill search. */
body.cmep-state-page #cmep-state-by-state-card .cmep-by-state-controls{
  grid-template-columns:minmax(0,1fr) auto !important;
  align-items:center !important;
  gap:.75rem !important;
}
body.cmep-state-page #cmep-state-by-state-card .county-search-wrap.state-directory-search-wrap,
body.cmep-state-page #cmep-state-by-state-card .state-directory-search-wrap{
  display:block !important;
  min-width:0 !important;
  width:100% !important;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  border-radius:999px !important;
  overflow:visible !important;
}
body.cmep-state-page #cmep-state-by-state-card input#q.county-search-input.state-directory-search,
body.cmep-state-page #cmep-state-by-state-card .county-search-input.state-directory-search,
body.cmep-state-page #cmep-state-by-state-card .state-directory-search{
  display:block !important;
  width:100% !important;
  appearance:none !important;
  -webkit-appearance:none !important;
  box-sizing:border-box !important;
  border:1px solid var(--border-subtle, var(--house-border)) !important;
  background:var(--bg-card-subtle, var(--house-surface-2)) !important;
  color:var(--text-strong, var(--house-strong)) !important;
  border-radius:999px !important;
  min-height:3.15rem !important;
  padding:.72rem 1.35rem !important;
  font:inherit !important;
  font-size:.95rem !important;
  line-height:1.2 !important;
  box-shadow:var(--shadow-subtle, var(--house-shadow-soft)) !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}
body.cmep-state-page #cmep-state-by-state-card input#q.county-search-input.state-directory-search::placeholder,
body.cmep-state-page #cmep-state-by-state-card .county-search-input.state-directory-search::placeholder,
body.cmep-state-page #cmep-state-by-state-card .state-directory-search::placeholder{
  color:var(--text-muted, var(--house-muted)) !important;
  opacity:1 !important;
  text-overflow:ellipsis !important;
}
body.cmep-state-page #cmep-state-by-state-card input#q.county-search-input.state-directory-search:focus,
body.cmep-state-page #cmep-state-by-state-card .county-search-input.state-directory-search:focus,
body.cmep-state-page #cmep-state-by-state-card .state-directory-search:focus{
  outline:none !important;
  border-color:rgba(0,118,186,.36) !important;
  box-shadow:0 0 0 3px rgba(0,118,186,.12) !important;
}
body.dark.cmep-state-page #cmep-state-by-state-card input#q.county-search-input.state-directory-search:focus,
body.dark-mode.cmep-state-page #cmep-state-by-state-card input#q.county-search-input.state-directory-search:focus,
html.dark body.cmep-state-page #cmep-state-by-state-card input#q.county-search-input.state-directory-search:focus,
html[data-theme="dark"] body.cmep-state-page #cmep-state-by-state-card input#q.county-search-input.state-directory-search:focus{
  border-color:rgba(0,162,255,.36) !important;
  box-shadow:0 0 0 3px rgba(0,162,255,.14) !important;
}
body.cmep-state-page #cmep-state-by-state-card #countPill.cmep-by-state-meta{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-height:2.15rem !important;
  line-height:1 !important;
  padding:.42rem .85rem !important;
  text-align:center !important;
}
@media (max-width:760px){
  body.cmep-state-page #cmep-state-by-state-card .cmep-by-state-controls{
    grid-template-columns:1fr !important;
  }
  body.cmep-state-page #cmep-state-by-state-card input#q.county-search-input.state-directory-search,
  body.cmep-state-page #cmep-state-by-state-card .county-search-input.state-directory-search,
  body.cmep-state-page #cmep-state-by-state-card .state-directory-search{
    min-height:3.05rem !important;
    padding:.78rem 1rem !important;
    font-size:.9rem !important;
  }
}
