/* Topic 94 — clean IOC/editorial stylesheet for inner pages only.
   Do not load on index.html. Built as a fresh page layer instead of reusing home CSS. */

:root {
  --page-bg: #f4f6f9;
  --page-surface: #ffffff;
  --page-surface-soft: #eef2f6;
  --page-ink: #101820;
  --page-muted: #5f6b7a;
  --page-line: #d8dee7;
  --page-line-strong: #b8c2cf;
  --page-blue: #0078d4;
  --page-blue-dark: #004f9e;
  --page-red: #e31b23;
  --page-gold: #f5c542;
  --page-green: #2f7d59;
  --page-radius: 0px;
  --page-shadow: none;
  --page-max: 1180px;
  --page-pad-x: clamp(16px, 4vw, 48px);
  --page-section: clamp(36px, 5vw, 72px);
  --font-display: 'Montserrat', 'Inter', Arial, sans-serif;
  --font-body: 'Inter', Arial, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--page-bg); }
body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(0,120,212,.045) 0 1px, transparent 1px) 0 0 / 92px 92px,
    linear-gradient(180deg, #fbfcfe 0%, var(--page-bg) 42%, #eef2f6 100%);
  color: var(--page-ink);
  font-family: var(--font-body);
  line-height: 1.55;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(circle at 12% 12%, rgba(0,120,212,.12), transparent 28%),
    radial-gradient(circle at 84% 18%, rgba(227,27,35,.08), transparent 26%),
    radial-gradient(circle at 54% 92%, rgba(245,197,66,.10), transparent 24%);
}

main,
.main-content,
.documents-page,
.photobank-page,
.news-page-shell,
.disciplines-page {
  width: min(var(--page-max), calc(100% - var(--page-pad-x) * 2));
  margin: 0 auto;
  padding: clamp(28px, 4vw, 56px) 0 var(--page-section);
}
main.container,
.container.news-page-shell { width: min(var(--page-max), calc(100% - var(--page-pad-x) * 2)); }
.container { max-width: var(--page-max); }

/* strict geometry for inner pages */
:is(.card, .news-card, .document-card, .discipline-card, .event-card, .photo-card, .profile-card,
.cabinet-card, .stat-card, .info-card, .about-card, .contact-card, .modal-content, .dropdown-content,
.btn, button, input, select, textarea, .form-control, .page-btn, .filter-btn) {
  border-radius: var(--page-radius) !important;
  box-shadow: var(--page-shadow) !important;
}

/* Page heroes */
:is(.news-hero, .disciplines-hero, .documents-hero, .photobank-header, .cabinet-hero,
.page-header, .events-hero, .training-hero, .contacts-hero, .auth-hero) {
  position: relative;
  overflow: hidden;
  margin: 0 0 clamp(24px, 4vw, 44px);
  padding: clamp(30px, 5vw, 64px);
  background: linear-gradient(135deg, #07111f 0%, #13263f 58%, #f7f9fc 58.2%, #ffffff 100%);
  border: 1px solid var(--page-line-strong);
  color: #fff;
}
:is(.news-hero, .disciplines-hero, .documents-hero, .photobank-header, .cabinet-hero,
.page-header, .events-hero, .training-hero, .contacts-hero, .auth-hero)::after {
  content: "";
  position: absolute;
  right: clamp(18px, 4vw, 54px);
  top: 0;
  width: 9px;
  height: 100%;
  background: linear-gradient(180deg, var(--page-blue), var(--page-gold), var(--page-red), var(--page-green));
}
:is(.news-hero, .disciplines-hero, .documents-hero, .photobank-header, .cabinet-hero,
.page-header, .events-hero, .training-hero, .contacts-hero, .auth-hero) h1,
.page-title {
  margin: 0 0 14px;
  max-width: 820px;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 5rem);
  line-height: .9;
  letter-spacing: -.06em;
  text-transform: uppercase;
  color: inherit;
}
:is(.news-hero, .disciplines-hero, .documents-hero, .photobank-header, .cabinet-hero,
.page-header, .events-hero, .training-hero, .contacts-hero, .auth-hero) p,
.page-description {
  max-width: 680px;
  margin: 0;
  color: rgba(255,255,255,.82);
  font-size: clamp(1rem, 1.6vw, 1.22rem);
}

/* Sections and editorial cards */
:is(.news-grid, .documents-grid, .disciplines-grid, .events-grid, .photobank-grid, .about-grid,
.contact-grid, .cabinet-grid, .profile-grid, .stats-grid) {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
  gap: clamp(16px, 2.5vw, 28px);
}
:is(.news-card, .document-card, .discipline-card, .event-card, .photo-card, .profile-card,
.cabinet-card, .stat-card, .info-card, .about-card, .contact-card, .auth-card, .filter-panel,
.documents-filters, .news-filters, .photobank-filters, .disciplines-tabs, .cabinet-section,
.profile-section, .content-section) {
  background: var(--page-surface) !important;
  border: 1px solid var(--page-line) !important;
  color: var(--page-ink) !important;
  padding: clamp(18px, 2.6vw, 30px);
}
:is(.news-card, .document-card, .discipline-card, .event-card, .photo-card, .profile-card,
.cabinet-card, .stat-card, .info-card, .about-card, .contact-card) h2,
:is(.news-card, .document-card, .discipline-card, .event-card, .photo-card, .profile-card,
.cabinet-card, .stat-card, .info-card, .about-card, .contact-card) h3 {
  margin-top: 0;
  font-family: var(--font-display);
  letter-spacing: -.035em;
  color: var(--page-ink) !important;
}
:is(.news-card, .document-card, .discipline-card, .event-card, .photo-card, .profile-card,
.cabinet-card, .stat-card, .info-card, .about-card, .contact-card) p {
  color: var(--page-muted) !important;
}

/* Search, filters, forms */
:is(input:not([type="checkbox"]):not([type="radio"]), select, textarea, .form-control) {
  width: 100%;
  min-height: 46px;
  background: #fff !important;
  border: 1px solid var(--page-line-strong) !important;
  color: var(--page-ink) !important;
  padding: 12px 14px;
  font: inherit;
}
:is(input, select, textarea, .form-control):focus {
  outline: 2px solid rgba(0,120,212,.28);
  outline-offset: 2px;
  border-color: var(--page-blue) !important;
}
:is(.search-box, .news-search, .documents-search, .photobank-search, .filter-controls, .filters-row) {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 12px;
  align-items: end;
  margin-bottom: clamp(18px, 3vw, 34px);
}

/* Buttons and pagination */
:is(.btn, button, .page-btn, .filter-btn, .tab-btn, .discipline-tab, .document-download, .news-read-more) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid var(--page-line-strong) !important;
  background: #fff !important;
  color: var(--page-ink) !important;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}
:is(.btn-primary, .btn.active, .page-btn.active, .filter-btn.active, .tab-btn.active,
.discipline-tab.active, .news-read-more, .document-download) {
  background: var(--page-ink) !important;
  border-color: var(--page-ink) !important;
  color: #fff !important;
}
:is(.btn, button, .page-btn, .filter-btn, .tab-btn, .discipline-tab, a):hover {
  transform: none !important;
}
.pagination { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 28px; }

