/* PolitiCloud States: map, state pages, state official cards */

.page-head.left { justify-content: flex-start; gap: 12px 24px; }
.page-head.left > div:first-child { flex: 1 1 320px; }
.small { font-size: 13px; }
.credit { margin-top: 14px; }
.list-head { font-size: 22px; margin: 26px 0 12px; }

/* Pilot banner */
.pilot-banner {
  display: flex; align-items: center; gap: 12px; text-decoration: none; margin-bottom: 14px;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 16px; min-height: 56px;
  border-left: 5px solid var(--glow);
}
.pilot-banner:hover .arrow { transform: translateX(4px); }
.pilot-tag { flex: none; font: 700 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; background: var(--glow); color: #2a2000; padding: 6px 8px; border-radius: 6px; }
.pilot-banner .arrow { margin-left: auto; font-size: 20px; transition: transform .15s; }

/* Map */
.map-wrap { background: var(--surface); border-radius: 22px; box-shadow: var(--shadow); padding: 12px 10px 14px; }
.us-map { width: 100%; height: auto; display: block; }
.us-map .st {
  stroke: var(--bg); stroke-width: 1; stroke-linejoin: round; cursor: pointer;
  transition: fill .3s, stroke .15s, filter .15s;
}
.us-map .st:hover { filter: brightness(1.08); }
.us-map .st-hover { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; pointer-events: none; opacity: 0; transition: opacity .12s; filter: drop-shadow(0 2px 4px rgb(0 0 0 / .35)); }
.us-map .st-hover.on { opacity: 1; }
.us-map .st.pilot { stroke: var(--glow); stroke-width: 2.5; }
.us-map .st.pilot:hover { stroke: var(--ink); }
.st-label {
  font: 700 13px var(--mono); fill: #fff; pointer-events: none;
  paint-order: stroke; stroke: rgb(0 0 0 / .35); stroke-width: 2.5px;
}
@media (max-width: 600px) { .st-label { font-size: 17px; } }
.map-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: 13px; color: var(--ink-2); padding: 10px 6px 0; }
.map-legend .grad.news { background: linear-gradient(90deg, color-mix(in srgb, var(--center) 15%, transparent), var(--center)); }

/* All-states grid */
.state-grid { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .state-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .state-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.state-chip {
  display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 12px; text-decoration: none;
  background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); border-left: 4px solid var(--c, var(--line));
  transition: transform .15s;
}
.state-chip[data-b="left"] { --c: var(--left); } .state-chip[data-b="center"] { --c: var(--center); } .state-chip[data-b="right"] { --c: var(--right); }
.state-chip:hover { transform: translateY(-1px); }
.state-chip .code { font: 700 12px var(--mono); color: var(--ink-2); flex: none; width: 24px; }
.state-chip .nm { font-weight: 600; font-size: 15px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.state-chip .badge { margin-left: auto; }
.state-chip.pilot { outline: 2px solid var(--glow); outline-offset: -2px; }

/* State page */
.crumb { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--ink-2); text-decoration: none; }
.crumb:hover { color: var(--ink); }
.state-head h1 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.state-head h1 .badge { font-size: 12px; }
.state-summary { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px !important; }
.state-summary span { background: var(--surface); box-shadow: var(--shadow); border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 600; color: var(--ink); }
.state-tabs { margin-bottom: 16px; }
.state-body > .seg { margin-bottom: 12px; }
.state-chamber { margin-bottom: 0; }

/* Officials */
.officials { display: grid; gap: 12px; }
@media (min-width: 720px) { .officials { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.official { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; display: grid; gap: 12px; border-top: 4px solid var(--c, var(--line)); }
.official[data-b="left"] { --c: var(--left); } .official[data-b="center"] { --c: var(--center); } .official[data-b="right"] { --c: var(--right); }
.official-main { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 14px; align-items: center; text-decoration: none; }
.official-main img, .official-main .ph { width: 72px; height: 88px; object-fit: cover; border-radius: 10px; background: var(--surface-2); }
.official-main small { display: block; color: var(--ink-2); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.official-main b { display: block; font: 800 20px/1.15 var(--display); margin: 2px 0 6px; }
.official-main .sub { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; }
.official .contact .btn { min-height: 44px; }

/* State roster cards */
.person .ph { width: 60px; height: 74px; border-radius: 10px; background: var(--surface-2); display: block; }
.person .sub.email { margin-top: -2px; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; background: var(--c); }
.pdot[data-b="left"] { --c: var(--left); } .pdot[data-b="center"] { --c: var(--center); } .pdot[data-b="right"] { --c: var(--right); }
.prof-head .ph.big { width: 110px; height: 134px; border-radius: 14px; background: var(--surface-2); display: block; border-bottom: 6px solid var(--c); }
.drawer .contact .btn { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-height: 44px; }

.state-feed .card { scroll-margin-top: 80px; }

@media (prefers-reduced-motion: reduce) {
  .us-map .st, .state-chip, .pilot-banner .arrow { transition: none; }
}

/* Initials placeholder when a portrait is missing */
.ph { display: grid !important; place-items: center; font: 800 20px/1 var(--display); color: var(--ink-2); background: var(--surface-2); }
.ph.big { font-size: 36px; }

/* Section tabs: one row on phones */
.state-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; max-width: 560px; }
.state-tabs button { padding: 8px 2px; font-size: clamp(13px, 3.6vw, 16px); }

/* Small chambers: keep the chart a sensible size and let edge seats breathe */
.state-chamber { max-width: 760px; padding: 14px 24px 18px; }
.state-chamber.small { max-width: 620px; }
.state-chamber .hemi { overflow: visible; }
.map-legend .grad { flex: 1 1 80px; width: auto; max-width: 200px; }
.state-chamber ~ .split, .state-chamber ~ .split-labels { max-width: 760px; }
.state-chamber.small ~ .split, .state-chamber.small ~ .split-labels { max-width: 620px; }
.state-chamber.small .hemi-center img { display: none; }
