/* Shared story page styles — Iran Tracker */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Source+Serif+4:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
  --bg: #101418;
  --surface: #181d23;
  --surface-raised: #1e242c;
  --border: #2a3140;
  --border-subtle: #222830;
  --text: #d4dae3;
  --text-secondary: #9aa5b4;
  --text-muted: #6b7a8d;
  --accent: #5ba3f5;
  --accent-dim: rgba(91,163,245,0.12);
  --red: #e5534b;
  --red-dim: rgba(229,83,75,0.12);
  --orange: #d4943a;
  --orange-dim: rgba(212,148,58,0.12);
  --green: #46954a;
  --green-dim: rgba(70,149,74,0.12);
  --purple: #b388f5;
  --purple-dim: rgba(179,136,245,0.12);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
}

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

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  padding: 0 24px 80px;
  max-width: 760px;
  margin: 0 auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Header & Nav --- */
header {
  padding: 28px 0 0;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border-subtle);
}
nav {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-bottom: 14px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}
nav a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}
nav a:hover { color: var(--accent); }
nav .nav-brand {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-right: auto;
}

/* --- Typography --- */
h1 {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 20px 0 8px;
  color: #eaf0f6;
}
h2 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 40px 0 6px;
  color: #eaf0f6;
}
h2::after {
  content: '';
  display: block;
  width: 28px;
  height: 2px;
  background: var(--accent);
  margin-top: 6px;
  border-radius: 1px;
}
p {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  margin-bottom: 16px;
  color: var(--text-secondary);
  line-height: 1.8;
}
p strong { color: var(--text); }
ul, ol { padding-left: 20px; }
li {
  font-family: var(--font-serif);
  font-size: 0.92rem;
  line-height: 1.7;
  margin-bottom: 6px;
  color: var(--text-secondary);
}
li strong { color: var(--text); }
a { color: var(--accent); transition: color 0.15s; }
a:hover { color: #7dbaf7; }

/* --- Meta & Tags --- */
.meta {
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  margin-bottom: 28px;
  font-weight: 500;
}
.tag {
  display: inline-block;
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
  margin-left: 6px;
  letter-spacing: 0.02em;
  font-family: var(--font-sans);
}
.tag-analysis { background: var(--accent-dim); color: var(--accent); }
.tag-ceasefire { background: var(--green-dim); color: var(--green); }
.tag-drones { background: var(--accent-dim); color: var(--accent); }
.tag-proxies { background: var(--orange-dim); color: var(--orange); }

/* --- Lede --- */
.lede {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text);
  border-left: 3px solid var(--accent);
  padding: 14px 20px;
  margin: 16px 0 32px;
  background: var(--accent-dim);
  border-radius: 0 8px 8px 0;
}

/* --- Stat boxes --- */
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 24px 0;
}
.stat-box {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}
.stat-value {
  font-family: var(--font-sans);
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.stat-label {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 4px;
  font-weight: 500;
}
.stat-sub {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* --- Cards (old stat-row pattern for simple stories) --- */
.card {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 20px 24px;
  margin: 16px 0;
}
.card .stat-row-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  font-family: var(--font-sans);
}
.card .stat-row-item:last-child { border-bottom: none; }
.card .stat-row-item .label { color: var(--text-muted); }
.card .stat-row-item .value { font-weight: 600; font-variant-numeric: tabular-nums; color: #eaf0f6; }
.down { color: var(--green) !important; }
.up { color: var(--red) !important; }

/* --- Callouts --- */
.callout {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 18px 22px;
  margin: 24px 0;
  font-size: 0.88rem;
  line-height: 1.7;
}
.callout strong { color: var(--accent); }
.callout.warn { border-color: var(--orange); }
.callout.warn strong { color: var(--orange); }
.callout.red { border-color: var(--red); }
.callout.red strong { color: var(--red); }
.callout.green { border-color: var(--green); }
.callout.green strong { color: var(--green); }

/* --- Tables --- */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  font-family: var(--font-sans);
  margin: 16px 0;
}
th, td {
  padding: 10px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}
th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
td.num { text-align: right; font-variant-numeric: tabular-nums; }
td.center { text-align: center; }
tr:last-child td { border-bottom: none; }

/* --- Charts --- */
.chart-wrap {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 20px;
  margin: 24px 0;
  overflow-x: auto;
}
.chart-label {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  font-weight: 500;
}
svg { display: block; }
.axis text { fill: var(--text-muted); font-size: 11px; font-family: var(--font-sans); }
.axis line, .axis path { stroke: var(--border-subtle); }
.axis .domain { stroke: var(--border); }
.grid line { stroke: var(--border-subtle); stroke-opacity: 0.5; }
.grid path { display: none; }
.tooltip {
  position: absolute;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.75rem;
  font-family: var(--font-sans);
  pointer-events: none;
  opacity: 0;
  z-index: 10;
  max-width: 260px;
  line-height: 1.5;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  transition: opacity 0.12s;
}
.tooltip strong { color: #eaf0f6; }

/* --- Highlight box --- */
.highlight-box {
  background: var(--surface);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  margin: 24px 0;
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text-secondary);
}
.highlight-box strong { color: #eaf0f6; }

/* --- Watch list --- */
.watch-list {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}
.watch-list li {
  padding: 10px 0 10px 16px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  line-height: 1.6;
  position: relative;
}
.watch-list li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}
.watch-list li:last-child { border-bottom: none; }

/* --- Source notes --- */
.source-note {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 8px;
  font-style: italic;
}

/* --- Blockquotes --- */
blockquote {
  border-left: 3px solid var(--border);
  padding-left: 18px;
  color: var(--text-muted);
  font-style: italic;
  margin: 20px 0;
  font-size: 0.92rem;
}

/* --- Footer --- */
footer {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
  font-family: var(--font-sans);
  line-height: 1.6;
}
footer a { color: var(--text-secondary); transition: color 0.15s; text-decoration: none; }
footer a:hover { color: var(--accent); }

/* --- Responsive --- */
@media (max-width: 600px) {
  body { padding: 0 14px 56px; }
  h1 { font-size: 1.35rem; }
  h2 { font-size: 1.05rem; margin-top: 32px; }
  .stat-row { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stat-value { font-size: 1.2rem; }
  .stat-box { padding: 12px; }
  .card { padding: 16px; }
  .callout { padding: 14px 16px; }
  .lede { padding: 12px 16px; font-size: 0.95rem; }
  nav { gap: 14px; }
}
