/* =============================================
   HANTAOSINT — V1 PROTOTYPE STYLESHEET
   Light editorial / clinical OSINT aesthetic
   ============================================= */

:root {
  --bg: #f7f5f0;
  --bg-card: #fefdfb;
  --bg-subtle: #efece4;
  --bg-deep: #1a1a1a;
  --ink: #1a1a1a;
  --ink-soft: #4a4a4a;
  --ink-muted: #8a8a86;
  --line: #d8d4c8;
  --line-soft: #e8e4d8;
  --accent: #c63d2f;
  --accent-soft: #f4d9d4;
  --warn: #b8860b;
  --warn-soft: #f5ecd0;
  --info: #4a6b8a;
  --info-soft: #dde6f0;
  --confirm: #2d5f3f;
  --confirm-soft: #d9e8df;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
}

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

html, body { height: 100%; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

img { max-width: 100%; display: block; }

/* === TOP STATUS BAR === */
.top-bar {
  background: var(--bg-deep);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 6px 24px;
  display: flex;
  justify-content: space-between;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.top-bar .live-dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: #6dd47e;
  border-radius: 50%;
  margin-right: 6px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* === SITE HEADER === */
header.site-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--line);
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
  text-decoration: none !important;
}

.brand-mark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.brand-mark span { color: var(--accent); }

.brand-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
  border-left: 1px solid var(--line);
  padding-left: 12px;
}

nav.main-nav {
  display: flex;
  gap: 28px;
  font-size: 13px;
  font-weight: 500;
}

nav.main-nav a {
  color: var(--ink-soft);
  position: relative;
  padding: 22px 0;
  text-decoration: none;
}

nav.main-nav a:hover { color: var(--ink); text-decoration: none; }

nav.main-nav a.active { color: var(--ink); }

nav.main-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -19px;
  left: 0; right: 0;
  height: 2px;
  background: var(--accent);
}

.subscribe-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--ink);
  color: var(--bg);
  padding: 9px 16px;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none !important;
}

.subscribe-btn:hover { background: var(--accent); }

/* === HERO STRIP === */
.hero-strip {
  background: var(--bg-card);
  border-bottom: 1px solid var(--line);
  padding: 36px 24px 28px;
}

.hero-strip h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 34px;
  letter-spacing: -0.025em;
  line-height: 1.15;
  max-width: 760px;
  color: var(--ink);
}

.hero-strip h1 em {
  font-style: italic;
  color: var(--accent);
}

.hero-strip .lede {
  font-size: 15px;
  color: var(--ink-soft);
  max-width: 700px;
  margin-top: 14px;
  line-height: 1.65;
}

.update-line {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  margin-top: 20px;
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

.update-line strong { color: var(--ink); font-weight: 600; }

/* === STATS BAR === */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--bg-card);
  border-bottom: 1px solid var(--line);
}

.stat {
  padding: 22px 24px;
  border-right: 1px solid var(--line-soft);
}

.stat:last-child { border-right: none; }

.stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
  margin-bottom: 8px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-value.accent { color: var(--accent); }
.stat-value.warn { color: var(--warn); }
.stat-value.confirm { color: var(--confirm); }

.stat-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
  margin-top: 6px;
}

.delta-up { color: var(--accent); font-weight: 600; }
.delta-down { color: var(--confirm); font-weight: 600; }
.delta-flat { color: var(--ink-soft); }

/* === MAIN GRID === */
.main-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  min-height: 620px;
}

/* === MAP SECTION === */
.map-section {
  background: var(--bg-card);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}

.map-controls {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  flex-wrap: wrap;
  gap: 12px;
}

.map-controls h2 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.time-filters {
  display: flex;
  gap: 2px;
  background: var(--bg-subtle);
  padding: 3px;
  border-radius: 2px;
}

.time-filters button {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: transparent;
  color: var(--ink-soft);
  border: none;
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.time-filters button:hover { color: var(--ink); }

.time-filters button.active {
  background: var(--bg-card);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

#map {
  flex: 1;
  min-height: 540px;
  background: var(--bg-subtle);
}

.map-legend {
  padding: 12px 20px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-soft);
}

.map-legend .dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

.dot-active { background: var(--accent); }
.dot-suspect { background: var(--warn); }
.dot-historic { background: var(--info); }

