:root {
  --bg: #f5f2eb;
  --surface: #eae6dd;
  --ink: #1a2039;
  --muted: #565c6b;
  --accent: #c6a043;
  --accent-soft: #f5ecd5;
  --white: #fffdfa;
  --green: #2d594c;
  --sans: 'DM Sans', sans-serif;
  --serif: 'EB Garamond', Georgia, serif;
  --heading: clamp(38px, 4vw, 56px);
  --radius: 10px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 112px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 18px/1.6 var(--sans); }
button, input, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button, a { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid var(--ink); outline-offset: 5px; }
.hero :focus-visible, .site-footer :focus-visible { outline-color: var(--accent); }
::selection { background: var(--accent); color: var(--ink); }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -.035em; line-height: 1.06; text-wrap: balance; }
h2 { font-size: var(--heading); }
h3 { font-size: 32px; }
p { max-width: 62ch; }
svg { display: block; fill: currentColor; }
.wrap { width: calc(100% - 64px); max-width: 1280px; margin-inline: auto; }
.skip { position: fixed; top: -100px; left: 16px; padding: 12px 20px; z-index: 100; background: var(--accent); }
.skip:focus { top: 12px; }
#main:focus { outline: none; }
.site-header { position: sticky; top: 0; z-index: 20; height: 100px; display: flex; align-items: center; justify-content: space-between; gap: 24px; background: var(--bg); }
.brand { display: flex; align-items: center; gap: 8px; font-size: 30px; font-weight: 600; letter-spacing: -1.5px; flex-shrink: 0; }
.brand-logo { display: block; width: 72px; height: 58px; object-fit: contain; mix-blend-mode: multiply; }
.site-header nav { display: flex; align-items: center; gap: 30px; font-size: 16px; }
.site-header nav a { position: relative; padding: 12px 0; }
.site-header nav a::after { position: absolute; content: ''; bottom: 5px; left: 0; right: 100%; height: 3px; background: var(--accent); transition: right .2s; }
.site-header nav a:hover::after, .site-header nav a[aria-current=page]::after { right: 0; }
.site-header nav a[aria-current=page] { font-weight: 600; }
.header-action { font-size: 16px; font-weight: 600; padding: 12px 0; }
.header-action:hover { text-decoration: underline; text-underline-offset: 6px; }
.menu-toggle { display: none; }

