/* ── Variables ────────────────────────────────────────────────────────────── */
:root {
  --c-bg:         #0d0d0d;
  --c-surface:    #141414;
  --c-surface-2:  #1c1c1c;
  --c-border:     #2a2424;
  --c-text:       #e4e0e0;
  --c-text-muted: #9a8e8e;
  --c-accent:     #c8607a;
  --c-accent-dim: rgba(200, 96, 122, .12);

  --c-verdadero:    #3da966;
  --c-falso:        #c43e5e;
  --c-enganoso:     #b07825;
  --c-parcial:      #3890bc;
  --c-nv:           #5c4a52;

  --c-verdadero-bg: rgba(61,  169, 102, .07);
  --c-falso-bg:     rgba(196,  62,  94, .08);
  --c-enganoso-bg:  rgba(176, 120,  37, .07);
  --c-parcial-bg:   rgba(56,  144, 188, .07);
  --c-nv-bg:        rgba(255, 255, 255, .02);

  --sidebar-w: 280px;
  --radius:    6px;
  --radius-sm: 4px;
  --radius-xs: 2px;
  --header-h:  56px;
  --shadow:    0 2px 8px  rgba(0,0,0,.6);
  --shadow-md: 0 6px 20px rgba(0,0,0,.7);
}

/* ── Reset ────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  background: var(--c-bg);
  color: var(--c-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
  padding: 5rem 5vw 4.5rem;
  flex-shrink: 0;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../assets/portada.png') center 30% / cover no-repeat;
  transform: scale(var(--hero-scale, 1));
  transform-origin: center 30%;
  will-change: transform;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(13,13,13,.2)  0%,
    rgba(13,13,13,.6)  55%,
    rgba(13,13,13,1)   100%
  );
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
}
.hero-tagline {
  font-size: .7rem;
  font-weight: 700;
  color: var(--c-text-muted);
  letter-spacing: .18em;
  text-transform: uppercase;
  margin-bottom: .875rem;
}
.hero-title {
  font-size: clamp(3.25rem, 8vw, 5.5rem);
  font-weight: 900;
  letter-spacing: -.04em;
  line-height: 1;
  background: linear-gradient(135deg, #f0b8c4 0%, #c8607a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.125rem;
}
.hero-subtitle {
  font-size: 1.05rem;
  line-height: 1.75;
  color: rgba(232, 210, 216, .78);
  max-width: 460px;
  margin-bottom: 2rem;
}
.hero-actions {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .65rem 1.5rem;
  font-size: .88rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--radius);
  text-decoration: none;
  letter-spacing: .02em;
  transition: background .15s, color .15s, border-color .15s;
  cursor: pointer;
}
.hero-cta--primary {
  background: var(--c-accent);
  border: 1px solid var(--c-accent);
  color: var(--c-bg);
}
.hero-cta--primary:hover {
  background: #d97090;
  border-color: #d97090;
}
.hero-cta--secondary {
  background: var(--c-accent-dim);
  border: 1px solid var(--c-accent);
  color: var(--c-accent);
}
.hero-cta--secondary:hover {
  background: rgba(200,96,122,.22);
}

/* ── Header ───────────────────────────────────────────────────────────────── */
.site-header {
  background: rgba(13,13,13,.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--c-border);
  height: var(--header-h);
  padding: 0 1.75rem;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 10;
  flex-shrink: 0;
}

/* ── Header stats ─────────────────────────────────────────────────────────── */
#header-stats {
  margin-left: auto;
  font-size: .72rem;
  font-weight: 500;
  color: var(--c-text-muted);
  letter-spacing: .02em;
  white-space: nowrap;
}
#header-stats strong {
  color: var(--c-text);
  font-weight: 700;
}

/* ── Tabs ─────────────────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 0; }
.tab-button {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: .5rem 1rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--c-text-muted);
  cursor: pointer;
  transition: color .15s, border-color .15s;
  font-family: inherit;
  letter-spacing: .01em;
  border-radius: 0;
}
.tab-button:hover { color: var(--c-text); }
.tab-button.active {
  color: var(--c-accent);
  border-bottom-color: var(--c-accent);
}

/* ── Views ────────────────────────────────────────────────────────────────── */
.view-container {
  display: none;
  flex: 1;
  overflow: hidden;
  height: calc(100vh - var(--header-h));
  height: calc(100dvh - var(--header-h));
}
.view-container.active      { display: flex; }
.dashboard-view.active      { display: block; }

