:root {
  color-scheme: light;
  --paper: #f6f5ed;
  --surface: #fffef9;
  --ink: #192421;
  --muted: #50605a;
  --line: #d8dfd5;
  --teal: #086456;
  --teal-dark: #17493d;
  --teal-light: #eaf2e7;
  --bar: #277b69;
  --bar-soft: #c0dace;
  --amber: #976013;
  --amber-fill: #b67925;
  --amber-light: #f9ebd2;
  --focus: #005f9e;
  --container: 1320px;
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  font-synthesis: none;
  line-height: 1.55;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); }
button, select, input { font: inherit; accent-color: var(--teal); }
button, select { color: inherit; }
button { cursor: pointer; }
a { color: var(--teal); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: .12em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
h1, h2, h3, p, ul, ol { margin-top: 0; }
h1, h2, h3 { line-height: 1.08; }
h2 { margin-bottom: 0; font-size: clamp(1.8rem, 3.3vw, 3rem); letter-spacing: -.045em; }
.page-width { max-width: var(--container); margin-inline: auto; padding-inline: clamp(1.05rem, 4.5vw, 4.8rem); }
.visually-hidden { 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: 10; left: 1rem; top: 1rem; padding: .55rem .9rem; background: var(--surface); transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }

.site-header { border-bottom: 1px solid var(--line); }
.site-header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 4.65rem; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .52rem; color: var(--ink); text-decoration: none; font-size: .84rem; font-weight: 800; letter-spacing: .15em; }
.brand-symbol { width: .92rem; height: .92rem; border: 2px solid var(--teal); border-radius: 50% 50% 10% 50%; transform: rotate(-45deg); }
.site-nav { display: flex; align-items: center; gap: clamp(.65rem, 2.3vw, 2.05rem); }
.site-nav a, .header-date { color: var(--muted); font-size: .82rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.site-nav a:hover { color: var(--ink); text-decoration: underline; }
.header-date { font-variant-numeric: tabular-nums; }

.intro { padding-block: clamp(2.35rem, 6.1vw, 6.1rem) clamp(1.85rem, 4.2vw, 3.9rem); }
.eyebrow { margin: 0 0 .85rem; color: var(--teal); font-size: .72rem; letter-spacing: .14em; font-weight: 750; text-transform: uppercase; }
.eyebrow span { display: inline-block; vertical-align: .12em; margin-right: .45rem; width: 1.18rem; height: 2px; background: var(--bar); }
h1 { margin: 0 0 1.3rem; max-width: 900px; font-family: "PT Serif", Georgia, "Times New Roman", serif; font-size: clamp(3rem, 7.05vw, 6.45rem); line-height: .97; letter-spacing: -.067em; font-weight: 500; }
.intro-description { max-width: 39rem; margin-bottom: 0; font-size: clamp(1.02rem, 1.6vw, 1.24rem); color: var(--muted); }

.insight { display: flex; align-items: flex-start; gap: clamp(.8rem, 2vw, 1.75rem); padding: clamp(1.1rem, 2.85vw, 2rem); background: var(--teal-dark); color: #f8f8ef; border-radius: 1.05rem; }
.insight-icon { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; flex: 0 0 auto; border-radius: 50%; background: #f0d8ac; color: #352603; font-size: 1.3rem; font-weight: 700; }
.insight-label { margin-bottom: .52rem; color: #c8e3d4; }
.insight h2 { margin-bottom: .6rem; font-size: clamp(1.28rem, 3vw, 1.9rem); letter-spacing: -.028em; }
.insight #insight-text { max-width: 66rem; margin: 0; color: #e3eee7; font-size: .98rem; }
.insight #insight-text:empty { display: none; }
.insight a { color: #f0d8ac; }

.section { padding-block-start: clamp(2.65rem, 6vw, 5.65rem); scroll-margin-top: 1rem; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.2rem; margin-bottom: 1.48rem; }
.section-heading .eyebrow { margin-bottom: .55rem; }
.controls { display: flex; flex-wrap: wrap; align-items: end; gap: .7rem 1rem; padding: .92rem 0; border-top: 1px solid var(--line); }
.field { display: grid; gap: .36rem; min-width: min(13rem, 100%); }
.field label { font-size: .79rem; color: var(--muted); font-weight: 680; }
.field select { width: 100%; min-height: 2.65rem; border: 1px solid #c4cec4; border-radius: .55rem; padding: .44rem 1.85rem .44rem .68rem; background: var(--surface); font-size: .89rem; }
.baseline-toggle { min-height: 2.65rem; display: inline-flex; align-items: center; gap: .45rem; color: var(--muted); font-size: .83rem; }
.baseline-toggle input { margin: 0; width: 1.07rem; height: 1.07rem; }
.metric-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .48rem; margin-bottom: 1rem; }
.metric-button { min-height: 2.62rem; border: 1px solid #cbd5ca; background: var(--surface); border-radius: 2rem; padding: .37rem .9rem; font-size: .84rem; font-weight: 700; }
.metric-button:hover { background: var(--teal-light); border-color: var(--bar); }
.metric-button[aria-pressed="true"], .metric-button[aria-selected="true"], .metric-button.is-active, .metric-button.active, .metric-button.is-selected { background: var(--teal-dark); color: #fffef8; border-color: var(--teal-dark); }

.ranking-layout { display: grid; grid-template-columns: minmax(0, 1.68fr) minmax(16rem, 1fr); gap: 1rem; align-items: start; }
.chart-panel, .details { overflow: hidden; border: 1px solid var(--line); border-radius: .95rem; }
.chart-panel { min-width: 0; background: var(--surface); padding: clamp(.86rem, 2.35vw, 1.66rem); }
.chart-header h3 { margin-bottom: .48rem; font-size: clamp(1.22rem, 2.35vw, 1.7rem); letter-spacing: -.035em; }
.chart-header p, .chart-legend { color: var(--muted); font-size: .84rem; }
.chart-header p { margin: 0 0 .75rem; max-width: 52rem; }
.chart-legend { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .85rem; margin-bottom: .56rem; font-size: .78rem; }
.chart-legend:empty { display: none; }
.chart-legend > * { display: inline-flex; align-items: center; gap: .35rem; }
.chart-legend .legend-swatch, .chart-legend .swatch { width: .66rem; height: .66rem; border-radius: 2px; background: var(--bar); }
.chart-legend .is-baseline, .chart-legend .baseline { --bar: var(--amber-fill); }
.chart-empty { padding: 1.45rem .75rem; color: var(--muted); font-size: .92rem; }
.rank-chart { display: grid; gap: .48rem; }
.rank-row { display: grid; grid-template-columns: 1.7rem minmax(7rem, 1.08fr) minmax(4rem, 1fr) 7.65rem; column-gap: .65rem; row-gap: .28rem; align-items: center; width: 100%; min-height: 3.28rem; padding: .59rem .68rem; margin: 0; border: 1px solid transparent; border-bottom-color: #e3e9e1; border-radius: .49rem; background: transparent; font-size: .89rem; text-align: left; }
.rank-row:hover { background: #f2f6f0; }
.rank-row.is-selected, .rank-row[aria-pressed="true"] { border-color: #8bb6a6; background: #e9f2eb; }
.rank-row.is-baseline, .rank-row.baseline { --bar: var(--amber-fill); --bar-soft: #eadac0; }
.rank-position { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .75rem; }
.rank-main { min-width: 0; display: grid; gap: .12rem; }
.rank-name { color: var(--ink); font-weight: 725; overflow-wrap: anywhere; }
.rank-track { display: block; position: relative; width: 100%; height: .5rem; border-radius: 50px; overflow: hidden; background: var(--bar-soft); }
.rank-bar { display: block; width: var(--bar-size, 0%); height: 100%; border-radius: inherit; background: var(--market-color, var(--bar)); }
.rank-row.is-ordinal { grid-template-columns: 1.8rem minmax(0, 1fr); }
.rank-row.is-ordinal .rank-track, .rank-row.is-ordinal .rank-value { display: none; }
.rank-row.is-ordinal .rank-position { display: grid; justify-self: center; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--amber-light); color: #724809; font-weight: 760; }
.rank-value { justify-self: end; text-align: right; color: var(--ink); font-weight: 780; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rank-context { overflow-wrap: anywhere; color: var(--muted); font-size: .73rem; font-weight: 500; line-height: 1.35; }

.details { background: #eff3ea; min-height: 8rem; }
.detail-panel { padding: clamp(.95rem, 2.25vw, 1.58rem); overflow-wrap: anywhere; }
.detail-panel:empty::before { display: block; color: var(--muted); content: "Выберите площадку в рейтинге, чтобы посмотреть её условия."; }
.detail-name { margin: .35rem 0 .6rem; font-weight: 770; font-size: clamp(1.28rem, 2.6vw, 1.96rem); letter-spacing: -.045em; }
.detail-panel p { font-size: .9rem; margin-bottom: .72rem; }
.detail-panel h3:not(.detail-name), .detail-panel h4 { margin: 1rem 0 .45rem; }
.detail-facts { display: grid; gap: 0; margin: .92rem 0; padding: 0; list-style: none; }
.detail-facts > div, .detail-facts > li { border-top: 1px solid #ccd8cc; padding: .48rem 0; }
.detail-facts dt, .detail-facts strong { font-size: .79rem; font-weight: 750; color: var(--teal-dark); }
.detail-facts dd { margin: .08rem 0 0; font-size: .87rem; line-height: 1.46; }
.detail-facts > li { font-size: .86rem; }
.detail-links { padding: 0; margin: .7rem 0 0; list-style: none; display: flex; flex-wrap: wrap; gap: .38rem .85rem; font-size: .81rem; }
.detail-links a { font-weight: 650; }
.status-pill { display: inline-flex; align-items: center; max-width: 100%; padding: .18rem .52rem; border-radius: 2rem; background: #dcece1; color: #1b5546; font-size: .72rem; font-weight: 720; line-height: 1.3; }
.status-pill.is-conditional, .status-pill.is-pending, .status-pill.conditional, .status-pill.pending { color: #724809; background: var(--amber-light); }
.status-pill.is-baseline, .status-pill.baseline { color: #61481f; background: #efe5d6; }
.status-pill.is-closed, .status-pill.unavailable { color: #642c29; background: #f1dfde; }

#comparison-table { min-width: 0; max-width: 100%; overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: .94rem; }
.comparison-wrap { width: 100%; overflow-x: auto; }
#comparison-table table { width: 100%; min-width: 850px; border: 0; border-collapse: collapse; text-align: left; font-size: .83rem; line-height: 1.44; }
#comparison-table caption { text-align: left; padding: .9rem 1rem; color: var(--muted); }
#comparison-table th, #comparison-table td { border-bottom: 1px solid #e0e6dd; padding: .77rem .78rem; vertical-align: top; }
#comparison-table thead th { color: #21493e; background: #eaf0e6; letter-spacing: .012em; font-weight: 770; }
#comparison-table tbody th { color: var(--ink); font-weight: 740; }
#comparison-table tbody tr:nth-child(even) { background: #f7f9f3; }
#comparison-table tbody tr:last-child > * { border-bottom: 0; }
#comparison-table button { color: var(--teal); border: 0; padding: 0; background: none; font-weight: 740; text-align: left; text-decoration: underline; text-underline-offset: .18em; }
#comparison-table p { margin: .45rem 0; }
.methodology-section { padding-bottom: clamp(2rem, 5vw, 4rem); }
.methodology-notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem 1.8rem; padding: .85rem 0; border-top: 1px solid var(--line); }
.methodology-notes p { margin: 0; color: var(--muted); font-size: .88rem; }
.sources-list { color: var(--muted); font-size: .86rem; overflow-wrap: anywhere; }
.sources-list > details, .sources-list > section { border-top: 1px solid var(--line); padding: .7rem 0; }
.sources-list summary { color: var(--ink); font-weight: 700; cursor: pointer; }
.sources-list li { margin: .32rem 0; }
.sources-list a { font-weight: 650; }
.site-footer { border-top: 1px solid var(--line); }
.site-footer-inner { display: flex; align-items: center; justify-content: space-between; min-height: 4.2rem; color: var(--muted); font-size: .77rem; }
.site-footer-inner span { letter-spacing: .13em; font-weight: 760; }
.site-footer-inner a { color: var(--muted); text-decoration: none; }

@media (max-width: 900px) {
  .ranking-layout { grid-template-columns: minmax(0, 1fr); }
  .detail-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.1rem; }
}
@media (max-width: 620px) {
  .site-header-inner { min-height: 0; padding-block: .78rem .64rem; flex-wrap: wrap; }
  .site-nav { order: 3; width: 100%; border-top: 1px solid var(--line); padding-top: .55rem; }
  .header-date { font-size: .74rem; }
  .desktop-break { display: none; }
  .field { flex: 1 1 calc(50% - .5rem); min-width: min(9rem, 100%); }
  .baseline-toggle { min-height: 2rem; }
  .controls { row-gap: .58rem; }
  .rank-row { grid-template-columns: 1.35rem minmax(4.5rem, 1.1fr) minmax(2.05rem, 1fr) 5.35rem; column-gap: .4rem; padding-inline: .39rem; }
  .rank-name, .rank-value { font-size: .84rem; }
  .methodology-notes { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 360px) {
  .rank-row { grid-template-columns: 1.15rem minmax(3.5rem, 1.1fr) minmax(1.6rem, .85fr) 4.65rem; column-gap: .34rem; }
  .rank-value { font-size: .77rem; }
  .detail-facts { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}


.field select:disabled { color: var(--muted); opacity: .8; }
.detail-route { color: var(--muted); }
.detail-current { padding: .58rem .7rem; border-left: 3px solid #73a894; background: #e2ecdf; font-weight: 675; color: var(--teal-dark); }
#comparison-table .is-selected { background: #e9f2eb; }
#comparison-table .missing-value { color: var(--muted); }
#comparison-table > p { padding: 0 1rem; }
.source-links { padding-left: 1.3rem; margin: .5rem 0 .3rem; }

.country-panel { max-width: none; }
.country-description { margin: 0 0 .8rem; color: var(--muted); font-size: .87rem; }
.country-chart { display: grid; gap: .38rem; }
.country-row { display: grid; align-items: center; grid-template-columns: minmax(6.7rem, .31fr) minmax(0, 1.66fr) minmax(7.3rem, .36fr); gap: 1rem; min-height: 3rem; padding-block: .45rem; border-bottom: 1px solid #e5eae2; }
.country-row:last-of-type { border-bottom: 0; }
.country-name { font-size: .91rem; font-weight: 730; overflow-wrap: anywhere; }
.country-track { display: flex; width: 100%; height: .68rem; overflow: hidden; border-radius: 2rem; background: var(--bar-soft); }
.country-bar { display: block; flex: 0 0 var(--segment-width, 0%); height: 100%; background: var(--segment-color, var(--bar)); }
.country-value { justify-self: end; text-align: right; font-size: .86rem; font-variant-numeric: tabular-nums; font-weight: 720; }
.country-legend { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .95rem; color: var(--muted); font-size: .8rem; margin: .45rem 0; }
.country-key { display: inline-flex; align-items: center; gap: .35rem; }
.country-swatch { flex: 0 0 auto; width: .66rem; height: .66rem; border-radius: 2px; background: var(--segment-color, var(--bar)); }
@media (max-width: 620px) {
  .country-row { grid-template-columns: minmax(5.2rem, .62fr) minmax(1.5rem, 1fr) minmax(4.75rem, .55fr); gap: .42rem; }
  .country-name, .country-value { font-size: .79rem; }
}

@media (min-width: 901px) {
  .intro { padding-block: clamp(2.5rem, 4.2vw, 4.25rem) clamp(1.75rem, 3.15vw, 2.8rem); }
  h1 { font-size: clamp(3.45rem, 6.5vw, 5.45rem); }
  .ranking-section { padding-top: clamp(2.65rem, 4.2vw, 3.75rem); }
}