/* === SIDEBAR === */
.sidebar {
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
}

.side-block {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line-soft);
}

.side-block h3 {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
}

.side-block h3 .more-link {
  color: var(--ink-soft);
  font-weight: 500;
}

/* Briefing feed */
.brief-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}

.brief-item:last-child { border-bottom: none; padding-bottom: 0; }
.brief-item:first-child { padding-top: 0; }

.brief-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
}

.brief-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 2px;
  font-weight: 600;
}

.tag-confirmed { background: var(--accent-soft); color: var(--accent); }
.tag-suspect { background: var(--warn-soft); color: var(--warn); }
.tag-update { background: var(--info-soft); color: var(--info); }
.tag-resolved { background: var(--confirm-soft); color: var(--confirm); }

.brief-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.45;
  margin-bottom: 4px;
}

.brief-source {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-muted);
}

/* Country list */
.country-row {
  display: grid;
  grid-template-columns: 1fr 60px 60px 50px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
  align-items: center;
  font-size: 13px;
}

.country-row:last-child { border-bottom: none; }

.country-row .name { font-weight: 500; }
.country-row .num {
  font-family: var(--font-mono);
  text-align: right;
  font-size: 12px;
  color: var(--ink-soft);
}

.country-row .num.high { color: var(--accent); font-weight: 600; }

.country-row .status-dot {
  text-align: right;
}

.country-row .status-dot::after {
  content: '';
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
}

.status-active::after { background: var(--accent); }
.status-watch::after { background: var(--warn); }
.status-quiet::after { background: var(--ink-muted); }

.country-head {
  display: grid;
  grid-template-columns: 1fr 60px 60px 50px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}
.country-head .num, .country-head .status-dot { text-align: right; }

/* === SECTION === */
.section {
  padding: 56px 24px;
  border-bottom: 1px solid var(--line);
}

.section.alt { background: var(--bg-card); }

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
  max-width: 560px;
}

.section-header .label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-muted);
  margin-bottom: 8px;
}

.section-header p {
  color: var(--ink-soft);
  font-size: 15px;
  max-width: 520px;
  text-align: right;
  line-height: 1.6;
}

/* === FEATURED OUTBREAK === */
.featured-outbreak {
  background: var(--bg-card);
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
}

.featured-outbreak .body {
  padding: 36px 32px;
}

.featured-outbreak .visual {
  background: var(--bg-subtle);
  position: relative;
  min-height: 320px;
  border-left: 1px solid var(--line);
}

.feature-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.feature-eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.featured-outbreak h3 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 12px;
}

.featured-outbreak p {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.65;
  margin-bottom: 20px;
}

.outbreak-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0;
  padding: 18px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.outbreak-stats .lbl {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
}

.outbreak-stats .val {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  margin-top: 2px;
}

.read-more {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
  display: inline-block;
}

.read-more:hover {
  color: var(--accent);
  border-color: var(--accent);
  text-decoration: none;
}

/* === STRAIN GRID === */
.strain-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.strain-card {
  background: var(--bg-card);
  padding: 24px;
  text-decoration: none !important;
  color: inherit;
  transition: background 0.2s;
}

.strain-card:hover { background: var(--bg-subtle); }

.strain-card .strain-region {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
  margin-bottom: 10px;
}

.strain-card h4 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.strain-card .strain-desc {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.55;
  margin-bottom: 16px;
}

.strain-meta-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  border-top: 1px solid var(--line-soft);
  padding-top: 12px;
}

.strain-meta-row .lbl { color: var(--ink-muted); }
.strain-meta-row .val { color: var(--ink); font-weight: 600; }

/* === BLOG CARDS === */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  padding: 24px;
  display: flex;
  flex-direction: column;
  text-decoration: none !important;
  color: inherit;
  transition: border-color 0.2s;
}

.blog-card:hover { border-color: var(--ink); }

.blog-card .post-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  margin-bottom: 12px;
}

.blog-card h4 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin-bottom: 10px;
  flex: 1;
}

.blog-card p {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.55;
}

/* === FOOTER === */
footer {
  background: var(--bg-deep);
  color: var(--bg);
  padding: 56px 24px 24px;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid #333;
}

