/* «Старт»: общая неделя на механике «живой прогон» (live.js).
   Только переменные из styles.css, своих цветов нет. */

.live-home { display: flex; flex-direction: column; gap: 4px; width: 100%; text-align: left; cursor: pointer; font: inherit; color: inherit; background: var(--accent-s); border-color: transparent; box-shadow: none; }
.live-home-t { font-family: "Geologica", "Golos Text", sans-serif; font-size: 19px; font-weight: 600; color: var(--ink); }
.live-home-s { font-size: 14px; color: var(--muted); line-height: 1.45; }
.live-home-go { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-weight: 650; font-size: 14px; color: var(--accent); }
.live-home-go .ic { width: 16px; height: 16px; }

.live-step { display: flex; flex-direction: column; gap: 8px; }
.live-step.is-dim { opacity: .6; }
.live-step > * { margin: 0; }
.live-h { display: flex; align-items: center; gap: 10px; font-size: 17px; margin: 0; flex-wrap: wrap; }
.live-num { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-size: 14px; font-weight: 600; }
.live-step.is-dim .live-num { background: var(--bg-sunk); color: var(--faint); }
.live-sub { font-size: 15px; margin: 8px 0 0; }

.live-who { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--muted); }
.live-ava { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-s); color: var(--accent); display: grid; place-items: center; font-weight: 650; flex: none; }
.live-bubble { background: var(--bg-sunk); border-radius: 4px var(--r-lg) var(--r-lg) var(--r-lg); padding: 12px 14px; white-space: pre-wrap; font-size: 15px; line-height: 1.5; }

.live-inc-h { margin-top: 6px !important; }
.live-inc { border-left: 3px solid var(--bad); padding: 2px 0 2px 12px; }
.live-inc-q { margin: 0; font-size: 13.5px; color: var(--muted); }
.live-inc-a { margin: 2px 0 0; font-size: 14.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
pre.live-inc { border-left: 3px solid var(--bad); }

.live-label { display: block; margin-top: 6px !important; }
.live-ta, .live-in {
    width: 100%; box-sizing: border-box; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md);
    background: var(--bg); color: var(--ink); font: 15px/1.45 "Golos Text", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
.live-ta { min-height: 150px; resize: vertical; }
.live-ta-s { min-height: 100px; }
.live-ta:focus-visible, .live-in:focus-visible, .live-link:focus-visible, .live-row:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.live-ta[disabled] { opacity: .6; }

.live-btns { flex-wrap: wrap; }
.live-btns .btn { flex: 1 1 140px; text-decoration: none; }
.live-link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-size: 14px; cursor: pointer; text-decoration: underline; text-align: left; }
.live-dispute { font-size: 13px; }

.live-pre { white-space: pre-wrap; font: 13px/1.45 ui-monospace, Menlo, monospace; background: var(--bg-sunk); color: var(--ink); border-radius: var(--r-sm); padding: 10px; max-height: 280px; overflow: auto; margin: 6px 0 0; overflow-wrap: anywhere; }

