@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

body {
  min-height: 100vh;
}

body.client-layout {
  isolation: isolate;
  position: relative;
}

#test-view {
  box-sizing: border-box;
  margin: 24px auto;
  max-width: 1320px;
  padding: 0 12px 24px;
  width: 100%;
}

#test-view,
#test-view button,
#test-view input,
#test-view select,
#test-view textarea {
  font-family: "Poppins", sans-serif;
}

.tests-init__question-strip {
  align-items: center;
  background: #fff;
  border-radius: 16px;
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  padding: 16px 24px;
}

.tests-init__question-strip-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.tests-init__question-batches {
  align-items: center;
  display: none;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0;
  scrollbar-width: thin;
}

.question-batch-btn {
  align-items: center;
  background: #f6f4f2;
  border: 1px solid #dedede;
  border-radius: 999px;
  color: #2a2a2a;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 500;
  height: 30px;
  justify-content: center;
  line-height: 1;
  padding: 0 12px;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.question-batch-btn.is-active {
  background: #3559b8;
  border-color: #3559b8;
  color: #fff;
}

.question-batch-btn--jump {
  background: #fff;
  border-style: dashed;
  margin-left: 4px;
}

.question-batch-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

#question-numbers {
  align-items: center;
  display: flex;
  gap: 20px;
  min-width: 0;
  overflow-x: auto;
  padding: 8px 0;
  width: 100%;
  scrollbar-width: thin;
}

#question-numbers::-webkit-scrollbar {
  height: 6px;
}

#question-numbers::-webkit-scrollbar-thumb {
  background: #dedede;
  border-radius: 8px;
}

.question-number {
  align-items: center;
  background: #f5f3f1;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #000;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 40px;
  font-size: 14px;
  font-weight: 400;
  height: 40px;
  justify-content: center;
  line-height: 24px;
  position: relative;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.question-number + .question-number::before {
  border-top: 1px solid #dedede;
  content: "";
  left: -14px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
}

.question-number.current {
  background: #fff;
  border-color: #dedede;
  /* Strong current indicator drawn inside to avoid overflow clipping */
  box-shadow: inset 0 0 0 2px #000;
}

.question-number.correct,
.question-number.incorrect {
  color: transparent;
  font-size: 0;
}

.question-number.correct {
  background: #48b525;
  border-color: #48b525;
}

.question-number.correct::after {
  color: #fff;
  content: "✓";
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
}

.question-number.incorrect {
  background: #fa5e2f;
  border-color: #fa5e2f;
}

.question-number.incorrect::after {
  color: #fff;
  content: "✕";
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
}

.question-number.answered {
  background: #ffe4b7;
  border-color: #ffe4b7;
}

.tests-init__question-strip-close {
  align-items: center;
  display: flex;
  flex-shrink: 0;
  gap: 10px;
}

.tests-init__mode-switcher {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.tests-init__mode-toggle {
  align-items: center;
  appearance: none;
  background: #111111;
  border: 1px solid #111111;
  border-radius: 12px;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 40px;
  height: 40px;
  justify-content: center;
  padding: 0;
  transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.14s ease;
  width: 40px;
}

.tests-init__mode-toggle:hover {
  background: #202020;
  border-color: #202020;
}

.tests-init__mode-toggle:active {
  transform: translateY(1px);
}

.tests-init__mode-toggle.is-active {
  background: #3559b8;
  border-color: #3559b8;
  box-shadow: 0 12px 24px rgba(53, 89, 184, 0.24);
}

.tests-init__mode-toggle-icon {
  background-position: center;
  background-repeat: no-repeat;
  background-size: 18px 18px;
  display: block;
  height: 18px;
  width: 18px;
}

.tests-init__mode-toggle--projector .tests-init__mode-toggle-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='12' rx='2.5'/%3E%3Cpath d='M8 20h8'/%3E%3Cpath d='M12 16v4'/%3E%3Cpath d='m9 9 2.2 2.2L15 7.5'/%3E%3C/svg%3E");
}

.tests-init__mode-toggle--minimal .tests-init__mode-toggle-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='5' width='16' height='14' rx='3'/%3E%3Cpath d='M8.5 9h7'/%3E%3Cpath d='M8.5 12h7'/%3E%3Cpath d='M8.5 15h4.5'/%3E%3C/svg%3E");
}

.tests-init__mode-toggle-label {
  display: none;
}

.tests-dashboard__logo.tests-init__minimal-brand {
  display: none;
}

.tests-dashboard__logo.tests-init__projector-brand {
  display: none;
}

.tests-init__icon-button,
.tests-init__icon-button:link,
.tests-init__icon-button:visited {
  align-items: center;
  background: #fff;
  border: 1px solid #dedede;
  border-radius: 12px;
  color: #000;
  display: inline-flex;
  font-size: 18px;
  height: 40px;
  justify-content: center;
  line-height: 1;
  text-decoration: none;
  width: 40px;
}

.tests-init__icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.answers-sync-status {
  font-size: 13px;
  line-height: 16px;
  margin: 0 0 12px;
  display: none !important; /* Hide per-answer loader/status completely */
}

.answers-sync-status.is-pending {
  color: #8a6d3b;
}

.answers-sync-status.is-synced {
  color: #2e7d32;
}

.answers-sync-status.is-offline {
  color: #b71c1c;
}

.tests-init__card {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
}

#question-header {
  align-items: flex-start;
  display: flex;
  gap: 24px;
  justify-content: space-between;
}

.tests-init__question-head-main {
  flex: 1;
  min-width: 0;
}

#question-text {
  color: #000;
  font-family: "Inter", "Poppins", Helvetica, Arial, sans-serif;
  font-size: 20px;
  font-weight: 500;
  line-height: 24px;
  margin: 0;
  /* Reserve space for two lines to prevent layout jump */
  min-height: 48px;
}

#question-title {
  color: #9f9f9f;
  font-size: 14px;
  font-weight: 400;
  line-height: 16px;
  margin: 10px 0 0;
}

#progress-info {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

#question-counter,
#test-progress-text {
  color: #9f9f9f;
  font-size: 13px;
  line-height: 16px;
}

#progress-info {
  display: none;
}

.tests-init__font-controls {
  display: none;
}

.tests-init__minimal-font-controls-slot {
  display: none;
}

.tests-init__font-control-btn {
  appearance: none;
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: #4b5563;
  cursor: pointer;
  font-family: "Poppins", sans-serif;
  font-size: 12px;
  font-weight: 600;
  height: 30px;
  letter-spacing: 0.01em;
  line-height: 1;
  min-width: 34px;
  padding: 0 10px;
}

.tests-init__font-control-btn:hover {
  background: rgba(17, 24, 39, 0.06);
}

.tests-init__font-control-btn:focus-visible {
  outline: 2px solid rgba(60, 135, 255, 0.56);
  outline-offset: 2px;
}

.tests-init__font-control-btn:disabled {
  cursor: default;
  opacity: 0.42;
}

