/* ─── HANTA page — extends styles.css ─── */

:root {
  --hanta-virus: #c54a3a;
  --hanta-warn: #f43f5e;
  --hanta-confirmed: #b8410f;
  --hanta-critical: #7a0f2b;
  --hanta-suspected: #d97706;
  --hanta-origin: #6b4f9b;
  --hanta-recovered: #2f7a4e;
  --hanta-monitoring: #2a8a8a;
}

.ascii-hanta {
  color: var(--hanta-virus);
}

/* ─── INTRO ─── */
.hanta-intro {
  max-width: 880px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem 0;
}

.hanta-intro-inner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--hanta-virus);
  border-radius: 3px;
  padding: 1.1rem 1.5rem;
}

.hanta-intro-inner p {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text);
}

.hanta-intro-inner strong {
  color: var(--text-bright);
}

.hanta-intro-sub {
  margin-top: 0.6rem;
  font-family: var(--mono);
  font-size: 0.78rem !important;
  color: var(--text-muted) !important;
  line-height: 1.5 !important;
}

.hanta-intro-sub a {
  color: var(--text-muted);
  text-decoration: underline;
}

.hanta-intro-sub a:hover {
  color: var(--hanta-virus);
}

#updated-date {
  font-weight: 700;
  color: var(--text-bright);
}

/* ─── HEADLINE BANNER ─── */
.hanta-headline {
  max-width: 1100px;
  margin: 0.75rem auto 0;
  padding: 0 1.5rem;
}

.hanta-headline .headline-inner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--hanta-recovered);
  border-radius: 3px;
  padding: 1rem 1.25rem;
  position: relative;
}

.hanta-headline.tone-positive .headline-inner {
  border-left-color: var(--hanta-recovered);
  background: linear-gradient(90deg, #f0f7f2 0%, var(--surface) 30%);
}

.hanta-headline.tone-negative .headline-inner {
  border-left-color: var(--hanta-critical);
  background: linear-gradient(90deg, #fbeae8 0%, var(--surface) 30%);
}

.headline-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
  font-family: var(--mono);
}

.headline-tag {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  background: var(--hanta-recovered);
  color: #fff;
  padding: 0.2rem 0.55rem;
  border-radius: 2px;
  text-transform: uppercase;
}

.hanta-headline.tone-negative .headline-tag {
  background: var(--hanta-critical);
}

.hanta-headline.tone-neutral .headline-tag {
  background: var(--text-bright);
}

.headline-date {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.headline-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-bright);
  line-height: 1.3;
  margin: 0 0 0.3rem;
}

.headline-desc {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.5;
  margin: 0 0 0.4rem;
}

.headline-source {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--hanta-recovered);
  text-decoration: none;
  font-weight: 700;
}

.hanta-headline.tone-negative .headline-source {
  color: var(--hanta-critical);
}

.headline-source:hover {
  text-decoration: underline;
}

/* ─── STATS ─── */
.hanta-stats {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem 0;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hanta-stats .stat-card {
  flex: 1;
  min-width: 130px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.65rem 0.85rem;
  font-family: var(--mono);
}

.hanta-stats .stat-num {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-bright);
  line-height: 1;
}

.hanta-stats .stat-num.stat-deaths {
  color: var(--hanta-critical);
}

.hanta-stats .stat-num.stat-cfr {
  color: var(--hanta-virus);
}

.hanta-stats .stat-num.stat-infected {
  color: var(--hanta-confirmed);
}

.hanta-stats .stat-num.stat-monitoring {
  color: var(--hanta-monitoring);
}

.hanta-stats .stat-label {
  font-size: 0.7rem;
  color: var(--text-bright);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-top: 0.25rem;
  font-weight: 800;
}

.hanta-stats .stat-sub {
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.3px;
  margin-top: 0.2rem;
  line-height: 1.3;
}

/* ─── TIMELINE ─── */
.hanta-timeline-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.75rem 1.5rem 0;
}

.hanta-timeline-header {
  margin-bottom: 0.75rem;
}

