:root { --ink:#182b24; --muted:#53655b; --green:#17583f; --border:#dce4de; --page:#f6f7f3; --paper:#fff; --accent:#e9f1e9; }
* { box-sizing:border-box; }
body { margin:0; color:var(--ink); background:var(--page); font:16px/1.6 system-ui,-apple-system,"Segoe UI",sans-serif; }
a { color:var(--green); text-underline-offset:3px; }
a:hover { text-decoration-thickness:2px; }
:is(a,input,button,select,summary):focus-visible { outline:3px solid #477f5e; outline-offset:4px; }
button,input,select { font:inherit; }
button { border:1px solid var(--green); border-radius:6px; padding:10px 18px; background:var(--green); color:white; cursor:pointer; }
input,select { border:1px solid #899d8f; border-radius:6px; padding:10px 12px; background:white; color:var(--ink); min-width:0; }
.skip-link { position:absolute; left:16px; top:-100px; padding:12px; background:white; z-index:3; }
.skip-link:focus { top:12px; }
.topbar { min-height:98px; background:var(--paper); border-bottom:1px solid var(--border); display:flex; align-items:center; gap:45px; padding:18px max(24px,calc((100vw - 1192px)/2)); }
.topbar { flex-wrap:wrap; row-gap:12px; padding-bottom:0; }
.header-navigation { flex-basis:100%; }
.header-navigation .profile-tabs { margin:0; border-bottom:0; }
.brand { font-size:19px; letter-spacing:.03em; font-weight:650; white-space:nowrap; text-decoration:none; }
.brand strong { color:var(--green); }
.brand span { display:block; font-size:12px; letter-spacing:.02em; color:var(--muted); font-weight:400; }
.search { margin-left:auto; max-width:520px; flex:1; }
.search label { display:block; font-size:12px; margin-bottom:5px; }
.search-row { display:flex; gap:8px; }
.search input { width:100%; }
.workspace { max-width:1192px; margin:auto; padding:26px 24px 60px; min-height:75vh; }
.breadcrumb { font-size:13px; color:var(--muted); margin-bottom:25px; }
.profile { display:flex; gap:25px; padding-bottom:28px; align-items:center; }
.portrait { width:136px; flex-shrink:0; }
.portrait img,.portrait-placeholder { display:block; width:136px; height:163px; object-fit:cover; border-radius:10px; }
.portrait-placeholder { display:grid; place-items:center; background:var(--accent); color:var(--green); font-size:76px; }
.portrait small { font-size:11px; display:block; text-align:center; color:var(--muted); margin-top:6px; }
.profile-info { flex:1; min-width:0; }
.profile-info .eyebrow { margin:0 0 10px; }
.eyebrow { font-size:11px; font-weight:700; letter-spacing:.13em; color:var(--green); }
h1 { font-size:32px; line-height:1.2; letter-spacing:-.035em; margin:8px 0 12px; font-weight:650; overflow-wrap:anywhere; }
.profile-info h1 { margin-bottom:3px; }
h2 { line-height:1.3; font-weight:650; }
#profile-overview { margin-bottom:4px; }
.profile-reference { margin:0 0 16px; font-style:italic; font-size:14px; color:#647166; }
.role { font-size:15px; color:var(--muted); margin:0 0 17px; }
.affiliation { display:flex; gap:10px; align-items:center; }
.party-icon { min-width:40px; min-height:40px; padding:5px; display:grid; place-items:center; background:var(--accent); border-radius:6px; font-weight:700; color:var(--green); }
.affiliation small { display:block; font-size:12px; color:var(--muted); }
.metrics { display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); background:var(--paper); border:1px solid var(--border); border-radius:10px; margin-bottom:30px; overflow:hidden; }
.metric { padding:22px 24px; display:flex; flex-direction:column; gap:7px; border-right:1px solid var(--border); box-shadow:0 1px 0 var(--border); }
.metric span,.metric small { font-size:12px; color:var(--muted); }
.metric strong { font-size:21px; font-weight:620; line-height:1.4; }
.attendance-history-button { align-self:flex-start; padding:0; border:0; background:transparent; color:var(--green); text-decoration:underline; font:inherit; font-size:13px; cursor:pointer; }
.attendance-dialog { width:min(680px,calc(100vw - 32px)); max-height:80dvh; margin:auto; padding:0; border:1px solid var(--border); border-radius:12px; color:var(--ink); background:var(--paper); box-shadow:0 20px 80px #0003; }
.attendance-dialog::backdrop { background:#102a2a80; }
.attendance-dialog header { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:20px 24px; border-bottom:1px solid var(--border); }
.attendance-dialog h2 { margin:0; font-size:20px; }
.attendance-dialog form { margin:0; }
.attendance-dialog-content { padding:0 24px 24px; }
.attendance-dialog li { padding:12px 0; border-bottom:1px solid var(--border); }
.attendance-dialog ul { padding-left:20px; }
.profile-tabs { display:flex; gap:26px; border-bottom:1px solid var(--border); margin:0 0 30px; }
.profile-tabs a { padding:10px 0 13px; color:var(--muted); text-decoration:none; }
.profile-tabs a.selected,.profile-tabs a[aria-current="page"] { color:var(--green); border-bottom:3px solid var(--green); font-weight:700; }
.header-navigation .profile-tabs a[aria-current="page"] { background:var(--accent); box-shadow:0 0 0 6px var(--accent); border-radius:3px 3px 0 0; }
.activity-panel { max-width:980px; margin:auto; }
.activity-controls { display:flex; gap:14px; flex-wrap:wrap; margin:24px 0 12px; align-items:end; }
.activity-controls label { display:flex; flex-direction:column; gap:6px; flex:1; min-width:170px; font-size:13px; font-weight:600; }
.activity-controls select { max-width:100%; }
.activity-controls button { margin-bottom:1px; }
.explanation { color:var(--muted); font-size:14px; }
.coverage-banner { border-left:3px solid #9a7731; background:#f7f3e9; padding:14px 18px; margin:24px 0; }
.coverage-banner strong { font-size:14px; }
.coverage-banner p { font-size:13px; color:var(--muted); margin:6px 0 0; }
.duties { padding:15px 0; border-block:1px solid var(--border); margin-bottom:28px; }
.duties summary { color:var(--green); cursor:pointer; }
.duties p { font-size:14px; color:var(--muted); }
.month-heading { margin:30px 0 16px; font-size:20px; color:var(--green); }
.event-body { background:white; border:1px solid var(--border); border-radius:8px; padding:22px 25px; margin:0 0 18px; }
.category { font-size:11px; font-weight:700; letter-spacing:.06em; color:var(--green); }
.event-body h3 { font-size:20px; margin:10px 0; }
.event-body p { font-size:14px; }
.event-body a { font-size:14px; }
.vote-facts { display:grid; grid-template-columns:minmax(120px,1fr) 2fr; gap:10px 25px; border-block:1px solid var(--border); padding:18px 0; margin:18px 0; }
.vote-facts dt { color:var(--muted); font-size:13px; }
.vote-facts dd { margin:0; font-size:14px; overflow-wrap:anywhere; }
.empty-state { padding:22px; background:var(--accent); border-radius:8px; margin:24px 0; color:var(--muted); }
.empty-state p { margin-bottom:0; }
.search-results { list-style:none; padding:0; }
.search-result { background:white; border:1px solid var(--border); border-radius:8px; padding:20px; margin:15px 0; }
.search-result h2 { font-size:20px; margin:0; }
.search-result p { color:var(--muted); }
.pagination { margin:28px 0; }
.pagination a { display:inline-block; padding:10px 15px; background:white; border:1px solid var(--border); border-radius:6px; }
footer { border-top:1px solid var(--border); padding:22px max(24px,calc((100vw - 1144px)/2)); color:var(--green); }
footer span { font-size:12px; color:var(--muted); margin-left:20px; }
@media(max-width:680px) {
 .profile-tabs { flex-wrap:wrap; gap:8px 20px; }
 .topbar { padding:18px; flex-wrap:wrap; gap:18px; }
 .search { max-width:none; flex-basis:100%; }
 .workspace { padding:18px 16px 35px; }
 .profile { gap:15px; }
 .portrait { width:90px; }
 .portrait img,.portrait-placeholder { width:90px; height:110px; }
 .portrait-placeholder { font-size:50px; }
 h1 { font-size:25px; }
 .role { font-size:13px; }
 .affiliation { align-items:center; }
 .affiliation small { font-size:11px; }
 .metrics { grid-template-columns:1fr; }
 .metric { border-right:0; border-bottom:1px solid var(--border); }
 .activity-controls label { flex-basis:100%; }
 .activity-controls button { width:100%; }
 .event-body { padding:16px; }
 .vote-facts { grid-template-columns:1fr; gap:4px; }
 .vote-facts dd { margin-bottom:10px; }
 footer span { display:block; margin:5px 0 0; }
}

.event-body summary,.activity-filters>summary,.activity-context>summary { cursor:pointer; color:var(--green); font-weight:600; }
.activity-filters,.activity-context { margin:20px 0; }
/* Activity timeline follows the planned month rail and event cards. */
.section-head { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:28px; }
.section-head h2 { margin:6px 0 8px; font-size:26px; }
.section-head p { margin:0; color:var(--muted); }
.section-head .eyebrow,.activity-history>.eyebrow { color:var(--green); font-size:11px; }
.activity-history>h2 { margin:6px 0 24px; font-size:24px; }
.activity-timeline { position:relative; }
.timeline-group { position:relative; }
.timeline-group::before { content:""; position:absolute; left:77px; top:48px; bottom:0; width:1px; background:var(--border); }
.activity-timeline .month-heading { margin:30px 0 18px 99px; font-size:19px; }
.timeline-event { display:grid; grid-template-columns:74px minmax(0,1fr); gap:25px; position:relative; }
.event-date { padding-top:22px; position:relative; text-align:center; color:var(--muted); font-size:12px; }
.event-date::after { content:""; position:absolute; right:-8px; top:29px; width:8px; height:8px; background:var(--green); border:3px solid var(--page); border-radius:50%; box-sizing:content-box; }
.event-date strong,.event-date span { display:block; }
.event-date strong { color:var(--green); font-size:13px; letter-spacing:.05em; }
.timeline-event .event-body { margin-bottom:24px; padding:24px 28px; }
.event-top { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.source-state { font-size:11px; padding:4px 8px; color:var(--green); background:var(--accent); border-radius:4px; }
.event-top .category { margin:0; }
.timeline-event h3 { font-size:19px; margin:14px 0 10px; }
.timeline-event .vote-facts { grid-template-columns:1fr 1fr; gap:18px 24px; }
.timeline-event .vote-facts dd { margin-top:5px; }
.vote-choice { display:inline-block; border-radius:4px; padding:3px 7px; background:#eef0ed; }
.vote-choice.yes { color:#17583f; background:#e6f1e8; }
.vote-choice.no { color:#8b3232; background:#f8eaea; }
.vote-object dd { margin:4px 0 12px; }
.event-footer { color:var(--muted); font-size:11px; margin-top:18px; }
@media(max-width:680px) {
 .timeline-event { grid-template-columns:42px minmax(0,1fr); gap:15px; }
 .timeline-group::before { left:44px; }
 .activity-timeline .month-heading { margin-left:57px; }
 .timeline-event .event-body { padding:16px; }
 .event-top { flex-direction:column; align-items:flex-start; gap:6px; }
 .timeline-event .vote-facts { grid-template-columns:1fr; }
}
/* Stable card height lets the initial viewport measurement bound fetched rows. */
.search-result h2 { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; line-height:1.4; }
.search-result h2 a { white-space:nowrap; }
.people-filters { margin:12px 0; }
/* Cabinet payroll history keeps role totals readable on narrow screens. */
.cabinet-payroll-dialog { width:min(1000px,calc(100vw - 32px)); }
.cabinet-table-scroll { overflow-x:auto; margin:18px 0; }
.cabinet-payroll-table { width:100%; border-collapse:collapse; font-size:13px; }
.cabinet-payroll-table caption { text-align:left; font-weight:700; margin-bottom:12px; }
.cabinet-payroll-table th,.cabinet-payroll-table td { padding:10px; border-bottom:1px solid var(--border); text-align:right; }
.cabinet-payroll-table th:first-child { text-align:left; }
.cabinet-payroll-table td { white-space:nowrap; }
.cabinet-payroll-dialog section { border-top:1px solid var(--border); margin-top:24px; }
