/* ============================================================
   udonobr.ru — единый CSS для олимпиадных страниц
   Подключение: <link rel="stylesheet" href="/css/olimp.css">

   Содержание:
   1. Олимп_Всероссийская — .mrc-vos-*
   2. Олимп_главная_цитата — .mrc-gifted-*
   3. Олимп_Всероссийская_документы / Школьный этап / Муниципальный этап — .mrc-doc-*
   4. Цветовые модификаторы меню
   5. Тема «Поддержка и поощрение» — .mrc-doc-wrap--warm
   ============================================================ */


/* ============================================================
   1. ОЛИМП_ВСЕРОССИЙСКАЯ — .mrc-vos-*
   ============================================================ */
.mrc-vos-wrap {
  --bg: #f6f8fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #64748b;
  --border: #e5e7eb;
  --radius: 22px;
  --shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  --shadow-sm: 0 6px 16px rgba(15, 23, 42, 0.08);
  --accent: #6366f1;
  --accent-soft: #eef2ff;

  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 8px 0 24px;
  color: var(--text);
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
}

.mrc-vos-wrap *,
.mrc-vos-wrap *::before,
.mrc-vos-wrap *::after { box-sizing: border-box; }

.mrc-vos-wrap p { margin: 0 0 12px; }

.mrc-vos-wrap a,
.mrc-vos-wrap a:link,
.mrc-vos-wrap a:visited,
.mrc-vos-wrap a:hover,
.mrc-vos-wrap a:active,
.mrc-vos-wrap a:focus { text-decoration: none !important; }

.mrc-vos-visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* --- Меню .mrc-vos-* --- */
.mrc-vos-menu-shell {
  position: relative; overflow: hidden;
  width: 100%; min-width: 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 55%, #eef2ff 100%);
  box-shadow: var(--shadow);
}
.mrc-vos-menu-shell::after {
  content: ""; position: absolute; right: -30px; bottom: -50px;
  width: 170px; height: 170px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.13), transparent 65%);
  pointer-events: none;
}
.mrc-vos-menu { position: relative; z-index: 1; width: 100%; min-width: 0; }
.mrc-vos-list {
  display: flex; flex-wrap: nowrap; align-items: stretch; gap: 10px;
  width: 100%; min-width: 0;
  margin: 0; padding: 0; list-style: none;
}
.mrc-vos-item { flex: 1 1 0; min-width: 0; display: flex; }
.mrc-vos-link {
  --item-accent: #6366f1;
  --item-soft: #eef2ff;
  position: relative; flex: 1 1 auto;
  width: 100%; min-width: 0; height: 100%; min-height: 72px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 12px 10px 20px;
  border: 1px solid var(--border); border-radius: 18px;
  background: #ffffff; color: #0f172a;
  font-size: clamp(12px, 1.25vw, 15px); font-weight: 650; line-height: 1.2;
  text-align: center; text-decoration: none !important;
  white-space: normal; overflow-wrap: anywhere; word-break: break-word; hyphens: auto;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease,
              border-color 0.18s ease, color 0.18s ease;
}
.mrc-vos-link-text { display: block; max-width: 100%; min-width: 0; }
.mrc-vos-link::before {
  content: ""; flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%;
  background: var(--item-accent); box-shadow: 0 0 0 4px var(--item-soft);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.mrc-vos-link:hover {
  transform: translateY(-2px);
  border-color: var(--item-accent);
  background: var(--item-soft);
  box-shadow: var(--shadow-sm);
}
.mrc-vos-link:hover::before { transform: scale(1.15); }
.mrc-vos-link:active {
  transform: translateY(0) scale(0.98);
  box-shadow: inset 0 2px 8px rgba(15, 23, 42, 0.12);
}
.mrc-vos-link:focus-visible {
  outline: 2px solid transparent; outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.28), var(--shadow-sm);
}
.mrc-vos-link.is-active {
  background: var(--item-soft); border-color: var(--item-accent);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.8), var(--shadow-sm);
}
.mrc-vos-link.is-active::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: 9px;
  height: 3px; border-radius: 999px; background: var(--item-accent); opacity: 0.9;
}

