/* ═══════════════════════════════════════════════════════════
   LA GAZZETTA DI KYIV v2.0 — 6-Container Design System
   Pure white. Gold borders. Contradiction-first cards.
   ═══════════════════════════════════════════════════════════ */

/* ── CSS Variables ── */
:root {
  --white: #FFFFFF;
  --gold: #D4AF37;
  --gold-dark: #B8860B;
  --gold-wash: rgba(212, 175, 55, 0.03);
  --gold-wash-hover: rgba(212, 175, 55, 0.06);
  --ink: #111827;
  --ink-body: #374151;
  --ink-light: #6B7280;
  --ink-muted: #9CA3AF;
  --divider: #E5E7EB;
  --red: #DC2626;
  --red-bg: #FEE2E2;
  --amber-bg: #FEF3C7;

  --serif: 'Playfair Display', 'Georgia', serif;
  --body-serif: 'Source Serif 4', 'Georgia', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ── Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
}

a {
  color: var(--ink);
  text-decoration: none;
}
a:hover {
  color: var(--gold-dark);
}

/* ── Masthead (injected by build_site.py) ── */
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--divider);
  background: var(--white);
}

.masthead-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.masthead-name {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.masthead-caduceus,
.masthead-bulava {
  color: var(--gold);
  display: flex;
  align-items: center;
}

/* ── Container Nav Pills ── */
.container-nav {
  display: flex;
  gap: 6px;
  padding: 12px 24px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-bottom: 1px solid var(--divider);
}

.container-pill {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 5px 12px;
  border: 1px solid var(--divider);
  background: var(--white);
  color: var(--ink-light);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.container-pill:hover,
.container-pill.active {
  border-color: var(--gold);
  color: var(--gold-dark);
  background: var(--gold-wash);
}

/* ── Dashboard ── */
.dashboard {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 0 60px 0;
}

.dashboard-intro {
  padding: 28px 24px 20px 24px;
}

.dashboard-tagline {
  font-family: var(--serif);
  font-size: 17px;
  font-style: italic;
  color: var(--ink-light);
  text-align: center;
}

/* ── Narrative Container ── */
.narrative-container {
  background: var(--white);
  border-left: 2px solid var(--gold);
  margin: 0 24px 1px 24px;
  /* NO border-radius. NO box-shadow. The flat line IS the design. */
}

.narrative-container:first-of-type {
  margin-top: 0;
}

/* ── Container Header ── */
.container-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  cursor: pointer;
  user-select: none;
  min-height: 48px;
  transition: background 0.12s ease;
}
.container-header:hover {
  background: var(--gold-wash);
}
.container-header:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: -2px;
}

.container-title {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.container-subtitle {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 400;
  color: var(--ink-light);
  margin-top: 2px;
}

.container-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.container-count {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.container-arrow {
  font-size: 12px;
  color: var(--ink-muted);
  transition: transform 0.2s ease;
}
.narrative-container.expanded .container-arrow {
  transform: rotate(180deg);
}

/* ── Container Body ── */
.container-body {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.2s ease;
}
.narrative-container.expanded .container-body {
  max-height: 8000px;
  opacity: 1;
}

/* ── Story Card ── */
.story-card {
  padding: 14px 24px;
  border-bottom: 1px solid var(--divider);
  border-left: 2px solid var(--gold);
  transition: background 0.1s ease;
}
.story-card:last-child {
  border-bottom: none;
}
.story-card:hover {
  background: var(--gold-wash);
}

.story-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.story-meta {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  color: var(--ink-light);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.source-link {
  color: var(--ink-light);
  text-decoration: none;
}
.source-link:hover {
  color: var(--gold-dark);
  text-decoration: underline;
}

.story-headline {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  margin-bottom: 4px;
}

.story-thesis {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink-body);
  margin-bottom: 6px;
}

/* ── Tier Badge ── */
.tier-badge {
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 2px;
  white-space: nowrap;
  flex-shrink: 0;
}
.tier-contradicted {
  background: var(--red-bg);
  color: var(--red);
}
.tier-divergent {
  background: var(--amber-bg);
  color: var(--gold-dark);
}
.tier-aligned {
  background: #F3F4F6;
  color: var(--ink-light);
}

/* ── Story Tags ── */
.story-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.tag {
  font-family: var(--sans);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 7px;
  border: 1px solid var(--divider);
  color: var(--ink-light);
  background: var(--white);
}

.tag.american-decline,
.tag.china-ascendancy,
.tag.flashpoint { border-color: var(--red); color: var(--red); }
.tag.eu-strategy { border-color: #2563EB; color: #2563EB; }
.tag.global-south { border-color: #059669; color: #059669; }
.tag.russia { border-color: var(--ink-light); color: var(--ink); }

/* ── Empty Container ── */
.container-empty {
  padding: 20px 24px;
  text-align: center;
}
.container-empty p {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-light);
}
.empty-hint {
  font-size: 11px !important;
  color: var(--ink-muted) !important;
  margin-top: 4px;
}

/* ── View All Link ── */
.view-all {
  padding: 12px 24px;
  text-align: right;
}
.view-all a {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  color: var(--gold-dark);
  text-decoration: none;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.view-all a:hover {
  color: var(--ink);
}

/* ── Archive Link ── */
.archive-link {
  text-align: center;
  padding: 32px 24px;
}
.archive-link a {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-light);
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.archive-link a:hover {
  color: var(--gold-dark);
}

/* ── Footer ── */
.footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 24px;
  border-top: 1px solid var(--divider);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-muted);
}
.footer a {
  color: var(--ink-light);
  text-decoration: none;
}
.footer a:hover {
  color: var(--gold-dark);
}

/* ── Mobile Responsive ── */
@media (max-width: 600px) {
  .masthead {
    padding: 12px 16px;
  }
  .masthead-name {
    font-size: 18px;
  }
  .container-nav {
    padding: 10px 16px;
    gap: 4px;
  }
  .container-pill {
    font-size: 9px;
    padding: 4px 10px;
  }
  .narrative-container {
    margin: 0 12px 1px 12px;
  }
  .container-header {
    padding: 16px 18px;
    min-height: 48px;  /* 44px HIG target + 4px safety */
  }
  .container-title {
    font-size: 15px;
  }
  .container-subtitle {
    font-size: 10px;
  }
  .story-card {
    padding: 12px 18px;
  }
  .story-headline {
    font-size: 15px;
  }
  .story-thesis {
    font-size: 12px;
  }
  .dashboard-intro {
    padding: 20px 16px 16px 16px;
  }
  .dashboard-tagline {
    font-size: 15px;
  }
}

/* ── Print ── */
@media print {
  .container-body {
    max-height: none !important;
    opacity: 1 !important;
  }
  .container-arrow { display: none; }
}
