@charset "UTF-8";
/* ==== tokens/palette.css ==== */
/* Палитра — сырые значения цвета, не зависящие от темы.
   Единственное место с rgb(): семантические токены в colors.css
   ссылаются сюда, вёрстка сырые цвета не использует. */

:root {
  --ids__color-white: rgb(255, 255, 255);
  --ids__color-black: rgb(0, 0, 0);

  --ids__color-gray-50: rgb(245, 246, 248);
  --ids__color-gray-100: rgb(242, 243, 245);
  --ids__color-gray-200: rgb(230, 230, 230);
  --ids__color-gray-250: rgb(226, 229, 235);
  --ids__color-gray-300: rgb(214, 212, 211); /* фон студии на кадрах, усреднение по верхнему углу f_001 */
  --ids__color-gray-400: rgb(188, 187, 186);
  --ids__color-gray-500: rgb(150, 156, 168);

  --ids__color-navy-700: rgb(52, 64, 92);
  --ids__color-navy-800: rgb(30, 40, 62);
  --ids__color-navy-900: rgb(20, 30, 50);
  --ids__color-navy-950: rgb(12, 17, 28);

  --ids__color-teal-950: rgb(0, 24, 32);

  --ids__color-orange-400: rgb(255, 118, 84);
  --ids__color-orange-600: rgb(255, 40, 0);

  --ids__color-green-400: rgb(105, 231, 134);
  --ids__color-green-500: rgb(84, 180, 140);
  --ids__color-green-600: rgb(57, 179, 105); /* обложка книги */

  --ids__color-yellow-400: rgb(255, 235, 83);
  --ids__color-yellow-500: rgb(248, 218, 75);

  --ids__color-red-500: rgb(240, 84, 95);
  --ids__color-red-700: rgb(200, 0, 0);
}

/* ==== tokens/colors.css ==== */
/* Семантические цвета — каждое значение указывает на палитру.
   Именование функциональное: для чего используется, так и называется.
   Сайт всегда светлый; .dark — тёмная тема для отдельных плашек и блоков:
   класс на элементе переключает токены для всего, что внутри. */

:root {
  color-scheme: light;

  --ids__text: var(--ids__color-navy-900);
  --ids__text-caption: color-mix(in srgb, var(--ids__text) 50%, transparent);
  /* Неактивный пункт на пилюле цвета текста (языковой переключатель) */
  --ids__text-on-inverse: var(--ids__color-gray-200);
  --ids__link: var(--ids__color-teal-950);
  --ids__hover: var(--ids__color-orange-600);
  --ids__accent: var(--ids__color-green-400);
  /* Жёлтый акцент: активный сегмент переключателя разделов, плеер */
  --ids__highlight: var(--ids__color-yellow-500);
  --ids__code: var(--ids__color-red-700);
  --ids__mark: var(--ids__color-yellow-400);
  /* Реплика-пузырь в чате: ответы на консультациях */
  --ids__bubble: var(--ids__color-gray-250);
  --ids__surface: var(--ids__color-gray-100);
  --ids__background: var(--ids__color-white);
  /* Подложка под фото и кадры: цвет фона студии */
  --ids__photo-bg: var(--ids__color-gray-300);

  --ids__border: color-mix(in srgb, var(--ids__color-black) 10%, transparent);
  --ids__border-strong: color-mix(in srgb, var(--ids__color-black) 50%, transparent);

  --ids__error: var(--ids__color-red-500);
  --ids__success: var(--ids__color-green-500);
}

.dark {
  color-scheme: dark;
  color: var(--ids__text);
  background-color: var(--ids__background);

  --ids__text: var(--ids__color-gray-250);
  --ids__text-caption: var(--ids__color-gray-500);
  --ids__text-on-inverse: var(--ids__color-navy-700);
  --ids__link: var(--ids__color-gray-50);
  --ids__hover: var(--ids__color-orange-400);
  --ids__accent: var(--ids__color-green-400);
  --ids__highlight: var(--ids__color-yellow-500);
  --ids__code: var(--ids__color-orange-400);
  --ids__mark: var(--ids__color-yellow-400);
  --ids__bubble: var(--ids__color-navy-700);
  --ids__surface: var(--ids__color-navy-800);
  --ids__background: var(--ids__color-navy-950);
  --ids__photo-bg: var(--ids__color-gray-400);

  --ids__border: color-mix(in srgb, var(--ids__text) 20%, transparent);
  --ids__border-strong: color-mix(in srgb, var(--ids__text) 60%, transparent);

  --ids__error: var(--ids__color-red-500);
  --ids__success: var(--ids__color-green-500);
}

body {
  color: var(--ids__text);
  background-color: var(--ids__background);
}

/* Фото на тёмной плашке слепят — приглушаем */
.dark :is(img, canvas, video) {
  filter: brightness(0.88);
}

/* ==== tokens/scales.css ==== */
/* Именованные шкалы размеров.

   Композиция страницы — в rem: 1rem — флюидный базовый кегль (settings.css),
   значения не зависят от кегля окружения. Внутри компонентов со своим
   кеглем — em: отступы и радиусы масштабируются вместе с текстом. */

:root {
  /* Спейсеры .ids__space: шаг ×2, на мобиле сжимаются сильнее */
  --ids__spacer-xs: calc(var(--ids__density) * 1rem);
  --ids__spacer-s: calc(var(--ids__density) * 2rem);
  --ids__spacer-m: calc(var(--ids__density) * 4rem);
  --ids__spacer-l: calc(var(--ids__density) * 8rem);
  --ids__spacer-xl: calc(var(--ids__density) * 16rem);

  @media (width < 768px) {
    --ids__spacer-xs: calc(var(--ids__density) * 1rem / 3);
    --ids__spacer-s: calc(var(--ids__density) * 1rem / 2);
    --ids__spacer-m: calc(var(--ids__density) * 1rem);
    --ids__spacer-l: calc(var(--ids__density) * 2rem);
    --ids__spacer-xl: calc(var(--ids__density) * 4rem);
  }

  --ids__gap-xs: 0.25rem;
  --ids__gap-s: 0.5rem;
  --ids__gap-m: 1rem;
  --ids__gap-l: 1.5rem;

  /* Поле от края экрана: правый край шапки и подвала, левый край навбара
     и контентной колонки на главной. На мобиле — поле контентной колонки */
  --ids__edge: 0.4rem;

  @media (width < 768px) {
    --ids__edge: 0.25rem;
  }

  /* Кегли служебного текста: шапка, подвал, навбар, aside, подписи, цены */
  --ids__font-size-xs: 0.65rem;
  --ids__font-size-s: 0.8rem;

  --ids__radius-xs: 0.1em;
  --ids__radius-s: 0.2em;
  --ids__radius-m: 0.3em;
  --ids__radius-pill: 9999px;

  /* Радиус сквиркла .ids__rounded. Можно переопределять локально. */
  --ids__radius: 1.5em;

  --ids__border-width-s: 1px;
  --ids__border-width-m: 2px;

  --ids__duration-instant: 0s;
  --ids__duration-fast: 0.1s;
  --ids__duration-base: 0.3s;
  --ids__duration-slow: 0.5s;
  --ids__easing-base: ease;

  /* Расстояние от области символов до линии — общее для подчёркиваний
     ссылок навбара, ссылки на главную в шапке и линии под полем поиска */
  --ids__underline-offset: 0.15em;
}

/* ==== settings.css ==== */
/* Fonts */

