/* SolvAI — общая дизайн-система: токены, типографика, шапка, кнопки, чат, CRM-карточка, форма, виджет */

@font-face {
  font-family: "Geologica";
  src: url("./fonts/Geologica-cyrillic.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Geologica";
  src: url("./fonts/Geologica-latin.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #f1f3ee;
  --surface: #ffffff;
  --ink: #0c1811;
  --ink-2: #44524a;
  --ink-3: #5f6c63;
  --line: #dce2da;
  --bar: #c5cec6;
  --signal: #25e07c;
  --signal-press: #14cc6a;
  --leaf: #0a6b3d;
  --mint: #dcf6e5;
  --mint-2: #eefaf2;
  --cost: #bb3d0a;
  --cost-bright: #ff6a3d;
  --cost-tint: #ffe9df;
  --cost-ink: #5a2412;
  --mint-ink: #1d4a33;
  --ink-hover: #1a2e22;

  --font: "Geologica", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --r-s: 12px;
  --r-m: 20px;
  --r-l: 28px;
  --r-xl: 40px;
  --shadow-s: 0 1px 2px rgba(12, 24, 17, .05), 0 4px 14px rgba(12, 24, 17, .05);
  --shadow-m: 0 2px 6px rgba(12, 24, 17, .05), 0 18px 44px rgba(12, 24, 17, .09);
  --shadow-l: 0 4px 10px rgba(12, 24, 17, .05), 0 34px 80px rgba(12, 24, 17, .14);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --gutter: clamp(20px, 4vw, 40px);
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 28px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  font-weight: 350;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
strong, b { font-weight: 600; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--signal); color: var(--ink); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: 16px; transform: translateY(-300%); z-index: 200; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; }
.skip-link:focus { transform: none; }

/* ---------- Типографика ---------- */
h1, h2, h3, h4 { font-weight: 600; letter-spacing: -.03em; text-wrap: balance; }
h1 { font-size: clamp(2.25rem, 1.1rem + 3.3vw, 3.625rem); line-height: 1.04; letter-spacing: -.04em; font-weight: 650; }
h2 { font-size: clamp(1.875rem, 1.2rem + 2.4vw, 3rem); line-height: 1.08; letter-spacing: -.035em; }
h3 { font-size: clamp(1.25rem, 1.1rem + .6vw, 1.5rem); line-height: 1.2; letter-spacing: -.02em; }
h4 { font-size: 1.0625rem; line-height: 1.3; letter-spacing: -.01em; }
p { text-wrap: pretty; }
.lead { font-size: clamp(1.125rem, 1rem + .5vw, 1.375rem); line-height: 1.45; color: var(--ink-2); font-weight: 350; max-width: 34em; }
.small { font-size: .875rem; line-height: 1.5; color: var(--ink-3); }
.num { font-variant-numeric: tabular-nums; }
.link { color: var(--leaf); font-weight: 500; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; text-decoration-color: color-mix(in srgb, var(--leaf) 35%, transparent); transition: text-decoration-color .2s; }
.link:hover { text-decoration-color: var(--leaf); }
.arrow-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 550; color: var(--ink); }
.arrow-link .icon { transition: transform .25s var(--ease); }
.arrow-link:hover .icon { transform: translateX(4px); }

/* ---------- Раскладка ---------- */
.wrap { width: min(1280px, 100% - var(--gutter) * 2); margin-inline: auto; }
.section { padding-block: clamp(72px, 9vw, 140px); }
.section-tight { padding-block: clamp(48px, 6vw, 88px); }
.sec-head { display: grid; gap: 20px; margin-bottom: clamp(36px, 5vw, 64px); max-width: 880px; }
.sec-head.center { text-align: center; margin-inline: auto; justify-items: center; }
.sheet { background: var(--surface); border-radius: var(--r-xl); padding: clamp(24px, 4.5vw, 64px); }
.tag { display: inline-flex; align-items: center; gap: 8px; width: fit-content; padding: 6px 12px; border-radius: 999px; background: var(--mint); color: var(--leaf); font-size: .8125rem; font-weight: 500; line-height: 1.3; }
.tag-plain { background: var(--surface); color: var(--ink-2); border: 1px solid var(--line); }
.tag-cost { background: var(--cost-tint); color: var(--cost); }
.dot-live { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--signal); flex: none; }
.dot-live::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--signal); animation: live 2.2s var(--ease) infinite; }
@keyframes live { from { transform: scale(1); opacity: .9; } 70%, to { transform: scale(2.6); opacity: 0; } }

