/* Guided Equations: extends the shared guided-* panels from guided-division.css. */
.eq-main { width: min(980px, calc(100% - 32px)); }
.eq-breadcrumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; color: #435b70; }
.eq-breadcrumbs a { display: inline-flex; min-height: 44px; align-items: center; }
.eq-levels { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.eq-level { position: relative; display: grid; gap: 3px; width: 100%; min-height: 88px; padding: 12px 14px; border: 2px solid #b7c9d7; border-radius: 14px; background: #f8fbfd; color: #18364d; font: inherit; text-align: left; cursor: pointer; }
.eq-level[aria-current="step"] { border-color: #176b87; background: #e8f7fa; box-shadow: 0 0 0 2px #176b8730; }
.eq-level.is-done { border-color: #5a9a6e; }
.eq-level-n { color: #315b7b; font-size: 14px; font-weight: 800; }
.eq-level-title { font-size: 17px; }
.eq-level-desc { color: #435b70; font-size: 14px; }
.eq-level-badge { justify-self: start; margin-top: 4px; padding: 2px 8px; border-radius: 999px; background: #e3f3e7; color: #175c39; font-size: 13px; font-weight: 800; }
.eq-say p { margin: 0 0 10px; font-size: 19px; line-height: 1.55; color: #1f3547; }
.eq-visual { margin: 18px 0; }
.eq-checks { display: grid; gap: 12px; }
.eq-check { margin: 0; padding: 16px 18px; border: 0; border-radius: 16px; background: #f2f8fc; min-width: 0; }
.eq-check.is-resolved { padding: 10px 16px; background: #eef7ee; }
.eq-check-question { padding: 0; margin: 0 0 12px; font-size: 20px; font-weight: 750; line-height: 1.45; color: #18364d; }
.eq-check.is-resolved .eq-check-question { margin-bottom: 4px; font-size: 16px; font-weight: 700; }
.eq-check-answer { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0; font-weight: 800; color: #175c39; }
.eq-check-done { margin: 6px 0 0; color: #1f3547; }
.eq-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 10px; }
.eq-kind-choice .eq-options:has(.eq-option-text) { grid-template-columns: 1fr; }
.eq-options.is-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 420px; }
.eq-option { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 10px 14px; border: 2px solid #7894aa; border-radius: 14px; background: #fff; color: #18364d; font: inherit; font-size: 20px; font-weight: 750; text-align: center; cursor: pointer; overflow-wrap: anywhere; }
.eq-option:hover:not(:disabled) { border-color: #176b87; background: #f3fbfd; }
.eq-option:disabled, .eq-option.is-wrong { border-style: dashed; background: #f4f4f4; color: #6a7782; cursor: not-allowed; }
.eq-option.is-suggested { border-color: #175c39; box-shadow: 0 0 0 3px #175c3930; }
.eq-option-text { font-size: 18px; font-weight: 700; }
.eq-option-multi { justify-content: flex-start; flex-wrap: wrap; text-align: left; }
.eq-option-multi input { width: 26px; height: 26px; flex: 0 0 26px; accent-color: #176b87; }
.eq-option-multi.is-true { border-color: #175c39; }
.eq-option-multi.is-false { border-color: #9a5a1c; }
.eq-option-truth { flex-basis: 100%; font-size: 15px; font-weight: 800; }
.eq-option-multi.is-true .eq-option-truth { color: #175c39; }
.eq-option-multi.is-false .eq-option-truth { color: #8a3f0a; }
.eq-check-submit { margin-top: 12px; min-height: 48px; padding: 10px 18px; font-size: 17px; cursor: pointer; }
.eq-feedback:empty { display: none; }
.eq-feedback { margin-top: 12px; padding: 12px 14px; border-left: 5px solid #bd7a14; border-radius: 8px; background: #fff8e7; }
.eq-feedback.is-help { border-left-color: #296cc2; background: #eef5fd; }
.eq-feedback p { margin: 0 0 6px; font-size: 17px; line-height: 1.5; }
.eq-feedback p:first-child { font-weight: 800; }
.eq-feedback p:last-child { margin-bottom: 0; }
.eq-notice { margin: 16px 0 0; padding: 12px 14px; border-radius: 12px; background: #e3f3e7; color: #175c39; font-weight: 800; }
.eq-next-note[hidden] { display: none; }
.eq-actions button { min-height: 48px; }
.eq-actions button:disabled { opacity: .55; cursor: not-allowed; }
.eq-note { margin: 20px 0; padding: 16px 20px; border-left: 5px solid #27728c; background: #f0f7fa; }
.eq-practice-links { display: grid; gap: 4px; padding-left: 20px; }
.eq-practice-links a { display: inline-flex; min-height: 44px; align-items: center; }
#eq-lesson button:focus-visible, #eq-lesson input:focus-visible, .eq-level:focus-visible, #eq-heading:focus-visible, .eq-check-question:focus-visible { outline: 3px solid #a65c00; outline-offset: 3px; }

/* ---- visual models ---- */
.eqv-figure { margin: 0; padding: clamp(12px, 2.5vw, 22px); border: 1px solid #cad9e3; border-radius: 16px; background: #f8fbfd; }
.eqv-math { display: inline-flex; flex-wrap: wrap; align-items: center; }
.eqv-math-visual { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .28em; font-variant-numeric: tabular-nums; }
.eqv-math-large { font-size: clamp(20px, 3.4vw, 26px); font-weight: 750; }
.eqv-op, .eqv-rel { color: #315b7b; font-weight: 800; }
.eqv-rel.is-not-equal { color: #9a3f0a; }
.eqv-rem { color: #315b7b; font-weight: 800; }
.eqv-box { display: inline-block; width: 1.15em; height: 1.15em; border: 3px solid #a65c00; border-radius: 5px; background: #fff7e6; vertical-align: middle; }
.eqv-box-small { width: 26px; height: 26px; }
.eqv-letter { font-style: italic; font-family: Georgia, "Times New Roman", serif; font-weight: 800; }
.eqv-letter.is-highlighted { padding: 0 .2em; border-radius: 6px; background: #fff1c7; color: #8a4b00; box-shadow: inset 0 -3px 0 #e2a63b; }
.eqv-caption { margin: 10px 0 0; color: #315b7b; font-weight: 800; }
.eqv-lines { display: grid; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.eqv-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 8px 12px; border-radius: 10px; background: #fff; border: 1px solid #d8e5ef; }
.eqv-note { padding: 2px 8px; border-radius: 999px; background: #e8f1f7; color: #315b7b; font-size: 14px; font-weight: 800; }

.eqv-scale { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; gap: 10px; }
.eqv-pan { display: grid; justify-items: center; align-content: start; gap: 6px; min-width: 0; padding: 12px 8px; border: 2px solid #9db7ca; border-radius: 14px; background: #fff; text-align: center; transition: transform .35s ease; }
.eqv-side-label { color: #435b70; font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.eqv-value { min-width: 2.4em; padding: 4px 10px; border-radius: 999px; background: #e3f3e7; color: #175c39; font-size: 22px; font-weight: 850; }
.eqv-value.is-hidden { background: #eef2f5; color: #6a7782; }
.eqv-scale-equals { align-self: center; color: #315b7b; font-size: 34px; font-weight: 850; }
.eqv-beam { position: relative; height: 34px; margin: 6px 12% 0; }
.eqv-beam-bar { position: absolute; left: 0; right: 0; top: 4px; height: 8px; border-radius: 4px; background: #5f7d93; transition: transform .35s ease; }
.eqv-fulcrum { position: absolute; left: 50%; top: 12px; width: 0; height: 0; border-left: 14px solid transparent; border-right: 14px solid transparent; border-bottom: 22px solid #5f7d93; transform: translateX(-50%); }
.eqv-balance[data-state="left"] .eqv-beam-bar { transform: rotate(-4deg); }
.eqv-balance[data-state="right"] .eqv-beam-bar { transform: rotate(4deg); }
.eqv-balance[data-state="left"] .eqv-pan-left, .eqv-balance[data-state="right"] .eqv-pan-right { transform: translateY(6px); }
.eqv-balance[data-state="left"] .eqv-pan-right, .eqv-balance[data-state="right"] .eqv-pan-left { transform: translateY(-6px); }
.eqv-compare { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: 10px 0 0; font-weight: 800; color: #435b70; text-align: center; }
.eqv-compare.is-level { color: #175c39; }
.eqv-compare.is-left, .eqv-compare.is-right { color: #8a3f0a; }

.eqv-groups { display: flex; flex-wrap: wrap; gap: 10px; }
.eqv-group { display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 4px; width: 76px; min-height: 58px; padding: 8px; border: 2px solid #6c91aa; border-radius: 12px; background: #fff; }
.eqv-groups-compact { margin-top: 12px; }
.eqv-dot { width: 12px; height: 12px; border-radius: 50%; background: #2a7391; }
.eqv-dot.is-left { background: #c0701b; }
.eqv-seat { width: 12px; height: 12px; border: 2px dashed #9db7ca; border-radius: 50%; box-sizing: border-box; }

.eqv-partwhole { display: grid; gap: 6px; }
.eqv-pw-whole { display: flex; justify-content: center; align-items: center; gap: 10px; padding: 10px; border: 2px solid #5f7d93; border-radius: 10px; background: #e8f1f7; font-size: 20px; }
.eqv-pw-label { color: #435b70; font-size: 14px; font-weight: 800; text-transform: uppercase; }
.eqv-pw-parts { display: flex; gap: 6px; }
.eqv-pw-part { display: flex; flex-basis: 0; justify-content: center; align-items: center; min-width: 0; min-height: 52px; padding: 8px; border: 2px solid #6c91aa; border-radius: 10px; background: #fff; font-size: 20px; }
.eqv-pw-part.is-unknown { border-color: #a65c00; background: #fff7e6; }

.eqv-bars { display: grid; gap: 10px; }
.eqv-bar-row { display: grid; grid-template-columns: minmax(64px, 120px) minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.eqv-bar-row > .eqv-bar-strip { grid-column: 2; }
.eqv-bar-who { font-weight: 800; overflow-wrap: anywhere; }
.eqv-bar-strip { display: flex; min-height: 44px; border: 2px solid #3f6c88; border-radius: 8px; overflow: hidden; background: #fff; }
.eqv-bar-unit { display: flex; flex: 1 1 0; justify-content: center; align-items: center; min-width: 0; border-right: 2px solid #3f6c88; background: #e7f3f8; font-size: clamp(12px, 2.6vw, 17px); font-weight: 800; overflow: hidden; }
.eqv-bar-unit:last-child { border-right: 0; }
.eqv-bar-total { min-width: 3ch; font-size: 20px; font-weight: 850; text-align: right; }

.eqv-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.eqv-list-item { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 12px; border: 1px solid #d8e5ef; border-radius: 10px; background: #fff; }
.eqv-list-n { color: #435b70; font-size: 14px; font-weight: 800; }
.eqv-list-status { margin-left: auto; font-weight: 850; }
.eqv-list-item.is-true .eqv-list-status { color: #175c39; }
.eqv-list-item.is-false .eqv-list-status { color: #8a3f0a; }
.eqv-inverse, .eqv-phrases { display: grid; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.eqv-inverse li, .eqv-phrases li { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 10px; background: #fff; border: 1px solid #d8e5ef; }
.eqv-op-big { font-size: 26px; font-weight: 850; color: #18364d; }
.eqv-arrows { color: #315b7b; font-size: 22px; font-weight: 800; }
.eqv-phrase { font-size: 18px; font-weight: 700; }
.eqv-recipe { display: grid; gap: 8px; margin: 10px 0 0; padding-left: 26px; font-size: 18px; }
.eqv-story { margin: 8px 0; padding: 12px 16px; border-left: 5px solid #27728c; background: #fff; font-size: 19px; line-height: 1.5; }
.eqv-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.eqv-facts li { padding: 6px 12px; border-radius: 999px; background: #e8f1f7; font-weight: 800; }
.eqv-facts li.is-unknown { background: #fff1c7; color: #8a4b00; }
.eqv-steps { display: grid; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.eqv-step { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 12px; padding: 10px 12px; border: 2px solid #d8e5ef; border-radius: 12px; background: #fff; }
.eqv-step.is-current { border-color: #176b87; background: #e8f7fa; }
.eqv-step-n { grid-row: span 2; padding: 4px 10px; border-radius: 999px; background: #315b7b; color: #fff; font-size: 14px; font-weight: 800; }
.eqv-step-label { font-weight: 750; }
.eqv-step-pending { color: #6a7782; font-size: 22px; font-weight: 850; }
.eqv-rows { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.eqv-row { display: flex; flex-wrap: wrap; gap: 4px; padding: 5px 6px; border: 1px dashed #7a9bb0; border-radius: 8px; background: #fff; }
.eqv-row.is-partial { border: 2px solid #c0701b; background: #fff7e6; }
.eqv-rows.is-packs .eqv-row { border-style: solid; border-radius: 4px; }
.eqv-build { display: flex; flex-wrap: wrap; gap: 10px; }
.eqv-build-part { display: grid; gap: 4px; padding: 10px 14px; border: 2px solid #9db7ca; border-radius: 12px; background: #fff; }
.eqv-build-label { color: #435b70; font-size: 14px; font-weight: 800; }

@media (max-width: 520px) {
  .eq-levels { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .eq-level { min-height: 64px; padding: 8px 10px; }
  .eq-level-title { font-size: 15px; }
  .eq-level-desc { display: none; }
  .eq-say p { font-size: 18px; }
  .eqv-scale { gap: 6px; }
  .eqv-pan { padding: 10px 4px; }
  .eqv-scale-equals { font-size: 26px; }
  .eqv-bar-row { grid-template-columns: minmax(0, 1fr) auto; }
  .eqv-bar-who { grid-column: 1 / -1; }
  .eqv-bar-row > .eqv-bar-strip { grid-column: 1; }
  .eqv-rows { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .eqv-pan, .eqv-beam-bar { transition: none; } }