@font-face {
  font-family: "Proto Grotesk";
  font-weight: normal;
  font-style: normal;
  src:
    url("/fonts/Proto Grotesk-Light-Web.eot#iefix") format("embedded-opentype"),
    url("/fonts/Proto Grotesk-Light-Web.woff2") format("woff2"),
    url("/fonts/Proto Grotesk-Light-Web.woff") format("woff"),
    url("/fonts/Proto Grotesk-Light-Web.ttf") format("truetype"),
    url("/fonts/Proto Grotesk-Light-Web.otf") format("opentype"),
    url("/fonts/Proto Grotesk-Light-Web.svg#font") format("svg");
}
@font-face {
  font-family: "Stratos";
  font-weight: normal;
  font-style: normal;
  src:
    url("/fonts/Stratos-Regular-Web.eot#iefix") format("embedded-opentype"),
    url("/fonts/Stratos-Regular-Web.woff2") format("woff2"),
    url("/fonts/Stratos-Regular-Web.woff") format("woff"),
    url("/fonts/Stratos-Regular-Web.ttf") format("truetype"),
    url("/fonts/Stratos-Regular-Web.otf") format("opentype"),
    url("/fonts/Stratos-Regular-Web.svg#font") format("svg");
}

:root {
  --ids__density: 1.3;
  --ids__font: "Proto Grotesk", Georgia, serif;
  --ids__font-sans: "Stratos", Arial, sans-serif;
}

/* Флюидный корневой кегль: 1rem — базовый кегль текста.
   Мобильный отрезок 320→768 px: 17→26 px; десктоп 1000→1600 px: 17→27 px;
   между 768 и 1000 — 17 px, выше 1600 — 27 px.
   Композиция (спейсеры, поля, гэпы) считается в rem от него,
   компоненты со своим кеглем — в em. */
html {
  --mobile-font-size-min: 17;
  --mobile-font-size-max: 26;
  --desktop-font-size-min: 17;
  --desktop-font-size-max: 27;

  --mobile-viewport-min: 320;
  --mobile-desktop-breakpoint: 768;
  --desktop-viewport-min: 1000;
  --desktop-viewport-max: 1600;

  font-size: calc(
    var(--mobile-font-size-min) * 1px +
      (var(--mobile-font-size-max) - var(--mobile-font-size-min)) *
      (
        (100vw - var(--mobile-viewport-min) * 1px) /
          (var(--mobile-desktop-breakpoint) - var(--mobile-viewport-min))
      )
  );

  @media (width >= 768px) {
    font-size: calc(var(--desktop-font-size-min) * 1px);
  }

  @media (width >= 1000px) {
    font-size: calc(
      var(--desktop-font-size-min) * 1px +
        (var(--desktop-font-size-max) - var(--desktop-font-size-min)) *
        (
          (100vw - var(--desktop-viewport-min) * 1px) /
            (var(--desktop-viewport-max) - var(--desktop-viewport-min))
        )
    );
  }

  @media (width >= 1600px) {
    font-size: calc(var(--desktop-font-size-max) * 1px);
  }

  /* iOS не должен раздувать текст при meta viewport width=375 */
  -webkit-text-size-adjust: 100%;
}

html,
body {
  width: 100%;
  height: 100%;
  /* Горизонтального скролла на сайте нет, а «резиновый» боунс по горизонтали
     на тачпаде двигал текст, но не фиксированные фото и навбар — выключаем */
  overscroll-behavior-x: none;
}

body {
  font-family: var(--ids__font);
  font-size: 1em;
  line-height: var(--ids__density);
  -webkit-font-smoothing: antialiased;
}

main {
  padding: 0;
  position: relative;
}

/* Smooth scroll for anchored links */

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* ==== reset.css ==== */
body {
  margin: 0;
  /* Жирного и курсива у шрифтов сайта нет — браузер не должен их рисовать сам */
  font-synthesis: none;
}

*,
*:before,
*:after {
  box-sizing: border-box;

  &:focus:not(:focus-visible) {
    outline: none;
  }

  &:focus-visible {
    outline: var(--ids__border-width-m) solid var(--ids__link);
    outline-offset: 2px;
  }
}

button,
input,
optgroup,
select,
textarea {
  font-family: inherit;
  font-size: 100%;
  line-height: 1.15;
  margin: 0;
}

img {
  display: block;
  width: 100%;
  border-radius: var(--ids__radius-xs);
}

/* ==== layout.css ==== */
/* Композиция страницы: вертикальные отступы, обёртки, сетка. Всё в rem. */

.ids__space {
  height: var(--ids__spacer-s);

  &.XS {
    height: var(--ids__spacer-xs);
  }
  &.S {
    height: var(--ids__spacer-s);
  }
  &.M {
    height: var(--ids__spacer-m);
  }
  &.L {
    height: var(--ids__spacer-l);
  }
  &.XL {
    height: var(--ids__spacer-xl);
  }
}

.ids__wrapper {
  position: relative;
  /* Контентная колонка: ограничиваем именно её, а не весь сайт;
     margin: 0 auto держит её по центру */
  width: 48.5%;
  max-width: 800px;
  margin: 0 auto;

  @media (width < 768px) {
    width: 100%;
    max-width: none;
    padding: 0 var(--ids__edge);
  }

  &.L {
    width: 85%;

    @media (width < 768px) {
      width: 100%;
      padding: 0 var(--ids__edge);
    }
  }
  &.XL {
    width: 100%;
    max-width: none;
    padding: 0 calc(var(--ids__density) * 0.75rem);

    @media (width < 768px) {
      padding: 0 calc(var(--ids__density) * 0.6rem);
    }
  }
  &.XXL {
    width: 100%;
    max-width: none;

    @media (width < 768px) {
      padding: 0;
    }
  }

  & .ids__text-width {
    width: 85%;

    @media (width < 768px) {
      width: 100%;
    }
  }

  /* Главная: колонка начинается ровно от середины экрана (правая половина),
     на больших экранах не растёт шире max-width и остаётся прижатой к фото */
  &.index-wrapper {
    width: 50%;
    max-width: 760px;
    margin: 0 0 0 50%;
    padding-left: var(--ids__edge);
    padding-right: 2rem;

    @media (width < 768px) {
      width: 100%;
      max-width: none;
      margin: 0;
      padding: 0 var(--ids__edge);
    }
  }
}

.ids__sequence {
  display: flex;
  flex-wrap: wrap;
  --gap: 0rem;
  gap: var(--gap);

  &.gap-L {
    --gap: var(--ids__gap-l);
    margin-bottom: calc(var(--gap) * 1.5);
  }

  &.gap-M {
    --gap: var(--ids__gap-m);
    margin-bottom: calc(var(--gap) * 1.5);
  }

  &.gap-S {
    --gap: var(--ids__gap-s);
    margin-bottom: calc(var(--gap) * 1.5);
  }

  /* Вместо гэпа — поля у ячеек: ширина колонок остаётся ровной долей */
  &.inset-S .ids__sequence-item {
    padding-right: calc(var(--ids__density) * 0.5rem);
    padding-bottom: calc(var(--ids__density) * 0.5rem);
  }

  .ids__sequence-item {
    --columns: 4;
    width: calc((100% - var(--gap) * (var(--columns) - 1)) / var(--columns));

    @media (width < 768px) {
      --columns: 2;
    }
  }

  &.XL {
    .ids__sequence-item {
      --columns: 2;

      @media (width < 768px) {
        --columns: 1;
      }
    }
  }

  &.L {
    .ids__sequence-item {
      --columns: 3;

      @media (width < 768px) {
        --columns: 2;
      }
    }
  }

  &.S {
    .ids__sequence-item {
      --columns: 6;

      @media (width < 768px) {
        --columns: 3;
      }
    }
  }

  /* После правил размеров: на мобиле две колонки при любом размере */
  &.mobile-two-columns .ids__sequence-item {
    @media (width < 768px) {
      --columns: 2;
    }
  }
}

