/* ============================================
   PROCESO PENAL ACUSATORIO COLOMBIANO
   Paleta: azul institucional + dorado jurídico
   Estilo: autoritativo / corporativo legal
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=DM+Sans:wght@300..700&display=swap');

:root, [data-theme='light'] {
  /* Type scale */
  --text-xs:   clamp(0.75rem,  0.7rem + 0.25vw,  0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem + 0.35vw,  1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem + 0.75vw,    1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem + 1.25vw,  2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem + 2.5vw,   3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem + 4vw,       5rem);

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Fonts */
  --font-display: 'Playfair Display', 'Georgia', serif;
  --font-body:    'DM Sans', 'Helvetica Neue', sans-serif;

  /* Colors — azul institucional colombiano + dorado */
  --color-bg:              #f5f6f8;
  --color-surface:         #ffffff;
  --color-surface-2:       #f9fafb;
  --color-surface-offset:  #eef0f4;
  --color-surface-offset-2:#e6e9ee;
  --color-surface-dynamic: #dde1e9;
  --color-divider:         #d1d6e0;
  --color-border:          #c5ccd8;

  --color-text:            #1a1f2e;
  --color-text-muted:      #5a6070;
  --color-text-faint:      #a0a8b8;
  --color-text-inverse:    #f5f6f8;

  /* Azul institucional */
  --color-primary:         #1a3a6b;
  --color-primary-hover:   #122c54;
  --color-primary-active:  #0c1e3d;
  --color-primary-highlight: #d0daf0;

  /* Dorado jurídico */
  --color-gold:            #b8860b;
  --color-gold-hover:      #96700a;
  --color-gold-active:     #705208;
  --color-gold-highlight:  #f5e8c0;

  /* Semánticos */
  --color-success:         #1e6e3a;
  --color-success-hover:   #145228;
  --color-success-active:  #0d3a1c;
  --color-success-highlight: #c8e8d0;

  --color-warning:         #a85e0a;
  --color-warning-hover:   #864b08;
  --color-warning-active:  #603606;
  --color-warning-highlight: #f5dfc0;

  --color-error:           #8b1a1a;
  --color-error-hover:     #6e1515;
  --color-error-active:    #500f0f;
  --color-error-highlight: #f5cccc;

  --color-info:            #1a5a8b;
  --color-info-highlight:  #c8def5;

  /* Radius */
  --radius-sm:   0.375rem;
  --radius-md:   0.5rem;
  --radius-lg:   0.75rem;
  --radius-xl:   1rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Shadows */
  --shadow-sm: 0 1px 2px oklch(0.2 0.03 240 / 0.08);
  --shadow-md: 0 4px 12px oklch(0.2 0.03 240 / 0.10);
  --shadow-lg: 0 12px 32px oklch(0.2 0.03 240 / 0.14);

  /* Widths */
  --content-narrow:  640px;
  --content-default: 1000px;
  --content-wide:    1280px;

  /* Stage colors */
  --stage-1: #1a5c8b;  /* Indagación — azul investigación */
  --stage-2: #1a6b4a;  /* Investigación — verde diligencia */
  --stage-3: #6b4a1a;  /* Imputación — dorado formal */
  --stage-4: #6b1a1a;  /* Acusación — rojo proceso */
  --stage-5: #4a1a6b;  /* Preparatoria — púrpura preparación */
  --stage-6: #1a3a6b;  /* Juicio oral — azul institucional */
  --stage-7: #1a5e1a;  /* Sentencia — verde justicia */
  --stage-8: #3a3a3a;  /* Ejecución — gris aplicación */
}

