/* Задания-лаборатории (js/lab.js): стиль утверждённого прототипа урока 1.1.
   Сверху сцена или схема, под ней «что произошло», управление под большим пальцем, строка «Где это в процессоре?», кнопка «Дальше». */
.lesson { position: relative; }
.unit.lab-unit { padding: 0 0 calc(10px + env(safe-area-inset-bottom)); }
.lab-unit .unit-foot { padding: 8px 16px 0; }
.lab-unit .help-row { padding: 0 16px; }
.widget.lab-host { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; margin: 0; padding: 0; overflow: hidden; }
.lab { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.lab-title { margin: 0; padding: 2px 16px 8px; font-size: 17px; font-weight: 800; line-height: 1.25; text-wrap: balance; }

.lab-stage { position: relative; flex: 1 1 auto; min-height: 200px; overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.lab-3d .lab-stage { background: #0a0e14; color: #e6edf3; }
.lab-scheme .lab-stage { background: var(--inset); min-height: 180px; }

/* ---------- обратная связь ---------- */
.lab-panel { padding: 10px 16px 4px; }
.lab-say { margin: 0; min-height: 3.9em; font-weight: 700; font-size: 15px; line-height: 1.3; text-wrap: pretty; }
.lab-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.lab-chips.n3 { grid-template-columns: repeat(3, 1fr); }
.lab-chips.n2 { grid-template-columns: repeat(2, 1fr); }
.lab-chips.n5 { grid-template-columns: repeat(5, 1fr); }
.lab-chip { display: grid; grid-template-columns: 18px 1fr; column-gap: 5px; align-items: center; padding: 6px 7px; border-radius: 10px; border: 1.5px dashed var(--line-2); min-width: 0; }
.lab-chip svg { width: 18px; height: 18px; grid-row: span 2; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linejoin: round; }
.lab-chip span { font-size: 10.5px; color: var(--muted); line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lab-chip b { font: 800 12.5px/1.15 ui-monospace, Consolas, monospace; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lab-chip.on { border: 1.5px solid var(--text); }
.lab-chip.on b { color: var(--text); }
.lab-chip.on svg { stroke: var(--text); }
.lab-chip.k-in.on svg .knob, .lab-chip.k-out.on svg, .lab-chip.k-wire.on svg { stroke: var(--on); }
.lab-chip.k-wire svg path { stroke-dasharray: 3 3; }
.lab-chip.k-wire.on svg path { stroke-dasharray: none; stroke-width: 3.5; }
.lab-chip.k-in svg .knob { fill: var(--muted); stroke: none; }
.lab-chip.k-in.on svg .knob { fill: var(--on); transform: translateX(8px); }
.lab-chip.k-out.on b, .lab-chip.k-wire.on b, .lab-chip.k-in.on b { color: var(--on-text); }
.lab-chip.k-chan.on svg rect { fill: #5eead4; stroke: #5eead4; }
.lab-chip.k-cur.on svg path { fill: var(--text); }
.lab-chip.k-drn .lvl { fill: var(--on); stroke: none; }
.lab-legend { margin: 6px 0 0; font: 500 10.5px/1.3 ui-monospace, Consolas, monospace; color: var(--muted); }

/* таблица вариантов: открытые строки — сплошная рамка и значение, неоткрытые — пунктир и «?» */
.lab-cap { margin: 8px 0 0; font: 700 11px/1.2 ui-monospace, Consolas, monospace; color: var(--muted); }
.lab-table { grid-template-columns: repeat(4, 1fr); margin-top: 4px; }
.lab-cell { display: grid; justify-items: center; gap: 2px; padding: 5px 2px; border-radius: 10px; border: 1.5px dashed var(--line-2); }
.lab-cell .ins { font: 700 12px/1.1 ui-monospace, Consolas, monospace; color: var(--muted); white-space: pre; }
.lab-cell b { font: 800 17px/1.1 ui-monospace, Consolas, monospace; color: var(--muted); }
.lab-cell.seen { border-style: solid; border-color: var(--line-2); }
.lab-cell.seen b { color: var(--text); }
.lab-cell.on b { color: var(--on-text); }
.lab-cell.cur { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }

/* ---------- управление ---------- */
.lab-control { padding: 2px 16px 0; }
.lab-ctl { margin: 0 0 6px; font: 700 10.5px/1 ui-monospace, Consolas, monospace; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.lab-hint { margin: 8px 0 0; min-height: 2.6em; font-size: 13.5px; line-height: 1.35; color: var(--muted); text-wrap: pretty; }
.lab-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lab-sw { min-height: 58px; display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 10px; padding: 0 16px; text-align: left; cursor: pointer;
  border-radius: 14px; border: 2px solid var(--line); background: var(--panel); color: var(--text); }
.lab-sw b { font: 800 26px/1 ui-monospace, Consolas, monospace; }
.lab-switch.words .lab-sw b { font-family: inherit; font-size: 18px; font-weight: 800; }
.lab-sw small { font: 700 13px/1 ui-monospace, Consolas, monospace; color: var(--muted); }
.lab-sw .dot, .lab-tg .dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--muted); }
.lab-sw[aria-checked="true"] { border-color: var(--text); background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--text); }
.lab-sw[aria-checked="true"] .dot { background: var(--text); border-color: var(--text); }
.lab-sw[data-v="1"][aria-checked="true"] { border-color: var(--on); box-shadow: inset 0 0 0 1px var(--on); }
.lab-sw[data-v="1"][aria-checked="true"] .dot { background: var(--on); border-color: var(--on); }
.lab-sw[data-v="1"][aria-checked="true"] small { color: var(--on-text); }
.lab-sw:disabled { opacity: .45; cursor: default; }
.lab-toggles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lab-tg { min-height: 58px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 0 14px; text-align: left; cursor: pointer;
  border-radius: 14px; border: 2px dashed var(--line-2); background: var(--panel); color: var(--text); }
.lab-tg .nm { font-weight: 800; font-size: 15px; line-height: 1.15; }
.lab-tg b { font: 800 24px/1 ui-monospace, Consolas, monospace; color: var(--muted); }
.lab-tg[aria-pressed="true"] { border: 2px solid var(--on); box-shadow: inset 0 0 0 1px var(--on); }
.lab-tg[aria-pressed="true"] .dot { background: var(--on); border-color: var(--on); }
.lab-tg[aria-pressed="true"] b { color: var(--on-text); }
.lab-sw:focus-visible, .lab-tg:focus-visible, .lab-where:focus-visible, .lab-more:focus-visible, .lab-back:focus-visible, .lab-sh-close:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; }

/* ---------- «Где это в процессоре?» ---------- */
.lab-where { margin-top: 6px; width: 100%; min-height: 44px; display: grid; grid-template-columns: 22px 1fr 14px; align-items: center; gap: 10px; padding: 0 14px; text-align: left; cursor: pointer;
  border-radius: 12px; border: 1.5px solid var(--line-2); background: transparent; color: var(--text); font-weight: 700; font-size: 14px; }
.lab-ic { width: 22px; height: 22px; fill: none; stroke: var(--text); stroke-width: 1.6; stroke-linecap: round; }
.lab-chev { width: 14px; height: 14px; fill: none; stroke: var(--text); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lab-3d.m-watch .lab-where { display: none; }
.lab-scrim { position: absolute; inset: 0; z-index: 30; background: var(--dim); }
.lab-sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 31; max-height: calc(100% - 56px); display: grid; grid-template-rows: auto minmax(0, 1fr);
  background: var(--panel); color: var(--text); border-top: 1.5px solid var(--line-2); border-radius: 18px 18px 0 0; box-shadow: 0 -14px 40px var(--shadow); outline: none; user-select: text; -webkit-user-select: text; }
.lab-sheet.full { height: calc(100% - 8px); max-height: none; }
.lab-sh-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 6px 4px 16px; border-bottom: 1px solid var(--line); }
.lab-sh-head h2 { margin: 0; font-size: 17px; font-weight: 800; line-height: 1.2; }
.lab-sh-close { flex: none; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: var(--text); font-weight: 700; font-size: 14px; cursor: pointer; }
.lab-sh-close::after { content: '  ✕'; }
.lab-sh-body { overflow-y: auto; overscroll-behavior: contain; padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); }
.lab-sh-body p { margin: 0; font-size: 14px; line-height: 1.42; text-wrap: pretty; }
.lab-sh-body p + p, .lab-sh-body div + p { margin-top: 8px; }
.lab-sh-short b { font-weight: 800; }
.lab-sh-body h3 { font-size: 16px; font-weight: 800; line-height: 1.25; margin: 22px 0 10px; }
.lab-note { font-size: 12.5px !important; color: var(--muted); margin-top: 10px !important; }
.lab-chain { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 14px 0 0; padding: 0; }
.lab-chain li { position: relative; display: grid; justify-items: center; align-content: start; gap: 3px; padding: 8px 4px; border-radius: 12px; border: 1.5px dashed var(--line-2); text-align: center; min-width: 0; }
.lab-chain li + li::before { content: '→'; position: absolute; left: -17px; top: 50%; transform: translateY(-50%); font: 700 14px/1 ui-monospace, monospace; color: var(--text); }
.lab-chain svg { width: 30px; height: 30px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lab-chain b { font-size: 12px; font-weight: 800; line-height: 1.15; }
.lab-chain small { font-size: 10.5px; line-height: 1.2; color: var(--muted); }
.lab-chain .here { border: 2px solid var(--text); }
.lab-chain .here svg { stroke: var(--text); }
.lab-chain .here small, .lab-path em { font: 800 10px/1 ui-monospace, monospace; font-style: normal; letter-spacing: .03em; text-transform: uppercase; color: var(--bg); background: var(--text); padding: 3px 5px; border-radius: 5px; white-space: nowrap; }
.lab-more { margin-top: 14px; width: 100%; min-height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--line-2); background: transparent; color: var(--text); font-weight: 700; font-size: 14px; cursor: pointer; }
.lab-more[aria-expanded="true"] .lab-chev { transform: rotate(180deg); }
.lab-path { list-style: none; display: grid; gap: 10px; margin: 0; padding: 0; }
.lab-path li { position: relative; display: grid; grid-template-columns: 88px 1fr; gap: 12px; align-items: center; }
.lab-path li + li::before { content: ''; position: absolute; left: 43px; top: -10px; width: 2px; height: 10px; background: var(--muted); }
.lab-path img { display: block; width: 88px; height: 88px; border-radius: 10px; border: 1px solid var(--line); object-fit: cover; }
.lab-path .here img { border: 2.5px solid var(--text); }
.lab-path p { font-size: 13.5px; line-height: 1.35; }
.lab-inv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.lab-inv figure { margin: 0; border: 1px solid var(--line); border-radius: 12px; padding: 8px 2px 4px; background: #0a0e14; min-width: 0; }
.lab-inv figcaption { text-align: center; font-weight: 800; font-size: 14px; margin-bottom: 4px; color: #e6edf3; }
.lab-inv svg { display: block; width: 100%; height: auto; }
.lab-inv .w { stroke: #9aa6b4; stroke-width: 2.4; stroke-linecap: round; fill: none; }
.lab-inv .w.one { stroke: #ffc83d; stroke-width: 4; }
.lab-inv .ch.absent { stroke: #9aa6b4; stroke-width: 2.4; stroke-dasharray: 5 6; stroke-linecap: round; }
.lab-inv .ch.present { stroke: #5eead4; stroke-width: 7; stroke-linecap: round; }
.lab-inv .node { fill: #9aa6b4; } .lab-inv .node.one { fill: #ffc83d; }
.lab-inv .bub { fill: #0a0e14; stroke: #9aa6b4; stroke-width: 2; } .lab-inv .bub.one { stroke: #ffc83d; }
.lab-inv text { font: 500 9.5px ui-monospace, monospace; fill: #a3afbd; }
.lab-inv .st { font: 800 11px system-ui, sans-serif; fill: #e6edf3; }
.lab-inv .val { font: 700 11px ui-monospace, monospace; } .lab-inv .val.one { fill: #ffc83d; }
.lab-inv .end { text-anchor: end; } .lab-inv .mid { text-anchor: middle; }
.lab-back { margin-top: 18px; width: 100%; min-height: 48px; border-radius: 14px; border: 0; background: var(--on); color: var(--on-ink); font-weight: 800; font-size: 15px; cursor: pointer; }

/* ---------- схема: провода и уровни читаются не только цветом ---------- */
.lab-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.lab-wire { fill: none; stroke: var(--line-2); stroke-width: 3.5; stroke-dasharray: 8 7; stroke-linecap: round; stroke-linejoin: round; transition: stroke .15s; }
.lab-wire.one { stroke: var(--on); stroke-width: 7; stroke-dasharray: none; }
.lab-flow { fill: none; stroke: var(--flow); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 2 16; animation: flow .7s linear infinite; pointer-events: none; }
.lab-dot { fill: var(--inset); stroke: var(--line-2); stroke-width: 3; }
.lab-dot.one { fill: var(--on); stroke: var(--on); }
.lab-tag rect { fill: var(--inset); stroke: var(--line-2); stroke-width: 1.5; stroke-dasharray: 4 3; }
.lab-tag text { font: 800 14px ui-monospace, Consolas, monospace; fill: var(--muted); }
.lab-tag.one rect { fill: var(--on); stroke: var(--on); stroke-dasharray: none; }
.lab-tag.one text { fill: var(--on-ink); }
.lab-in { cursor: pointer; }
.lab-in .body { fill: var(--panel); stroke: var(--line-2); stroke-width: 2; }
.lab-in .nm { font: 800 13px system-ui, sans-serif; fill: var(--text); }
.lab-in .track { fill: var(--panel-3); stroke: var(--line-2); stroke-width: 1.5; }
.lab-in .knob { fill: var(--muted); transition: cx .15s; }
.lab-in.one .body { stroke: var(--on); }
.lab-in.one .track { fill: var(--on-soft); stroke: var(--on); }
.lab-in.one .knob { fill: var(--on); }
.lab-gate .body { fill: var(--panel); stroke: var(--and); stroke-width: 2.5; }
.lab-gate.t-OR .body { stroke: var(--or); }
.lab-gate.t-NOT .body { stroke: var(--not); }
.lab-gate.t-XOR .body { stroke: var(--xor); }
.lab-gate.t-XOR .gt { font-size: 17px; }
.lab-gate.hidden .body { stroke: var(--line-2); stroke-dasharray: 7 5; }
.lab-gate .gt { font: 800 24px system-ui, sans-serif; fill: var(--text); }
.lab-gate.one .body { fill: var(--panel-on); }
.lab-out .body { fill: var(--panel); stroke: var(--line-2); stroke-width: 2.5; }
.lab-out .fil { fill: none; stroke: var(--muted); stroke-width: 2; }
.lab-out.i-bell .fil { fill: var(--muted); stroke: none; }
.lab-out .rays, .lab-out .door { fill: none; stroke: var(--on); stroke-width: 3; stroke-linecap: round; opacity: 0; }
.lab-out .lbl { font: 800 13px system-ui, sans-serif; fill: var(--muted); }
.lab-out.one .body { fill: var(--on); stroke: var(--on); }
.lab-out.one .fil { stroke: var(--on-ink); }
.lab-out.i-bell.one .fil { fill: var(--on-ink); }
.lab-out.one .rays, .lab-out.one .door { opacity: 1; }
.lab-out.one .lbl { fill: var(--on-text); }
.lab-out.i-safe.one .fil { stroke: var(--on-ink); }

/* ---------- объёмная сцена ---------- */
.lab-cv, .lab-lines { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.lab-flat { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.lab-flat .si { fill: #1d2a3d; } .lab-flat .sd { fill: #34496a; stroke: #5a6b82; stroke-width: 1.5; }
.lab-flat .ox { fill: rgba(200, 220, 240, .22); stroke: #9aa6b4; stroke-width: 1; }
.lab-flat .gt { fill: #6b7fa3; stroke: #9aa6b4; stroke-width: 1.5; }
.lab-flat .fld path { stroke: #f2f7fb; stroke-width: 2; opacity: 0; }
.lab-flat .ch { stroke: #9aa6b4; stroke-width: 3; stroke-dasharray: 9 8; }
.lab-flat .arr { fill: #f4f8fb; opacity: 0; }
.lab-flat .wr { stroke: #9aa6b4; stroke-width: 3; } .lab-flat .wr.d { stroke: #ffc83d; stroke-width: 5; }
.lab-flat .lb { font: 700 13px system-ui, sans-serif; fill: #e6edf3; text-anchor: middle; }
.lab-flat .cap { font: 500 10px ui-monospace, monospace; fill: #a3afbd; text-anchor: middle; letter-spacing: .03em; text-transform: uppercase; }
.lab-flat.one .gt { fill: #ffc83d; } .lab-flat.one .wr.g { stroke: #ffc83d; stroke-width: 5; }
.lab-flat.one .wr.d { stroke: #9aa6b4; stroke-width: 3; }
.lab-flat.one .fld path, .lab-flat.one .arr { opacity: 1; }
.lab-flat.one .ch { stroke: #5eead4; stroke-width: 8; stroke-dasharray: none; }
.lab-mode { position: absolute; left: 12px; top: 8px; right: 12px; margin: 0; font: 500 10px/1.3 ui-monospace, monospace; letter-spacing: .03em; text-transform: uppercase; color: #a3afbd; text-shadow: 0 1px 4px #0a0e14; }
.lab-tag3 { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); display: inline-flex; gap: 6px; align-items: baseline; white-space: nowrap; padding: 4px 8px; border-radius: 8px;
  background: rgba(10, 14, 20, .84); border: 1px solid #2a3442; color: #e6edf3; font: 700 12px/1.1 system-ui, sans-serif; transition: opacity .25s; pointer-events: none; }
.lab-tag3 i { font-style: normal; }
.lab-tag3 b { font: 700 12px/1.1 ui-monospace, monospace; color: #a3afbd; }
.lab-tag3.hi { border-color: #e6edf3; }
.lab-tag3.hi b { color: #ffc83d; }
.lab-tag3.small { font-weight: 600; font-size: 11px; }
.lab-tag3.absent { border-style: dashed; color: #a3afbd; }
.lab-tag3.off, .lab-lines .lead.off { opacity: 0; }
.lab-lines .lead { stroke: #e6edf3; stroke-width: 1.2; opacity: .8; transition: opacity .25s; }
.lab-lines [data-k="sym"] { transition: opacity .4s; }
.lab-lines .off { opacity: 0; }
.lab-lines [data-k="symBg"] { fill: rgba(10, 14, 20, .9); stroke: #2a3442; }
.lab-lines .conn { stroke: #a3afbd; stroke-width: 1.4; stroke-dasharray: 2 5; stroke-linecap: round; }
.lab-lines .s { fill: none; stroke: #9aa6b4; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.lab-lines .s.one { stroke: #ffc83d; stroke-width: 5; }
.lab-lines .s.absent { stroke-dasharray: 9 9; }
.lab-lines .s.present { stroke: #5eead4; stroke-width: 7; }
.lab-lines .sdot { fill: #0a0e14; stroke: #9aa6b4; stroke-width: 2.5; }
.lab-lines .sdot.one { stroke: #ffc83d; fill: #ffc83d; }
.lab-lines [data-k="sArrow"] { fill: #f4f8fb; }
.lab-lines .symlbl { font: 700 12px system-ui, sans-serif; fill: #e6edf3; }
.lab-lines .symcap { font: 500 10px ui-monospace, monospace; fill: #a3afbd; letter-spacing: .03em; text-transform: uppercase; }
.lab-lines .symval { font: 700 13px ui-monospace, monospace; fill: #a3afbd; }
.lab-lines .symval.one { fill: #ffc83d; }
.lab-lines .mid { text-anchor: middle; }
.lab-lines [data-k="sym"] text { paint-order: stroke; stroke: rgba(10, 14, 20, .95); stroke-width: 4px; stroke-linejoin: round; }

/* ---------- невысокие и узкие экраны ---------- */
@media (max-height: 700px) {
  .lab-title { font-size: 15.5px; padding-bottom: 6px; }
  .lab-legend { display: none; }
  .lab-3d.m-symbol .lab-chips { display: none; }   /* значок под разрезом сам показывает канал, ток и сток */
}
@media (max-height: 640px) {
  .lab-say { min-height: 2.6em; font-size: 14px; }
  .lab-sw, .lab-tg { min-height: 50px; }
  .lab-hint { min-height: 1.3em; margin-top: 6px; }
  .lab-3d.m-symbol .lab-ctl, .lab-scheme .lab-ctl { display: none; }
  .lab-stage { min-height: 160px; }
}
@media (max-height: 580px) {
  .lab-title { display: none; }
  .lab-stage, .lab-scheme .lab-stage { min-height: 120px; }
  .lab-say { min-height: 0; }
  .lab-panel { padding-top: 8px; }
  .lab-cap { margin-top: 6px; }
  .lab-where { min-height: 40px; margin-top: 4px; }
  .lab-3d.m-symbol .lab-where { display: none; }
}
@media (max-width: 340px) {
  .lab-chip { padding: 6px 5px; column-gap: 3px; grid-template-columns: 14px 1fr; }
  .lab-chip svg { width: 14px; height: 14px; }
  .lab-chip b { font-size: 11px; }
  .lab-sw { padding: 0 10px; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) { .lab-tag3, .lab-lines .lead, .lab-lines [data-k="sym"], .lab-in .knob { transition: none; } .lab-flow { display: none; } }

/* поле сборки (js/board.js) с levels: true — низкий уровень пунктиром, у провода цифра уровня */
.board.lv .wire:not(.on) { stroke-dasharray: 8 7; stroke: var(--line-2); }
.board.lv .wire.on { stroke-width: 6; }
.board.lv .wbit { font-size: 20px; paint-order: stroke; stroke: var(--inset); stroke-width: 5px; stroke-linejoin: round; }
.dock .lab-where { margin: 0; }

/* ---------- вступительный ролик (#/intro) и карточка на главной ---------- */
.intro-card { display: grid; grid-template-columns: 48px 1fr; gap: 14px; align-items: center; margin: 14px 0 0; padding: 14px 16px; border-radius: 16px;
  border: 1.5px solid var(--line-2); background: var(--panel); color: var(--text); }
.intro-card .ic-play { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--on); color: var(--on-ink); font-size: 18px; padding-left: 3px; }
.intro-card small { display: block; font: 800 11px/1.2 ui-monospace, Consolas, monospace; letter-spacing: .05em; text-transform: uppercase; color: var(--on-text); }
.intro-card b { display: block; margin-top: 3px; font-size: 17px; line-height: 1.2; }
.lesson.intro .unit { overflow-y: auto; gap: 8px; }
.intro-h { margin: 0; font-size: 22px; line-height: 1.2; text-wrap: balance; }
.intro-video { position: relative; width: 100%; max-width: 330px; margin: 6px auto 0; aspect-ratio: 9 / 16; max-height: 58vh; border-radius: 16px; overflow: hidden; background: #0a0e14; }
.intro-video img, .intro-video video { display: block; width: 100%; height: 100%; object-fit: contain; background: #0a0e14; }
.intro-play { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); width: auto; padding: 0 22px; white-space: nowrap; }
.intro-lead { margin: 6px 0 0; font-size: 15px; line-height: 1.42; }
.intro-after { margin: 4px 0 0; font-weight: 800; }
.intro-thumb { width: 120px; margin: 0 auto 14px; border-radius: 12px; overflow: hidden; }
.intro-thumb img { display: block; width: 100%; height: auto; }
.l-top a.l-x { display: grid; place-items: center; text-decoration: none; }
/* строка пояснения у обычных заданий (порядок, число, код …): над кнопкой «Дальше» */
.lab-where.w-where { width: auto; margin: 10px 16px 0; }
