/* Интерактивный тренажёр «Самые сложные» — dark default (как teach.css), light через data-theme */

/* Свайп-карусель: клип по X, чтобы transform не раздувал scroll. */
body.page--pdd {
  overflow-x: hidden;
}

.hq {
  /* Dark (default site theme) */
  --hq-ok: #5ddea0;
  --hq-ok-bg: rgba(80, 200, 120, 0.18);
  --hq-bad: #ff8a80;
  --hq-bad-bg: rgba(255, 90, 80, 0.16);
  --hq-ink: #eef3fb;
  --hq-muted: #9eb4d4;
  --hq-line: rgba(238, 243, 251, 0.16);
  --hq-card: rgba(8, 18, 38, 0.72);
  --hq-pick: rgba(90, 160, 255, 0.16);
  --hq-pick-border: rgba(120, 180, 255, 0.5);
  --hq-art-bg: rgba(255, 255, 255, 0.04);
  --hq-dot-bg: rgba(255, 255, 255, 0.06);
  --hq-tab-track: rgba(255, 255, 255, 0.06);
  --hq-tab-active: rgba(255, 255, 255, 0.14);
  --hq-expand-bg: rgba(8, 16, 32, 0.98);
  margin-top: 0.5rem;
  color: var(--hq-ink);
  overflow-x: hidden;
}

html[data-theme="light"] .hq {
  /* Сочные outcome-цвета (тёмная тема не трогаем). */
  --hq-ok: #0b9a42;
  --hq-ok-bg: rgba(22, 175, 88, 0.52);
  --hq-bad: #d92018;
  --hq-bad-bg: rgba(230, 48, 40, 0.46);
  --hq-ink: #142033;
  --hq-muted: #5a6b86;
  --hq-line: rgba(20, 32, 51, 0.12);
  --hq-card: rgba(255, 255, 255, 0.78);
  --hq-pick: rgba(20, 80, 160, 0.1);
  --hq-pick-border: rgba(20, 80, 160, 0.35);
  --hq-art-bg: rgba(10, 20, 40, 0.06);
  --hq-dot-bg: rgba(255, 255, 255, 0.72);
  --hq-tab-track: rgba(20, 32, 51, 0.06);
  --hq-tab-active: #fff;
  --hq-expand-bg: rgba(248, 250, 253, 0.97);
}

.hq__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.hq__tabs {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: var(--hq-tab-track);
}

.hq__tab {
  appearance: none;
  border: 0;
  border-radius: 999px;
  min-height: 36px;
  padding: 6px 14px;
  font: inherit;
  font-weight: 700;
  color: var(--hq-muted);
  background: transparent;
  cursor: pointer;
}

.hq__tab.is-active {
  background: var(--hq-tab-active);
  color: var(--hq-ink);
  box-shadow: 0 1px 4px rgba(10, 20, 40, 0.22);
}

html[data-theme="light"] .hq__tab.is-active {
  box-shadow: 0 1px 4px rgba(10, 20, 40, 0.12);
}

.hq__meta {
  font-size: 0.95rem;
  color: var(--hq-muted);
}

.hq__status {
  margin: 0 0 0.75rem;
  color: var(--hq-muted);
  font-size: 0.95rem;
}

.hq__strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 1rem;
}

.hq__dot {
  appearance: none;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--hq-line);
  background: var(--hq-dot-bg);
  color: var(--hq-ink);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.hq__dot.is-current {
  outline: 2px solid var(--hq-pick-border);
  outline-offset: 1px;
}

.hq__dot.is-ok {
  background: var(--hq-ok-bg);
  border-color: rgba(93, 222, 160, 0.45);
  color: var(--hq-ok);
}

html[data-theme="light"] .hq__dot.is-ok {
  border-color: rgba(11, 154, 66, 0.55);
  color: #087a34;
}

.hq__dot.is-bad {
  background: var(--hq-bad-bg);
  border-color: rgba(255, 138, 128, 0.45);
  color: var(--hq-bad);
}

