:root { --accent: #800000; --accent2: #005293; --ink: #1f2328; --muted: #6b7280; --line: #e5e7eb; --bg: #fafafa; }
* { box-sizing: border-box; }
body { margin: 0; font-family: Lato, "Segoe UI", system-ui, -apple-system, sans-serif; color: var(--ink); background: #fff; font-size: 15px; }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
.wrap { max-width: 1440px; margin: 0 auto; padding: 16px 20px 40px; }
.top { display: flex; align-items: center; gap: 14px; padding: 12px 20px; border-bottom: 3px solid var(--accent); background: #fff; flex-wrap: wrap; }
.top .logo { width: 48px; height: 48px; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.top .brand { font-weight: 700; font-size: 1.1em; }
.glance { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 6px 0 14px; }
.glance .tile { border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 8px; padding: 8px 12px; background: #fff; }
.glance .tile b { display: block; font-size: 1.5em; line-height: 1.1; } .glance .tile span { color: var(--muted); font-size: .85em; }
.legend { display: inline-flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.how { display: grid; gap: 6px; margin-top: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); font-size: .9em; color: #374151; }
.chart-wrap { display: flex; gap: 6px; }
.axis { display: flex; flex-direction: column; justify-content: space-between; height: 320px; font-size: .75em; color: var(--muted); text-align: right; padding-bottom: 0; }
.chart { position: relative; flex: 1; }
.guide { position: absolute; left: 0; right: 0; border-top: 1px dashed #555; z-index: 1; pointer-events: none; }
.guide.faint { border-top-color: #ddd; }
.guide em { position: absolute; right: 4px; top: -16px; font-size: .75em; color: #555; background: #fff; padding: 0 4px; }
.top .brand small { display: block; font-weight: 400; color: var(--muted); font-size: .8em; }
.top nav { margin-left: auto; display: flex; gap: 14px; flex-wrap: wrap; }
.top nav a { color: var(--ink); padding: 6px 2px; border-bottom: 2px solid transparent; }
.top nav a.on { border-bottom-color: var(--accent); font-weight: 600; }
h1 { font-size: 1.5em; margin: 8px 0 2px; } .sub { color: var(--muted); margin: 0 0 14px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; flex-wrap: wrap; }
.tabs a { padding: 8px 12px; color: var(--muted); border-bottom: 2px solid transparent; text-transform: uppercase; font-size: .82em; letter-spacing: .03em; }
.tabs a.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.toolbar { display: flex; gap: 10px; align-items: center; margin: 0 0 10px; flex-wrap: wrap; }
.toolbar input, .toolbar select { padding: 6px 8px; border: 1px solid #ccc; border-radius: 6px; font-size: .95em; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
table { border-collapse: collapse; width: 100%; font-size: 1em; }
th { position: sticky; top: 0; background: #f5f5f5; text-align: left; padding: 10px; border-bottom: 2px solid #ddd; white-space: nowrap; cursor: pointer; user-select: none; z-index: 2; }
th .arr { opacity: .35; font-size: .8em; } th.sorted .arr { opacity: 1; }
td { padding: 9px 10px; border-bottom: 1px solid #eee; vertical-align: top; }
tbody tr:nth-child(even) { background: var(--bg); } tbody tr:hover { background: #fff8e6; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cat { display: inline-block; padding: 3px 9px; border-radius: 10px; font-size: .88em; white-space: nowrap; }
.cat.ss { background: #1a5c1a; color: #fff; } .cat.s { background: #cfe8cf; color: #124912; }
.cat.n { background: #e5e7eb; color: #374151; } .cat.o { background: #f7d4d4; color: #7a1414; } .cat.so { background: #a11111; color: #fff; }
.brief { display: inline-block; padding: 3px 10px; border-radius: 6px; background: var(--accent); color: #fff; font-size: .85em; white-space: nowrap; }
.brief:hover { text-decoration: none; opacity: .9; }
.brief.soon { background: #eee; color: #9ca3af; }
.party { display: inline-block; min-width: 20px; text-align: center; border-radius: 4px; color: #fff; font-weight: 700; font-size: .8em; padding: 1px 4px; }
.party.R { background: #c0392b; } .party.D { background: #2471a3; } .party.I { background: #7f8c8d; }
.bar { display: flex; align-items: center; gap: 6px; }
.bar i { display: block; height: 12px; background: #2b7bba; border-radius: 2px; }
.bar i.neg { background: #c0392b; }
.pts { text-align: center; font-variant-numeric: tabular-nums; }
.pts.pos { color: #1a5c1a; } .pts.neg { color: #a11111; } .pts.zero { color: #9ca3af; }
.matrix th.leg, .matrix td.leg { position: sticky; left: 0; background: #fff; z-index: 3; white-space: nowrap; }
.matrix th.leg { z-index: 4; background: #f5f5f5; }
.matrix th.bill { writing-mode: sideways-lr; padding: 8px 4px; font-weight: 700; font-size: 1em; vertical-align: bottom; }
@supports not (writing-mode: sideways-lr) { .matrix th.bill { writing-mode: vertical-rl; text-orientation: mixed; } }
.chart { display: flex; align-items: flex-end; gap: 2px; height: 320px; border-left: 1px solid #999; border-bottom: 1px solid #999; padding: 0 4px; overflow-x: auto; }
.chart .b { flex: 1 0 8px; min-width: 8px; background: #c0392b; position: relative; }
.chart .b.D { background: #2471a3; } .chart .b.I { background: #7f8c8d; }
.chart .b:hover::after { content: attr(data-t); position: absolute; bottom: 100%; left: 0; background: #111; color: #fff; padding: 3px 6px; font-size: .75em; white-space: nowrap; border-radius: 4px; z-index: 5; }
.note { color: var(--muted); font-size: .85em; font-style: italic; margin-top: 10px; }
.foot { color: var(--muted); font-size: .8em; margin-top: 24px; border-top: 1px solid var(--line); padding-top: 10px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.msg { background: #ecfdf5; border: 1px solid #a7f3d0; padding: 8px 12px; border-radius: 6px; margin-bottom: 12px; }
.card { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-bottom: 14px; background: #fff; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
input[type=text], textarea, select { padding: 6px 8px; border: 1px solid #ccc; border-radius: 6px; font: inherit; }
textarea { width: 100%; min-height: 56px; }
button { padding: 6px 12px; border: 1px solid var(--accent); background: var(--accent); color: #fff; border-radius: 6px; cursor: pointer; font: inherit; }
button.ghost { background: #fff; color: var(--accent); } button.danger { background: #fff; color: #a11111; border-color: #a11111; }
.admin-row { border-bottom: 1px solid var(--line); padding: 10px 0; }
.admin-row .hd { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.admin-row .hd b { font-size: 1.05em; }
.embed body { background: #fff; }
@media (max-width: 700px) { .top nav { margin-left: 0; } td, th { padding: 6px; } }
.totop { position: fixed; right: 22px; bottom: 22px; width: 52px; height: 52px; border-radius: 50%; background: var(--accent2); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; font-size: .68em; font-weight: 700; line-height: 1; letter-spacing: .03em; box-shadow: 0 2px 8px rgba(0,0,0,.3); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 50; }
.totop.show { opacity: .9; pointer-events: auto; } .totop:hover { opacity: 1; text-decoration: none; }