.tests-init__question-actions {
  align-items: center;
  display: flex;
  gap: 10px;
  white-space: nowrap;
}

#theory-btn,
#translate-btn {
  -webkit-appearance: none;
  align-items: center;
  appearance: none;
  background: #f5f3f1;
  border: 1px solid #dedede;
  border-radius: 12px;
  color: #000;
  cursor: pointer;
  display: inline-flex;
  font-size: 14px;
  font-weight: 400;
  gap: 8px;
  justify-content: center;
  line-height: 20px;
  min-height: 44px;
  min-width: 0;
  padding: 10px 16px;
  white-space: nowrap;
}

#theory-btn {
  min-width: 126px;
}

#theory-btn.is-on {
  background: #eef0f3; /* neutral light */
  border-color: #bfc8d6; /* neutral border */
  color: #2b2f36; /* neutral text */
}

#theory-btn.is-on::after {
  content: "";
  display: block;
  flex: 0 0 auto;
  height: 8px;
  width: 8px;
  background: #6b7280; /* neutral dot */
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(107, 114, 128, 0.25);
}

#translate-btn {
  display: none;
  min-width: 138px;
  justify-content: flex-start;
  overflow: visible;
  position: relative;
  transition: transform 0.16s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

#translate-btn .translate-btn__lock {
  display: none;
  font-size: 14px;
  line-height: 1;
  margin-left: auto;
}

#translate-btn.is-locked {
  background: #f5f3f1;
  border-color: #dedede;
  box-shadow: none;
  color: #2b2f36;
}

#translate-btn.is-locked .translate-btn__icon {
  opacity: 0.6;
}

#translate-btn.is-locked .translate-btn__lock {
  display: inline-flex;
}

#translate-btn.is-locked .translate-btn__ripple {
  display: none;
}

#translate-btn.is-locked:active {
  animation: none;
  background: #efeeec;
  border-color: #d1d1d1;
  box-shadow: none;
  transform: none;
}

#translate-btn.is-locked:active .translate-btn__icon {
  left: 14px;
  transform: translateY(-50%);
}

#translate-btn.is-locked:active .translate-btn__label {
  max-width: 220px;
  opacity: 1;
  transform: none;
}

#translate-btn.is-pressed,
#translate-btn:active {
  background: linear-gradient(180deg, #d2ecff 0%, #9ed3ff 100%);
  border-color: #78bdf5;
  box-shadow: 0 8px 18px rgba(56, 149, 228, 0.25);
  transform: translateY(1px);
}

#translate-btn .translate-btn__icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18'/%3E%3Cpath d='M12 3c2.6 2.45 4 5.7 4 9s-1.4 6.55-4 9c-2.6-2.45-4-5.7-4-9s1.4-6.55 4-9Z'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 22px 22px;
  display: block;
  height: 22px;
  left: 14px;
  pointer-events: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  transition: left 240ms cubic-bezier(0.21, 0.72, 0.24, 1), transform 240ms cubic-bezier(0.21, 0.72, 0.24, 1);
  width: 22px;
  z-index: 3;
}

#translate-btn .translate-btn__label {
  display: inline-block;
  margin-left: 30px;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 180ms ease, transform 220ms ease, max-width 220ms ease;
  white-space: nowrap;
}

#translate-btn .translate-btn__ripple {
  border: 2px solid rgba(85, 174, 249, 0.58);
  border-radius: 999px;
  height: 22px;
  left: 25px;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.7);
  width: 22px;
  z-index: 1;
}

#translate-btn.is-pressed,
#translate-btn:active {
  animation: translate-btn-hold-pulse 0.95s ease-in-out infinite alternate;
}

#translate-btn.is-pressed .translate-btn__icon,
#translate-btn:active .translate-btn__icon {
  left: 50%;
  transform: translate(-50%, -50%) scale(1.08);
}

#translate-btn.is-pressed .translate-btn__label,
#translate-btn:active .translate-btn__label {
  max-width: 0;
  opacity: 0;
  transform: translateX(10px) scaleX(0.82);
}

#translate-btn.is-pressed .translate-btn__ripple,
#translate-btn:active .translate-btn__ripple {
  animation: translate-btn-wave 1.18s cubic-bezier(0.18, 0.72, 0.22, 1) infinite;
  left: 50%;
}

#translate-btn.is-pressed .translate-btn__ripple--two,
#translate-btn:active .translate-btn__ripple--two {
  animation-delay: 0.38s;
}

@keyframes translate-btn-hold-pulse {
  0% {
    box-shadow: 0 8px 18px rgba(56, 149, 228, 0.2), 0 0 0 0 rgba(85, 174, 249, 0.15);
  }

  100% {
    box-shadow: 0 12px 22px rgba(56, 149, 228, 0.32), 0 0 0 6px rgba(85, 174, 249, 0);
  }
}

@keyframes translate-btn-wave {
  0% {
    opacity: 0.64;
    transform: translate(-50%, -50%) scale(0.7);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(3.4);
  }
}

#theory-btn::before {
  content: "";
  display: block;
  flex: 0 0 auto;
  height: 22px;
  min-width: 22px;
  width: 22px;
}

#theory-btn::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'%3E%3Crect x='2.25' y='2.25' width='6.5' height='15.5' rx='1.75' stroke='%23000000' stroke-width='1.5'/%3E%3Crect x='8.5' y='2.25' width='9.25' height='15.5' rx='1.75' stroke='%23000000' stroke-width='1.5'/%3E%3Cline x1='8.5' y1='3.5' x2='8.5' y2='16.5' stroke='%23000000' stroke-width='1.5'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 22px 22px;
  transform: translateY(0.5px);
}

#progress-bar-container {
  background: #f5f3f1;
  border-radius: 999px;
  height: 4px;
  margin: 20px 0;
  overflow: hidden;
}

#progress-bar {
  background: #48b525;
  height: 100%;
  transition: width 0.25s ease;
  width: 0%;
}

.tests-init__content {
  display: flex;
  gap: 24px;
}

.tests-init__media-column {
  flex: 0 0 48%;
  max-width: 612px;
}

#question-image {
  aspect-ratio: 612 / 343;
  background: #f5f3f1;
  border: 1px solid #dedede;
  border-radius: 12px;
  display: none;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
  width: 100%;
}

.tests-minimal-image-lightbox {
  align-items: center;
  display: flex;
  inset: 0;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  transition: opacity 0.18s ease;
  z-index: 120;
}

.tests-minimal-image-lightbox.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.tests-minimal-image-lightbox__backdrop {
  background: rgba(15, 18, 26, 0.76);
  inset: 0;
  position: absolute;
}

.tests-minimal-image-lightbox__dialog {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  max-height: calc(100vh - 40px);
  max-width: calc(100vw - 40px);
  position: relative;
  z-index: 1;
}

.tests-minimal-image-lightbox__image {
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
  display: block;
  height: auto;
  max-height: calc(100vh - 40px);
  max-width: calc(100vw - 40px);
  width: auto;
}

