/* ============================================================
   Khan SAT-1600 · реальные тесты Digital SAT (v160.2)
   Author: Xudoyorxon Bunyodov / Худоёрхон Бунёдов

   Формы экзамена по месяцам и годам в интерфейсе Bluebook:
   таблицы и рисунки в тексте задания, выносные формулы,
   раздел «Реальные тесты» на странице Digital SAT.
   ============================================================ */

/* ---------- таблицы в тексте (R&W) и в условии (Math) ---------- */
.rt-tabw { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 4px 0 16px; max-width: 100%; }
.rt-tab {
  border-collapse: collapse; margin: 0 auto; font-family: var(--bb-serif, Georgia, serif);
  font-size: .9em; line-height: 1.4; color: #1b1b1b; background: #fff;
}
.rt-tab caption { caption-side: top; font-weight: 700; padding: 0 4px 8px; text-align: center; line-height: 1.35; }
.rt-tab th, .rt-tab td { border: 1px solid #6b6b6b; padding: 6px 10px; vertical-align: middle; text-align: left; white-space: normal; text-transform: none; letter-spacing: normal; color: #1b1b1b; }
.rt-tab th { font-weight: 700; background: #f3f3f3; }
.rt-tab--c th, .rt-tab--c td { text-align: center; }
.rt-tab .bkm { vertical-align: middle; }

/* ---------- рисунки и формулы ---------- */
.rt-fig { margin: 12px 0 16px; }
.rt-fig img { max-width: 100%; height: auto; background: #fff; }
.rt-disp { margin: .45em 0 .85em; }
.bb-stem .rt-disp:first-child, .bb-bk .rt-disp:first-child { margin-top: 0; }
.bb-stem p.rt-c { text-align: center; }

/* окно разбора в отчёте всегда светлое — формулы (вырезки) в тёмной теме не инвертируем */
html[data-theme="dark"] .bb-modal .bkm, html[data-theme="dark"] .bb-modal-bg .bkm { filter: none; }

/* ---------- раздел «Реальные тесты» на странице Digital SAT ---------- */
.bbh-real { margin: 8px 0 6px; }
.bbh-real-intro { margin: -4px 0 14px; color: var(--muted, #5b6170); font-size: 14.5px; line-height: 1.55; max-width: 860px; }
.bbh-real-year { margin: 18px 0 8px; font-size: 15px; font-weight: 800; letter-spacing: .3px; color: var(--ink, #1b1b1b); display: flex; align-items: center; gap: 10px; }
.bbh-real-year::after { content: ''; flex: 1; height: 1px; background: var(--line, #e3e6ee); }
.bbh-real-month { margin: 6px 0 10px; font-size: 14px; font-weight: 700; color: var(--muted, #5b6170); }
.bbh-real-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 14px; }
.bbh-real-card {
  position: relative; background: var(--card, #fff); color: var(--ink, #1b1b1b);
  border: 1px solid var(--line, #e3e6ee); border-radius: 16px; padding: 16px 16px 14px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .05); display: flex; flex-direction: column; gap: 8px; min-width: 0;
}
.bbh-real-card h3 { margin: 0; font-size: 17px; line-height: 1.3; }
.bbh-real-card .rt-meta { font-size: 13px; color: var(--muted, #5b6170); line-height: 1.45; }
.bbh-real-card .rt-tag {
  position: absolute; top: 12px; right: 12px; font-size: 11px; font-weight: 800; letter-spacing: .4px;
  padding: 3px 8px; border-radius: 999px; background: #C9A227; color: #1b1b1b;
}
.bbh-real-card .rt-best { font-size: 13px; color: #1B5E20; font-weight: 700; }
.bbh-real-card .rt-act { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.bbh-real-card .rt-act button {
  border: 1.5px solid #1B5E20; background: #fff; color: #1B5E20; border-radius: 10px;
  padding: 7px 12px; font-weight: 700; font-size: 13.5px; cursor: pointer; font-family: inherit;
}
.bbh-real-card .rt-act button.rt-main { background: #1B5E20; color: #fff; }
.bbh-real-card .rt-act button:hover { filter: brightness(1.08); }
.bbh-real-card .rt-act button:focus-visible { outline: 3px solid #C9A227; outline-offset: 2px; }
.bbh-real-note { margin-top: 12px; font-size: 13px; color: var(--muted, #5b6170); line-height: 1.55; }
.bbh-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.bbh-nav button {
  font: inherit; font-weight: 700; font-size: 13.5px; padding: 7px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line, #e3e6ee); color: var(--ink, #1b1b1b); background: var(--card, #fff);
}
.bbh-nav button.on { background: #1B5E20; border-color: #1B5E20; color: #fff; }
.bbh-nav button:focus-visible { outline: 3px solid #C9A227; outline-offset: 2px; }
.bbr-realtag {
  display: inline-block; margin-left: 8px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 800;
  background: #C9A227; color: #1b1b1b; vertical-align: 3px;
}

html[data-theme="dark"] .bbh-real-card { background: #1d2230; border-color: #303849; color: #eef1f7; }
html[data-theme="dark"] .bbh-real-card .rt-meta, html[data-theme="dark"] .bbh-real-intro,
html[data-theme="dark"] .bbh-real-month, html[data-theme="dark"] .bbh-real-note { color: #b9c1d3; }
html[data-theme="dark"] .bbh-real-year { color: #eef1f7; }
html[data-theme="dark"] .bbh-real-year::after { background: #303849; }
html[data-theme="dark"] .bbh-real-card .rt-best { color: #8fd694; }
html[data-theme="dark"] .bbh-real-card .rt-act button { background: transparent; color: #8fd694; border-color: #8fd694; }
html[data-theme="dark"] .bbh-real-card .rt-act button.rt-main { background: #2e7d32; border-color: #2e7d32; color: #fff; }
html[data-theme="dark"] .bbh-nav button { background: #1d2230; border-color: #303849; color: #eef1f7; }
html[data-theme="dark"] .bbh-nav button.on { background: #2e7d32; border-color: #2e7d32; color: #fff; }

@media (max-width: 600px) {
  .bbh-real-grid { grid-template-columns: 1fr; }
  .rt-tab { font-size: .82em; }
  .rt-tab th, .rt-tab td { padding: 5px 7px; }
}

/* формула и знак препинания после неё — без переноса между ними */
.rt-nw { white-space: nowrap; }