html[data-theme="light"] .hq__dot.is-bad {
  border-color: rgba(217, 32, 24, 0.5);
  color: #b41510;
}

.hq__card {
  border: 1px solid var(--hq-line);
  border-radius: 16px;
  background: var(--hq-card);
  padding: 14px 14px 16px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
}

html[data-theme="light"] .hq__card {
  box-shadow: 0 4px 18px rgba(10, 20, 40, 0.06);
}

.hq__media {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.hq__media:empty {
  display: none;
}

.hq__main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

/* Резерв под самый высокий блок «вопрос + ответы + статус» в текущей двадцатке. */
.hq__stack {
  min-height: var(--hq-stack-min-h, 0px);
}

/* Фиксированная высота строки статуса — «Выберите…» / «Верно!» не двигают nav. */
.hq__pick-slot {
  margin-top: 10px;
  min-height: calc(1.05rem * 1.3);
  display: flex;
  align-items: center;
}

.hq__pick-slot .hq__pick-hint,
.hq__pick-slot .hq__pick-status {
  margin: 0;
}

/* Слот пояснения под картинкой всегда той же высоты (max tip в наборе). */
.hq__feedback-slot {
  min-height: var(--hq-feedback-min-h, 0px);
}

.hq__feedback--placeholder {
  visibility: hidden;
  pointer-events: none;
  border-color: transparent !important;
  background: transparent !important;
  min-height: inherit;
  padding: 0;
  max-height: none;
  overflow: hidden;
}

.hq__art {
  appearance: none;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--hq-art-bg);
  text-align: center;
  position: relative;
  cursor: zoom-in;
  flex: 0 0 auto;
  box-shadow: inset 0 0 0 1px var(--hq-line);
}

.hq__art:focus-visible {
  outline: 2px solid var(--hq-pick-border);
  outline-offset: 2px;
}

.hq__art img {
  display: block;
  width: 100%;
  max-height: min(42vh, 420px);
  object-fit: contain;
  margin: 0 auto;
  pointer-events: none;
}

.hq__art-zoom {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 20, 40, 0.72);
  color: #fff;
  font-size: 15px;
  line-height: 1;
  pointer-events: none;
}

/* Expand inside «Тренажёр» plate — no page modal / no fullscreen dim */
.hq-trainer {
  position: relative;
  overflow-x: hidden;
}

.hq-trainer.is-expanded {
  z-index: 5;
}

.hq-expand {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: inherit;
  background: var(--hq-expand-bg);
  box-shadow: inset 0 0 0 1px var(--hq-line);
  overflow: hidden;
  opacity: 0;
  animation: hq-expand-fade-in 0.22s ease forwards;
  color: var(--hq-ink);
}

.hq-expand.is-closing {
  animation: hq-expand-fade-out 0.28s ease forwards;
}

.hq-expand[hidden] {
  display: none !important;
  animation: none;
}

