/* Candidacies: a geographic entry point and portrait-ready party cards. */
.portal[data-mode=candidates]{--panel-muted:#65656c;--line:#dedee3}
.portal[data-mode=candidates][data-wide=true] .portal-layout{max-width:1200px}
.portal[data-mode=candidates] .portal-controls>.segmented{background:#ededf0;border-radius:14px;padding:4px;width:fit-content}
.portal[data-mode=candidates] .segmented button{border-radius:11px;min-height:44px;padding-inline:20px}
.portal[data-mode=candidates] .segmented button[aria-pressed=true]{background:#fff;box-shadow:0 1px 4px #0000000d}
.portal[data-mode=candidates] .portal-field :is(select,input){border:1px solid transparent;background:#f0f0f3;border-radius:12px}
.cand-lead{margin:0 0 30px;max-width:720px}.cand-badge{display:inline-block;background:#ededf1;color:#65656c;border-radius:20px;padding:7px 11px;font-size:11px}
.cand-lead h3{font-size:clamp(32px,4vw,48px);font-weight:350;letter-spacing:-.045em;line-height:1.1;margin:18px 0 14px}
.cand-lead p,.cand-roster-heading p{color:#65656c;font-size:14px;line-height:1.65}
.cand-geography{background:#f5f5f7;border-radius:28px;padding:28px}
.cand-map-heading{display:flex;justify-content:space-between;gap:24px;align-items:center}.cand-map-heading h4{font-size:24px;font-weight:350;letter-spacing:-.03em;margin:0 0 8px}.cand-map-heading p{font-size:13px;color:#65656c;margin:0;line-height:1.6}.cand-map-heading .portal-field{width:240px;flex-shrink:0;margin:0}.cand-map-heading .portal-field select{background:#fff}
.cand-map{display:block;width:100%;max-height:640px;margin:18px auto 0}.cand-map g[role=button]{cursor:pointer;outline:none}.cand-map path{fill:#dddde4;stroke:#f5f5f7;stroke-width:1.5;vector-effect:non-scaling-stroke;transition:fill .15s}.cand-map text{font-family:inherit;font-size:13px;fill:#65656c;pointer-events:none}.cand-map g[aria-pressed=true] path{fill:#242522}.cand-map g:focus-visible path{stroke:#242522;stroke-width:3;fill:#a4a4b0}.cand-map g:hover path{fill:#aaaab5}.cand-map g[aria-pressed=true]:hover path{fill:#414147}
.cand-map-caption{display:flex;align-items:center;justify-content:space-between;gap:16px;background:#fff;border-radius:16px;padding:18px 22px}.cand-map-caption strong{font-size:23px;font-weight:500;letter-spacing:-.03em}.cand-map-caption span{font-size:12px;color:#65656c}.cand-map-source{font-size:10px;line-height:1.6;color:#65656c;margin:14px 0 0}.cand-map-source a{color:inherit}
.cand-roster{margin-top:42px}.cand-roster-heading h4{font-size:32px;letter-spacing:-.04em;font-weight:350;margin:14px 0 8px}.cand-party-filters{display:flex;gap:7px;flex-wrap:wrap;margin:24px 0 12px}.cand-party-filters button{border:0;border-radius:12px;background:#ededf1;padding:10px 14px;min-height:44px;font:inherit;font-size:12px;cursor:pointer}.cand-party-filters button[aria-pressed=true]{background:#242522;color:#fff}.cand-note{font-size:12px;line-height:1.6;color:#65656c;margin-bottom:22px}
.cand-people{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}.cand-person{border-radius:22px;overflow:hidden;background:#f5f5f7;min-width:0}.cand-portrait{height:220px;position:relative;display:flex;align-items:center;justify-content:center;flex-direction:column;background:color-mix(in srgb,var(--party) 9%,#f5f5f7);padding:20px 20px 50px}.cand-portrait>svg{width:105px;height:120px;stroke:color-mix(in srgb,var(--party) 28%,#aaa);stroke-width:1.2}.cand-portrait>span{font-size:10px;color:#65656c}.cand-logo{position:absolute;bottom:14px;left:18px;height:46px;max-width:calc(100% - 36px);display:flex;align-items:center;padding:8px 10px;border-radius:10px;background:#fff}.cand-logo img{object-fit:contain;width:100px;height:36px}.cand-logo[data-logo=bildu],.cand-logo[data-logo=bng],.cand-logo[data-logo=adelante]{background:#303442}.cand-person-copy{padding:20px}.cand-person-copy h5{font-size:19px;font-weight:400;margin:0 0 10px}.cand-person-copy p{font-size:13px;line-height:1.5;margin:0 0 14px}.cand-person-copy>span{font-size:11px;color:#65656c}
.portal[data-mode=candidates] .candidate-list{background:#f5f5f7;border:0;border-radius:18px;padding:8px 18px;margin-bottom:10px}.portal[data-mode=candidates] .candidate-profile{background:#f5f5f7;border-radius:24px;padding:24px}
.portal[data-mode=candidates] :is(button,select,input,a):focus-visible{outline:2px solid #242522;outline-offset:3px}
@media(max-width:900px){.cand-people{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.cand-geography{padding:20px 14px;border-radius:22px}.cand-map-heading{display:block}.cand-map-heading .portal-field{width:100%;margin-top:16px}.cand-map{min-height:280px}.cand-map-caption{align-items:start;flex-direction:column;gap:8px;padding:16px}.cand-people{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.cand-portrait{height:185px;padding-inline:12px}.cand-person-copy{padding:16px}.cand-person-copy h5{font-size:17px}.cand-roster-heading h4{font-size:28px}.cand-party-filters{flex-wrap:nowrap;overflow:auto;padding-bottom:8px}.cand-party-filters button{flex-shrink:0}.cand-logo{left:12px}.cand-logo img{width:82px}}
@media(prefers-reduced-motion:reduce){.cand-map path{transition:none}}
@media(prefers-contrast:more){.cand-geography,.cand-person,.cand-party-filters button{border:1px solid #777}.cand-map path{stroke:#777}}
.portal[data-mode=candidates][data-overview=false] .portal-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:20px}
.portal[data-mode=candidates][data-overview=false] .portal-intro{padding:0;border:0}.portal[data-mode=candidates][data-overview=false] .portal-intro h2{margin:0 0 8px}
.portal[data-mode=candidates][data-overview=false] .portal-tabs{position:static;border:0;margin:0;padding:0;background:none}.portal[data-mode=candidates] .back-categories{display:none}
.portal[data-mode=candidates][data-wide=true] .portal-layout{padding-top:0}.portal[data-mode=candidates] .portal-controls{margin-bottom:20px}
.cand-map-inset{fill:none;stroke:#dedee4;stroke-width:1}
@media(max-width:760px){.portal[data-mode=candidates][data-overview=false] .portal-heading{display:block}.portal[data-mode=candidates][data-overview=false] .portal-tabs{margin-top:14px}.portal[data-mode=candidates][data-overview=false] .portal-intro h2{font-weight:350}.cand-lead h3{font-size:30px}}
.cand-portrait>span{position:absolute;top:14px;right:14px;background:#ffffffa8;padding:5px 8px;border-radius:20px}
/* Historical profiles keep BOE identity and sourced editorial material together. */
.portal[data-mode=candidates] .candidate-profile{max-width:960px;padding:32px}
.profile-overview{display:grid;grid-template-columns:minmax(0,1fr);gap:32px;align-items:start}
.profile-overview.has-portrait{grid-template-columns:minmax(0,1fr) minmax(180px,230px)}
.profile-identity{min-width:0}.profile-identity>h4{max-width:18ch}
.profile-portrait{margin:0;min-width:0}.profile-portrait>img{display:block;width:100%;height:auto;border-radius:14px;background:#e8e8ec}
.profile-portrait figcaption{font-size:11px;line-height:1.65;color:var(--panel-muted);overflow-wrap:anywhere;margin-top:12px}
.profile-portrait figcaption p{margin:0 0 6px}.profile-portrait .source-link{display:inline;min-height:0;font-size:inherit;margin:0}
.profile-biography{margin-top:30px;padding-top:26px;border-top:1px solid var(--line)}
.profile-biography h5{font-size:20px;font-weight:400;letter-spacing:-.025em;margin:0 0 14px}
.profile-biography>p{font-size:15px;line-height:1.8;margin:0;max-width:72ch}
.profile-biography h6{font-size:11px;font-weight:500;color:var(--panel-muted);margin:26px 0 12px}
.profile-sources{list-style:none;padding:0;margin:0;display:grid;gap:14px}.profile-sources li{min-width:0;overflow-wrap:anywhere}
.profile-sources .source-link{margin:0;font-size:12px}.profile-sources li>span{display:block;color:var(--panel-muted);font-size:11px;line-height:1.6;margin-top:4px}
.profile-photo-pending{font-size:11px}.profile-bio-pending{margin-top:28px}
@media(max-width:760px){.portal[data-mode=candidates] .candidate-profile{padding:22px}.profile-overview.has-portrait{grid-template-columns:minmax(0,1fr);gap:22px}.profile-portrait{width:100%;max-width:260px}.profile-biography{margin-top:24px;padding-top:22px}}
/* Published 29N lists retain the map and show the actual BOE list heads. */
.cand-published{margin-bottom:42px}.cand-published .cand-roster-heading{margin-bottom:22px}
.cand-published .cand-person-copy p{overflow-wrap:anywhere}
.cand-profile-link{border:0;background:none;padding:8px 0;min-height:44px;font:inherit;font-size:12px;text-align:start;text-decoration:underline;text-underline-offset:3px;cursor:pointer;color:inherit}
.cand-publication{margin-bottom:24px}.cand-publication>p{font-size:14px;line-height:1.7;color:var(--panel-muted);max-width:72ch}
.candidate-excluded{margin:24px 0;font-size:12px;line-height:1.7;color:var(--panel-muted)}.candidate-excluded summary{cursor:pointer;min-height:44px;padding-block:10px}
@media(max-width:760px){.cand-published .list-seats{font-size:10px}}
/* Portraits sit directly on the page; names without photos use compact rows. */
.cand-published .cand-people{display:block}
.cand-portrait-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:40px 24px;align-items:start}
.cand-published .cand-person{min-width:0;overflow:visible;background:none;border:0;border-radius:0}
.cand-published .cand-portrait{display:block;position:relative;height:auto;aspect-ratio:4/5;padding:0;overflow:hidden;border-radius:5px;background:#ededea}
.cand-portrait>.cand-head-photo{display:block;width:100%;height:100%;padding:0;object-fit:cover;object-position:center 25%}
.cand-published .cand-person-copy{padding:16px 0 0}
.cand-published .cand-person-copy h5{font-size:20px;font-weight:500;line-height:1.25;letter-spacing:-.025em;margin:0 0 10px;text-wrap:balance}
.cand-party-label{display:flex;align-items:center;gap:10px;min-height:30px}
.cand-party-label .cand-party-mark{position:static;width:64px;height:26px;object-fit:contain;object-position:left center}
.cand-published .cand-party-label p{font-size:11px;line-height:1.5;color:var(--panel-muted);margin:0;min-width:0}
.cand-published .cand-profile-link{padding:10px 0 0;min-height:36px;font-size:12px;text-decoration-thickness:1px}
.cand-photo-credit{margin-top:8px;border:0;font-size:11px;line-height:1.65;color:var(--panel-muted);overflow-wrap:anywhere}
.cand-photo-credit>summary{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:44px;list-style:none;cursor:pointer;border-bottom:1px solid var(--line)}
.cand-photo-credit>summary::-webkit-details-marker{display:none}
.cand-photo-credit>summary::after{content:'+';font-size:16px}
.cand-photo-credit[open]>summary::after{content:'−'}
.cand-photo-credit>div{display:grid;gap:5px;padding:12px 0 0}
.cand-photo-credit>summary:focus-visible{outline:2px solid #242522;outline-offset:3px}
.cand-photo-credit a{color:inherit;text-underline-offset:2px}
.cand-other-heads{margin-top:40px}
.cand-other-heading{font-size:14px;font-weight:500;margin:0 0 14px}
.cand-name-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:32px}
.cand-published .cand-person--text{border-top:1px solid var(--line)}
.cand-published .cand-person--text .cand-person-copy{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 16px;padding:18px 0;align-items:center}
.cand-published .cand-person--text h5{font-size:17px;margin:0;grid-column:1;grid-row:1}
.cand-person--text .cand-party-label{grid-column:1;grid-row:2;min-height:0}
.cand-person--text .cand-party-mark{display:none}
.cand-person--text .cand-profile-link{grid-column:2;grid-row:1/span 2;padding:0;min-height:44px;white-space:nowrap}
@media(max-width:900px){.cand-portrait-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:32px 20px}}
@media(max-width:760px){.cand-portrait-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:28px 16px}.cand-published .cand-person-copy h5{font-size:18px}.cand-party-label{flex-wrap:wrap;gap:5px 8px}.cand-party-label .cand-party-mark{width:54px;height:23px}.cand-name-list{grid-template-columns:minmax(0,1fr)}.cand-published .cand-person--text h5{font-size:16px}.cand-other-heads{margin-top:30px}}
