/* Хаб ЕГЭ/ОГЭ (docs/EXAM_HUB_PLAN.md): страницы /ege-2027/, /ege/…, /oge-2027/, /vuzy/, /diagnostika/.
   Переменные, кнопки и FAQ — из styles.css; здесь только то, чего там нет. */

.exam {
  display: grid;
  gap: 18px;
  max-width: 1040px;
  padding-block: 28px 32px;
}

.exam h1 {
  margin: 0;
  font-size: clamp(32px, 4.4vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

/* Ссылки хаба и банка без собственного стиля — как в лендинге, а не синие по умолчанию; специфичность нулевая, классы выигрывают */
:where(.exam) a {
  color: var(--hot);
  text-decoration: none;
}

:where(.exam) a:hover {
  text-decoration: underline;
}

.exam-lead {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.exam-section {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.exam-section h2 {
  margin: 0;
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.exam-section h3 {
  margin: 8px 0 0;
  font-size: 19px;
}

.exam-section :where(p, ul) {
  max-width: 760px;
  margin: 0;
  line-height: 1.6;
}

.exam-section :where(ul) {
  padding-left: 22px;
}

/* ── Плитки хаба: две колонки, на телефоне одна ── */
.exam-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.exam-tile {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 92px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-surface);
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  transition:
    transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) ease;
}

.exam-tile__icon {
  display: grid;
  flex: none;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: var(--radius-lg);
}

.exam-tile__body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.exam-tile__body b {
  font-size: 18px;
  font-weight: 650;
  line-height: 1.25;
}

.exam-tile__body span {
  color: var(--muted);
  font-size: var(--fs-caption);
  line-height: 1.4;
}

@media (hover: hover) and (pointer: fine) {
  .exam-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgb(80 48 60 / 10%);
  }
}

.exam-tile:focus-visible,
.exam-cta__button:focus-visible {
  outline: 2px solid var(--hot);
  outline-offset: 2px;
}

.exam-tone--pink {
  background: #fce7ee;
  color: #c3134e;
}

.exam-tone--blue {
  background: #e3f1fc;
  color: #1f6fb2;
}

.exam-tone--green {
  background: #e4f5ec;
  color: #1f9d5c;
}

.exam-tone--orange {
  background: #fbe9dd;
  color: #c4571a;
}

.exam-tone--violet {
  background: #e9e4fa;
  color: #6a4fc4;
}

.exam-tone--yellow {
  background: #fff0ca;
  color: #a8730a;
}

.exam-tutor {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 18px 20px;
  border-left: 4px solid var(--hot);
  border-radius: var(--radius-lg);
  background: var(--exam-soft);
}

.exam-tutor h2 {
  margin: 0;
  font-size: 20px;
}

.exam-tutor p {
  max-width: 760px;
  margin: 0;
  line-height: 1.6;
}

/* ── Блок CTA ── */
.exam-cta {
  display: grid;
  gap: 12px;
  width: 100%;
  max-width: 960px;
  margin-inline: auto;
  margin-top: 18px;
  padding: 28px;
  border-radius: 24px;
  background: linear-gradient(135deg, #c3134e 0%, #8d0f3a 100%);
  color: #fff;
}

.exam-cta h2,
.exam-cta p {
  max-width: 720px;
  margin: 0;
}

.exam-cta h2 {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.exam-cta p {
  color: rgb(255 255 255 / 86%);
  line-height: 1.55;
}

.exam-cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
}

.exam-cta__button {
  white-space: normal;
  text-align: center;
}

.exam-cta__button--light {
  background: #fff;
  color: var(--hot);
}

.exam-cta__button--line {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / 70%);
  color: #fff;
}

/* ── Источники, черновик ── */
.exam-sources {
  max-width: 820px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: var(--fs-small);
  line-height: 1.6;
}

.exam-sources a {
  color: var(--hot);
}

.exam-draft {
  margin: 0;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: #fff0ca;
  font-size: var(--fs-caption);
}

/* ── Таблицы ── */
.exam-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
}

.exam-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-caption);
  line-height: 1.45;
  text-align: left;
}

.exam-table th,
.exam-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.exam-table thead th {
  background: var(--exam-soft);
  font-weight: 600;
  white-space: nowrap;
}

.exam-table tbody th {
  font-weight: 500;
}

.exam-table__note {
  margin-left: 8px;
  color: var(--muted);
  font-size: 14px;
}

.exam-table tbody tr:last-child th,
.exam-table tbody tr:last-child td {
  border-bottom: 0;
}