/* Tables/admin/cabinet */
table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--page-line); }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--page-line); text-align: left; }
th { background: #101820; color: #fff; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .04em; font-size: .78rem; }

/* Media/document thumbnails */
:is(.news-card img, .photo-card img, .document-card img, .event-card img, .profile-card img) {
  border-radius: 0 !important;
  object-fit: cover;
}
:is(.photo-card, .news-card, .document-card) { overflow: hidden; }
:is(.photo-card__image, .news-image, .document-icon, .event-image) { background: var(--page-surface-soft) !important; }

/* Legal/static text pages */
:is(.policy-content, .terms-content, .cookie-content, .legal-content, article) {
  background: #fff;
  border: 1px solid var(--page-line);
  padding: clamp(22px, 4vw, 48px);
  max-width: 920px;
  margin: 0 auto;
}
:is(.policy-content, .terms-content, .cookie-content, .legal-content, article) h2 {
  font-family: var(--font-display);
  color: var(--page-ink);
  letter-spacing: -.03em;
}

/* Kill legacy decorative noise on inner pages; rebuild is editorial, not layered. */
[class*="noise"], [class*="blob"], [class*="floating"], [class*="glow"], [class*="orb"] {
  display: none !important;
}

@media (max-width: 720px) {
  main,
  .main-content,
  .documents-page,
  .photobank-page,
  .news-page-shell,
  .disciplines-page {
    width: min(100% - 28px, var(--page-max));
    padding-top: 24px;
  }
  :is(.news-hero, .disciplines-hero, .documents-hero, .photobank-header, .cabinet-hero,
  .page-header, .events-hero, .training-hero, .contacts-hero, .auth-hero) {
    padding: 28px 22px 34px;
    background: linear-gradient(180deg, #07111f 0%, #13263f 100%);
  }
  :is(.news-hero, .disciplines-hero, .documents-hero, .photobank-header, .cabinet-hero,
  .page-header, .events-hero, .training-hero, .contacts-hero, .auth-hero)::after {
    left: 0; right: 0; top: auto; bottom: 0; width: 100%; height: 7px;
    background: linear-gradient(90deg, var(--page-blue), var(--page-gold), var(--page-red), var(--page-green));
  }
  :is(.news-hero, .disciplines-hero, .documents-hero, .photobank-header, .cabinet-hero,
  .page-header, .events-hero, .training-hero, .contacts-hero, .auth-hero) h1,
  .page-title { font-size: clamp(2rem, 15vw, 3.4rem); }
}

/* Topic 94 rebuild pass 2 — stricter official editorial layer for inner pages. */
:root {
  --ioc-blue: #0057B8;
  --ink: #111827;
  --muted: #6B7280;
  --line: #E5E7EB;
  --line-strong: #CBD5E1;
  --surface: #FFFFFF;
  --surface-soft: #F8FAFC;
  --radius-sm: 8px;
  --radius-md: 12px;
  --shadow-subtle: 0 1px 2px rgba(15, 23, 42, .04);
}

html body {
  background: var(--surface-soft) !important;
  color: var(--ink) !important;
}
html body::before,
html body::after {
  display: none !important;
  content: none !important;
}

html body main,
html body .main-content,
html body .container.news-page-shell,
html body .news-page-shell,
html body .documents-page,
html body .disciplines-page,
html body .cabinet-shell,
html body .policy-page,
html body .photobank-container,
html body .contacts-page,
html body .admin-athletes-page,
html body .admin-consent-page,
html body .admin-review-page {
  max-width: 1220px !important;
  width: min(1220px, calc(100% - 40px)) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  background: transparent !important;
}

html body :is(.news-hero, .disciplines-hero, .documents-hero, .photobank-header, .cabinet-hero,
.page-header, .events-hero, .training-hero, .contacts-hero, .auth-hero, .admin-athletes-hero,
.admin-review-hero, .policy-hero) {
  min-height: 0 !important;
  padding: clamp(28px, 4vw, 48px) !important;
  margin: 0 0 clamp(24px, 3vw, 40px) !important;
  background: var(--surface) !important;
  color: var(--ink) !important;
  border: 1px solid var(--line) !important;
  border-top: 6px solid var(--ioc-blue) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-subtle) !important;
}
html body :is(.news-hero, .disciplines-hero, .documents-hero, .photobank-header, .cabinet-hero,
.page-header, .events-hero, .training-hero, .contacts-hero, .auth-hero, .admin-athletes-hero,
.admin-review-hero, .policy-hero)::before,
html body :is(.news-hero, .disciplines-hero, .documents-hero, .photobank-header, .cabinet-hero,
.page-header, .events-hero, .training-hero, .contacts-hero, .auth-hero, .admin-athletes-hero,
.admin-review-hero, .policy-hero)::after {
  display: none !important;
  content: none !important;
}
html body :is(.news-hero, .disciplines-hero, .documents-hero, .photobank-header, .cabinet-hero,
.page-header, .events-hero, .training-hero, .contacts-hero, .auth-hero, .admin-athletes-hero,
.admin-review-hero, .policy-hero) h1,
html body .page-title,
html body h1.page-title {
  color: var(--ink) !important;
  font-family: var(--font-display, 'Montserrat', 'Inter', Arial, sans-serif) !important;
  font-size: clamp(2.1rem, 5vw, 4.6rem) !important;
  line-height: .92 !important;
  letter-spacing: -.06em !important;
  text-transform: uppercase !important;
  margin: 0 0 14px !important;
}
html body :is(.news-hero, .disciplines-hero, .documents-hero, .photobank-header, .cabinet-hero,
.page-header, .events-hero, .training-hero, .contacts-hero, .auth-hero, .admin-athletes-hero,
.admin-review-hero, .policy-hero) h1 i,
html body .page-title i {
  display: none !important;
}
html body :is(.news-hero, .disciplines-hero, .documents-hero, .photobank-header, .cabinet-hero,
.page-header, .events-hero, .training-hero, .contacts-hero, .auth-hero, .admin-athletes-hero,
.admin-review-hero, .policy-hero) p,
html body .page-description {
  color: var(--muted) !important;
  max-width: 760px !important;
  font-size: clamp(1rem, 1.4vw, 1.16rem) !important;
}

html body :is(.news-toolbar, .documents-filters, .photobank-tabs, .discipline-switcher, .filter-bar,
.filters-row, .search-box, .cabinet-tabs, .admin-toolbar) {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 14px !important;
  margin: 0 0 24px !important;
  background: var(--surface) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: none !important;
}
html body :is(.filter-btn, .tab-btn, .discipline-tab, .page-btn, .photobank-tab, .btn, button.btn, a.btn) {
  border-radius: var(--radius-sm) !important;
  box-shadow: none !important;
  background: #fff !important;
  color: var(--ink) !important;
  border: 1px solid var(--line-strong) !important;
}
html body :is(.filter-btn.active, .tab-btn.active, .discipline-tab.active, .page-btn.active, .photobank-tab.active,
.btn-primary, .btn.active) {
  background: var(--ioc-blue) !important;
  color: #fff !important;
  border-color: var(--ioc-blue) !important;
}

html body :is(.news-grid, .documents-grid, .disciplines-grid, .albums-grid, .photo-grid, .training-grid,
.about-grid, .contact-grid, .stats-grid, .cabinet-grid, .admin-athletes-grid) {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 20px !important;
}
html body :is(.about-grid, .contact-grid, .cabinet-layout, .tournament-layout, .tournament-feed) {
  grid-template-columns: minmax(0, 280px) minmax(0, 1fr) !important;
  gap: 24px !important;
}
html body :is(.news-card, .document-card, .discipline-card, .album-card, .photo-card, .training-card,
.about-card, .contact-info-card, .contact-form-card, .profile-card, .cabinet-card, .stat-card, .widget,
.left-panel, .right-panel, .left-sidebar, .right-sidebar, .main-feed, .cabinet-sidebar, .cabinet-content,
.table-container, .modal-content, .upload-area, .admin-athletes-panel, .pp2-section-card, .pp2-card-shell) {
  background: var(--surface) !important;
  color: var(--ink) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-subtle) !important;
}
html body :is(.news-card, .document-card, .discipline-card, .album-card, .photo-card, .training-card,
.about-card, .contact-info-card, .contact-form-card, .profile-card, .cabinet-card, .stat-card, .widget,
.left-panel, .right-panel, .left-sidebar, .right-sidebar, .main-feed, .cabinet-sidebar, .cabinet-content,
.admin-athletes-panel, .pp2-section-card, .pp2-card-shell) h2,
html body :is(.news-card, .document-card, .discipline-card, .album-card, .photo-card, .training-card,
.about-card, .contact-info-card, .contact-form-card, .profile-card, .cabinet-card, .stat-card, .widget,
.left-panel, .right-panel, .left-sidebar, .right-sidebar, .main-feed, .cabinet-sidebar, .cabinet-content,
.admin-athletes-panel, .pp2-section-card, .pp2-card-shell) h3 {
  color: var(--ink) !important;
  letter-spacing: -.03em !important;
}
html body :is(.news-card, .document-card, .discipline-card, .album-card, .photo-card, .training-card,
.about-card, .contact-info-card, .contact-form-card, .profile-card, .cabinet-card, .stat-card, .widget,
.left-panel, .right-panel, .left-sidebar, .right-sidebar, .main-feed, .cabinet-sidebar, .cabinet-content,
.admin-athletes-panel, .pp2-section-card, .pp2-card-shell) p,
html body :is(.meta, .date, .news-meta, .document-meta, .card-meta) {
  color: var(--muted) !important;
}

html body :is(.document-card, .news-card, .album-card, .photo-card) img,
html body :is(.news-image, .album-cover, .photo-thumb, .document-icon) {
  border-radius: var(--radius-sm) !important;
  box-shadow: none !important;
}

html body table,
html body .official-table {
  width: 100% !important;
  border-collapse: collapse !important;
  background: #fff !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-md) !important;
  overflow: hidden !important;
}
html body th {
  background: #F1F5F9 !important;
  color: var(--ink) !important;
  border-bottom: 1px solid var(--line) !important;
}
html body td {
  border-bottom: 1px solid var(--line) !important;
  color: var(--ink) !important;
}

@media (max-width: 980px) {
  html body :is(.news-grid, .documents-grid, .disciplines-grid, .albums-grid, .photo-grid, .training-grid,
  .about-grid, .contact-grid, .stats-grid, .cabinet-grid, .admin-athletes-grid) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  html body :is(.about-grid, .contact-grid, .cabinet-layout, .tournament-layout, .tournament-feed) {
    grid-template-columns: 1fr !important;
  }
}
@media (max-width: 640px) {
  html body main,
  html body .main-content,
  html body .container.news-page-shell,
  html body .news-page-shell,
  html body .documents-page,
  html body .disciplines-page,
  html body .cabinet-shell,
  html body .policy-page,
  html body .photobank-container,
  html body .contacts-page,
  html body .admin-athletes-page,
  html body .admin-consent-page,
  html body .admin-review-page {
    width: min(100% - 28px, 1220px) !important;
  }
  html body :is(.news-grid, .documents-grid, .disciplines-grid, .albums-grid, .photo-grid, .training-grid,
  .about-grid, .contact-grid, .stats-grid, .cabinet-grid, .admin-athletes-grid) {
    grid-template-columns: 1fr !important;
  }
  html body :is(.news-toolbar, .documents-filters, .photobank-tabs, .discipline-switcher, .filter-bar,
  .filters-row, .search-box, .cabinet-tabs, .admin-toolbar) {
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    scroll-snap-type: x proximity !important;
  }
  html body :is(.filter-btn, .tab-btn, .discipline-tab, .page-btn, .photobank-tab, .btn, button.btn, a.btn) {
    flex: 0 0 auto !important;
  }
}

/* Topic 94 rebuild pass 3 — page-specific completion for remaining inner pages. */
html body :is(.tournament-feed, .tournament-layout) {
  display: grid !important;
  grid-template-columns: 280px minmax(0, 1fr) 280px !important;
  gap: 22px !important;
  align-items: start !important;
  max-width: 1220px !important;
  width: min(1220px, calc(100% - 40px)) !important;
  margin: 0 auto !important;
  padding: 34px 0 64px !important;
}
html body :is(.tournament-feed, .tournament-layout)::before {
  content: "Турниры и соревнования";
  grid-column: 1 / -1;
  display: block;
  padding: clamp(28px, 4vw, 48px);
  margin-bottom: 2px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-top: 6px solid var(--ioc-blue);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-subtle);
  font-family: var(--font-display, 'Montserrat', 'Inter', Arial, sans-serif);
  font-size: clamp(2.1rem, 5vw, 4.2rem);
  line-height: .92;
  letter-spacing: -.06em;
  text-transform: uppercase;
  font-weight: 850;
}
html body .tournament-layout::before { content: "Карточка турнира"; }
html body :is(.events-group, .tournament-card, .feed-item, .participants-section, .registration-section,
.description-section, .disciplines-block, .info-block, .admin-section, .danger-zone, .empty-state-card,
.friend-tournaments, .popular-tournaments, .participants-grid) {
  background: #fff !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-subtle) !important;
  color: var(--ink) !important;
}
html body :is(.left-panel, .right-panel, .left-sidebar, .right-sidebar) {
  position: sticky !important;
  top: 96px !important;
}

