:root {
  /* Поверхности, текст и состояния. */
  --canvas: #fff;
  --surface: var(--canvas);
  --ink: #202c34;
  --muted: #53636d;
  --line: #e0e8ec;
  --line-strong: #cbd9df;
  --brand: #155a76;
  --brand-hover: #10455e;
  --brand-soft: #e6f3f7;
  --brand-selection: oklch(92% .053 228);
  --brand-line: #cbdfe8;
  --navigation-hover: #edf4f6;
  --panel: #f5f9fa;
  --on-dark: var(--canvas);
  --scrollbar-thumb: #b8cbd4;
  --dialog-backdrop: #20374759;
  --photo-label-surface: #ffffffef;
  --header-wash: linear-gradient(105deg, oklch(91% .106 83 / .46), oklch(99% .02 86 / .15) 28%, oklch(94% .04 226 / .55) 65%, oklch(87% .09 222 / .54));
  --header-line: oklch(88% .035 228);

  /* Цветовые роли условий курса и иллюстрации. */
  --amber-ink: #743b13;
  --amber-light: #e5ac65;
  --amber-soft: oklch(95% .072 83);
  --amber-hover: oklch(91% .105 80);
  --heart-active: #e11d48;
  --heart-soft: var(--negative-surface);
  --heart-border: var(--negative-border);
  --offer-tag: linear-gradient(110deg, #fbd784, #ffeab9);
  --action-surface: oklch(95% .024 224);
  --action-edge: oklch(29% .058 232);
  --action-depth: inset 0 -2px 0 var(--action-edge);
  --action-icon-surface: oklch(99% .01 224 / .18);
  --action-shift: 2px;
  --hero-heading-ink: #163744;
  --hero-key-border: #22536a;
  --hero-key-gradient: linear-gradient(145deg, oklch(54% .13 236), #20526b 85%);
  --hero-disc-gradient: linear-gradient(145deg, oklch(97% .045 86), oklch(88% .135 79));
  --hero-ring: #39788b65;
  --hero-ring-faint: #39788b30;
  --shadow-menu: 0 6px 14px #20374714, 0 18px 42px #20374724;
  --shadow-sheet: 0 -8px 32px #20374726;
  --shadow-key: 0 3px 0 #123a4a, 0 6px 9px #204b5e36, inset 0 0 0 2px #93c6d94d;
  --shadow-key-pressed: 0 1px 0 #123a4a, 0 2px 4px #204b5e2e, inset 0 0 0 2px #93c6d966;
  --hero-sheen: linear-gradient(115deg, transparent 22%, #ffffff48 48%, transparent 74%);

  /* Шесть ступеней типографики, четыре начертания и три интерлиньяжа. */
  --font-ui: Onest, system-ui, sans-serif;
  --font-display: Geologica, var(--font-ui);
  --text-meta: .75rem;
  --text-body: .875rem;
  --text-title: 1rem;
  --text-emphasis: 1.25rem;
  --text-display-medium: 2rem;
  --text-display-large: 2.5rem;
  --text-display-mobile: 1.5rem;
  --text-page: var(--text-display-large);
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --leading-display: 1.1;
  --leading-title: 1.25;
  --leading-copy: 1.45;
  --tracking-title: -.025em;
  --tracking-display: -.045em;
  --tracking-brand: -.055em;

  /* Отступы, интерактивные размеры и слои. */
  --line-size: 1px;
  --space-2: 2px;
  --space-4: 4px;
  --space-6: 6px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-28: 28px;
  --space-32: 32px;
  --space-48: 48px;
  --space-64: 64px;
  --control-height: 36px;
  --disabled-opacity: .5;
  --radius-control: 5px;
  --radius-action: 12px;
  --radius-round: 999px;
  --radius-panel: 10px;
  --radius-sheet: 16px;
  --radius-art: 8px;
  --radius-art-small: 6px;
  --icon-small: 12px;
  --icon-medium: 16px;
  --icon-large: 20px;
  --icon-brand: 24px;
  --icon-illustration: 28px;
  --icon-fallback: var(--control-height);
  --layer-decoration: -1;
  --layer-base: 0;
  --layer-raised: 1;
  --layer-header: 4;
  --layer-skip: 20;
  --ease-standard: ease;
  --ease-smooth: ease-in-out;
  --dialog-max-height: 90dvh;
  --viewport-full-height: 100dvh;
  --filter-viewport-max: 38vw;
  --nav-gap-fluid: clamp(var(--space-4), 1vw, var(--space-16));

  /* Каркас страницы и навигация. */
  --gutter: clamp(16px, 3vw, 40px);
  --wrap: 1320px;
  --header-gap: clamp(14px, 2.8vw, 44px);
  --header-height: 64px;
  --header-height-wide: 60px;
  --header-height-mobile: 58px;
  --header-search-width: clamp(124px, 17vw, 230px);
  --menu-width: 1040px;
  --menu-height: 414px;
  --menu-inset: 146px;
  --menu-viewport-inset: 88px;
  --menu-navigation-width: 200px;
  --menu-featured-width: clamp(200px, 22vw, 260px);
  --menu-course-cover-size: 48px;
  --sidebar-width: 214px;
  --sidebar-width-medium: 188px;
  --rail-width: 248px;
  --rail-width-medium: 224px;
  --rail-rank-size: 20px;
  --banner-label: #d4e7ef;
  --banner-copy: #e7f2f7;
  --banner-cta-hover: #fbd784;

  /* Раздел каталога и иллюстрация заголовка. */
  --hero-height: 78px;
  --hero-height-wide: 68px;
  --hero-height-phone: 64px;
  --hero-padding: 23px;
  --hero-padding-phone: 15px;
  --hero-art-reserve: clamp(152px, 19vw, 246px);
  --hero-art-width: clamp(146px, 18vw, 232px);
  --hero-art-width-phone: 102px;
  --hero-title-reserve-phone: 108px;
  --hero-ring-size: 98px;
  --hero-ring-outer-size: 132px;
  --hero-ring-size-phone: 76px;
  --hero-disc-size-phone: 56px;
  --hero-key-width: 69px;
  --hero-key-height: 43px;
  --hero-key-width-phone: 42px;
  --hero-key-height-phone: 28px;
  --hero-ring-transform: rotate(-39deg);
  --hero-key-transform: rotate(-12deg);
  --hero-key-press-y: 4px;
  --hero-float-y: -4px;
  --hero-shift-x: 0px;
  --hero-shift-y: 0px;
  --hero-tilt-x: 0deg;
  --hero-tilt-y: 0deg;

  /* Анимации и переходы. */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --motion-fast: 0.12s;
  --motion-ui: 0.14s;
  --motion-pop: 0.22s;
  --motion-pulse: 0.65s;
  --motion-breathe: 4.6s;
  --motion-float: 4.8s;
  --motion-orbit-fast: 5s;
  --motion-sheen: 5.5s;
  --motion-orbit: 16s;
  --filter-max-width: 178px;
  --filter-search-min: 158px;
  --filter-search-max: 236px;

  /* Пропорции карточки и диалогов. */
  --course-cover-width: 136px;
  --course-cover-width-wide: 124px;
  --course-cover-width-medium: 112px;
  --course-cover-width-phone: 82px;
  --course-cover-height: 92px;
  --course-cover-height-wide: 84px;
  --course-offer-width: 178px;
  --course-offer-width-medium: 157px;
  --course-description-measure: 65ch;
  --price-caption-height: 17px;
  --price-discount-height: 21px;
  --offer-tag-shape: polygon(5px 0, 100% 0, 100% 100%, 5px 100%, 0 50%);
  --dialog-width: 550px;
  --dialog-height: 720px;
  --dialog-viewport-limit: 85dvh;
  --sheet-viewport-limit: 78dvh;
  --sheet-height: 590px;
  --sheet-category-height: 550px;
  --sheet-header-height: 58px;

  /* Главная страница. */
  --home-hero-padding: 32px;
  --home-hero-surface: radial-gradient(circle at 16% 18%, #ffffff 0%, transparent 52%), radial-gradient(circle at 88% 20%, oklch(92% .04 232 / .75) 0%, transparent 48%), linear-gradient(135deg, #f8fbfd 0%, #edf5f8 100%);
  --home-hero-lift: -2px;
  --home-section-gap: 32px;
  --home-category-icon: 40px;
  --home-school-logo: 32px;
  --home-chip-height: 28px;
  --home-sub-measure: 52ch;
  --home-podium-thumb-height: 112px;
  --home-top-thumb-width: 96px;
  --home-top-thumb-height: 64px;
  --home-card-shadow: 0 10px 26px #155a7614;
  --home-cover-scrim: linear-gradient(180deg, transparent 42%, #12232c66 100%);
  --home-quiz-surface: linear-gradient(128deg, var(--brand) 0%, var(--brand-hover) 100%);

  /* Детальная страница курса. */
  --course-detail-offer-width: 316px;
  --course-detail-offer-medium: 288px;
  --course-detail-specs-width: 360px;
  --course-detail-spec-label: 168px;
  --course-detail-review-height: 92px;
  --course-detail-mobile-bar: 68px;
  --course-action-height: 44px;
  --course-action-edge: oklch(73% .105 77);
  --course-action-shadow: inset 0 -2px 0 var(--course-action-edge);
  --slide-card-width: 312px;
  --slide-card-width-phone: 240px;
  --slide-card-cover-height: 180px;
  --slide-card-title-height: 40px;
  --course-teacher-avatar: 44px;
  --course-advantage-icon: 42px;

  /* Интерактивная 3D-коробка курса (коробочное издание). */
  --box3d-stage-width: 264px;
  --box3d-width: 224px;
  --box3d-height: 292px;
  --box3d-depth: 50px;
  --box3d-width-phone: 136px;
  --box3d-height-phone: 176px;
  --box3d-depth-phone: 30px;
  --box3d-perspective: 1100px;
  --box3d-rx: 6deg;
  --box3d-ry: 24deg;
  --box3d-idle-duration: 7s;
  --box3d-idle-min-rx: 1deg;
  --box3d-idle-min-ry: -14deg;
  --box3d-idle-mid-ry: 10deg;
  --box3d-idle-rx: 10deg;
  --box3d-idle-ry: 34deg;
  --box3d-gloss-shift: 50%;
  --box3d-spine-gradient: linear-gradient(180deg, var(--brand) 0%, var(--brand-hover) 100%);
  --box3d-cover-surface: linear-gradient(155deg, #fbf8f1 0%, #f1eadc 100%);
  --box3d-cover-border: #dfd4be;
  --box3d-edge-surface: #e6dcc8;
  --box3d-pages-vertical: repeating-linear-gradient(90deg, #f7f3e8 0, #f7f3e8 2px, #e1d7c4 2px, #e1d7c4 3px);
  --box3d-pages-horizontal: repeating-linear-gradient(180deg, #f7f3e8 0, #f7f3e8 2px, #e1d7c4 2px, #e1d7c4 3px);
  --box3d-pages-lips: inset 0 0 0 4px #efe7d6, inset 0 0 10px #12232c18;
  --box3d-back-surface: linear-gradient(160deg, #fcfaf4 0%, #f3ecdd 100%);
  --box3d-gloss: linear-gradient(120deg, transparent 20%, #ffffff5e 48%, transparent 72%);
  --box3d-floor-shadow: radial-gradient(ellipse at center, #123a4a3a 0%, transparent 72%);
  --box3d-floor-height: 22px;
  --box3d-shadow-blur: 24px;
  --box3d-book-duration: 0.48s;
  --box3d-cover-open: -118deg;
  --box3d-open-rx: 0deg;
  --box3d-open-ry: 0deg;
  --box3d-open-shift: 22px;
  --box3d-cover-thickness: 6px;
  --box3d-endpaper-surface: linear-gradient(155deg, #f6f1e6 0%, #ebe3d2 100%);
  --box3d-endpaper-shadow: inset -14px 0 18px #12232c14;
  --box3d-endpaper-opacity: .12;
  --box3d-endpaper-tilt: -14deg;

  /* Редакционные блоки, таблицы сравнения, пагинация, FAQ, cookie-баннер и 4-шаговый квиз. */
  --layer-cookie: 30;
  --editorial-measure: 72ch;
  --editorial-facts-min: 180px;
  --partners-grid-min: 240px;
  --table-rank-width: 48px;
  --table-price-width: 150px;
  --table-action-width: 156px;
  --positive-surface: #ecfdf5;
  --positive-ink: #065f46;
  --positive-border: #a7f3d0;
  --negative-surface: #fff1f2;
  --negative-ink: #9f1239;
  --salary-bar-height: 8px;
  --salary-bar-track: #dce7ec;
  --negative-border: #fecdd3;
  --cookie-max-width: 420px;
  --cookie-shadow: 0 8px 24px #20374724;
  --error-code-size: clamp(3.5rem, 10vw, 6rem);
  --quiz-progress-height: 4px;
}

@media (max-width: 900px) {
  :root {
    --control-height: 44px;
    --text-page: var(--text-display-medium);
  }
}

@media (max-width: 630px) {
  :root {
    --text-page: var(--text-display-mobile);
    --slide-card-cover-height: 132px;
  }
}
