.bank-live { padding-bottom: 64px; }
.bank-live h1 { overflow-wrap: anywhere; }
.bank-live .collection-hero h1 { max-width: 100%; }
.bank-topic-navigation-title { padding: 16px 17px 13px; font-size: 15px; line-height: 1.4; color: var(--color-dark); }
.bank-catalog-total { margin: 22px 0; font-size: 18px; }
.bank-catalog-total strong { font-size: 30px; }
.bank-live .bank-line-topics { gap: 12px; }
.bank-live .bank-line-topic { border-radius: 14px; }
.bank-live .bank-line-topic .topic__row { grid-template-columns: 56px minmax(0, 1fr) 90px 120px 24px; gap: 16px; padding: 18px 22px; }
.bank-live .bank-line-topic .task-num { width: 48px; height: 44px; font-size: 16px; }
.bank-live .bank-line-topic .topic__title { font-size: 17px; font-weight: 650; line-height: 1.4; }
.bank-live .bank-line-topic .topic__title small { margin-top: 4px; font-size: 12px; font-weight: 400; }
.bank-live .bank-line-topic .task-part { justify-self: start; white-space: nowrap; }
.bank-live .bank-line-topic .topic__subcount small { display: block; margin-top: 4px; font-size: 12px; }
.bank-live .bank-line-topic .subtopic__main { justify-content: space-between; align-items: start; }
.bank-live .bank-line-topic .subtopic__name { overflow: visible; overflow-wrap: anywhere; line-height: 1.5; }
.bank-live .bank-line-topic .subtopics { gap: 6px 24px; }
.bank-live .bank-line-topic .topic__actions { margin-top: 12px; }
.bank-live .bank-search.bank-filters { display: block; margin-top: 24px; }
.bank-live .bank-live-filter-row { grid-template-columns: minmax(170px, 1.2fr) repeat(3, minmax(140px, 1fr)) auto; }
.bank-live .bank-filter { min-width: 0; }
.bank-live .bank-filter label { min-width: 0; display: block; margin: 0; font-size: 11px; }
.bank-live .bank-filter input, .bank-live .bank-filter select { min-width: 0; font-size: 14px; }
.bank-filter-actions { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.bank-filter-actions > a { font-size: 13px; }
.bank-line-label { font-weight: 700; }
.bank-task-card .topic-task__head { flex-wrap: wrap; gap: 10px; }
.bank-task-card .topic-task__head .task-part { font-size: 11px; }
.bank-search { display: flex; gap: 14px; align-items: end; flex-wrap: wrap; margin: 25px 0 16px; }
.bank-search label { display: grid; gap: 7px; flex: 1; min-width: 210px; font-size: 13px; font-weight: 700; }
.bank-search input, .bank-search select { width: 100%; border: 1px solid #c7d3e2; border-radius: 9px; padding: 12px; background: white; color: #24364e; font: inherit; }
.bank-task-card { min-width: 0; margin: 20px 0; }
.bank-task-card .topic-task__actions { flex-wrap: wrap; gap: 12px; }
.bank-text { white-space: pre-line; overflow-wrap: anywhere; line-height: 1.75; }
.bank-math { max-width: 100%; overflow-x: auto; }
.bank-math .katex { white-space: normal; font-size: 1.15em; }
.bank-math .katex-display { max-width: 100%; overflow-x: auto; overflow-y: hidden; }
.bank-math .katex-display > .katex { white-space: nowrap; }
.bank-math-error { color: #b42318; }
.bank-reveal { padding: 20px 28px; border-top: 1px solid #e5ebf3; }
.bank-reveal[hidden] { display: none !important; }
.bank-reveal h3 { margin: 0 0 12px; font-size: 18px; }
.bank-written-answer, .bank-learning-note { margin: 10px 28px 22px; padding: 12px 15px; border-radius: 9px; background: #f3f7fc; font-size: 14px; line-height: 1.6; }
.bank-learning-note { background: #fff6dd; }
.bank-pagination { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 28px 0; }
.bank-pagination a, .bank-pagination span { padding: 9px 15px; border: 1px solid #d5dfed; border-radius: 8px; }
.bank-pagination [aria-current] { background: var(--color-primary); color: white; border-color: var(--color-primary); }
.bank-source { font-size: 14px; color: #52677e; margin: 18px 0 35px; }
.bank-live .related-problems__grid a { line-height: 1.7; }
/* Navigation between the catalog, tasks and theory. */
.bank-live > .bank-nav { position: sticky; top: var(--bank-header-height, 80px); z-index: 60; }
.bank-live > .bank-nav .bank-nav__tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 180px)); }
.bank-live > .bank-nav .bank-nav__tab { min-width: 0; align-items: center; white-space: nowrap; }
.bank-live > #topics, .bank-live > #tasks { scroll-margin-top: calc(var(--bank-header-height, 80px) + var(--bank-nav-height, 56px) + 16px); }
@media (max-width: 540px) {
  .bank-live > .bank-nav .bank-nav__tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
  .bank-live > .bank-nav .bank-nav__tab { padding: 13px 6px; font-size: 14px; }
}

@media (max-width: 1000px) {
  .bank-live .bank-live-filter-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bank-filter-actions { grid-column: 1 / -1; flex-direction: row; justify-content: flex-start; gap: 18px; }
}
@media (max-width: 780px) {
  .bank-live .bank-line-topic .topic__row { grid-template-columns: 44px minmax(0, 1fr) auto; grid-template-areas: "num title caret" "num part count"; gap: 10px 12px; padding: 16px; }
  .bank-live .bank-line-topic .task-num { grid-area: num; width: 40px; height: 40px; }
  .bank-live .bank-line-topic .topic__title { grid-area: title; font-size: 15px; }
  .bank-live .bank-line-topic .task-part { grid-area: part; }
  .bank-live .bank-line-topic .topic__subcount { grid-area: count; white-space: nowrap; font-size: 11px; }
  .bank-live .bank-line-topic .topic__subcount small { display: none; }
  .bank-live .bank-line-topic .topic__caret { grid-area: caret; justify-self: end; }
  .bank-live .bank-line-topic .topic__sub { padding: 16px; }
}
@media (max-width: 540px) {
  .bank-live .bank-live-filter-row { grid-template-columns: minmax(0, 1fr); }
  .bank-live .bank-search.bank-filters { padding: 16px; }
  .bank-reveal { padding: 17px; }
  .bank-written-answer, .bank-learning-note { margin: 10px 17px 18px; }
  .bank-task-card .topic-task__actions a { margin-left: 0; width: 100%; }
}