html body .contacts-section {
  max-width: 1220px !important;
  width: min(1220px, calc(100% - 40px)) !important;
  margin: 0 auto !important;
  padding: 34px 0 64px !important;
}
html body .contacts-section::before {
  content: "Контакты Федерации";
  display: block;
  padding: clamp(28px, 4vw, 48px);
  margin-bottom: 24px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-top: 6px solid var(--ioc-blue);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-subtle);
  font-family: var(--font-display, 'Montserrat', 'Inter', Arial, sans-serif);
  font-size: clamp(2.1rem, 5vw, 4.2rem);
  line-height: .92;
  letter-spacing: -.06em;
  text-transform: uppercase;
  font-weight: 850;
}
html body :is(.faq-section, .map-container, .social-platform, .faq-item, .topic-selector) {
  background: #fff !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-subtle) !important;
  color: var(--ink) !important;
}
html body :is(.section-title, .section-subtitle, .contact-details, .social-info, .faq-item p) { color: var(--ink) !important; }
html body .section-subtitle { color: var(--muted) !important; }

html body :is(.policy-container, .forgot-password-container, .reset-card, body.messenger-page > .container:not(.header-container):not(.footer-container)) {
  max-width: 880px !important;
  width: min(880px, calc(100% - 40px)) !important;
  margin: 34px auto 64px !important;
  padding: clamp(26px, 4vw, 46px) !important;
  background: #fff !important;
  color: var(--ink) !important;
  border: 1px solid var(--line) !important;
  border-top: 6px solid var(--ioc-blue) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-subtle) !important;
}
html body :is(.policy-container, .forgot-password-container, .reset-card, body.messenger-page > .container:not(.header-container):not(.footer-container)) h1,
html body :is(.reset-title) {
  color: var(--ink) !important;
  font-family: var(--font-display, 'Montserrat', 'Inter', Arial, sans-serif) !important;
  font-size: clamp(2rem, 5vw, 3.6rem) !important;
  line-height: .95 !important;
  letter-spacing: -.055em !important;
  text-transform: uppercase !important;
}
html body :is(.policy-container, .forgot-password-container, .reset-card) p,
html body :is(.last-updated, .reset-text, .back-link) { color: var(--muted) !important; }
html body :is(.policy-container, .forgot-password-container, .reset-card) i,
html body :is(body.messenger-page > .container:not(.header-container):not(.footer-container)) h1 i { display: none !important; }

html body :is(.profile-editorial-page .profile-container, .public-profile-v2-page .profile-container) {
  max-width: 1220px !important;
  width: min(1220px, calc(100% - 40px)) !important;
  margin: 34px auto 64px !important;
  padding: clamp(24px, 4vw, 42px) !important;
  background: #fff !important;
  color: var(--ink) !important;
  border: 1px solid var(--line) !important;
  border-top: 6px solid var(--ioc-blue) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-subtle) !important;
}
html body :is(.profile-header, .stats-grid-profile, .stat-card-profile, .pp2-card-main, .pp2-card-side) {
  background: #fff !important;
  color: var(--ink) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-subtle) !important;
}
html body .skeleton {
  background: linear-gradient(90deg, #EEF2F7 25%, #F8FAFC 37%, #EEF2F7 63%) !important;
  background-size: 400% 100% !important;
  border-radius: var(--radius-sm) !important;
}

html body :is(.admin-consent-page, .admin-athletes-page, .admin-review-page) {
  background: var(--surface-soft) !important;
  color: var(--ink) !important;
}
html body :is(.status-badge, .meta-tag, .discipline-tag, .guest-badge, .registered-badge) {
  border-radius: 999px !important;
  box-shadow: none !important;
  border: 1px solid var(--line) !important;
}

@media (max-width: 1100px) {
  html body :is(.tournament-feed, .tournament-layout) {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  html body :is(.left-panel, .right-panel, .left-sidebar, .right-sidebar) {
    position: static !important;
  }
}
@media (max-width: 640px) {
  html body :is(.tournament-feed, .tournament-layout, .contacts-section) {
    width: min(100% - 28px, 1220px) !important;
    padding-top: 24px !important;
  }
  html body :is(.policy-container, .forgot-password-container, .reset-card, body.messenger-page > .container:not(.header-container):not(.footer-container),
  .profile-editorial-page .profile-container, .public-profile-v2-page .profile-container) {
    width: min(100% - 28px, 1220px) !important;
    margin-top: 24px !important;
    padding: 24px 18px !important;
  }
}

/* Topic 94 rebuild pass 4 — red gate fixes. */
html body :is(.admin-athletes-page, .admin-review-page, .training-page, body:has(.training-grid), body:has(.training-section)) main,
html body :is(.admin-athletes-page, .admin-review-page, .training-page) .main-content {
  max-width: 1220px !important;
  width: min(1220px, calc(100% - 40px)) !important;
  margin: 34px auto 64px !important;
  background: transparent !important;
}
html body :is(.admin-athletes-page, .admin-review-page, .training-page, body:has(.training-grid), body:has(.training-section)) main::before,
html body :is(.admin-athletes-page, .admin-review-page, .training-page) .main-content::before {
  content: "Административный раздел";
  display: block;
  padding: clamp(28px, 4vw, 48px);
  margin-bottom: 24px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-top: 6px solid var(--ioc-blue);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-subtle);
  font-family: var(--font-display, 'Montserrat', 'Inter', Arial, sans-serif);
  font-size: clamp(2.1rem, 5vw, 4.2rem);
  line-height: .92;
  letter-spacing: -.06em;
  text-transform: uppercase;
  font-weight: 850;
}
html body:has(.training-grid) main::before,
html body:has(.training-section) main::before,
html body.training-page main::before { content: "Тренировки"; }
html body.admin-athletes-page main::before { content: "Спортсмены"; }
html body.admin-review-page main::before { content: "Проверка спортсменов"; }

html body :is(.profile-editorial-page .profile-container, .public-profile-v2-page .profile-container, body:has(.profile-container) .profile-container) {
  background-color: #fff !important;
  background-image: none !important;
}
html body :is(.profile-editorial-page .profile-container, .public-profile-v2-page .profile-container, body:has(.profile-container) .profile-container)::before {
  content: "Профиль спортсмена";
  display: block;
  padding-bottom: 18px;
  margin-bottom: 22px;
  color: var(--ink);
  background: #fff;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display, 'Montserrat', 'Inter', Arial, sans-serif);
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: .92;
  letter-spacing: -.06em;
  text-transform: uppercase;
  font-weight: 850;
}
html body.public-profile-v2-page .profile-container::before { content: "Публичный профиль"; }

html body :is(.admin-consent-page, body.admin-consent-page) {
  background: var(--surface-soft) !important;
}
html body.admin-consent-page main,
html body.admin-consent-page .main-content,
html body.admin-consent-page .container:not(.header-container):not(.footer-container) {
  max-width: 1220px !important;
  width: min(1220px, calc(100% - 40px)) !important;
  margin: 34px auto 64px !important;
  background: transparent !important;
}
html body.admin-consent-page main::before,
html body.admin-consent-page .main-content::before {
  content: "Согласия и документы";
  display: block;
  padding: clamp(28px, 4vw, 48px);
  margin-bottom: 24px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-top: 6px solid var(--ioc-blue);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-subtle);
  font-family: var(--font-display, 'Montserrat', 'Inter', Arial, sans-serif);
  font-size: clamp(2.1rem, 5vw, 4.2rem);
  line-height: .92;
  letter-spacing: -.06em;
  text-transform: uppercase;
  font-weight: 850;
}

/* Topic 94 rebuild pass 5 — explicit admin/training page surfaces. */
html body main.admin-athletes-page,
html body main.admin-consent-page,
html body main.training-page {
  display: block !important;
  max-width: 1220px !important;
  width: min(1220px, calc(100% - 40px)) !important;
  margin: 34px auto 64px !important;
  padding: 0 !important;
  background: transparent !important;
  color: var(--ink) !important;
}
html body main.admin-athletes-page > :first-child,
html body main.admin-consent-page > :first-child,
html body main.training-page > :first-child {
  padding: clamp(28px, 4vw, 48px) !important;
  margin: 0 0 24px !important;
  background: #fff !important;
  color: var(--ink) !important;
  border: 1px solid var(--line) !important;
  border-top: 6px solid var(--ioc-blue) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-subtle) !important;
}
html body main.training-page > h1,
html body main.admin-athletes-page h1,
html body main.admin-consent-page h1 {
  color: var(--ink) !important;
  font-family: var(--font-display, 'Montserrat', 'Inter', Arial, sans-serif) !important;
  font-size: clamp(2.1rem, 5vw, 4.2rem) !important;
  line-height: .92 !important;
  letter-spacing: -.06em !important;
  text-transform: uppercase !important;
  font-weight: 850 !important;
}
html body main.training-page > h1 i,
html body main.admin-consent-page h1 i { display: none !important; }
html body main.training-page .training-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 20px !important;
}
@media (max-width: 1100px) { html body main.training-page .training-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
@media (max-width: 640px) {
  html body main.admin-athletes-page,
  html body main.admin-consent-page,
  html body main.training-page { width: min(100% - 28px, 1220px) !important; margin-top: 24px !important; }
  html body main.training-page .training-grid { grid-template-columns: 1fr !important; }
}

/* Topic 94 final gate fix — training uses real H1 card, no pseudo hero duplicate. */
html body main.training-page::before {
  content: none !important;
  display: none !important;
}

/* Topic 94 long pass — first safe package: training + legal editorial finish. */
html body main.training-page,
html body main.policy-page {
  isolation: isolate;
}

html body main.training-page .page-description {
  display: block !important;
  max-width: 760px !important;
  margin: -8px 0 24px !important;
  padding: 0 4px !important;
  color: var(--muted) !important;
  background: transparent !important;
  border: 0 !important;
}
html body main.training-page .page-description p {
  margin: 0 !important;
  color: var(--muted) !important;
  font-size: clamp(1rem, 1.5vw, 1.18rem) !important;
}
html body main.training-page .training-card {
  min-height: 280px !important;
  padding: clamp(22px, 2.4vw, 30px) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  gap: 14px !important;
  border-top: 4px solid var(--ioc-blue) !important;
}
html body main.training-page .training-card:nth-child(2) { border-top-color: var(--ioc-yellow) !important; }
html body main.training-page .training-card:nth-child(3) { border-top-color: var(--ioc-red) !important; }
html body main.training-page .training-card:nth-child(4) { border-top-color: var(--ioc-green) !important; }
html body main.training-page .training-icon {
  width: 56px !important;
  height: 56px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #F1F5F9 !important;
  color: var(--ioc-blue) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-sm) !important;
  font-size: 1.35rem !important;
}
html body main.training-page .training-card h3 {
  margin: 2px 0 0 !important;
  font-size: clamp(1.25rem, 1.8vw, 1.65rem) !important;
  line-height: 1.05 !important;
}
html body main.training-page .training-card p {
  margin: 0 !important;
  color: var(--muted) !important;
}
html body main.training-page .training-card .btn {
  margin-top: auto !important;
}
html body main.training-page .auth-notice {
  margin-top: 24px !important;
  padding: clamp(20px, 2.6vw, 30px) !important;
  background: #fff !important;
  border: 1px solid var(--line) !important;
  border-left: 6px solid var(--ioc-blue) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-subtle) !important;
  color: var(--ink) !important;
}
html body main.training-page .auth-notice h3 {
  margin-top: 0 !important;
  color: var(--ink) !important;
  letter-spacing: -.03em !important;
}
html body main.training-page .auth-notice a {
  color: var(--ioc-blue) !important;
  font-weight: 800 !important;
}