/* Одноколоночные сетки не должны растягиваться по содержимому (длинные слова, таблицы, nowrap) */
.hero-copy, .page-hero-copy, .frow-text, .case, .case-col, .retr-side, .loop-copy, .lead-copy, .calc-inputs, .calc-out, .tour-text, .proof-side, .sec-head { grid-template-columns: minmax(0, 1fr); }

/* ---------- Кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 58px; padding: 0 30px; border-radius: 999px; font-weight: 550; font-size: 1.0625rem; line-height: 1.1; letter-spacing: -.01em; white-space: nowrap; transition: transform .2s var(--ease), background-color .2s, box-shadow .2s, border-color .2s; }
.btn .icon { transition: transform .25s var(--ease); }
.btn:hover .icon { transform: translateX(4px); }
.btn:active { transform: scale(.98); }
.btn-signal { background: var(--signal); color: var(--ink); box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 10px 24px -10px rgba(12, 24, 17, .45); }
.btn-signal:hover { background: var(--signal-press); box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 16px 30px -12px rgba(12, 24, 17, .55); transform: translateY(-1px); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--ink-hover); }
.btn-line { border: 1.5px solid color-mix(in srgb, var(--ink) 22%, transparent); color: var(--ink); background: transparent; }
.btn-line:hover { border-color: var(--ink); background: var(--surface); }
.btn-sm { min-height: 46px; padding: 0 22px; font-size: .9375rem; }
.btn[disabled] { opacity: .6; cursor: default; }
@media (max-width: 480px) { .btn { white-space: normal; text-align: center; padding: 14px 24px; } }

/* ---------- Шапка ---------- */
.site-header { position: sticky; top: 0; z-index: 80; padding-top: 12px; pointer-events: none; }
.header-bar { pointer-events: auto; display: flex; align-items: center; gap: 28px; height: var(--header-h); padding: 0 12px 0 22px; background: color-mix(in srgb, var(--surface) 86%, transparent); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); border-radius: 28px; box-shadow: var(--shadow-s); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; font-size: 1.3125rem; letter-spacing: -.04em; line-height: 1; }
.brand svg { width: 32px; height: 32px; }
.brand em { font-style: normal; color: var(--leaf); }
.site-nav { display: flex; align-items: center; gap: 4px; margin-right: auto; }
.site-nav a { padding: 10px 14px; border-radius: 12px; font-size: .9375rem; font-weight: 450; color: var(--ink-2); transition: background-color .2s, color .2s; }
.site-nav a:hover { color: var(--ink); background: var(--paper); }
.site-nav a[aria-current="page"] { color: var(--ink); background: var(--paper); font-weight: 550; }
.site-nav .nav-cta { display: none; }
.menu-toggle { display: none; width: 46px; height: 46px; border-radius: 12px; background: var(--paper); justify-items: center; align-content: center; gap: 5px; }
.menu-toggle span { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 4px; transition: transform .25s var(--ease), opacity .2s; }
.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

@media (max-width: 940px) {
  .header-bar { gap: 10px; padding-left: 18px; position: relative; }
  .header-cta { margin-left: auto; }
  .menu-toggle { display: grid; }
  .site-nav { position: absolute; left: 0; right: 0; top: calc(100% + 8px); flex-direction: column; align-items: stretch; gap: 2px; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-m); }
  .js .site-nav { display: none; }
  .js .site-nav.is-open { display: flex; }
  .site-nav a { padding: 14px 16px; font-size: 1.0625rem; color: var(--ink); }
}
@media (max-width: 520px) {
  .header-cta { display: none; }
  .menu-toggle { margin-left: auto; }
  .site-nav .nav-cta { display: flex; justify-content: center; margin-top: 6px; background: var(--signal); color: var(--ink); font-weight: 550; border-radius: 12px; }
  .site-nav .nav-cta:hover { background: var(--signal-press); }
}
/* без JS мобильное меню просто раскрыто под шапкой */
@media (max-width: 940px) { html:not(.js) .site-header { position: relative; } html:not(.js) .site-nav { position: static; box-shadow: none; border: 0; padding: 0; flex-direction: row; flex-wrap: wrap; background: none; } html:not(.js) .header-bar { height: auto; flex-wrap: wrap; padding-block: 12px; } html:not(.js) .menu-toggle { display: none; } }

