
  /* ============================================================
     1. TIPOGRAFÍA INTER & DESIGN TOKENS
     ============================================================ */
  @font-face {
    font-family: "Inter";
    font-weight: 400 800;
    font-style: normal;
    font-display: swap;
    src: url("assets/fonts/inter-var.woff2") format("woff2");
  }

  :root {
    --font-system: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

    --brand-primary: #1b4b8f;
    --brand-primary-deep: #122a4f;
    --brand-accent: #e0241f;
    --brand-success: #16a34a;
    --brand-purple: #6366f1;
    --brand-gold: #b45309;

    --bg: #ffffff;
    --surface: #f8fafc;
    --surface-2: #eef2f7;
    --surface-card: #ffffff;
    --border: #e2e8f0;
    --border-dark: #cbd5e1;
    --text: #1f2b3d;
    --heading: #122a4f;
    --muted: #5b6b82;
    --link: #1b4b8f;

    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --radius-pill: 9999px;

    --shadow-sm: 0 1px 2px rgba(18, 42, 79, .05);
    --shadow: 0 1px 3px rgba(18, 42, 79, .06), 0 8px 24px rgba(18, 42, 79, .06);
    --shadow-lg: 0 2px 4px rgba(18, 42, 79, .05), 0 18px 50px rgba(18, 42, 79, .10);
    --shadow-float: 0 10px 30px -5px rgba(18, 42, 79, 0.08), 0 0 0 1px var(--border);
  }

  [data-theme="dark"] {
    --brand-primary: #4d8fe0;
    --brand-primary-deep: #0a192f;
    --brand-accent: #f87171;
    --brand-success: #4ade80;
    --brand-purple: #818cf8;
    --brand-gold: #fbbf24;

    --bg: #0d1117;
    --surface: #161b22;
    --surface-2: #1c2330;
    --surface-card: #161b22;
    --border: #232c3a;
    --border-dark: #334155;
    --text: #d7e0ec;
    --heading: #f1f5fb;
    --muted: #9aa7b8;
    --link: #6ba4ec;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 1px 3px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
    --shadow-lg: 0 4px 8px rgba(0, 0, 0, .5), 0 20px 40px rgba(0, 0, 0, .45);
    --shadow-float: 0 10px 30px -5px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--border);
  }

  * { box-sizing: border-box; margin: 0; padding: 0; }

  body {
    margin: 0;
    font-family: var(--font-system);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.55;
    padding: 0 0 80px 0;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    transition: background-color 0.2s ease, color 0.2s ease;
    min-height: 100vh;
  }

  body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
      radial-gradient(900px 480px at 50% -10%, color-mix(in srgb, var(--brand-primary) 9%, transparent), transparent 70%),
      radial-gradient(700px 420px at 100% 0%, color-mix(in srgb, var(--brand-accent) 5%, transparent), transparent 65%);
  }

  /* ============================================================
     2. HEADER & COMMISSION SWITCHER
     ============================================================ */
  header.site-header {
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: color-mix(in srgb, var(--bg) 85%, transparent);
    position: sticky;
    top: 0;
    z-index: 1000;
  }

  .header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--heading);
  }
  .observatorio-logo {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: contain;
    background: var(--surface);
    border: 1.5px solid var(--border);
    padding: 2px;
    flex-shrink: 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
  }
  .observatorio-logo:hover {
    transform: rotate(15deg) scale(1.05);
  }
  .brand-emblem {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    background: var(--brand-primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: -0.05em;
  }
  .brand-text {
    display: flex;
    flex-direction: column;
  }
  .brand-title {
    font-size: 13.5px;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--heading);
    text-transform: uppercase;
  }
  .brand-tag {
    font-size: 10.5px;
    font-family: var(--font-mono);
    color: var(--muted);
  }

  .header-session-tracker {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  }
  @media (max-width: 1160px) {
    .header-session-tracker {
      display: none;
    }
  }
  .tracker-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2);
    animation: pulse-dot 2s infinite ease-in-out;
  }
  .tracker-lbl {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 800;
    color: var(--muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
  .tracker-val {
    font-family: var(--font-mono);
    font-size: 11.5px;
    font-weight: 800;
    color: var(--heading);
    letter-spacing: -0.01em;
  }

  .commissions-nav-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--surface);
    padding: 4px 6px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
  }
  .comm-btn {
    font-size: 11.5px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    border: none;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.15s ease;
  }
  .comm-btn:hover {
    color: var(--heading);
    background: var(--surface-2);
  }
  .comm-btn.active {
    background: var(--brand-primary);
    color: #ffffff;
    box-shadow: var(--shadow-sm);
  }
  .comm-btn.upcoming {
    opacity: 0.85;
  }

  /* ============================================================
     SUB-BARRA SELECTORA DE SESIONES Y AGENDAS
     ============================================================ */
  .session-bar-wrap {
    max-width: 1280px;
    margin: 16px auto 0 auto;
    padding: 0 32px;
  }
  .session-selector-bar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
  }
  .session-selector-label {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 800;
    color: var(--muted);
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
  }
  .session-pills-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
  }
  .session-pill {
    font-size: 11.5px;
    font-family: var(--font-system);
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface-card);
    color: var(--text);
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  .session-pill:hover {
    background: var(--surface-2);
    border-color: var(--border-dark);
  }
  .session-pill.active {
    background: color-mix(in srgb, var(--brand-primary) 10%, var(--surface-card));
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    font-weight: 700;
  }
  .session-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
  }
  .session-status-dot.active { background: var(--brand-success); }
  .session-status-dot.upcoming { background: #eab308; }
  .session-status-dot.archived { background: var(--muted); }

  /* PANEL INFORMATIVO PARA SESIONES EN PROGRAMACIÓN */
  .session-briefing-panel {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    margin: 24px 0;
    box-shadow: var(--shadow);
    display: none;
  }


  .header-search-box {
    display: flex;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 6px 14px;
    gap: 8px;
    width: 240px;
    transition: all 0.15s ease;
  }
  .header-search-box:focus-within {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-primary) 12%, transparent);
  }
  .header-search-input {
    border: none;
    background: transparent;
    color: var(--text);
    font-family: var(--font-system);
    font-size: 13px;
    width: 100%;
    outline: none;
  }
  .shortcut-badge {
    font-family: var(--font-mono);
    font-size: 10.5px;
    background: var(--surface-2);
    color: var(--muted);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid var(--border);
    user-select: none;
  }

  .theme-toggle-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--heading);
    font-family: var(--font-system);
    font-size: 12px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: var(--radius);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s ease;
  }
  .theme-toggle-btn:hover {
    background: var(--surface-2);
  }

  /* ============================================================
     3. HERO EDITORIAL ASIMÉTRICO (ESTILO POLIWAVE)
     ============================================================ */
  .hero-section {
    max-width: 1280px;
    margin: 32px auto 24px auto;
    padding: 0 32px;
    position: relative;
    overflow: hidden;
  }
  .hero-particles-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
  }
  .hero-grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 40px;
    align-items: end;
    padding-bottom: 24px;
    position: relative;
    z-index: 1;
  }
  @media (max-width: 960px) {
    .hero-grid { grid-template-columns: 1fr; gap: 20px; }
  }

  .hero-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
  }
  .pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand-success);
    display: inline-block;
  }
  .hero-kicker {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--brand-primary);
    text-transform: uppercase;
  }
  .hero-h1 {
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--heading);
    margin-bottom: 10px;
  }
  .hero-subhead {
    font-size: 15px;
    color: var(--muted);
    line-height: 1.5;
  }

  .editorial-card {
    border-top: 2px solid var(--brand-primary);
    padding-top: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: 2px solid var(--brand-primary);
    border-radius: var(--radius);
    padding: 16px 20px;
  }
  .editorial-card-kicker {
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--brand-primary);
    text-transform: uppercase;
    margin-bottom: 6px;
  }
  .editorial-card-lead {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--heading);
    letter-spacing: -0.015em;
    margin-bottom: 8px;
  }
  .editorial-card-desc {
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.5;
    margin-bottom: 14px;
  }

  .hero-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
  }
  .hero-metric-item {
    display: flex;
    flex-direction: column;
  }
  .metric-val {
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 900;
    color: var(--heading);
  }
  .metric-lbl {
    font-size: 10px;
    color: var(--muted);
    text-transform: uppercase;
    font-weight: 700;
  }

  /* ============================================================
     4. CONTROL ISLAND (POLIWAVE FLOATING NAV)
     ============================================================ */
  .control-island-wrap {
    max-width: 1280px;
    margin: 0 auto 36px auto;
    padding: 0 32px;
  }
  .control-island {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-float);
    padding: 8px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
  }
  .island-nav {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
  }
  .island-btn {
    background: transparent;
    border: none;
    color: var(--muted);
    font-family: var(--font-system);
    font-size: 12.5px;
    font-weight: 700;
    padding: 7px 16px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .island-btn:hover {
    color: var(--heading);
    background: var(--surface-2);
  }
  .island-btn.active {
    background: var(--brand-primary);
    color: #ffffff;
  }
  .island-stats {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-right: 12px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--muted);
  }
  @media (max-width: 850px) {
    .island-stats { display: none; }
  }

  /* ============================================================
     5. SECCIONES Y ENCABEZADOS MONUMENTALES
     ============================================================ */
  .content-section {
    max-width: 1280px;
    margin: 0 auto 60px auto;
    padding: 0 32px;
  }

  .section-header-box {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 14px;
  }
  .section-num {
    font-family: var(--font-mono);
    font-size: 42px;
    font-weight: 900;
    color: color-mix(in srgb, var(--brand-primary) 30%, var(--muted));
    line-height: 1;
    margin-bottom: 4px;
  }
  .section-title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--heading);
  }
  .section-subtitle {
    font-size: 13px;
    color: var(--muted);
    margin-top: 3px;
  }

  /* ============================================================
     6. TABLAS EDITORIALES & RANKING
     ============================================================ */
  .editorial-table-wrap {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
  }
  table.editorial-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
  }
  table.editorial-table th {
    background: var(--surface);
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
  }
  table.editorial-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
  }
  table.editorial-table tr:last-child td {
    border-bottom: none;
  }
  table.editorial-table tr:hover td {
    background: color-mix(in srgb, var(--brand-primary) 3%, transparent);
  }

  .progress-bar-wrap {
    background: var(--surface-2);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    width: 100%;
  }
  .progress-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease;
  }

  /* Barra Apilada Proporcional */
  .stacked-bar-container {
    margin: 20px 0;
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
  }
  .stacked-bar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 12px;
  }
  .stacked-bar {
    display: flex;
    height: 18px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--surface-2);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
  }
  .stacked-segment {
    height: 100%;
    transition: opacity 0.2s;
    cursor: pointer;
  }
  .stacked-segment:hover {
    opacity: 0.85;
  }

  /* ============================================================
     7. ANÁLISIS DE POSICIONES (CARDS CONSOLIDADAS POR BLOQUE)
     ============================================================ */
  .positions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
  }
  @media (max-width: 900px) {
    .positions-grid { grid-template-columns: 1fr; }
  }

  .position-card {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow-sm);
  }
  .position-card.pos-positive {
    border-top: 3px solid #0284c7;
  }
  .position-card.pos-negative {
    border-top: 3px solid #dc2626;
  }
  .position-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
  }
  .position-title {
    font-size: 16px;
    font-weight: 800;
  }
  .position-badge {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
  }
  .position-content p {
    font-size: 13.5px;
    line-height: 1.6;
    margin-bottom: 12px;
    color: var(--text);
  }
  .position-content p strong {
    color: var(--heading);
  }

  .convergences-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--brand-purple);
    border-radius: var(--radius);
    padding: 16px 20px;
    font-size: 13.5px;
    line-height: 1.6;
  }

  /* ============================================================
     8. PLANO CARTESIANO 2D (ESTILO POLIWAVE)
     ============================================================ */
  .biplot-container {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    position: relative;
  }
  .biplot-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 10px;
  }
  .bancada-filter-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
  }
  .filter-pill {
    font-size: 11.5px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--muted);
    cursor: pointer;
    transition: all 0.15s ease;
  }
  .filter-pill:hover {
    background: var(--surface-2);
    color: var(--heading);
  }
  .filter-pill.active {
    background: var(--brand-primary);
    color: #ffffff;
    border-color: var(--brand-primary);
  }

  .svg-wrap {
    width: 100%;
    overflow-x: auto;
  }
  svg.biplot-svg {
    width: 100%;
    min-width: 950px;
    height: auto;
    display: block;
  }
  /* PLANO CARTESIANO 2D: HOVER ESTABLE SIN JITTER */
  .actor-node {
    cursor: pointer;
  }
  .actor-node:hover .node-halo,
  .actor-node:hover .node-halo-2d {
    fill-opacity: 0.32;
    stroke-opacity: 0.95;
    stroke-width: 2.5px;
  }
  .actor-node:hover .avatar-circle-2d {
    stroke-width: 3.5px;
  }
  .actor-node:hover .node-label {
    fill: var(--brand-primary);
  }

  /* ============================================================
     9. EXPEDIENTES Y REPRODUCTOR MULTIMEDIA
     ============================================================ */
  .dossiers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(370px, 1fr));
    gap: 24px;
  }
  @media (max-width: 768px) {
    .dossiers-grid { grid-template-columns: 1fr; }
  }

  .actor-card {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  }
  .actor-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
  }
  .actor-card.highlighted {
    border-color: var(--brand-primary) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-primary) 30%, transparent), var(--shadow-lg);
  }

  .actor-header {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 14px;
  }
  .actor-avatar-wrap {
    position: relative;
    width: 58px;
    height: 58px;
    flex-shrink: 0;
  }
  .actor-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
  }
  .actor-bancada-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--surface-card);
  }
  .actor-identity {
    flex: 1;
    overflow: hidden;
  }
  .actor-top-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    flex-wrap: wrap;
  }
  .actor-bancada-badge {
    font-size: 10.5px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 4px;
  }
  /* PARTIDOS - LOGOS Y COLORES OFICIALES (Referencia: Seguimiento de Comisiones PBG) */
  .party-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding: 2.5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    vertical-align: middle;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    cursor: default;
  }
  .party-badge:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  }
  .party-badge.has-text {
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 800;
  }
  .party-logo {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    border: 1px solid rgba(17, 24, 39, 0.15);
    border-radius: 50%;
    background: #ffffff;
    object-fit: contain;
    padding: 1.5px;
    display: block;
  }
  .party-pbg { background: #ffd400; color: #111827; }
  .party-fp  { background: #f58220; color: #111827; }
  .party-jp  { background: #48b749; color: #111827; }
  .party-rp  { background: #14a9e6; color: #ffffff; }
  .party-pco { background: #0f8f4a; color: #ffffff; }
  .party-an  { background: #d71920; color: #ffffff; }
  .party-pcm { background: #7a1c2b; color: #ffffff; }
  .party-other { background: #e5e7eb; color: #374151; }

  .filter-pill.pill-party {
    padding: 3px 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 32px;
  }
  .filter-pill.pill-party .pill-logo {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    object-fit: contain;
    margin: 0;
    display: block;
  }
  .filter-pill .pill-logo {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    vertical-align: -2px;
    margin-right: 4px;
    background: #fff;
    object-fit: contain;
  }

  /* PESTAÑAS SUBTABS (TIEMPO Y BALANCE) */
  .subtabs-bar {
    display: flex;
    gap: 10px;
    margin: 20px 0 16px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 10px;
    flex-wrap: wrap;
  }
  .subtab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
  }
  .subtab-btn:hover {
    background: var(--surface-card);
    color: var(--heading);
    border-color: var(--border-dark);
  }
  .subtab-btn.active {
    background: var(--heading);
    color: #ffffff;
    border-color: var(--heading);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  }
  .subtab-btn.active svg {
    stroke: #ffffff;
  }
  .subtab-pane {
    animation: fadeInTab 0.2s ease;
  }
  @keyframes fadeInTab {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .actor-score-pill, .actor-time-pill {
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 700;
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 2px 6px;
    border-radius: 4px;
  }
  .actor-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
    flex-wrap: wrap;
  }
  .actor-name-row .actor-name {
    margin: 0;
  }
  .actor-name {
    font-size: 16px;
    font-weight: 800;
    color: var(--heading);
    line-height: 1.25;
    letter-spacing: -0.015em;
  }
  .actor-role {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
  }

  .quote-box {
    background: var(--surface);
    border-left: 3px solid var(--border-dark);
    padding: 10px 12px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-bottom: 12px;
  }
  .quote-kicker {
    font-family: var(--font-mono);
    font-size: 9.5px;
    font-weight: 800;
    color: var(--muted);
    letter-spacing: 0.06em;
    margin-bottom: 4px;
  }
  .quote-text {
    font-size: 12.5px;
    color: var(--text);
    font-style: italic;
    line-height: 1.45;
  }

  .analysis-box {
    margin-bottom: 12px;
  }
  .analysis-kicker {
    font-family: var(--font-mono);
    font-size: 9.5px;
    font-weight: 800;
    color: var(--muted);
    letter-spacing: 0.06em;
    margin-bottom: 4px;
  }
  .analysis-text {
    font-size: 12.5px;
    color: var(--text);
    line-height: 1.5;
  }

  .keywords-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 16px;
  }
  .keyword-badge {
    font-size: 10.5px;
    background: var(--surface-2);
    color: var(--muted);
    padding: 2px 7px;
    border-radius: 4px;
  }

  .audio-player-container {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-bottom: 12px;
  }
  .player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 4px;
  }
  .player-kicker {
    font-family: var(--font-mono);
    font-size: 9.5px;
    font-weight: 800;
    color: var(--muted);
  }
  .track-status-badge {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    color: var(--brand-primary);
  }

  .track-pills-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 8px;
  }
  .track-pill-btn {
    font-size: 10.5px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
    background: var(--surface-card);
    color: var(--text);
    cursor: pointer;
    transition: all 0.15s ease;
  }
  .track-pill-btn:hover {
    background: var(--surface-2);
  }
  .track-pill-btn.active {
    background: var(--brand-primary);
    color: #ffffff;
    border-color: var(--brand-primary);
  }

  .track-select-wrap {
    margin-bottom: 6px;
  }
  .track-select {
    width: 100%;
    font-size: 11px;
    font-family: var(--font-system);
    padding: 5px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-card);
    color: var(--text);
  }

  .actor-footer-meta {
    font-size: 10.5px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    padding-top: 10px;
    border-top: 1px solid var(--border);
  }
  .meta-dot {
    font-size: 6px;
    color: var(--border-dark);
  }

  /* ============================================================
     MATRIZ DE POSICIONES Y ARGUMENTOS (DELIMITADA Y ELEGANTE)
     ============================================================ */
  table.matriz-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
    font-size: 13px;
  }
  table.matriz-table thead th {
    background: var(--surface-2);
    color: var(--heading);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 14px;
    border: none;
    border-bottom: 2px solid var(--border-dark);
  }
  table.matriz-table tbody tr {
    background: var(--surface);
    border-radius: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  }
  table.matriz-table tbody tr:hover {
    background: var(--surface-card);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
  }
  table.matriz-table tbody td {
    padding: 14px 16px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    color: var(--text);
    vertical-align: top;
    line-height: 1.5;
  }
  table.matriz-table tbody td:first-child {
    border-left: 4px solid var(--accent-party, var(--brand-primary));
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
  }
  table.matriz-table tbody td:last-child {
    border-right: 1px solid var(--border);
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
  }
  .matriz-party-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--heading);
    font-size: 13px;
  }
  .matriz-spokespersons {
    font-size: 12px;
    font-weight: 600;
    color: var(--heading);
    line-height: 1.4;
  }

  /* ============================================================
     TIME ANALYTICS GRID & BALANCE POR BANCADA PANEL
     ============================================================ */
  .time-analytics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0 24px 0;
  }
  @media (max-width: 960px) {
    .time-analytics-grid {
      grid-template-columns: 1fr;
    }
  }

  .bancadas-panel-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
    margin-top: 4px;
  }
  @media (max-width: 960px) {
    .bancadas-panel-grid {
      grid-template-columns: 1fr;
    }
  }

  .analytics-card {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
  }
  .analytics-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
  }
  .analytics-card-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--heading);
    letter-spacing: -0.01em;
  }
  .analytics-card-sub {
    font-size: 11.5px;
    color: var(--muted);
    margin-top: 2px;
  }
  .analytics-chip {
    font-size: 10px;
    font-family: var(--font-mono);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 3px 8px;
    border-radius: var(--radius-pill);
    background: var(--surface-2);
    color: var(--muted);
    border: 1px solid var(--border);
  }
  .analytics-card-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .analytics-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .analytics-row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
  }
  .analytics-name {
    font-weight: 700;
    color: var(--heading);
  }
  .analytics-val-box {
    display: flex;
    align-items: baseline;
    gap: 4px;
    font-family: var(--font-mono);
  }
  .analytics-avg-val {
    font-weight: 800;
    color: var(--heading);
    font-size: 12.5px;
  }
  .analytics-avg-lbl {
    font-size: 10.5px;
    color: var(--muted);
  }

  /* ============================================================
     PARLAMENTARIOS SIN COORDENADAS (INCIDENTALES / FUERA DE AGENDAS)
     ============================================================ */
  .unaligned-actors-box {
    margin-top: 24px;
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    box-shadow: var(--shadow-sm);
  }
  .unaligned-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
  }
  .unaligned-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
  }
  .unaligned-title {
    font-size: 13.5px;
    font-weight: 800;
    color: var(--heading);
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .unaligned-count-badge {
    font-size: 11px;
    font-family: var(--font-mono);
    font-weight: 700;
    padding: 2px 10px;
    border-radius: var(--radius-pill);
    background: var(--surface-2);
    color: var(--muted);
    border: 1px solid var(--border);
  }
  .unaligned-desc {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.45;
    margin-top: 4px;
  }
  .unaligned-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
  }
  .unaligned-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.2s ease;
  }
  .unaligned-card:hover {
    border-color: var(--border-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  }
  .unaligned-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .unaligned-avatar-wrap {
    position: relative;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
  }
  .unaligned-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
  }
  .unaligned-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--surface-card);
  }
  .unaligned-actor-meta {
    flex: 1;
    min-width: 0;
  }
  .unaligned-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--heading);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .unaligned-party-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 3px;
  }
  .unaligned-time {
    font-size: 11px;
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--muted);
  }
  .unaligned-reason-box {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--border-dark);
    border-radius: 4px;
    padding: 8px 10px;
    font-size: 11.5px;
    line-height: 1.4;
  }
  .unaligned-reason-kicker {
    display: block;
    font-family: var(--font-mono);
    font-size: 9.5px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--muted);
    letter-spacing: 0.05em;
    margin-bottom: 2px;
  }
  .unaligned-reason-text {
    color: var(--text);
    margin: 0;
  }

  /* ============================================================
     10. FOOTER INSTITUCIONAL & DISCLAIMER LEGAL
     ============================================================ */
  footer.site-footer {
    max-width: 1280px;
    margin: 60px auto 40px auto;
    padding: 32px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  .footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
  }
  .footer-brand-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .footer-logo {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: contain;
    background: var(--surface);
    border: 1.5px solid var(--border);
    padding: 2px;
  }
  .footer-brand-title {
    font-weight: 800;
    color: var(--heading);
    font-size: 13px;
    letter-spacing: 0.02em;
  }
  .footer-brand-sub {
    font-size: 11.5px;
    color: var(--muted);
    font-family: var(--font-mono);
  }
  .footer-source-note {
    font-size: 12px;
    color: var(--text);
    background: var(--surface);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    max-width: 520px;
    line-height: 1.4;
  }

  /* Tarjeta de Disclaimer Legal - Monocromo y Sobrio */
  .disclaimer-card {
    background: var(--surface-card);
    border: 1px solid var(--border-dark);
    border-left: 4px solid var(--heading);
    border-radius: var(--radius-sm);
    padding: 22px 26px;
    box-shadow: var(--shadow-sm);
  }
  .disclaimer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
  }
  .disclaimer-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--heading);
  }
  .disclaimer-title {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--heading);
  }
  .disclaimer-badge {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    background: var(--surface-2);
    color: var(--heading);
    border: 1px solid var(--border-dark);
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }
  .disclaimer-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 12.5px;
    line-height: 1.65;
    color: var(--text);
  }
  .disclaimer-body p {
    margin: 0;
    text-align: justify;
  }
  .disclaimer-body strong {
    color: var(--heading);
  }

  .footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 11px;
    color: var(--muted);
    padding-top: 14px;
    border-top: 1px solid var(--border);
    font-family: var(--font-mono);
  }

  /* ============================================================
     11. LOGO WATERMARK FLOTANTE PERSISTENTE
     ============================================================ */
  .floating-watermark {
    position: fixed;
    bottom: 24px;
    right: 28px;
    width: 60px;
    height: 60px;
    opacity: 0.16;
    pointer-events: none;
    z-index: 990;
    user-select: none;
    transition: opacity 0.2s ease;
  }
  .floating-watermark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.12));
  }
  [data-theme="dark"] .floating-watermark {
    opacity: 0.10;
  }

  /* ============================================================
     12. TABLAS LÉXICAS Y NUBE SEMÁNTICA ATLAS.TI
     ============================================================ */
  .ranking-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--border);
    flex-shrink: 0;
  }
  .lexico-table td {
    vertical-align: middle;
  }
  .lex-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11.5px;
    border: 1px solid;
    margin: 2px 4px 2px 0;
    font-weight: 600;
    white-space: nowrap;
    transition: transform 0.15s ease;
  }
  .lex-badge:hover {
    transform: scale(1.04);
  }
  .lex-badge .lex-count {
    font-size: 10px;
    font-family: var(--font-mono);
    font-weight: 700;
    opacity: 0.75;
    background: rgba(0, 0, 0, 0.06);
    padding: 1px 4px;
    border-radius: 3px;
  }
  [data-theme="dark"] .lex-badge .lex-count {
    background: rgba(255, 255, 255, 0.12);
  }
  .lex-quote-wrap {
    font-size: 12.5px;
    color: var(--text);
    line-height: 1.45;
    font-style: italic;
    max-width: 480px;
  }
  .lex-quote-wrap strong {
    font-style: normal;
    color: var(--heading);
  }
  .lex-focus-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--muted);
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 13px;
  }
  .lex-focus-btn:hover {
    background: var(--surface-card);
    color: var(--heading);
    border-color: var(--border-dark);
    transform: scale(1.08);
  }

  /* ATLAS.TI CLOUD WRAPPER */
  .atlas-cloud-wrapper {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    margin-bottom: 24px;
  }
  .atlas-cloud-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
  }
  .atlas-cloud-kicker {
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--muted);
    text-transform: uppercase;
    margin-bottom: 4px;
  }
  .atlas-cloud-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--heading);
    margin: 0 0 6px 0;
  }
  .atlas-cloud-sub {
    font-size: 12.5px;
    color: var(--muted);
    max-width: 680px;
    line-height: 1.45;
  }
  .atlas-filter-pills {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
  }

  /* ATLAS CLOUD CANVAS */
  .atlas-cloud-canvas {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 14px;
    padding: 32px 24px;
    min-height: 280px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    position: relative;
    user-select: none;
  }
  .atlas-word-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 8px;
    border: 1px solid;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    line-height: 1.1;
    font-family: var(--font-sans);
    text-decoration: none;
  }
  .atlas-word-chip:hover {
    transform: translateY(-2px) scale(1.07);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    z-index: 10;
  }
  .atlas-word-chip.highlight-match {
    box-shadow: 0 0 0 2px currentColor;
    font-weight: 800 !important;
  }
  .atlas-word-chip .atlas-count {
    font-size: 10px;
    font-family: var(--font-mono);
    font-weight: 700;
    opacity: 0.8;
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.06);
  }
  [data-theme="dark"] .atlas-word-chip .atlas-count {
    background: rgba(255, 255, 255, 0.12);
  }

  /* ATLAS BANCADA SUMMARY PANEL */
  .atlas-bancada-summary {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 18px;
    margin: 0 0 16px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.2s ease;
  }
  .atlas-sum-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
  }
  .atlas-sum-identity {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
  }
  .atlas-sum-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
  }
  .atlas-sum-title {
    font-weight: 800;
    font-size: 15px;
    color: var(--heading);
  }
  .atlas-sum-badge-vol {
    font-family: var(--font-mono);
    font-size: 11.5px;
    font-weight: 700;
    background: var(--surface-card);
    border: 1px solid var(--border);
    padding: 3px 10px;
    border-radius: 6px;
    color: var(--brand-blue);
  }
  .atlas-sum-actors {
    font-size: 12px;
    color: var(--muted);
    font-family: var(--font-mono);
  }
  .atlas-sum-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .atlas-sum-kw-box {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
  }
  .atlas-sum-kw-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }
  .atlas-sum-kw-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
  }
  .atlas-top-kw-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--surface-card);
    border: 1px solid var(--border);
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 12px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    font-family: var(--font-sans);
  }
  .atlas-top-kw-chip:hover {
    border-color: var(--brand-blue);
    color: var(--heading);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }
  .atlas-top-kw-chip strong {
    color: var(--heading);
  }
  .atlas-top-kw-count {
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 700;
    color: var(--brand-blue);
    background: rgba(2, 132, 199, 0.1);
    padding: 1px 5px;
    border-radius: 4px;
  }
  .atlas-sum-quote-box {
    font-size: 12.5px;
    font-style: italic;
    color: var(--text);
    background: var(--surface-card);
    padding: 8px 12px;
    border-radius: 6px;
    border-left: 3px solid var(--brand-blue);
    margin-top: 2px;
    line-height: 1.45;
  }
  .atlas-sum-quote-label {
    font-weight: 700;
    font-style: normal;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    display: block;
    margin-bottom: 2px;
  }

  /* ATLAS INSPECTOR CARD */
  .atlas-inspector-card {
    margin-top: 18px;
    padding: 18px 20px;
    background: var(--surface);
    border: 1px solid var(--border-dark);
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    animation: fadeInTab 0.2s ease;
  }
  .atlas-inspector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
  }
  .atlas-inspector-badge {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    background: var(--heading);
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 0.05em;
  }
  .atlas-inspector-word {
    font-size: 18px;
    font-weight: 800;
    color: var(--heading);
    margin-left: 6px;
  }
  .atlas-inspector-count {
    font-family: var(--font-mono);
    font-size: 12.5px;
    font-weight: 700;
    color: var(--muted);
    margin-left: 8px;
  }
  .atlas-inspector-close {
    background: none;
    border: none;
    font-size: 16px;
    color: var(--muted);
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
  }
  .atlas-inspector-close:hover {
    color: var(--heading);
    background: var(--surface-card);
  }
  .atlas-inspector-meta {
    display: flex;
    gap: 24px;
    font-size: 12.5px;
    color: var(--muted);
    margin-bottom: 10px;
    flex-wrap: wrap;
  }
  .atlas-inspector-meta strong {
    color: var(--heading);
  }
  .atlas-inspector-quote {
    font-size: 13.5px;
    font-style: italic;
    color: var(--text);
    border-left: 3px solid var(--brand-blue);
    padding: 8px 14px;
    background: var(--surface-card);
    border-radius: 0 6px 6px 0;
    line-height: 1.5;
  }

  /* ============================================================
     13. SECCIÓN 02: SELECTOR 2D VS 1D Y ESPECTRO LINEAL 1D
     ============================================================ */
  .sec2-subtabs-bar {
    display: flex;
    gap: 10px;
    margin: 16px 0 20px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 10px;
    flex-wrap: wrap;
  }
  .sec2-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
  }
  .sec2-tab-btn:hover {
    background: var(--surface-card);
    color: var(--heading);
    border-color: var(--border-dark);
  }
  .sec2-tab-btn.active {
    background: var(--heading);
    color: #ffffff;
    border-color: var(--heading);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  }
  .sec2-tab-btn.active svg {
    stroke: #ffffff;
  }
  .spectrum-1d-container {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    margin-bottom: 24px;
    overflow-x: auto;
  }
  .spectrum-1d-svg {
    width: 100%;
    min-width: 900px;
    height: auto;
    display: block;
  }
  /* ESPECTRO 1D: HOVER ESTABLE SIN TRASLACIÓN NI ESCALADO NI JITTER */
  .actor-node-1d {
    cursor: pointer;
  }
  .actor-node-1d:hover .node-halo-1d {
    fill-opacity: 0.28;
    stroke-opacity: 0.95;
    stroke-width: 2.8px;
  }
  .actor-node-1d:hover .avatar-circle-1d {
    stroke-width: 3.5px;
  }
  .actor-node-1d:hover .label-bg-1d {
    stroke-width: 1.5px;
    stroke: var(--brand-primary);
    fill: var(--surface-card);
  }
  .actor-node-1d:hover .label-text-1d {
    fill: var(--brand-primary);
  }

  /* ============================================================
     14. SECCIÓN 01: TIMELINE Y CURVA DE LORENZ
     ============================================================ */
  /* TIMELINE */
  .timeline-wrap {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  }
  .timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 12px;
  }
  .timeline-progress-bar {
    display: flex;
    height: 18px;
    border-radius: 9px;
    overflow: hidden;
    margin-bottom: 24px;
    border: 1px solid var(--border);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
  }
  .timeline-prog-seg {
    height: 100%;
    transition: opacity 0.15s ease;
    position: relative;
    cursor: pointer;
  }
  .timeline-prog-seg:hover {
    opacity: 0.85;
  }
  .timeline-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 14px;
  }
  .timeline-event-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.15s ease;
    cursor: pointer;
  }
  .timeline-event-card:hover {
    border-color: var(--border-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  }
  .timeline-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .timeline-time-badge {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    background: var(--surface-card);
    padding: 2px 7px;
    border-radius: 4px;
    border: 1px solid var(--border);
  }
  .timeline-actor-row {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .timeline-actor-name {
    font-weight: 700;
    font-size: 13.5px;
    color: var(--heading);
  }
  .timeline-topic {
    font-size: 12px;
    color: var(--text);
    line-height: 1.4;
  }

  /* LORENZ & PARETO */
  .lorenz-wrap {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  }
  .lorenz-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: center;
  }
  @media (max-width: 900px) {
    .lorenz-grid {
      grid-template-columns: 1fr;
    }
  }
  .lorenz-chart-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
  }
  .lorenz-stats-box {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  .lorenz-kpi-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .lorenz-kpi-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .lorenz-kpi-num {
    font-family: var(--font-mono);
    font-size: 24px;
    font-weight: 800;
    color: var(--heading);
  }
  .lorenz-kpi-label {
    font-size: 11px;
    color: var(--muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }
  .lorenz-explanation {
    font-size: 13px;
    color: var(--text);
    line-height: 1.5;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--brand-blue);
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
  }

  /* CONTROL DE EXCLUSIÓN DE PRESIDENCIA (MODO DEBATE PARLAMENTARIO PURO) */
  .presidencia-control-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 18px;
    margin: 16px 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  }
  .btn-toggle-presidencia {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 700;
    color: var(--heading);
    background: var(--surface);
    border: 1.5px solid var(--border-dark);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
  }
  .btn-toggle-presidencia:hover {
    background: var(--surface-card);
    border-color: var(--brand-blue);
    color: var(--brand-blue);
    transform: translateY(-1px);
  }
  .btn-toggle-presidencia.active {
    background: #14a9e6;
    border-color: #0284c7;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(20, 169, 230, 0.35);
  }
  .btn-toggle-presidencia.active svg {
    stroke: #ffffff;
  }
  .btn-toggle-invitados.active {
    background: #0f8f4a;
    border-color: #059669;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(15, 143, 74, 0.35);
  }
  .btn-toggle-invitados.active svg {
    stroke: #ffffff;
  }
  .presidencia-status-box {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-family: var(--font-mono);
    color: var(--muted);
  }
  .presidencia-status-box .dot-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand-success);
    flex-shrink: 0;
    transition: background 0.2s ease;
  }
  .presidencia-status-box.active .dot-status {
    background: #f58220;
  }
  .presidencia-help-text {
    font-size: 11.5px;
    color: var(--muted);
    width: 100%;
    margin-top: 4px;
    line-height: 1.4;
  }
  .president-row.is-excluded {
    display: none !important;
  }

  /* Transcripción íntegra certificada para accesibilidad e IA */
  .transcript-details {
    margin-top: 10px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 10px;
    background: var(--surface-2);
    transition: all 0.2s ease;
  }
  .transcript-details[open] {
    border-color: var(--border-dark);
    background: var(--surface);
  }
  .transcript-summary {
    cursor: pointer;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 6px;
    user-select: none;
  }
  .transcript-summary:hover {
    color: var(--heading);
  }
  .transcript-full-text {
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.6;
    color: var(--text);
    border-top: 1px solid var(--border);
    padding-top: 8px;
    font-style: normal;
    max-height: 240px;
    overflow-y: auto;
    white-space: normal;
  }
  .sr-only-transcript {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: normal !important;
    border: 0 !important;
  }

  /* ============================================================
     SECCIÓN DE INTELIGENCIA PARLAMENTARIA Y CONTACTO
     ============================================================ */
  .support-card {
    max-width: 1200px;
    margin: 40px auto 20px auto;
    padding: 32px 36px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
  }

  .support-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1b4b8f 0%, #b45309 50%, #16a34a 100%);
  }

  .support-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brand-primary);
    background: rgba(27, 75, 143, 0.08);
    border: 1px solid rgba(27, 75, 143, 0.18);
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    margin-bottom: 12px;
  }

  [data-theme="dark"] .support-badge {
    background: rgba(77, 143, 224, 0.12);
    border-color: rgba(77, 143, 224, 0.25);
    color: #6ba4ec;
  }

  .support-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--heading);
    margin: 0 0 10px 0;
    line-height: 1.25;
  }

  .support-lead {
    font-size: 15px;
    color: var(--text);
    margin: 0 0 20px 0;
    line-height: 1.5;
  }

  .support-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 26px;
  }

  @media (max-width: 768px) {
    .support-grid {
      grid-template-columns: 1fr;
    }
    .support-card {
      padding: 24px 20px;
      margin: 24px 16px;
    }
  }

  .support-col {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
  }

  .support-col h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--heading);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .support-col p {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.55;
    margin: 0;
  }

  .support-footer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
  }

  .support-author-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .support-role {
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: var(--muted);
    text-transform: uppercase;
  }

  .support-name {
    font-size: 16px;
    font-weight: 800;
    color: var(--heading);
  }

  .support-academic {
    font-size: 12.5px;
    color: var(--muted);
  }

  .support-btns {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
  }

  .btn-contact-lk, .btn-contact-wa {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    padding: 9px 16px;
    border-radius: var(--radius);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
  }

  .btn-contact-lk:hover, .btn-contact-wa:hover {
    transform: translateY(-1px);
  }

  .btn-contact-lk {
    background: #0a66c2;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(10, 102, 194, 0.3);
  }

  .btn-contact-wa {
    background: #25d366;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(37, 211, 102, 0.3);
  }
