html {
    scroll-behavior: smooth;
  }
  
  .step-section {
    display: none;
    padding: 40px 0;
    font-size: 17px;
  }
  
  .step-section.is-visible {
    display: block;
  }
  


:root{ 
    --bg:#0b0f14; 
    --ink:#f0f3f7; 
    --muted:#aab3bd; 
    --accent:#ff4d6d;
    --accent-2:#4dd0ff; 
    --surface:#111821; 
    --track:#243041; 
    --shadow: 0 10px 30px rgba(0,0,0,.45); 
    --bar-h: 14px;
}

*{box-sizing:border-box} 
html,body{margin:0;padding:0}
body{
    font-family: "Georgia","Times",serif;
    font-size: 17px; 
    background: var(--bg); 
    color: var(--ink); 
    line-height:1.6;
}



.container{width:50vw; margin:0 auto; padding:40px 0 72px} 
.center{text-align:center}


h1,h2,h3,p{margin:0 0 10px} 

.byline{
    font-family: "BentonSansCondBold","Arial",sans-serif;
    margin: 8px 0;
    text-align: center;
    color:white; 
    font-weight:bold
} 
.kicker{color:var(--muted)}


.btn{
    border:0; 
    cursor:pointer; 
    padding:14px 22px; 
    font-weight:700; 
    letter-spacing:.02em; 
    border-radius:16px; 
    box-shadow:var(--shadow); 
    transition:.2s transform ease, .2s opacity ease;
}
.btn:disabled{opacity:.45; cursor:not-allowed} 
.btn:active{transform:translateY(1px)} 
.btn-primary{background:var(--accent); color:white} 
.btn-secondary{background:#1f2a3a; color:#e1e8f0; border:1px solid #2c3b52}


.nav-rail{
    display:flex; 
    justify-content:space-between; 
    align-items:center; 
    gap:10px; 
    padding:16px 0 24px
} 
.nav-sticky{
    position:sticky; 
    bottom:0; 
    background:rgba(11,15,20,.9); 
    padding:14px; 
    backdrop-filter: blur(4px)
}


.info-panel{
    background:#0f1622; 
    border:1px solid #21314a; 
    border-radius:16px; padding:16px; 
    color:#d8e1eb; box-shadow:var(--shadow); 
    text-align:center;
}
.info-panel p{margin:10px 0} 
.info-panel ul{margin:10px auto; padding-left:18px; text-align:left; max-width:44vw}


.choices{
    margin:22px 0 10px; 
    display:flex; flex-wrap:wrap; 
    gap:12px; justify-content:center
}
.choices.grid{
    display:grid; 
    grid-template-columns:repeat(4, 1fr); 
    gap:12px
} 
.choices.split{
    display:grid; 
    grid-template-columns:repeat(2, 1fr); 
    gap:16px
}


.chip, .card{
    background:var(--surface); 
    color:var(--ink); 
    border:1px solid #233043; 
    border-radius:18px; 
    padding:14px 16px; 
    font-weight:700; 
    text-align:center; 
    box-shadow:var(--shadow);
}
.card h3{margin:6px 0 4px} .card p{margin:0; color:var(--muted); font-weight:500}
.chip:hover, .card:hover{outline:2px solid var(--accent-2)} .chip.active, .card.active{background:#1c2740; 
    outline:2px solid var(--accent)}


.indicator-line{
    position:absolute; 
    top:0; 
    width:3px; 
    height:var(--bar-h); 
    background:#ffffff; 
    border-radius:2px; 
    box-shadow:0 0 0 2px rgba(255,255,255,.18);
} 

.fraction{
    position:absolute; 
    right:0; 
    top:calc(-32px - var(--bar-h)); 
    color:#d0dae6; font-weight:700
}


.hero{
    position:relative; 
    height:100vh; 
    background:url('../images/first.png') center/cover no-repeat;
} 
.hero-overlay{
    position:absolute; 
    inset:0; background:linear-gradient(to bottom, rgba(0,0,0,.20), rgba(0,0,0,.12) 30%, rgba(11,15,20,85) 95%)
}

.step-section,
.step-section p,
.step-section h2,
.step-section h3,
.step-section li,
.step-section .info-panel,
#resultSection,
#resultSection p,
#resultSection h2,
#resultSection h3,
#resultSection li {
  color: white;
}

.choices .chip,
.choices .card {
  color: white;
}


.choices .chip.active,
.choices .card.active {
  color: white;
}



.scroll-hint{
    position:absolute;bottom:14px;
    left:50%;transform:translateX(-50%); 
    font-size:.85rem;
    color:var(--muted);
    letter-spacing:.2em;
    text-transform:uppercase;
}

