/* How Government Works (how-government-works.php): a plain-language guide. Tokens only. */
.civ-main { --civ-gap: clamp(18px, 3vw, 28px); }
.civ-lede { margin-top: 16px; max-width: 60ch; font-size: 1.2rem; }
.civ-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.civ-jump a { padding: 8px 14px; border: 2px solid var(--vf-ink); border-radius: var(--vf-radius-pill); color: var(--vf-ink); font-weight: 700; text-decoration: none; background: var(--vf-surface); }
.civ-jump a:hover { background: var(--vf-ink); color: var(--vf-on-accent); }
.civ-main a:focus-visible, .civ-main button:focus-visible, .civ-chart:focus-visible { outline: 3px solid var(--vf-blue); outline-offset: 2px; }
.civ-chart:focus:not(:focus-visible) { outline: none; }
.civ-section h2 { margin-bottom: 8px; }
.civ-sub { margin: 0 0 20px; max-width: 64ch; font-size: 1.08rem; color: var(--vf-ink-2); }
.civ-more { margin: 18px 0 0; font-weight: 700; }
.civ-more a, .civ-source, .civ-elect a { color: var(--vf-blue-text); }
.civ-fine { margin: 12px 0 0; font-size: .9rem; color: var(--vf-mute); max-width: 78ch; }

/* Three branches */
.civ-branches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--civ-gap); margin-top: 16px; }
.civ-branch { display: flex; flex-direction: column; padding: 22px; border-radius: var(--vf-radius-lg); background: var(--vf-surface); box-shadow: var(--vf-shadow-sm); border-top: 8px solid var(--civ-accent); }
.civ-branch--law { --civ-accent: var(--vf-blue); --civ-soft: var(--vf-blue-soft); }
.civ-branch--act { --civ-accent: var(--vf-red); --civ-soft: var(--vf-red-soft); }
.civ-branch--judge { --civ-accent: var(--vf-purple); --civ-soft: var(--vf-purple-soft); }
.civ-branch-top { display: flex; gap: 14px; align-items: center; }
.civ-icon { flex: 0 0 auto; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--civ-soft); }
.civ-icon svg { width: 38px; height: 38px; fill: var(--civ-accent); }
.civ-branch-name { font: 800 .74rem/1.2 var(--vf-font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--vf-mute); }
.civ-branch h3 { margin: 2px 0 0; font: 800 1.6rem/1.1 var(--vf-font-head); }
.civ-job { margin: 4px 0 0; font: 400 1.35rem/1.1 var(--vf-font-hand); color: var(--civ-accent); }
.civ-about { margin: 14px 0 0; }
.civ-list-head { margin: 16px 0 6px; font: 800 .8rem/1.2 var(--vf-font-body); letter-spacing: .08em; text-transform: uppercase; }
.civ-list-head--can { color: var(--vf-green-text); }
.civ-list-head--limit { color: var(--vf-red-text); }
.civ-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.civ-list li { position: relative; padding-left: 26px; line-height: 1.4; }
.civ-list li::before { content: "•"; position: absolute; left: 6px; top: 0; font-weight: 900; color: var(--vf-mute); }
.civ-list--can li::before { content: "✓"; left: 2px; color: var(--vf-green-text); }
.civ-list--limit li::before { content: "✕"; left: 2px; color: var(--vf-red-text); }
.civ-source { margin-top: auto; padding-top: 16px; font-weight: 700; font-size: .92rem; }

/* Checks and balances */
.civ-checks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.civ-checks li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 16px; border-radius: var(--vf-radius); background: var(--vf-surface); box-shadow: var(--vf-shadow-sm); }
.civ-checks p { flex-basis: 100%; margin: 4px 0 0; }
.civ-pill { padding: 4px 12px; border-radius: var(--vf-radius-pill); background: var(--vf-ink); color: var(--vf-on-accent); font-weight: 800; font-size: .92rem; }
.civ-pill--to { background: var(--vf-surface-2); color: var(--vf-ink); border: 1px solid var(--vf-rule-strong); }
.civ-arrow { font-weight: 900; font-size: 1.2rem; }