.live-score { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.live-big { font-family: "Geologica", "Golos Text", sans-serif; font-size: 44px; line-height: 1; font-variant-numeric: tabular-nums; }
.live-verdict { font-weight: 650; }
.live-verdict.is-ok { color: var(--ok); }
.live-verdict.is-bad { color: var(--bad); }
.live-src { font-size: 14px; border-radius: var(--r-sm); padding: 8px 12px; background: var(--bg-sunk); }
.live-src.is-warn { background: var(--gold-s); color: var(--gold); }

.live-unit { border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; }
.live-unit.is-ok { background: var(--ok-s); border-color: transparent; }
.live-unit.is-bad { background: var(--bad-s); border-color: transparent; }
.live-unit-h { display: flex; justify-content: space-between; gap: 8px; font-weight: 650; font-size: 14.5px; }
.live-tag { flex: none; font-size: 13px; }
.live-unit.is-ok .live-tag { color: var(--ok); }
.live-unit.is-bad .live-tag { color: var(--bad); }
.live-unit-q { margin: 2px 0 0; font-size: 13px; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.live-unit ul { margin: 6px 0 0; padding-left: 18px; font-size: 14px; line-height: 1.45; }
.live-unit li { margin: 3px 0; }
.live-unit li.is-pass { color: var(--muted); }
.live-rule { display: block; font-size: 13px; color: var(--muted); }

.live-rules { margin: 6px 0 0; padding-left: 20px; font-size: 14.5px; line-height: 1.45; }
.live-rules li { margin: 4px 0; }
.live-rules li.is-hit { color: var(--bad); font-weight: 650; }

.live-skills summary, .live-step summary, .card > summary { cursor: pointer; font-weight: 650; font-size: 14.5px; color: var(--ink); }
.live-step details summary { color: var(--accent); font-weight: 600; font-size: 14px; }
.live-skills .small { margin: 8px 0 0; }
.live-sk-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.live-sk { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--bg-sunk); }
.live-sk > span:first-child { min-width: 0; }
.live-sk-tag { flex: none; max-width: 45%; font-size: 12px; color: var(--muted); text-align: right; }
.live-sk.is-ok { background: var(--ok-s); }
.live-sk.is-ok .live-sk-tag { color: var(--ok); font-weight: 650; }
.live-sk.is-half { background: var(--gold-s); }
.live-sk.is-half .live-sk-tag { color: var(--gold); font-weight: 650; }
.live-sk.is-bad { background: var(--bad-s); }
.live-sk.is-bad .live-sk-tag { color: var(--bad); font-weight: 650; }

.live-list { padding: 4px 14px; }
.live-row { width: 100%; background: none; border: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.live-row.is-locked { cursor: default; opacity: .6; }
.live-helper .head-row { margin-bottom: 4px; }
.live-helper .btn { margin-top: 10px; }
.live-real { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 8px !important; display: flex; flex-direction: column; gap: 8px; }
.live-real-note { padding-top: 8px; }

@media (prefers-reduced-motion: reduce) { .live-home, .live-row { transition: none; } }

/* ---------- Сборка промпта нажатиями (урок 1), анимации прогона и разбора ---------- */

.live-def { background: var(--accent-s); border-radius: var(--r-sm); padding: 8px 12px; }
.live-build { display: flex; flex-direction: column; gap: 10px; border: 1px dashed var(--line); border-radius: var(--r-md); padding: 12px; }
.live-build.is-closed { border: 0; padding: 0; gap: 4px; }
.live-bdots { display: flex; gap: 6px; }
.live-bdot { height: 6px; flex: 1 1 0; border-radius: 3px; background: var(--bg-sunk); transition: background .25s ease; }
.live-bdot.is-now { background: var(--accent-s); }
.live-bdot.is-done { background: var(--accent); }
.live-bq { margin: 0; font-weight: 650; }
.live-bopts { display: flex; flex-direction: column; gap: 8px; }
.live-bopt.is-shake { animation: shake .35s ease; }
.live-bwhy { margin: 0; font-size: 14px; border-radius: var(--r-sm); padding: 8px 12px; background: var(--bad-s); color: var(--ink); animation: liveRise .25s ease both; }
.live-blines { margin: 0; padding: 10px 12px 10px 30px; border-radius: var(--r-md); background: var(--bg-sunk); font-size: 14px; line-height: 1.45; display: flex; flex-direction: column; gap: 6px; }
.live-bline.is-new { animation: liveFly .45s cubic-bezier(.2,.8,.2,1) both; }

.live-ta.is-filled { animation: livePulse .9s ease both; }

.live-dots { display: inline-flex; gap: 3px; margin-left: 6px; vertical-align: middle; }
.live-dots i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; animation: liveDot 1s ease-in-out infinite; }
.live-dots i:nth-child(2) { animation-delay: .15s; }
.live-dots i:nth-child(3) { animation-delay: .3s; }

#liveResult.is-new { animation: liveRise .4s ease both; }
#liveResult.is-new .live-unit { animation: liveRise .35s ease both; animation-delay: calc(var(--i, 0) * 90ms + 150ms); }

@keyframes liveRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes liveFly  { from { opacity: 0; transform: translateY(-16px) scale(.96); background: var(--accent-s); } to { opacity: 1; transform: none; } }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 var(--accent); } 40% { box-shadow: 0 0 0 4px var(--accent-s), 0 0 0 5px var(--accent); } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes liveDot  { 0%, 100% { transform: translateY(0); opacity: .45; } 50% { transform: translateY(-4px); opacity: 1; } }
