/* ============================================================================
   congress-index.css — Congress landing in the "Corrupted Desktop" theme
   ----------------------------------------------------------------------------
   Layers on css/corrupted-desktop.css (tokens, .tt-hero, .tt-explorer, .tt-intel,
   .tt-taskbar, scanlines). Sections 1-9 are scoped under .tmpl-corrupted-desktop.tt-congress
   and use only theme tokens; section 10 styles the bill-lookup dialog, which lives OUTSIDE
   the wrapper and therefore redeclares the tokens it needs locally.

   Zones: CRT (Win9x bevels, VT323) for every utility panel; vaporwave only for the
   neon title. The one Congress-specific idea is the hero's tally board — the dark
   chamber vote board with lit counters — which sits inside the Win7 folder surface.
   ========================================================================== */

/* ---------- 0. No CRT scanlines here --------------------------------------- */
/* The theme's per-panel ::after scanline+flicker overlay (corrupted-desktop.css section 2)
   blurs the small, dense text this page is full of. The news/IRC pages keep theirs. */
.tmpl-corrupted-desktop.tt-congress .tt-hero::after,
.tmpl-corrupted-desktop.tt-congress .tt-taskbar::after,
.tmpl-corrupted-desktop.tt-congress .tt-explorer::after{ content:none; }

/* ---------- 1. Hero: Explorer chrome sized for the board ------------------ */
.tmpl-corrupted-desktop.tt-congress .tt-hero,
.tmpl-corrupted-desktop.tt-congress .tt-intel-window{
    height:clamp(300px,36vw,420px);
}
.tmpl-corrupted-desktop.tt-congress .tt-congress__title-bar-text{
    font-size:12px; font-weight:bold;
}
.tmpl-corrupted-desktop.tt-congress .tt-congress__crumb{
    color:#000; font-size:12px;
}
.tmpl-corrupted-desktop.tt-congress #congress-quick-search{
    flex:0 1 40%; min-width:160px; height:24px; padding:0 6px;
    border:1px solid #a0a0a0; background:#fff; color:#000; font-size:12px;
}
/* The folder is a flex row by default (icon grid); the board wants a single column. */
.tmpl-corrupted-desktop.tt-congress .tt-desktop-folder{
    display:flex; flex-direction:column; padding:6px;
}

