/* Миллекс Mini App — дизайн-система.
   Светлая база, у каждой услуги свой цветной hero, 3D-объекты «падают» при входе. */

@font-face {
  font-family: "Montserrat"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(fonts/montserrat-cyrillic-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Montserrat"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(fonts/montserrat-latin-wght-normal.woff2) format("woff2-variations");
  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+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #f1f4f0;
  --card: #ffffff;
  --text: #0e1512;
  --muted: #66716c;
  --line: rgba(14, 21, 18, .07);
  --green: #038361;
  --green-2: #06a579;
  --lime: #c6e44f;
  --ink: #0b1411;
  --r-xl: 32px;
  --r-lg: 26px;
  --r-md: 20px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.34, 1.45, .5, 1);
  /* Безопасные зоны: полноэкранный режим Telegram + вырез экрана */
  --safe-top: calc(var(--tg-safe-area-inset-top, env(safe-area-inset-top, 0px)) + var(--tg-content-safe-area-inset-top, 0px));
  --safe-bottom: max(var(--tg-safe-area-inset-bottom, 0px), env(safe-area-inset-bottom, 0px));
  --top-pad: max(var(--safe-top), 16px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); overscroll-behavior: none; }
body {
  color: var(--text);
  font: 500 15px/1.4 "Montserrat", -apple-system, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-user-select: none; user-select: none;
  overflow: hidden;
}
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
textarea, input { font: inherit; -webkit-user-select: text; user-select: text; caret-color: var(--green); }
/* iOS WebView прячет курсор в поле, если выделение запрещено у родителя (body: user-select none) —
   контейнерам полей возвращаем выделение (жалоба 24.09.2026: «не видно палочки при вводе»). */
.field, .composer, .composer .bar, .pf-input, .sheet .field { -webkit-user-select: auto; user-select: auto; }
img { display: block; max-width: 100%; -webkit-user-drag: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 12px; }

/* ——— Экраны и переходы ——— */
#app { position: fixed; inset: 0; overflow: hidden; }
.screen {
  position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch; background: var(--bg);
  padding-bottom: calc(120px + var(--safe-bottom));
  scrollbar-width: none;
}
.screen::-webkit-scrollbar { display: none; }
.screen.dark { background: #06090a; color: #f4f6f3; }
/* backwards, а не both: после входа у экрана не должно оставаться transform — иначе fixed-кнопки «прилипают» к экрану, а не к окну */
.screen.enter { animation: push-in .5s var(--ease) backwards; }
.screen.leave { animation: push-out .38s var(--ease) forwards; pointer-events: none; }
.screen.enter-back { animation: pop-in .42s var(--ease) backwards; }
.screen.leave-back { animation: pop-out .38s var(--ease) forwards; pointer-events: none; z-index: 2; }
.screen.fade-in { animation: fade-in .35s var(--ease) backwards; }
/* Экран под верхним в стеке: скрыт, но живой — сохраняет прокрутку и не переигрывает анимации */
.screen.parked { visibility: hidden; pointer-events: none; }
/* Перерисовка с новыми данными — без повторных входных анимаций */
.no-intro .drop, .no-intro .hero .card-slot .brandcard, .no-intro .card-art,
.no-intro .hero .chips, .no-intro .hero h1, .no-intro .hero .sub, .no-intro .cta-bar,
.no-intro .avatar, .no-intro .item { animation: none !important; }
.no-intro .drop { transform: rotate(var(--r, 0deg)); }
.no-intro .tile img { opacity: 1; animation: none !important; }
@keyframes push-in { from { transform: translateX(34%); opacity: 0; } }
@keyframes push-out { to { transform: translateX(-18%); opacity: 0; } }
@keyframes pop-in { from { transform: translateX(-18%); opacity: 0; } }
@keyframes pop-out { to { transform: translateX(34%); opacity: 0; } }
@keyframes fade-in { from { opacity: 0; transform: translateY(8px); } }

.wrap { padding: 0 16px; }
.stack > * + * { margin-top: 12px; }

/* ——— Шапка главной ——— */
.page-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(var(--top-pad) + 12px) 18px 16px;
}
.page-head h1 { margin: 0; font-size: 24px; line-height: 1.1; font-weight: 750; letter-spacing: -.02em; }
.pill-link {
  flex-shrink: 0; padding: 10px 16px; border-radius: 999px;
  background: #dff3e9; color: var(--green); font-weight: 650; font-size: 14px;
}
.demo-badge {
  margin: 0 16px 12px; padding: 10px 14px; border-radius: 16px;
  background: #fff6d8; color: #6b5300; font-size: 12.5px; line-height: 1.35;
}

/* ——— Карточки услуг на главной ——— */
.product {
  position: relative; display: block; width: 100%; text-align: left;
  min-height: 272px; margin-top: 30px; padding: 18px 18px 92px;
  border-radius: var(--r-xl); color: #fff; overflow: visible;
  box-shadow: 0 18px 40px -22px rgba(3, 60, 44, .55);
  transition: transform .35s var(--spring);
  isolation: isolate;
}
.product:first-child { margin-top: 18px; }
.product:active { transform: scale(.975); }
.product::before { /* мягкий блик по диагонали */
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1;
  background: radial-gradient(120% 90% at 100% 0%, rgba(255,255,255,.28), transparent 55%);
}
/* Метки не залезают под мини-карточку на узких экранах — переносятся */
.product .chips { display: flex; flex-wrap: wrap; gap: 6px; max-width: 52%; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 11px;
  border-radius: 999px; font-size: 12px; font-weight: 650;
  background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .28);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.chip svg { width: 15px; height: 15px; }
.product h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 58px 0 6px; font-size: 22px; line-height: 1.12; font-weight: 750; letter-spacing: -.015em; }
.badge { flex-shrink: 0; padding: 3px 8px; border-radius: 9px; font-size: 11.5px; font-weight: 700; background: rgba(255,255,255,.22); letter-spacing: .02em; }
.product p { margin: 0; max-width: 86%; font-size: 14px; line-height: 1.38; color: rgba(255, 255, 255, .82); }
.product .mini {
  position: absolute; right: 16px; top: -22px; width: 44%; aspect-ratio: 1.45;
  transform: rotate(4deg); pointer-events: none;
}
.product .mini .brandcard { position: absolute; inset: 8% 0 0 0; transform: none; }
.product .mini .bc-logo span { display: none; }
.product .mini > img { position: absolute; right: -6%; bottom: -24%; width: 78%; filter: drop-shadow(0 14px 18px rgba(0,0,0,.28)); }
.product .stats {
  position: absolute; left: 10px; right: 10px; bottom: 10px;
  display: grid; grid-template-columns: 1fr 1fr; padding: 13px 8px;
  border-radius: 999px; background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .22);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
}
.stats div { text-align: center; }
.stats b { display: block; font-size: 17px; font-weight: 750; letter-spacing: -.01em; }
.stats span { display: block; margin-top: 1px; font-size: 12.5px; color: rgba(255, 255, 255, .8); }
.stats div + div { border-left: 1px solid rgba(255,255,255,.18); }