.hanta-timeline-header h2 {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-bright);
}

.hanta-timeline-sub {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.timeline-chart-wrap {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1rem 1rem 0.5rem;
  overflow: hidden;
}

#timeline-chart {
  width: 100%;
  position: relative;
}

#timeline-chart svg {
  width: 100%;
  height: auto;
  display: block;
}

.tl-bar-cases {
  fill: var(--hanta-confirmed);
  transition: fill 0.15s;
}

.tl-bar-cases:hover {
  fill: var(--hanta-virus);
}

.tl-bar-cumulative {
  fill: none;
  stroke: var(--text-bright);
  stroke-width: 2;
  stroke-dasharray: 3 3;
}

.tl-bar-cumulative-area {
  fill: var(--text-bright);
  fill-opacity: 0.04;
  stroke: none;
}

.tl-death-dot {
  fill: var(--hanta-critical);
  stroke: #fff;
  stroke-width: 1.5;
}

.tl-event-line {
  stroke: var(--hanta-suspected);
  stroke-width: 1;
  stroke-dasharray: 2 2;
  opacity: 0.6;
}

.tl-event-label {
  font-family: var(--mono);
  font-size: 9px;
  fill: var(--hanta-suspected);
  font-weight: 700;
}

.tl-axis-label {
  font-family: var(--mono);
  font-size: 9px;
  fill: var(--text-muted);
}

.tl-axis-num {
  font-family: var(--mono);
  font-size: 10px;
  fill: var(--text-muted);
}

.tl-day-hover {
  fill: transparent;
  cursor: pointer;
}

.tl-day-hover:hover + .tl-day-bg,
.tl-day-bg.active {
  fill: rgba(197, 74, 58, 0.06);
}

.tl-day-bg {
  fill: transparent;
  pointer-events: none;
  transition: fill 0.1s;
}

.timeline-tooltip {
  position: absolute;
  background: var(--text-bright);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 0.7rem;
  padding: 0.5rem 0.7rem;
  border-radius: 3px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.1s;
  z-index: 10;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  line-height: 1.4;
}

.timeline-tooltip.visible {
  opacity: 1;
}

.timeline-tooltip b {
  color: #fff;
  font-weight: 800;
}

.timeline-tooltip .tt-event {
  display: block;
  margin-top: 0.25rem;
  color: var(--hanta-suspected);
  font-size: 0.65rem;
  white-space: normal;
  max-width: 220px;
}

.timeline-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
  margin-top: 0.5rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.legend-bar {
  width: 14px;
  height: 8px;
  border-radius: 1px;
  display: inline-block;
}

.legend-bar-cases { background: var(--hanta-confirmed); }
.legend-bar-deaths { background: var(--hanta-critical); border-radius: 50%; width: 8px; height: 8px; }
.legend-bar-cumulative { background: none; border-top: 2px dashed var(--text-bright); height: 0; width: 14px; align-self: center; }
.legend-bar-event { background: none; border-left: 1px dashed var(--hanta-suspected); width: 0; height: 12px; }

@media (max-width: 700px) {
  .timeline-chart-wrap {
    padding: 0.75rem 0.5rem 0.25rem;
  }
  .tl-event-label {
    font-size: 7px;
  }
}

/* ─── MAP ─── */
.hanta-map-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.75rem 1.5rem 0;
}

.hanta-map-header {
  margin-bottom: 0.75rem;
}

.hanta-map-header h2 {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-bright);
}

.hanta-map-sub {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

#hanta-map {
  height: 480px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
  z-index: 0;
}

.leaflet-container {
  font-family: var(--mono);
  background: #d9e7ef;
}

