/* Archivo: static/style.css
 * Estilo "Retrodiario Moderno" para La Gran Crisis
 * Tipografía: Merriweather (serif) + IBM Plex Mono (monospace)
 */

:root {
  --bg: #FDFBF6;        /* Papel envejecido */
  --paper: #FFFFFF;
  --ink: #1A1A1A;
  --muted: #555555;
  --accent: #8B4513;    /* Marrón retro */
  --accent-light: #D2B48C;
  --success: #2E7D32;
  --warning: #ED6C02;
  --error: #C62828;
  
  --font-serif: 'Merriweather', Georgia, serif;
  --font-mono: 'IBM Plex Mono', monospace;
  
  --border: 2px solid var(--ink);
  --shadow: 3px 3px 0 rgba(0,0,0,0.1);
}

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-serif);
  line-height: 1.6;
  padding: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

/* ========== HEADER ========== */
.masthead {
  border-bottom: var(--border);
  padding-bottom: 1.5rem;
  margin-bottom: 2.5rem;
  text-align: center;
}

.masthead h1 {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 2.2rem;
  letter-spacing: -1px;
  margin-bottom: 0.3rem;
  color: var(--ink);
}

.tagline {
  font-style: italic;
  color: var(--muted);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.date {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--accent);
  font-weight: 500;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  border: 1px solid currentColor;
  border-radius: 3px;
  margin-left: 0.75rem;
}

.badge.fallback {
  color: var(--warning);
}

/* ========== RESUMEN EJECUTIVO ========== */
.executive-summary {
  background: var(--paper);
  border-left: 5px solid var(--accent);
  padding: 1.5rem;
  margin-bottom: 3rem;
  box-shadow: var(--shadow);
}

.executive-summary h2 {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
  color: var(--ink);
}

.executive-summary p {
  font-size: 1.05rem;
  line-height: 1.7;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

/* ========== SECCIONES DE NOTICIAS ========== */
.news-section {
  margin-bottom: 3rem;
}

.news-section h3 {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
  border-bottom: 2px dashed var(--muted);
  padding-bottom: 0.6rem;
  margin-bottom: 1.2rem;
}

/* ========== TARJETAS DE NOTICIAS ========== */
.card {
  background: var(--paper);
  border: var(--border);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
  transition: all 0.15s ease;
}

.card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 rgba(0,0,0,0.15);
}

.card.unverified {
  border-left: 5px solid var(--warning);
}

.card.verified {
  border-left: 5px solid var(--success);
}

.card h4 {
  font-size: 1.2rem;
  margin-bottom: 0.6rem;
  line-height: 1.35;
  font-weight: 700;
}

.card .summary {
  color: var(--muted);
  margin-bottom: 1rem;
  font-size: 1rem;
  line-height: 1.6;
}

/* ========== METADATOS ========== */
.meta {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.meta .impact {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}

.impact.alto {
  color: var(--error);
}

.impact.medio {
  color: var(--warning);
}

.impact.bajo {
  color: var(--success);
}

.meta .source {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.meta a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dotted var(--accent);
}

.meta a:hover {
  border-bottom-style: solid;
}

/* ========== NOTAS / ALERTAS ========== */
.notes {
  background: var(--paper);
  border: 1px dashed var(--muted);
  padding: 1.25rem;
  margin: 2.5rem 0;
  font-size: 0.95rem;
}

.notes details {
  margin-bottom: 0.75rem;
}

.notes details:last-child {
  margin-bottom: 0;
}

.notes summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 600;
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.notes summary:hover {
  text-decoration: underline;
}

.notes ul {
  margin-left: 1.5rem;
  margin-top: 0.5rem;
  color: var(--muted);
}

.notes li {
  margin-bottom: 0.4rem;
}

/* ========== FOOTER ========== */
footer {
  border-top: var(--border);
  padding-top: 2rem;
  margin-top: 4rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--muted);
}

footer a {
  color: var(--accent);
  text-decoration: none;
  margin: 0 0.5rem;
}

/* ========== FEED PLANO (plantilla diaria actual) ========== */
.news-item {
  border-bottom: var(--border);
  padding: 1rem 0 2rem;
  margin-bottom: 2rem;
}