.exam-table .is-pass th,
.exam-table .is-pass td {
  background: #e4f5ec;
}

.exam-related ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 0;
  list-style: none;
}

.exam-related a {
  color: var(--hot);
}

/* ── Шкалы: по предмету раскрывающийся список пар «первичный → тестовый» ── */
.exam-scale {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
}

.exam-scale summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 14px 18px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
}

.exam-scale summary small {
  color: var(--muted);
  font-size: var(--fs-small);
  font-weight: 400;
}

.exam-scale[open] summary {
  border-bottom: 1px solid var(--line);
}

.exam-scale__legend {
  margin: 0;
  padding: 12px 18px 0;
  color: var(--muted);
  font-size: var(--fs-caption);
}

.exam-scale__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 6px;
  margin: 0;
  padding: 14px 18px 18px;
  list-style: none;
}

.exam-scale__grid li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: var(--exam-soft);
  font-size: var(--fs-caption);
}

.exam-scale__grid li span::after {
  content: ' →';
  color: var(--muted);
}

.exam-scale__grid .is-pass {
  background: #e4f5ec;
}

/* ── Калькуляторы ──
   Сетка с subgrid: подписи всех полей — одна строка, поля — следующая, подсказка или ошибка — под полем.
   Длинная подпись переносится, а поля остаются на одной линии. */
.exam-calc {
  display: grid;
  grid-template-columns: minmax(0, 320px) 160px 200px;
  gap: 6px 16px;
  align-items: start;
}

.exam-calc > .exam-field {
  grid-row: span 3;
  grid-template-rows: subgrid;
}

.exam-calc > .exam-calc__result {
  grid-column: 1 / -1;
  margin-top: 10px;
}

.exam-field__hint,
.exam-field__error {
  grid-row: 3;
  grid-column: 1;
}

.exam-field:has(.exam-field__error:not([hidden])) .exam-field__hint {
  display: none;
}

.exam-field__hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.exam-calc {
  max-width: 760px;
  padding: 20px;
  border: 1px solid var(--exam-border);
  border-radius: var(--radius-surface);
  background: #fff;
}

/* ── Подбор вуза ──
   Плашка ввода во всю ширину: шесть полей одной строкой (subgrid — как у калькуляторов), под ней итог,
   карточки вузов (фильтр по вузу), чипы направлений и все программы списком. */
.exam-vuzy {
  display: grid;
  gap: 14px;
}

.exam-vuzy__panel {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr) minmax(0, 1.7fr) minmax(72px, 0.6fr)
    minmax(0, 1.7fr) minmax(72px, 0.6fr) minmax(0, 1fr);
  gap: 6px 12px;
  padding: 20px;
  border: 1px solid var(--exam-border);
  border-radius: var(--radius-surface);
  background: #fff;
}

.exam-vuzy__panel > .exam-field {
  grid-row: span 3;
  grid-template-rows: subgrid;
}

.exam-vuzy__panel .exam-field :is(input, select),
.exam-vuzy__panel .exam-field input[inputmode='numeric'] {
  max-width: none;
}

.exam-vuzy__result {
  display: grid;
  gap: 6px;
  padding: 16px 20px;
  border-radius: var(--radius);
  background: var(--exam-soft);
  line-height: 1.5;
}

.exam-vuzy__result:empty {
  display: none;
}

.exam-vuzy__result p {
  margin: 0;
}

.exam-vuzy__total {
  font-size: 44px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.03em;
}

.exam-vuzy__result .exam-vuzy__aside {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--exam-border);
  color: var(--muted);
  font-size: var(--fs-caption);
}

.exam-section .exam-vuz-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
  max-width: none;
  padding: 0;
  list-style: none;
}

.exam-vuz-card {
  display: grid;
  gap: 4px;
  width: 100%;
  height: 100%;
  padding: 14px 16px;
  border: 1px solid var(--exam-border);
  border-radius: var(--radius-lg);
  background: #fff;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.exam-vuz-card span {
  color: var(--muted);
  font-size: var(--fs-small);
  line-height: 1.4;
}

.exam-vuz-card[aria-pressed='true'] {
  border-color: var(--ink);
}

/* Чип — как UiChip кита: невыбранный с тонкой рамкой, выбранный — мягкая заливка без рамки. */
.exam-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.exam-chip {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--exam-border);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: var(--fs-caption);
  cursor: pointer;
}

.exam-chip[aria-pressed='true'] {
  border-color: transparent;
  background: #efeeeb;
  font-weight: 600;
}

@media (hover: hover) and (pointer: fine) {
  .exam-chip:hover,
  .exam-vuz-card:hover {
    background: #f4f4f1;
  }
}