@keyframes hq-expand-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes hq-expand-fade-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.hq-expand__img {
  display: block;
  max-width: calc(100% - 36px);
  max-height: calc(100% - 56px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  background: var(--hq-art-bg);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  cursor: zoom-out;
  z-index: 1;
}

.hq-expand__close {
  appearance: none;
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(250, 212, 36, 0.18);
  color: #ffe566;
  border: 1px solid rgba(250, 212, 36, 0.35);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

html[data-theme="light"] .hq-expand__close {
  background: rgba(20, 32, 51, 0.72);
  color: #fff;
  border-color: transparent;
}

.hq-expand__close:hover {
  background: rgba(250, 212, 36, 0.28);
}

html[data-theme="light"] .hq-expand__close:hover {
  background: rgba(20, 32, 51, 0.9);
}

.hq-expand__hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  margin: 0;
  text-align: center;
  color: var(--hq-muted);
  font-size: 0.82rem;
  pointer-events: none;
  z-index: 2;
}

.hq__qmeta {
  margin: 0 0 6px;
  font-size: 0.88rem;
  color: var(--hq-muted);
  font-weight: 600;
}

.hq__question {
  margin: 0 0 14px;
  font-size: 1.08rem;
  line-height: 1.45;
  color: var(--hq-ink);
  font-weight: 650;
}

.hq__answers {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.hq__answer {
  appearance: none;
  position: relative;
  overflow: visible;
  width: 100%;
  text-align: left;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  color: var(--hq-ink);
  font: inherit;
  font-size: 0.98rem;
  line-height: 1.35;
  cursor: pointer;
  --hq-press-x: 50%;
  --hq-sweep: 0;
}

.hq__answer-shell {
  position: relative;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--hq-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  padding: 11px 12px;
  overflow: hidden;
  transform-origin: center center;
  will-change: transform;
  transition: box-shadow 0.2s ease;
}

html[data-theme="light"] .hq__answer-shell {
  background: #fff;
}

.hq__answer-sweep {
  pointer-events: none;
  position: absolute;
  top: 0;
  bottom: 0;
  /* Expand from press point (Unity DrawLessonOutcomePlateSweepPartial). */
  --hq-reach: max(var(--hq-press-x), 100% - var(--hq-press-x));
  left: calc(var(--hq-press-x) - var(--hq-sweep) * var(--hq-reach));
  width: calc(2 * var(--hq-sweep) * var(--hq-reach));
  border-radius: 12px;
  opacity: 0;
  z-index: 0;
  background: transparent;
  box-shadow: inset 0 -40% 28px rgba(0, 0, 0, 0.22);
}

.hq__answer-sweep::before {
  content: "";
  position: absolute;
  /* Как DrawLessonChoicePlateTopLuminance: inset ≈ corner×0.62, не 10% ширины. */
  left: 7px;
  right: 7px;
  top: 1px;
  height: 42%;
  border-radius: 10px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.42),
    rgba(255, 255, 255, 0)
  );
  opacity: 0.85;
}

.hq__answer-sweep::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: 2px;
  height: 1.5px;
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.75);
}

.hq__answer.is-fx-ok .hq__answer-sweep,
.hq__answer.is-ok:not(.hq__answer--sweeping) .hq__answer-sweep {
  opacity: 1;
  background: var(--hq-ok-bg);
  box-shadow:
    inset 0 0 0 2px rgba(93, 222, 160, 0.45),
    inset 0 -40% 28px rgba(0, 0, 0, 0.28);
}

.hq__answer.is-fx-bad .hq__answer-sweep,
.hq__answer.is-bad:not(.hq__answer--sweeping):not(.is-ok) .hq__answer-sweep {
  opacity: 1;
  background: var(--hq-bad-bg);
  box-shadow:
    inset 0 0 0 2px rgba(255, 138, 128, 0.45),
    inset 0 -40% 28px rgba(0, 0, 0, 0.28);
}

