/* EGE variant exam + /taskN/slug/ — parity with OGE #task-answer-section */

html.has-answer-row-parity .variant-exam,
html.has-answer-row-parity .variant-exam-body .variant-exam {
  --oge-calc-solution-accent: var(--ve-accent, #14b8a6);
  --oge-calc-solution-accent-deep: #0f766e;
  --oge-calc-solution-accent-muted: #5eead4;
  --oge-calc-solution-accent-border: rgba(20, 184, 166, 0.42);
  --oge-calc-solution-text: #ecfdf5;
  --oge-calc-solution-shadow-deep: rgba(15, 118, 110, 0.45);
}

html[data-theme="light"].has-answer-row-parity .variant-exam,
html[data-theme="light"].has-answer-row-parity .variant-exam-body .variant-exam {
  --oge-calc-solution-accent-deep: #047857;
  --oge-calc-solution-accent-muted: #34d399;
  --oge-calc-solution-accent-border: rgba(5, 150, 105, 0.32);
  --oge-calc-solution-text: #065f46;
  --oge-calc-solution-shadow-deep: rgba(5, 150, 105, 0.22);
}

html.has-answer-row-parity #task-answer-section:not([hidden]) {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 20px;
  background: linear-gradient(
    168deg,
    rgba(42, 50, 64, 0.98) 0%,
    rgba(26, 32, 44, 0.96) 46%,
    rgba(16, 20, 30, 0.98) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.12) inset,
    0 -2px 0 rgba(0, 0, 0, 0.38) inset,
    0 12px 40px rgba(0, 0, 0, 0.48),
    0 4px 14px rgba(0, 0, 0, 0.32),
    0 0 0 1px rgba(255, 255, 255, 0.05);
}

html.has-answer-row-parity #task-answer-section:not([hidden])::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.42) 50%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 2;
}

html.has-answer-row-parity #task-answer-section:not([hidden])::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    168deg,
    rgba(20, 184, 166, 0.42) 0%,
    rgba(255, 255, 255, 0.1) 38%,
    rgba(139, 92, 246, 0.28) 100%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 1;
}

html.has-answer-row-parity .variant-exam__answer-row .libreoffice-hf-answer-actions-row {
  width: 100%;
  box-sizing: border-box;
}

html.has-answer-row-parity #task-answer-section:not([hidden]) .libreoffice-hf-answer-actions-row {
  margin: 0;
  padding: 0.9rem 1.05rem 1rem;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

html[data-theme="light"].has-answer-row-parity #task-answer-section:not([hidden]) {
  background: linear-gradient(
    168deg,
    #ffffff 0%,
    #f8fafc 48%,
    #eef2f7 100%
  );
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.98) inset,
    0 -1px 0 rgba(15, 23, 42, 0.06) inset,
    0 12px 36px rgba(15, 23, 42, 0.12),
    0 4px 12px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"].has-answer-row-parity #task-answer-section:not([hidden])::before {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.95) 50%,
    transparent 100%
  );
}

html[data-theme="light"].has-answer-row-parity #task-answer-section:not([hidden])::after {
  background: linear-gradient(
    168deg,
    rgba(20, 184, 166, 0.35) 0%,
    rgba(255, 255, 255, 0.55) 40%,
    rgba(139, 92, 246, 0.22) 100%
  );
}
html.has-answer-row-parity .variant-exam__answer-row .libreoffice-hf-answer-actions-row {
  width: 100%;
  box-sizing: border-box;
}
html.has-answer-row-parity #task-answer-section:not([hidden]) .libreoffice-hf-answer-actions-row__row {
  gap: 0.7rem;
  row-gap: 0.65rem;
}

bodyhtml.has-answer-row-parity #task-answer-section:not([hidden]) .libreoffice-hf-answer-actions-row__row > .libreoffice-hf-action-btn,
bodyhtml.has-answer-row-parity #task-answer-section:not([hidden]) .libreoffice-hf-answer-actions-row__row > a.libreoffice-hf-action-btn,
bodyhtml.has-answer-row-parity #task-answer-section:not([hidden]) .libreoffice-hf-answer-actions-row__row > .libreoffice-hf-answer-tools-group,
bodyhtml.has-answer-row-parity #task-answer-section:not([hidden]) .libreoffice-hf-answer-actions-row__row > .task8-python-solutions-switcher-mount,
bodyhtml.has-answer-row-parity #task-answer-section:not([hidden]) .libreoffice-hf-answer-actions-row__row > .task26-python-solutions-switcher-mount,
bodyhtml.has-answer-row-parity #task-answer-section:not([hidden]) .libreoffice-hf-answer-actions-row__row > .task9-calc-solution-toolbar {
  flex-shrink: 0;
}

html.has-answer-row-parity #task-answer-section:not([hidden]) .libreoffice-hf-action-btn {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  border-style: solid;
  border-radius: 999px;
  font: inherit;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  min-height: 2.85rem;
  padding: 0.68rem 1.3rem;
  font-size: 0.9375rem;
  font-weight: 700;
  gap: 0.55rem;
  border-width: 1.5px;
  letter-spacing: 0.015em;
  box-shadow:
    0 4px 0 rgba(0, 0, 0, 0.28),
    0 8px 22px rgba(0, 0, 0, 0.3),
    0 1px 0 rgba(255, 255, 255, 0.2) inset,
    0 -1px 0 rgba(0, 0, 0, 0.18) inset;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.14s ease;
}