.exam-chip:focus-visible,
.exam-vuz-card:focus-visible {
  outline: none;
  box-shadow: var(--button-focus-ring);
}

.exam-section .exam-vuzy__count {
  color: var(--muted);
  font-size: var(--fs-caption);
}

.exam-section .exam-vuz-rows {
  display: grid;
  max-width: none;
  padding: 0;
  border: 1px solid var(--exam-border);
  border-radius: var(--radius-lg);
  background: #fff;
  list-style: none;
}

.exam-vuz-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-top: 1px solid var(--exam-border);
  /* Виртуализация средствами браузера: строки вне экрана не раскладываются и не рисуются, но остаются в HTML
     (их видит поиск, работает Ctrl+F); auto — браузер запоминает реальную высоту строки после первого показа. */
  content-visibility: auto;
  contain-intrinsic-size: auto 92px;
}

.exam-vuz-row:first-child {
  border-top: 0;
}

.exam-vuz-row[hidden] {
  display: none;
}

.exam-vuz-row__score {
  display: grid;
  place-items: center;
  height: 40px;
  border-radius: var(--radius);
  background: var(--exam-soft);
  font-weight: 650;
}

.exam-vuz-row__main {
  display: grid;
  gap: 2px;
  min-width: 0;
  font-size: var(--fs-caption);
  line-height: 1.4;
}

.exam-vuz-row__main b {
  font-size: 15px;
}

.exam-vuz-row__main span {
  color: var(--muted);
}

.exam-vuz-row__gap {
  font-size: var(--fs-caption);
  font-weight: 600;
  white-space: nowrap;
}

.exam-vuz-row[data-state='pass'] .exam-vuz-row__gap {
  color: #1f7a4a;
}

.exam-vuz-row[data-state='pass'] .exam-vuz-row__score {
  background: #e4f5ec;
}

.exam-vuz-row[data-state='short'] .exam-vuz-row__gap {
  color: var(--muted);
}

.exam-vuz-row[data-state='other'],
.exam-vuz-row[data-state='extra'] {
  opacity: 0.6;
}

/* ── Поля: вид UiInput и UiSelect кита ──
   Источник значений — packages/ui/input/styles/_field.scss и themes.scss, packages/ui/field/styles/index.scss,
   токены styles/tokens/{primitives,semantic}.css (лендинг их не подключает, значения продублированы здесь):
   высота md — 42 px (styles/tokens/_button.scss), радиус --radius-xl 14 px, рамка --border-field, при наведении
   --text-muted, в фокусе --focus-field, ошибка — --action-danger, подпись и ошибка — caption 12 px. */
.exam {
  --field-bg: #fff;
  --field-border: #d2cabe;
  --field-border-hover: #686866;
  --field-border-focus: color-mix(in srgb, #c3134e 45%, #d2cabe);
  --field-danger: #aa1824;
  --field-radius: 14px;
  --field-height: 42px;

  /* нейтральные поверхности кита (--neutral-30, --border-default): розовый остаётся у главной кнопки и ссылок */
  --exam-soft: #f7f5f2;
  --exam-border: #e9e8e5;
  --button-focus-ring: 0 0 0 3px rgb(18 18 23 / 14%);
}

/* Второстепенная кнопка хаба — как secondary кита (packages/ui/button/styles/themes.scss): прозрачный фон,
   рамка поля, при наведении рамка теплеет; фокус — кольцо box-shadow, без outline с отступом. */
.exam .button--quiet {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--field-border);
}

@media (hover: hover) and (pointer: fine) {
  .exam .button--quiet:hover {
    background: transparent;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--hot) 30%, var(--field-border));
  }
}

