/* Interactive chapter pages: layout on top of assets/site.css */
.imain { max-width: 1440px; margin: 0 auto; padding: 1.2rem 16px 3rem; }
.lead { max-width: 900px; margin: 0.4rem 0 0.6rem; }
.toc { font-size: 0.92rem; margin-bottom: 1rem; }
.toc a { text-decoration: none; font-weight: 600; }
h2.sec { font-size: 1.35rem; color: var(--main-blue); margin: 2rem 0 0.8rem; padding-bottom: 0.3rem; border-bottom: 2px solid var(--ida-red); }
.blk { border: 1px solid var(--border); border-radius: 10px; padding: 1rem 1.1rem; margin: 0 0 1.4rem; background: var(--white); }
.blk h3 { font-size: 1.1rem; color: var(--main-blue); margin: 0 0 0.7rem; }
.pair { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 1.2rem; align-items: start; }
.slide { margin: 0; position: sticky; top: 70px; }
.slide img { width: 100%; height: auto; border: 1px solid var(--border); border-radius: 4px; display: block; }
.slide figcaption { font-size: 0.8rem; margin-top: 0.25rem; }
.live { min-width: 0; }
.ctls { display: flex; flex-wrap: wrap; gap: 0.6rem 1.2rem; align-items: flex-end; margin-bottom: 0.4rem; }
.ctl { display: flex; flex-direction: column; flex: 1 1 200px; min-width: 180px; font-size: 0.9rem; }
.ctl input[type=range] { width: 100%; accent-color: var(--main-blue); }
.ctl select { padding: 0.3rem 0.4rem; border: 1px solid var(--border); border-radius: 6px; font: inherit; }
.btn { display: inline-block; padding: 0.4rem 0.8rem; border-radius: 6px; border: 1px solid var(--main-blue); background: var(--white); color: var(--main-blue); font: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--main-blue); color: var(--white); }
.btn.play { background: var(--main-blue); color: var(--white); min-width: 7rem; }
.btn.play:hover { background: var(--accent-blue); }
.charts { display: grid; grid-template-columns: 1fr; gap: 0.6rem; }
.charts:has(.chart + .chart) { grid-template-columns: 1fr 1fr; }
.charts.three, .charts.three:has(.chart + .chart) { grid-template-columns: 1fr 1fr 1fr; }
.chart { width: 100%; height: 360px; min-width: 0; }
.out { margin: 0.4rem 0 0 1.2rem; font-size: 0.95rem; }
.ask { background: #EEF3FA; border-left: 4px solid var(--main-blue); padding: 0.55rem 0.8rem; border-radius: 4px; margin-top: 0.8rem; }
.ask-tag { font-weight: 700; color: var(--main-blue); margin-right: 0.3rem; }
details { margin: 0.4rem 0 0; }
details summary { cursor: pointer; font-weight: 600; color: var(--main-blue); }
details p { margin: 0.35rem 0 0; }
.src { font-size: 0.82rem; margin-top: 0.5rem; }
@media (max-width: 1100px) {
  .pair { grid-template-columns: 1fr; }
  .slide { position: static; max-width: 720px; }
}
@media (max-width: 720px) {
  .charts:has(.chart + .chart), .charts.three, .charts.three:has(.chart + .chart) { grid-template-columns: 1fr; }
  .chart { height: 320px; }
}
/* opt-in: predict, then check (MFMI.predict) and exit ticket (MFMI.exitTicket) */
.pred { border: 0; margin: 0.6rem 0 0; padding: 0; min-width: 0; }
.pred legend, .ticket legend { font-weight: 600; color: var(--main-blue); padding: 0; margin-bottom: 0.3rem; }
.pick { display: flex; gap: 0.5rem; align-items: flex-start; padding: 0.35rem 0.55rem; margin: 0.25rem 0; border: 1px solid var(--border); border-radius: 6px; background: var(--white); cursor: pointer; line-height: 1.4; }
.pick input { margin: 0.2rem 0 0; flex: none; accent-color: var(--main-blue); width: 1rem; height: 1rem; }
.pick span { min-width: 0; overflow-wrap: anywhere; }
.pick:hover { border-color: var(--main-blue); }
.pick:focus-within { outline: 2px solid var(--main-blue); outline-offset: 2px; }
.pick.ok { border-color: #2E7D32; background: #EAF4EB; }
.pick.bad { border-color: #CD0000; background: #FBECEC; }
.pick.mine { border-width: 2px; }
.pick .why { display: block; font-size: 0.88rem; margin-top: 0.2rem; }
.pick.ok .why { color: #1E5E22; }
.pick.bad .why, .pick.no .why { color: #8E1B1B; }
.pred-act { display: flex; flex-wrap: wrap; gap: 0.4rem 0.8rem; align-items: center; margin-top: 0.45rem; }
.pred-res { font-weight: 600; }
.pred-res.is-ok { color: #2E7D32; }
.pred-res.is-bad { color: #CD0000; }
.btn:focus-visible { outline: 2px solid var(--main-blue); outline-offset: 2px; }
.ticket { margin: 0 0 1.4rem; }
.tq { margin: 0; padding: 0; list-style: none; counter-reset: tq; }
.tq > li legend::before { counter-increment: tq; content: counter(tq) ". "; }
.tq > li { margin: 0 0 1rem; max-width: 900px; }
.tq fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
/* opt-in veil (MFMI.predict with veil): slide blurred under a button, readout and (with charts) live charts blurred until reveal */
.slide.veiled > a { display: block; overflow: hidden; border-radius: 4px; pointer-events: none; }
.slide.veiled img { filter: blur(20px); opacity: 0.45; }
.chart.veiled-chart { filter: blur(28px); opacity: 0.3; user-select: none; }
.chart.veiled-chart, .chart.veiled-chart * { pointer-events: none !important; }
.veil-btn { position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); z-index: 2; box-shadow: 0 2px 8px rgba(31, 42, 68, 0.35); }
.out.veiled-out { filter: blur(5px); user-select: none; }
@media (max-width: 1100px) { .slide.veiled { position: relative; top: auto; } }
