/* soona, страница продукта.

   Палитра взята из бренд-пакета: чернила, бумага, фон и одна красная точка записи.
   Больше акцентных цветов не вводим, это правило бренда, а не вкусовщина.

   Шрифты лежат рядом, в site/fonts. Страница не делает ни одного внешнего запроса.
   Bricolage Grotesque используется только в вордмарке: кириллицы в нём нет. */

/* Шрифты ------------------------------------------------------------------ */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(fonts/inter-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(fonts/jetbrains-mono-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(fonts/jetbrains-mono-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 400 800;
  font-stretch: 100%;
  font-display: swap;
  src: url(fonts/bricolage-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Токены ------------------------------------------------------------------ */

:root {
  --ink: #14130f;
  --paper: #f1ede4;
  --sand: #e5e0d5;
  --red: #d92d20;

  --raise: #f8f5ef;      /* карточка, поднятая над бумагой */
  --text: #14130f;
  --text-2: rgba(20, 19, 15, 0.64);
  --text-3: rgba(20, 19, 15, 0.44);
  --line: rgba(20, 19, 15, 0.11);
  --line-2: rgba(20, 19, 15, 0.19);

  --shadow-sm: 0 1px 2px rgba(20, 19, 15, 0.05);
  --shadow-md: 0 1px 2px rgba(20, 19, 15, 0.05), 0 10px 28px rgba(20, 19, 15, 0.07);
  --shadow-lg: 0 2px 6px rgba(20, 19, 15, 0.06), 0 30px 70px rgba(20, 19, 15, 0.13);

  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI',
    Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', SFMono-Regular, Menlo, monospace;
  --display: 'Bricolage Grotesque', var(--sans);

  --wrap: 1180px;
  --r: 14px;
  --r-tile: 24px;
  --bento-gap: 14px;
  --topbar-h: clamp(74px, 10vh, 104px);

  /* Знаки вставок: тот же кадр и тот же буфер, что в пилюле. */
  --i-shot: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.4 6.6V4.6a2.2 2.2 0 0 1 2.2-2.2h2M17.6 6.6V4.6a2.2 2.2 0 0 0-2.2-2.2h-2M2.4 13.4v2a2.2 2.2 0 0 0 2.2 2.2h2M17.6 13.4v2a2.2 2.2 0 0 1-2.2 2.2h-2'/%3E%3Crect x='5.6' y='7.1' width='8.8' height='6.2' rx='1.7'/%3E%3Ccircle cx='10' cy='10.2' r='1.7'/%3E%3C/svg%3E");
  --i-clip: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23000' stroke-width='1.6' stroke-linejoin='round'%3E%3Crect x='2.6' y='2.6' width='9.2' height='11' rx='2'/%3E%3Crect x='7.6' y='6.4' width='9.8' height='11' rx='2'/%3E%3C/svg%3E");

  /* Пилюля всегда тёмная, при любой теме страницы: в жизни она тоже
     не меняется вслед за системой. */
  --pill-bg: #080807;
  --pill-fg: rgba(255, 255, 255, 0.93);
  --pill-dim: rgba(255, 255, 255, 0.5);
  --pill-fill: rgba(255, 255, 255, 0.12);
  --pill-danger: #ff453a;

  /* Тёмной темы у страницы нет, и это выбор, а не пропуск. Знак стоит на
     бумаге, страница тоже: два оформления означали бы два бренда, и половину
     правок пришлось бы делать дважды. Пилюля ниже остаётся тёмной всегда,
     потому что на экране она тёмная и в жизни. */
  --band: #14130f;
  --band-text: #f1ede4;
  --band-text-2: rgba(241, 237, 228, 0.68);
}

/* Основа ------------------------------------------------------------------ */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 24px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.62;
  font-feature-settings: 'cv05' 1, 'ss03' 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.mono { font-family: var(--mono); font-size: 0.9em; letter-spacing: -0.01em; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.028em; }

h1 {
  font-size: clamp(32px, min(4.2vw, 6vh), 54px);
  line-height: 1.12;
  font-weight: 750;
  letter-spacing: -0.025em;
  max-width: 20ch;
  text-wrap: balance;
}

h2 {
  font-size: clamp(25px, 2.9vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.035em;
  max-width: 20ch;
}

h3 { font-size: 17px; letter-spacing: -0.018em; }

p { margin: 0; }

.group-title {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-3);
}

.note { font-size: 14px; line-height: 1.6; color: var(--text-2); }
.dim { color: var(--text-3); }

kbd {
  font-family: var(--sans);
  font-size: 0.82em;
  font-weight: 550;
  line-height: 1;
  display: inline-block;
  min-width: 1.7em;
  text-align: center;
  padding: 3px 5px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--text) 8%, transparent);
  border: 1px solid var(--line);
  color: var(--text-2);
}

/* Шапка ------------------------------------------------------------------- */

.topbar { position: relative; z-index: 40; }

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--topbar-h);
  gap: 24px;
}
.wordmark-link { flex: none; }

.topnav {
  display: flex;
  gap: 26px;
  font-size: 14.5px;
  color: var(--text-2);
}
.topnav { align-items: center; }
.topnav a { color: inherit; text-decoration: none; transition: color 0.15s ease; }
.topnav a:hover { color: var(--text); }
.topnav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 17px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper) !important;
  font-weight: 550;
}
@media (max-width: 760px) { .topnav { display: none; } }

/* Вордмарка --------------------------------------------------------------- */

/* Файл из бренд-пакета, один в один: буквы живым текстом в Bricolage Grotesque
   800, полосы «oo» прямоугольниками, точка записи единственным цветным пятном.
   Чернила подхватывают currentColor, поэтому одна и та же разметка годится
   и на бумаге, и на тёмной пилюле. */
.wm {
  display: inline-block;
  font-family: var(--display);
  font-weight: 800;
  font-size: 22px;
  line-height: 1;
  letter-spacing: -0.06em;
  white-space: nowrap;
  color: currentColor;
}

/* Зазоры из макета: 7 между «s» и полосами, 3 между группами и перед «na». */
.wm-g7 { display: inline-block; width: 0.0795455em; }
.wm-g3 { display: inline-block; width: 0.0340909em; }

/* Группа полос занимает место буквы «o»: 42 на 48.4 при кегле 88. */
.wm-oo {
  display: inline-block;
  position: relative;
  width: 0.4772727em;
  height: 0.55em;
  vertical-align: baseline;
}
.wm-oo > span {
  position: absolute;
  left: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.0568182em;
  width: 0.4772727em;
  height: 0.55em;
}
.wm-oo i {
  flex: none;
  width: 0.1022727em;
  border-radius: 0.0511364em;
  background: currentColor;
}

/* Высоты приходят из одного счётчика на всю страницу, поэтому знак в шапке,
   в подвале и в доке дышит в такт. Без скрипта полосы стоят силуэтом «oo». */
.wm-b1 { height: var(--wm-1, 0.3409091em); }
.wm-b2 { height: var(--wm-2, 0.5454545em); }
.wm-b3 { height: var(--wm-3, 0.4090909em); }
.wm-b4 { height: var(--wm-4, 0.3409091em); }
.wm-b5 { height: var(--wm-5, 0.5454545em); }
.wm-b6 { height: var(--wm-6, 0.4090909em); }