.tests-minimal-image-lightbox__close {
  align-items: center;
  appearance: none;
  background: rgba(17, 24, 39, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font-size: 28px;
  height: 44px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  position: absolute;
  right: 14px;
  top: 14px;
  width: 44px;
  z-index: 2;
}

.tests-minimal-image-lightbox__close:hover {
  background: rgba(17, 24, 39, 0.84);
}

.tests-minimal-image-lightbox__close:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.95);
  outline-offset: 2px;
}

#answer-hint-slot:empty {
  display: none;
}

.answer-hint {
  border: 1px solid #dedede;
  border-radius: 12px;
  color: #1f1f1f;
  display: none;
  font-family: "Inter", "Poppins", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 20px;
  margin-top: 16px;
  padding: 16px;
}

.answer-hint > :first-child {
  margin-top: 0;
}

.answer-hint > :last-child {
  margin-bottom: 0;
}

.answer-hint p,
.answer-hint ul,
.answer-hint ol,
.answer-hint blockquote,
.answer-hint pre {
  margin: 0 0 10px;
}

.answer-hint ul,
.answer-hint ol {
  padding-left: 20px;
}

.answer-hint li + li {
  margin-top: 4px;
}

.answer-hint a {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
}

.answer-hint code {
  background: rgba(17, 24, 39, 0.08);
  border-radius: 6px;
  font-size: 0.92em;
  padding: 1px 5px;
}

.answer-hint pre {
  background: rgba(17, 24, 39, 0.08);
  border-radius: 10px;
  overflow-x: auto;
  padding: 10px 12px;
}

.answer-hint pre code {
  background: transparent;
  padding: 0;
}

.answer-hint blockquote {
  border-left: 3px solid currentColor;
  margin-left: 0;
  padding-left: 12px;
}

.answer-hint img {
  border-radius: 10px;
  display: block;
  height: auto;
  margin: 10px auto;
  max-height: 220px;
  max-width: 100%;
  object-fit: contain;
}

.answer-hint.visible {
  display: block;
  animation: answer-hint-reveal 240ms ease-out both;
}

.answer-hint.visible.correct {
  background: rgba(72, 181, 37, 0.12);
  border-color: #48b525;
  color: #1f6d0d;
}

.answer-hint.visible.incorrect {
  background: rgba(250, 94, 47, 0.12);
  border-color: #fa5e2f;
  color: #8a371f;
}

#explanation-container {
  background: #f5f3f1;
  border: 1px solid #dedede;
  border-radius: 12px;
  color: #1f1f1f;
  margin-top: 16px;
  padding: 16px;
}

#explanation-container h4 {
  color: #000;
  font-family: "Inter", "Poppins", Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 16px;
  margin: 0 0 8px;
}

#explanation-content {
  font-family: "Inter", "Poppins", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 20px;
  overflow-wrap: anywhere;
}

#explanation-content img {
  border-radius: 12px;
  display: block;
  height: auto;
  margin: 12px auto;
  max-height: min(40vh, 320px);
  max-width: 100%;
  object-fit: contain;
  width: auto;
}

#explanation-content p:last-child img:last-child {
  margin-bottom: 0;
}

.tests-init__answers-column {
  flex: 1;
  min-width: 0;
}

.tests-init__answers-title {
  color: #000;
  font-family: "Inter", "Poppins", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 16px;
  margin: 0 0 12px;
}

#answers-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.answer-option {
  align-items: center;
  background: #fff;
  border: 1px solid #dedede;
  border-radius: 12px;
  box-sizing: border-box;
  cursor: pointer;
  column-gap: 20px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  min-height: 84px;
  padding: 18px 20px;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.18s ease;
  will-change: transform;
  width: 100%;
}

.answer-option:hover {
  background: rgba(245, 243, 241, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(20, 26, 45, 0.05);
}

.answer-number {
  align-self: center;
  align-items: center;
  background: #f5f3f1;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #000;
  display: inline-flex;
  flex: 0 0 40px;
  font-size: 14px;
  height: 40px;
  justify-content: center;
  line-height: 24px;
  width: 40px;
}

.answer-text {
  color: #000;
  display: block;
  font-family: "Inter", "Poppins", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 17px;
  margin: 0;
}

.answer-option.selected {
  background: rgba(60, 135, 255, 0.08);
  border-color: #3c87ff;
}

.answer-option.correct {
  background: rgba(72, 181, 37, 0.08);
  border-color: #48b525;
}

.answer-option.correct .answer-number {
  background: #48b525;
  color: #fff;
}

.answer-option.answer-option--feedback {
  animation: answer-option-press 220ms cubic-bezier(0.2, 0.85, 0.24, 1) both;
}

.answer-option.answer-option--feedback-correct {
  box-shadow: 0 0 0 2px rgba(72, 181, 37, 0.18), 0 10px 24px rgba(72, 181, 37, 0.12);
}

.answer-option.answer-option--feedback-incorrect {
  box-shadow: 0 0 0 2px rgba(250, 94, 47, 0.16), 0 10px 24px rgba(250, 94, 47, 0.1);
}

.answer-option.answer-option--reveal-correct {
  animation: answer-option-reveal-correct 260ms ease-out both;
}

.answer-option.incorrect {
  background: rgba(250, 94, 47, 0.08);
  border-color: #fa5e2f;
}

.answer-option.incorrect .answer-number {
  background: #fa5e2f;
  color: #fff;
}

.answer-number.correct-mark {
  background: #48b525;
  border-color: #48b525;
  color: #fff;
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  animation: answer-number-check-in 220ms cubic-bezier(0.18, 0.8, 0.24, 1);
}

#navigation-buttons {
  align-items: center;
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.tests-init__nav-btn,
#prev-btn,
#next-btn,
#finish-btn {
  align-items: center;
  border-radius: 12px;
  box-sizing: border-box;
  cursor: pointer;
  display: inline-flex;
  font-size: 14px;
  font-weight: 500;
  justify-content: center;
  line-height: 16px;
  min-height: 44px;
  padding: 12px 16px;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.14s ease;
  width: 200px;
}

.tests-init__nav-btn:active {
  transform: translateY(1px);
}

.tests-init__nav-btn--secondary {
  background: #fff;
  border: 1px solid #dedede;
  color: #1f1f1f;
}

.tests-init__nav-btn--neutral {
  background: #f5f3f1;
  border: 1px solid #dedede;
  color: #2b2f36;
}

.tests-init__nav-btn--primary {
  background: #3559b8;
  border: 1px solid #3559b8;
  box-shadow: 0 10px 22px rgba(53, 89, 184, 0.22);
  color: #fff;
}

.tests-init__nav-btn--primary:hover {
  background: #2f4fa6;
  border-color: #2f4fa6;
}

#prev-btn,
#next-btn {
  gap: 8px;
}