html body main.policy-page {
  max-width: 1220px !important;
  width: min(1220px, calc(100% - 40px)) !important;
  margin: 34px auto 64px !important;
  padding: 0 !important;
  background: transparent !important;
}
html body main.policy-page > .container {
  width: 100% !important;
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
html body main.policy-page .policy-container {
  max-width: 960px !important;
  margin: 0 auto !important;
  padding: clamp(28px, 4vw, 54px) !important;
  background: #fff !important;
  color: var(--ink) !important;
  border: 1px solid var(--line) !important;
  border-top: 6px solid var(--ioc-blue) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-subtle) !important;
}
html body main.policy-page .policy-container h1 {
  margin: 0 0 18px !important;
  max-width: 840px !important;
  color: var(--ink) !important;
  font-family: var(--font-display, 'Montserrat', 'Inter', Arial, sans-serif) !important;
  font-size: clamp(2rem, 5vw, 4rem) !important;
  line-height: .92 !important;
  letter-spacing: -.06em !important;
  text-transform: uppercase !important;
  font-weight: 850 !important;
}
html body main.policy-page .policy-container h1 i {
  display: none !important;
}
html body main.policy-page .policy-container > p:first-of-type {
  max-width: 760px !important;
  margin: 0 0 30px !important;
  color: var(--muted) !important;
  font-size: clamp(1rem, 1.35vw, 1.16rem) !important;
}
html body main.policy-page .policy-container h2,
html body main.policy-page .policy-container h3 {
  margin: 30px 0 12px !important;
  color: var(--ink) !important;
  font-family: var(--font-display, 'Montserrat', 'Inter', Arial, sans-serif) !important;
  letter-spacing: -.035em !important;
  line-height: 1.08 !important;
}
html body main.policy-page .policy-container p,
html body main.policy-page .policy-container li {
  color: var(--muted) !important;
  font-size: 1rem !important;
}
html body main.policy-page .policy-container ul {
  padding-left: 0 !important;
  margin: 12px 0 20px !important;
  list-style: none !important;
  display: grid !important;
  gap: 10px !important;
}
html body main.policy-page .policy-container li {
  position: relative !important;
  padding-left: 24px !important;
}
html body main.policy-page .policy-container li::before {
  content: "" !important;
  position: absolute !important;
  left: 0 !important;
  top: .68em !important;
  width: 8px !important;
  height: 8px !important;
  background: var(--ioc-blue) !important;
  border-radius: 50% !important;
}
html body main.policy-page .policy-container a {
  color: var(--ioc-blue) !important;
  font-weight: 800 !important;
  text-decoration-thickness: 1px !important;
  text-underline-offset: 3px !important;
}
html body main.policy-page .last-updated {
  margin-top: 34px !important;
  padding-top: 18px !important;
  border-top: 1px solid var(--line) !important;
}
html body main.policy-page .last-updated p {
  margin: 0 !important;
  color: var(--muted) !important;
  font-size: .92rem !important;
}
@media (max-width: 640px) {
  html body main.policy-page {
    width: min(100% - 28px, 1220px) !important;
    margin-top: 24px !important;
  }
  html body main.policy-page .policy-container,
  html body main.training-page .auth-notice {
    padding: 22px !important;
  }
  html body main.training-page .training-card {
    min-height: 0 !important;
  }
}

/* Topic 94 first package guard — long Russian legal headings must not cause mobile overflow. */
html body main.policy-page .policy-container,
html body main.policy-page .policy-container h1,
html body main.policy-page .policy-container h2,
html body main.policy-page .policy-container h3,
html body main.policy-page .policy-container p,
html body main.policy-page .policy-container li,
html body main.training-page .training-card,
html body main.training-page .auth-notice {
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}
@media (max-width: 430px) {
  html body main.policy-page .policy-container h1 {
    font-size: clamp(1.72rem, 10vw, 2.7rem) !important;
    letter-spacing: -.055em !important;
  }
}

/* Topic 94 long pass — cautious finish for about/disciplines without touching JS hooks. */
html body.about-rebuild-page,
html body:has(.about-page-shell) {
  background: var(--surface-soft) !important;
}
html body .about-page-shell {
  max-width: 1220px !important;
  width: min(1220px, calc(100% - 40px)) !important;
  margin: 34px auto 64px !important;
  padding: 0 !important;
  color: var(--ink) !important;
}
html body .about-page-shell :is(.about-hero, .about-manifest, .about-principles, .about-council, .about-regions, .about-roadmap, .about-contact-strip) {
  background: #fff !important;
  color: var(--ink) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-subtle) !important;
}
html body .about-page-shell .about-hero {
  border-top: 6px solid var(--ioc-blue) !important;
}
html body .about-page-shell :is(.about-hero h1, .about-section-head h2, .about-manifest__lead) {
  color: var(--ink) !important;
  font-family: var(--font-display, 'Montserrat', 'Inter', Arial, sans-serif) !important;
  letter-spacing: -.055em !important;
}
html body .about-page-shell :is(p, li, .about-hero__kicker, .about-section-label, .about-person__role, .about-person__city, .about-mission-controls__hint) {
  color: var(--muted) !important;
}
html body .about-page-shell :is(.about-index-card, .about-person, .about-social-card, .about-contact-card, .about-link-button, .about-regions__map, .about-map-frame, .about-roadmap__header) {
  background: #fff !important;
  color: var(--ink) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: none !important;
}
html body .about-page-shell :is(.about-link-button, a) {
  color: var(--ioc-blue) !important;
}
html body .about-page-shell :is(.about-hero, .about-section-head, .about-manifest__lead, .about-person, .about-contact-card) {
  overflow-wrap: anywhere !important;
}

html body .disciplines-page .disciplines-shell {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 24px !important;
}
html body .disciplines-page .disciplines-hero,
html body .disciplines-page .discipline-main,
html body .disciplines-page .discipline-side,
html body .disciplines-page .discipline-card,
html body .disciplines-page .discipline-reglament-card,
html body .disciplines-page .discipline-link-card {
  background: #fff !important;
  color: var(--ink) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-subtle) !important;
}
html body .disciplines-page .disciplines-hero {
  border-top: 6px solid var(--ioc-blue) !important;
}
html body .disciplines-page :is(.discipline-title, .discipline-section-title, .disciplines-hero h1) {
  color: var(--ink) !important;
  font-family: var(--font-display, 'Montserrat', 'Inter', Arial, sans-serif) !important;
  letter-spacing: -.045em !important;
}
html body .disciplines-page :is(.discipline-description, .discipline-list-item, .discipline-label, .discipline-bg-note, p, li) {
  color: var(--muted) !important;
}
html body .disciplines-page .discipline-switcher {
  position: relative !important;
  z-index: 2 !important;
  overflow-x: auto !important;
}
html body .disciplines-page :is(.discipline-tab, .discipline-link-card) {
  white-space: nowrap !important;
}
html body .disciplines-page :is(.discipline-card, .discipline-reglament-card, .discipline-link-card, .discipline-title, .discipline-description) {
  overflow-wrap: anywhere !important;
}
@media (max-width: 640px) {
  html body .about-page-shell {
    width: min(100% - 28px, 1220px) !important;
    margin-top: 24px !important;
  }
  html body .disciplines-page :is(.discipline-tab, .discipline-link-card) {
    white-space: normal !important;
  }
  html body .cabinet-shell,
  html body .cabinet-layout,
  html body .cabinet-content,
  html body .cabinet-section,
  html body .cabinet-card,
  html body .cabinet-layout > section,
  html body .cabinet-layout > section > div,
  html body .cabinet-layout > section > div > div {
    max-width: 100% !important;
    min-width: 0 !important;
  }
  html body .cabinet-layout > section[style*="grid-column"] > div {
    grid-template-columns: 1fr !important;
  }
  html body .cabinet-layout > section[style*="grid-column"] :is(h2, p, div, span, a) {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-wrap: anywhere !important;
  }
  html body .cabinet-layout > section[style*="grid-column"] :is(.chip--glass, .btn, .btn-outline) {
    white-space: normal !important;
  }
  html body:has(.cabinet-shell),
  html body:has(.cabinet-shell) .main-content {
    overflow-x: clip !important;
  }
}

/* Topic 94 2026-06-30: full-site IOC/premium content polish pass.
   Goal: lift remaining legacy inner pages without touching functional hooks. */
:root {
  --topic94-ink: #14213d;
  --topic94-muted: #52627a;
  --topic94-line: rgba(56, 91, 150, 0.16);
  --topic94-glass: rgba(255, 255, 255, 0.82);
  --topic94-glass-strong: rgba(255, 255, 255, 0.92);
  --topic94-shadow: 0 24px 70px rgba(9, 20, 44, 0.13);
  --topic94-shadow-soft: 0 16px 44px rgba(9, 20, 44, 0.10);
  --topic94-radius-xl: 32px;
  --topic94-radius-lg: 24px;
}

html {
  background: #eef4ff;
}