/* ---------- Чат ---------- */
.chat { display: flex; flex-direction: column; background: var(--surface); border-radius: 28px; overflow: hidden; border: 1px solid var(--line); }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.chat-avatar { width: 38px; height: 38px; border-radius: 12px; background: var(--ink); display: grid; place-items: center; flex: none; }
.chat-avatar svg { width: 22px; height: 22px; }
.chat-head b { display: block; font-size: .9375rem; font-weight: 600; line-height: 1.2; letter-spacing: -.01em; }
.chat-head small { display: flex; align-items: center; gap: 6px; font-size: .75rem; color: var(--ink-3); line-height: 1.3; }
.chat-head small::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--signal); }
.chat-head .chat-badge { margin-left: auto; font-size: .6875rem; font-weight: 500; padding: 4px 9px; border-radius: 999px; background: var(--paper); color: var(--ink-2); white-space: nowrap; }
.chat-log { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 16px; overflow-y: auto; overscroll-behavior: contain; min-height: 0; }
.msg { max-width: 86%; padding: 10px 14px; border-radius: 20px; font-size: .9375rem; line-height: 1.4; overflow-wrap: anywhere; }
.msg-ai { align-self: flex-start; background: var(--paper); border-bottom-left-radius: 6px; }
.msg-user { align-self: flex-end; background: var(--signal); color: var(--ink); border-bottom-right-radius: 6px; font-weight: 400; }
.msg-note { align-self: center; max-width: 100%; background: none; padding: 2px 8px; font-size: .75rem; color: var(--ink-3); text-align: center; }
.msg-kb { display: flex; align-items: center; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed color-mix(in srgb, var(--ink) 16%, transparent); font-size: .75rem; color: var(--leaf); font-weight: 500; }
.msg-kb .icon { width: 14px; height: 14px; }
.msg.is-new { animation: msg-in .38s var(--ease) both; }
@keyframes msg-in { from { opacity: 0; transform: translateY(10px) scale(.97); } }
.typing { display: inline-flex; gap: 4px; align-items: center; height: 1.4em; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); animation: typing 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 60%, 100% { transform: none; opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }
.replies { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 14px; }
.replies:empty { display: none; }
.reply { padding: 9px 15px; border-radius: 999px; border: 1.5px solid var(--ink); background: var(--surface); font-size: .875rem; font-weight: 500; line-height: 1.25; text-align: left; transition: background-color .2s, transform .2s var(--ease); }
.reply:hover { background: var(--signal); }
.reply:active { transform: scale(.97); }
.reply.is-picked { background: var(--signal); }
.replies.is-new .reply { animation: msg-in .35s var(--ease) both; }
.replies.is-new .reply:nth-child(2) { animation-delay: .06s; }
.replies.is-new .reply:nth-child(3) { animation-delay: .12s; }
.replies.is-new .reply:nth-child(4) { animation-delay: .18s; }
.replies.is-new .reply:nth-child(5) { animation-delay: .24s; }
.chat-input { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 16px; border-top: 1px solid var(--line); }
.chat-input input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: .9375rem; padding: 8px 0; }
.chat-input input::placeholder { color: var(--ink-3); }
.chat-input .fake-input { flex: 1; min-width: 0; font-size: .9375rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; }
.chat-input .fake-input.is-typing { color: var(--ink); }
.chat-input .fake-input.is-typing::after { content: ""; display: inline-block; width: 1.5px; height: 1.05em; margin-left: 1px; background: var(--ink); vertical-align: -2px; animation: caret .9s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.chat-send { width: 38px; height: 38px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; flex: none; transition: background-color .2s, transform .2s var(--ease); }
.chat-send .icon { width: 18px; height: 18px; }
button.chat-send:hover { background: var(--leaf); }

/* ---------- CRM-карточка ---------- */
.crm { background: var(--surface); border-radius: 20px; border: 1px solid var(--line); padding: 18px 18px 16px; }
.crm-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 14px; }
.crm-top b { font-size: .9375rem; letter-spacing: -.01em; white-space: nowrap; }
.crm-top .tag { margin-left: auto; font-size: .6875rem; padding: 4px 9px; white-space: nowrap; }
.crm-ico { width: 30px; height: 30px; border-radius: 12px; background: var(--mint); color: var(--leaf); display: grid; place-items: center; flex: none; }
.crm-ico .icon { width: 16px; height: 16px; }
.crm-rows { display: grid; gap: 0; }
.crm-row { display: grid; grid-template-columns: 88px 1fr; gap: 10px; align-items: baseline; padding: 8px 0; border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent); font-size: .8125rem; line-height: 1.35; }
.crm-row dt { color: var(--ink-3); }
.crm-row dd { font-weight: 500; color: var(--ink); min-height: 1.35em; position: relative; }
.crm-row[data-empty] dd::before { content: ""; position: absolute; left: 0; top: .3em; width: 62%; height: .7em; border-radius: 6px; background: var(--paper); }
.crm-row.is-filled dd { animation: crm-fill 1s var(--ease); border-radius: 6px; }
@keyframes crm-fill { 0% { background: var(--signal); } 100% { background: transparent; } }