.hero { display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 76px; min-height: 540px; padding: 60px; background: var(--ink); color: var(--accent-soft); border-radius: var(--radius); }
.hero h1 { color: var(--accent); font-size: clamp(100px, 11.5vw, 164px); font-weight: 400; letter-spacing: -.065em; line-height: .98; margin-left: -5px; }
.hero-copy > p { margin-top: 28px; max-width: 37ch; }
.hero-copy strong { display: block; color: var(--accent); font-size: 24px; font-weight: 500; line-height: 1.4; margin-bottom: 12px; }
.hero .button { margin-top: 30px; }
.hero-format h2 { font-size: 32px; }
.hero-format > p { font-size: 16px; margin-top: 22px; max-width: 37ch; }
.category-list { display: grid; margin-top: 20px; gap: 6px; }
.category-list a { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 10px 0; transition: transform .2s; }
.category-list a:hover { transform: translateX(5px); }
.category-grade { color: var(--accent); font: 500 38px/1.1 var(--serif); letter-spacing: -.025em; }
.category-action { font-size: 16px; text-decoration: underline; text-decoration-color: currentColor; text-underline-offset: 5px; transition: text-decoration-color .2s; }
.category-list a:hover .category-action { text-decoration-color: var(--accent); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 50px; padding: 13px 22px; background: var(--ink); color: var(--bg); border: 0; border-radius: 5px; font-size: 16px; font-weight: 500; line-height: 1.5; transition: transform .2s, background .2s; }
.button:hover { transform: translateY(-2px); background: #353b50; }
.button:active { transform: translateY(0); }
.button.accent { background: var(--accent); color: var(--ink); }
.button.accent:hover { background: var(--accent-soft); }
.button.secondary { background: var(--white); color: var(--ink); }
.button.secondary:hover { background: var(--accent-soft); }
.button:disabled { opacity: .45; transform: none; }
.home-section { padding-top: 100px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; margin-bottom: 32px; }
.section-head p { max-width: 34ch; font-size: 16px; }
.edition-list { display: grid; gap: 12px; }
.upcoming-edition { display: grid; grid-template-columns: 1fr 1.25fr; gap: 76px; padding: 48px; background: var(--accent-soft); border-radius: var(--radius); }
.upcoming-edition h2, .upcoming-edition h3 { font-size: var(--heading); }
.upcoming-status { margin-top: 20px; font-weight: 600; color: var(--green); }
.edition-entry { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 28px 32px; background: var(--surface); border-radius: var(--radius); }
.edition-entry h3 { font-size: 36px; }
.edition-entry p { font-size: 14px; color: var(--muted); margin-top: 8px; }
.edition-actions { display: flex; flex-wrap: wrap; gap: 12px; flex-shrink: 0; }
.about-section { display: grid; grid-template-columns: 1fr 1.25fr; gap: 76px; padding: 48px; background: var(--accent-soft); border-radius: var(--radius); margin-top: 100px; scroll-margin-top: 0; }
.about-section h2 { max-width: 10ch; }
.about-tagline { font-size: 18px; margin-top: 22px; }
.about-text { display: grid; gap: 20px; }
.contest-about-page { padding-bottom: 100px; }
.contest-about-page .page-intro h1 { max-width: 9ch; }
.contest-about-page .page-intro p { font-size: 18px; }
.contest-purpose { display: grid; grid-template-columns: 1fr 1.25fr; gap: 76px; padding-top: 24px; }
.contest-purpose h2 { max-width: 11ch; }
.contest-format { margin-top: 72px; }
.resource-band { display: grid; grid-template-columns: 1.1fr 1fr; gap: 76px; padding: 100px 0; align-items: center; }
.resource-band > div > p { margin-top: 24px; max-width: 40ch; }
.resource-links { display: grid; gap: 4px; background: var(--surface); padding: 6px 28px; border-radius: var(--radius); }
.resource-link { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 24px 0; background: transparent; transition: transform .2s; }
.resource-link:hover { transform: translateX(4px); }
.resource-link h3 { font-size: 28px; }
.resource-link p { font-size: 16px; color: var(--muted); margin-top: 8px; line-height: 1.5; }
.resource-link > span { font-size: 24px; }
.challenge { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; padding: 48px; margin-bottom: 100px; background: var(--accent-soft); border-radius: var(--radius); align-items: center; }
.challenge-copy > p { margin-top: 24px; }
.challenge-copy .sample-label { margin-top: 20px; font-size: 14px; }
.challenge-answer { padding: 28px; background: var(--white); border-radius: 6px; min-width: 0; }
.challenge-answer label { display: block; font-size: 18px; font-weight: 500; }
.answer-controls { display: flex; gap: 10px; margin-top: 16px; }
.answer-controls input { min-width: 0; width: 100%; flex: 1; background: var(--bg); border: 2px solid var(--surface); border-radius: 5px; padding: 10px 12px; font-size: 16px; }
.answer-controls input::placeholder { color: var(--muted); opacity: 1; }
.answer-feedback { margin-top: 16px; padding: 12px 14px; background: #e9f0e9; color: var(--green); border-radius: 5px; font-size: 16px; }
.answer-feedback:empty { display: none; }
.answer-feedback.incorrect { background: var(--bg); color: var(--ink); }
.solution { margin-top: 24px; font-size: 18px; }
.solution summary { padding: 10px 0; min-height: 44px; cursor: pointer; font-size: 16px; font-weight: 600; }
.solution summary:hover { color: var(--muted); }
.solution p { margin-top: 18px; }
.sample-label { font-size: 16px; color: var(--muted); }

.page-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 48px; padding: 50px 0 42px; }
.page-intro h1 { font-size: clamp(60px, 7vw, 96px); line-height: 1; }
.page-intro p { max-width: 40ch; font-size: 18px; }
.archive-page { padding-bottom: 90px; min-height: 70vh; }
.filter-bar { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 20px; padding: 24px; background: var(--surface); border-radius: var(--radius); margin-bottom: 24px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 210px; }
.field.search-field { flex: 1; }
.field label { font-size: 14px; font-weight: 600; }
.field input, .field select { width: 100%; height: 52px; padding: 12px 16px; border: 0; border-radius: 5px; background: var(--white); font-size: 16px; }
.field select { appearance: none; -webkit-appearance: none; padding-right: 44px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231a2039' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-size: 16px; background-position: right 16px center; }
.field input::placeholder { color: var(--muted); opacity: 1; }
.archive-explainer { font-size: 16px; color: var(--muted); }
.archive-status { display: flex; justify-content: space-between; gap: 24px; align-items: center; min-height: 28px; margin: 28px 0 20px; font-size: 16px; }
.text-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0; background: transparent; border: 0; color: var(--ink); font-size: 16px; font-weight: 500; text-decoration: underline; text-underline-offset: 5px; }
.text-link:hover { text-decoration-thickness: 2px; }
.empty-state { padding: 48px 32px; text-align: center; background: var(--surface); border-radius: var(--radius); }
.empty-state h2 { font-size: 38px; }
.empty-state p { margin: 20px auto 0; }
.practice-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; margin-bottom: 36px; }
.practice-materials:empty { display: none; }
.practice-materials { margin-bottom: 36px; }
.practice-list { display: grid; gap: 56px; }
.practice-group > h2 { margin: 24px 0; font-size: 38px; }
.practice-problem { padding: 32px; margin-top: 16px; background: var(--white); border-radius: var(--radius); }
.practice-problem h3 { font-size: 32px; }
.practice-problem > p { max-width: 72ch; margin-top: 20px; }
.practice-problem .problem-topic { font-size: 14px; color: var(--muted); margin-top: 10px; }
.practice-problem .solution { max-width: 72ch; }
.practice-problem details[open] { background: var(--bg); padding: 8px 24px 24px; margin-inline: -8px; border-radius: 5px; }
.notice { padding: 20px 24px; margin: 24px 0; background: var(--accent-soft); border-radius: var(--radius); font-size: 16px; }
.results-info { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 28px 0 20px; font-size: 16px; color: var(--muted); }
.ranking-group { margin-top: 48px; }
.ranking-group h2 { font-size: 38px; }
.table-scroll { margin-top: 24px; overflow: auto; border-radius: 6px; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 16px; }
th { background: var(--ink); color: var(--bg); font-weight: 500; }
th, td { padding: 18px 22px; white-space: nowrap; }
tbody tr:nth-child(odd) { background: var(--white); }
tbody tr:nth-child(even) { background: var(--surface); }
td.result-name { font-weight: 500; }
.rank-number { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; font-variant-numeric: tabular-nums; }
.top-result .rank-number { width: 34px; height: 34px; background: var(--accent-soft); border-radius: 50%; font-weight: 600; }
.score-value { font-weight: 600; font-variant-numeric: tabular-nums; }
.about-copy { max-width: 760px; margin: 0 auto 90px; }
.about-copy h2 { font-size: 38px; margin: 42px 0 24px; }
.about-copy p { margin-top: 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.site-footer { padding: 56px 0 28px; background: var(--ink); color: var(--accent-soft); }
.footer-top { display: flex; justify-content: space-between; align-items: center; gap: 64px; padding-bottom: 56px; }
.footer-logo { color: var(--accent); font: 400 clamp(84px, 10vw, 144px)/.9 var(--serif); letter-spacing: -.055em; }
.footer-top p { margin-top: 24px; font-size: 18px; }
.footer-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 48px; font-size: 16px; }
.footer-nav a { display: inline-flex; align-items: center; min-height: 44px; }
.footer-nav a:hover { color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px 28px; font-size: 14px; }
.footer-bottom a { text-decoration: underline; text-underline-offset: 4px; }
.noscript { padding: 24px; background: var(--accent-soft); }
.noscript a { text-decoration: underline; }
.reveal-in { animation: enter .65s both; }
.hero-copy .reveal-in:nth-child(2) { animation-delay: 70ms; }
.hero-copy .reveal-in:nth-child(3) { animation-delay: 140ms; }
@keyframes enter { from { opacity: .65; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1100px) {
  .hero { padding: 48px; gap: 48px; }
  .hero-copy strong { font-size: 22px; }
  .hero-format h2 { font-size: 30px; }
  .category-grade { font-size: 34px; }
  .about-section, .challenge { gap: 44px; padding: 40px; }
  .resource-band { gap: 48px; }
  .upcoming-edition { padding: 40px; gap: 44px; }
  .edition-entry { padding: 26px 28px; }
  th, td { padding: 18px; }
}
@media (max-width: 820px) {
  .wrap { width: calc(100% - 48px); }
  .site-header nav { gap: 22px; }
  .hero { padding: 40px 32px; gap: 40px; grid-template-columns: 1fr .9fr; min-height: 500px; }
  .hero h1 { font-size: 112px; }
  .hero-copy > p { font-size: 16px; }
  .hero-copy strong { font-size: 20px; }
  .hero-format h2 { font-size: 28px; }
  .category-action, .hero-format > p { font-size: 14px; }
  .category-grade { font-size: 32px; }
  .edition-entry h3 { font-size: 32px; }
  .edition-actions .button { padding: 12px 16px; }
  .section-head { align-items: flex-start; }
  .section-head p { max-width: 29ch; }
  .contest-purpose { gap: 36px; }
  .about-section { grid-template-columns: .85fr 1.15fr; gap: 36px; padding: 32px; }
  .resource-band { grid-template-columns: 1fr 1fr; gap: 36px; }
  .resource-link { padding: 24px 0; }
  .resource-link h3 { font-size: 26px; }
  .resource-link p { font-size: 14px; }
  .challenge { padding: 32px; gap: 32px; }
  .challenge-answer { padding: 24px; }
  .answer-controls { flex-wrap: wrap; }
  .answer-controls input { flex-basis: 100%; }
  .page-intro { gap: 36px; }
  .page-intro p { font-size: 16px; }
  .practice-intro { gap: 36px; }
  .footer-nav { gap: 24px 32px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  html { scroll-padding-top: 96px; }
  .wrap { width: calc(100% - 32px); }
  .site-header { height: 84px; gap: 16px; }
  .brand { font-size: 28px; gap: 6px; }
  .brand-logo { width: 58px; height: 46px; }
  .hero { grid-template-columns: 1fr; padding: 32px 24px; gap: 40px; min-height: 0; }
  .hero h1 { font-size: clamp(96px, 28vw, 118px); margin-left: -3px; }
  .hero-copy > p { margin-top: 22px; max-width: 34ch; }
  .hero-copy strong { font-size: 20px; margin-bottom: 12px; }
  .hero .button { margin-top: 24px; }
  .hero-format h2 { font-size: 30px; }
  .category-list { margin-top: 16px; gap: 2px; }
  .category-list a { padding: 10px 0; }
  .category-action, .hero-format > p { font-size: 14px; }
  .category-grade { font-size: 32px; }
  .hero-format > p { margin-top: 18px; }
  .home-section { padding-top: 64px; }
  .section-head { flex-direction: column; gap: 20px; margin-bottom: 26px; }
  .section-head p { max-width: none; }
  .upcoming-edition { grid-template-columns: 1fr; gap: 28px; padding: 28px 24px; }
  .upcoming-status { margin-top: 16px; }
  .edition-entry { flex-direction: column; align-items: flex-start; padding: 26px 24px; gap: 24px; }
  .edition-entry h3 { font-size: 32px; }
  .edition-entry p { font-size: 14px; }
  .edition-actions { width: 100%; gap: 10px; }
  .edition-actions .button { flex: 1; padding: 12px; font-size: 14px; white-space: nowrap; }
  .about-section { grid-template-columns: 1fr; padding: 28px 24px; gap: 28px; margin-top: 64px; scroll-margin-top: 0; }
  .about-section h2 { max-width: none; }
  .about-tagline { margin-top: 16px; font-size: 16px; }
  .about-text { gap: 18px; }
  .contest-about-page { padding-bottom: 64px; }
  .contest-purpose { grid-template-columns: 1fr; gap: 24px; padding-top: 8px; }
  .contest-purpose h2 { max-width: none; }
  .contest-format { margin-top: 48px; }
  .resource-band { grid-template-columns: 1fr; padding: 64px 0; gap: 28px; }
  .resource-band > div > p { margin-top: 20px; max-width: none; }
  .resource-link { padding: 24px 0; }
  .resource-link h3 { font-size: 28px; }
  .resource-link p { font-size: 14px; }
  .challenge { grid-template-columns: 1fr; padding: 28px 24px; gap: 28px; margin-bottom: 64px; }
  .challenge-copy > p { margin-top: 20px; }
  .challenge-answer { padding: 24px 20px; }
  .challenge-answer label { font-size: 16px; }
  .answer-controls { flex-wrap: nowrap; }
  .answer-controls input { flex-basis: auto; font-size: 16px; padding: 10px; }
  .answer-controls .button { padding: 12px 14px; font-size: 14px; }
  .answer-feedback, .solution { font-size: 16px; }
  .page-intro { flex-direction: column; align-items: flex-start; padding: 28px 0 32px; gap: 22px; }
  .page-intro h1 { font-size: 60px; }
  .page-intro p { max-width: none; }
  .archive-page { padding-bottom: 64px; }
  .filter-bar { gap: 16px; padding: 20px; }
  .field { min-width: 0; flex: 1; }
  .search-field, .archive-select { flex-basis: 100%; }
  .field select, .field input { padding: 12px; font-size: 16px; }
  .field select { padding-right: 44px; }
  .archive-explainer, .archive-status, .text-link { font-size: 14px; }
  .archive-status { gap: 16px; margin-top: 24px; }
  .empty-state { padding: 36px 24px; }
  .empty-state h2 { font-size: 32px; }
  .practice-intro { grid-template-columns: 1fr; gap: 18px; margin-bottom: 28px; }
  .practice-intro .sample-label { font-size: 14px; }
  .practice-list { gap: 40px; }
  .practice-group > h2 { font-size: 34px; margin: 20px 0 24px; }
  .practice-problem { padding: 26px 24px; }
  .practice-problem h3 { font-size: 30px; }
  .practice-problem details[open] { margin-inline: -8px; padding: 8px 16px 20px; }
  .notice { font-size: 14px; padding: 20px; }
  .results-info { font-size: 14px; align-items: flex-start; flex-direction: column; gap: 12px; }
  .ranking-group { margin-top: 36px; }
  .ranking-group h2 { font-size: 34px; }
  .table-scroll { overflow: visible; }
  table, tbody { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  tbody { display: grid; gap: 12px; }
  tbody tr { display: grid; grid-template-columns: 34px minmax(0,1fr) 58px; gap: 4px 12px; padding: 20px 16px; border-radius: 8px; }
  tbody tr:nth-child(even), tbody tr:nth-child(odd) { background: var(--white); }
  td { display: block; padding: 0; white-space: normal; min-width: 0; }
  td.result-rank { grid-column: 1; grid-row: 1 / 4; align-self: start; }
  td.result-name { grid-column: 2; grid-row: 1; font-size: 16px; line-height: 1.4; }
  td.result-grade { grid-column: 2; grid-row: 2; font-size: 14px; color: var(--muted); }
  td.result-grade::before { content: attr(data-grade-prefix); }
  td.result-school { grid-column: 2; grid-row: 3; font-size: 14px; color: var(--muted); line-height: 1.5; }
  td.result-total { grid-column: 3; grid-row: 1 / 4; text-align: right; line-height: 1.2; }
  td.result-total::after { content: attr(data-score-unit); display: block; font-size: 14px; margin-top: 6px; color: var(--muted); }
  td.result-award { grid-column: 2 / 4; grid-row: 4; font-size: 14px; color: var(--muted); margin-top: 6px; }
  .score-value { font-size: 28px; }
  .no-award td.result-award { display: none; }
  .rank-number { width: 34px; height: 34px; font-size: 16px; background: var(--surface); border-radius: 50%; }
  .about-copy { margin-bottom: 64px; }
  .about-copy h2 { font-size: 34px; margin-top: 32px; }
  .site-footer { padding: 44px 0 24px; }
  .footer-top { align-items: flex-start; flex-direction: column; gap: 36px; padding-bottom: 40px; }
  .footer-top p { font-size: 16px; margin-top: 22px; }
  .footer-nav { gap: 20px 32px; font-size: 14px; }
  .footer-bottom { flex-direction: column; gap: 12px; font-size: 14px; }
}
@media (max-width: 400px) {
  #ranking-filters .field { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .site-header, .site-footer, .filter-bar, .export-button, .answer-controls, .archive-status { display: none !important; }
  body { background: white; }
  .table-scroll { overflow: visible; }
  th, td { white-space: normal; }
}

/* Language controls stay available in the header at every width. */
html[lang="ru"] { --sans: 'Noto Sans', sans-serif; }
.header-tools { display: flex; align-items: center; gap: 24px; }
.language-switch { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 6px; background: var(--surface); flex-shrink: 0; }
.language-switch button { border: 0; border-radius: 4px; background: transparent; min-width: 38px; min-height: 38px; padding: 6px; font-size: 14px; font-weight: 600; transition: background .2s, color .2s; }
.language-switch button:hover { background: var(--accent-soft); }
.language-switch button[aria-pressed="true"] { background: var(--ink); color: var(--accent-soft); }
html[lang="ru"] .hero-copy strong { font-size: 22px; }
html[lang="ru"] .edition-actions .button { white-space: nowrap; }
@media (max-width: 950px) {
  .site-header { height: 84px; gap: 16px; }
  .brand { font-size: 28px; gap: 6px; }
  .brand-logo { width: 58px; height: 46px; }
}
@media (max-width: 640px) {
  .site-header { gap: 10px; }
  .menu-toggle { gap: 8px; }
  html[lang="ru"] .hero-copy strong { font-size: 20px; }
  html[lang="ru"] .page-intro h1 { font-size: clamp(44px, 12vw, 60px); }
}
@media (max-width: 360px) {
  .menu-toggle > span { display: none; }
}

/* Contest information and participation pages. */
.mobile-registration { display: none; }
.site-header nav { gap: 20px; font-size: 15px; }
.header-tools { gap: 18px; }
.content-page { padding-bottom: 100px; }
.content-page .page-intro p { font-size: 18px; }
.participation-panel, .news-item { display: grid; grid-template-columns: 1fr 1.25fr; gap: 76px; }
.participation-panel { padding: 48px; background: var(--accent-soft); border-radius: var(--radius); }
.participation-panel h2 { max-width: 13ch; font-size: 44px; }
.panel-status { margin-top: 24px; }
.participation-panel .button, .page-actions .button { justify-self: start; }
.schedule-facts { margin: 0; display: grid; gap: 16px; }
.schedule-facts div { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.schedule-facts dt { color: var(--muted); font-size: 16px; }
.schedule-facts dd { margin: 0; font-size: 16px; }
.editorial-section { display: grid; grid-template-columns: 1fr 1.25fr; gap: 76px; margin-top: 80px; }
.editorial-section > h2 { max-width: 11ch; }
.rules-section { margin-top: 24px; }
.editorial-list { display: grid; gap: 40px; }
.editorial-list article > p, .editorial-list article > .about-text { margin-top: 18px; }
.editorial-list h3 { font-size: 32px; }
.rules-pending { margin-top: 80px; }
.page-actions { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; margin-top: 40px; }
.news-list { display: grid; gap: 40px; }
.news-item { padding: 40px 0; }
.news-item h3 { font-size: 38px; max-width: 14ch; }
.news-item time { display: block; margin-top: 16px; }
.edition-state { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.edition-state .upcoming-status { margin-top: 0; }
.edition-page .editorial-section { margin-top: 56px; }
.edition-page .page-intro h1 { max-width: 11ch; }
.stage-date { font-weight: 600; }
.edition-signup { display: flex; align-items: center; justify-content: space-between; gap: 48px; margin-top: 80px; padding: 40px; border-radius: var(--radius); background: var(--surface); }
.edition-signup h2 { font-size: 38px; }
.edition-signup p { margin-top: 18px; }
.edition-signup .button { flex-shrink: 0; }
.edition-published-results { margin-top: 80px; }
.edition-published-results > p { margin-top: 24px; }
.edition-pagination { display: flex; justify-content: space-between; gap: 24px; margin-top: 48px; }
.results-table .problem-score { text-align: center; font-variant-numeric: tabular-nums; }
.footer-contact { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; padding-bottom: 48px; }
.footer-contact h2 { font-size: 26px; }
.footer-contact p { font-size: 16px; margin-top: 14px; max-width: 40ch; }
.footer-contact a { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 1240px) {
  .participation-panel, .news-item, .editorial-section { gap: 40px; }
  .participation-panel { padding: 40px; }
}
@media (max-width: 820px) {
  .participation-panel, .news-item, .editorial-section { grid-template-columns: .85fr 1.15fr; gap: 32px; }
  .participation-panel { padding: 32px; }
  .participation-panel h2 { font-size: 38px; }
  .schedule-facts div { grid-template-columns: 1fr; gap: 4px; }
  .edition-signup { gap: 28px; padding: 32px; }
  .news-item h3 { font-size: 34px; }
}
@media (max-width: 640px) {
  .content-page { padding-bottom: 64px; }
  .participation-panel, .news-item, .editorial-section { grid-template-columns: 1fr; gap: 28px; }
  .participation-panel { padding: 28px 24px; }
  .participation-panel h2 { font-size: 32px; max-width: none; }
  .panel-status { margin-top: 16px; }
  .editorial-section { margin-top: 56px; }
  .editorial-section > h2 { max-width: none; }
  .editorial-list { gap: 32px; }
  .editorial-list h3 { font-size: 28px; }
  .rules-section { margin-top: 16px; }
  .rules-pending { margin-top: 48px; }
  .page-actions { align-items: flex-start; flex-direction: column; gap: 16px; margin-top: 28px; }
  .news-item { padding: 24px 0; gap: 20px; }
  .news-item h3 { font-size: 32px; max-width: none; }
  .edition-state { align-items: flex-start; flex-direction: column; gap: 12px; }
  .edition-signup { align-items: flex-start; flex-direction: column; margin-top: 56px; padding: 28px 24px; }
  .edition-signup h2 { font-size: 32px; }
  .edition-published-results { margin-top: 56px; }
  .edition-pagination { flex-direction: column; }
  .results-table .problem-score { grid-column: 2 / 4; text-align: left; font-size: 14px; padding-top: 5px; }
  .results-table .problem-score::before { content: attr(data-problem-label); display: inline-block; min-width: 30px; margin-right: 8px; color: var(--muted); }
  .footer-contact { grid-template-columns: 1fr; gap: 28px; padding-bottom: 36px; }
}
@media (max-width: 640px) {
  .ranking-group .notice, .results-info { font-size: 16px; }
}

/* Confirmed venue and on-site participation details. */
.category-list { list-style: none; padding: 0; }
.category-list .category-item { padding: 10px 0; }
.venue-section { display: grid; grid-template-columns: 1fr 1.25fr; gap: 76px; align-items: start; margin-top: 100px; margin-bottom: 100px; }
.venue-copy h2 { margin-bottom: 28px; }
.venue-name { font-weight: 600; margin-bottom: 14px; }
.venue-copy address { font-style: normal; max-width: 38ch; }
.venue-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 22px; }
.venue-source { display: inline-block; margin-top: 14px; color: var(--muted); font-size: 14px; text-decoration: underline; text-underline-offset: 4px; }
.venue-map { display: block; width: 100%; height: 380px; border: 0; border-radius: var(--radius); background: var(--surface); }
.content-page .venue-section { margin-top: 80px; margin-bottom: 0; }
@media (max-width: 820px) {
  .venue-section { gap: 36px; }
}
@media (max-width: 640px) {
  .venue-section { grid-template-columns: 1fr; gap: 28px; margin-block: 64px; }
  .venue-copy h2 { margin-bottom: 22px; }
  .venue-map { height: 320px; }
  .content-page .venue-section { margin-top: 56px; }
  .schedule-facts dd { overflow-wrap: anywhere; }
}
@media print {
  .venue-map { display: none; }
  .venue-section { display: block; margin-block: 24px; }
}

/* Registration, event essentials and published rules. */
.home-hero { min-height: 440px; padding: 48px; gap: 48px; grid-template-columns: 1fr 1fr; }
.home-hero h1 { font-size: clamp(100px, 10vw, 144px); }
.home-hero .hero-copy > p { margin-top: 22px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-top: 26px; }
.home-hero .button { margin: 0; }
.hero-detail { min-height: 44px; display: inline-flex; align-items: center; font-size: 16px; text-decoration: underline; text-underline-offset: 4px; }
.hero-event h2 { font-size: 30px; margin-bottom: 20px; }
.event-date { margin: 0 0 20px; font-size: 30px; line-height: 1.2; }
.event-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 28px; margin: 0; }
.event-facts > div:last-child { grid-column: 1 / -1; }
.event-facts dt { margin-bottom: 4px; font-size: 14px; color: var(--muted); }
.event-facts dd { margin: 0; font-size: 18px; line-height: 1.5; }
.event-address { display: block; margin-top: 5px; font-size: 16px; }
.hero-event dt { color: var(--accent); }
.hero-event .event-date { font-family: var(--serif); font-size: 38px; line-height: 1.1; }
.registration-panel { grid-template-columns: 1fr 1.15fr; gap: 48px; }
.registration-copy > p { margin-top: 20px; }
.registration-copy .button { margin-top: 24px; }
.registration-copy .form-note { margin-top: 10px; font-size: 14px; color: var(--muted); }
.registration-panel .sample-label { margin-top: 18px; }
.participant-guide { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 48px; }
.participant-guide h2 { font-size: 32px; margin-bottom: 18px; }
.participant-guide .text-link { margin-top: 14px; }
.registration-page .venue-section { margin-top: 56px; }
.faq-section { margin-top: 64px; }
.faq-list { display: grid; gap: 10px; }
.faq-item { padding: 14px 22px; background: var(--surface); border-radius: 5px; }
.faq-item[open] { background: var(--accent-soft); }
.faq-item summary { min-height: 44px; align-content: center; cursor: pointer; font-size: 18px; font-weight: 600; }
.faq-item summary:hover { text-decoration: underline; text-underline-offset: 4px; }
.faq-item p { margin-top: 10px; padding-bottom: 8px; max-width: 65ch; }
.contact-band { display: flex; align-items: center; justify-content: space-between; gap: 40px; margin: 64px 0; padding: 32px; background: var(--accent-soft); border-radius: var(--radius); }
.contact-band h2 { font-size: 32px; margin-bottom: 14px; }
.contact-band p { max-width: 55ch; }
.contact-link { flex-shrink: 0; font-size: 16px; text-decoration: underline; text-underline-offset: 4px; line-height: 1.8; }
.contact-link strong { font-size: 20px; }
.content-page .contact-band { margin-bottom: 0; }
.footer-social { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 32px; padding-bottom: 28px; }
.footer-social a { display: inline-flex; align-items: center; min-height: 44px; font-size: 16px; text-decoration: underline; text-underline-offset: 4px; }
.rules-actions { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-bottom: 40px; }
.rules-actions p { font-size: 16px; }
.rules-document { max-width: 800px; }
.rule-section { margin-top: 36px; }
.rule-section h2 { font-size: 32px; margin-bottom: 18px; }
.rule-section ol { padding-left: 26px; margin: 0; display: grid; gap: 12px; }
.rule-section li { padding-left: 6px; max-width: 95ch; }
.rules-basis { margin-top: 40px; font-size: 14px; color: var(--muted); max-width: 95ch; }
.rules-basis a { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 820px) {
  .home-hero { padding: 36px; gap: 32px; }
  .home-hero h1 { font-size: 112px; }
  .hero-event .event-date { font-size: 32px; }
  .event-facts { gap: 16px 20px; }
  .registration-panel { gap: 32px; }
  .participant-guide { gap: 32px; }
  .contact-band { gap: 24px; }
}
@media (max-width: 640px) {
  .home-hero { grid-template-columns: 1fr; gap: 28px; min-height: 0; padding: 28px 24px; }
  .home-hero h1 { font-size: clamp(76px, 22vw, 94px); }
  .home-hero .hero-copy > p { margin-top: 16px; }
  .home-hero .hero-copy strong { margin-bottom: 8px; }
  .hero-actions { gap: 12px 20px; margin-top: 20px; }
  .hero-event h2 { font-size: 28px; margin-bottom: 14px; }
  .hero-event .event-date { font-size: 30px; }
  .event-facts dd { font-size: 16px; }
  .hero-event dt { font-size: 14px; }
  .event-address { font-size: 14px; }
  .page-intro { padding-top: 20px; padding-bottom: 26px; gap: 16px; }
  .page-intro h1, html[lang="ru"] .page-intro h1 { font-size: clamp(40px, 11vw, 50px); }
  .registration-panel { grid-template-columns: 1fr; gap: 28px; }
  .registration-copy > p { margin-top: 16px; }
  .participant-guide { grid-template-columns: 1fr; gap: 28px; margin-top: 36px; }
  .participant-guide h2 { font-size: 28px; margin-bottom: 14px; }
  .registration-page .venue-section { margin-top: 40px; }
  .faq-section { margin-top: 44px; }
  .faq-section h2 { font-size: 34px; }
  .faq-section .section-head { gap: 14px; }
  .faq-item { padding: 12px 16px; }
  .faq-item summary { font-size: 16px; }
  .contact-band { margin-block: 44px; padding: 24px; align-items: flex-start; flex-direction: column; gap: 20px; }
  .contact-band h2 { font-size: 28px; }
  .contact-link strong { font-size: 18px; }
  .footer-social { padding-bottom: 20px; gap: 8px; }
  .rule-section { margin-top: 28px; }
  .rule-section h2 { font-size: 28px; margin-bottom: 14px; }
  .rules-actions { margin-bottom: 28px; gap: 16px; }
  .rule-section ol { padding-left: 22px; }
}

/* The dropdown is reserved for phones and narrow tablets. */
@media (max-width: 820px) {
  .header-action { display: none; }
  .header-tools { order: 1; margin-left: auto; }
  .menu-toggle { display: flex; order: 2; align-items: center; font-size: 16px; }
  .site-header nav { display: none; position: absolute; }
  .site-header nav.open { display: grid; grid-template-columns: 1fr; gap: 4px; animation: menu-enter .18s ease-out both; }
  .menu-toggle { min-width: 44px; min-height: 44px; padding: 10px 14px; gap: 10px; border: 0; border-radius: 6px; background: var(--surface); font-weight: 500; flex-shrink: 0; transition: background .2s, color .2s; }
  .menu-toggle:hover { background: var(--accent-soft); }
  .menu-toggle[aria-expanded="true"] { background: var(--ink); color: var(--accent-soft); }
  .menu-icon { flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
  .menu-line { transform-origin: 12px 12px; transition: transform .2s; }
  .menu-toggle[aria-expanded="true"] .menu-line-top { transform: translateY(5px) rotate(45deg); transform-origin: 12px 7px; }
  .menu-toggle[aria-expanded="true"] .menu-line-bottom { transform: translateY(-5px) rotate(-45deg); transform-origin: 12px 17px; }
  .site-header nav { left: auto; right: 0; top: calc(100% - 4px); width: min(380px,100%); max-height: calc(100dvh - 100px); overflow-y: auto; overscroll-behavior: contain; padding: 12px; border: 1px solid var(--surface); border-radius: 10px; background: var(--white); color: var(--ink); font-size: 18px; }
  .site-header nav a { display: flex; align-items: center; min-height: 48px; padding: 10px 16px; border-radius: 5px; line-height: 1.45; transition: background .15s; }
  .site-header nav a::after { content: none; }
  .site-header nav a:hover, .site-header nav a[aria-current="page"] { background: var(--accent-soft); }
  .site-header nav a:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
  .site-header nav .mobile-registration { display: flex; margin-top: 8px; background: var(--accent); color: var(--ink); font-weight: 600; }
  .site-header nav .mobile-registration:hover { background: var(--accent-soft); }
}
@media (max-width: 640px) {
  .site-header nav { width: 100%; max-height: calc(100dvh - 88px); }
}
@media (max-width: 440px) {
  .menu-toggle > span { display: none; }
  .menu-toggle { padding: 10px; }
}
@keyframes menu-enter { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  .site-header nav.open { animation: none; }
  .menu-line, .menu-toggle, .site-header nav a { transition: none; }
}

@media (max-width: 360px) {
  .site-header { gap: 8px; }
  .brand { font-size: 24px; gap: 4px; }
  .brand-logo { width: 42px; height: 40px; }
  .language-switch button { min-width: 32px; }
}

@media (min-width: 821px) {
  .site-header { gap: 20px; }
  .site-header nav { gap: 20px; margin-left: auto; white-space: nowrap; }
  .header-tools { gap: 18px; margin-left: 12px; }
  .header-action { display: inline-flex; align-items: center; padding: 10px 16px; border-radius: 5px; background: var(--accent); color: var(--ink); }
  .header-action:hover { background: var(--accent-soft); text-decoration: none; }
  .site-header nav .mobile-registration { display: none; }
}
@media (min-width: 821px) and (max-width: 1050px) {
  .site-header { gap: 14px; }
  .brand { font-size: 28px; }
  .brand-logo { width: 58px; height: 46px; }
  .site-header nav { gap: 14px; font-size: 14px; }
  .header-tools { gap: 12px; margin-left: 0; }
  .header-action { font-size: 14px; padding-inline: 12px; }
}
.rules-faq { max-width: 900px; margin-top: 88px; }
.rules-faq > h2 { font-size: 38px; margin-bottom: 24px; scroll-margin-top: 16px; }
@media (max-width: 640px) {
  .rules-faq > h2 { font-size: 32px; scroll-margin-top: 16px; }
}

.contact-methods { display: grid; gap: 16px; min-width: 0; max-width: 100%; }
.contact-methods a { overflow-wrap: anywhere; }
.faq-item p a { text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }

.home-page { padding-bottom: 64px; }
@media (max-width: 640px) { .home-page { padding-bottom: 44px; } }

/* Short homepage sections and a compact site-wide footer. */
.home-page .about-section { margin-top: 64px; }
.home-page .venue-section { margin-block: 64px; }
.home-page .contact-band { margin-bottom: 0; }
.site-footer { padding: 24px 0; }
.footer-compact { display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; }
.footer-compact .footer-logo { font-size: 44px; line-height: 1; }
.footer-compact .footer-social { padding: 0; gap: 8px 28px; justify-content: flex-end; }
@media (max-width: 640px) {
  .home-page .about-section { margin-top: 44px; }
  .home-page .venue-section { margin-block: 44px; }
  .site-footer { padding: 20px 0; }
  .footer-compact { flex-direction: column; align-items: flex-start; gap: 8px; }
  .footer-compact .footer-logo { font-size: 36px; }
  .footer-compact .footer-social { justify-content: flex-start; gap: 4px 20px; }
  .footer-compact .footer-social a { font-size: 14px; }
}