.footer-brand .brand-mark { color: var(--bg); font-size: 22px; }
.footer-brand p {
  color: #aaa;
  font-size: 13px;
  margin-top: 16px;
  max-width: 380px;
  line-height: 1.6;
}

footer h5 {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #888;
  margin-bottom: 16px;
}

footer ul { list-style: none; }
footer ul li { margin-bottom: 8px; }
footer ul li a { color: #ccc; font-size: 13px; }
footer ul li a:hover { color: var(--bg); }

.footer-bottom {
  max-width: 1200px;
  margin: 24px auto 0;
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  flex-wrap: wrap;
  gap: 16px;
}

/* === ARTICLE / CONTENT PAGE === */
.content-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

.content-wrap.wide { max-width: 1100px; }

.breadcrumb {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  margin-bottom: 24px;
}

.breadcrumb a { color: var(--ink-soft); }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb .sep { margin: 0 8px; color: var(--line); }

.article-header {
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

.article-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 16px;
}

.article-header h1 {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.article-header .deck {
  font-size: 17px;
  color: var(--ink-soft);
  line-height: 1.55;
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
}

.article-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-top: 24px;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.prose p {
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 22px;
  color: var(--ink-soft);
}

.prose p strong { color: var(--ink); }

.prose h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.015em;
  margin: 44px 0 18px;
  color: var(--ink);
}

.prose h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin: 32px 0 12px;
  color: var(--ink);
}

.prose ul, .prose ol {
  margin: 0 0 22px 22px;
  color: var(--ink-soft);
}

.prose li {
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 8px;
}

.prose blockquote {
  border-left: 3px solid var(--accent);
  padding: 12px 0 12px 24px;
  margin: 28px 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 19px;
  color: var(--ink);
  line-height: 1.5;
}

.prose a {
  color: var(--accent);
  border-bottom: 1px solid var(--accent-soft);
}

.prose a:hover { border-color: var(--accent); text-decoration: none; }

/* Data table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 13px;
}

.data-table th {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--ink);
  color: var(--ink-muted);
  font-weight: 600;
}

.data-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-soft);
}

.data-table tr:hover td { background: var(--bg-subtle); }

.data-table .num {
  font-family: var(--font-mono);
  text-align: right;
}

/* Timeline (for outbreak page) */
.timeline {
  margin: 32px 0;
  border-left: 2px solid var(--line);
  padding-left: 28px;
}

.timeline-item {
  position: relative;
  margin-bottom: 28px;
  padding-bottom: 4px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -36px;
  top: 6px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--accent);
}

.timeline-item.confirmed::before { background: var(--accent); }
.timeline-item.suspected::before { background: var(--bg-card); border-color: var(--warn); }

.timeline-date {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  margin-bottom: 4px;
}

.timeline-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  margin-bottom: 4px;
  color: var(--ink);
}

.timeline-desc {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* === RESPONSIVE === */
@media (max-width: 960px) {
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: none; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid var(--line-soft); }
  .main-grid { grid-template-columns: 1fr; }
  .sidebar { border-top: 1px solid var(--line); }
  .map-section { border-right: none; }
  .featured-outbreak { grid-template-columns: 1fr; }
  .featured-outbreak .visual { border-left: none; border-top: 1px solid var(--line); }
  .strain-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .section-header { flex-direction: column; align-items: flex-start; }
  .section-header p { text-align: left; }
  .section-header h2 { font-size: 24px; }
  .article-header h1 { font-size: 32px; }
}

@media (max-width: 600px) {
  header.site-header { padding: 14px 16px; }
  nav.main-nav { display: none; }
  .stats-bar { grid-template-columns: 1fr; }
  .stat { border-right: none !important; border-bottom: 1px solid var(--line-soft); }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-strip { padding: 28px 16px 22px; }
  .hero-strip h1 { font-size: 26px; }
  .article-header h1 { font-size: 28px; }
  .top-bar { font-size: 10px; padding: 6px 16px; }
  .section { padding: 40px 16px; }
}

/* Dashboard support keyframes (added v1.1) */
@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.4); opacity: 0.6; }
}

/* ============= UPDATES v1.2 ============= */

