body {
    font-family: "Newsreader", serif;
    line-height: 1.7;
    color: #2c2c2c;
    background-color: #f2f2f2;
    padding: 40px 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 30px;
    
}

header h1 {
    font-weight: 700;
    font-size: 2.1em;
    margin-bottom: 10px;
    text-align: center;
}

h2 {
    font-weight: 600;
    font-size: 1.4em;
    margin-bottom: 20px;
}

p {
    font-size: 1.2em;
    font-weight: 400;
    margin-bottom: 10px;
}

a {
    color: #003366;
  }

img, svg {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px 0;
}

/* Scrolly */
.scrolly-container {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin: 0 auto;
  max-width: 1000px;
  padding-top: 10vh;
  padding-bottom:30vh;
}

.scrolly-container .graphic{
  position: sticky;
  top: 30px;
  width: 57%;
  height: 60vh;
}

#unitChart {
  width: 100%;
  height: 100%;
}

#annotation {
  position: absolute;
  top: 12px;
  left: 20px;
  background: rgba(255,255,255,0.85);
  padding: 0px 8px;
  border-radius: 4px;
  font-size: 0.9em;
  transition: opacity 0.3s ease;
}

.scrolly-container .steps {
  width: 43%;
  padding-left: 2rem;
}

.steps section {
  min-height: 20vh;
  display: flex;
  align-items: center;
  font-size: 1.1em;
  line-height: 1.6;
  border-left: 4px solid transparent;
  padding-left: 0.5rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.steps section.is-active {
  border-color: #000;
  background: rgba(0,0,0,0.03);
}

/* Screener */
.chart {
  max-width: 600px;
  margin: 0 auto;
  font-family: Arial, sans-serif;
}

.step {
  display: none;
  padding: 1rem;
  text-align: center;
  border-radius: 6px;
}

.step.active {
  display: block;
}

section[data-step] {
    display: flex;              
    flex-direction: column; 
    margin-bottom: 15vh;   
  }
  

section[data-step] p {
    display: block;              
    margin: 0 0 1em 0;         
    line-height: 1.9;
    font-size: 1.1em;       
  }

.text-block {
    display: flex;
    flex-direction: column;
  }

.scroll-buffer {
  height: 30vh; 
}

/* screener*/
.chart {
    max-width: 700px;
    margin: 2rem auto;
    padding-bottom: 10vh;
    padding-top:10vh;
    border-radius: 8px;
  }
  
  .step {
    display: none;
    padding: 2.2rem;
    border-radius: 6px;
    background: hsl(0, 0%, 100%);
    text-align: left;
  }

  .step h3{
    font-size: 1.4em;
  }
  
  .step.active {
    display: block;
  }
  
  .options-list {
    list-style: none;  
    padding: 0;
    margin: 1rem 0;
  }
  
  .option-button {
    display: block;
    width: 100%;
    padding: 0.8rem 1rem;
    margin-bottom: 0.6rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #ededed;
    color: #333;
    text-align: left;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s ease, border-color 0.2s ease;
  }
  
  .option-button:hover {
    background-color: #e6e6e6;
    border-color: #999;
  }

  .result-box {
    padding: 1.2rem;
    border-radius: 4px;
    color: black;
  }
  
  .restart-button {
    margin-top: 1rem;
    padding: 0.6rem 1.2rem;
    background-color: #444;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
  }
  
  .restart-button:hover {
    background-color: #222;
  }

/* tooltip */
.tooltip {
    position: absolute;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 0.9rem;
    color: #111;
    box-shadow: 0 1px 8px rgba(0,0,0,0.08);
    pointer-events: none;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.timeline-horizontal {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding: 1rem 0;
    scroll-snap-type: x mandatory; 
  }
  
  .timeline-horizontal .event {
    background: #fff;
    border-radius: 8px;
    padding: 1rem;
    flex: 0 0 calc((100% / 3) - 1rem); 
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    flex-shrink: 0;
  }
  
  .timeline-horizontal .date {
    font-weight: bold;
    margin-bottom: 0.5rem;
  }
  
  .timeline-horizontal .badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    margin-left: 0.3rem;
    font-size: 0.75rem;
    border-radius: 4px;
    color: #fff;
  }
  
  .timeline-horizontal .event.medicaid .badge {
    background-color: #007bff;
  }
  
  .timeline-horizontal .event.alliance .badge {
    background-color: #28a745;
  }
  
  .timeline-horizontal .title {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
  }
  
  .timeline-horizontal .description {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.4;
  }

footer{
    font-size: 0.9em;
    text-align: center;
}

/* responsive */
@media (max-width: 900px) {
  .scrolly-container {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .graphic,
  .steps {
    flex: 1 1 50%;
    max-width: 50%;
  }
}

@media (max-width: 600px) {
  .scrolly-container {
    flex-direction: column;
  }

  .graphic,
  .steps {
    flex: 1 1 100%;
    max-width: 100%;
    padding-left: 0;
  }
}
