:root { --divisions-sticky-offset: 84px; }
#season-rail, #special, #cupTable, .sp-tabs, .summer-edition, #panel {
  scroll-margin-top: var(--divisions-sticky-offset);
}
.divisions-page .ph-top { align-items: center; }
.divisions-page .ph-top h1 { text-wrap: balance; }
.divisions-page .ph-top p { max-width: 55ch; }
.divisions-page .ph-counters { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.divisions-page .ph-counter { min-width: 0; }
.divisions-page .ph-counter .l { letter-spacing: .09em; }
.divisions-page .ph-counter .v { font-variant-numeric: tabular-nums; }
.tour-nav .dtab, .rail .scard, .sp-tabs .sp-tab {
  appearance: none;
  font: inherit;
  text-align: left;
  margin: 0;
  color: inherit;
}
.tour-nav .dtab { border: 0; border-right: 1px solid rgba(255,255,255,.08); background: transparent; }
.tour-nav .dtab.special { text-decoration: none; }
.rail .scard { display: flex; flex-direction: column; }
.scard > * { width: 100%; }
.scard .scard-top { padding: 15px 13px 12px; min-height: 76px; }
.scard .sc-year { font-size: 20px; line-height: 1.12; }
.scard .sc-cal { margin-top: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scard .sc-cur, .scard .sc-archive { top: 14px; right: 9px; padding: 3px 6px; line-height: 1.3; }
.scard .scard-champ { min-height: 74px; padding: 12px 13px; gap: 9px; }
.scard-champ .emb { width: 39px; height: 39px; }
.scard-champ .cc-l { font-size: 9px; line-height: 1.15; letter-spacing: .09em; }
.scard-champ .cc-nm {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 16px;
  line-height: 1.15;
}
.scard-champ .cc-l svg { flex: 0 0 12px; }
.scard .sc-meta { padding-inline: 13px; min-height: 22px; align-items: center; }
.scard .trophy-wall { padding-inline: 13px; min-height: 42px; }
.scard .scard-foot { padding-inline: 13px; margin-top: auto; }
.scard .open { white-space: nowrap; }
.rail { scroll-padding-inline: 4px; padding: 8px 4px 18px; }
.rail-tools { display: flex; align-items: center; gap: 10px; }
.rail-tools button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--grey-200);
  border-radius: 8px;
  font: 700 19px/1 var(--f-display);
  cursor: pointer;
}
.rail-tools button:disabled { opacity: .42; cursor: default; }
.rail-tools button[hidden], .rail-tools .rh-hint[hidden] { display: none; }
.rail-head h2 .rh-sub { line-height: 1.4; letter-spacing: .025em; }
.divisions-page :is(a,button,[tabindex]):focus-visible { outline: 3px solid #b77719; outline-offset: 2px; }
.scard:focus-visible, .tour-nav .dtab:focus-visible, .sp-tab:focus-visible { outline-offset: -3px; }
.spanel .sp-hero-l { min-width: 0; }
.spanel .sp-champ-tx { min-width: 0; }
.sp-champ-tx h2 { overflow-wrap: anywhere; text-wrap: balance; }
.spanel .sp-hero.is-current .sp-hero-r { align-self: center; }
.sp-tabs .sp-tab { min-height: 46px; background: transparent; border: 0; color: #bcbcc7; font: 700 13px/1.15 var(--f-display); }
.sp-tabs .sp-tab.on { background: #fff; color: var(--ink); }
.sp-tabs .sp-tab svg { flex: 0 0 17px; }
.sp-actions > :is(a,button) { min-height: 44px; }
.sp-actions button { background: transparent; }
.sp-actions button.primary { background: var(--red); }
.stand-wrap, .po-scroll { overscroll-behavior-inline: contain; }
.stand-wrap { scrollbar-width: thin; }
.stand-wrap table.stand { margin-bottom: 4px; }
.stand-wrap table.stand td, .stand-wrap table.stand th { font-variant-numeric: tabular-nums; }
.stand-wrap .archive-team-list { min-width: 0; }
.archive-team-list td.tm, .archive-team-list th.l { padding-left: 10px; }
.sp-body .data-note { padding: 13px 16px; margin-bottom: 14px; border-radius: 0 8px 8px 0; line-height: 1.5; }
.archive-final {
  max-width: 760px;
  padding: clamp(18px, 3vw, 28px);
  margin-inline: auto;
  border: 1px solid var(--grey-200);
  border-top: 3px solid var(--dac);
  border-radius: 10px;
  background: #fafafa;
}
.archive-final h3 { font: 700 25px/1.15 var(--f-display); margin-bottom: 9px; }
.archive-final p { color: #444750; line-height: 1.55; }
.archive-score { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 10px; align-items: center; margin: 15px 0 4px; }
.archive-score span { font: 600 17px/1.2 var(--f-display); }
.archive-score span:first-child { text-align: right; }
.archive-score b { padding: 6px 11px; border-radius: 5px; background: #151620; color: #fff; font: 700 21px/1 var(--f-num); }
.archive-final small { display: block; text-align: center; color: #555; }
.archive-sources { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.archive-sources a { padding: 10px 13px; display: inline-flex; align-items: center; min-height: 44px; border: 1px solid #dadade; border-radius: 7px; color: #9b1128; font-weight: 750; text-decoration: none; }
.archive-sources a:hover { background: #fff0f3; }
#special .spec-head { margin-bottom: 18px; }
#specGrid .summer-history { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 0; padding: 12px; border: 0; background: transparent; }
#specGrid .summer-edition { border: 1px solid #343640; border-radius: 9px; overflow: hidden; }
#specGrid .mos-edition-name { padding-inline: 15px; }
#specGrid .mos-edition-actions { margin: 0; padding: 3px 15px 15px; }
#specGrid .mos-edition-actions :is(a,button) { border-radius: 5px; }
#specGrid .edition-year small, #specGrid .edition-footer { color: #a5a8b1; }
#specGrid .summer-shell { border-radius: 10px; }
#cupTable:not(:empty) { margin: 0 12px 12px; padding: clamp(13px,2vw,24px); }
#cupTable .data-note { margin-top: 10px; }

#specGrid .summer-edition { display: flex; flex-direction: column; min-width: 0; }
#specGrid .edition-footer { margin-top: auto; padding-top: 13px; }
#specGrid .mos-edition-actions :is(a,button) { min-height: 44px; }
#specGrid [data-cup][aria-pressed="true"] { outline: 2px solid #f0c970; outline-offset: 2px; }
#cupTable h3 { font: 700 clamp(20px, 3vw, 27px)/1.15 var(--f-display); }
@media (max-width: 980px) {
  .divisions-page .ph-counters { grid-template-columns: repeat(3,minmax(0,1fr)); }
  #specGrid .summer-history { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 780px) {
  :root { --divisions-sticky-offset: 132px; }
  .divisions-page .ph-top { align-items: start; }
  .divisions-page .ph-top .left h1 { font-size: clamp(30px, 8vw, 39px); }
  .divisions-page .ph-top .right { justify-content: flex-start; }
  .divisions-page .ph-counter { padding: 12px 9px; min-height: 67px; }
  .divisions-page .ph-counter .l { font-size: 9px; letter-spacing: .05em; line-height: 1.2; }
  .rail-sec .rail-head { align-items: center; gap: 9px; margin-bottom: 9px; }
  .rail-head .rh-l { gap: 10px; }
  .rail-head h2 { font-size: clamp(19px,5vw,26px); line-height: 1.09; }
  .rail-head .rh-sub { font-size: 11px; }
  .rail-tools { width: 100%; justify-content: flex-end; gap: 6px; }
  .rail-tools .rh-hint { margin-right: auto; font-size: 10px; }
  .rail-tools button { width: 44px; height: 44px; }
  .rail .scard { flex-basis: clamp(182px,58vw,224px); }
  .scard .sc-year { font-size: clamp(17px,4.85vw,20px); }
  .scard .scard-top { min-height: 68px; }
  .scard .sc-cur,.scard .sc-archive { top: 13px; right: 7px; font-size: 8px; letter-spacing: 0; }
  .spanel .sp-hero { padding: 19px 14px; }
  .spanel .sp-hero-l { gap: 11px; }
  .spanel .sp-champ-emb { width: 52px; height: 52px; }
  .spanel .sp-hero-r { padding-left: 0; }
  .spanel .sp-hero.is-current .sp-cup { display: none; }
  .sp-tabs .sp-tab { font-size: 11px; padding-inline: 12px; }
  .stand-wrap .archive-team-list tr { display: block; }
  .stand-wrap .archive-team-list td.tm { padding: 9px 11px; border-bottom: 0; }
  .stand-wrap:not(.team-list) table.stand td.tm { min-height: 54px; }
  .po-wrap .po-round { min-width: 248px; }
  .po-wrap .po-team .nm { white-space: normal; overflow: visible; line-height: 1.15; }
  .po-wrap .po-team .games { max-width: none; overflow: visible; }
  .archive-score span { font-size: 15px; }
}
@media (max-width: 490px) {
  #specGrid .summer-history { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .divisions-page .scard, .divisions-page .spanel, .divisions-page .ph-counter { animation: none; }
}
.divisions-page .visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.tour-nav .dt-nm,.tour-nav .dt-sub,.scard .sc-year,.scard .sc-cal { display: block; }
.scard .scard-top, .scard .cc-tx, .scard .emb { display: block; }
.scard .sc-meta { display: flex; }
.scard .cc-nm { color: var(--ink); }
.divisions-page .emb { display: block; }
.scard .scard-foot .open { margin-left: 10px; }
.po-wrap .match-score-link { display: grid; min-height: 28px; align-items: center; }
.tour-nav .dtab .dt-sub { color: #b3b3bd; }
@media (max-width: 780px) {
  .spanel .sp-hero.is-current .sp-hero-r { grid-template-columns: 1fr; }
  .sp-tabs .sp-tab { white-space: normal; }
  .stand-legend span { line-height: 1.25; }
}

/* Historical results and protocols */
.wayback-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 16px;
}
.wayback-heading h3 {
  margin: 0 0 5px;
  color: #181820;
  font: 700 clamp(21px, 3vw, 28px)/1.15 var(--f-display);
}
.wayback-heading p, .wayback-match-meta {
  margin: 0;
  color: #50505d;
  font-size: 14px;
  line-height: 1.5;
}
.wayback-source {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 44px;
  color: #94132a;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.wayback-source:hover { color: #551021; }
.data-note .wayback-source { display: flex; width: fit-content; }
.wayback-table-scroll { max-width: 100%; overflow: auto; border: 1px solid #e4e2e7; border-radius: 10px; }
.wayback-table table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.wayback-table table.wayback-wide { min-width: 530px; }
.wayback-table :is(th,td) { padding: 10px 12px; border-bottom: 1px solid #e8e7eb; }
.wayback-table thead { background: #17171f; color: #fff; }
.wayback-table tbody th { text-align: left; font-weight: 700; }
.wayback-table thead th:nth-child(2) { text-align: left; }
.wayback-table td:last-child { color: #94132a; font-weight: 800; }
.wayback-table tbody tr:nth-child(even) { background: #f8f7fa; }
.wayback-table tbody tr:last-child > * { border-bottom: 0; }

.wayback-tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.wayback-filter {
  min-height: 44px;
  max-width: 100%;
  padding: 6px 11px;
  border: 1px solid #c9c6cf;
  border-radius: 8px;
  background: #fff;
  color: #202029;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  font-family: inherit;
}
.wayback-count { color: #50505d; font-size: 13px; font-weight: 700; white-space: nowrap; }
.wayback-list { display: grid; gap: 8px; }
.wayback-match {
  min-width: 0;
  border: 1px solid #e4e2e7;
  border-radius: 10px;
  background: #fff;
}
.wayback-match[open] { border-color: #c2bac5; }
.wayback-match[hidden] { display: none; }
:is(.wayback-match,.wayback-podolsk,.wayback-subdetail) > summary {
  position: relative;
  display: block;
  min-height: 44px;
  list-style: none;
  cursor: pointer;
}
:is(.wayback-match,.wayback-podolsk,.wayback-subdetail) > summary::-webkit-details-marker { display: none; }
:is(.wayback-match,.wayback-podolsk,.wayback-subdetail) > summary::after {
  position: absolute;
  top: calc(50% - 5px);
  right: 16px;
  width: 8px;
  height: 8px;
  border: solid #746b78;
  border-width: 0 2px 2px 0;
  content: "";
  transform: rotate(45deg);
  transition: transform .16s ease;
}
:is(.wayback-match,.wayback-podolsk,.wayback-subdetail)[open] > summary::after { transform: rotate(225deg); }
.wayback-match > summary {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px 38px 12px 14px;
  border-radius: 9px;
}
.wayback-match > summary:hover, .wayback-subdetail > summary:hover { background: #f7f5f8; }
.wayback-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 7px;
  color: #50505d;
  font-size: 12px;
  font-weight: 700;
}
.wayback-badge {
  padding: 3px 6px;
  border-radius: 4px;
  background: #eeecf1;
  color: #494451;
  white-space: nowrap;
}
.wayback-badge.has-protocol { background: #fae5e9; color: #86122b; }
.wayback-teams {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: #181820;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
}
.wayback-teams span { overflow-wrap: anywhere; }
.wayback-teams span:first-child { text-align: right; }
.wayback-teams strong {
  min-width: 54px;
  padding: 6px 7px;
  border-radius: 5px;
  background: #201c25;
  color: #fff;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.wayback-match-body { padding: 12px 14px 4px; border-top: 1px solid #edeaf0; }
.wayback-match-info { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 16px; margin-bottom: 6px; }
.wayback-match-info .wayback-source { margin-left: auto; }
.wayback-periods, .wayback-events, .wayback-squads ul { padding: 0; margin: 0; list-style: none; }
.wayback-periods { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.wayback-periods li {
  display: flex;
  gap: 7px;
  padding: 6px 8px;
  border-radius: 5px;
  background: #f0edf2;
  color: #3c3743;
  font-size: 13px;
}
.wayback-subdetail { margin-bottom: 7px; border: 1px solid #e8e5eb; border-radius: 7px; }
.wayback-subdetail > summary {
  display: flex;
  align-items: center;
  padding: 9px 36px 9px 10px;
  color: #25212a;
  font-size: 14px;
  font-weight: 700;
}
.wayback-events li {
  display: grid;
  grid-template-columns: 34px minmax(0, 170px) minmax(0, 1fr);
  align-items: start;
  gap: 6px 9px;
  padding: 7px 10px;
  border-top: 1px solid #eeecf0;
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.wayback-minute { color: #94132a; font-weight: 800; }
.wayback-side, .wayback-event small { color: #565160; }
.wayback-event small { display: block; font-size: 12px; }
.wayback-squads { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 5px 10px 12px; }
.wayback-squads h5 { margin: 0 0 6px; color: #25212a; font-size: 14px; }
.wayback-squads li { padding: 3px 0; color: #3d3743; font-size: 13px; line-height: 1.3; overflow-wrap: anywhere; }
.wayback-podolsk {
  margin-top: 16px;
  border: 1px solid #e4e2e7;
  border-radius: 12px;
  background: #fff;
  color: #25212a;
  scroll-margin-top: 96px;
}
.wayback-podolsk > summary { padding: 16px 39px 16px 17px; }
.wayback-podolsk > summary strong { font: 700 19px/1.2 var(--f-display); }
.wayback-podolsk > summary small { display: block; margin-top: 4px; color: #565160; font-size: 13px; }
#podolskArchive { padding: 0 17px 17px; }
#podolskArchive .wayback-matches { margin-top: 24px; }
.wayback-playoff-note button {
  min-height: 44px;
  padding: 5px 8px;
  border: 0;
  background: transparent;
  color: #94132a;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}
:is(.wayback-source,.wayback-filter,.wayback-table-scroll,.wayback-playoff-note button,.wayback-match summary,.wayback-podolsk summary):focus-visible {
  outline: 2px solid #a81531;
  outline-offset: -2px;
}
@media (max-width: 700px) {
  .wayback-heading { flex-direction: column; gap: 6px; margin-bottom: 11px; }
  .wayback-match > summary { grid-template-columns: minmax(0, 1fr); gap: 7px; padding: 10px 33px 10px 10px; }
  .wayback-teams { gap: 7px; font-size: 14px; }
  .wayback-teams span:first-child { text-align: left; }
  .wayback-teams span:last-child { text-align: right; }
  .wayback-teams strong { min-width: 44px; }
  .wayback-table :is(th,td) { padding: 9px 6px; }
  .wayback-match-body { padding-inline: 9px; }
  .wayback-match-info .wayback-source { margin-left: 0; }
  .wayback-events li { grid-template-columns: 30px minmax(0, 1fr) minmax(0, 1.6fr); }
  .wayback-podolsk > summary { padding-left: 12px; }
  #podolskArchive { padding-inline: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  :is(.wayback-match,.wayback-podolsk,.wayback-subdetail) > summary::after { transition: none; }
}
@media (max-width: 600px) {
  .sp-tabs.with-match-archive .sp-tab {
    flex: 1 1 0;
    min-width: 0;
    justify-content: center;
    gap: 5px;
    padding-inline: 5px;
    text-align: center;
    white-space: normal;
    letter-spacing: .03em;
  }
  .sp-tabs.with-match-archive .sp-tab svg { display: none; }
}