html.has-answer-row-parity #task-answer-section:not([hidden]) .libreoffice-hf-action-btn__icon,
html.has-answer-row-parity #task-answer-section:not([hidden]) .neuroege-ai-chat__fab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex-shrink: 0;
  font-size: 1.15rem;
}

html.has-answer-row-parity #task-answer-section:not([hidden]) .libreoffice-hf-action-btn__text {
  line-height: 1.2;
}

html.has-answer-row-parity #task-answer-section:not([hidden]) .libreoffice-hf-action-btn:focus-visible {
  outline: 2px solid rgba(20, 184, 166, 0.85);
  outline-offset: 2px;
}

html.has-answer-row-parity #task-answer-section:not([hidden]) .libreoffice-hf-action-btn:hover {
  transform: translateY(-3px);
  box-shadow:
    0 6px 0 rgba(0, 0, 0, 0.24),
    0 14px 28px rgba(0, 0, 0, 0.34),
    0 1px 0 rgba(255, 255, 255, 0.24) inset,
    0 -1px 0 rgba(0, 0, 0, 0.14) inset;
}

html.has-answer-row-parity #task-answer-section:not([hidden]) .libreoffice-hf-action-btn:active {
  transform: translateY(2px);
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.32),
    0 4px 10px rgba(0, 0, 0, 0.22),
    0 1px 0 rgba(255, 255, 255, 0.12) inset;
}

/* Ответ — «попади в цель» */
html.has-answer-row-parity #task-answer-section:not([hidden]) .libreoffice-hf-action-btn--answer-peek,
html.has-answer-row-parity #task-answer-section:not([hidden]) .task-answer-peek:not(.python-sandbox__action--show-solution) {
  border-color: rgba(251, 191, 36, 0.58);
  background: linear-gradient(
    135deg,
    rgba(251, 191, 36, 0.32) 0%,
    rgba(245, 158, 11, 0.22) 48%,
    rgba(234, 88, 12, 0.16) 100%
  );
  color: #fffbeb;
  box-shadow:
    0 4px 0 rgba(180, 83, 9, 0.45),
    0 8px 22px rgba(251, 191, 36, 0.28),
    0 1px 0 rgba(255, 255, 255, 0.22) inset,
    0 -1px 0 rgba(120, 53, 15, 0.35) inset;
}

html.has-answer-row-parity #task-answer-section:not([hidden]) .libreoffice-hf-action-btn--answer-peek:hover,
html.has-answer-row-parity #task-answer-section:not([hidden]) .task-answer-peek:not(.python-sandbox__action--show-solution):hover {
  border-color: rgba(252, 211, 77, 0.85);
  background: linear-gradient(
    135deg,
    rgba(252, 211, 77, 0.48) 0%,
    rgba(251, 191, 36, 0.36) 50%,
    rgba(245, 158, 11, 0.28) 100%
  );
  color: #ffffff;
  box-shadow:
    0 6px 0 rgba(180, 83, 9, 0.38),
    0 14px 30px rgba(251, 191, 36, 0.38),
    0 1px 0 rgba(255, 255, 255, 0.28) inset,
    0 0 0 1px rgba(252, 211, 77, 0.35);
}

html.has-answer-row-parity #task-answer-section:not([hidden]) .libreoffice-hf-action-btn--answer-peek[aria-expanded="true"],
html.has-answer-row-parity #task-answer-section:not([hidden]) .task-answer-peek:not(.python-sandbox__action--show-solution)[aria-expanded="true"] {
  border-color: rgba(252, 211, 77, 0.9);
  background: linear-gradient(
    135deg,
    rgba(252, 211, 77, 0.55) 0%,
    rgba(251, 191, 36, 0.42) 100%
  );
  box-shadow:
    0 3px 0 rgba(180, 83, 9, 0.42),
    0 0 0 2px rgba(251, 191, 36, 0.35),
    0 10px 28px rgba(251, 191, 36, 0.32),
    0 1px 0 rgba(255, 255, 255, 0.24) inset;
}

/* Решение — «собери пазл» */
html.has-answer-row-parity #task-answer-section:not([hidden]) .libreoffice-hf-action-btn--solution-peek,
html.has-answer-row-parity #task-answer-section:not([hidden]) .python-sandbox__action--show-solution {
  border-color: rgba(167, 139, 250, 0.58);
  background: linear-gradient(
    135deg,
    rgba(139, 92, 246, 0.34) 0%,
    rgba(99, 102, 241, 0.24) 50%,
    rgba(79, 70, 229, 0.18) 100%
  );
  color: #f5f3ff;
  box-shadow:
    0 4px 0 rgba(76, 29, 149, 0.42),
    0 8px 22px rgba(139, 92, 246, 0.3),
    0 1px 0 rgba(255, 255, 255, 0.2) inset,
    0 -1px 0 rgba(49, 46, 129, 0.38) inset;
}