.ids__rounded {
  border-radius: var(--ids__radius);
  corner-shape: squircle;
  overflow: hidden;
}

@supports not (corner-shape: squircle) {
  .ids__rounded {
    border-radius: 0;
    border-radius: initial;
    mask:
      url('data:image/svg+xml;utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><path d="m0,1 c0,-1 0,-1 1,-1 l99,0 l0,100 l-100,0 Z"/></svg>') top left / calc(var(--ids__radius) * 100) no-repeat intersect,
      url('data:image/svg+xml;utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><path d="m0,0 l99,0 c1,0 1,0 1,1 l0,99 l-100,0 l0,-100 Z"/></svg>') top right / calc(var(--ids__radius) * 100) no-repeat intersect,
      url('data:image/svg+xml;utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><path d="m0,0 l100,0 l0,99 c0,1 -0,1 -1,1 l-99,0 Z"/></svg>') bottom right / calc(var(--ids__radius) * 100) no-repeat intersect,
      url('data:image/svg+xml;utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><path d="m0,0 l100,0 l0,100 l-99,0 c-1,0 -1,-0 -1,-1 Z"/></svg>') bottom left / calc(var(--ids__radius) * 100) no-repeat intersect
    ;
  }
}

/* Отступ от шапки до первого текста */
.top-space {
  height: 5rem;

  @media (width < 768px) {
    height: 1.2rem;
  }

  &.S {
    height: 7.55rem;
  }
}

/* Отступ от шапки до первого текста на главной */
.main-top-space {
  height: 4rem;

  @media (width < 768px) {
    height: 0.6rem;
  }
}

/* ==== components/ids.css ==== */
/* Стилизация тегов внутри .ids (тело страницы). Всё в em: компоненты
   с собственным кеглем масштабируют отступы и радиусы вместе с текстом. */

.ids {
  & a {
    color: var(--ids__link);
    border-bottom: var(--ids__border-width-s) solid color-mix(in srgb, var(--ids__link) 20%, transparent);
    text-decoration: none;
    font-family: var(--ids__font-sans);
    transition:
      color var(--ids__duration-base) var(--ids__easing-base),
      border-color var(--ids__duration-base) var(--ids__easing-base),
      background-color var(--ids__duration-base) var(--ids__easing-base);

    /* по ховеру — мгновенно, при уходе — плавно */
    &:hover {
      color: var(--ids__hover);
      border-bottom: var(--ids__border-width-s) solid color-mix(in srgb, var(--ids__hover) 20%, transparent);
      transition:
        color var(--ids__duration-instant) var(--ids__easing-base),
        border-color var(--ids__duration-instant) var(--ids__easing-base),
        background-color var(--ids__duration-instant) var(--ids__easing-base);
    }

    &.no-underline,
    &.no-underline:hover {
      border-bottom: 0;
    }
  }

  .ids__promo-link {
    display: flex;

    & a {
      display: inline-block;
      padding: 0.45em 0.6em 0.5em;
      border: var(--ids__border-width-s) solid color-mix(in srgb, var(--ids__text) 50%, transparent);
      border-right: 0;

      &:hover {
        background-color: color-mix(in srgb, var(--ids__hover) 10%, transparent);
      }

      &:first-child {
        border-radius: var(--ids__radius-m) 0 0 var(--ids__radius-m);
        padding-left: 1em;
      }

      &:last-child {
        border-radius: 0 var(--ids__radius-m) var(--ids__radius-m) 0;
        padding-right: 1em;
        border-right: var(--ids__border-width-s) solid color-mix(in srgb, var(--ids__text) 50%, transparent);
      }

      &.active {
        color: var(--ids__text);
        background-color: color-mix(in srgb, var(--ids__text) 5%, transparent);
        border-bottom-color: color-mix(in srgb, var(--ids__text) 50%, transparent);
        cursor: default;
      }

      &.active::after {
        content: " ↓";
      }
    }
  }

  & p {
    margin-top: 0;
    margin-bottom: calc(var(--ids__density) * 0.4em);

    &.loud {
      font-size: 2em;
      line-height: 1.2;
    }

    &.huge {
      font-size: 6em;
      line-height: 1;

      @media (width < 768px) {
        font-size: 3.2em;
      }

      @media (width < 550px) {
        font-size: 2.8em;
      }
    }
  }

  & h1,
  & h2,
  & h3,
  & h4,
  & h5,
  & h6 {
    margin: 0;
    font-weight: normal;

    /* Маркер в заголовке — полоска под текстом, а не заливка */
    & mark {
      background: none;
      box-shadow:
        inset 0 -0.15em var(--ids__background),
        inset 0 -0.5em var(--ids__mark);
    }
  }

  & h1 {
    font-size: 3.3em;
    letter-spacing: -0.025em;
    line-height: calc(var(--ids__density) / 1.3);
    margin-bottom: 0.4em;

    @media (width < 768px) {
      font-size: 3em;
    }

    &.S {
      font-size: 2.8em;
    }
    &.XS {
      font-size: 1.5em;
    }
  }

  & h2 {
    font-size: 2.25em; /* 1.5² — ступень типографической шкалы */
    line-height: calc(var(--ids__density) / 1.2);
    margin-bottom: 0.5em;

    @media (width < 768px) {
      font-size: 1.7em;
    }

    &.XS {
      font-size: 1.5em;
    }
  }

  & h3 {
    font-size: 1.3em;
    font-family: var(--ids__font-sans);
    line-height: calc(var(--ids__density) / 1.1);
    margin-bottom: 0.3em;
  }

  /* Жирного начертания у шрифтов сайта нет — акцент даёт гротеск */
  & h4 {
    font-size: 1em;
    font-family: var(--ids__font-sans);
    line-height: var(--ids__density);
    margin-bottom: 0.6em;
  }

  & h5 {
    font-size: 0.8em;
    font-family: var(--ids__font-sans);
    line-height: var(--ids__density);
    margin-bottom: 0.7em;
  }

  & h6 {
    font-size: 0.6em;
    font-family: var(--ids__font-sans);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: var(--ids__density);
    margin-bottom: 0.7em;
  }

  & strong,
  & b {
    font-family: var(--ids__font-sans);
    font-weight: normal;
  }

  & strike {
    text-decoration-thickness: var(--ids__border-width-m);
  }

  & mark {
    /* палитра напрямую: тёмный текст на жёлтом в обеих темах */
    color: var(--ids__color-navy-900);
    background-color: var(--ids__mark);
  }

  & ul,
  & ol {
    margin: 0 0 calc(var(--ids__density) * 0.75em) 0;
    padding: 0;

    & li {
      position: relative;
      margin-bottom: 0.4em;
    }
  }

  & ul {
    & li {
      list-style-type: none;
      padding-left: calc(var(--ids__density) * 0.75em);

      &:before {
        position: absolute;
        left: 0;
        content: "⋅ ";
      }
    }

    &.checked li:before {
      content: "✓";
      width: 0.7em;
      height: 0.7em;
    }
  }

  & ol {
    & li {
      list-style: decimal inside none;
    }
  }

  & blockquote {
    font-size: 1.4em;
    line-height: var(--ids__density);
    margin: 0;
    padding-left: calc(var(--ids__density) * 0.75em);
    margin-bottom: calc(var(--ids__density) * 1em);
  }

  /* Боковая ремарка: без подложки, мелким гротеском */
  & aside {
    margin: 0;
    margin-bottom: calc(var(--ids__density) * 0.75em);
    padding: 0;
    font-size: var(--ids__font-size-xs);
    font-family: var(--ids__font-sans);
  }

  & code {
    font-size: 0.9em;
    font-family: var(--ids__font-sans);
    letter-spacing: 0.02em;
    padding: 0.1em 0.25em;
    border-radius: var(--ids__radius-s);
    color: var(--ids__code);
    border: var(--ids__border-width-s) solid color-mix(in srgb, var(--ids__code) 10%, transparent);
    background: color-mix(in srgb, var(--ids__code) 10%, transparent);
  }

  & figure {
    margin: 0 0 calc(var(--ids__density) * 0.5em) 0;

    &.XXS {
      width: 25%;
    }
    &.XS {
      width: 50%;
    }
    &.S {
      width: 75%;
    }

    & figcaption {
      margin-top: calc(var(--ids__density) * 0.25em);
      font-size: 0.8em;
      line-height: var(--ids__density);
      color: var(--ids__text-caption);
    }
  }

  & details {
    padding: 0.5em;
    cursor: pointer;
    border-radius: var(--ids__radius);

    & summary {
      padding-bottom: calc(var(--ids__density) * 0.2em);
    }
  }

  & table {
    width: 100%;
    border-spacing: 0;

    & th {
      text-align: left;
      vertical-align: top;
      /* заголовки колонок не переносятся, кроме последнего: ширина уходит
         последней колонке, и на узком экране переносится только она */
      white-space: nowrap;
      padding: 0.5em 1em 0.5em 0;

      &:last-child {
        white-space: normal;
        padding-right: 0;
      }
      border-bottom: var(--ids__border-width-m) solid var(--ids__text);
    }

    & td {
      padding: calc(var(--ids__density) * 0.6em) 1em calc(var(--ids__density) * 0.6em) 0;
      border-bottom: var(--ids__border-width-s) solid color-mix(in srgb, var(--ids__text) 15%, transparent);
      vertical-align: top;

      &:first-child {
        text-wrap: nowrap;
      }

      &:last-child {
        padding-right: 0;
      }
    }

    & tr:last-child td {
      border-bottom: none;
    }
  }

  & hr {
    border-top-color: var(--ids__border);
    border-bottom: 0;
  }

  /* Разделитель глав: три звёздочки */
  .plug {
    position: relative;

    &::after {
      content: "* * *";
      display: block;
      padding: 1.4em 0 1.2em;
      width: 100%;
      text-align: center;
    }
  }
}

