/* Страница рейтинга раунда (/rating/round-1). Подключается только там. */
.rt-hero { min-height: 0; padding-bottom: clamp(48px, 6vw, 80px); }
.rt-hero .page-hero__content { max-width: 1100px; }


.rt-section { padding-top: clamp(40px, 5vw, 64px); }
.rt-controls { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.rt-tabs { display: inline-flex; padding: 4px; gap: 4px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line-light); }
.rt-tab {
  border: 0; border-radius: 999px; padding: 10px 18px; background: transparent; cursor: pointer;
  font: 700 15px/1.2 var(--font-display); color: var(--ink-soft);
}
.rt-tab span { color: var(--muted-dark); font-weight: 600; margin-left: 4px; }
.rt-tab[aria-selected="true"] { background: var(--ink); color: var(--white); }
.rt-tab[aria-selected="true"] span { color: var(--muted); }
.rt-tab:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.rt-search { position: relative; flex: 0 1 340px; }
.rt-search svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); fill: none; stroke: var(--muted-dark); stroke-width: 2; stroke-linecap: round; }
.rt-search input {
  width: 100%; padding: 12px 14px 12px 42px; border-radius: 999px; border: 1px solid var(--line-light);
  background: var(--paper); color: var(--ink); font: 500 15px/1.2 Inter, sans-serif;
}
.rt-search input:focus { outline: 2px solid var(--blue); outline-offset: 1px; }