html.has-answer-row-parity #task-answer-section:not([hidden]) .libreoffice-hf-action-btn--solution-peek:hover,
html.has-answer-row-parity #task-answer-section:not([hidden]) .python-sandbox__action--show-solution:hover {
  border-color: rgba(196, 181, 253, 0.88);
  background: linear-gradient(
    135deg,
    rgba(167, 139, 250, 0.52) 0%,
    rgba(129, 140, 248, 0.4) 50%,
    rgba(99, 102, 241, 0.32) 100%
  );
  color: #ffffff;
  box-shadow:
    0 6px 0 rgba(76, 29, 149, 0.36),
    0 14px 30px rgba(139, 92, 246, 0.4),
    0 1px 0 rgba(255, 255, 255, 0.26) inset,
    0 0 0 1px rgba(196, 181, 253, 0.38);
}

html.has-answer-row-parity #task-answer-section:not([hidden]) .libreoffice-hf-action-btn--solution-peek[aria-expanded="true"],
html.has-answer-row-parity #task-answer-section:not([hidden]) .python-sandbox__action--show-solution[aria-expanded="true"] {
  border-color: rgba(196, 181, 253, 0.92);
  background: linear-gradient(
    135deg,
    rgba(167, 139, 250, 0.58) 0%,
    rgba(129, 140, 248, 0.46) 100%
  );
  box-shadow:
    0 3px 0 rgba(76, 29, 149, 0.4),
    0 0 0 2px rgba(139, 92, 246, 0.35),
    0 10px 28px rgba(139, 92, 246, 0.34),
    0 1px 0 rgba(255, 255, 255, 0.22) inset;
}

html.has-answer-row-parity #task-answer-section:not([hidden]) .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 4px 0 rgba(49, 46, 129, 0.4),
    0 8px 22px rgba(99, 102, 241, 0.28),
    0 1px 0 rgba(255, 255, 255, 0.2) inset,
    0 -1px 0 rgba(30, 27, 75, 0.35) inset;
}

html.has-answer-row-parity #task-answer-section:not([hidden]) .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 6px 0 rgba(49, 46, 129, 0.34),
    0 14px 30px rgba(99, 102, 241, 0.38),
    0 1px 0 rgba(255, 255, 255, 0.26) inset;
}

/* Иконки через CSS — JS может подставлять 👁/🙈, но детям показываем 🎯/🧩 */
html.has-answer-row-parity #task-answer-section:not([hidden]) .task-answer-peek .task-answer-peek__icon,
html.has-answer-row-parity #task-answer-section:not([hidden]) .python-sandbox__action--show-solution .task-answer-peek__icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 0;
  line-height: 0;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

html.has-answer-row-parity #task-answer-section:not([hidden]) .task-answer-peek .task-answer-peek__icon::before,
html.has-answer-row-parity #task-answer-section:not([hidden]) .python-sandbox__action--show-solution .task-answer-peek__icon::before {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.12rem;
  line-height: 1;
}

html.has-answer-row-parity #task-answer-section:not([hidden]) .task-answer-peek[aria-expanded="false"] .task-answer-peek__icon::before {
  content: "🎯";
}

html.has-answer-row-parity #task-answer-section:not([hidden]) .task-answer-peek[aria-expanded="true"] .task-answer-peek__icon::before {
  content: "🙈";
}

html.has-answer-row-parity #task-answer-section:not([hidden]) .python-sandbox__action--show-solution[aria-expanded="false"] .task-answer-peek__icon::before {
  content: "🧩";
}

html.has-answer-row-parity #task-answer-section:not([hidden]) .python-sandbox__action--show-solution[aria-expanded="true"] .task-answer-peek__icon::before {
  content: "🙈";
}

html.has-answer-row-parity #task-answer-section:not([hidden]) .task-answer-peek:focus-visible,
html.has-answer-row-parity #task-answer-section:not([hidden]) .python-sandbox__action--show-solution:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.65);
  outline-offset: 2px;
}

html[data-theme="light"].has-answer-row-parity #task-answer-section:not([hidden]) .libreoffice-hf-action-btn {
  box-shadow:
    0 4px 0 rgba(15, 23, 42, 0.1),
    0 8px 18px rgba(15, 23, 42, 0.1),
    0 1px 0 rgba(255, 255, 255, 0.95) inset;
}

html[data-theme="light"].has-answer-row-parity #task-answer-section:not([hidden]) .task-answer-peek:not(.python-sandbox__action--show-solution) {
  border-color: rgba(245, 158, 11, 0.55);
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 52%, #fcd34d 100%);
  color: #92400e;
  box-shadow:
    0 4px 0 rgba(217, 119, 6, 0.28),
    0 8px 18px rgba(245, 158, 11, 0.22),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

html[data-theme="light"].has-answer-row-parity #task-answer-section:not([hidden]) .task-answer-peek:not(.python-sandbox__action--show-solution):hover {
  border-color: rgba(217, 119, 6, 0.65);
  background: linear-gradient(135deg, #fde68a 0%, #fcd34d 52%, #fbbf24 100%);
  color: #78350f;
  box-shadow:
    0 6px 0 rgba(217, 119, 6, 0.22),
    0 12px 24px rgba(245, 158, 11, 0.28);
}

html[data-theme="light"].has-answer-row-parity #task-answer-section:not([hidden]) .python-sandbox__action--show-solution {
  border-color: rgba(124, 58, 237, 0.45);
  background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 52%, #c4b5fd 100%);
  color: #5b21b6;
  box-shadow:
    0 4px 0 rgba(109, 40, 217, 0.22),
    0 8px 18px rgba(124, 58, 237, 0.16),
    0 1px 0 rgba(255, 255, 255, 0.92) inset;
}