/* ==== components/header.css ==== */
/* Шапка: ряд «ссылка на главную · поиск · языки». Поля — в rem от краёв
   экрана, кегль задан ряду, а не шапке. */

header {
  /* Ссылка на главную стоит там же, где первый пункт навбара на главной:
     --ids__edge сверху и --ids__gap-s слева. Ряд выровнен по базовой линии,
     а поле поиска выше текста на свой верхний паддинг — вычитаем его. */
  --search-padding-top: 0.35rem;
  padding-top: calc(var(--ids__edge) - var(--search-padding-top));

  & .ids__wrapper.XXL {
    padding: 0 var(--ids__edge) 0 var(--ids__gap-s);

    @media (width < 768px) {
      padding: 0 var(--ids__edge);
    }
  }

  /* На главной шапка во всю ширину: поиск начинается там же, где контентная
     колонка (.index-wrapper: 50% + --ids__edge), языки — в том же правом
     углу, что и на внутренних, независимо от max-width колонки */
  & .ids__wrapper.header-home {
    width: 100%;
    max-width: none;
    margin: 0;
    padding-left: calc(50% + var(--ids__edge));
    padding-right: var(--ids__edge);

    @media (width < 768px) {
      padding: 0 var(--ids__edge);
    }
  }
}

.header-bar {
  display: flex;
  align-items: baseline;
  gap: 0.8em;
  font-size: var(--ids__font-size-xs);

  @media (width < 768px) {
    font-size: var(--ids__font-size-s);
  }

  & .header-logo {
    flex: none;
    white-space: nowrap;
  }

  & .logo {
    font-family: var(--ids__font);
    padding-bottom: var(--ids__underline-offset);
  }

  & .switcher {
    flex: none;
  }
}

/* ==== components/search.css ==== */
/* Поиск по сайту (в шапке). Поле стилизовано само по себе, без
   ids__input-text-line: от дизайн-системы нужна была только линия снизу,
   а остальное (скругления, тень по фокусу, отступы) приходилось гасить. */
.search {
  /* relative нужен выпадайке и крестику: они позиционируются от поля */
  position: relative;
  flex: 1;
  min-width: 0;
  font-family: var(--ids__font);
}
/* Линия под полем: border инлайн-элемента ложится под областью символов
   (по метрикам шрифта), как и подчёркивание ссылки .ids a — поэтому
   совпадает с ним пиксель в пиксель при любом кегле и масштабе.
   Паддинги самого поля на неё не влияют. */
.search-line {
  padding-bottom: var(--ids__underline-offset);
  border-bottom: var(--ids__border-width-s) solid color-mix(in srgb, var(--ids__link) 20%, transparent);
  /* по фокусу — мгновенно, при расфокусе — плавно */
  transition: border-color var(--ids__duration-base);
}
.search-line:focus-within {
  border-bottom-color: var(--ids__text);
  transition: none;
}
.ids .search-input {
  /* iOS Safari рисует type=search своим виджетом со своим кеглем,
     из-за чего лупа и текст расходятся в размере — сбрасываем */
  -webkit-appearance: none;
  appearance: none;
  display: inline-block;
  vertical-align: baseline;
  width: 100%;
  margin: 0;
  padding: var(--search-padding-top) 1.2rem
    calc(0.1rem + var(--ids__underline-offset)) 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  /* Без фокуса текст гаснет так же, как линия, и с тем же транзишеном */
  color: color-mix(in srgb, var(--ids__text) 20%, transparent);
  font: inherit;
  transition: color var(--ids__duration-base);
}
.ids .search-input:focus {
  outline: none;
  box-shadow: none;
  color: var(--ids__text);
  transition: none;
}
/* Лупа вместо текста-плейсхолдера: пустой инлайн-блок перед инпутом
   в том же спане. У инлайн-блока без содержимого базовая линия — его нижний
   край, поэтому низ ручки ложится ровно на бейзлайн текста при любом кегле.
   Места в строке не занимает (отрицательный margin), инпут лежит поверх.
   Показывается, пока поле пустое и без фокуса (placeholder=" " нужен,
   чтобы срабатывал :placeholder-shown). В шрифтах сайта лупы нет. */