/* ── Main ─────────────────────────────────────────────────────────────────── */
#main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--c-bg);
}

/* ── Filters bar ──────────────────────────────────────────────────────────── */
#filters {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  padding: .75rem 1.75rem;
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  align-items: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.35);
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}
#filters select {
  padding: .38rem 2rem .38rem 1rem;
  border: 1px solid var(--c-border);
  border-radius: 20px;
  background-color: var(--c-surface-2);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%236a6060' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .75rem center;
  color: var(--c-text);
  font-size: .82rem;
  font-family: inherit;
  cursor: pointer;
  transition: border-color .15s, background-color .15s;
  appearance: none;
  -webkit-appearance: none;
  line-height: 1.4;
}
#filters select:hover  { border-color: var(--c-accent); }
#filters select:focus  { outline: 2px solid rgba(200,96,122,.4); outline-offset: 2px; }
#filters select option {
  background: #1c1c1c;
  color: #e4e0e0;
  padding: .35rem .75rem;
  font-size: .82rem;
}
#filters select optgroup {
  background: #141414;
  color: #6a6060;
  font-size: .75rem;
}
#filter-session { min-width: 200px; font-weight: 600; }

/* ── Search in filters bar ────────────────────────────────────────────────── */
.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.search-icon {
  position: absolute;
  left: .75rem;
  color: var(--c-text-muted);
  pointer-events: none;
  flex-shrink: 0;
}
#search-claim {
  padding: .38rem 1rem .38rem 2.1rem;
  border: 1px solid var(--c-border);
  border-radius: 20px;
  background: var(--c-surface-2);
  color: var(--c-text);
  font-size: .82rem;
  font-family: inherit;
  min-width: 190px;
  transition: border-color .15s, background-color .15s;
  outline: none;
  -webkit-appearance: none;
}
#search-claim::placeholder        { color: var(--c-text-muted); }
#search-claim:hover                { border-color: var(--c-accent); }
#search-claim:focus                { outline: 2px solid rgba(200,96,122,.4); outline-offset: 2px; }
#search-claim::-webkit-search-cancel-button { cursor: pointer; opacity: .5; }

.filter-sep {
  width: 1px;
  height: 1.25rem;
  background: var(--c-border);
  flex-shrink: 0;
  margin: 0 .125rem;
}

/* ── Claims area ──────────────────────────────────────────────────────────── */
#claims-area {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem 1.75rem;
}
#claims-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  align-content: start;
}

/* ── Claim card ───────────────────────────────────────────────────────────── */
.claim-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-top: 3px solid var(--c-nv);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  transition: box-shadow .15s, transform .1s;
  display: flex;
  flex-direction: column;
}
.claim-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

.claim-card[data-resultado="verdadero"] { border-top-color: var(--c-verdadero); background: linear-gradient(180deg, var(--c-verdadero-bg) 0%, var(--c-surface) 35%); }
.claim-card[data-resultado="falso"]     { border-top-color: var(--c-falso);     background: linear-gradient(180deg, var(--c-falso-bg)     0%, var(--c-surface) 35%); }
.claim-card[data-resultado="enganoso"]  { border-top-color: var(--c-enganoso);  background: linear-gradient(180deg, var(--c-enganoso-bg)  0%, var(--c-surface) 35%); }
.claim-card[data-resultado="parcial"]   { border-top-color: var(--c-parcial);   background: linear-gradient(180deg, var(--c-parcial-bg)   0%, var(--c-surface) 35%); }
.claim-card[data-resultado="nv"]        { border-top-color: var(--c-nv);        background: linear-gradient(180deg, var(--c-nv-bg)        0%, var(--c-surface) 35%); }

.claim-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .75rem;
  margin-bottom: .875rem;
  flex-wrap: wrap;
}
.claim-meta-top {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}
.politician-name         { font-weight: 700; font-size: .9rem; color: var(--c-text); }
.politician-name.unknown { color: var(--c-text-muted); font-style: italic; }