html[data-theme="light"].has-answer-row-parity #task-answer-section:not([hidden]) .python-sandbox__action--show-solution:hover {
  border-color: rgba(109, 40, 217, 0.58);
  background: linear-gradient(135deg, #ddd6fe 0%, #c4b5fd 52%, #a78bfa 100%);
  color: #4c1d95;
  box-shadow:
    0 6px 0 rgba(109, 40, 217, 0.18),
    0 12px 24px rgba(124, 58, 237, 0.22);
}

html[data-theme="light"].has-answer-row-parity #task-answer-section:not([hidden]) .task-answer-peek .task-answer-peek__icon,
html[data-theme="light"].has-answer-row-parity #task-answer-section:not([hidden]) .python-sandbox__action--show-solution .task-answer-peek__icon {
  background: rgba(255, 255, 255, 0.55);
}

html[data-theme="light"].has-answer-row-parity #task-answer-section:not([hidden]) .libreoffice-hf-action-btn--ai-agent {
  border-color: rgba(99, 102, 241, 0.45);
  background: linear-gradient(
    135deg,
    rgba(224, 231, 255, 0.98) 0%,
    rgba(204, 251, 241, 0.95) 52%,
    rgba(186, 230, 253, 0.95) 100%
  );
  color: #3730a3;
  box-shadow:
    0 4px 0 rgba(99, 102, 241, 0.18),
    0 8px 18px rgba(99, 102, 241, 0.14),
    0 1px 0 rgba(255, 255, 255, 0.95) inset;
}

html[data-theme="light"].has-answer-row-parity #task-answer-section:not([hidden]) .libreoffice-hf-action-btn--ai-agent:hover {
  border-color: rgba(79, 70, 229, 0.55);
  background: linear-gradient(
    135deg,
    rgba(199, 210, 254, 0.98) 0%,
    rgba(153, 246, 228, 0.95) 50%,
    rgba(125, 211, 252, 0.95) 100%
  );
  color: #312e81;
}
/* ОГЭ task 14 — task9-calc-solution-toolbar в строке ответов после «Ответ» */
html.has-answer-row-parity #task-answer-section:not([hidden]) .task9-calc-solution-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  margin: 0;
  padding: 0.34rem 0.42rem 0.34rem 0.46rem;
  border: 1.5px solid var(--oge-calc-solution-accent-border);
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--oge-calc-solution-accent) 20%, transparent) 0%,
    color-mix(in srgb, var(--oge-calc-solution-accent-deep) 12%, transparent) 100%
  );
  box-shadow:
    0 4px 0 var(--oge-calc-solution-shadow-deep),
    0 8px 22px color-mix(in srgb, var(--oge-calc-solution-accent) 26%, transparent),
    0 1px 0 rgba(255, 255, 255, 0.16) inset,
    0 -1px 0 rgba(0, 0, 0, 0.14) inset;
  --oge-kumir-chrome-btn-text: var(--oge-calc-solution-text);
  --oge-kumir-chrome-btn-hover-bg: color-mix(in srgb, var(--oge-calc-solution-accent-muted) 22%, transparent);
  --oge-kumir-chrome-btn-hover-border: color-mix(in srgb, var(--oge-calc-solution-accent) 46%, transparent);
  --oge-kumir-chrome-btn-active-bg: color-mix(in srgb, var(--oge-calc-solution-accent) 30%, transparent);
  --oge-kumir-chrome-btn-active-border: color-mix(in srgb, var(--oge-calc-solution-accent) 56%, transparent);
  --oge-kumir-chrome-btn-active-shadow: inset 0 1px 2px color-mix(in srgb, var(--oge-calc-solution-accent-deep) 32%, transparent);
}

html.has-answer-row-parity #task-answer-section:not([hidden]) .task9-calc-solution-toolbar__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0.58rem 1.15rem 0.58rem 0.88rem;
  min-height: 2.55rem;
  border: 1.5px solid color-mix(in srgb, var(--oge-calc-solution-accent-muted) 52%, transparent);
  border-radius: 999px;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--oge-calc-solution-accent) 36%, transparent) 0%,
    color-mix(in srgb, var(--oge-calc-solution-accent-deep) 26%, transparent) 52%,
    color-mix(in srgb, var(--oge-calc-solution-accent-deep) 20%, transparent) 100%
  );
  color: var(--oge-calc-solution-text);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.015em;
  line-height: 1.2;
  cursor: pointer;
  box-shadow:
    0 3px 0 color-mix(in srgb, var(--oge-calc-solution-accent-deep) 58%, #000),
    0 6px 16px color-mix(in srgb, var(--oge-calc-solution-accent) 24%, transparent),
    0 1px 0 rgba(255, 255, 255, 0.18) inset;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.14s ease;
}

html.has-answer-row-parity #task-answer-section:not([hidden]) .task9-calc-solution-toolbar__toggle:hover {
  border-color: color-mix(in srgb, var(--oge-calc-solution-accent-muted) 78%, transparent);
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--oge-calc-solution-accent) 48%, transparent) 0%,
    color-mix(in srgb, var(--oge-calc-solution-accent) 34%, transparent) 50%,
    color-mix(in srgb, var(--oge-calc-solution-accent-deep) 28%, transparent) 100%
  );
  transform: translateY(-2px);
  box-shadow:
    0 5px 0 color-mix(in srgb, var(--oge-calc-solution-accent-deep) 50%, #000),
    0 12px 24px color-mix(in srgb, var(--oge-calc-solution-accent) 32%, transparent),
    0 1px 0 rgba(255, 255, 255, 0.22) inset;
}

