:root {
  --ink: #14181F;
  --ink-2: #1D232D;
  --ink-line: #333B47;
  --paper: #E8E1CE;
  --paper-2: #DED5BC;
  --paper-text: #2A2419;
  --paper-text-soft: #5B5340;
  --stamp-red: #A13328;
  --stamp-red-bg: #F3E3E0;
  --stamp-violet: #574A87;
  --stamp-violet-bg: #E6E2F0;
  --amber: #D98F2B;
  --amber-soft: #F0D4A3;
  --font-type: 'Special Elite', monospace;
  --font-serif: 'Source Serif 4', serif;
  --font-mono: 'IBM Plex Mono', monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-serif);
  line-height: 1.6;
}

a { color: inherit; }

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.wrap-narrow {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */

header {
  border-bottom: 1px solid var(--ink-line);
  padding: 20px 0;
  position: relative;
}

header .wrap, header .wrap-narrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Botón de menú (solo visible en móvil) */
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--ink-line);
  color: var(--paper);
  width: 36px;
  height: 36px;
  border-radius: 4px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.menu-toggle:hover { border-color: var(--amber); color: var(--amber); }

/* Menú desplegable en móvil */
.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 24px;
  margin-top: 8px;
  background: var(--ink-2);
  border: 1px solid var(--ink-line);
  border-radius: 4px;
  padding: 8px;
  flex-direction: column;
  min-width: 180px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.4);
  z-index: 20;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-family: var(--font-mono);
  font-size: 13px;
  color: #A9A290;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 3px;
}
.mobile-menu a:hover { background: var(--ink); color: var(--amber); }

.logo {
  font-family: var(--font-type);
  font-size: 18px;
  letter-spacing: 0.5px;
  color: var(--paper);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-shrink: 1;
}

.logo .logo-text {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  min-width: 0;
}

.logo .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  display: inline-block;
  flex-shrink: 0;
}

nav a, .back-link {
  font-family: var(--font-mono);
  font-size: 13px;
  text-decoration: none;
  color: #A9A290;
  margin-left: 28px;
  letter-spacing: 0.3px;
}
.back-link { flex-shrink: 0; white-space: nowrap; }
nav a:hover, .back-link:hover { color: var(--amber); }

/* ---------- Hero (home) ---------- */

.hero {
  padding: 88px 0 64px;
  border-bottom: 1px solid var(--ink-line);
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--amber);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin: 0 0 18px;
}

h1.hero-title {
  font-family: var(--font-type);
  font-size: 40px;
  line-height: 1.35;
  color: var(--paper);
  max-width: 720px;
  margin: 0 0 22px;
  font-weight: 400;
}

.hero-title .cursor {
  display: inline-block;
  width: 12px;
  height: 34px;
  background: var(--amber);
  vertical-align: -6px;
  animation: blink 1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.hero-sub {
  max-width: 560px;
  color: #B8B2A0;
  font-size: 17px;
  margin: 0 0 40px;
}

.hero-sub strong { color: var(--paper); font-weight: 600; }

/* ---------- Panel "nueva entrevista" ---------- */

.typewriter-panel {
  background: var(--paper);
  color: var(--paper-text);
  border-radius: 3px;
  padding: 28px;
  max-width: 620px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.35);
  position: relative;
}

.typewriter-panel::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 24px;
  width: 46px;
  height: 20px;
  background: var(--amber);
  clip-path: polygon(0 0, 100% 0, 88% 100%, 12% 100%);
}

.panel-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--paper-text-soft);
  margin: 0 0 14px;
}

.input-row { display: flex; gap: 10px; }

.input-row input {
  flex: 1;
  font-family: var(--font-serif);
  font-size: 17px;
  padding: 13px 14px;
  border: 1px solid #C9BFA0;
  border-radius: 2px;
  background: #FBF8F0;
  color: var(--paper-text);
}