.partido-badge, .grupo-badge {
  font-size: .65rem;
  font-weight: 500;
  padding: .15rem .4rem;
  border-radius: var(--radius-xs);
  background: rgba(255,255,255,.05);
  color: var(--c-text-muted);
  border: 1px solid var(--c-border);
  white-space: nowrap;
}

/* ── Resultado badge ──────────────────────────────────────────────────────── */
.resultado-badge {
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .08em;
  padding: .3rem .7rem;
  border-radius: var(--radius-xs);
  white-space: nowrap;
  flex-shrink: 0;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
}
.resultado-badge::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.resultado-verdadero { background: rgba(61,169,102,.15);  color: var(--c-verdadero); border: 1px solid rgba(61,169,102,.4); }
.resultado-falso     { background: rgba(196,62,94,.15);   color: var(--c-falso);     border: 1px solid rgba(196,62,94,.4); }
.resultado-enganoso  { background: rgba(176,120,37,.15);  color: var(--c-enganoso);  border: 1px solid rgba(176,120,37,.4); }
.resultado-parcial   { background: rgba(56,144,188,.15);  color: var(--c-parcial);   border: 1px solid rgba(56,144,188,.4); }
.resultado-nv        { background: rgba(92,74,82,.2);     color: #8a7880;            border: 1px solid rgba(92,74,82,.35); }

/* ── Claim text ───────────────────────────────────────────────────────────── */
.claim-text {
  font-size: .9rem;
  line-height: 1.7;
  color: var(--c-text);
  padding: 0 0 .875rem 2.25rem;
  margin-bottom: 0;
  cursor: help;
  font-style: italic;
  flex: 1;
  position: relative;
}
.claim-text::before {
  content: '\201C';
  position: absolute;
  left: -.1rem;
  top: -.55rem;
  font-size: 3.5rem;
  line-height: 1;
  font-weight: 900;
  font-style: normal;
  color: var(--c-accent);
  opacity: .35;
  font-family: Georgia, 'Times New Roman', serif;
  pointer-events: none;
  user-select: none;
}

/* ── Confidence bar ───────────────────────────────────────────────────────── */
.confidence-bar {
  display: flex;
  align-items: center;
  gap: .625rem;
  margin-bottom: .75rem;
}
.confidence-track {
  width: 110px;
  height: 4px;
  background: var(--c-border);
  border-radius: 99px;
  overflow: hidden;
  flex-shrink: 0;
}
.confidence-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--c-accent);
}
.confidence-fill.confidence-verdadero { background: var(--c-verdadero); }
.confidence-fill.confidence-falso     { background: var(--c-falso); }
.confidence-fill.confidence-enganoso  { background: var(--c-enganoso); }
.confidence-fill.confidence-parcial   { background: var(--c-parcial); }
.confidence-fill.confidence-nv        { background: var(--c-nv); }
.confidence-label { font-size: .68rem; color: var(--c-text-muted); font-weight: 500; }