html.has-answer-row-parity #task-answer-section:not([hidden]) .task9-calc-solution-toolbar__toggle:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--oge-calc-solution-accent) 78%, transparent);
  outline-offset: 2px;
}

html.has-answer-row-parity #task-answer-section:not([hidden]) .task9-calc-solution-toolbar__toggle:active {
  transform: translateY(1px);
  box-shadow:
    0 1px 0 color-mix(in srgb, var(--oge-calc-solution-accent-deep) 55%, #000),
    0 4px 10px color-mix(in srgb, var(--oge-calc-solution-accent) 18%, transparent),
    0 1px 0 rgba(255, 255, 255, 0.12) inset;
}

html.has-answer-row-parity #task-answer-section:not([hidden]) .task9-calc-solution-toolbar__toggle[aria-expanded="true"] {
  border-color: color-mix(in srgb, var(--oge-calc-solution-accent-muted) 88%, transparent);
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--oge-calc-solution-accent) 52%, transparent) 0%,
    color-mix(in srgb, var(--oge-calc-solution-accent) 40%, transparent) 100%
  );
  box-shadow:
    0 2px 0 color-mix(in srgb, var(--oge-calc-solution-accent-deep) 52%, #000),
    0 0 0 2px color-mix(in srgb, var(--oge-calc-solution-accent) 28%, transparent),
    0 8px 20px color-mix(in srgb, var(--oge-calc-solution-accent) 30%, transparent),
    0 1px 0 rgba(255, 255, 255, 0.2) inset;
}

.task9-calc-solution-toolbar__toggle-icon,
.oge-task14-solution-toggle__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.oge-task14-solution-toggle__svg {
  display: block;
}

html.has-answer-row-parity #task-answer-section:not([hidden]) .task9-calc-solution-toolbar__toggle[aria-expanded="true"] .oge-task14-solution-toggle__svg--show {
  display: none;
}

html.has-answer-row-parity #task-answer-section:not([hidden]) .task9-calc-solution-toolbar__toggle[aria-expanded="false"] .oge-task14-solution-toggle__svg--hide,
html.has-answer-row-parity #task-answer-section:not([hidden]) .task9-calc-solution-toolbar__toggle:not([aria-expanded="true"]) .oge-task14-solution-toggle__svg--hide {
  display: none;
}

html.has-answer-row-parity #task-answer-section:not([hidden]) .task9-calc-solution-toolbar__toggle[aria-expanded="true"] .oge-task14-solution-toggle__svg--hide {
  display: block;
}

html.has-answer-row-parity #task-answer-section:not([hidden]) .task9-calc-solution-toolbar__run-tools[hidden] {
  display: none !important;
}

html.has-answer-row-parity #task-answer-section:not([hidden]) .task9-calc-solution-toolbar__run-tools.oge-task14-calc-solution-run:not([hidden]),
html.has-answer-row-parity #task-answer-section:not([hidden]) .task9-calc-solution-toolbar__run-tools.oge-paint-solution-run:not([hidden]) {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  margin: 0;
  padding: 0 0.12rem 0 0.28rem;
  border-left: 1px solid color-mix(in srgb, var(--oge-calc-solution-accent) 32%, transparent);
}

html.has-answer-row-parity #task-answer-section:not([hidden]) .task9-calc-solution-toolbar .oge-kumir-chrome__btn {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  border: 1px solid color-mix(in srgb, var(--oge-calc-solution-accent) 28%, transparent);
  background: color-mix(in srgb, var(--oge-calc-solution-accent) 8%, transparent);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1) inset;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.12s ease;
}

html.has-answer-row-parity #task-answer-section:not([hidden]) .task9-calc-solution-toolbar .oge-kumir-chrome__btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow:
    0 2px 6px color-mix(in srgb, var(--oge-calc-solution-accent) 22%, transparent),
    0 1px 0 rgba(255, 255, 255, 0.14) inset;
}

html[data-theme="light"].has-answer-row-parity .variant-exam, html[data-theme="light"].has-answer-row-parity .variant-exam-body .variant-exam {
  --oge-calc-solution-accent-deep: #047857;
  --oge-calc-solution-accent-muted: #34d399;
  --oge-calc-solution-accent-border: rgba(5, 150, 105, 0.32);
  --oge-calc-solution-text: #065f46;
  --oge-calc-solution-shadow-deep: rgba(5, 150, 105, 0.22);
}

html[data-theme="light"].has-answer-row-parity #task-answer-section:not([hidden]) .task9-calc-solution-toolbar {
  background: linear-gradient(180deg, #ecfdf5 0%, #d1fae5 100%);
  box-shadow:
    0 4px 0 var(--oge-calc-solution-shadow-deep),
    0 8px 18px rgba(15, 23, 42, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.95) inset;
}