#prev-btn::before,
#next-btn::after {
  content: "";
  display: inline-block;
  flex: 0 0 auto;
  height: 16px;
  width: 16px;
}

#prev-btn::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.5 5.5 8 12l6.5 6.5'/%3E%3Cline x1='8.5' y1='12' x2='20' y2='12'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 16px 16px;
}

#next-btn::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9.5 5.5 16 12l-6.5 6.5'/%3E%3Cline x1='4' y1='12' x2='15.5' y2='12'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 16px 16px;
}

#next-btn.tests-init__nav-btn--primary::after {
  filter: invert(1);
}

#next-btn.tests-init__nav-btn--finish::after {
  display: none;
}

#next-btn {
  margin-left: auto;
}

#finish-btn {
  display: none !important;
}

.tests-init__nav-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

#loading-state {
  box-sizing: border-box;
  color: #000;
  margin: 24px auto;
  max-width: 1320px;
  padding: 0 12px 24px;
  width: 100%;
}

.tests-init-skeleton {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tests-init-skeleton [data-bone] {
  animation: tests-init-skeleton-shimmer 1.35s linear infinite;
  background: linear-gradient(90deg, #ece9e7 22%, #f6f4f3 50%, #ece9e7 78%);
  background-size: 300% 100%;
  border-radius: 12px;
  display: block;
}

.tests-init-skeleton__question-strip {
  align-items: center;
  background: #fff;
  border-radius: 16px;
  display: flex;
  gap: 16px;
  padding: 16px 24px;
}

.tests-init-skeleton__chips {
  display: flex;
  flex: 1;
  gap: 20px;
  min-width: 0;
}

.tests-init-skeleton__chip {
  flex: 0 0 40px;
  height: 40px;
}

.tests-init-skeleton__icon {
  flex: 0 0 40px;
  height: 40px;
  width: 40px;
}

.tests-init-skeleton__card {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
}

.tests-init-skeleton__header {
  align-items: flex-start;
  display: flex;
  gap: 24px;
}

.tests-init-skeleton__title-block {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
}

.tests-init-skeleton__line {
  height: 18px;
}

.tests-init-skeleton__line--lg {
  max-width: 740px;
  width: 82%;
}

.tests-init-skeleton__line--md {
  max-width: 460px;
  width: 45%;
}

.tests-init-skeleton__header-actions {
  display: flex;
  gap: 10px;
}

.tests-init-skeleton__action {
  height: 44px;
  width: 132px;
}

.tests-init-skeleton__action--icon {
  width: 40px;
}

.tests-init-skeleton__divider {
  height: 2px;
  margin: 20px 0;
  width: 100%;
}

.tests-init-skeleton__content {
  display: flex;
  gap: 24px;
}

.tests-init-skeleton__image {
  aspect-ratio: 612 / 343;
  flex: 0 0 48%;
  max-width: 612px;
  width: 100%;
}

.tests-init-skeleton__answers-column {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 20px;
}

.tests-init-skeleton__answer {
  height: 84px;
  width: 100%;
}

.tests-init-skeleton__nav-row {
  display: flex;
  gap: 10px;
  margin-top: 2px;
}

.tests-init-skeleton__nav-btn {
  height: 44px;
  width: 200px;
}

.tests-init-skeleton__nav-row .tests-init-skeleton__nav-btn:last-child {
  margin-left: auto;
}

.tests-init-skeleton__sr {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
}

#error-state {
  box-sizing: border-box;
  color: #000;
  margin: 40px auto;
  max-width: 1320px;
  padding: 0 12px;
}

@keyframes tests-init-skeleton-shimmer {
  0% {
    background-position: 100% 0;
  }

  100% {
    background-position: -100% 0;
  }
}

@keyframes answer-option-press {
  0% {
    transform: scale(0.994);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes answer-option-reveal-correct {
  0% {
    box-shadow: 0 0 0 0 rgba(72, 181, 37, 0);
    border-color: #dedede;
  }

  100% {
    box-shadow: 0 0 0 2px rgba(72, 181, 37, 0.14);
    border-color: rgba(72, 181, 37, 0.52);
  }
}

@keyframes answer-number-check-in {
  0% {
    transform: scale(0.82);
    opacity: 0.7;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes answer-hint-reveal {
  0% {
    opacity: 0;
    transform: translateY(4px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

#error-state a {
  color: #000;
}

#test-view.correct-bg,
#test-view.incorrect-bg {
  background: transparent;
}

body.tests-projector-mode {
  --projector-safe-width: clamp(220px, 18vw, 340px);
  --projector-safe-height: clamp(150px, 20vh, 230px);
  background:
    radial-gradient(circle at top left, rgba(60, 88, 173, 0.2), transparent 34%),
    radial-gradient(circle at top right, rgba(75, 181, 37, 0.12), transparent 28%),
    linear-gradient(180deg, #eef3fb 0%, #f8fbff 52%, #f4f6fb 100%);
  overflow-x: hidden;
}

body.tests-projector-mode .client-layout__chrome,
body.tests-projector-mode .client-layout__footer,
body.tests-projector-mode #cookie-banner,
body.tests-projector-mode #tests-premium-modal {
  display: none !important;
}

body.tests-projector-mode .client-layout__main {
  padding: 0;
}

body.tests-projector-mode #test-view,
body.tests-projector-mode #loading-state,
body.tests-projector-mode #error-state {
  margin: 0;
  max-width: none;
  min-height: 100vh;
  padding: clamp(18px, 2.2vw, 30px);
}

body.tests-projector-mode #test-view {
  padding-bottom: calc(clamp(18px, 2.2vw, 30px) + var(--projector-safe-height));
}

body.tests-projector-mode .tests-init__question-strip {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(140, 154, 190, 0.18);
  box-shadow: 0 20px 42px rgba(34, 57, 118, 0.1);
  margin-bottom: 20px;
  position: sticky;
  top: 18px;
  z-index: 60;
}

body.tests-projector-mode .tests-init__icon-button--close {
  display: none;
}

body.tests-projector-mode .tests-init__media-column {
  display: flex;
  flex-direction: column;
  max-width: none;
  position: relative;
}

body.tests-projector-mode .tests-dashboard__logo.tests-init__projector-brand {
  align-items: center;
  backdrop-filter: blur(18px);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(140, 154, 190, 0.2);
  border-radius: 16px;
  box-shadow: 0 16px 34px rgba(34, 57, 118, 0.1);
  color: #172033;
  display: inline-flex;
  gap: 10px;
  left: 14px;
  max-width: min(calc(100% - 28px), 320px);
  padding: 9px 12px;
  position: absolute;
  text-decoration: none;
  top: 14px;
  z-index: 66;
}

body.tests-projector-mode .tests-init__projector-brand .tests-dashboard__logo-image {
  height: 22px;
}

body.tests-projector-mode .tests-init__projector-brand .tests-dashboard__logo-copy {
  font-size: 14px;
  gap: 7px;
  max-width: 100%;
  overflow: hidden;
}

body.tests-projector-mode .tests-init__projector-brand .tests-dashboard__logo-primary,
body.tests-projector-mode .tests-init__projector-brand .tests-dashboard__logo-secondary {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.tests-projector-mode .tests-init__projector-brand .tests-dashboard__logo-secondary {
  font-size: 0.9em;
}

body.tests-projector-mode .tests-init__card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(140, 154, 190, 0.14);
  border-radius: 28px;
  box-shadow: 0 30px 60px rgba(34, 57, 118, 0.12);
  padding: clamp(24px, 2.5vw, 36px);
}

body.tests-projector-mode #question-header {
  align-items: flex-start;
  gap: clamp(18px, 2vw, 30px);
}

body.tests-projector-mode #question-text {
  font-size: clamp(30px, 2.55vw, 42px);
  font-weight: 600;
  line-height: 1.16;
  min-height: 0;
}

body.tests-projector-mode #question-title {
  color: #5e6a83;
  font-size: 16px;
  line-height: 1.4;
  margin-top: 12px;
}

body.tests-projector-mode #progress-info {
  display: flex;
  gap: 16px;
  margin-top: 16px;
}