/* ── Tags ─────────────────────────────────────────────────────────────────── */
.claim-tags {
  display: flex;
  gap: .3rem;
  flex-wrap: wrap;
  margin-bottom: .75rem;
}
.tag {
  font-size: .65rem;
  font-weight: 600;
  padding: .18rem .45rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--c-border);
  color: var(--c-text-muted);
  background: rgba(255,255,255,.03);
  letter-spacing: .01em;
}
.tag-tematico { background: rgba(200,96,122,.08);  border-color: rgba(200,96,122,.22);  color: #e8a0b0; }
.tag-geo      { background: rgba(56,144,188,.07);  border-color: rgba(56,144,188,.22);  color: #5bbde0; }
.tag-tipo     { background: rgba(61,169,102,.07);  border-color: rgba(61,169,102,.22);  color: #70cc90; }

/* ── Detail section ───────────────────────────────────────────────────────── */
.claim-detail {
  display: none;
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: .875rem 1rem;
  margin-top: .75rem;
}
.claim-detail.open { display: block; }
.claim-detail dl   { display: flex; flex-direction: column; gap: .75rem; }

.detail-row dt {
  font-size: .6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--c-text-muted);
  margin-bottom: .2rem;
}
.detail-row dd { font-size: .875rem; line-height: 1.6; color: var(--c-text); }

.detail-errores dd {
  background: rgba(196,62,94,.08);
  border: 1px solid rgba(196,62,94,.2);
  border-radius: var(--radius-sm);
  padding: .5rem .75rem;
  color: var(--c-falso);
}
.detail-errores dd em { font-style: italic; }
.detail-errores dt    { color: var(--c-falso); }

.detail-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.detail-list li {
  padding-left: 1rem;
  position: relative;
  font-size: .875rem;
  line-height: 1.6;
  color: var(--c-text);
}
.detail-list li::before {
  content: '•';
  position: absolute;
  left: .2rem;
  font-weight: 700;
  color: var(--c-accent);
}
.detail-list.omisiones li::before { color: var(--c-enganoso); }
.detail-list.fuentes   li::before { color: var(--c-parcial); }

/* ── Source links ─────────────────────────────────────────────────────────── */
.source-link { color: var(--c-parcial); text-decoration: none; font-weight: 600; font-size: .875rem; }
.source-link:hover { text-decoration: underline; }
.source-dato {
  display: block;
  font-size: .78rem;
  color: var(--c-text-muted);
  font-style: italic;
  margin-top: .15rem;
  line-height: 1.5;
}

/* ── Fuente tipo badge ────────────────────────────────────────────────────── */
.source-tipo {
  display: inline-block;
  font-size: .57rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: .1rem .38rem;
  border-radius: 3px;
  margin-right: .45rem;
  vertical-align: middle;
  position: relative;
  top: -.05em;
  flex-shrink: 0;
}
.source-tipo--primaria {
  background: rgba(200,96,122,.15);
  border: 1px solid rgba(200,96,122,.35);
  color: var(--c-accent);
}
.source-tipo--academica {
  background: rgba(176,120,37,.12);
  border: 1px solid rgba(176,120,37,.3);
  color: var(--c-enganoso);
}
.source-tipo--secundaria {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--c-border);
  color: var(--c-text-muted);
}
.source-tipo--terciaria {
  background: rgba(255,255,255,.03);
  border: 1px solid var(--c-border);
  color: var(--c-text-muted);
  opacity: .65;
}

/* ── Primary source item highlight ───────────────────────────────────────── */
.fuente-item--primary {
  border-left: 2px solid rgba(200,96,122,.35);
  padding-left: calc(1rem - 2px);
  background: rgba(200,96,122,.04);
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  margin-left: -.2rem;
  padding-right: .35rem;
  padding-top: .2rem;
  padding-bottom: .2rem;
}
.fuente-item--primary::before { color: var(--c-accent) !important; }

/* ── Toggle button ────────────────────────────────────────────────────────── */
.claim-toggle {
  background: none;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-xs);
  padding: .3rem .875rem;
  font-size: .75rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--c-text-muted);
  cursor: pointer;
  margin-top: .75rem;
  transition: border-color .12s, color .12s;
  align-self: flex-start;
}
.claim-toggle:hover { border-color: var(--c-accent); color: var(--c-accent); }

/* ── States ───────────────────────────────────────────────────────────────── */
.loading, .empty, .error {
  padding: 3rem;
  text-align: center;
  color: var(--c-text-muted);
  font-size: .9rem;
  grid-column: 1 / -1;
}
.error { color: var(--c-falso); }

@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .35 } }
.loading { animation: pulse 1.6s ease-in-out infinite; }

/* ── Welcome state ────────────────────────────────────────────────────────── */
.welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 55vh;
  gap: 1.5rem;
  color: var(--c-text-muted);
  text-align: center;
  padding: 2rem;
  grid-column: 1 / -1;
}
.welcome svg { opacity: .1; }
.welcome p   { max-width: 280px; font-size: .9rem; line-height: 1.7; }

/* ── Dashboard ────────────────────────────────────────────────────────────── */
.dashboard-view {
  overflow-y: auto;
  background: var(--c-bg);
  padding: 2rem 1.75rem;
  height: calc(100vh - var(--header-h));
  height: calc(100dvh - var(--header-h));
}
.dashboard-content {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}
.dashboard-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--c-text);
  margin-bottom: 2rem;
  letter-spacing: -.02em;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}
.dashboard-grid.hidden { display: none; }

