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

:root {
  --navy:   #0d1b2a;
  --ink:    #1a1a2e;
  --slate:  #2c3e50;
  --gold:   #c9a84c;
  --gold-lt:#e8c97a;
  --cream:  #faf8f3;
  --paper:  #f5f2eb;
  --rule:   #d4cfc4;
  --red:    #c0392b;
  --text:   #1c1c1c;
  --muted:  #6b6b6b;
  --serif:  'Georgia', 'Times New Roman', serif;
  --sans:   'Helvetica Neue', Arial, sans-serif;
  --mono:   'Courier New', monospace;
}

html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--text);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; }

/* ── Header ───────────────────────────────────── */
.site-header {
  background: var(--navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.header-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(201,168,76,0.3);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.55);
}

.header-nav { display: flex; gap: 20px; }
.header-nav a {
  color: rgba(255,255,255,0.6);
  transition: color 0.2s;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.header-nav a:hover { color: var(--gold-lt); }

.masthead { text-align: center; padding: 18px 0 14px; }

.masthead-rule {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 0 auto 12px;
  width: 60%;
}

.site-title {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
  line-height: 1;
}

.site-tagline {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 6px;
}

.category-bar {
  display: flex;
  gap: 0;
  overflow-x: auto;
  border-top: 1px solid rgba(201,168,76,0.2);
  padding: 0;
  scrollbar-width: none;
}
.category-bar::-webkit-scrollbar { display: none; }

.cat-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 10px 16px;
  white-space: nowrap;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
}
.cat-btn:hover { color: rgba(255,255,255,0.85); }
.cat-btn.active {
  color: var(--gold-lt);
  border-bottom-color: var(--gold);
}

/* ── Main layout ──────────────────────────────── */
.site-main { padding: 40px 0 80px; }
.main-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.section-label {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  border-top: 2px solid var(--navy);
  padding-top: 8px;
  margin-bottom: 20px;
}

/* ── Featured Article ─────────────────────────── */
.featured-section { margin-bottom: 48px; }

.featured-card {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  background: #fff;
  border: 1px solid var(--rule);
  padding: 36px;
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
  cursor: pointer;
  transition: box-shadow 0.2s;
}
.featured-card:hover { box-shadow: 0 4px 32px rgba(0,0,0,0.12); }

.featured-category {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 12px;
}

.featured-headline {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 12px;
  color: var(--ink);
}

.featured-subheadline {
  font-family: var(--sans);
  font-size: 15px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 20px;
  font-style: italic;
}

.featured-body {
  font-size: 15px;
  line-height: 1.75;
  color: #333;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.featured-meta {
  margin-top: 20px;
  display: flex;
  gap: 16px;
  align-items: center;
}