/* --- Секции и ссылки-плитки --- */
.mrc-vos-section { width: 100%; min-width: 0; margin-top: 18px; }
.mrc-vos-section-title {
  margin: 0 0 12px;
  font-size: clamp(20px, 2.2vw, 24px);
  line-height: 1.25; color: #0f172a;
}
.mrc-vos-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 12px; width: 100%; min-width: 0;
}
.mrc-vos-link-card {
  display: flex; align-items: center; gap: 12px;
  width: 100%; min-width: 0; min-height: 72px;
  padding: 16px 18px;
  border: 1px solid var(--border); border-radius: 18px;
  background: #ffffff; color: #0f172a;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease,
              background-color 0.18s ease, border-color 0.18s ease;
}
.mrc-vos-link-card:hover {
  transform: translateY(-2px); border-color: var(--accent);
  background: var(--accent-soft); box-shadow: var(--shadow-sm);
}
.mrc-vos-link-card:active {
  transform: translateY(0) scale(0.98);
  box-shadow: inset 0 2px 8px rgba(15, 23, 42, 0.12);
}
.mrc-vos-link-card:focus-visible {
  outline: 2px solid transparent; outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.28), var(--shadow-sm);
}
.mrc-vos-link-icon {
  flex: 0 0 auto; width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #eef2ff, #f8fafc);
  font-size: 22px; line-height: 1;
}
.mrc-vos-link-text {
  min-width: 0;
  font-size: clamp(14px, 1.45vw, 16px);
  font-weight: 650; line-height: 1.3;
  overflow-wrap: anywhere; word-break: break-word;
}
.mrc-vos-link-meta {
  display: block; margin-top: 3px;
  font-size: 12px; font-weight: 500; color: var(--muted);
}

/* --- Контакты + chips (с выравниванием по ширине) --- */
.mrc-vos-contact-card {
  width: 100%; min-width: 0; padding: 24px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--card); box-shadow: var(--shadow);
}
.mrc-vos-card-title {
  margin: 0 0 14px;
  font-size: clamp(22px, 2.5vw, 28px);
  line-height: 1.25; color: #0f172a;
}
.mrc-vos-contact-card p {
  margin: 0 0 14px;
  font-size: clamp(15px, 1.7vw, 17px);
  line-height: 1.65; color: #374151;
  overflow-wrap: break-word;

  text-align: justify;
  text-justify: inter-word;
  text-align-last: left;
  -webkit-hyphens: auto;
  -moz-hyphens: auto;
  -ms-hyphens: auto;
  hyphens: auto;
  -webkit-hyphenate-limit-chars: 8 4 4;
  hyphenate-limit-chars: 8 4 4;
  -webkit-hyphenate-limit-zone: 8%;
  hyphenate-limit-zone: 8%;
  -webkit-locale: "ru";
  word-break: normal;
  word-wrap: break-word;
}
.mrc-vos-contact-card p:last-child { margin-bottom: 0; }