html[data-theme="light"].has-answer-row-parity #task-answer-section:not([hidden]) .task9-calc-solution-toolbar__toggle {
  border-color: rgba(5, 150, 105, 0.28);
  background: linear-gradient(180deg, #f0fdf4 0%, #bbf7d0 100%);
  color: #047857;
  box-shadow:
    0 3px 0 rgba(5, 150, 105, 0.2),
    0 6px 14px rgba(15, 23, 42, 0.06),
    0 1px 0 rgba(255, 255, 255, 0.92) inset;
}

html[data-theme="light"].has-answer-row-parity #task-answer-section:not([hidden]) .task9-calc-solution-toolbar__toggle:hover {
  border-color: rgba(5, 150, 105, 0.48);
  background: linear-gradient(180deg, #ecfdf5 0%, #86efac 100%);
  color: #065f46;
  box-shadow:
    0 5px 0 rgba(5, 150, 105, 0.16),
    0 10px 20px rgba(15, 23, 42, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.95) inset;
}

html[data-theme="light"].has-answer-row-parity #task-answer-section:not([hidden]) .task9-calc-solution-toolbar__toggle[aria-expanded="true"] {
  border-color: rgba(5, 150, 105, 0.55);
  background: linear-gradient(180deg, #d1fae5 0%, #6ee7b7 100%);
  color: #064e3b;
  box-shadow:
    0 2px 0 rgba(5, 150, 105, 0.18),
    0 0 0 2px rgba(52, 211, 153, 0.28),
    0 8px 18px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"].has-answer-row-parity #task-answer-section:not([hidden]) .task9-calc-solution-toolbar__run-tools.oge-task14-calc-solution-run,
html[data-theme="light"].has-answer-row-parity #task-answer-section:not([hidden]) .task9-calc-solution-toolbar__run-tools.oge-paint-solution-run {
  border-left-color: rgba(5, 150, 105, 0.22);
}

html[data-theme="light"].has-answer-row-parity #task-answer-section:not([hidden]) .task9-calc-solution-toolbar .oge-kumir-chrome__btn {
  border-color: rgba(5, 150, 105, 0.22);
  background: rgba(255, 255, 255, 0.55);
  color: #047857;
}

html.has-answer-row-parity #task-answer-section:not([hidden]) .libreoffice-hf-action-btn--duty-teacher {
  height: 2.85rem;
  min-height: 2.85rem;
  max-height: 2.85rem;
  padding: 0.68rem 1.3rem;
  overflow: visible;
  border-color: rgba(129, 140, 248, 0.55);
  background: linear-gradient(
    135deg,
    rgba(244, 114, 182, 0.92) 0%,
    rgba(167, 139, 250, 0.9) 52%,
    rgba(56, 189, 248, 0.88) 100%
  );
  color: #fdf4ff;
  box-shadow:
    0 4px 0 rgba(76, 29, 149, 0.4),
    0 8px 22px rgba(167, 139, 250, 0.32),
    0 1px 0 rgba(255, 255, 255, 0.22) inset,
    0 -1px 0 rgba(49, 46, 129, 0.35) inset;
}

html.has-answer-row-parity #task-answer-section:not([hidden]) .libreoffice-hf-action-btn--duty-teacher .libreoffice-hf-action-btn__icon {
  position: relative;
  width: 1.85rem;
  height: 1.85rem;
  flex-shrink: 0;
  overflow: visible;
}

html.has-answer-row-parity #task-answer-section:not([hidden]) .libreoffice-hf-action-btn--duty-teacher .duty-teacher-btn-icon--oge {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2.55rem;
  height: 2.55rem;
  transform: translate(-50%, -50%);
}

html.has-answer-row-parity #task-answer-section:not([hidden]) .libreoffice-hf-action-btn--duty-teacher:hover {
  border-color: rgba(196, 181, 253, 0.85);
  background: linear-gradient(
    135deg,
    rgba(244, 114, 182, 0.98) 0%,
    rgba(167, 139, 250, 0.96) 50%,
    rgba(56, 189, 248, 0.94) 100%
  );
  color: #ffffff;
  box-shadow:
    0 6px 0 rgba(76, 29, 149, 0.34),
    0 14px 30px rgba(167, 139, 250, 0.42),
    0 1px 0 rgba(255, 255, 255, 0.26) inset;
}

html.has-answer-row-parity #task-answer-section:not([hidden]) .libreoffice-hf-action-btn--duty-teacher .duty-teacher-btn-icon {
  border-color: rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.14);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 2px 10px rgba(0, 0, 0, 0.16);
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.35));
}

html[data-theme="light"].has-answer-row-parity #task-answer-section:not([hidden]) .libreoffice-hf-action-btn--duty-teacher {
  color: #ffffff;
  border-color: rgba(167, 139, 250, 0.45);
}
html.has-answer-row-parity body.variant-exam-body .variant-exam__answer-row.task-answer-section:has(.libreoffice-hf-answer-actions-row) {
  padding: 0;
  border-top: none;
  box-shadow: none;
  background: transparent;
}

html[data-theme="light"].has-answer-row-parity #task-answer-section:not([hidden]) .task-answer-peek:focus-visible,
html[data-theme="light"].has-answer-row-parity #task-answer-section:not([hidden]) .python-sandbox__action--show-solution:focus-visible,
html[data-theme="light"].has-answer-row-parity #task-answer-section:not([hidden]) .task9-calc-solution-toolbar__toggle:focus-visible,
html[data-theme="light"].has-answer-row-parity #task-answer-section:not([hidden]) .libreoffice-hf-action-btn:focus-visible {
  outline: 2px solid rgba(5, 150, 105, 0.55);
  outline-offset: 2px;
}