.search-line::before {
  content: "";
  display: inline-block;
  /* чуть свешивается под базовую линию */
  vertical-align: -0.06em;
  width: 0.85em;
  height: 0.85em;
  margin-right: -0.85em;
  background: no-repeat center / contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23050505' stroke-opacity='.45' stroke-width='1.5' stroke-linecap='round'%3E%3Ccircle cx='6.5' cy='6.5' r='5'/%3E%3Cpath d='M10.3 10.3 15 15'/%3E%3C/svg%3E");
  opacity: 0;
  transition: opacity var(--ids__duration-base);
}
.search-line:has(.search-input:placeholder-shown:not(:focus))::before {
  opacity: 1;
}
/* Нативный крестик прячем — вместо него свой, покрупнее и с ховером */
.search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  display: none;
}
.ids .search-clear {
  position: absolute;
  top: -0.1em;
  right: 0;
  padding: 0 0 0.1em 0.4em;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 1.5em;
  font-weight: normal;
  line-height: 1.3;
  color: var(--ids__text);
  cursor: pointer;
}
.ids .search-clear:hover {
  color: var(--ids__hover);
}
/* .ids — чтобы перебить .ids ul (margin/padding) */
.ids .search-results {
  position: absolute;
  top: calc(100% + var(--ids__gap-s));
  left: 0;
  right: 0;
  z-index: 10;
  margin: 0;
  padding: 0.25em 0;
  list-style: none;
  background: var(--ids__background);
  border: var(--ids__border-width-s) solid color-mix(in srgb, var(--ids__text) 15%, transparent);
  border-radius: var(--ids__radius-m);
  box-shadow: 0 0.5em 1.5em color-mix(in srgb, var(--ids__text) 15%, transparent);
  max-height: 24em;
  overflow-y: auto;
}
@media (width < 768px) {
  .ids .search-results {
    margin: 0 calc(-1 * var(--ids__gap-l));
  }
  /* На главной слева от поля нет запаса: прижимаем к краю экрана,
     как контентную колонку */
  .header-home .ids .search-results,
  .ids .header-home .search-results {
    margin-left: calc(-1 * var(--ids__edge));
  }
}
.ids .search-results li {
  margin: 0;
  padding-left: 0;
}
.ids .search-results li:before {
  content: none;
}
.ids .search-result a,
.ids .search-result a:hover {
  display: block;
  padding: 0.5em 0.75em;
  text-decoration: none;
  color: var(--ids__text);
  border-bottom: none;
}
.search-result.is-active,
.search-result:hover {
  background: var(--ids__surface);
}
.search-result-title {
  display: block;
  font-family: var(--ids__font-sans);
  font-weight: normal;
}
.search-result-snippet {
  display: block;
  font-family: var(--ids__font);
  color: var(--ids__text);
}
.search-results mark {
  background: var(--ids__mark);
  color: var(--ids__color-navy-900);
}
.search-empty {
  padding: 1.2em 0.75em;
  text-align: center;
  color: color-mix(in srgb, var(--ids__text) 60%, transparent);
}

/* ==== components/footer.css ==== */
/* Подвал: те же поля от краёв экрана, что у шапки */

footer {
  position: relative;
  margin-top: 7.5rem;
  padding: 0 var(--ids__edge) var(--ids__gap-s) var(--ids__gap-s);

  @media (width < 768px) {
    padding: 0 var(--ids__edge) var(--ids__gap-s);
  }
}

.footer-caption {
  display: flex;
  align-items: baseline;
  gap: 0.5em;
  font-size: var(--ids__font-size-xs);
}

/* Подпись в подвале инвертирована относительно того, что под ней: на главной
   она лежит поверх фото. Белый в режиме difference даёт негатив подложки,
   на белом фоне — чёрный. Палитра напрямую: цвет здесь — операнд смешения */
.footer-line {
  color: var(--ids__color-white);
  mix-blend-mode: difference;
}

/* ==== components/switcher.css ==== */
/* Пилюля-переключатель: языки в шапке и подвале, разделы на консультациях и в музыке.
   Кегль наследует от ряда, в котором стоит. Скругления — через .ids__rounded:
   внешний радиус на пилюле, вложенный у сегмента заметно меньше — не на паддинг,
   а сильнее, так пилюля выглядит круглее сегмента. */

.ids .switcher {
  --switcher-padding: 0.15em;
  --switcher-radius: 0.6em;
  --switcher-inner-radius: 0.35em;
  --ids__radius: var(--switcher-radius);
  display: inline-flex;
  background-color: var(--ids__text);
  padding: var(--switcher-padding);

  & a,
  & span {
    display: inline-block;
    padding: 0.1em 0.3em 0.05em;
    font-family: var(--ids__font-sans);
    border: none;
  }

  & a {
    color: var(--ids__text-on-inverse);

    &:hover {
      color: var(--ids__hover);
    }
  }

  & span {
    --ids__radius: var(--switcher-inner-radius);
    background-color: var(--ids__photo-bg);
    /* палитра напрямую: подложка светлая в обеих темах */
    color: var(--ids__color-navy-900);
  }
}

/* Переключатель разделов (консультации, музыка): тот же вид,
   что у языкового, но активный сегмент жёлтый */
.ids .switcher-accent span {
  background-color: var(--ids__highlight);
}

/* Селектор с .ids, иначе паддинги сегментов перебивает .ids .switcher выше */
.ids .section-switcher {
  margin: 0 0 1.5em;
  font-size: var(--ids__font-size-s);

  /* сегменты чуть выше, чем в языковом: снизу 0.1em вместо 0.05em */
  & a,
  & span {
    padding-bottom: 0.1em;
  }
}

/* ==== components/home.css ==== */
/* Главная: вращающиеся кадры на десктопе, статичный кадр на мобиле, навбар */

.background-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;

  @media (width < 768px) {
    display: none;
  }

  & .background-picture {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 50%;
    /* пока кадры не загрузились — цвет фона студии, не белое */
    background-color: var(--ids__photo-bg);

    & canvas {
      display: block;
      width: 100%;
      height: 100%;
    }
  }
}

/* Мобильный герой: спейсер, меню, спейсер, кадр — всё в потоке.
   На десктопе меню фиксировано, а фон — .background-container,
   поэтому спейсеры героя там не нужны */
.mobile-hero .ids__space {
  @media (width >= 768px) {
    display: none;
  }
}

/* На мобиле кадр на всю ширину, в потоке, под меню — слайд
   в .mobile-gallery; кадры крутит
   scroll-sequence.js с запаздыванием, канвас поверх первого кадра */
.mobile-portrait {
  position: relative;
  width: 100%;
  background-color: var(--ids__photo-bg);
  /* кадры 960x1080 (8/9); 4/5 — это те же кадры с откушенными
     по 5% ширины слева и справа (cover-кроп центрирует) */
  aspect-ratio: 4 / 5;
  overflow: hidden;

  & img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  & canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }

  @media (width >= 768px) {
    display: none;
  }
}

.ids .navbar {
  padding: var(--ids__edge) var(--ids__edge) var(--ids__edge) var(--ids__gap-s);
  font-size: var(--ids__font-size-xs);
  z-index: 1;

  @media (width >= 768px) {
    position: fixed;
    top: 0;
    width: 6.5rem;
  }

  @media (width < 768px) {
    position: relative;
    text-align: center;
  }

  & .nav-item {
    margin-bottom: 0.5em;
  }

  & a {
    font-family: var(--ids__font);
    padding-bottom: var(--ids__underline-offset);
  }
}

/* Фото: на десктопе слой поверх кадров (переключает home-photos.js),
   на мобиле — слайд галереи. Фото выше блока, скролл ведёт его от верха
   к низу через background-position-y */
.photo-still {
  background-color: var(--ids__photo-bg);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: 50% 0%;

  .background-picture & {
    position: absolute;
    inset: 0;
    z-index: 1;
  }
}

/* Мобильная галерея: слайды листаются пальцем и доводятся снапом,
   как карусель в ленте. Один из слайдов — кадры, .mobile-portrait */
