/* Общее для всех страниц: токены в духе Threads, шапка, тема, копирование, строки-ссылки, круг от клика */
/* Шкала шрифта: 14 / 16 / 20 / 28 / 40 / 64 / 128 */
:root {
  --bg: #f3f3f3;
  --surface: #ffffff;
  --panel: #e8e8e8;
  --line: #ebebeb;
  --t1: #000000;
  --t2: #737373;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --maxw: 1360px;
  --gutter: 16px;
  --radius: 24px;
  --hover: 200ms ease;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --card-shadow: 0 4px 12px rgb(0 0 0 / .12);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141414; --surface: #1d1e20; --panel: #1f2224; --line: #31353e; --t1: #f3f5f7; --t2: #8a8a8a;
    --card-shadow: 0 12px 25px rgb(0 0 0 / .5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141414; --surface: #1d1e20; --panel: #1f2224; --line: #31353e; --t1: #f3f5f7; --t2: #8a8a8a;
  --card-shadow: 0 12px 25px rgb(0 0 0 / .5);
  color-scheme: dark;
}

/* Скрины парами: светлый сайт показывает светлый снимок, тёмный тёмный. Та же логика, что у токенов */
img.d, video.d { display: none !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) :is(img, video).l { display: none !important; }
  :root:not([data-theme="light"]) :is(img, video).d { display: block !important; }
}
:root[data-theme="dark"] :is(img, video).l { display: none !important; }
:root[data-theme="dark"] :is(img, video).d { display: block !important; }

* { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--t1);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--t1); color: var(--bg); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--t1); outline-offset: 4px; border-radius: 8px; }
p, h1, h2, h3 { margin: 0; }
h1, h2, h3 { text-wrap: balance; }

/* Главная и страницы проектов на широкой сетке до 1920, кейсы остаются на 1360 */
html.wide { --maxw: 1920px; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); width: 100%; }

/* Сетка: 4 колонки на телефоне, 8 на планшете, 12 на компьютере, промежуток 16 как между карточками.
   Поля по краям это --gutter у .wrap. Всё, что делит ширину, встаёт на эти колонки. Shift+G показывает её */
:root { --cols: 4; --col-gap: 16px; }
@media (min-width: 481px) { :root { --cols: 8; } }
@media (min-width: 861px) { :root { --cols: 12; } }
.grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); column-gap: var(--col-gap); }
.grid > * { grid-column: 1 / -1; min-width: 0; }
.grid-overlay { position: fixed; inset: 0; z-index: 30; pointer-events: none; }
.grid-overlay .wrap { height: 100%; }
@media (max-width: 860px) { .grid-overlay span:nth-child(n+9) { display: none; } }
@media (max-width: 480px) { .grid-overlay span:nth-child(n+5) { display: none; } }
.grid-overlay span { grid-column: auto; background: rgb(255 0 80 / .08); box-shadow: inset 1px 0 rgb(255 0 80 / .25), inset -1px 0 rgb(255 0 80 / .25); }
/* Каждая секция не ниже экрана */
.screen { min-height: 100svh; display: flex; align-items: center; padding-block: 96px; }

/* Шапка без фона в режиме наложения difference: белые тексты сами становятся тёмными на светлом и светлыми
   на тёмных снимках. Цвета внутри подобраны под инверсию: белый даёт почти чёрный на #f3f3f3 и почти белый
   на #141414, #808080 даёт серый #737373 / #6c6c6c, линия #3a3a3a даёт #b9b9b9 / #262626 */