html[data-theme="light"] .hq__answer.is-fx-ok .hq__answer-sweep,
html[data-theme="light"] .hq__answer.is-ok:not(.hq__answer--sweeping) .hq__answer-sweep {
  background: linear-gradient(
    180deg,
    rgba(48, 200, 110, 0.72) 0%,
    rgba(14, 150, 70, 0.62) 55%,
    rgba(8, 120, 55, 0.7) 100%
  );
  box-shadow:
    inset 0 0 0 2px rgba(8, 140, 60, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -36% 22px rgba(0, 60, 25, 0.18),
    0 0 16px rgba(22, 175, 88, 0.28);
}

html[data-theme="light"] .hq__answer.is-fx-bad .hq__answer-sweep,
html[data-theme="light"] .hq__answer.is-bad:not(.hq__answer--sweeping):not(.is-ok) .hq__answer-sweep {
  background: linear-gradient(
    180deg,
    rgba(255, 110, 95, 0.7) 0%,
    rgba(230, 55, 45, 0.58) 55%,
    rgba(190, 30, 24, 0.68) 100%
  );
  box-shadow:
    inset 0 0 0 2px rgba(190, 28, 22, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -36% 22px rgba(90, 10, 8, 0.16),
    0 0 16px rgba(230, 48, 40, 0.26);
}

/* Settled (без активной сессии FX): полная заливка сразу. */
.hq__answer.is-ok:not(.hq__answer--sweeping) .hq__answer-sweep,
.hq__answer.is-bad:not(.hq__answer--sweeping) .hq__answer-sweep {
  --hq-sweep: 1;
  left: 0;
  width: 100%;
}

/* Во время live-FX не показываем settled fill до sweep. */
.hq__answers.is-fx-live .hq__answer.is-ok:not(.hq__answer--sweeping) .hq__answer-sweep,
.hq__answers.is-fx-live .hq__answer.is-bad:not(.hq__answer--sweeping) .hq__answer-sweep {
  opacity: 0;
  --hq-sweep: 0;
  left: calc(var(--hq-press-x) - 0px);
  width: 0;
}

.hq__answers.is-fx-live .hq__answer.is-fx-ok .hq__answer-sweep,
.hq__answers.is-fx-live .hq__answer.is-fx-bad .hq__answer-sweep {
  opacity: 1;
}

.hq__answer.is-ok:not(.hq__answer--sweeping) .hq__answer-shell,
.hq__answer.is-bad:not(.hq__answer--sweeping) .hq__answer-shell {
  color: #fff;
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.45),
    0 2px 4px rgba(0, 0, 0, 0.35);
}

.hq__answer.is-ok:not(.hq__answer--sweeping) .hq__mark,
.hq__answer.is-bad:not(.hq__answer--sweeping) .hq__mark {
  color: #fff;
}

.hq__answers.is-fx-live .hq__answer.is-ok:not(.hq__answer--text-lit) .hq__answer-shell,
.hq__answers.is-fx-live .hq__answer.is-bad:not(.hq__answer--text-lit) .hq__answer-shell {
  color: var(--hq-ink);
  text-shadow: none;
}

.hq__answers.is-fx-live .hq__answer.is-ok:not(.hq__answer--text-lit) .hq__mark,
.hq__answers.is-fx-live .hq__answer.is-bad:not(.hq__answer--text-lit) .hq__mark {
  color: var(--hq-muted);
}

.hq__answer canvas.hq__answer-fx {
  pointer-events: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
}

.hq__answer .hq__mark,
.hq__answer-shell > span:not(.hq__answer-sweep) {
  position: relative;
  z-index: 3;
}

.hq__answer:hover:not(:disabled) .hq__answer-shell {
  background: var(--hq-pick);
  border-color: var(--hq-pick-border);
}

.hq__answer:disabled {
  cursor: default;
}

.hq__answer.is-picked .hq__answer-shell {
  background: var(--hq-pick);
  border-color: var(--hq-pick-border);
}

.hq__answer.is-ok .hq__answer-shell,
.hq__answer.is-fx-ok .hq__answer-shell {
  border-color: rgba(93, 222, 160, 0.55);
}

html[data-theme="light"] .hq__answer.is-ok .hq__answer-shell,
html[data-theme="light"] .hq__answer.is-fx-ok .hq__answer-shell {
  border-color: rgba(8, 140, 55, 0.7);
}

.hq__answer.is-bad:not(.is-ok) .hq__answer-shell,
.hq__answer.is-fx-bad .hq__answer-shell {
  border-color: rgba(255, 138, 128, 0.5);
}

html[data-theme="light"] .hq__answer.is-bad:not(.is-ok) .hq__answer-shell,
html[data-theme="light"] .hq__answer.is-fx-bad .hq__answer-shell {
  border-color: rgba(200, 30, 24, 0.65);
}

html[data-theme="light"] .hq__answer.is-ok.hq__answer--chosen-pulse .hq__answer-shell,
html[data-theme="light"] .hq__answer.is-fx-ok.hq__answer--chosen-pulse .hq__answer-shell {
  box-shadow:
    0 0 0 1px rgba(11, 154, 66, 0.45),
    0 0 22px rgba(22, 175, 88, 0.42);
}

html[data-theme="light"] .hq__answer.is-fx-bad.hq__answer--chosen-pulse .hq__answer-shell {
  box-shadow:
    0 0 0 1px rgba(217, 32, 24, 0.45),
    0 0 22px rgba(230, 48, 40, 0.4);
}

.hq__answer--text-lit.hq__answer--chosen-pulse .hq__answer-shell,
.hq__answer--text-lit.is-ok .hq__answer-shell,
.hq__answer--text-lit.is-fx-ok .hq__answer-shell,
.hq__answer--text-lit.is-fx-bad .hq__answer-shell {
  color: #fff;
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.45),
    0 2px 4px rgba(0, 0, 0, 0.35);
}