body.tests-projector-mode #question-counter,
body.tests-projector-mode #test-progress-text {
  background: rgba(53, 89, 184, 0.08);
  border: 1px solid rgba(53, 89, 184, 0.12);
  border-radius: 999px;
  color: #264395;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  padding: 10px 14px;
}

body.tests-projector-mode #progress-bar-container {
  background: rgba(206, 216, 235, 0.65);
  height: 8px;
  margin: 24px 0 28px;
}

body.tests-projector-mode .tests-init__content {
  align-items: start;
  display: grid;
  gap: clamp(24px, 2.8vw, 42px);
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr);
}

body.tests-projector-mode #question-image {
  background: linear-gradient(180deg, #f6f8fc 0%, #eef3fb 100%);
  border-color: rgba(130, 148, 194, 0.2);
  border-radius: 22px;
  max-height: min(58vh, 620px);
}

body.tests-projector-mode #explanation-container,
body.tests-projector-mode .answer-hint {
  border-radius: 18px;
}

body.tests-projector-mode.tests-presentation-theory-open #question-image {
  max-height: min(34vh, 360px);
}

body.tests-projector-mode.tests-presentation-theory-open #explanation-container {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(130, 148, 194, 0.2);
  box-shadow: 0 16px 34px rgba(33, 55, 114, 0.08);
  margin-top: 14px;
  max-height: min(32vh, 360px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 18px 20px;
}

body.tests-projector-mode.tests-presentation-theory-open #explanation-content {
  font-size: 15px;
  line-height: 1.55;
}

body.tests-projector-mode #explanation-content img {
  max-height: min(28vh, 240px);
}

body.tests-projector-mode .tests-init__answers-title {
  color: #475166;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 16px;
}

body.tests-projector-mode .tests-init__answers-column {
  padding-bottom: calc(var(--projector-safe-height) + 18px);
  padding-right: calc(var(--projector-safe-width) + 12px);
}

body.tests-projector-mode #answers-container {
  gap: 18px;
}

body.tests-projector-mode .answer-option {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(133, 149, 191, 0.22);
  border-radius: 22px;
  box-shadow: 0 16px 30px rgba(33, 55, 114, 0.06);
  column-gap: 24px;
  grid-template-columns: 56px minmax(0, 1fr);
  min-height: 102px;
  padding: 22px 24px;
}

body.tests-projector-mode .answer-number {
  background: linear-gradient(180deg, #f3f6fb 0%, #eaf0fb 100%);
  border-radius: 16px;
  font-size: 18px;
  font-weight: 600;
  height: 56px;
  width: 56px;
}

body.tests-projector-mode .answer-option.selected {
  background: rgba(60, 135, 255, 0.08);
  border-color: #3c87ff;
  box-shadow: 0 16px 30px rgba(33, 55, 114, 0.06);
}

body.tests-projector-mode .answer-option.correct {
  background: rgba(72, 181, 37, 0.08);
  border-color: #48b525;
}

body.tests-projector-mode .answer-option.correct .answer-number,
body.tests-projector-mode .answer-number.correct-mark {
  background: #48b525;
  border-color: #48b525;
  color: #fff;
}

body.tests-projector-mode .answer-option.incorrect {
  background: rgba(250, 94, 47, 0.08);
  border-color: #fa5e2f;
}

body.tests-projector-mode .answer-option.incorrect .answer-number {
  background: #fa5e2f;
  border-color: #fa5e2f;
  color: #fff;
}

body.tests-projector-mode .answer-option.answer-option--feedback-correct {
  box-shadow: 0 0 0 2px rgba(72, 181, 37, 0.18), 0 10px 24px rgba(72, 181, 37, 0.12);
}

body.tests-projector-mode .answer-option.answer-option--feedback-incorrect {
  box-shadow: 0 0 0 2px rgba(250, 94, 47, 0.16), 0 10px 24px rgba(250, 94, 47, 0.1);
}

body.tests-projector-mode .answer-text {
  font-size: clamp(18px, 1.45vw, 24px);
  line-height: 1.35;
}

body.tests-projector-mode #navigation-buttons {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(129, 149, 194, 0.2);
  border-radius: 22px;
  bottom: clamp(18px, 2.2vw, 30px);
  box-shadow: 0 18px 34px rgba(34, 57, 118, 0.12);
  display: flex;
  left: clamp(18px, 2.2vw, 30px);
  margin-top: 0;
  padding: 12px;
  position: fixed;
  width: min(720px, calc(100vw - var(--projector-safe-width) - clamp(60px, 8vw, 120px)));
  z-index: 65;
}

body.tests-projector-mode .tests-init__nav-btn,
body.tests-projector-mode #prev-btn,
body.tests-projector-mode #next-btn,
body.tests-projector-mode #finish-btn {
  border-radius: 16px;
  font-size: 16px;
  min-height: 56px;
}

body.tests-projector-mode #prev-btn,
body.tests-projector-mode #next-btn {
  width: 100%;
}

body.tests-projector-mode #next-btn {
  margin-left: 0;
}

body.tests-projector-mode .test-results-modal__dialog {
  transform: translateX(calc(var(--projector-safe-width, 0px) * -0.12));
}

body.tests-minimal-mode {
  --minimal-shell-pad: clamp(18px, 2.8vw, 34px);
  background: linear-gradient(180deg, #fdfcfb 0%, #f6f5f3 100%);
  overflow-x: hidden;
}

body.tests-minimal-mode .client-layout__chrome,
body.tests-minimal-mode .client-layout__footer,
body.tests-minimal-mode #cookie-banner,
body.tests-minimal-mode #tests-premium-modal {
  display: none !important;
}

body.tests-minimal-mode .client-layout__main {
  padding: 0;
}