.rt-scroll { overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--line-light); background: var(--paper); box-shadow: var(--shadow); }
.rt-table { width: 100%; border-collapse: collapse; font-size: 15px; color: var(--ink); }
.rt-table thead th {
  position: sticky; top: 0; z-index: 1; background: var(--paper);
  padding: 14px 16px; text-align: left; white-space: nowrap;
  font: 700 12px/1.2 var(--font-display); letter-spacing: .06em; text-transform: uppercase; color: var(--muted-dark);
  border-bottom: 1px solid var(--line-light);
}
.rt-table td, .rt-table tbody th { padding: 11px 16px; border-bottom: 1px solid var(--line-light); vertical-align: middle; }
.rt-table tbody tr:last-child > * { border-bottom: 0; }
.rt-table tbody tr:hover > * { background: var(--light); }
.rt-table tbody th { font-weight: 600; text-align: left; }
.rt-table .rt-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rt-place { width: 64px; text-align: center !important; font-variant-numeric: tabular-nums; color: var(--muted-dark); font-weight: 600; }
.rt-place--top { color: var(--ink); font-family: var(--font-display); font-weight: 800; }
.rt-name { overflow-wrap: break-word; min-width: 150px; }
.rt-team { color: var(--ink-soft); overflow-wrap: break-word; min-width: 120px; }
.rt-total { font-family: var(--font-display); font-weight: 800; }
.rt-pen { color: #c2185b; }
.rt-muted { color: var(--muted-dark); }
.rt-time { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.rt-dq > * { background: #fff4f7; }
.rt-dq .rt-total { color: #c2185b; }
.rt-flag {
  display: inline-block; margin-left: 10px; padding: 3px 9px; border-radius: 999px; vertical-align: 1px;
  background: #ffe1ec; color: #a3124c; font: 700 12px/1.3 Inter, sans-serif; white-space: nowrap;
}
.rt-sub, .rt-s { display: none; }
.rt-empty { margin-top: 16px; color: var(--muted-dark); }

.rt-rules__list { margin: 28px 0 0; padding: 0; list-style: none; counter-reset: rt; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.rt-rules__list > li {
  counter-increment: rt; position: relative; padding: 24px 24px 24px 72px;
  background: var(--paper); border: 1px solid var(--line-light); border-radius: var(--radius-sm); color: var(--ink-soft); line-height: 1.6;
}
.rt-rules__list > li::before {
  content: counter(rt, decimal-leading-zero); position: absolute; left: 22px; top: 22px;
  font: 800 22px/1 var(--font-display); background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.rt-rules__list h3 { margin: 0 0 8px; font: 800 19px/1.25 var(--font-display); color: var(--ink); }
.rt-rules__list p { margin: 0; }
.rt-rules__list ul { margin: 0; padding-left: 18px; display: grid; gap: 8px; }
.rt-rules__list b { color: var(--ink); }

@media (max-width: 900px) {
  .rt-rules__list { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .rt-tabs { width: 100%; }
  .rt-tab { flex: 1; padding: 10px 8px; font-size: 14px; }
  .rt-search { flex-basis: 100%; }
  .rt-table { font-size: 14px; }
  .rt-table td, .rt-table tbody th, .rt-table thead th { padding: 10px 6px; }
  .rt-table tr > :first-child { padding-left: 10px; }
  .rt-table tr > :last-child { padding-right: 10px; }
  .rt-opt, .rt-team { display: none; }
  .rt-sub { display: block; margin-top: 2px; color: var(--muted-dark); font-weight: 500; font-size: 13px; }
  .rt-time { font-size: 13px; }
  .rt-place { width: 30px; }
  .rt-table thead th { white-space: normal; letter-spacing: 0; font-size: 11px; }
  .rt-name { min-width: 96px; overflow-wrap: anywhere; }
  .rt-flag { margin: 4px 0 0; display: table; white-space: normal; }
  .rt-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .rt-s { display: inline; }
  .rt-rules__list > li { padding: 20px 18px 20px 60px; }
  .rt-rules__list > li::before { left: 16px; top: 20px; }
}

/* Оглавление /rating и ссылка «← Все рейтинги» */
.rt-back { display: table; margin-bottom: 18px; color: var(--muted); font: 600 14px/1.2 Inter, sans-serif; text-decoration: none; }
.rt-back:hover { color: var(--white); }
.rt-hub { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.rt-hub__card {
  position: relative; display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 26px 24px 24px;
  background: var(--paper); border: 1px solid var(--line-light); border-radius: var(--radius-sm); color: var(--ink); text-decoration: none;
}
.rt-hub__card--link { box-shadow: var(--shadow); transition: transform .2s ease, border-color .2s ease; }
.rt-hub__card--link::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; border-radius: var(--radius-sm) var(--radius-sm) 0 0; background: var(--gradient); }
.rt-hub__card--link:hover { transform: translateY(-3px); border-color: rgba(37, 133, 255, .45); }
.rt-hub__card--link:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.rt-hub__date { color: var(--muted-dark); font-size: 14px; font-weight: 600; }
.rt-hub__title { font: 800 clamp(24px, 2.2vw, 30px)/1.1 var(--font-display); }
.rt-hub__status { align-self: flex-start; padding: 4px 10px; border-radius: 999px; background: var(--light-alt); color: var(--ink-soft); font: 700 12px/1.3 Inter, sans-serif; text-transform: uppercase; letter-spacing: .05em; }
.rt-hub__status--done { background: var(--ink); color: var(--white); }
.rt-hub__more { margin-top: auto; padding-top: 14px; display: inline-flex; align-items: center; gap: 8px; color: var(--blue); font-weight: 600; font-size: 15px; text-decoration: none; }
.rt-hub__more svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rt-hub__more--muted { color: var(--muted-dark); font-weight: 500; }
@media (max-width: 900px) { .rt-hub { grid-template-columns: 1fr; } }

/* Ссылки в таблицах, страницы команды и участника (23.11.2026) */
.rt-table a { color: inherit; text-decoration: none; background-image: linear-gradient(currentColor, currentColor); background-size: 0 1px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .2s ease, color .2s ease; }
.rt-table a:hover { color: var(--blue); background-size: 100% 1px; }
.rt-table a:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 2px; }
.rt-hint { margin: -6px 0 16px; color: var(--muted-dark); font-size: 14px; }
.rt-title { overflow-wrap: anywhere; text-transform: none; }
.rt-team-line { margin-top: 14px; color: rgba(235, 240, 255, .8); font-size: 17px; }
.rt-team-line a { color: var(--white); text-decoration: underline; text-decoration-color: rgba(0, 232, 255, .6); text-underline-offset: 4px; }
.rt-team-line a:hover { color: var(--cyan); }
.rt-stats { margin: 30px 0 0; display: flex; flex-wrap: wrap; gap: 12px; }
.rt-stat { min-width: 128px; padding: 14px 18px; border: 1px solid var(--line-dark); border-radius: var(--radius-sm); background: var(--bg-panel); }
.rt-stat dt { color: var(--muted); font-size: 13px; font-weight: 600; }
.rt-stat dd { margin: 6px 0 0; color: var(--white); font: 800 26px/1.1 var(--font-display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rt-stat dd small { color: var(--muted); font: 600 14px/1 Inter, sans-serif; }
.rt-stat--pen dd { color: #ff6aa8; }
.rt-h2 { margin: 0 0 14px; font: 800 clamp(24px, 2.4vw, 32px)/1.15 var(--font-display); color: var(--ink); }
.rt-h2 span { color: var(--muted-dark); font-weight: 700; margin-left: 6px; }
.rt-h2 ~ .rt-h2 { margin-top: 48px; }
.rt-h2 + .rt-scroll { margin-top: 4px; }
.rt-cat { color: var(--ink-soft); white-space: nowrap; }
.rt-who { overflow-wrap: anywhere; }
.rt-hints { margin: 18px 0 0; padding: 0; list-style: none; color: var(--ink-soft); font-size: 15px; display: grid; gap: 6px; }
.rt-hints a { color: var(--ink); font-weight: 600; }
.rt-note { display: grid; gap: 12px; max-width: 760px; padding: 24px; background: #fff4f7; border: 1px solid #ffd3e3; border-radius: var(--radius-sm); color: var(--ink-soft); line-height: 1.6; }
.rt-note .rt-flag { margin: 0; justify-self: start; }
.rt-note p { margin: 0; }
@media (max-width: 640px) {
  .rt-cat, .rt-who { display: none; }
  .rt-stats { gap: 8px; }
  .rt-stat { min-width: 0; flex: 1 1 calc(50% - 4px); padding: 12px 14px; }
  .rt-stat dd { font-size: 22px; }
  .rt-team-line { font-size: 15px; }
}

/* Плавные переходы между страницами рейтинга (cross-document View Transitions; Chrome/Edge 126+, Safari 18.2+).
   Шапка остаётся на месте, меняется только содержимое. В остальных браузерах — обычный переход. */
@view-transition { navigation: auto; }
.site-header { view-transition-name: site-header; }
::view-transition-old(root) { animation: rt-vt-out .18s ease both; }
::view-transition-new(root) { animation: rt-vt-in .26s ease both; }
@keyframes rt-vt-out { to { opacity: 0; } }
@keyframes rt-vt-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}