.wm-na { position: relative; }
.wm-dot {
  position: absolute;
  right: -0.25em;
  bottom: 0.7045455em;
  width: 0.1818182em;
  height: 0.1818182em;
  border-radius: 50%;
  background: var(--red);
  animation: wm-blink 1.6s infinite;
}
@keyframes wm-blink {
  0%, 45% { opacity: 1; }
  55%, 100% { opacity: 0.15; }
}

.wordmark-link { display: inline-flex; color: var(--text); text-decoration: none; }

/* Яблоко на кнопке скачивания: приложение только для мака, и это должно быть
   видно до того, как человек прочитает строку системных требований. */
.apple-mark {
  width: 0.95em;
  height: 0.95em;
  flex: none;
  /* Знак оптически тяжелее строчных букв, поэтому сидит чуть выше базовой. */
  margin-top: -0.12em;
}

/* Кнопки ------------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 550;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.btn:hover { background: color-mix(in srgb, var(--text) 6%, transparent); }
.btn:active { transform: translateY(0.5px); }

.btn-primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.btn-primary:hover { background: color-mix(in srgb, var(--ink) 86%, var(--red)); }
/* Вторая кнопка у цены: скачать можно и не купив. Тише первой, потому что
   решение здесь всё-таки о покупке, а не о загрузке. */
.btn-quiet {
  background: none;
  border-color: rgba(241, 237, 228, 0.24);
  color: var(--band-text);
}
.btn-quiet:hover { background: rgba(241, 237, 228, 0.08); }
.price-main .btn-quiet { margin-top: 10px; }

.btn-wide { width: 100%; }
.btn:disabled { opacity: 0.42; cursor: default; pointer-events: none; }

/* ХИРО -------------------------------------------------------------------- */

/* Хиро занимает окно целиком и кончается ровно на нижнем крае экрана:
   пилюля внутри сцены прижата к её низу, поэтому при загрузке она оказывается
   в самом низу окна браузера, ровно там, где живёт в macOS. */
.hero {
  min-height: calc(100svh - var(--topbar-h));
  display: flex;
  flex-direction: column;
  padding: clamp(20px, 3.2vh, 44px) 0 0;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: none;
}

/* Знак ---------------------------------------------------------------------
   Тот же файл, что и в шапке, только крупно. Полосы «oo» приходят в движение
   на загрузке и садятся на свои статичные высоты: правило бренда, анимация
   меняет только высоту полос. */
.wm-hero { font-size: clamp(32px, min(3.4vw, 5.1vh), 49px); }

.hero h1 { margin: 0; }

/* Вторая строка шапки: та, ради которой человек и приходит. Тише первой, но
   не мелочью: обещание про скорость должно читаться, а не прятаться. */
.lede-gain {
  margin-top: 10px;
  max-width: 52ch;
  font-size: clamp(15px, min(1.3vw, 2vh), 18px);
  color: var(--text-3);
}

.lede {
  margin: clamp(14px, 2.2vh, 24px) 0 0;
  max-width: 56ch;
  font-size: clamp(16px, min(1.5vw, 2.3vh), 21px);
  line-height: 1.55;
  color: var(--text-2);
  text-wrap: pretty;
}
.lede kbd { font-size: 0.84em; vertical-align: 0.06em; }

/* СЦЕНА: экран мака с пилюлей снизу ---------------------------------------- */

.stage {
  flex: 1;
  min-height: 260px;
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: clamp(16px, 2.4vh, 32px);
  padding: 0 24px;
}

/* Корпус. Нижнего края у него нет: экран уходит за нижнюю границу окна,
   и пилюля, прижатая к его низу, оказывается прижата к низу окна браузера.
   Внутренность обрезана по радиусу, поэтому пилюля обрезается ровно так же,
   как на настоящем мониторе. */
