/* Base reset scoped to root */ #polisci-root, #polisci-root *, #polisci-root *::before, #polisci-root *::after { box-sizing: border-box; } #polisci-root { --ps-party-r: #d9534f; --ps-party-d: #337ab7; --ps-party-i: #5cb85c; --ps-accent: #2c3e50; --ps-bg: #f5f7fa; --ps-surface: #ffffff; --ps-text: #1f2933; --ps-text-muted: #5b6471; --ps-border: #d8dde4; --ps-row-alt: #f9fafc; --ps-hover: #eef3f9; --ps-radius: 6px; --ps-shadow: 0 1px 2px rgba(0,0,0,0.04); font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 1.45; color: var(--ps-text); background: var(--ps-bg); padding: 16px; max-width: 1400px; margin: 0 auto; } #polisci-root .is-hidden { display: none !important; } #polisci-root .visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; } /* Header */ #polisci-root .ps-header { margin-bottom: 16px; } #polisci-root .ps-header h1 { font-size: 1.6rem; margin: 0 0 4px; color: var(--ps-accent); } #polisci-root .ps-subtitle { margin: 0; color: var(--ps-text-muted); font-size: 0.95rem; } #polisci-root .member-note { margin-top: 10px; padding: 10px 14px; background: #fff8e1; border: 1px solid #f0d97a; border-radius: var(--ps-radius); font-size: 0.92rem; } /* Layout */ #polisci-root .ps-layout { display: grid; grid-template-columns: 240px 1fr; gap: 20px; align-items: start; } /* Sidebar */ #polisci-root .sidebar { background: var(--ps-surface); border: 1px solid var(--ps-border); border-radius: var(--ps-radius); padding: 14px; box-shadow: var(--ps-shadow); position: sticky; top: 12px; } #polisci-root .sidebar-toggle { display: none; width: 100%; padding: 8px 12px; background: var(--ps-accent); color: #fff; border: none; border-radius: var(--ps-radius); font-size: 0.95rem; cursor: pointer; } #polisci-root .filter-group { border: none; padding: 0; margin: 0 0 14px; } #polisci-root .filter-group legend { font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ps-text-muted); margin-bottom: 6px; padding: 0; } #polisci-root .filter-group label { display: block; padding: 3px 0; font-size: 0.93rem; cursor: pointer; } #polisci-root .filter-group input[type="checkbox"] { margin-right: 6px; } #polisci-root #filter-state-select { width: 100%; font-size: 0.9rem; border: 1px solid var(--ps-border); border-radius: var(--ps-radius); padding: 4px; } #polisci-root .btn-reset { width: 100%; padding: 7px 10px; background: var(--ps-surface); color: var(--ps-text); border: 1px solid var(--ps-border); border-radius: var(--ps-radius); cursor: pointer; font-size: 0.9rem; } #polisci-root .btn-reset:hover { background: var(--ps-hover); } #polisci-root .hint { margin: 10px 0 0; font-size: 0.82rem; color: var(--ps-text-muted); } /* Main */ #polisci-root .ps-main { min-width: 0; } /* Search */ #polisci-root .search-wrap { position: relative; margin-bottom: 16px; } #polisci-root #member-search { width: 100%; padding: 10px 14px; font-size: 1rem; border: 1px solid var(--ps-border); border-radius: var(--ps-radius); background: var(--ps-surface); } #polisci-root #member-search:focus { outline: 2px solid var(--ps-party-d); outline-offset: -1px; } #polisci-root .member-results { position: absolute; top: 100%; left: 0; right: 0; margin: 4px 0 0; padding: 0; list-style: none; background: var(--ps-surface); border: 1px solid var(--ps-border); border-radius: var(--ps-radius); box-shadow: 0 4px 12px rgba(0,0,0,0.08); max-height: 320px; overflow-y: auto; z-index: 20; } #polisci-root .member-results li { padding: 8px 12px; cursor: pointer; font-size: 0.94rem; border-bottom: 1px solid var(--ps-border); } #polisci-root .member-results li:last-child { border-bottom: none; } #polisci-root .member-results li:hover, #polisci-root .member-results li[aria-selected="true"] { background: var(--ps-hover); } /* Member summary */ #polisci-root .member-summary { background: var(--ps-surface); border: 1px solid var(--ps-border); border-radius: var(--ps-radius); padding: 14px; margin-bottom: 16px; min-height: 60px; box-shadow: var(--ps-shadow); } #polisci-root .member-summary:empty { display: none; } /* KPI cards */ #polisci-root .kpi-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; } #polisci-root .kpi-card { background: var(--ps-surface); border: 1px solid var(--ps-border); border-radius: var(--ps-radius); padding: 12px 14px; box-shadow: var(--ps-shadow); } #polisci-root .kpi-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ps-text-muted); margin-bottom: 4px; } #polisci-root .kpi-value { font-size: 1.6rem; font-weight: 600; color: var(--ps-accent); font-variant-numeric: tabular-nums; } /* Charts grid */ #polisci-root .charts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin-bottom: 24px; } #polisci-root .chart-frame { background: var(--ps-surface); border: 1px solid var(--ps-border); border-radius: var(--ps-radius); padding: 16px; margin: 0; height: 340px; box-shadow: var(--ps-shadow); display: flex; flex-direction: column; } #polisci-root .chart-frame figcaption { font-size: 0.95rem; font-weight: 600; color: var(--ps-accent); margin-bottom: 10px; flex: 0 0 auto; } #polisci-root .chart-canvas-wrap { position: relative; flex: 1 1 auto; min-height: 0; width: 100%; } #polisci-root .chart-frame canvas { position: absolute; top: 0; left: 0; width: 100% !important; height: 100% !important; } #polisci-root .chart-wide { grid-column: 1 / -1; } /* Vote table */ #polisci-root .vote-table-section { background: var(--ps-surface); border: 1px solid var(--ps-border); border-radius: var(--ps-radius); padding: 14px; box-shadow: var(--ps-shadow); margin-bottom: 20px; } #polisci-root .vote-table-section h2 { font-size: 1.1rem; margin: 0 0 12px; color: var(--ps-accent); } #polisci-root .table-scroll { overflow-x: auto; max-height: 600px; overflow-y: auto; } #polisci-root #vote-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; } #polisci-root #vote-table thead th { position: sticky; top: 0; background: var(--ps-accent); color: #fff; text-align: left; padding: 8px 10px; font-weight: 600; font-size: 0.82rem; white-space: nowrap; z-index: 1; } #polisci-root #vote-table tbody td { padding: 6px 10px; border-bottom: 1px solid var(--ps-border); vertical-align: top; } #polisci-root #vote-table tbody tr:nth-child(even) { background: var(--ps-row-alt); } #polisci-root #vote-table tbody tr:hover { background: var(--ps-hover); } #polisci-root #vote-table td:nth-child(1), #polisci-root #vote-table td:nth-child(2), #polisci-root #vote-table td:nth-child(3), #polisci-root #vote-table td:nth-child(9), #polisci-root #vote-table td:nth-child(10) { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; white-space: nowrap; } /* Footer */ #polisci-root .ps-footer { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--ps-border); font-size: 0.82rem; color: var(--ps-text-muted); } /* Comparison view (compare.html) */ #polisci-root .compare-pills-section { margin: 12px 0 8px; padding: 10px 12px; border: 1px solid var(--ps-border); border-radius: 6px; background: var(--ps-surface, #fff); } #polisci-root .compare-pills-title { font-size: 0.95rem; margin: 0 0 6px; color: var(--ps-text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; } #polisci-root .selected-pills { list-style: none; padding: 0; margin: 0 0 4px; display: flex; flex-wrap: wrap; gap: 6px; } #polisci-root .compare-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border: 1px solid #ccc; border-radius: 999px; font-size: 0.9rem; line-height: 1.1; } #polisci-root .compare-pill-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 50%; } #polisci-root .compare-pill-name { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; } #polisci-root .compare-pill-name:hover { color: var(--ps-accent); } #polisci-root .compare-pill-remove { background: none; border: 0; padding: 0 2px; margin-left: 2px; font-size: 1.1rem; line-height: 1; color: var(--ps-text-muted); cursor: pointer; } #polisci-root .compare-pill-remove:hover { color: #c0392b; } #polisci-root .align-switcher-wrap { margin: 10px 0; display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--ps-text-muted); } #polisci-root .align-switcher-wrap select { padding: 4px 6px; border: 1px solid var(--ps-border); border-radius: 4px; font: inherit; } /* Responsive */ @media (max-width: 768px) { #polisci-root { padding: 10px; } #polisci-root .ps-layout { grid-template-columns: 1fr; } #polisci-root .sidebar { position: static; padding: 10px; } #polisci-root .sidebar-toggle { display: block; margin-bottom: 10px; } #polisci-root .sidebar-body { display: none; } #polisci-root .sidebar.is-open .sidebar-body { display: block; } #polisci-root .ps-header h1 { font-size: 1.3rem; } #polisci-root .kpi-value { font-size: 1.3rem; } #polisci-root .chart-frame { height: 280px; } } /* Top-level nav between Member / Compare / Rankings pages */ #polisci-root .ps-nav { margin: 4px 0 8px; font-size: 0.95rem; } #polisci-root .ps-nav a { color: var(--ps-accent); text-decoration: none; padding: 2px 6px; border-radius: 4px; } #polisci-root .ps-nav a:hover { background: var(--ps-hover); } #polisci-root .ps-nav a[aria-current="page"] { background: var(--ps-accent); color: #fff; font-weight: 600; } /* Ranking page */ #polisci-root .rank-summary { margin-bottom: 12px; color: var(--ps-text-muted, #555); font-size: 0.95rem; } #polisci-root .rank-summary-line { margin: 0; } #polisci-root #rank-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; } #polisci-root #rank-table thead th { background: var(--ps-row-alt); text-align: left; padding: 8px 10px; border-bottom: 2px solid var(--ps-border); position: sticky; top: 0; z-index: 1; } #polisci-root #rank-table tbody td { padding: 6px 10px; border-bottom: 1px solid var(--ps-border); } #polisci-root #rank-table tbody tr.rank-row { cursor: pointer; } #polisci-root #rank-table tbody tr:nth-child(even) { background: var(--ps-row-alt); } #polisci-root #rank-table tbody tr:hover { background: var(--ps-hover); } #polisci-root #rank-table td:first-child { width: 60px; font-variant-numeric: tabular-nums; color: var(--ps-text-muted, #555); } #polisci-root #rank-table .rank-value { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; } #polisci-root #rank-table .party-cell { font-weight: 600; width: 40px; text-align: center; } #polisci-root #rank-table .party-R { color: #d9534f; } #polisci-root #rank-table .party-D { color: #337ab7; } #polisci-root #rank-table .party-I { color: #5cb85c; }