/* Мягкий акцент — soft кита: заливка 12 % бренда, текст бренда. Для второго по важности действия рядом с главным. */
.exam .button--soft {
  background: color-mix(in srgb, var(--hot) 12%, #fff);
  color: var(--hot);
}

@media (hover: hover) and (pointer: fine) {
  .exam .button--soft:hover {
    background: color-mix(in srgb, var(--hot) 18%, #fff);
  }
}

/* Подсказка у кнопки (как UiTooltip кита): по наведению и фокусу, текст — из data-tip; для чтения с экрана —
   тот же текст в aria-description. */
.exam [data-tip] {
  position: relative;
}

.exam [data-tip]::after {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  z-index: 5;
  width: max-content;
  max-width: 260px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  white-space: normal;
  text-align: left;
  content: attr(data-tip);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition:
    opacity var(--dur-fast) ease,
    transform var(--dur-fast) ease;
}

.exam [data-tip]:is(:hover, :focus-visible)::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.exam .button:focus-visible {
  outline: none;
  box-shadow: var(--button-focus-ring);
}

.exam .button--quiet:focus-visible {
  box-shadow:
    inset 0 0 0 1px var(--field-border),
    var(--button-focus-ring);
}

.exam-field {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
}

.exam-field[hidden] {
  display: none;
}

.exam-field > span,
.exam-field label > span {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.exam-field small {
  color: var(--muted);
  font-weight: 400;
}

.exam-field input,
.exam-field select {
  width: 100%;
  max-width: 320px;
  min-height: var(--field-height);
  padding: 10px 12px;
  border: 1px solid var(--field-border);
  border-radius: var(--field-radius);
  background: var(--field-bg);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  outline: none;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease;
}

/* Баллы — короткое число: поле по содержимому, около 120 px */
.exam-field input[inputmode='numeric'] {
  width: 100%;
  max-width: 160px;
}

.exam-field select {
  max-width: 320px;
  padding-right: 40px;
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23171717' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 9s-4.42 6-6 6-6-6-6-6'/%3E%3C/svg%3E");
  background-position: calc(100% - 14px) 50%;
  background-size: 14px 14px;
  background-repeat: no-repeat;
}

.exam-field input:hover,
.exam-field select:hover {
  border-color: var(--field-border-hover);
}

/* фокус как у UiInput: только цвет рамки; глобальное кольцо лендинга (outline с отступом) давало двойную рамку */
.exam-field input:focus-visible,
.exam-field select:focus-visible,
.exam-diag__report:focus-visible {
  border-color: var(--field-border-focus);
  outline: none;
}

.exam-field input[aria-invalid='true'],
.exam-field select[aria-invalid='true'] {
  border-color: var(--field-danger);
}

.exam-field__error {
  width: max-content;
  max-width: min(280px, 100%);
  margin: 0;
  color: var(--field-danger);
  font-size: 12px;
  line-height: 1.4;
}

.exam-calc__result {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--exam-soft);
  line-height: 1.5;
}

.exam-calc__result:empty {
  display: none;
}

.exam-calc__result p {
  margin: 0;
}

.exam-calc__result[data-tone='ok'] {
  background: #e4f5ec;
}

.exam-calc__result[data-tone='ok'] p:first-child {
  font-size: 20px;
  font-weight: 650;
}

.exam-calc__result[data-tone='error'] {
  background: #fde8e8;
}

.exam-source-links {
  columns: 2;
  gap: 24px;
}

/* ── Банк заданий ── */
.exam-section .exam-tasks {
  display: grid;
  gap: 14px;
  max-width: none;
  margin: 0;
  padding: 0;
  list-style: none;
}

.exam-task {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--exam-border);
  border-radius: var(--radius-surface);
  background: #fff;
}

.exam-task__answer {
  display: grid;
  grid-template-columns: minmax(0, 320px) auto auto;
  justify-content: start; /* иначе столбцы auto растягивают кнопки на всю свободную ширину */
  align-items: end;
  gap: 10px;
}

.exam-task__result,
.exam-task__manual,
.exam-task__note,
.exam-task__source {
  margin: 0;
  font-size: var(--fs-caption);
}

.exam-task__result {
  font-weight: 600;
}

.exam-task__result[data-tone='ok'] {
  color: #1f9d5c;
}

.exam-task__result[data-tone='wrong'] {
  color: var(--hot);
}

.exam-task__manual,
.exam-task__note,
.exam-task__source {
  color: var(--muted);
}

.exam-task__note a {
  color: var(--hot);
}

.exam-task__badge {
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  background: #e4f5ec;
  color: #1f7a4a;
  font-size: var(--fs-small);
}

/* ── Диагностика ── */
.exam-diag {
  display: grid;
  gap: 18px;
}

.exam-diag__note {
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--exam-soft);
  font-size: var(--fs-caption);
}

.exam-section .exam-diag__tasks {
  display: grid;
  gap: 14px;
  max-width: none;
  margin: 0;
  padding: 0;
  list-style: none;
}

.exam-diag__task {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--exam-border);
  border-radius: var(--radius-surface);
  background: #fff;
}

.exam-diag__task[data-status='ok'] {
  border-color: #1f9d5c;
  background: #f4fbf7;
}

.exam-diag__task[data-status='wrong'] {
  border-color: #c3134e;
  background: #fff8fa;
}