.screen {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: calc(var(--wrap) - 48px);
  border-radius: var(--r-tile) var(--r-tile) 0 0;
  padding: 9px 9px 0;
  background: linear-gradient(175deg, #d8d4cb, #b8b3a8);
  box-shadow:
    0 -2px 6px rgba(20, 19, 15, 0.06),
    0 -18px 60px rgba(20, 19, 15, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
.screen-inner {
  position: relative;
  flex: 1;
  min-height: 0;
  border-radius: 11px 11px 0 0;
  overflow: hidden;
  background: #cfd6dd;
  isolation: isolate;
  /* Всё внутри считается от размера экрана, поэтому сцена уменьшается целиком,
     а не рассыпается на узком или низком окне. */
  container-type: size;
  font-size: clamp(9px, min(1.18cqi, 2.2cqb), 14px);
}

.scene { position: absolute; inset: 0; }

/* Обои ---------------------------------------------------------------------
   Не копия системных, а бренд: тёплая бумага с холодным провалом сверху. */
.wallpaper {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(90% 75% at 84% 4%, #f6f1e6 0%, rgba(246, 241, 230, 0) 62%),
    radial-gradient(75% 65% at 8% 96%, #6e6558 0%, rgba(110, 101, 88, 0) 66%),
    linear-gradient(158deg, #b9ab93 0%, #cdbfa6 42%, #e8dcc6 100%);
}
.wallpaper::after {
  /* Зерно: без него градиент выдаёт себя полосами. */
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* Строка меню -------------------------------------------------------------- */

.menubar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2.1em;
  display: flex;
  align-items: center;
  gap: 1.5em;
  padding: 0 1em;
  font-size: 1.05em;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.93);
  background: rgba(30, 28, 24, 0.24);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  text-shadow: 0 0.5px 1px rgba(0, 0, 0, 0.25);
  z-index: 5;
}
.menubar .apple { font-size: 1.15em; opacity: 0.95; }
.menubar .app { font-weight: 650; }
.menubar .spacer { flex: 1; }
.menubar .tray { display: flex; align-items: center; gap: 1.1em; opacity: 0.95; }
.menubar .tray svg { width: 1.2em; height: 1.2em; display: block; }
.menubar .clock { font-variant-numeric: tabular-nums; }

/* Знак в трее: те же три полосы и точка. Красная, когда идёт запись. */
.tray-mark { display: flex; align-items: center; gap: 0.16em; height: 1.15em; }
.tray-mark i { width: 0.17em; border-radius: 0.09em; background: currentColor; }
.tray-mark i:nth-child(1) { height: 0.44em; }
.tray-mark i:nth-child(2) { height: 0.84em; }
.tray-mark i:nth-child(3) { height: 0.58em; }
.tray-mark .dot {
  width: 0.3em; height: 0.3em; border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  align-self: flex-start;
  margin-left: 0.1em;
  transition: background 0.2s ease;
}
.scene.is-recording .tray-mark .dot { background: var(--pill-danger); }

/* Окна --------------------------------------------------------------------- */

/* Два окна рядом, без нахлёста: слева приложение, справа редактор с агентом.
   Каждое стоит на своей половине и живёт полную высоту сцены. */
.win {
  position: absolute;
  top: 6%;
  bottom: 23%;
  border-radius: 0.85em;
  overflow: hidden;
  background: #fbfaf8;
  box-shadow:
    0 0 0 0.5px rgba(20, 19, 15, 0.16),
    0 1.4em 3.2em rgba(20, 19, 15, 0.26),
    0 0.3em 0.9em rgba(20, 19, 15, 0.14);
  display: flex;
  flex-direction: column;
}

.win-app { left: 2.5%; width: 46.5%; }
.win-code { right: 2.5%; width: 46.5%; background: #17161c; }

/* Окно, в котором сейчас работают, и второе, которое ждёт. Разница нарочно
   небольшая: это подсказка, а не спецэффект. */
.win { transition: opacity 0.45s ease, transform 0.45s ease; }
.scene.focus-app .win-code,
.scene.focus-code .win-app {
  opacity: 0.72;
  transform: scale(0.985);
}

.win-bar {
  height: 2.5em;
  flex: none;
  display: flex;
  align-items: center;
  gap: 0.55em;
  padding: 0 0.9em;
  background: #edebe6;
  border-bottom: 0.5px solid rgba(20, 19, 15, 0.1);
}
.win-bar .lights { display: flex; gap: 0.5em; }
.win-bar .lights i {
  width: 0.82em; height: 0.82em; border-radius: 50%;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.14);
}
.win-bar .lights i:nth-child(1) { background: #f9605a; }
.win-bar .lights i:nth-child(2) { background: #fbbe3f; }
.win-bar .lights i:nth-child(3) { background: #33c94a; }
.win-title {
  flex: 1;
  text-align: center;
  font-size: 1em;
  font-weight: 600;
  color: rgba(20, 19, 15, 0.6);
  margin-left: -3.2em;
  letter-spacing: -0.01em;
}
.win-code .win-bar { background: #232128; border-bottom-color: rgba(255, 255, 255, 0.08); }
.win-code .win-title { color: rgba(255, 255, 255, 0.5); }
.win-code .lights i { box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.3); }

/* Приложение слева ---------------------------------------------------------- */

.app-body { flex: 1; min-height: 0; display: flex; }

.app-side {
  flex: none;
  width: 8.5em;
  padding: 0.7em 0.5em;
  background: #f2f0ea;
  border-right: 0.5px solid rgba(20, 19, 15, 0.09);
  display: flex;
  flex-direction: column;
  gap: 0.15em;
}
.app-side-item {
  padding: 0.42em 0.6em;
  border-radius: 0.4em;
  font-size: 1em;
  font-weight: 500;
  color: rgba(20, 19, 15, 0.62);
}
.app-side-item.is-on { background: rgba(20, 19, 15, 0.09); color: rgba(20, 19, 15, 0.9); font-weight: 600; }

.app-main { flex: 1; min-width: 0; padding: 0.8em; display: flex; flex-direction: column; }

/* Ровно та поломка, о которой говорят вслух: последняя кнопка обрезана краем. */
.toolbar-demo {
  display: flex;
  gap: 0.4em;
  padding: 0.45em;
  border-radius: 0.55em;
  background: #f1efea;
  border: 0.5px solid rgba(20, 19, 15, 0.09);
  overflow: hidden;
  position: relative;
  flex: none;
}
.toolbar-demo span {
  flex: none;
  font-size: 1em;
  padding: 0.34em 0.66em;
  border-radius: 0.38em;
  background: #fff;
  border: 0.5px solid rgba(20, 19, 15, 0.11);
  color: rgba(20, 19, 15, 0.7);
  white-space: nowrap;
}
.toolbar-demo span.on { background: #14130f; color: #f1ede4; border-color: #14130f; }
.toolbar-demo::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 2em;
  background: linear-gradient(90deg, rgba(241, 239, 234, 0), #f1efea 72%);
}

.app-list { list-style: none; margin: 0.7em 0 0; padding: 0; flex: 1; display: flex; flex-direction: column; }
.app-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8em;
  padding: 0.62em 0.15em;
  border-bottom: 0.5px solid rgba(20, 19, 15, 0.07);
  font-size: 1em;
}
.app-list b { font-weight: 500; color: rgba(20, 19, 15, 0.82); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-list span { flex: none; color: rgba(20, 19, 15, 0.38); font-size: 0.92em; }

/* Редактор справа ----------------------------------------------------------- */

.code {
  flex: 1;
  min-height: 0;
  padding: 0.7em 0 0.7em 0;
  font-family: var(--mono);
  font-size: 0.98em;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.84);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 calc(100% - 1.7em), transparent);
  mask-image: linear-gradient(#000 calc(100% - 1.7em), transparent);
}
.code-line { white-space: pre; padding: 0 0.9em 0 0; min-height: 1.75em; }
.ln {
  display: inline-block;
  width: 2.6em;
  padding-right: 0.9em;
  text-align: right;
  color: rgba(255, 255, 255, 0.24);
  font-variant-numeric: tabular-nums;
}
.c-sel { color: #f0b76b; }
.c-k { color: #8ab4ff; }
.c-v { color: #93e7a8; }
.c-n { color: #e9a2c8; }
.c-p { color: rgba(255, 255, 255, 0.42); }

/* Строка, которую копируют посреди фразы. */
.term-copy {
  border-radius: 0.25em;
  padding: 0.08em 0.25em;
  margin: 0 -0.25em;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}
.scene.copy-flash .term-copy {
  background: rgba(138, 180, 255, 0.28);
  box-shadow: 0 0 0 0.15em rgba(138, 180, 255, 0.28);
}

/* Агент снизу редактора: сюда приезжает готовый текст. */
.agent {
  flex: none;
  height: 10.5em;
  display: flex;
  flex-direction: column;
  border-top: 0.5px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  padding: 0.7em 0.9em 0.8em;
}
.agent-head {
  display: flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--mono);
  font-size: 0.92em;
  color: rgba(255, 255, 255, 0.62);
}
.agent-dot { width: 0.5em; height: 0.5em; border-radius: 50%; background: #6ee787; flex: none; }
.agent-path { color: rgba(255, 255, 255, 0.3); }

.term-input {
  margin-top: 0.55em;
  border-radius: 0.45em;
  border: 0.5px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 0.55em 0.7em;
  font-family: var(--mono);
  font-size: 0.98em;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.88);
  white-space: pre-wrap;
  word-break: break-word;
}
.term-caret {
  display: inline-block;
  width: 0.55em;
  height: 1.05em;
  vertical-align: text-bottom;
  background: rgba(255, 255, 255, 0.75);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* Вставки в готовом тексте: путь к снимку и кусок из буфера. */
.chip-in {
  display: inline;
  border-radius: 0.3em;
  padding: 0.08em 0.32em;
  margin: 0 0.05em;
  animation: chip-in 0.32s cubic-bezier(0.2, 0.9, 0.25, 1) both;
}
.chip-file { background: rgba(138, 180, 255, 0.18); color: #a8c6ff; }
.chip-clip { background: rgba(240, 183, 107, 0.18); color: #f0c48b; }
@keyframes chip-in {
  from { opacity: 0; transform: translateY(-0.25em); }
  to { opacity: 1; transform: none; }
}

/* Снимок экрана: рамка выделения, размер, вспышка --------------------------- */

.shot-layer {
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s ease;
}
.scene.is-selecting .shot-layer { opacity: 1; }

/* Так это и выглядит в macOS: остальной экран не гаснет, подсвечена сама
   область, тонкой белой рамкой поверх тёмного контура. */
.shot-sel {
  position: absolute;
  left: var(--sx, 0);
  top: var(--sy, 0);
  width: var(--sw, 0);
  height: var(--sh, 0);
  background: rgba(120, 145, 175, 0.22);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.95),
    0 0 0 2px rgba(20, 22, 26, 0.35);
  transition: all 0.46s cubic-bezier(0.33, 0.9, 0.3, 1);
}

.shot-size {
  position: absolute;
  left: calc(var(--sx, 0px) + var(--sw, 0px) + 0.7em);
  top: calc(var(--sy, 0px) + var(--sh, 0px) + 0.7em);
  font-family: var(--mono);
  font-size: 0.95em;
  font-variant-numeric: tabular-nums;
  padding: 0.25em 0.45em;
  border-radius: 0.3em;
  background: rgba(20, 22, 26, 0.8);
  color: #fff;
  transition: all 0.46s cubic-bezier(0.33, 0.9, 0.3, 1);
}

/* Перекрестие ⌘⇧4, на углу, который тянут. */
.shot-cross {
  position: absolute;
  left: calc(var(--sx, 0px) + var(--sw, 0px));
  top: calc(var(--sy, 0px) + var(--sh, 0px));
  width: 1.8em;
  height: 1.8em;
  margin: -0.9em 0 0 -0.9em;
  transition: all 0.46s cubic-bezier(0.33, 0.9, 0.3, 1);
}
.shot-cross::before, .shot-cross::after {
  content: '';
  position: absolute;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 0.5px rgba(20, 22, 26, 0.65);
}
.shot-cross::before { left: 50%; top: 0; bottom: 0; width: 1px; margin-left: -0.5px; }
.shot-cross::after { top: 50%; left: 0; right: 0; height: 1px; margin-top: -0.5px; }

.shot-flash {
  position: absolute;
  inset: 0;
  z-index: 25;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}
.scene.is-flashing .shot-flash { animation: flash 0.34s ease-out; }
@keyframes flash {
  0% { opacity: 0; }
  12% { opacity: 0.85; }
  100% { opacity: 0; }
}

/* Снимок летит в пилюлю. Тот же жест, что у системного превью в углу,
   только цель другая. */
.shot-fly {
  position: absolute;
  z-index: 24;
  border-radius: 0.35em;
  overflow: hidden;
  box-shadow: 0 0.4em 1.2em rgba(20, 19, 15, 0.4), 0 0 0 0.5px rgba(255, 255, 255, 0.5);
  pointer-events: none;
  background: #f1efea;
  opacity: 0;
}
.shot-fly.is-flying {
  animation: fly 0.62s cubic-bezier(0.5, 0, 0.2, 1) forwards;
}
@keyframes fly {
  0%   { opacity: 1; transform: translate(0, 0) scale(1); }
  100% { opacity: 0.9; transform: translate(var(--fx), var(--fy)) scale(var(--fs)); }
}

/* Реплика говорящего. Оформлена как речь, а не как элемент приложения:
   в самом приложении никаких субтитров нет. */
.speech {
  position: absolute;
  left: 50%;
  bottom: 8.4em;
  transform: translateX(-50%);
  z-index: 22;
  max-width: 74%;
  padding: 0.7em 1.05em;
  border-radius: 1.2em;
  background: rgba(248, 245, 239, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 0.6em 2em rgba(20, 19, 15, 0.22), 0 0 0 0.5px rgba(20, 19, 15, 0.1);
  color: #14130f;
  font-size: 1.25em;
  line-height: 1.45;
  letter-spacing: -0.015em;
  text-align: center;
  opacity: 0;
  transition: opacity 0.28s ease, transform 0.28s ease;
  transform: translateX(-50%) translateY(0.6em);
}
.scene.has-speech .speech { opacity: 1; transform: translateX(-50%) translateY(0); }
.speech::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -0.42em;
  width: 0.9em;
  height: 0.9em;
  margin-left: -0.45em;
  background: inherit;
  transform: rotate(45deg);
  border-radius: 0.12em;
}
.speech b { font-weight: 650; }
.speech .said-key {
  display: inline-block;
  font-size: 0.82em;
  font-weight: 600;
  padding: 0.1em 0.4em;
  border-radius: 0.4em;
  background: rgba(20, 19, 15, 0.09);
  vertical-align: 0.08em;
  margin: 0 0.15em;
}

/* Подсказка о нажатой клавише, у самого низа. */
.keycue {
  position: absolute;
  left: 50%;
  bottom: 1.2em;
  transform: translateX(-50%) scale(0.94);
  z-index: 23;
  display: flex;
  gap: 0.3em;
  padding: 0.4em 0.55em;
  border-radius: 0.6em;
  background: rgba(20, 19, 15, 0.76);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.16s ease, transform 0.16s ease;
  pointer-events: none;
}
.scene.has-keycue .keycue { opacity: 1; transform: translateX(-50%) scale(1); }
.keycue span {
  min-width: 1.6em;
  padding: 0.2em 0.35em;
  border-radius: 0.32em;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 1em;
  font-weight: 600;
  text-align: center;
  line-height: 1.35;
}

/* ПИЛЮЛЯ ------------------------------------------------------------------ */

/* Метрики один в один из src/pill.css приложения, только выражены в em,
   чтобы пилюля жила в тех же единицах, что и остальная сцена. */
.pill {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6em;
  padding: 0.75em 1.2em;
  background: var(--pill-bg);
  color: var(--pill-fg);
  /* Скруглены только верхние углы: нижний край это край экрана. */
  border-radius: 1.45em 1.45em 0 0;
  box-shadow: 0 -0.2em 1.6em rgba(0, 0, 0, 0.3);
  font-size: 1.25em;
  transition: padding 0.24s cubic-bezier(0.2, 0.9, 0.25, 1);
  user-select: none;
}

.pill-row {
  display: flex;
  align-items: center;
  gap: 0.85em;
  white-space: nowrap;
}

/* Полосы уровня. В приложении их высоту задаёт настоящий микрофон;
   здесь она задана скриптом, тем же диапазоном и тем же переходом. */
.wave { display: flex; align-items: center; gap: 0.21em; height: 1.5em; flex: none; }
.wave i {
  display: block;
  width: 0.21em;
  height: 0.25em;
  border-radius: 0.125em;
  background: var(--pill-dim);
  transition: height 90ms cubic-bezier(0.25, 0.8, 0.35, 1), background-color 200ms ease;
}
.pill[data-state='recording'] .wave i { background: var(--pill-fg); }

.pill-label {
  font-size: 1em;
  font-weight: 550;
  letter-spacing: -0.008em;
  min-width: 4.4em;
  text-align: left;
}

.pill-key {
  font-family: inherit;
  font-size: 0.88em;
  font-weight: 500;
  line-height: 1;
  padding: 0.25em 0.42em;
  border-radius: 0.33em;
  background: var(--pill-fill);
  color: var(--pill-dim);
  border: 0;
  flex: none;
}
.pill-key[hidden] { display: none; }

/* Счётчики снимков и буфера. Тусклые, пока считать нечего. */
.pill-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25em;
  flex: none;
  padding: 0.3em 0.5em;
  border-radius: 999px;
  background: color-mix(in srgb, var(--pill-fill) 55%, transparent);
  color: var(--pill-dim);
  font-size: 0.9em;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.pill-chip svg { width: 1.25em; height: 1.25em; display: block; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.pill-chip.is-on { background: var(--pill-fill); color: var(--pill-fg); }
.pill-chip.is-bump { transform: scale(1.14); }
.pill-chip b { font-weight: 600; }

.pill-spacer { flex: 1; min-width: 0.5em; }

/* Корзина с подписью клавиши: снять последний снимок, не прерывая диктовку. */
.pill-trash {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  flex: none;
  border: 0;
  border-radius: 0.45em;
  background: transparent;
  cursor: default;
  padding: 0.25em 0.35em;
  transition: background 0.12s ease;
}
.pill-trash svg { width: 1.15em; height: 1.15em; fill: var(--pill-danger); display: block; flex: none; }
.pill-trash[hidden] { display: none; }
.pill-trash:hover { background: var(--pill-fill); }
.pill-key-flat { background: transparent; padding: 0; }

/* Превью снимков под строкой. */
.pill-thumbs { display: flex; align-items: center; gap: 0.33em; }
.pill-thumbs:empty { display: none; }

.pill-thumb {
  width: 3.2em;
  height: 2em;
  border-radius: 0.33em;
  overflow: hidden;
  flex: none;
  position: relative;
  background: #f1efea;
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.22);
  animation: thumb-in 0.24s cubic-bezier(0.2, 0.9, 0.25, 1);
}
@keyframes thumb-in {
  from { opacity: 0; transform: scale(0.7); }
  to { opacity: 1; transform: scale(1); }
}

/* Превью показывает то, что сняли: настоящий снимок области, а не рисунок. */
.pill-thumb img, .shot-fly img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* На узком экране два окна рядом не помещаются: ставим их друг под друга
   и даём экрану пропорции повыше, иначе всё слипается в кашу. */
@media (max-width: 700px) {
  .win { top: 9%; bottom: auto; }
  .win-app { left: 4%; width: 72%; height: 32%; }
  .win-code { right: 4%; top: 43%; width: 78%; height: 30%; }
  .app-side { display: none; }
  .speech { bottom: 7.8em; max-width: 86%; font-size: 1.15em; }
}

/* Секции ------------------------------------------------------------------- */

/* Полосы фона во всю ширину ушли: разделяют страницу теперь сами плитки,
   поэтому секции стоят ближе друг к другу, чем стояли полосы. */
.section { padding: clamp(30px, 4.5vh, 56px) 0; }
.section-lede { margin-top: 16px; max-width: 62ch; font-size: 17.5px; color: var(--text-2); }
.note-wide { margin-top: 24px; max-width: 76ch; }

/* Бенто -------------------------------------------------------------------
   Шесть колонок на всю ширину. Плитка занимает 2, 3, 4 или все 6, из чего
   и складывается ритм: тройка, пара, полоса. Узкие плитки на планшете
   становятся половиной, на телефоне разворачиваются в столбец. */
.bento {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--bento-gap);
  margin-top: 30px;
  /* Плитки в ряду тянутся до общей высоты: рваный низ читается как сбой
     вёрстки, а не как приём. */
  align-items: stretch;
}
/* Рамки у плиток нет: блок отделяется от страницы своей поверхностью, а не
   обведённым контуром. Контур на каждой плитке собирал страницу в сетку клеток
   и спорил с закруглением. */
.tile {
  grid-column: span 6;
  min-width: 0;
  padding: 26px 24px 28px;
  border-radius: var(--r-tile);
  background: var(--raise);
  box-shadow: var(--shadow-sm);
}
.t-2 { grid-column: span 2; }
.t-3 { grid-column: span 3; }
.t-4 { grid-column: span 4; }
.t-6 { grid-column: span 6; }

/* Плитка без подложки: для сносок, которые не должны спорить с содержимым. */
.tile-quiet {
  padding: 2px 2px 0;
  background: none;
  border-color: transparent;
  box-shadow: none;
}
.tile-quiet .note-wide { margin-top: 0; }
.tile-quiet .note-wide + .note-wide { margin-top: 14px; }

/* Песочная плитка: тот же приём, что был у полосы, только в размер плитки. */
.tile-sand { background: var(--sand); }

/* Тёмная плитка: та же бумага, вывернутая наизнанку. */
.tile-ink {
  background: var(--band);
  color: var(--band-text);
}
.tile-ink h2, .tile-ink h3 { color: var(--band-text); }
.tile-ink h3 { margin-bottom: 7px; }
/* Только цвет. Кегль тут стоял тоже, и при равной силе он перебивал крупную
   цену на такой же тёмной плитке: 499 рублей выходили в четырнадцать пунктов.
   Размер теперь задаётся там, где он нужен, а не всем абзацам разом. */
.tile-ink p { color: var(--band-text-2); }
#local .tile-ink p { font-size: 14.5px; line-height: 1.6; }

.tile > :first-child { margin-top: 0; }

@media (max-width: 1000px) {
  .t-2, .t-3, .t-4 { grid-column: span 3; }
}
@media (max-width: 680px) {
  .bento { gap: 12px; }
  .t-2, .t-3, .t-4 { grid-column: span 6; }
  .tile { padding: 22px 20px 24px; border-radius: 20px; }
}

.tile-title { font-size: 19px; font-weight: 650; letter-spacing: -0.025em; }

/* Значок у заголовка. Тот же росчерк, что у «Агента» в боковом меню приложения:
   не сам знак Apple, а своя звезда той же формы. Знаки SF Symbols лицензия
   разрешает только внутри приложений для её платформ, на сайте их быть не может,
   поэтому одинаковыми они сделаны в другую сторону: рисунок наш, и он стоит
   в обоих местах. */
.h2-marked { display: flex; align-items: center; gap: 12px; }
.head-icon { width: 0.72em; height: 0.72em; flex: none; color: var(--text-3); }

/* Одна клавиша вместо шести шагов ------------------------------------------
   Единственное место, где на странице стоит что-то с чем-то сравнивать: длина
   левого столбца и есть аргумент, поэтому шаги не сокращены до трёх. */
.versus {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  /* По верху, чтобы подписи столбцов стояли на одной линии: по центру правый
     столбец, который короче, уезжал вниз и сравнивать было нечего с чем. */
  align-items: start;
  gap: 32px;
  padding: 34px 32px 36px;
}
@media (max-width: 860px) {
  .versus { grid-template-columns: 1fr; gap: 20px; padding: 26px 22px 28px; }
  /* Стрелка вбок между столбцами, которых больше нет, показывала бы не туда. */
  .versus-arrow svg { transform: rotate(90deg); }
}

.versus-label {
  margin-bottom: 16px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-3);
}
.versus-now .versus-label { color: var(--text); }

.steps { list-style: none; margin: 0; padding: 0; }
.steps li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 7px 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-2);
}
.versus-now .steps li { font-size: 17px; color: var(--text); }

.step-num {
  flex: none;
  width: 21px;
  height: 21px;
  align-self: flex-start;
  margin-top: 2px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--text) 8%, transparent);
  color: var(--text-3);
  font-size: 12px;
  font-weight: 600;
  line-height: 21px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.versus-now .step-num { background: var(--ink); color: var(--paper); }

.versus-arrow { display: flex; align-self: center; justify-content: center; color: var(--text-3); }
.versus-arrow svg { width: 26px; height: 26px; }

.versus-note { margin-top: 14px; font-size: 14.5px; line-height: 1.55; color: var(--text-2); }

/* Плитка со снимком: кадр сверху, разговор под ним. */
.shot-tile .shot { margin-bottom: 20px; }
.shot-tile .split-title { font-size: 22px; }

/* Иконка приложения ---------------------------------------------------------
   Та же геометрия, что в макете, только выраженная в em от размера иконки:
   полосы 13 при 128, зазор 9, точка 14 в двадцати от угла. Цвета у иконки
   свои и за темой страницы не идут: в доке она выглядит одинаково всегда. */
.icons-row { display: flex; gap: 16px; margin: 20px 0 18px; }
.appicon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.0703125em;
  flex: none;
  width: 1em;
  height: 1em;
  font-size: 72px;
  border-radius: 0.25em;
}
.appicon i {
  flex: none;
  width: 0.1015625em;
  border-radius: 0.0507813em;
}
.appicon i:nth-child(1) { height: 0.265625em; }
.appicon i:nth-child(2) { height: 0.5em; }
.appicon i:nth-child(3) { height: 0.34375em; }
.appicon b {
  position: absolute;
  right: 0.15625em;
  top: 0.15625em;
  width: 0.109375em;
  height: 0.109375em;
  border-radius: 50%;
  background: #d92d20;
}
.appicon-dark { background: #14130f; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18); }
.appicon-dark i { background: #f1ede4; }
.appicon-light { background: #f1ede4; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12); }
.appicon-light i { background: #14130f; }

/* Три вещи одной клавишей -------------------------------------------------- */

.triple-num {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.triple-card h3 { margin: 12px 0 9px; font-size: 21px; font-weight: 700; letter-spacing: -0.03em; }
.triple-card p { font-size: 15px; line-height: 1.55; color: var(--text-2); }
.triple-card kbd { margin-right: 1px; }

/* Экраны приложения -------------------------------------------------------- */

.split {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 44px;
  align-items: center;
  margin-top: 44px;
}
.split-flip { grid-template-columns: 1.18fr 0.82fr; }
.split-flip .split-text { order: 2; }
.split-flip .shot { order: 1; }
@media (max-width: 860px) {
  .split, .split-flip { grid-template-columns: 1fr; gap: 24px; }
  .split-flip .split-text { order: 1; }
  .split-flip .shot { order: 2; }
}
.split-title { font-size: clamp(23px, 2.4vw, 30px); font-weight: 700; letter-spacing: -0.035em; line-height: 1.15; }
.split-text p { margin-top: 14px; font-size: 16px; line-height: 1.6; color: var(--text-2); }
.callout {
  padding: 14px 16px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--text) 5%, transparent);
  font-size: 14.5px;
  line-height: 1.55;
}

/* Снимок экрана вставлен снимком экрана: без подложки, без нарисованной рамки.
   У снимка окна своя тень внутри файла, плоскому кадру она дорисовывается. */
.shot { margin: 0; }
.shot img { display: block; width: 100%; height: auto; }
.shot-flat img {
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(20, 19, 15, 0.08), 0 18px 44px rgba(20, 19, 15, 0.14);
}

/* Пример: две карточки ------------------------------------------------------ */

.demo-card { display: flex; flex-direction: column; }
.said { margin-top: 12px; font-size: 16px; line-height: 1.7; }

.mark {
  display: inline;
  /* Путь к снимку это одно длинное слово без пробелов: без разрешения рвать
     его где угодно строка уезжает за край плитки. */
  overflow-wrap: anywhere;
  border-radius: 5px;
  padding: 1px 5px;
  font-size: 0.92em;
}
.mark-pending {
  background: color-mix(in srgb, var(--text) 7%, transparent);
  color: var(--text-2);
  font-family: var(--sans);
  font-size: 0.8em;
  font-weight: 550;
  white-space: nowrap;
  vertical-align: 0.08em;
}
.mark-key { font-weight: 600; color: var(--text); margin-right: 3px; }
.mark-file, .mark-clip {
  font-family: var(--mono);
  background: color-mix(in srgb, var(--text) 7%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 8%, transparent);
  color: var(--text);
  padding: 2px 6px 2px 5px;
}
.mark-file { word-break: break-all; }
/* Знак вместо заливки: что это, видно и без цвета. */
.mark-file::before, .mark-clip::before {
  content: '';
  display: inline-block;
  width: 0.95em;
  height: 0.95em;
  margin-right: 0.35em;
  vertical-align: -0.12em;
  background: currentColor;
  opacity: 0.5;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-size: contain; mask-size: contain;
}
.mark-file::before {
  -webkit-mask-image: var(--i-shot); mask-image: var(--i-shot);
}
.mark-clip::before {
  -webkit-mask-image: var(--i-clip); mask-image: var(--i-clip);
}

/* Дорожка времени. */
.track { position: relative; height: 24px; margin-top: 20px; }
.track-line {
  position: absolute; left: 0; right: 0; top: 11px; height: 2px;
  border-radius: 1px; background: var(--line-2);
}
.track-tick {
  position: absolute; top: 4px; width: 2px; height: 16px;
  border-radius: 1px; background: var(--red);
  transform: translateX(-1px);
}
.track-labels {
  position: relative; height: 16px;
  font-size: 11.5px; color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.track-labels span { position: absolute; top: 0; }

.tabs { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: color-mix(in srgb, var(--text) 6%, transparent); }
.tab {
  border: 0; background: transparent; font: inherit;
  font-size: 13.5px; font-weight: 550;
  padding: 5px 13px; border-radius: 999px;
  color: var(--text-2); cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.tab.is-active { background: var(--raise); color: var(--text); box-shadow: var(--shadow-sm); }

.out { display: none; margin-top: 16px; font-size: 14.5px; line-height: 1.75; }
.out.is-active { display: block; }
.out p + p { margin-top: 9px; }
.out-note { margin-top: auto; padding-top: 16px; }

/* Колонки ------------------------------------------------------------------ */

.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px 34px; margin-top: 32px; }


/* Словарь и режимы ---------------------------------------------------------- */

/* Пары «услышано, записано» в две колонки: строк много, а каждая короткая,
   и в одну колонку список превращался бы в простыню. */
.terms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 0 40px;
  align-items: start;
}
.term {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15.5px;
}
/* Последняя строка в каждом столбце без черты: она отделяла бы от пустоты. */
.term:last-child, .term:nth-last-child(2):nth-child(odd) { border-bottom: none; }
.term-heard { color: var(--text-2); flex: 1; min-width: 0; }
/* Стрелка нарисована псевдоэлементом: в разметке ей делать нечего. */
.term-heard::after { content: ' →'; color: var(--text-3); }
.term-written { flex: none; font-weight: 500; }

.modes { list-style: none; padding: 0; }
.modes li { display: flex; flex-direction: column; gap: 7px; font-size: 15px; }
.mode-icon { width: 21px; height: 21px; margin-bottom: 7px; color: var(--text-2); }

.modes b { font-size: 17px; font-weight: 650; letter-spacing: -0.02em; }
.modes span { font-size: 14.5px; line-height: 1.5; color: var(--text-2); }

/* Цена ---------------------------------------------------------------------- */

/* Цена ---------------------------------------------------------------------
   Единственное место на странице, где просят действия, и потому единственная
   тёмная плитка в нижней половине. Цена слева, форма справа: на телефоне они
   встают друг под друга. */
.price-main {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  padding: 40px 36px 42px;
}
@media (max-width: 820px) {
  .price-main { grid-template-columns: 1fr; gap: 28px; padding: 32px 24px 34px; }
}

/* Те же полосы, что в знаке, от того же счётчика: цена дышит вместе с шапкой. */
.price-wave {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  margin-bottom: 20px;
}
.price-wave i {
  width: 6px;
  border-radius: 3px;
  /* Не красные: в знаке цветная только точка, и цена не повод это менять. */
  background: rgba(241, 237, 228, 0.55);
  /* Высоты приходят долями кегля 88, поэтому у полос здесь свой кегль. */
  font-size: 62px;
}

.price-main .price-value {
  font-size: clamp(46px, 5.4vw, 66px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
  color: var(--band-text);
}
.price-main .price-period {
  font-size: 0.36em;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--band-text-2);
}
.price-main .price-sub { margin-top: 12px; font-size: 14.5px; color: var(--band-text-2); }
.price-main .btn { margin-top: 18px; }
.price-warning { margin-top: 11px; font-size: 12.5px; color: var(--text-3); text-align: center; }

.facts { list-style: none; margin: 22px 0 0; padding: 0; }
.facts li { position: relative; padding: 8px 0 8px 20px; font-size: 14.5px; color: var(--band-text-2); }
.facts li + li { border-top: 1px solid rgba(241, 237, 228, 0.12); }
.facts li::before {
  content: '';
  position: absolute; left: 3px; top: 17px;
  width: 5px; height: 5px; border-radius: 50%;
  background: rgba(241, 237, 228, 0.35);
}

/* Форма стоит на тёмной плитке, поэтому поля и подписи здесь свои. */
.price-main .pay-form { align-self: center; }
.price-main .pay-label { color: var(--band-text-2); }
.price-main .pay-input {
  background: rgba(241, 237, 228, 0.07);
  border-color: rgba(241, 237, 228, 0.18);
  color: var(--band-text);
}
.price-main .pay-input::placeholder { color: rgba(241, 237, 228, 0.38); }
.price-main .pay-input:focus { border-color: rgba(241, 237, 228, 0.4); }
.price-main .btn-primary {
  background: var(--band-text);
  border-color: var(--band-text);
  color: var(--band);
}
.price-main .btn-primary:hover { background: #fff; border-color: #fff; }
.price-main .pay-code-open { margin: 14px 0 10px; }
.pay-code-open .btn { display: inline-flex; }

.pay-note { color: rgba(241, 237, 228, 0.5); }

/* Липкая пилюля, она же кнопка покупки -------------------------------------- */

/* То же самое, что живёт снизу экрана в приложении, только здесь оно снизу
   окна браузера. Появляется, когда хиро уехал, и уходит на секции с ценой. */
.dock {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 45;
  transform: translateX(-50%) translateY(120%);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 12px 12px 20px;
  border-radius: 17px 17px 0 0;
  background: var(--pill-bg);
  color: var(--pill-fg);
  box-shadow: 0 -2px 30px rgba(0, 0, 0, 0.3);
  transition: transform 0.34s cubic-bezier(0.3, 0.9, 0.3, 1);
  max-width: calc(100vw - 24px);
}
.dock.is-up { transform: translateX(-50%) translateY(0); }
.dock .wm { color: var(--pill-fg); font-size: 18px; }
.dock-price { font-size: 14px; color: var(--pill-dim); white-space: nowrap; }
@media (max-width: 560px) { .dock-price { display: none; } }
.dock-buy {
  /* Раньше это была кнопка, теперь ссылка на секцию с ценой: нажатие ведёт
     к форме, а не пытается что-то купить прямо из пилюли. Флексом ради того,
     чтобы текст стоял по центру так же, как стоял в кнопке. */
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  border: 0;
  background: #f1ede4;
  color: #14130f;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.dock-buy:disabled { opacity: 0.5; cursor: default; }

/* Подвал ------------------------------------------------------------------- */

.footer { border-top: 1px solid var(--line); padding: 44px 0 120px; background: var(--paper); }
.footer-inner { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.footer-inner > p { max-width: 72ch; }
.footer .wm { align-self: flex-start; flex: none; font-size: 34px; margin-bottom: 14px; }

/* Футер: бренд, документы, реквизиты. Три полосы, разделённые волосяной
   линией, а не расстоянием: в конце страницы воздух уже не читается. */
.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 28px;
}
@media (max-width: 720px) {
  .footer-top { grid-template-columns: 1fr; gap: 26px; }
}
.footer-brand { max-width: 42ch; }
.footer-brand .note { margin-top: 12px; }

.footer-links { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; }
.footer-group {
  margin: 0 0 3px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}
.footer-links a {
  font-size: 14.5px;
  color: var(--text-2);
  text-decoration: none;
  text-underline-offset: 3px;
}
.footer-links a:hover { color: var(--text); text-decoration: underline; }

/* Реквизиты одной подписью внизу. Раньше это были три подписанных столбца
   между двумя линиями, и название компании стояло там дважды: один раз как
   «исполнитель», второй в копирайте. Линии делили подвал на отсеки там, где
   хватает воздуха. */
.footer-fine {
  margin: 0;
  padding-top: 4px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-3);
}
.footer-fine.mono { font-size: 12px; }
.footer-fine + .footer-fine { padding-top: 2px; }

/* Правовые страницы: одна колонка текста, ничего кроме ---------------------- */

.legal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 760px;
  margin: 0 auto;
  padding: 26px 24px;
}
.legal-back { font-size: 14.5px; color: var(--text-2); text-decoration: none; }
.legal-back:hover { color: var(--text); text-decoration: underline; }

.legal-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 14px 24px 56px;
}
.legal-body h1 {
  margin: 0;
  font-size: clamp(26px, 3.6vw, 38px);
  line-height: 1.12;
  letter-spacing: -0.035em;
}
.legal-meta { margin: 10px 0 34px; font-size: 14px; color: var(--text-3); }
.legal-body h2 {
  max-width: none;
  margin: 32px 0 10px;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.35;
}
.legal-body p { margin: 0 0 12px; font-size: 15px; line-height: 1.65; color: var(--text-2); }
.legal-body ul { margin: 0 0 14px; padding-left: 20px; }
.legal-body li { margin-bottom: 6px; font-size: 15px; line-height: 1.6; color: var(--text-2); }
.legal-body a { color: var(--text); text-underline-offset: 3px; }

.legal-foot {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px;
  border-top: 1px solid var(--line);
}
.legal-foot p { margin: 0 0 4px; font-size: 12.5px; color: var(--text-3); }

/* История изменений: та же колонка, что у правовых страниц, но версия и дата
   стоят в одной строке, а не заголовком и подзаголовком. */
.release + .release { margin-top: 40px; padding-top: 34px; border-top: 1px solid var(--line); }
.release-head { display: flex; align-items: baseline; gap: 14px; margin-top: 34px; }
.release-head h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.03em; }
.release-date { font-size: 13.5px; color: var(--text-3); }
.release-lede { margin: 10px 0 14px; font-size: 15px; color: var(--text-2); }
.release-list { margin: 0; padding-left: 20px; }
.release-list li { margin-bottom: 8px; font-size: 15px; line-height: 1.6; color: var(--text-2); }

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

/* Кто обучил модели -------------------------------------------------------
   Знаки крупно и в один ряд: перечислять двадцать девять моделей на странице
   незачем, а вот чьи они, решает доверие. Выровнены по высоте, а не по ширине:
   в ряду стоят и квадратные знаки, и вордмарка Сбера длиной в три с половиной
   квадрата, и одна ширина сделала бы Сбер втрое мельче остальных. */

.makers {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 30px 20px;
  padding: 38px 28px 34px;
}
@media (max-width: 900px) { .makers { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .makers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.maker { min-width: 0; }
.maker-mark { display: flex; align-items: center; height: 88px; margin-bottom: 14px; }
.maker-logo { display: block; width: auto; }

/* Высоты выровнены по самому рисунку, а не по холсту файла. Измерено: у OpenAI
   рисунок занимает половину высоты файла, у ModelScope 56 процентов, у
   остальных весь. При одной высоте картинки первые два выглядели вдвое мельче
   соседей, поэтому им она вдвое больше. Сбер отдельно: это вордмарка длиной в
   три с половиной квадрата, и строка букв в высоту знака читается тяжелее его. */
.l-openai { height: 88px; }
.l-nvidia { height: 44px; }
.l-sber { height: 30px; }
.l-modelscope { height: 79px; }
.l-cohere { height: 44px; }

.maker-name { font-size: 16px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.25; }
.maker-meta { margin-top: 4px; font-size: 13.5px; color: var(--text-2); }

/* Темы пилюли --------------------------------------------------------------- */

.themes { margin-top: 4px; }

/* Образец стоит на куске «стола», иначе светлая тема висит на светлом фоне
   и не читается как накладка поверх экрана. */
.themes-stage {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: 190px;
  padding: 34px 20px 0;
  border-radius: 18px 18px 0 0;
  background:
    radial-gradient(90% 75% at 84% 6%, #f6f1e6 0%, rgba(246, 241, 230, 0) 62%),
    linear-gradient(158deg, #b9ab93 0%, #cdbfa6 44%, #e8dcc6 100%);
  overflow: hidden;
}

.pill-sample {
  position: static;
  transform: none;
  font-size: 15px;
}

.themes-pick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 18px;
}
.theme-btn {
  height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--text-2);
  font: inherit;
  font-size: 14px;
  font-weight: 550;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.theme-btn:hover { color: var(--text); }
.theme-btn.is-on {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
/* Цвета тем один в один из PillTheme в приложении. Ни одна из них не следует
   за темой страницы: в жизни пилюля тоже не меняется вслед за системой. */
.pill[data-theme='dark'] {
  --pill-bg: #000; --pill-fg: #fff; --pill-dim: rgba(255,255,255,.5);
  --pill-fill: rgba(255,255,255,.12); --pill-line: rgba(255,255,255,.1);
}
.pill[data-theme='light'] {
  --pill-bg: #f7f7f7; --pill-fg: #1a1a1a; --pill-dim: rgba(26,26,26,.5);
  --pill-fill: rgba(26,26,26,.1); --pill-line: rgba(0,0,0,.08);
}
.pill[data-theme='terminal'] {
  --pill-bg: #050f08; --pill-fg: #59ff73; --pill-dim: rgba(89,255,115,.55);
  --pill-fill: rgba(89,255,115,.14); --pill-line: rgba(51,230,89,.35);
}
.pill[data-theme='cyber'] {
  --pill-bg: #0d051c; --pill-fg: #66f2ff; --pill-dim: rgba(102,242,255,.55);
  --pill-fill: rgba(250,77,219,.16); --pill-line: rgba(242,64,217,.4);
}
.pill[data-theme='retro'] {
  --pill-bg: #1c1208; --pill-fg: #ffb847; --pill-dim: rgba(255,184,71,.55);
  --pill-fill: rgba(255,184,71,.14); --pill-line: rgba(255,173,51,.35);
}
/* Терминал, кибер и ретро набраны моноширинным, как в приложении. */
.pill[data-theme='terminal'],
.pill[data-theme='cyber'],
.pill[data-theme='retro'] { font-family: var(--mono); }

.pill[data-theme] { box-shadow: 0 -0.2em 1.6em rgba(0,0,0,.28), inset 0 0 0 1px var(--pill-line, transparent); }
/* В кибере счётчики светятся не тем же цветом, что текст: в этом весь её вид. */
.pill[data-theme='cyber'] .pill-chip.is-on { color: #fa4ddb; }
.pill[data-theme='light'] .pill-thumb { box-shadow: inset 0 0 0 0.5px rgba(0,0,0,.16); }
.pill-sample .wave i { height: var(--h); background: var(--pill-fg); }

/* Оплата ------------------------------------------------------------------- */

/* Форма нарочно короткая: одно поле и кнопка. Всё остальное, что банк обычно
   спрашивает на этом месте, спросит он сам на своей странице, и спросит лучше. */

.pay-form { margin-top: 20px; }
.pay-label {
  display: block;
  font-size: 12.5px;
  color: var(--text-3);
  margin-bottom: 7px;
}
.pay-input {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 13px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: transparent;
  font: inherit;
  font-size: 15px;
  color: var(--text);
}
.pay-input::placeholder { color: var(--text-3); }
.pay-input:focus {
  outline: none;
  border-color: var(--text-2);
}
/* Красная рамка появляется только после попытки отправить, а не пока человек
   ещё печатает: адрес неполон почти всё время, что его вводят. */
.pay-form.is-checked .pay-input:invalid { border-color: var(--red); }

.pay-note {
  margin-top: 11px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-3);
  text-align: center;
}
.pay-note.is-bad { color: var(--red); }

/* Тестовый режим. Плашка заметная не ради красоты: страница, которая берёт
   ненастоящие деньги, обязана говорить об этом раньше, чем человек введёт карту. */
.pay-test {
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px dashed var(--line-2);
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-2);
}
.pay-test code {
  font-family: var(--mono);
  font-size: 0.94em;
  color: var(--text);
}

/* Код активации после оплаты. Крупно и моноширинным: его переписывают руками. */
.pay-code {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--card);
}

.pay-code-label {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--tertiary);
}

.pay-code-value {
  margin: 0 0 8px;
}

.pay-code-value code {
  font-family: var(--mono);
  font-size: 20px;
  letter-spacing: 0.04em;
  color: var(--label);
  user-select: all;
}

.pay-code-hint {
  margin: 0;
  font-size: 12.5px;
  color: var(--secondary);
}
