/* ============================================================================
 *  ФормулаЦТ — компоненты
 * ==========================================================================*/

/* -------------------------------- КНОПКИ --------------------------------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  padding: 13px 20px;
  font-weight: 800; font-size: 15px; letter-spacing: .3px;
  border-radius: var(--r);
  background: var(--surface-3); color: var(--fg-2);
  box-shadow: 0 4px 0 var(--line-2);
  transition: transform var(--t-fast), background var(--t-fast), box-shadow var(--t-fast), opacity var(--t-fast), color var(--t-fast);
  user-select: none;
}
.btn:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 0 0 transparent; }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: 0 4px 0 var(--line); }
.btn--primary { background: var(--brand); color: #fff; box-shadow: 0 4px 0 var(--brand-700); }
.btn--primary:active:not(:disabled) { background: var(--brand-600); }
.btn--ok { background: var(--ok); color: #fff; box-shadow: 0 4px 0 var(--ok-600); }
.btn--err { background: var(--err); color: #fff; box-shadow: 0 4px 0 var(--err-600); }
.btn--ghost { background: transparent; color: var(--brand-600); box-shadow: none; font-weight: 800; }
.btn--ghost:active { background: var(--brand-100); transform: none; }
.btn--outline { background: var(--surface); color: var(--fg-2); box-shadow: inset 0 0 0 2px var(--line), 0 4px 0 var(--line); }
.btn--outline:active:not(:disabled) { background: var(--surface-2); }
.btn--lg { padding: 16px 26px; font-size: 16.5px; border-radius: var(--r-lg); }
.btn--sm { padding: 9px 14px; font-size: 13px; border-radius: var(--r-sm); box-shadow: 0 3px 0 var(--line-2); }
.btn--sm.btn--primary { box-shadow: 0 3px 0 var(--brand-700); }
.btn--sm.btn--outline { box-shadow: inset 0 0 0 2px var(--line), 0 3px 0 var(--line); }
.btn--block { width: 100%; }
.btn--gold { background: linear-gradient(180deg, #ffd94d, #ffc800); color: #7a5a00; box-shadow: 0 4px 0 #cc9f00; }
.btn--star { background: linear-gradient(180deg, #ffd94d, #ffc800); color: #7a5a00; box-shadow: 0 4px 0 #cc9f00; }
.btn__icon { font-size: 18px; line-height: 1; }

/* -------------------------------- ЧИПЫ ----------------------------------- */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px; border-radius: var(--r-pill);
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: 13px; font-weight: 800; color: var(--fg-2);
}
.chip--ok { background: var(--ok-soft); color: var(--ok-600); border-color: transparent; }
.chip--err { background: var(--err-soft); color: var(--err-600); border-color: transparent; }
.chip--brand { background: var(--brand-100); color: var(--brand-700); border-color: transparent; }
.chip--gold { background: #fff4cc; color: #8a6a00; border-color: transparent; }
html[data-theme="dark"] .chip--gold { background: #3d330d; color: #ffd94d; }
.chip--lg { padding: 8px 14px; font-size: 14px; }
.chip__ico { font-size: 14px; }

/* ------------------------------- КАРТОЧКИ -------------------------------- */
.card {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  box-shadow: none;
}
.card--flat { box-shadow: none; }
.card--pad-lg { padding: var(--sp-5); }
.card--brand {
  background: linear-gradient(150deg, var(--brand) 0%, var(--brand-700) 100%);
  color: #fff; border: 0;
}
.card--brand .t-body, .card--brand .t-small { color: rgba(255,255,255,.9); }

/* -------------------------------- СЕТКИ ---------------------------------- */
.grid { display: grid; gap: var(--sp-3); }
.grid--2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
@media (max-width: 460px) { .grid--4 { grid-template-columns: repeat(2, minmax(0,1fr)); } }

/* ------------------------------ ПРОГРЕСС --------------------------------- */
.bar { height: 14px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.bar__fill {
  height: 100%; border-radius: 99px; background: var(--brand);
  transition: width .5s cubic-bezier(.4,0,.2,1);
  position: relative;
}
.bar__fill::after {
  content: ''; position: absolute; inset: 2px 4px auto 4px; height: 4px;
  border-radius: 99px; background: rgba(255,255,255,.4);
}
.bar--thin { height: 8px; }
.bar--ok .bar__fill { background: var(--ok); }
.bar--gold .bar__fill { background: linear-gradient(90deg, #ffd94d, #ffc800); }

.ring { position: relative; display: grid; place-items: center; }
.ring svg { transform: rotate(-90deg); }
.ring__bg { stroke: var(--surface-3); }
.ring__fg { stroke: var(--brand); stroke-linecap: round; transition: stroke-dashoffset .6s cubic-bezier(.4,0,.2,1); }
.ring__label { position: absolute; font-weight: 900; }

/* -------------------------------- СКИЛЛЫ --------------------------------- */
.skill { display: flex; flex-direction: column; gap: 6px; }
.skill__top { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-2); }
.skill__name { font-weight: 800; font-size: 14px; }

/* -------------------------------- ПУТЬ ----------------------------------- */
.path { position: relative; padding: var(--sp-2) 0 var(--sp-6); }
.path__unit { margin-bottom: var(--sp-6); }
.path__head {
  position: relative; overflow: hidden;
  border-radius: var(--r-lg); padding: var(--sp-4) var(--sp-5);
  color: #fff; box-shadow: 0 4px 0 rgba(0,0,0,.18);
  display: flex; align-items: center; gap: var(--sp-3);
}
.path__head::after {
  content: ''; position: absolute; right: -30px; top: -30px; width: 130px; height: 130px;
  border-radius: 50%; background: rgba(255,255,255,.14);
}
.path__head-ico { font-size: 30px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.2)); display: grid; place-items: center; }
.path__head-ico svg { width: 30px; height: 30px; }
.node__ico { display: grid; place-items: center; color: inherit; }
.node__ico svg { width: 30px; height: 30px; }
.node--locked .node__ico { color: var(--fg-3); }
.path__nodes { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: var(--sp-4) 0 0; }

.node {
  position: relative;
  width: 76px; height: 76px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface-3); color: var(--fg-3);
  box-shadow: 0 6px 0 var(--line-2);
  font-size: 27px; font-weight: 900;
  transition: transform var(--t-fast), box-shadow var(--t), filter var(--t);
  margin: 10px 0;
}
.node:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--line-2); }
.node--cur {
  background: linear-gradient(180deg, var(--brand-300), var(--brand));
  color: #fff; box-shadow: 0 6px 0 var(--brand-700);
  animation: nodePulse 2.4s ease-in-out infinite;
}
.node--cur:active { box-shadow: 0 2px 0 var(--brand-700); }
.node--done { background: linear-gradient(180deg, #7ee021, #58cc02); color: #fff; box-shadow: 0 6px 0 #46a302; }
.node--done:active { box-shadow: 0 2px 0 #46a302; }
.node--done::after {
  content: ''; position: absolute; right: -3px; bottom: -3px;
  width: 26px; height: 26px; border-radius: 50%; background: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2358cc02' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5 9.5 18 20 6.5'/%3E%3C/svg%3E");
  background-size: 16px; background-position: center; background-repeat: no-repeat;
  box-shadow: var(--sh-1);
}
.node--locked { filter: saturate(.5); opacity: .8; }
.node--locked::after {
  content: ''; position: absolute; right: -3px; bottom: -3px;
  width: 26px; height: 26px; border-radius: 50%; background: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23afafaf' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='10' width='16' height='11' rx='2'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E");
  background-size: 15px; background-position: center; background-repeat: no-repeat;
  box-shadow: var(--sh-1);
}
.node--gold { background: linear-gradient(180deg, #ffd94d, #ffc800); color: #7a5a00; box-shadow: 0 6px 0 #cc9f00; }
.node__label {
  position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  white-space: nowrap; font-size: 12px; font-weight: 800; color: var(--fg-2);
}
.node-wrap { position: relative; display: grid; place-items: center; }
.node-wrap--l { transform: translateX(-72px); }
.node-wrap--r { transform: translateX(72px); }
.node-dots { display: flex; flex-direction: column; gap: 7px; align-items: center; }
.node-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }
@media (max-width: 380px) {
  .node-wrap--l { transform: translateX(-52px); }
  .node-wrap--r { transform: translateX(52px); }
}
@keyframes nodePulse {
  0%,100% { box-shadow: 0 6px 0 var(--brand-700), 0 0 0 0 var(--brand-glow); }
  50%     { box-shadow: 0 6px 0 var(--brand-700), 0 0 0 10px transparent; }
}

/* ------------------------------- ВАРИАНТЫ -------------------------------- */
.answers { display: grid; gap: var(--sp-3); }
@media (min-width: 640px) { .answers--2 { grid-template-columns: 1fr 1fr; } }

.answer {
  position: relative;
  display: flex; align-items: center; gap: var(--sp-3);
  padding: 15px var(--sp-4);
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: inset 0 0 0 2px var(--line), 0 4px 0 var(--line);
  font-weight: 700; font-size: 15px; text-align: left;
  transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.answer:active { transform: translateY(3px); box-shadow: inset 0 0 0 2px var(--line), 0 1px 0 var(--line); }
.answer__key {
  flex: none; width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center; font-size: 12px; font-weight: 900;
  background: var(--surface-3); color: var(--fg-3);
}
.answer.is-sel { box-shadow: inset 0 0 0 2px var(--brand), 0 4px 0 var(--brand-600); background: var(--brand-100); }
.answer.is-sel .answer__key { background: var(--brand); color: #fff; }
.answer.is-ok { box-shadow: inset 0 0 0 2px var(--ok), 0 4px 0 var(--ok-600); background: var(--ok-soft); }
.answer.is-ok .answer__key { background: var(--ok); color: #fff; }
.answer.is-bad { box-shadow: inset 0 0 0 2px var(--err), 0 4px 0 var(--err-600); background: var(--err-soft); animation: shake .34s; }
.answer.is-bad .answer__key { background: var(--err); color: #fff; }
.answer:disabled { cursor: default; }
@keyframes shake {
  0%,100% { transform: translateX(0) } 20% { transform: translateX(-7px) }
  40% { transform: translateX(7px) } 60% { transform: translateX(-4px) } 80% { transform: translateX(4px) }
}

/* ------------------------- ПОЛЕ ВВОДА ОТВЕТА ----------------------------- */
.answer-input {
  display: flex; align-items: center; gap: var(--sp-3);
  background: var(--surface); box-shadow: inset 0 0 0 2px var(--line), 0 4px 0 var(--line);
  border-radius: var(--r); padding: 6px var(--sp-4);
  transition: box-shadow var(--t-fast);
}
.answer-input:focus-within { box-shadow: inset 0 0 0 2px var(--brand), 0 4px 0 var(--brand-600); }
.answer-input input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  font-size: 22px; font-weight: 800; padding: 12px 0; letter-spacing: .5px;
}
.answer-input__unit { font-weight: 800; color: var(--fg-3); font-size: 16px; }
.answer-input.is-ok { box-shadow: inset 0 0 0 2px var(--ok), 0 4px 0 var(--ok-600); background: var(--ok-soft); }
.answer-input.is-bad { box-shadow: inset 0 0 0 2px var(--err), 0 4px 0 var(--err-600); background: var(--err-soft); animation: shake .34s; }

/* -------------------------------- ТЕОРИЯ --------------------------------- */
.theory__title { font-size: 22px; font-weight: 900; margin-bottom: var(--sp-4); }
.theory__block { margin-bottom: var(--sp-4); font-size: 15.5px; line-height: 1.6; color: var(--fg-2); }
.theory__block strong { color: var(--fg); }
.theory__formula {
  background: var(--surface-2); border: 2px solid var(--line);
  border-left: 5px solid var(--brand);
  border-radius: var(--r); padding: var(--sp-3) var(--sp-4);
  font-family: var(--font-num); font-size: 17px; font-weight: 800; color: var(--fg);
  overflow-x: auto; white-space: nowrap;
}
.theory__tip, .theory__warn {
  border-radius: var(--r); padding: var(--sp-3) var(--sp-4) var(--sp-3) 46px; font-size: 14.5px; font-weight: 600;
  position: relative; background-repeat: no-repeat; background-position: 14px center; background-size: 20px;
}
.theory__tip { background-color: var(--ok-soft); color: #3f7a00; }
.theory__warn { background-color: #fff4cc; color: #8a6a00; }
html[data-theme="dark"] .theory__warn { background-color: #3d330d; color: #ffd94d; }
.theory__tip::before, .theory__warn::before {
  content: ''; position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; background-repeat: no-repeat; background-size: contain;
}
.theory__tip::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2346a302' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6M10 22h4M12 2a7 7 0 0 1 4 12.7V17H8v-2.3A7 7 0 0 1 12 2z'/%3E%3C/svg%3E"); }
.theory__warn::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b8860b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 2 20h20z'/%3E%3Cpath d='M12 9v5M12 17h.01'/%3E%3C/svg%3E"); }
.theory__list { list-style: none; padding: 0; display: grid; gap: var(--sp-2); }
.theory__list li { position: relative; padding-left: 26px; }
.theory__list li::before {
  content: ''; position: absolute; left: 6px; top: .55em;
  width: 8px; height: 8px; border-radius: 50%; background: var(--brand);
}
.theory__table { width: 100%; border-collapse: collapse; font-size: 14px; }
.theory__table th, .theory__table td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); }
.theory__table th { background: var(--surface-2); font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--fg-3); }
.theory__table tr:last-child td { border-bottom: 0; }
.theory__table td:first-child { font-weight: 800; }

/* ------------------------------- ПОДВАЛ УРОКА ---------------------------- */
.feedback {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  padding: var(--sp-4) var(--sp-4) calc(var(--sp-4) + var(--safe-bot));
  background: var(--surface);
  border-top: 2px solid var(--line);
  transform: translateY(110%);
  transition: transform .28s cubic-bezier(.34,1.4,.64,1);
}
.feedback.is-open { transform: none; }
.feedback--ok { background: var(--ok-soft); border-color: transparent; }
.feedback--err { background: var(--err-soft); border-color: transparent; }
.feedback__head { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-2); }
.feedback__ico { font-size: 28px; display: grid; place-items: center; }
.feedback__ico svg { width: 28px; height: 28px; }
.feedback--ok .feedback__ico { color: var(--ok-600); }
.feedback--err .feedback__ico { color: var(--err-600); }
.feedback__title { font-size: 19px; font-weight: 900; }
.feedback--ok .feedback__title { color: var(--ok-600); }
.feedback--err .feedback__title { color: var(--err-600); }
.feedback__text { font-size: 14.5px; color: var(--fg-2); margin-bottom: var(--sp-3); }
.feedback__text strong { color: var(--fg); }
.feedback__actions { display: flex; gap: var(--sp-3); }
.feedback__actions .btn { flex: 1; }

/* --------------------------- ВЕРХНЯЯ ПАНЕЛЬ УРОКА ------------------------ */
.lessonbar { display: flex; align-items: center; gap: var(--sp-3); width: 100%; }
.lessonbar__close { font-size: 22px; color: var(--fg-3); padding: 4px 6px; }
.lessonbar__bar { flex: 1; }
.lessonbar__hp { display: flex; align-items: center; gap: 4px; font-weight: 900; color: var(--err); }
.lessonbar__hp svg { width: 22px; height: 22px; }

/* -------------------------------- ХЕДЕР ---------------------------------- */
.hud { display: flex; align-items: center; gap: var(--sp-2); width: 100%; }
.hud__spacer { flex: 1; }
.hud__stat {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 11px; border-radius: var(--r-pill);
  background: var(--surface-2);
  font-weight: 900; font-size: 14px; white-space: nowrap;
}
.hud__stat svg, .hud__stat .emoji { width: 18px; height: 18px; font-size: 16px; line-height: 1; }
.hud__stat--streak { color: #ff9600; }
.hud__stat--xp { color: #ffc800; }
.hud__stat--star { color: #ffc800; }
.hud__stat--heart { color: var(--err); }
.hud__avatar {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand-100); color: var(--brand-700); font-weight: 900; font-size: 16px;
  border: 2px solid var(--surface); box-shadow: var(--sh-1); flex: none;
}
.hud__avatar svg { width: 20px; height: 20px; }
.hud__avatar.is-premium { box-shadow: 0 0 0 2px var(--gold), var(--sh-1); }
@media (max-width: 380px) {
  .hud { gap: 6px; }
  .hud__stat { padding: 5px 8px; font-size: 13px; }
  .hud__stat--star .emoji + * { display: none; }
}

/* ------------------------------- МОДАЛКИ --------------------------------- */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 70; background: rgba(20,24,28,.5);
  backdrop-filter: blur(2px); opacity: 0; transition: opacity var(--t);
}
.sheet-backdrop.is-open { opacity: 1; }
.sheet {
  position: fixed; z-index: 71; left: 0; right: 0; bottom: 0;
  max-height: 88vh; overflow-y: auto;
  background: var(--surface);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: var(--sp-5) var(--sp-5) calc(var(--sp-6) + var(--safe-bot));
  transform: translateY(102%); transition: transform .3s cubic-bezier(.34,1.3,.64,1);
  box-shadow: 0 -14px 40px rgba(0,0,0,.22);
}
.sheet.is-open { transform: none; }
.sheet__grip { width: 42px; height: 5px; border-radius: 99px; background: var(--line-2); margin: 0 auto var(--sp-4); }
.sheet__title { font-size: 21px; font-weight: 900; margin-bottom: var(--sp-2); }
@media (min-width: 700px) {
  .sheet { left: 50%; right: auto; bottom: 50%; transform: translate(-50%, 50%) scale(.94); width: min(560px, 92vw); border-radius: var(--r-xl); max-height: 84vh; }
  .sheet.is-open { transform: translate(-50%, 50%) scale(1); }
}

/* -------------------------------- ТОСТЫ ---------------------------------- */
.toast-root {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--tabbar-h) + var(--safe-bot) + 14px); z-index: 80;
  display: flex; flex-direction: column; gap: var(--sp-2); align-items: center;
  pointer-events: none; width: min(420px, 92vw);
}
.toast {
  background: #3c3c3c; color: #fff; padding: 11px 18px; border-radius: var(--r-pill);
  font-weight: 700; font-size: 14px; box-shadow: var(--sh-3);
  animation: toastIn .3s cubic-bezier(.34,1.4,.64,1);
  max-width: 100%; text-align: center;
}
.toast--ok { background: var(--ok-600); }
.toast--err { background: var(--err-600); }
.toast--gold { background: linear-gradient(90deg,#ffc800,#ffd94d); color: #7a5a00; }
.toast.is-out { animation: toastOut .3s forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.94); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-8px) scale(.96); } }

/* ------------------------------ КОНФЕТТИ -------------------------------- */
.confetti-root { position: fixed; inset: 0; pointer-events: none; z-index: 85; overflow: hidden; }
.confetti-root i {
  position: absolute; top: -14px; width: 9px; height: 14px; border-radius: 2px;
  animation: confFall linear forwards;
}
@keyframes confFall {
  to { transform: translateY(105vh) rotate(720deg); opacity: .9; }
}

/* ------------------------------- ПРОЧЕЕ ---------------------------------- */
.divider { height: 2px; background: var(--line); margin: var(--sp-3) 0; border-radius: 2px; }
.pill-row { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.kv { display: flex; justify-content: space-between; gap: var(--sp-3); padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.kv:last-child { border-bottom: 0; }
.kv__k { color: var(--fg-2); font-weight: 600; }
.kv__v { font-weight: 800; }
.empty { text-align: center; padding: var(--sp-7) var(--sp-4); color: var(--fg-3); }
.empty__ico { font-size: 46px; margin-bottom: var(--sp-3); color: var(--fg-3); display: grid; place-items: center; }
.empty__ico svg { width: 46px; height: 46px; }
.spark { display: flex; align-items: flex-end; gap: 4px; height: 60px; }
.spark i { flex: 1; border-radius: 5px 5px 2px 2px; background: var(--brand); min-height: 4px; transition: height .4s ease; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal i { aspect-ratio: 1; border-radius: 6px; background: var(--surface-3); display: grid; place-items: center; font-size: 10px; font-weight: 800; color: var(--fg-3); }
.cal i.on { background: var(--ok); color: #fff; }
.cal i.today { outline: 2px solid var(--brand); outline-offset: 1px; }

/* --------------------------- ИНТЕРАКТИВНЫЙ ГРАФИК ------------------------ */
.plot { display: grid; gap: var(--sp-3); }
.plot__target { display: flex; align-items: center; gap: var(--sp-3); padding: 10px 14px; border-radius: var(--r); background: var(--surface-2); font-weight: 800; font-size: 14px; }
.plot__target b { color: var(--brand-600); }
.plot__legend { display: flex; gap: 14px; font-size: 12.5px; font-weight: 700; color: var(--fg-2); }
.plot__legend i { display: inline-block; width: 14px; height: 4px; border-radius: 2px; vertical-align: middle; margin-right: 5px; }
.plot__canvas { width: 100%; border-radius: var(--r); background: var(--surface-2); border: 2px solid var(--line); touch-action: none; }
.plot.is-ok .plot__canvas { border-color: var(--ok); }
.plot.is-bad .plot__canvas { border-color: var(--err); }
