/*
 * СПО в цифрах — visual system
 *
 * The page deliberately uses system fonts and no remote assets.  Apart from
 * making the site fast, this lets the production server use a very strict
 * Content Security Policy with no third-party exceptions.
 */

:root {
  /* Shared visual language with address_management_web: cool surfaces,
     graphite text, restrained red product accent and blue focus/data color. */
  --ink: #152033;
  --ink-soft: #657286;
  --paper: #f1f4f8;
  --paper-strong: #ffffff;
  --paper-tint: #e9eef4;
  --forest: #0d141c;
  --forest-soft: #1c2733;
  --teal: #c92f3a;
  --teal-light: #ff707a;
  --coral: #2f70d8;
  --amber: #b97313;
  --blue: #2f70d8;
  --cream: #fff1f2;
  --line: rgba(101, 114, 134, 0.22);
  --line-dark: rgba(255, 255, 255, 0.14);
  --shadow: 0 18px 48px rgba(31, 42, 56, 0.09);
  --radius: 17px;
  --radius-small: 14px;
  --content: 1220px;
  --font-sans: Inter, Aptos, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;

  /*
   * Readability tokens.
   *
   * Dashboard annotations used to fall as low as 8 px.  Keeping the smallest
   * text in rem units makes it follow the reader's browser font settings, and
   * the 12 px floor remains legible at normal display scaling.  Compact
   * controls get a separate height token so mouse and touch targets do not
   * collapse when a label happens to fit on one short line.
   */
  --font-caption: 0.75rem; /* 12 px at the browser's usual 16 px root size. */
  --font-small: 0.8125rem; /* 13 px, used for supporting prose and controls. */
  /* Forty CSS pixels stay safely above a 36 px rendered target even when
     Windows fractional display scaling rounds layout dimensions down. */
  --compact-control-height: 40px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

/* Visually hidden content remains available to screen readers. */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 120px;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button,
select,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

button,
a,
select {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  color: white;
  background: var(--forest);
  border-radius: 8px;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: absolute;
  z-index: 20;
  top: 18px;
  left: 50%;
  display: flex;
  width: min(calc(100% - 48px), var(--content));
  height: 72px;
  padding: 10px 14px;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  border: 1px solid rgba(215, 224, 234, 0.17);
  border-radius: 17px;
  background: rgba(22, 31, 41, 0.74);
  box-shadow: 0 7px 20px rgba(0, 0, 0, 0.17);
  backdrop-filter: blur(18px) saturate(1.08);
  transform: translateX(-50%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: #fff;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #d63843, #c92f3a);
  border-radius: 12px;
  box-shadow: 0 9px 24px rgba(201, 47, 58, 0.28);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.brand-copy {
  display: grid;
  line-height: 1.05;
}

.brand-copy strong {
  font-size: 15px;
  letter-spacing: -0.01em;
}

.brand-copy small {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.62);
  font-size: var(--font-caption);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 26px;
}

.report-switcher {
  display: inline-flex;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
}

.report-switcher a {
  min-width: 48px;
  min-height: var(--compact-control-height);
  padding: 7px 10px;
  color: rgba(255, 255, 255, 0.72);
  border-radius: 7px;
  font-size: var(--font-caption);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
}

.report-switcher a[aria-current="page"] {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.14);
}

.top-nav a {
  position: relative;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

.top-nav a::after {
  position: absolute;
  right: 0;
  bottom: -7px;
  left: 0;
  height: 2px;
  background: var(--coral);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 160ms ease;
}

.top-nav a:hover::after,
.top-nav a:focus-visible::after {
  transform: scaleX(1);
}

.hero-shell {
  position: relative;
  overflow: hidden;
  color: white;
  background:
    radial-gradient(circle at 7% -10%, rgba(201, 47, 58, 0.2), transparent 32rem),
    radial-gradient(circle at 92% 5%, rgba(47, 112, 216, 0.12), transparent 29rem),
    linear-gradient(135deg, #0d141c 0%, #161f29 58%, #111a24 100%);
}

.hero-shell::before {
  position: absolute;
  top: -160px;
  right: -100px;
  width: 520px;
  height: 520px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  box-shadow:
    0 0 0 70px rgba(255, 255, 255, 0.025),
    0 0 0 140px rgba(255, 255, 255, 0.018);
  content: "";
}

.hero-shell::after {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 38px 38px;
  content: "";
  pointer-events: none;
}

.hero {
  position: relative;
  z-index: 2;
  display: grid;
  width: min(calc(100% - 48px), var(--content));
  min-height: 670px;
  margin: 0 auto;
  padding: 155px 0 100px;
  align-items: center;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 80px;
}

.eyebrow,
.section-kicker,
.chart-overline {
  margin: 0;
  color: var(--teal);
  font-size: var(--font-caption);
  font-weight: 850;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.hero .eyebrow {
  display: inline-flex;
  padding: 7px 11px;
  color: #ff8b93;
  border: 1px solid rgba(214, 56, 67, 0.34);
  border-radius: 999px;
  background: rgba(201, 47, 58, 0.1);
}

.hero h1 {
  max-width: 780px;
  margin: 27px 0 22px;
  font-size: clamp(49px, 6.2vw, 82px);
  font-weight: 760;
  letter-spacing: -0.062em;
  line-height: 0.98;
}

.hero h1 em {
  color: #f3bac0;
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.045em;
}

.hero-lead {
  max-width: 680px;
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: clamp(17px, 1.8vw, 21px);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  margin-top: 38px;
  gap: 12px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  min-height: 48px;
  padding: 0 20px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 760;
  text-decoration: none;
  transition: transform 150ms ease, background 150ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: #fff;
  background: linear-gradient(135deg, #d63843, #c92f3a);
  box-shadow: 0 7px 16px rgba(201, 47, 58, 0.2);
}

.button-ghost {
  color: white;
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.04);
}

.hero-number {
  position: relative;
  min-height: 315px;
  padding: 42px 37px 35px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 17px;
  background: rgba(32, 44, 57, 0.72);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
}

.hero-number::before {
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 5px;
  background: linear-gradient(90deg, var(--teal), var(--coral));
  content: "";
}

.hero-number-label {
  display: block;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero-number strong {
  display: block;
  margin: 20px 0 4px;
  color: #fff;
  font-size: clamp(54px, 6vw, 76px);
  font-weight: 770;
  letter-spacing: -0.07em;
  line-height: 1;
}

.hero-number-change {
  display: inline-flex;
  margin-top: 8px;
  padding: 6px 9px;
  color: #ff9aa1;
  border-radius: 7px;
  background: rgba(201, 47, 58, 0.12);
  font-size: 12px;
  font-weight: 750;
}

.hero-spark {
  position: absolute;
  right: 24px;
  bottom: 24px;
  left: 24px;
  height: 78px;
  opacity: 0.7;
}

.hero-spark svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.filter-wrap {
  position: sticky;
  z-index: 15;
  top: 0;
  padding: 12px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(241, 244, 248, 0.93);
  box-shadow: 0 8px 25px rgba(31, 42, 56, 0.05);
  backdrop-filter: blur(14px);
}

.filters {
  display: grid;
  width: min(100%, var(--content));
  margin: 0 auto;
  align-items: end;
  grid-template-columns: auto minmax(95px, 0.45fr) minmax(210px, 1.25fr) minmax(210px, 1fr) auto;
  gap: 12px;
}

.filter-title {
  display: flex;
  min-height: 43px;
  padding-right: 18px;
  align-items: center;
  gap: 9px;
  color: var(--ink-soft);
  border-right: 1px solid var(--line);
  font-size: var(--font-caption);
  font-weight: 820;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 5px rgba(201, 47, 58, 0.1);
}

.filters label {
  display: grid;
  gap: 4px;
}

.filters label > span {
  color: #718079;
  font-size: var(--font-caption);
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.filters select {
  width: 100%;
  height: 43px;
  padding: 0 38px 0 13px;
  color: var(--ink);
  border: 1px solid rgba(101, 114, 134, 0.2);
  border-radius: 10px;
  appearance: none;
  background-color: #fff;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%),
    linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%);
  background-position:
    calc(100% - 17px) 18px,
    calc(100% - 12px) 18px;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
  font-size: var(--font-small);
  font-weight: 680;
}

.filter-reset {
  height: 43px;
  padding: 0 15px;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  font-size: var(--font-small);
  font-weight: 740;
}

.filter-reset:hover {
  color: var(--ink);
  background: var(--paper-tint);
}

/* The first reading is now an authored story.  Controls live in a clearly
   labelled explorer near the end instead of interrupting the hero. */
.report-explorer {
  padding-top: 96px;
  padding-bottom: 96px;
}

.report-explorer .filter-wrap {
  position: relative;
  top: auto;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fff;
  box-shadow: var(--shadow);
  backdrop-filter: none;
}

.explorer-note {
  margin: 15px 3px 0;
  color: var(--ink-soft);
  font-size: var(--font-small);
  line-height: 1.6;
}

.section {
  width: min(calc(100% - 48px), var(--content));
  margin: 0 auto;
  padding: 100px 0;
}

.section-intro {
  padding-top: 78px;
  padding-bottom: 30px;
}

.section-tinted,
.section-dark {
  position: relative;
  width: 100%;
  max-width: none;
  padding-right: max(24px, calc((100% - var(--content)) / 2));
  padding-left: max(24px, calc((100% - var(--content)) / 2));
}

.section-tinted {
  background: #e9eef4;
}

.section-dark {
  color: #fff;
  background: var(--forest);
}

.section-heading {
  display: grid;
  margin-bottom: 42px;
  align-items: end;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.7fr);
  gap: 50px;
}

.compact-heading {
  margin-bottom: 25px;
}

.section-heading h2 {
  max-width: 760px;
  margin: 9px 0 0;
  font-size: clamp(34px, 4.5vw, 58px);
  font-weight: 740;
  letter-spacing: -0.055em;
  line-height: 1.03;
}

.compact-heading h2 {
  font-size: clamp(30px, 3.6vw, 44px);
}

.section-summary {
  max-width: 500px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.65;
}

.section-dark .section-summary {
  color: rgba(255, 255, 255, 0.6);
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
}

.fact-card,
.skeleton-card {
  min-height: 190px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--paper-strong);
}

.skeleton-card {
  background: linear-gradient(100deg, #ece9e1 25%, #f6f3eb 45%, #ece9e1 65%);
  background-size: 250% 100%;
  animation: shimmer 1.6s infinite linear;
}

@keyframes shimmer {
  to { background-position-x: -250%; }
}

.fact-index {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #8a958f;
  font-size: var(--font-caption);
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.fact-icon {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  color: var(--teal);
  border-radius: 50%;
  background: rgba(201, 47, 58, 0.09);
  font-size: 14px;
}

.fact-card strong {
  display: block;
  margin: 24px 0 8px;
  font-size: clamp(28px, 3vw, 39px);
  font-weight: 770;
  letter-spacing: -0.05em;
  line-height: 1;
}

.fact-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.55;
}

.fact-card.accent {
  color: #fff;
  border-color: var(--teal);
  background: var(--teal);
}

.fact-card.accent .fact-index,
.fact-card.accent p {
  color: rgba(255, 255, 255, 0.72);
}

.fact-card.accent .fact-icon {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.chart-card,
.dark-card {
  border-radius: var(--radius);
}

.chart-card {
  padding: 29px;
  border: 1px solid var(--line);
  background: var(--paper-strong);
  box-shadow: var(--shadow);
}

.chart-card-wide {
  padding: 33px 36px 26px;
}

.chart-card-header {
  display: flex;
  min-height: 52px;
  margin-bottom: 25px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.chart-card h3,
.dark-card h3 {
  margin: 6px 0 0;
  font-size: 20px;
  font-weight: 720;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.legend {
  display: flex;
  padding-top: 4px;
  flex-wrap: wrap;
  gap: 15px;
  color: var(--ink-soft);
  font-size: var(--font-caption);
  font-weight: 700;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.color-enrolled { background: var(--teal); }
.color-admitted { background: var(--coral); }
.color-graduated { background: var(--amber); }

.line-chart {
  position: relative;
  min-width: 0;
  min-height: 350px;
  /* Direct labels are useful on a wide canvas, while a compact series key is
     clearer inside a narrow card.  Container queries make that decision from
     the chart's real width rather than the whole browser window. */
  container-type: inline-size;
}

/* A readable, horizontally scrollable SVG must not force its grid card wider
   than the phone viewport. */
.two-column-grid > *,
.three-column-grid > *,
.chart-card,
.dark-card {
  min-width: 0;
}

.interactive-chart {
  border-radius: 10px;
  outline: none;
}

.chart-svg-scroll {
  width: 100%;
}

.chart-series-key {
  display: none;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin: 0 0 8px;
  color: var(--ink-soft);
  font-size: var(--font-caption);
  font-weight: 750;
}

.chart-series-key span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.chart-series-key::after {
  display: none;
}

.section-dark .chart-series-key {
  color: rgba(255, 255, 255, 0.78);
}

.section-dark .chart-series-key::after {
  color: rgba(255, 255, 255, 0.58);
}

.interactive-chart:focus-visible {
  box-shadow: 0 0 0 3px rgba(47, 112, 216, 0.2);
  outline: 2px solid var(--blue);
  outline-offset: 4px;
}

.line-chart svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

/* Presentation attributes in generated SVGs previously supplied 10 px text.
   A stylesheet rule wins over those attributes and gives every chart axis,
   tick, and generated annotation the same readable floor. */
svg text {
  font-size: var(--font-caption);
}

/* The shared renderer compensates this value for the current SVG/viewBox
   ratio.  Unlike a nominal 12-unit SVG size, the result is truly 12 CSS pixels
   after a card is resized or the reader changes browser zoom. */
.line-chart svg text {
  font-size: var(--chart-svg-font-size, var(--font-caption));
}

.small-chart {
  min-height: 205px;
}

.chart-grid-line {
  stroke: rgba(101, 114, 134, 0.16);
  stroke-dasharray: 2 5;
}

.chart-axis-label {
  fill: #7d8a84;
  font-family: var(--font-sans);
  font-size: var(--font-caption);
}

.chart-path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.chart-point {
  stroke: var(--paper-strong);
  stroke-width: 3;
  cursor: crosshair;
}

.chart-point:focus,
.chart-point:hover {
  r: 6;
}

.chart-hit-area {
  fill: transparent;
  cursor: crosshair;
  pointer-events: all;
  touch-action: pan-y;
}

.chart-interaction {
  pointer-events: none;
}

.chart-crosshair {
  stroke: rgba(13, 20, 28, 0.42);
  stroke-dasharray: 4 4;
  stroke-width: 1.2;
}

.chart-hover-point {
  stroke: var(--paper-strong);
  stroke-width: 3;
  filter: drop-shadow(0 2px 4px rgba(13, 20, 28, 0.18));
}

.chart-direct-label {
  font-family: var(--font-sans);
  font-size: var(--font-caption);
  font-weight: 800;
  paint-order: stroke;
  stroke: var(--paper-strong);
  stroke-linejoin: round;
  stroke-width: 4px;
}

.chart-label-connector {
  opacity: 0.55;
  stroke-width: 1;
}

.chart-tooltip {
  position: absolute;
  z-index: 12;
  width: min(270px, calc(100% - 24px));
  padding: 12px 13px;
  border: 1px solid rgba(101, 114, 134, 0.24);
  border-radius: 12px;
  background: rgba(255, 254, 250, 0.96);
  box-shadow: 0 16px 40px rgba(13, 20, 28, 0.17);
  color: var(--ink);
  pointer-events: none;
  backdrop-filter: blur(14px);
}

.chart-tooltip.align-right {
  transform: none;
}

.chart-tooltip[hidden] {
  display: none;
}

.chart-tooltip-year {
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-serif);
  font-size: 18px;
}

.chart-tooltip-body {
  display: grid;
  gap: 9px;
}

.chart-tooltip-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 12px;
  align-items: baseline;
  font-size: var(--font-small);
}

.chart-tooltip-label {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}

.chart-tooltip-swatch {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--series-color);
}

.chart-tooltip-row small {
  grid-column: 1 / -1;
  color: var(--ink-soft);
  font-size: var(--font-caption);
  line-height: 1.45;
}

.chart-data {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin-top: 13px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.chart-data summary {
  min-height: var(--compact-control-height);
  padding: 9px 12px;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: var(--font-caption);
  font-weight: 750;
}

.chart-data summary:focus-visible {
  border-radius: 8px;
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.chart-table-wrap {
  max-height: 280px;
  overflow: auto;
  border-top: 1px solid var(--line);
}

.chart-data table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-caption);
  font-variant-numeric: tabular-nums;
}

.chart-data th,
.chart-data td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}

.chart-data th:first-child,
.chart-data td:first-child {
  text-align: left;
}

.section-dark .chart-tooltip {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(20, 29, 39, 0.96);
  color: #fff;
}

.section-dark .chart-tooltip-row small,
.section-dark .chart-data summary {
  color: rgba(255, 255, 255, 0.62);
}

.section-dark .chart-direct-label {
  stroke: #101820;
}

.section-dark .chart-data {
  border-color: rgba(255, 255, 255, 0.12);
}

.section-dark .chart-data table {
  color: rgba(255, 255, 255, 0.76);
}

.section-dark .chart-data th,
.section-dark .chart-data td,
.section-dark .chart-table-wrap {
  border-color: rgba(255, 255, 255, 0.1);
}

.chart-footnote,
.interaction-note {
  margin: 19px 0 0;
  color: #7b8882;
  font-size: var(--font-caption);
  line-height: 1.55;
}

.two-column-grid,
.three-column-grid,
.ac-layout {
  display: grid;
  margin-top: 17px;
  gap: 17px;
}

.two-column-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.vpo-context-card {
  margin-top: 17px;
  overflow: hidden;
}

.vpo-context-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 38px;
  align-items: center;
}

.vpo-context-layout > * {
  /* Without this constraint the 760px phone canvas becomes the grid item's
     intrinsic width and the right half of the СПО/ВО comparison is clipped by
     its card instead of scrolling inside .chart-svg-scroll. */
  min-width: 0;
}

.vpo-context-layout .line-chart {
  min-height: 285px;
}

.context-legend {
  justify-content: center;
  padding-top: 8px;
}

.vpo-facts {
  display: grid;
  border-top: 1px solid var(--line);
}

.vpo-fact {
  display: grid;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 18px;
}

.vpo-fact span {
  color: var(--ink-soft);
  font-size: var(--font-small);
  line-height: 1.45;
}

.vpo-fact strong {
  color: var(--ink);
  font-size: 19px;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.three-column-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ac-layout {
  grid-template-columns: minmax(0, 1.25fr) minmax(310px, 0.75fr);
}

.ac-ranking-card,
.ac-detail-card {
  box-shadow: none;
}

.horizontal-bars {
  display: grid;
  gap: 11px;
}

.bar-button {
  display: grid;
  width: 100%;
  min-height: var(--compact-control-height);
  padding: 5px 0;
  color: var(--ink);
  border: 0;
  background: none;
  cursor: pointer;
  grid-template-columns: minmax(120px, 0.9fr) minmax(130px, 1.3fr) 82px;
  align-items: center;
  gap: 11px;
  text-align: left;
}

.bar-label {
  overflow: hidden;
  font-size: var(--font-small);
  font-weight: 680;
  line-height: 1.25;
  text-overflow: ellipsis;
}

.bar-track {
  position: relative;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(101, 114, 134, 0.12);
}

.bar-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
  transition: width 420ms cubic-bezier(0.2, 0.75, 0.2, 1);
}

.bar-button:hover .bar-fill,
.bar-button.active .bar-fill {
  background: var(--coral);
}

.bar-button.active .bar-label {
  color: var(--teal);
  font-weight: 800;
}

.bar-value {
  color: var(--ink-soft);
  font-size: var(--font-caption);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.big-delta {
  margin: 20px 0 13px;
  color: var(--teal);
  font-family: var(--font-serif);
  font-size: clamp(42px, 5vw, 64px);
  line-height: 1;
}

.mini-facts {
  display: grid;
  margin-top: 20px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.mini-fact span {
  display: block;
  color: #88938e;
  font-size: var(--font-caption);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mini-fact strong {
  display: block;
  margin-top: 5px;
  font-size: 17px;
  letter-spacing: -0.03em;
}

.regions-grid {
  align-items: stretch;
}

.regions-grid > .chart-card {
  min-height: 570px;
}

.region-bars .bar-button {
  grid-template-columns: minmax(150px, 1.15fr) minmax(100px, 0.85fr) 76px;
}

.ranking-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.ranking-table th,
.ranking-table td {
  padding: 9px 7px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.ranking-table th {
  color: #84909f;
  font-size: var(--font-caption);
  font-weight: 850;
  letter-spacing: 0.09em;
  text-align: left;
  text-transform: uppercase;
}

.ranking-table th:nth-child(1) { width: 45%; }
.ranking-table th:nth-child(2) { width: 35%; }
.ranking-table th:nth-child(3) { width: 20%; text-align: right; }

.ranking-region-button {
  width: 100%;
  min-height: var(--compact-control-height);
  padding: 5px 0;
  overflow: hidden;
  color: var(--ink);
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: var(--font-caption);
  font-weight: 690;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-region-button:hover {
  color: var(--teal);
}

.table-bar-track {
  display: block;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(101, 114, 134, 0.12);
}

.table-bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d63843, #c92f3a);
}

.ranking-number {
  color: var(--ink-soft);
  font-size: var(--font-caption);
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.demographic-card {
  margin-top: 17px;
  box-shadow: none;
}

.source-chip {
  padding: 7px 10px;
  color: var(--teal);
  border: 1px solid rgba(201, 47, 58, 0.2);
  border-radius: 999px;
  background: rgba(201, 47, 58, 0.06);
  font-size: var(--font-caption);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.demographic-content {
  min-height: 280px;
}

.demographic-content > p {
  color: var(--ink-soft);
}

.rate-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 34px;
  align-items: center;
}

.rate-ranking {
  display: grid;
  gap: 9px;
}

.rate-summary {
  padding: 25px;
  border-radius: 18px;
  background: var(--paper-tint);
}

.rate-summary strong {
  display: block;
  color: var(--teal);
  font-size: 46px;
  letter-spacing: -0.06em;
  line-height: 1;
}

.rate-summary span {
  display: block;
  margin-top: 9px;
  color: var(--ink-soft);
  font-size: 12px;
}

.rate-summary p {
  margin: 20px 0 0;
  color: var(--ink-soft);
  font-size: var(--font-small);
  line-height: 1.6;
}

.section-dark .section-kicker,
.section-dark .chart-overline {
  color: var(--teal-light);
}

.dark-card {
  min-width: 0;
  padding: 27px;
  border: 1px solid var(--line-dark);
  background: rgba(255, 255, 255, 0.045);
}

.dark-card h3 {
  color: #fff;
}

.share-list {
  display: grid;
  gap: 17px;
}

.share-row {
  display: grid;
  gap: 7px;
}

.share-row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 15px;
}

.share-row-head span {
  color: var(--ink-soft);
  font-size: var(--font-small);
  font-weight: 660;
}

.share-row-head strong {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.share-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(101, 114, 134, 0.14);
}

.share-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.inverted .share-row-head span {
  color: rgba(255, 255, 255, 0.62);
}

.inverted .share-track {
  background: rgba(255, 255, 255, 0.1);
}

.inverted .share-track i {
  background: var(--coral);
}

.composition-detail-grid {
  margin-top: 17px;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
}

.composition-detail-grid > * {
  min-width: 0;
}

.gender-bars {
  display: grid;
  gap: 12px;
}

.gender-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 18px;
  color: rgba(255, 255, 255, 0.68);
  font-size: var(--font-caption);
  font-weight: 720;
}

.gender-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.gender-legend i {
  width: 18px;
  height: 5px;
  border-radius: 999px;
}

.gender-row {
  display: grid;
  min-height: var(--compact-control-height);
  grid-template-columns: minmax(150px, 1fr) minmax(140px, 1.15fr) 48px;
  align-items: center;
  gap: 11px;
}

.gender-label {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--font-caption);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gender-track {
  display: flex;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.gender-women {
  height: 100%;
  background: #d63843;
}

.gender-men {
  height: 100%;
  background: #4f86df;
}

.gender-value {
  color: rgba(255, 255, 255, 0.82);
  font-size: var(--font-caption);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.age-chart {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.age-chart-scroll {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 28px 2px 5px;
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: 10px;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}

.age-chart-scroll:focus-visible {
  box-shadow: 0 0 0 3px rgba(79, 134, 223, 0.24);
  outline: 2px solid #6ca1f5;
  outline-offset: 3px;
}

.age-columns {
  display: grid;
  min-width: 560px;
  min-height: 300px;
  grid-template-columns: repeat(var(--age-count, 21), minmax(22px, 1fr));
  align-items: end;
  gap: 4px;
}

.age-column {
  position: relative;
  display: grid;
  height: 280px;
  align-items: end;
  grid-template-rows: 1fr auto;
  gap: 7px;
}

.age-value {
  position: absolute;
  z-index: 2;
  top: -24px;
  left: 50%;
  padding: 3px 6px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  background: rgba(13, 20, 28, 0.94);
  box-shadow: 0 7px 20px rgba(0, 0, 0, 0.2);
  font-size: var(--font-caption);
  font-variant-numeric: tabular-nums;
  font-weight: 760;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 5px);
  transition: opacity 180ms ease, transform 180ms ease;
  white-space: nowrap;
}

.age-column:hover .age-value,
.age-column.active .age-value {
  opacity: 1;
  transform: translate(-50%, 0);
}

.age-column:first-child .age-value {
  left: 0;
  transform: translate(0, 5px);
}

.age-column:first-child:hover .age-value,
.age-column:first-child.active .age-value,
.age-column:last-child:hover .age-value,
.age-column:last-child.active .age-value {
  transform: translate(0, 0);
}

.age-column:last-child .age-value {
  right: 0;
  left: auto;
  transform: translate(0, 5px);
}

.age-column-bar-wrap {
  display: flex;
  height: 100%;
  align-items: end;
}

.age-column-bar {
  width: 100%;
  min-height: 1px;
  border-radius: 4px 4px 1px 1px;
  background: linear-gradient(180deg, #ef575f 0%, #c92f3a 100%);
  box-shadow: 0 5px 14px rgba(201, 47, 58, 0.17);
  transition: height 350ms ease, filter 180ms ease, transform 180ms ease;
}

.age-column:hover .age-column-bar,
.age-column.active .age-column-bar {
  filter: brightness(1.16) saturate(1.08);
  transform: scaleX(1.12);
}

.age-label {
  overflow: visible;
  color: rgba(255, 255, 255, 0.42);
  font-size: var(--font-caption);
  text-align: center;
  white-space: nowrap;
}

.age-scroll-hint {
  display: none;
  margin: 7px 0 0;
  color: rgba(255, 255, 255, 0.56);
  font-size: var(--font-caption);
  font-weight: 680;
}

.section-dark .chart-footnote {
  color: rgba(255, 255, 255, 0.43);
}

.methodology {
  padding-bottom: 120px;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.method-grid article {
  min-height: 280px;
  padding: 28px 24px 32px;
  border-right: 1px solid var(--line);
}

.method-grid article:first-child {
  padding-left: 0;
}

.method-grid article:last-child {
  padding-right: 0;
  border-right: 0;
}

.method-number {
  color: var(--coral);
  font-family: var(--font-serif);
  font-size: 18px;
}

.method-grid h3,
.notes-grid h3 {
  margin: 30px 0 12px;
  font-size: 15px;
  letter-spacing: -0.02em;
}

.method-grid p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.7;
}

.method-grid code {
  padding: 2px 5px;
  color: var(--teal);
  border-radius: 4px;
  background: rgba(201, 47, 58, 0.07);
  /* Code fragments are words readers must understand, so they should not be
     reduced below the surrounding methodology text. */
  font-size: inherit;
}

.notes-grid {
  display: grid;
  margin-top: 55px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 90px;
}

.notes-grid h3 {
  margin-top: 0;
  font-size: 20px;
}

.notes-list,
.source-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  gap: 0;
}

.notes-list li,
.source-list li {
  position: relative;
  padding: 13px 0 13px 21px;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
  font-size: var(--font-small);
  line-height: 1.55;
}

.notes-list li::before,
.source-list li::before {
  position: absolute;
  top: 19px;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal);
  content: "";
}

.source-list a {
  color: var(--teal);
  font-weight: 700;
}

.site-footer {
  display: flex;
  min-height: 180px;
  padding: 45px max(24px, calc((100% - var(--content)) / 2));
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  color: #fff;
  background: #0a1914;
}

.site-footer strong {
  font-size: 19px;
}

.site-footer p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.48);
  font-size: var(--font-caption);
}

.footer-meta {
  display: grid;
  color: rgba(255, 255, 255, 0.45);
  font-size: var(--font-caption);
  gap: 5px;
  text-align: right;
}

.error-banner {
  position: fixed;
  z-index: 100;
  right: 20px;
  bottom: 20px;
  display: grid;
  max-width: 410px;
  padding: 17px 20px;
  color: #fff;
  border-radius: 12px;
  background: #8f352b;
  box-shadow: var(--shadow);
  gap: 3px;
}

.error-banner span {
  color: rgba(255, 255, 255, 0.75);
  font-size: 12px;
}

.empty-state {
  display: grid;
  min-height: 210px;
  padding: 25px;
  place-items: center;
  color: var(--ink-soft);
  border: 1px dashed var(--line);
  border-radius: 13px;
  text-align: center;
}

/* -------------------------------------------------------------------------
 * Motion system
 *
 * Movement is deliberately tied to information hierarchy: the shell arrives
 * first, editorial blocks reveal on scroll, and data marks animate only when
 * their values are rendered.  The reduced-motion block at the end disables
 * every non-essential effect.
 * ---------------------------------------------------------------------- */

.site-header {
  animation: header-arrive 720ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-shell::before {
  animation: ambient-orbit 15s ease-in-out infinite alternate;
}

.hero-copy > * {
  animation: hero-rise 760ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-copy > :nth-child(1) { animation-delay: 120ms; }
.hero-copy > :nth-child(2) { animation-delay: 190ms; }
.hero-copy > :nth-child(3) { animation-delay: 270ms; }
.hero-copy > :nth-child(4) { animation-delay: 350ms; }

.hero-number {
  animation: hero-card-arrive 900ms 290ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.fact-card {
  animation: card-arrive 620ms calc(var(--card-index, 1) * 65ms) cubic-bezier(0.16, 1, 0.3, 1) both;
  transition:
    transform 360ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 360ms ease,
    border-color 360ms ease;
}

.fact-card:hover {
  border-color: rgba(47, 112, 216, 0.23);
  box-shadow: 0 18px 42px rgba(31, 42, 56, 0.11);
  transform: translateY(-6px);
}

.fact-card.accent:hover {
  border-color: transparent;
  box-shadow: 0 20px 45px rgba(201, 47, 58, 0.24);
}

.chart-card,
.dark-card {
  transition:
    transform 420ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 420ms ease,
    border-color 420ms ease;
}

.chart-card:hover {
  border-color: rgba(47, 112, 216, 0.2);
  box-shadow: 0 24px 58px rgba(31, 42, 56, 0.12);
  transform: translateY(-3px);
}

.dark-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
}

.chart-path {
  /* Never hide the tail of a time series while animating it.  The previous
     pathLength + dash-offset technique mixed normalized SVG units with
     non-scaling strokes: when a chart became wider than its viewBox, the dash
     stayed shorter than the rendered curve and the line stopped several
     years before its final dots.  A full-path fade remains smooth at every
     viewport size, browser zoom, and filter-driven y-axis scale. */
  stroke-dasharray: none;
  stroke-dashoffset: 0;
  animation: chart-line-arrive 720ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.chart-point {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: chart-point-pop 420ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.bar-button {
  animation: row-arrive 480ms calc(var(--row-index, 0) * 32ms) cubic-bezier(0.16, 1, 0.3, 1) both;
}

.bar-fill,
.share-track i {
  transform-origin: left;
  animation: bar-grow 760ms calc(var(--row-index, 0) * 35ms) cubic-bezier(0.16, 1, 0.3, 1) both;
}

.age-column-bar {
  transform-origin: bottom;
  animation: column-grow 740ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.reveal-item {
  opacity: 0;
  transform: translateY(30px) scale(0.985);
  transition:
    opacity 720ms var(--reveal-delay, 0ms) cubic-bezier(0.16, 1, 0.3, 1),
    transform 720ms var(--reveal-delay, 0ms) cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-item.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@keyframes header-arrive {
  from { opacity: 0; transform: translate(-50%, -24px) scale(0.98); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

@keyframes ambient-orbit {
  from { transform: translate3d(0, 0, 0) scale(0.96) rotate(-2deg); }
  to { transform: translate3d(-34px, 26px, 0) scale(1.07) rotate(4deg); }
}

@keyframes hero-rise {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes hero-card-arrive {
  from { opacity: 0; transform: translateX(34px) rotate(1.2deg) scale(0.96); }
  to { opacity: 1; transform: translateX(0) rotate(0) scale(1); }
}

@keyframes card-arrive {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes chart-line-arrive {
  from { opacity: 0.22; }
  to { opacity: 1; }
}

@keyframes chart-point-pop {
  from { opacity: 0; transform: scale(0); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes row-arrive {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes bar-grow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes column-grow {
  from { opacity: 0; transform: scaleY(0); }
  to { opacity: 1; transform: scaleY(1); }
}

@media (max-width: 1050px) {
  .hero {
    gap: 40px;
  }

  .fact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filters {
    grid-template-columns: minmax(90px, 0.4fr) minmax(200px, 1fr) minmax(200px, 1fr) auto;
  }

  .filter-title {
    display: none;
  }

  .ac-layout,
  .composition-detail-grid,
  .vpo-context-layout {
    grid-template-columns: 1fr;
  }

  .three-column-grid {
    grid-template-columns: 1fr 1fr;
  }

  .three-column-grid > :last-child {
    grid-column: 1 / -1;
  }

  .method-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .method-grid article:nth-child(2) {
    border-right: 0;
  }

  .method-grid article:first-child {
    padding-left: 24px;
  }

  .method-grid article:last-child {
    padding-right: 24px;
  }

  .method-grid article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 800px) {
  .site-header {
    width: min(calc(100% - 32px), var(--content));
  }

  .top-nav {
    display: none;
  }

  .header-actions {
    gap: 0;
  }

  .hero {
    width: min(calc(100% - 32px), var(--content));
    min-height: auto;
    padding: 135px 0 70px;
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero-number {
    min-height: 270px;
  }

  .filter-wrap {
    position: relative;
    padding: 15px 16px;
  }

  .filters {
    grid-template-columns: 1fr 1fr;
  }

  .filter-region {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .filter-reset {
    grid-column: 1 / -1;
  }

  .section {
    width: min(calc(100% - 32px), var(--content));
    padding: 74px 0;
  }

  .section-tinted,
  .section-dark {
    width: 100%;
    padding-right: 16px;
    padding-left: 16px;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .two-column-grid,
  .three-column-grid {
    grid-template-columns: 1fr;
  }

  .three-column-grid > :last-child {
    grid-column: auto;
  }

  .regions-grid > .chart-card {
    min-height: auto;
  }

  .rate-layout {
    grid-template-columns: 1fr;
  }

  .notes-grid {
    grid-template-columns: 1fr;
    gap: 50px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-meta {
    text-align: left;
  }
}

@media (max-width: 560px) {
  .site-header {
    padding-right: 10px;
    padding-left: 10px;
  }

  .brand-copy small {
    display: none;
  }

  .report-switcher a {
    min-width: 43px;
    padding-right: 8px;
    padding-left: 8px;
  }

  .hero h1 {
    font-size: 45px;
  }

  .hero-number {
    padding: 32px 25px;
  }

  .fact-grid {
    grid-template-columns: 1fr;
  }

  .chart-card,
  .chart-card-wide,
  .dark-card {
    padding: 22px 18px;
    border-radius: 17px;
  }

  .chart-card-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .legend {
    padding-top: 0;
  }

  .line-chart {
    min-height: 270px;
  }

  .bar-button,
  .region-bars .bar-button {
    grid-template-columns: minmax(88px, 1fr) minmax(48px, 0.65fr) 58px;
    gap: 6px;
  }

  .bar-label {
    font-size: var(--font-caption);
  }

  /* Long region and subject names are information, not decoration.  At phone
     widths they wrap inside taller rows instead of being silently ellipsized. */
  .bar-label,
  .ranking-region-button,
  .gender-label {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  .gender-row {
    grid-template-columns: minmax(96px, 1fr) minmax(58px, 0.72fr) 62px;
    gap: 6px;
  }

  .ranking-table th,
  .ranking-table td {
    padding-right: 4px;
    padding-left: 4px;
  }

  .method-grid {
    grid-template-columns: 1fr;
  }

  .method-grid article,
  .method-grid article:first-child,
  .method-grid article:last-child {
    min-height: auto;
    padding: 24px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .method-grid article:last-child {
    border-bottom: 0;
  }

  .age-columns {
    min-width: 620px;
    grid-template-columns: repeat(var(--age-count, 21), minmax(24px, 1fr));
  }

  .age-scroll-hint {
    display: block;
  }
}

@media (max-width: 360px) {
  .site-header {
    width: calc(100% - 16px);
  }

  .brand-copy {
    display: none;
  }

  .brand-mark {
    width: 39px;
    height: 39px;
  }

  .report-switcher a {
    min-width: 39px;
    padding-right: 6px;
    padding-left: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal-item {
    opacity: 1 !important;
    transform: none !important;
  }

  .chart-path {
    opacity: 1 !important;
    stroke-dasharray: none !important;
    stroke-dashoffset: 0 !important;
  }
}

/* Card-level responsiveness matters on desktop too: a two-column chart may be
   only 430px wide even when the browser itself is 1,440px. */
@container (max-width: 680px) {
  .chart-direct-label,
  .chart-label-connector {
    display: none;
  }

  .chart-series-key {
    display: flex;
  }
}

@media (max-width: 620px) {
  .chart-direct-label,
  .chart-label-connector {
    display: none;
  }

  .chart-tooltip {
    width: min(238px, calc(100% - 18px));
    padding: 10px 11px;
  }

  .interactive-chart {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 0;
  }

  .chart-svg-scroll {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
  }

  .chart-svg-scroll svg {
    width: 760px;
    max-width: none;
  }

  .chart-series-key {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    margin: 0 0 8px;
    color: var(--ink-soft);
    font-size: var(--font-caption);
    font-weight: 750;
  }

  .chart-series-key span {
    display: inline-flex;
    gap: 6px;
    align-items: center;
  }

  .chart-series-key::after {
    display: block;
    margin-left: auto;
    color: var(--ink-soft);
    content: "график ↔";
    font-size: var(--font-caption);
    font-weight: 650;
    white-space: nowrap;
  }

  .section-dark .chart-series-key {
    color: rgba(255, 255, 255, 0.78);
  }

  .section-dark .chart-series-key::after {
    color: rgba(255, 255, 255, 0.58);
  }
}