/* ---------- 2. Tally board (signature) ------------------------------------ */
.tmpl-corrupted-desktop.tt-congress .tt-tally{
    flex:1 1 auto; min-height:0; width:100%;
    display:flex; flex-direction:column; justify-content:center; gap:var(--sp-3);
    padding:var(--sp-4) var(--sp-4) var(--sp-3);
    background:
        radial-gradient(ellipse at 50% 0%, rgba(1,205,254,.10), transparent 60%),
        #0a0a14;
    box-shadow:var(--bevel-in);
    color:#fff;
}
.tmpl-corrupted-desktop.tt-congress .tt-tally__title{
    font-size:clamp(1.8rem,4.2vw,3rem); letter-spacing:3px; line-height:1;
}
.tmpl-corrupted-desktop.tt-congress .tt-tally__tag{
    margin:0; text-align:center;
    font-family:"VT323",monospace; font-size:16px; letter-spacing:2px;
    color:var(--vw-cyan); text-shadow:var(--vw-glow-cyan);
}
.tmpl-corrupted-desktop.tt-congress .tt-tally__board{
    display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:var(--sp-3);
}
.tmpl-corrupted-desktop.tt-congress .tt-stat{
    display:flex; flex-direction:column; align-items:center; gap:2px;
    padding:var(--sp-2) var(--sp-2) var(--sp-2);
    background:#10101f; border:1px solid #262640;
    box-shadow:inset 0 0 0 1px #05050a, inset 0 1px 0 #2e2e4a;
}
.tmpl-corrupted-desktop.tt-congress .tt-stat__num{
    font-family:"VT323",monospace; font-size:clamp(2rem,4vw,2.8rem); line-height:1;
    color:var(--crt-green); text-shadow:var(--vw-glow-lime);
    font-variant-numeric:tabular-nums;
}
.tmpl-corrupted-desktop.tt-congress .tt-stat__label{
    font-family:Tahoma,"Segoe UI",sans-serif; font-size:11px; font-weight:bold;
    letter-spacing:2px; text-transform:uppercase; color:#c0c0c0;
}
/* Lit segment bar: D | R | I. Widths are set by the script (flex-grow = seat count). */
.tmpl-corrupted-desktop.tt-congress .tt-stat__split{
    display:flex; width:100%; height:6px; margin-top:var(--sp-1);
    background:#05050a; box-shadow:inset 0 0 0 1px #2a2a44; overflow:hidden;
}
.tmpl-corrupted-desktop.tt-congress .tt-stat__split > i{ display:block; flex:0 0 0; height:100%; }
.tmpl-corrupted-desktop.tt-congress .tt-stat__split > i.is-d{ background:#3b8fe8; box-shadow:0 0 6px rgba(59,143,232,.9); }
.tmpl-corrupted-desktop.tt-congress .tt-stat__split > i.is-r{ background:#e03c3c; box-shadow:0 0 6px rgba(224,60,60,.9); }
.tmpl-corrupted-desktop.tt-congress .tt-stat__split > i.is-i{ background:var(--crt-amber); box-shadow:0 0 6px rgba(255,176,0,.9); }
.tmpl-corrupted-desktop.tt-congress .tt-stat__legend{
    font-family:"VT323",monospace; font-size:15px; color:#9a9ab8; letter-spacing:1px;
    font-variant-numeric:tabular-nums;
}
.tmpl-corrupted-desktop.tt-congress .tt-tally__key{
    display:flex; justify-content:center; gap:var(--sp-4);
    font-family:"VT323",monospace; font-size:14px; color:#9a9ab8; letter-spacing:1px;
}
.tmpl-corrupted-desktop.tt-congress .tt-key{
    display:inline-block; width:10px; height:10px; margin-right:5px; vertical-align:-1px;
}
.tmpl-corrupted-desktop.tt-congress .tt-key.is-d{ background:#3b8fe8; }
.tmpl-corrupted-desktop.tt-congress .tt-key.is-r{ background:#e03c3c; }
.tmpl-corrupted-desktop.tt-congress .tt-key.is-i{ background:var(--crt-amber); }

/* ---------- 3. Intel panel content (reuses .tt-intel__* from the theme) --- */
.tmpl-corrupted-desktop.tt-congress .tt-intel__vitals{ display:flex; justify-content:space-between; gap:var(--sp-2); }
.tmpl-corrupted-desktop.tt-congress .tt-intel__vitals b{ color:var(--crt-navy-1); }
.tmpl-corrupted-desktop.tt-congress .tt-intel__bar-fill.is-demo{ background:linear-gradient(90deg,var(--crt-navy-2),var(--vw-cyan)); }
.tmpl-corrupted-desktop.tt-congress .tt-intel__bar-fill.is-f{ background:linear-gradient(90deg,#a3407f,var(--vw-pink)); }
.tmpl-corrupted-desktop.tt-congress .tt-intel__bar-fill.is-m{ background:linear-gradient(90deg,var(--crt-navy-1),var(--crt-navy-2)); }
.tmpl-corrupted-desktop.tt-congress .tt-intel__bar-val{ flex:0 0 3ch; text-align:right; font-variant-numeric:tabular-nums; }

/* ---------- 4. Body panels: equal height, internal scroll ----------------- */
@media (min-width:992px){
    .tmpl-corrupted-desktop.tt-congress .tt-fill-h{
        display:flex; flex-direction:column; height:680px; overflow:hidden;
    }
    .tmpl-corrupted-desktop.tt-congress .tt-fill-h > .window-body{
        flex:1 1 auto; min-height:0; max-height:none !important;
        display:flex; flex-direction:column;
    }
    .tmpl-corrupted-desktop.tt-congress .tt-fill-h .tt-congress__list{
        flex:1 1 auto; min-height:0; overflow-y:auto;
    }
}
@media (max-width:991.98px){
    .tmpl-corrupted-desktop.tt-congress .tt-fill-h > .window-body{ max-height:560px; }
}

/* ---------- 5. Toolbars (CRT form controls) ------------------------------- */
.tmpl-corrupted-desktop.tt-congress .tt-congress__toolbar{
    display:flex; flex-wrap:wrap; align-items:center; gap:var(--sp-2);
    margin:0 0 var(--sp-2); padding:var(--sp-2);
    background:var(--crt-face); box-shadow:var(--bevel-out);
}
.tmpl-corrupted-desktop.tt-congress .tt-congress__toolbar input,
.tmpl-corrupted-desktop.tt-congress .tt-congress__toolbar select{
    height:26px; padding:0 6px; border:none; border-radius:0;
    background:#fff; color:#000; box-shadow:var(--bevel-in);
    font-family:"VT323",monospace; font-size:17px; line-height:26px;
}
.tmpl-corrupted-desktop.tt-congress .tt-congress__toolbar input[type="search"]{ flex:1 1 160px; min-width:0; }
.tmpl-corrupted-desktop.tt-congress .tt-congress__toolbar input[type="number"]{ flex:0 0 96px; -moz-appearance:textfield; }
.tmpl-corrupted-desktop.tt-congress .tt-congress__toolbar input[type="number"]::-webkit-outer-spin-button,
.tmpl-corrupted-desktop.tt-congress .tt-congress__toolbar input[type="number"]::-webkit-inner-spin-button{ -webkit-appearance:none; margin:0; }
.tmpl-corrupted-desktop.tt-congress .tt-congress__toolbar select{ flex:0 1 210px; min-width:120px; }
.tmpl-corrupted-desktop.tt-congress .tt-congress__toolbar button{
    height:26px; min-width:56px; padding:0 10px; font-size:12px; line-height:1;
}
.tmpl-corrupted-desktop.tt-congress .tt-congress__toolbar--bills input[type="search"]{ flex:1 1 220px; }
.tmpl-corrupted-desktop.tt-congress .tt-congress__count{
    margin-left:auto; font-family:"VT323",monospace; font-size:16px; color:var(--crt-navy-1);
    white-space:nowrap; font-variant-numeric:tabular-nums;
}
.tmpl-corrupted-desktop.tt-congress .tt-congress__toolbar :focus-visible{
    outline:2px solid var(--crt-navy-2); outline-offset:1px;
}

/* ---------- 6. Lists: member rows and bill rows --------------------------- */
.tmpl-corrupted-desktop.tt-congress .tt-congress__list{
    display:flex; flex-direction:column; gap:var(--sp-2); padding-right:2px;
}
.tmpl-corrupted-desktop.tt-congress .tt-congress__list .instruction-primary{ margin:var(--sp-3) 0 var(--sp-2); }

.tmpl-corrupted-desktop.tt-congress .tt-member,
.tmpl-corrupted-desktop.tt-congress .tt-bill{
    display:block; padding:var(--sp-2); color:#000; text-decoration:none;
    background:var(--crt-face); box-shadow:var(--bevel-out);
}
.tmpl-corrupted-desktop.tt-congress .tt-member:hover,
.tmpl-corrupted-desktop.tt-congress .tt-bill:hover,
.tmpl-corrupted-desktop.tt-congress .tt-member:focus-visible,
.tmpl-corrupted-desktop.tt-congress .tt-bill:focus-visible{
    box-shadow:var(--bevel-in); color:#000; text-decoration:none;
    background:var(--crt-face-2);
}
.tmpl-corrupted-desktop.tt-congress .tt-member:focus-visible,
.tmpl-corrupted-desktop.tt-congress .tt-bill:focus-visible{
    outline:2px solid var(--crt-navy-2); outline-offset:1px;
}

/* Member row: photo | name + party chip / state · chamber */
.tmpl-corrupted-desktop.tt-congress .tt-member{ display:flex; align-items:center; gap:var(--sp-2); }
.tmpl-corrupted-desktop.tt-congress .tt-member__photo{
    flex:0 0 44px; width:44px; height:56px; object-fit:cover; object-position:top;
    background:#fff; box-shadow:var(--bevel-in); padding:2px;
}
.tmpl-corrupted-desktop.tt-congress .tt-member__body{ min-width:0; flex:1 1 auto; }
.tmpl-corrupted-desktop.tt-congress .tt-member__name{
    display:flex; align-items:center; gap:6px; font-size:14px; font-weight:700; line-height:1.2;
}
.tmpl-corrupted-desktop.tt-congress .tt-member__name span{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tmpl-corrupted-desktop.tt-congress .tt-member__meta{
    font-family:"VT323",monospace; font-size:15px; color:var(--crt-dark); margin-top:2px;
}
.tmpl-corrupted-desktop.tt-congress .tt-chip{
    flex:0 0 auto; padding:0 5px; font-family:"VT323",monospace; font-size:14px; font-weight:normal;
    line-height:16px; color:#fff; box-shadow:var(--bevel-out);
}
.tmpl-corrupted-desktop.tt-congress .tt-chip--D{ background:var(--crt-navy-2); }
.tmpl-corrupted-desktop.tt-congress .tt-chip--R{ background:var(--crt-error); }
.tmpl-corrupted-desktop.tt-congress .tt-chip--I{ background:var(--crt-amber); color:#000; }

/* Bill row: code · congress · chamber ........ date / title / latest action */
.tmpl-corrupted-desktop.tt-congress .tt-bill__head{
    display:flex; justify-content:space-between; gap:var(--sp-2);
    font-family:"VT323",monospace; font-size:15px; color:var(--crt-navy-1); line-height:1.1;
}
.tmpl-corrupted-desktop.tt-congress .tt-bill__code{ font-weight:bold; letter-spacing:.5px; }
.tmpl-corrupted-desktop.tt-congress .tt-bill__date{ color:#0a7a2f; white-space:nowrap; }
.tmpl-corrupted-desktop.tt-congress .tt-bill__title{
    margin:3px 0 2px; font-size:14px; font-weight:700; line-height:1.25; color:#000;
}
.tmpl-corrupted-desktop.tt-congress .tt-bill__action{
    font-family:"VT323",monospace; font-size:14px; color:var(--crt-dark); line-height:1.15;
    display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.tmpl-corrupted-desktop.tt-congress .tt-bill__action b{ color:var(--crt-shadow); font-weight:normal; }

/* ---------- 7. Empty / error states --------------------------------------- */
.tmpl-corrupted-desktop.tt-congress .tt-empty{
    padding:var(--sp-4) var(--sp-3); text-align:center;
    font-family:"VT323",monospace; font-size:18px; color:var(--crt-dark);
    background:var(--crt-face-2); box-shadow:var(--bevel-in);
}
.tmpl-corrupted-desktop.tt-congress .tt-empty[hidden]{ display:none; }
.tmpl-corrupted-desktop.tt-congress .tt-empty.is-error{ color:var(--crt-error); }

/* ---------- 8. Ticker links ----------------------------------------------- */
.tmpl-corrupted-desktop.tt-congress .tt-taskbar .ticker_item:hover,
.tmpl-corrupted-desktop.tt-congress .tt-taskbar .ticker_item:focus{
    color:var(--vw-cyan) !important; text-shadow:var(--vw-glow-cyan); text-decoration:none;
}

/* ---------- 9. Small screens ---------------------------------------------- */
@media (max-width:575.98px){
    .tmpl-corrupted-desktop.tt-congress .tt-tally__board{ grid-template-columns:1fr; }
    .tmpl-corrupted-desktop.tt-congress .tt-hero,
    .tmpl-corrupted-desktop.tt-congress .tt-intel-window{ height:auto; min-height:300px; }
    .tmpl-corrupted-desktop.tt-congress .tt-hero__body{ height:auto; }
    .tmpl-corrupted-desktop.tt-congress .tt-tally__key{ flex-wrap:wrap; gap:var(--sp-2) var(--sp-3); }
}

/* ---------- 10. Bill lookup ERROR modal ------------------------------------ */
/* Successful lookups navigate to /Congress/Bill; this dialog only ever shows a
   status line (not-found / unreachable). Lives OUTSIDE the .tmpl-corrupted-desktop
   wrapper (7.css :target dialog, z-999, default dark-on-light body), so the theme
   tokens are redeclared locally. */
.tt-bill-modal{
    --crt-face:#c0c0c0; --crt-face-2:#d4d0c8; --crt-shadow:#808080; --crt-dark:#404040;
    --crt-light:#dfdfdf; --crt-hilite:#fff; --crt-navy-1:#000080; --crt-navy-2:#1084d0;
    --crt-amber:#ffb000; --crt-error:#aa0000;
    --bevel-out:
        inset -1px -1px 0 var(--crt-dark),  inset  1px  1px 0 var(--crt-hilite),
        inset -2px -2px 0 var(--crt-shadow),inset  2px  2px 0 var(--crt-light);
    --bevel-in:
        inset  1px  1px 0 var(--crt-dark),  inset -1px -1px 0 var(--crt-hilite),
        inset  2px  2px 0 var(--crt-shadow),inset -2px -2px 0 var(--crt-light);
    --sp-1:4px; --sp-2:8px; --sp-3:12px; --sp-4:16px;
}
.tt-bill-modal #bill-detail-body{
    max-height:70vh; overflow-y:auto; color:#000;
}
.tt-bill-modal .tt-bm__status{
    padding:var(--sp-4) var(--sp-3); text-align:center;
    font-family:"VT323",monospace; font-size:18px; color:var(--crt-dark);
}
.tt-bill-modal .tt-bm__status.is-warning{ color:#7a4b00; }
.tt-bill-modal .tt-bm__status.is-error{ color:var(--crt-error); }