body.messenger-page,
body.tournament-details-page,
body:has(.contacts-section),
body:has(.policy-page) {
  color: var(--topic94-ink);
  background:
    radial-gradient(circle at 8% 0%, rgba(40, 98, 214, 0.15), transparent 30%),
    radial-gradient(circle at 90% 8%, rgba(108, 84, 255, 0.12), transparent 26%),
    radial-gradient(circle at 50% 105%, rgba(20, 184, 166, 0.10), transparent 34%),
    linear-gradient(180deg, #f6f9ff 0%, #eef4ff 44%, #f8fbff 100%) !important;
  background-attachment: fixed;
}

body.messenger-page main,
body.tournament-details-page main,
.contacts-section,
.policy-page,
.documents-page {
  position: relative;
  isolation: isolate;
}

body.messenger-page main::before,
body.tournament-details-page main::before,
.contacts-section::before,
.policy-page::before,
.documents-page::before {
  content: "";
  position: fixed;
  inset: 79px 0 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(5, 6, 5, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(5, 6, 5, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.72), transparent 76%);
}

.container,
.tournament-details-container,
.policy-container,
.profile-container,
.public-profile-container {
  width: min(1180px, calc(100% - 40px));
  max-width: 1180px;
}

.contacts-section,
.policy-page,
.documents-page,
.disciplines-page {
  background: transparent !important;
}

/* Premium hero/header cards on remaining pages */
.contacts-section > .container > .section-title,
.contacts-section > .container > .section-subtitle,
.documents-hero,
.photobank-header,
.disciplines-hero,
.policy-container h1,
.tournament-header,
.event-header,
.profile-header,
.public-profile-header {
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.documents-hero,
.photobank-header,
.disciplines-hero,
.policy-container,
.contact-info-card,
.contact-form-card,
.map-container,
.faq-section,
.discipline-card,
.discipline-links,
.discipline-reglament-card,
.tournament-info-card,
.description-section,
.registration-card,
.results-section,
.participants-section,
.news-card,
.document-card,
.album-card,
.photo-card,
.search-section,
.admin-panel,
.profile-card,
.profile-section,
.public-profile-card,
.auth-container,
.auth-card,
form:not(.header-search-form),
.modal-content {
  color: var(--topic94-ink);
  background:
    radial-gradient(circle at top left, rgba(66, 125, 255, 0.12), transparent 32%),
    linear-gradient(135deg, var(--topic94-glass-strong) 0%, rgba(240, 246, 255, 0.84) 100%) !important;
  border: 1px solid var(--topic94-line) !important;
  border-radius: var(--topic94-radius-lg) !important;
  box-shadow: var(--topic94-shadow-soft) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.documents-hero,
.photobank-header,
.disciplines-hero,
.policy-container {
  border-radius: var(--topic94-radius-xl) !important;
  box-shadow: var(--topic94-shadow) !important;
}

:is(.contact-info-card, .contact-form-card, .faq-section, .discipline-card, .discipline-links, .document-card, .album-card, .photo-card, .profile-card, .profile-section, .public-profile-card, .description-section, .registration-card, .results-section, .participants-section, .search-section, .admin-panel, .modal-content) *,
.policy-container *,
.tournament-details-container * {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: normal;
}

:is(.contact-info-card, .contact-form-card, .faq-section, .discipline-card, .discipline-links, .document-card, .album-card, .photo-card, .profile-card, .profile-section, .public-profile-card, .description-section, .registration-card, .results-section, .participants-section, .search-section, .admin-panel, .modal-content) p,
.policy-container p,
.policy-container li,
.tournament-details-container p,
.tournament-details-container li {
  color: var(--topic94-muted);
  line-height: 1.72;
}

:is(.contact-info-card, .contact-form-card, .faq-section, .discipline-card, .discipline-links, .document-card, .album-card, .photo-card, .profile-card, .profile-section, .public-profile-card, .description-section, .registration-card, .results-section, .participants-section, .search-section, .admin-panel, .modal-content) h1,
:is(.contact-info-card, .contact-form-card, .faq-section, .discipline-card, .discipline-links, .document-card, .album-card, .photo-card, .profile-card, .profile-section, .public-profile-card, .description-section, .registration-card, .results-section, .participants-section, .search-section, .admin-panel, .modal-content) h2,
:is(.contact-info-card, .contact-form-card, .faq-section, .discipline-card, .discipline-links, .document-card, .album-card, .photo-card, .profile-card, .profile-section, .public-profile-card, .description-section, .registration-card, .results-section, .participants-section, .search-section, .admin-panel, .modal-content) h3,
.policy-container h1,
.policy-container h2,
.policy-container h3 {
  color: var(--topic94-ink) !important;
  letter-spacing: -0.03em;
}

/* Forms and controls: readable, contained, consistent. */
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea,
.form-control,
.search-input {
  min-width: 0;
  max-width: 100%;
  color: var(--topic94-ink) !important;
  background: rgba(255,255,255,0.78) !important;
  border: 1px solid rgba(70, 99, 150, 0.20) !important;
  border-radius: 16px !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.78), 0 8px 22px rgba(9,20,44,0.05);
}

button,
.btn,
.primary-btn,
.secondary-btn,
.submit-btn,
.back-button,
.tab-btn,
.filter-btn {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Tables/lists: never force page-wide horizontal overflow. */
.table-container,
.table-responsive,
.documents-table-wrapper,
.participants-table-wrapper,
.results-table-wrapper,
.stats-table-wrapper {
  max-width: 100%;
  overflow-x: auto;
  border-radius: 22px;
  border: 1px solid var(--topic94-line);
  box-shadow: var(--topic94-shadow-soft);
  background: rgba(255,255,255,0.72);
}

table {
  max-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

td, th {
  overflow-wrap: anywhere;
  vertical-align: top;
}

/* Legal/auth/template small pages should not look like old placeholders. */
.policy-page,
main.container[style*="padding: 80px"],
main.container[style*="min-height: 70vh"] {
  padding-top: clamp(42px, 6vw, 76px) !important;
  padding-bottom: clamp(56px, 8vw, 92px) !important;
}

main.container[style*="padding: 80px"] > *,
main.container[style*="min-height: 70vh"] > * {
  margin-inline: auto;
}

main.container[style*="padding: 80px"] h1,
main.container[style*="min-height: 70vh"] h1 {
  color: var(--topic94-ink);
  letter-spacing: -0.04em;
  text-wrap: balance;
}

/* Dense legacy grids become fluid and readable. */
.contact-grid,
.documents-grid,
.albums-grid,
.photos-grid,
.stats-grid,
.profile-grid,
.admin-grid,
.discipline-grid,
.tournament-grid {
  min-width: 0;
}

@media (max-width: 900px) {
  .container,
  .tournament-details-container,
  .policy-container,
  .profile-container,
  .public-profile-container {
    width: min(100% - 28px, 1000px) !important;
  }

  .contact-grid,
  .documents-grid,
  .albums-grid,
  .photos-grid,
  .stats-grid,
  .profile-grid,
  .admin-grid,
  .discipline-grid,
  .tournament-grid {
    grid-template-columns: 1fr !important;
  }

  .documents-hero,
  .photobank-header,
  .disciplines-hero,
  .policy-container,
  .contact-info-card,
  .contact-form-card,
  .faq-section,
  .discipline-card,
  .discipline-links,
  .document-card,
  .album-card,
  .photo-card,
  .profile-card,
  .profile-section,
  .public-profile-card,
  .description-section,
  .registration-card,
  .results-section,
  .participants-section,
  .search-section,
  .admin-panel,
  .modal-content {
    border-radius: 22px !important;
    padding-inline: clamp(16px, 4.8vw, 24px) !important;
  }
}

@media (max-width: 520px) {
  body.messenger-page main::before,
  body.tournament-details-page main::before,
  .contacts-section::before,
  .policy-page::before,
  .documents-page::before {
    background-size: 42px 42px;
  }

  .documents-hero,
  .photobank-header,
  .disciplines-hero,
  .policy-container,
  .contact-info-card,
  .contact-form-card,
  .faq-section,
  .discipline-card,
  .discipline-links,
  .document-card,
  .album-card,
  .photo-card,
  .profile-card,
  .profile-section,
  .public-profile-card,
  .description-section,
  .registration-card,
  .results-section,
  .participants-section,
  .search-section,
  .admin-panel,
  .modal-content {
    box-shadow: 0 12px 34px rgba(9,20,44,0.10) !important;
  }
}

/* Topic 94 2026-06-30: visual-metrics cleanup for compact icon buttons. */
.header-menu-toggle,
.close-modal,
.modal-close,
.close-btn {
  overflow: hidden !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
  flex-shrink: 0;
}

.header-menu-toggle {
  min-width: 44px;
  min-height: 44px;
}

.header-menu-toggle .menu-text,
.header-menu-toggle span:not(.hamburger-line):not(.sr-only) {
  max-width: 0;
  opacity: 0;
  overflow: hidden;
}

.close-modal,
.modal-close,
.close-btn {
  display: inline-grid !important;
  place-items: center !important;
  line-height: 1 !important;
  aspect-ratio: 1 / 1;
}

/* Topic 94 2026-06-30 night pass: fix remaining visible mobile overflow in disciplines/documents. */
html body .disciplines-page .discipline-switcher,
html body .disciplines-page .discipline-tabs,
html body .disciplines-page [class*="discipline-tab"]:has(.discipline-tab),
html body .documents-page .filter-buttons,
html body .documents-page .filters,
html body .documents-page .filter-tabs,
html body .documents-page .documents-filters,
html body .documents-page .category-filters {
  max-width: 100% !important;
  min-width: 0 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  overflow: visible !important;
}

html body .disciplines-page .discipline-tab,
html body .documents-page .filter-btn {
  min-width: 0 !important;
  max-width: 100% !important;
  flex: 1 1 150px !important;
  white-space: normal !important;
  text-align: center !important;
  line-height: 1.18 !important;
  overflow-wrap: anywhere !important;
}

html body .disciplines-page .discipline-link-card {
  white-space: normal !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}

html body .documents-page .document-card,
html body .documents-page .document-card *,
html body .documents-page .document-title,
html body .documents-page .document-description,
html body .documents-page .document-meta,
html body .documents-page .document-info {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}

html body .documents-page .document-card {
  overflow: hidden !important;
}

@media (max-width: 640px) {
  html body .disciplines-page .discipline-switcher,
  html body .disciplines-page .discipline-tabs,
  html body .documents-page .filter-buttons,
  html body .documents-page .filters,
  html body .documents-page .filter-tabs,
  html body .documents-page .documents-filters,
  html body .documents-page .category-filters {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    align-items: stretch !important;
  }

  html body .disciplines-page .discipline-tab,
  html body .documents-page .filter-btn {
    width: 100% !important;
    flex-basis: auto !important;
    padding-inline: 10px !important;
  }
}

@media (max-width: 420px) {
  html body .disciplines-page .discipline-switcher,
  html body .disciplines-page .discipline-tabs,
  html body .documents-page .filter-buttons,
  html body .documents-page .filters,
  html body .documents-page .filter-tabs,
  html body .documents-page .documents-filters,
  html body .documents-page .category-filters {
    grid-template-columns: 1fr !important;
  }
}

/* Topic 94 2026-07-01: remaining legacy/static pages — strict IOC editorial finish.
   Additive scoped pass only: no selector/ID/functionality changes. */
html body:has(.contacts-section),
html body:has(main.policy-page),
html body:has(.auth-container),
html body:has(.auth-card),
html body:has(.training-page),
html body:has(.documents-page),
html body:has(.photobank-page),
html body:has(.profile-container),
html body:has(.public-profile-container),
html body:has(.cabinet-shell),
html body:has(.admin-consent-page) {
  --topic94-final-ink: #101820;
  --topic94-final-muted: #536173;
  --topic94-final-line: rgba(16, 24, 32, .14);
  --topic94-final-blue: #0057b8;
  --topic94-final-red: #e31b23;
  --topic94-final-gold: #f5c542;
  --topic94-final-green: #009f3d;
  overflow-x: clip !important;
  background:
    linear-gradient(90deg, rgba(0,87,184,.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(16,24,32,.035) 1px, transparent 1px),
    radial-gradient(circle at 9% 8%, rgba(0,87,184,.13), transparent 28%),
    radial-gradient(circle at 88% 0%, rgba(245,197,66,.10), transparent 24%),
    #f4f6f9 !important;
  background-size: 56px 56px, 56px 56px, auto, auto, auto !important;
  color: var(--topic94-final-ink) !important;
}

html body:has(.contacts-section) main,
html body:has(main.policy-page) main,
html body:has(.auth-container) main,
html body:has(.auth-card) main,
html body:has(.training-page) main,
html body:has(.documents-page) main,
html body:has(.photobank-page) main,
html body:has(.profile-container) main,
html body:has(.public-profile-container) main,
html body:has(.cabinet-shell) main,
html body:has(.admin-consent-page) main {
  isolation: isolate;
}

/* Convert remaining soft/glass remnants into restrained institutional cards. */
html body :is(
  .contacts-section .section-title,
  .contacts-section .section-subtitle,
  .contact-info-card,
  .contact-form-card,
  .map-container,
  .faq-section,
  main.policy-page .policy-container,
  .auth-card,
  .auth-container,
  .training-card,
  .training-page .auth-notice,
  .documents-hero,
  .documents-filters,
  .document-card,
  .photobank-header,
  .photobank-filters,
  .album-card,
  .photo-card,
  .profile-card,
  .profile-section,
  .public-profile-card,
  .cabinet-card,
  .cabinet-section,
  .admin-consent-page .stats-card,
  .admin-consent-page .consent-card,
  .admin-consent-page .filters-card
) {
  border-radius: 0 !important;
  box-shadow: none !important;
  border: 1px solid var(--topic94-final-line) !important;
  background: rgba(255,255,255,.94) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  color: var(--topic94-final-ink) !important;
}

html body :is(
  .contact-info-card,
  .contact-form-card,
  .faq-section,
  main.policy-page .policy-container,
  .auth-card,
  .training-card,
  .training-page .auth-notice,
  .documents-hero,
  .photobank-header,
  .profile-section,
  .public-profile-card,
  .cabinet-section
) {
  border-top: 6px solid var(--topic94-final-blue) !important;
}

html body :is(
  .contacts-section .section-title,
  .contacts-section h1,
  .contacts-section h2,
  .contacts-section h3,
  main.policy-page .policy-container h1,
  main.policy-page .policy-container h2,
  main.policy-page .policy-container h3,
  .auth-card h1,
  .auth-card h2,
  .training-page h1,
  .training-page h2,
  .documents-page h1,
  .documents-page h2,
  .photobank-page h1,
  .photobank-page h2,
  .profile-container h1,
  .profile-container h2,
  .public-profile-container h1,
  .public-profile-container h2,
  .cabinet-shell h1,
  .cabinet-shell h2,
  .admin-consent-page h1,
  .admin-consent-page h2
) {
  color: var(--topic94-final-ink) !important;
  font-family: var(--font-display, 'Montserrat', 'Inter', Arial, sans-serif) !important;
  letter-spacing: -.045em !important;
  line-height: 1.02 !important;
  text-wrap: balance;
}

html body :is(
  .contacts-section p,
  .contacts-section li,
  main.policy-page .policy-container p,
  main.policy-page .policy-container li,
  .auth-card p,
  .training-page p,
  .documents-page p,
  .photobank-page p,
  .profile-container p,
  .public-profile-container p,
  .cabinet-shell p,
  .admin-consent-page p
) {
  color: var(--topic94-final-muted) !important;
}

/* IOC-like metadata/action language: square, dense, readable. */
html body :is(
  .contact-icon,
  .social-icon,
  .social-platform,
  .btn,
  button,
  .submit-btn,
  .primary-btn,
  .secondary-btn,
  .filter-btn,
  .tab-btn,
  .page-btn,
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea,
  .form-control
) {
  border-radius: 0 !important;
  box-shadow: none !important;
}

html body :is(.social-platform, .contact-method, .document-card, .album-card, .photo-card, .profile-card, .cabinet-card) {
  transition: border-color .16s ease, background-color .16s ease !important;
}
html body :is(.social-platform, .document-card, .album-card, .photo-card):hover {
  transform: none !important;
  border-color: rgba(0,87,184,.34) !important;
}

/* Long Russian labels and admin/user data must wrap, never push mobile width. */
html body :is(
  .contacts-section,
  .contacts-section *,
  main.policy-page,
  main.policy-page *,
  .auth-card,
  .auth-card *,
  .training-page,
  .training-page *,
  .documents-page,
  .documents-page *,
  .photobank-page,
  .photobank-page *,
  .profile-container,
  .profile-container *,
  .public-profile-container,
  .public-profile-container *,
  .cabinet-shell,
  .cabinet-shell *,
  .admin-consent-page,
  .admin-consent-page *
) {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: normal;
}

html body :is(.contact-grid, .documents-grid, .albums-grid, .photos-grid, .profile-grid, .cabinet-grid, .stats-grid, .admin-grid) {
  align-items: stretch;
}

@media (max-width: 760px) {
  html body :is(.contacts-section, main.policy-page, .training-page, .documents-page, .photobank-page) {
    padding-inline: 0 !important;
  }
  html body :is(.contact-grid, .documents-grid, .albums-grid, .photos-grid, .profile-grid, .cabinet-grid, .stats-grid, .admin-grid) {
    grid-template-columns: 1fr !important;
  }
  html body :is(.contact-info-card, .contact-form-card, .faq-section, main.policy-page .policy-container, .auth-card, .training-card, .documents-hero, .photobank-header, .profile-section, .cabinet-section) {
    padding: clamp(18px, 5vw, 26px) !important;
  }
  html body :is(.contacts-section .section-title, main.policy-page .policy-container h1, .auth-card h1, .documents-hero h1, .photobank-header h1) {
    font-size: clamp(2rem, 12vw, 3.3rem) !important;
  }
}

/* Topic 94 2026-07-01: control polish — precise framing for close buttons, counters and labels.
   CSS-only alignment layer; preserves all JS hooks, IDs and handlers. */
html body {
  --topic94-control-h: 42px;
  --topic94-control-pad-x: 16px;
  --topic94-control-line: rgba(16, 24, 32, .18);
  --topic94-control-bg: rgba(255, 255, 255, .96);
  --topic94-control-bg-active: #101820;
  --topic94-control-ink: #101820;
  --topic94-control-muted: #536173;
}

/* Icon-only close controls: one exact square, centered glyph, no clipped/offset ×. */
html body :is(
  .close-modal,
  .modal-close,
  .close-btn,
  .modal__close,
  .popup-close,
  .preview-close,
  [aria-label="Закрыть"],
  [title="Закрыть"]
) {
  width: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  height: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  padding: 0 !important;
  display: inline-grid !important;
  place-items: center !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 44px !important;
  aspect-ratio: 1 / 1 !important;
  border: 1px solid var(--topic94-control-line) !important;
  border-radius: 0 !important;
  background: var(--topic94-control-bg) !important;
  color: var(--topic94-control-ink) !important;
  box-shadow: none !important;
  line-height: 1 !important;
  font-size: 0 !important;
  letter-spacing: 0 !important;
  text-indent: 0 !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  transform: none !important;
}

html body :is(.close-modal, .modal-close, .close-btn, .modal__close, .popup-close, .preview-close) :is(i, svg, span),
html body :is([aria-label="Закрыть"], [title="Закрыть"]) :is(i, svg, span) {
  display: inline-grid !important;
  place-items: center !important;
  width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
  line-height: 1 !important;
  font-size: 18px !important;
  text-indent: 0 !important;
  transform: none !important;
}

html body :is(.close-modal, .modal-close, .close-btn, .modal__close, .popup-close, .preview-close)::before,
html body :is([aria-label="Закрыть"], [title="Закрыть"])::before {
  font-size: 22px !important;
  line-height: 1 !important;
  margin: 0 !important;
  transform: none !important;
}

html body :is(.close-modal, .modal-close, .close-btn, .modal__close, .popup-close, .preview-close):not(:has(i,svg,span))::before,
html body :is([aria-label="Закрыть"], [title="Закрыть"]):not(:has(i,svg,span))::before {
  content: "×" !important;
}

/* Buttons/tabs/filters/pagination: text stays inside the frame and aligns optically. */
html body :is(
  .btn,
  button,
  .primary-btn,
  .secondary-btn,
  .submit-btn,
  .back-button,
  .tab-btn,
  .filter-btn,
  .page-btn,
  .photobank-tab,
  .discipline-tab,
  .document-download,
  .news-read-more,
  a.btn
) {
  min-height: var(--topic94-control-h) !important;
  max-width: 100% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 10px var(--topic94-control-pad-x) !important;
  border: 1px solid var(--topic94-control-line) !important;
  border-radius: 0 !important;
  line-height: 1.12 !important;
  text-align: center !important;
  vertical-align: middle !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
  text-decoration: none !important;
  box-shadow: none !important;
  transform: none !important;
}

html body :is(.btn, button, .tab-btn, .filter-btn, .page-btn, .photobank-tab, .discipline-tab) > :is(i, svg) {
  flex: 0 0 auto !important;
  width: 1.05em !important;
  min-width: 1.05em !important;
  height: 1.05em !important;
  display: inline-grid !important;
  place-items: center !important;
  margin: 0 !important;
  line-height: 1 !important;
}

html body :is(.btn-primary, .primary-btn, .submit-btn, .filter-btn.active, .page-btn.active, .tab-btn.active, .photobank-tab.active, .discipline-tab.active) {
  background: var(--topic94-control-bg-active) !important;
  color: #fff !important;
  border-color: var(--topic94-control-bg-active) !important;
}

/* Counts, badges, status chips, numeric boxes: fixed rhythm, no floating digits. */
html body :is(
  .badge,
  .status-badge,
  .status-chip,
  .count,
  .filter-btn .count,
  .page-count,
  .admin-athletes-count,
  .admin-athletes-badge,
  .admin-review-badge,
  .group-badge,
  .home-status-badge,
  .official-status-badge,
  .registered-badge,
  .guest-badge,
  .meta-tag,
  .discipline-tag,
  .tournament-status,
  .online-badge
) {
  min-height: 28px !important;
  min-width: 28px !important;
  max-width: 100% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 5px 10px !important;
  border: 1px solid var(--topic94-control-line) !important;
  border-radius: 0 !important;
  background: rgba(255,255,255,.92) !important;
  color: var(--topic94-control-ink) !important;
  font-weight: 800 !important;
  font-size: clamp(.72rem, 1vw, .86rem) !important;
  line-height: 1.05 !important;
  text-align: center !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  box-shadow: none !important;
  vertical-align: middle !important;
}

html body :is(.filter-btn.active, .page-btn.active, .tab-btn.active) .count {
  background: rgba(255,255,255,.14) !important;
  color: #fff !important;
  border-color: rgba(255,255,255,.28) !important;
}

/* Statistic cards: numbers and labels sit in a consistent grid. */
html body :is(
  .stat-card,
  .home-stat,
  .admin-athletes-stat,
  .stats-card,
  .document-stats span,
  .ioc-stat
) {
  min-width: 0 !important;
  display: grid !important;
  align-content: center !important;
  justify-items: start !important;
  gap: 8px !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

html body :is(
  .stat-card strong,
  .home-stat strong,
  .admin-athletes-stat strong,
  .stats-card strong,
  .document-stats strong,
  .ioc-stat strong
) {
  display: block !important;
  max-width: 100% !important;
  font-variant-numeric: tabular-nums !important;
  font-feature-settings: "tnum" 1, "lnum" 1 !important;
  letter-spacing: -.045em !important;
  line-height: .92 !important;
  overflow-wrap: anywhere !important;
}

html body :is(
  .stat-card span,
  .home-stat span,
  .admin-athletes-stat span,
  .stats-card span,
  .document-stats span,
  .ioc-stat span
) {
  max-width: 100% !important;
  color: var(--topic94-control-muted) !important;
  line-height: 1.18 !important;
  text-wrap: balance;
  overflow-wrap: anywhere !important;
}

/* Toolbars with many controls must wrap cleanly instead of squeezing labels out of frames. */
html body :is(
  .documents-filters,
  .filter-buttons,
  .filter-tabs,
  .photobank-filters,
  .pagination,
  .admin-athletes-actions,
  .admin-toolbar,
  .modal-actions,
  .form-actions,
  .cabinet-actions,
  .profile-actions
) {
  min-width: 0 !important;
  max-width: 100% !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 10px !important;
}

@media (max-width: 520px) {
  html body {
    --topic94-control-h: 40px;
    --topic94-control-pad-x: 12px;
  }

  html body :is(.close-modal, .modal-close, .close-btn, .modal__close, .popup-close, .preview-close, [aria-label="Закрыть"], [title="Закрыть"]) {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    flex-basis: 40px !important;
  }

  html body :is(.filter-btn, .page-btn, .tab-btn, .photobank-tab, .discipline-tab) {
    flex: 1 1 calc(50% - 10px) !important;
  }
}

@media (max-width: 380px) {
  html body :is(.filter-btn, .page-btn, .tab-btn, .photobank-tab, .discipline-tab) {
    flex-basis: 100% !important;
  }
}

/* Topic 94 2026-07-01: control-polish audit fixes. */
html body .header-menu-toggle {
  width: 48px !important;
  min-width: 48px !important;
  max-width: 48px !important;
  height: 48px !important;
  min-height: 48px !important;
  max-height: 48px !important;
  padding: 0 !important;
  display: inline-grid !important;
  place-items: center !important;
  overflow: hidden !important;
  text-indent: -9999px !important;
  font-size: 0 !important;
  line-height: 1 !important;
}
html body .header-menu-toggle :is(i, svg, span),
html body .header-menu-toggle .menu-icon,
html body .header-menu-toggle .menu-icon span {
  text-indent: 0 !important;
  font-size: 18px !important;
  line-height: 1 !important;
  margin: 0 !important;
}

html body .photo-action-btn {
  width: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  height: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  padding: 0 !important;
  display: inline-grid !important;
  place-items: center !important;
  flex: 0 0 44px !important;
  overflow: hidden !important;
  border-radius: 0 !important;
  line-height: 1 !important;
}
html body .photo-action-btn :is(i, svg, span) {
  width: 18px !important;
  height: 18px !important;
  display: inline-grid !important;
  place-items: center !important;
  margin: 0 !important;
  font-size: 16px !important;
  line-height: 1 !important;
}

@media (max-width: 520px) {
  html body:has(.events-page),
  html body:has(.events-container),
  html body:has(.events-list),
  html body:has(.tournaments-grid) {
    overflow-x: clip !important;
  }
  html body :is(.events-page, .events-container, .events-list, .tournaments-grid, .tournament-card, .event-card) {
    max-width: 100% !important;
    min-width: 0 !important;
  }
}

/* Topic 94 2026-07-01: final photobank icon-button fit.
   Fixes 1px inner scrollWidth overflow from FontAwesome glyph metrics in photo action buttons. */
html body .photo-action-btn,
html body button.photo-action-btn,
html body .photo-action-btn.download-btn,
html body button.photo-action-btn.download-btn {
  box-sizing: border-box !important;
  width: 48px !important;
  min-width: 48px !important;
  max-width: 48px !important;
  height: 48px !important;
  min-height: 48px !important;
  max-height: 48px !important;
  padding: 0 !important;
  border: 1px solid rgba(16, 24, 32, .18) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 48px !important;
  overflow: clip !important;
  contain: layout paint !important;
}
html body .photo-action-btn :is(i, svg, span),
html body button.photo-action-btn :is(i, svg, span),
html body .photo-action-btn.download-btn :is(i, svg, span),
html body button.photo-action-btn.download-btn :is(i, svg, span) {
  box-sizing: border-box !important;
  width: 16px !important;
  min-width: 16px !important;
  max-width: 16px !important;
  height: 16px !important;
  min-height: 16px !important;
  max-height: 16px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 14px !important;
  line-height: 1 !important;
  overflow: hidden !important;
  transform: none !important;
}

/* Topic 94 2026-07-01: text-fit polish for framed/cards/buttons.
   Keep text inside rectangular surfaces without changing markup or JS hooks. */
html body :is(
  .about-index-card,
  .about-index-card span,
  .about-index-card strong,
  .ioc-latest-stage__heading,
  .ioc-latest-stage__heading *,
  .ioc-latest-news-card,
  .ioc-latest-news-card *,
  .document-card,
  .document-card *,
  .mn-news-item__read,
  .tab-btn,
  .filter-btn,
  .page-btn,
  .status-badge,
  .status-chip,
  .badge,
  .meta-tag,
  .discipline-tag,
  .guest-badge,
  .registered-badge,
  .official-status-badge,
  .admin-athletes-badge,
  .admin-review-badge
) {
  box-sizing: border-box !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
  text-wrap: pretty;
}

html body :is(.about-index-card strong, .ioc-latest-stage__heading a, .document-card a, .document-card span, .document-card strong) {
  white-space: normal !important;
  line-height: 1.18 !important;
}

html body .about-index-card {
  overflow: hidden !important;
  padding-inline: clamp(12px, 2.6vw, 18px) !important;
}
html body .about-index-card strong {
  display: block !important;
  font-size: clamp(12px, 1.05vw, 15px) !important;
  letter-spacing: -.015em !important;
}

html body .ioc-latest-stage__heading {
  overflow: hidden !important;
  padding-inline-end: 2px !important;
}
html body .ioc-latest-stage__heading :is(h1,h2,h3,p,a,span) {
  max-width: 100% !important;
}
html body .ioc-latest-news-card {
  overflow: clip !important;
  contain: layout paint !important;
}
html body .ioc-latest-news-card :is(h1,h2,h3,h4,p,span,time,strong,small) {
  max-width: 100% !important;
  overflow: hidden !important;
}

html body .mn-news-item__read {
  min-width: 86px !important;
  padding-inline: 14px !important;
  justify-content: center !important;
  text-align: center !important;
  letter-spacing: .03em !important;
}

html body .document-card {
  overflow: clip !important;
  contain: layout paint !important;
}
html body .document-card :is(h1,h2,h3,h4,p,span,a,button,strong,small,div) {
  max-width: 100% !important;
}
html body .document-card :is(.document-title, .document-name, .document-filename, [class*="title"], [class*="name"], [class*="file"]) {
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
  hyphens: auto !important;
}

@media (max-width: 820px) {
  html body :is(.tab-btn, .filter-btn, .page-btn, .photobank-tab, .discipline-tab) {
    max-width: 100% !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    text-align: center !important;
    justify-content: center !important;
  }
  html body .about-index-card strong {
    font-size: clamp(12px, 3.15vw, 15px) !important;
  }
}

/* Topic 94 2026-07-01: page text-fit late overrides. */
html body .mn-news-item__read {
  box-sizing: border-box !important;
  width: auto !important;
  min-width: 88px !important;
  max-width: 100% !important;
  padding-inline: 14px !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  text-align: center !important;
}
html body .documents-grid,
html body .documents-list,
html body .document-card {
  min-width: 0 !important;
  max-width: 100% !important;
}
html body .document-card {
  box-sizing: border-box !important;
  overflow: clip !important;
  contain: layout paint !important;
  padding-inline: clamp(14px, 4vw, 22px) !important;
}
html body .document-card :is(h1,h2,h3,h4,p,span,a,button,strong,small,div) {
  box-sizing: border-box !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
  white-space: normal !important;
}
html body :is(.photobank-tabs, .photo-tabs, .tabs, .tab-list) {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: visible !important;
}
@media (max-width: 820px) {
  html body :is(.tab-btn, .filter-btn, .page-btn, .photobank-tab, .discipline-tab) {
    box-sizing: border-box !important;
    max-width: calc(100vw - 32px) !important;
    min-width: 0 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }
  html body .document-card {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* Topic 94 2026-07-01: tight mobile document-card copy containment. */
@media (max-width: 520px) {
  html body .document-card {
    padding-inline: 12px !important;
    font-size: 14px !important;
  }
  html body .document-card :is(h1,h2,h3,h4,p,span,a,button,strong,small,div) {
    word-break: break-all !important;
    overflow-wrap: anywhere !important;
  }
}

/* Topic 94 2026-07-01: final news read-button containment. */
html body .mn-news-item__footer .mn-news-item__read,
html body button.mn-news-item__read,
html body .mn-news-item__read {
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  width: auto !important;
  min-width: 90px !important;
  max-width: 100% !important;
  padding: 10px 13px !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  line-height: 1 !important;
  font-size: 12px !important;
  letter-spacing: .02em !important;
}
html body .mn-news-item__read i {
  flex: 0 0 auto !important;
  font-size: .9em !important;
}
@media (max-width: 820px) {
  html body .mn-news-item__footer {
    flex-wrap: wrap !important;
  }
  html body .mn-news-item__footer .mn-news-item__read,
  html body button.mn-news-item__read,
  html body .mn-news-item__read {
    min-width: 94px !important;
    padding-inline: 12px !important;
  }
}

/* Topic 94 2026-07-01: hard final fit for news read buttons. */
html body .mn-news-item .mn-news-item__footer button.mn-news-item__read,
html body .mn-news-item__footer button.mn-news-item__read,
html body button.mn-news-item__read.mn-news-item__read,
html body button.mn-news-item__read {
  width: 96px !important;
  min-width: 96px !important;
  max-width: 96px !important;
  flex: 0 0 96px !important;
  box-sizing: border-box !important;
  padding: 10px 10px !important;
  overflow: visible !important;
  white-space: nowrap !important;
  line-height: 1 !important;
  font-size: 11px !important;
  letter-spacing: 0 !important;
}
html body button.mn-news-item__read .fas,
html body button.mn-news-item__read i {
  display: none !important;
}

/* Topic 94 2026-07-02: contacts mobile containment after all-pages audit. */
html body .contacts-section,
html body .contacts-section .container,
html body .contacts-section .contact-grid,
html body .contacts-section .contact-info-card,
html body .contacts-section .contact-form-card,
html body .contacts-section .contact-method,
html body .contacts-section .contact-details,
html body .contacts-section .social-platforms,
html body .contacts-section .social-platform {
  box-sizing: border-box !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

html body .contacts-section {
  overflow-x: clip !important;
}

html body .contacts-section .container {
  overflow-x: clip !important;
}

html body .contacts-section :is(h1,h2,h3,h4,p,a,span,label,input,textarea,button) {
  box-sizing: border-box !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}

@media (max-width: 576px) {
  html body .contacts-section {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  html body .contacts-section .container {
    width: 100% !important;
    padding-left: 18px !important;
    padding-right: 18px !important;
  }

  html body .contacts-section .section-title,
  html body .contacts-section .section-subtitle {
    width: 100% !important;
    max-width: 100% !important;
  }

  html body .contacts-section .contact-info-card,
  html body .contacts-section .contact-form-card {
    width: 100% !important;
    padding-left: 18px !important;
    padding-right: 18px !important;
    overflow-x: clip !important;
  }

  html body .contacts-section .contact-method {
    width: 100% !important;
    gap: 14px !important;
  }

  html body .contacts-section .contact-link,
  html body .contacts-section .social-platform {
    display: flex !important;
    width: 100% !important;
  }
}


/* Topic 94 auxiliary pages rebuild — auth, password and legal helper screens. */
html body.auxiliary-page {
  --aux-ink: #111827;
  --aux-muted: #5b6475;
  --aux-blue: #050605;
  --aux-deep: #08152d;
  background:
    radial-gradient(circle at 12% 8%, rgba(5, 6, 5,.16), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(123,92,255,.14), transparent 30%),
    linear-gradient(180deg, #f5f8ff 0%, #edf3fb 48%, #f9fbff 100%) !important;
}
html body.auxiliary-page .aux-shell,
html body.auxiliary-page .policy-page {
  min-height: 72vh;
  padding: clamp(34px, 6vw, 78px) 20px 72px !important;
  background: transparent !important;
}
html body.auxiliary-page .aux-card,
html body.auxiliary-page .policy-container {
  width: min(940px, 100%) !important;
  margin: 0 auto !important;
  padding: clamp(28px, 5vw, 56px) !important;
  color: var(--aux-ink) !important;
  background:
    linear-gradient(145deg, rgba(255,255,255,.96), rgba(244,248,255,.9)) !important;
  border: 1px solid rgba(255,255,255,.78) !important;
  border-top: 0 !important;
  border-radius: 34px !important;
  box-shadow: 0 32px 90px rgba(15,23,42,.16), 0 1px 0 rgba(255,255,255,.9) inset !important;
  position: relative;
  overflow: hidden;
}
html body.auxiliary-page .aux-card::before,
html body.auxiliary-page .policy-container::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 7px;
  background: linear-gradient(90deg, #050605, #B89A5E, #7B5CFF);
}
html body.auxiliary-page .aux-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(5, 6, 5,.09);
  color: var(--aux-blue);
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}
html body.auxiliary-page .aux-card h1,
html body.auxiliary-page .aux-card h2,
html body.auxiliary-page .policy-container h1,
html body.auxiliary-page .reset-title {
  margin: 0 0 18px !important;
  color: var(--aux-ink) !important;
  font-family: var(--font-display, 'Montserrat', 'Inter', Arial, sans-serif) !important;
  font-size: clamp(2.2rem, 6vw, 4.3rem) !important;
  line-height: .9 !important;
  letter-spacing: -.065em !important;
  text-transform: uppercase !important;
}
html body.auxiliary-page .aux-lead,
html body.auxiliary-page .policy-container > p,
html body.auxiliary-page .reset-text {
  max-width: 720px;
  color: var(--aux-muted) !important;
  font-size: clamp(1rem, 1.6vw, 1.14rem) !important;
  line-height: 1.75 !important;
}
html body.auxiliary-page .aux-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 26px;
}
html body.auxiliary-page .aux-link,
html body.auxiliary-page .back-link,
html body.auxiliary-page .policy-container a {
  color: var(--aux-blue) !important;
  font-weight: 800 !important;
  text-decoration: none !important;
}
html body.auxiliary-page .aux-link:hover,
html body.auxiliary-page .back-link:hover,
html body.auxiliary-page .policy-container a:hover { text-decoration: underline !important; }
html body.auxiliary-page .aux-card .btn,
html body.auxiliary-page .reset-card .btn,
html body.auxiliary-page .forgot-password-container .btn {
  border-radius: 999px !important;
  box-shadow: 0 18px 36px rgba(5, 6, 5,.22) !important;
}
html body.auxiliary-page :is(input, textarea, select) {
  border-radius: 18px !important;
  border: 1px solid rgba(5, 6, 5,.16) !important;
  background: rgba(255,255,255,.9) !important;
  box-shadow: 0 12px 28px rgba(15,23,42,.055) !important;
}
html body.auxiliary-page .form-group label {
  color: var(--aux-ink) !important;
  font-weight: 800 !important;
}
html body.auxiliary-page .aux-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  margin-top: 28px;
}
html body.auxiliary-page .message,
html body.auxiliary-page #successMessage,
html body.auxiliary-page .password-requirements {
  border-radius: 22px !important;
  border: 1px solid rgba(255,255,255,.7) !important;
  box-shadow: 0 14px 34px rgba(15,23,42,.07) !important;
}
html body.auxiliary-page .policy-container h2,
html body.auxiliary-page .policy-container h3 {
  color: var(--aux-ink) !important;
  font-family: var(--font-display, 'Montserrat', 'Inter', Arial, sans-serif) !important;
  letter-spacing: -.025em;
}
html body.auxiliary-page .policy-container ul,
html body.auxiliary-page .policy-container ol,
html body.auxiliary-page .policy-container li,
html body.auxiliary-page .policy-container p {
  color: var(--aux-muted) !important;
}
html body.auxiliary-page .policy-container h1 i { display: none !important; }
html body.auxiliary-page .last-updated {
  margin-top: 36px !important;
  padding-top: 20px !important;
  border-top: 1px solid rgba(5, 6, 5,.14) !important;
}
@media (max-width: 640px) {
  html body.auxiliary-page .aux-card,
  html body.auxiliary-page .policy-container { border-radius: 26px !important; }
  html body.auxiliary-page .aux-actions { flex-direction: column; align-items: stretch; }
  html body.auxiliary-page .aux-actions .btn { width: 100%; }
}

/* Topic 94: highlight course lesson opened from the newcomers page. */
html body .cabinet-course-lesson.is-linked-from-start{
  outline:3px solid #0879c9!important;
  outline-offset:3px!important;
  box-shadow:0 18px 46px rgba(8,121,201,.22)!important;
}
