/* Адаптация банка литературы под дизайн-систему Logilea */
.lit-ege-page {
  --lit-accent: var(--accent-color, #707dff);
  --lit-accent-soft: var(--accent-soft, #eef0ff);
  --lit-card-bg: var(--card-bg, #fff);
  --lit-text: var(--text-primary, #252936);
  --lit-text-muted: var(--text-secondary, #858a9b);
  color: var(--lit-text);
}

.lit-ege-exam-btn.is-primary,
.lit-ege-exam-btn:not(.is-ghost):not(.lit-ege-header-favorites) {
  background: var(--lit-accent);
  border-color: var(--lit-accent);
}

.lit-ege-task-card,
.lit-ege-hero,
.lit-ege-filter-panel,
.lit-ege-topic-card,
.lit-ege-division-card {
  background: var(--lit-card-bg);
  border-color: var(--card-border, #eceef4);
}

.lit-ege-back-btn {
  background: var(--lit-card-bg);
  color: var(--lit-text);
}

/* Modern Logilea presentation for the literature bank and standalone tasks. */
.lit-ege-page--bank,
.lit-ege-page--task-detail {
  --lit-line: rgba(112, 125, 255, .14);
  --lit-shadow: 0 12px 36px rgba(54, 61, 107, .07);
  --lit-radius-lg: 30px;
  --lit-radius-md: 22px;
  width: 100%;
  max-width: none;
  margin: 0;
}

.lit-ege-page--bank .lit-ege-header-bar,
.lit-ege-page--task-detail .lit-ege-header-bar {
  align-items: center;
  margin-bottom: 24px;
}

.lit-ege-page--bank .lit-ege-header-bar .lit-ege-back-btn,
.lit-ege-page--task-detail .lit-ege-header-bar .lit-ege-back-btn {
  height: 50px;
  min-height: 50px;
  padding: 0 28px 0 18px;
  box-sizing: border-box;
  font-size: 1.15rem;
}

.lit-ege-page--bank .lit-ege-header-bar .lit-ege-exam-btn,
.lit-ege-page--task-detail .lit-ege-header-bar .lit-ege-exam-btn {
  height: 50px;
  min-height: 50px;
  padding: 0 28px;
  border: 2px solid transparent;
  box-sizing: border-box;
  font-size: 1.15rem;
  line-height: 1;
}

.lit-ege-page--bank .lit-ege-header-bar .lit-ege-exam-btn.is-ghost,
.lit-ege-page--task-detail .lit-ege-header-bar .lit-ege-exam-btn.is-ghost {
  border-color: var(--lit-accent);
}

.lit-ege-page--bank .lit-ege-header-bar .lit-ege-header-favorites.is-active,
.lit-ege-page--task-detail .lit-ege-header-bar .lit-ege-header-favorites.is-active {
  border-color: var(--color-strawberry);
}

.lit-ege-page--bank .lit-ege-back-btn,
.lit-ege-page--task-detail .lit-ege-back-btn {
  min-height: 48px;
  box-sizing: border-box;
  border: 1px solid rgba(18, 19, 26, .05);
  box-shadow: 0 4px 14px rgba(18, 19, 26, .04);
}

.lit-ege-page--bank .lit-ege-exam-btn,
.lit-ege-page--task-detail .lit-ege-exam-btn {
  min-height: 48px;
  padding: 11px 22px;
  border-width: 1.5px;
  box-shadow: none;
}

.lit-ege-page--bank .lit-ege-hero {
  padding: clamp(36px, 5vw, 64px) 32px;
  border: 1px solid rgba(112, 125, 255, .12);
  border-radius: 34px;
  background:
    radial-gradient(circle at 12% 20%, rgba(203, 251, 0, .18), transparent 28%),
    radial-gradient(circle at 90% 15%, rgba(112, 125, 255, .22), transparent 30%),
    linear-gradient(145deg, #fbfbff 0%, #f1f3ff 100%);
  box-shadow: var(--lit-shadow);
}

.lit-ege-page--bank .lit-ege-hero::after {
  position: absolute;
  right: -54px;
  bottom: -78px;
  width: 230px;
  height: 230px;
  border: 32px solid rgba(112, 125, 255, .07);
  border-radius: 50%;
  content: '';
}

.lit-ege-page--bank .lit-ege-hero-inner {
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.lit-ege-page--bank .lit-ege-hero-title {
  font-family: 'Comfortaa', 'Manrope', sans-serif;
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 600;
  letter-spacing: -.035em;
  text-align: center;
}

.lit-ege-page--bank .lit-ege-hero-desc {
  max-width: 720px;
  margin: 0 auto;
  color: #686e80;
  text-align: center;
}

.lit-ege-page--bank .lit-ege-hero-btns {
  width: 100%;
  margin-top: 28px;
  gap: 16px;
  align-items: center;
  justify-content: center;
}

.lit-ege-page--bank .lit-ege-hero-btn {
  min-width: 230px;
  min-height: 52px;
  padding: 13px 30px;
  border-radius: 999px;
  font-size: 16.5px;
}

.lit-ege-page--bank .lit-ege-hero-btn.primary {
  background: var(--lit-accent);
  box-shadow: 0 8px 22px rgba(112, 125, 255, .2);
}

.lit-ege-page--bank .lit-ege-hero-btn.secondary {
  border-color: var(--lit-accent);
  color: var(--lit-accent);
}

.lit-ege-page--bank .lit-ege-search-section {
  margin: 24px 0 30px;
}

.lit-ege-page--bank .lit-ege-search-row {
  gap: 18px;
}

.lit-ege-page--bank .lit-ege-search-card {
  padding: 24px;
  border: 1px solid var(--lit-line);
  border-radius: var(--lit-radius-md);
  box-shadow: 0 8px 26px rgba(54, 61, 107, .045);
}

.lit-ege-page--bank .lit-ege-search-card h3 {
  color: var(--lit-text);
  font-size: 19px;
  font-weight: 700;
}

.lit-ege-page--bank .lit-ege-search-card p {
  min-height: 46px;
  color: var(--lit-text-muted);
}

.lit-ege-page--bank .lit-ege-search-input-row input,
.lit-ege-page--bank .lit-ege-filter-select,
.lit-ege-page--bank .lit-ege-filter-input {
  min-height: 48px;
  border: 1.5px solid #e4e6ee;
  border-radius: 15px;
  background-color: #fafbfe;
}

.lit-ege-page--bank .lit-ege-search-input-row input:focus,
.lit-ege-page--bank .lit-ege-filter-select:focus,
.lit-ege-page--bank .lit-ege-filter-input:focus {
  border-color: var(--lit-accent);
  box-shadow: 0 0 0 4px rgba(112, 125, 255, .1);
}

.lit-ege-page--bank .lit-ege-search-go {
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 15px;
  background: var(--lit-accent);
}

.lit-ege-page--bank .lit-ege-tabs-row {
  margin: 0 0 18px;
}

.lit-ege-page--bank .lit-ege-tabs {
  gap: 8px;
}

.lit-ege-page--bank .lit-ege-tab {
  min-height: 48px;
  padding: 12px 27px;
  border: 1.5px solid #e5e7eb;
  border-radius: 999px;
  color: #9297a6;
  background: #fff;
  font-size: 16.5px;
  font-weight: 500;
  box-shadow: none;
  transition: color .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.lit-ege-page--bank .lit-ege-tab:hover:not(.is-active) {
  border-color: rgba(112, 125, 255, .6);
  color: #707dff;
  background: #f6f7ff;
  box-shadow: 0 5px 14px rgba(74, 86, 190, .09);
  transform: translateY(-1px);
}

.lit-ege-page--bank .lit-ege-tab.is-active {
  padding: 12px 27px;
  border-width: 1.5px;
  border-color: #707dff;
  color: #707dff;
  background: #fff;
  font-weight: 500;
  box-shadow: 0 5px 15px rgba(112, 125, 255, .1);
}

.lit-ege-page--bank .lit-ege-tab-panel {
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid rgba(112, 125, 255, .1);
  border-radius: var(--lit-radius-lg);
  box-shadow: var(--lit-shadow);
}

.lit-ege-page--bank .lit-ege-tasks-layout {
  grid-template-columns: minmax(0, 1fr) minmax(270px, 330px);
  gap: 24px;
}

.lit-ege-page--bank .lit-ege-tasks-filters {
  top: 20px;
  padding: 20px;
  border: 1px solid var(--lit-line);
  border-radius: 20px;
  background: linear-gradient(145deg, #f8f9ff, #fff);
}

.lit-ege-page--bank .lit-ege-filter-label {
  color: #858a9b;
  letter-spacing: .045em;
}

.lit-ege-page--bank .lit-ege-filter-apply,
.lit-ege-page--bank .lit-ege-filter-clear {
  min-height: 46px;
  border-radius: 14px;
  letter-spacing: 0;
  text-transform: none;
}

.lit-ege-page--bank .lit-ege-filter-apply {
  background: var(--lit-accent);
}

.lit-ege-page--bank .lit-ege-task-cards {
  gap: 16px;
}

.lit-ege-page--bank .lit-ege-task-card,
.lit-ege-page--task-detail .lit-ege-task-card {
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--lit-line);
  border-radius: 26px;
  box-shadow: 0 8px 28px rgba(54, 61, 107, .055);
}

.lit-ege-page--bank .lit-ege-badge,
.lit-ege-page--task-detail .lit-ege-badge {
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 13px;
}

.lit-ege-page--bank .lit-ege-task-card-title,
.lit-ege-page--task-detail .lit-ege-task-card-title {
  color: #777d8f;
}

.lit-ege-page--bank .lit-ege-task-question-plate,
.lit-ege-page--task-detail .lit-ege-task-question-plate {
  border: 1px solid rgba(112, 125, 255, .2);
  border-radius: 18px;
  background: linear-gradient(140deg, #f1f3ff 0%, #fafaff 100%);
  box-shadow: none;
}

.lit-ege-page--bank .lit-ege-task-question-plate-label,
.lit-ege-page--task-detail .lit-ege-task-question-plate-label {
  color: var(--lit-accent);
}

.lit-ege-page--bank .lit-ege-task-question-plate-text,
.lit-ege-page--task-detail .lit-ege-task-question-plate-text {
  color: #30344d;
}

.lit-ege-page--bank .lit-ege-list-cards > li {
  padding: 16px 18px;
  border: 1px solid var(--lit-line);
  border-radius: 20px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.lit-ege-page--bank .lit-ege-list-cards > li:hover {
  border-color: rgba(112, 125, 255, .3);
  box-shadow: 0 8px 22px rgba(54, 61, 107, .06);
  transform: translateY(-2px);
}

.lit-ege-page--task-detail {
  max-width: none;
}

.lit-ege-page--task-detail .lit-ege-task-detail-wrap {
  max-width: none;
  padding: 0;
  margin-bottom: 36px;
}

.lit-ege-page--task-detail .lit-ege-task-card {
  border-radius: 30px;
}

.lit-ege-page--task-detail .lit-ege-task-response {
  margin-top: 22px;
  padding: 24px;
  border: 0;
  border-radius: 20px;
  background: #f8f9fc;
}

.lit-ege-page--bank .lit-ege-answer-input,
.lit-ege-page--bank .lit-ege-answer-textarea,
.lit-ege-page--task-detail .lit-ege-answer-input,
.lit-ege-page--task-detail .lit-ege-answer-textarea {
  border: 1.5px solid #e1e4ed;
  background: #fff;
}

.lit-ege-page--bank .lit-ege-answer-submit,
.lit-ege-page--task-detail .lit-ege-answer-submit {
  min-height: 48px;
  border-radius: 15px;
  background: var(--lit-accent);
}

.lit-ege-page--bank .lit-ege-modal,
.lit-ege-page--task-detail .lit-ege-modal {
  border-radius: 26px;
  box-shadow: 0 24px 70px rgba(18, 19, 26, .2);
}

#litExamSlotManageModal .lit-ege-modal {
  padding: 32px;
  box-sizing: border-box;
}

#litExamSlotManageModal .lit-ege-modal h2 {
  margin: 0 0 24px;
}

#litExamSlotManageModal .lit-ege-modal > .lit-ege-empty {
  margin: 0 0 18px !important;
  line-height: 1.55;
}

#litExamSlotsSortList {
  margin-bottom: 0;
  gap: 12px;
}

#litExamSlotManageModal .lit-exam-slot-actions {
  position: sticky;
  bottom: -1px;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  margin-top: 24px;
  padding-top: 14px;
  background: #fff;
}

#litExamSlotManageModal .lit-exam-slot-actions .lit-ege-exam-btn {
  width: 100%;
  min-width: 0;
  height: 56px;
  min-height: 56px;
  padding: 0 24px;
  border: 2px solid #707dff;
  border-radius: 18px;
  box-sizing: border-box;
  font-size: 17px;
  font-weight: 500;
}

#litExamSlotManageModal #litSaveExamSlotOrder {
  background: #707dff !important;
  color: #fff !important;
}

#litExamSlotManageModal #litOpenAddExamSlotForm {
  background: #fff !important;
  color: #707dff !important;
}

#litExamSlotManageModal #litSaveExamSlotOrder:hover {
  background: #626ff0 !important;
}

#litExamSlotManageModal #litOpenAddExamSlotForm:hover {
  background: #fff !important;
  border-color: #5967e8;
  color: #5967e8 !important;
}

html[data-theme="dark"] .lit-ege-page--bank .lit-ege-hero {
  background: linear-gradient(145deg, #20212a, #181920);
  border-color: var(--card-border);
}

html[data-theme="dark"] .lit-ege-page--bank .lit-ege-hero-title {
  color: var(--text-primary);
}

html[data-theme="dark"] .lit-ege-page--bank .lit-ege-tab.is-active {
  color: #8f99ff;
  border-color: #8f99ff;
  background: var(--card-bg);
}

html[data-theme="dark"] .lit-ege-page--bank .lit-ege-tab-panel,
html[data-theme="dark"] .lit-ege-page--bank .lit-ege-search-card,
html[data-theme="dark"] .lit-ege-page--bank .lit-ege-task-card,
html[data-theme="dark"] .lit-ege-page--task-detail .lit-ege-task-card {
  background: var(--card-bg);
  border-color: var(--card-border);
}

@media (max-width: 960px) {
  .lit-ege-page--bank .lit-ege-tasks-layout {
    grid-template-columns: 1fr;
  }

  .lit-ege-page--bank .lit-ege-tasks-filters {
    position: static;
    order: -1;
  }
}

@media (max-width: 720px) {
  .lit-ege-page--bank .lit-ege-header-actions,
  .lit-ege-page--task-detail .lit-ege-header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .lit-ege-page--bank .lit-ege-search-row {
    flex-direction: column;
  }

  .lit-ege-page--bank .lit-ege-search-card p {
    min-height: 0;
  }

  .lit-ege-page--bank .lit-ege-search-input-row {
    align-items: stretch;
    flex-direction: column;
  }

  .lit-ege-page--bank .lit-ege-tab-panel,
  .lit-ege-page--bank .lit-ege-task-card,
  .lit-ege-page--task-detail .lit-ege-task-card {
    padding: 18px;
    border-radius: 22px;
  }

  .lit-ege-page--task-detail .lit-ege-task-response {
    padding: 18px;
  }
}

/* Compact controls and stable hover states. */
.lit-ege-page--bank .lit-ege-back-btn,
.lit-ege-page--task-detail .lit-ege-back-btn {
  min-height: 44px;
  padding-top: 9px;
  padding-bottom: 9px;
}

.lit-ege-page--bank .lit-ege-exam-btn,
.lit-ege-page--task-detail .lit-ege-exam-btn {
  min-height: 44px;
  padding: 9px 19px;
}

.lit-ege-page--bank .lit-ege-exam-btn:hover,
.lit-ege-page--task-detail .lit-ege-exam-btn:hover {
  filter: none;
  box-shadow: none;
}

.lit-ege-page--bank .lit-ege-exam-btn:not(.is-ghost):hover,
.lit-ege-page--task-detail .lit-ege-exam-btn:not(.is-ghost):hover {
  background: #626ff0;
}

.lit-ege-page--bank .lit-ege-hero {
  min-height: 270px;
  padding: clamp(44px, 4vw, 64px) 36px;
  box-sizing: border-box;
}

.lit-ege-page--bank .lit-ege-hero-btn {
  min-height: 52px;
  padding: 13px 30px;
}

.lit-ege-page--bank .lit-ege-hero-btn:hover:not(:disabled) {
  transform: none;
  box-shadow: none;
}

.lit-ege-page--bank .lit-ege-search-card {
  padding: 20px;
}

.lit-ege-page--bank .lit-ege-search-card p {
  min-height: 0;
  margin-bottom: 0;
}

.lit-ege-page--bank .lit-ege-search-input-row {
  margin-top: 12px;
  gap: 10px;
}

.lit-ege-page--bank .lit-ege-search-input-row input {
  height: 42px;
  min-height: 42px;
  padding: 8px 14px;
  border-radius: 12px;
  line-height: 1.25;
  box-sizing: border-box;
}

.lit-ege-page--bank .lit-ege-filter-select,
.lit-ege-page--bank .lit-ege-filter-input {
  min-height: 44px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.lit-ege-page--bank .lit-ege-search-go {
  height: 42px;
  min-height: 42px;
  padding: 8px 18px;
  border-radius: 12px;
}

.lit-ege-page--bank .lit-ege-search-go:hover:not(:disabled) {
  filter: none;
  background: #626ff0;
}

.lit-ege-page--bank .lit-ege-tab-panel {
  padding: clamp(20px, 2vw, 28px);
}

.lit-ege-page--bank .lit-ege-staff-btn {
  height: 50px;
  min-height: 50px;
  padding: 0 28px;
  border: 2px solid #707dff;
  border-radius: 25px;
  box-sizing: border-box;
  background: #fff;
  color: #707dff;
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1;
  box-shadow: none;
  transition: color .18s ease, border-color .18s ease;
}

.lit-ege-page--bank .lit-ege-staff-btn:hover,
.lit-ege-page--bank .lit-ege-staff-btn:focus-visible {
  border-color: #5967e8;
  background: #fff;
  color: #5967e8;
  box-shadow: none;
}

.lit-ege-page--bank .lit-ege-tasks-layout {
  grid-template-columns: minmax(0, 1fr) minmax(250px, 300px);
  gap: 20px;
}

.lit-ege-page--bank .lit-ege-tasks-filters {
  padding: 18px;
}

.lit-ege-page--bank .lit-ege-filter-apply,
.lit-ege-page--bank .lit-ege-filter-clear {
  min-height: 42px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.lit-ege-page--bank .lit-ege-filter-apply:hover {
  filter: none;
  background: #626ff0;
}

.lit-ege-page--bank .lit-ege-filter-clear:hover {
  border-color: #b8bdca;
  background: #f5f6fa;
}

.lit-ege-page--bank .lit-ege-task-card,
.lit-ege-page--task-detail .lit-ege-task-card {
  padding: clamp(18px, 2vw, 26px);
}

.lit-ege-page--bank .lit-ege-task-actions,
.lit-ege-page--task-detail .lit-ege-task-actions {
  gap: 8px;
}

.lit-ege-page--bank .lit-ege-task-fav,
.lit-ege-page--task-detail .lit-ege-task-fav,
.lit-ege-page--bank .lit-ege-task-report,
.lit-ege-page--task-detail .lit-ege-task-report {
  padding: 7px 10px;
  border-radius: 999px;
  text-decoration: none;
  transition: color .15s ease, background .15s ease;
}

.lit-ege-page--bank .lit-ege-task-fav:hover,
.lit-ege-page--task-detail .lit-ege-task-fav:hover {
  background: transparent !important;
  box-shadow: none !important;
  color: #5967e8;
}

.lit-ege-page--bank .lit-ege-task-fav.is-on,
.lit-ege-page--task-detail .lit-ege-task-fav.is-on {
  color: #d84d55;
}

.lit-ege-page--bank .lit-ege-task-fav.is-on:hover,
.lit-ege-page--task-detail .lit-ege-task-fav.is-on:hover {
  color: #c83f48;
  background: transparent !important;
  box-shadow: none !important;
}

.lit-ege-page--bank .lit-ege-task-fav.is-on .lit-ege-heart-ico path,
.lit-ege-page--task-detail .lit-ege-task-fav.is-on .lit-ege-heart-ico path {
  fill: currentColor;
  stroke: currentColor;
}

.lit-ege-page--bank .lit-ege-task-report:hover,
.lit-ege-page--task-detail .lit-ege-task-report:hover {
  background: #f1f2f6;
  color: #454b60;
}

.lit-ege-page--bank .lit-ege-list-cards > li:hover {
  transform: none;
}

.lit-ege-page--task-detail .lit-ege-task-response {
  padding: 20px;
}

.lit-ege-page--bank .lit-ege-answer-submit,
.lit-ege-page--task-detail .lit-ege-answer-submit {
  min-height: 42px;
  padding: 10px 18px;
  letter-spacing: 0;
  text-transform: none;
}

.lit-ege-page--bank .lit-ege-answer-submit:not(:disabled):hover,
.lit-ege-page--task-detail .lit-ege-answer-submit:not(:disabled):hover {
  filter: none;
  background: #626ff0;
}

.lit-ege-answer-reveal-toggle:hover,
.lit-ege-answer-reveal-toggle:focus-visible {
  color: #707dff;
  background: transparent !important;
  box-shadow: none !important;
  filter: none;
  transform: none;
}

.lit-ege-answer-reveal-toggle:hover .lit-ege-reveal-eye,
.lit-ege-answer-reveal-toggle:focus-visible .lit-ege-reveal-eye {
  color: currentColor;
}

@media (min-width: 1440px) {
  .lit-ege-page--bank .lit-ege-tasks-layout {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 390px);
    gap: 24px;
  }
}

@media (max-width: 720px) {
  .lit-ege-page--bank .lit-ege-hero {
    min-height: 0;
    padding: 36px 20px;
  }

  .lit-ege-page--bank .lit-ege-hero-btns,
  .lit-ege-page--bank .lit-ege-hero-btn {
    width: 100%;
  }
}
