/* Flythrough page: the 3D map stays put while the story cards scroll past it. */
body.story-page { height: auto; }
.story { display: grid; grid-template-columns: 420px 1fr; }
.viz { grid-column: 2; grid-row: 1; position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.steps { grid-column: 1; grid-row: 1; background: var(--panel); border-right: 1px solid var(--line); padding: 0 24px 40vh; }
.step { min-height: 55vh; padding: 22vh 0 0; }
.step:first-child { padding-top: 34vh; }
.card { background: transparent; }
.card .kicker { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); font-weight: 650; margin-bottom: 6px; }
.card h2 { font-size: 22px; line-height: 1.2; text-transform: none; letter-spacing: -0.01em; color: var(--text); margin: 0 0 10px; font-weight: 700; }
.card p { font-size: 15.5px; }
.big { font-size: 40px; font-weight: 750; letter-spacing: -0.02em; line-height: 1.05; color: var(--accent); margin: 4px 0 2px; }
.big small { display: block; font-size: 13px; line-height: 1.4; font-weight: 500; letter-spacing: 0; color: var(--muted); margin-top: 4px; }
.stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 14px; }
.stat { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.stat b { display: block; font-size: 22px; color: var(--text); }
.stat span { font-size: 12px; color: var(--muted); }
.flips { list-style: none; padding: 0; margin: 10px 0 12px; font-size: 13.5px; }
.flips li { display: grid; grid-template-columns: 1fr auto 14px auto; gap: 6px; padding: 5px 0; border-bottom: 1px solid var(--line); align-items: center; }
.flips .r { color: #ff8b8b; text-align: right; } .flips .d { color: #8fa8ff; text-align: right; } .flips .ar { color: var(--muted); text-align: center; }
.card .note { font-size: 12.5px; color: var(--muted); }
.card .links { display: grid; gap: 8px; margin-top: 14px; }
.intro-card h1 { font-size: 30px; }
.intro-card .back { margin-bottom: 18px; }

/* map overlays */
.key { position: absolute; right: 16px; top: 16px; background: rgba(21,26,34,.9); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; font-size: 11px; color: var(--muted); width: 270px; transition: opacity .4s; }
.key .legend { margin-bottom: 4px; }
.key .legend-title:first-child { margin-top: 0; }
.split-key { display: flex; gap: 12px; }
.split-key i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.dots { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); display: grid; gap: 8px; z-index: 6; }
.dots button { width: 10px; height: 10px; padding: 0; border-radius: 50%; background: transparent; border: 1.5px solid var(--muted); }
.dots button[aria-current="step"] { background: var(--accent); border-color: var(--accent); }
.label { transition: opacity .25s; }

@media (max-width: 820px) {
  .story { grid-template-columns: 1fr; }
  .viz { grid-column: 1; }
  .steps { grid-column: 1; position: relative; z-index: 3; background: transparent; border: 0; padding: 0 12px 30vh; pointer-events: none; }
  .step { padding-top: 70vh; min-height: 0; }
  .step:first-child { padding-top: 58vh; }
  .step > * { pointer-events: auto; }
  .card { background: rgba(21,26,34,.94); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
  .intro-card { padding-top: 0; }
  .intro-card > * { pointer-events: auto; }
  .key { top: 10px; right: 10px; left: auto; width: 200px; padding: 6px 8px; font-size: 9.5px; }
  .key .legend { font-size: 9px; }
  .key .legend i { height: 7px; }
  .key .legend-title { font-size: 10px; margin: 4px 0 2px; }
  .dots { display: none; }
  .big { font-size: 32px; }
}

/* seat strips (Texas House, U.S. House steps) */
.seats { display: flex; flex-wrap: wrap; gap: 2px; margin: 12px 0 4px; }
.seats i, .seats-key i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; }
.seats .d, .seats-key .d { background: #584cde; }
.seats .r, .seats-key .r { background: #d72f30; }
.seats .f, .seats-key .f { box-shadow: inset 0 0 0 1.5px var(--accent); }
.seats-key { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.seats-key i { margin-right: 5px; vertical-align: -1px; }