body.tests-minimal-mode #test-view,
body.tests-minimal-mode #loading-state,
body.tests-minimal-mode #error-state {
  margin: 0;
  max-width: none;
  min-height: 100vh;
  padding: var(--minimal-shell-pad);
}

body.tests-minimal-mode #test-view {
  display: flex;
  flex-direction: column;
}

body.tests-minimal-mode .tests-init__question-strip {
  background: transparent;
  border: 0;
  box-shadow: none;
  margin-bottom: 0;
  min-height: 0;
  padding: 0;
}

body.tests-minimal-mode .tests-init__question-strip-main {
  display: none;
}

body.tests-minimal-mode .tests-init__question-strip-close {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
  left: clamp(18px, 2.8vw, 34px);
  padding: 10px;
  position: fixed;
  top: clamp(18px, 2.8vw, 34px);
  width: auto;
  z-index: 70;
}

body.tests-minimal-mode .tests-dashboard__logo.tests-init__minimal-brand {
  align-items: center;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
  color: #111827;
  display: inline-flex;
  gap: 10px;
  max-width: min(420px, calc(100vw - 260px));
  padding: 10px 14px;
  position: fixed;
  right: clamp(18px, 2.8vw, 34px);
  text-decoration: none;
  top: clamp(18px, 2.8vw, 34px);
  z-index: 69;
}

body.tests-minimal-mode .tests-init__minimal-brand .tests-dashboard__logo-image {
  height: 24px;
}

body.tests-minimal-mode .tests-init__minimal-brand .tests-dashboard__logo-copy {
  font-size: 15px;
  gap: 8px;
  max-width: 100%;
  overflow: hidden;
}

body.tests-minimal-mode .tests-init__minimal-brand .tests-dashboard__logo-primary,
body.tests-minimal-mode .tests-init__minimal-brand .tests-dashboard__logo-secondary {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.tests-minimal-mode .tests-init__minimal-brand .tests-dashboard__logo-secondary {
  font-size: 0.92em;
}

body.tests-minimal-mode .tests-init__card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 28px;
  box-sizing: border-box;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.06);
  display: grid;
  flex: 1;
  gap: 22px 28px;
  grid-template-columns: minmax(240px, 280px) minmax(0, 1.25fr);
  grid-template-rows: auto minmax(0, 1fr);
  height: calc(100vh - clamp(36px, 5.6vw, 68px));
  padding: clamp(72px, 9vh, 110px) clamp(22px, 2vw, 30px) 24px;
}

body.tests-minimal-mode #question-header {
  display: block;
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  min-width: 0;
}

body.tests-minimal-mode .tests-init__question-head-main {
  display: flex;
  flex-direction: column;
}

body.tests-minimal-mode #question-text {
  font-size: calc(clamp(27px, 2.6vw, 40px) * var(--minimal-type-scale, 1));
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.14;
  margin: 0;
  max-width: none;
  min-height: 0;
  text-align: left;
}

body.tests-minimal-mode #question-title,
body.tests-minimal-mode #progress-bar-container,
body.tests-minimal-mode .tests-init__answers-title {
  display: none !important;
}

body.tests-minimal-mode #progress-info {
  align-self: flex-start;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
  order: -1;
}

body.tests-minimal-mode #question-counter {
  background: #f7f4ed;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 999px;
  color: #5f6b84;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  padding: 10px 14px;
}

body.tests-minimal-mode .tests-init__font-controls {
  align-items: center;
  background: #f7f4ed;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 999px;
  display: inline-flex;
  gap: 2px;
  padding: 4px;
}

body.tests-minimal-mode .tests-init__font-control-btn {
  color: #5f6b84;
  height: 32px;
  min-width: 38px;
  padding: 0 11px;
}

body.tests-minimal-mode .tests-init__minimal-font-controls-slot {
  display: flex;
  justify-content: flex-start;
  margin-top: auto;
  padding-top: 2px;
}

body.tests-minimal-mode .tests-init__minimal-font-controls-slot:empty {
  display: none;
}

body.tests-minimal-mode #test-progress-text {
  display: none !important;
}

body.tests-minimal-mode .tests-init__question-actions {
  display: none;
}

body.tests-minimal-mode .tests-init__content {
  display: contents;
}

body.tests-minimal-mode .tests-init__media-column {
  background: #fdfcfb;
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 20px;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  grid-column: 1;
  grid-row: 1 / span 2;
  min-height: 0;
  overflow: auto;
  padding: 16px;
}

body.tests-minimal-mode .tests-init__side-tools-slot:empty,
body.tests-minimal-mode #answer-hint-slot:empty {
  display: none;
}

body.tests-minimal-mode .tests-init__side-tools-slot {
  display: grid;
  gap: 12px;
}

body.tests-minimal-mode #theory-btn {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  color: #111827;
  font-size: 16px;
  font-weight: 500;
  justify-content: flex-start;
  min-height: 60px;
  padding: 14px 18px;
  width: 100%;
}

body.tests-minimal-mode #theory-btn::before {
  opacity: 0.7;
}

body.tests-minimal-mode #theory-btn.is-on {
  background: #111827;
  border-color: #111827;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  color: #fff;
}

body.tests-minimal-mode #theory-btn.is-on::after {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}

body.tests-minimal-mode .tests-init__answers-column {
  display: grid;
  gap: 8px;
  grid-column: 2;
  grid-row: 2;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
  overflow: hidden;
  width: 100%;
}

body.tests-minimal-mode #question-image {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  margin: 0;
  max-height: min(38vh, 320px);
  width: 100%;
}

body.tests-minimal-mode #question-image.is-interactive {
  cursor: zoom-in;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}

body.tests-minimal-mode #question-image.is-interactive:hover {
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.14);
  transform: translateY(-1px);
}

body.tests-minimal-mode #question-image.is-interactive:focus-visible {
  outline: 2px solid rgba(60, 135, 255, 0.72);
  outline-offset: 3px;
}

body.tests-minimal-image-lightbox-open {
  overflow: hidden;
}

body.tests-minimal-mode .answer-hint,
body.tests-minimal-mode #explanation-container {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 16px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.04);
  margin-top: 0;
  padding: 16px 18px;
}

body.tests-minimal-mode .answer-hint::before,
body.tests-minimal-mode #explanation-container h4 {
  color: #5f6b84;
  display: block;
  font-family: "Poppins", sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1;
  margin: 0 0 12px;
  text-transform: uppercase;
}

body.tests-minimal-mode .answer-hint::before {
  content: attr(data-card-title);
}

body.tests-minimal-mode #explanation-content,
body.tests-minimal-mode .answer-hint {
  font-size: 16px;
  line-height: 1.62;
  overflow: auto;
}

body.tests-minimal-mode #answers-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

body.tests-minimal-mode .answer-option {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 18px;
  box-shadow: none;
  column-gap: 16px;
  grid-template-columns: 46px minmax(0, 1fr);
  min-height: 0;
  padding: 10px 12px;
}