.item-headline {
  display: block;
  max-width: 100%;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

footer a:hover {
  text-decoration: underline;
}

/* ========== ÍNDICE / ARCHIVO ========== */
.index-list {
  list-style: none;
  padding: 0;
}

.index-list li {
  margin: 0.6rem 0;
  padding: 0.6rem 1rem;
  border-bottom: 1px dashed var(--muted);
}

.index-list a {
  color: var(--accent);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.95rem;
}

.index-list a:hover {
  text-decoration: underline;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  body {
    padding: 1.25rem;
  }
  
  .masthead h1 {
    font-size: 1.8rem;
  }
  
  .meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .card {
    padding: 1rem;
  }
  
  .executive-summary {
    padding: 1.2rem;
  }
}

/* ========== UTILIDADES ========== */
.text-mono {
  font-family: var(--font-mono);
}

.text-small {
  font-size: 0.85rem;
}

.mt-2 {
  margin-top: 2rem;
}
/* ========== NEWSPAPER LAYOUT OVERRIDES (2026-04-27) ========== */
body {
  max-width: 1240px;
}

.masthead {
  border-bottom: 3px double var(--ink);
  padding-bottom: 1rem;
}

.masthead h1 {
  font-family: "UnifrakturCook", "Old English Text MT", "UnifrakturMaguntia", var(--font-serif);
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  letter-spacing: 0.5px;
  line-height: 1;
  margin-bottom: 0.45rem;
  text-transform: none;
}

.tagline {
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.executive-summary {
  border: var(--border);
  border-left: 6px solid var(--accent);
}

.news-feed {
  display: block;
}

.news-group {
  margin-bottom: 2.2rem;
  padding-bottom: 0.2rem;
  column-count: 3;
  column-gap: 1.7rem;
  column-rule: 1px solid var(--accent-light);
}

.news-group + .news-group {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 3px double var(--ink);
}

.news-group > h2 {
  column-span: all;
  font-family: var(--font-mono);
  font-size: clamp(2rem, 4vw, 2.6rem);
  line-height: 1;
  margin: 0 0 1rem;
  letter-spacing: -0.03em;
}

.news-item {
  display: inline-block;
  width: 100%;
  break-inside: avoid;
  border-bottom: 1px solid var(--ink);
  margin: 0 0 1.35rem;
  padding: 0 0 1.1rem;
}

.item-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.55rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.tag-dynamic {
  border: 1px solid var(--accent-light);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 0.1rem 0.35rem;
  text-transform: uppercase;
}

.item-headline {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  font-size: clamp(1.18rem, 1.6vw, 1.46rem);
  line-height: 1.15;
  margin: 0.2rem 0 0.58rem;
  font-weight: 800;
  text-wrap: balance;
}

.item-summary {
  font-size: 0.95rem;
  line-height: 1.58;
  color: var(--ink);
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

.item-meta {
  margin-top: 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.source-link {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dotted var(--accent);
}

.source-link:hover {
  border-bottom-style: solid;
}

@media (max-width: 1100px) {
  .news-group {
    column-count: 2;
  }
}

@media (max-width: 768px) {
  .news-group {
    column-count: 1;
    column-rule: none;
  }

  .masthead h1 {
    font-size: clamp(2.05rem, 9vw, 3rem);
  }

  .item-headline {
    font-size: 1.25rem;
  }
}

/* ========== LABEL SIZE TUNING (2026-04-27) ========== */
.news-item .badge {
  font-size: 0.375rem;
  padding: 0.08rem 0.3rem;
  margin-left: 0;
  border-radius: 2px;
}

.news-item .tag-dynamic {
  font-size: 0.34rem;
  padding: 0.05rem 0.18rem;
  line-height: 1.2;
}

/* ========== LOOK VARIANTS PREVIEW (2026-04-27) ========== */
body.look-financial .masthead h1 {
  font-family: "Cinzel", "Times New Roman", var(--font-serif);
  font-size: clamp(2.2rem, 5.2vw, 3.9rem);
  letter-spacing: 0.2px;
}

body.look-financial .news-group {
  column-gap: 1.35rem;
}

body.look-financial .item-headline {
  font-size: clamp(1.05rem, 1.35vw, 1.24rem);
  line-height: 1.2;
}

body.look-historic .masthead h1 {
  font-family: "UnifrakturCook", "Old English Text MT", var(--font-serif);
  font-size: clamp(2.7rem, 6.8vw, 5rem);
  letter-spacing: 0.6px;
}

body.look-historic .news-group {
  column-gap: 1.95rem;
  column-rule: 2px double var(--accent-light);
}

body.look-historic .item-headline {
  font-size: clamp(1.22rem, 1.75vw, 1.58rem);
  line-height: 1.12;
}