/* Telegram CTA in header */
.subscribe-btn.telegram-cta {
  background: var(--ink);
  color: var(--bg);
  border: 1px solid var(--ink);
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 9px 16px;
  border-radius: 2px;
  text-decoration: none !important;
  transition: all 0.15s;
}
.subscribe-btn.telegram-cta:hover {
  background: #229ED9;
  border-color: #229ED9;
  color: #fff;
}
.subscribe-btn.telegram-cta svg { fill: currentColor; }

/* Footer credits */
.footer-credits {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
}
.footer-credits .fc-line { padding: 2px 0; }
.footer-credits a {
  color: var(--ink-soft);
  text-decoration: none !important;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1px;
}
.footer-credits a:hover { color: var(--accent); border-color: var(--accent); }

.footer-bottom {
  flex-wrap: wrap;
  gap: 8px 24px;
}
.footer-bottom span:nth-child(2) {
  font-style: italic;
  font-family: var(--font-body);
  text-transform: none;
  letter-spacing: normal;
  color: var(--ink-muted);
}

/* ============ METRIC TILES OVERLAY ============ */
.metric-tiles {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 600;
  font-family: var(--font-mono);
}
.metric-tile {
  background: rgba(254,253,251,0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  padding: 10px 16px;
  border-radius: 2px;
  min-width: 110px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.metric-tile .mt-label {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-muted);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.metric-tile .mt-label .mt-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ink-muted);
}
.metric-tile .mt-num {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1;
  color: var(--ink);
}
.metric-tile .mt-delta {
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin-top: 4px;
  text-transform: uppercase;
}
.metric-tile.mt-confirmed .mt-num   { color: var(--accent); }
.metric-tile.mt-confirmed .mt-dot   { background: var(--accent); animation: pulse-dot 2s infinite; }
.metric-tile.mt-deaths .mt-num      { color: var(--ink); }
.metric-tile.mt-suspected .mt-num   { color: var(--warn); }
.metric-tile.mt-suspected .mt-dot   { background: var(--warn); }
.metric-tile.mt-countries .mt-num   { color: var(--confirm); }
.metric-tile.mt-r0 .mt-num          { color: var(--confirm); font-style: italic; }
.metric-tile.mt-r0 .mt-dot          { background: var(--confirm); }
.metric-tile .mt-delta.delta-up     { color: var(--accent); }
.metric-tile .mt-delta.delta-down   { color: var(--confirm); }

@media (max-width: 1280px) {
  .metric-tiles {
    position: static;
    transform: none;
    margin: 14px;
    flex-wrap: wrap;
    justify-content: center;
  }
}
@media (max-width: 600px) {
  .metric-tile { min-width: 0; flex: 1 1 calc(50% - 4px); padding: 8px 10px; }
  .metric-tile .mt-num { font-size: 20px; }
}

/* ============= UPDATES v1.3 ============= */

/* Compress top bar */
.top-bar {
  padding: 4px 24px !important;
  font-size: 10px !important;
}

/* Compress site header */
header.site-header {
  padding: 10px 22px !important;
}
.brand-mark { font-size: 19px !important; letter-spacing: -0.025em !important; }
.brand-tag { font-size: 9px !important; padding-left: 10px !important; }
nav.main-nav { gap: 22px !important; font-size: 13px !important; }
.subscribe-btn.telegram-cta {
  padding: 7px 13px !important;
  font-size: 11px !important;
}

/* Methodology nav item gets its own subtle highlight (E-E-A-T) */
nav.main-nav a.nav-methodology {
  position: relative;
  padding-left: 14px;
}
nav.main-nav a.nav-methodology::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--confirm);
  transform: translateY(-50%);
}

/* Dashboard shell — adjust height since chrome is shorter now */
.dashboard-shell {
  height: calc(100vh - 92px) !important;
  min-height: 600px !important;
}

/* FIX: marker visibility — enforce inner div size */
.leaflet-div-icon { background: transparent !important; border: none !important; }
.hanta-marker {
  width: 14px !important;
  height: 14px !important;
  border-radius: 50%;
  border: 2px solid var(--bg-card);
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
  position: relative;
  display: block;
}