.hq__answer--text-lit .hq__mark {
  color: #fff !important;
}

.hq__answer--chosen-pulse .hq__answer-shell {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.18),
    0 0 22px rgba(120, 200, 255, 0.22);
}

.hq__answer.is-ok.hq__answer--chosen-pulse .hq__answer-shell,
.hq__answer.is-fx-ok.hq__answer--chosen-pulse .hq__answer-shell {
  box-shadow:
    0 0 0 1px rgba(93, 222, 160, 0.4),
    0 0 22px rgba(93, 222, 160, 0.38);
}

.hq__answer.is-fx-bad.hq__answer--chosen-pulse .hq__answer-shell {
  box-shadow:
    0 0 0 1px rgba(255, 138, 128, 0.4),
    0 0 22px rgba(255, 138, 128, 0.36);
}

html[data-theme="light"] .hq__answer.is-ok:not(.hq__answer--sweeping) .hq__mark,
html[data-theme="light"] .hq__answer.is-bad:not(.hq__answer--sweeping) .hq__mark,
html[data-theme="light"] .hq__answer--text-lit .hq__mark {
  color: #fff !important;
}

html[data-theme="light"] .hq__answer.is-ok:not(.hq__answer--sweeping) .hq__answer-shell,
html[data-theme="light"] .hq__answer.is-bad:not(.hq__answer--sweeping) .hq__answer-shell {
  color: #fff;
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.28),
    0 2px 4px rgba(0, 0, 0, 0.22);
}

html[data-theme="light"] .hq__answers.is-fx-live .hq__answer.is-ok:not(.hq__answer--text-lit) .hq__mark,
html[data-theme="light"] .hq__answers.is-fx-live .hq__answer.is-bad:not(.hq__answer--text-lit) .hq__mark {
  color: var(--hq-muted) !important;
}

@media (prefers-reduced-motion: reduce) {
  .hq__answer-shell {
    will-change: auto;
    transition: none;
  }
}

.hq__mark {
  flex: 0 0 auto;
  font-weight: 800;
  min-width: 1.4em;
  color: var(--hq-muted);
}

.hq__feedback {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--hq-line);
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--hq-ink);
  flex: 0 1 auto;
  max-height: min(36vh, 280px);
  overflow: auto;
}

.hq__feedback.is-ok {
  background: var(--hq-ok-bg);
  border-color: rgba(93, 222, 160, 0.4);
}

html[data-theme="light"] .hq__feedback.is-ok {
  border-color: rgba(11, 154, 66, 0.45);
  background: rgba(22, 175, 88, 0.22);
}

.hq__feedback.is-bad {
  background: var(--hq-bad-bg);
  border-color: rgba(255, 138, 128, 0.4);
}

html[data-theme="light"] .hq__feedback.is-bad {
  border-color: rgba(217, 32, 24, 0.42);
  background: rgba(230, 48, 40, 0.18);
}

.hq__tip {
  margin: 0;
  color: var(--hq-muted);
  font-size: 0.92rem;
  line-height: 1.4;
  white-space: pre-wrap;
}

.hq__pick-hint {
  color: var(--hq-muted);
}

.hq__pick-status {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.3;
}

.hq__pick-status.is-ok {
  color: var(--hq-ok);
}

.hq__pick-status.is-bad {
  color: var(--hq-bad);
}