.stat-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-top: 3px solid var(--c-accent);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: .4rem;
  transition: transform .15s, box-shadow .15s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-title {
  font-size: .6rem;
  font-weight: 700;
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: .13em;
}
.stat-value {
  font-size: 1.9rem;
  font-weight: 900;
  color: var(--c-text);
  line-height: 1.2;
  letter-spacing: -.03em;
}
.stat-subtitle { font-size: .82rem; color: var(--c-text-muted); }
.stat-subtitle.falso-subtitle { color: var(--c-falso); font-weight: 500; }
.stat-desc { font-size: .72rem; color: var(--c-text-muted); line-height: 1.5; margin-top: .4rem; font-style: italic; opacity: .75; }

.stat-card--list { grid-column: 1 / -1; }
.stat-list { display: flex; flex-direction: column; gap: .5rem; margin-top: .5rem; }
.stat-list-row { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; font-size: 1rem; }
.stat-list-tema { color: var(--c-text); }
.stat-list-partido { color: var(--c-accent); font-weight: 700; font-size: .9rem; white-space: nowrap; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--c-bg);
  border-top: 1px solid var(--c-border);
  padding: .875rem 1.75rem;
  text-align: center;
  flex-shrink: 0;
}
.site-footer p { font-size: .7rem; color: var(--c-text-muted); line-height: 1.6; }
.footer-email, .footer-link {
  color: var(--c-text-muted);
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}
.footer-email:hover, .footer-link:hover { color: var(--c-accent); }

/* ── Donation buttons ─────────────────────────────────────────────────────── */
.donate-btn {
  display: inline;
  padding: 0.15rem 0.55rem;
  font-size: inherit;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid var(--c-accent);
  color: var(--c-accent);
  text-decoration: none;
  vertical-align: middle;
  transition: background 0.15s, color 0.15s;
}
.donate-btn:hover {
  background: var(--c-accent);
  color: var(--c-bg);
}

/* ── Modal ────────────────────────────────────────────────────────────────── */
#modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
#modal-overlay.open { display: flex; }

#modal-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-top: 3px solid var(--c-nv);
  border-radius: var(--radius);
  max-width: 680px;
  width: 100%;
  max-height: 88vh;
  max-height: 88dvh;
  overflow-y: auto;
  padding: 2rem 2rem 1.75rem;
  position: relative;
  box-shadow: 0 24px 64px rgba(0,0,0,.85);
  animation: modal-in .15s ease;
}
#modal-content {
  padding-top: 1.25rem;
}
#modal-card[data-resultado="verdadero"] { border-top-color: var(--c-verdadero); }
#modal-card[data-resultado="falso"]     { border-top-color: var(--c-falso); }
#modal-card[data-resultado="enganoso"]  { border-top-color: var(--c-enganoso); }
#modal-card[data-resultado="parcial"]   { border-top-color: var(--c-parcial); }

#modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-xs);
  color: var(--c-text-muted);
  font-size: .85rem;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .12s, color .12s;
  flex-shrink: 0;
}
#modal-close:hover { background: rgba(255,255,255,.12); color: var(--c-text); }

.modal-claim-text {
  font-size: .95rem;
  line-height: 1.75;
}

.modal-detail-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border-top: 1px solid var(--c-border);
  padding-top: 1.25rem;
  margin-top: .25rem;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  #claims-container { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .view-container { flex-direction: column; height: auto; overflow: auto; }
  #sidebar {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--c-border);
    max-height: 36dvh;
    overflow-y: auto;
  }
  #main { overflow: visible; }
  #claims-area { overflow-y: visible; }
  #claims-container { grid-template-columns: 1fr; }
  .claim-header { flex-direction: column; }
  .brand-tag { display: none; }
  .hero { padding: 3rem 5vw 3rem; align-items: center; text-align: center; }
  .hero::before { background-position: 35% 30%; }
  .hero-content { max-width: 100%; }
  .hero-subtitle { max-width: 100%; text-align: right; }
  .hero-actions { justify-content: center; }
  .dashboard-view { height: auto; }

  .site-header {
    flex-direction: column;
    height: auto;
    padding: 0;
    align-items: stretch;
  }
  .tabs { padding: 0 1rem; height: var(--header-h); }
  #header-stats {
    order: -1;
    margin-left: 0;
    text-align: center;
    padding: .3rem 1rem;
    font-size: .68rem;
    border-bottom: 1px solid var(--c-border);
  }
  #header-stats:empty { display: none; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 2.75rem; }
  .site-header { padding: 0 1rem; }
}
