:root {
    --wh-navy: #0A1E3C;
    --wh-gold: #B39A5F;
    --wh-border: #D9D9D9;
    --pass-green: #14532d;
    --fail-red: #991b1b;
    --news-accent: #c53030;
    --serif: 'Instrument Serif', serif;
    --sans: 'Public Sans', sans-serif;
    --ease: cubic-bezier(0.23, 1, 0.32, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; border-radius: 0 !important; }
body { background: white; font-family: var(--sans); color: var(--wh-navy); overflow-x: hidden; }

/* ALERTS */
#alert-stack { position: fixed; top: 0; left: 0; width: 100%; z-index: 10000; display: flex; flex-direction: column; }
.emergency-banner { width: 100%; background: #ff0000; color: white; font-weight: 900; text-align: center; padding: 10px 0; font-size: 0.85rem; letter-spacing: 4px; animation: pulseRed 0.8s infinite alternate; text-transform: uppercase; border-bottom: 1px solid rgba(255,255,255,0.3); }
@keyframes pulseRed { from { background: #800000; } to { background: #ff0000; } }

/* HERO */
.parallax-hero { height: 60vh; width: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; background: white; text-align: center; }
.hero-title { font-family: var(--serif); font-size: clamp(4rem, 10vw, 9rem); text-transform: uppercase; line-height: 0.85; }
.hero-sub { color: var(--wh-gold); letter-spacing: 12px; font-weight: 700; text-transform: uppercase; margin-bottom: 20px; }
.drift-control { display: none; }

/* MASTER INDEX */
.master-index-wrap { background: var(--wh-navy); padding: 50px 10%; border-bottom: 5px solid var(--wh-gold); color: white; }
.master-meta { display: flex; justify-content: space-between; font-family: var(--serif); font-size: 2.8rem; margin-bottom: 20px; align-items: center; }
.lean-tag { background: var(--wh-gold); color: var(--wh-navy); padding: 4px 12px; font-size: 0.8rem; letter-spacing: 2px; font-weight: 700; }
#master-fill { height: 100%; background: var(--wh-gold); width: 0%; transition: width 1.5s var(--ease); }

/* NAV — bar removed; menu-only navigation */
.sticky-nav { display: none; }
.nav-link { display: none; }

/* CONTENT AREA */
.content-reveal { background: white; padding: 50px 5%; min-height: 100vh; }

/* GRID & CARD STYLING */
.sector-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); gap: 30px; }
.sector-card { border: 1px solid var(--wh-border); padding: 35px; background: white; }
.sector-card h3 { font-family: var(--sans); font-size: 1.5rem; margin-bottom: 10px; color: var(--wh-navy); }

/* STATUS BARS (Smooth Transitions) */
.cat-status-bar { height: 8px; background: #eee; margin: 10px 0 30px 0; }
.cat-status-fill { 
    height: 100%; 
    transition: width 0.8s var(--ease), background 0.4s ease; 
}

.metric-meta { 
    display: flex; 
    justify-content: space-between; 
    font-size: 0.85rem; 
    font-weight: 800; 
    text-transform: uppercase; 
    margin-bottom: 8px; 
}

.bar-rail { height: 10px; background: #f0f0f0; flex-grow: 1; margin: 0 15px; }
.bar-fill { 
    height: 100%; 
    transition: width 0.5s var(--ease), background 0.3s ease; 
}

/* BUTTONS */
.ctrl-btn { 
    width: 36px; 
    height: 36px; 
    background: white; 
    border: 2px solid var(--wh-gold);
    color: var(--wh-gold);
    cursor: pointer; 
    transition: all 0.2s ease;
    font-weight: 700;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ctrl-btn:hover { 
    background: var(--wh-gold); 
    color: white;
    transform: scale(1.1);
}
.ctrl-btn:active { 
    background: var(--wh-gold); 
    color: white; 
    transform: scale(0.95);
}

/* ASSEMBLY & OVERLAY */
.vote-card { 
    background: var(--wh-navy); 
    color: white; 
    padding: 60px; 
    border: 3px solid var(--wh-gold);
    display: flex;
    flex-direction: column;
    gap: 40px;
}
.bill-input { 
    background: transparent; 
    border: none; 
    border-bottom: 2px solid var(--wh-gold); 
    color: var(--wh-gold); 
    font-family: var(--serif); 
    font-size: 3rem; 
    text-align: center; 
    width: 100%; 
    outline: none;
    padding: 10px 0;
}
.vote-count { font-family: var(--serif); font-size: 6rem; color: var(--wh-gold); }
.btn-fed { 
    background: transparent; 
    border: 2px solid var(--wh-gold); 
    color: var(--wh-gold); 
    padding: 15px 30px; 
    text-transform: uppercase; 
    font-weight: 700; 
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-fed:hover {
    background: var(--wh-gold);
    color: var(--wh-navy);
    transform: translateY(-2px);
}

#certify-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(10, 30, 60, 0.98); z-index: 9999; display: none; flex-direction: column; justify-content: center; align-items: center; backdrop-filter: blur(10px); }
.stamp-ani { font-family: var(--serif); font-size: 8vw; text-transform: uppercase; border: 15px solid; padding: 20px 60px; transform: scale(5) rotate(-20deg); opacity: 0; transition: 0.6s var(--ease); }
.stamp-ani.show { transform: scale(1) rotate(-8deg); opacity: 1; }

/* NEWS TAB STYLING */
#news-root {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.news-item {
    background: rgba(6, 15, 30, 0.92);
    border: 1px solid rgba(197, 160, 89, 0.2);
    padding: 36px 40px 36px 46px;
    position: relative;
    transition: transform 0.25s var(--ease), border-color 0.2s;
}

.news-item:hover {
    transform: translateX(8px);
    border-color: rgba(197, 160, 89, 0.5);
}

.news-accent-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
}

.news-tag-badge {
    display: inline-block;
    padding: 3px 10px;
    font-family: var(--sans);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-radius: 2px;
    margin-bottom: 10px;
}

.news-headline {
    font-family: var(--serif);
    font-size: 2rem;
    color: white;
    margin-bottom: 12px;
    text-transform: uppercase;
    line-height: 1.2;
}

.news-body {
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.72);
    margin-bottom: 18px;
    font-family: var(--sans);
    font-size: 0.92rem;
}

.news-timestamp {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.38);
    font-family: var(--sans);
}

/* FORM ELEMENTS */
select, input[type="number"], input[type="text"] {
    font-family: var(--sans);
}

select:focus, input[type="number"]:focus, input[type="text"]:focus {
    outline: none;
}

select::-webkit-scrollbar {
    width: 8px;
}

select::-webkit-scrollbar-track {
    background: #f0f0f0;
}

select::-webkit-scrollbar-thumb {
    background: var(--wh-gold);
}

/* ASSEMBLY FLOOR STYLES */
.bill-effects-panel {
    border: 1px solid rgba(179, 154, 95, 0.3);
    background: rgba(255, 255, 255, 0.02);
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.bill-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.bill-section h4 {
    color: var(--wh-gold);
    font-size: 1.1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.search-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--wh-gold);
    color: var(--wh-gold);
    padding: 10px 15px;
    width: 100%;
    font-family: var(--sans);
    transition: all 0.3s ease;
}

.search-box:focus {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 10px rgba(179, 154, 95, 0.3);
}

.effect-item {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid var(--wh-gold);
    transition: all 0.2s ease;
}

.effect-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.effect-label {
    flex: 1;
    font-size: 0.95rem;
    color: white;
}

.effect-input {
    width: 60px;
    padding: 6px;
    border: 1px solid var(--wh-gold);
    background: transparent;
    color: var(--wh-gold);
    text-align: center;
    font-weight: 700;
}

.vote-section {
    display: flex;
    justify-content: space-around;
    gap: 30px;
}

.vote-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.vote-group p {
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* SELECT DROPDOWN STYLING */
select.search-box {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B39A5F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/csvg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
    padding-right: 40px !important;
}

select.search-box:hover {
    background: rgba(255, 255, 255, 0.12) !important;
}

select.search-box:focus {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

select.search-box option {
    background: var(--wh-navy);
    color: var(--wh-gold);
    padding: 10px;
}

select.search-box option:hover {
    background: rgba(179, 154, 95, 0.2);
}

/* MAP STYLES */
#map-svg {
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

#map-svg rect {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

#map-svg text {
    font-family: var(--sans);
    font-size: 8px;
}

#state-list > div {
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ── LOGIN PAGE ─────────────────────────────────────────────────────────────── */
/* Override the global border-radius: 0 !important for login elements.         */
/* Class selectors beat the * selector even with !important on both sides.     */
.login-card    { border-radius: 24px !important; }
.login-field   { border-radius: 50px !important; }
.login-btn     { border-radius: 50px !important; }
.login-icon    { border-radius: 50% !important; }

/* ── MENU FAB ────────────────────────────────────────────────────────────────── */
.menu-fab {
    position: fixed;
    top: 20px;
    right: 24px;
    z-index: 9500;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 20px;
    background: rgba(6, 8, 22, 0.72);
    border: 1px solid rgba(255,255,255,0.22);
    color: white;
    font-family: var(--sans);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    cursor: pointer;
    backdrop-filter: blur(20px) saturate(1.6);
    -webkit-backdrop-filter: blur(20px) saturate(1.6);
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    border-radius: 10px !important;
    user-select: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.1);
}
.menu-fab:hover {
    background: rgba(20, 28, 60, 0.85);
    border-color: rgba(197,160,89,0.5);
    box-shadow: 0 6px 28px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.12);
    transform: translateY(-1px);
}

.menu-fab-panel {
    position: fixed;
    top: 68px;
    right: 24px;
    z-index: 9400;
    width: 280px;
    max-height: calc(100vh - 88px);
    background: rgba(5, 8, 22, 0.82);
    border: 1px solid rgba(255,255,255,0.12);
    backdrop-filter: blur(32px) saturate(2);
    -webkit-backdrop-filter: blur(32px) saturate(2);
    box-shadow: 0 24px 64px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.04), inset 0 1px 0 rgba(255,255,255,0.08);
    border-radius: 18px !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px) scale(0.96);
    transform-origin: top right;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s linear 0.22s;
    pointer-events: none;
}
.menu-fab-panel.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s linear 0s;
    pointer-events: auto;
}