/* Reset view button (floats above zoom controls) */
.map-reset-view {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 600;
  background: var(--bg-card);
  border: 1px solid var(--line);
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  cursor: pointer;
  border-radius: 2px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: all 0.15s;
}
.map-reset-view:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* Geolocation prompt overlay */
.geo-prompt {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 700;
  background: var(--ink);
  color: var(--bg);
  padding: 12px 18px;
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  animation: slideUp 0.3s ease;
}
@keyframes slideUp {
  from { transform: translate(-50%, 20px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}
.geo-prompt button {
  background: transparent;
  border: 1px solid rgba(247,245,240,0.3);
  color: var(--bg);
  padding: 5px 12px;
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.12s;
}
.geo-prompt button.primary {
  background: var(--accent);
  border-color: var(--accent);
}
.geo-prompt button:hover { background: rgba(247,245,240,0.1); }
.geo-prompt button.primary:hover { background: #d44d3f; border-color: #d44d3f; }
.geo-prompt button.dismiss { color: rgba(247,245,240,0.5); }

/* Metric tiles — tighter on smaller widths */
@media (max-width: 1500px) {
  .metric-tile { min-width: 96px; padding: 8px 12px; }
  .metric-tile .mt-num { font-size: 22px; }
  .metric-tile .mt-label { font-size: 9px; }
}

/* ============ MOBILE FIXES ============ */
@media (max-width: 1100px) {
  /* Stack the dashboard vertically: filters → map → intel feed */
  .dashboard-shell {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto auto auto !important;
    height: auto !important;
    min-height: 0 !important;
  }
  .filter-rail {
    border-right: none !important;
    border-bottom: 1px solid var(--line);
    padding: 12px 14px !important;
    max-height: none !important;
  }
  /* Filter rail compressed: time pills + case toggles in one horizontal scroll */
  .fr-section { margin-bottom: 14px !important; }
  .fr-section:last-child { display: none; }  /* hide quick stats on mobile, they're in the metric tiles */
  .fr-time-grid { grid-template-columns: repeat(6, 1fr) !important; gap: 4px; }
  .fr-toggle { padding: 6px 8px !important; }
  .fr-toggle .ftg-label { font-size: 11px; }
  .map-stage {
    height: 60vh !important;
    min-height: 400px;
  }
  .intel-rail {
    border-left: none !important;
    border-top: 1px solid var(--line);
    max-height: 50vh !important;
  }
  .metric-tiles {
    position: static !important;
    transform: none !important;
    margin: 10px !important;
    flex-wrap: wrap;
    justify-content: stretch !important;
    gap: 6px !important;
  }
  .metric-tile { flex: 1 1 calc(33.333% - 6px); min-width: 0; }
  .metric-tile.mt-r0 { flex: 1 1 100%; }
}

@media (max-width: 700px) {
  /* Even tighter stack */
  header.site-header {
    padding: 10px 14px !important;
    gap: 10px;
  }
  .brand-tag { display: none !important; }
  nav.main-nav {
    order: 3;
    flex-basis: 100%;
    overflow-x: auto;
    white-space: nowrap;
    gap: 16px !important;
    padding: 6px 0 4px;
    margin: 0 -14px;
    padding-left: 14px;
    padding-right: 14px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  nav.main-nav::-webkit-scrollbar { display: none; }
  nav.main-nav a { flex-shrink: 0; }
  .subscribe-btn.telegram-cta { padding: 6px 10px !important; font-size: 10px !important; }

  .hero-banner { flex-wrap: wrap; padding: 10px 14px !important; gap: 8px !important; }
  .hero-banner .hb-headline { flex-basis: 100%; order: -1; font-size: 12px !important; }

  .metric-tile { flex: 1 1 calc(50% - 4px) !important; }
  .metric-tile.mt-r0 { flex: 1 1 100%; }
  .metric-tile .mt-num { font-size: 18px !important; }
  .metric-tile .mt-label { font-size: 8px !important; }
  .metric-tile .mt-delta { font-size: 9px !important; }

  .map-status-overlay {
    padding: 8px 11px !important;
    font-size: 10px !important;
    gap: 8px !important;
  }
  .map-reset-view { padding: 6px 9px !important; font-size: 9px !important; }

  .seo-section { padding: 36px 18px !important; }
  .seo-section h1 { font-size: 26px !important; }
  .seo-section .ss-deck { font-size: 15px !important; }

  /* Other pages: content wrap and article header */
  .content-wrap { padding: 22px 16px !important; }
  .article-header h1 { font-size: 28px !important; line-height: 1.15 !important; }
  .article-header .deck { font-size: 15px !important; }
  .article-meta { flex-wrap: wrap; gap: 6px 14px !important; font-size: 10px !important; }

  /* Footer mobile */
  .footer-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 24px !important;
  }
  footer { padding: 32px 18px 22px !important; }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px !important;
    font-size: 10px !important;
  }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr !important; }
  .article-header h1 { font-size: 24px !important; }
  /* Filter pills smaller */
  .fr-time-grid .fr-pill { font-size: 10px !important; padding: 6px 4px !important; }
}

/* ============= UI/UX v1.4 ============= */

/* Z-index scale (documented to prevent conflicts) */
:root {
  --z-base: 1;
  --z-tooltip: 400;
  --z-overlay: 500;
  --z-modal: 600;
  --z-toast: 700;
  --z-prompt: 800;
}

/* Focus visible: keyboard navigation indicators (WCAG 2.4.7) */
a:focus-visible,
button:focus-visible,
.fr-pill:focus-visible,
.fr-toggle:focus-visible,
.hb-pill:focus-visible,
.hb-toggle:focus-visible,
.share-btn:focus-visible,
.subscribe-btn:focus-visible,
.map-reset-view:focus-visible,
.geo-prompt button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Remove default focus on mouse, keep on keyboard */
:focus:not(:focus-visible) {
  outline: none;
}

/* Skip-link: hidden until focused via keyboard */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: var(--z-prompt);
  background: var(--ink);
  color: var(--bg);
  padding: 12px 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 0 0 2px 2px;
}
.skip-link:focus {
  left: 0;
  top: 0;
  outline: none;
}