.mrc-vos-contact-list {
  display: grid; gap: 12px;
  width: 100%; min-width: 0;
  margin: 18px 0 0; padding: 0; list-style: none;
}
.mrc-vos-contact-list li {
  display: grid;
  grid-template-columns: minmax(130px, 190px) minmax(0, 1fr);
  gap: 10px; align-items: start;
  width: 100%; min-width: 0; padding: 14px;
  border: 1px solid var(--border); border-radius: 16px;
  background: #f8fafc;
}
.mrc-vos-contact-label {
  min-width: 0; font-weight: 750; color: #334155;
  overflow-wrap: anywhere;
}
.mrc-vos-contact-value {
  min-width: 0; color: #111827; line-height: 1.55;
  overflow-wrap: anywhere;

  text-align: justify;
  text-justify: inter-word;
  text-align-last: left;
  -webkit-hyphens: auto;
  -moz-hyphens: auto;
  -ms-hyphens: auto;
  hyphens: auto;
  -webkit-hyphenate-limit-chars: 8 4 4;
  hyphenate-limit-chars: 8 4 4;
  -webkit-hyphenate-limit-zone: 8%;
  hyphenate-limit-zone: 8%;
  -webkit-locale: "ru";
}
.mrc-vos-chip-row { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.mrc-vos-chip {
  display: inline-flex; align-items: center; gap: 8px;
  max-width: 100%; min-width: 0;
  padding: 9px 14px;
  border: 1px solid var(--border); border-radius: 999px;
  background: #ffffff; color: #0f172a;
  font-size: clamp(13px, 1.35vw, 15px); font-weight: 650; line-height: 1.2;
  overflow-wrap: anywhere; word-break: break-word;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  transition: transform 0.16s ease, box-shadow 0.16s ease,
              background-color 0.16s ease, border-color 0.16s ease;
}
.mrc-vos-chip:hover {
  transform: translateY(-1px); border-color: var(--accent);
  background: var(--accent-soft); box-shadow: var(--shadow-sm);
}
.mrc-vos-chip:active {
  transform: translateY(0) scale(0.98);
  box-shadow: inset 0 2px 8px rgba(15, 23, 42, 0.12);
}
.mrc-vos-chip:focus-visible {
  outline: 2px solid transparent; outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.28), var(--shadow-sm);
}
.mrc-vos-chip-mail  { color: #1d4ed8; }
.mrc-vos-chip-phone { color: #047857; }

/* --- Горячая линия (с justify) --- */
.mrc-vos-hotline {
  display: flex;
  flex-wrap: nowrap;               /* картинка слева, текст справа — не переносим */
  align-items: center;
  gap: 22px;
  width: 100%;
  min-width: 0;
  padding: 24px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 48%, #f0fdf4 100%);
  box-shadow: var(--shadow);
}
.mrc-vos-hotline-media {
  flex: 0 0 220px;                 /* фиксированная ширина картинки */
  max-width: 220px;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
}
.mrc-vos-hotline-media img {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: auto;
  max-height: 280px;
  object-fit: contain;
  border-radius: 12px;
  background: #ffffff;
}
.mrc-vos-hotline-body {
  flex: 1 1 0;                     /* текст занимает всё оставшееся место */
  min-width: 0;
}
.mrc-vos-hotline-body h2 {
  margin: 0 0 12px;
  font-size: clamp(20px, 2.2vw, 24px);
  line-height: 1.25; color: #0f172a;
}
.mrc-vos-hotline-phone {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-width: 0; padding: 12px 18px;
  border: 1px solid rgba(14, 116, 144, 0.22); border-radius: 999px;
  background: linear-gradient(135deg, #f0f9ff 0%, #ecfeff 52%, #f0fdf4 100%);
  color: #155e75;
  font-size: clamp(15px, 2vw, 21px); font-weight: 800;
  line-height: 1.2; letter-spacing: 0.2px; text-align: center;
  overflow-wrap: anywhere; word-break: break-word;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06), inset 0 1px 0 rgba(255,255,255,0.9);
  transition: transform 0.18s ease, box-shadow 0.18s ease,
              background-color 0.18s ease, border-color 0.18s ease;
}
.mrc-vos-hotline-phone-icon {
  flex: 0 0 auto; width: 1.1em; height: 1.1em;
  display: inline-flex; align-items: center; justify-content: center;
  color: #ca8a04;
}
.mrc-vos-hotline-phone-icon svg { width: 100%; height: 100%; display: block; }
.mrc-vos-hotline-phone-number { min-width: 0; flex: 0 1 auto; }
.mrc-vos-hotline-phone:hover {
  transform: translateY(-1px);
  border-color: rgba(14, 116, 144, 0.34);
  background: linear-gradient(135deg, #e0f2fe 0%, #cffafe 52%, #dcfce7 100%);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255,255,255,0.9);
}
.mrc-vos-hotline-phone:active {
  transform: translateY(0) scale(0.99);
  box-shadow: inset 0 2px 8px rgba(15, 23, 42, 0.10);
}
.mrc-vos-hotline-phone:focus-visible {
  outline: 2px solid transparent; outline-offset: 3px;
  box-shadow: 0 0 0 3px rgba(14, 116, 144, 0.28), 0 10px 22px rgba(15,23,42,0.08);
}
.mrc-vos-hotline-note {
  margin: 12px 0 0;
  font-size: clamp(14px, 1.5vw, 16px);
  line-height: 1.55; color: #0e7490;

  text-align: justify;
  text-justify: inter-word;
  text-align-last: left;
  -webkit-hyphens: auto;
  -moz-hyphens: auto;
  -ms-hyphens: auto;
  hyphens: auto;
  -webkit-hyphenate-limit-chars: 8 4 4;
  hyphenate-limit-chars: 8 4 4;
  -webkit-hyphenate-limit-zone: 8%;
  hyphenate-limit-zone: 8%;
  -webkit-locale: "ru";
}

@media (max-width: 860px) {
  .mrc-vos-contact-list li { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .mrc-vos-wrap { padding: 6px 0 20px; }
  .mrc-vos-menu-shell { padding: 8px; border-radius: 18px; }
  .mrc-vos-list { gap: 7px; }
  .mrc-vos-link {
    min-height: 66px; padding: 10px 6px 18px;
    border-radius: 14px; font-size: clamp(11px, 3.1vw, 13px); gap: 6px;
  }
  .mrc-vos-link::before { width: 7px; height: 7px; box-shadow: 0 0 0 3px var(--item-soft); }
  .mrc-vos-link.is-active::after { left: 6px; right: 6px; bottom: 7px; height: 2px; }
  .mrc-vos-link-card { min-height: 64px; padding: 14px; border-radius: 16px; }
  .mrc-vos-link-icon { width: 38px; height: 38px; border-radius: 12px; font-size: 20px; }
  .mrc-vos-contact-card, .mrc-vos-hotline { padding: 18px; border-radius: 18px; }

  /* На мобильном горячая линия — в столбик */
  .mrc-vos-hotline {
    flex-wrap: wrap;
    padding: 18px;
    border-radius: 18px;
  }
  .mrc-vos-hotline-media {
    flex: 1 1 100%;
    max-width: 100%;
    padding: 8px;
    border-radius: 14px;
  }
  .mrc-vos-hotline-media img { max-height: 240px; border-radius: 10px; }
  .mrc-vos-hotline-phone { padding: 11px 16px; }
}
@media (max-width: 420px) {
  .mrc-vos-list { gap: 5px; }
  .mrc-vos-link {
    min-height: 62px; padding: 9px 4px 16px;
    font-size: 10.5px; line-height: 1.15;
  }
  .mrc-vos-links-grid { gap: 8px; }
  .mrc-vos-link-card { gap: 10px; padding: 12px; }
  .mrc-vos-link-icon { width: 34px; height: 34px; font-size: 18px; }
  .mrc-vos-link-text { font-size: 13px; }
  .mrc-vos-contact-list li { padding: 12px; }
  .mrc-vos-chip { padding: 8px 12px; font-size: 13px; }
  .mrc-vos-hotline-phone {
    flex-direction: column; gap: 4px; padding: 10px 14px;
    font-size: clamp(14px, 4.2vw, 19px); letter-spacing: 0.1px;
  }
  .mrc-vos-hotline-phone-icon { width: 1.2em; height: 1.2em; }
}
@media (prefers-reduced-motion: reduce) {
  .mrc-vos-wrap *, .mrc-vos-wrap *::before, .mrc-vos-wrap *::after {
    transition: none !important; animation: none !important;
  }
}


/* ============================================================
   2. ОЛИМП_ГЛАВНАЯ_ЦИТАТА — .mrc-gifted-*
   ============================================================ */
.mrc-gifted-wrap {
  --bg: #f6f8fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #64748b;
  --border: #e5e7eb;
  --radius: 22px;
  --shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  --shadow-sm: 0 6px 16px rgba(15, 23, 42, 0.08);

  width: 100%; max-width: 100%; min-width: 0;
  margin: 0; padding: 8px 0 24px;
  color: var(--text);
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
}
.mrc-gifted-wrap *, .mrc-gifted-wrap *::before, .mrc-gifted-wrap *::after { box-sizing: border-box; }
.mrc-gifted-wrap p { margin: 0 0 12px; }
.mrc-gifted-wrap a,
.mrc-gifted-wrap a:link,
.mrc-gifted-wrap a:visited,
.mrc-gifted-wrap a:hover,
.mrc-gifted-wrap a:active,
.mrc-gifted-wrap a:focus { text-decoration: none !important; }

.mrc-gifted-menu-shell {
  position: relative; overflow: hidden;
  width: 100%; min-width: 0; padding: 10px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 55%, #eef2ff 100%);
  box-shadow: var(--shadow);
}
.mrc-gifted-menu-shell::after {
  content: ""; position: absolute; right: -30px; bottom: -50px;
  width: 170px; height: 170px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.13), transparent 65%);
  pointer-events: none;
}
.mrc-gifted-menu { position: relative; z-index: 1; width: 100%; min-width: 0; overflow: visible; }
.mrc-gifted-list {
  display: flex; flex-wrap: nowrap; align-items: stretch; gap: 10px;
  width: 100%; min-width: 0; margin: 0; padding: 0; list-style: none;
}
.mrc-gifted-item { flex: 1 1 0; min-width: 0; display: flex; }
.mrc-gifted-link {
  --accent: #6366f1; --soft: #eef2ff;
  position: relative; flex: 1 1 auto;
  width: 100%; min-width: 0; height: 100%; min-height: 72px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 12px 10px 20px;
  border: 1px solid var(--border); border-radius: 18px;
  background: #ffffff; color: #0f172a;
  font-size: clamp(12px, 1.25vw, 15px); font-weight: 650; line-height: 1.2;
  text-align: center; text-decoration: none !important;
  white-space: normal; overflow-wrap: anywhere; word-break: break-word; hyphens: auto;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease,
              background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.mrc-gifted-text { display: block; max-width: 100%; min-width: 0; }
.mrc-gifted-link::before {
  content: ""; flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 4px var(--soft);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.mrc-gifted-link:hover {
  transform: translateY(-2px); border-color: var(--accent);
  background: var(--soft); box-shadow: var(--shadow-sm);
}
.mrc-gifted-link:hover::before { transform: scale(1.15); }
.mrc-gifted-link:active {
  transform: translateY(0) scale(0.98);
  box-shadow: inset 0 2px 8px rgba(15, 23, 42, 0.12);
}
.mrc-gifted-link:focus-visible {
  outline: 2px solid transparent; outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.28), var(--shadow-sm);
}
.mrc-gifted-link.is-active {
  background: var(--soft); border-color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.8), var(--shadow-sm);
}
.mrc-gifted-link.is-active::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: 9px;
  height: 3px; border-radius: 999px; background: var(--accent); opacity: 0.9;
}

.mrc-gifted-content { margin-top: 18px; width: 100%; min-width: 0; }
.mrc-gifted-card {
  position: relative; overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px; align-items: center;
  width: 100%; min-width: 0; padding: 24px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--card); box-shadow: var(--shadow);
}
.mrc-gifted-card::before {
  content: "\201C"; position: absolute; top: -18px; left: 18px;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 120px; line-height: 1; color: rgba(99, 102, 241, 0.08);
  pointer-events: none;
}
.mrc-gifted-media {
  width: 100%; min-width: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 10px;
  border: 1px solid var(--border); border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: var(--shadow-sm);
}
.mrc-gifted-media img {
  display: block; width: 100%; max-width: 100%; min-width: 0; height: auto;
  border-radius: 12px; background: #ffffff;
}
.mrc-gifted-quote { position: relative; z-index: 1; margin: 0; width: 100%; min-width: 0; }
.mrc-gifted-quote p {
  margin: 0 0 14px;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: clamp(18px, 2.1vw, 24px);
  line-height: 1.55; font-style: italic; color: #111827;
  overflow-wrap: break-word;
}
.mrc-gifted-quote cite {
  display: block; text-align: right;
  font-style: normal; font-weight: 700;
  font-size: clamp(16px, 1.8vw, 20px); color: #374151;
}
@media (max-width: 860px) {
  .mrc-gifted-card { grid-template-columns: 1fr; padding: 18px; }
  .mrc-gifted-quote cite { text-align: left; }
}
@media (max-width: 620px) {
  .mrc-gifted-wrap { padding: 6px 0 20px; }
  .mrc-gifted-menu-shell { padding: 8px; border-radius: 18px; }
  .mrc-gifted-list { gap: 7px; }
  .mrc-gifted-link {
    min-height: 66px; padding: 10px 6px 18px;
    border-radius: 14px; font-size: clamp(11px, 3.1vw, 13px); gap: 6px;
  }
  .mrc-gifted-link::before { width: 7px; height: 7px; box-shadow: 0 0 0 3px var(--soft); }
  .mrc-gifted-link.is-active::after { left: 6px; right: 6px; bottom: 7px; height: 2px; }
  .mrc-gifted-media { padding: 8px; border-radius: 14px; }
}
@media (max-width: 420px) {
  .mrc-gifted-list { gap: 5px; }
  .mrc-gifted-link {
    min-height: 62px; padding: 9px 4px 16px;
    font-size: 10.5px; line-height: 1.15;
  }
}
@media (prefers-reduced-motion: reduce) {
  .mrc-gifted-wrap *, .mrc-gifted-wrap *::before, .mrc-gifted-wrap *::after {
    transition: none !important; animation: none !important;
  }
}