.exam-diag__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.exam-diag__head h3 {
  min-width: 0;
  margin: 0;
  font-size: 19px;
  overflow-wrap: anywhere;
}

.exam-diag__head span {
  color: var(--muted);
  font-size: var(--fs-caption);
}

.exam-diag__text p,
.exam-diag__source p {
  margin: 0 0 8px;
  max-width: none;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.exam-diag__source,
.exam-diag__text {
  max-width: 100%;
  overflow-x: auto;
}

.exam-diag__source {
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--exam-soft);
  font-size: var(--fs-caption);
}

.exam-diag__image {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

.exam-diag__files {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-caption);
}

.exam-diag__files a {
  color: var(--hot);
}

.exam-diag-table {
  max-width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-caption);
}

.exam-diag-table td {
  min-width: 28px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  text-align: center;
}

.exam-diag__result {
  margin: 0;
  font-weight: 600;
}

.exam-diag__task[data-status='ok'] .exam-diag__result {
  color: #1f9d5c;
}

.exam-diag__task[data-status='wrong'] .exam-diag__result,
.exam-diag__task[data-status='empty'] .exam-diag__result {
  color: var(--hot);
}

.exam-diag__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.exam-diag__share {
  display: grid;
  gap: 10px;
}

.exam-diag__share p {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-caption);
}

/* display: grid выше перебивал атрибут hidden — блок итога и запасное поле были видны пустыми */
.exam-diag__share[hidden],
.exam-diag__report[hidden] {
  display: none;
}

.exam-diag__report {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--field-border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: var(--fs-caption);
  line-height: 1.5;
  resize: vertical;
}

@media (max-width: 760px) {
  .exam {
    padding-block: 16px 24px;
  }

  .exam-tiles {
    grid-template-columns: 1fr;
  }

  .exam-source-links {
    columns: 1;
  }

  .exam-calc {
    padding: 16px;
  }

  .exam-calc {
    grid-template-columns: minmax(0, 1fr);
  }

  .exam-vuzy__panel {
    grid-template-columns: minmax(0, 1fr) 96px;
    padding: 16px;
  }

  .exam-vuzy__panel > .exam-field:first-child,
  .exam-vuzy__panel > .exam-field:last-child {
    grid-column: 1 / -1;
  }

  .exam-vuz-row {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .exam-vuz-row__gap {
    grid-column: 2;
  }

  .exam-field input,
  .exam-field select,
  .exam-field input[inputmode='numeric'] {
    max-width: none;
    width: 100%;
    font-size: 16px; /* на iOS поле меньше 16 px увеличивает страницу при фокусе */
  }

  .exam-diag__task,
  .exam-task {
    padding: 14px;
  }

  .exam-task__answer {
    grid-template-columns: 1fr;
  }

  .exam-diag__actions .button {
    width: 100%;
  }

  .exam-lead {
    font-size: 16px;
  }

  .exam-cta {
    padding: 22px 18px;
    border-radius: 20px;
  }

  .exam-cta__actions {
    flex-direction: column;
  }

  .exam-cta__button {
    width: 100%;
  }
}

/* Таблицы из условий: прокрутка внутри блока на телефоне, картинки в ячейках не шире ячейки и 32rem */
.exam-table-scroll {
  max-width: 100%;
  margin: 8px 0;
  overflow-x: auto;
}

.exam-diag-table img {
  display: block;
  width: auto;
  max-width: min(100%, 32rem);
  height: auto;
  border-radius: var(--radius);
  background: #fff;
}

/* Математика: формулы MathML крупнее окружающего текста, чертёж не шире колонки. */
.exam-diag__text math {
  font-size: 1.2em;
}
.exam-diag__text table {
  margin: 8px 0;
  border-collapse: collapse;
}
.exam-diag__text td {
  padding: 4px 12px 4px 0;
}
.exam-diag__text ul {
  margin: 8px 0;
  padding-left: 0;
  list-style: none;
}

/* Банк заданий: страница задания и пагинация списков */
.exam-spoiler {
  margin-top: 12px;
}
.exam-spoiler summary {
  cursor: pointer;
  font-weight: 500;
}
.exam-spoiler p {
  margin: 8px 0 0;
}
.exam-task__topic {
  margin: 12px 0 0;
}
.exam-pager {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0;
}
.exam-pager a,
.exam-pager span {
  min-width: 40px;
  padding: 8px 12px;
  text-align: center;
  border: 1px solid var(--line, #e3dfe4);
  border-radius: 10px;
}
.exam-pager [aria-current='page'] {
  font-weight: 600;
  background: var(--paper-2, #f6f3f5);
}