[data-theme='dark'] {
  --color-bg:              #0f1218;
  --color-surface:         #161b24;
  --color-surface-2:       #1c2230;
  --color-surface-offset:  #1a1f2a;
  --color-surface-offset-2:#202636;
  --color-surface-dynamic: #2a3040;
  --color-divider:         #252d3d;
  --color-border:          #323d52;
  --color-text:             #c8d0e0;
  --color-text-muted:      #7080a0;
  --color-text-faint:      #46526a;
  --color-text-inverse:    #1a1f2e;
  --color-primary:         #5b85c8;
  --color-primary-hover:   #3d6ab0;
  --color-primary-active:  #285098;
  --color-primary-highlight: #1e2e48;
  --color-gold:            #d4aa4e;
  --color-gold-hover:      #c09034;
  --color-gold-active:     #a87820;
  --color-gold-highlight:  #2e2410;
  --color-success:         #4aad68;
  --color-success-hover:   #369052;
  --color-success-active:  #25703e;
  --color-success-highlight: #1a2e22;
  --color-warning:         #d4844a;
  --color-warning-hover:   #c06830;
  --color-warning-active:  #a85020;
  --color-warning-highlight: #2e1e10;
  --color-error:           #d46464;
  --color-error-hover:     #c04848;
  --color-error-active:    #a83030;
  --color-error-highlight: #2e1414;
  --color-info:            #4a8ad4;
  --color-info-highlight:  #1a2840;
  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.25);
  --shadow-md: 0 4px 12px oklch(0 0 0 / 0.35);
  --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.45);

  --stage-1: #4a8ac8;
  --stage-2: #4aad6b;
  --stage-3: #c8a04a;
  --stage-4: #c86464;
  --stage-5: #9a6ac8;
  --stage-6: #5b85c8;
  --stage-7: #4aad4a;
  --stage-8: #9090a0;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg:              #0f1218;
    --color-surface:         #161b24;
    --color-surface-2:       #1c2230;
    --color-surface-offset:  #1a1f2a;
    --color-surface-offset-2:#202636;
    --color-surface-dynamic: #2a3040;
    --color-divider:         #252d3d;
    --color-border:          #323d52;
    --color-text:             #c8d0e0;
    --color-text-muted:      #7080a0;
    --color-text-faint:      #46526a;
    --color-text-inverse:    #1a1f2e;
    --color-primary:         #5b85c8;
    --color-primary-hover:   #3d6ab0;
    --color-primary-active:  #285098;
    --color-primary-highlight: #1e2e48;
    --color-gold:            #d4aa4e;
    --color-gold-highlight:  #2e2410;
    --color-success:         #4aad68;
    --color-success-highlight: #1a2e22;
    --color-warning:         #d4844a;
    --color-warning-highlight: #2e1e10;
    --color-error:           #d46464;
    --color-error-highlight: #2e1414;
    --color-info:            #4a8ad4;
    --color-info-highlight:  #1a2840;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.25);
    --shadow-md: 0 4px 12px oklch(0 0 0 / 0.35);
    --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.45);
    --stage-1: #4a8ac8;
    --stage-2: #4aad6b;
    --stage-3: #c8a04a;
    --stage-4: #c86464;
    --stage-5: #9a6ac8;
    --stage-6: #5b85c8;
    --stage-7: #4aad4a;
    --stage-8: #9090a0;
  }
}

/* ===========================
   LAYOUT & STRUCTURE
   =========================== */

.container {
  max-width: var(--content-default);
  margin-inline: auto;
  padding-inline: clamp(var(--space-4), 4vw, var(--space-12));
}

.container--wide {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: clamp(var(--space-4), 4vw, var(--space-12));
}

/* ===========================
   HEADER / NAV
   =========================== */

.site-header {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  padding-block: var(--space-4);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.logo-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-title {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.logo-sub {
  font-size: var(--text-xs);
  opacity: 0.75;
  font-weight: 300;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.theme-toggle {
  background: none;
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  padding: var(--space-2);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition-interactive);
}

.theme-toggle:hover {
  background: rgba(255,255,255,0.15);
}

/* ===========================
   HERO
   =========================== */

.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, #0c2550 60%, #1a3a6b 100%);
  color: white;
  padding-block: clamp(var(--space-12), 8vw, var(--space-24));
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.9);
  font-size: var(--text-xs);
  font-weight: 500;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-6);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  margin-bottom: var(--space-6);
  letter-spacing: -0.01em;
  color: white;
}