.input-row input:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px var(--amber-soft);
}

.btn-type {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.4px;
  background: var(--ink);
  color: var(--paper);
  border: none;
  border-radius: 2px;
  padding: 0 22px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.btn-type:hover { background: #262D39; }
.btn-type:active { transform: translateY(1px); }
.btn-type:disabled { opacity: 0.5; cursor: default; }

.hint {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--paper-text-soft);
  margin: 12px 0 0;
}

.error-line {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--stamp-red);
  margin-top: 14px;
  display: none;
}
.error-line.show { display: block; }

.status-line {
  font-family: var(--font-mono);
  font-size: 13px;
  margin-top: 14px;
  display: none;
  align-items: center;
  gap: 8px;
}
.status-line.show { display: flex; }
.status-line .spinner {
  width: 12px; height: 12px;
  border: 2px solid var(--paper-text-soft);
  border-top-color: var(--amber);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Leyenda REAL / RECREACIÓN ---------- */

.legend { padding: 48px 0; border-bottom: 1px solid var(--ink-line); }

.legend-title {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #7C7566;
  margin: 0 0 20px;
}

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

.legend-item { display: flex; gap: 14px; align-items: flex-start; }

.stamp {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.6px;
  padding: 5px 10px;
  border-radius: 3px;
  border: 1.5px solid currentColor;
  text-transform: uppercase;
  transform: rotate(-3deg);
  display: inline-block;
  white-space: nowrap;
  flex-shrink: 0;
}
.stamp.real { color: var(--stamp-red); background: var(--stamp-red-bg); }
.stamp.simulada { color: var(--stamp-violet); background: var(--stamp-violet-bg); transform: rotate(2deg); }
.stamp.lg { font-size: 11px; padding: 6px 12px; }

.legend-text p { margin: 6px 0 0; font-size: 14.5px; color: #A9A290; max-width: 380px; }

/* ---------- Listado / grid de tarjetas ---------- */

.listado { padding: 56px 0 80px; }

.listado-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}

.listado-head h2 {
  font-family: var(--font-type);
  font-size: 22px;
  font-weight: 400;
  margin: 0;
  color: var(--paper);
}

.toggle { display: flex; gap: 6px; font-family: var(--font-mono); font-size: 12.5px; }

.toggle button {
  background: none;
  border: 1px solid var(--ink-line);
  color: #A9A290;
  padding: 7px 14px;
  border-radius: 2px;
  cursor: pointer;
}
.toggle button.active { background: var(--paper); color: var(--paper-text); border-color: var(--paper); }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.grid-empty {
  font-family: var(--font-mono);
  font-size: 13px;
  color: #6B6455;
  padding: 40px 0;
}

.card {
  background: var(--paper);
  color: var(--paper-text);
  border-radius: 3px;
  padding: 22px;
  position: relative;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  border-top: 3px solid var(--paper-2);
  text-decoration: none;
  display: block;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(0,0,0,0.3); }

.card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }

.card-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--paper-text-soft);
}

.card h3 { font-family: var(--font-serif); font-size: 20px; font-weight: 600; margin: 4px 0 10px; color: var(--paper-text); }

.card p.snippet {
  font-size: 14.5px;
  color: var(--paper-text-soft);
  margin: 0 0 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--paper-text-soft);
  border-top: 1px solid #D3C9AC;
  padding-top: 12px;
}
.card-foot .reads { display: flex; align-items: center; gap: 5px; }
.card-foot .reads svg { width: 13px; height: 13px; opacity: 0.7; }

/* ---------- Ficha de cabecera (detalle) ---------- */

.expediente-head { padding: 56px 0 32px; border-bottom: 1px solid var(--ink-line); }

