/* Interactive lesson engine styles. Uses the app's variables (--navy, --gold, --accent, --cream) and --sc (subject color). */
.ix-head { margin-bottom: .6rem; }
.ix-kicker { font-size: .78rem; letter-spacing: 2px; font-weight: 900; color: var(--sc, var(--navy)); text-transform: uppercase; }
.ix-head h2 { margin-bottom: .2rem; }
.ix-goal { color: var(--muted); font-weight: 600; }

.ix-flow { display: flex; flex-direction: column; gap: 1rem; margin-top: .8rem; }
.ix-step { background: var(--cream); border: 2px solid #e2e7ef; border-radius: 16px; padding: 1rem 1.1rem 1.1rem; position: relative; animation: ixin .35s ease-out; }
@keyframes ixin { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.ix-step.done { border-color: var(--sc, var(--pitch)); }
.ix-step-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .4rem; }
.ix-step-head h3 { color: var(--navy); font-size: 1.1rem; }
.ix-step-n { width: 30px; height: 30px; border-radius: 50%; background: var(--sc, var(--navy)); color: #fff; font-weight: 900; display: flex; align-items: center; justify-content: center; flex: none; font-size: .95rem; }
.ix-step.done .ix-step-n::after { content: "\2713"; }
.ix-step.done .ix-step-n { font-size: 0; }
.ix-step.done .ix-step-n::after { font-size: 1rem; }
.ix-prompt { font-size: 1.08rem; font-weight: 700; margin-bottom: .6rem; line-height: 1.45; }
.ix-hint { color: var(--muted); font-weight: 600; font-size: .92rem; margin-bottom: .6rem; }
.ix-ask { background: #fff8e1; border-left: 5px solid var(--gold); padding: .5rem .8rem; border-radius: 8px; font-weight: 700; margin: .6rem 0; }
.ix-parent { color: var(--muted); font-size: .88rem; font-style: italic; margin-top: .6rem; }
.ix-talk { font-size: 1.12rem; font-weight: 700; line-height: 1.5; margin-bottom: .6rem; }

.ix-row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: .7rem; }
.ix-btn { font: inherit; font-weight: 900; font-size: 1rem; background: var(--sc, var(--navy)); color: #fff; border: 0; border-radius: 99px; padding: .7rem 1.4rem; cursor: pointer; min-height: 44px; }
.ix-btn:disabled { opacity: .5; cursor: default; }
.ix-btn.ghost { background: #fff; color: var(--navy); border: 2px solid #cdd4de; }
.ix-btn.small { padding: .45rem 1rem; font-size: .9rem; min-height: 38px; }
.ix-btn.big { font-size: 1.15rem; padding: .9rem 1.8rem; margin: 1rem 0; background: var(--accent); box-shadow: 0 4px 12px rgba(255,143,31,.45); }
.ix-say { display: inline-flex; align-items: center; gap: .4rem; font: inherit; font-weight: 800; font-size: .88rem; background: #eef2f7; color: var(--navy-soft); border: 2px solid var(--navy-soft); border-radius: 99px; padding: .45rem .9rem; cursor: pointer; min-height: 40px; margin-top: .5rem; }
.ix-say svg { width: 18px; height: 18px; }
.ix-next { display: block; margin: 1rem auto 0; font: inherit; font-weight: 900; font-size: 1.05rem; background: var(--accent); color: #fff; border: 0; border-radius: 99px; padding: .8rem 1.8rem; cursor: pointer; box-shadow: 0 4px 12px rgba(255,143,31,.45); min-height: 48px; }
.ix-redo { position: absolute; right: .9rem; top: .8rem; font: inherit; font-size: .78rem; font-weight: 800; background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; }
.ix-reveal { margin-top: .9rem; background: #e6f7ea; border-left: 6px solid #2f9e44; border-radius: 10px; padding: .7rem .9rem; font-weight: 700; font-size: 1.02rem; line-height: 1.45; animation: ixin .4s ease-out; }
.ix-done-line { color: #1f6b52; font-weight: 800; margin-top: .5rem; }
.ix-toast { margin-top: .7rem; border-radius: 10px; padding: .6rem .9rem; font-weight: 700; animation: ixin .25s ease-out; }
.ix-toast.soft { background: #fff4e5; color: #8a5a1a; border-left: 5px solid var(--accent); }
.ix-toast.good { background: #e6f7ea; color: #1f6b52; border-left: 5px solid #2f9e44; }
.ix-shake { animation: ixshake .4s; }
@keyframes ixshake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* teach */
.ix-teach-card { background: #fff; border-radius: 14px; padding: 1rem 1.1rem; box-shadow: var(--shadow); }
.ix-teach-count { font-size: .75rem; font-weight: 900; letter-spacing: 1.5px; color: var(--muted); margin-bottom: .3rem; }
.ix-teach-text { font-size: 1.15rem; line-height: 1.55; font-weight: 600; }
.ix-art { margin-bottom: .6rem; }
.ix-art svg { width: 100%; max-height: 180px; display: block; }

/* compare */
.ix-compare { display: flex; gap: 1.2rem; justify-content: center; align-items: flex-end; padding: .6rem 0 .2rem; }
.ix-bar-col { font: inherit; background: none; border: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: .3rem; width: 150px; }
.ix-bar-track { width: 90px; height: 200px; background: #e6e9ef; border-radius: 12px; position: relative; display: flex; align-items: flex-end; overflow: hidden; }
.ix-bar { width: 100%; border-radius: 12px 12px 0 0; transition: height 1.1s cubic-bezier(.2,.8,.2,1); }
.ix-bar-val { position: absolute; left: 0; right: 0; top: 8px; text-align: center; font-weight: 900; font-size: 1.4rem; color: var(--navy); font-family: "Courier New", monospace; }
.ix-bar-col.on .ix-bar-val { color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.4); }
.ix-bar-label { font-weight: 800; }
.ix-bar-col small { color: var(--muted); font-weight: 700; min-height: 1.2em; text-align: center; }

/* chain */
.ix-chain { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-bottom: .8rem; }
.ix-slot { min-width: 120px; min-height: 52px; border: 2px dashed #b8c2d1; border-radius: 12px; display: flex; align-items: center; gap: .5rem; padding: .4rem .6rem; background: #fff; flex: 1; }
.ix-slot.filled { border-style: solid; border-color: var(--sc, var(--pitch)); background: #fff; font-weight: 800; }
.ix-slot-n { width: 24px; height: 24px; border-radius: 50%; background: #e6e9ef; color: var(--navy); font-weight: 900; font-size: .8rem; display: flex; align-items: center; justify-content: center; flex: none; }
.ix-slot.filled .ix-slot-n { background: var(--sc, var(--pitch)); color: #fff; }
.ix-arrow { font-size: 1.4rem; font-weight: 900; color: var(--muted); }
.ix-bank { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .4rem; }
.ix-chip { font: inherit; font-weight: 800; font-size: .98rem; background: #fff; border: 2px solid var(--navy-soft); color: var(--navy); border-radius: 99px; padding: .55rem 1rem; cursor: pointer; min-height: 44px; }
.ix-chip.sel { background: var(--navy-soft); color: #fff; }
.ix-chip.ix-trace { border-color: var(--accent); color: #a04e00; margin-top: .5rem; }

/* label map */
.ix-map { background: #fff; border-radius: 14px; padding: .6rem; box-shadow: var(--shadow); }
.ix-map-art { position: relative; width: 100%; }
.ix-map-art svg { width: 100%; height: auto; display: block; }
.ix-spot { position: absolute; transform: translate(-50%, -50%); font: inherit; background: #fff; border: 3px solid var(--navy); border-radius: 99px; padding: .2rem .5rem .2rem .2rem; display: flex; align-items: center; gap: .35rem; cursor: pointer; min-height: 36px; box-shadow: 0 3px 8px rgba(0,0,0,.2); }
.ix-spot-n { width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 900; font-size: .85rem; display: flex; align-items: center; justify-content: center; }
.ix-spot-t { font-weight: 900; font-size: .85rem; color: var(--navy); white-space: nowrap; }
.ix-spot-t:empty { display: none; }
.ix-spot.placed { border-color: #2f9e44; background: #e6f7ea; }
.ix-spot.placed .ix-spot-n { background: #2f9e44; }
@media (max-width: 560px) { .ix-spot-t { font-size: .72rem; } .ix-spot-n { width: 22px; height: 22px; font-size: .75rem; } }

/* choose */
.ix-options { display: grid; gap: .55rem; }
.ix-option { text-align: left; font: inherit; font-size: 1rem; font-weight: 600; background: #fff; border: 2px solid #cdd4de; border-radius: 12px; padding: .75rem .9rem; cursor: pointer; min-height: 48px; }
.ix-option.right { border-color: #2f9e44; background: #e6f7ea; font-weight: 800; }
.ix-option.wrong { border-color: #d6a545; background: #fff8e8; color: #6b5c4c; }

/* match */
.ix-match { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem 1.2rem; }
.ix-match-col { display: flex; flex-direction: column; gap: .5rem; }
.ix-mchip { font: inherit; font-weight: 800; background: #fff; border: 2px solid #cdd4de; border-radius: 12px; padding: .7rem .8rem; cursor: pointer; min-height: 48px; text-align: left; }
.ix-mchip.sel { border-color: var(--navy-soft); background: var(--navy-soft); color: #fff; }
.ix-mchip.locked { border-color: #2f9e44; background: #e6f7ea; color: #1f6b52; }
.ix-mchip.locked::after { content: " \2713"; }

/* slider */
.ix-scene { position: relative; width: 100%; aspect-ratio: 16 / 7; background: #fff; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.ix-scene > div { position: absolute; inset: 0; transition: opacity .15s linear; }
.ix-scene svg { width: 100%; height: 100%; display: block; }
.ix-scene-b { opacity: 0; }
.ix-slider-row { display: flex; align-items: center; gap: .7rem; margin-top: .6rem; font-weight: 800; }
.ix-slider-row input { flex: 1; height: 44px; accent-color: var(--sc, var(--navy)); }
.ix-caption { margin-top: .4rem; font-weight: 700; min-height: 2.6em; }

/* type */
.ix-textarea { width: 100%; font: inherit; font-size: 1.05rem; line-height: 1.5; border: 2px solid #9fb3d1; border-radius: 12px; padding: .7rem .8rem; background: #f3f8ff; min-height: 96px; resize: vertical; }
.ix-textarea:focus { outline: 3px solid var(--sc, var(--navy-soft)); outline-offset: 1px; }

/* solve */
.ix-solve { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.ix-answer { font: inherit; font-size: 1.3rem; font-weight: 800; border: 2px solid #9fb3d1; border-radius: 12px; padding: .6rem .8rem; background: #f3f8ff; min-width: 180px; max-width: 100%; min-height: 52px; }
.ix-answer:focus { outline: 3px solid var(--sc, var(--navy-soft)); outline-offset: 1px; }
.ix-answer:disabled { background: #e6f7ea; border-color: #2f9e44; }
.ix-unit { font-weight: 800; color: var(--muted); }

/* timeline + sticky */
.ix-timeline { display: flex; gap: .5rem; align-items: stretch; overflow-x: auto; padding: .4rem .1rem; }
.ix-tl-slot { flex: 1; min-width: 120px; font: inherit; background: #fff; border: 2px dashed #b8c2d1; border-radius: 12px; padding: .5rem .6rem; display: flex; flex-direction: column; gap: .3rem; cursor: pointer; min-height: 70px; text-align: left; }
.ix-tl-slot.stuck { border: 0; background: #fff3a8; box-shadow: 2px 3px 0 rgba(0,0,0,.15); transform: rotate(-1deg); }
.ix-tl-year { font-weight: 900; color: var(--navy); font-family: "Courier New", monospace; font-size: 1.05rem; }
.ix-tl-note { font-size: .85rem; font-weight: 700; }
.ix-note { display: inline-flex; flex-direction: column; gap: .2rem; background: #fff3a8; padding: .7rem .9rem; box-shadow: 3px 4px 0 rgba(0,0,0,.15); transform: rotate(2deg); font-weight: 700; margin-bottom: .8rem; max-width: 280px; }
.ix-note strong { font-family: "Courier New", monospace; font-size: 1.2rem; }
.ix-note.gone { display: none; }

/* chant */
.ix-chant { display: flex; flex-wrap: wrap; gap: .6rem; }
.ix-chant-word { font: inherit; font-weight: 900; font-size: 1.25rem; background: #fff; color: var(--navy); border: 3px solid var(--navy); border-radius: 14px; padding: .7rem 1.1rem; cursor: pointer; min-height: 52px; transition: transform .1s; }
.ix-chant-word:active { transform: scale(.96); }
.ix-chant-word.lit { background: var(--gold); border-color: var(--gold); }

/* break */
.ix-break-text { font-weight: 700; font-size: 1.05rem; }
.ix-clock { font-family: "Courier New", monospace; font-size: 2.6rem; font-weight: 900; color: var(--navy); margin: .3rem 0; }

/* links */
.ix-links { display: grid; gap: .55rem; }
.ix-link { display: flex; align-items: center; gap: .7rem; background: #fff; border: 2px solid #e2e7ef; border-radius: 12px; padding: .65rem .8rem; text-decoration: none; color: var(--ink); min-height: 56px; }
.ix-link:hover { border-color: var(--navy-soft); }
.ix-link-icon { min-width: 52px; height: 36px; padding: 0 .4rem; border-radius: 10px; background: #eef2f7; display: flex; align-items: center; justify-content: center; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; flex: none; }
.ix-link.video .ix-link-icon { background: #fde8e8; }
.ix-link.museum .ix-link-icon { background: #e8f0fd; }
.ix-link.primary .ix-link-icon { background: #fff3d6; }
.ix-link.make .ix-link-icon { background: #f3e8fd; }
.ix-link-body { display: flex; flex-direction: column; flex: 1; }
.ix-link-body strong { font-size: .98rem; }
.ix-link-body small { color: var(--muted); font-weight: 600; }
.ix-link-go { font-weight: 900; color: var(--navy-soft); }
.ix-make { background: #faf5ff; }

/* finish */
.ix-finish { background: var(--navy); color: #fff; border-radius: 16px; padding: 1.1rem 1.2rem; animation: ixin .4s ease-out; }
.ix-finish h3 { color: var(--gold); margin-bottom: .3rem; }

/* hub */
.ix-hub-chant { background: var(--navy); color: #fff; border-radius: 16px; padding: .9rem 1rem; margin: .6rem 0 1rem; display: flex; flex-direction: column; gap: .6rem; }
.ix-hub-label { font-size: .75rem; letter-spacing: 2px; font-weight: 900; color: var(--gold); text-transform: uppercase; }
.ix-mindmap { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .7rem; }
.ix-branch { font: inherit; text-align: left; background: #fff; border: 2px solid #e2e7ef; border-left: 10px solid var(--bc); border-radius: 14px; padding: .8rem .9rem; cursor: pointer; display: flex; flex-direction: column; gap: .4rem; opacity: .78; transition: transform .15s, opacity .15s; }
.ix-branch:hover { transform: translateY(-3px); opacity: 1; }
.ix-branch.lit { opacity: 1; background: #fffdf0; box-shadow: 0 0 0 3px rgba(242,183,5,.35), var(--shadow); }
.ix-branch-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.ix-branch-label { font-weight: 900; letter-spacing: 1px; color: var(--bc); }
.ix-branch-day { font-size: .75rem; font-weight: 800; color: var(--muted); }
.ix-branch ul { padding-left: 1.1rem; font-size: .9rem; font-weight: 600; color: var(--ink); }
.ix-branch li { margin-bottom: .15rem; }
.ix-branch-go { font-weight: 900; color: var(--navy-soft); font-size: .9rem; }
.ix-branch-check { font-weight: 900; color: #1f6b52; font-size: .9rem; }
.ix-hub-timeline { margin-top: 1rem; display: flex; flex-direction: column; gap: .4rem; }
.ix-hub-timeline .ix-tl-slot { cursor: default; }

/* demo: keep shake and label animations from nudging the page sideways on phones */
.ix-flow { overflow-x: clip; }
.ix-scene:has(svg[viewBox="0 0 480 270"]) { aspect-ratio: 16 / 9; }
