/* Tutorials: the lesson player and its hands-on activities. Colors and fonts come from style.css. */

.learn { max-width: 1040px; margin: 0 auto; padding: 0 16px 64px; }
.learn-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 4px 10px; }
.learn-bar .title { font-weight: 600; text-align: center; flex: 1; }
.step-count { font-size: 0.95rem; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.progress { height: 8px; border-radius: 999px; background: #dfe6f0; overflow: hidden; margin: 0 0 16px; }
.progress span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--nitrogen), var(--chlorine)); transition: width 0.35s ease; }

.lesson { display: grid; gap: 28px; min-height: 380px; outline: none; }
.lesson.has-widget { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); align-items: start; }
.lesson.has-widget.wide-widget { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.lesson-text h2 { font-size: clamp(1.35rem, 3vw, 1.7rem); line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 12px; }
.lesson-text .para { font-size: 1.1rem; line-height: 1.6; margin: 0 0 14px; }
.lesson-text .para p { margin: 0 0 10px; }
.lesson-text ol, .lesson-text ul { margin: 0; padding-left: 1.3em; }
.lesson-text li { margin: 0 0 6px; }
.lesson-text .big-list { font-size: 1.15rem; font-weight: 500; }
.lesson-text .after { margin: 6px 0 14px; padding: 12px 16px; border-radius: var(--radius-sm); background: #effaf3; border-left: 5px solid var(--chlorine); font-size: 1.08rem; line-height: 1.55; }
.lesson-text .key { display: block; margin: 8px 0; padding: 10px 14px; border-radius: var(--radius-sm); background: #f4f7fb; border: 1.5px dashed var(--line); font-size: 1.15rem; text-align: center; }
.reveal { animation: reveal 0.35s ease-out; }
@keyframes reveal { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.lesson-nav { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 16px; }
.lesson-nav .button[hidden] { display: none; }
.nav-hint { flex: 1; text-align: right; color: var(--ink-2); font-size: 0.95rem; }
.lesson-nav .button:disabled { opacity: 0.45; cursor: not-allowed; }
.resume { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 12px; padding: 10px 16px; border-radius: var(--radius-sm); background: #fff8e1; border: 2px solid var(--sulfur); }

.button.small { min-height: 42px; padding: 8px 18px; font-size: 0.98rem; }

/* ---------- activity area ---------- */
.widget { display: grid; gap: 12px; }
.stage-canvas { display: block; width: 100%; height: auto; border-radius: var(--radius-sm); background: #f7f9fc; border: 1px solid var(--line); touch-action: none; user-select: none; }
.stage-canvas.grabbing { cursor: grabbing !important; }
.widget-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; }
.widget-tools.column { flex-direction: column; align-items: stretch; }
.widget-tools.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.widget-tools.grid .wide { grid-column: 1 / -1; }
.widget-tools label { display: grid; gap: 6px; font-size: 0.92rem; font-weight: 600; }
.widget-tools input[type='range'] { width: 100%; accent-color: var(--nitrogen); }
.tool-hint { color: var(--ink-2); font-size: 0.95rem; }
.widget-note { margin: 0; font-size: 1rem; line-height: 1.5; min-height: 1.5em; }
.tally { font-size: 1.05rem; }

/* segmented buttons (pick a charge, pick an element) */
.seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; }
.seg button { border: 0; background: none; padding: 7px 14px; font-weight: 600; cursor: pointer; min-width: 46px; }
.seg button + button { border-left: 1.5px solid var(--line); }
.seg button[aria-checked='true'] { background: var(--nitrogen); color: #fff; }

/* counters */
.counter { display: flex; align-items: center; gap: 10px; }
.counter .counter-name { flex: 1; font-weight: 600; }
.counter button, .adder button {
  width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff;
  font-size: 1.3rem; font-weight: 600; cursor: pointer; display: grid; place-items: center; padding: 0;
}
.counter button:hover, .adder button:hover { border-color: var(--nitrogen); }
.counter output, .adder output { min-width: 2ch; text-align: center; font-weight: 700; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.dot { width: 22px; height: 22px; border-radius: 50%; flex: none; box-shadow: inset 0 -3px 5px rgba(0, 0, 0, 0.25); }
.dot.gray { background: #6b7280; } .dot.yellow { background: #e9bb22; } .dot.red { background: #d9473f; } .dot.blue { background: #2f6fd6; }

/* quick checks */
.quiz { display: grid; gap: 12px; padding: 16px; border-radius: var(--radius-sm); background: #f7f9fc; border: 1.5px solid var(--line); }
.quiz-q { margin: 0; font-weight: 600; font-size: 1.1rem; }
.quiz .options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.quiz .option { min-height: 52px; font-size: 1.05rem; }
.quiz .option:disabled { cursor: default; }
.quiz .option.is-right { border-color: var(--chlorine); background: #effaf3; box-shadow: inset 0 0 0 1px var(--chlorine); }
.quiz .option.is-wrong { border-color: var(--oxygen); background: #fbf5f4; box-shadow: inset 0 0 0 1px var(--oxygen); }
.quiz-feedback:empty { display: none; }
.quiz-feedback { padding: 12px 14px; border-radius: var(--radius-sm); background: #fff; border-left: 5px solid var(--line); animation: reveal 0.3s ease-out; }
.quiz-feedback.right { border-left-color: var(--chlorine); }
.quiz-feedback.wrong { border-left-color: var(--oxygen); }
.quiz-feedback p { margin: 0 0 6px; line-height: 1.55; }
.quiz-feedback .verdict { font-weight: 600; }

/* periodic table */
.ptable { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 4px; }
.pt { aspect-ratio: 1; min-width: 0; border: 1.5px solid rgba(0, 0, 0, 0.12); border-radius: 7px; cursor: pointer; padding: 0; display: grid; place-items: center; font: inherit; }
.pt strong { font-size: clamp(0.8rem, 2.2vw, 1.05rem); }
.pt.metal { background: #ffe3cf; }
.pt.nonmetal { background: #d6e6ff; }
.pt.metalloid { background: #e6e9ef; }
.pt.noble { background: #eadffc; }
.pt.tm { aspect-ratio: auto; background: repeating-linear-gradient(135deg, #ffe3cf 0 8px, #ffd6ba 8px 16px); font-size: 0.72rem; line-height: 1.15; padding: 4px; color: #7a3d12; }
.pt:hover { transform: translateY(-1px); border-color: var(--ink-2); }
.pt.on { outline: 3px solid var(--nitrogen); outline-offset: 1px; }
.ptable-legend { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: 0.82rem; font-weight: 600; }
.tag.metal { background: #ffe3cf; color: #7a3d12; }
.tag.nonmetal { background: #d6e6ff; color: #1a3f86; }
.tag.metalloid { background: #e6e9ef; color: #3c4456; }
.tag.noble { background: #eadffc; color: #4d2a8a; }
.ptable-info { min-height: 96px; padding: 12px 14px; border-radius: var(--radius-sm); background: #f7f9fc; border: 1.5px solid var(--line); }
.ptable-info p { margin: 0 0 6px; line-height: 1.5; }
.ion-big { font-size: 1.25em; font-weight: 700; }

/* formula builder */
.builder { display: grid; gap: 14px; padding: 16px; border-radius: var(--radius-sm); background: #f7f9fc; border: 1.5px solid var(--line); }
.builder-task { margin: 0; font-weight: 600; font-size: 1.05rem; }
.builder-controls { display: flex; flex-wrap: wrap; gap: 14px 28px; }
.adder { display: flex; align-items: center; gap: 10px; }
.ion-token {
  display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; width: 52px; height: 52px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 35% 30%, var(--l) 0%, var(--m) 55%, var(--d) 100%);
  color: #fff; font-weight: 700; font-size: 0.95rem; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}
.ion-token.anion { width: 62px; height: 62px; }
.tray { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-height: 76px; padding: 8px; border-radius: var(--radius-sm); background: #fff; border: 1.5px dashed var(--line); }
.tray .ion-token { animation: reveal 0.25s ease-out; }
.tray-empty { color: var(--ink-2); font-size: 0.95rem; padding: 0 6px; }
.meter { position: relative; height: 38px; border-radius: 999px; background: linear-gradient(90deg, #cfe0ff, #fff 50%, #ffc9c5); border: 1.5px solid var(--line); }
.meter-mid { position: absolute; left: 50%; top: 4px; bottom: 4px; width: 2px; background: var(--ink-2); opacity: 0.4; }
.meter-needle { position: absolute; top: -4px; width: 6px; height: 44px; margin-left: -3px; border-radius: 3px; background: var(--ink); transition: left 0.25s ease; }
.meter-needle.zero { background: var(--chlorine); }
.meter-label { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 600; font-size: 0.95rem; pointer-events: none; }
.builder-status { margin: 0; min-height: 1.5em; line-height: 1.55; }
.builder-status.solved { padding: 10px 12px; border-radius: var(--radius-sm); background: #effaf3; border-left: 5px solid var(--chlorine); }
.formula { font-size: 1.4em; font-weight: 700; }

/* finish */
.finish { margin-top: 18px; padding: 20px; border-radius: var(--radius); background: #effaf3; border: 2px solid var(--chlorine); text-align: center; }
.finish-badge { width: 54px; height: 54px; margin: 0 auto 6px; border-radius: 50%; display: grid; place-items: center; background: var(--chlorine); color: #fff; font-size: 1.8rem; font-weight: 700; }
.finish p { margin: 0 0 14px; font-weight: 600; font-size: 1.1rem; }
.finish-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

@media (max-width: 760px) {
  .lesson.has-widget, .lesson.has-widget.wide-widget { grid-template-columns: 1fr; }
  .lesson { gap: 18px; min-height: 0; }
}
@media (max-width: 560px) {
  .quiz .options { grid-template-columns: 1fr; }
  .widget-tools.grid { grid-template-columns: 1fr; }
  .lesson-nav .button { padding: 10px 16px; }
  .nav-hint { font-size: 0.85rem; }
}

/* ---------- Lewis structure activities ---------- */
.lewis-board { display: flex; justify-content: center; padding: 10px; border-radius: var(--radius-sm); background: #f7f9fc; border: 1px solid var(--line); touch-action: manipulation; }
.lewis-board svg { max-width: 100%; height: auto; }
.lewis-board .hit-atom, .lewis-board .hit-link { cursor: pointer; }
.lewis-board .hit-atom:hover { fill: rgba(47, 111, 214, 0.12); }
.lewis-board .hit-link:hover { stroke: rgba(47, 111, 214, 0.15); }
.lewis-board .locked { cursor: default; pointer-events: none; }
.lewis-board [data-dot], .lewis-board [data-line] { cursor: pointer; }
.lewis-meter { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; font-size: 0.98rem; }
.lewis-meter .ok b { color: var(--chlorine); }
.lewis-meter .over b { color: var(--oxygen); }
.ring-key { color: var(--ink-2); font-size: 0.85rem; display: inline-flex; align-items: center; gap: 6px; }
.ring-key i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 3px solid var(--chlorine); }
.ring-key i.o { border-color: #e07a2f; margin-left: 8px; }
.fc-calc { padding: 12px 14px; border-radius: var(--radius-sm); background: #fff; border: 1.5px solid var(--line); }
.fc-calc p { margin: 0; }
.fc-row { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.fc-row b { font-variant-numeric: tabular-nums; }
.fc-row.total { border-top: 1.5px solid var(--line); margin-top: 4px; padding-top: 7px; font-size: 1.1rem; }
.fc-work { font-size: 0.95rem; color: var(--ink-2); }
.lewis-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.lewis-choice { display: grid; gap: 6px; justify-items: center; padding: 8px; border-radius: var(--radius-sm); border: 2px solid var(--line); background: #fff; }
.lewis-choice.is-right { border-color: var(--chlorine); background: #effaf3; }
.lewis-choice.is-wrong { border-color: var(--oxygen); background: #fbf5f4; }
.lewis-card { border: 0; background: none; padding: 0; cursor: pointer; width: 100%; }
.lewis-card svg { width: 100%; max-width: 200px; height: auto; }
.lewis-card-note { margin: 0; font-size: 0.85rem; color: var(--ink-2); text-align: center; min-height: 2.4em; }
.res-cards { display: flex; flex-wrap: wrap; gap: 8px; }
.res-card { position: relative; width: 104px; padding: 4px; border-radius: 10px; border: 2px solid var(--line); background: #fff; animation: reveal 0.3s ease-out; }
.res-card.on { border-color: var(--nitrogen); }
.res-card svg { width: 100%; height: auto; }
.res-card span { position: absolute; top: 2px; left: 6px; font-size: 0.75rem; font-weight: 700; color: var(--ink-2); }
.res-hybrid { padding: 12px; border-radius: var(--radius-sm); background: #effaf3; border: 2px solid var(--chlorine); text-align: center; animation: reveal 0.5s ease-out; }
.res-hybrid svg { width: 100%; max-width: 240px; height: auto; }
.res-hybrid p { margin: 6px 0 0; text-align: left; }
.valence { display: grid; gap: 12px; padding: 16px; border-radius: var(--radius-sm); background: #f7f9fc; border: 1.5px solid var(--line); }
.valence-formula { margin: 0; font-size: 2rem; font-weight: 700; text-align: center; }
.atom-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.atom-chip { display: grid; justify-items: center; min-width: 64px; padding: 8px 10px; border-radius: 12px; border: 2px solid var(--line); background: #fff; cursor: pointer; font: inherit; }
.atom-chip strong { font-size: 1.3rem; }
.atom-chip small { font-size: 0.75rem; color: var(--ink-2); }
.atom-chip.on { border-color: var(--chlorine); background: #effaf3; cursor: default; }
.charge-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.charge-row output { min-width: 2.5ch; text-align: center; font-weight: 700; font-size: 1.2rem; }
.step-btn { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; font-size: 1.3rem; font-weight: 600; cursor: pointer; }
.step-btn:disabled { opacity: 0.4; cursor: default; }
.valence-total { margin: 0; font-size: 1.15rem; text-align: center; }
.lewis-pt { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.pt.plain { background: #eef2f8; }
.pt.lim2, .tag.lim2 { background: #fff1b8; color: #6b5a12; }
.pt.lim-few, .tag.lim-few { background: #eadffc; color: #4d2a8a; }
.pt.lim8, .tag.lim8 { background: #d6e6ff; color: #1a3f86; }
.pt.lim12, .tag.lim12 { background: #c9f0d8; color: #1a6239; }
.lewis-gallery { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.lewis-show { margin: 0; padding: 8px; border-radius: var(--radius-sm); background: #f7f9fc; border: 1px solid var(--line); text-align: center; }
.lewis-show svg { width: 150px; height: auto; }
.lewis-show figcaption { font-weight: 600; }

/* ---------- Covalent bonding activities ---------- */
.widget-tools .tool-row { display: grid; gap: 6px; font-size: 0.92rem; font-weight: 600; }
.seg.wrap { display: flex; flex-wrap: wrap; gap: 6px; border: 0; border-radius: 0; overflow: visible; background: none; }
.seg.wrap button, .seg.wrap button + button { border: 1.5px solid var(--line); border-radius: 999px; background: #fff; }
.seg.wrap button[aria-checked='true'] { background: var(--nitrogen); border-color: var(--nitrogen); color: #fff; }
.seg.wrap button:disabled { opacity: 0.4; cursor: default; }
.ptable.plain .pt { background: #fff; color: var(--ink); }
.ptable.plain .pt.on { background: #dff3e7; border-color: var(--chlorine); box-shadow: inset 0 0 0 2px var(--chlorine); }
.ptable .pt small { display: block; font-size: 0.68rem; font-weight: 600; opacity: 0.8; }
.num-input { width: 6.5em; padding: 7px 10px; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; font-size: 1.05rem; }
.widget-tools label.inline { display: inline-flex; align-items: center; gap: 8px; }
.curve-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.curve-pick { border-width: 2.5px; font-weight: 700; }
.bo-pic { display: flex; justify-content: center; }
.bo-pic svg { max-width: 100%; height: auto; }
.bo-bars { display: grid; gap: 8px; }
.bo-bar { display: grid; grid-template-columns: 7.5em 1fr 6.5em; align-items: center; gap: 10px; font-size: 0.92rem; }
.bo-bar b { text-align: right; }
.bo-track { height: 14px; border-radius: 999px; background: #eef2f8; border: 1px solid var(--line); overflow: hidden; }
.bo-track i { display: block; height: 100%; border-radius: 999px; transition: width 0.35s ease; }
.sp-board .sp-hit { cursor: pointer; }
.sp-board .sp-hit:hover { stroke: rgba(47, 111, 214, 0.18); }
.sp-count { margin: 0; text-align: center; font-size: 1rem; }
.seg .tool-s[aria-checked='true'] { background: #2f6fd6; }
.seg .tool-p[aria-checked='true'] { background: #e07a12; }
.nb-formula { margin: 0; font-size: 2rem; font-weight: 700; text-align: center; }
.nb-formula small { font-size: 0.9rem; font-weight: 500; color: #52607d; }
.nb-preview { margin: 0; font-size: 1.2rem; text-align: center; padding: 10px; border-radius: 12px; background: #f4f7fb; border: 1.5px dashed var(--line); }
.nb-rows .seg button { padding: 6px 11px; min-width: 0; }
@media (max-width: 560px) {
  .bo-bar { grid-template-columns: 6em 1fr 5.6em; font-size: 0.85rem; }
  .nb-formula { font-size: 1.6rem; }
}
.seg button:disabled { opacity: 0.4; cursor: default; }

/* ---------- Unit 6: rates and mechanisms activities ---------- */
.mol-icon { width: 22px; height: 22px; flex: none; }
.ms-legend { display: flex; flex-wrap: wrap; gap: 6px; }
.ms-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 4px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font-size: 0.9rem; }
.ms-chip b { font-variant-numeric: tabular-nums; min-width: 2ch; }
.ms-chip small { color: #52607d; font-size: 0.72rem; }
.ms-chip.intermediate { border-color: #e07a12; background: #fff6ec; }
.ms-chip.catalyst { border-color: #1f9d6a; background: #effaf3; }
.ms-steps, .sa-steps { display: grid; gap: 8px; }
.ms-step { border: 1.5px solid var(--line); border-radius: 12px; padding: 8px 10px; background: #fff; display: grid; gap: 6px; }
.ms-step.slow { border-color: #d9473f; background: #fdf6f5; }
.ms-eq { display: flex; align-items: center; gap: 8px; font-size: 1.02rem; }
.ms-num { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 0.78rem; font-weight: 700; flex: none; }
.ms-row { display: grid; grid-template-columns: auto 1fr 5.2em; align-items: center; gap: 10px; }
.ms-rate { text-align: right; font-size: 0.9rem; }
.ms-overall { margin: 0; font-size: 1.02rem; }
.sa-title { margin: 0; font-weight: 600; text-align: center; }
.sa-step { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; font: inherit; font-size: 1.02rem; text-align: left; }
.sa-step small { margin-left: auto; color: #52607d; font-size: 0.8rem; }
.sa-term { border: 1.5px dashed transparent; background: #f4f7fb; border-radius: 8px; padding: 3px 7px; font: inherit; cursor: pointer; }
.sa-term:hover { border-color: var(--nitrogen); }
.sa-term.gone { color: #9aa6bd; background: none; }
.sa-term s { text-decoration-thickness: 2px; text-decoration-color: #d9473f; }
.sa-arrow { font-weight: 700; padding: 0 4px; }
.sa-result { display: grid; gap: 8px; }
.sa-overall { margin: 0; font-size: 1.1rem; text-align: center; padding: 8px; border-radius: 12px; background: #effaf3; border: 1.5px solid var(--chlorine); }
.sa-classify { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 1.05rem; }
.rl-pick { cursor: pointer; }
.rl-pick:hover { border-color: var(--nitrogen); }
.rl-pick.chosen { border-color: #d9473f; background: #fdf6f5; }
.shake { animation: shake 0.35s; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.rl-law { font-size: 1.35rem; text-align: center; padding: 12px; border-radius: 12px; background: #f4f7fb; border: 1.5px dashed var(--line); min-height: 1.5em; }
.rl-law:empty { display: none; }
.rl-sp { font: inherit; border: 0; background: none; padding: 0 1px; }
.rl-sp.inter { color: #c4620a; font-weight: 700; }
button.rl-sp.inter { cursor: pointer; border-bottom: 2px dashed #e07a12; }
.rl-work p { margin: 4px 0; font-size: 0.95rem; line-height: 1.6; }
.ir-part:empty { display: none; }
.ir-part { display: grid; gap: 8px; }
.ir-head { margin: 6px 0 0; font-weight: 600; }
.ir-mechs { display: grid; gap: 8px; }
.ir-mech { text-align: left; justify-content: flex-start; line-height: 1.6; }
.ir-mech.is-right { border-color: var(--chlorine); background: #effaf3; }
.ir-mech.is-wrong { border-color: var(--oxygen); background: #fbf5f4; }
.pm-pic { display: flex; justify-content: center; }
.pm-pic svg { width: min(420px, 100%); height: auto; }
.pm-pic .hit-hump { cursor: pointer; }
.pm-pic .hit-hump:hover { fill: rgba(47, 111, 214, 0.08); }
.pm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; }
.pm-choice svg { width: 100%; height: auto; }
.pm-choice.is-right { border-color: var(--chlorine); box-shadow: inset 0 0 0 2px var(--chlorine); }
.pm-choice.is-wrong { border-color: var(--oxygen); box-shadow: inset 0 0 0 2px var(--oxygen); }
.ms-step .bo-track i { background: #2f6fd6; }
.ms-step.slow .bo-track i { background: #d9473f; }
.ms-rate.sync { background: #fff3c2; outline: 2px solid #e1b21c; border-radius: 8px; padding: 2px 6px; }
.ms-sync { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 8px; }
.ms-sync-box { display: grid; gap: 2px; align-content: center; text-align: center; padding: 8px 10px; border-radius: 12px; background: #fff8dc; border: 2.5px solid #e1b21c; font-size: 0.85rem; }
.ms-sync-num { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.ms-sync-eq { align-self: center; font-size: 1.6rem; font-weight: 700; color: #b8860b; }
.ms-sync-note { grid-column: 1 / -1; text-align: center; font-size: 0.9rem; color: #7a5b00; }
.ms-sync.apart .ms-sync-box { border-style: dashed; background: #fff; }
.ms-sync.apart .ms-sync-eq { color: #9aa6bd; }
.ms-sync.apart .ms-sync-note { color: #52607d; }
.ew-question { margin: 4px 0 0; font-weight: 600; font-size: 1.02rem; text-align: center; }

/* Shape, Polarity & IMFs tutorial: shapeViewer, dipoleBuilder, chainBuilder */
.sv-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: center; }
.sv-lewis, .sv-model { display: grid; place-items: center; min-height: 180px; padding: 6px; border-radius: var(--radius-sm); background: #f7f9fc; border: 1px solid var(--line); }
.sv-lewis svg { max-width: 100%; height: auto; max-height: 200px; }
.sv-model { cursor: grab; touch-action: none; user-select: none; }
.sv-model svg { max-width: 100%; height: auto; }
.sv-model[hidden] { display: none; }
.sv-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sv-options .option { min-height: 46px; font-size: 1rem; }
.sv-options .option.is-right { border-color: var(--chlorine); background: #effaf3; }
.sv-options .option.is-wrong { border-color: var(--oxygen); background: #fbf5f4; opacity: 0.7; }
.db-atoms { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.db-atoms .atom-chip { min-width: 48px; font-weight: 700; font-size: 1.05rem; }
.cb-body { display: grid; gap: 10px; }
.cb-lewis { display: grid; place-items: center; padding: 6px; border-radius: var(--radius-sm); background: #f7f9fc; border: 1px solid var(--line); }
.cb-lewis svg { max-width: 100%; height: auto; max-height: 170px; }
.cb-link { display: grid; gap: 8px; padding: 10px 12px; border-radius: var(--radius-sm); border: 1.5px solid var(--line); background: #fff; animation: reveal 0.3s ease-out; }
.cb-link.done { border-color: var(--chlorine); background: #f6fcf8; }
.cb-title { font-weight: 600; }
.cb-options { display: flex; flex-wrap: wrap; gap: 8px; }
.cb-opt { min-width: 0; padding: 6px 12px; font-size: 0.95rem; }
.cb-opt:disabled { cursor: default; }
.cb-link .button { justify-self: start; }
.cb-feedback { margin: 0; line-height: 1.5; }
.cb-feedback:empty { display: none; }
.cb-feedback.right { color: #1f6b3f; }
.cb-feedback.wrong { color: #a3302a; }
@media (max-width: 520px) { .sv-pair { grid-template-columns: 1fr; } }