.mobile-gallery {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;

  &::-webkit-scrollbar {
    display: none;
  }

  @media (width >= 768px) {
    display: none;
  }

  & > * {
    flex: none;
    width: 100%;
    /* пропорции — как у .mobile-portrait */
    aspect-ratio: 4 / 5;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
}

/* Точки: какое фото показывать. На десктопе стоят под меню и переключают
   по клику, на мобиле — под галереей и показывают, какой слайд на экране */
.ids .photo-dots {
  --photo-dot: 0.25em;
  /* половина расстояния между точками */
  --photo-dot-gap: 0.15em;
  /* поле сверху и снизу, чтобы попадать мышью; на вид не влияет */
  --photo-dot-hit: 0.4em;
  display: flex;
  font-size: var(--ids__font-size-xs);

  & button {
    padding: var(--photo-dot-hit) var(--photo-dot-gap);
    border: none;
    background: none;
    color: color-mix(in srgb, var(--ids__link) 20%, transparent);
    cursor: pointer;

    &::before {
      content: "";
      display: block;
      width: var(--photo-dot);
      height: var(--photo-dot);
      border-radius: var(--ids__radius-pill);
      background-color: currentColor;
    }

    &:hover {
      color: var(--ids__hover);
    }

    /* выбранная точка на ховер не реагирует: после клика курсор
       ещё на ней, а на тачскрине ховер залипает */
    &[aria-pressed="true"] {
      color: var(--ids__link);
      cursor: default;
    }
  }

  /* под меню: поле попадания вычтено из отступа сверху; слева ряд сдвинут
     от края текста на четверть точки вправо — оптическая компенсация: круглая
     точка, выровненная по краю букв, кажется выступающей влево */
  .navbar & {
    margin: calc(0.5em - var(--photo-dot-hit)) 0 0 calc(var(--photo-dot) / 4 - var(--photo-dot-gap));

    @media (width < 768px) {
      display: none;
    }
  }

  /* под галереей: по центру, точки крупнее — как в ленте */
  .mobile-hero > & {
    --photo-dot: 0.4em;
    --photo-dot-gap: 0.2em;
    justify-content: center;
    margin-top: calc(var(--ids__gap-s) - var(--photo-dot-hit));

    @media (width >= 768px) {
      display: none;
    }
  }
}

/* Рамка-индикатор скролла: на десктопе вместо подчёркиваний.
   Геометрию считает nav-indicator.js; нижний бордер рамки ложится ровно
   туда, где было подчёркивание ссылки (нижняя граница её бокса). */
.ids .nav-indicator {
  display: none;
}

@media (width >= 768px) {
  .ids .navbar a,
  .ids .navbar a:hover {
    border-bottom-color: transparent;
  }
  .ids .nav-indicator {
    display: block;
    position: absolute;
    box-sizing: border-box;
    /* поля рамки вокруг текста пункта; скрипт читает их из padding */
    padding: calc(0.1em + 0.1rem) calc(0.35em + 0.1rem) 0;
    border: var(--ids__border-width-s) solid color-mix(in srgb, var(--ids__link) 20%, transparent);
    border-radius: var(--ids__radius-m);
    pointer-events: none;
    transition: border-color var(--ids__duration-base) var(--ids__easing-base);
  }
  /* по ховеру на любой пункт рамка красится синхронно с ним */
  .ids .navbar:has(.nav-item a:hover) .nav-indicator {
    border-color: color-mix(in srgb, var(--ids__hover) 20%, transparent);
    transition: none;
  }
}

/* ==== components/book.css ==== */
.book-animation {
  position: relative;
  left: 0em;
  height: 22em;
  font-size: 1.4em;
}

.book-3d-scene {
  position: absolute;
  width: 20em;
  height: 22em;
  top: -0.6em;
  left: -2.3em;
  perspective: 2500px;
  perspective-origin: center -10%;
  --cover-color: var(--ids__color-green-600); /* палитра напрямую: цвет обложки не зависит от темы */
}
.book-3d-scene .book-3d {
  position: absolute;
  left: 10.7em;
  top: 0.8em;
  transform-style: preserve-3d;
}
.book-3d-scene .book-3d .book-3d-spine {
  position: absolute;
  left: -7em;
  width: 2.5em;
  height: 20.2em;
  background-color: var(--cover-color);
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: cover;
  transform: rotateY(-90deg) translateZ(1.25em) translateX(-1.15em);
  filter: brightness(0.9);
}
.book-3d-scene .book-3d .book-3d-page {
  position: absolute;
  width: 16em;
  height: 20.2em;
  left: -7em;
  background-repeat: no-repeat;
  background-image: url("/images/book/book-illustration-page.svg");
}
.book-3d-scene .book-3d .book-3d-page.page2 {
  transform: translateZ(-0.6em);
  filter: brightness(0.85);
  left: -6.98em;
}
.book-3d-scene .book-3d .book-3d-page.page3 {
  transform: translateZ(-1.2em);
  filter: brightness(0.9);
  left: -6.98em;
}
.book-3d-scene .book-3d .book-3d-page.page4 {
  transform: translateZ(-1.8em);
  filter: brightness(0.95);
  left: -6.98em;
}
.book-3d-scene .book-3d .book-3d-page.page5 {
  transform: translateZ(-2.4em);
  left: -6.98em;
}

/* ==== components/links.css ==== */
.margin-bottom-no-top {
  margin-top: 0;
  margin-bottom: 1em;
}

.promo-link a {
  text-transform: uppercase;
  font-style: italic;
  font-size: 1.3em;
  letter-spacing: 0.015em;
}

.contact-plate {
  margin: 1em 0;
  background-color: var(--ids__mark);
  color: var(--ids__color-navy-900);
  padding: 0.3em 0.6em;
  border-radius: 0.4em;
}

.ids a.button-not-button {
  padding: 0 3em 0.1em;
  font-family: var(--ids__font);
  border: var(--ids__border-width-s) solid color-mix(in srgb, var(--ids__text) 20%, transparent);
  font-size: var(--ids__font-size-s);
  border-radius: var(--ids__radius-m);
}
.ids a.button-not-button:hover {
  border: var(--ids__border-width-s) solid color-mix(in srgb, var(--ids__hover) 20%, transparent);
}
.ids a.download-link {
  position: relative;
  display: block;
  border-bottom: none;
}
.ids a.download-link:after {
  content: "Скачать ↓";
  position: absolute;
  display: inline-block;
  font-size: var(--ids__font-size-xs);
  bottom: 0.4em;
  right: 0.3em;
  background-color: color-mix(in srgb, var(--ids__text) 50%, transparent);
  color: var(--ids__background);
  padding: 0 0.2em 0.1em;
  border-radius: var(--ids__radius-s);
  opacity: 0;
  transition: opacity var(--ids__duration-slow) var(--ids__easing-base);
}
.ids a.download-link:hover:after {
  opacity: 1;
  transition: opacity var(--ids__duration-instant) var(--ids__easing-base);
}
.ids a.download-link.en-download:after {
  content: "Download ↓";
}
.ids a.wide-promo-link {
  display: block;
  padding: 1em;
  background-color: var(--ids__link);
  color: var(--ids__background);
  text-align: center;
}
.ids a.wide-promo-link:hover {
  background-color: var(--ids__hover);
}

/* ==== components/jobs.css ==== */
article {
  margin-top: 2em;
  border-top: var(--ids__border-width-s) solid var(--ids__border);
  padding-top: 1.5em;
}

a.job-link,
.job-link {
  display: block;
  padding: 0.2em 0.4em 0.9em 0em;
  height: 100%;
  background-color: var(--ids__text);
  color: var(--ids__background);
}
@media (width < 768px) {
  a.job-link,
  .job-link {
    border-bottom: var(--ids__border-width-s) solid color-mix(in srgb, var(--ids__background) 10%, transparent);
    padding-bottom: 1.5em;
  }
}
a.job-link p,
.job-link p {
  font-family: var(--ids__font-sans);
  margin-bottom: 0.1em;
  margin-left: 0.065em;
  line-height: 1.1;
}
a.job-link .caption,
.job-link .caption {
  font-family: var(--ids__font);
  font-size: var(--ids__font-size-xs);
  margin-left: 0.1em;
}
a.job-link:hover,
.job-link:hover {
  background-color: var(--ids__hover);
  color: var(--ids__background);
}

.ids .job {
  position: relative;
  background-color: var(--ids__text);
  color: var(--ids__background);
  margin-bottom: 1em;
}
.ids .job:before {
  content: "";
  position: absolute;
  top: -0.8em;
  bottom: -1em;
  left: -1em;
  right: -1.5em;
  border-radius: var(--ids__radius-m);
  background-color: var(--ids__text);
  z-index: -1;
}
@media (width < 768px) {
  .ids .job:before {
    left: -20em;
    right: 0;
    border-radius: 0em;
  }
}

.summary {
  margin-top: 4em;
}

@media (width >= 768px) {
  .details .detail {
    display: inline;
  }
  .details .detail:not(:last-child):after {
    content: "·";
    margin: 0 1em;
  }
}
@media (width < 768px) {
  .details .detail {
    margin-bottom: 0.3em;
  }
  .details .detail:before {
    content: "·";
    margin-right: 0.5em;
  }
}

/* ==== components/consultations.css ==== */
.ids .boxes {
  margin: 1em 0 2em;
}
.ids .boxes li {
  position: relative;
  border: var(--ids__border-width-s) solid color-mix(in srgb, var(--ids__text) 10%, transparent);
  padding: 0.3em 2em 1.5em 3em;
  margin: 0;
}
.ids .boxes li::before {
  content: "";
}
.ids .boxes li:not(:last-child) {
  border-bottom: 0;
}
@media (width < 768px) {
  .ids .boxes li {
    padding: 0.3em 0.8em 1em 1.8em;
  }
}
.ids .boxes li img {
  position: absolute;
  width: 1em;
  top: 0.45em;
  left: 0.4em;
}

.offer-selector {
  margin-bottom: 1.5em;
}
.offer-selector a {
  border: var(--ids__border-width-s) solid color-mix(in srgb, var(--ids__link) 50%, transparent);
}
.offer-selector a:hover {
  border: var(--ids__border-width-s) solid color-mix(in srgb, var(--ids__hover) 50%, transparent);
}
.offer-selector span {
  border: var(--ids__border-width-s) solid color-mix(in srgb, var(--ids__text) 50%, transparent);
  background-color: var(--ids__link);
  color: var(--ids__background);
}
.offer-selector a,
.offer-selector span {
  padding: 0.2em 0.8em 0.3em;
  border-radius: var(--ids__radius-m);
}
.offer-selector a:first-child,
.offer-selector span:first-child {
  border-radius: var(--ids__radius-m) 0 0 var(--ids__radius-m);
  border-right: none;
  padding-right: 0.5em;
}
.offer-selector a:last-child,
.offer-selector span:last-child {
  border-radius: 0 var(--ids__radius-m) var(--ids__radius-m) 0;
  border-left: none;
  padding-left: 0.5em;
}

.consultation-nav {
  display: flex;
  background-color: color-mix(in srgb, var(--ids__text) 5%, transparent);
  padding: 0.7em 0em 0.7em 1em;
  border-radius: var(--ids__radius-s);
}
.consultation-nav .consultation-nav-item {
  margin-right: 1em;
}
.consultation-nav .consultation-nav-item a {
  border-bottom-style: dashed;
}
.consultation-nav .consultation-nav-item.last-item {
  flex-grow: 1;
  text-align: right;
}
.consultation-nav .consultation-nav-item.last-item a {
  opacity: 0.3;
}
.consultation-nav .consultation-nav-item.last-item a:hover {
  opacity: 1;
}

.consultation-feedback {
  margin: 2em 0;
}
.consultation-feedback .consultation-feedback-person {
  display: flex;
}
.consultation-feedback
  .consultation-feedback-person
  .consultation-feedback-person-name {
  margin-right: 0.5em;
}
.consultation-feedback
  .consultation-feedback-person
  .consultation-feedback-logo {
  margin-right: 0.2em;
}
.consultation-feedback
  .consultation-feedback-person
  .consultation-feedback-logo
  svg {
  width: auto;
  height: 1.2em;
}
.consultation-feedback
  .consultation-feedback-person
  .consultation-feedback-logo.vv {
  margin-top: 0.04em;
}
.consultation-feedback
  .consultation-feedback-person
  .consultation-feedback-logo.vv
  svg {
  height: 0.9em;
}
.consultation-feedback .consultation-feedback-text p {
  display: inline-block;
  background-color: color-mix(in srgb, var(--ids__text) 5%, transparent);
  border-radius: 1em;
  padding: 0.45em 0.6em 0.5em 0.6em;
  margin-bottom: 0.08em;
}
.consultation-feedback .consultation-feedback-text p:first-child {
  border-radius: 0 1em 1em 1em;
}
@media (width < 768px) {
  .consultation-feedback .consultation-feedback-text p {
    margin-right: 0.1em;
  }
}

.consultations-summary {
  font-size: var(--ids__font-size-xs);
}
.consultations-summary .consultations-summary-item {
  padding: 0.5em 0;
  border-top: var(--ids__border-width-s) solid var(--ids__border);
}

.consultation-price {
  border: var(--ids__border-width-s) solid var(--ids__border-strong);
  border-radius: 0.15em;
  padding: 0.1em 0.25em 0.05em;
  font-size: var(--ids__font-size-xs);
  line-height: 0.7;
  font-family: var(--ids__font-sans);
  text-wrap: nowrap;
}

/* ==== components/media.css ==== */
/* Плитки с названиями лекций: сетка сама решает, сколько колонок влезет.
   Выходит за колонку на --bleed с каждой стороны, как плашка «Об авторе» */
.ids .lecture-tiles {
  --bleed: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13em, 1fr));
  gap: 0.4em;
  margin: 0 calc(-1 * var(--bleed)) calc(var(--ids__density) * 0.75em);
  padding: 0;
  font-family: var(--ids__font-sans);
  font-size: var(--ids__font-size-s);

  @media (width < 768px) {
    --bleed: var(--ids__edge);
  }
}
.ids .lecture-tiles li {
  margin: 0;
  padding: 0.6em 1.8em 1.6em 0.8em;
  background: var(--ids__surface);
  border-radius: var(--ids__radius-m);
  line-height: 1.25;
}
.ids .lecture-tiles li:before {
  content: "Тема одной из будущих лекций";
  position: static;
  display: block;
  margin-bottom: 0.5em;
  font-family: var(--ids__font);
  font-size: 0.8em;
  opacity: 0.5;
}
.ids .lecture-tiles li:lang(en):before {
  content: "Topic of a future lecture";
}
/* Встреча группы в той же сетке: вместо номера — дата, прошедшие зачёркнуты */
.ids .lecture-tiles li.meeting {
  list-style: none;
}
.ids .lecture-tiles li.meeting::before {
  content: none;
}
/* Строка даты: обычный цвет текста, тонкая линия снизу, у прошедших зачёркнута */
.ids .lecture-tiles li.meeting time {
  display: block;
  margin-bottom: 0.8em;
  padding-bottom: 0.3em;
  border-bottom: var(--ids__border-width-s) solid var(--ids__border);
  font-family: var(--ids__font);
  font-size: 0.8em;
}
.ids .lecture-tiles li.meeting.past time {
  text-decoration: line-through;
}
.ids .lecture-tiles li.meeting dl,
.ids .lecture-tiles li.meeting dd {
  margin: 0;
  font-family: var(--ids__font); /* описания — гротеск; подписи слотов и реплики остаются Stratos */
}
.ids .lecture-tiles li.meeting dt {
  font-size: var(--ids__font-size-xs);
  color: var(--ids__text-caption);
}
.ids .lecture-tiles li.meeting dd + dt {
  margin-top: 0.8em;
}
/* Название лекции — в подбор; Stratos плотнее гротеска и работает как акцент */
.ids .lecture-tiles li.meeting dd b {
  font-family: var(--ids__font-sans);
}
.ids .lecture-tiles li.meeting dd + dd {
  margin-top: 0.4em;
}
/* Ответы на консультации — реплики в чате, прижаты вправо */
.ids .lecture-tiles li.meeting .replies {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3em;
  margin: 0.6em 0 0;
  padding: 0;
  font-family: var(--ids__font-sans);
  font-size: 0.9em;
}
.ids .lecture-tiles li.meeting .replies li {
  list-style: none;
  max-width: 92%;
  margin: 0;
  padding: 0.35em 0.8em 0.45em;
  background: var(--ids__bubble);
  border-radius: 1.2em 0 1.2em 1.2em; /* правый верхний угол прямой, как у исходящей реплики */
}
.ids .lecture-tiles li.meeting .replies li::before {
  content: none;
}

