.leg-panel { margin:24px 0; scroll-margin-top:70px; }
.leg-controls { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; border:0; padding:0; min-width:0; }
.leg-controls label { display:flex; flex-direction:column; gap:6px; font-weight:600; min-width:0; }
.leg-controls select,.leg-controls input[type=search],.leg-candidate select { width:100%; min-width:0; min-height:44px; padding:10px; border:1px solid #becfda; border-radius:9px; background:#fff; color:#183a55; font:inherit; }
.leg-controls .leg-check { flex-direction:row; align-items:center; font-weight:400; }
.leg-check input { width:20px; height:20px; flex-shrink:0; }
.leg-summary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:20px 0; }
.leg-stat { display:flex; flex-direction:column; padding:15px; background:#edf5f5; border-radius:12px; gap:8px; }
.leg-stat strong { font-size:1.25rem; }.leg-stat small { line-height:1.5; }
.leg-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.leg-candidate { padding:18px; border:1px solid #d6e2e8; border-radius:12px; min-width:0; overflow-wrap:anywhere; }
.leg-candidate h3 { margin:0 0 8px; font-size:1rem; }.leg-candidate p { font-size:.85rem; line-height:1.6; }
.leg-relation { color:#087c72; }.leg-candidate details { border-top:1px solid #d6e2e8; padding-top:12px; margin-top:14px; }
.leg-candidate summary { cursor:pointer; padding:8px 0; font-weight:600; }
.leg-candidate details > label { display:block; margin:10px 0; }
.leg-candidate fieldset { border:0; padding:0; margin:12px 0; }.leg-candidate legend { font-size:.85rem; }
.leg-candidate fieldset label { display:flex; gap:8px; padding:8px 0; align-items:center; font-size:.85rem; }
.leg-candidate fieldset input { width:18px; height:18px; flex-shrink:0; }
#leg-feedback { color:#087c72; }#leg-sources small { overflow-wrap:anywhere; }
.leg-intro-note { background:#f4f7fa; border-radius:10px; padding:12px; line-height:1.6; font-size:.88rem; }
.leg-actions { display:flex; flex-wrap:wrap; gap:8px; margin:14px 0; }
@media (max-width:767px) { .leg-controls,.leg-list,.leg-summary { grid-template-columns:1fr; } .leg-panel { padding:16px; } .leg-stat { padding:12px; } }

.leg-controls [hidden] { display:none !important; }

.leg-page-intro { margin:18px 0 !important; padding:0 !important; }
.leg-page-intro h1 { font-size:clamp(24px,3vw,36px); margin:0 0 8px; line-height:1.15; }
.leg-page-intro p { font-size:1rem; margin:0; }
.leg-selection > summary,.leg-options > summary,.leg-presidential > summary { cursor:pointer; min-height:44px; padding:10px 0; font-weight:700; }
#leg-selection-label { display:block; font-size:.85rem; font-weight:400; overflow-wrap:anywhere; }
.leg-selection[open] #leg-selection-label { display:none; }
.leg-primary { width:100%; margin:14px 0; background:#12304a; color:#fff; justify-content:center; }
#leg-reference { display:flex; flex-direction:column; gap:6px; margin:18px 0 8px; font-weight:700; font-size:1.2rem; }
#leg-reference strong { font-size:1.6rem; }#leg-reference small { font-size:.85rem; font-weight:400; }
#leg-results { scroll-margin-top:16px; }.leg-group-hint { font-size:.85rem; }
.leg-summary { grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.leg-stat { position:relative; padding:12px; gap:6px; }
.leg-stat button { background:none; border:0; padding:0; text-align:left; color:#12304a; font:inherit; font-weight:700; min-height:44px; cursor:pointer; }
.leg-stat button::after { content:''; position:absolute; inset:0; border-radius:12px; }
.leg-stat:has(button[aria-pressed=true]) { background:#dcefeb; outline:2px solid #087c72; }
.leg-stat button:focus-visible::after { outline:3px solid #12304a; }
.leg-stat small { font-size:.75rem; }.leg-stat strong { font-size:1rem; }
.leg-options { margin:18px 0; border-top:1px solid #d6e2e8; border-bottom:1px solid #d6e2e8; }
.leg-options[open] { padding-bottom:14px; }.leg-presidential { margin:24px 0; }.leg-presidential > summary { font-size:1rem; }
@media(max-width:767px) {
 .align-header { padding:12px 0; }.align-header .align-brand small { display:none; }
 .study-round-nav { margin:8px 0 12px; padding:0; gap:6px; }.study-round-nav a { font-size:12px; padding:8px; }
 .study-round-nav .study-round-back { width:auto; padding:6px 0; min-height:32px; }
 .leg-panel { margin:12px 0; }.leg-summary { grid-template-columns:repeat(3,minmax(0,1fr)); }
 .leg-stat { padding:8px; }.leg-stat button { font-size:.8rem; }.leg-stat strong { font-size:.9rem; }.leg-stat small { line-height:1.4; }
 .leg-candidate { padding:14px; }.leg-candidate p { margin:6px 0; }.leg-candidate details { margin-top:8px; padding-top:4px; }
}