.bar { position: fixed; inset: 0 0 auto; z-index: 10; mix-blend-mode: difference; color: #fff; --t1: #fff; --t2: #808080; --line: #3a3a3a; }
/* Белый текст в режиме difference Windows сглаживает как светлый на тёмном, штрих выходит толще.
   В светлой теме внутри шапки начертание на ступень тоньше: на экране получается как обычные 400 и 500.
   В тёмной текст и так светлый на тёмном, там веса обычные, а серый #9e9e9e даёт прежний #8a8a8a */
.bar .brand, .bar .chip, .bar .tabs .num { font-weight: 300; }
.bar .tabs a { font-weight: 400; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .bar { --t2: #9e9e9e; }
  :root:not([data-theme="light"]) :is(.bar .brand, .bar .chip, .bar .tabs .num) { font-weight: 400; }
  :root:not([data-theme="light"]) .bar .tabs a { font-weight: 500; }
}
:root[data-theme="dark"] .bar { --t2: #9e9e9e; }
:root[data-theme="dark"] :is(.bar .brand, .bar .chip, .bar .tabs .num) { font-weight: 400; }
:root[data-theme="dark"] .bar .tabs a { font-weight: 500; }
/* Все тексты шапки белые одного начертания: под инверсией серый и белый рисуются разной толщиной, поэтому
   неактивные табы и наведение приглушаются прозрачностью. --dim даёт прежние серые: #737373 в светлой, #8a8a8a в тёмной */
.bar { --dim: .5; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bar { --dim: .62; } }
:root[data-theme="dark"] .bar { --dim: .62; }
.bar .tabs a { color: #fff; opacity: var(--dim); transition: opacity var(--hover); }
.bar .tabs a:hover, .bar .tabs a[aria-current] { color: #fff; opacity: 1; }
.bar :is(.brand, .chip, .theme) { transition: opacity var(--hover); }
.bar :is(.brand, .chip, .theme):hover { color: #fff; opacity: var(--dim); }
/* Лёгкое размытие отдельным слоем под шапкой (site.js ставит его перед .bar): 8px не растягивает тёмные блоки
   в серое облако. Сплошное на высоту шапки, ниже мягко сходит на нет */
.fade {
  position: fixed; inset: 0 0 auto; z-index: 9; height: 104px; pointer-events: none;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  mask: linear-gradient(#000 62%, transparent); -webkit-mask: linear-gradient(#000 62%, transparent);
}
body:has(.tabs-row) > .fade { height: 156px; mask: linear-gradient(#000 70%, transparent); -webkit-mask: linear-gradient(#000 70%, transparent); }
.bar .wrap { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 64px; }
/* Имя слева: на главной ведёт наверх, на кейсах домой */
.brand {
  display: inline-flex; align-items: center; height: 36px; white-space: nowrap;
  font-size: 16px; font-weight: 400; letter-spacing: -.01em;
  transition: color var(--hover);
}
.brand:hover { color: var(--t2); }
.tools { display: flex; align-items: center; gap: 12px; }
/* Полоска прочитанного только на кейсах (не на страницах проектов): красная, как у YouTube, растёт слева (site.js) */
.progress {
  position: fixed; inset: 0 0 auto; z-index: 11; height: 3px; pointer-events: none;
  background: #ff0033; transform: scaleX(0); transform-origin: 0 50%;
}
/* Хлебные крошки на страницах кейсов: проект / кейс (на главную ведёт имя в шапке) */
/* Стоят под шапкой поверх её размытия и уезжают со страницей, гаснут за первые 32px прокрутки (site.js),
   чтобы не наехать на строку шапки. Место под них заложено в отступе .screen */
.crumbs { position: absolute; inset: 64px 0 auto; z-index: 11; display: flex; align-items: center; height: 32px; font-size: 14px; color: var(--t2); }
/* Крошки выше табов: это навигация уровнем выше. Ряд табов стоит под крошками и поднимается
   на их место, пока они гаснут при прокрутке (site.js ставит --lift от 0 до 32px) */
body:has(> .crumbs) .bar .tabs-row { transform: translateY(calc(32px - var(--lift, 0px))); }
.crumbs ol { display: flex; align-items: center; min-width: 0; list-style: none; margin: 0; padding: 0; }
.crumbs li { display: flex; align-items: center; flex: none; white-space: nowrap; }
.crumbs li + li::before { content: '/'; margin-inline: 8px; color: var(--line); }
.crumbs li[aria-current] { display: block; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--t1); }
.crumbs a { transition: color var(--hover); }
.crumbs a:hover { color: var(--t1); }
/* Ссылки в шапке простым текстом, без рамки и фона */
.chip {
  display: inline-flex; align-items: center; height: 36px; padding-inline: 4px;
  font-size: 14px; font-weight: 400; white-space: nowrap; transition: color var(--hover);
}
.chip:hover { color: var(--t2); }
.chip .swap > * { justify-self: center; }
.theme {
  width: 36px; height: 36px; flex: none;
  display: grid; place-items: center;
  transition: color var(--hover);
}
.theme:hover { color: var(--t2); }
.theme svg { width: 20px; height: 20px; }

/* Копирование: подпись уезжает вверх, снизу приезжает «Copied» */
.swap { display: inline-grid; overflow: hidden; vertical-align: bottom; text-align: left; }
.swap > * { grid-area: 1 / 1; transition: transform 300ms var(--spring); }
.swap > :last-child { transform: translateY(100%); }
.copied .swap > :first-child { transform: translateY(-100%); }
.copied .swap > :last-child { transform: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.status { color: var(--t2); }
.num { font-variant-numeric: tabular-nums; }
.nw { white-space: nowrap; }
.ico { width: 16px; height: 16px; flex: none; }

/* Место, которое Юсуф заполнит сам: пунктирная рамка с подписью */
.ph {
  display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px;
  border: 1px dashed color-mix(in srgb, var(--t2) 60%, transparent); border-radius: 8px;
  color: var(--t2); font-size: 14px; font-weight: 400; line-height: 1.4; letter-spacing: 0;
  vertical-align: middle;
}
.ph.block { display: flex; width: fit-content; min-height: 48px; padding: 12px 16px; border-radius: 12px; }

/* Последний экран: большие строки-ссылки и подвал */
.end { flex-direction: column; align-items: stretch; justify-content: space-between; padding-bottom: 32px; }
.end .links { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.end .status { margin-bottom: 32px; }
.link {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px; width: 100%;
  padding-block: 16px; border-bottom: 1px solid var(--line); text-align: left;
}
.link:first-child, .status + .link { border-top: 1px solid var(--line); }
.link .big {
  font-size: 40px; line-height: 1.05; letter-spacing: -.04em; font-weight: 600;
  transition: transform 400ms var(--spring);
}
.link .small { color: var(--t2); font-size: 16px; white-space: nowrap; transition: color var(--hover); }
.link .small > * { justify-self: end; }
.link:hover .big { transform: translateX(16px); }
.link:hover .small { color: var(--t1); }
.foot { display: flex; justify-content: space-between; gap: 16px; color: var(--t2); font-size: 14px; }


/* Кейсы: общий шаблон */
.case h1 { font-size: 64px; line-height: .95; letter-spacing: -.045em; font-weight: 600; margin: 0 0 24px; }
.case h2 { font-size: 28px; line-height: 1.1; letter-spacing: -.03em; font-weight: 600; margin: 0 0 24px; }
.case .lead { font-size: 20px; line-height: 1.4; color: var(--t2); max-width: 44ch; margin: 0 0 16px; text-wrap: pretty; }
.case .body { font-size: 16px; color: var(--t2); max-width: 56ch; margin: 0 0 16px; text-wrap: pretty; }
/* Снимок лежит на плашке цвета темы, как на стенде lab/cases-lab.html. Скругление плашки 6px */
.case .shot {
  position: relative; display: flex; align-items: center; justify-content: center;
  padding: 6% 8%; border-radius: 6px; overflow: hidden; background: var(--panel);
}
.case .shot > :is(img, video), .case .shot .marked { width: 100%; }
.case .shot :is(img, video) { display: block; width: 100%; height: auto; border-radius: 8px; }
/* Плашки внутри кейса, как у Mayank (kingermayank.com, замерено 13 ноя 2026): плашки во всю ширину
   текста, между ними 8px, скругление 6px, фон цвета темы. Широкая 16:9, половинки 4:5 или 1:1.
   Внутри по центру: экран целиком на 75% ширины (скругление 4px), деталь крупно (ширина в --w),
   ролик на 80% со скруглением 8px. Пропорцию другой плашки задаёт --ar */
.plates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pl {
  grid-column: 1 / -1; position: relative; display: flex; align-items: center; justify-content: center;
  overflow: hidden; border-radius: 6px; background: var(--panel); aspect-ratio: var(--ar, 16 / 9);
}
.pl.half { grid-column: span 1; aspect-ratio: var(--ar, 4 / 5); }
.pl.half.sq { aspect-ratio: 1; }
.pl > :is(img, video) { display: block; width: var(--w, 75%); height: auto; flex: none; }
.pl > img { border-radius: 4px; }
.pl > img.el { border-radius: 0; }
.pl > video { width: var(--w, 80%); border-radius: 8px; }
/* Деталь по высоте плашки, а не по ширине (узкая и высокая) */
.pl > .tall { width: auto; height: var(--h, 80%); }
/* Ролик или снимок во всю плашку, без полей */
.pl.fill > :is(img, video) { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
/* Телефон в рамке на плашке: по высоте */
.pl > .phone { width: auto; height: var(--h, 84%); max-width: none; flex: none; }
.pl > .screens { width: var(--w, 90%); height: var(--h, 84%); align-items: center; }
.pl > .screens .phone { width: auto; height: 100%; max-width: none; }
.pl .phone .scr img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 13% / 6%; }
.pl .phone .bezel { border-radius: 0; }
/* До и после длинной страницы в одном масштабе: верх по одной линии, чтобы длину было видно сразу */
.pl.atop { align-items: flex-start; padding-top: 6%; }
/* Подпись относится к паре до/после, плашки после неё идут следом без большого разрыва */
.decision figure + .plates { margin-top: -16px; }
.case figure { margin: 0; }
.case figcaption { margin-top: 12px; font-size: 14px; color: var(--t2); text-wrap: pretty; }
.case .ph.block { max-width: 56ch; margin-top: 8px; }

/* 1. Обложка: строка фактов и картинка на одном экране */
.hero { padding-bottom: 32px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px var(--col-gap); margin: 32px 0; font-size: 14px; }
.facts dt { color: var(--t2); margin-bottom: 4px; }
.facts dd { margin: 0; }
.facts .under { text-decoration: underline; text-underline-offset: 3px; transition: color var(--hover); }
.facts .under:hover { color: var(--t2); }

/* 2. Контекст: текст слева, список решений справа; первая строка списка его и называет */
.split { display: grid; gap: 48px; }
.split .lead { color: var(--t1); }
.toc > * {
  display: flex; align-items: baseline; gap: 16px; padding-block: 16px; min-height: 48px;
  border-bottom: 1px solid var(--line);
  font-size: 20px; line-height: 1.2; letter-spacing: -.02em; font-weight: 600;
}
.toc > :first-child { border-top: 1px solid var(--line); color: var(--t2); }
.toc .num { color: var(--t2); font-size: 16px; font-weight: 500; letter-spacing: 0; transition: color var(--hover); }
.toc .t { text-wrap: balance; transition: transform 400ms var(--spring); }
.toc a:hover .t { transform: translateX(8px); }
.toc a:hover .num { color: var(--t1); }

/* 3+. Решение: над ним тонкая линия, заголовок и текст сверху, плашки со снимками под ними */
body.case .screen:has(> .decision) { min-height: 0; padding-block: 0 64px; scroll-margin-top: 108px; }
.decision { display: grid; gap: 40px; }
.decision::before { content: ''; border-top: 1px solid var(--line); margin-bottom: 8px; }
.decision .txt, .decision figure { min-width: 0; }
.decision h2 { max-width: 24ch; }
.decision .body { max-width: 60ch; }

/* Плашки рядом: две половинки одной высоты, снимок по центру */
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stack { display: grid; gap: 16px; }
@media (max-width: 760px) { .pair { grid-template-columns: 1fr; } }

/* Телефон в настоящей рамке iPhone 16 Pro (1350x2760): экран под рамкой, окно 1206x2620 со сдвигом 72/70 */
.screens { display: flex; justify-content: center; gap: clamp(12px, 2vw, 24px); width: 100%; }
.phone { position: relative; flex: 0 1 auto; width: 100%; max-width: 280px; aspect-ratio: 1350 / 2760; }
.phone .bezel { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.case .shot .phone img { border-radius: 0; }
.scr { position: absolute; left: 5.333%; top: 2.536%; width: 89.333%; height: 94.928%; }
.case .shot .scr img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 13% / 6%; }

/* 6. Итог */
.outcome h2 { font-size: 40px; max-width: 20ch; }

@media (min-width: 861px) {
  .case h1 { font-size: 128px; }
  .case h2, .toc > * { font-size: 28px; }
  .outcome h2 { font-size: 64px; letter-spacing: -.04em; }
  .link .big { font-size: 64px; }
  /* На сетке из 12: факт занимает 2 колонки, текст решения 4, картинка 7 через одну пустую */
  .facts { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .facts > * { grid-column: span 2; }
  .split { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: center; }
  .split > :first-child { grid-column: 1 / span 5; }
  .split > :last-child { grid-column: 7 / -1; }
}
/* Снимок под ширину: на телефоне свой кадр */
@media (max-width: 599px) { .wide-only { display: none; } }
@media (min-width: 600px) { .narrow-only { display: none; } }


/* Смена темы раскрывается кругом от кнопки */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { animation: reveal 560ms cubic-bezier(.2, .8, .2, 1); }
@keyframes reveal {
  from { clip-path: circle(0 at var(--vx, 100%) var(--vy, 0)); }
  to { clip-path: circle(150vmax at var(--vx, 100%) var(--vy, 0)); }
}

@media (min-width: 481px) { :root { --gutter: 24px; } }
@media (min-width: 861px) { :root { --gutter: 32px; } }
@media (min-width: 1440px) { :root { --gutter: 40px; } }
@media (max-width: 480px) {
  .link { flex-direction: column; gap: 4px; }
  .link .small > * { justify-self: start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Кейсы: стрелка домой в имени, под шапкой табы разделов и следующий кейс */
.bar .tabs-row { display: flex; align-items: stretch; gap: 16px; height: 44px; }
.tabs-row { position: relative; }
.tabs-row::after {
  content: ''; position: absolute; left: var(--gutter); right: var(--gutter); bottom: 0;
  border-bottom: 1px solid var(--line); pointer-events: none;
}
.tabs {
  flex: 1; min-width: 0; display: flex; gap: 24px; overflow-x: auto; scrollbar-width: none;
  --fl: 0px; --fr: 0px;
  mask-image: linear-gradient(to right, transparent, #000 var(--fl), #000 calc(100% - var(--fr)), transparent);
}
/* Край ряда тает только с той стороны, где есть скрытые табы */
.tabs.more-l { --fl: 32px; }
.tabs.more-r { --fr: 32px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .next {
  position: relative; display: inline-flex; align-items: center; gap: 6px; flex: none;
  font-size: 14px; font-weight: 500; white-space: nowrap; color: var(--t2);
  transition: color var(--hover);
}
.tabs a:hover, .next:hover { color: var(--t1); }
.tabs .num { font-weight: 400; }
/* Текущий раздел: полоска лежит на линии под табами */
.tabs a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; height: 2px;
  background: var(--t1); transform: scaleX(0); transition: transform 300ms var(--spring);
}
.tabs a[aria-current]::after { transform: none; }
.tabs a[aria-current] { color: var(--t1); }
.tabs a:focus-visible, .next:focus-visible { outline-offset: -2px; }
.next { color: var(--t1); padding-left: 16px; }
.next::before { content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; border-left: 1px solid var(--line); }
.next .ico { transition: transform 400ms var(--spring); }
.next:hover .ico { transform: translateX(4px); }
/* Шапка кейса выше на ряд табов */
.case .screen { padding-top: 140px; }
.case:has(> .crumbs) .screen { padding-top: 172px; }
.next .lbl::after { content: ":"; }
@media (max-width: 600px) { .next .nn { display: none; } .next .lbl::after { content: none; } }

/* Теги: один вид на весь сайт. Форма всегда скруглённый прямоугольник, круглых пилюль нет.
   Размер: обычный 32 или .sm 24 (на плитках). Заливка: обводка по умолчанию,
   .on-media полупрозрачная белая поверх снимка, .solid белая (статус) */
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  display: inline-flex; align-items: center; min-height: 32px; padding-inline: 12px;
  border: 1px solid var(--line); border-radius: 10px; color: var(--t1); font-size: 14px; font-weight: 500;
}
.tag.sm { min-height: 24px; padding-inline: 8px; border-radius: 8px; font-size: 13px; }
.tag.on-media { color: #fff; background: rgb(255 255 255 / .14); border-color: transparent; }
.tag.solid { color: #0a0a0a; background: #fff; border-color: transparent; }

/* Страница проекта и отдельный кейс: шапка без ряда табов */
.case.plain .screen { padding-top: 96px; }
.case.plain:has(> .crumbs) .screen { padding-top: 128px; }
.case.plain .project-top { min-height: 0; padding-bottom: 48px; }
.case.plain #cases { padding-top: 0; }
.case.plain .decision h1 { font-size: 40px; line-height: 1.05; letter-spacing: -.03em; margin: 0 0 24px; }
.cases { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }

/* Плитка-обложка проекта или кейса: ролик 4:3 со скруглением 6px. При наведении в углу
   появляется стеклянная плашка с названием (вариант В на стенде), картинка не трогается */
.tile { position: relative; display: block; border-radius: 6px; }
.tile .media { position: relative; display: block; overflow: hidden; border-radius: 6px; aspect-ratio: 4 / 3; background: var(--panel); }
.tile .media > :is(video, img) { display: block; width: 100%; height: 100%; object-fit: cover; }
.tile .cap {
  position: absolute; left: 12px; bottom: 12px; max-width: calc(100% - 24px); display: grid; gap: 2px; padding: 10px 14px;
  font-size: 14px; color: #fff; border-radius: 10px; background: rgb(20 20 20 / .55);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  opacity: 0; transform: translateY(4px); transition: opacity var(--hover), transform var(--hover); pointer-events: none;
}
.tile .cap .nm { font-weight: 500; }
.tile .cap .ln { color: rgb(255 255 255 / .75); }
:is(.tile, a:has(> .tile)):is(:hover, :focus-visible) .cap { opacity: 1; transform: none; }
/* Без мыши навести нечем: на телефоне плашка видна сразу */
@media (hover: none) { .tile .cap { opacity: 1; transform: none; } }
.tile:focus-visible { outline-offset: 4px; }
/* Строка карточки: название слева, статус справа по краю */
.top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; justify-self: stretch; }
/* Статус проекта или кейса: готов к просмотру (полный кружок) или ещё в работе (пустой) */
.st { display: inline-flex; align-items: center; gap: 6px; flex: none; color: var(--t2); font-size: 14px; white-space: nowrap; }
.st::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--t1); }
.st[data-st="wip"]::before { background: none; box-shadow: inset 0 0 0 1.5px var(--t2); }
@media (min-width: 861px) { .case.plain .decision.stack h1 { margin: 0; } }
@media (max-width: 860px) { .cases { grid-template-columns: 1fr; } }



/* Появление при прокрутке (класс .rv ставит site.js) */
.rv { opacity: 0; transform: translateY(6px) scale(.985); transition: opacity 450ms ease, transform 450ms cubic-bezier(.2, .7, .2, 1); }
.rv.in { opacity: 1; transform: none; }

/* Пилюля цели крошечная: на телефоне ей нужна почти вся половинка (ft-design-system) */
.ds-pill > img { --w: 54%; }
@media (max-width: 760px) { .ds-pill > img { --w: 86%; } }

/* Половинка с широкой и низкой деталью (строка вопросов, ответ чата): на телефоне 165px мало,
   встаёт во всю ширину (markets) */
@media (max-width: 760px) {
  .pl.half.m-full { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
  .pl.half.m-full > img.el { width: 92%; }
}

/* Вкладки запуска: на узком экране крупнее (crypto-forecast) */
@media (max-width: 600px) { .pl.tabs-pl { --w: 86% !important; } }

/* Шапка кейса и проекта как у Mayank (kingermayank.com/work/toolbox, замерено 13 ноя 2026).
   Шапки сайта, крошек и вкладок нет: слева вверху Back, справа Contact me, обе пилюли закреплены.
   Обложка на весь экран (отступ 8px, скругление 16px), снимок или ролик во всю обложку под затемнением,
   поверх заголовок; под обложкой колонка 1140: слева Overview и Outcome, справа факты */
.case-nav { position: fixed; inset: 24px 24px auto; z-index: 20; display: flex; justify-content: space-between; pointer-events: none; }
.case-nav a {
  pointer-events: auto; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 18px;
  border-radius: 999px; font-size: 14px; font-weight: 500; line-height: 1;
  transition: background-color var(--hover), color var(--hover), transform 100ms ease;
}
.case-nav a:active { transform: scale(.97); }
.case-nav .back { background: rgb(40 40 40 / .72); color: #fafafa; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.case-nav .back:hover { background: rgb(64 64 64 / .85); }
.case-nav .contact { background: #fff; color: #111; box-shadow: 0 1px 2px rgb(0 0 0 / .12); }
.case-nav .contact:hover { background: #e6e6e6; }
.case-nav svg { width: 14px; height: 14px; flex: none; }

.cover { padding: 8px; }
.cover-in {
  position: relative; display: flex; align-items: center; height: calc(100svh - 16px); min-height: 520px;
  overflow: hidden; border-radius: 16px; background: #111;
}
.cover-in > .media { position: absolute; inset: 0; }
.cover-in > .media > :is(img, video) { display: block; width: 100%; height: 100%; object-fit: cover; }
.cover-in > .media::after { content: ''; position: absolute; inset: 0; background: rgb(0 0 0 / .62); }
.cover-in > .media.pl { position: absolute; border-radius: 0; background: none; aspect-ratio: auto; } /* телефоны в рамках, разметка плашки */
.cover .title-row { position: relative; z-index: 1; }
/* Всё на сетке сайта (12 колонок в .wrap, как у сетки-подсказки): заголовок на 9 колонок */
.cover .title {
  font-size: 64px; line-height: 1.06; letter-spacing: -.04em; font-weight: 500; color: #fff; text-wrap: balance;
}
.cover .title span { color: rgb(255 255 255 / .55); }
.cover .down {
  position: absolute; left: 50%; bottom: 16px; z-index: 1; display: grid; place-items: center;
  width: 44px; height: 44px; margin-left: -22px; border-radius: 50%; color: rgb(255 255 255 / .6);
  transition: color var(--hover), transform 400ms var(--spring);
}
.cover .down:hover { color: #fff; transform: translateY(4px); }
.cover .down svg { width: 20px; height: 20px; }

.intro { padding-block: 152px 120px; }
.intro-grid { row-gap: 48px; }
.intro .lbl, .intro .meta dt { font-size: 13px; line-height: 20px; letter-spacing: .04em; text-transform: uppercase; color: var(--t2); }
.intro .lbl { margin: 0 0 8px; }
.intro .ov p:not(.lbl) { font-size: 24px; line-height: 32px; letter-spacing: -.02em; margin: 0 0 24px; text-wrap: pretty; }
.intro .ov p:last-child { margin-bottom: 0; }
.intro .meta { display: grid; gap: 20px; margin: 0; align-content: start; }
.intro .meta dt { margin-bottom: 4px; }
.intro .meta dd { margin: 0; font-size: 18px; line-height: 27px; }
.intro .meta a { text-decoration: underline; text-underline-offset: 3px; transition: color var(--hover); }
.intro .meta a:hover { color: var(--t2); }
@media (min-width: 861px) {
  .cover .title { grid-column: 1 / span 9; }
  .intro .ov { grid-column: 1 / span 7; }
  .intro .meta { grid-column: 9 / -1; }
}
@media (max-width: 760px) {
  .case-nav { inset: 16px 16px auto; }
  .cover-in { height: 88svh; min-height: 0; }
  .cover .title { font-size: 40px; }
  .intro { padding-block: 88px 64px; }
  .intro .ov p:not(.lbl) { font-size: 20px; line-height: 28px; }
  .intro .meta dd { font-size: 16px; line-height: 24px; }
}