body.tests-minimal-mode .answer-option:hover {
  background: rgba(53, 89, 184, 0.05);
  box-shadow: none;
  transform: none;
}

body.tests-minimal-mode .answer-number {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  color: #4b5563;
  font-size: 20px;
  font-weight: 600;
  height: 50px;
  width: 50px;
}

body.tests-minimal-mode .answer-text {
  font-size: calc(clamp(23px, 1.85vw, 32px) * var(--minimal-type-scale, 1));
  line-height: 1.28;
}

body.tests-minimal-mode .answer-option.selected {
  background: rgba(60, 135, 255, 0.08);
  border-color: #3c87ff;
}

body.tests-minimal-mode .answer-option.correct {
  background: rgba(72, 181, 37, 0.08);
  border-color: #48b525;
}

body.tests-minimal-mode .answer-option.correct .answer-number,
body.tests-minimal-mode .answer-number.correct-mark {
  background: #48b525;
  border-color: #48b525;
  color: #fff;
}

body.tests-minimal-mode .answer-option.incorrect {
  background: rgba(250, 94, 47, 0.08);
  border-color: #fa5e2f;
}

body.tests-minimal-mode .answer-option.incorrect .answer-number {
  background: #fa5e2f;
  border-color: #fa5e2f;
  color: #fff;
}

body.tests-minimal-mode #navigation-buttons {
  align-items: stretch;
  background: linear-gradient(180deg, rgba(245, 242, 234, 0) 0%, rgba(245, 242, 234, 0.92) 36%, rgba(245, 242, 234, 0.98) 100%);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  margin-top: 0;
  padding-top: 14px;
  position: relative;
  z-index: 2;
}

body.tests-minimal-mode .tests-init__nav-btn,
body.tests-minimal-mode #prev-btn,
body.tests-minimal-mode #next-btn,
body.tests-minimal-mode #finish-btn {
  border-radius: 18px;
  font-size: 19px;
  min-height: 62px;
  width: 100%;
}

@media (max-width: 1380px) {
  body.tests-projector-mode .tests-init__answers-column {
    padding-right: calc(var(--projector-safe-width) * 0.72);
  }
}

@media (max-width: 1200px) {
  #test-view {
    padding: 0 12px 16px;
  }

  #loading-state {
    padding: 0 12px 16px;
  }

  .tests-init__content {
    flex-direction: column;
  }

  .tests-init-skeleton__content {
    flex-direction: column;
  }

  .tests-init__media-column {
    flex: 1;
    max-width: none;
  }

  .tests-init-skeleton__image {
    flex: 1;
    max-width: none;
  }

  #question-image {
    max-height: 420px;
  }

  body.tests-projector-mode {
    --projector-safe-width: clamp(180px, 16vw, 260px);
    --projector-safe-height: clamp(120px, 17vh, 180px);
  }

  body.tests-projector-mode .tests-init__content {
    grid-template-columns: minmax(0, 1fr);
  }

  body.tests-projector-mode .tests-init__answers-column {
    padding-right: calc(var(--projector-safe-width) + 8px);
  }

  body.tests-projector-mode.tests-presentation-theory-open #question-image {
    max-height: min(30vh, 300px);
  }

  body.tests-projector-mode.tests-presentation-theory-open #explanation-container {
    max-height: min(26vh, 280px);
  }
}