figure.event-photo img {
  object-fit: cover;
}
figure.event-photo.height-S img {
  aspect-ratio: 16/9;
}
figure.event-photo.height-M img {
  aspect-ratio: 5/3;
}
figure.event-photo.height-L img {
  aspect-ratio: 3/2;
}

figure.lecture-illustration {
  width: 60%;
  margin: 2em auto;
}
@media (width < 768px) {
  figure.lecture-illustration {
    width: 80%;
  }
}
figure.lecture-illustration figcaption {
  font-family: var(--ids__font-sans);
  font-size: var(--ids__font-size-xs);
}

.music-entity {
  display: flex;
  --gap: 1em;
  gap: var(--gap);
  margin-bottom: 4em;
}
.music-entity .music-cover {
  width: calc(30% - var(--gap) / 2);
}
.music-entity .music-info {
  width: calc(70% - var(--gap) / 2);
}
.music-entity .music-info .year {
  font-size: var(--ids__font-size-xs);
  color: var(--ids__text-caption);
}
.music-entity .music-info .title {
  font-family: var(--ids__font-sans);
}
.music-entity .music-info .player {
  margin: 0.5em 0;
}
.music-entity .music-info .player audio {
  width: 100%;
}
/* Видео на месте аудиоплеера: поля даёт .player */
.ids .music-entity .player .plyr {
  margin-bottom: 0;
}