.featured-sidebar {
  border-left: 1px solid var(--rule);
  padding-left: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.stat-block { }
.stat-label {
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.stat-value {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: bold;
  color: var(--navy);
}
.stat-sub {
  font-family: var(--sans);
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}

.impact-badge {
  display: inline-block;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 2px;
  font-weight: 700;
}
.impact-Very\ High, .impact-VeryHigh { background: #c0392b; color: #fff; }
.impact-High   { background: var(--navy); color: #fff; }
.impact-Medium { background: var(--gold); color: var(--navy); }
.impact-Low    { background: var(--rule); color: var(--muted); }

.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag {
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 2px 7px;
  border-radius: 2px;
  color: var(--muted);
}

.read-more {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy);
  border-bottom: 1px solid var(--navy);
  padding-bottom: 1px;
}

/* ── Content columns ──────────────────────────── */
.content-columns {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 40px;
  align-items: start;
}

/* ── Articles grid ────────────────────────────── */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

.article-card {
  background: #fff;
  padding: 24px;
  cursor: pointer;
  transition: background 0.15s;
}
.article-card:hover { background: var(--paper); }

.article-category {
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 8px;
}

.article-headline {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
  color: var(--ink);
}

.article-subheadline {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  font-style: italic;
  margin-bottom: 12px;
}

.article-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
}

.article-date {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
}

/* ── Sidebar ──────────────────────────────────── */
.sidebar { display: flex; flex-direction: column; gap: 28px; }

.sidebar-widget {
  background: #fff;
  border: 1px solid var(--rule);
  padding: 20px;
}

.widget-label {
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 8px;
  margin-bottom: 16px;
}

.sidebar-text {
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.6;
  color: #444;
  margin-bottom: 10px;
}

/* ── 2x2 Matrix ───────────────────────────────── */
.confidence-matrix { position: relative; padding: 12px 0 24px 20px; }

.matrix-label-top {
  font-family: var(--sans);
  font-size: 9px;
  color: var(--muted);
  text-align: center;
  margin-bottom: 6px;
  letter-spacing: 0.08em;
}

.matrix-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 3px;
  border: 1px solid var(--rule);
}

.matrix-cell {
  padding: 12px 10px;
  font-family: var(--sans);
  font-size: 10px;
  line-height: 1.3;
  color: var(--muted);
  background: var(--paper);
  text-align: center;
}

.highlight-cell {
  background: var(--navy);
  color: var(--gold-lt);
  font-weight: 700;
}

.matrix-axis {
  font-family: var(--sans);
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.y-axis {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  position: absolute;
  left: 0;
  top: 40%;
}

.x-axis { text-align: center; margin-top: 6px; }

/* ── KPI list ─────────────────────────────────── */
.kpi-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px dotted var(--rule);
  font-family: var(--sans);
  font-size: 11px;
}
.kpi-item:last-child { border-bottom: none; }
.kpi-label { color: var(--muted); }
.kpi-value { font-family: var(--mono); font-weight: bold; color: var(--navy); }

/* ── Impact bars ──────────────────────────────── */
.impact-bar-row { margin-bottom: 10px; }
.impact-bar-label {
  font-family: var(--sans);
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
}
.impact-bar-track {
  height: 6px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 1px;
}
.impact-bar-fill {
  height: 100%;
  background: var(--navy);
  border-radius: 1px;
  transition: width 0.6s ease;
}

/* ── Archive ──────────────────────────────────── */
.archive-section { margin-top: 48px; }

.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

.archive-card {
  background: var(--paper);
  padding: 18px;
  cursor: pointer;
  transition: background 0.15s;
}
.archive-card:hover { background: var(--cream); }

.show-archive-btn {
  display: block;
  margin: 24px auto 0;
  background: none;
  border: 1px solid var(--navy);
  color: var(--navy);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 10px 28px;
  transition: all 0.2s;
}
.show-archive-btn:hover { background: var(--navy); color: #fff; }

/* ── Modal ────────────────────────────────────── */
.article-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
}
.article-modal.open { display: block; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13,27,42,0.7);
  backdrop-filter: blur(2px);
}

.modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(780px, 94vw);
  max-height: 88vh;
  overflow-y: auto;
  background: #fff;
  padding: 48px;
  box-shadow: 0 20px 80px rgba(0,0,0,0.35);
}

.modal-close {
  position: sticky;
  float: right;
  top: 0;
  background: none;
  border: none;
  font-size: 28px;
  color: var(--muted);
  line-height: 1;
  margin: -12px -12px 0 0;
  transition: color 0.15s;
}
.modal-close:hover { color: var(--ink); }

.modal-category {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 12px;
}

.modal-headline {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 10px;
  color: var(--ink);
}

.modal-subheadline {
  font-family: var(--sans);
  font-size: 15px;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--rule);
}

.modal-stats {
  display: flex;
  gap: 32px;
  margin-bottom: 28px;
  padding: 16px;
  background: var(--paper);
  border: 1px solid var(--rule);
}

.modal-body-text {
  font-size: 16px;
  line-height: 1.8;
  color: #333;
  margin-bottom: 28px;
}

.modal-footer {
  border-top: 1px solid var(--rule);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-date {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

/* ── Footer ───────────────────────────────────── */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.55);
  padding: 40px 0 24px;
}
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}
.footer-label {
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.footer-text {
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.6;
}

.footer-bottom {
  font-family: var(--sans);
  font-size: 11px;
  text-align: center;
  color: rgba(255,255,255,0.3);
}

/* ── Meta pill ────────────────────────────────── */
.meta-date {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
}

/* ── Responsive ───────────────────────────────── */
@media (max-width: 900px) {
  .featured-card { grid-template-columns: 1fr; }
  .featured-sidebar { border-left: none; border-top: 1px solid var(--rule); padding-left: 0; padding-top: 20px; flex-direction: row; flex-wrap: wrap; }
  .content-columns { grid-template-columns: 1fr; }
  .sidebar { grid-row: 1; }
  .footer-cols { grid-template-columns: 1fr; gap: 24px; }
  .archive-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .articles-grid { grid-template-columns: 1fr; }
  .archive-grid { grid-template-columns: 1fr; }
  .modal-content { padding: 28px 20px; }
  .modal-stats { flex-direction: column; gap: 12px; }
}