.menu-user-block {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 16px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
    background: rgba(255,255,255,0.03);
}

.menu-user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50% !important;
    background: var(--wh-gold);
    color: var(--wh-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.05rem;
    font-family: var(--sans);
    flex-shrink: 0;
    text-transform: uppercase;
    overflow: hidden;
    border: 2px solid rgba(197,160,89,0.4);
}

.menu-scroll-body {
    overflow-y: auto;
    flex: 1;
    padding: 6px 8px 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.12) transparent;
}
.menu-scroll-body::-webkit-scrollbar { width: 4px; }
.menu-scroll-body::-webkit-scrollbar-track { background: transparent; }
.menu-scroll-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }

.menu-section-label {
    color: rgba(255,255,255,0.25);
    font-size: 0.58rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-family: var(--sans);
    padding: 10px 10px 3px;
    font-weight: 700;
}
.menu-fab-panel-row {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 12px;
    color: rgba(255,255,255,0.78);
    font-size: 0.82rem;
    letter-spacing: 0.3px;
    font-family: var(--sans);
    cursor: pointer;
    transition: background 0.14s, color 0.14s;
    border-radius: 10px !important;
}
.menu-fab-panel-row:hover { background: rgba(255,255,255,0.08); color: white; }
.menu-fab-panel-row.danger { color: #ff7070; }
.menu-fab-panel-row.danger:hover { background: rgba(255,80,80,0.12); color: #ff6060; }
.menu-icon { width: 20px; text-align: center; font-size: 1rem; flex-shrink: 0; }
.menu-fab-panel-sep {
    height: 1px;
    background: rgba(255,255,255,0.07);
    margin: 4px 8px;
}

/* ── CUSTOMIZATION MODAL ───────────────────────────────────────────────────── */
#customization-modal {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: none;
    justify-content: center;
    align-items: center;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(8px);
}
#customization-modal.open { display: flex; }
.custom-card {
    background: #0a1228;
    border: 1px solid rgba(179,154,95,0.3);
    padding: 44px;
    width: 460px;
    max-width: 94vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 60px rgba(0,0,0,0.6);
    border-radius: 4px !important;
}
.custom-field-label {
    display: block;
    color: rgba(255,255,255,0.45);
    font-family: var(--sans);
    font-size: 0.68rem;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    margin-bottom: 8px;
    margin-top: 20px;
}
.custom-field-label:first-of-type { margin-top: 0; }
.custom-input {
    width: 100%;
    background: rgba(255,255,255,0.06);
    border: 1.5px solid rgba(255,255,255,0.15);
    color: white;
    padding: 13px 16px;
    font-family: var(--sans);
    font-size: 0.95rem;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
    border-radius: 0 !important;
}
.custom-input:focus { border-color: var(--wh-gold); }
.custom-textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.5;
}
.color-swatches {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 4px;
}
.color-swatch {
    width: 34px;
    height: 34px;
    border-radius: 50% !important;
    cursor: pointer;
    border: 3px solid transparent;
    transition: border-color 0.15s, transform 0.15s;
    box-sizing: border-box;
}
.color-swatch:hover { transform: scale(1.15); }
.color-swatch.selected { border-color: white; }