.hero h1 span {
  color: #f5d67a;
}

.hero-lead {
  font-size: var(--text-lg);
  opacity: 0.85;
  max-width: 60ch;
  margin-inline: auto;
  margin-bottom: var(--space-8);
  font-weight: 300;
  line-height: 1.7;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-8);
  flex-wrap: wrap;
}

.hero-stat {
  text-align: center;
}

.hero-stat-num {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: #f5d67a;
  display: block;
}

.hero-stat-label {
  font-size: var(--text-xs);
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ===========================
   PROCESS TIMELINE (MAIN NAV)
   =========================== */

.process-nav {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding-block: var(--space-4);
  position: sticky;
  top: 64px;
  z-index: 90;
  box-shadow: var(--shadow-sm);
}

.process-nav-inner {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-block: var(--space-1);
}

.process-nav-inner::-webkit-scrollbar { display: none; }

.stage-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  background: var(--color-surface-offset);
  color: var(--color-text-muted);
  white-space: nowrap;
  transition: all var(--transition-interactive);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stage-btn .stage-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  background: currentColor;
  color: white;
  flex-shrink: 0;
}

.stage-btn:hover {
  background: var(--color-surface-dynamic);
  color: var(--color-text);
}

.stage-btn.active {
  color: white;
  border-color: transparent;
}

.stage-btn[data-stage="1"].active  { background: var(--stage-1); }
.stage-btn[data-stage="2"].active  { background: var(--stage-2); }
.stage-btn[data-stage="3"].active  { background: var(--stage-3); }
.stage-btn[data-stage="4"].active  { background: var(--stage-4); }
.stage-btn[data-stage="5"].active  { background: var(--stage-5); }
.stage-btn[data-stage="6"].active  { background: var(--stage-6); }
.stage-btn[data-stage="7"].active  { background: var(--stage-7); }
.stage-btn[data-stage="8"].active  { background: var(--stage-8); }

/* ===========================
   TRACKER TOOL
   =========================== */

.tracker-section {
  background: var(--color-gold-highlight);
  border: 1px solid color-mix(in oklab, var(--color-gold) 40%, transparent);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  margin-block: var(--space-10);
}

.tracker-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-gold-active);
  margin-bottom: var(--space-2);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

[data-theme='dark'] .tracker-title {
  color: var(--color-gold);
}

.tracker-sub {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}

.tracker-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

@media (max-width: 600px) {
  .tracker-grid { grid-template-columns: 1fr; }
}

.tracker-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.tracker-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.tracker-select, .tracker-input {
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--text-sm);
  appearance: none;
  cursor: pointer;
}

.tracker-select:focus, .tracker-input:focus {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

.tracker-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  background: var(--color-gold);
  color: white;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background var(--transition-interactive);
}

.tracker-btn:hover { background: var(--color-gold-hover); }

.tracker-result {
  display: none;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-top: var(--space-6);
}

.tracker-result.visible { display: block; }

.tracker-result-stage {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.tracker-result-badge {
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: white;
}

.tracker-result-name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
}

.tracker-alerts {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.alert-item {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  border-left: 3px solid;
  font-size: var(--text-sm);
}

.alert-item.alert-warning {
  background: var(--color-warning-highlight);
  border-color: var(--color-warning);
  color: var(--color-text);
}

.alert-item.alert-info {
  background: var(--color-info-highlight);
  border-color: var(--color-info);
  color: var(--color-text);
}

.alert-item.alert-success {
  background: var(--color-success-highlight);
  border-color: var(--color-success);
  color: var(--color-text);
}

.alert-item.alert-error {
  background: var(--color-error-highlight);
  border-color: var(--color-error);
  color: var(--color-text);
}

/* ===========================
   MAIN CONTENT AREA
   =========================== */

.main-content {
  padding-block: var(--space-12);
}

.stage-panel {
  display: none;
}

.stage-panel.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===========================
   STAGE HEADER
   =========================== */

.stage-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-6);
  align-items: start;
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-8);
  border-bottom: 2px solid var(--color-border);
}

