/* ===== Страница «ЕГЭ» ===== */
.ege{padding:24px 0 48px}
.ege .wrap{max-width:1100px;margin:0 auto;padding:0 16px}
.ege h1{font-size:34px;margin:8px 0 20px;text-align:center;color:#3a4652}

/* баннер формул */
.formula-banner{margin:0 auto}
.formula-banner img{width:100%;max-width:1400px;height:clamp(100px,10vw,130px);
  object-fit:cover;object-position:center;display:block;margin:0 auto}
@media (max-width:600px){
  .formula-banner img{height:120px;margin-bottom:-50px}
}

/* вкладки */
.tabs-container{margin-top:28px}
.ege-tabs{display:flex;flex-wrap:wrap;gap:8px;border-bottom:1px solid #dee2e6;
  margin-bottom:1rem;padding-bottom:8px}
.ege .ege-tab{font:inherit;font-size:.85rem;color:#222;background:#fff;
  border:1.5px solid var(--line,#dfe3e8);border-radius:999px;padding:.45rem .9rem;
  cursor:pointer;white-space:nowrap;transition:all .15s}
.ege .ege-tab:hover{color:var(--accent,#2b6cb0);border-color:var(--accent,#2b6cb0)}
.ege .ege-tab.active{background:var(--accent,#2b6cb0);border-color:var(--accent,#2b6cb0);color:#fff}
.tab-pane{padding:1rem 0}
.tab-pane[hidden]{display:none}

/* карточки со списком документов */
.doc-cols{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.doc-list-card{background:#fff;border-radius:12px;box-shadow:0 2px 14px rgba(15,23,42,.08);
  padding:1rem 1.25rem}
.doc-list-card .doc-item{display:flex;align-items:flex-start;gap:.6rem;padding:.7rem 0;
  font-size:.95rem;line-height:1.45}
.doc-list-card .doc-item+.doc-item{border-top:1px solid #eef2f7}
.doc-list-card .doc-item img{flex:0 0 auto;margin-top:.15rem;width:20px;height:20px}
.doc-list-card .text-primary{color:#2563eb;text-decoration:none;font-weight:500}
.doc-list-card .text-primary:hover{color:#1d4ed8;text-decoration:underline}
.doc-list-card .doc-badge{display:inline-block;margin-left:.35rem;padding:.1rem .5rem;
  font-size:.72rem;font-weight:600;color:#475569;background:#f1f5f9;border-radius:999px;
  white-space:nowrap}
.doc-list-card .doc-badge.video{color:#7c2d12;background:#ffedd5}
.doc-answers{margin-top:.35rem;display:flex;gap:.4rem;flex-wrap:wrap}
.doc-answers .doc-badge{margin-left:0;text-decoration:none;color:#475569}
.doc-answers .doc-badge:hover{color:#1d4ed8}

/* таблица тематик задач */
.tbl-tasks{width:100%;margin:30px auto;max-width:700px;border-radius:12px;
  border:1px solid #e2e8f0;box-shadow:0 2px 14px rgba(15,23,42,.08);background:#fff}
.tbl-tasks table{margin:0;border-collapse:separate;border-spacing:0;width:100%;
  table-layout:fixed}
.tbl-tasks thead th{background:#e2e8f0;color:#1e293b;font-size:.72rem;font-weight:600;
  letter-spacing:.03em;text-transform:uppercase;padding:.7rem .75rem;
  vertical-align:middle;text-align:center}
.tbl-tasks tbody td{padding:.6rem .75rem;border-bottom:1px solid #e2e8f0;
  vertical-align:middle;font-size:.9rem;color:#0f172a;text-align:center}
.tbl-tasks tbody tr:nth-child(even){background:#f8fafc}
.tbl-tasks tbody tr:hover{background:#eef4ff}
.tbl-tasks tbody tr:last-child td{border-bottom:none}
.tbl-tasks thead th:first-child{width:96px;border-top-left-radius:11px}
.tbl-tasks thead th:nth-child(2){width:96px;border-top-right-radius:11px}
.tbl-tasks td:first-child{width:96px}
.tbl-tasks td:nth-child(2){width:96px}
.tbl-tasks tbody tr:last-child td:first-child{border-bottom-left-radius:11px}
.tbl-tasks tbody tr:last-child td:last-child{border-bottom-right-radius:11px}
.score-badge-2,.score-badge-3,.score-badge-4{display:inline-flex;align-items:center;
  justify-content:center;width:30px;height:30px;font-size:.82rem;font-weight:600;
  color:#1b5e20;border-radius:50%}
.score-badge-3{background:#c8e6c9}
.score-badge-2{background:#bbdefb}
.score-badge-4{background:#fdba74}
@media (max-width:575px){
  .tbl-tasks{width:auto;margin:20px 5px}
  .tbl-tasks tbody td,.tbl-tasks thead th{font-size:.8rem;padding:.5rem .4rem;word-break:break-word}
  .tbl-tasks thead th:first-child{width:46px}
  .tbl-tasks thead th:nth-child(2){width:52px}
  .tbl-tasks td:first-child{width:46px}
  .tbl-tasks td:nth-child(2){width:52px}
  .score-badge-2,.score-badge-3,.score-badge-4{width:26px;height:26px;font-size:.75rem}
}

/* шкала перевода баллов */
.ege-scale-title{font-size:20px;text-align:center;color:#222;margin:26px 0 0}
.tbl-scale{background:#fff;border:1px solid #d0d7de;border-radius:12px;
  box-shadow:0 2px 14px rgba(15,23,42,.08);margin-top:30px;max-width:100%}
.tbl-scale .table-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch;border-radius:12px}
.tbl-scale table{margin:0;border-collapse:separate;border-spacing:0;min-width:700px}
.tbl-scale th,.tbl-scale td{border-right:1px solid #e2e8f0;padding:.55rem .6rem;
  font-size:1.05rem;text-align:center;white-space:nowrap}
.tbl-scale td:first-child{border-left:none;border-right:1px solid #d0d7de;
  text-align:center;position:sticky;left:0;z-index:2;min-width:150px}
.tbl-scale tr.row-primary td{background:#4491c2;color:#fff;font-weight:400}
.tbl-scale tr.row-test td{background:#fff;color:#1f2937;font-weight:400}
.tbl-scale tr.row-primary td:first-child{border-top-left-radius:11px}
.tbl-scale tr.row-primary td:last-child{border-top-right-radius:11px}
.tbl-scale tr.row-test td:first-child{border-bottom-left-radius:11px}
.tbl-scale tr.row-test td:last-child{border-bottom-right-radius:11px}
@media (max-width:767px){
  .tbl-scale{margin-top:20px}
  .tbl-scale th,.tbl-scale td{font-size:.8rem;padding:.25rem .2rem}
  .tbl-scale td:first-child{width:48px}
}

/* карточка бланков */
.blank-card{background:#fff;border-radius:12px;box-shadow:0 2px 14px rgba(15,23,42,.08);
  padding:1rem;max-width:520px;margin:30px auto 0;text-align:center}
.blank-card img{width:100%;display:block;border-radius:8px;margin-bottom:.6rem}
.blank-card h4{margin:.2rem 0 0;font-size:1rem;color:#222}
.blank-card a{color:#2563eb;text-decoration:none}
.blank-card a:hover{color:#1d4ed8;text-decoration:underline}

/* таблица курса подготовки */
.tbl-modern{border-radius:12px;box-shadow:0 2px 14px rgba(15,23,42,.08);overflow:hidden}
.tbl-modern .tbl-scroll{background:#fff;overflow-x:auto;-webkit-overflow-scrolling:touch}
.tbl-modern table{margin:0;border-collapse:separate;border-spacing:0;min-width:600px}
.tbl-modern thead th{background:#e2e8f0;color:#1e293b;font-size:.72rem;font-weight:600;
  letter-spacing:.03em;text-transform:uppercase;padding:.7rem .6rem;border:none;
  vertical-align:middle}
.tbl-modern thead th em{color:#64748b;font-size:.66rem;font-style:italic}
.tbl-modern thead th:nth-child(1){width:5%}
.tbl-modern thead th:nth-child(2){width:22%}
.tbl-modern thead th:nth-child(3){width:19%}
.tbl-modern thead th:nth-child(4){width:14%}
.tbl-modern thead th:nth-child(5){width:20%}
.tbl-modern thead th:nth-child(6){width:20%}
.tbl-modern tbody td{padding:.6rem .6rem;border-bottom:1px solid #e2e8f0;
  vertical-align:middle;font-size:.85rem;word-wrap:break-word}
.tbl-modern tbody tr:nth-child(even){background:#f8fafc}
.tbl-modern tbody tr:hover{background:#eef4ff}
.tbl-modern tbody tr:last-child td{border-bottom:none}
.tbl-modern td:first-child{text-align:center;color:#94a3b8}
.tbl-modern td:nth-child(2){font-weight:600;color:#0f172a}
.tbl-modern .muted{color:#cbd5e1}
.tbl-modern .text-primary{color:#2563eb;text-decoration:none}
.tbl-modern .text-primary:hover{color:#1d4ed8;text-decoration:underline}
.tbl-modern .doc-icon{opacity:.75;margin-right:3px;vertical-align:middle}
.doc-icon{width:16px;height:14px}
.rep-link{font-size:.88em;line-height:1.35}
.card-thumb{display:block;width:110px;height:78px;object-fit:cover;object-position:center;
  border-radius:8px;border:1px solid #e2e8f0;background:#fff;
  transition:transform .15s ease,box-shadow .15s ease}
.tbl-modern a:hover .card-thumb{transform:translateY(-2px);box-shadow:0 4px 12px rgba(15,23,42,.15)}
@media (max-width:991px){
  .tbl-modern tbody td{font-size:.78rem;padding:.5rem .5rem}
  .tbl-modern thead th{font-size:.65rem;padding:.55rem .5rem}
  .card-thumb{width:92px;height:65px}
}
@media (max-width:767px){
  .tbl-modern table{min-width:520px}
  .tbl-modern tbody td{font-size:.72rem;padding:.45rem .4rem}
  .tbl-modern thead th{font-size:.58rem;padding:.45rem .4rem;letter-spacing:.02em}
  .rep-link{font-size:.85em}
  .card-thumb{width:72px;height:52px}
  .doc-icon{width:13px;height:11px}
}
@media (max-width:575px){
  .tbl-modern table{min-width:460px}
  .tbl-modern tbody td{font-size:.68rem;padding:.35rem .3rem}
  .tbl-modern thead th{font-size:.52rem;padding:.4rem .3rem}
  .card-thumb{width:60px;height:43px;border-radius:6px}
  .doc-icon{width:11px;height:10px}
}

/* ===== Вопросы для повторения (fp-блок) ===== */
.fp-block{max-width:860px;margin:0 auto;color:#333;line-height:1.55}
.fp-block *{box-sizing:border-box}
.fp-intro{background:#f6f8f7;border-left:4px solid #3f6b4f;border-radius:0 12px 12px 0;
  padding:.9rem 1.2rem;margin-bottom:1.1rem;font-size:.96rem}
.fp-intro b{color:#3f6b4f}
.fp-part{margin:1.4rem 0 .7rem;padding:.45rem .9rem;border-radius:8px;background:#eceff1;
  color:#37474f;font-weight:600;font-size:.95rem;letter-spacing:.02em}
.fp-card{background:#fff;border:1px solid #e6ebe8;border-radius:12px;
  box-shadow:0 1px 8px rgba(15,23,42,.06);margin-bottom:1.1rem;overflow:hidden}
.fp-head{color:#fff;padding:.65rem 1.1rem;display:flex;align-items:center;gap:.7rem}
.fp-head .fp-range{background:rgba(255,255,255,.22);border-radius:999px;font-size:.78rem;
  padding:.15rem .65rem;white-space:nowrap}
.fp-head h4{margin:0;font-size:1.02rem;font-weight:600}
.fp-actions{margin-left:auto;display:flex;gap:.4rem;flex-wrap:wrap}
.fp-link{color:#fff;background:rgba(255,255,255,.18);border-radius:999px;
  padding:.2rem .7rem;font-size:.78rem;text-decoration:none;white-space:nowrap}
.fp-link:hover{background:rgba(255,255,255,.35)}
.fp-list{list-style:none;margin:0;padding:.4rem 1.1rem .6rem}
.fp-list li{display:flex;gap:.65rem;align-items:flex-start;padding:.5rem 0;
  border-bottom:1px dashed #e2e8f0;font-size:.92rem}
.fp-list li:last-child{border-bottom:none}
.fp-num{flex:0 0 auto;width:1.9rem;height:1.9rem;border-radius:50%;font-size:.8rem;
  font-weight:600;display:flex;align-items:center;justify-content:center;margin-top:.05rem}
.fp-item-text{min-width:0}
.fp-pr{display:inline-block;background:#f3efe6;color:#6b5d3f;border-radius:999px;
  font-size:.78rem;padding:.05rem .55rem;margin:.15rem .3rem .1rem 0;white-space:normal}
.fp-pr::before{content:"🧪 ";font-size:.75rem}
.fp-new{display:inline-block;background:#e8f0ea;color:#3f6b4f;border-radius:999px;
  font-size:.72rem;padding:.05rem .5rem;margin-left:.3rem;vertical-align:1px}
.fp-c1 .fp-head{background:linear-gradient(135deg,#3f5c4e,#4a7360)}
.fp-c1 .fp-num{background:#e7efea;color:#3f5c4e}
.fp-c2 .fp-head{background:linear-gradient(135deg,#37636b,#5b8a92)}
.fp-c2 .fp-num{background:#e4eff0;color:#37636b}
.fp-c3 .fp-head{background:linear-gradient(135deg,#46647f,#6d8ba3)}
.fp-c3 .fp-num{background:#e6edf3;color:#46647f}
.fp-c4 .fp-head{background:linear-gradient(135deg,#5e5470,#7d7295)}
.fp-c4 .fp-num{background:#eceaf1;color:#5e5470}
.fp-c5 .fp-head{background:linear-gradient(135deg,#8a5348,#a97a6d)}
.fp-c5 .fp-num{background:#f3e9e6;color:#8a5348}
.fp-c6 .fp-head{background:linear-gradient(135deg,#3d4f70,#5b6f8f)}
.fp-c6 .fp-num{background:#e7ebf3;color:#3d4f70}
.fp-c7 .fp-head{background:linear-gradient(135deg,#7d6b45,#a08b5f)}
.fp-c7 .fp-num{background:#f2ede0;color:#7d6b45}
.fp-c10 .fp-head{background:linear-gradient(135deg,#6f6a58,#8f8a74)}
.fp-c10 .fp-num{background:#efeee5;color:#6f6a58}
.fp-c11 .fp-head{background:linear-gradient(135deg,#5c6b46,#7d8c67)}
.fp-c11 .fp-num{background:#ecefdf;color:#5c6b46}
.fp-c12 .fp-head{background:linear-gradient(135deg,#7d5a68,#9d7a88)}
.fp-c12 .fp-num{background:#f3e8ec;color:#7d5a68}
.fp-c13 .fp-head{background:linear-gradient(135deg,#3c5a63,#5e7c85)}
.fp-c13 .fp-num{background:#e3efee;color:#3c5a63}
.fp-c14 .fp-head{background:linear-gradient(135deg,#7a5f42,#9c7f5f)}
.fp-c14 .fp-num{background:#f2ead9;color:#7a5f42}
.fp-c15 .fp-head{background:linear-gradient(135deg,#55525e,#77747f)}
.fp-c15 .fp-num{background:#ebeaee;color:#55525e}
.fp-c16 .fp-head{background:linear-gradient(135deg,#4f5e73,#717f93)}
.fp-c16 .fp-num{background:#e6ebf1;color:#4f5e73}
@media (max-width:600px){
  .fp-intro{padding:.75rem .85rem;font-size:.9rem}
  .fp-part{margin:1.1rem .2rem .55rem;font-size:.88rem}
  .fp-head{padding:.55rem .8rem;flex-wrap:wrap}
  .fp-head h4{font-size:.95rem}
  .fp-list{padding:.3rem .75rem .45rem}
  .fp-list li{font-size:.87rem}
  .fp-num{width:1.7rem;height:1.7rem;font-size:.75rem}
}
@media print{
  .fp-card{box-shadow:none;border:1px solid #ccc;break-inside:avoid}
}

/* ===== Олимпиады БВИ ===== */
.olymp-intro{background:#f8fafc;border-left:4px solid #3f6b4f;border-radius:0 12px 12px 0;
  padding:1rem 1.25rem;margin-bottom:1.25rem;font-size:.98rem;line-height:1.55;color:#333}
.olymp-intro p{margin:0 0 .6rem}
.olymp-intro p:last-child{margin-bottom:0}
.olymp-intro strong{color:#3f6b4f}
.olymp-tip{background:#fff;border:1px solid #e2e8f0;border-radius:10px;padding:.65rem .9rem;
  margin-top:.6rem;font-size:.92rem;color:#475569}
.olymp-tip b{color:#3f6b4f}
.olymp-section-title{display:flex;align-items:center;gap:.6rem;margin:1.25rem 0 .75rem}
.olymp-section-title h4{margin:0;font-size:1rem;color:#222}
.olymp-card{background:#fff;border-radius:12px;box-shadow:0 2px 14px rgba(15,23,42,.08);
  padding:1rem 1.25rem}
.olymp-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch}
.olymp-card table.olymp{width:100%;border-collapse:collapse;table-layout:fixed;
  background:#fff;min-width:640px}
.olymp-card table.olymp th{background:#3f5c4e;color:#fff;font-weight:500;font-size:.9rem;
  text-align:left;padding:.65rem .75rem;white-space:nowrap}
.olymp-card table.olymp th.c,.olymp-card table.olymp td.c{text-align:center}
.olymp-card table.olymp td{font-size:.92rem;line-height:1.4;color:#333;padding:.65rem .75rem;
  border-bottom:1px solid #e2e8f0;vertical-align:top;word-wrap:break-word}
.olymp-card table.olymp tbody tr:nth-child(even){background:#f8fafc}
.olymp-card table.olymp tbody tr:hover{background:#eef2f7}
.olymp-card table.olymp td a{color:#2563eb;text-decoration:none;font-weight:500}
.olymp-card table.olymp td a:hover{color:#1d4ed8;text-decoration:underline}
.olymp-card .olymp-klass{color:#64748b;white-space:nowrap;font-size:.85rem}
.olymp-card .olymp-dates{color:#475569;font-size:.88rem}
.lvl{display:inline-block;padding:.15rem .6rem;border-radius:999px;font-size:.78rem;
  font-weight:600;white-space:nowrap}
.lvl-1{color:#fff;background:#3f6b4f}
.lvl-2{color:#4a3f2c;background:#cfc3a9}
.olymp-soft{color:#767676}
.olymp-note{margin:.75rem 0 0;font-size:.82rem;color:#767676;line-height:1.5}
.olymp-outro{margin-top:1rem;font-size:.85rem;color:#767676;line-height:1.5}
@media (max-width:767px){
  .doc-cols{grid-template-columns:1fr}
  .olymp-intro{padding:.8rem .9rem;font-size:.92rem}
  .olymp-card{padding:.75rem}
  .olymp-card table.olymp{min-width:0}
  .olymp-card table.olymp thead{display:none}
  .olymp-card table.olymp,.olymp-card table.olymp tbody,
  .olymp-card table.olymp tr,.olymp-card table.olymp td{display:block;width:100%}
  .olymp-card table.olymp tbody tr{border:1px solid #e2e8f0;border-radius:10px;
    margin:.6rem 0;padding:.35rem .75rem .5rem;background:#fff}
  .olymp-card table.olymp tbody tr:nth-child(even){background:#fff}
  .olymp-card table.olymp tbody tr:hover{background:#fff}
  .olymp-card table.olymp td{display:flex;justify-content:space-between;align-items:flex-start;
    gap:.75rem;border-bottom:1px dashed #e2e8f0;padding:.5rem 0;font-size:.88rem}
  .olymp-card table.olymp td:last-child{border-bottom:none;padding-bottom:.35rem}
  .olymp-card table.olymp td::before{content:attr(data-label);flex:0 0 auto;font-weight:600;
    color:#3f5c4e;font-size:.78rem;text-transform:uppercase;letter-spacing:.02em;padding-top:.1rem}
  .olymp-card table.olymp td:first-child{display:block;border-bottom:1px solid #e2e8f0;
    padding:.55rem 0;font-size:.95rem}
  .olymp-card table.olymp td:first-child::before{content:none}
}

@media (max-width:600px){
  .ege h1{font-size:26px}
}

/* ===== Ссылки по аналогии с help.css: #222 → акцент при наведении ===== */
.ege a.text-primary,
.doc-list-card .text-primary,
.tbl-modern .text-primary,
.olymp-card table.olymp td a,
.blank-card a,
.doc-answers .doc-badge{
  color:#222;
  text-decoration:underline;
  text-underline-offset:2px;
}
.ege a.text-primary:hover,
.doc-list-card .text-primary:hover,
.tbl-modern .text-primary:hover,
.olymp-card table.olymp td a:hover,
.blank-card a:hover,
.doc-answers .doc-badge:hover{
  color:var(--accent,#2b6cb0);
}

/* ссылки-бейджи «Ответы заданий…» — тоже в акцентный цвет, но как плашки, без линии */
.doc-answers .doc-badge{color:var(--accent,#2b6cb0)}
.doc-answers .doc-badge:hover{text-decoration:none}

/* ===== Шкала перевода баллов: фиксация раскладки ===== */
.tbl-scale table{table-layout:fixed;width:100%;min-width:700px}
.tbl-scale tr{display:table-row}
.tbl-scale td{display:table-cell;vertical-align:middle}
.tbl-scale td:first-child{width:150px;min-width:0}

