/* Candidatos & Congresso · Fala Reto identity (tokens from /marca/fala-reto.css; header/footer from /marca/cabecalho.js).
   Light theme only: navy, yellow, white and grays. Party colors come from MapKit's data palette. */
:root{--bg:#F2F4F7;--surface:#FFFFFF;--line:#E1E5EA;--brand:#0A1A33;--brand2:#12284A;--yellow:#FFC20E;--ink:#0D1117;--muted:#5B6474;--gray:#9AA5B1;color-scheme:light;font-family:Montserrat,system-ui,sans-serif;color:var(--ink);background:var(--bg)}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);overflow-x:hidden}
main{max-width:1200px;margin:auto;padding:24px 16px 8px}
a{color:inherit;text-underline-offset:4px}
button,select,input{font:inherit;border:1px solid var(--line);background:var(--surface);color:var(--ink);border-radius:9px;padding:10px 12px;min-height:42px}
button,select{cursor:pointer}
button{font-weight:700}
button:hover{background:var(--bg)}
button:disabled{opacity:.4;cursor:default}
input::placeholder{color:var(--gray)}
[hidden]{display:none!important}
main :focus-visible,dialog :focus-visible{outline:3px solid var(--brand);outline-offset:2px}

/* intro */
.intro{padding:12px 0 22px;border-bottom:1px solid var(--line)}
.eyebrow{font-size:11px;letter-spacing:.14em;font-weight:900;color:var(--brand);margin:0 0 10px}
.intro .eyebrow{display:inline-block;background:var(--yellow);color:var(--brand);padding:4px 8px;border-radius:5px}
.intro h1{font-size:clamp(30px,4.4vw,52px);font-weight:900;line-height:1.04;letter-spacing:-.04em;margin:0;color:var(--brand);max-width:820px}
.intro h1 span{color:var(--brand2);box-shadow:inset 0 -.22em 0 var(--yellow)}
.intro>p:last-child{max-width:620px;font-size:14px;line-height:1.6;color:var(--muted);margin:14px 0 0}

/* tabs */
.portal-tabs{display:flex;gap:6px;margin:18px 0 0;padding:4px;background:var(--surface);border:1px solid var(--line);border-radius:12px;overflow-x:auto;scrollbar-width:none}
.portal-tabs::-webkit-scrollbar{display:none}
.portal-tabs button{flex:1 0 auto;border:0;background:transparent;color:var(--muted);font-size:13px;font-weight:800;border-radius:9px;white-space:nowrap}
.portal-tabs button:hover{background:var(--bg);color:var(--brand)}
.portal-tabs button.active{background:var(--brand);color:var(--surface)}
#status{min-height:18px;font-size:12px;color:var(--muted);margin:16px 0}

/* section heading + filters */
.section-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:12px 16px;flex-wrap:wrap;margin:24px 0 18px;padding-bottom:14px;border-bottom:1px solid var(--line)}
.section-heading h2{font-size:28px;font-weight:900;letter-spacing:-.035em;margin:0;color:var(--brand)}
.section-heading>span{color:var(--muted);font-size:12px;font-weight:600}
.heading-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.more-news{display:inline-flex;align-items:center;min-height:42px;padding:8px 14px;border-radius:9px;background:var(--yellow);color:var(--brand);font-size:13px;font-weight:800;text-decoration:none}
.more-news:hover{background:var(--brand);color:var(--yellow)}
.filters{display:flex;gap:12px;flex-wrap:wrap;margin:0 0 22px;padding:14px;background:var(--surface);border:1px solid var(--line);border-radius:12px}
.filters label{display:flex;flex-direction:column;gap:6px;flex:1;min-width:140px;font-size:10px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.filters select,.filters input{width:100%;font-size:13px;font-weight:600;letter-spacing:0;text-transform:none;color:var(--ink)}
.filters .search{flex:1.5}

/* candidate cards */
.candidate-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.candidate-card{background:var(--surface);border:1px solid var(--line);border-radius:14px;overflow:hidden;box-shadow:0 6px 20px #0A1A3314;min-width:0}
.portrait{position:relative;height:200px;display:flex;justify-content:center;background:linear-gradient(160deg,#12284A,#0A1A33);overflow:hidden}
.portrait img.photo{height:100%;width:100%;object-fit:contain;object-position:center top}
.portrait .initials{align-self:center;font-size:52px;font-weight:900;letter-spacing:-.06em;color:var(--gray)}
.portrait img.flag{position:absolute;bottom:12px;left:14px;width:38px;height:26px;border:1px solid #FFFFFF99;object-fit:cover;box-shadow:0 2px 6px #0006}
.portrait .number{position:absolute;right:14px;bottom:12px;background:var(--yellow);color:var(--brand);padding:5px 10px;border-radius:6px;font-weight:900;font-size:21px}
.candidate-body{padding:16px}
.candidate-body h3{font-size:17px;font-weight:800;letter-spacing:-.02em;line-height:1.3;margin:0 0 10px;color:var(--brand);overflow-wrap:anywhere}
.party-label{display:inline-flex;align-items:center;gap:8px;max-width:100%;font-size:11px;background:var(--bg);border:1px solid var(--line);border-radius:6px;padding:5px 8px;color:var(--muted)}
.party-label b{color:var(--brand);font-size:12px}
.candidate-votes{display:flex;justify-content:space-between;align-items:baseline;gap:8px;margin:14px 0;color:var(--muted);font-size:12px}
.candidate-votes strong{color:var(--brand);font-size:19px;font-weight:900}
.candidate-actions{display:flex;gap:12px;align-items:center}
.candidate-actions button{font-size:12px;padding:7px 12px;min-height:36px;background:var(--brand);color:var(--surface);border-color:var(--brand)}
.candidate-actions button:hover{background:var(--brand2)}
.candidate-actions a{font-size:12px;font-weight:800;color:var(--brand2)}
.photo-credit{display:block;font-size:10px;line-height:1.5;margin-top:12px;color:var(--muted);text-decoration:none}
.pagination{display:flex;gap:16px;align-items:center;justify-content:center;margin:24px 0;font-size:12px;font-weight:700;color:var(--muted)}
.pagination button{font-size:12px}
.source-note,.page-note{font-size:11px;color:var(--muted);line-height:1.6}
.page-note{margin:32px 0 0;padding-top:14px;border-top:1px solid var(--line)}
.page-note a{font-weight:700;color:var(--brand2)}

/* congress */
.seat-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.seat-metrics article{padding:18px;background:var(--surface);border:1px solid var(--line);border-top:4px solid var(--yellow);border-radius:12px;min-width:0}
.seat-metrics strong{display:block;font-size:40px;font-weight:900;letter-spacing:-.045em;color:var(--brand)}
.seat-metrics span{font-size:12px;color:var(--muted)}
.hemicycle{margin:22px 0;padding:18px;background:var(--surface);border:1px solid var(--line);border-radius:14px}
#seats{display:block;width:100%;max-height:380px}
#seats circle{stroke:#FFFFFF;stroke-width:.6}
.seat-legend{display:flex;gap:10px 18px;justify-content:center;flex-wrap:wrap;font-size:12px;color:var(--muted)}
.seat-legend span{display:flex;gap:7px;align-items:center}
.seat-legend i{display:block;width:10px;height:10px;border-radius:50%;box-shadow:inset 0 0 0 1px #0A1A3322}
main h3{color:var(--brand);font-weight:900;letter-spacing:-.02em}
.state-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.state-row{display:flex;align-items:center;gap:12px;padding:12px 14px;background:var(--surface);border:1px solid var(--line);border-radius:10px;color:inherit;text-decoration:none;min-width:0}
.state-row:hover{border-color:var(--brand);background:var(--bg)}
.state-row img{width:33px;height:22px;object-fit:cover;border-radius:2px;border:1px solid var(--line);flex:none}
.state-row b{display:block;font-size:12px;color:var(--brand)}
.state-row small{display:block;font-size:10px;color:var(--muted);margin-top:3px}
.state-row strong{margin-left:auto;font-size:20px;font-weight:900;color:var(--brand)}

/* news */
.news-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.news-card{background:var(--surface);border:1px solid var(--line);border-radius:12px;overflow:hidden;padding:18px;min-width:0}
.news-card.with-photo{padding:0}
.news-card.with-photo .news-body{padding:18px}
.news-card figure{margin:0;background:var(--line)}
.news-card figure img{width:100%;height:180px;object-fit:cover;display:block}
.news-card figcaption{padding:8px 12px;font-size:10px;line-height:1.5;color:var(--muted);background:var(--bg)}
.news-meta{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px 14px;font-size:11px;color:var(--muted);margin-bottom:12px}
.news-meta b{color:var(--brand)}
.news-region{display:inline-flex;align-items:center;gap:7px;font-weight:800;color:var(--brand)}
.news-region img{width:28px;height:19px;object-fit:contain}
.news-card h3{font-size:19px;font-weight:800;line-height:1.3;letter-spacing:-.02em;margin:0 0 12px;color:var(--ink)}
.news-card h3 a{text-decoration:none}
.news-card h3 a:hover{text-decoration:underline;text-decoration-color:var(--yellow);text-decoration-thickness:3px}
.news-card p{font-size:13px;line-height:1.6;color:var(--muted)}
.news-card .original{display:inline-block;margin-top:6px;font-size:12px;font-weight:800;color:var(--brand2)}
.news-card.featured{display:grid;grid-template-columns:1.2fr 1fr;margin-bottom:20px;padding:0;border-left:6px solid var(--yellow)}
.news-card.featured figure img{height:320px}
.news-card.featured .news-body{padding:26px}
.news-card.featured h3{font-size:30px;line-height:1.15}
.news-source-label{color:var(--muted);font-size:10px}
.no-image-note{font-size:10px;color:var(--muted);margin-top:16px;padding-top:12px;border-top:1px solid var(--line)}
.empty{padding:32px;background:var(--surface);border:1px dashed var(--gray);border-radius:12px;color:var(--muted);font-size:13px}

/* profile dialog */
dialog{background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:14px;max-width:650px;width:calc(100% - 24px);max-height:90dvh;padding:24px;box-shadow:0 25px 80px #050D1C40}
dialog::backdrop{background:#050D1CB0;backdrop-filter:blur(4px)}
.close{float:right;border:1px solid var(--line);background:var(--bg);font-size:12px;min-height:36px;padding:6px 12px;border-radius:999px}
.profile-head{display:flex;gap:20px;margin:24px 0}
.profile-head img{width:120px;height:150px;object-fit:contain;border-radius:9px;background:var(--line);flex:none}
.profile-head h2{font-size:26px;font-weight:900;letter-spacing:-.03em;color:var(--brand);margin:6px 0}
.profile-head p{font-size:12px;color:var(--muted)}
.profile-data{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.profile-data div{border-bottom:1px solid var(--line);padding-bottom:12px;min-width:0}
.profile-data small{display:block;color:var(--muted);font-size:10px;margin-bottom:5px;text-transform:uppercase;letter-spacing:.06em;font-weight:700}
.profile-data b{font-size:13px;overflow-wrap:anywhere}
.official-link{display:inline-block;margin-top:20px;padding:12px 14px;background:var(--yellow);color:var(--brand);border-radius:8px;text-decoration:none;font-size:13px;font-weight:800}

@media(max-width:900px){
 .candidate-grid,.news-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .state-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
 .news-card.featured h3{font-size:26px}
}
@media(max-width:600px){
 main{padding:18px 16px 8px}
 .intro h1{font-size:32px}
 .intro>p:last-child{font-size:13px}
 .portal-tabs button{font-size:12px;padding:10px 8px}
 .section-heading h2{font-size:24px}
 .filters{padding:12px;gap:10px}
 .filters label{min-width:130px}
 .filters .search{flex-basis:100%}
 .candidate-grid,.news-grid{grid-template-columns:minmax(0,1fr);gap:12px}
 .candidate-card{display:grid;grid-template-columns:108px minmax(0,1fr)}
 .portrait{height:100%;min-height:176px}
 .portrait .number{font-size:17px;bottom:10px;right:8px}
 .portrait img.flag{width:24px;height:17px;left:8px;bottom:14px}
 .candidate-body{padding:14px}
 .candidate-body h3{font-size:15px}
 .party-label{font-size:10px}
 .seat-metrics{grid-template-columns:1fr 1fr;gap:10px}
 .seat-metrics article{padding:14px}
 .seat-metrics strong{font-size:32px}
 .state-grid{grid-template-columns:1fr 1fr}
 .state-row{padding:10px;gap:8px}
 .state-row img{width:25px;height:17px}
 .state-row b{font-size:11px}
 .state-row strong{font-size:17px}
 .news-card.featured{grid-template-columns:minmax(0,1fr)}
 .news-card.featured figure img{height:220px}
 .news-card.featured h3{font-size:24px}
 .news-card.featured .news-body{padding:18px}
 .profile-head{gap:14px}
 .profile-head img{width:85px;height:115px}
 .profile-head h2{font-size:21px}
 .profile-data{grid-template-columns:1fr}
 #seats{min-height:200px}
}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