/* ============================================================
   3. ОЛИМП_ВСЕРОССИЙСКАЯ_ДОКУМЕНТЫ / ШКОЛЬНЫЙ / МУНИЦИПАЛЬНЫЙ
      — .mrc-doc-*
   ============================================================ */
.mrc-doc-wrap {
  --bg: #f6f8fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #64748b;
  --border: #e5e7eb;
  --radius: 22px;
  --shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  --shadow-sm: 0 6px 16px rgba(15, 23, 42, 0.08);
  --accent: #6366f1;
  --accent-soft: #eef2ff;
  --pdf: #dc2626; --pdf-soft: #fef2f2;
  --doc: #2563eb; --doc-soft: #eff6ff;
  width: 100%; max-width: 100%; min-width: 0;
  margin: 0; padding: 8px 0 24px;
  color: var(--text);
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
}
.mrc-doc-wrap *, .mrc-doc-wrap *::before, .mrc-doc-wrap *::after { box-sizing: border-box; }
.mrc-doc-wrap p { margin: 0 0 12px; }
.mrc-doc-wrap a, .mrc-doc-wrap a:link, .mrc-doc-wrap a:visited,
.mrc-doc-wrap a:hover, .mrc-doc-wrap a:active, .mrc-doc-wrap a:focus {
  text-decoration: none !important;
}
.mrc-doc-visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* --- Герой (с выравниванием по ширине + снятием max-width) --- */
.mrc-doc-hero {
  margin-top: 18px; padding: 24px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 55%, #eef2ff 100%);
  box-shadow: var(--shadow);
}
.mrc-doc-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3vw, 32px); line-height: 1.2; color: #0f172a;
}

