/* Match the county reference; keep styles isolated from approved shared assets. */
[data-state-election-review] .precinct-race-card[hidden],
[data-state-election-review] .precinct-race-row[hidden],
[data-state-election-review] .precinct-race-category[hidden]{display:none!important}
[data-state-election-review] .precinct-category-mark:empty{display:none}
[data-state-election-review] .precinct-race-category>summary{grid-template-columns:minmax(0,1fr) auto 18px}
@media(max-width:650px){
 [data-state-election-review] .election-office-filter{grid-template-columns:1fr}
 [data-state-election-review] .election-office-filter-status{justify-self:start;text-align:left}
 [data-state-election-review] .precinct-race-category>summary{grid-template-columns:minmax(0,1fr) 18px}
 [data-state-election-review] .precinct-category-count{grid-column:1;grid-row:2}
 [data-state-election-review] .precinct-category-chevron{grid-column:2;grid-row:1/3}
}

[data-state-election-review] .has-boundary-mark>summary{grid-template-columns:auto minmax(0,1fr) auto 18px}
:is(#elections,#representation) .state-election-boundary{
 display:block;width:28px;height:30px;background:#f2ce83;
 -webkit-mask:var(--state-boundary-image) center / contain no-repeat;
 mask:var(--state-boundary-image) center / contain no-repeat;mask-mode:alpha;
 filter:var(--area-outline-mark-shadow-compact);
}
@media(max-width:650px){
 [data-state-election-review] .has-boundary-mark>summary{grid-template-columns:auto minmax(0,1fr) 18px}
 [data-state-election-review] .has-boundary-mark .precinct-category-mark{grid-column:1;grid-row:1/3}
 [data-state-election-review] .has-boundary-mark .precinct-category-count{grid-column:2;grid-row:2}
 [data-state-election-review] .has-boundary-mark .precinct-category-chevron{grid-column:3;grid-row:1/3}
}

/* Reuse the original statewide proposition-number badge as the visual identifier. */
:is(#elections,#representation) .state-measure-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
:is(#elections,#representation) .state-measure-heading{min-height:64px;padding-right:66px}
:is(#elections,#representation) .state-proposition-number strong{
 display:block;margin:0;color:var(--area-gold-light);font-size:1.82rem;line-height:1;
}
:is(#elections,#representation) .state-measure-card>h4{margin-top:12px}
@media(max-width:1000px){:is(#elections,#representation) .state-measure-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){:is(#elections,#representation) .state-measure-grid{grid-template-columns:minmax(0,1fr)}}

/* Completed-election heading follows the same navy bar as current categories. */
:is(#elections,#representation) .state-past-elections>summary{
 color:#fff;background:var(--area-navy);
}
:is(#elections,#representation) .state-past-elections>summary:hover{background:#123e55}
:is(#elections,#representation) .state-past-elections-copy>span{
 color:var(--area-gold-light);font-family:Georgia,"Times New Roman",serif;
 font-size:1.5rem;font-weight:700;line-height:1.2;
 letter-spacing:normal;text-transform:capitalize;
}
:is(#elections,#representation) .state-past-elections-copy>strong{
 color:#dce9ec;font-family:inherit;font-size:0.58rem;
 font-weight:700;line-height:1.4;
}
:is(#elections,#representation) .state-past-elections-action{color:#fff}
:is(#elections,#representation) .state-past-elections-action b{color:var(--area-navy)}
:is(#elections,#representation) .state-past-elections[open] .state-past-elections-action b{color:#fff}

/* State silhouettes match the original larger past icon, with shared gold fill. */
:is(#elections,#representation) .state-election-boundary.is-state-boundary{
 width:30px;height:30px;
 -webkit-mask:var(--state-boundary-image) center / var(--state-boundary-size,auto 112%) no-repeat;
 mask:var(--state-boundary-image) center / var(--state-boundary-size,auto 112%) no-repeat;
}
:is(#elections,#representation) .state-review-icon-mark{
 display:grid;width:40px;height:40px;place-items:center;overflow:hidden;
 border:1px solid rgba(242,206,131,.48);border-radius:3px;background:transparent;
}
:is(#elections,#representation) .state-review-icon-mark::before{display:none}
:is(#elections,#representation) .state-past-filter{margin:16px 0 18px}
:is(#elections,#representation) .state-past-elections :is(.precinct-race-card,.state-past-office-card,.precinct-race-category,.state-past-contest-group)[hidden],
:is(#elections,#representation) .state-past-filter-empty[hidden]{display:none!important}
@media(max-width:650px){
 :is(#elections,#representation) .state-past-filter{grid-template-columns:minmax(0,1fr)}
 :is(#elections,#representation) .state-past-filter .election-office-filter-status{justify-self:start;text-align:left}
}

/* Completed measures use the same cards, plus their original full-width result bar. */
:is(#elections,#representation) .state-past-measure-card .state-past-measure-result{
 min-height:24px;box-sizing:border-box;margin:-15px -16px 0;
}
:is(#elections,#representation) .state-past-measure-card .state-measure-heading{padding-top:12px;min-height:76px}
:is(#elections,#representation) .state-past-measure-card .state-proposition-number{top:24px}
:is(#elections,#representation) .state-past-measure-card{background:var(--area-surface)}
:is(#elections,#representation) .state-measure-card>strong{color:var(--area-teal)}

/* Standalone measure badge/result styles also serve county pages without state-profile.css. */
:is(#elections,#representation) .state-measure-card{position:relative}
:is(#elections,#representation) .state-proposition-number{
 position:absolute;z-index:1;top:-3px;right:-1px;display:grid;width:66px;height:68px;
 align-content:center;justify-items:center;border-bottom:4px solid var(--area-gold);
 border-left:1px solid rgba(255,255,255,.22);color:#fff;background:var(--area-navy);
 box-shadow:-7px 7px 18px rgba(8,47,73,.12);
}
:is(#elections,#representation) .state-proposition-number small{
 display:block;margin-bottom:3px;color:#dce9ec;font-size:.48rem;font-weight:900;
 letter-spacing:.12em;text-transform:uppercase;line-height:1;
}
:is(#elections,#representation) .state-proposition-number strong{font-family:Georgia,"Times New Roman",serif;font-weight:600}
:is(#elections,#representation) .state-past-measure-card .state-past-measure-result{
 display:block;padding:6px 16px;color:#fff;background:var(--area-teal);
 font-size:.55rem;font-weight:900;letter-spacing:.095em;line-height:1.25;
}
:is(#elections,#representation) .state-past-measure-card[data-result="rejected"] .state-past-measure-result{background:var(--area-rust)}

/* Precinct proposition cards use the State component's white content surface. */
#representation .precinct-measure-card.state-measure-card{background:#fff}

/* Letters and numbers share the identifier badge; unnumbered measures display only their type. */
:is(#elections,#representation) .state-proposition-number.is-yes-no strong{font:700 16px/1.15 Arial,sans-serif;text-align:center;white-space:normal}
:is(#elections,#representation) .has-ballot-badge{position:relative}

:is(#elections,#representation) .state-proposition-number.is-unnumbered-measure strong{font:700 12px/1.2 Arial,sans-serif;white-space:nowrap}