@media (max-width: 900px) {
  .tests-init__question-strip,
  .tests-init__card {
    border-radius: 12px;
    padding: 16px;
  }

  .tests-init__question-batches {
    gap: 6px;
  }

  .question-batch-btn {
    height: 28px;
    padding: 0 10px;
  }

  #question-header {
    flex-wrap: wrap;
    gap: 14px;
  }

  .tests-init-skeleton__question-strip,
  .tests-init-skeleton__card {
    border-radius: 12px;
    padding: 16px;
  }

  .tests-init-skeleton__header {
    flex-wrap: wrap;
    gap: 14px;
  }

  .tests-init-skeleton__title-block {
    flex-basis: calc(100% - 54px);
  }

  .tests-init-skeleton__header-actions {
    width: 100%;
  }

  .tests-init-skeleton__action {
    width: 100%;
  }

  .tests-init__question-actions {
    width: 100%;
  }

  .tests-init__question-strip-close {
    width: 100%;
  }

  .tests-init__mode-toggle {
    flex: 0 0 40px;
  }

  #theory-btn,
  #translate-btn {
    flex: 1;
  }

  body.tests-projector-mode {
    --projector-safe-width: 0px;
    --projector-safe-height: 0px;
  }

  body.tests-projector-mode #test-view {
    padding-bottom: calc(112px + env(safe-area-inset-bottom));
  }

  body.tests-projector-mode .tests-init__question-strip {
    top: 10px;
  }

  body.tests-projector-mode .tests-init__answers-column {
    padding-bottom: 0;
    padding-right: 0;
  }

  body.tests-projector-mode #question-text {
    font-size: clamp(24px, 5.4vw, 32px);
  }

  body.tests-projector-mode.tests-presentation-theory-open #question-image {
    max-height: min(26vh, 220px);
  }

  body.tests-projector-mode.tests-presentation-theory-open #explanation-container {
    max-height: min(24vh, 220px);
  }

  body.tests-projector-mode #navigation-buttons {
    border-radius: 14px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    display: grid;
    left: 12px;
    padding: 8px;
    width: calc(100vw - 24px);
  }

  body.tests-projector-mode .tests-dashboard__logo.tests-init__projector-brand {
    left: 10px;
    max-width: calc(100% - 20px);
    top: 10px;
  }

  body.tests-projector-mode .tests-init__projector-brand .tests-dashboard__logo-copy {
    font-size: 13px;
    gap: 6px;
  }

  body.tests-minimal-mode #test-view {
    padding-bottom: 12px;
  }

  body.tests-minimal-mode .tests-init__question-strip-close {
    left: 12px;
    padding: 8px;
    top: 12px;
    width: auto;
  }

  body.tests-minimal-mode .tests-dashboard__logo.tests-init__minimal-brand {
    max-width: calc(100vw - 164px);
    padding: 9px 12px;
    right: 12px;
    top: 12px;
  }

  body.tests-minimal-mode .tests-init__minimal-brand .tests-dashboard__logo-copy {
    font-size: 13px;
    gap: 6px;
  }

  body.tests-minimal-mode .tests-init__card {
    gap: 16px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    height: auto;
    min-height: auto;
    padding: 68px 16px 16px;
  }

  body.tests-minimal-mode #question-header {
    grid-column: 1;
    grid-row: 1;
  }

  body.tests-minimal-mode .tests-init__media-column {
    grid-column: 1;
    grid-row: 2;
    overflow: visible;
  }

  body.tests-minimal-mode .tests-init__answers-column {
    grid-column: 1;
    grid-row: 3;
    min-height: auto;
  }

  body.tests-minimal-mode #question-text {
    font-size: calc(clamp(26px, 6.8vw, 34px) * var(--minimal-type-scale, 1));
    max-width: none;
  }

  body.tests-minimal-mode #progress-info {
    margin-bottom: 12px;
  }

  body.tests-minimal-mode #question-counter {
    font-size: 13px;
    padding: 9px 12px;
  }

  body.tests-minimal-mode .tests-init__font-control-btn {
    font-size: 11px;
    height: 30px;
    min-width: 34px;
    padding: 0 10px;
  }

  body.tests-minimal-mode #question-image {
    max-height: min(28vh, 220px);
  }

  .tests-minimal-image-lightbox__dialog,
  .tests-minimal-image-lightbox__image {
    max-height: calc(100vh - 24px);
    max-width: calc(100vw - 24px);
  }

  .tests-minimal-image-lightbox__close {
    font-size: 24px;
    height: 40px;
    right: 10px;
    top: 10px;
    width: 40px;
  }

  body.tests-minimal-mode .answer-option {
    grid-template-columns: 42px minmax(0, 1fr);
    padding: 8px 6px;
  }

  body.tests-minimal-mode .answer-number {
    font-size: 20px;
    height: 46px;
    width: 46px;
  }

  body.tests-minimal-mode .answer-text {
    font-size: calc(20px * var(--minimal-type-scale, 1));
  }

  body.tests-minimal-mode .answer-hint,
  body.tests-minimal-mode #explanation-container {
    padding: 16px;
  }

  body.tests-minimal-mode #navigation-buttons {
    gap: 10px;
    margin-top: 14px;
    padding-top: 4px;
    position: static;
  }

  #test-view.has-translate-btn {
    padding-bottom: calc(126px + env(safe-area-inset-bottom));
  }

  #translate-btn {
    align-items: center;
    background: rgba(132, 146, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.52);
    border-radius: 999px;
    bottom: calc(22px + env(safe-area-inset-bottom));
    box-shadow: 0 12px 34px rgba(47, 34, 173, 0.36), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    color: #10273e;
    display: inline-flex;
    font-size: 14px;
    gap: 8px;
    height: 62px;
    justify-content: flex-start;
    left: 50%;
    min-height: 62px;
    min-width: 164px;
    padding: 0 18px;
    position: fixed;
    transform: translateX(-50%);
    width: 164px;
    z-index: 50;
  }

  #translate-btn.is-locked,
  #translate-btn.is-locked:active,
  #translate-btn.is-locked.is-pressed {
    animation: none;
    background: rgba(245, 243, 241, 0.98);
    border: 1px solid #dedede;
    box-shadow: 0 10px 24px rgba(17, 17, 17, 0.18);
    color: #2b2f36;
    transform: translateX(-50%);
  }

  #translate-btn.is-locked::after,
  #translate-btn.is-locked:active::after,
  #translate-btn.is-locked.is-pressed::after {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(232, 232, 232, 0.5));
    border-color: rgba(255, 255, 255, 0.4);
    inset: 8px;
  }

  #translate-btn.is-locked .translate-btn__ripple {
    display: none;
  }

  #translate-btn.is-locked .translate-btn__label,
  #translate-btn.is-locked:active .translate-btn__label,
  #translate-btn.is-locked.is-pressed .translate-btn__label {
    max-width: 120px;
    opacity: 1;
    transform: none;
  }

  #translate-btn.is-locked .translate-btn__icon,
  #translate-btn.is-locked:active .translate-btn__icon,
  #translate-btn.is-locked.is-pressed .translate-btn__icon {
    left: 18px;
    transform: translateY(-50%);
  }

  #translate-btn .translate-btn__icon {
    background-size: 24px 24px;
    left: 18px;
    height: 24px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
  }

  #translate-btn .translate-btn__label {
    margin-left: 34px;
  }

  #translate-btn .translate-btn__ripple {
    border-color: rgba(166, 225, 255, 0.76);
    height: 24px;
    left: 30px;
    width: 24px;
  }

  #translate-btn::after {
    background: linear-gradient(180deg, rgba(173, 185, 255, 0.44), rgba(126, 136, 255, 0.5));
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    content: "";
    inset: 8px;
    position: absolute;
    z-index: -1;
  }

  #translate-btn.is-pressed,
  #translate-btn:active {
    animation: translate-btn-hold-pulse 0.95s ease-in-out infinite alternate;
    background: rgba(109, 189, 255, 0.42);
    border-color: rgba(219, 243, 255, 0.86);
    box-shadow: 0 8px 20px rgba(45, 151, 234, 0.36), inset 0 0 0 1px rgba(255, 255, 255, 0.28);
    transform: translateX(-50%) scale(0.97);
  }

  #translate-btn.is-pressed .translate-btn__icon,
  #translate-btn:active .translate-btn__icon {
    left: 50%;
    transform: translate(-50%, -50%) scale(1.1);
  }

  #translate-btn.is-pressed .translate-btn__label,
  #translate-btn:active .translate-btn__label {
    max-width: 0;
    opacity: 0;
    transform: translateX(10px) scaleX(0.8);
  }

  #translate-btn.is-pressed .translate-btn__ripple,
  #translate-btn:active .translate-btn__ripple {
    animation: translate-btn-wave 1.18s cubic-bezier(0.18, 0.72, 0.22, 1) infinite;
    left: 50%;
  }

  #translate-btn.is-pressed .translate-btn__ripple--two,
  #translate-btn:active .translate-btn__ripple--two {
    animation-delay: 0.38s;
  }

  #translate-btn.is-pressed::after,
  #translate-btn:active::after {
    inset: 10px;
  }

  #navigation-buttons {
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #e4e6eb;
    border-radius: 14px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    margin-top: 16px;
    padding: 8px;
    position: sticky;
    z-index: 45;
  }

  #test-view.has-translate-btn #navigation-buttons {
    bottom: calc(102px + env(safe-area-inset-bottom));
  }

  .tests-init-skeleton__nav-row {
    flex-wrap: wrap;
  }

  #prev-btn,
  #next-btn {
    width: 100%;
  }

  .tests-init-skeleton__nav-btn {
    width: 100%;
  }

  #next-btn {
    margin-left: 0;
  }

  .tests-init-skeleton__nav-row .tests-init-skeleton__nav-btn:last-child {
    margin-left: 0;
  }
}

@media (max-width: 640px) {
  #question-text {
    font-size: 18px;
    line-height: 22px;
    /* Keep two-line height on small screens as well */
    min-height: 44px;
  }

  .answer-option {
    column-gap: 12px;
    grid-template-columns: 40px minmax(0, 1fr);
    min-height: auto;
    padding: 14px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .answer-option,
  .answer-option:hover,
  .answer-option.answer-option--feedback,
  .answer-option.answer-option--reveal-correct,
  .answer-number.correct-mark,
  .answer-hint.visible {
    animation: none !important;
    box-shadow: none !important;
    transform: none !important;
    transition: border-color 0.01ms linear, background-color 0.01ms linear !important;
  }
}