.mrc-doc-hero p,
.mrc-doc-hero ul {
  max-width: none;
  width: 100%;
}

.mrc-doc-hero p {
  margin: 0 0 12px;
  font-size: clamp(15px, 1.7vw, 17px);
  line-height: 1.6;
  color: #475569;

  text-align: justify;
  text-justify: inter-word;
  text-align-last: left;
  -webkit-hyphens: auto;
  -moz-hyphens: auto;
  -ms-hyphens: auto;
  hyphens: auto;
  -webkit-hyphenate-limit-chars: 8 4 4;
  hyphenate-limit-chars: 8 4 4;
  -webkit-hyphenate-limit-zone: 8%;
  hyphenate-limit-zone: 8%;
  -webkit-locale: "ru";
  word-break: normal;
  overflow-wrap: break-word;
  word-wrap: break-word;
}
.mrc-doc-hero p:last-child { margin-bottom: 0; }

.mrc-doc-hero p.hl {
  margin: 14px 0 8px !important;
  font-weight: 700;
  color: #0f172a !important;
  text-align: justify;
  text-justify: inter-word;
  text-align-last: left;
}

.mrc-doc-hero ul {
  margin: 0 0 12px;
  padding-left: 22px;
  list-style: disc;
}
.mrc-doc-hero ul:last-child { margin-bottom: 0; }