.leaflet-popup-content-wrapper {
  border-radius: 3px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.leaflet-popup-content {
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.45;
  margin: 0.7rem 0.85rem;
  color: var(--text);
}

.leaflet-popup-content b {
  color: var(--text-bright);
  font-weight: 800;
}

.popup-metrics {
  display: flex;
  gap: 1rem;
  margin: 0.4rem 0 0.3rem;
}

.popup-metric {
  text-align: left;
}

.popup-metric-num {
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1;
}

.popup-metric-num.popup-infected { color: var(--hanta-confirmed); }
.popup-metric-num.popup-deaths { color: var(--hanta-critical); }
.popup-metric-num.popup-monitored { color: var(--hanta-monitoring); }

.popup-metric-label {
  font-size: 0.55rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 0.2rem;
  font-weight: 700;
}

.popup-status {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.popup-coord-note {
  font-size: 0.66rem;
  color: var(--hanta-suspected);
  font-style: italic;
  margin: 0.35rem 0 0.2rem;
  line-height: 1.35;
  font-family: var(--font);
  background: #fff8e8;
  border-left: 2px solid var(--hanta-suspected);
  padding: 0.3rem 0.45rem;
  border-radius: 2px;
}

.country-coord-note {
  grid-column: 1 / -1;
  font-size: 0.72rem;
  color: var(--hanta-suspected);
  font-style: italic;
  margin-top: 0.3rem;
  padding: 0.35rem 0.55rem;
  background: #fff8e8;
  border-left: 2px solid var(--hanta-suspected);
  border-radius: 2px;
  line-height: 1.4;
}

.popup-precautions {
  font-size: 0.74rem;
  color: var(--text);
  border-top: 1px solid var(--border);
  padding-top: 0.4rem;
  margin-top: 0.4rem;
  font-family: var(--font);
}

.popup-source {
  font-size: 0.65rem;
  margin-top: 0.4rem;
}

.popup-source a {
  color: var(--hanta-virus);
  text-decoration: none;
}

.popup-source a:hover {
  text-decoration: underline;
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
  margin-top: 0.75rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.2);
}

.dot-confirmed { background: var(--hanta-confirmed); }
.dot-critical { background: var(--hanta-critical); }
.dot-suspected { background: var(--hanta-suspected); }
.dot-origin { background: var(--hanta-origin); }
.dot-monitoring { background: var(--hanta-monitoring); }

/* ─── COUNTRIES LIST ─── */
.hanta-countries-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.75rem 1.5rem 0;
}

.hanta-countries-header {
  margin-bottom: 0.75rem;
}

.hanta-countries-header h2 {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-bright);
}

.hanta-countries-sub {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.country-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
  background: var(--border);
}

.country-card {
  background: var(--surface);
  padding: 0.85rem 1.1rem;
  display: grid;
  grid-template-columns: 38px 1fr auto auto;
  gap: 0.5rem 1rem;
  align-items: center;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}

.country-card:last-child { border-bottom: none; }
.country-card:hover { background: #faf6ee; }

.country-flag-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-block;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.2);
  justify-self: center;
}

.country-flag-dot.dot-confirmed { background: var(--hanta-confirmed); }
.country-flag-dot.dot-critical { background: var(--hanta-critical); }
.country-flag-dot.dot-suspected { background: var(--hanta-suspected); }
.country-flag-dot.dot-origin { background: var(--hanta-origin); }
.country-flag-dot.dot-monitoring { background: var(--hanta-monitoring); }

.country-main {
  min-width: 0;
}

.country-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-bright);
  line-height: 1.2;
}

.country-meta {
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 0.15rem;
}

.country-precautions {
  grid-column: 1 / -1;
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.5;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--border);
  margin-top: 0.2rem;
}

.country-precautions a {
  color: var(--hanta-virus);
}

.country-metrics {
  font-family: var(--mono);
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.country-metric {
  text-align: right;
  min-width: 50px;
}

.country-metric-num {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1;
}

.country-metric-num.metric-infected { color: var(--hanta-confirmed); }
.country-metric-num.metric-deaths { color: var(--hanta-critical); }
.country-metric-num.metric-monitored { color: var(--hanta-monitoring); }
.country-metric-num.metric-zero { color: var(--text-dim); }

.country-metric-label {
  font-size: 0.58rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 0.25rem;
  font-weight: 700;
}

.country-status-tag {
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
  color: #fff;
  white-space: nowrap;
}

.tag-confirmed { background: var(--hanta-confirmed); }
.tag-critical { background: var(--hanta-critical); }
.tag-suspected { background: var(--hanta-suspected); }
.tag-origin { background: var(--hanta-origin); }
.tag-monitoring { background: var(--hanta-monitoring); }

/* ─── PREVENTION ─── */
.hanta-prevention-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.75rem 1.5rem 0;
}

