    *, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
    body { overflow-x: hidden; }

    :root {
      --navy-900: #0A1628;
      --navy-800: #0F2240;
      --navy-700: #143060;
      --navy-600: #1A4080;
      --navy-500: #2460B8;
      --navy-400: #4A88D4;
      --navy-300: #8AB4E8;
      --navy-100: #D4E4F7;

      --carmesi-600: #A3222E;
      --carmesi-500: #C8323F;
      --carmesi-400: #E04555;
      --carmesi-300: #F07882;
      --carmesi-100: #FDE8EA;

      --crema: #FDF8F3;
      --arena: #F5EDE4;
      --gris-400: #8E99A8;
      --gris-600: #4A5568;

      --esmeralda: #0F7B5F;
      --oro: #C49B2C;

      --font-display: 'Cormorant Garamond', 'Georgia', serif;
      --font-body: 'Figtree', system-ui, sans-serif;
      --font-mono: 'IBM Plex Mono', 'SF Mono', monospace;

      /* Typographic scale */
      --text-2xs: 0.6875rem; /* 11px */
      --text-xs: 0.75rem;    /* 12px */
      --text-sm: 0.8125rem;  /* 13px */
      --text-base: 0.9375rem;/* 15px */
      --text-lg: 1.125rem;   /* 18px */
      --text-xl: 1.25rem;    /* 20px */
      --text-2xl: 1.5rem;    /* 24px */
      --text-3xl: 1.75rem;   /* 28px */
      --text-4xl: 2.5rem;    /* 40px */
      --text-5xl: 3.25rem;   /* 52px */
    }

    body {
      font-family: var(--font-body);
      font-size: var(--text-base);
      background: var(--crema);
      color: var(--navy-900);
      line-height: 1.6;
      font-weight: 400;
      letter-spacing: -0.005em;
      -webkit-font-smoothing: antialiased;
      text-rendering: optimizeLegibility;
      font-feature-settings: 'kern' 1, 'liga' 1;
    }

    /* === TOPBAR === */
    .topbar {
      background: var(--navy-900);
      padding: 8px 24px;
      font-size: var(--text-2xs);
      color: var(--gris-400);
      display: flex;
      justify-content: flex-end;
      gap: 24px;
      letter-spacing: 0.02em;
      font-weight: 500;
    }

    .topbar a {
      color: var(--gris-400);
      text-decoration: none;
      transition: color 0.2s;
    }

    .topbar a:hover { color: white; }

    /* === HEADER === */
    .site-header {
      background: var(--navy-800);
      border-bottom: 4px solid var(--carmesi-500);
      position: sticky;
      top: 0;
      z-index: 100;
    }

    .header-inner {
      max-width: 1280px;
      margin: 0 auto;
      padding: 0 32px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      height: 72px;
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 16px;
      text-decoration: none;
    }

    .brand-shield {
      width: 44px;
      height: 44px;
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .brand-shield svg {
      width: 44px;
      height: 44px;
    }

    .brand-text {
      display: flex;
      flex-direction: column;
    }

    .brand-title {
      font-family: var(--font-display);
      font-size: 24px;
      font-weight: 600;
      color: white;
      letter-spacing: -0.01em;
      line-height: 1.05;
    }

    .brand-subtitle {
      font-family: var(--font-body);
      font-size: var(--text-2xs);
      color: var(--navy-300);
      text-transform: uppercase;
      letter-spacing: 0.2em;
      font-weight: 600;
      margin-top: 2px;
    }

    .main-nav {
      display: flex;
      align-items: center;
      gap: 4px;
    }

    .main-nav a {
      color: var(--navy-300);
      text-decoration: none;
      font-size: var(--text-sm);
      font-weight: 500;
      padding: 8px 16px;
      border-radius: 6px;
      letter-spacing: 0.01em;
      transition: all 0.2s;
    }

    .main-nav a:hover {
      color: white;
      background: rgba(255,255,255,0.06);
    }

    .main-nav a.active {
      color: white;
      background: var(--navy-600);
    }

    .brand-periodo {
      font-size: 11px;
      font-weight: 500;
      color: var(--navy-400);
      letter-spacing: 0.08em;
      margin-top: 1px;
    }

    .btn-acceso {
      background: var(--carmesi-500) !important;
      color: white !important;
      font-weight: 600 !important;
      padding: 10px 22px !important;
      border-radius: 6px !important;
      margin-left: 12px;
      transition: background 0.2s !important;
    }

    .btn-acceso:hover { background: var(--carmesi-600) !important; }

    /* === HERO EDITORIAL === */
    .hero {
      background: var(--navy-800);
      position: relative;
      overflow: visible;
    }

    .hero-pattern {
      position: absolute;
      inset: 0;
      opacity: 0.04;
      background-image: repeating-linear-gradient(
        90deg,
        white 0px, white 1px,
        transparent 1px, transparent 60px
      ),
      repeating-linear-gradient(
        0deg,
        white 0px, white 1px,
        transparent 1px, transparent 60px
      );
    }

    .hero-inner {
      max-width: 1280px;
      margin: 0 auto;
      padding: 64px 32px 56px;
      position: relative;
      display: grid;
      grid-template-columns: 1fr 380px;
      gap: 64px;
      align-items: center;
    }

    .hero-content h1 {
      font-family: var(--font-display);
      font-size: clamp(42px, 5vw, 60px);
      font-weight: 600;
      color: white;
      line-height: 1.08;
      letter-spacing: -0.02em;
      margin-bottom: 24px;
    }

    .hero-content h1 em {
      color: var(--carmesi-400);
      font-style: italic;
      font-weight: 500;
    }

    .hero-content p {
      font-size: var(--text-lg);
      font-weight: 300;
      color: var(--navy-300);
      max-width: 500px;
      line-height: 1.75;
      letter-spacing: 0.005em;
      margin-bottom: 32px;
    }

    .search-box {
      position: relative;
      max-width: 500px;
    }

    .search-box input {
      width: 100%;
      padding: 16px 20px 16px 48px;
      border: 2px solid var(--navy-600);
      border-radius: 10px;
      background: var(--navy-700);
      color: white;
      font-family: var(--font-body);
      font-size: 15px;
      outline: none;
      transition: border-color 0.2s;
    }

    .search-box input::placeholder { color: var(--gris-400); }
    .search-box input:focus { border-color: var(--navy-400); }

    .search-icon {
      position: absolute;
      left: 18px;
      top: 50%;
      transform: translateY(-50%);
      color: var(--gris-400);
      font-size: 16px;
    }

    /* Hero side card */
    .hero-highlight {
      background: linear-gradient(135deg, var(--navy-700), var(--navy-600));
      border-radius: 16px;
      padding: 32px;
      border: 1px solid rgba(255,255,255,0.08);
      position: relative;
    }

    .hero-highlight::before {
      content: 'DESTACADO';
      position: absolute;
      top: -10px;
      left: 24px;
      background: var(--carmesi-500);
      color: white;
      font-family: var(--font-body);
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.12em;
      padding: 4px 12px;
      border-radius: 4px;
    }

    .hero-highlight .hl-tag {
      display: inline-block;
      background: var(--navy-500);
      color: white;
      font-family: var(--font-mono);
      font-size: var(--text-2xs);
      font-weight: 600;
      padding: 4px 10px;
      border-radius: 4px;
      margin-bottom: 14px;
    }

    .hero-highlight h3 {
      font-family: var(--font-display);
      font-size: 22px;
      font-weight: 600;
      color: white;
      margin-bottom: 10px;
      line-height: 1.3;
      letter-spacing: -0.01em;
    }

    .hero-highlight p {
      font-size: 14px;
      font-weight: 400;
      color: var(--navy-300);
      line-height: 1.65;
      margin-bottom: 20px;
    }

    .hl-votes {
      display: flex;
      gap: 16px;
    }

    .hl-vote {
      display: flex;
      align-items: center;
      gap: 6px;
      font-family: var(--font-mono);
      font-size: var(--text-sm);
      font-weight: 500;
      color: white;
    }

    .hl-vote .dot {
      width: 10px;
      height: 10px;
      border-radius: 50%;
    }

    .hl-vote .dot.si { background: var(--esmeralda); }
    .hl-vote .dot.no { background: var(--carmesi-400); }
    .hl-vote .dot.abs { background: var(--gris-400); }

    /* === LIFECYCLE SECTION === */
    .section {
      max-width: 1280px;
      margin: 0 auto;
      padding: 48px 32px;
    }

    .section-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 32px;
    }

    .section-head h2 {
      font-family: var(--font-display);
      font-size: 32px;
      font-weight: 600;
      color: var(--navy-800);
      letter-spacing: -0.015em;
      line-height: 1.2;
    }

    .section-head h2 .accent {
      color: var(--carmesi-500);
      font-style: italic;
      font-weight: 500;
    }

    .view-toggle {
      display: flex;
      background: white;
      border-radius: 8px;
      border: 1px solid #DDD;
      overflow: hidden;
    }

    .view-toggle button {
      padding: 8px 16px;
      border: none;
      background: none;
      font-family: var(--font-body);
      font-size: 13px;
      font-weight: 600;
      color: var(--gris-600);
      cursor: pointer;
      transition: all 0.2s;
    }

    .view-toggle button.active {
      background: var(--navy-800);
      color: white;
    }

    /* Lifecycle horizontal */
    .lifecycle-card {
      background: white;
      border-radius: 14px;
      box-shadow: 0 2px 12px rgba(10,22,40,0.06);
      border: 1px solid rgba(0,0,0,0.06);
      overflow: hidden;
    }

    .lc-header {
      padding: 28px 32px;
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      border-bottom: 1px solid #EEE;
    }

    .lc-info {
      display: flex;
      gap: 16px;
      align-items: flex-start;
    }

    .lc-badge {
      background: var(--navy-800);
      color: white;
      font-family: var(--font-mono);
      font-size: var(--text-sm);
      font-weight: 600;
      padding: 8px 14px;
      border-radius: 8px;
      white-space: nowrap;
      letter-spacing: -0.02em;
    }

    .lc-title {
      font-family: var(--font-display);
      font-size: 21px;
      font-weight: 600;
      color: var(--navy-900);
      margin-bottom: 8px;
      line-height: 1.3;
      letter-spacing: -0.01em;
    }

    .lc-meta {
      display: flex;
      gap: 20px;
      font-size: var(--text-sm);
      color: var(--gris-400);
      font-weight: 400;
    }

    .lc-meta span {
      display: flex;
      align-items: center;
      gap: 5px;
    }

    .btn-seguir {
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 10px 20px;
      border: 2px solid var(--navy-400);
      border-radius: 8px;
      background: transparent;
      color: var(--navy-500);
      font-family: var(--font-body);
      font-size: 13px;
      font-weight: 700;
      cursor: pointer;
      transition: all 0.2s;
      white-space: nowrap;
    }

    .btn-seguir:hover {
      background: var(--navy-500);
      color: white;
      border-color: var(--navy-500);
    }

    /* === ATTENDANCE RANKING === */
    .attendance-layout {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 24px;
    }
    .attendance-panel {
      background: white;
      border-radius: 14px;
      box-shadow: 0 2px 12px rgba(10,22,40,0.06);
      padding: 28px;
    }
    .attendance-panel h3 {
      font-family: var(--font-heading);
      font-size: 18px;
      font-weight: 600;
      color: var(--navy-800);
      margin: 0 0 20px;
    }
    .att-subhead {
      font-family: var(--font-body);
      font-size: 12px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      padding: 8px 0 10px;
      border-bottom: 1px solid var(--gris-100);
      margin-bottom: 8px;
    }
    .att-subhead.att-best { color: var(--esmeralda); }
    .att-subhead.att-worst { color: var(--carmesi-500); margin-top: 20px; }

    .att-list { display: flex; flex-direction: column; gap: 6px; }

    .att-row {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 8px 10px;
      border-radius: 8px;
      transition: background 0.15s;
    }
    .att-row:hover { background: var(--arena); }

    .att-rank {
      width: 26px;
      height: 26px;
      border-radius: 50%;
      background: var(--navy-800);
      color: white;
      font-family: var(--font-mono);
      font-size: 11px;
      font-weight: 700;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }
    .att-rank.low { background: var(--carmesi-400); }

    .att-info {
      display: flex;
      flex-direction: column;
      min-width: 100px;
    }
    .att-name {
      font-family: var(--font-body);
      font-size: 14px;
      font-weight: 600;
      color: var(--navy-800);
    }
    .att-party {
      font-family: var(--font-body);
      font-size: 11px;
      color: var(--gris-400);
    }

    .att-bar-track {
      flex: 1;
      height: 8px;
      background: var(--gris-100);
      border-radius: 4px;
      overflow: hidden;
    }
    .att-bar-fill {
      height: 100%;
      border-radius: 4px;
      transition: width 0.5s ease;
    }
    .att-bar-fill.good { background: var(--esmeralda); }
    .att-bar-fill.bad { background: var(--carmesi-400); }

    .att-pct {
      font-family: var(--font-mono);
      font-size: 14px;
      font-weight: 700;
      color: var(--esmeralda);
      width: 40px;
      text-align: right;
      flex-shrink: 0;
    }
    .att-pct.low { color: var(--carmesi-500); }

    /* === BILLS TABLE === */
    .bills-section {
      margin-top: 48px;
    }

    .bills-table {
      background: white;
      border-radius: 14px;
      box-shadow: 0 2px 12px rgba(10,22,40,0.06);
      border: 1px solid rgba(0,0,0,0.06);
      overflow: hidden;
    }

    .bt-header {
      display: grid;
      grid-template-columns: 130px 1fr 140px 120px 100px;
      padding: 14px 28px;
      background: var(--navy-900);
      color: var(--navy-300);
      font-size: var(--text-2xs);
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.1em;
    }

    .bt-row {
      display: grid;
      grid-template-columns: 130px 1fr 140px 120px 100px;
      padding: 18px 28px;
      align-items: center;
      border-bottom: 1px solid #F0F0F0;
      transition: background 0.15s;
      cursor: pointer;
    }

    .bt-row:hover { background: var(--arena); }

    .bt-row:last-child { border-bottom: none; }

    .bt-boletin {
      font-family: var(--font-mono);
      font-weight: 600;
      font-size: var(--text-sm);
      color: var(--navy-500);
      letter-spacing: -0.02em;
    }

    .bt-titulo {
      font-size: 14px;
      color: var(--navy-900);
      line-height: 1.45;
      padding-right: 16px;
      font-weight: 400;
    }

    .bt-estado {
      font-size: var(--text-2xs);
      font-weight: 700;
      padding: 5px 12px;
      border-radius: 6px;
      text-align: center;
      width: fit-content;
      text-transform: uppercase;
      letter-spacing: 0.04em;
    }

    .bt-estado.tramite { background: rgba(196,155,44,0.1); color: var(--oro); }
    .bt-estado.aprobado { background: rgba(15,123,95,0.1); color: var(--esmeralda); }
    .bt-estado.rechazado { background: var(--carmesi-100); color: var(--carmesi-500); }

    .bt-fecha {
      font-size: var(--text-sm);
      color: var(--gris-400);
      font-variant-numeric: tabular-nums;
    }

    .bt-votes-mini {
      display: flex;
      gap: 8px;
      font-family: var(--font-mono);
      font-size: var(--text-xs);
      font-weight: 600;
    }

    .bt-votes-mini .si { color: var(--esmeralda); }
    .bt-votes-mini .no { color: var(--carmesi-500); }

    /* === LOGIN MODAL === */
    .modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(10,22,40,0.7);
      backdrop-filter: blur(8px);
      z-index: 1000;
      display: none;
      align-items: center;
      justify-content: center;
    }

    .modal-overlay.show { display: flex; }

    .modal {
      background: white;
      border-radius: 20px;
      width: 460px;
      max-width: 92%;
      overflow: hidden;
      animation: modalIn 0.35s ease;
    }

    @keyframes modalIn {
      from { opacity: 0; transform: scale(0.95) translateY(10px); }
      to { opacity: 1; transform: scale(1) translateY(0); }
    }

    .modal-top {
      background: var(--navy-800);
      padding: 40px 40px 32px;
      text-align: center;
      position: relative;
      border-bottom: 4px solid var(--carmesi-500);
    }

    .modal-top h2 {
      font-family: var(--font-display);
      font-size: 30px;
      font-weight: 600;
      color: white;
      margin-bottom: 8px;
      letter-spacing: -0.015em;
    }

    .modal-top p {
      color: var(--navy-300);
      font-size: var(--text-base);
      font-weight: 300;
    }

    .modal-close {
      position: absolute;
      top: 16px;
      right: 16px;
      width: 36px;
      height: 36px;
      border-radius: 8px;
      background: rgba(255,255,255,0.08);
      border: none;
      color: white;
      font-size: 20px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .modal-body {
      padding: 36px 40px 40px;
    }

    .input-group {
      margin-bottom: 18px;
    }

    .input-group label {
      display: block;
      font-size: 13px;
      font-weight: 600;
      color: var(--navy-800);
      margin-bottom: 8px;
    }

    .input-group input {
      width: 100%;
      padding: 14px 16px;
      border: 2px solid #E2E8F0;
      border-radius: 10px;
      font-family: var(--font-body);
      font-size: 15px;
      outline: none;
      transition: border-color 0.2s;
    }

    .input-group input:focus { border-color: var(--navy-400); }

    .btn-primary {
      width: 100%;
      padding: 14px;
      background: var(--navy-800);
      color: white;
      border: none;
      border-radius: 10px;
      font-family: var(--font-body);
      font-size: 15px;
      font-weight: 700;
      cursor: pointer;
      transition: background 0.2s;
      margin-top: 6px;
    }

    .btn-primary:hover { background: var(--navy-900); }

    .modal-alt {
      text-align: center;
      margin-top: 18px;
      font-size: 14px;
      color: var(--gris-400);
    }

    .modal-alt a {
      color: var(--carmesi-500);
      text-decoration: none;
      font-weight: 600;
    }

    /* === FOOTER === */
    .site-footer {
      background: var(--navy-900);
      margin-top: 64px;
      padding: 56px 32px 28px;
      color: var(--navy-300);
    }

    .footer-inner {
      max-width: 1280px;
      margin: 0 auto;
      display: grid;
      grid-template-columns: 2fr 1fr 1fr 1fr;
      gap: 48px;
      padding-bottom: 40px;
      border-bottom: 1px solid rgba(255,255,255,0.06);
    }

    .footer-brand-name {
      font-family: var(--font-display);
      font-size: 26px;
      font-weight: 600;
      color: white;
      margin-bottom: 14px;
      letter-spacing: -0.015em;
    }

    .footer-desc {
      font-size: 14px;
      line-height: 1.75;
      max-width: 300px;
      font-weight: 300;
    }

    .footer-col h4 {
      color: white;
      font-size: var(--text-2xs);
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.12em;
      margin-bottom: 20px;
    }

    .footer-col a {
      display: block;
      color: var(--navy-300);
      text-decoration: none;
      font-size: 14px;
      font-weight: 400;
      margin-bottom: 12px;
      transition: color 0.2s;
    }

    .footer-col a:hover { color: white; }

    .footer-bottom {
      max-width: 1280px;
      margin: 0 auto;
      padding-top: 24px;
      font-size: var(--text-xs);
      display: flex;
      justify-content: space-between;
      color: var(--gris-400);
      font-weight: 400;
      letter-spacing: 0.01em;
    }

    /* === MOBILE NAV === */
    .mobile-nav-btn {
      display: none;
      background: none;
      border: none;
      color: white;
      font-size: 24px;
      cursor: pointer;
      padding: 8px;
      line-height: 1;
    }

    /* === TOOLTIPS === */
    .tooltip-wrap {
      position: relative;
      display: inline-block;
      cursor: help;
    }

    .tooltip-icon {
      font-size: 14px;
      color: var(--gris-400);
      opacity: 0.6;
      transition: opacity 0.2s;
    }

    .tooltip-wrap:hover .tooltip-icon { opacity: 1; }

    .tooltip-text {
      visibility: hidden;
      opacity: 0;
      position: absolute;
      bottom: calc(100% + 8px);
      left: 50%;
      transform: translateX(-50%);
      background: var(--navy-900);
      color: white;
      font-size: 12px;
      font-weight: 400;
      line-height: 1.5;
      padding: 10px 14px;
      border-radius: 8px;
      width: 240px;
      text-align: left;
      text-transform: none;
      letter-spacing: normal;
      box-shadow: 0 4px 16px rgba(0,0,0,0.3);
      transition: opacity 0.2s, visibility 0.2s;
      z-index: 10;
      pointer-events: none;
    }

    .tooltip-text::after {
      content: '';
      position: absolute;
      top: 100%;
      left: 50%;
      transform: translateX(-50%);
      border: 6px solid transparent;
      border-top-color: var(--navy-900);
    }

    .tooltip-wrap:hover .tooltip-text {
      visibility: visible;
      opacity: 1;
    }

    /* Stats bar for alt-c (4-column variant) */
    .stats-bar-c {
      max-width: 1200px;
      margin: 0 auto;
      padding: 24px;
      grid-template-columns: repeat(4, 1fr);
      overflow: hidden;
    }

    @media (max-width: 900px) {
      /* Header & Nav */
      .mobile-nav-btn { display: block; }
      .topbar { display: none; }
      .main-nav {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--navy-800);
        flex-direction: column;
        padding: 12px 24px 20px;
        gap: 2px;
        border-top: 1px solid rgba(255,255,255,0.08);
        box-shadow: 0 16px 32px rgba(0,0,0,0.25);
        z-index: 99;
      }
      .main-nav.open { display: flex; }
      .main-nav a {
        padding: 14px 8px;
        font-size: 16px;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        border-radius: 0;
      }
      .main-nav a.active { background: none; }
      .btn-acceso {
        margin-left: 0 !important;
        margin-top: 8px;
        text-align: center;
      }
      .header-inner { padding: 0 20px; }

      /* Hero */
      .hero-inner {
        grid-template-columns: 1fr;
        padding: 40px 20px 36px;
        gap: 0;
      }
      .hero-highlight { display: none; }
      .hero-content h1 { font-size: 34px; }
      .hero-content p { font-size: 16px; }
      .search-box { max-width: 100%; }

      /* Sections */
      .section { padding: 32px 20px; }
      .section-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        margin-bottom: 24px;
      }
      .section-head h2 { font-size: 26px; }

      /* Lifecycle */
      .lc-header {
        flex-direction: column;
        gap: 16px;
        padding: 22px 20px;
      }
      .lc-info { flex-direction: column; gap: 10px; }
      .lc-meta { flex-direction: column; gap: 6px; }
      /* Collapsible lists on mobile */
      .diputados-grid.collapsible .diputado-card:nth-child(n+5) { display: none; }
      .diputados-grid.collapsible.expanded .diputado-card:nth-child(n+5) { display: flex; }

      .expand-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100%;
        padding: 14px;
        margin-top: 8px;
        border: 2px dashed rgba(0,0,0,0.1);
        border-radius: 10px;
        background: none;
        color: var(--navy-500);
        font-family: var(--font-body);
        font-size: var(--text-sm);
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s;
      }

      .expand-toggle:hover {
        border-color: var(--navy-400);
        background: rgba(36,96,184,0.04);
      }

      .expand-toggle .arrow {
        transition: transform 0.3s;
        font-size: 12px;
      }

      .expanded + .expand-toggle .arrow,
      .expand-toggle.is-expanded .arrow {
        transform: rotate(180deg);
      }

      /* Table */
      .bt-header { display: none; }
      .bt-row {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 18px 20px;
      }
      .bt-boletin { font-size: 14px; }
      .bt-titulo { padding-right: 0; }
      .bt-estado { margin-top: 4px; }

      /* Footer */
      .footer-inner { grid-template-columns: 1fr; gap: 28px; }
      .site-footer { padding: 40px 20px 24px; }
      .footer-bottom { flex-direction: column; gap: 8px; }

      /* Modal */
      .modal { width: 100%; max-width: 100%; border-radius: 20px 20px 0 0; }
      .modal-top { padding: 28px 24px 24px; }
      .modal-top h2 { font-size: 24px; }
      .modal-body { padding: 28px 24px 32px; }

      /* Votaciones & stats bar */
      .votaciones-stats { grid-template-columns: 1fr; }
      .stats-bar-c { grid-template-columns: repeat(2, 1fr); padding: 16px 20px; }
      .vt-header { display: none; }
      .vt-row { grid-template-columns: 1fr; gap: 6px; padding: 16px 20px; }

      /* Diputados */
      .diputados-grid { grid-template-columns: 1fr; }
      .diputados-search { flex-direction: column; }
      .diputados-search input { width: 100%; }

      /* Estadisticas */
      .stats-cards { grid-template-columns: repeat(2, 1fr); }
      .stats-grid { grid-template-columns: 1fr; }

      /* Attendance */
      .attendance-layout { grid-template-columns: 1fr; }
      .attendance-panel { padding: 20px; }

      /* Dashboard */
      .dashboard-grid { grid-template-columns: 1fr; }
      .dashboard-welcome { padding: 24px 20px; }
      .dashboard-welcome h2 { font-size: var(--text-2xl); }
    }

    /* === PAGE SECTIONS === */
    .page-section { display: none; }
    .page-section.active { display: block; max-width: 1100px; margin: 0 auto; }

    /* === VOTACIONES SECTION === */
    .votaciones-stats {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
      gap: 16px;
      margin-bottom: 28px;
    }

    .votaciones-stat-card {
      background: white;
      border-radius: 12px;
      padding: 20px 24px;
      box-shadow: 0 2px 12px rgba(10,22,40,0.06);
      border: 1px solid rgba(0,0,0,0.06);
      text-align: center;
    }

    .votaciones-stat-card .stat-num {
      font-family: var(--font-mono);
      font-size: var(--text-3xl);
      font-weight: 700;
      color: var(--navy-800);
      letter-spacing: -0.03em;
      display: block;
    }

    .votaciones-stat-card .stat-label {
      font-size: var(--text-sm);
      color: var(--gris-600);
      font-weight: 500;
      margin-top: 4px;
    }

    .votaciones-filters {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 20px;
      flex-wrap: wrap;
    }

    .votaciones-filters .date-range {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: var(--text-sm);
      color: var(--gris-600);
    }

    .votaciones-filters .date-range input {
      padding: 6px 10px;
      border: 2px solid #E2E8F0;
      border-radius: 8px;
      font-family: var(--font-body);
      font-size: var(--text-sm);
      outline: none;
    }

    .votaciones-table {
      background: white;
      border-radius: 14px;
      box-shadow: 0 2px 12px rgba(10,22,40,0.06);
      border: 1px solid rgba(0,0,0,0.06);
      overflow: hidden;
    }

    .vt-header {
      display: grid;
      grid-template-columns: 100px 1fr 110px 80px 80px 60px;
      padding: 14px 28px;
      background: var(--navy-900);
      color: var(--navy-300);
      font-size: var(--text-2xs);
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.1em;
    }

    .vt-row {
      display: grid;
      grid-template-columns: 100px 1fr 110px 80px 80px 60px;
      padding: 16px 28px;
      align-items: center;
      border-bottom: 1px solid #F0F0F0;
      transition: background 0.15s;
      cursor: pointer;
    }

    .vt-row:hover { background: var(--arena); }
    .vt-row:last-child { border-bottom: none; }

    .vt-fecha {
      font-size: var(--text-sm);
      color: var(--gris-600);
      font-variant-numeric: tabular-nums;
    }

    .vt-proyecto {
      font-size: 14px;
      color: var(--navy-900);
      line-height: 1.45;
      padding-right: 16px;
    }

    .vt-resultado {
      font-size: var(--text-2xs);
      font-weight: 700;
      padding: 5px 12px;
      border-radius: 6px;
      text-align: center;
      width: fit-content;
      text-transform: uppercase;
      letter-spacing: 0.04em;
    }

    .vt-resultado.aprobada { background: rgba(15,123,95,0.1); color: var(--esmeralda); }
    .vt-resultado.rechazada { background: var(--carmesi-100); color: var(--carmesi-500); }

    .vt-num {
      font-family: var(--font-mono);
      font-size: var(--text-sm);
      font-weight: 600;
      text-align: center;
    }

    .vt-num.favor { color: var(--esmeralda); }
    .vt-num.contra { color: var(--carmesi-500); }
    .vt-num.abst { color: var(--gris-400); }

    /* === DIPUTADOS SECTION === */
    .diputados-search {
      display: flex;
      gap: 16px;
      align-items: center;
      margin-bottom: 24px;
      flex-wrap: wrap;
    }

    .diputados-search input {
      flex: 1;
      min-width: 200px;
      padding: 12px 16px 12px 40px;
      border: 2px solid #E2E8F0;
      border-radius: 10px;
      font-family: var(--font-body);
      font-size: 14px;
      outline: none;
      transition: border-color 0.2s;
      background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%238E99A8'%3E%3Ccircle cx='8.5' cy='8.5' r='5.5' stroke='%238E99A8' stroke-width='2' fill='none'/%3E%3Cline x1='12.5' y1='12.5' x2='17' y2='17' stroke='%238E99A8' stroke-width='2'/%3E%3C/svg%3E") 14px center / 16px no-repeat;
    }

    .diputados-search input:focus { border-color: var(--navy-400); }

    .party-distribution {
      background: white;
      border-radius: 12px;
      padding: 20px 24px;
      box-shadow: 0 2px 12px rgba(10,22,40,0.06);
      border: 1px solid rgba(0,0,0,0.06);
      margin-bottom: 28px;
    }

    .party-distribution h4 {
      font-family: var(--font-display);
      font-size: var(--text-lg);
      font-weight: 600;
      color: var(--navy-800);
      margin-bottom: 12px;
    }

    .party-bar {
      display: flex;
      height: 28px;
      border-radius: 6px;
      overflow: hidden;
      margin-bottom: 12px;
    }

    .party-bar span {
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 10px;
      font-weight: 700;
      color: white;
      letter-spacing: 0.02em;
      white-space: nowrap;
      overflow: hidden;
    }

    .party-legend {
      display: flex;
      flex-wrap: wrap;
      gap: 12px;
      font-size: var(--text-xs);
      color: var(--gris-600);
    }

    .party-legend span {
      display: flex;
      align-items: center;
      gap: 5px;
    }

    .party-legend .dot {
      width: 10px;
      height: 10px;
      border-radius: 3px;
      flex-shrink: 0;
    }

    .diputados-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
      gap: 16px;
    }

    .diputado-card {
      background: white;
      border-radius: 14px;
      padding: 24px;
      box-shadow: 0 2px 12px rgba(10,22,40,0.06);
      border: 1px solid rgba(0,0,0,0.06);
      display: flex;
      gap: 16px;
      transition: box-shadow 0.2s, transform 0.2s;
    }

    .diputado-card:hover {
      box-shadow: 0 6px 24px rgba(10,22,40,0.1);
      transform: translateY(-2px);
    }

    .dc-avatar {
      width: 56px;
      height: 56px;
      border-radius: 14px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 700;
      font-size: 18px;
      color: white;
      flex-shrink: 0;
    }

    .dc-body {
      flex: 1;
      min-width: 0;
    }

    .dc-name {
      font-family: var(--font-display);
      font-size: var(--text-lg);
      font-weight: 600;
      color: var(--navy-900);
      letter-spacing: -0.01em;
      margin-bottom: 2px;
    }

    .dc-party {
      font-size: var(--text-sm);
      color: var(--gris-600);
      margin-bottom: 8px;
    }

    .dc-stats {
      display: flex;
      gap: 16px;
      margin-bottom: 8px;
    }

    .dc-stat {
      font-size: var(--text-xs);
      color: var(--gris-400);
    }

    .dc-stat strong {
      font-family: var(--font-mono);
      font-weight: 700;
      color: var(--navy-800);
    }

    .dc-votes-summary {
      font-size: var(--text-xs);
      color: var(--gris-600);
      margin-bottom: 10px;
    }

    .dc-link {
      font-size: var(--text-sm);
      color: var(--carmesi-500);
      text-decoration: none;
      font-weight: 600;
    }

    .dc-link:hover { text-decoration: underline; }

    /* === ESTADISTICAS SECTION === */
    .stats-cards {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 16px;
      margin-bottom: 36px;
    }

    .stat-card {
      background: white;
      border-radius: 14px;
      padding: 24px;
      box-shadow: 0 2px 12px rgba(10,22,40,0.06);
      border: 1px solid rgba(0,0,0,0.06);
      text-align: center;
    }

    .stat-card .sc-icon {
      font-size: 28px;
      margin-bottom: 8px;
      display: block;
    }

    .stat-card .sc-number {
      font-family: var(--font-mono);
      font-size: var(--text-3xl);
      font-weight: 700;
      color: var(--navy-800);
      letter-spacing: -0.03em;
      display: block;
    }

    .stat-card .sc-label {
      font-size: var(--text-sm);
      color: var(--gris-600);
      font-weight: 500;
      margin-top: 4px;
    }

    .stats-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 24px;
      margin-bottom: 32px;
    }

    .stats-panel {
      background: white;
      border-radius: 14px;
      padding: 28px;
      box-shadow: 0 2px 12px rgba(10,22,40,0.06);
      border: 1px solid rgba(0,0,0,0.06);
    }

    .stats-panel h3 {
      font-family: var(--font-display);
      font-size: var(--text-xl);
      font-weight: 600;
      color: var(--navy-800);
      margin-bottom: 20px;
      letter-spacing: -0.01em;
    }

    /* CSS-only bar chart */
    .bar-chart {
      display: flex;
      align-items: flex-end;
      gap: 16px;
      height: 180px;
      padding-top: 20px;
      border-bottom: 2px solid #E2E8F0;
    }

    .bar-col {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 8px;
      height: 100%;
      justify-content: flex-end;
    }

    .bar-col .bar {
      width: 100%;
      max-width: 48px;
      border-radius: 6px 6px 0 0;
      background: var(--navy-500);
      transition: height 0.5s ease;
      position: relative;
    }

    .bar-col .bar::after {
      content: attr(data-value);
      position: absolute;
      top: -22px;
      left: 50%;
      transform: translateX(-50%);
      font-family: var(--font-mono);
      font-size: var(--text-xs);
      font-weight: 700;
      color: var(--navy-800);
    }

    .bar-col .bar-label {
      font-size: var(--text-xs);
      color: var(--gris-600);
      font-weight: 500;
      padding-top: 8px;
    }

    /* Party voting alignment */
    .party-alignment-row {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 10px 0;
      border-bottom: 1px solid #F0F0F0;
    }

    .party-alignment-row:last-child { border-bottom: none; }

    .pa-name {
      width: 60px;
      font-family: var(--font-mono);
      font-size: var(--text-sm);
      font-weight: 700;
      color: var(--navy-800);
      flex-shrink: 0;
    }

    .pa-bar-wrap {
      flex: 1;
      height: 20px;
      border-radius: 4px;
      overflow: hidden;
      display: flex;
      background: #E2E8F0;
    }

    .pa-bar-favor {
      background: var(--esmeralda);
      height: 100%;
      transition: width 0.5s ease;
    }

    .pa-bar-contra {
      background: var(--carmesi-400);
      height: 100%;
      transition: width 0.5s ease;
    }

    .pa-pct {
      width: 48px;
      text-align: right;
      font-family: var(--font-mono);
      font-size: var(--text-sm);
      font-weight: 600;
      color: var(--esmeralda);
      flex-shrink: 0;
    }

    /* Topics list */
    .topics-list {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
    }

    .topic-tag {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 8px 14px;
      border-radius: 100px;
      background: var(--arena);
      font-size: var(--text-sm);
      font-weight: 500;
      color: var(--navy-800);
      border: 1px solid rgba(0,0,0,0.06);
    }

    .topic-tag .count {
      font-family: var(--font-mono);
      font-size: var(--text-xs);
      font-weight: 700;
      background: var(--navy-800);
      color: white;
      padding: 2px 8px;
      border-radius: 100px;
    }

    /* Pie chart via conic-gradient */
    .pie-chart {
      width: 160px;
      height: 160px;
      border-radius: 50%;
      margin: 0 auto 20px;
    }

    /* === DASHBOARD SECTION === */
    .dashboard-welcome {
      background: linear-gradient(135deg, var(--navy-800), var(--navy-700));
      border-radius: 16px;
      padding: 32px;
      color: white;
      margin-bottom: 28px;
      position: relative;
      overflow: hidden;
    }

    .dashboard-welcome::after {
      content: '';
      position: absolute;
      right: -40px;
      top: -40px;
      width: 200px;
      height: 200px;
      border-radius: 50%;
      background: rgba(255,255,255,0.03);
    }

    .dashboard-welcome h2 {
      font-family: var(--font-display);
      font-size: var(--text-3xl);
      font-weight: 600;
      margin-bottom: 8px;
    }

    .dashboard-welcome p {
      color: var(--navy-300);
      font-size: var(--text-base);
      font-weight: 300;
    }

    .dashboard-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 24px;
    }

    .dashboard-panel {
      background: white;
      border-radius: 14px;
      padding: 28px;
      box-shadow: 0 2px 12px rgba(10,22,40,0.06);
      border: 1px solid rgba(0,0,0,0.06);
    }

    .dashboard-panel h3 {
      font-family: var(--font-display);
      font-size: var(--text-xl);
      font-weight: 600;
      color: var(--navy-800);
      margin-bottom: 18px;
      letter-spacing: -0.01em;
    }

    .followed-bill {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 14px 0;
      border-bottom: 1px solid #F0F0F0;
    }

    .followed-bill:last-child { border-bottom: none; }

    .fb-badge {
      font-family: var(--font-mono);
      font-size: var(--text-xs);
      font-weight: 600;
      color: var(--navy-500);
      background: var(--navy-100);
      padding: 4px 10px;
      border-radius: 6px;
      white-space: nowrap;
    }

    .fb-title {
      flex: 1;
      font-size: 14px;
      color: var(--navy-900);
      line-height: 1.4;
    }

    .fb-status {
      font-size: var(--text-2xs);
      font-weight: 700;
      padding: 4px 10px;
      border-radius: 6px;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      white-space: nowrap;
    }

    .activity-item {
      display: flex;
      gap: 12px;
      padding: 12px 0;
      border-bottom: 1px solid #F0F0F0;
    }

    .activity-item:last-child { border-bottom: none; }

    .activity-dot {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      flex-shrink: 0;
      margin-top: 5px;
    }

    .activity-dot.vote { background: var(--esmeralda); }
    .activity-dot.update { background: var(--navy-500); }
    .activity-dot.alert { background: var(--oro); }

    .activity-text {
      font-size: var(--text-sm);
      color: var(--navy-900);
      line-height: 1.5;
    }

    .activity-text .time {
      display: block;
      font-size: var(--text-xs);
      color: var(--gris-400);
      margin-top: 2px;
    }

    .notif-settings {
      margin-top: 20px;
      padding-top: 18px;
      border-top: 1px solid #F0F0F0;
    }

    .notif-settings h4 {
      font-size: var(--text-sm);
      font-weight: 700;
      color: var(--navy-800);
      margin-bottom: 12px;
      text-transform: uppercase;
      letter-spacing: 0.06em;
    }

    .notif-toggle {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 8px 0;
      font-size: var(--text-sm);
      color: var(--gris-600);
    }

    .toggle-switch {
      width: 40px;
      height: 22px;
      border-radius: 11px;
      background: #E2E8F0;
      position: relative;
      cursor: pointer;
      transition: background 0.2s;
    }

    .toggle-switch.on { background: var(--esmeralda); }

    .toggle-switch::after {
      content: '';
      position: absolute;
      width: 18px;
      height: 18px;
      border-radius: 50%;
      background: white;
      top: 2px;
      left: 2px;
      transition: transform 0.2s;
      box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    }

    .toggle-switch.on::after { transform: translateX(18px); }

    /* === REGISTER MODAL === */
    .checkbox-group {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      margin-bottom: 18px;
      font-size: var(--text-sm);
      color: var(--gris-600);
      line-height: 1.5;
    }

    .checkbox-group input[type="checkbox"] {
      margin-top: 3px;
      flex-shrink: 0;
    }

    .checkbox-group a {
      color: var(--carmesi-500);
      text-decoration: none;
      font-weight: 600;
    }

    /* === BILLS CARDS VIEW === */
    .bills-cards-view {
      display: none;
      grid-template-columns: repeat(3, 1fr);
      gap: 20px;
    }
    .bills-cards-view.active { display: grid; }
    .bill-card {
      background: white;
      border-radius: 14px;
      padding: 24px;
      box-shadow: 0 2px 12px rgba(10,22,40,0.06);
      border: 1px solid rgba(0,0,0,0.06);
      transition: box-shadow 0.2s, transform 0.2s;
      cursor: pointer;
    }
    .bill-card:hover {
      box-shadow: 0 6px 24px rgba(10,22,40,0.1);
      transform: translateY(-2px);
    }
    .bill-card .bc-boletin {
      font-family: var(--font-mono);
      font-size: var(--text-sm);
      font-weight: 600;
      color: var(--navy-500);
      margin-bottom: 8px;
    }
    .bill-card .bc-title {
      font-family: var(--font-display);
      font-size: var(--text-lg);
      font-weight: 600;
      color: var(--navy-900);
      margin-bottom: 12px;
      line-height: 1.3;
    }
    .bill-card .bc-meta {
      display: flex;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
    }

    .bill-card .bc-desc {
      font-size: var(--text-sm);
      color: var(--gris-400);
      line-height: 1.6;
      margin-bottom: 12px;
    }


    /* === BILL DETAIL PANEL === */
    .bt-detail {
      display: none;
      padding: 20px 28px 24px;
      background: var(--arena);
      border-bottom: 1px solid #E2E8F0;
      animation: slideDown 0.25s ease;
    }
    .bt-detail.open { display: block; }
    @keyframes slideDown {
      from { opacity: 0; max-height: 0; }
      to { opacity: 1; max-height: 400px; }
    }
    .bt-detail h4 {
      font-family: var(--font-display);
      font-size: var(--text-lg);
      font-weight: 600;
      color: var(--navy-800);
      margin-bottom: 10px;
    }
    .bt-detail p {
      font-size: var(--text-sm);
      color: var(--gris-600);
      line-height: 1.65;
      margin-bottom: 8px;
    }
    .bt-detail .detail-votes-bar {
      display: flex;
      height: 10px;
      border-radius: 5px;
      overflow: hidden;
      margin: 10px 0;
      max-width: 200px;
    }
    .bt-detail .detail-votes-bar .bar-si { background: var(--esmeralda); }
    .bt-detail .detail-votes-bar .bar-no { background: var(--carmesi-400); }
    .bt-detail .close-detail {
      font-size: var(--text-sm);
      color: var(--carmesi-500);
      cursor: pointer;
      font-weight: 600;
      text-decoration: none;
      display: inline-block;
      margin-top: 8px;
    }
    .bt-detail .close-detail:hover { text-decoration: underline; }

    /* === SENATOR PROFILE MODAL === */
    .senator-modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(10,22,40,0.7);
      backdrop-filter: blur(8px);
      z-index: 1000;
      display: none;
      align-items: center;
      justify-content: center;
    }
    .senator-modal-overlay.show { display: flex; }
    .senator-modal {
      background: white;
      border-radius: 20px;
      width: 480px;
      max-width: 92%;
      overflow: hidden;
      animation: modalIn 0.35s ease;
    }
    .senator-modal .sm-top {
      background: var(--navy-800);
      padding: 32px 32px 28px;
      text-align: center;
      border-bottom: 4px solid var(--carmesi-500);
    }
    .senator-modal .sm-avatar {
      width: 72px;
      height: 72px;
      border-radius: 50%;
      background: var(--navy-500);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 24px;
      font-weight: 700;
      color: white;
      margin: 0 auto 14px;
    }
    .senator-modal .sm-name {
      font-family: var(--font-display);
      font-size: var(--text-2xl);
      font-weight: 600;
      color: white;
      margin-bottom: 4px;
    }
    .senator-modal .sm-party {
      color: var(--navy-300);
      font-size: var(--text-sm);
    }
    .senator-modal .sm-body {
      padding: 28px 32px 32px;
    }
    .senator-modal .sm-stats-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 16px;
      margin-bottom: 24px;
    }
    .senator-modal .sm-stat {
      text-align: center;
      padding: 14px;
      background: var(--arena);
      border-radius: 10px;
    }
    .senator-modal .sm-stat .sm-stat-num {
      font-family: var(--font-mono);
      font-size: var(--text-xl);
      font-weight: 700;
      color: var(--navy-800);
      display: block;
    }
    .senator-modal .sm-stat .sm-stat-label {
      font-size: var(--text-xs);
      color: var(--gris-600);
      margin-top: 2px;
    }
    .senator-modal .sm-close-btn {
      width: 100%;
      padding: 12px;
      background: var(--navy-800);
      color: white;
      border: none;
      border-radius: 10px;
      font-family: var(--font-body);
      font-size: 14px;
      font-weight: 700;
      cursor: pointer;
      transition: background 0.2s;
    }
    .senator-modal .sm-close-btn:hover { background: var(--navy-900); }

    /* === INFO MODAL === */
    .info-modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(10,22,40,0.7);
      backdrop-filter: blur(8px);
      z-index: 1001;
      display: none;
      align-items: center;
      justify-content: center;
    }
    .info-modal-overlay.show { display: flex; }
    .info-modal {
      background: white;
      border-radius: 16px;
      width: 400px;
      max-width: 90%;
      padding: 40px;
      text-align: center;
      animation: modalIn 0.35s ease;
    }
    .info-modal .info-icon {
      font-size: 40px;
      margin-bottom: 16px;
      display: block;
    }
    .info-modal h3 {
      font-family: var(--font-display);
      font-size: var(--text-2xl);
      font-weight: 600;
      color: var(--navy-800);
      margin-bottom: 10px;
    }
    .info-modal p {
      font-size: var(--text-base);
      color: var(--gris-600);
      margin-bottom: 24px;
    }
    .info-modal button {
      padding: 10px 32px;
      background: var(--navy-800);
      color: white;
      border: none;
      border-radius: 8px;
      font-family: var(--font-body);
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
    }
    .info-modal button:hover { background: var(--navy-900); }

    /* === TOAST === */
    .toast-container {
      position: fixed;
      bottom: 32px;
      right: 32px;
      z-index: 2000;
      display: flex;
      flex-direction: column;
      gap: 8px;
      pointer-events: none;
    }
    .toast {
      background: var(--navy-800);
      color: white;
      padding: 14px 24px;
      border-radius: 10px;
      font-size: var(--text-sm);
      font-weight: 500;
      box-shadow: 0 8px 24px rgba(10,22,40,0.2);
      animation: toastIn 0.3s ease, toastOut 0.3s ease 1.7s forwards;
      pointer-events: auto;
    }
    @keyframes toastIn {
      from { opacity: 0; transform: translateY(20px); }
      to { opacity: 1; transform: translateY(0); }
    }
    @keyframes toastOut {
      from { opacity: 1; transform: translateY(0); }
      to { opacity: 0; transform: translateY(20px); }
    }

    /* === BAR CHART TOOLTIP === */
    .bar-col .bar {
      cursor: pointer;
      position: relative;
    }
    .bar-tooltip {
      position: absolute;
      top: -36px;
      left: 50%;
      transform: translateX(-50%);
      background: var(--navy-900);
      color: white;
      font-family: var(--font-mono);
      font-size: var(--text-xs);
      font-weight: 700;
      padding: 4px 10px;
      border-radius: 6px;
      white-space: nowrap;
      pointer-events: none;
      opacity: 0;
      transition: opacity 0.2s;
    }
    .bar-tooltip::after {
      content: '';
      position: absolute;
      top: 100%;
      left: 50%;
      transform: translateX(-50%);
      border: 4px solid transparent;
      border-top-color: var(--navy-900);
    }
    .bar-col .bar:hover .bar-tooltip { opacity: 1; }

    /* === TOPIC TAG INTERACTIVE === */
    .topic-tag {
      cursor: pointer;
      transition: all 0.2s;
    }
    .topic-tag:hover {
      background: var(--navy-100);
      border-color: var(--navy-400);
    }
    .topic-tag.highlighted {
      background: var(--navy-800);
      color: white;
      border-color: var(--navy-800);
    }
    .topic-tag.highlighted .count {
      background: var(--carmesi-500);
    }

    /* Stalled Projects */
    .stalled-section { margin-top: 40px; }
    .stalled-header { margin-bottom: 24px; }
    .stalled-header h3 { font-family: var(--font-display); font-size: 24px; font-weight: 600; color: var(--navy-800); }
    .stalled-header h3 .accent { color: var(--carmesi-500); font-style: italic; }

    .stalled-stats { display: flex; gap: 14px; margin-bottom: 24px; }
    .stalled-stat { flex: 1; background: var(--carmesi-100); border-radius: 10px; padding: 18px; text-align: center; border: 1px solid rgba(200,50,63,0.1); }
    .stalled-stat .ss-num { font-family: var(--font-mono); font-size: 24px; font-weight: 700; color: var(--carmesi-500); }
    .stalled-stat .ss-label { font-size: var(--text-xs); color: var(--gris-600); font-weight: 600; margin-top: 4px; }

    .stalled-bars { margin-bottom: 24px; }
    .stalled-bar-row { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
    .stalled-bar-label { width: 70px; font-size: var(--text-sm); font-weight: 600; color: var(--navy-800); text-align: right; flex-shrink: 0; }
    .stalled-bar-track { flex: 1; height: 28px; background: var(--arena); border-radius: 6px; overflow: hidden; }
    .stalled-bar-fill { height: 100%; border-radius: 6px; display: flex; align-items: center; padding-left: 10px; font-size: 11px; font-weight: 700; color: white; }
    .stalled-bar-fill.y1 { background: var(--oro); }
    .stalled-bar-fill.y2 { background: #E88D2A; }
    .stalled-bar-fill.y3 { background: var(--carmesi-500); }
    .stalled-bar-fill.y5 { background: var(--carmesi-600); }
    .stalled-bar-count { width: 70px; font-family: var(--font-mono); font-size: var(--text-sm); font-weight: 600; color: var(--navy-800); flex-shrink: 0; }

    .stalled-examples { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
    .stalled-example { background: white; border-radius: 10px; border: 1px solid rgba(0,0,0,0.06); border-left: 4px solid var(--carmesi-500); padding: 16px 18px; }
    .stalled-example .se-bol { font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 600; color: var(--navy-500); margin-bottom: 4px; }
    .stalled-example .se-title { font-size: 14px; font-weight: 500; color: var(--navy-900); margin-bottom: 6px; line-height: 1.35; }
    .stalled-example .se-meta { font-size: var(--text-xs); color: var(--gris-400); }
    .stalled-example .se-badge { display: inline-block; background: var(--carmesi-100); color: var(--carmesi-500); font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 4px; margin-top: 6px; }

    /* Activity Ranking */
    .ranking-section { margin-top: 40px; }
    .ranking-header { margin-bottom: 24px; }
    .ranking-header h3 { font-family: var(--font-display); font-size: 24px; font-weight: 600; color: var(--navy-800); }
    .ranking-header h3 .accent { color: var(--carmesi-500); font-style: italic; }

    .ranking-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 0; background: white; border-radius: 14px; box-shadow: 0 2px 12px rgba(10,22,40,0.06); border: 1px solid rgba(0,0,0,0.06); overflow: hidden; }
    .ranking-panel { padding: 28px; }
    .ranking-panel.top { background: var(--navy-800); color: white; }
    .ranking-panel h4 { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 600; margin-bottom: 20px; }
    .ranking-panel.top h4 { color: white; }
    .ranking-panel.bottom h4 { color: var(--navy-800); }

    .rank-row { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
    .rank-num { font-family: var(--font-mono); font-size: var(--text-sm); font-weight: 700; width: 20px; text-align: right; flex-shrink: 0; }
    .ranking-panel.top .rank-num { color: var(--navy-300); }
    .ranking-panel.bottom .rank-num { color: var(--gris-400); }
    .rank-details { flex: 1; min-width: 0; }
    .rank-name { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
    .ranking-panel.top .rank-name { color: white; }
    .ranking-panel.bottom .rank-name { color: var(--navy-900); }
    .rank-party { font-size: var(--text-xs); margin-bottom: 6px; }
    .ranking-panel.top .rank-party { color: var(--navy-300); }
    .ranking-panel.bottom .rank-party { color: var(--gris-400); }
    .rank-bar { height: 5px; background: rgba(255,255,255,0.1); border-radius: 3px; }
    .ranking-panel.bottom .rank-bar { background: var(--arena); }
    .rank-bar-inner { height: 100%; border-radius: 3px; }
    .rank-bar-inner.green { background: var(--esmeralda); }
    .rank-bar-inner.red { background: var(--carmesi-400); }
    .rank-total { font-family: var(--font-mono); font-size: var(--text-sm); font-weight: 700; flex-shrink: 0; width: 30px; text-align: right; }
    .ranking-panel.top .rank-total { color: var(--esmeralda); }
    .ranking-panel.bottom .rank-total { color: var(--carmesi-400); }

    @media (max-width: 900px) {
      .bills-cards-view { grid-template-columns: 1fr; }
      .senator-modal .sm-stats-grid { grid-template-columns: 1fr; }
      .toast-container { bottom: 16px; right: 16px; left: 16px; }
      .stalled-stats { flex-direction: column; }
      .stalled-examples { grid-template-columns: 1fr; }
      .ranking-layout { grid-template-columns: 1fr; }
    }

    @media (max-width: 480px) {
      .hero-content h1 { font-size: 28px; }
      .brand-title { font-size: 20px; }
      .section-head h2 { font-size: 22px; }

      .stats-cards { grid-template-columns: 1fr; }
      .stats-bar-c { grid-template-columns: 1fr; }
      .bar-chart { height: 140px; gap: 10px; }
      .diputado-card { flex-direction: column; text-align: center; }
      .dc-stats { justify-content: center; }
    }

    /* Info tooltip */
    .info-tip {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 20px;
      height: 20px;
      border-radius: 50%;
      background: var(--navy-700, #1a3a5c);
      color: white;
      font-size: 12px;
      font-weight: 600;
      font-family: var(--font-body);
      font-style: normal;
      cursor: help;
      position: relative;
      vertical-align: middle;
      margin-left: 6px;
      transition: background 0.2s;
    }
    .info-tip:hover, .info-tip:focus {
      background: var(--azul-500, #2460B8);
      outline: none;
    }
    .info-tip-text {
      display: none;
      position: absolute;
      left: 50%;
      top: calc(100% + 8px);
      transform: translateX(-50%);
      width: 280px;
      padding: 12px 14px;
      background: var(--navy-800, #0f2744);
      color: var(--gris-200, #e2e8f0);
      font-size: 13px;
      font-weight: 400;
      line-height: 1.5;
      border-radius: 8px;
      box-shadow: 0 4px 16px rgba(0,0,0,0.3);
      z-index: 100;
      pointer-events: none;
    }
    .info-tip-text::before {
      content: '';
      position: absolute;
      bottom: 100%;
      left: 50%;
      transform: translateX(-50%);
      border: 6px solid transparent;
      border-bottom-color: var(--navy-800, #0f2744);
    }
    .info-tip:hover .info-tip-text,
    .info-tip:focus .info-tip-text {
      display: block;
    }

    /* Last updated notice */
    .last-updated {
      text-align: center;
      font-size: var(--text-sm);
      color: var(--gris-400);
      padding: 8px 0 0;
      font-family: var(--font-body);
    }

/* === SEARCH RESULTS === */
.search-results-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  max-height: 320px;
  overflow-y: auto;
  z-index: 100;
}

.search-result-item {
  padding: 10px 16px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
  transition: background 0.15s;
}

.search-result-item:hover {
  background: #f5f5f5;
}

.search-result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.search-result-boletin {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--navy-700);
  font-weight: 600;
}

.search-result-status {
  font-size: var(--text-2xs);
  color: var(--gris-400);
}

.search-result-title {
  font-size: var(--text-sm);
  color: var(--navy-900);
  margin-top: 2px;
}

.search-result-no-votes {
  font-size: var(--text-2xs);
  color: var(--gris-400);
}



/* === ERROR & LOADING STATES === */
.error-card {
  padding: 24px;
  background: var(--carmesi-100);
  border: 1px solid var(--carmesi-300);
  border-radius: 8px;
  text-align: center;
  color: var(--carmesi-600);
  margin: 16px 0;
}

.error-card button {
  margin-top: 12px;
  padding: 8px 16px;
  background: var(--carmesi-500);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: var(--text-sm);
}

.error-card button:hover {
  background: var(--carmesi-600);
}

.loading-placeholder {
  padding: 48px;
  text-align: center;
  color: var(--gris-400);
  font-size: var(--text-base);
}

/* === BILL INFO SECTION === */
.bill-section {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  padding: 24px 32px;
  background: white;
  border-bottom: 1px solid #eee;
}
.bill-header-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.bill-badge {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  background: var(--navy-700);
  color: white;
  padding: 4px 12px;
  border-radius: 4px;
  font-weight: 600;
}
.bill-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--navy-900);
  line-height: 1.3;
  margin-top: 8px;
}
.bill-meta-row {
  display: flex;
  gap: 16px;
  margin-top: 8px;
  font-size: var(--text-xs);
  color: var(--gris-600);
  flex-wrap: wrap;
}
.bill-status {
  padding: 3px 10px;
  border-radius: 12px;
  font-size: var(--text-2xs);
  font-weight: 600;
}
.bill-status--pending { background: #FFF3CD; color: #856404; }
.bill-status--published { background: var(--esmeralda); color: white; }
.bill-subjects {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.subject-tag {
  font-size: var(--text-2xs);
  background: var(--arena);
  padding: 3px 10px;
  border-radius: 12px;
  color: var(--gris-600);
}

/* Authors panel */
.authors-panel {
  background: var(--crema);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid rgba(0,0,0,0.06);
}
.authors-label {
  font-size: var(--text-2xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gris-400);
  font-weight: 600;
  margin-bottom: 12px;
}
.author-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.author-item:last-child { margin-bottom: 0; }
.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--navy-700);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: 700;
  flex-shrink: 0;
}
.author-info { display: flex; flex-direction: column; }
.author-name { font-size: var(--text-sm); font-weight: 700; color: var(--navy-900); }
.author-party { font-size: var(--text-2xs); color: var(--gris-600); }
.author-role-tag {
  font-size: var(--text-2xs);
  color: var(--navy-500, #2460B8);
  font-weight: 600;
  padding: 2px 8px;
  background: rgba(36,96,184,0.08);
  border-radius: 8px;
  margin-left: auto;
}

/* === VERTICAL STEPPER === */
.section-container { padding: 28px 32px; }
.section-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  margin-bottom: 20px;
}
.section-title .accent { color: var(--carmesi-500); }

.stepper { display: flex; flex-direction: column; }
.step { display: flex; gap: 16px; }
.step:last-child .step-line { display: none; }
.step-track { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }
.step-dot {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; color: white;
}
.step-dot.approved { background: var(--esmeralda); box-shadow: 0 2px 8px rgba(15,123,95,0.25); }
.step-dot.rejected { background: var(--carmesi-500); box-shadow: 0 2px 8px rgba(200,50,63,0.25); }
.step-dot.pending { background: var(--gris-400); }
.step-line { width: 2px; flex: 1; min-height: 16px; }
.step-line.done { background: var(--esmeralda); }
.step-line.pending { background: #ddd; }

.step-content { flex: 1; padding-bottom: 24px; }
.step-header { display: flex; align-items: baseline; gap: 8px; margin-bottom: 2px; }
.step-chamber { font-weight: 700; font-size: var(--text-sm); color: var(--navy-700); text-transform: uppercase; }
.step-role { font-size: var(--text-xs); color: var(--gris-400); }
.step-date { font-size: var(--text-2xs); color: var(--gris-400); margin-bottom: 4px; }
.step-change {
  font-size: var(--text-xs);
  color: var(--gris-600);
  margin-bottom: 8px;
  font-style: italic;
  padding-left: 12px;
  border-left: 2px solid var(--arena);
}

/* Vote pills */
.vote-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.vote-arrow { color: var(--gris-400); font-size: 16px; }
.vote-pill {
  padding: 6px 14px; border-radius: 10px; font-size: var(--text-xs);
  font-weight: 600; cursor: pointer; display: flex; align-items: center;
  gap: 6px; transition: all 0.15s; border: 2px solid transparent;
}
.vote-pill:hover { transform: scale(1.02); }
.vote-pill.approved { background: rgba(15,123,95,0.1); color: var(--esmeralda); }
.vote-pill.rejected { background: rgba(200,50,63,0.1); color: var(--carmesi-500); }
.vote-pill.active { border-color: var(--navy-700); box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.vote-pill .type-label { font-weight: 400; opacity: 0.7; }
.vote-pill .count { font-family: var(--font-mono); font-size: var(--text-2xs); opacity: 0.6; }

/* === VOTE DETAIL PANEL (inline) === */
.vote-inline {
  margin-top: 14px;
  background: var(--navy-800);
  border-radius: 14px;
  padding: 20px;
  color: white;
  max-width: 820px;
}
.vote-inline-header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.result-badge {
  padding: 4px 14px; border-radius: 20px;
  font-size: var(--text-2xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em; color: white;
}
.result-badge.approved { background: var(--esmeralda); }
.result-badge.rejected { background: var(--carmesi-500); }
.vote-summary-text { font-size: var(--text-xs); color: #8AB4E8; }

.vote-counts-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; margin-bottom: 12px; }
.vote-counts-bar .bar-for { background: var(--esmeralda); }
.vote-counts-bar .bar-against { background: var(--carmesi-500); }
.vote-counts-bar .bar-abst { background: var(--gris-400); }

.vote-controls-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px; gap: 8px; flex-wrap: wrap;
}
.view-toggle { display: flex; background: rgba(255,255,255,0.06); border-radius: 8px; overflow: hidden; }
.view-btn {
  padding: 6px 14px; font-size: var(--text-2xs); font-weight: 600;
  cursor: pointer; color: #888; border: none; background: transparent;
}
.view-btn.active { background: rgba(255,255,255,0.12); color: white; }

.filter-pills { display: flex; gap: 4px; }
.filter-pill {
  padding: 4px 10px; border-radius: 14px; font-size: var(--text-2xs);
  border: 1px solid rgba(255,255,255,0.15); color: #888;
  cursor: pointer; background: transparent;
}
.filter-pill.active { background: rgba(255,255,255,0.1); color: white; border-color: rgba(255,255,255,0.3); }

.voter-search input {
  padding: 6px 10px; border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: white; font-size: var(--text-2xs); outline: none; width: 160px;
}
.voter-search input::placeholder { color: #555; }

/* Party groups */
.party-groups { }
.party-group { margin-bottom: 12px; }
.party-group-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 6px; padding-bottom: 4px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.party-name { font-size: var(--text-sm); font-weight: 700; min-width: 50px; }
.party-bar {
  display: flex; height: 6px; border-radius: 3px; overflow: hidden;
  flex: 1; max-width: 140px; background: rgba(255,255,255,0.05);
}
.party-bar .bar-for { background: var(--esmeralda); }
.party-bar .bar-against { background: var(--carmesi-500); }
.party-count { font-size: var(--text-2xs); color: var(--gris-400); }
.legislators-row { display: flex; gap: 6px; flex-wrap: wrap; }

.leg-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px 4px 4px; border-radius: 20px; font-size: var(--text-2xs);
}
.leg-chip.favor { background: rgba(15,123,95,0.15); }
.leg-chip.contra { background: rgba(200,50,63,0.15); }
.leg-chip.abst { background: rgba(142,153,168,0.15); }

.leg-avatar-sm {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; color: white;
}
.leg-avatar-sm.favor { background: var(--esmeralda); }
.leg-avatar-sm.contra { background: var(--carmesi-500); }
.leg-avatar-sm.abst { background: var(--gris-400); }

/* All legislators grid */
.legislator-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.legislator-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px; border-radius: 8px;
  background: rgba(255,255,255,0.04);
}
.leg-info { display: flex; flex-direction: column; min-width: 0; }
.leg-name { font-size: var(--text-2xs); font-weight: 600; }
.leg-party-tag { font-size: 9px; color: var(--gris-400); }
.leg-vote-tag {
  font-size: 9px; margin-left: auto; padding: 2px 6px;
  border-radius: 8px; white-space: nowrap;
}
.leg-vote-tag.favor { background: rgba(15,123,95,0.2); color: #4ade80; }
.leg-vote-tag.contra { background: rgba(200,50,63,0.2); color: #f87171; }
.leg-vote-tag.abst { background: rgba(142,153,168,0.2); color: #aaa; }

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .bill-section { grid-template-columns: 1fr; }
  .vote-controls-row { flex-direction: column; align-items: stretch; }
  .voter-search input { width: 100%; }
  .legislator-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .legislator-grid { grid-template-columns: 1fr; }
  .section-container { padding: 20px 16px; }
  .bill-section { padding: 16px; }
}