/* Видеоплеер на Plyr: контейнер .video-player Plyr заменяет своим .plyr */
.ids .plyr {
  --plyr-color-main: var(--ids__link);
  --plyr-font-family: var(--ids__font-sans);
  border-radius: var(--ids__radius-m);
  margin-bottom: 4em;
}

/* Встроенный плеер Bandcamp. Внутри iframe вёрстка не шире 700px, поэтому в широкой
   колонке iframe остаётся 700px и растягивается до края через scale; коэффициент
   --bandcamp-scale считает main.js. Нижнее поле добирает высоту, которую scale не занимает. */
.ids .bandcamp-player {
  --height: 406px;
  display: block;
  width: calc(100% / var(--bandcamp-scale, 1));
  height: var(--height);
  transform: scale(var(--bandcamp-scale, 1));
  transform-origin: 0 0;
  border: 0;
  margin-bottom: calc(var(--height) * (var(--bandcamp-scale, 1) - 1) + var(--ids__gap-l));
}
/* Ролики и плееры подряд стоят плотнее, чем ролик перед следующим блоком */
.ids .plyr:has(+ .plyr, + .bandcamp-player) {
  margin-bottom: var(--ids__gap-l);
}

/* ==== components/about-author.css ==== */
/* Плашка «Об авторе»: тёмная, выходит за колонку на --bleed с каждой стороны,
   внутренний паддинг компенсирует выход, и текст остаётся в колонке.
   На мобиле выход равен полю колонки — плашка ровно в ширину вьюпорта. */

.about-author {
  --bleed: 1.5rem;
  margin: 2rem calc(-1 * var(--bleed));
  padding: 1.6rem var(--bleed) 0.6rem;

  @media (width < 768px) {
    --bleed: var(--ids__edge);
    margin-top: 1.2rem;
    margin-bottom: 1.2rem;
    padding: 0.8rem var(--ids__gap-s) 0.2rem;
  }

  & .about-author__intro {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 1rem;

    @media (width < 768px) {
      gap: 0.3rem;
      margin-bottom: 0.5rem;
    }
  }

  /* Кадры крутятся скриптом scroll-sequence.js: канвас поверх первого кадра */
  & .about-author__photo {
    --ids__radius: 0.75em; /* половина радиуса плашки */
    flex: none;
    position: relative;
    width: 15%;
    aspect-ratio: 4 / 5;
    background-color: var(--ids__photo-bg);

    & img {
      height: 100%;
      object-fit: cover;
    }

    & canvas {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
    }
  }

  & .about-author__text {
    flex: 1;
    min-width: 0;
  }
}

/* ==== components/style-page.css ==== */
/* Страница /style: подписи к примерам и тонировка невидимых блоков.
   Сами компоненты показываются без модификаций. */

.style-page {
  & .style-caption {
    margin: 1.2em 0 0.3em;
    font-family: var(--ids__font-sans);
    font-size: var(--ids__font-size-xs);
    color: var(--ids__text-caption);

    & code {
      font-size: 1em;
    }
  }

  & .style-row {
    display: flex;
    align-items: center;
    gap: 1em;
    flex-wrap: wrap;
  }
}

/* Тонировка снаружи: спейсеры и обёртки сами по себе невидимы */
.style-tint {
  background-color: color-mix(in srgb, var(--ids__accent) 25%, transparent);
  font-family: var(--ids__font-sans);
  font-size: var(--ids__font-size-xs);
  padding: 0 0.4em;
  margin-bottom: 0.3rem;
}

.style-frame {
  border: var(--ids__border-width-s) dashed var(--ids__border);
  padding: 0.5rem 0;
  margin-bottom: 1rem;
}

.style-swatches .ids__sequence-item {
  --columns: 5;

  @media (width < 768px) {
    --columns: 3;
  }
}

.style-swatch {
  font-family: var(--ids__font-sans);
  font-size: var(--ids__font-size-xs);
  margin-bottom: 0.5rem;

  & .style-swatch__color {
    height: 3em;
    border-radius: var(--ids__radius-s);
    box-shadow: inset 0 0 0 var(--ids__border-width-s) var(--ids__border);
    margin-bottom: 0.3em;
  }

  & .style-swatch__value {
    color: var(--ids__text-caption);
  }
}

.style-theme-panel {
  padding: 0.8em 1em 1em;
  border-radius: var(--ids__radius-m);
  margin-bottom: 1rem;
  box-shadow: inset 0 0 0 var(--ids__border-width-s) var(--ids__border);

  & .style-swatch {
    display: flex;
    align-items: center;
    gap: 0.6em;

    & .style-swatch__color {
      flex: none;
      width: 2.4em;
      height: 1.6em;
      margin: 0;
    }
  }
}

.style-tokens {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.2em 1em;
  font-family: var(--ids__font-sans);
  font-size: var(--ids__font-size-xs);
  margin-bottom: 1rem;

  & span:nth-child(even) {
    color: var(--ids__text-caption);
  }
}

.style-radii {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;

  & > div {
    width: 4em;
    height: 4em;
    background-color: color-mix(in srgb, var(--ids__text) 15%, transparent);
  }
}

.style-specimen {
  font-size: 1.4em;
  line-height: 1.2;
}