html[data-theme="light"].has-answer-row-parity #task-answer-section:not([hidden]) .task9-calc-solution-toolbar .python-sandbox__action--show-solution {
  border-color: rgba(5, 150, 105, 0.28);
  background: linear-gradient(180deg, #f0fdf4 0%, #bbf7d0 100%);
  color: #047857;
  box-shadow:
    0 3px 0 rgba(5, 150, 105, 0.2),
    0 6px 14px rgba(15, 23, 42, 0.06),
    0 1px 0 rgba(255, 255, 255, 0.92) inset;
}

html[data-theme="light"].has-answer-row-parity #task-answer-section:not([hidden]) .task9-calc-solution-toolbar .python-sandbox__action--show-solution:hover {
  border-color: rgba(5, 150, 105, 0.48);
  background: linear-gradient(180deg, #ecfdf5 0%, #86efac 100%);
  color: #065f46;
}

html[data-theme="light"].has-answer-row-parity #task-answer-section:not([hidden]) .task9-calc-solution-toolbar .python-sandbox__action--show-solution[aria-expanded="true"] {
  border-color: rgba(5, 150, 105, 0.55);
  background: linear-gradient(180deg, #d1fae5 0%, #6ee7b7 100%);
  color: #064e3b;
}

html[data-theme="light"].has-answer-row-parity #task-answer-section:not([hidden]) .task9-calc-solution-toolbar .task-answer-peek__icon,
html[data-theme="light"].has-answer-row-parity #task-answer-section:not([hidden]) .task9-calc-solution-toolbar .oge-task14-solution-toggle__icon {
  background: rgba(255, 255, 255, 0.72);
}

html[data-theme="light"].has-answer-row-parity #task-answer-section:not([hidden]) .libreoffice-hf-action-btn--duty-teacher .duty-teacher-btn-icon {
  border-color: rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.35);
  filter: none;
}

html[data-theme="light"].has-answer-row-parity #task-answer-section:not([hidden]) .neuroege-ai-chat__fab--inline.libreoffice-hf-action-btn--ai-agent {
  border-color: rgba(99, 102, 241, 0.45);
  background: linear-gradient(
    135deg,
    rgba(224, 231, 255, 0.98) 0%,
    rgba(204, 251, 241, 0.95) 52%,
    rgba(186, 230, 253, 0.95) 100%
  );
  color: #3730a3;
  box-shadow:
    0 4px 0 rgba(99, 102, 241, 0.18),
    0 8px 18px rgba(99, 102, 241, 0.14),
    0 1px 0 rgba(255, 255, 255, 0.95) inset;
}

html[data-theme="light"].has-answer-row-parity #task-answer-section:not([hidden]) .neuroege-ai-chat__fab--inline.libreoffice-hf-action-btn--ai-agent:hover {
  border-color: rgba(79, 70, 229, 0.55);
  background: linear-gradient(
    135deg,
    rgba(199, 210, 254, 0.98) 0%,
    rgba(153, 246, 228, 0.95) 50%,
    rgba(125, 211, 252, 0.95) 100%
  );
  color: #312e81;
}

/* Pink palette */
html[data-palette="pink"].has-answer-row-parity .variant-exam, html[data-palette="pink"].has-answer-row-parity .variant-exam-body .variant-exam {
  --oge-calc-solution-accent-deep: var(--accent-deep);
  --oge-calc-solution-accent-muted: var(--accent-secondary);
  --oge-calc-solution-accent-border: var(--accent-border);
  --oge-calc-solution-text: #fce7f3;
  --oge-calc-solution-shadow-deep: color-mix(in srgb, var(--accent-deep) 55%, #000);
}

html[data-palette="pink"].has-answer-row-parity #task-answer-section:not([hidden]) .task9-calc-solution-toolbar {
  background: linear-gradient(
    180deg,
    var(--accent-soft) 0%,
    color-mix(in srgb, var(--accent-deep) 18%, transparent) 100%
  );
}

html[data-palette="pink"].has-answer-row-parity #task-answer-section:not([hidden]) .task9-calc-solution-toolbar__toggle:hover,
html[data-palette="pink"].has-answer-row-parity #task-answer-section:not([hidden]) .task9-calc-solution-toolbar__toggle[aria-expanded="true"] {
  background: var(--gradient-accent);
  border-color: var(--accent-border-strong);
  color: #fff5f9;
}

html[data-palette="pink"][data-theme="light"].has-answer-row-parity .variant-exam, html[data-palette="pink"][data-theme="light"].has-answer-row-parity .variant-exam-body .variant-exam {
  --oge-calc-solution-text: var(--accent-deep);
  --oge-calc-solution-shadow-deep: color-mix(in srgb, var(--accent-deep) 22%, transparent);
}

html[data-palette="pink"][data-theme="light"].has-answer-row-parity #task-answer-section:not([hidden]) .task9-calc-solution-toolbar {
  background: linear-gradient(180deg, #fdf2f8 0%, #fce7f3 100%);
}