/* Reduced-motion: disable animations for users with vestibular disorders */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .hanta-marker::after {
    animation: none !important;
    opacity: 0.4;
  }
}

/* Safe-area insets for iPhone notch */
header.site-header {
  padding-left: max(22px, env(safe-area-inset-left));
  padding-right: max(22px, env(safe-area-inset-right));
}
.top-bar {
  padding-left: max(24px, env(safe-area-inset-left));
  padding-right: max(24px, env(safe-area-inset-right));
}
footer {
  padding-left: max(32px, env(safe-area-inset-left));
  padding-right: max(32px, env(safe-area-inset-right));
}

/* Geo-prompt overflow protection on narrow viewports */
.geo-prompt {
  max-width: calc(100vw - 28px);
  flex-wrap: wrap;
  justify-content: center;
}
@media (max-width: 480px) {
  .geo-prompt {
    font-size: 10px;
    padding: 10px 14px;
    gap: 8px;
  }
  .geo-prompt button {
    font-size: 10px;
    padding: 5px 10px;
  }
}

/* aria-current marker on active nav */
nav.main-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom: 1.5px solid var(--accent);
  padding-bottom: 4px;
}

/* aria-current accommodation for methodology nav (which has its own ::before dot) */
nav.main-nav a.nav-methodology[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}
nav.main-nav a.nav-methodology[aria-current="page"]::before {
  background: var(--accent);
}

/* ============= UI FIXES v1.6 ============= */
/* Bug fix: header was tall because nav links had padding: 22px 0 */
nav.main-nav a {
  padding: 14px 0 !important;
}
header.site-header {
  padding: 8px 22px !important;
}
.top-bar { padding: 4px 22px !important; font-size: 10px !important; }
.brand-mark { font-size: 17px !important; }
.brand-tag { font-size: 9px !important; padding-left: 8px !important; }
nav.main-nav { font-size: 12px !important; gap: 18px !important; }
.subscribe-btn.telegram-cta { padding: 6px 12px !important; font-size: 10px !important; }

/* Restore dashboard shell height calc */
.dashboard-shell {
  height: calc(100vh - 76px) !important;
}