.mrc-doc-hero ul li {
  font-size: clamp(15px, 1.6vw, 16.5px);
  line-height: 1.6;
  color: #374151;

  text-align: justify;
  text-justify: inter-word;
  text-align-last: left;
  -webkit-hyphens: auto;
  -moz-hyphens: auto;
  -ms-hyphens: auto;
  hyphens: auto;
  -webkit-hyphenate-limit-chars: 8 4 4;
  hyphenate-limit-chars: 8 4 4;
  -webkit-hyphenate-limit-zone: 8%;
  hyphenate-limit-zone: 8%;
  -webkit-locale: "ru";
  word-break: normal;
  overflow-wrap: break-word;
  word-wrap: break-word;
}
.mrc-doc-hero ul li::marker { color: #6366f1; }
.mrc-doc-hero ul li + li { margin-top: 8px; }

.mrc-doc-hero h2,
.mrc-doc-hero h3 {
  margin: 18px 0 12px;
  font-size: clamp(20px, 2.4vw, 24px);
  line-height: 1.25;
  color: #0f172a;
}
.mrc-doc-hero h2:first-child,
.mrc-doc-hero h3:first-child { margin-top: 0; }

/* --- Группы документов (старая разметка section + h2) --- */
.mrc-doc-group { width: 100%; min-width: 0; margin-top: 22px; }
.mrc-doc-group-title {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 12px;
  font-size: clamp(18px, 2vw, 22px); line-height: 1.25; color: #0f172a;
}
.mrc-doc-group-title::before {
  content: ""; flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft);
}

/* --- Обёртка аккордеонов --- */
.mrc-doc-accordions {
  display: grid;
  gap: 12px;
  width: 100%;
  min-width: 0;
  margin-top: 18px;
}
.mrc-doc-accordions .mrc-doc-accordion { margin-top: 0; }
.mrc-doc-accordions .mrc-doc-accordion:first-of-type { margin-top: 0; }