/* Bill steps */
.civ-steps { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; counter-reset: none; }
.civ-steps li { padding: 18px 16px; border-radius: var(--vf-radius); background: var(--vf-surface); box-shadow: var(--vf-shadow-sm); }
.civ-steps b { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--vf-blue); color: var(--vf-on-accent); font: 800 1.1rem/1 var(--vf-font-head); }
.civ-steps strong { display: block; margin-top: 10px; line-height: 1.25; }
.civ-steps p { margin: 6px 0 0; color: var(--vf-ink-2); font-size: .95rem; }

/* Executive orders */
.civ-eo { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--civ-gap); }
.civ-eo-col { padding: 20px; border-radius: var(--vf-radius-lg); background: var(--vf-surface); box-shadow: var(--vf-shadow-sm); }
.civ-eo-col h3 { margin: 0 0 12px; font: 800 1.25rem/1.1 var(--vf-font-head); }
.civ-eo-col--can { border-top: 6px solid var(--vf-green); }
.civ-eo-col--limit { border-top: 6px solid var(--vf-red); }
.civ-eo-col--stop { border-top: 6px solid var(--vf-amber); }

/* Seat map */
.civ-key { font-weight: 800; padding: 0 6px; border-radius: 6px; }
.civ-key--D { color: var(--vf-dem-text); background: var(--vf-dem-soft); }
.civ-key--R { color: var(--vf-rep-text); background: var(--vf-rep-soft); }
.civ-seatmap { padding: clamp(16px, 3vw, 28px); border-radius: var(--vf-radius-xl); background: var(--vf-surface); box-shadow: var(--vf-shadow); }
.civ-controls { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; }
.civ-tabs { display: inline-flex; padding: 4px; border-radius: var(--vf-radius-pill); background: var(--vf-surface-2); border: 1px solid var(--vf-rule); }
.civ-tabs button { padding: 8px 22px; border: 0; border-radius: var(--vf-radius-pill); background: transparent; font: 800 1rem/1 var(--vf-font-body); color: var(--vf-ink-2); cursor: pointer; }
.civ-tabs button[aria-selected="true"] { background: var(--vf-ink); color: var(--vf-on-accent); }
.civ-time { display: flex; align-items: center; gap: 8px; flex: 1 1 340px; max-width: 560px; }
.civ-range { flex: 1; display: grid; gap: 4px; }
.civ-when { font-weight: 800; font-size: .95rem; }
.civ-range input { width: 100%; accent-color: var(--vf-ink); }
.civ-step, .civ-today { flex: 0 0 auto; min-width: 40px; height: 40px; padding: 0 12px; border: 2px solid var(--vf-ink); border-radius: var(--vf-radius-pill); background: var(--vf-surface); font-weight: 800; cursor: pointer; }
.civ-step:disabled { opacity: .35; cursor: default; }
.civ-today { background: var(--vf-ink); color: var(--vf-on-accent); }
.civ-chamber-note { margin: 14px 0 0; color: var(--vf-ink-2); }
.civ-chart-wrap { position: relative; max-width: 760px; margin: 10px auto 0; }
.civ-chart { display: block; width: 100%; height: auto; }
.civ-seat { cursor: pointer; stroke: var(--vf-surface); stroke-width: .4; transition: transform .12s; transform-box: fill-box; transform-origin: center; }
.civ-seat:hover, .civ-seat.is-picked { transform: scale(1.45); stroke: var(--vf-ink); stroke-width: .8; }
.civ-total { font: 800 22px/1 var(--vf-font-head); fill: var(--vf-ink); }
.civ-total-label { font: 700 9px/1 var(--vf-font-body); fill: var(--vf-mute); text-transform: uppercase; letter-spacing: .08em; }
.civ-p-D { fill: var(--vf-dem); background: var(--vf-dem); }
.civ-p-R { fill: var(--vf-rep); background: var(--vf-rep); }
.civ-p-I { fill: var(--vf-purple); background: var(--vf-purple); }
.civ-p-o1 { fill: var(--vf-amber); background: var(--vf-amber); }
.civ-p-o2 { fill: var(--vf-green); background: var(--vf-green); }
.civ-p-o3 { fill: var(--vf-purple); background: var(--vf-purple); }
.civ-p-o4 { fill: var(--vf-mute); background: var(--vf-mute); }
.civ-p-vacant { fill: var(--vf-surface); stroke: var(--vf-rule-strong); stroke-width: .8; background: var(--vf-surface); border: 2px solid var(--vf-rule-strong); }
.civ-tip { position: absolute; z-index: 2; transform: translate(-50%, calc(-100% - 14px)); padding: 8px 12px; border-radius: var(--vf-radius-sm); background: var(--vf-ink); color: var(--vf-on-accent); pointer-events: none; white-space: nowrap; box-shadow: var(--vf-shadow-sm); }
.civ-tip strong { display: block; }
.civ-tip span { font-size: .85rem; opacity: .85; }
.civ-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin-top: 10px; }
.civ-leg { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.civ-leg i { width: 14px; height: 14px; border-radius: 50%; }
.civ-pick { margin: 18px auto 0; max-width: 560px; min-height: 104px; padding: 16px; border-radius: var(--vf-radius); background: var(--vf-surface-2); }
.civ-pick > p { margin: 0; color: var(--vf-mute); text-align: center; padding-top: 24px; }
.civ-person { display: flex; gap: 16px; align-items: center; }
.civ-face { position: relative; display: grid; place-items: center; width: 72px; height: 88px; border-radius: var(--vf-radius-sm); overflow: hidden; color: var(--vf-on-accent); flex: 0 0 auto; }
.civ-face em { font: 800 1.5rem/1 var(--vf-font-head); font-style: normal; }
.civ-face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.civ-person h3 { margin: 6px 0 2px; font: 800 1.3rem/1.15 var(--vf-font-head); }
.civ-person h3 a { color: var(--vf-ink); }
.civ-person p { margin: 0; color: var(--vf-ink-2); }
.civ-open { display: inline-block; margin-top: 8px; font-weight: 800; color: var(--vf-blue-text); }
.civ-tag { display: inline-block; padding: 2px 10px; border-radius: var(--vf-radius-pill); color: var(--vf-on-accent); font: 800 .74rem/1.5 var(--vf-font-body); letter-spacing: .06em; text-transform: uppercase; }
.civ-president { margin-top: 16px; text-align: center; font-weight: 700; }
.civ-president a { color: var(--vf-ink); }
.civ-president > span:first-child { color: var(--vf-mute); }
.civ-all { margin-top: 18px; border-top: 1px solid var(--vf-rule); padding-top: 12px; }
.civ-all summary { cursor: pointer; font-weight: 800; color: var(--vf-blue-text); }
.civ-all h4 { margin: 16px 0 6px; }
.civ-all ul { list-style: none; margin: 0; padding: 0; columns: 3 220px; column-gap: 24px; }
.civ-all li { break-inside: avoid; padding: 2px 0; }
.civ-all li a { color: var(--vf-ink); font-weight: 700; }
.civ-all small { color: var(--vf-mute); }
.civ-elect { margin: 18px 0 0; max-width: 78ch; }

/* Supreme Court */
.civ-justices { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.civ-justices a { display: grid; grid-template-columns: 44px 1fr; column-gap: 12px; align-items: center; padding: 14px; border-radius: var(--vf-radius); background: var(--vf-surface); box-shadow: var(--vf-shadow-sm); color: var(--vf-ink); text-decoration: none; height: 100%; }
.civ-justices a:hover strong { text-decoration: underline; }
.civ-gavel { grid-row: span 3; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--vf-ink); color: var(--vf-on-accent); font: 800 1.1rem/1 var(--vf-font-head); }
.civ-justices strong { line-height: 1.2; }
.civ-justices small { color: var(--vf-mute); }

@media (max-width: 980px) {
  .civ-branches, .civ-eo { grid-template-columns: minmax(0, 1fr); }
  .civ-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .civ-checks, .civ-steps { grid-template-columns: minmax(0, 1fr); }
  .civ-time { flex-basis: 100%; }
  .civ-tip { white-space: normal; max-width: 220px; }
}