.t-analysis { background: linear-gradient(155deg, #1cc08e 0%, #038361 48%, #024c39 100%); }
.t-chat { background: linear-gradient(155deg, #4a5a53 0%, #1a2420 42%, #070b09 100%); box-shadow: 0 18px 40px -20px rgba(0,0,0,.6); }
.t-chat .badge { background: var(--lime); color: var(--ink); }
.t-chat .stats b.lime { color: var(--lime); }
.t-lawyer { background: linear-gradient(155deg, #3cc5b3 0%, #0d7f87 46%, #0a3f55 100%); box-shadow: 0 18px 40px -22px rgba(6, 60, 80, .6); }

/* ——— Фирменная карточка (как карта в референсе) ——— */
.brandcard {
  position: relative; border-radius: 18px; overflow: hidden;
  background: linear-gradient(145deg, rgba(255,255,255,.26), rgba(255,255,255,.06));
  border: 1px solid rgba(255, 255, 255, .35);
  box-shadow: 0 22px 44px -18px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.35);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.brandcard .bc-logo { position: absolute; left: 9%; top: 11%; display: flex; align-items: center; gap: 7px; width: 55%; }
.brandcard .bc-logo img { width: 22%; min-width: 18px; }
.brandcard .bc-logo span { color: #fff; font-weight: 800; font-size: clamp(9px, 3.2vw, 17px); letter-spacing: .06em; }
.t-chat .brandcard, .hero.t-chat .brandcard { background: linear-gradient(145deg, #1e2925, #0b100e); border-color: rgba(255,255,255,.14); }

/* ——— Hero страницы услуги ——— */
.hero {
  position: relative; overflow: hidden; color: #fff;
  padding: calc(var(--top-pad) + 36px) 18px 34px;
  border-radius: 0 0 44px 44px; min-height: 468px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  isolation: isolate;
}
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(90% 60% at 50% 32%, rgba(255,255,255,.18), transparent 70%); }
.hero .stage { position: absolute; inset: 0; pointer-events: none; }
.hero .card-slot {
  position: relative; width: min(74vw, 330px); aspect-ratio: 1.58; margin-bottom: 18px;
  perspective: 900px;
}
.hero .card-slot .brandcard {
  position: absolute; inset: 0; transform: rotateX(8deg) rotateY(-10deg) rotateZ(-5deg);
  animation: card-in 1s var(--spring) .1s both;
}
.hero .card-slot .card-art { position: absolute; right: -4%; bottom: -14%; width: 64%; filter: drop-shadow(0 16px 22px rgba(0,0,0,.3)); animation: card-in 1.1s var(--spring) .2s both; }
.hero .card-slot .card-art.second { right: 36%; bottom: -8%; width: 38%; animation-delay: .32s; }
@keyframes card-in { from { opacity: 0; transform: translateY(40px) scale(.82) rotateZ(-12deg); } }
.hero .chips { display: flex; justify-content: center; gap: 6px; margin-bottom: 14px; animation: fade-in .6s var(--ease) .45s both; }
.hero h1 { margin: 0; text-align: center; font-size: 27px; line-height: 1.12; font-weight: 800; letter-spacing: -.02em; animation: fade-in .6s var(--ease) .5s both; }
.hero .sub { margin: 8px auto 0; max-width: 330px; text-align: center; font-size: 15px; line-height: 1.4; color: rgba(255,255,255,.78); animation: fade-in .6s var(--ease) .58s both; }

/* Падающие 3D-предметы */
.drop { position: absolute; width: var(--w, 30%); left: var(--x); top: var(--y); animation: drop 1.15s var(--spring) var(--d, 0s) both; }
.drop img { width: 100%; filter: drop-shadow(0 18px 20px rgba(0,0,0,.25)); animation: bob var(--bob, 5s) ease-in-out calc(var(--d, 0s) + 1.1s) infinite alternate; }
.drop.blur img { filter: blur(3px) drop-shadow(0 10px 14px rgba(0,0,0,.2)); opacity: .85; }
@keyframes drop {
  0% { opacity: 0; transform: translate3d(0, -130vh, 0) rotate(calc(var(--r, 0deg) - 40deg)); }
  12% { opacity: 1; }
  100% { transform: translate3d(0, 0, 0) rotate(var(--r, 0deg)); }
}
@keyframes bob { from { transform: translate3d(0, -5px, 0) rotate(-2deg); } to { transform: translate3d(0, 7px, 0) rotate(2.5deg); } }

/* ——— Контент страницы услуги ——— */
.section { padding: 0 16px; margin-top: 12px; }
.row-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; padding: 19px 20px; border-radius: var(--r-lg); background: var(--card); text-align: left;
}
.row-card .l b { display: block; font-size: 17px; font-weight: 700; }
.row-card .l span { display: block; margin-top: 3px; font-size: 13.5px; color: var(--muted); }
.row-card .v { display: flex; align-items: center; gap: 6px; font-size: 17px; font-weight: 750; color: var(--green); white-space: nowrap; }
.row-card .v svg { width: 18px; height: 18px; color: var(--muted); transition: transform .3s var(--ease); }
.row-card[aria-expanded="true"] .v svg { transform: rotate(180deg); }
.row-note { overflow: hidden; max-height: 0; transition: max-height .4s var(--ease); }
.row-note p { margin: 0; padding: 4px 20px 18px; font-size: 14px; line-height: 1.45; color: var(--muted); }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 16px; margin-top: 12px; }
.tile {
  position: relative; overflow: hidden; min-height: 212px; padding: 17px 16px 96px;
  border-radius: var(--r-lg); background: var(--card); text-align: left;
  transition: transform .3s var(--spring);
}
button.tile:active { transform: scale(.97); }
.tile h3 { position: relative; z-index: 1; margin: 0; font-size: 16px; line-height: 1.2; font-weight: 750; letter-spacing: -.01em; }
.tile p { position: relative; z-index: 1; margin: 6px 0 0; font-size: 12.5px; line-height: 1.35; color: var(--muted); max-width: 92%; }
.tile img { position: absolute; right: -12px; bottom: -18px; width: 56%; transition: transform .5s var(--spring); }
/* Картинка видна всегда. Раньше она была скрыта до срабатывания IntersectionObserver — в Telegram на iPhone
   он не срабатывал, и плитки оставались без картинок (прогон 01.10.2026). «Выпрыгивание» — только украшение. */
.tile img { opacity: 1; }
.tile.in img { animation: tile-pop .9s var(--spring) both; animation-delay: var(--d, 0s); }
@keyframes tile-pop { from { opacity: 0; transform: translate3d(20px, 30px, 0) scale(.7) rotate(-10deg); } }
.dark .tile, .dark .row-card, .dark .acc { background: #171c1b; color: #f4f6f3; }
.dark .tile p, .dark .row-card .l span, .dark .acc .rows span { color: #9aa39f; }
.dark .row-card .v { color: var(--lime); }

/* Аккордеоны: «Условия» и вопросы */
.acc { margin: 12px 16px 0; border-radius: var(--r-lg); background: var(--card); overflow: hidden; }
.acc > button { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px; padding: 20px; text-align: left; font-size: 17px; font-weight: 750; }
.acc > button svg { flex-shrink: 0; width: 20px; height: 20px; color: var(--muted); transition: transform .35s var(--ease); }
.acc.open > button svg { transform: rotate(180deg); }
.acc .body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease); }
.acc.open .body { grid-template-rows: 1fr; }
.acc .body > div { overflow: hidden; }
.acc .rows { padding: 0 20px 14px; }
.acc .rows div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; font-size: 15px; }
.acc .rows b { font-weight: 750; white-space: nowrap; }
.acc .rows s { color: var(--muted); font-weight: 600; margin-right: 6px; }
.acc .text { padding: 0 20px 20px; font-size: 14.5px; line-height: 1.5; color: var(--muted); }
.acc .text ol, .acc .text ul { margin: 0; padding-left: 20px; }
.acc .text li + li { margin-top: 6px; }
.disclaimer { margin: 16px 20px 0; font-size: 12px; line-height: 1.45; color: var(--muted); text-align: center; }
.dark .disclaimer { color: #7f8985; }

/* ——— Закреплённая кнопка действия ——— */
.cta-bar {
  position: fixed; left: 0; right: 0; bottom: var(--kb, 0px); z-index: 20;
  padding: 12px 16px calc(12px + var(--safe-bottom));
  background: linear-gradient(to top, var(--bg) 55%, rgba(241,244,240,0));
  animation: cta-in .6s var(--spring) .35s both;
  transition: bottom .25s var(--ease);
}
/* Кнопка над таб-баром (вкладка «Юрист») */
.cta-bar.above-tabbar { bottom: calc(76px + var(--safe-bottom)); padding-bottom: 8px; background: none; }
/* Клавиатура открыта: кнопку прячем. Поднимать её над клавиатурой ненадёжно — в Telegram на iPhone размеры окна
   при прокрутке и на поле даты врут, и кнопка улетала в середину экрана (баг калькулятора, 01.10.2026). */
.kb-open .cta-bar { bottom: 0; opacity: 0; transform: translateY(120%); pointer-events: none; animation: none; }
.cta-bar { transition: opacity .2s var(--ease), transform .25s var(--ease); }
.kb-open .tabbar { transform: translateY(160%); opacity: 0; pointer-events: none; }
.cta-bar.on-dark { background: linear-gradient(to top, #06090a 55%, rgba(6,9,10,0)); }
@keyframes cta-in { from { transform: translateY(120%); } }
.cta {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; height: 62px; border-radius: 999px;
  background: linear-gradient(180deg, #142a22, #07110d); color: #fff;
  font-size: 17px; font-weight: 700; letter-spacing: -.01em;
  box-shadow: 0 16px 34px -14px rgba(3, 60, 44, .7), inset 0 1px 0 rgba(255,255,255,.14);
  transition: transform .25s var(--spring), opacity .2s;
}
.cta:active { transform: scale(.97); }
.cta:disabled { opacity: .55; }
.cta.light { background: #fff; color: var(--text); box-shadow: 0 16px 34px -16px rgba(0,0,0,.6); }
.cta.lime { background: var(--lime); color: var(--ink); }
.cta img, .cta svg { width: 24px; height: 24px; flex-shrink: 0; }
.cta span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cta .star { font-size: 18px; }
.cta-sub { margin-top: 8px; text-align: center; font-size: 12px; color: var(--muted); }

/* ——— Плавающий таб-бар ——— */
.tabbar {
  position: fixed; z-index: 30; left: 12px; right: 12px; bottom: calc(10px + var(--safe-bottom));
  display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px;
  border-radius: 34px; background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(20px) saturate(1.6); -webkit-backdrop-filter: blur(20px) saturate(1.6);
  box-shadow: 0 16px 40px -16px rgba(10, 30, 22, .35), inset 0 0 0 1px rgba(255,255,255,.7);
  transition: transform .45s var(--ease), opacity .3s;
}
.tabbar.hidden { transform: translateY(140%); opacity: 0; pointer-events: none; }
.tabbar button {
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 4px 8px;
  border-radius: 28px; font-size: 11.5px; font-weight: 650; color: #2a3430;
  transition: background .3s var(--ease), color .3s;
}
.tabbar button svg { width: 24px; height: 24px; }
.tabbar button.active { background: #fff; color: var(--green); box-shadow: 0 6px 16px -8px rgba(3, 60, 44, .35); }

/* ——— Формы: новый разбор ——— */
.flow-head { padding: calc(var(--top-pad) + 56px) 20px 8px; }
.flow-head .step { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--green); }
.flow-head h1 { margin: 8px 0 6px; font-size: 27px; line-height: 1.1; font-weight: 800; letter-spacing: -.02em; }
.flow-head p { margin: 0; font-size: 14.5px; color: var(--muted); line-height: 1.45; }
.label { margin: 22px 20px 10px; font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.cats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 16px; }
.cat {
  position: relative; overflow: hidden; min-height: 104px; padding: 14px; border-radius: 22px;
  background: var(--card); text-align: left; font-size: 14px; font-weight: 700; line-height: 1.2;
  border: 2px solid transparent; transition: border-color .25s, transform .3s var(--spring), background .25s;
}
.cat:active { transform: scale(.96); }
.cat > span:first-child { position: relative; z-index: 1; display: block; max-width: 64%; }
.cat img { position: absolute; right: -10px; bottom: -12px; width: 48%; transition: transform .45s var(--spring); }
.cat.sel { border-color: var(--green); background: #eefaf4; }
.cat.sel img { transform: scale(1.08) rotate(-6deg); }
.cat .tick {
  position: absolute; left: 12px; bottom: 12px; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; background: var(--green); color: #fff;
  transform: scale(0); transition: transform .35s var(--spring);
}
.cat.sel .tick { transform: scale(1); }
.cat .tick svg { width: 14px; height: 14px; }
.cat.wide { grid-column: span 2; min-height: 72px; }
.cat.wide img { width: 22%; bottom: -16px; }
.field { margin: 0 16px; padding: 16px 18px 12px; border-radius: 24px; background: var(--card); border: 2px solid transparent; transition: border-color .25s; }
.field:focus-within { border-color: var(--green); }
.field textarea { display: block; width: 100%; min-height: 150px; resize: none; border: 0; outline: 0; background: none; color: var(--text); font-size: 16px; line-height: 1.5; } /* 16px: иначе iOS зумит экран при фокусе */
.field textarea::placeholder { color: #9aa39f; }
.field .meta { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; font-size: 12px; color: var(--muted); }
.hints { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 16px 0; }
.hint { padding: 9px 13px; border-radius: 999px; background: #e4ebe6; font-size: 13px; font-weight: 600; color: #2b3632; transition: transform .25s var(--spring); }
.hint:active { transform: scale(.95); }

/* Экран анализа */
.analyzing { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100%; padding: 40px 24px calc(60px + var(--safe-bottom)); text-align: center; }
.scan { position: relative; width: 210px; height: 210px; margin-bottom: 26px; }
.scan .doc { position: absolute; inset: 10% 14%; animation: bob 3s ease-in-out infinite alternate; }
.scan .lens { position: absolute; width: 56%; left: 30%; top: 30%; animation: sweep 2.6s var(--ease) infinite; filter: drop-shadow(0 14px 18px rgba(0,0,0,.2)); }
.scan::before { content: ""; position: absolute; inset: 8%; border-radius: 50%; background: radial-gradient(circle, rgba(6,165,121,.18), transparent 65%); animation: pulse 2.2s ease-in-out infinite; }
@keyframes sweep { 0% { transform: translate(-30%, -25%) rotate(-8deg); } 50% { transform: translate(8%, 12%) rotate(6deg); } 100% { transform: translate(-30%, -25%) rotate(-8deg); } }
@keyframes pulse { 50% { transform: scale(1.12); opacity: .6; } }
.analyzing h2 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.steps { width: 100%; max-width: 330px; margin: 22px 0 0; padding: 0; list-style: none; text-align: left; }
.steps li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; font-size: 14.5px; font-weight: 600; color: #9aa39f; transition: color .3s, background .3s; }
.steps li .dot { width: 26px; height: 26px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; background: #e4ebe6; transition: background .3s; }
.steps li .dot svg { width: 14px; height: 14px; opacity: 0; transition: opacity .3s; }
.steps li.active { background: var(--card); color: var(--text); }
.steps li.active .dot { background: #d7f1e4; animation: pulse 1.2s ease-in-out infinite; }
.steps li.done { color: var(--text); }
.steps li.done .dot { background: var(--green); color: #fff; }
.steps li.done .dot svg { opacity: 1; }

/* Результат разбора / документ */
.result-head { padding: calc(var(--top-pad) + 56px) 20px 4px; }
.status-chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; background: #d9f3e7; color: var(--green); font-size: 12.5px; font-weight: 700; }
.status-chip.wait { background: #fff1c9; color: #7a5a00; }
.status-chip svg { width: 15px; height: 15px; }
.result-head h1 { margin: 12px 0 0; font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.12; }
.doc-card { margin: 16px 16px 0; padding: 20px; border-radius: var(--r-lg); background: var(--card); font-size: 15px; line-height: 1.55; -webkit-user-select: text; user-select: text; }
.doc-card h4 { margin: 18px 0 6px; font-size: 16px; font-weight: 800; }
.doc-card h4:first-child { margin-top: 0; }
.doc-card p { margin: 0 0 10px; }
.doc-card ul, .doc-card ol { margin: 0 0 10px; padding-left: 20px; }
.doc-card li { margin: 4px 0; }
.doc-card a { color: var(--green); }
.doc-card.clamp { max-height: 360px; overflow: hidden; position: relative; }
.doc-card.clamp::after { content: ""; position: absolute; inset: auto 0 0 0; height: 90px; background: linear-gradient(to top, #fff, rgba(255,255,255,0)); }
.more { display: block; margin: 10px auto 0; padding: 10px 18px; border-radius: 999px; background: #e4ebe6; font-size: 14px; font-weight: 700; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 16px; margin-top: 12px; }
.action { display: flex; align-items: center; justify-content: center; gap: 8px; height: 52px; border-radius: 18px; background: var(--card); font-size: 14.5px; font-weight: 700; transition: transform .25s var(--spring); }
.action:active { transform: scale(.96); }
.action svg { width: 20px; height: 20px; color: var(--green); }

/* Премиальный баннер чата внутри результата */
.promo {
  position: relative; overflow: hidden; margin: 16px 16px 0; padding: 20px 20px 22px; border-radius: var(--r-xl);
  color: #fff; text-align: left; width: calc(100% - 32px); display: block;
}
.promo h3 { margin: 0; max-width: 62%; font-size: 20px; font-weight: 800; line-height: 1.15; letter-spacing: -.015em; }
.promo p { margin: 8px 0 16px; max-width: 64%; font-size: 13.5px; color: rgba(255,255,255,.8); line-height: 1.4; }
.promo .go { display: inline-flex; align-items: center; gap: 8px; padding: 12px 16px; border-radius: 999px; background: var(--lime); color: var(--ink); font-weight: 750; font-size: 14.5px; }
.promo img { position: absolute; right: -18px; bottom: -22px; width: 46%; }
.lock { position: absolute; top: 12px; right: 12px; z-index: 2; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgba(14,21,18,.08); color: var(--muted); }
.lock svg { width: 15px; height: 15px; }

/* ——— Мои дела ——— */
.list { padding: 0 16px; }
.item {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px; margin-top: 10px;
  border-radius: 24px; background: var(--card); text-align: left; transition: transform .25s var(--spring);
  animation: fade-in .45s var(--ease) both; animation-delay: var(--d, 0s);
}
.item:active { transform: scale(.98); }
.item .ic { flex-shrink: 0; width: 56px; height: 56px; border-radius: 18px; background: #eef3ef; display: grid; place-items: center; overflow: hidden; }
.item .ic img { width: 120%; max-width: none; }
.item .tx { flex: 1; min-width: 0; }
.item .tx b { display: block; font-size: 15.5px; font-weight: 700; }
.item .tx span { display: block; margin-top: 3px; font-size: 12.5px; color: var(--muted); }
.item .st { flex-shrink: 0; padding: 5px 9px; border-radius: 10px; font-size: 11px; font-weight: 700; background: #d9f3e7; color: var(--green); }
.item .st.wait { background: #fff1c9; color: #7a5a00; }
.item > svg { flex-shrink: 0; width: 20px; height: 20px; color: #a5aeaa; }
.empty { padding: 20px 28px 0; text-align: center; }
.empty img { width: 190px; margin: 0 auto; animation: bob 4s ease-in-out infinite alternate; }
.empty h2 { margin: 8px 0 6px; font-size: 21px; font-weight: 800; }
.empty p { margin: 0 0 18px; color: var(--muted); font-size: 14.5px; line-height: 1.45; }
.btn-inline { display: inline-flex; align-items: center; gap: 8px; padding: 14px 20px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 700; }

/* ——— Профиль ——— */
.profile { padding: calc(var(--top-pad) + 40px) 20px 26px; text-align: center; }
.avatar {
  width: 104px; height: 104px; margin: 0 auto; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; font-size: 38px; font-weight: 800; color: #fff;
  background: linear-gradient(145deg, #1cc08e, #03634a); box-shadow: 0 14px 30px -14px rgba(3,99,74,.7);
  animation: card-in .8s var(--spring) both;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile h1 { margin: 14px 0 4px; font-size: 25px; font-weight: 800; letter-spacing: -.02em; }
.profile p { margin: 0; color: var(--muted); font-size: 15px; }
.sheet-list { margin: 0 16px; padding: 10px; border-radius: 30px; background: var(--card); }
.srow { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px; border-radius: 22px; background: #f5f7f4; text-align: left; transition: transform .25s var(--spring); }
.srow + .srow { margin-top: 10px; }
.srow:active { transform: scale(.98); }
.srow .ico { flex-shrink: 0; width: 54px; height: 54px; border-radius: 17px; display: grid; place-items: center; background: #e8eee9; color: var(--green); }
.srow .ico svg { width: 26px; height: 26px; }
.srow .tx { flex: 1; min-width: 0; }
.srow .tx b { display: block; font-size: 16px; font-weight: 700; }
.srow .tx span { display: block; margin-top: 3px; font-size: 13px; color: var(--muted); }
.srow > svg { flex-shrink: 0; width: 20px; height: 20px; color: #a5aeaa; }
.switch { position: relative; flex-shrink: 0; width: 50px; height: 30px; border-radius: 999px; background: #cfd8d2; transition: background .3s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2); transition: transform .35s var(--spring); }
.switch.on { background: var(--green); }
.switch.on::after { transform: translateX(20px); }

/* ——— Нижний лист (документ, заявка) ——— */
.sheet-bg { position: fixed; inset: 0; z-index: 50; background: rgba(8, 14, 11, .45); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fade .3s both; }
.sheet-bg.closing { animation: fade .25s reverse both; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  position: fixed; left: 0; right: 0; bottom: var(--kb, 0px); z-index: 51; max-height: calc(90vh - var(--kb, 0px)); overflow-y: auto;
  padding: 10px 16px calc(18px + var(--safe-bottom)); border-radius: 30px 30px 0 0; background: var(--bg);
  transition: bottom .25s var(--ease);
  animation: sheet-in .45s var(--ease) both;
}
.sheet.closing { animation: sheet-out .3s var(--ease) both; }
@keyframes sheet-in { from { transform: translateY(100%); } }
@keyframes sheet-out { to { transform: translateY(100%); } }
.sheet .grab { width: 42px; height: 5px; margin: 0 auto 12px; border-radius: 99px; background: #cdd6d0; }
.sheet h2 { margin: 6px 4px 4px; font-size: 21px; font-weight: 800; letter-spacing: -.015em; }
.sheet .meta { margin: 0 4px 12px; font-size: 13px; color: var(--muted); }
.sheet .doc-card { margin: 0; }
.sheet .field { margin: 0; }
.sheet .cta { margin-top: 14px; }

/* Успех */
.success { padding: 12px 8px 4px; text-align: center; }
.success img { width: 170px; margin: 0 auto; animation: card-in .9s var(--spring) both; }
.success h2 { margin: 4px 0 6px; }
.success ~ .cta + .cta { margin-top: 8px; }
.success p { margin: 0 auto; max-width: 300px; color: var(--muted); line-height: 1.45; }

.toast {
  position: fixed; left: 50%; top: calc(var(--top-pad) + 10px); z-index: 60; transform: translateX(-50%);
  padding: 12px 18px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 650;
  box-shadow: 0 14px 30px -12px rgba(0,0,0,.5); animation: toast 2.4s var(--ease) both; white-space: nowrap;
}
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, -20px); } 12%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, -10px); } }

.skeleton { height: 88px; margin: 10px 16px 0; border-radius: 24px; background: linear-gradient(90deg, #e7ece8 0%, #f5f7f4 50%, #e7ece8 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Кнопка «Назад» вне Telegram (в Telegram — нативная) */
.back-fallback {
  position: fixed; z-index: 40; left: 14px; top: calc(var(--top-pad) + 8px);
  display: inline-flex; align-items: center; gap: 4px; height: 38px; padding: 0 14px 0 10px;
  border-radius: 999px; background: rgba(255,255,255,.28); color: #fff; font-weight: 650; font-size: 15px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.back-fallback.ink { background: rgba(14,21,18,.08); color: var(--text); }
.back-fallback svg { width: 20px; height: 20px; }

/* ——— Вложения ——— */
.field .attach { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px 7px 10px; border-radius: 999px; background: #e7f3ec; color: var(--green); font-size: 12.5px; font-weight: 700; }
.field .attach svg { width: 15px; height: 15px; }
.files { display: flex; flex-wrap: wrap; gap: 6px; }
.field .files:not(:empty) { margin-top: 8px; }
.file-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 6px 6px 6px 10px; border-radius: 12px; background: #eef3ef; font-size: 12.5px; font-weight: 600; }
.file-chip > svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--green); }
.file-chip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.file-chip button { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(14,21,18,.08); }
.file-chip button svg { width: 11px; height: 11px; }
.file-chip.loading > svg { animation: spin 1s linear infinite; color: var(--muted); }
.file-chip.error { background: #fde8e4; color: #7a2a1c; }
.file-chip.error > svg { color: #c0392b; }
@keyframes spin { to { transform: rotate(360deg); } }
.from-bot { display: flex; align-items: center; gap: 8px; margin: -2px 16px 10px; padding: 9px 12px; border-radius: 14px; background: #e3f1fb; color: #155a86; font-size: 12.5px; font-weight: 600; }
.from-bot svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ——— Чат по делу ——— */
.chat-head {
  position: sticky; top: 0; z-index: 6; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
  padding: calc(var(--top-pad) + 50px) 18px 12px;
  background: rgba(241, 244, 240, .88); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.chat-head h1 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.chat-head p { margin: 2px 0 0; font-size: 13px; color: var(--muted); max-width: 58vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-count { flex-shrink: 0; padding: 7px 11px; border-radius: 999px; background: #dff3e9; color: var(--green); font-size: 12px; font-weight: 700; }
.msgs { display: flex; flex-direction: column; gap: 10px; padding: 16px 14px 8px; }
.msg { max-width: 86%; padding: 12px 14px; border-radius: 20px; font-size: 15px; line-height: 1.5; animation: fade-in .3s var(--ease) both; -webkit-user-select: text; user-select: text; }
.msg.ai { align-self: flex-start; background: var(--card); border-bottom-left-radius: 6px; box-shadow: 0 6px 18px -14px rgba(10, 30, 22, .4); }
.msg.me { align-self: flex-end; background: var(--green); color: #fff; border-bottom-right-radius: 6px; }
.msg-body h4 { margin: 10px 0 4px; font-size: 15px; font-weight: 800; }
.msg-body h4:first-child { margin-top: 0; }
.msg-body p { margin: 0 0 8px; }
.msg-body p:last-child { margin-bottom: 0; }
.msg-body ul, .msg-body ol { margin: 0 0 8px; padding-left: 18px; }
.msg-body a { color: var(--green); }
.msg-body.clamp { max-height: 300px; overflow: hidden; -webkit-mask: linear-gradient(#000 70%, transparent); mask: linear-gradient(#000 70%, transparent); }
/* Документ/разбор в ленте чата — карточка вместо простыни текста */
.msg-doc {
  align-self: flex-start; width: min(100%, 340px); padding: 12px; border-radius: 20px; border-bottom-left-radius: 6px;
  background: var(--card); border: 1px solid var(--line); box-shadow: 0 6px 18px -14px rgba(10, 30, 22, .4);
  display: grid; gap: 10px; animation: fade-in .3s var(--ease) both;
}
.md-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.md-top img { width: 38px; height: 38px; object-fit: contain; flex: none; }
.md-tx { display: grid; gap: 3px; min-width: 0; }
.md-tx b { font-size: 14.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.md-st { font-size: 12px; font-weight: 600; color: var(--green); }
.md-st.wait { color: #9a6208; }
.md-lead { margin: 0; font-size: 14px; line-height: 1.45; color: var(--text); }
.md-note { margin: 0; font-size: 12.5px; color: var(--muted); }
.md-act { display: flex; gap: 8px; }
.md-act button {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; border-radius: 12px;
  background: rgba(3, 131, 97, .09); color: var(--green); font-weight: 700; font-size: 13.5px;
}
.md-act button svg { width: 16px; height: 16px; }
.md-act button:disabled { opacity: .5; }
.msg-more { margin-top: 6px; font-size: 13px; font-weight: 700; color: var(--green); }
.msg-file { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; padding: 7px 10px; border-radius: 12px; background: rgba(255,255,255,.18); font-size: 12.5px; font-weight: 600; }
.msg-file svg { width: 14px; height: 14px; }
.msg.typing { display: flex; gap: 5px; padding: 16px 16px; }
.msg.typing span { width: 7px; height: 7px; border-radius: 50%; background: #9aa39f; animation: blink 1.2s infinite ease-in-out; }
.msg.typing span:nth-child(2) { animation-delay: .15s; }
.msg.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.suggest { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.composer {
  position: fixed; left: 0; right: 0; bottom: var(--kb, 0px); z-index: 20;
  padding: 8px 12px calc(10px + var(--safe-bottom)); background: rgba(241, 244, 240, .92);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-top: 1px solid var(--line);
  transition: bottom .25s var(--ease);
}
.kb-open .composer { padding-bottom: 8px; }
.composer .files:not(:empty) { margin-bottom: 8px; }
.composer .bar { display: flex; align-items: flex-end; gap: 8px; }
.composer textarea {
  flex: 1; min-height: 44px; max-height: 140px; resize: none; padding: 11px 14px; border: 0; outline: 0;
  border-radius: 22px; background: var(--card); color: var(--text); font-size: 16px; line-height: 1.4;
  box-shadow: inset 0 0 0 1px var(--line);
}
.composer textarea:disabled { opacity: .6; }
.c-attach, .c-send { flex-shrink: 0; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; transition: transform .2s var(--spring), opacity .2s; }
.c-attach { background: var(--card); color: var(--green); box-shadow: inset 0 0 0 1px var(--line); }
.c-send { background: var(--green); color: #fff; }
.c-attach svg, .c-send svg { width: 20px; height: 20px; }
.c-send:disabled, .c-attach:disabled { opacity: .35; }
.c-send:not(:disabled):active, .c-attach:not(:disabled):active { transform: scale(.9); }
.chat-pay { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 50px; margin-bottom: 8px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 700; font-size: 15px; }
.chat-pay svg { width: 18px; height: 18px; color: #ffc83d; }

/* Предложение добавить на главный экран */
.home-banner { display: flex; align-items: center; gap: 12px; margin: 14px 16px 0; padding: 12px; border-radius: 22px; background: var(--card); }
.home-banner .ico { flex-shrink: 0; width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; background: #e7f3ec; color: var(--green); }
.home-banner .ico svg { width: 24px; height: 24px; }
.home-banner div { flex: 1; min-width: 0; }
.home-banner b { display: block; font-size: 14.5px; font-weight: 750; }
.home-banner div span { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.home-banner .add { flex-shrink: 0; padding: 9px 13px; border-radius: 999px; background: var(--green); color: #fff; font-size: 13px; font-weight: 700; }
.home-banner .x { flex-shrink: 0; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: var(--muted); }
.home-banner .x svg { width: 13px; height: 13px; }

/* Баннер «нет связи» */
.offline { display: flex; align-items: center; gap: 12px; margin: 0 16px 12px; padding: 12px 14px; border-radius: 18px; background: #fde8e4; color: #7a2a1c; font-size: 13px; line-height: 1.35; }
.offline span { flex: 1; }
.offline button { flex-shrink: 0; padding: 9px 14px; border-radius: 999px; background: #7a2a1c; color: #fff; font-weight: 700; font-size: 13px; }

/* Лист «О сервисе» */
.about { text-align: center; }
.about-logo { width: 64px; margin: 6px auto 4px; }
.about .meta { margin: 6px 8px 14px; line-height: 1.45; }
.about-steps { display: grid; gap: 10px; text-align: left; }
.about-step { display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 8px; border-radius: 20px; background: var(--card); }
.about-step img { width: 64px; flex-shrink: 0; }
.about-step b { display: block; font-size: 15px; font-weight: 750; }
.about-step span { display: block; margin-top: 2px; font-size: 13px; line-height: 1.35; color: var(--muted); }

/* ——— Приложения в форме разбора ——— */
.attach-grid { display: grid; gap: 8px; padding: 0 16px; }
.att {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 10px 44px 10px 10px; border-radius: var(--r-md); background: var(--card);
}
.att-n {
  position: absolute; left: 6px; top: 6px; z-index: 1; display: grid; place-items: center;
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 750;
}
.att-thumb { position: relative; flex-shrink: 0; display: grid; place-items: center; width: 56px; height: 56px; overflow: hidden; border-radius: 14px; background: var(--bg); }
.att-thumb img { width: 100%; height: 100%; object-fit: cover; }
.att-thumb svg { width: 26px; height: 26px; color: var(--green); }
.att-thumb .spin { position: absolute; inset: 0; margin: auto; width: 22px; height: 22px; background: rgba(255,255,255,.7); border-radius: 50%; }
.att-tx { min-width: 0; }
.att-tx b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 700; }
.att-tx span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; font-size: 12px; color: var(--muted); }
.att.error { background: #fde8e4; }
.att.error .att-thumb svg { color: #c0392b; }
.att-x { position: absolute; right: 10px; top: 50%; translate: 0 -50%; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(14,21,18,.07); }
.att-x svg { width: 12px; height: 12px; }
.att-add {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 16px; text-align: left;
  border: 1.5px dashed rgba(3, 131, 97, .45); border-radius: var(--r-md); background: rgba(3, 131, 97, .05);
}
.att-add > svg { flex-shrink: 0; width: 26px; height: 26px; padding: 8px; box-sizing: content-box; border-radius: 12px; background: var(--green); color: #fff; }
.att-add b { display: block; font-size: 15px; font-weight: 750; color: var(--green); }
.att-add span span { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.attach-hint { margin: 8px 20px 0; font-size: 12.5px; line-height: 1.4; color: var(--muted); }

.offer-files { padding: 14px 16px; border-radius: var(--r-md); background: var(--card); }
.offer-files > b { display: flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 750; }
.offer-files > b svg { width: 18px; height: 18px; color: var(--green); }
.offer-files ol { margin: 8px 0 0; padding-left: 22px; font-size: 13.5px; line-height: 1.5; }
.offer-files p { margin: 6px 0 0; font-size: 13px; line-height: 1.4; color: var(--muted); }
.offer-files .files { margin-top: 8px; }
.offer-files .btn-inline { margin-top: 10px; }
.doc-files:not(:empty) { margin-top: 12px; }
.doc-files .offer-files { background: var(--bg); }

/* ——— Закрытый документ и тарифы ——— */
.offer-slot { display: grid; gap: 12px; }
.offer-doc, .offer-bought, .offer-honest { padding: 16px; border-radius: var(--r-lg); background: var(--card); }
.offer-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.lock-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px;
  background: #0b1411; color: #fff; font-size: 12.5px; font-weight: 700;
}
.lock-chip svg { width: 14px; height: 14px; }
.lock-chip.wait { background: #fff4d6; color: #6b5300; }
.lock-chip.ok { background: #dff3e9; color: var(--green); }
.lock-chip .spin { width: 12px; height: 12px; }
.offer-meta { font-size: 12px; color: var(--muted); }
.offer-doc h3, .offer-bought h3, .offer-honest h3 { margin: 10px 0 10px; font-size: 18px; line-height: 1.2; font-weight: 750; letter-spacing: -.01em; }
.offer-bought p, .offer-honest p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
.offer-bought .cta, .offer-honest .cta { margin-top: 14px; }
.offer-note { margin: 10px 2px 0; font-size: 12.5px; color: var(--muted); }

.paper {
  position: relative; max-height: 360px; overflow: hidden; padding: 16px 16px 60px;
  border-radius: 14px; background: #fbfbf8; border: 1px solid var(--line);
  font-family: Georgia, "Times New Roman", serif; font-size: 13px; line-height: 1.55; color: #1b221f;
  -webkit-user-select: none; user-select: none;
}
.paper p { margin: 0; }
.paper .pl-h { margin-top: 2px; font-family: "Montserrat", sans-serif; font-size: 12.5px; font-weight: 750; }
.paper .pl-gap { height: 8px; }
.paper .blur { filter: blur(4.5px); color: #2a332f; }
.pl-skel { height: 10px; margin: 9px 0; border-radius: 6px; background: linear-gradient(90deg, #eceee9 25%, #f6f7f3 50%, #eceee9 75%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.paper-fade {
  position: absolute; left: 0; right: 0; bottom: 0; height: 110px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 14px;
  background: linear-gradient(to bottom, rgba(251,251,248,0), #fbfbf8 70%);
}
.paper-fade span, .paper-fade .pf-unlock { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: #0b1411; color: #fff; font-family: "Montserrat", sans-serif; font-size: 12.5px; font-weight: 700; }
.paper-fade svg { width: 14px; height: 14px; }

.plans { display: grid; gap: 10px; }
.plan {
  display: grid; gap: 6px; width: 100%; padding: 16px; border-radius: var(--r-lg); text-align: left;
  background: var(--card); border: 1.5px solid var(--line); transition: transform .3s var(--spring);
}
.plan:active { transform: scale(.98); }
.plan.featured { background: linear-gradient(155deg, #1a2420, #070b09); color: #f4f6f3; border-color: transparent; }
.plan-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.plan-top b { font-size: 17px; font-weight: 750; }
.plan-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px; background: var(--lime); color: var(--ink); font-size: 11.5px; font-weight: 750; }
.plan-badge svg { width: 13px; height: 13px; }
.plan-sub { font-size: 13px; color: var(--muted); }
.plan.featured .plan-sub { color: #a9b2ae; }
.plan ul { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 5px; }
.plan li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.plan li svg { flex-shrink: 0; width: 14px; height: 14px; color: var(--green); }
.plan.featured li svg { color: var(--lime); }
.plan-price { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.plan-price svg { width: 20px; height: 20px; }

.offer-honest { text-align: center; }
.offer-honest img { width: 76px; margin: 0 auto; }
.link-btn { display: block; margin: 12px auto 0; font-size: 13.5px; font-weight: 650; color: var(--muted); text-decoration: underline; }
.cta.ghost { background: var(--card); color: var(--text); box-shadow: none; }

/* ——— Лист «Оплата по СБП» ——— */
.pay h2 { margin: 0 0 14px; }
.pay-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: var(--r-md); background: var(--bg);
}
.pay-art { flex-shrink: 0; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: #fff; }
.pay-art img { width: 44px; }
.pay-tx { flex: 1; min-width: 0; }
.pay-tx b { display: block; font-size: 15px; font-weight: 700; }
.pay-tx span { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.pay-price { white-space: nowrap; font-size: 15px; font-weight: 750; }
.pay-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 12px; padding: 4px; border-radius: 999px; background: var(--bg); }
.pay-methods button { min-height: 42px; border-radius: 999px; font-size: 14px; font-weight: 700; color: var(--muted); transition: background-color .25s var(--ease), color .25s var(--ease); }
.pay-methods button[aria-checked="true"] { background: var(--card); color: var(--text); box-shadow: 0 4px 14px -6px rgba(3, 40, 30, .35); }
.pay-methods button:disabled { opacity: .6; }
.pay-email input {
  width: 100%; height: 50px; margin-top: 8px; padding: 0 16px; border: 0; border-radius: var(--r-md);
  background: var(--bg); color: var(--text); font-size: 15px;
}
.pay-email input::placeholder { color: var(--muted); }
.pay-hint { margin: 10px 4px 0; text-align: center; font-size: 12px; line-height: 1.4; color: var(--muted); }
.pay input:disabled { opacity: .7; }
.pay-promo { display: flex; gap: 8px; margin-top: 12px; }
.pay-promo input {
  flex: 1; min-width: 0; height: 50px; padding: 0 16px; border: 0; border-radius: var(--r-md);
  background: var(--bg); color: var(--text); font-size: 15px;
}
.pay-promo input::placeholder { color: var(--muted); }
.pay-promo .promo-apply { flex-shrink: 0; padding: 0 16px; border-radius: var(--r-md); background: var(--bg); font-size: 14px; font-weight: 700; color: var(--green); }
.promo-note { margin: 8px 2px 0; font-size: 13px; line-height: 1.35; }
.promo-note.ok { color: var(--green); }
.promo-note.err { color: #b3261e; }
.pay-total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 16px; padding: 0 2px; }
.pay-total span { font-size: 14px; color: var(--muted); }
.pay-total b { font-size: 22px; font-weight: 750; letter-spacing: -.02em; color: var(--green); }
.pay-body:not(:empty) { margin-top: 16px; }
.pay-qr { display: grid; justify-items: center; gap: 10px; padding: 14px; border-radius: var(--r-lg); background: #fff; box-shadow: 0 10px 30px -18px rgba(3, 40, 30, .5); }
.pay-qr img { width: min(240px, 62vw); aspect-ratio: 1; image-rendering: pixelated; }
.pay-qr p { margin: 0; max-width: 260px; text-align: center; font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.pay-wait { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 12px 0 0; font-size: 13.5px; color: var(--muted); }
.spin { width: 15px; height: 15px; border: 2px solid rgba(3, 131, 97, .25); border-top-color: var(--green); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pay-done { display: grid; justify-items: center; gap: 4px; padding: 10px 0 4px; text-align: center; }
.pay-done img { width: 86px; }
.pay-done b { font-size: 18px; font-weight: 750; }
.pay-done span { font-size: 13.5px; color: var(--muted); }
.pay .cta { margin-top: 16px; }

/* ——— Аудитории Миллекса ——— */
/* Участник СВО: тёплый бронзовый — наградной, а не «военный зелёный». */
.t-svo { background: linear-gradient(155deg, #d9a441 0%, #9c6a1b 48%, #4d330b 100%); box-shadow: 0 18px 40px -22px rgba(90, 60, 10, .6); }

/* Переключатель «Кто обращается» на главной: четыре режима чипами, прокрутка вбок на узких экранах */
.aud-chips { display: flex; gap: 8px; margin: -4px 0 0; padding: 0 16px 2px; overflow-x: auto; scrollbar-width: none; }
.aud-chips::-webkit-scrollbar { display: none; }
.aud-chips button {
  flex: none; display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 14px; border-radius: 999px;
  background: #e3e9e4; color: var(--muted); font-size: 14px; font-weight: 700; transition: background .25s, color .25s, transform .25s var(--spring);
}
.aud-chips button svg { width: 18px; height: 18px; flex: none; }
.aud-chips button.on { background: var(--text); color: #fff; }
.aud-chips button.on svg { color: var(--lime); }
.aud-chips button:active { transform: scale(.96); }

/* Срочно: сборный пункт и отправка — живой юрист в один тап */
.urgent-promo {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 14px; border-radius: var(--r-md);
  background: linear-gradient(135deg, #c2410c, #8f1d0f); color: #fff; box-shadow: 0 14px 30px -18px rgba(140, 30, 10, .8);
}
.urgent-promo img { width: 46px; height: 46px; object-fit: contain; flex: none; filter: drop-shadow(0 6px 8px rgba(0,0,0,.3)); }
.urgent-promo > span { flex: 1; min-width: 0; display: grid; gap: 2px; }
.urgent-promo b { font-size: 15px; line-height: 1.25; }
.urgent-promo > span > span { font-size: 12.5px; opacity: .88; line-height: 1.35; }
.urgent-promo > svg { width: 18px; height: 18px; flex: none; opacity: .8; }

/* Срочные темы в форме разбора */
.cat.urgent { box-shadow: inset 0 0 0 2px rgba(194, 65, 12, .35); }
.cat.urgent > span:first-child { color: #9a3412; }

/* Под разбором: дело для живого юриста — карточка выше тарифов */
.offer-live { position: relative; overflow: hidden; margin-bottom: 12px; padding: 16px 16px 14px; border-radius: var(--r-lg); background: #fff1e6; }
.offer-live img { position: absolute; right: -10px; top: -8px; width: 76px; opacity: .9; transform: rotate(10deg); }
.offer-live h3 { margin: 0 0 6px; max-width: 78%; font-size: 17px; font-weight: 800; color: #7a2e0e; }
.offer-live p { margin: 0 0 12px; max-width: 86%; font-size: 13.5px; line-height: 1.45; color: #7a2e0e; }
.offer-live .cta { height: 54px; font-size: 15.5px; background: linear-gradient(180deg, #c2410c, #8f1d0f); }

/* Заявка юристу: что нужно — по делу, консультация, суд */
.lead-svc { display: grid; gap: 8px; margin: 4px 0 12px; }
.lead-svc button {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 16px;
  background: var(--bg); border: 2px solid transparent; text-align: left;
}
.lead-svc button b { font-size: 14.5px; }
.lead-svc button span { font-size: 13px; color: var(--muted); white-space: nowrap; }
.lead-svc button.on { border-color: var(--green); background: #e3f3ea; }

/* Экран «Кто вы?» */
.who-head { padding: calc(var(--top-pad) + 40px) 22px 6px; text-align: center; }
.who-head img { width: 56px; margin: 0 auto 14px; animation: fade-in .6s var(--ease) both; }
.who-head h1 { margin: 0; font-size: 30px; line-height: 1.1; font-weight: 800; letter-spacing: -.02em; animation: fade-in .6s var(--ease) .05s both; }
.who-head p { margin: 10px auto 0; max-width: 320px; font-size: 14.5px; line-height: 1.45; color: var(--muted); animation: fade-in .6s var(--ease) .1s both; }
.who-list { display: grid; gap: 14px; margin-top: 22px; }
.who-card {
  position: relative; overflow: hidden; isolation: isolate; width: 100%; min-height: 188px;
  padding: 18px 18px 22px; border-radius: var(--r-xl); color: #fff; text-align: left;
  transition: transform .35s var(--spring);
  animation: tile-in .7s var(--spring) var(--d, 0s) both;
}
.who-card:active { transform: scale(.975); }
.who-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(120% 90% at 100% 0%, rgba(255,255,255,.26), transparent 55%); }
.who-card .who-ic {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 15px;
  background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.3);
}
.who-card .who-ic svg { width: 24px; height: 24px; }
.who-card h2 { position: relative; margin: 38px 0 6px; max-width: 70%; font-size: 21px; line-height: 1.15; font-weight: 750; letter-spacing: -.015em; }
.who-card p { position: relative; margin: 0; max-width: 64%; font-size: 13.5px; line-height: 1.38; color: rgba(255,255,255,.84); }
.who-card img { position: absolute; z-index: -1; filter: drop-shadow(0 14px 18px rgba(0,0,0,.28)); pointer-events: none; }
.who-card .a1 { right: -4%; bottom: -10%; width: 40%; transform: rotate(-8deg); }
.who-card .a2 { right: 26%; top: 2%; width: 22%; transform: rotate(14deg); opacity: .9; }
.who-card .go {
  position: absolute; right: 16px; top: 16px; display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.95); color: var(--ink);
}
.who-card .go svg { width: 17px; height: 17px; }
.who-card.sel { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--text); }
@keyframes tile-in { from { opacity: 0; transform: translateY(26px) scale(.96); } }

/* Десктопный Telegram и планшеты: приложение остаётся «телефонной» ширины по центру */
@media (min-width: 620px) {
  #app, .tabbar, .cta-bar, .sheet, .composer { max-width: 560px; margin-inline: auto; }
  .tabbar { left: 0; right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.offer-files .btn-inline { padding: 11px 16px; font-size: 14px; }
.offer-files .btn-inline svg { width: 18px; height: 18px; }

/* ——— Дела: карточка дела со списком документов внутри (раньше был плоский список документов) ——— */
/* minmax(0,1fr): иначе длинное название документа (nowrap) распирает колонку и карточка уезжает за экран */
.cases { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 0 16px 24px; }
.case-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 14px 12px;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; min-width: 0;
}
.case-card.cur { border-color: color-mix(in oklab, var(--green) 45%, var(--line)); }
.case-top { display: flex; align-items: center; gap: 10px; }
.case-top .ic { width: 42px; height: 42px; display: grid; place-items: center; flex: none; }
.case-top .ic img { width: 100%; height: 100%; object-fit: contain; }
.case-top .tx { display: grid; gap: 2px; min-width: 0; }
.case-top .tx b { font-size: 15.5px; line-height: 1.25; color: var(--text); }
.case-top .tx span { font-size: 12.5px; color: var(--muted); }
.case-top .st { margin-left: auto; font-size: 11.5px; color: var(--green); background: rgba(3, 131, 97, .1); border-radius: 999px; padding: 3px 9px; flex: none; }
.case-docs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.case-doc {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  background: rgba(14, 21, 18, .04); border: 0; border-radius: 14px; padding: 9px 10px; color: var(--text); font: inherit; cursor: pointer;
}
.case-doc img { width: 22px; height: 22px; object-fit: contain; flex: none; }
.case-doc > span:first-of-type { flex: 1; min-width: 0; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.case-doc svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.case-doc .st.wait { font-size: 11px; color: #9a6208; white-space: nowrap; }
.case-empty { margin: 0; font-size: 13px; color: var(--muted); }
.case-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.case-note { margin: 0; font-size: 12.5px; color: var(--muted); }

/* Правка документа */
.revise-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.revise-chips .chip { cursor: pointer; border: 1px solid var(--line); background: rgba(14, 21, 18, .04); border-radius: 999px; padding: 7px 12px; font: inherit; font-size: 13.5px; color: var(--text); }
.revise-chips .chip.on { background: rgba(3, 131, 97, .12); border-color: var(--green); color: var(--green); }
.ta { width: 100%; border: 1px solid var(--line); border-radius: 16px; padding: 12px; font: inherit; font-size: 15px; background: var(--card); color: var(--text); resize: vertical; }


/* ——— «Чат по делу»: какое дело продолжаем + отдельная кнопка нового дела ——— */
.case-pick { display: grid; gap: 8px; }
.case-pick button { width: 100%; text-align: left; border-radius: var(--r-md); padding: 14px 16px; }
.cp-cur { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "cap link" "name link"; gap: 2px 10px; align-items: center;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); color: #fff; }
.cp-cap { grid-area: cap; font-size: 12px; opacity: .7; }
.cp-cur b { grid-area: name; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-link { grid-area: link; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: var(--lime); }
.cp-link svg { width: 14px; height: 14px; }
.cp-new { display: flex; align-items: center; gap: 12px; background: var(--lime); color: var(--ink); }
.cp-new svg { width: 22px; height: 22px; flex: none; }
.cp-new > span { display: grid; gap: 2px; }
.cp-new b { font-size: 16px; }
.cp-new > span > span { font-size: 12.5px; opacity: .75; }

/* Кнопки документов над полем ввода в чате по делу */
.doc-strip { display: flex; gap: 6px; margin-bottom: 8px; overflow-x: auto; scrollbar-width: none; }
.doc-strip::-webkit-scrollbar { display: none; }
.doc-strip button {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px;
  background: #e3f3ea; color: var(--green); font-weight: 700; font-size: 13.5px;
}
.doc-strip button svg { width: 15px; height: 15px; }

/* Проект документа (на проверке у юриста) */
.draft-note { display: flex; gap: 10px; align-items: flex-start; margin: 12px 16px 0; padding: 12px 14px; border-radius: 16px;
  background: #fdecea; color: #8e1f14; font-size: 13.5px; line-height: 1.45; }
.draft-note svg { width: 20px; height: 20px; flex: none; color: #c0392b; margin-top: 1px; }
.md-fix { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 38px; border-radius: 12px;
  border: 1px solid color-mix(in oklab, var(--green) 35%, var(--line)); color: var(--green); font-weight: 700; font-size: 13.5px; }
.md-fix svg { width: 16px; height: 16px; }
.rv-files { margin-top: 12px; }

/* ——— «Sale недели»: тёмная карточка, лаймовый акцент, живой отсчёт ——— */
.sale {
  position: relative; overflow: hidden; border-radius: 26px; padding: 18px 18px 16px; color: #f4f6f3;
  background: radial-gradient(120% 90% at 100% 0%, #1f3b2f 0%, #0b1411 55%, #060a08 100%);
  box-shadow: 0 22px 44px -22px rgba(3, 40, 28, .9), inset 0 1px 0 rgba(255,255,255,.08);
}
.sale-glow { position: absolute; right: -60px; top: -70px; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(198,228,79,.35), rgba(198,228,79,0) 70%); pointer-events: none; }
.sale-art { position: absolute; right: -14px; top: 74px; width: 86px; opacity: .95; transform: rotate(12deg); pointer-events: none; }
.sale-top { position: relative; display: flex; align-items: center; justify-content: space-between; }
.sale-tag { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; background: var(--lime); color: var(--ink);
  font-size: 11.5px; font-weight: 800; letter-spacing: .12em; }
.sale-tag svg { width: 13px; height: 13px; }
.sale-pct { font-size: 34px; font-weight: 900; letter-spacing: -.04em; color: var(--lime); line-height: 1; }
.sale h3 { position: relative; margin: 12px 0 2px; font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.sale-sub { position: relative; margin: 0; max-width: 72%; font-size: 13px; color: #aab5b0; line-height: 1.4; }
.sale-prices { position: relative; display: flex; align-items: baseline; gap: 10px; margin-top: 10px; }
.sale-prices s { font-size: 16px; color: #7f8a85; text-decoration-thickness: 2px; }
.sale-prices b { font-size: 38px; font-weight: 900; letter-spacing: -.04em; line-height: 1; }
.sale-cd { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 14px; }
.cd-cell { display: grid; place-items: center; padding: 8px 0 6px; border-radius: 14px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); }
.cd-cell b { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.cd-cell i { font-style: normal; font-size: 10.5px; color: #9aa6a1; text-transform: uppercase; letter-spacing: .08em; }
.sale-until { position: relative; margin: 8px 0 0; font-size: 11.5px; color: #8d9994; }
.sale-go { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 50px; margin-top: 12px;
  border-radius: 999px; background: var(--lime); color: var(--ink); font-weight: 800; font-size: 15px; }
.sale-go svg { width: 18px; height: 18px; }

/* Тариф по акции */
.plan-sale { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; margin-bottom: 4px; padding: 4px 9px; border-radius: 999px;
  background: var(--lime); color: var(--ink); font-size: 11px; font-weight: 800; letter-spacing: .02em; }
.plan-sale svg { width: 12px; height: 12px; }
.plan-price .pp { display: inline-flex; align-items: baseline; gap: 8px; }
.plan-price s, .pay-price s { font-size: .72em; font-weight: 600; opacity: .55; margin-right: 6px; }

/* ——— Основатели и команда ——— */
.founders { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 22px; min-width: 0; }
.fd-card, .fd-team, .fd-tags span { min-width: 0; overflow-wrap: anywhere; }
.fd-title { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.fd-lead { margin: -6px 0 2px; font-size: 13.5px; color: var(--muted); }
.fd-card, .fd-team { border-radius: var(--r-md); background: var(--card); border: 1px solid var(--line); padding: 16px; }
.fd-head { display: flex; align-items: center; gap: 12px; }
.fd-photo { position: relative; flex: none; width: 80px; height: 80px; box-shadow: 0 8px 20px -10px rgba(3,60,44,.6); border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(145deg, #0f8f67, #066447); color: #fff; font-weight: 800; font-size: 20px; letter-spacing: .02em; }
.fd-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fd-name { display: grid; gap: 2px; min-width: 0; }
.fd-name b { font-size: 17px; }
.fd-name span { font-size: 12.5px; color: var(--green); font-weight: 700; }
.fd-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.fd-tags span { padding: 5px 10px; border-radius: 999px; background: rgba(3,131,97,.09); color: var(--green); font-size: 12px; font-weight: 700; }
.fd-bio { margin: 10px 0 0; font-size: 14px; line-height: 1.55; color: var(--text); }
.fd-team { position: relative; overflow: hidden; background: linear-gradient(155deg, #1a2420, #070b09); color: #eef2ef; border: 0; }
.fd-team img { position: absolute; right: -10px; top: -6px; width: 92px; opacity: .9; }
.fd-team h3 { margin: 0 0 8px; font-size: 18px; font-weight: 800; }
.fd-team p { position: relative; margin: 0 0 8px; font-size: 13.5px; line-height: 1.55; color: #c3ccc8; max-width: 92%; }
.fd-team p:last-child { margin-bottom: 0; }
.sale-slot { min-width: 0; margin: 14px 0 4px; }


/* ——— Окно «Документы по делу»: какое дело открыто + новое дело ——— */
.os-case { display: grid; gap: 2px; margin: 0 0 14px; padding: 12px 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); min-width: 0; }
.os-cap { font-size: 12px; color: var(--muted); }
.os-case b { font-size: 15.5px; overflow-wrap: anywhere; }
.os-new { justify-self: start; display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 8px 12px; border-radius: 999px;
  background: var(--lime); color: var(--ink); font-weight: 700; font-size: 13.5px; }
.os-new svg { width: 16px; height: 16px; }

/* ——— Трекер дела: шаги «заявление → жалоба → суд» ——— */
.case-track { display: grid; gap: 8px; padding: 10px 12px; border-radius: 14px; background: rgba(3, 131, 97, .05); }
.tr-h { font-size: 13px; color: var(--muted); font-weight: 700; }
.tr-steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.tr-steps li { flex: 1; min-width: 0; display: grid; gap: 4px; font-size: 11px; line-height: 1.2; color: var(--muted); }
.tr-steps li i { height: 4px; border-radius: 4px; background: rgba(14, 21, 18, .1); }
.tr-steps li.done i { background: var(--green); }
.tr-steps li.cur i { background: linear-gradient(90deg, var(--green) 50%, rgba(14, 21, 18, .1) 50%); }
.tr-steps li.cur span { color: var(--text); font-weight: 600; }
.tr-st { margin: 0; font-size: 13.5px; line-height: 1.4; color: var(--text); }
.tr-st small { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.tr-st.ok { color: var(--green); font-weight: 700; }
.tr-st .late { color: #b4231a; }
.tr-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tr-btn { height: 36px; padding: 0 14px; border: 0; border-radius: 12px; background: var(--green); color: #fff; font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.tr-btn.ghost { background: var(--card); color: var(--green); border: 1px solid color-mix(in oklab, var(--green) 35%, var(--line)); }
.tr-btn:disabled { opacity: .5; }
.tr-link { border: 0; background: none; padding: 0; font: inherit; font-size: 12.5px; color: var(--muted); text-decoration: underline; cursor: pointer; }
.tr-date { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.tr-date input { height: 34px; border: 1px solid var(--line); border-radius: 10px; padding: 0 8px; font: inherit; font-size: 13px; background: var(--card); color: var(--text); }

/* Согласия перед первым разбором */
.consent { display: flex; gap: 10px; align-items: flex-start; padding: 12px; margin: 0 0 10px; border-radius: 14px; background: var(--card, #fff); border: 1px solid var(--line, rgba(0,0,0,.08)); font-size: 14px; line-height: 1.45; }
.consent input { width: 20px; height: 20px; flex: none; margin: 1px 0 0; accent-color: #038361; }
.consent a { color: #038361; text-decoration: underline; cursor: pointer; }
.consent b { color: #038361; font-weight: 700; }