/* ---------- Форма заявки ---------- */
.lead-panel { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(28px, 5vw, 72px); align-items: center; background: var(--signal); border-radius: var(--r-xl); padding: clamp(28px, 5vw, 72px); overflow: hidden; isolation: isolate; }
.lead-panel::before { content: ""; position: absolute; z-index: -1; width: 720px; height: 720px; right: -260px; top: -320px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0)); }
.lead-copy { display: grid; gap: 22px; align-content: start; }
.lead-copy h2 { font-size: clamp(2rem, 1.2rem + 3.2vw, 3.75rem); }
.lead-copy p { font-size: clamp(1.0625rem, 1rem + .35vw, 1.25rem); line-height: 1.45; color: var(--mint-ink); max-width: 30em; }
.lead-list { display: grid; gap: 12px; margin-top: 6px; }
.lead-list li { display: flex; gap: 12px; align-items: flex-start; font-weight: 450; line-height: 1.4; }
.lead-list .icon { width: 24px; height: 24px; padding: 4px; border-radius: 50%; background: var(--ink); color: var(--signal); stroke-width: 2.6; margin-top: 1px; }
.form-card { background: var(--surface); border-radius: var(--r-l); padding: clamp(22px, 3vw, 36px); box-shadow: 0 30px 70px -30px rgba(12, 24, 17, .5); }
.form-card h3 { margin-bottom: 6px; }
.form-intro { font-size: .9375rem; color: var(--ink-2); margin-bottom: 20px; }
.field { display: grid; gap: 7px; margin-bottom: 16px; }
.field label { font-size: .875rem; font-weight: 500; }
.field label span { color: var(--ink-3); font-weight: 350; }
.field input { width: 100%; height: 56px; padding: 0 18px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--paper); font-size: 1.0625rem; transition: border-color .2s, background-color .2s, box-shadow .2s; }
.field input::placeholder { color: var(--ink-3); }
.field input:hover { border-color: var(--bar); }
.field input:focus { outline: 4px solid var(--mint); outline-offset: 0; border-color: var(--ink); background: var(--surface); }
.field input[aria-invalid="true"] { border-color: var(--cost); background: var(--cost-tint); }
.field-error { font-size: .8125rem; color: var(--cost); min-height: 0; line-height: 1.35; }
.field-error:empty { display: none; }
.form-submit { width: 100%; margin-top: 4px; }
.form-status { margin-top: 14px; font-size: .9375rem; line-height: 1.4; font-weight: 500; }
.form-status:empty { display: none; }
.form-status[data-state="error"] { color: var(--cost); }
.form-status[data-state="success"] { color: var(--leaf); }
.form-status[data-state="preview"] { color: var(--ink); background: var(--mint); padding: 12px 14px; border-radius: 12px; }
.form-disclosure { margin-top: 12px; font-size: .8125rem; line-height: 1.45; color: var(--ink-3); }
.noscript-note { margin-top: 12px; font-size: .875rem; color: var(--cost); }
@media (max-width: 900px) { .lead-panel { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Подвал ---------- */
.site-footer { padding: clamp(40px, 6vw, 72px) 0 calc(clamp(28px, 4vw, 48px) + 76px); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, .7fr)); gap: 32px; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.footer-about { display: grid; gap: 14px; align-content: start; max-width: 28em; }
.footer-about p { color: var(--ink-2); font-size: .9375rem; }
.footer-col { display: grid; gap: 10px; align-content: start; }
.footer-col b { font-size: .875rem; font-weight: 500; color: var(--ink-3); margin-bottom: 4px; }
.footer-col a { font-size: .9375rem; color: var(--ink); width: fit-content; }
.footer-col a:hover { color: var(--leaf); }
.footer-note { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; padding-top: 24px; font-size: .8125rem; color: var(--ink-3); line-height: 1.5; }
.footer-note p { max-width: 62em; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }

/* ---------- Виджет-демо на странице ---------- */
.widget { position: fixed; right: clamp(12px, 2.4vw, 28px); bottom: clamp(12px, 2.4vw, 28px); z-index: 90; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; pointer-events: none; }
.widget > * { pointer-events: auto; }
.widget-launch { display: inline-flex; align-items: center; gap: 12px; height: 60px; padding: 0 22px 0 10px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 550; font-size: 1rem; letter-spacing: -.01em; box-shadow: var(--shadow-l); transition: transform .25s var(--ease), background-color .2s; }
.widget-launch:hover { transform: translateY(-2px); background: var(--ink-hover); }
.widget-launch .orb { width: 42px; height: 42px; border-radius: 50%; background: var(--signal); display: grid; place-items: center; position: relative; flex: none; }
.widget-launch .orb svg { width: 24px; height: 24px; }
.widget-launch .orb::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--signal); animation: live-orb 2.6s var(--ease) infinite; }
@keyframes live-orb { from { transform: scale(1); opacity: .8; } 70%, to { transform: scale(1.5); opacity: 0; } }
.widget.is-open .widget-launch .orb::after { animation: none; }
.widget-teaser { position: relative; max-width: 290px; padding: 14px 40px 14px 16px; border-radius: 20px 20px 6px 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-m); font-size: .9375rem; line-height: 1.4; animation: msg-in .5s var(--ease) both; }
.widget-teaser b { display: block; margin-bottom: 2px; }
.widget-teaser-open { display: block; width: 100%; text-align: left; line-height: 1.4; }
.widget-teaser-close { position: absolute; right: 8px; top: 8px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-3); }
.widget-teaser-close:hover { background: var(--paper); color: var(--ink); }
.widget-teaser-close .icon { width: 14px; height: 14px; }
.widget-panel { width: min(392px, calc(100vw - 24px)); height: min(600px, calc(100dvh - 120px)); box-shadow: var(--shadow-l); border-radius: 28px; transform-origin: bottom right; animation: panel-in .35s var(--ease) both; }
@keyframes panel-in { from { opacity: 0; transform: translateY(16px) scale(.94); } }
.widget-panel .chat-head { background: var(--ink); color: #fff; border-bottom: 0; padding: 16px; }
.widget-panel .chat-head small { color: #b9c9bf; }
.widget-panel .chat-avatar { background: var(--signal); }
.widget-close { margin-left: auto; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.widget-close:hover { background: rgba(255, 255, 255, .14); }
.widget-close .icon { width: 18px; height: 18px; }
.widget-demo-note { padding: 8px 16px; background: var(--mint); color: var(--leaf); font-size: .75rem; font-weight: 500; text-align: center; line-height: 1.35; }
.widget [hidden] { display: none !important; }
@media (max-width: 520px) { .widget-launch span.label { display: none; } .widget-launch { padding: 0 9px; } }

/* ---------- Лайтбокс ---------- */
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1280px, 100vw - 24px); width: 100%; max-height: calc(100dvh - 24px); overflow: visible; }
.lightbox::backdrop { background: rgba(12, 24, 17, .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lightbox-body { background: var(--surface); border-radius: 28px; overflow: hidden; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; max-height: calc(100dvh - 24px); }
.lightbox-bar { display: flex; align-items: center; gap: 8px; padding: 12px 12px 12px 20px; border-bottom: 1px solid var(--line); }
.lightbox-bar b { margin-right: auto; font-size: .9375rem; }
.lightbox-tabs { display: flex; gap: 6px; flex-wrap: wrap; padding: 12px 20px; border-top: 1px solid var(--line); }
.lightbox-tabs button { padding: 8px 14px; border-radius: 999px; font-size: .8125rem; font-weight: 500; background: var(--paper); color: var(--ink-2); }
.lightbox-tabs button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.lightbox-img { overflow: auto; background: #fff; }
.lightbox-img img { width: 100%; height: auto; }
.lightbox-close { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); }
.lightbox-close:hover { background: var(--line); }

/* ---------- Появление данных (только с JS и без reduced motion) ---------- */
.js .rise { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0s); }
.js .rise.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .rise { opacity: 1; transform: none; }
}