.hq__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  /* Не привязывать к высоте колонки с картинкой+пояснением — иначе после ответа кнопки уезжают. */
  margin-top: 14px;
  padding-top: 0;
}

.hq__nav-end {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-left: auto;
}

.hq__auto-toggle {
  appearance: none;
  border: 1px solid var(--hq-line);
  border-radius: 999px;
  min-height: 42px;
  padding: 8px 14px;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--hq-muted);
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
}

.hq__auto-toggle.is-on {
  color: var(--hq-ink);
  border-color: var(--hq-pick-border);
  background: var(--hq-pick);
}

.hq__auto-toggle .hq__auto-mark {
  display: inline-block;
  width: 1.1em;
  margin-right: 0.25em;
  font-weight: 800;
}

.hq__panel {
  position: relative;
  overflow: hidden;
  touch-action: pan-y;
}

.hq__panel.is-swiping {
  cursor: grabbing;
  user-select: none;
  -webkit-user-select: none;
}

.hq__panel-stage {
  position: relative;
  width: 100%;
  will-change: transform, opacity;
}

.hq__panel-stage.hq__panel--exit {
  animation: hq-fade-exit 0.22s cubic-bezier(0.4, 0, 1, 1) forwards;
}

/*
 * Material Fade Through (2024–2026): для смены несвязанного контента
 * старый уходит быстро и НЕ в полную «дыру» — остаток ~12–15% opacity,
 * новый сразу наезжает. Полный 1→0 + пауза утомляет вестибулярно.
 */
@keyframes hq-fade-exit {
  from {
    opacity: 1;
  }
  to {
    opacity: 0.12;
  }
}

.hq__hint {
  margin: 0 0 0.65rem;
  text-align: center;
  font-size: 0.88rem;
  color: var(--hq-muted);
}

.hq__hint kbd {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 6px;
  border: 1px solid var(--hq-line);
  font: inherit;
  font-size: 0.82em;
  font-weight: 700;
}

.hq__card.hq__card--enter {
  animation: hq-fade-enter 0.3s cubic-bezier(0, 0, 0.2, 1);
}

/* Incoming чуть дольше outgoing — как в Fade Through (delay ощущается overlap’ом). */
@keyframes hq-fade-enter {
  0% {
    opacity: 0.12;
  }
  100% {
    opacity: 1;
  }
}

/* Карусель при свайпе: быстрый въезд нового слайда (без паузы на выезд). */
.hq__card.hq__card--slide-in-right {
  animation: hq-slide-in-right 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

.hq__card.hq__card--slide-in-left {
  animation: hq-slide-in-left 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes hq-slide-in-right {
  from {
    transform: translateX(28%);
    opacity: 0.85;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes hq-slide-in-left {
  from {
    transform: translateX(-28%);
    opacity: 0.85;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hq__card.hq__card--enter,
  .hq__card.hq__card--slide-in-right,
  .hq__card.hq__card--slide-in-left,
  .hq__panel-stage.hq__panel--exit {
    animation: none;
  }
}

.hq__nav .btn {
  min-height: 42px;
}

.hq__summary {
  margin-top: 0.5rem;
  color: var(--hq-ink);
}

.hq__summary h3 {
  margin: 0 0 0.5rem;
  color: var(--hq-ink);
}

.hq__error {
  color: var(--hq-bad);
}

@media (min-width: 760px) {
  .hq__card.has-image {
    display: grid;
    grid-template-columns: minmax(220px, 42%) 1fr;
    gap: 16px;
    align-items: start;
  }

  .hq__card.has-image .hq__main {
    min-height: 0;
  }

  .hq__card.has-image .hq__media {
    position: sticky;
    top: 72px;
    align-self: start;
  }

  .hq__card:not(.has-image) .hq__media .hq__feedback-slot {
    margin-bottom: 4px;
  }
}

@media (max-width: 759px) {
  .hq__media {
    margin-bottom: 12px;
  }

  .hq__card:not(.has-image) .hq__media {
    margin-bottom: 10px;
  }
}
