    /* HF task3/9: шапка вне .page — иначе overflow:hidden на сетке обрезает строку с header */
    body.neuroege-hyperformula-page.libreoffice-page-task9 .neuroege-hf-task-root, body.neuroege-python-task2-page.libreoffice-page-task9 .neuroege-hf-task-root {
      display: flex;
      flex-direction: column;
      /* Явная высота: иначе последующий min-height:0 «съедал» 100dvh и корень сжимался по контенту —
         проценты/flex внутри не доходили до низа экрана. min-height:0 оставляем только у .page и колонок. */
      height: 100dvh;
      max-height: 100dvh;
      min-height: 100dvh;
      overflow: hidden;
      box-sizing: border-box;
    }
    /* Хеадер выезжает поверх (fixed) — не резервируем место в flex-колонке */
    body.neuroege-hyperformula-page.libreoffice-page-task9 .neuroege-hf-task-root > .header.header--task,
    body.neuroege-python-task2-page.libreoffice-page-task9 .neuroege-hf-task-root > .header.header--task {
      flex-shrink: 0;
    }
    body.neuroege-hyperformula-page.libreoffice-page-task9 .neuroege-hf-task-root > .page.libreoffice-task9-page.task-solve-page, body.neuroege-python-task2-page.libreoffice-page-task9 .neuroege-hf-task-root > .page.libreoffice-task9-page.task-solve-page {
      flex: 1 1 auto;
      min-height: 0;
      overflow: hidden;
    }
    .libreoffice-task9-page.task-solve-page {
      display: grid;
      /* Слева условие (~⅓), справа тренажёр/Pyodide (~⅔) */
      grid-template-columns: minmax(0, 1fr) 6px minmax(0, 2fr);
      grid-template-rows: minmax(0, 1fr);
      column-gap: 0;
    }
    .libreoffice-task9-page .task-solve-main {
      grid-column: 3;
      grid-row: 1;
      min-height: 0;
      height: 100%;
      align-self: stretch;
      display: flex;
      flex-direction: column;
      padding-left: 0.65rem;
      padding-right: 0;
      padding-bottom: max(0.35rem, env(safe-area-inset-bottom, 0px));
      box-sizing: border-box;
      overflow-x: hidden;
    }
    /* Левая колонка: табличный редактор на всю высоту */
    body.libreoffice-page-task9 .libreoffice-task3-page .task-solve__left {
      flex: 1 1 auto;
      min-height: 0;
      height: 100%;
      min-width: 0;
      display: flex;
      flex-direction: column;
    }
    body.libreoffice-page-task9 .libreoffice-task3-page .calc-widget--libreoffice-sheet {
      flex: 1 1 auto;
      min-height: 0;
      height: 100%;
    }
    body.libreoffice-page-task9 .libreoffice-task3-page .calc-widget--libreoffice-sheet:has(> .libreoffice-sheet-calc-container.univer-calc--restored) {
      overflow: hidden;
      flex: 1 1 auto;
      min-height: 0;
      height: 100%;
      display: flex;
      flex-direction: column;
    }
    body.libreoffice-page-task9 .libreoffice-task3-page .calc-widget--libreoffice-sheet > .libreoffice-sheet-calc-container.univer-calc--restored {
      margin-left: 0;
      width: 100%;
      max-width: 100%;
      min-width: 0;
      align-self: stretch;
      box-sizing: border-box;
    }
    body.libreoffice-page-task9 .libreoffice-task3-page .libreoffice-sheet-calc-container.univer-calc-container {
      flex: 1 1 auto;
      min-height: 0;
      height: 100%;
    }
    body.libreoffice-page-task9 .libreoffice-task3-page .libreoffice-sheet-calc-mount,
    body.libreoffice-page-task9 .libreoffice-task3-page #hyperformula-root {
      flex: 1 1 auto !important;
      min-width: 0;
      position: relative;
      width: 100%;
      overflow: hidden;
    }
    /* HF Calc: flex-grow в колонке chrome (height:100% на HOT даёт 0px без явной высоты родителя) */
    body.libreoffice-page-task9 .libreoffice-task3-page.calc-trainer-page .libreoffice-sheet-calc-mount,
    body.libreoffice-page-task9 .libreoffice-task3-page.calc-trainer-page #hyperformula-root {
      flex: 1 1 auto !important;
      min-height: 0 !important;
      height: auto !important;
      align-self: stretch;
    }
    /* task3/18/22: #sandbox-view в flex-цепочке левой колонки (у task9 calc обёртки нет) */
    body.neuroege-hyperformula-page.libreoffice-page-task9 .libreoffice-task3-page.calc-trainer-page .task-solve__left > #sandbox-view {
      flex: 1 1 auto;
      min-height: 0;
      height: 100%;
      display: flex;
      flex-direction: column;
    }
    body.neuroege-hyperformula-page.libreoffice-page-task9 .libreoffice-task3-page.calc-trainer-page .task-solve__left > #sandbox-view > .calc-widget--libreoffice-sheet,
    body.neuroege-hyperformula-page.libreoffice-page-task9 .libreoffice-task3-page.calc-trainer-page #sandbox-view.calc-widget--libreoffice-sheet {
      flex: 1 1 auto;
      min-height: 0 !important;
      height: 100%;
    }
    /*
     * При сужении колонки редактора — лишний нативный скроллбар на .task-solve__left / обёртках.
     * Прокрутка листа только у Handsontable (.ht_master > .wtHolder), не у flex-колонки.
     */
    body.libreoffice-page-task9 .libreoffice-task3-page .task-solve__left,
    body.libreoffice-page-task9 .libreoffice-task3-page .task-solve-main,
    body.neuroege-hyperformula-page.libreoffice-page-task9 .libreoffice-task3-page.calc-trainer-page .task-solve__left > #sandbox-view,
    body.libreoffice-page-task9 .libreoffice-task3-page .libreoffice-sheet-calc-container,
    body.libreoffice-page-task9 .libreoffice-task3-page .libreoffice-sheet-calc-container .libreoffice-container {
      overflow: hidden;
      min-width: 0;
    }
    body.libreoffice-page-task9 .libreoffice-task3-page .libreoffice-sheet-calc-mount {
      min-height: 0 !important;
    }
    body.libreoffice-page-task9 .libreoffice-task3-page .libreoffice-sheet-calc-container .libreoffice-workarea {
      flex: 1 1 auto;
      min-height: 0;
      min-width: 0;
      overflow: hidden;
    }
    body.libreoffice-page-task9 .libreoffice-task3-page #hyperformula-root .handsontable .ht_master:not([class*="ht_clone"]) > .wtHolder {
      overflow-x: auto !important;
      overflow-y: auto !important;
    }
    body.libreoffice-page-task9 .libreoffice-task3-page .task-solve__right {
      position: relative;
      z-index: 2;
    }
    body.libreoffice-page-task9 .libreoffice-task3-page .task-solve-main {
      z-index: 1;
      min-width: 0;
      overflow: hidden;
    }
    .libreoffice-task9-page .libreoffice-task9-col-resizer {
      grid-column: 2;
      grid-row: 1;
      align-self: stretch;
      width: 6px;
      margin: 0;
      padding: 0;
      border: none;
      border-radius: 2px;
      background: rgba(120, 120, 120, 0.35);
      cursor: col-resize;
      flex-shrink: 0;
      z-index: 30;
      touch-action: none;
      transition: background 0.12s ease;
    }
    .libreoffice-task9-page .libreoffice-task9-col-resizer:hover,
    .libreoffice-task9-page .libreoffice-task9-col-resizer:focus-visible {
      background: rgba(5, 184, 125, 0.55);
      outline: none;
    }
    [data-theme="light"] .libreoffice-task9-page .libreoffice-task9-col-resizer {
      background: rgba(0, 0, 0, 0.12);
    }
    [data-theme="light"] .libreoffice-task9-page .libreoffice-task9-col-resizer:hover,
    [data-theme="light"] .libreoffice-task9-page .libreoffice-task9-col-resizer:focus-visible {
      background: rgba(5, 184, 125, 0.45);
    }
    .libreoffice-task9-page .task-solve__right {
      grid-column: 1;
      grid-row: 1;
      padding-right: 0.65rem;
      padding-left: 0;
      box-sizing: border-box;
    }
    /* HyperFormula task3/9: без скролла документа; длинное условие — только в #libreoffice-task9-statement-wrap */
    body.neuroege-hyperformula-page.libreoffice-page-task9 .libreoffice-task9-page .task-solve__right, body.neuroege-python-task2-page.libreoffice-page-task9 .libreoffice-task9-page .task-solve__right {
      display: flex;
      flex-direction: column;
      align-self: stretch;
      min-height: 0;
      min-width: 0;
      overflow: hidden;
    }
    body.neuroege-hyperformula-page.libreoffice-page-task9 .libreoffice-task9-page .task-solve__right > .hf-variants-shell,
    body.neuroege-python-task2-page.libreoffice-page-task9 .libreoffice-task9-page .task-solve__right > .hf-variants-shell {
      flex-shrink: 0;
    }
    body.neuroege-hyperformula-page.libreoffice-page-task9 .libreoffice-task9-page .task-solve__right > .neuroege-hf-trainer-intro, body.neuroege-python-task2-page.libreoffice-page-task9 .libreoffice-task9-page .task-solve__right > .neuroege-hf-trainer-intro {
      flex-shrink: 0;
      margin-bottom: 0.65rem;
    }
    /* flex-basis 0 — иначе при длинном HTML min-height:auto «съедает» колонку и #task-answer-section уезжает под overflow:hidden */
    body.neuroege-hyperformula-page.libreoffice-page-task9 #libreoffice-task9-statement-wrap.task-solve__statement, body.neuroege-python-task2-page.libreoffice-page-task9 #libreoffice-task9-statement-wrap.task-solve__statement {
      flex: 1 1 0;
      min-height: 0;
      overflow-x: hidden;
      overflow-y: auto;
      scrollbar-gutter: stable;
      -webkit-overflow-scrolling: touch;
    }
    body.neuroege-hyperformula-page.libreoffice-page-task9 #libreoffice-task9-statement-wrap .libreoffice-task9-statement-scroll-inner, body.neuroege-python-task2-page.libreoffice-page-task9 #libreoffice-task9-statement-wrap .libreoffice-task9-statement-scroll-inner {
      direction: ltr;
      unicode-bidi: isolate;
      display: block;
      width: 100%;
      min-width: 0;
      box-sizing: border-box;
      overflow-wrap: break-word;
      word-break: break-word;
    }
    body.neuroege-hyperformula-page.libreoffice-page-task9 #libreoffice-task9-statement-wrap .libreoffice-task9-statement-scroll-inner table, body.neuroege-python-task2-page.libreoffice-page-task9 #libreoffice-task9-statement-wrap .libreoffice-task9-statement-scroll-inner table {
      max-width: 100%;
    }
    body.neuroege-hyperformula-page.libreoffice-page-task9 .libreoffice-task9-page .task-solve__right > #task-answer-section, body.neuroege-python-task2-page.libreoffice-page-task9 .libreoffice-task9-page .task-solve__right > #task-answer-section {
      flex: 0 0 auto;
    }
    .libreoffice-task9-page .calc-widget--libreoffice-sheet:has(> .libreoffice-sheet-calc-container.univer-calc--restored) {
      overflow: visible;
    }
    .libreoffice-task9-page .calc-widget--libreoffice-sheet > .libreoffice-sheet-calc-container.univer-calc--restored {
      margin-left: -2rem;
    }
    .libreoffice-task9-page .task-solve__right > .hf-variants-shell--body {
      margin-top: 0.5rem;
    }
    .libreoffice-task9-variants-scroll {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      align-content: flex-start;
    }
    .hf-variants-nav__chips {
      display: flex;
      flex: 1 1 auto;
      flex-wrap: wrap;
      align-items: center;
      align-content: flex-start;
      min-height: 0;
      overflow-y: auto;
      overflow-x: hidden;
      scrollbar-gutter: stable;
      -webkit-overflow-scrolling: touch;
    }
    /* /ege-N/{slug}/: высота панели под чипы — без пустоты под кнопками */
    body[data-neuroege-hf-variant-selected="1"] .hf-variants-shell--fit-chips .hf-variants-nav__panel.variants-year__panel {
      flex: 1 1 auto !important;
      min-height: 0;
      padding: 0.35rem 0.55rem 0 !important;
      border-radius: 0;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    }
    body[data-neuroege-hf-variant-selected="1"] .hf-variants-shell--fit-chips > .hf-variants-nav {
      display: flex;
      flex-direction: column;
      min-height: 0;
    }
    body[data-neuroege-hf-variant-selected="1"] .hf-variants-shell--fit-chips > .hf-variants-nav > .hf-variants-panel-resizer {
      flex: 0 0 12px;
      margin: 16px 0 0 !important;
    }
    body[data-neuroege-hf-variant-selected="1"] .hf-variants-shell--fit-chips .hf-variants-nav__chips {
      flex: 0 0 auto;
      scrollbar-gutter: auto;
      padding-bottom: 0 !important;
      margin-bottom: 0 !important;
    }
    body[data-neuroege-hf-variant-selected="1"] .hf-variants-shell--fit-chips .hf-variants-nav__columns.variants-year__columns {
      flex: 0 0 auto;
      align-items: start;
    }
    /* Ручка ресайза вплотную к низу панели (без прозрачной «дыры» над грипом) */
    body[data-neuroege-hf-variant-selected="1"] .hf-variants-shell {
      background: rgba(148, 163, 184, 0.04) !important;
    }
    html[data-theme="light"] body[data-neuroege-hf-variant-selected="1"] .hf-variants-shell,
    [data-theme="light"] body[data-neuroege-hf-variant-selected="1"] .hf-variants-shell {
      background: rgba(15, 23, 42, 0.03) !important;
    }
    body[data-neuroege-hf-variant-selected="1"] .hf-variants-shell .hf-variants-panel-resizer {
      margin-top: 16px !important;
      margin-bottom: 0 !important;
      flex-basis: 12px !important;
      height: 12px !important;
    }
    body[data-neuroege-hf-variant-selected="1"] .hf-variants-shell .hf-variants-panel-resizer::before {
      top: 0 !important;
      transform: none !important;
    }
    body[data-neuroege-hf-variant-selected="1"] .hf-variants-shell .hf-variants-panel-resizer::after {
      top: 0 !important;
      transform: translate(-50%, 0) !important;
    }
    /* Панель вариантов: спокойная оболочка (как EGE/ОГЭ после ui.md) */
    body.neuroege-hyperformula-page.libreoffice-page-hf-task-list .hf-variants-shell,
    body.neuroege-python-task2-page.libreoffice-page-hf-task-list .hf-variants-shell {
      display: flex;
      flex-direction: column;
      flex: 0 0 auto;
      min-width: 0;
      box-sizing: border-box;
      position: relative;
      border-radius: 12px;
      background: rgba(148, 163, 184, 0.04);
      border: 1px solid rgba(148, 163, 184, 0.16);
      box-shadow: none;
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
      transition: border-color 0.15s ease;
    }
    [data-theme="light"] body.neuroege-hyperformula-page.libreoffice-page-hf-task-list .hf-variants-shell,
    [data-theme="light"] body.neuroege-python-task2-page.libreoffice-page-hf-task-list .hf-variants-shell {
      background: rgba(15, 23, 42, 0.03);
      border-color: rgba(15, 23, 42, 0.08);
      box-shadow: none;
    }
    .hf-variants-shell__head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.5rem;
      padding: 0.42rem 0.55rem 0.42rem 0.65rem;
      position: relative;
      z-index: 2;
      border-bottom: 1px solid rgba(148, 163, 184, 0.14);
      background: rgba(148, 163, 184, 0.04);
    }
    [data-theme="light"] .hf-variants-shell__head {
      border-bottom-color: rgba(15, 23, 42, 0.08);
      background: rgba(15, 23, 42, 0.03);
    }
    .hf-variants-shell__head-hit {
      position: absolute;
      inset: 0;
      z-index: 1;
      margin: 0;
      padding: 0;
      border: none;
      background: transparent;
      cursor: pointer;
    }
    .hf-variants-shell__head-hit[hidden] {
      display: none !important;
    }
    .hf-variants-shell__head-main {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      flex: 1 1 auto;
      min-width: 0;
      position: relative;
      z-index: 3;
      overflow: visible;
    }
    .hf-variants-shell--collapsed .hf-variants-shell__head-main,
    #hf-variants-shell-head.hf-variants-shell--collapsed .hf-variants-shell__head-main {
      cursor: pointer;
    }
    .hf-variants-shell__head-center {
      display: flex;
      align-items: center;
      gap: 0.4rem;
      flex: 1 1 0;
      min-width: 4.5rem;
      justify-content: flex-start;
      overflow: hidden;
    }
    .hf-variants-shell__head-main > .hf-variants-shell__titles.hf-variants-shell__head-center {
      flex-direction: column;
      align-items: stretch;
      justify-content: center;
      gap: 0.1rem;
    }
    .header__task-command-bar .hf-variants-shell__titles--command .header__task-num-title {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      overflow-wrap: normal;
      word-break: normal;
    }
    .hf-variants-shell__head-main .hf-variants-shell__task-arrow {
      position: relative;
      z-index: 4;
      flex: 0 0 2.5rem;
      flex-shrink: 0;
      min-width: 2.5rem;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 2.5rem;
      height: 2.5rem;
      border-radius: 999px;
      border: 2px solid #93c5fd;
      background: #2563eb;
      color: #ffffff;
      text-decoration: none;
      box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.35) inset,
        0 2px 10px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(0, 0, 0, 0.35);
      transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease, border-color 0.14s ease;
    }
    .hf-variants-shell__head-main .hf-variants-shell__task-arrow--next:not(.hf-variants-shell__task-arrow--disabled) {
      border-color: #6ee7b7;
      background: #059669;
      box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.35) inset,
        0 2px 10px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(0, 0, 0, 0.35),
        0 0 18px rgba(5, 184, 125, 0.55);
    }
    .hf-variants-shell__head-main .hf-variants-shell__task-arrow-icon {
      display: block;
      width: 1.35rem;
      height: 1.35rem;
      flex-shrink: 0;
    }
    .hf-variants-shell__head-main .hf-variants-shell__task-arrow:not(.hf-variants-shell__task-arrow--disabled) .hf-variants-shell__task-arrow-icon path {
      fill: #ffffff;
    }
    .hf-variants-shell__head-main .hf-variants-shell__task-arrow--prev:not(.hf-variants-shell__task-arrow--disabled):hover {
      transform: translateX(-2px) scale(1.06);
      background: #3b82f6;
      border-color: #bfdbfe;
      box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.4) inset,
        0 4px 16px rgba(37, 99, 235, 0.65),
        0 0 24px rgba(59, 130, 246, 0.5);
    }
    .hf-variants-shell__head-main .hf-variants-shell__task-arrow--next:not(.hf-variants-shell__task-arrow--disabled):hover {
      transform: translateX(2px) scale(1.06);
      background: #10b981;
      border-color: #a7f3d0;
      box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.4) inset,
        0 4px 16px rgba(5, 184, 125, 0.65),
        0 0 24px rgba(16, 185, 129, 0.5);
    }
    .hf-variants-shell__head-main .hf-variants-shell__task-arrow:focus-visible {
      outline: 3px solid #fde047;
      outline-offset: 2px;
    }
    .hf-variants-shell__head-main .hf-variants-shell__task-arrow--disabled {
      pointer-events: none;
      border: 2px solid #64748b;
      background: #334155;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
      opacity: 1;
    }
    .hf-variants-shell__head-main .hf-variants-shell__task-arrow--disabled .hf-variants-shell__task-arrow-icon path {
      fill: #cbd5e1;
    }
    [data-theme="light"] .hf-variants-shell__head-main .hf-variants-shell__task-arrow--prev:not(.hf-variants-shell__task-arrow--disabled) {
      border-color: #1d4ed8;
      background: #3b82f6;
      box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.5) inset,
        0 2px 8px rgba(29, 78, 216, 0.35);
    }
    [data-theme="light"] .hf-variants-shell__head-main .hf-variants-shell__task-arrow--next:not(.hf-variants-shell__task-arrow--disabled) {
      border-color: #047857;
      background: #10b981;
      box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.5) inset,
        0 2px 8px rgba(5, 150, 105, 0.35);
    }
    [data-theme="light"] .hf-variants-shell__head-main .hf-variants-shell__task-arrow:not(.hf-variants-shell__task-arrow--disabled) .hf-variants-shell__task-arrow-icon path {
      fill: #ffffff;
    }
    [data-theme="light"] .hf-variants-shell__head-main .hf-variants-shell__task-arrow--disabled {
      border-color: #94a3b8;
      background: #e2e8f0;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
    }
    [data-theme="light"] .hf-variants-shell__head-main .hf-variants-shell__task-arrow--disabled .hf-variants-shell__task-arrow-icon path {
      fill: #475569;
    }
    .hf-variants-shell__icon {
      flex: 0 0 auto;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 1.35rem;
      height: 1.35rem;
      border-radius: 6px;
      font-size: 0.72rem;
      font-weight: 700;
      color: #6ee7b7;
      background: linear-gradient(135deg, rgba(5, 184, 125, 0.35) 0%, rgba(59, 130, 246, 0.2) 100%);
      border: 1px solid rgba(5, 184, 125, 0.45);
      box-shadow: 0 0 14px rgba(5, 184, 125, 0.25);
    }
    .hf-variants-shell__titles {
      display: flex;
      flex-direction: column;
      gap: 0.1rem;
      min-width: 0;
    }
    .hf-variants-shell__label {
      font-size: 0.78rem;
      font-weight: 700;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: rgba(255, 255, 255, 0.92);
    }
    [data-theme="light"] .hf-variants-shell__label {
      color: #0f172a;
    }
    .hf-variants-shell__active {
      font-size: 0.72rem;
      font-weight: 600;
      color: rgba(110, 231, 183, 0.95);
      overflow: visible;
      text-overflow: clip;
      white-space: normal;
      overflow-wrap: anywhere;
      max-width: none;
    }
    [data-theme="light"] .hf-variants-shell__active {
      color: #047857;
    }
    .hf-variants-shell__active[hidden] {
      display: none !important;
    }
    .hf-variants-shell__toggle {
      position: relative;
      z-index: 3;
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      flex: 0 0 auto;
      margin: 0;
      padding: 0.32rem 0.65rem 0.32rem 0.75rem;
      border-radius: 999px;
      border: 1px solid rgba(5, 184, 125, 0.55);
      background: linear-gradient(
        135deg,
        rgba(5, 184, 125, 0.22) 0%,
        rgba(5, 184, 125, 0.08) 100%
      );
      color: #ecfdf5;
      font: inherit;
      font-size: 0.72rem;
      font-weight: 600;
      letter-spacing: 0.02em;
      cursor: pointer;
      white-space: nowrap;
      box-shadow:
        0 0 16px rgba(5, 184, 125, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
      transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    }
    .hf-variants-shell__toggle:hover {
      border-color: rgba(52, 211, 153, 0.85);
      box-shadow:
        0 0 22px rgba(5, 184, 125, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.16);
      background: linear-gradient(
        135deg,
        rgba(5, 184, 125, 0.32) 0%,
        rgba(5, 184, 125, 0.14) 100%
      );
    }
    .hf-variants-shell__toggle:focus-visible {
      outline: 2px solid var(--green, #05b87d);
      outline-offset: 2px;
    }
    [data-theme="light"] .hf-variants-shell__toggle {
      color: #14532d;
      background: linear-gradient(135deg, rgba(5, 184, 125, 0.16) 0%, rgba(240, 253, 244, 0.95) 100%);
      border-color: rgba(5, 150, 105, 0.45);
      box-shadow: 0 0 12px rgba(5, 184, 125, 0.12);
    }
    .hf-variants-shell__toggle-icon {
      width: 0.55rem;
      height: 0.55rem;
      border-right: 2px solid currentColor;
      border-bottom: 2px solid currentColor;
      transform: rotate(-135deg);
      margin-top: 0.15rem;
      transition: transform 0.2s ease;
    }
    .hf-variants-shell--collapsed .hf-variants-shell__toggle-icon,
    #hf-variants-shell-head.hf-variants-shell--collapsed .hf-variants-shell__toggle-icon {
      transform: rotate(45deg);
      margin-top: -0.1rem;
    }
    .hf-variants-shell--collapsed.hf-variants-shell__head,
    #hf-variants-shell-head.hf-variants-shell--collapsed {
      border-bottom: none;
    }
    body.neuroege-hyperformula-page.libreoffice-page-hf-task-list .hf-variants-shell .hf-variants-nav,
    body.neuroege-python-task2-page.libreoffice-page-hf-task-list .hf-variants-shell .hf-variants-nav {
      display: flex;
      flex-direction: column;
      flex: 0 0 auto;
      min-height: 0;
      min-width: 0;
      overflow: hidden;
      box-sizing: border-box;
      margin: 0;
      transition:
        height 0.28s cubic-bezier(0.4, 0, 0.2, 1),
        flex-basis 0.28s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.22s ease;
    }
    .hf-variants-shell--resizing .hf-variants-nav {
      transition: none !important;
    }
    .hf-variants-shell--collapsed .hf-variants-nav {
      opacity: 0;
      pointer-events: none;
    }
    body.neuroege-hyperformula-page.libreoffice-page-hf-task-list .hf-variants-shell .hf-variants-panel-resizer,
    body.neuroege-python-task2-page.libreoffice-page-hf-task-list .hf-variants-shell .hf-variants-panel-resizer {
      flex: 0 0 6px;
      width: 100%;
      height: 6px;
      margin: 0.2rem 0 0.35rem;
      padding: 0;
      border: none;
      border-radius: 999px;
      background: rgba(120, 120, 120, 0.35);
      cursor: row-resize;
      touch-action: none;
      user-select: none;
      position: relative;
      z-index: 4;
      overflow: hidden;
      transition:
        height 0.28s cubic-bezier(0.4, 0, 0.2, 1),
        flex-basis 0.28s cubic-bezier(0.4, 0, 0.2, 1),
        margin 0.28s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.22s ease;
    }
    .hf-variants-shell--resizing .hf-variants-panel-resizer {
      transition: none !important;
    }
    .hf-variants-shell--collapsed .hf-variants-panel-resizer {
      flex-basis: 0 !important;
      height: 0 !important;
      margin-top: 0 !important;
      margin-bottom: 0 !important;
      opacity: 0;
      pointer-events: none;
      visibility: hidden;
    }
    /* /ege-{N}/{slug}/: свёрнутая панель — полностью скрыть оболочку вариантов */
    body[data-neuroege-hf-variant-selected="1"]:not(.task-mobile-mode)
      .neuroege-hf-task-root.hf-variants-panel--collapsed
      .task-solve__right > #hf-variants-shell,
    html.neuroege-trainer-slug-page body:not(.task-mobile-mode)
      .neuroege-hf-task-root.hf-variants-panel--collapsed
      .task-solve__right > #hf-variants-shell {
      display: none !important;
    }
    body[data-neuroege-hf-variant-selected="1"]:not(.task-mobile-mode)
      .neuroege-hf-task-root.hf-variants-panel--collapsed
      #libreoffice-task9-statement-wrap.task-solve__statement,
    html.neuroege-trainer-slug-page body:not(.task-mobile-mode)
      .neuroege-hf-task-root.hf-variants-panel--collapsed
      #libreoffice-task9-statement-wrap.task-solve__statement {
      flex: 1 1 0 !important;
      min-height: 0;
      height: auto !important;
      max-height: none !important;
    }
    @media (prefers-reduced-motion: reduce) {
      body.neuroege-hyperformula-page.libreoffice-page-hf-task-list .hf-variants-shell .hf-variants-nav,
      body.neuroege-python-task2-page.libreoffice-page-hf-task-list .hf-variants-shell .hf-variants-nav,
      body.neuroege-hyperformula-page.libreoffice-page-hf-task-list .hf-variants-shell .hf-variants-panel-resizer,
      body.neuroege-python-task2-page.libreoffice-page-hf-task-list .hf-variants-shell .hf-variants-panel-resizer {
        transition: none !important;
      }
    }
    body.neuroege-hyperformula-page.libreoffice-page-hf-task-list .hf-variants-panel-resizer::after,
    body.neuroege-python-task2-page.libreoffice-page-hf-task-list .hf-variants-panel-resizer::after {
      content: "";
      position: absolute;
      inset: 2px 28%;
      border-radius: 999px;
      background: rgba(15, 23, 42, 0.45);
    }
    [data-theme="light"] body.neuroege-hyperformula-page.libreoffice-page-hf-task-list .hf-variants-panel-resizer,
    [data-theme="light"] body.neuroege-python-task2-page.libreoffice-page-hf-task-list .hf-variants-panel-resizer {
      background: rgba(148, 163, 184, 0.55);
    }
    [data-theme="light"] body.neuroege-hyperformula-page.libreoffice-page-hf-task-list .hf-variants-panel-resizer::after,
    [data-theme="light"] body.neuroege-python-task2-page.libreoffice-page-hf-task-list .hf-variants-panel-resizer::after {
      background: rgba(51, 65, 85, 0.35);
    }
    body.hf-variants-panel-resizer--active {
      cursor: row-resize;
      user-select: none;
    }
    .hf-variants-nav__panel.variants-year__panel {
      position: relative;
      display: flex;
      flex-direction: column;
      padding: 0.55rem 0.65rem 0.5rem;
      border-radius: 0 0 12px 12px;
      flex: 1 1 auto;
      min-height: 0;
      overflow: hidden;
      border: 1px solid rgba(148, 163, 184, 0.14);
      background: rgba(148, 163, 184, 0.04);
      box-shadow: none;
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
    }
    [data-theme="light"] .hf-variants-nav__panel.variants-year__panel {
      border-color: rgba(15, 23, 42, 0.08);
      background: rgba(15, 23, 42, 0.025);
      box-shadow: none;
    }
    .hf-variants-nav__columns.variants-year__columns {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
      align-items: stretch;
      flex: 1 1 auto;
      min-height: 0;
    }
    .hf-variants-nav__column.variants-year__column {
      display: flex;
      flex-direction: column;
      align-items: stretch;
      min-width: 0;
      min-height: 0;
    }
    .hf-variants-nav__columns > .variants-year__divider {
      width: 1px;
      min-height: 100%;
      margin: 0 0.65rem;
      align-self: stretch;
      justify-self: center;
      background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(59, 130, 246, 0.25) 12%,
        rgba(148, 163, 184, 0.45) 50%,
        rgba(5, 184, 125, 0.25) 88%,
        transparent 100%
      );
      box-shadow:
        -1px 0 12px rgba(59, 130, 246, 0.08),
        1px 0 12px rgba(5, 184, 125, 0.08);
    }
    [data-theme="light"] .hf-variants-nav__columns > .variants-year__divider {
      background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(37, 99, 235, 0.2) 12%,
        rgba(100, 116, 139, 0.35) 50%,
        rgba(5, 150, 105, 0.2) 88%,
        transparent 100%
      );
    }
    .hf-variants-nav__column--official .variants-year__column-title,
    .hf-variants-nav__column.variants-year__column--official .variants-year__column-title {
      color: rgba(191, 219, 254, 0.88);
      background: rgba(59, 130, 246, 0.1);
      border: 1px solid rgba(96, 165, 250, 0.28);
    }
    .hf-variants-nav__column.variants-year__column--author .variants-year__column-title {
      color: rgba(167, 243, 208, 0.88);
      background: rgba(16, 185, 129, 0.1);
      border: 1px solid rgba(52, 211, 153, 0.28);
    }
    [data-theme="light"] .hf-variants-nav__column.variants-year__column--official .variants-year__column-title {
      color: #1e40af;
      background: rgba(59, 130, 246, 0.08);
      border-color: rgba(37, 99, 235, 0.18);
    }
    [data-theme="light"] .hf-variants-nav__column.variants-year__column--author .variants-year__column-title {
      color: #047857;
      background: rgba(5, 150, 105, 0.08);
      border-color: rgba(5, 150, 105, 0.18);
    }
    .hf-variants-nav__columns {
      gap: 0;
    }
    .hf-variants-nav .variants-year__column-title {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      align-self: center;
      margin: 0 0 0.75rem;
      padding: 0.2rem 0.55rem 0.22rem;
      font-family: var(--font-body);
      font-size: 0.72rem;
      font-weight: 650;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      text-align: center;
      border-radius: 999px;
      box-shadow: none;
    }
    /* Чипы в панели — премиум в static/css/hf_variants_premium.css */
    .hf-variants-nav__chip-slot {
      display: inline-flex;
      max-width: 100%;
    }
    .hf-variants-nav__describe {
      display: inline-flex;
      margin-top: 0.45rem;
      margin-left: 0;
      align-self: flex-start;
    }
    body.neuroege-hyperformula-page.libreoffice-page-hf-task-list .hf-variants-nav .libreoffice-task3-describe-link,
    body.neuroege-python-task2-page.libreoffice-page-hf-task-list .hf-variants-nav .libreoffice-task3-describe-link {
      flex: 0 0 auto;
    }
    body.neuroege-hyperformula-page.libreoffice-page-hf-task-list a.libreoffice-task3-describe-link, body.neuroege-python-task2-page.libreoffice-page-hf-task-list a.libreoffice-task3-describe-link {
      flex: 0 0 auto;
      margin-left: auto;
      align-self: center;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 0.38rem 0.85rem;
      border-radius: 6px;
      font: inherit;
      font-size: 0.78rem;
      font-weight: 600;
      letter-spacing: 0.02em;
      text-decoration: none;
      white-space: nowrap;
      border: 1px dashed rgba(5, 184, 125, 0.75);
      background: rgba(15, 22, 28, 0.92);
      color: rgba(210, 245, 230, 0.95);
      box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25) inset;
    }
    body.neuroege-hyperformula-page.libreoffice-page-hf-task-list a.libreoffice-task3-describe-link:hover, body.neuroege-python-task2-page.libreoffice-page-hf-task-list a.libreoffice-task3-describe-link:hover {
      border-style: solid;
      border-color: rgba(5, 184, 125, 0.95);
      color: #fff;
      background: rgba(5, 184, 125, 0.22);
    }
    body.neuroege-hyperformula-page.libreoffice-page-hf-task-list a.libreoffice-task3-describe-link:focus-visible, body.neuroege-python-task2-page.libreoffice-page-hf-task-list a.libreoffice-task3-describe-link:focus-visible {
      outline: 2px solid rgba(5, 184, 125, 0.85);
      outline-offset: 2px;
    }
    [data-theme="light"] body.neuroege-hyperformula-page.libreoffice-page-hf-task-list a.libreoffice-task3-describe-link, [data-theme="light"] body.neuroege-python-task2-page.libreoffice-page-hf-task-list a.libreoffice-task3-describe-link {
      background: #f0fdf4;
      color: #14532d;
      border-color: rgba(5, 184, 125, 0.55);
      box-shadow: none;
    }
    [data-theme="light"] body.neuroege-hyperformula-page.libreoffice-page-hf-task-list a.libreoffice-task3-describe-link:hover, [data-theme="light"] body.neuroege-python-task2-page.libreoffice-page-hf-task-list a.libreoffice-task3-describe-link:hover {
      background: rgba(5, 184, 125, 0.18);
      color: #052e16;
    }
    .libreoffice-task9-chip {
      appearance: none;
      -webkit-appearance: none;
      flex: 0 0 auto;
      display: inline-flex;
      align-items: center;
      max-width: 12rem;
      margin: 0;
      padding: 0.35rem 0.7rem;
      border: 1px solid rgba(255, 255, 255, 0.22);
      border-radius: 999px;
      background: rgba(30, 35, 40, 0.85);
      color: rgba(255, 255, 255, 0.88);
      font: inherit;
      font-size: 0.8125rem;
      font-weight: 500;
      line-height: 1.2;
      cursor: pointer;
      transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    }
    .libreoffice-task9-chip:hover {
      border-color: rgba(5, 184, 125, 0.55);
      box-shadow: 0 0 0 1px rgba(5, 184, 125, 0.2);
    }
    .libreoffice-task9-chip:focus-visible {
      outline: 2px solid var(--green, #05b87d);
      outline-offset: 2px;
    }
    .libreoffice-task9-chip--active {
      border-color: var(--green, #05b87d);
      background: rgba(5, 184, 125, 0.14);
      box-shadow: 0 0 12px rgba(5, 184, 125, 0.25);
    }
    .libreoffice-task9-chip__label {
      display: block;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      min-width: 0;
    }
    [data-theme="light"] .libreoffice-task9-chip {
      border-color: rgba(0, 0, 0, 0.14);
      background: rgba(255, 255, 255, 0.95);
      color: rgba(29, 29, 31, 0.92);
    }
    [data-theme="light"] .libreoffice-task9-chip:hover {
      border-color: rgba(5, 184, 125, 0.45);
      box-shadow: 0 0 0 1px rgba(5, 184, 125, 0.15);
    }
    [data-theme="light"] .libreoffice-task9-chip--active {
      border-color: var(--green, #05b87d);
      background: rgba(5, 184, 125, 0.1);
      box-shadow: 0 0 10px rgba(5, 184, 125, 0.2);
    }
    .libreoffice-task9-page .calc-widget--libreoffice-sheet {
      flex: 1;
      min-height: 0;
      display: flex;
      flex-direction: column;
    }
    .libreoffice-task9-page .libreoffice-sheet-calc-container.univer-calc-container {
      display: flex;
      flex-direction: column;
      overflow: hidden;
      min-height: 0;
      flex: 1;
    }
    .libreoffice-task9-page .libreoffice-sheet-calc-container .univer-libre-title-bar,
    .libreoffice-task9-page .libreoffice-sheet-calc-container .univer-libre-menu-bar,
    .libreoffice-task9-page .libreoffice-sheet-calc-container .univer-libre-toolbar {
      flex-shrink: 0;
    }
    .libreoffice-task9-page .libreoffice-sheet-calc-mount,
    .libreoffice-task9-page .univer-colibre-mount {
      flex: 1 1 auto;
      min-height: 240px;
      position: relative;
      width: 100%;
      overflow: hidden;
    }
    .libreoffice-task9-page .univer-colibre-mount > div.univer-flex.univer-flex-col {
      height: 100%;
      min-height: 0;
    }
    body.libreoffice-page-task9.libreoffice-task9-sheet-maximized .libreoffice-task9-page.task-solve-page {
      grid-template-columns: 1fr;
    }
    body.libreoffice-page-task9.libreoffice-task9-sheet-maximized .libreoffice-task9-page .task-solve__right {
      display: none !important;
    }
    body.libreoffice-page-task9.libreoffice-task9-sheet-maximized .libreoffice-task9-page .task-solve-main {
      grid-column: 1;
      grid-row: 1;
    }
    body.libreoffice-page-task9.libreoffice-task9-sheet-maximized .libreoffice-task9-page .libreoffice-task9-col-resizer {
      display: none !important;
    }
    /* /hyperformula/task9/: одновременно .calc-trainer-page и .libreoffice-task9-page — усиливаем скрытие всей правой колонки */
    body.neuroege-hyperformula-page.libreoffice-page-task9.libreoffice-task9-sheet-maximized .libreoffice-task9-page.calc-trainer-page.task-solve-page, body.neuroege-python-task2-page.libreoffice-page-task9.libreoffice-task9-sheet-maximized .libreoffice-task9-page.calc-trainer-page.task-solve-page {
      grid-template-columns: 1fr !important;
      grid-template-rows: minmax(0, 1fr) !important;
    }
    body.neuroege-hyperformula-page.libreoffice-page-task9.libreoffice-task9-sheet-maximized .libreoffice-task9-page.calc-trainer-page .task-solve__right, body.neuroege-python-task2-page.libreoffice-page-task9.libreoffice-task9-sheet-maximized .libreoffice-task9-page.calc-trainer-page .task-solve__right {
      display: none !important;
      visibility: hidden !important;
      width: 0 !important;
      min-width: 0 !important;
      max-width: 0 !important;
      height: 0 !important;
      margin: 0 !important;
      padding: 0 !important;
      overflow: hidden !important;
      pointer-events: none !important;
      border: none !important;
    }
    body.neuroege-hyperformula-page.libreoffice-page-task9.libreoffice-task9-sheet-maximized .libreoffice-task9-page.calc-trainer-page .task-solve-main, body.neuroege-python-task2-page.libreoffice-page-task9.libreoffice-task9-sheet-maximized .libreoffice-task9-page.calc-trainer-page .task-solve-main {
      grid-column: 1 / -1 !important;
      grid-row: 1 !important;
      max-width: 100%;
    }
    body.neuroege-hyperformula-page.libreoffice-page-task9.libreoffice-task9-sheet-maximized .libreoffice-task9-page.calc-trainer-page .libreoffice-task9-col-resizer, body.neuroege-python-task2-page.libreoffice-page-task9.libreoffice-task9-sheet-maximized .libreoffice-task9-page.calc-trainer-page .libreoffice-task9-col-resizer {
      display: none !important;
    }
    /* Полноэкранный лист: панель чата не показываем над таблицей; кнопка 💬 всегда доступна */
    body.neuroege-hyperformula-page.libreoffice-page-task9.libreoffice-task9-sheet-maximized #neuroege-ai-chat .neuroege-ai-chat__panel, body.neuroege-python-task2-page.libreoffice-page-task9.libreoffice-task9-sheet-maximized #neuroege-ai-chat .neuroege-ai-chat__panel {
      display: none !important;
    }
    body.neuroege-hyperformula-page.libreoffice-page-task9.libreoffice-task9-sheet-maximized #neuroege-ai-chat .neuroege-ai-chat__fab, body.neuroege-python-task2-page.libreoffice-page-task9.libreoffice-task9-sheet-maximized #neuroege-ai-chat .neuroege-ai-chat__fab {
      display: inline-flex !important;
      visibility: visible !important;
      pointer-events: auto !important;
    }
    /* Только условие на весь экран (кнопка «Свернуть» в заголовке таблицы) */
    body.neuroege-hyperformula-page.libreoffice-page-task9.neuroege-hf-statement-fullscreen .libreoffice-task9-page.calc-trainer-page.task-solve-page, body.neuroege-python-task2-page.libreoffice-page-task9.neuroege-hf-statement-fullscreen .libreoffice-task9-page.calc-trainer-page.task-solve-page {
      grid-template-columns: 1fr !important;
      grid-template-rows: minmax(0, 1fr) !important;
    }
    body.neuroege-hyperformula-page.libreoffice-page-task9.neuroege-hf-statement-fullscreen .libreoffice-task9-page.calc-trainer-page .task-solve-main, body.neuroege-python-task2-page.libreoffice-page-task9.neuroege-hf-statement-fullscreen .libreoffice-task9-page.calc-trainer-page .task-solve-main {
      display: none !important;
    }
    body.neuroege-hyperformula-page.libreoffice-page-task9.neuroege-hf-statement-fullscreen .libreoffice-task9-page.calc-trainer-page .libreoffice-task9-col-resizer, body.neuroege-python-task2-page.libreoffice-page-task9.neuroege-hf-statement-fullscreen .libreoffice-task9-page.calc-trainer-page .libreoffice-task9-col-resizer {
      display: none !important;
    }
    body.neuroege-hyperformula-page.libreoffice-page-task9.neuroege-hf-statement-fullscreen .libreoffice-task9-page.calc-trainer-page .task-solve__right, body.neuroege-python-task2-page.libreoffice-page-task9.neuroege-hf-statement-fullscreen .libreoffice-task9-page.calc-trainer-page .task-solve__right {
      grid-column: 1 / -1 !important;
      grid-row: 1 !important;
      max-width: 100%;
    }
    body.neuroege-hyperformula-page.libreoffice-page-task9.neuroege-hf-statement-fullscreen #neuroege-ai-chat .neuroege-ai-chat__panel, body.neuroege-python-task2-page.libreoffice-page-task9.neuroege-hf-statement-fullscreen #neuroege-ai-chat .neuroege-ai-chat__panel {
      display: none !important;
    }
    body.neuroege-hyperformula-page.libreoffice-page-task9.neuroege-hf-statement-fullscreen #neuroege-ai-chat .neuroege-ai-chat__fab, body.neuroege-python-task2-page.libreoffice-page-task9.neuroege-hf-statement-fullscreen #neuroege-ai-chat .neuroege-ai-chat__fab {
      display: inline-flex !important;
      visibility: visible !important;
      pointer-events: auto !important;
    }
    /* Панель действий под условием (одна строка, premium) */
    body.libreoffice-page-task9 .libreoffice-hf-answer-actions-row {
      display: block;
      margin: 0.65rem 0 0;
      padding: 0.5rem 0.65rem;
      border-radius: 12px;
      border: 1px solid rgba(255, 255, 255, 0.14);
      background: linear-gradient(145deg, rgba(22, 28, 38, 0.94) 0%, rgba(14, 18, 26, 0.92) 100%);
      box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.28),
        0 1px 0 rgba(255, 255, 255, 0.07) inset;
      backdrop-filter: blur(10px);
    }
    body.libreoffice-page-task9 .libreoffice-hf-answer-actions-row--premium {
      padding: 0.55rem 0.75rem;
    }
    [data-theme="light"] body.libreoffice-page-task9 .libreoffice-hf-answer-actions-row {
      border-color: rgba(0, 0, 0, 0.08);
      background: linear-gradient(145deg, #ffffff 0%, #f4f6f9 100%);
      box-shadow:
        0 4px 18px rgba(15, 23, 42, 0.08),
        0 1px 0 rgba(255, 255, 255, 0.9) inset;
    }
    body.libreoffice-page-task9 .libreoffice-hf-answer-actions-row__row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.45rem;
      min-width: 0;
    }
    body.libreoffice-page-task9:not(.variant-exam-body):not(:has(#task-answer-section:not([hidden]))) .libreoffice-hf-answer-actions-row--premium .libreoffice-hf-answer-actions-row__row {
      flex-wrap: nowrap;
      overflow-x: auto;
      overflow-y: hidden;
      scrollbar-width: thin;
      -webkit-overflow-scrolling: touch;
      padding-bottom: 0.1rem;
    }
    body.libreoffice-page-task9 .libreoffice-hf-answer-actions-row__row--secondary {
      margin-top: 0;
      padding-top: 0;
      border-top: none;
    }
    body.libreoffice-page-task9 .libreoffice-hf-answer-actions-row__sep {
      flex: 0 0 1px;
      align-self: center;
      width: 1px;
      height: 1.35rem;
      margin: 0 0.1rem;
      background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.22), transparent);
    }
    [data-theme="light"] body.libreoffice-page-task9 .libreoffice-hf-answer-actions-row__sep {
      background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.12), transparent);
    }
    body.libreoffice-page-task9 .libreoffice-hf-answer-actions-row--premium .libreoffice-hf-answer-actions-row__sep[hidden],
    body.libreoffice-page-task9 .libreoffice-hf-answer-actions-row--premium .libreoffice-hf-answer-actions-row__sep:only-child {
      display: none;
    }
    body.libreoffice-page-task9 .libreoffice-hf-answer-actions-row--task9 .libreoffice-hf-answer-actions-row__row--primary {
      flex-wrap: wrap;
    }
    body.libreoffice-page-task9 .libreoffice-hf-answer-actions-row--task9 .libreoffice-task2-answer-explain-tools,
    body.neuroege-python-task9-page.libreoffice-page-task9 .libreoffice-hf-answer-actions-row--task9 .libreoffice-task2-answer-explain-tools {
      display: inline-flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.35rem;
      flex-shrink: 0;
    }
    body.libreoffice-page-task9 .libreoffice-hf-answer-tools-group {
      display: inline-flex;
      flex-wrap: nowrap;
      align-items: center;
      gap: 0.45rem;
      flex-shrink: 0;
    }
    body.libreoffice-page-task9 .libreoffice-hf-answer-tools-group--inline {
      display: contents;
    }
    body.libreoffice-page-task9 .libreoffice-hf-answer-tools-group--inline > .libreoffice-hf-action-btn {
      flex-shrink: 0;
    }
    /* Premium-кнопки действий */
    body.libreoffice-page-task9 .libreoffice-hf-action-btn {
      appearance: none;
      -webkit-appearance: none;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.4rem;
      margin: 0;
      padding: 0.48rem 0.95rem;
      border: 1px solid rgba(255, 255, 255, 0.18);
      border-radius: 999px;
      background: linear-gradient(180deg, rgba(48, 54, 66, 0.98) 0%, rgba(32, 38, 48, 0.98) 100%);
      color: rgba(255, 255, 255, 0.94);
      font: inherit;
      font-size: 0.8rem;
      font-weight: 600;
      letter-spacing: 0.01em;
      line-height: 1.2;
      text-decoration: none;
      white-space: nowrap;
      flex-shrink: 0;
      cursor: pointer;
      box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.35),
        0 1px 0 rgba(255, 255, 255, 0.1) inset;
      transition:
        border-color 0.18s ease,
        background 0.18s ease,
        color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.12s ease;
    }
    body.libreoffice-page-task9 .libreoffice-hf-answer-actions-row--premium .libreoffice-hf-action-btn:hover {
      border-color: rgba(5, 184, 125, 0.65);
      background: linear-gradient(180deg, rgba(5, 184, 125, 0.28) 0%, rgba(4, 140, 96, 0.22) 100%);
      color: #f0fff8;
      box-shadow:
        0 4px 14px rgba(5, 184, 125, 0.22),
        0 0 0 1px rgba(5, 184, 125, 0.25);
      transform: translateY(-1px);
    }
    body.libreoffice-page-task9 .libreoffice-hf-answer-actions-row:not(.libreoffice-hf-answer-actions-row--premium) .libreoffice-hf-action-btn:hover {
      border-color: rgba(5, 184, 125, 0.55);
      background: rgba(5, 184, 125, 0.14);
      color: #e8fff4;
      box-shadow: 0 0 0 1px rgba(5, 184, 125, 0.2);
    }
    body.libreoffice-page-task9 .libreoffice-hf-action-btn:active {
      transform: translateY(0);
    }
    body.libreoffice-page-task9 .libreoffice-hf-action-btn:focus-visible {
      outline: 2px solid var(--green, #05b87d);
      outline-offset: 2px;
    }
    body.libreoffice-page-task9 .libreoffice-hf-action-btn--link {
      border-style: solid;
      background: linear-gradient(180deg, rgba(36, 44, 58, 0.95) 0%, rgba(24, 30, 40, 0.98) 100%);
      color: rgba(220, 230, 245, 0.92);
    }
    body.libreoffice-page-task9 .libreoffice-hf-answer-actions-row--premium .libreoffice-hf-action-btn--file-variant {
      border-color: rgba(5, 184, 125, 0.45);
      background: linear-gradient(180deg, rgba(8, 72, 52, 0.95) 0%, rgba(6, 48, 36, 0.98) 100%);
      color: #d4ffe8;
    }
    body.libreoffice-page-task9 .libreoffice-hf-answer-actions-row--premium .libreoffice-hf-action-btn--file-variant:hover {
      border-color: rgba(5, 184, 125, 0.75);
      background: linear-gradient(180deg, rgba(5, 184, 125, 0.42) 0%, rgba(4, 130, 90, 0.35) 100%);
      color: #f0fff8;
      box-shadow:
        0 4px 14px rgba(5, 184, 125, 0.28),
        0 0 0 1px rgba(5, 184, 125, 0.32);
    }
    body.libreoffice-page-task9 .libreoffice-hf-answer-actions-row--premium .libreoffice-hf-action-btn--file-solution {
      border-color: rgba(99, 140, 255, 0.45);
      background: linear-gradient(180deg, rgba(40, 52, 78, 0.98) 0%, rgba(28, 36, 56, 0.98) 100%);
      color: rgba(210, 225, 255, 0.95);
    }
    body.libreoffice-page-task9 .libreoffice-hf-answer-actions-row--premium .libreoffice-hf-action-btn--file-solution:hover {
      border-color: rgba(99, 140, 255, 0.7);
      background: linear-gradient(180deg, rgba(59, 88, 150, 0.55) 0%, rgba(40, 58, 100, 0.45) 100%);
      color: #f5f8ff;
      box-shadow:
        0 4px 14px rgba(80, 120, 220, 0.22),
        0 0 0 1px rgba(99, 140, 255, 0.3);
    }
    body.libreoffice-page-task9 .libreoffice-hf-answer-actions-row--premium .libreoffice-hf-action-btn--ai-agent {
      border-color: rgba(129, 140, 248, 0.55);
      background: linear-gradient(
        135deg,
        rgba(79, 70, 229, 0.55) 0%,
        rgba(5, 184, 125, 0.38) 52%,
        rgba(14, 165, 233, 0.42) 100%
      );
      color: #f5f3ff;
      box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.18) inset,
        0 2px 12px rgba(79, 70, 229, 0.28),
        0 0 20px rgba(5, 184, 125, 0.15);
    }
    body.libreoffice-page-task9 .libreoffice-hf-answer-actions-row--premium .libreoffice-hf-action-btn--ai-agent:hover {
      border-color: rgba(165, 180, 252, 0.85);
      background: linear-gradient(
        135deg,
        rgba(99, 102, 241, 0.72) 0%,
        rgba(5, 184, 125, 0.48) 50%,
        rgba(56, 189, 248, 0.55) 100%
      );
      color: #ffffff;
      box-shadow:
        0 4px 18px rgba(99, 102, 241, 0.35),
        0 0 24px rgba(5, 184, 125, 0.22),
        0 0 0 1px rgba(129, 140, 248, 0.45);
      transform: translateY(-1px);
    }
    body.libreoffice-page-task9 .libreoffice-hf-action-btn--ai-agent .neuroege-ai-agent-btn__icon {
      color: #e0e7ff;
      filter: drop-shadow(0 0 6px rgba(165, 180, 252, 0.65));
    }
    body.libreoffice-page-task9 .libreoffice-hf-action-btn--link:hover {
      border-style: solid;
    }
    body.libreoffice-page-task9 .libreoffice-hf-action-btn__icon {
      font-size: 1rem;
      line-height: 1;
      flex-shrink: 0;
    }
    body.libreoffice-page-task9 .libreoffice-hf-action-btn__img {
      display: block;
      flex-shrink: 0;
    }
    body.libreoffice-page-task9 .hf-calc-download-icon--dark {
      display: none;
    }
    [data-theme="light"] body.libreoffice-page-task9 .hf-calc-download-icon--light {
      display: block;
    }
    [data-theme="light"] body.libreoffice-page-task9 .hf-calc-download-icon--dark {
      display: none;
    }
    body.libreoffice-page-task9 .libreoffice-hf-action-btn__text {
      line-height: 1.2;
    }
    body.libreoffice-page-task9 .libreoffice-hf-action-btn .task-answer-peek__value {
      font-variant-numeric: tabular-nums;
      font-weight: 700;
    }
    [data-theme="light"] body.libreoffice-page-task9 .libreoffice-hf-action-btn {
      border-color: rgba(0, 0, 0, 0.1);
      background: linear-gradient(180deg, #ffffff 0%, #f3f4f6 100%);
      color: rgba(29, 29, 31, 0.92);
      box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    }
    [data-theme="light"] body.libreoffice-page-task9 .libreoffice-hf-answer-actions-row--premium .libreoffice-hf-action-btn:hover {
      border-color: rgba(5, 184, 125, 0.55);
      background: linear-gradient(180deg, rgba(5, 184, 125, 0.16) 0%, rgba(5, 184, 125, 0.1) 100%);
      color: #047857;
      box-shadow: 0 4px 12px rgba(5, 184, 125, 0.15);
    }
    [data-theme="light"] body.libreoffice-page-task9 .libreoffice-hf-answer-actions-row:not(.libreoffice-hf-answer-actions-row--premium) .libreoffice-hf-action-btn:hover {
      border-color: rgba(5, 184, 125, 0.5);
      background: rgba(5, 184, 125, 0.1);
      color: #047857;
    }
    [data-theme="light"] body.libreoffice-page-task9 .libreoffice-hf-answer-actions-row--premium .libreoffice-hf-action-btn--file-variant {
      border-color: rgba(5, 184, 125, 0.45);
      background: linear-gradient(180deg, #ecfdf5 0%, #d1fae5 100%);
      color: #047857;
    }
    [data-theme="light"] body.libreoffice-page-task9 .libreoffice-hf-answer-actions-row--premium .libreoffice-hf-action-btn--file-variant:hover {
      border-color: rgba(5, 184, 125, 0.65);
      background: linear-gradient(180deg, #d1fae5 0%, #a7f3d0 100%);
      color: #065f46;
      box-shadow: 0 4px 12px rgba(5, 184, 125, 0.18);
    }
    [data-theme="light"] body.libreoffice-page-task9 .libreoffice-hf-answer-actions-row--premium .libreoffice-hf-action-btn--file-solution {
      border-color: rgba(59, 130, 246, 0.4);
      background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
      color: #1e3a5f;
    }
    [data-theme="light"] body.libreoffice-page-task9 .libreoffice-hf-answer-actions-row--premium .libreoffice-hf-action-btn--file-solution:hover {
      border-color: rgba(59, 130, 246, 0.6);
      background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
      color: #1d4ed8;
      box-shadow: 0 4px 12px rgba(59, 130, 246, 0.14);
    }
    [data-theme="light"] body.libreoffice-page-task9 .libreoffice-hf-answer-actions-row--premium .libreoffice-hf-action-btn--ai-agent {
      border-color: rgba(99, 102, 241, 0.45);
      background: linear-gradient(135deg, #eef2ff 0%, #ecfdf5 48%, #e0f2fe 100%);
      color: #3730a3;
      box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 2px 10px rgba(99, 102, 241, 0.12);
    }
    [data-theme="light"] body.libreoffice-page-task9 .libreoffice-hf-answer-actions-row--premium .libreoffice-hf-action-btn--ai-agent:hover {
      border-color: rgba(79, 70, 229, 0.55);
      background: linear-gradient(135deg, #e0e7ff 0%, #d1fae5 50%, #bae6fd 100%);
      color: #312e81;
      box-shadow:
        0 4px 14px rgba(99, 102, 241, 0.2),
        0 0 18px rgba(5, 184, 125, 0.12);
    }
    [data-theme="light"] body.libreoffice-page-task9 .libreoffice-hf-action-btn--ai-agent .neuroege-ai-agent-btn__icon {
      color: #4f46e5;
      filter: none;
    }
    [data-theme="light"] body.libreoffice-page-task9 .libreoffice-hf-action-btn--link {
      background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    }
    body.libreoffice-page-task9 .libreoffice-hf-answer-actions-row .task-answer-peek {
      margin-top: 0;
    }
    body.libreoffice-page-task9 .libreoffice-hf-answer-actions-row .task-9-download-link {
      margin-left: 0;
    }
    /* Задание 10: чуть компактнее кнопки в ряду действий */
    body.neuroege-writer-page.libreoffice-page-task9 .libreoffice-hf-answer-actions-row--task10 .libreoffice-hf-answer-actions-row__row,
    body.libreoffice-page-task9 .libreoffice-hf-answer-actions-row--task10 .libreoffice-hf-answer-actions-row__row {
      gap: 0.32rem;
    }
    body.neuroege-writer-page.libreoffice-page-task9 .libreoffice-hf-answer-actions-row--task10 .libreoffice-hf-action-btn,
    body.libreoffice-page-task9 .libreoffice-hf-answer-actions-row--task10 .libreoffice-hf-action-btn,
    body.neuroege-writer-page.libreoffice-page-task9 .libreoffice-hf-answer-actions-row--task10 .ege-kid-start-btn,
    body.libreoffice-page-task9 .libreoffice-hf-answer-actions-row--task10 .ege-kid-start-btn,
    body.neuroege-writer-page.libreoffice-page-task9 .libreoffice-hf-answer-actions-row--task10 .video-start-btn,
    body.libreoffice-page-task9 .libreoffice-hf-answer-actions-row--task10 .video-start-btn,
    body.neuroege-writer-page.libreoffice-page-task9 .libreoffice-hf-answer-actions-row--task10 .calc-solutions-start-btn,
    body.libreoffice-page-task9 .libreoffice-hf-answer-actions-row--task10 .calc-solutions-start-btn {
      gap: 0.3rem;
      padding: 0.34rem 0.72rem;
      font-size: 0.74rem;
      min-height: 2.1rem;
    }
    body.neuroege-writer-page.libreoffice-page-task9 .libreoffice-hf-answer-actions-row--task10 .ege-task10-explain-start-btn__hint,
    body.libreoffice-page-task9 .libreoffice-hf-answer-actions-row--task10 .ege-task3-explain-start-btn__hint,
    body.neuroege-writer-page.libreoffice-page-task9 .libreoffice-hf-answer-actions-row--task10 .video-start-btn__hint,
    body.libreoffice-page-task9 .libreoffice-hf-answer-actions-row--task10 .video-start-btn__hint {
      font-size: 0.62rem;
    }
    body.neuroege-hyperformula-page.libreoffice-page-task9 .libreoffice-hf-show-table-btn, body.neuroege-python-task2-page.libreoffice-page-task9 .libreoffice-hf-show-table-btn {
      appearance: none;
      -webkit-appearance: none;
      display: none;
      align-items: center;
      gap: 0.35rem;
      margin: 0;
      padding: 0.4rem 0.75rem;
      border: 1px solid rgba(5, 184, 125, 0.55);
      border-radius: 8px;
      background: rgba(5, 184, 125, 0.12);
      color: var(--green, #05b87d);
      font: inherit;
      font-size: 0.8125rem;
      font-weight: 600;
      cursor: pointer;
      transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    }
    body.neuroege-hyperformula-page.libreoffice-page-task9.neuroege-hf-statement-fullscreen .libreoffice-hf-show-table-btn, body.neuroege-python-task2-page.libreoffice-page-task9.neuroege-hf-statement-fullscreen .libreoffice-hf-show-table-btn {
      display: inline-flex;
    }
    body.neuroege-hyperformula-page.libreoffice-page-task9 .libreoffice-hf-show-table-btn:hover, body.neuroege-python-task2-page.libreoffice-page-task9 .libreoffice-hf-show-table-btn:hover {
      background: rgba(5, 184, 125, 0.2);
      border-color: rgba(5, 184, 125, 0.75);
      color: #0dd99a;
    }
    body.neuroege-hyperformula-page.libreoffice-page-task9 .libreoffice-hf-show-table-btn:focus-visible, body.neuroege-python-task2-page.libreoffice-page-task9 .libreoffice-hf-show-table-btn:focus-visible {
      outline: 2px solid var(--green, #05b87d);
      outline-offset: 2px;
    }
    [data-theme="light"] body.neuroege-hyperformula-page.libreoffice-page-task9 .libreoffice-hf-show-table-btn, [data-theme="light"] body.neuroege-python-task2-page.libreoffice-page-task9 .libreoffice-hf-show-table-btn {
      border-color: rgba(5, 184, 125, 0.45);
      background: rgba(5, 184, 125, 0.08);
      color: #047857;
    }
    /* Совместимость: peek вне блока действий */
    .task-answer-peek:not(.libreoffice-hf-action-btn) {
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      margin: 0.5rem 0 0;
      padding: 0.35rem 0.55rem;
      border: 1px dashed rgba(255, 255, 255, 0.35);
      border-radius: 8px;
      background: rgba(255, 255, 255, 0.06);
      color: rgba(255, 255, 255, 0.75);
      font: inherit;
      font-size: 0.78rem;
      cursor: pointer;
    }
    .task-answer-peek__icon { font-size: 1.05rem; line-height: 1; }
    .task-answer-peek__value { font-variant-numeric: tabular-nums; font-weight: 600; }
    body.libreoffice-task9-col-resize-active {
      cursor: col-resize !important;
      user-select: none;
    }

    /*
     * Вводный HTML (EgeTaskTrainerIntro): layout — см. static/css/hf_trainer_intro_premium.css
     */
    /* task3 /hyperformula/task3/: вводный текст заполняет колонку до блока ответа (и зоны ИИ-чата), без полосы скролла снаружи */
    body.neuroege-hyperformula-page.libreoffice-page-task9.libreoffice-page-hf-task-list .libreoffice-task9-page .task-solve__right > .neuroege-hf-trainer-intro.neuroege-hf-trainer-intro--wysiwyg.task-solve__statement, body.neuroege-python-task2-page.libreoffice-page-task9.libreoffice-page-hf-task-list .libreoffice-task9-page .task-solve__right > .neuroege-hf-trainer-intro.neuroege-hf-trainer-intro--wysiwyg.task-solve__statement {
      flex: 1 1 auto;
      min-height: 0;
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }
    /*
     * display:flex выше перебивает стандартное [hidden]{display:none} (у [hidden] в UA нет !important),
     * поэтому JS (скрытие вводного текста при выборе варианта) не прятал блок — явно none.
     */
    body.neuroege-hyperformula-page .libreoffice-task9-page .task-solve__right > .neuroege-hf-trainer-intro[hidden],
    body.neuroege-python-task2-page .libreoffice-task9-page .task-solve__right > .neuroege-hf-trainer-intro[hidden] {
      display: none !important;
    }
    body.neuroege-hyperformula-page .neuroege-hf-trainer-intro--wysiwyg .neuroege-hf-trainer-intro__inner,
    body.neuroege-python-task2-page .neuroege-hf-trainer-intro--wysiwyg .neuroege-hf-trainer-intro__inner {
      box-sizing: border-box;
      width: 100%;
      min-width: 0;
      overflow-wrap: break-word;
      word-break: break-word;
    }
    body.neuroege-hyperformula-page.libreoffice-page-hf-task-list .neuroege-hf-trainer-intro--wysiwyg .neuroege-hf-trainer-intro__inner, body.neuroege-python-task2-page.libreoffice-page-hf-task-list .neuroege-hf-trainer-intro--wysiwyg .neuroege-hf-trainer-intro__inner {
      flex: 1 1 auto;
      min-height: 0;
      overflow-x: hidden;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
      -ms-overflow-style: none;
    }
    body.neuroege-hyperformula-page.libreoffice-page-hf-task-list .neuroege-hf-trainer-intro--wysiwyg .neuroege-hf-trainer-intro__inner::-webkit-scrollbar, body.neuroege-python-task2-page.libreoffice-page-hf-task-list .neuroege-hf-trainer-intro--wysiwyg .neuroege-hf-trainer-intro__inner::-webkit-scrollbar {
      width: 0;
      height: 0;
    }
    /* Legacy intro HTML (admin) без .hf-intro */
    body.neuroege-hyperformula-page .neuroege-hf-trainer-intro--wysiwyg:not(.neuroege-hf-trainer-intro--premium) .neuroege-hf-trainer-intro__inner > .neuroege-hf-trainer-intro-layout,
    body.neuroege-python-task2-page .neuroege-hf-trainer-intro--wysiwyg:not(.neuroege-hf-trainer-intro--premium) .neuroege-hf-trainer-intro__inner > .neuroege-hf-trainer-intro-layout {
      max-width: 100%;
      box-sizing: border-box;
    }