@media (max-width: 700px) {
  .stage-header { grid-template-columns: 1fr; }
}

.stage-number {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

.stage-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-bottom: var(--space-3);
  line-height: 1.1;
}

.stage-description {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 60ch;
  line-height: 1.7;
}

.stage-time-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  min-width: 220px;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.stage-time-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

.stage-time-value {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.2;
  margin-bottom: var(--space-1);
}

.stage-time-detail {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* ===========================
   CONTENT GRID
   =========================== */

.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}

@media (max-width: 800px) {
  .content-grid { grid-template-columns: 1fr; }
}

.content-grid--3 {
  grid-template-columns: 1fr 1fr 1fr;
}

@media (max-width: 900px) {
  .content-grid--3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .content-grid--3 { grid-template-columns: 1fr; }
}

/* ===========================
   CARDS
   =========================== */

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.card-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-title {
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text);
}

.card-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.card-list li {
  display: flex;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
  max-width: 100%;
}

.card-list li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-primary);
  flex-shrink: 0;
  margin-top: 7px;
}

/* ===========================
   ACTOR CARDS
   =========================== */

.actors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.actor-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}

.actor-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-3);
  font-size: 22px;
}

.actor-name {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.actor-role {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-3);
}

.actor-desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.6;
  max-width: 100%;
}

.actor-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-2);
}

/* ===========================
   AUDIENCES TABLE
   =========================== */

.audiences-section {
  margin-bottom: var(--space-8);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.section-title-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.audience-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.audience-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-4);
  align-items: center;
  cursor: pointer;
  transition: box-shadow var(--transition-interactive), border-color var(--transition-interactive);
}

.audience-item:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}

.audience-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-primary-highlight);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: 700;
  flex-shrink: 0;
}

.audience-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.audience-desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.5;
  max-width: 100%;
}

.audience-badge {
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.badge-obligatoria {
  background: var(--color-error-highlight);
  color: var(--color-error);
}

.badge-eventual {
  background: var(--color-warning-highlight);
  color: var(--color-warning);
}

/* ===========================
   MILESTONES / HITOS
   =========================== */

.milestones-section {
  margin-bottom: var(--space-8);
}

.milestones-timeline {
  position: relative;
  padding-left: var(--space-8);
}

.milestones-timeline::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--color-border);
}

.milestone-item {
  position: relative;
  margin-bottom: var(--space-5);
}

.milestone-dot {
  position: absolute;
  left: calc(-1 * var(--space-8) + 4px);
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--color-surface);
  box-shadow: 0 0 0 2px var(--color-border);
}

.milestone-dot.advance { background: var(--color-success); box-shadow: 0 0 0 2px var(--color-success); }
.milestone-dot.close   { background: var(--color-error);   box-shadow: 0 0 0 2px var(--color-error); }
.milestone-dot.neutral { background: var(--color-primary); box-shadow: 0 0 0 2px var(--color-primary); }

.milestone-content {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}

.milestone-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-1);
}

.milestone-type {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 1px 7px;
  border-radius: var(--radius-full);
}

.milestone-type.advance { background: var(--color-success-highlight); color: var(--color-success); }
.milestone-type.close   { background: var(--color-error-highlight);   color: var(--color-error); }
.milestone-type.neutral { background: var(--color-primary-highlight); color: var(--color-primary); }

.milestone-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
}

.milestone-desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.6;
  max-width: 100%;
}

/* ===========================
   LAW REFERENCES
   =========================== */

.law-ref {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-primary-highlight);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