.copy{color:#d9e2ec} 
.copy .lede{font-weight:400; font-size: 16px;}

main.main{
    font-family: "Georgia","Times",serif;
    font-size: 17px;
    min-height:calc(100vh - 220px); 
    display:flex; 
    flex-direction:column; 
    align-items:center; 
    justify-content:center
}


.score-badge{
    font-size: clamp(2rem, 7vw, 5rem); 
    font-weight:900; 
    text-align:center; 
    margin-top:6px; 
    background:linear-gradient(45deg, var(--accent), #ffa94d); 
    -webkit-background-clip:text; 
    background-clip:text; 
    color:transparent;
}

.meter{
    height:18px; 
    background:var(--track); 
    border-radius:14px; 
    overflow:hidden; 
    box-shadow:var(--shadow); 
    margin:10px 0 10px
}

.fill{
    height:100%; 
    width:0%; 
    background:linear-gradient(90deg, #ff4d6d, #ffa94d)
} 
.explain{
    margin:6px 0 16px; 
    color:white; 
    text-align:center
}
.explain .pill{
    display:inline-block; 
    background:#1b2536; 
    border:1px solid #2a3b57; 
    border-radius:999px; 
    padding:4px 8px; 
    margin:2px 6px 2px 0; font-size:.9rem;
}

.restart{text-align:center; margin-top:12px}

#storySection p {
    font-size: 20px;
    line-height: 2.0;
  }


@media (max-width: 900px){ 
    .container, .progress-bar{width:88vw} 
    .info-panel ul{max-width:80vw} 
    .choices.grid{grid-template-columns:repeat(2, 1fr)} 
    .choices.split{grid-template-columns:1fr} 
}

.story-image {
    margin: 24px 0;
  }
  
  .story-image img {
    width: 100%;
    display: block;
    border-radius: 8px;
  }
  
  .story-image figcaption {
    font-size: 14px;
    color: lightgray;
    margin-top: 2px;
    line-height: 1.4;
  }

  

.viz-block {
    margin: 32px 0 24px;
  }
  
  .viz-title {
    font-size: 1.1rem;
    margin-bottom: 4px;
    color: #ffffff;
  }
  
  .viz-caption {
    margin-bottom: 0px;
  }
  

  .visa-bar-chart {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  
  .visa-bar {
    display: grid;
    grid-template-columns: 90px 1fr 110px;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
  }
  
  .visa-label {
    color: #e5e9f0;
  }
  
  .visa-bar-track {
    position: relative;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    height: 12px;
    overflow: hidden;
  }
  
  .visa-bar-fill {
    position: absolute;
    height: 100%;
    border-radius: 999px;
  }
  
  .visa-bar-fill.lottery {
    background: linear-gradient(90deg, #ff5c7a, #ff9966);
  }
  
  .visa-bar-fill.special {
    background: linear-gradient(90deg, #4dd0ff, #80ffea);
  }
  
  .visa-tag {
    text-align: right;
    color: #cbd3dd;
  }
  
  .visa-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
    font-size: 0.8rem;
    color: #cbd3dd;
  }
  
  .legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  
  .legend-swatch {
    display: inline-block;
    width: 14px;
    height: 8px;
    border-radius: 999px;
  }
  
  .legend-swatch.lottery {
    background: linear-gradient(90deg, #ff5c7a, #ff9966);
  }
  
  .legend-swatch.special {
    background: linear-gradient(90deg, #4dd0ff, #80ffea);
  }
  
  @media (max-width: 600px) {
    .visa-bar {
      grid-template-columns: 80px 1fr;
      grid-template-rows: auto auto;
    }
  
    .visa-tag {
      grid-column: 1 / -1;
      text-align: left;
      font-size: 0.75rem;
      opacity: 0.85;
    }
  }
  

.opt-axis {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #cbd3dd;
  margin: 8px 0 4px;
}

.opt-timeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}

.opt-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.opt-label {
  width: 70px;
  font-size: 0.85rem;
  color: #e5e9f0;
}

.opt-track {
  position: relative;
  flex: 1;
  height: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.opt-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 999px;
}

.opt-fill.nonstem {
  width: 33%;
  background: linear-gradient(90deg, #ff5c7a, #ff9966);
}

.opt-fill.stem {
  width: 100%;
  background: linear-gradient(90deg, #4dd0ff, #80ffea);
}

.opt-end-label {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

@media (max-width: 600px) {
  .opt-label {
    width: 60px;
  }
}