.hanta-prevention-header {
  margin-bottom: 0.75rem;
}

.hanta-prevention-header h2 {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-bright);
}

.hanta-prevention-sub {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.prevention-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.85rem;
}

.prevention-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--hanta-virus);
  border-radius: 3px;
  padding: 0.95rem 1.1rem;
}

.prevention-card-title {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-bright);
  margin-bottom: 0.55rem;
}

.prevention-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.prevention-card li {
  font-size: 0.84rem;
  color: var(--text);
  line-height: 1.5;
  padding: 0.3rem 0 0.3rem 1rem;
  position: relative;
  border-bottom: 1px dashed var(--border);
}

.prevention-card li:last-child { border-bottom: none; }

.prevention-card li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--hanta-virus);
  font-weight: 700;
}

/* ─── SYMPTOMS ─── */
.hanta-symptoms-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.75rem 1.5rem 0;
}

.hanta-symptoms-header h2 {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-bright);
  margin-bottom: 0.75rem;
}

.symptoms-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.symptom-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.9rem 1.1rem;
}

.symptom-card.symptom-early {
  border-left: 3px solid var(--hanta-suspected);
}

.symptom-card.symptom-late {
  border-left: 3px solid var(--hanta-critical);
}

.symptom-card-title {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-bright);
  margin-bottom: 0.55rem;
}

.symptom-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.symptom-card li {
  font-size: 0.84rem;
  color: var(--text);
  line-height: 1.45;
  padding: 0.25rem 0 0.25rem 1rem;
  position: relative;
}

.symptom-card li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--hanta-virus);
}

@media (max-width: 700px) {
  .symptoms-grid {
    grid-template-columns: 1fr;
  }
  .country-card {
    grid-template-columns: 28px 1fr auto;
    gap: 0.4rem 0.7rem;
  }
  .country-status-tag {
    grid-column: 1 / -1;
    justify-self: start;
    margin-top: 0.3rem;
  }
  #hanta-map {
    height: 360px;
  }
}

/* ─── NEWS LIST ─── */
.hanta-filters-bar {
  margin-top: 1.5rem;
}

.hanta-content {
  padding-top: 0.5rem;
}

.news-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
  background: var(--border);
}

.news-card {
  background: var(--surface);
  padding: 1rem 1.2rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem 1.2rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.news-card:last-child { border-bottom: none; }
.news-card:hover { background: #faf6ee; }

.news-card-main {
  min-width: 0;
}

.news-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-bright);
  line-height: 1.3;
  margin-bottom: 0.25rem;
}

.news-title a {
  color: var(--text-bright);
  text-decoration: none;
}

.news-title a:hover {
  color: var(--hanta-virus);
  text-decoration: underline;
}

.news-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.9rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.news-desc {
  font-size: 0.86rem;
  color: var(--text);
  line-height: 1.5;
}

.news-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0.18rem 0.5rem;
  border-radius: 2px;
  color: #fff;
  flex-shrink: 0;
  align-self: start;
}

.tag-outbreak { background: var(--hanta-virus); }
.tag-case { background: var(--hanta-confirmed); }
.tag-guidance { background: #3170a9; }
.tag-explainer { background: var(--hanta-origin); }

@media (max-width: 700px) {
  .news-card {
    grid-template-columns: 1fr;
  }
  .news-tag {
    justify-self: start;
  }
}

.empty-state {
  background: var(--surface);
  padding: 2.5rem 1.5rem;
  text-align: center;
  font-family: var(--mono);
  color: var(--text-muted);
}