/* ============= MOBILE OVERHAUL v1.7 ============= */
@media (max-width: 720px) {
  /* Hide the bulky bottom-left filter rail on mobile, replace with a sticky
     top mini-bar with just the essential time pills */
  .filter-rail {
    padding: 8px 12px !important;
    border-bottom: 1px solid var(--line);
  }
  .filter-rail h3, .fr-label { display: none !important; }
  .fr-section { margin-bottom: 8px !important; }
  .fr-section:last-child { display: none; }
  .fr-time-grid {
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 3px !important;
  }
  .fr-pill {
    font-size: 10px !important;
    padding: 4px 2px !important;
  }

  /* Compact metric tiles - single row of small pills */
  .metric-tiles {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    gap: 6px !important;
    margin: 8px 10px !important;
    padding: 0 !important;
    scrollbar-width: none;
  }
  .metric-tiles::-webkit-scrollbar { display: none; }
  .metric-tile {
    flex: 0 0 auto !important;
    min-width: 90px !important;
    padding: 8px 10px !important;
    border-radius: 4px;
  }
  .metric-tile .mt-num { font-size: 20px !important; line-height: 1.1 !important; }
  .metric-tile .mt-label { font-size: 8px !important; }
  .metric-tile .mt-sub { font-size: 8px !important; }

  /* Map must be the visual focus on mobile - make it big */
  .map-stage {
    height: 65vh !important;
    min-height: 450px !important;
  }

  /* Intelligence feed: collapse to a single expandable section */
  .intel-rail {
    max-height: 40vh !important;
    overflow-y: auto !important;
    padding: 12px 14px !important;
  }

  /* Active outbreak banner: stack the badge separately from the meta */
  .active-banner {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;
    padding: 8px 12px !important;
  }
  .active-banner .badge { font-size: 9px !important; }
  .active-banner .meta { font-size: 11px !important; }

  /* WHO risk + about pill - stack under banner */
  .top-meta-pills {
    flex-wrap: wrap !important;
    gap: 6px !important;
  }
}

/* iPhone-specific narrowest */
@media (max-width: 420px) {
  .metric-tile .mt-num { font-size: 18px !important; }
  .map-stage { height: 60vh !important; min-height: 400px !important; }
  .brand-tag { display: none !important; }
}

/* ============= UI FIXES v1.8 ============= */

/* (1) BLUE LINES FINAL FIX: hide leaflet tile gaps at choropleth boundaries.
       The lines are leaflet tile container edges showing through the choropleth fill.
       Apply transform to ALL leaflet tiles to remove anti-aliasing seams. */
.leaflet-tile-container .leaflet-tile {
  filter: inherit;
  /* Remove sub-pixel rendering artifacts that cause line seams */
  image-rendering: -webkit-optimize-contrast;
  border: 0 !important;
  outline: 0 !important;
}
.leaflet-pane .leaflet-tile-pane {
  opacity: 1 !important;
}
/* Hide leaflet shadow pane completely - shadows on a flat map = visual noise */
.leaflet-shadow-pane {
  display: none !important;
}

/* (2) TOP BAR — make it visually intentional. 
       Currently it looks like a "flying black line". Anchor it as system chrome:
       - Add slight gradient at bottom for depth (looks like proper toolbar)
       - Slightly taller for tap targets on mobile
       - Add subtle inset shadow to look "embedded" not "stuck on" */