/* --- Один аккордеон <details> --- */
.mrc-doc-accordion {
  width: 100%; min-width: 0;
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}
.mrc-doc-accordion:first-of-type { margin-top: 18px; }
.mrc-doc-accordion > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 22px;
  align-items: center;
  gap: 12px;
  width: 100%; min-width: 0;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
  background: #ffffff;
  color: #0f172a;
  transition: background-color 0.18s ease, color 0.18s ease;
}
.mrc-doc-accordion > summary::-webkit-details-marker { display: none; }
.mrc-doc-accordion > summary::marker { content: ""; }
.mrc-doc-accordion > summary:hover { background: #f8fafc; }
.mrc-doc-accordion > summary:focus-visible {
  outline: 2px solid transparent; outline-offset: -2px;
  box-shadow: inset 0 0 0 2px rgba(99, 102, 241, 0.35);
}
.mrc-doc-year {
  min-width: 0;
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 850; line-height: 1.2;
  overflow-wrap: anywhere;
}
.mrc-doc-badge {
  flex: 0 0 auto; min-width: 0;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eef2ff; color: #3730a3;
  font-size: 12px; font-weight: 700; line-height: 1.1;
  white-space: nowrap;
}
.mrc-doc-badge-muted { background: #f1f5f9; color: #475569; }
.mrc-doc-chevron {
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #64748b;
  transition: transform 0.2s ease, color 0.2s ease;
}
.mrc-doc-chevron svg { width: 100%; height: 100%; display: block; }
.mrc-doc-accordion[open] > summary .mrc-doc-chevron {
  transform: rotate(180deg);
  color: #4f46e5;
}
.mrc-doc-panel {
  width: 100%; min-width: 0;
  padding: 0 16px 16px;
  border-top: 1px solid var(--border);
  background: #ffffff;
}
.mrc-doc-accordion[open] > .mrc-doc-panel {
  animation: mrcDocFade 0.18s ease;
}
@keyframes mrcDocFade {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- Стек документов --- */
.mrc-doc-stack {
  display: grid; gap: 12px;
  width: 100%; min-width: 0;
  padding-top: 12px;
}

/* --- Карточка одного документа --- */
.mrc-doc-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "type name action";
  align-items: center; gap: 16px;
  width: 100%; min-width: 0; padding: 16px 18px;
  border: 1px solid var(--border); border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease,
              border-color 0.18s ease, background-color 0.18s ease;
}
.mrc-doc-row:hover {
  transform: translateY(-2px); border-color: #c7d2fe;
  box-shadow: var(--shadow-sm);
}
.mrc-doc-type {
  grid-area: type; flex: 0 0 auto;
  width: 40px; height: 48px;
  display: inline-flex; align-items: center; justify-content: center;
}
.mrc-doc-type svg { width: 100%; height: 100%; display: block; }
.mrc-doc-info {
  grid-area: name; min-width: 0;
  display: flex; flex-direction: column; gap: 4px;
}
.mrc-doc-name {
  min-width: 0;
  font-size: clamp(14px, 1.5vw, 16px);
  font-weight: 650; line-height: 1.4; color: #0f172a;
  overflow-wrap: anywhere; word-break: break-word;
}
.mrc-doc-meta {
  min-width: 0; font-size: 12.5px; font-weight: 500;
  color: var(--muted); overflow-wrap: anywhere;
}
.mrc-doc-meta b { font-weight: 700; color: #334155; }
.mrc-doc-actions {
  grid-area: action; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: flex-end;
}

/* --- Кнопки действий --- */
.mrc-doc-btn {
  display: inline-flex; align-items: center; gap: 8px;
  max-width: 100%; min-width: 0; padding: 10px 16px;
  border: 1px solid rgba(99, 102, 241, 0.30); border-radius: 999px;
  background: var(--accent-soft); color: #3730a3;
  font-size: clamp(13px, 1.35vw, 14.5px); font-weight: 700; line-height: 1.1;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
  transition: transform 0.16s ease, box-shadow 0.16s ease,
              background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}
.mrc-doc-btn svg { flex: 0 0 auto; width: 18px; height: 18px; display: block; }
.mrc-doc-btn:hover {
  transform: translateY(-1px); background: #e0e7ff;
  border-color: rgba(99, 102, 241, 0.5); color: #312e81;
  box-shadow: var(--shadow-sm);
}
.mrc-doc-btn:active {
  transform: translateY(0) scale(0.98);
  box-shadow: inset 0 2px 8px rgba(15, 23, 42, 0.12);
}
.mrc-doc-btn:focus-visible {
  outline: 2px solid transparent; outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.30), var(--shadow-sm);
}
.mrc-doc-btn-download {
  background: #ecfdf5; border-color: rgba(5, 150, 105, 0.30); color: #065f46;
}
.mrc-doc-btn-download:hover {
  background: #d1fae5; border-color: rgba(5, 150, 105, 0.5); color: #064e3b;
}
.mrc-doc-btn-download:focus-visible {
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.30), var(--shadow-sm);
}
.mrc-doc-btn-archive {
  background: #f5f3ff;
  border-color: rgba(124, 58, 237, 0.30);
  color: #5b21b6;
}
.mrc-doc-btn-archive:hover {
  background: #ede9fe;
  border-color: rgba(124, 58, 237, 0.5);
  color: #4c1d95;
}
.mrc-doc-btn-archive:focus-visible {
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.30), var(--shadow-sm);
}
.mrc-doc-btn-folder {
  background: #fefce8;
  border-color: rgba(202, 138, 4, 0.30);
  color: #854d0e;
}
.mrc-doc-btn-folder:hover {
  background: #fef9c3;
  border-color: rgba(202, 138, 4, 0.5);
  color: #713f12;
}
.mrc-doc-btn-folder:focus-visible {
  box-shadow: 0 0 0 3px rgba(202, 138, 4, 0.30), var(--shadow-sm);
}
.mrc-doc-btn-web {
  background: #cffafe;
  border-color: rgba(8, 145, 178, 0.30);
  color: #155e75;
}
.mrc-doc-btn-web:hover {
  background: #a5f3fc;
  border-color: rgba(8, 145, 178, 0.5);
  color: #0e7490;
}
.mrc-doc-btn-web:focus-visible {
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.30), var(--shadow-sm);
}