html[data-palette="pink"][data-theme="light"].has-answer-row-parity #task-answer-section:not([hidden]) .task9-calc-solution-toolbar__toggle {
  background: linear-gradient(180deg, #fdf2f8 0%, #fce7f3 100%);
  color: var(--accent-deep);
}

html[data-palette="pink"][data-theme="light"].has-answer-row-parity #task-answer-section:not([hidden]) .task9-calc-solution-toolbar__toggle:hover,
html[data-palette="pink"][data-theme="light"].has-answer-row-parity #task-answer-section:not([hidden]) .task9-calc-solution-toolbar__toggle[aria-expanded="true"] {
  background: var(--gradient-accent);
  color: #fff5f9;
}
/* ——— OGE: кнопки Ответ / Решение (розовая тема) ——— */

html[data-palette="pink"].has-answer-row-parity #task-answer-section:not([hidden]) {
  background: linear-gradient(
    168deg,
    rgba(56, 32, 52, 0.98) 0%,
    rgba(36, 22, 38, 0.96) 48%,
    rgba(24, 16, 28, 0.98) 100%
  );
  border-color: rgba(244, 114, 182, 0.22);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.1) inset,
    0 -2px 0 rgba(0, 0, 0, 0.38) inset,
    0 12px 40px rgba(190, 24, 93, 0.22),
    0 4px 14px rgba(0, 0, 0, 0.32);
}

html[data-palette="pink"].has-answer-row-parity #task-answer-section:not([hidden])::after {
  background: linear-gradient(
    168deg,
    rgba(236, 72, 153, 0.45) 0%,
    rgba(255, 255, 255, 0.1) 38%,
    rgba(192, 132, 252, 0.32) 100%
  );
}

html[data-palette="pink"][data-theme="light"].has-answer-row-parity #task-answer-section:not([hidden]) {
  background: linear-gradient(168deg, #ffffff 0%, #fdf2f8 48%, #fce7f3 100%);
  border-color: rgba(236, 72, 153, 0.18);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.98) inset,
    0 -1px 0 rgba(190, 24, 93, 0.06) inset,
    0 12px 36px rgba(236, 72, 153, 0.14),
    0 4px 12px rgba(15, 23, 42, 0.06);
}

html[data-palette="pink"].has-answer-row-parity #task-answer-section:not([hidden]) .task-answer-peek:not(.python-sandbox__action--show-solution) {
  border-color: rgba(251, 191, 36, 0.5);
  background: linear-gradient(
    135deg,
    rgba(251, 191, 36, 0.28) 0%,
    rgba(236, 72, 153, 0.22) 55%,
    rgba(244, 114, 182, 0.18) 100%
  );
  color: #fff7ed;
  box-shadow:
    0 3px 14px rgba(236, 72, 153, 0.2),
    0 1px 0 rgba(255, 255, 255, 0.12) inset;
}

html[data-palette="pink"].has-answer-row-parity #task-answer-section:not([hidden]) .task-answer-peek:not(.python-sandbox__action--show-solution):hover {
  border-color: rgba(252, 211, 77, 0.75);
  background: linear-gradient(
    135deg,
    rgba(252, 211, 77, 0.42) 0%,
    rgba(236, 72, 153, 0.34) 55%,
    rgba(244, 114, 182, 0.28) 100%
  );
  box-shadow:
    0 6px 22px rgba(236, 72, 153, 0.32),
    0 0 0 1px rgba(251, 191, 36, 0.25);
}

html[data-palette="pink"].has-answer-row-parity #task-answer-section:not([hidden]) .python-sandbox__action--show-solution {
  border-color: rgba(192, 132, 252, 0.58);
  background: linear-gradient(
    135deg,
    rgba(192, 132, 252, 0.36) 0%,
    rgba(236, 72, 153, 0.28) 52%,
    rgba(219, 39, 119, 0.22) 100%
  );
  color: #fdf4ff;
  box-shadow:
    0 3px 14px rgba(192, 132, 252, 0.26),
    0 1px 0 rgba(255, 255, 255, 0.12) inset;
}

html[data-palette="pink"].has-answer-row-parity #task-answer-section:not([hidden]) .python-sandbox__action--show-solution:hover {
  border-color: rgba(216, 180, 254, 0.88);
  background: linear-gradient(
    135deg,
    rgba(216, 180, 254, 0.52) 0%,
    rgba(236, 72, 153, 0.4) 50%,
    rgba(244, 114, 182, 0.32) 100%
  );
  box-shadow:
    0 6px 22px rgba(192, 132, 252, 0.34),
    0 0 0 1px rgba(236, 72, 153, 0.28);
}

html[data-palette="pink"][data-theme="light"].has-answer-row-parity #task-answer-section:not([hidden]) .task-answer-peek:not(.python-sandbox__action--show-solution) {
  border-color: rgba(236, 72, 153, 0.45);
  background: linear-gradient(135deg, #fef3c7 0%, #fce7f3 52%, #fbcfe8 100%);
  color: #9d174d;
}

html[data-palette="pink"][data-theme="light"].has-answer-row-parity #task-answer-section:not([hidden]) .python-sandbox__action--show-solution {
  border-color: rgba(192, 132, 252, 0.5);
  background: linear-gradient(135deg, #f5d0fe 0%, #fce7f3 52%, #fbcfe8 100%);
  color: #86198f;
}