.breadcrumb { font-family: var(--font-mono); font-size: 12px; color: #6B6455; margin: 0 0 20px; }
.breadcrumb a { color: #6B6455; text-decoration: none; }
.breadcrumb a:hover { color: var(--amber); }

.head-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }

h1.subject-name { font-family: var(--font-type); font-size: 34px; font-weight: 400; margin: 0; color: var(--paper); line-height: 1.25; }

.meta-row { display: flex; gap: 20px; flex-wrap: wrap; font-family: var(--font-mono); font-size: 12.5px; color: #A9A290; }
.meta-row .item { display: flex; align-items: center; gap: 6px; }
.meta-row svg { width: 14px; height: 14px; opacity: 0.75; }

.disclaimer-box {
  margin-top: 22px;
  background: var(--stamp-violet-bg);
  color: #3A3159;
  border-left: 3px solid var(--stamp-violet);
  padding: 14px 16px;
  font-size: 13.5px;
  border-radius: 0 3px 3px 0;
}
.disclaimer-box strong { display: block; font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 5px; }

/* ---------- Bloques de entrevista ---------- */

.transcript { padding: 48px 0 40px; }

.qa-block { margin-bottom: 40px; }

.qa-context { font-family: var(--font-mono); font-size: 11.5px; color: #6B6455; text-transform: uppercase; letter-spacing: 0.5px; margin: 0 0 12px; }

.qa-question { font-family: var(--font-serif); font-weight: 700; font-size: 17px; color: var(--paper); margin: 0 0 10px; padding-left: 18px; border-left: 2px solid var(--amber); }

.qa-answer { font-size: 16.5px; color: #D6D0BE; margin: 0; padding-left: 18px; }
.qa-answer strong { color: var(--paper); font-weight: 700; background: rgba(217,143,43,0.12); padding: 1px 3px; border-radius: 2px; }

.qa-source { font-family: var(--font-mono); font-size: 11.5px; color: #6B6455; margin: 10px 0 0; padding-left: 18px; }
.qa-source a { color: var(--amber); text-decoration: none; }
.qa-source a:hover { text-decoration: underline; }

/* ---------- Votación ---------- */

.vote-box {
  border-top: 1px solid var(--ink-line);
  border-bottom: 1px solid var(--ink-line);
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.vote-label { font-family: var(--font-mono); font-size: 13px; color: #A9A290; }
.vote-buttons { display: flex; gap: 10px; }

.vote-btn {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--ink-2);
  border: 1px solid var(--ink-line);
  color: var(--paper);
  padding: 9px 16px;
  border-radius: 3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
}
.vote-btn:hover { border-color: var(--amber); color: var(--amber); }
.vote-btn svg { width: 14px; height: 14px; }
.vote-btn.voted { border-color: var(--amber); color: var(--amber); background: rgba(217,143,43,0.1); }
.vote-btn:disabled { cursor: default; opacity: 0.7; }

/* ---------- Fuentes ---------- */

.sources { padding: 32px 0 60px; }

.sources-title { font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: #6B6455; margin: 0 0 16px; }

.source-item {
  font-size: 13.5px;
  padding: 10px 0;
  border-bottom: 1px solid var(--ink-line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.source-item a { color: var(--amber); text-decoration: none; }
.source-item a:hover { text-decoration: underline; }
.source-item span { color: #6B6455; font-family: var(--font-mono); font-size: 11.5px; white-space: nowrap; }

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--ink-line);
  padding: 28px 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #6B6455;
}
footer .wrap { display: flex; justify-content: space-between; }
footer.centered { text-align: center; }

@media (max-width: 720px) {
  .grid { grid-template-columns: 1fr; }
  .legend-grid { grid-template-columns: 1fr; }
  h1.hero-title { font-size: 30px; }
  .input-row { flex-direction: column; }
  h1.subject-name { font-size: 26px; }
  .head-top { flex-direction: column; }
  .vote-box { flex-direction: column; align-items: flex-start; }

  header nav { display: none; }
  .menu-toggle { display: flex; }
  .logo { font-size: 14px; gap: 7px; }
}