/* ===========================
   QUICK REFERENCE PANEL
   =========================== */

.quick-ref {
  background: linear-gradient(135deg, var(--color-primary) 0%, #0c2550 100%);
  color: white;
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  margin-bottom: var(--space-8);
}

.quick-ref-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.quick-ref-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-4);
}

.quick-ref-item {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}

.quick-ref-label {
  font-size: var(--text-xs);
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-1);
}

.quick-ref-value {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: #f5d67a;
  line-height: 1.2;
}

.quick-ref-detail {
  font-size: var(--text-xs);
  opacity: 0.65;
  margin-top: var(--space-1);
}

/* ===========================
   OVERVIEW TABLE
   =========================== */

.overview-section {
  padding-block: var(--space-12);
  background: var(--color-surface-offset);
}

.overview-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
}

.overview-table {
  width: 100%;
  background: var(--color-surface);
  font-size: var(--text-xs);
  border-collapse: collapse;
}

.overview-table th {
  background: var(--color-primary);
  color: white;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: var(--space-4);
  text-align: left;
  white-space: nowrap;
}

.overview-table td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-muted);
  vertical-align: top;
  line-height: 1.5;
}

.overview-table tr:last-child td { border-bottom: none; }

.overview-table tr:hover td { background: var(--color-surface-offset); }

.stage-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  color: white;
  white-space: nowrap;
  cursor: pointer;
}

/* ===========================
   FOOTER
   =========================== */

.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding-block: var(--space-8);
  margin-top: var(--space-16);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.footer-note {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  max-width: 55ch;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.footer-link {
  font-size: var(--text-xs);
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
}

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

/* ===========================
   UTILITIES
   =========================== */

.full-width {
  grid-column: 1 / -1;
}

.divider {
  height: 1px;
  background: var(--color-border);
  margin-block: var(--space-8);
}

.text-muted { color: var(--color-text-muted); }
.text-gold  { color: var(--color-gold); }

.accent-bar {
  width: 48px;
  height: 4px;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-4);
}

/* stage accent bars */
[data-stage="1"] .accent-bar { background: var(--stage-1); }
[data-stage="2"] .accent-bar { background: var(--stage-2); }
[data-stage="3"] .accent-bar { background: var(--stage-3); }
[data-stage="4"] .accent-bar { background: var(--stage-4); }
[data-stage="5"] .accent-bar { background: var(--stage-5); }
[data-stage="6"] .accent-bar { background: var(--stage-6); }
[data-stage="7"] .accent-bar { background: var(--stage-7); }
[data-stage="8"] .accent-bar { background: var(--stage-8); }

[data-stage="1"] .stage-time-value { color: var(--stage-1); }
[data-stage="2"] .stage-time-value { color: var(--stage-2); }
[data-stage="3"] .stage-time-value { color: var(--stage-3); }
[data-stage="4"] .stage-time-value { color: var(--stage-4); }
[data-stage="5"] .stage-time-value { color: var(--stage-5); }
[data-stage="6"] .stage-time-value { color: var(--stage-6); }
[data-stage="7"] .stage-time-value { color: var(--stage-7); }
[data-stage="8"] .stage-time-value { color: var(--stage-8); }

/* Audience item left border */
.audience-item[data-stage="1"] { border-left: 3px solid var(--stage-1); }
.audience-item[data-stage="2"] { border-left: 3px solid var(--stage-2); }
.audience-item[data-stage="3"] { border-left: 3px solid var(--stage-3); }
.audience-item[data-stage="4"] { border-left: 3px solid var(--stage-4); }
.audience-item[data-stage="5"] { border-left: 3px solid var(--stage-5); }
.audience-item[data-stage="6"] { border-left: 3px solid var(--stage-6); }
.audience-item[data-stage="7"] { border-left: 3px solid var(--stage-7); }
.audience-item[data-stage="8"] { border-left: 3px solid var(--stage-8); }
