/* ==========================================================================
   Как учат — стили
   Идея: тетрадь в клетку + красная ручка учителя + цвет каждой страны
   ========================================================================== */

:root {
  --paper: #F3F0E9;
  --paper-2: #E9E5DA;
  --paper-3: #DEDAD0;
  --ink: #141414;
  --ink-2: #57534C;
  --ink-3: #8C877D;
  --line: rgba(20, 20, 20, .14);
  --grid: rgba(40, 70, 140, .07);
  --red: #E0362C;

  --c: var(--ink);      /* цвет страны, переопределяется на уровне элемента */
  --ci: #fff;           /* текст поверх цвета страны */

  --display: 'Unbounded', 'Arial Black', sans-serif;
  --text: 'Onest', 'Helvetica Neue', Arial, sans-serif;
  --hand: 'Caveat', 'Comic Sans MS', cursive;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1440px;
  --radius: 4px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 70px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 18px/1.55 var(--text);
  font-feature-settings: 'kern', 'liga';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
h1, h2, h3, .vb__name, .vb__hook { overflow-wrap: break-word; }
@media (max-width: 760px) { .chapter h2, .vb__hook { -webkit-hyphens: auto; hyphens: auto; } }
a { color: inherit; }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Тетрадная клетка */
.notebook {
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: -1px -1px;
}

/* Рукописная пометка красной ручкой */
.hand {
  font-family: var(--hand);
  font-weight: 600;
  color: var(--red);
  font-size: 1.45em;
  line-height: 1;
  letter-spacing: 0;
}

.kicker {
  font: 600 13px/1.2 var(--text);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* ---------- Шапка ---------- */
.top {
  position: relative; z-index: 50;
  background: rgba(243, 240, 233, .9);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.top__in { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.logo {
  font: 800 20px/1 var(--display);
  letter-spacing: -.03em;
  text-decoration: none;
  position: relative;
  white-space: nowrap;
}
.logo svg { position: absolute; left: -4px; right: -6px; bottom: -9px; width: calc(100% + 10px); height: 10px; }
.logo svg path { stroke: var(--red); stroke-width: 2.5; fill: none; stroke-linecap: round; stroke-dasharray: 160; stroke-dashoffset: 0; transition: stroke-dashoffset .6s var(--ease); }
.logo:hover svg path { animation: draw .7s var(--ease); }
@keyframes draw { from { stroke-dashoffset: 160; } to { stroke-dashoffset: 0; } }

.nav { display: flex; gap: 4px; align-items: center; }
.nav a {
  font: 500 15px/1 var(--text);
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 99px;
  transition: background .2s, color .2s;
}
.nav a:hover { background: var(--paper-2); }
.nav a[aria-current="page"] { background: var(--ink); color: var(--paper); }

.progress { position: fixed; left: 0; top: 0; z-index: 60; height: 3px; width: 100%; background: var(--c); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- Кнопки, чипы ---------- */
.chip {
  appearance: none; border: 1.5px solid var(--ink); background: transparent; color: var(--ink);
  font: 500 15px/1 var(--text); padding: 10px 16px; border-radius: 99px; cursor: pointer;
  transition: background .2s, color .2s, transform .15s;
}
.chip:hover { background: var(--paper-2); }
.chip:active { transform: scale(.97); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.btn {
  display: inline-flex; align-items: center; gap: 12px;
  font: 600 16px/1 var(--text); text-decoration: none;
  padding: 18px 26px; border-radius: 99px;
  background: var(--ink); color: var(--paper);
  transition: transform .2s var(--ease), background .2s;
}
.btn:hover { transform: translateY(-2px); background: var(--red); }
.btn .arr { transition: transform .25s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }

/* ==========================================================================
   Главная
   ========================================================================== */
.hero { position: relative; padding: clamp(40px, 7vw, 96px) 0 clamp(48px, 7vw, 88px); border-bottom: 1px solid var(--line); overflow: hidden; }
.hero::before { /* поля тетради */
  content: ''; position: absolute; top: 0; bottom: 0; left: clamp(24px, 6vw, 88px);
  width: 1.5px; background: rgba(224, 54, 44, .45);
}
.hero__title {
  font: 800 clamp(64px, 15vw, 236px)/.86 var(--display);
  letter-spacing: -.055em;
  margin: 0;
}
.hero__title .rot {
  display: block;
  color: var(--ct, var(--c));
  transition: color .4s;
  font-size: .5em;
  letter-spacing: -.045em;
  margin-top: .12em;
  min-height: 1.1em;
}
.rot a { text-decoration: none; color: inherit; display: inline-block; }
.rot a .w { display: inline-block; }
.rot.is-out a .w { animation: rotOut .32s var(--ease) forwards; }
.rot.is-in a .w { animation: rotIn .42s var(--ease); }
@keyframes rotOut { to { transform: translateY(-.35em); opacity: 0; filter: blur(4px); } }
@keyframes rotIn { from { transform: translateY(.35em); opacity: 0; filter: blur(4px); } }

.hero__grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; margin-top: clamp(32px, 5vw, 64px); align-items: end; }
.hero__lead { grid-column: 1 / span 6; font-size: clamp(19px, 1.7vw, 24px); line-height: 1.45; margin: 0; max-width: 34em; }
.hero__note { grid-column: 8 / span 5; display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.hero__note .hand { transform: rotate(-3deg); font-size: 30px; }
.hero__stats { display: flex; gap: 32px; flex-wrap: wrap; }
.hero__stats b { display: block; font: 800 44px/1 var(--display); letter-spacing: -.04em; }
.hero__stats span { font-size: 14px; color: var(--ink-2); }

/* Секция с заголовком */
.sec { padding: clamp(56px, 8vw, 120px) 0; border-bottom: 1px solid var(--line); }
.sec__head { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; margin-bottom: clamp(32px, 4vw, 56px); align-items: end; }
.sec__title { grid-column: 1 / span 7; font: 800 clamp(36px, 5.4vw, 80px)/.95 var(--display); letter-spacing: -.045em; margin: 0; }
.sec__aside { grid-column: 9 / span 4; margin: 0; color: var(--ink-2); font-size: 17px; }

.filters { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; margin-bottom: 28px; }
.sorter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip sup { font-size: 11px; font-weight: 600; opacity: .55; margin-left: 2px; vertical-align: 4px; }
.sorter__label { font-size: 14px; color: var(--ink-2); margin-right: 6px; }

/* ---------- Карточки стран: открытки с флагом-маркой ---------- */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.vb {
  position: relative; display: flex; flex-direction: column; min-height: 540px;
  background: var(--c); color: var(--ci); border-radius: var(--radius); overflow: hidden;
  text-decoration: none; isolation: isolate;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.vb:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -24px rgba(0, 0, 0, .55); }
.vb__photo { position: relative; height: 250px; flex: none; background: var(--c); }
.vb__photo > img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.1); mix-blend-mode: var(--blend, multiply); transition: filter .5s; }
.vb:hover .vb__photo > img { filter: grayscale(.25) contrast(1.05); }
.vb__photo::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 40%; background: linear-gradient(transparent, var(--c)); opacity: .55; }
.vb__idx { position: absolute; top: 16px; right: 18px; font: 700 13px/1 var(--display); color: #fff; mix-blend-mode: difference; }
.vb__stamp {
  display: block; overflow: hidden;
  position: absolute; left: 20px; bottom: -34px; z-index: 2;
  width: 92px; aspect-ratio: 4 / 3; padding: 5px; background: #fff;
  box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .45);
  transform: rotate(-6deg); transition: transform .35s var(--ease);
}

.vb:hover .vb__stamp { transform: rotate(0deg) scale(1.06); }
.vb__body { display: flex; flex-direction: column; padding: 50px 22px 24px; flex: 1; }
.vb__pre { font-size: 14px; opacity: .8; }
.vb__name { font: 800 clamp(26px, 2.4vw, 34px)/1 var(--display); letter-spacing: -.045em; margin: 4px 0 12px; }
.vb__hook { font-size: 15.5px; line-height: 1.4; opacity: .92; }
.vb__num { margin-top: auto; padding-top: 18px; display: flex; align-items: flex-end; gap: 12px; border-top: 1px solid currentColor; border-color: color-mix(in srgb, currentColor 25%, transparent); }
.vb__num b { font: 800 calc(56px * max(var(--k, 1), .6))/.9 var(--display); letter-spacing: -.05em; white-space: nowrap; }
.vb__num small { font-size: 13px; line-height: 1.3; opacity: .85; padding-bottom: 4px; }

.vb__stamp img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Удивительные цифры ---------- */
.wow { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1.5px solid var(--ink); }
.wow__item { padding: 28px 24px 32px 0; border-right: 1px solid var(--line); text-decoration: none; display: flex; flex-direction: column; gap: 14px; }
.wow__item + .wow__item { padding-left: 24px; }
.wow__item:last-child { border-right: 0; }
.wow__num { font: 800 calc(clamp(52px, 5.5vw, 88px) * max(var(--k, 1), .62))/.95 var(--display); letter-spacing: -.055em; color: var(--ct, var(--c)); }
.wow__text { font-size: 16px; line-height: 1.45; margin: 0; }
.wow__where { margin-top: auto; font-size: 14px; font-weight: 600; display: inline-flex; gap: 8px; align-items: center; }
.wow__where::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.wow__item:hover .wow__where { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Сравнения ---------- */
.compare { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px 48px; }
.compare__block { grid-column: span 6; }
.compare__title { font: 700 clamp(22px, 2vw, 28px)/1.15 var(--display); letter-spacing: -.03em; margin: 0 0 8px; }
.compare__sub { margin: 0 0 28px; color: var(--ink-2); font-size: 15px; }

.ages { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: end; gap: 8px; border-bottom: 2px solid var(--ink); min-height: 260px; padding-bottom: 12px; position: relative; }
.ages__col { display: flex; flex-direction: column-reverse; gap: 6px; align-items: stretch; }
.ages__chip { display: block; padding: 7px 10px; border-radius: 3px; background: var(--bar, var(--ink)); color: #fff; font-size: 13px; font-weight: 600; line-height: 1.2; text-decoration: none; transition: transform .2s var(--ease); }
.ages__chip:hover { transform: translateX(3px); }
.ages__axis { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; margin-top: 10px; }
.ages__axis span { font: 800 28px/1 var(--display); letter-spacing: -.04em; }
.ages__axis small { font: 400 13px/1 var(--text); color: var(--ink-2); margin-left: 4px; letter-spacing: 0; }

/* Горизонтальные столбцы — общий компонент для главной и рейтингов */
.bars { list-style: none; margin: 0; padding: 0; }
.bars li { display: grid; grid-template-columns: 2.2em minmax(110px, 13em) 1fr 5.6em; gap: 12px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.bars .rk { font: 700 14px/1 var(--display); color: var(--ink-3); }
.bars .nm { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bars .nm a { text-decoration: none; border-bottom: 1.5px solid var(--c); }
.bars .nm a:hover { color: var(--ct, var(--c)); }
.bars .tr { height: 14px; position: relative; }
.bars .fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--paper-3); border-radius: 0 2px 2px 0; transform-origin: 0 50%; transition: width .6s var(--ease); }
.bars li.site .fill { background: var(--bar, var(--c)); }
.bars .vl { font: 700 16px/1 var(--display); text-align: right; letter-spacing: -.02em; }
.bars li.site .rk { color: var(--ink); }
.bars .vl { white-space: nowrap; }
.bars .dl { display: inline-block; min-width: 2.4em; margin-left: 6px; font: 600 12px/1 var(--text); letter-spacing: 0; text-align: left; }
.bars .vl sup { color: var(--ink-3); font-size: 11px; margin-left: 1px; }
.dl.neg, .delta b.neg { color: var(--red); }
.dl.pos, .delta b.pos { color: #1E8A4C; }
.legend-d { margin-left: 18px; color: var(--ink-3); }
.delta { list-style: none; margin: 0; padding: 0; max-width: 900px; }
.delta li { display: grid; grid-template-columns: minmax(120px, 13em) 1fr 3.5em; gap: 16px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.delta a { text-decoration: none; font-weight: 500; border-bottom: 1.5px solid var(--c); justify-self: start; }
.delta__tr { position: relative; height: 16px; }
.delta__tr::before { content: ''; position: absolute; left: 50%; top: -6px; bottom: -6px; border-left: 1.5px solid var(--ink); }
.delta__bar { position: absolute; top: 0; bottom: 0; }
.delta__bar.neg { right: 50%; background: var(--red); border-radius: 2px 0 0 2px; }
.delta__bar.pos { left: 50%; background: var(--c); border-radius: 0 2px 2px 0; }
.delta b { font: 700 17px/1 var(--display); text-align: right; }
.bars .avg { position: absolute; top: -6px; bottom: -6px; width: 0; border-left: 1.5px dashed var(--red); }

/* ---------- Тизер рейтингов ---------- */
.teaser { background: var(--ink); color: var(--paper); border-radius: var(--radius); padding: clamp(28px, 5vw, 72px); display: grid; grid-template-columns: repeat(12, 1fr); gap: 32px; position: relative; overflow: hidden; }
.teaser__text { grid-column: 1 / span 5; display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }
.teaser__title { font: 800 clamp(36px, 4.6vw, 72px)/.95 var(--display); letter-spacing: -.045em; margin: 0; }
.teaser__text p { margin: 0; color: rgba(243,240,233,.75); }
.teaser .btn { background: var(--paper); color: var(--ink); }
.teaser .btn:hover { background: var(--red); color: #fff; }
.podium { grid-column: 7 / span 6; display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 12px; }
.podium__p { text-decoration: none; display: flex; flex-direction: column; justify-content: flex-end; }
.podium__bar { background: var(--c); color: var(--ci); border-radius: 3px 3px 0 0; padding: 16px; display: flex; flex-direction: column; justify-content: space-between; transition: transform .3s var(--ease); }
.podium__p:hover .podium__bar { transform: translateY(-6px); }
.podium__pl { font: 800 clamp(48px, 5vw, 80px)/.85 var(--display); letter-spacing: -.06em; }
.podium__nm { font-weight: 600; font-size: 16px; margin-bottom: 4px; }
.podium__sc { font-size: 14px; opacity: .85; }
.podium__p:nth-child(1) .podium__bar { height: 230px; }
.podium__p:nth-child(2) .podium__bar { height: 300px; }
.podium__p:nth-child(3) .podium__bar { height: 180px; }

/* ---------- О проекте ---------- */
.about { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; }
.about__title { grid-column: 1 / span 4; font: 800 clamp(32px, 3.6vw, 52px)/1 var(--display); letter-spacing: -.045em; margin: 0; }
.about__text { grid-column: 6 / span 6; font-size: 19px; }
.about__text p { margin: 0 0 1em; }

/* ---------- Подвал ---------- */
.foot { padding: clamp(56px, 7vw, 96px) 0 40px; background: var(--ink); color: var(--paper); }
.foot__big { font: 800 clamp(72px, 17vw, 260px)/.8 var(--display); letter-spacing: -.06em; margin: 0 0 48px; color: var(--paper); }
.foot__big span { color: var(--red); }
.foot__grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; font-size: 15px; color: rgba(243,240,233,.7); }
.foot__about { grid-column: 1 / span 5; }
.foot__grid p { margin: 0 0 12px; }
.foot__author { font-size: 17px; color: var(--paper); }
.foot__author a, .about__author a { color: inherit; text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 4px; transition: color .2s; }
.foot__author a:hover { color: var(--red); }
.about__author { font-weight: 600; }
.about__author a:hover { color: var(--red); }
.foot__links { grid-column: 7 / span 6; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot__links a { text-decoration: none; color: var(--paper); }
.foot__links a:hover { color: var(--red); }

/* ==========================================================================
   Страница страны
   ========================================================================== */
.c-hero { padding: clamp(36px, 6vw, 80px) 0 0; }
.c-hero__meta { display: flex; align-items: center; gap: 14px; margin-bottom: clamp(20px, 3vw, 36px); flex-wrap: wrap; }
.c-hero__meta a { text-decoration: none; color: var(--ink-2); }
.c-hero__meta a:hover { color: var(--ink); }
.c-hero__dot { width: 14px; height: 14px; border-radius: 50%; background: var(--c); }
.c-title { --tl: 11; font: 800 clamp(30px, min(9.4vw, calc((100vw - 2 * var(--gutter)) / (var(--tl) * .8))), 152px)/.9 var(--display); letter-spacing: -.055em; margin: 0; }
.is-light .c-title em { color: var(--ink); }
.is-light .c-title em span { background: linear-gradient(transparent 58%, var(--c) 58%, var(--c) 92%, transparent 92%); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.c-title em { font-style: normal; color: var(--ct, var(--c)); display: block; }
.c-hero__media { position: relative; margin-top: clamp(32px, 5vw, 64px); height: clamp(280px, 52vw, 680px); background: var(--c); overflow: hidden; border-radius: var(--radius); }
.c-hero__media img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.12); mix-blend-mode: var(--blend, multiply); }
.c-hero__media.is-empty { background-image: repeating-linear-gradient(-45deg, transparent 0 22px, rgba(255,255,255,.12) 22px 24px); }
.cap { font-size: 14px; color: var(--ink-2); margin-top: 10px; display: flex; gap: 10px; justify-content: space-between; flex-wrap: wrap; }
.cap small { color: var(--ink-3); font-size: 12px; }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1.5px solid var(--ink); margin-top: clamp(32px, 5vw, 56px); }
.fact { padding: 22px 20px 26px 0; border-right: 1px solid var(--line); }
.fact + .fact { padding-left: 20px; }
.fact:last-child { border-right: 0; }
.fact b { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; font: 800 calc(clamp(44px, 5vw, 76px) * max(var(--k, 1), .6))/.95 var(--display); letter-spacing: -.055em; }
.fact b small { font-size: .38em; letter-spacing: -.02em; }
.fact span { display: block; margin-top: 10px; font-size: 15px; line-height: 1.35; color: var(--ink-2); max-width: 15em; }

.intro { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; padding: clamp(48px, 7vw, 104px) 0; border-bottom: 1px solid var(--line); }
.intro__lead { grid-column: 1 / span 7; font-size: clamp(21px, 1.9vw, 27px); line-height: 1.42; letter-spacing: -.005em; }
.intro__lead p { margin: 0 0 .8em; }
.intro__lead p:first-child::first-letter { font: 800 3.3em/.8 var(--display); float: left; margin: .06em .1em 0 0; color: var(--ct, var(--c)); }
.thesis { grid-column: 9 / span 4; list-style: none; padding: 0; margin: 0; counter-reset: th; }
.thesis li { counter-increment: th; padding: 18px 0 20px; border-top: 1.5px solid var(--ink); }
.thesis li::before { content: '0' counter(th); font: 700 13px/1 var(--display); color: var(--ct, var(--c)); display: block; margin-bottom: 10px; }
.thesis b { display: block; font: 700 20px/1.2 var(--display); letter-spacing: -.025em; margin-bottom: 6px; }
.thesis p { margin: 0; font-size: 16px; color: var(--ink-2); }

/* ---------- Схема системы ---------- */
.scheme-sec { padding: clamp(56px, 8vw, 112px) 0; border-bottom: 1px solid var(--line); }
.scheme {
  --cols: 20;
  display: grid;
  grid-template-columns: 150px repeat(var(--cols), minmax(0, 1fr));
  grid-auto-rows: minmax(76px, auto);
  row-gap: 10px;
  position: relative;
  padding-top: 8px;
}
.scheme__ruler { grid-row: 1; grid-column: 2 / -1; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); height: 46px; align-self: end; border-bottom: 2px solid var(--ink); background: #F7E9A8; border-radius: 3px 3px 0 0; }
.scheme__tick { position: relative; border-left: 1px solid rgba(20,20,20,.5); font: 600 12px/1 var(--text); padding: 6px 0 0 4px; }
.scheme__tick::after { content: ''; position: absolute; left: 50%; bottom: 0; height: 8px; border-left: 1px solid rgba(20,20,20,.4); }
.scheme__tick:first-child { border-left: 0; }
.scheme__axis { grid-row: 1; grid-column: 1; align-self: end; font-size: 13px; color: var(--ink-2); padding-bottom: 14px; }
.scheme__track { grid-column: 1; grid-row: var(--gr); display: flex; align-items: center; font: 600 14px/1.25 var(--text); color: var(--ink-2); padding-right: 16px; border-top: 1px dashed var(--line); }
.stage {
  grid-column: var(--gc); grid-row: var(--gr);
  position: relative; margin: 6px 2px; padding: 10px 12px;
  border-radius: 3px; min-width: 0;
  display: flex; flex-direction: column; justify-content: center;
  transition: transform .25s var(--ease), box-shadow .25s;
}
.stage:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -14px rgba(0,0,0,.6); z-index: 2; }
.stage b { font: 700 15px/1.15 var(--display); letter-spacing: -.02em; }
.stage span { font-size: 12.5px; line-height: 1.25; opacity: .85; margin-top: 3px; }
.stage em { font-style: normal; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; opacity: .75; margin-top: 4px; }
.stage b, .stage span, .stage em { overflow-wrap: anywhere; -webkit-hyphens: auto; hyphens: auto; }
.k-pre { background: var(--paper); border: 1.5px dashed var(--ink); color: var(--ink); }
.k-pre.req { border-style: solid; }
.k-school { background: var(--c); color: var(--ci); }
.k-upper { background: var(--ink); color: var(--paper); }
.k-voc { color: var(--ink); border: 1.5px solid var(--ink); background: repeating-linear-gradient(-45deg, var(--paper) 0 7px, var(--paper-3) 7px 9px); }
.k-uni { background: #fff; color: var(--ink); border: 2px solid var(--ink); }
.exam {
  grid-row: var(--gr); grid-column: var(--gc);
  position: relative; justify-self: start; align-self: start; z-index: 3;
  width: 0; height: 100%; pointer-events: none;
}
.exam b { position: absolute; top: -12px; left: -12px; width: 24px; height: 24px; display: grid; place-items: center; font: 700 12px/1 var(--display); color: #fff; z-index: 1; }
.exam::before { content: ''; position: absolute; top: -9px; left: -9px; width: 18px; height: 18px; background: var(--red); transform: rotate(45deg); border: 2px solid var(--paper); }
.exam::after { content: ''; position: absolute; top: 8px; bottom: 6px; left: -1px; border-left: 2px dashed var(--red); }
.exams { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 28px; }
.exams li { display: flex; align-items: baseline; gap: 10px; font-family: var(--hand); font-weight: 600; font-size: 24px; color: var(--red); line-height: 1.1; }
.exams b { flex: none; width: 22px; height: 22px; display: inline-grid; place-items: center; background: var(--red); color: #fff; font: 700 11px/1 var(--display); border-radius: 3px; transform: translateY(-2px); }
.exams small { font: 400 14px/1 var(--text); color: var(--ink-2); }
.stage.narrow { padding: 8px 4px; align-items: center; }
.stage.narrow b { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 12px; white-space: nowrap; }
.stage.narrow span, .stage.narrow em { display: none; }
.exam.at-end { justify-self: end; }
.legend { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 36px; font-size: 14px; color: var(--ink-2); }
.legend i { display: inline-block; width: 22px; height: 14px; border-radius: 2px; vertical-align: -2px; margin-right: 8px; }
.legend .ex { width: 11px; height: 11px; background: var(--red); transform: rotate(45deg); margin: 0 10px 0 4px; }
.scheme-note { margin: 22px 0 0; max-width: 46em; font-size: 16px; }

/* ---------- Лонгрид ---------- */
.read { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; padding: clamp(56px, 8vw, 112px) 0; }
.toc { grid-column: 1 / span 3; align-self: start; }
.toc ol { list-style: none; margin: 16px 0 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: grid; grid-template-columns: 28px 1fr; gap: 4px; padding: 8px 0; font-size: 14.5px; line-height: 1.3; color: var(--ink-3); text-decoration: none; border-top: 1px solid var(--line); transition: color .2s; }
.toc a::before { content: counter(toc, decimal-leading-zero); font: 700 11px/1.6 var(--display); }
.toc a:hover { color: var(--ink); }
.toc a.is-active { color: var(--ink); }
.toc a.is-active::before { color: var(--ct, var(--c)); }
.article { grid-column: 5 / span 7; }
.chapter { margin-bottom: clamp(48px, 5vw, 72px); }
.chapter h2 { font: 800 clamp(25px, 3vw, 44px)/1.04 var(--display); letter-spacing: -.04em; margin: 0 0 22px; }
.chapter h2 small { display: block; font: 700 13px/1 var(--display); color: var(--ct, var(--c)); letter-spacing: 0; margin-bottom: 14px; }
.chapter p { margin: 0 0 1em; max-width: 36em; }
.chapter p b, .chapter p strong { font-weight: 600; }
.fig { margin: 36px 0 8px; }
.fig__img { background: var(--c); border-radius: var(--radius); overflow: hidden; aspect-ratio: 3 / 2; }
.fig__img img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.1); mix-blend-mode: var(--blend, multiply); transition: filter .6s, mix-blend-mode .6s; }
.fig:hover .fig__img img { filter: grayscale(0) contrast(1); mix-blend-mode: normal; }
.fig.wide { margin-left: calc(-1 * (100% / 7 * 2 + 24px)); }

.big {
  background: var(--c); color: var(--ci); padding: clamp(32px, 5vw, 64px); border-radius: var(--radius);
  display: grid; grid-template-columns: auto 1fr; gap: 16px 48px; align-items: end; margin: 0 0 clamp(48px, 5vw, 72px);
}
.big b { font: 800 calc(clamp(80px, 12vw, 190px) * var(--k, 1))/.85 var(--display); letter-spacing: -.065em; }
.big p { margin: 0; font: 600 clamp(19px, 1.7vw, 24px)/1.35 var(--text); max-width: 20em; }

/* ---------- Один день ---------- */
.day-sec { padding: clamp(56px, 8vw, 112px) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.day { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; }
.day__head { grid-column: 1 / span 4; }
.day__head h2 { font: 800 clamp(34px, 4vw, 60px)/.95 var(--display); letter-spacing: -.045em; margin: 0 0 18px; }
.day__head .hand { display: inline-block; transform: rotate(-2deg); font-size: 28px; }
.day__list { grid-column: 6 / span 7; list-style: none; margin: 0; padding: 0; position: relative; }
.day__list::before { content: ''; position: absolute; left: 132px; top: 10px; bottom: 10px; border-left: 2px solid var(--ink); }
.day__list li { display: grid; grid-template-columns: 120px 1fr; gap: 36px; padding: 12px 0; position: relative; }
.day__list li::before { content: ''; position: absolute; left: 126px; top: 21px; width: 14px; height: 14px; border-radius: 50%; background: var(--paper); border: 2.5px solid var(--c); }
.day__list li:hover::before { background: var(--c); }
.day__time { font: 700 18px/1.5 var(--display); letter-spacing: -.02em; text-align: right; }
.day__text { margin: 0; background: rgba(243,240,233,.85); }

/* ---------- Плюсы и минусы ---------- */
.pc { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 64px); padding: clamp(56px, 8vw, 112px) 0; border-bottom: 1px solid var(--line); }
.pc h2 { font: 800 clamp(32px, 3.6vw, 52px)/1 var(--display); letter-spacing: -.045em; margin: 0 0 24px; display: flex; align-items: center; gap: 16px; }
.pc h2 i { font-style: normal; width: 52px; height: 52px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 30px; }
.pc__pros h2 i { background: var(--c); color: var(--ci); }
.pc__cons h2 i { background: var(--red); color: #fff; }
.pc ul { list-style: none; margin: 0; padding: 0; }
.pc li { padding: 18px 0 20px; border-top: 1.5px solid var(--ink); }
.pc li b { display: block; font: 700 19px/1.2 var(--display); letter-spacing: -.02em; margin-bottom: 6px; }
.pc li p { margin: 0; color: var(--ink-2); font-size: 16.5px; }

/* ---------- Что забрать себе ---------- */
.take { padding: clamp(56px, 8vw, 112px) 0; }
.take__box { background: var(--ink); color: var(--paper); border-radius: var(--radius); padding: clamp(28px, 5vw, 72px); display: grid; grid-template-columns: repeat(12, 1fr); gap: 32px; }
.take__box h2 { grid-column: 1 / span 4; font: 800 clamp(34px, 4vw, 60px)/.95 var(--display); letter-spacing: -.045em; margin: 0; }
.take__box h2 .hand { display: block; font-size: 26px; margin-top: 16px; transform: rotate(-2deg); color: #FF7A6E; }
.take__box ol { grid-column: 6 / span 7; list-style: none; margin: 0; padding: 0; counter-reset: tk; }
.take__box li { counter-increment: tk; display: grid; grid-template-columns: 64px 1fr; gap: 16px; padding: 20px 0; border-top: 1px solid rgba(243,240,233,.2); font-size: clamp(18px, 1.6vw, 22px); line-height: 1.4; }
.take__box li::before { content: counter(tk); font: 800 40px/.9 var(--display); color: var(--c); }
.take__box li:first-child { border-top: 0; padding-top: 0; }

/* ---------- Источники и навигация ---------- */
.src { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; padding: 0 0 clamp(48px, 6vw, 80px); font-size: 14px; color: var(--ink-2); }
.src h3 { font: 600 13px/1.2 var(--text); letter-spacing: .12em; text-transform: uppercase; margin: 0 0 12px; color: var(--ink); }
.src__a { grid-column: 1 / span 5; }
.src__b { grid-column: 7 / span 6; }
.src ul { margin: 0; padding: 0; list-style: none; }
.src li { padding: 5px 0; border-top: 1px solid var(--line); }
.src a { color: var(--ink-2); }
.src a:hover { color: var(--ink); }

.next { display: grid; grid-template-columns: 1fr 1fr; border-top: 1.5px solid var(--ink); }
.next a { text-decoration: none; padding: clamp(28px, 4vw, 48px) 0; display: flex; flex-direction: column; gap: 10px; transition: background .25s; }
.next a + a { border-left: 1px solid var(--line); padding-left: clamp(16px, 3vw, 40px); text-align: right; align-items: flex-end; }
.next span { font-size: 14px; color: var(--ink-2); }
.next b { font: 800 clamp(26px, 3.4vw, 52px)/1 var(--display); letter-spacing: -.045em; transition: color .2s; }
.next a:hover b { color: var(--ct, var(--c)); }

.others { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 0 clamp(56px, 7vw, 96px); }
.others a { --c: var(--ink); text-decoration: none; padding: 10px 16px 10px 12px; border: 1.5px solid var(--ink); border-radius: 99px; font-size: 15px; font-weight: 500; display: inline-flex; gap: 8px; align-items: center; transition: background .2s, color .2s; }
.others a::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.others a:hover { background: var(--ink); color: var(--paper); }

/* ==========================================================================
   Рейтинги
   ========================================================================== */
.r-hero { padding: clamp(40px, 7vw, 96px) 0 clamp(48px, 6vw, 80px); border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.r-hero .hero__title { font-size: clamp(56px, 11.5vw, 184px); }
.r-hero .hero__title em { font-style: normal; color: var(--red); }

.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.rank-wrap { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px 48px; }
.rank-main { grid-column: 1 / span 8; }
.rank-side { grid-column: 10 / span 3; font-size: 15px; color: var(--ink-2); }
.rank-side p { margin: 0 0 1em; }
.rank-side b { color: var(--ink); }
.legend-avg { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); margin-bottom: 16px; }
.legend-avg::before { content: ''; height: 16px; border-left: 1.5px dashed var(--red); }

.r-podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 32px; }
.r-podium > div { border-top: 3px solid var(--c); padding-top: 14px; }
.r-podium .pl { font: 800 clamp(56px, 6vw, 96px)/.85 var(--display); letter-spacing: -.06em; color: var(--ct, var(--c)); }
.r-podium .nm { font: 700 20px/1.2 var(--display); letter-spacing: -.02em; margin: 10px 0 4px; }
.r-podium .nm a { text-decoration: none; border-bottom: 2px solid var(--c); }
.r-podium .sc { color: var(--ink-2); font-size: 15px; }

.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 56px; }
.duo h3, .r-h3 { font: 700 clamp(22px, 2vw, 28px)/1.15 var(--display); letter-spacing: -.03em; margin: 0 0 6px; }
.duo .sub { margin: 0 0 20px; color: var(--ink-2); font-size: 15px; }
.uni { list-style: none; margin: 0; padding: 0; counter-reset: u; }
.uni li { display: grid; grid-template-columns: 2.4em 1fr auto; gap: 12px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.uni .rk { font: 800 22px/1 var(--display); letter-spacing: -.03em; }
.uni .cn { font-size: 13px; color: var(--ink-2); text-align: right; }

.best { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.best a, .best div { text-decoration: none; padding: 18px; border-radius: var(--radius); background: var(--paper-2); display: flex; flex-direction: column; gap: 8px; border-top: 4px solid var(--c); transition: transform .25s var(--ease); }
.best a:hover { transform: translateY(-3px); }
.best .bc { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.best .bn { font-weight: 600; line-height: 1.25; }
.best .br { font: 800 34px/1 var(--display); letter-spacing: -.04em; margin-top: auto; }
.best .br small { font: 500 13px/1 var(--text); color: var(--ink-2); letter-spacing: 0; margin-left: 6px; }

.caveats { counter-reset: cv; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 56px; list-style: none; padding: 0; margin: 0; }
.caveats li { counter-increment: cv; padding: 22px 0 26px; border-top: 1.5px solid var(--ink); }
.caveats li::before { content: counter(cv); font: 800 44px/.9 var(--display); color: var(--red); display: block; margin-bottom: 14px; letter-spacing: -.04em; }
.caveats b { display: block; font: 700 20px/1.2 var(--display); letter-spacing: -.02em; margin-bottom: 8px; }
.caveats p { margin: 0; color: var(--ink-2); font-size: 16.5px; }

/* ==========================================================================
   Появление при прокрутке
   ========================================================================== */
.rv { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.rv.is-in { opacity: 1; transform: none; }
.no-js .rv { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .rv { opacity: 1; transform: none; }
}

/* ==========================================================================
   Адаптив
   ========================================================================== */
@media (max-width: 1100px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wow { grid-template-columns: repeat(2, 1fr); }
  .wow__item:nth-child(2) { border-right: 0; }
  .wow__item:nth-child(3) { padding-left: 0; }
  .wow__item:nth-child(n+3) { border-top: 1px solid var(--line); }
  .compare__block { grid-column: span 12; }
  .toc { display: none; }
  .article { grid-column: 1 / span 12; max-width: 760px; }
  .fig.wide { margin-left: 0; }
  .rank-main { grid-column: span 12; }
  .rank-side { grid-column: span 12; columns: 2; column-gap: 48px; }
}

@media (max-width: 760px) {
  .cards { grid-template-columns: 1fr; gap: 14px; }
  .vb { min-height: 0; }
  .vb__photo { height: 200px; }
  body { font-size: 17px; }
  .top__in { height: 56px; }
  .nav a { padding: 9px 11px; font-size: 14px; }
  .hero::before { left: 10px; }
  .compare { grid-template-columns: 1fr; gap: 56px; }
  .compare__block { grid-column: 1 / -1; min-width: 0; }
  .fact { min-width: 0; }
  .hero__grid, .sec__head, .intro, .read, .day, .about, .foot__grid, .src, .teaser, .take__box, .rank-wrap { grid-template-columns: 1fr; }
  .hero__grid > *, .sec__head > *, .intro > *, .day > *, .about > *, .foot__grid > *, .src > *, .teaser > *, .take__box > *, .rank-wrap > * { grid-column: 1 / -1 !important; }
  .hero__note { margin-top: 8px; }
  .sec__aside { margin-top: -8px; }
  .wow { grid-template-columns: 1fr; }
  .wow__item, .wow__item + .wow__item { padding: 22px 0; border-right: 0; border-top: 1px solid var(--line); }
  .wow__item:first-child { border-top: 0; }
  .ages { min-height: 0; gap: 4px; }
  .ages__chip { font-size: 11.5px; padding: 6px; }
  .ages__axis span { font-size: 22px; }
  .ages__axis small { display: block; margin: 4px 0 0; }
  .delta li { grid-template-columns: minmax(90px, 8em) 1fr 3em; gap: 10px; }
  .bars li { grid-template-columns: 1.8em minmax(84px, 9em) 1fr 4.8em; gap: 8px; font-size: 15px; }
  .podium { grid-template-columns: repeat(3, 1fr); }
  .podium__p:nth-child(1) .podium__bar { height: 170px; }
  .podium__p:nth-child(2) .podium__bar { height: 220px; }
  .podium__p:nth-child(3) .podium__bar { height: 130px; }
  .podium__bar { padding: 12px; }
  .podium__nm { font-size: 14px; }

  .facts { grid-template-columns: 1fr 1fr; }
  .fact:nth-child(2) { border-right: 0; }
  .fact:nth-child(3) { padding-left: 0; }
  .fact:nth-child(n+3) { border-top: 1px solid var(--line); }
  .intro__lead p:first-child::first-letter { font-size: 2.8em; }
  .thesis { margin-top: 12px; }

  /* Схема становится вертикальной: возраст сверху вниз */
  .scheme {
    grid-template-columns: 44px repeat(var(--tracks), minmax(0, 1fr));
    grid-template-rows: auto repeat(var(--cols), minmax(46px, auto));
    grid-auto-rows: auto;
    row-gap: 0; column-gap: 8px;
  }
  .scheme__ruler { grid-row: 2 / -1; grid-column: 1; grid-template-columns: none; grid-template-rows: repeat(var(--cols), minmax(46px, auto)); height: auto; border-bottom: 0; border-right: 2px solid var(--ink); border-radius: 3px 0 0 3px; }
  .scheme__tick { border-left: 0; border-top: 1px solid rgba(20,20,20,.5); padding: 4px 0 0 6px; }
  .scheme__tick::after { left: auto; right: 0; bottom: auto; top: 50%; height: 0; width: 8px; border-left: 0; border-top: 1px solid rgba(20,20,20,.4); }
  .scheme__tick:first-child { border-top: 0; }
  .scheme__axis { grid-row: 1; grid-column: 1; font-size: 11px; padding: 0 0 8px; }
  .scheme__track { grid-row: 1; grid-column: var(--mtc); border-top: 0; font-size: 12px; padding: 0 0 8px; align-items: flex-end; }
  .stage { grid-column: var(--mtc); grid-row: var(--mgr); margin: 2px 0; padding: 10px; }
  .stage b { font-size: 14px; }
  .exam { grid-column: var(--mtc); grid-row: var(--mex); width: 100%; height: 0; align-self: start; }
  .exam.at-end { justify-self: stretch; align-self: end; }
  .exam::before { left: auto; right: -6px; top: -9px; }
  .exam b { left: auto; right: -9px; }
  .exam::after { top: -1px; bottom: auto; left: 0; right: 10px; border-left: 0; border-top: 2px dashed var(--red); }
  .stage.narrow b { writing-mode: horizontal-tb; transform: none; white-space: normal; font-size: 13px; }
  .stage.narrow span { display: block; }

  .day__list::before { left: 70px; }
  .day__list li { grid-template-columns: 58px 1fr; gap: 28px; }
  .day__list li::before { left: 64px; }
  .day__time { font-size: 15px; }
  .pc { grid-template-columns: 1fr; }
  .big { grid-template-columns: 1fr; }
  .next { grid-template-columns: 1fr; }
  .next a + a { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; text-align: left; align-items: flex-start; }
  .r-podium { gap: 10px; }
  .r-podium .nm { font-size: 16px; }
  .duo { grid-template-columns: 1fr; }
  .rank-side { columns: 1; }
  .caveats { grid-template-columns: 1fr; }
}

/* Длинные слова в узких ячейках не должны распирать страницу */
.fact span, .scheme__track, .thesis p, .pc li p { overflow-wrap: anywhere; -webkit-hyphens: auto; hyphens: auto; }
.scheme > * { min-width: 0; }

/* Отдельный блок о стране в рейтингах (Армения) */
.spot__grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 32px 48px; align-items: start; }
.spot__scores > * { min-width: 0; }
.spot__scores { grid-column: 1 / span 6; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; background: var(--c); color: var(--ci); border-radius: var(--radius); padding: clamp(20px, 3vw, 36px); }
.spot__scores b { display: block; font: 800 clamp(40px, 4.4vw, 68px)/.9 var(--display); letter-spacing: -.05em; }
.spot__scores span { font-size: 14px; opacity: .85; }
.spot__scores p { grid-column: 1 / -1; margin: 12px 0 0; font-size: 15px; opacity: .9; }
.spot__base { grid-column: 7 / span 6; }
@media (max-width: 1100px) { .spot__scores, .spot__base { grid-column: 1 / -1; } }
.spot__base .sub { margin: 6px 0 20px; color: var(--ink-2); font-size: 15px; }
.spot__row { display: grid; grid-template-columns: 9em 1fr; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.spot__s { font-weight: 600; font-size: 15px; }
.spot__bars { display: flex; flex-direction: column; gap: 4px; }
.spot__bar { position: relative; height: 18px; border-radius: 0 2px 2px 0; }
.spot__bar.am { background: var(--c); }
.spot__bar.oecd { background: var(--paper-3); }
.spot__bar { min-width: 3.2em; }
.spot__bar i { display: block; padding-left: 7px; font: 600 12.5px/18px var(--text); font-style: normal; white-space: nowrap; color: var(--ci); }
.spot__bar.oecd i { color: var(--ink); font-weight: 500; }
.spot .cap { margin-top: 18px; display: block; font-size: 14px; }
@media (max-width: 760px) {
  .spot__grid { grid-template-columns: 1fr; }
  .spot__scores, .spot__base { grid-column: 1 / -1; }
  .spot__row { grid-template-columns: 1fr; gap: 6px; }
}

/* ==========================================================================
   Школа в цифрах
   ========================================================================== */
.snav { position: sticky; top: 0; z-index: 40; background: rgba(243, 240, 233, .94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.snav__in { display: flex; gap: 6px; overflow-x: auto; padding-top: 10px; padding-bottom: 10px; scrollbar-width: none; }
.snav__in::-webkit-scrollbar { display: none; }
.snav a { flex: none; text-decoration: none; font: 500 14px/1 var(--text); padding: 9px 14px; border-radius: 99px; border: 1.5px solid var(--ink); transition: background .2s, color .2s; }
.snav a:hover { background: var(--ink); color: var(--paper); }
.snav__cmp { margin-left: auto; background: var(--red); border-color: var(--red) !important; color: #fff; }

.sgroup { padding: clamp(56px, 7vw, 104px) 0 0; scroll-margin-top: 120px; }
.sgroup + .sgroup { border-top: 1px solid var(--line); margin-top: clamp(24px, 4vw, 56px); }
.sgroup__title { font: 800 clamp(48px, 8vw, 128px)/.9 var(--display); letter-spacing: -.055em; margin: 0 0 clamp(28px, 4vw, 56px); }
.sgroup__title sup { font: 700 .2em/1 var(--display); color: var(--red); vertical-align: top; margin-left: .2em; letter-spacing: 0; }
.sgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(40px, 5vw, 72px) clamp(32px, 5vw, 72px); }
.smetric { border-top: 1.5px solid var(--ink); padding-top: 18px; scroll-margin-top: 130px; min-width: 0; }
.smetric h3 { font: 700 clamp(22px, 2vw, 28px)/1.15 var(--display); letter-spacing: -.03em; margin: 0 0 10px; }
.smetric__insight { margin: 0 0 14px; font-size: 17px; line-height: 1.45; max-width: 34em; }
.smetric__unit { margin: 0 0 8px; font-size: 13px; color: var(--ink-3); letter-spacing: .04em; }

.sbars { list-style: none; margin: 0; padding: 0; }
.sbars li { display: grid; grid-template-columns: 22px minmax(92px, 9.5em) 1fr auto; gap: 10px; align-items: center; padding: 4px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.sbars img { width: 22px; height: 16.5px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgba(20, 20, 20, .12); }
.sbars__nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sbars__nm a { text-decoration: none; }
.sbars__nm a:hover { color: var(--ct, var(--c)); text-decoration: underline; text-underline-offset: 3px; }
.sbars__nm i { font-style: normal; color: var(--ink-3); margin-left: 2px; cursor: help; }
.sbars__tr { height: 12px; position: relative; }
.sbars__fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--bar, var(--c)); border-radius: 0 2px 2px 0; transform-origin: 0 50%; transition: transform .8s var(--ease); }
.rv:not(.is-in) .sbars__fill { transform: scaleX(0); }
.sbars__v { font: 700 14px/1 var(--display); letter-spacing: -.02em; text-align: right; min-width: 3.4em; white-space: nowrap; }
.sbars li:hover { background: rgba(20, 20, 20, .03); }

.sbool { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.sbool h4 { font: 700 15px/1.2 var(--display); margin: 0 0 10px; }
.sbool h4 sup { color: var(--ink-3); font-size: 11px; }
.sbool ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sbool li { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 14.5px; }
.sbool img { width: 22px; height: 16.5px; object-fit: cover; border-radius: 2px; transform: translateY(3px); box-shadow: 0 0 0 1px rgba(20, 20, 20, .12); }
.sbool a { text-decoration: none; font-weight: 500; }
.sbool small { width: 100%; padding-left: 30px; color: var(--ink-3); font-size: 12.5px; }

.smetric__more { margin-top: 12px; font-size: 13.5px; color: var(--ink-2); }
.smetric__more summary { cursor: pointer; color: var(--ink-3); list-style: none; }
.smetric__more summary::-webkit-details-marker { display: none; }
.smetric__more summary::before { content: '+ '; }
.smetric__more[open] summary::before { content: '− '; }
.smetric__more p, .smetric__more ul { margin: 8px 0 0; }
.smetric__more ul { padding-left: 18px; }
.smetric__more a { color: var(--ink-2); }

/* Сравнение двух стран */
.cmp { margin-top: clamp(40px, 6vw, 88px); border-top: 1px solid var(--line); }
.cmp__pick { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 32px; }
.cmp__pick select { appearance: none; font: 700 clamp(20px, 2vw, 26px)/1 var(--display); letter-spacing: -.03em; padding: 14px 44px 14px 18px; border: 1.5px solid var(--ink); border-radius: var(--radius); background: #FBFAF6 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%23141414' stroke-width='2' fill='none'/%3E%3C/svg%3E") no-repeat right 16px center; color: var(--ink); cursor: pointer; }
.cmp__vs { font-family: var(--hand); font-weight: 600; font-size: 30px; color: var(--red); }
.cmp__head { display: grid; grid-template-columns: minmax(0, 1.4fr) 1fr 1fr; gap: 16px; align-items: end; padding-bottom: 14px; border-bottom: 2px solid var(--ink); position: sticky; top: 0; background: var(--paper); z-index: 5; padding-top: 10px; }
.cmp__who { display: flex; align-items: center; gap: 10px; font: 800 clamp(18px, 2vw, 28px)/1 var(--display); letter-spacing: -.04em; text-decoration: none; }
.cmp__who img { width: 44px; height: 33px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px rgba(20, 20, 20, .12); flex: none; }
.cmp__g { font: 600 12px/1 var(--text); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); padding: 26px 0 8px; }
.cmp__row { display: grid; grid-template-columns: minmax(0, 1.4fr) 1fr 1fr; gap: 16px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.cmp__row b { font: 700 18px/1 var(--display); letter-spacing: -.02em; }
.cmp__row small { display: block; font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.cmp__row .win b { color: #1E8A4C; }
.cmp__row .na { color: var(--ink-3); }

@media (max-width: 900px) {
  .sgrid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .snav { top: 0; }
  .sbars li { grid-template-columns: 20px minmax(80px, 8em) 1fr auto; gap: 8px; font-size: 14px; }
  .sbool { grid-template-columns: 1fr; }
  .cmp__head, .cmp__row { grid-template-columns: minmax(0, 1.2fr) 1fr 1fr; gap: 10px; }
  .cmp__head { top: 56px; }
  .cmp__who { flex-direction: column; align-items: flex-start; gap: 6px; font-size: 16px; }
  .cmp__who img { width: 32px; height: 24px; }
  .cmp__row { font-size: 13.5px; }
  .cmp__row b { font-size: 15px; }
  .cmp__pick select { font-size: 17px; padding: 12px 36px 12px 12px; }
}

/* ==========================================================================
   Манифест
   ========================================================================== */
.man-hero .hero__title em { font-style: normal; color: var(--red); }
.man { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; padding: clamp(48px, 7vw, 96px) 0 0; }
.man__author { grid-column: 1 / span 3; position: sticky; top: 96px; align-self: start; }
.man__avatar { width: 88px; height: 88px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; font: 800 28px/1 var(--display); letter-spacing: -.04em; margin-bottom: 16px; box-shadow: 6px 6px 0 var(--red); }
.man__name { margin: 0; font: 800 22px/1.1 var(--display); letter-spacing: -.03em; }
.man__name a { text-decoration: none; }
.man__name a:hover { color: var(--red); }
.man__role { margin: 6px 0 12px; color: var(--ink-2); font-size: 15px; }
.man__site { font-weight: 600; font-size: 15px; text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.man__text { grid-column: 5 / span 7; font-size: clamp(18px, 1.5vw, 21px); line-height: 1.55; }
.man__text h2 { font: 800 clamp(28px, 3vw, 44px)/1.02 var(--display); letter-spacing: -.04em; margin: 1.6em 0 .6em; }
.man__text h2:first-child { margin-top: 0; }
.man__text p { margin: 0 0 1em; max-width: 36em; }
.man__q { list-style: none; margin: 0 0 1.2em; padding: 0; counter-reset: q; }
.man__q li { counter-increment: q; position: relative; padding: 12px 0 12px 48px; border-top: 1px solid var(--line); }
.man__q li::before { content: counter(q); position: absolute; left: 0; top: 10px; font: 800 26px/1 var(--display); color: var(--red); }
.man__principles { list-style: none; margin: clamp(32px, 4vw, 48px) 0 0; padding: 0; counter-reset: pr; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; }
.man__principles li { counter-increment: pr; padding: 24px 0 28px; border-top: 1.5px solid var(--ink); }
.man__principles li::before { content: counter(pr, decimal-leading-zero); display: block; font: 800 44px/.9 var(--display); color: var(--red); letter-spacing: -.04em; margin-bottom: 14px; }
.man__principles b { display: block; font: 700 21px/1.2 var(--display); letter-spacing: -.02em; margin-bottom: 8px; }
.man__principles p { margin: 0; color: var(--ink-2); font-size: 16.5px; }
.man__sign { margin: 2em 0 1em; }
.man__sign .hand { font-size: 44px; display: inline-block; transform: rotate(-4deg); }
.man__links { display: flex; flex-wrap: wrap; gap: 12px; padding-bottom: clamp(56px, 7vw, 96px); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn--ghost:hover { color: #fff; box-shadow: none; }

@media (max-width: 1000px) {
  .man__principles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .man { grid-template-columns: 1fr; }
  .man__author { position: static; grid-column: 1 / -1; display: grid; grid-template-columns: 64px 1fr; gap: 0 14px; align-items: center; }
  .man__avatar { width: 64px; height: 64px; font-size: 22px; margin: 0; grid-row: span 3; }
  .man__role { margin: 2px 0; }
  .man__text { grid-column: 1 / -1; }
  .man__aside-empty { display: none; }
  .man__principles { grid-template-columns: 1fr; }
  /* шапка: логотип сверху, разделы — прокручиваемой строкой */
  .top__in { height: auto; flex-wrap: wrap; padding-top: 10px; padding-bottom: 6px; gap: 6px; }
  .nav { width: 100%; overflow-x: auto; scrollbar-width: none; margin: 0 -6px; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { flex: none; }
  .snav, .cmp__head { top: 0; }
}

/* ---------- Финский парадокс ---------- */
.fp .sub { margin: 6px 0 18px; color: var(--ink-2); font-size: 15px; max-width: 46em; }
.fp__chart { margin-bottom: clamp(40px, 5vw, 64px); }
.rc { width: 100%; height: auto; max-width: 980px; display: block; overflow: visible; }
.rc__grid { stroke: var(--line); stroke-width: 1; }
.rc__ax { font: 500 13px var(--text); fill: var(--ink-3); }
.rc__lbl { font: 700 14px var(--display); letter-spacing: -.02em; }
.rc__note { font: 600 20px var(--hand); fill: var(--red); }
.rc circle { transition: r .15s; cursor: default; }
.rc circle:hover { r: 8; }
.fp__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 56px; margin-bottom: clamp(48px, 6vw, 80px); }
.fp__list { list-style: none; margin: 0; padding: 0; counter-reset: fl; }
.fp__list li { counter-increment: fl; position: relative; padding: 12px 0 12px 36px; border-top: 1px solid var(--line); font-size: 15.5px; line-height: 1.45; }
.fp__list li::before { content: counter(fl); position: absolute; left: 0; top: 12px; font: 700 13px/1.5 var(--display); color: var(--ct, var(--c)); }
.fp__list a { font-size: 12.5px; color: var(--ink-3); }
.fp__h { font: 800 clamp(32px, 4vw, 60px)/.95 var(--display); letter-spacing: -.045em; margin: 0 0 28px; }
.fp__lc { margin-top: clamp(48px, 6vw, 80px); }
.fp__lcgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 260px)); gap: 40px; }
.fp__lcgrid h4 { font: 800 28px/1 var(--display); margin: 0 0 10px; letter-spacing: -.04em; }
.fp__lcgrid ol { margin: 0; padding-left: 26px; font-size: 15.5px; line-height: 1.7; }
.fp__lcgrid li.is-fin { font-weight: 700; color: var(--ct, var(--c)); }
.fp__verdict { margin-top: clamp(48px, 6vw, 80px); background: var(--c); color: var(--ci); border-radius: var(--radius); padding: clamp(28px, 4vw, 56px); }
.fp__verdict h3 { font: 800 clamp(28px, 3vw, 44px)/1 var(--display); letter-spacing: -.04em; margin: 0 0 16px; }
.fp__verdict p { margin: 0 0 1em; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.5; max-width: 46em; }
.fp__verdict p:last-child { margin: 0; }
.fp__verdict a { color: inherit; font-weight: 600; }
.fp-link { display: grid; gap: 8px; margin: clamp(40px, 5vw, 64px) 0 0; padding: clamp(24px, 3vw, 36px); border: 1.5px solid var(--ink); border-left: 10px solid var(--c); border-radius: var(--radius); text-decoration: none; transition: transform .25s var(--ease), box-shadow .25s; }
.fp-link:hover { transform: translateY(-3px); box-shadow: 0 16px 32px -20px rgba(0, 0, 0, .45); }
.fp-link .kicker { color: var(--ct, var(--c)); }
.fp-link b { font: 800 clamp(22px, 2.4vw, 34px)/1.1 var(--display); letter-spacing: -.035em; }
.fp-link span:last-child { color: var(--ink-2); }
@media (max-width: 760px) {
  .fp__cols { grid-template-columns: 1fr; }
  .fp__lcgrid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .rc__lbl { font-size: 18px; }
  .rc__ax { font-size: 16px; }
}

/* ==========================================================================
   После школы
   ========================================================================== */
.better { color: var(--ink-2); }
.sc-wrap { overflow-x: auto; }
.scat { width: 100%; min-width: 640px; max-width: 1080px; height: auto; display: block; }
.scat__grid { stroke: var(--line); }
.scat__med { stroke: var(--red); stroke-dasharray: 5 5; stroke-width: 1.5; }
.scat__ax { font: 500 13px var(--text); fill: var(--ink-3); }
.scat__axl { font: 600 14px var(--text); fill: var(--ink-2); }
.scat__q { font: 600 19px var(--hand); fill: var(--red); }
.scat__nm { font: 600 11.5px var(--text); fill: var(--ink); paint-order: stroke; stroke: var(--paper); stroke-width: 3px; }
.scat__pt { transition: transform .2s; }
.scat a:hover .scat__nm { fill: var(--red); }

.lr-wrap { overflow-x: auto; border-top: 2px solid var(--ink); }
.lr { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 980px; }
.lr th { font: 600 11.5px/1.25 var(--text); letter-spacing: .02em; color: var(--ink-2); text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--line); vertical-align: bottom; max-width: 110px; }
.lr td { padding: 8px; border-bottom: 1px solid var(--line); }
.lr__pl { font: 700 13px var(--display); color: var(--ink-3); width: 28px; }
.lr__c a, .lr__c span { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 600; white-space: nowrap; }
.lr__c img { width: 22px; height: 16.5px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgba(20, 20, 20, .12); }
.lr__c a:hover { color: var(--ct, var(--c)); }
.lr__s b { font: 800 20px/1 var(--display); letter-spacing: -.03em; }
.lr__v { font-variant-numeric: tabular-nums; white-space: nowrap; }
.lr__v.good { background: rgba(30, 138, 76, .16); }
.lr__v.mid { background: transparent; }
.lr__v.bad { background: rgba(224, 54, 44, .14); }
.lr__v.na { color: var(--ink-3); }
.lr tbody tr:hover { background: rgba(20, 20, 20, .03); }

/* Блок «После школы» на странице страны */
.ca { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; padding: clamp(56px, 8vw, 112px) 0 0; }
.ca__head { grid-column: 1 / span 4; }
.ca__head .kicker { margin: 0 0 12px; color: var(--ct, var(--c)); }
.ca__head h2 { font: 800 clamp(34px, 4vw, 60px)/.95 var(--display); letter-spacing: -.045em; margin: 0 0 16px; }
.ca__head p { margin: 0 0 14px; color: var(--ink-2); font-size: 16px; }
.ca__head a { font-weight: 600; font-size: 15px; }
.ca__sum { color: var(--ink) !important; }
.ca__sum b { font: 800 44px/1 var(--display); letter-spacing: -.04em; color: var(--ct, var(--c)); margin-right: 6px; }
.ca__grid { grid-column: 6 / span 7; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ca__cell { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: var(--radius); background: #FBFAF6; border: 1px solid var(--line); border-top: 4px solid var(--paper-3); }
.ca__cell.good { border-top-color: #1E8A4C; }
.ca__cell.bad { border-top-color: var(--red); }
.ca__cell.mid { border-top-color: #E0B13C; }
.ca__q { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.ca__lbl { font-weight: 600; font-size: 15px; line-height: 1.3; }
.ca__cell b { font: 800 30px/1 var(--display); letter-spacing: -.04em; margin-top: 6px; }
.ca__cell b small { font: 500 13px var(--text); letter-spacing: 0; color: var(--ink-2); margin-left: 6px; }
.ca__place { font-size: 13px; color: var(--ink-2); }
.ca__scale { position: relative; height: 6px; border-radius: 3px; margin-top: 6px; background: linear-gradient(90deg, rgba(224, 54, 44, .45), rgba(224, 177, 60, .45), rgba(30, 138, 76, .5)); }
.ca__cell.neu .ca__scale { background: var(--paper-3); }
.ca__scale i { position: absolute; top: -4px; width: 4px; height: 14px; margin-left: -2px; background: var(--ink); border-radius: 2px; }
@media (max-width: 1000px) {
  .ca__head, .ca__grid { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .ca__grid { grid-template-columns: 1fr; }
}
/* Подписи стран на точечном графике — по наведению, чтобы не наслаивались */
.scat__nm { opacity: 0; transition: opacity .15s; pointer-events: none; }
.scat a:hover .scat__nm, .scat a:focus .scat__nm { opacity: 1; }
.scat a:hover rect { stroke: var(--ink); stroke-width: 2; }

/* ---------- Что изучают ---------- */
.subj { padding: clamp(56px, 8vw, 112px) 0 0; }
.subj__levels { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--ink); }
.subj__lvl { padding: 20px 20px 24px 0; border-right: 1px solid var(--line); }
.subj__lvl + .subj__lvl { padding-left: 20px; }
.subj__lvl:last-child { border-right: 0; }
.subj__lvl h3 { font: 800 clamp(20px, 1.8vw, 26px)/1.05 var(--display); letter-spacing: -.035em; margin: 0 0 4px; }
.subj__sub { margin: 0 0 14px; font-size: 13px; color: var(--ink-3); }
.subj__lvl ul { list-style: none; margin: 0; padding: 0; }
.subj__lvl li { position: relative; padding: 6px 0 6px 16px; font-size: 15px; line-height: 1.35; border-bottom: 1px dashed var(--line); }
.subj__lvl li::before { content: ''; position: absolute; left: 0; top: 13px; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.subj__hours { margin: 12px 0 0; font-size: 13.5px; color: var(--ink-2); font-weight: 600; }
.subj__lang { margin: 24px 0 0; font-size: 16px; max-width: 52em; }
.subj__uh { font: 800 clamp(26px, 2.6vw, 38px)/1 var(--display); letter-spacing: -.04em; margin: clamp(40px, 5vw, 64px) 0 20px; }
.subj__unusual { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; counter-reset: un; }
.subj__unusual > div { counter-increment: un; background: var(--c); color: var(--ci); border-radius: var(--radius); padding: 20px 20px 22px; }
.subj__unusual > div::before { content: counter(un, decimal-leading-zero); display: block; font: 800 13px/1 var(--display); opacity: .7; margin-bottom: 14px; }
.subj__unusual b { display: block; font: 700 19px/1.2 var(--display); letter-spacing: -.02em; margin-bottom: 8px; }
.subj__unusual p { margin: 0; font-size: 15px; line-height: 1.45; opacity: .92; }

/* ---------- Необычные предметы (страница цифр) ---------- */
.un__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.un__card { display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: var(--radius); background: #FBFAF6; border: 1px solid var(--line); border-top: 5px solid var(--c); text-decoration: none; color: var(--ink); transition: transform .25s var(--ease), box-shadow .25s; }
a.un__card:hover { transform: translateY(-3px); box-shadow: 0 16px 32px -20px rgba(0, 0, 0, .45); }
.un__card--extra { border-top-color: var(--red); background: var(--paper); border-style: dashed; border-top-style: solid; }
.un__who { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.un__who img { width: 24px; height: 18px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgba(20, 20, 20, .12); }
.un__who small { font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--ink-3); }
.un__card b { font: 700 19px/1.2 var(--display); letter-spacing: -.02em; }
.un__card p { margin: 0; font-size: 15px; line-height: 1.45; color: var(--ink-2); }
@media (max-width: 1000px) {
  .subj__levels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .subj__lvl:nth-child(2n) { border-right: 0; }
  .subj__lvl:nth-child(2n+1) { padding-left: 0; }
  .subj__lvl:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 600px) {
  .subj__levels { grid-template-columns: 1fr; }
  .subj__lvl, .subj__lvl + .subj__lvl { padding: 18px 0; border-right: 0; }
  .subj__lvl + .subj__lvl { border-top: 1px solid var(--line); }
}
.subj__src { margin: 20px 0 0; font-size: 13px; color: var(--ink-3); line-height: 1.6; } .subj__src a { color: var(--ink-2); }

/* ==========================================================================
   Сравнение стран
   ========================================================================== */
.cmpx-hero .hero__title em { font-style: normal; color: var(--red); }
.cmpx { padding: clamp(28px, 4vw, 48px) 0 clamp(56px, 8vw, 112px); }
.cmpx__bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 24px; }
.cmpx__chips { display: contents; }
.cmpx__chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 6px 6px 10px; border-radius: 99px; background: #FBFAF6; border: 1.5px solid var(--c); font-weight: 600; font-size: 15px; }
.cmpx__chip img { width: 24px; height: 18px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgba(20, 20, 20, .12); }
.cmpx__chip button { appearance: none; border: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--paper-2); cursor: pointer; font-size: 17px; line-height: 1; color: var(--ink-2); transition: background .2s, color .2s; }
.cmpx__chip button:hover { background: var(--red); color: #fff; }
.cmpx__add select { appearance: none; font: 600 15px/1 var(--text); padding: 11px 18px; border-radius: 99px; border: 1.5px dashed var(--ink); background: transparent; color: var(--ink); cursor: pointer; }
.cmpx__add select:hover { background: var(--ink); color: var(--paper); border-style: solid; }
.cmpx__clear { margin-left: auto; }
.cmpx__table { overflow-x: auto; border-top: 2px solid var(--ink); }
.cmpx__table table { width: 100%; border-collapse: collapse; font-size: 15px; }
.cmpx__table thead th { position: sticky; top: 0; background: var(--paper); z-index: 2; padding: 14px 10px; text-align: left; vertical-align: bottom; border-bottom: 1.5px solid var(--ink); min-width: 120px; }
.cmpx__table thead th a, .cmpx__table thead th span { display: flex; flex-direction: column; gap: 8px; font: 800 17px/1.1 var(--display); letter-spacing: -.03em; text-decoration: none; color: var(--ink); }
.cmpx__table thead th img { width: 40px; height: 30px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px rgba(20, 20, 20, .12); }
.cmpx__table thead th a:hover { color: var(--c); }
.cmpx__m { position: sticky; left: 0; background: var(--paper); z-index: 1; text-align: left; font-weight: 500; padding: 10px 14px 10px 0; min-width: 220px; max-width: 320px; border-bottom: 1px solid var(--line); }
thead .cmpx__m { z-index: 3; font: 600 12px/1 var(--text); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.cmpx__m small { display: block; color: var(--ink-3); font-size: 12px; margin-top: 3px; font-weight: 400; }
.cmpx__sec th { text-align: left; padding: 28px 0 8px; font: 800 22px/1 var(--display); letter-spacing: -.03em; border-bottom: 1.5px solid var(--ink); position: sticky; left: 0; background: var(--paper); }
.cmpx__table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cmpx__table td b { font: 700 17px/1 var(--display); letter-spacing: -.02em; }
.cmpx__bar-in { display: block; height: 5px; margin-top: 7px; background: var(--paper-2); border-radius: 3px; overflow: hidden; }
.cmpx__bar-in i { display: block; height: 100%; background: var(--c); border-radius: 3px; }
.cmpx__table td.best b { color: #1E8A4C; }
.cmpx__table td.best b::after { content: ' ★'; font-size: 13px; }
.cmpx__table td.na { color: var(--ink-3); font-size: 13px; }
.cmpx__table tbody tr:not(.cmpx__sec):hover td, .cmpx__table tbody tr:not(.cmpx__sec):hover .cmpx__m { background: #EFEBE2; }
.cmpx__empty { padding: 32px 0; color: var(--ink-2); }
.cmp-cta { display: grid; gap: 10px; padding: clamp(28px, 4vw, 56px); border-radius: var(--radius); background: var(--ink); color: var(--paper); text-decoration: none; transition: transform .25s var(--ease); }
.cmp-cta:hover { transform: translateY(-3px); }
.cmp-cta .kicker { color: #FF7A6E; }
.cmp-cta b { font: 800 clamp(28px, 3.6vw, 52px)/1 var(--display); letter-spacing: -.045em; }
.cmp-cta span:last-child { color: rgba(243, 240, 233, .75); font-size: 17px; }
@media (max-width: 760px) {
  .cmpx__m { min-width: 150px; font-size: 13.5px; }
  .cmpx__table thead th { min-width: 96px; }
  .cmpx__table thead th a, .cmpx__table thead th span { font-size: 14px; }
  .cmpx__clear { margin-left: 0; }
}

/* ==========================================================================
   Типы графиков
   ========================================================================== */
/* stack — страны стопками над значением */
.stk__cols { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 8px; align-items: end; border-bottom: 2px solid var(--ink); padding-bottom: 10px; }
.stk__col { display: flex; flex-direction: column-reverse; gap: 5px; }
.stk__chip { display: flex; align-items: center; gap: 7px; padding: 6px 8px; border-radius: 3px; background: var(--bar); color: #fff; font-size: 13px; font-weight: 600; line-height: 1.15; min-width: 0; transition: transform .2s var(--ease); }
.stk__chip:hover { transform: translateY(-2px); }
.stk__chip img { width: 20px; height: 15px; object-fit: cover; border-radius: 2px; flex: none; box-shadow: 0 0 0 1px rgba(255, 255, 255, .5); }
.stk__chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stk__chip a, .stk__chip span span { color: inherit; text-decoration: none; }
.stk__axis { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.stk__axis b { font: 800 26px/1 var(--display); letter-spacing: -.04em; }
.stk__axis small { font-size: 13px; color: var(--ink-2); margin-left: 4px; }

/* dots — флаги на числовой оси */
.dots { padding-top: 6px; }
.dots__field { position: relative; height: calc(var(--lanes) * 30px + 8px); margin: 0 14px; border-bottom: 2px solid var(--ink); }
.dots__pt { position: absolute; bottom: calc(var(--lane) * 30px + 8px); transform: translateX(-50%); display: block; line-height: 0; z-index: 1; }
.dots__pt img { width: 28px; height: 21px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1.5px #fff, 0 2px 6px -2px rgba(0, 0, 0, .4); transition: transform .2s var(--ease); }
.dots__pt:hover, .dots__pt:focus { z-index: 3; }
.dots__pt:hover img, .dots__pt:focus img { transform: scale(1.25); }
.dots__tip { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); white-space: nowrap; background: var(--ink); color: var(--paper); font: 600 12.5px/1 var(--text); padding: 6px 8px; border-radius: 3px; opacity: 0; pointer-events: none; transition: opacity .15s; }
.dots__pt:hover .dots__tip, .dots__pt:focus .dots__tip { opacity: 1; }
.dots__axis { position: relative; height: 22px; margin: 0 14px; }
.dots__axis span { position: absolute; top: 6px; transform: translateX(-50%); font: 600 13px/1 var(--display); color: var(--ink-2); }
.dots__axis span::before { content: ''; position: absolute; left: 50%; top: -12px; height: 6px; border-left: 1.5px solid var(--ink); }
.dots__ends { display: flex; justify-content: space-between; margin: 6px 0 0; font-size: 12.5px; color: var(--ink-3); }
.dots__list { margin-top: 10px; font-size: 13.5px; }
.dots__list summary { cursor: pointer; color: var(--ink-3); }
.dots__list .sbars { margin-top: 8px; }

/* share — доля от 100% */
.shr, .unt, .yr { list-style: none; margin: 0; padding: 0; }
.shr li, .unt li, .yr li { display: grid; grid-template-columns: 22px minmax(92px, 9.5em) 1fr auto; gap: 10px; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.shr img, .unt img, .yr img, .free img { width: 22px; height: 16.5px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgba(20, 20, 20, .12); }
.shr__tr { position: relative; height: 12px; background: repeating-linear-gradient(90deg, var(--paper-2) 0 calc(10% - 1px), var(--paper) calc(10% - 1px) 10%); border-radius: 2px; overflow: hidden; }
.shr__fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--bar); }
.shr__scale { display: grid; grid-template-columns: 1fr auto 1fr; margin: 6px 0 0; padding-left: calc(22px + 9.5em + 20px); padding-right: 3.6em; font-size: 12px; color: var(--ink-3); }
.shr__scale span:last-child { text-align: right; }

/* units — значки поштучно */
.unt__row { display: flex; flex-wrap: wrap; gap: 2px; }
.unt__row i { width: 8px; height: 8px; background: var(--bar); flex: none; }
.unt--dot .unt__row i { border-radius: 50%; }
.unt--sq .unt__row i { width: 14px; height: 14px; border-radius: 2px; }
.unt__row i:nth-child(10n) { margin-right: 4px; }
.unt__legend, .yr__legend { margin: 8px 0 0; font-size: 12.5px; color: var(--ink-3); }

/* year — дни из 365 */
.yr__tr { position: relative; height: 14px; border-radius: 2px; overflow: hidden; background: repeating-linear-gradient(90deg, var(--paper-2) 0 calc(100% / 12 - 1px), var(--paper) calc(100% / 12 - 1px) calc(100% / 12)); }
.yr__fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--bar); opacity: .92; }

/* free — бесплатно и платно */
.free ul { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.free li { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border-radius: 99px; background: rgba(30, 138, 76, .12); font-size: 14px; font-weight: 600; }
.free li a { text-decoration: none; }
.free__h { margin: 0 0 8px; font-size: 14px; color: var(--ink-2); }
.free__h b { font: 700 16px var(--display); color: var(--ink); }

@media (max-width: 760px) {
  .shr li, .unt li, .yr li { grid-template-columns: 20px minmax(80px, 8em) 1fr auto; gap: 8px; font-size: 14px; }
  .shr__scale { padding-left: calc(20px + 8em + 16px); padding-right: 3em; }
  .stk[data-many="1"] .stk__chip { justify-content: center; padding: 5px 2px; }
  .stk[data-many="1"] .stk__chip > span { display: none; }
  .stk__chip { font-size: 11.5px; padding: 5px 6px; gap: 5px; }
  .stk__axis b { font-size: 20px; }
  .stk__axis small { display: block; margin: 2px 0 0; font-size: 11px; }
  .unt--dot .unt__row i { width: 6px; height: 6px; }
  .unt--sq .unt__row i { width: 10px; height: 10px; }
}
/* Много столбцов — только флаги, название во всплывающей подсказке */
.stk[data-many="2"] .stk__col { align-items: center; }
.stk[data-many="2"] .stk__chip { padding: 0; background: none; width: 30px; justify-content: center; }
.stk[data-many="2"] .stk__chip img { width: 30px; height: 22px; box-shadow: 0 0 0 1.5px #fff, 0 2px 6px -2px rgba(0, 0, 0, .4); }
.stk[data-many="2"] .stk__chip > span { display: none; }
.stk[data-many="2"] .stk__axis span { text-align: center; }
.stk[data-many="2"] .stk__axis small { display: block; margin: 2px 0 0; }
@media (max-width: 760px) {
  .stk[data-many="2"] .stk__chip, .stk[data-many="2"] .stk__chip img { width: 22px; height: 16px; }
}
/* Подсказка не должна расширять страницу, пока скрыта */
.dots__tip { display: none; }
.dots__pt:hover .dots__tip, .dots__pt:focus .dots__tip { display: block; }
.dots__field { overflow: visible; }
.dots { overflow-x: clip; overflow-y: visible; }

/* ---------- Необычные предметы: угадай страну ---------- */
.uq__bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.uq__score { font: 700 18px/1 var(--display); letter-spacing: -.02em; }
.uq { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.uq__card { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 22px; border-radius: var(--radius); background: var(--ink); color: var(--paper); cursor: pointer; overflow: hidden; user-select: none; transition: background .4s var(--ease), color .4s var(--ease), transform .25s var(--ease); }
.uq__card:hover { transform: translateY(-3px) rotate(-.3deg); }
.uq__card:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.uq__top { display: flex; justify-content: space-between; align-items: flex-start; min-height: 28px; }
.uq__n { font: 700 13px/1 var(--display); color: #FF7A6E; transition: color .4s; }
.uq__flag { width: 60px; height: 45px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 3px #fff, 0 8px 18px -8px rgba(0, 0, 0, .5); transform: rotate(4deg) scale(.4); opacity: 0; transition: transform .45s var(--ease), opacity .3s; }
.uq__t { font: 800 clamp(19px, 1.55vw, 23px)/1.05 var(--display); letter-spacing: -.035em; }
.uq__x { font-size: 15px; line-height: 1.45; opacity: .78; }
.uq__q { margin-top: auto; font-weight: 600; font-size: 15px; color: #FF7A6E; }
.uq__q i { font-style: normal; display: inline-block; transition: transform .2s; }
.uq__card:hover .uq__q i { transform: translateX(4px); }
.uq__who { display: none; margin-top: auto; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.uq__who b { font: 800 22px/1 var(--display); letter-spacing: -.035em; }
.uq__who a { color: inherit; font-weight: 600; }
.uq__hide { margin-left: auto; font-size: 12.5px; opacity: .65; }
/* открыто: карточка становится постером в цвете страны */
.uq__card[aria-expanded="true"] { background: var(--c); color: var(--ci); }
.uq__card[aria-expanded="true"] .uq__n { color: inherit; opacity: .8; }
.uq__card[aria-expanded="true"] .uq__flag { opacity: 1; transform: rotate(4deg) scale(1); }
.uq__card[aria-expanded="true"] .uq__x { opacity: .92; }
.uq__card[aria-expanded="true"] .uq__q { display: none; }
.uq__card[aria-expanded="true"] .uq__who { display: flex; }
@media (max-width: 1100px) { .uq { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 800px) { .uq { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .uq { grid-template-columns: 1fr; } .uq__bar { flex-direction: column; align-items: flex-start; } }

