/* basic layout */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 20px;
  background: #f9f9f9;
}

#hero {
  max-width: 960px;
  margin: 20px auto 30px auto;
  padding: 0 12px;
}

#hero_media{
  width: 100%;
  max-width: 960px;
  height: 150px;        /* controls the visible height */
  object-fit: cover;    /* crops instead of stretching */
  display: block;
  margin: 0 auto 24px auto;
  border: 1px solid #ddd;
  border-radius: 10px;
}



#hero h1 {
  margin: 0 0 8px 0;
  font-size: 28px;
}

#hero p {
  margin: 0 0 14px 0;
  font-size: 15px;
  line-height: 1.4;
  color: #333;
}



#chart,
#chart-cumulative,
#map {
  max-width: 960px;
  margin: 0 auto 40px auto;
}


/* make SVGs actually visible and not squashed */
svg {
  display: block;
  max-width: 100%;
}

/* tooltip used by both chart and map */
.tooltip {
  position: fixed;
  pointer-events: none;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 12px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
  z-index: 10;
}

/* map controls layout */
#map-controls {
  max-width: 960px;
  margin: 10px auto 10px auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

#map-controls button {
  padding: 4px 8px;
  font-size: 14px;
  cursor: pointer;
}

#map-controls input[type="range"] {
  flex: 1;
}

/* map countries */
.country {
  stroke: #555;
  stroke-width: 0.3px;
}

/* if I ever re-enable event legend styles on chart */
.event-legend rect {
  fill: rgba(255, 255, 255, 0.9);
  stroke: #ccc;
}

.event-legend-title {
  font-size: 12px;
  font-weight: bold;
}

.event-legend-item {
  font-size: 11px;
}

#chart-toggle-bar{
  max-width: 960px;
  margin: 0 auto 10px auto;
  display: flex;
  justify-content: flex-end;
}

#btn-toggle-chart{
  padding: 6px 10px;
  font-size: 14px;
  cursor: pointer;
}

.is-hidden{
  display: none;
}



.hero{
  max-width: 1200px;        /* wider than charts */
  margin: 0 auto 20px auto;
  background: #fff;
  border: 2px solid #000;
  border-radius: 18px;
  overflow: hidden;        /* important for cropping */
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.hero__media{
  width: 100%;
  height: 260px;           
  object-fit: cover;       
  display: block;
  border-bottom: 1px solid #000; 
}
/* --- PAGE POLISH --- */
body{
  margin: 0;                 /* removes the awkward outer gap */
  background: #f6f7f9;
}

.page{
  max-width: 980px;          /* keep charts aligned */
  margin: 0 auto;
  padding: 22px 16px 48px;
}

/* --- HERO POLISH --- */
.hero{
  max-width: 1200px;         /* wider banner than charts */
  margin: 0 auto 18px auto;
  background: #fff;
  border: 2px solid #000;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0,0,0,0.10);
}

.hero__media{
  width: 100%;
  height: 260px;             /* banner height - adjust 220–320 */
  object-fit: cover;
  display: block;
  border-bottom: 1px solid rgba(0,0,0,0.25); 
}

.hero__content{
  padding: 18px 22px 20px;
}

.hero__content h1{
  margin: 0 0 8px 0;
  font-size: 34px;
  letter-spacing: -0.3px;
  line-height: 1.1;
}

.hero__content p{
  margin: 0 0 14px 0;
  font-size: 15px;
  line-height: 1.55;
  color: #333;
  max-width: 72ch;           /* keeps paragraph from stretching too wide */
}

/* meta pills */
.hero__meta{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero__meta span{
  font-size: 12px;
  color: #111;
  border: 1px solid rgba(0,0,0,0.25);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,0.03);
}

/* make the first section align nicely under hero */
.card{
  background: #fff;
  border: 1px solid #eee;
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.05);
  margin: 14px 0;
}
/* --- CHART / MAP CARDS --- */
.card{
  background: #fff;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  margin: 18px auto 30px auto;
  max-width: 960px;
}
/* Cards: consistent framing without competing with the hero gif */
.card{
  background: #fff;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.06);
  margin: 18px 0;
}

/* Tie cards to the hero’s black frame without boxing everything */
.card{
  border-top: 3px solid #000;
}

/* --- FOOTER --- */
.footer{
  max-width: 960px;
  margin: 40px auto 10px auto;
  padding-top: 18px;
  border-top: 1px solid rgba(0,0,0,0.15);
  font-size: 13px;
  color: #333;
}

.footer__main{
  margin-bottom: 8px;
}

.footer__sources{
  font-size: 12px;
  color: #555;
}

.footer__sources ul{
  margin: 6px 0 0 18px;
  padding: 0;
}

.footer__sources li{
  margin-bottom: 4px;
}
