@import url("assets/fonts/fonts.css");

:root {
  color-scheme: light;
  --paper: #fcfbf9;
  --ink: #13151c;
  --black: #171717;
  --line: #bfc0c6;
  --yellow: #ffd524;
  --cherry: #6b1739;
  --muted: #565c69;
  --display: "Russo One", "Jura", "Trebuchet MS", sans-serif;
  --body: "IBM Plex Mono", "Courier New", monospace;
  --gutter: 60px;
  --section-gap: 32px;
  --control-height: 52px;
}
* { box-sizing: border-box; }
[hidden]:not([hidden="until-found" i]) { display: none !important; }
html { scroll-padding-top: 20px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.5 var(--body); }
a { color: var(--cherry); text-underline-offset: 4px; }
button, input, select { font: inherit; color: inherit; }
button, select, summary { cursor: pointer; }
button { background: transparent; border: 0; }
input, select { min-width: 0; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--cherry); outline-offset: 4px; }
.site-header :focus-visible { outline-color: var(--yellow); }
.container { width: calc(100% - var(--gutter) * 2); max-width: 1560px; margin-inline: auto; }
.od-icon { display: inline-block; width: 1.4em; height: 1.4em; flex: none; vertical-align: middle; }
.od-field { display: grid; gap: 6px; min-width: 0; }
.od-field > * { min-width: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 5; top: 8px; left: 8px; background: var(--yellow); padding: 12px; transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.js-only { display: none; }
.enhanced .js-only { display: grid; }
.site-header { background: var(--black); color: var(--paper); }
.topbar { border-bottom: 1px solid #bcbcbc; }
.topbar-inner { display: flex; align-items: center; gap: 28px; min-height: 62px; }
.wordmark { color: var(--yellow); font: 700 40px/1 var(--display); text-decoration: none; letter-spacing: -2px; }
.organizer { border-left: 1px solid var(--paper); padding-left: 28px; font-size: 20px; }
.header-nav { display: flex; align-items: center; gap: 28px; margin-left: auto; font-size: 20px; white-space: nowrap; }
.header-nav a { color: var(--paper); text-decoration: none; }
.header-nav a::after { content: ""; display: block; height: 4px; background: var(--yellow); margin-top: 2px; }
.hero { display: grid; grid-template-columns: 54% 46%; align-items: center; min-height: 164px; padding-block: 16px; }
h1 { margin: 0; font: 700 72px/.96 var(--display); letter-spacing: -3px; }
h1 > span { display: inline-block; margin-top: 4px; padding: 0 8px 4px; background: var(--yellow); color: #080808; }
.event-meta { border-left: 1px solid #cacaca; padding: 8px 0 8px 40px; }
.event-meta p { margin: 0; }
.event-meta > p:first-child { display: flex; flex-wrap: wrap; gap: 20px; font-size: 18px; }
.event-counts { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 16px; }
.event-counts > span { display: flex; align-items: center; gap: 12px; white-space: nowrap; font-size: 18px; }
.event-counts strong { color: var(--yellow); font: 700 44px/1 var(--display); }
.event-counts > b { font-weight: 400; }
#overview { padding-top: 34px; }
.filters { grid-template-columns: minmax(0, 1fr) 272px 280px; gap: 20px; }
.filters label { font-size: 17px; }
select { appearance: none; width: 100%; height: var(--control-height); padding: 8px 48px 8px 16px; background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m3 6 5 5 5-5' fill='none' stroke='%2313151c' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 16px center / 16px 16px; border: 1.5px solid var(--ink); border-radius: 0; }
.search-control { display: flex; align-items: center; gap: 16px; min-height: var(--control-height); border: 1.5px solid var(--ink); padding: 0 16px; }
.search-control:focus-within { outline: 2px solid var(--cherry); outline-offset: 0; border-color: var(--cherry); }
.search-control input { width: 100%; padding: 8px 0; min-height: 48px; outline: none; border: 0; background: transparent; }
.search-control input::-webkit-search-cancel-button { display: none; }
.search-control input::placeholder { color: #777c89; opacity: 1; }
#clear-search { width: 32px; height: 44px; padding: 0; font-size: 28px; }
.category-tabs, .round-tabs { display: flex; align-items: stretch; border-bottom: 1px solid #555b66; margin-top: 40px; }
.category-tabs a, .round-tabs a { display: flex; align-items: center; justify-content: center; padding: 10px 28px 12px; color: var(--ink); font-size: 21px; text-decoration: none; border-bottom: 4px solid transparent; position: relative; white-space: nowrap; }
.category-tabs a:first-child { padding-left: 4px; padding-right: 20px; }
.category-tabs a + a::before, .round-tabs a + a::before { content: ""; position: absolute; left: 0; top: 14px; height: 24px; border-left: 1px solid #6c707a; }
.category-tabs a[aria-current="true"], .round-tabs a[aria-current="true"] { font-weight: 700; border-bottom-color: var(--cherry); }
.final-group { padding-top: var(--section-gap); padding-bottom: 24px; border-bottom: 1px solid #8c909a; }
.final-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 620px), 1fr)); gap: 32px; }
.final-block { min-width: 0; }
h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.2; }
.slash { display: flex; align-items: baseline; gap: 16px; margin: 0 0 10px; font-size: 30px; }
.slash::before { content: "/"; color: var(--cherry); font: 700 44px/.6 var(--body); flex: none; }
.table-scroll { max-width: 100%; min-width: 0; overflow-x: auto; scrollbar-color: var(--cherry) var(--paper); }
table { border-collapse: collapse; width: 100%; border: 1px solid var(--ink); font-weight: 400; }
th, td { border: 1px solid var(--line); padding: 10px 16px; vertical-align: middle; }
th { font-weight: 400; }
thead th { font-size: 16px; font-weight: 700; }
.results-table { table-layout: fixed; }
.results-table thead th { text-align: center; height: 44px; }
.results-table thead th:nth-child(2) { text-align: left; }
.results-table tbody th { text-align: left; font-size: 18px; line-height: 1.35; }
.results-table td { text-align: center; font-size: 18px; }
.final-table thead th:nth-child(1) { width: 13%; }
.final-table thead th:nth-child(2) { width: 38%; }
.final-table thead th:nth-child(3) { width: 11%; }
.final-table thead th:nth-child(4) { width: 17%; }
.final-table thead th:nth-child(5) { width: 21%; }
.final-table td, .final-table tbody th { height: 52px; }
.final-table .place { padding: 6px; }
.medal { display: inline-flex; align-items: center; justify-content: center; width: 36px; min-height: 36px; font-size: 18px; font-weight: 700; color: #080808; }
.medal-1 { background: var(--yellow); }
.medal-2 { background: #dedede; }
.medal-3 { background: #ddd8d0; }
.winner { background: #fff7d9; }
.protocol-link { display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--cherry); font-size: 16px; text-decoration: none; white-space: nowrap; }
.protocol-link .od-icon { width: 18px; height: 18px; }
.results-table .action { padding-inline: 12px; }
.group-bottom { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding-top: 14px; font-size: 16px; }
.masters-note { display: flex; align-items: flex-start; gap: 12px; margin: 0; }
.archive-link { display: inline-flex; align-items: center; gap: 12px; margin-left: auto; white-space: nowrap; }
.archive-link .od-icon { color: var(--ink); }
.search-results { border: 1px solid #a9abb3; padding: 14px; margin-top: 12px; }
.search-heading { display: flex; justify-content: space-between; gap: 24px; padding: 0 4px 12px; }
.search-heading p { display: flex; gap: 16px; align-items: center; margin: 0; }
.search-table { min-width: 1050px; }
.search-table th { text-align: left; }
.search-table td { text-align: center; }
.search-table td:last-child { text-align: right; }
.search-hint { display: flex; align-items: flex-start; gap: 16px; margin: 10px 4px 0; }
.search-results + .category-tabs { margin-top: 24px; }
.text-button { color: var(--cherry); padding: 8px; text-decoration: underline; text-underline-offset: 4px; }
.site-footer { margin-block: 52px 48px; display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; border-top: 1px solid #8c909a; padding-top: 24px; font-size: 14px; }
.site-footer p { margin: 0; }
.site-footer .od-icon { display: none; }
.site-footer p:last-child { white-space: nowrap; }
#archive { margin-top: 24px; }
summary { padding: 16px 0; }
.archive-summary { color: var(--cherry); text-decoration: underline; }
.archive-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.archive-heading h2 { font-size: 36px; }
.archive-category { padding-top: 24px; }
.round-summary { margin-block: 12px; border-block: 1px solid var(--line); }
.round-summary > summary { font-weight: 600; }
.stage-table { min-width: 850px; }
.stage-table th:first-child { width: 31%; }
.stage-table th:nth-child(2) { width: 28%; }
.stage-table .progress { font-size: 14px; text-align: left; }
.participant-protocol { border-top: 1px solid var(--line); margin-top: 12px; }
.participant-protocol > summary { font-weight: 600; }
.participant-protocol .protocol-body { padding-bottom: 24px; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 24px; font-size: 17px; padding-top: 20px; }
.breadcrumbs a { color: var(--ink); text-decoration: none; }
.participant-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; padding-top: 24px; }
.participant-heading h2 { font-size: 44px; margin: 0; overflow-wrap: anywhere; }
.participant-bib { border-left: 1px solid #6c707a; padding-left: 24px; font-size: 24px; white-space: nowrap; }
.back-link { display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; margin-right: 24px; }
.enhanced .copy-link { display: inline-flex; align-items: center; gap: 12px; color: var(--cherry); text-decoration: underline; text-underline-offset: 4px; margin-left: auto; padding: 8px 0; }
.heading-place:empty { display: none; }
.place-badge { display: inline-flex; align-items: center; padding: 4px 16px; background: var(--yellow); color: #080808; font: 700 28px/1.25 var(--display); white-space: nowrap; }
.round-tabs { margin-top: 16px; }
.round-tabs a { padding-inline: 24px; font-size: 20px; }
.round-tabs .protocol-link { color: var(--ink); }
.round-panel { padding-top: 20px; scroll-margin-top: 20px; }
.round-caption { display: flex; align-items: center; gap: 24px; }
.round-caption h3 { font-size: 26px; }
.score-equation { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 28px; margin: 4px 0 28px; font-size: 22px; }
.score-equation > span { display: inline-flex; align-items: center; gap: 28px; }
.score-equation strong { font: 700 44px/1 var(--display); color: #080808; }
.score-equation .total-highlight { background: var(--yellow); padding: 4px 12px; }
.score-equation .operator { border-left: 1px solid var(--line); padding-left: 28px; font-size: 32px; }
.matrix-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; }
.matrix-heading p { margin: 0 0 8px; }
.matrix { table-layout: fixed; min-width: 800px; }
.matrix th:first-child { width: 21%; text-align: left; }
.matrix td, .matrix thead th { text-align: center; }
.matrix th, .matrix td { padding: 5px 20px; font-size: 17px; }
.matrix tfoot { background: #f0f0ef; }
.matrix tfoot th, .matrix tfoot td { font-weight: 700; }
.additional { margin-top: 28px; }
.additional p { margin: 4px 0 8px; }
.additional .slash { margin-bottom: 4px; }
.additional-matrix td:last-child { font-weight: 700; }
.advancement { color: var(--muted); margin-bottom: 0; }
.enhanced.is-protocol #archive { margin-top: 0; }
.enhanced.is-protocol .archive-summary, .enhanced.is-protocol .participant-index-title, .enhanced.is-protocol .participant-protocol > summary, .enhanced.is-protocol .round-caption { display: none; }
.enhanced.is-protocol .participant-protocol { margin: 0; border: 0; }
.enhanced.is-protocol .hero { min-height: 124px; }
.enhanced.is-protocol h1 { font-size: 56px; }
.enhanced.is-protocol .site-footer { margin-top: 16px; padding-top: 12px; }
.enhanced.is-protocol .site-footer .od-icon { display: inline-block; margin-right: 12px; }
.notice, #copy-feedback, #copy-fallback { padding: 16px; border: 1px solid var(--cherry); margin-top: 16px; }
.notice { overflow-wrap: anywhere; }
#copy-fallback input { width: 100%; padding: 12px; background: var(--paper); border: 1px solid var(--ink); }
@media (hover: hover) { a:hover, .text-button:hover, .copy-link:hover { text-decoration: underline; } button:hover { background: #fff1b5; } .category-tabs a:hover, .round-tabs a:hover { background: #f1eee7; } }
@media (max-width: 1200px) {
  :root { --gutter: 32px; }
  .organizer { font-size: 16px; }
  .hero { grid-template-columns: 50% 50%; }
  h1 { font-size: 62px; }
  .event-meta { padding-left: 24px; }
  .event-meta > p:first-child { font-size: 16px; gap: 12px; }
  .event-counts { gap: 12px; }
  .event-counts > span { gap: 8px; font-size: 16px; }
  .event-counts strong { font-size: 36px; }
  .filters { grid-template-columns: minmax(0, 1fr) 220px 240px; gap: 16px; }
  .group-bottom { flex-wrap: wrap; }
  .participant-heading { gap: 16px; }
  .participant-heading h2 { font-size: 36px; }
  .back-link { margin-right: 0; }
}
@media (max-width: 1024px) {
  .hero { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 24px; padding-block: 24px; text-align: center; }
  h1 { font-size: 64px; }
  .event-meta { border-left: 0; padding: 0; max-width: 100%; }
  .event-meta > p:first-child, .event-counts { justify-content: center; }
  .event-counts { gap: 24px; }
}
@media (max-width: 900px) {
  :root { --gutter: 24px; }
  .topbar-inner { gap: 20px; }
  .organizer { max-width: 300px; padding-left: 20px; }
  .header-nav { font-size: 16px; gap: 16px; }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-field { grid-column: 1 / -1; }
  .category-tabs { overflow-x: auto; }
  .category-tabs a { font-size: 18px; padding-inline: 20px; }
  .final-grid { gap: 28px; }
  .final-table { min-width: 0; }
  .final-table thead th:nth-child(2) { width: 40%; }
  .final-table thead th:nth-child(4) { width: 15%; }
  .group-bottom { font-size: 14px; }
  .archive-link { white-space: normal; }
  .site-footer { flex-direction: column; gap: 16px; }
  .site-footer p:last-child { white-space: normal; }
  .matrix-heading { flex-direction: column; gap: 0; }
  .participant-heading h2 { font-size: 36px; }
  .back-link { flex-basis: 100%; }
  .score-equation { font-size: 18px; gap: 16px; }
  .score-equation > span { gap: 12px; }
  .score-equation .operator { padding-left: 16px; }
  .score-equation strong { font-size: 36px; }
}
@media (max-width: 640px) {
  .final-table { table-layout: auto; }
  .final-table thead th, .final-table td, .final-table tbody th { font-size: 13px; padding: 8px 4px; }
  .final-table tbody th { overflow-wrap: anywhere; font-size: 14px; }
  .final-table .action { padding: 4px; }
  .final-table .protocol-link { font-size: 12px; gap: 2px; min-height: 44px; }
  .final-table .protocol-link .od-icon { display: none; }
  .final-table .medal { width: 24px; min-height: 28px; font-size: 14px; }
  .final-table .place { padding: 4px; }
}
@media (max-width: 540px) {
  :root { --gutter: 16px; --section-gap: 24px; }
  .topbar-inner { min-height: 60px; gap: 16px; flex-wrap: wrap; padding-block: 12px; }
  .wordmark { font-size: 32px; }
  .organizer { font-size: 12px; max-width: 190px; padding-left: 16px; }
  .header-nav { width: 100%; margin: 0; justify-content: space-between; font-size: 14px; }
  h1 { font-size: clamp(36px, 10.5vw, 56px); letter-spacing: -1px; }
  .hero { padding-block: 20px; gap: 20px; }
  .event-meta > p:first-child { font-size: 13px; gap: 8px; }
  .event-counts { gap: 8px; padding-top: 16px; justify-content: center; }
  .event-counts > span { flex-direction: column; align-items: center; gap: 4px; font-size: 12px; }
  .event-counts strong { font-size: 36px; }
  #overview { padding-top: 24px; }
  .filters { grid-template-columns: minmax(0, 1fr); }
  .filters label { font-size: 16px; }
  select { font-size: 16px; }
  .category-tabs { margin-top: 24px; }
  .category-tabs a { font-size: 16px; padding-inline: 16px; min-height: 52px; }
  .slash { font-size: 24px; gap: 12px; }
  .slash::before { font-size: 36px; }
  .masters-note { font-size: 13px; gap: 8px; }
  .archive-link { min-height: 44px; font-size: 13px; }
  .search-results { padding: 12px; }
  .search-heading { flex-direction: column; gap: 8px; font-size: 14px; }
  .search-hint { font-size: 13px; gap: 8px; }
  .search-table { min-width: 0; border: 0; }
  .search-table tbody, .search-table tr, .search-table th, .search-table td { display: block; width: 100%; text-align: left; }
  .search-table tr { border: 1px solid var(--line); padding: 8px; margin-bottom: 8px; }
  .search-table th, .search-table td { border: 0; padding: 4px; }
  .search-table td:nth-child(2)::before { content: "№ "; }
  .search-table td:nth-child(5)::before { content: "Баллы: "; }
  .search-table td:last-child { text-align: left; }
  .search-table .protocol-link { min-height: 44px; white-space: normal; }
  .breadcrumbs { gap: 12px; font-size: 14px; }
  .participant-heading { gap: 12px; padding-top: 20px; }
  .participant-heading h2 { font-size: 32px; flex-basis: 100%; }
  .participant-bib { padding: 0; border: 0; font-size: 20px; }
  .place-badge { font-size: 24px; padding-inline: 12px; }
  .enhanced .copy-link { margin: 0; font-size: 14px; min-height: 44px; }
  .round-tabs { overflow-x: auto; }
  .round-tabs a { padding: 12px 16px; min-height: 48px; font-size: 16px; }
  .score-equation { justify-content: flex-start; gap: 12px; margin-bottom: 24px; }
  .score-equation > span:not(.operator) { flex-basis: 100%; justify-content: space-between; }
  .score-equation .operator { display: none; }
  .score-equation strong { font-size: 36px; }
  .matrix-heading p, .additional p { font-size: 14px; }
  .additional .slash { font-size: 24px; }
  .enhanced.is-protocol h1 { font-size: clamp(36px, 10.5vw, 56px); }
  .site-footer { font-size: 12px; margin-block: 32px; }
  .archive-heading { flex-wrap: wrap; }
  .archive-heading h2 { font-size: 28px; }
  summary { overflow-wrap: anywhere; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }

h1, h2, h3, .wordmark, .event-counts strong, .score-equation strong, .place-badge { font-weight: 400; }

@media (forced-colors: active) { select { appearance: auto; background-image: none; } }