/* --- Адаптив .mrc-doc-* --- */
@media (max-width: 720px) {
  .mrc-doc-row {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "type name" "action action";
    gap: 12px; padding: 14px;
  }
  .mrc-doc-actions { justify-content: stretch; }
  .mrc-doc-btn { width: 100%; justify-content: center; }
}
@media (max-width: 620px) {
  .mrc-doc-wrap { padding: 6px 0 20px; }
  .mrc-doc-hero { padding: 18px; border-radius: 18px; }
  .mrc-doc-accordion > summary { padding: 14px 16px; }
  .mrc-doc-panel { padding: 0 14px 14px; }
}
@media (max-width: 520px) {
  .mrc-doc-accordion > summary {
    grid-template-columns: minmax(0, 1fr) 22px;
  }
  .mrc-doc-badge { display: none; }
}
@media (max-width: 420px) {
  .mrc-doc-type { width: 34px; height: 42px; }
  .mrc-doc-row { padding: 12px; }
  .mrc-doc-btn { padding: 9px 14px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .mrc-doc-wrap *, .mrc-doc-wrap *::before, .mrc-doc-wrap *::after {
    transition: none !important; animation: none !important;
  }
}


/* ============================================================
   4. ЦВЕТОВЫЕ МОДИФИКАТОРЫ МЕНЮ
   ============================================================ */

/* .mrc-vos-link, .mrc-doc-link — используют --item-accent / --item-soft */
.mrc-vos-link.mrc-orange {
  --item-accent: #ea580c;
  --item-soft: #fff7ed;
}
.mrc-vos-link.mrc-green {
  --item-accent: #059669;
  --item-soft: #ecfdf5;
}
.mrc-vos-link.mrc-red {
  --item-accent: #dc2626;
  --item-soft: #fef2f2;
}
.mrc-vos-link.mrc-yellow {
  --item-accent: #ca8a04;
  --item-soft: #fefce8;
}

/* .mrc-gifted-link — использует --accent / --soft */
.mrc-gifted-link.mrc-orange { --accent: #ea580c; --soft: #fff7ed; }
.mrc-gifted-link.mrc-green  { --accent: #059669; --soft: #ecfdf5; }
.mrc-gifted-link.mrc-red    { --accent: #dc2626; --soft: #fef2f2; }
.mrc-gifted-link.mrc-yellow { --accent: #ca8a04; --soft: #fefce8; }


/* ============================================================
   5. ТЕМА «ПОДДЕРЖКА И ПООЩРЕНИЕ» — .mrc-doc-wrap--warm
   ============================================================ */

.mrc-doc-wrap--warm .mrc-doc-hero {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 55%, #fefce8 100%);
}

.mrc-doc-wrap--warm .mrc-doc-group-title::before {
  background: #ca8a04;
  box-shadow: 0 0 0 4px #fefce8;
}

.mrc-doc-wrap--warm .mrc-doc-row:hover {
  border-color: #fde68a;
}

.mrc-doc-btn--warm {
  background: #fefce8;
  border-color: rgba(202, 138, 4, 0.30);
  color: #854d0e;
}
.mrc-doc-btn--warm:hover {
  background: #fef9c3;
  border-color: rgba(202, 138, 4, 0.5);
  color: #713f12;
}
.mrc-doc-btn--warm:focus-visible {
  box-shadow: 0 0 0 3px rgba(202, 138, 4, 0.30), var(--shadow-sm);
}

.mrc-doc-years {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr));
  gap: 12px;
  width: 100%;
  min-width: 0;
}
.mrc-doc-year-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  padding: 16px 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.mrc-doc-year-card:hover {
  transform: translateY(-2px);
  border-color: #fde68a;
  box-shadow: var(--shadow-sm);
}
.mrc-doc-year-card__val {
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 850;
  line-height: 1;
  color: #0f172a;
}
.mrc-doc-year-card__tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.mrc-doc-panel > .mrc-doc-years { padding-top: 12px; }

@media (max-width: 620px) {
  .mrc-doc-years {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 120px), 1fr));
  }
}