.top-bar {
  background: linear-gradient(180deg, var(--bg-deep) 0%, #0a0908 100%) !important;
  border-bottom: 1px solid rgba(255, 230, 200, 0.08) !important;
  box-shadow: 0 1px 0 rgba(0,0,0,0.4) inset !important;
  padding: 6px 22px !important;
  font-size: 10.5px !important;
  letter-spacing: 0.1em !important;
}
.top-bar .live-dot {
  box-shadow: 0 0 8px rgba(109, 212, 126, 0.6) !important;
}

/* (3) MOBILE LAYOUT OVERHAUL v1.8 — make the dashboard actually usable on phone */
@media (max-width: 720px) {
  /* TOP BAR: keep it sticky, but smaller font */
  .top-bar {
    padding: 5px 12px !important;
    font-size: 9px !important;
    letter-spacing: 0.05em !important;
    flex-wrap: wrap;
    gap: 6px;
  }
  .top-bar > span:last-child {
    font-size: 9px !important;
  }
  
  /* HEADER: stack brand on top, nav becomes horizontal scroll */
  header.site-header {
    flex-direction: column !important;
    padding: 8px 12px !important;
    gap: 8px !important;
    align-items: flex-start !important;
  }
  .brand-link {
    width: 100% !important;
    justify-content: space-between !important;
  }
  nav.main-nav {
    display: flex !important;
    overflow-x: auto !important;
    width: 100vw !important;
    margin: 0 -12px !important;
    padding: 0 12px 4px !important;
    gap: 14px !important;
    font-size: 11px !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  nav.main-nav::-webkit-scrollbar { display: none; }
  nav.main-nav a {
    padding: 6px 0 !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }
  .telegram-cta {
    display: none !important;  /* hide CTA on mobile, too cramped */
  }
  
  /* DASHBOARD SHELL: vertical stack with map FIRST (it's the hero) */
  .dashboard-shell {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    grid-template-rows: none !important;
    height: auto !important;
    min-height: 0 !important;
  }
  /* Reorder: outbreak banner → MAP → filters → intel feed */
  .map-area {
    order: 1 !important;
    height: 65vh !important;
    min-height: 380px !important;
    border-bottom: 1px solid var(--line) !important;
  }
  .filter-rail {
    order: 2 !important;
    border-right: none !important;
    border-bottom: 1px solid var(--line) !important;
    padding: 12px !important;
    max-height: none !important;
  }
  .intel-rail {
    order: 3 !important;
    border-left: none !important;
    border-top: none !important;
    max-height: 500px !important;
  }
  
  /* OUTBREAK BANNER: stack vertically, smaller */
  .outbreak-banner {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px !important;
    padding: 10px 12px !important;
    font-size: 11px !important;
  }
  .outbreak-banner > * { font-size: 11px !important; }
  
  /* METRIC TILES: 5 across in 2 rows on mobile */
  .metric-tiles {
    position: absolute !important;
    top: 10px !important;
    left: 10px !important;
    right: 10px !important;
    margin: 0 !important;
    transform: none !important;
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 4px !important;
    z-index: 500;
  }
  .metric-tile {
    padding: 6px 4px !important;
    text-align: center !important;
    background: rgba(255, 251, 244, 0.95) !important;
    border: 1px solid var(--line) !important;
    backdrop-filter: blur(6px);
    flex: none !important;
    min-width: 0 !important;
  }
  .metric-tile .mt-num {
    font-size: 14px !important;
    line-height: 1 !important;
  }
  .metric-tile .mt-label {
    font-size: 7px !important;
    letter-spacing: 0.05em !important;
    margin-bottom: 2px !important;
  }
  .metric-tile .mt-sub {
    display: none !important;  /* hide sub-text on mobile, too cramped */
  }
  
  /* FILTER RAIL: collapse time pills into 6-col grid, compact case toggles */
  .filter-rail h3 {
    font-size: 10px !important;
    margin-bottom: 8px !important;
  }
  .fr-section {
    margin-bottom: 12px !important;
    padding-bottom: 8px !important;
  }
  .fr-section:last-child {
    display: none !important;  /* hide quick stats - duplicates metric tiles */
  }
  .fr-time-grid {
    display: grid !important;
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 4px !important;
  }
  .fr-pill {
    padding: 8px 4px !important;
    font-size: 10px !important;
  }
  .fr-toggle {
    padding: 8px 10px !important;
  }
  
  /* MAP OVERLAY ITEMS: smaller on mobile */
  .map-status-strip {
    font-size: 9px !important;
    padding: 4px 8px !important;
  }
  .map-reset-view {
    top: 70px !important;  /* below metric tiles */
    right: 10px !important;
    padding: 5px 8px !important;
    font-size: 8px !important;
  }
  
  /* INTEL FEED: tighter */
  .intel-rail {
    padding: 12px !important;
  }
  .intel-rail h3 {
    font-size: 10px !important;
  }
  .brief-item {
    padding: 10px 0 !important;
  }
  .brief-item .brief-title {
    font-size: 13px !important;
    line-height: 1.35 !important;
  }
  .brief-item .brief-meta {
    font-size: 9px !important;
  }
  
  /* FOOTER: stack on mobile */
  .footer-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 20px !important;
  }
}

/* Extra small phones */
@media (max-width: 380px) {
  .metric-tiles {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  .metric-tile.mt-r0 {
    grid-column: span 3 !important;
  }
  nav.main-nav { gap: 10px !important; }
  nav.main-nav a { font-size: 10px !important; }
}
