.lesson-mode-screen { min-height: 100%; padding: clamp(22px, 4vw, 48px); color: #172033; background: #fff; }
.lm-location { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; margin-bottom: 28px; padding-bottom: 12px; border-bottom: 1px solid #e3e7ee; }
.lm-location span { overflow: hidden; color: #687285; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.lm-location strong { color: #24324d; font-size: 12px; }
.lm-location small { color: #687285; font-size: 11px; }
.lm-screen-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr); align-items: center; gap: clamp(26px, 5vw, 64px); }
.lm-teaching-copy { min-width: 0; }
.lm-eyebrow { margin-bottom: 10px; color: #a86800; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.lesson-mode-screen h3 { max-width: 18ch; margin: 0 0 12px; font-size: clamp(29px, 3.7vw, 52px); line-height: 1.08; letter-spacing: 0; }
.lm-subtitle { max-width: 56ch; margin: 0 0 15px; color: #465267; font-size: clamp(17px, 1.8vw, 23px); line-height: 1.4; }
.lm-primary-body { max-width: 68ch; color: #4e596d; font-size: clamp(15px, 1.2vw, 18px); line-height: 1.7; }
.lm-primary-body p { margin: 0 0 11px; }
.lm-bullets, .lm-options { display: grid; gap: 9px; margin: 17px 0 0; padding-left: 22px; color: #3e4a60; line-height: 1.5; }
.lm-bullets li::marker, .lm-options li::marker { color: #e49a18; }
.lm-media { min-width: 0; }
.lm-image { margin: 0; padding: 12px; border: 1px solid #dfe4ec; background: #fff; }
.lm-image a, .lm-image img { width: 100%; display: block; }
.lm-image img { max-width: 100%; height: auto; max-height: 62vh; object-fit: contain; }
.lm-image figcaption { margin-top: 8px; color: #687285; font-size: 11px; text-align: center; }
.lm-semantic { min-height: 260px; display: grid; place-items: center; align-content: center; gap: 12px; padding: 28px; border: 1px solid #d9e8e3; color: #176651; background: #eef8f4; text-align: center; }
.lm-semantic span { max-width: 18ch; font-size: clamp(24px, 3vw, 42px); font-weight: 900; line-height: 1.15; }
.lm-semantic small { color: #4c7066; font-size: 13px; }
.lm-block-workspace { display: flex; align-items: flex-start; justify-content: center; flex-wrap: wrap; gap: 24px; min-height: 240px; padding: 28px 22px; border: 1px solid #d8dee8; background: #f4f7fb; }
.lm-block-stack { min-width: min(100%, 250px); display: grid; gap: 3px; }
.lm-code-block { position: relative; padding: 13px 17px; border-radius: 6px; color: #fff; font-size: 14px; font-weight: 750; line-height: 1.35; box-shadow: inset 0 -2px rgba(0,0,0,.12); }
.lm-code-events { background: #d59a18; }
.lm-code-motion { background: #4b77d1; }
.lm-coordinate { position: relative; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; margin: 0; border: 1px solid #dce2eb; background-color: #fbfcfe; background-image: linear-gradient(#e9edf3 1px, transparent 1px), linear-gradient(90deg, #e9edf3 1px, transparent 1px); background-size: 10% 10%; }
.lm-axis { position: absolute; z-index: 1; background: #2f3d57; }
.lm-axis-x { top: 50%; left: 0; width: 100%; height: 2px; }
.lm-axis-y { top: 0; left: 50%; width: 2px; height: 100%; }
.lm-axis-label { position: absolute; z-index: 2; padding: 2px 5px; color: #26344e; background: #fff; font-size: 11px; font-weight: 800; }
.lm-x-label { right: 5px; top: calc(50% + 5px); }
.lm-y-label { top: 5px; left: calc(50% + 5px); }
.lm-coordinate-sprite { position: absolute; z-index: 3; transform: translate(-50%, -50%); padding: 7px 9px; border: 2px solid #e49a18; border-radius: 50%; color: #734b00; background: #fff4d6; font-size: 10px; font-weight: 800; }
.lm-coordinate-point { position: absolute; z-index: 4; transform: translate(-50%, -50%); }
.lm-coordinate-point b { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #5b45c7; font-size: 11px; }
.lm-coordinate-point small { position: absolute; top: 29px; left: 50%; transform: translateX(-50%); color: #343f53; background: rgba(255,255,255,.9); white-space: nowrap; font-size: 9px; }
.lm-comparison, .lm-card-grid, .lm-circuit-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.lm-comparison section, .lm-card-grid section, .lm-circuit-compare section { min-width: 0; padding: 20px; border: 1px solid #dfe4ec; border-top: 4px solid #5b45c7; background: #f8f9fb; }
.lm-comparison section:nth-child(2), .lm-card-grid section:nth-child(2), .lm-circuit-compare section:nth-child(2) { border-top-color: #e49a18; }
.lm-comparison h4 { margin: 0 0 8px; font-size: 17px; }
.lm-comparison p { color: #566175; line-height: 1.5; }
.lm-comparison .lm-block-workspace { min-height: 0; margin-top: 12px; padding: 14px; }
.lm-process { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.lm-process li { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 12px; }
.lm-process li > span { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #5b45c7; font-weight: 850; }
.lm-process strong { display: block; }
.lm-process p { margin: 3px 0 0; color: #596477; font-size: 13px; }
.lm-circuit { position: relative; min-height: 280px; margin: 0; border: 1px solid #dfe4ec; background: #f8fafc; }
.lm-circuit-wire { position: absolute; inset: 54px 58px; border: 5px solid #33415b; border-radius: 26px; }
.lm-battery, .lm-lamp { position: absolute; z-index: 2; display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 800; }
.lm-battery { top: 50%; left: 30px; width: 68px; height: 86px; transform: translateY(-50%); background: #36445e; }
.lm-lamp { top: 50%; right: 30px; width: 82px; height: 82px; transform: translateY(-50%); border: 4px solid #a06b08; border-radius: 50%; color: #694500; background: #f7d888; }
.lm-lamp-bright { box-shadow: 0 0 28px #efb739; background: #ffe899; }
.lm-lamp-dim { box-shadow: 0 0 8px #d7bf7e; background: #ead8a8; }
.lm-current-flow { position: absolute; bottom: 68px; left: 50%; transform: translateX(-50%); padding: 5px 8px; color: #176651; background: #dff4ec; font-size: 11px; font-weight: 750; }
.lm-circuit-compare section { display: grid; justify-items: center; gap: 13px; text-align: center; }
.lm-circuit-compare .lm-lamp { position: static; transform: none; }
.lm-water-analogy { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.lm-water-analogy > div { min-height: 220px; display: grid; place-items: center; align-content: end; gap: 7px; padding: 20px; border: 1px solid #dce3ea; background: #f5fbff; }
.lm-water-tank { width: 90px; display: block; border: 5px solid #34445e; border-top: 0; background: linear-gradient(to top, #54aee8 0 65%, transparent 65%); }
.lm-water-high { height: 145px; }
.lm-water-low { height: 92px; }
.lm-water-analogy p { grid-column: 1 / -1; margin: 0; padding: 9px; color: #674900; background: #fff5d8; font-size: 12px; text-align: center; }
.lm-card-grid section { display: grid; gap: 8px; }
.lm-card-grid span { color: #687285; font-size: 11px; text-transform: uppercase; }
.lm-card-grid p { margin: 0; color: #7b3740; }
.lm-card-grid strong { color: #176651; line-height: 1.45; }
.lm-checkpoint, .lm-checks { margin-top: 26px; padding: 18px 20px; border-left: 4px solid #e49a18; background: #fff8e7; }
.lm-checkpoint > span { color: #8a5900; font-size: 11px; font-weight: 850; text-transform: uppercase; }
.lm-checkpoint h4, .lm-checks h4 { margin: 5px 0 8px; font-size: 18px; }
.lm-checkpoint details, .lm-checks details { margin-top: 10px; color: #354157; }
.lm-checkpoint summary, .lm-checks summary, .lm-explore summary { cursor: pointer; font-weight: 800; }
.lm-checks { display: grid; gap: 6px; }
.lm-checks details { padding-top: 7px; border-top: 1px solid #eadcb9; }
.lm-explore { margin-top: 26px; padding: 14px 16px; border: 1px solid #dfe4ec; background: #f7f9fc; }
.lm-explore summary { color: #4e3ab5; }
.lm-explore > div { max-width: 78ch; margin-top: 12px; color: #505b6d; line-height: 1.65; }
.lm-explore p { margin: 0; }
.lm-template-hero, .lm-template-summary { color: #fff; background: #17233f; }
.lm-template-hero .lm-location, .lm-template-summary .lm-location { border-color: #33405d; }
.lm-template-hero .lm-location span, .lm-template-hero .lm-location small, .lm-template-summary .lm-location span, .lm-template-summary .lm-location small { color: #cad2df; }
.lm-template-hero .lm-location strong, .lm-template-summary .lm-location strong { color: #fff; }
.lm-template-hero .lm-eyebrow, .lm-template-summary .lm-eyebrow { color: #f0aa2c; }
.lm-template-hero .lm-subtitle, .lm-template-hero .lm-primary-body, .lm-template-summary .lm-subtitle, .lm-template-summary .lm-primary-body, .lm-template-summary .lm-bullets { color: #e9eef6; }
.lm-template-hero .lm-semantic, .lm-template-summary .lm-semantic { border-color: #334667; color: #f0aa2c; background: #263655; }

@media (max-width: 820px) {
  .lesson-mode-screen { padding: 20px 17px 26px; }
  .lm-location { grid-template-columns: minmax(0, 1fr) auto; gap: 5px 10px; margin-bottom: 22px; }
  .lm-location span { grid-column: 1 / -1; }
  .lm-screen-grid { grid-template-columns: 1fr; gap: 22px; }
  .lesson-mode-screen h3 { max-width: none; font-size: 31px; }
  .lm-subtitle { font-size: 18px; }
  .lm-primary-body { font-size: 15px; }
  .lm-media { order: 2; }
  .lm-semantic { min-height: 190px; }
  .lm-comparison, .lm-card-grid, .lm-circuit-compare { grid-template-columns: 1fr; }
  .lm-water-analogy > div { min-height: 170px; padding: 14px; }
  .lm-water-high { height: 110px; }
  .lm-water-low { height: 76px; }
  .lm-block-workspace { min-height: 180px; padding: 18px 13px; }
  .lm-checkpoint, .lm-checks, .lm-explore { margin-top: 20px; }
}
