/* ТМ UI / Help center. Компонент не зависит от стилей страницы. */
.tm-help {
  --hc-accent:#2563eb; --hc-on-accent:#ffffff; --hc-accent-hover:#1d4ed8;
  --hc-accent-soft:#edf3ff; --hc-surface:#ffffff; --hc-text:#192536;
  --hc-muted:#62718a; --hc-line:#e6ebf2; --hc-hover:#f5f7fb;
  --hc-icon-bg:#f3f6fb; --hc-shadow:0 16px 56px rgba(23,43,77,.14),0 2px 8px rgba(23,43,77,.04);
  --hc-font:"Inter",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  position:fixed;right:max(24px,env(safe-area-inset-right));bottom:calc(24px + env(safe-area-inset-bottom));
  z-index:1000;font:14px/1.5 var(--hc-font);color:var(--hc-text);text-align:left;
}
.tm-help[data-product="commoffer"] {--hc-accent:#087665;--hc-accent-hover:#066354;--hc-accent-soft:#e9f5f1;}
.tm-help[data-theme="dark"] {
  --hc-accent:#93bbff;--hc-on-accent:#102447;--hc-accent-hover:#accbff;--hc-accent-soft:#22354e;
  --hc-surface:#192332;--hc-text:#f0f4fa;--hc-muted:#a6b5c9;--hc-line:#2c3b4e;
  --hc-hover:#223044;--hc-icon-bg:#233146;--hc-shadow:0 16px 56px rgba(0,0,0,.32),0 2px 8px rgba(0,0,0,.16);
}
.tm-help[data-theme="dark"][data-product="commoffer"] {--hc-accent:#64d5b9;--hc-accent-hover:#8de2cd;--hc-accent-soft:#203d39;--hc-on-accent:#102d25;}
.tm-help,.tm-help * {box-sizing:border-box;}
.tm-help .tm-help__sprite {position:absolute;width:0;height:0;overflow:hidden;pointer-events:none;}
.tm-help .tm-help__icon {display:block;width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex:none;}
.tm-help .tm-help__panel {position:absolute;right:0;bottom:76px;width:420px;max-width:calc(100vw - 32px);max-height:calc(100dvh - 128px - env(safe-area-inset-bottom));overflow:auto;overscroll-behavior:contain;border:1px solid var(--hc-line);border-radius:22px;background:var(--hc-surface);box-shadow:var(--hc-shadow);padding:0;animation:hc-appear .16s ease-out;}
.tm-help .tm-help__panel[hidden] {display:none;}
.tm-help .tm-help__header {display:flex;align-items:flex-start;justify-content:space-between;gap:4px;margin:0;padding:26px 20px 22px 26px;border-bottom:1px solid var(--hc-line);}
.tm-help .tm-help__heading {display:block;min-width:0;}
.tm-help h2 {font:600 22px/30px var(--hc-font);letter-spacing:-.75px;color:var(--hc-text);margin:0;padding:0;}
.tm-help .tm-help__close {display:grid;place-items:center;width:44px;height:44px;flex:none;margin:-10px -8px 0 0;border:0;border-radius:50%;padding:0;background:transparent;color:var(--hc-muted);cursor:pointer;}
.tm-help .tm-help__close:hover {background:var(--hc-hover);color:var(--hc-text);}
.tm-help .tm-help__close .tm-help__icon {width:18px;height:18px;}
.tm-help .tm-help__intro {font:400 14px/22px var(--hc-font);color:var(--hc-muted);margin:10px 0 0;max-width:320px;}
.tm-help .tm-help__navigation {display:grid;gap:6px;margin:0;padding:16px;}
.tm-help a.tm-help__item {display:flex;align-items:center;gap:14px;min-height:84px;padding:14px;margin:0;border:0;border-radius:12px;text-decoration:none;background:transparent;color:var(--hc-text);transition:background .12s;}
.tm-help a.tm-help__item:hover {background:var(--hc-hover);}
.tm-help .tm-help__item-icon {display:grid;place-items:center;width:44px;height:44px;flex:none;border:0;border-radius:10px;background:var(--hc-accent-soft);color:var(--hc-accent);}
.tm-help .tm-help__copy {flex:1;min-width:0;}
.tm-help .tm-help__copy strong {display:block;font:600 16px/24px var(--hc-font);color:var(--hc-text);margin:0 0 4px;}
.tm-help .tm-help__copy>span {display:block;font:400 14px/21px var(--hc-font);color:var(--hc-muted);}
.tm-help .tm-help__contacts {border-top:1px solid var(--hc-line);margin:0;padding:20px 26px 24px;background:var(--hc-hover);}
.tm-help .tm-help__contact-heading {margin-bottom:14px;}
.tm-help .tm-help__contact-heading strong {display:block;font:600 16px/24px var(--hc-font);color:var(--hc-text);}
.tm-help .tm-help__contact-heading>span {display:block;font:400 14px/21px var(--hc-font);color:var(--hc-muted);margin-top:4px;}
.tm-help .tm-help__contact-actions {display:grid;gap:8px;}
.tm-help a.tm-help__chat {display:flex;align-items:center;justify-content:center;gap:12px;min-height:68px;padding:12px 18px;border:1px solid transparent;border-radius:12px;background:var(--hc-accent);color:var(--hc-on-accent);text-decoration:none;margin:0;}
.tm-help a.tm-help__chat:hover {border-color:transparent;background:var(--hc-accent-hover);color:var(--hc-on-accent);}
.tm-help .tm-help__chat>span {flex:0 1 auto;}
.tm-help .tm-help__chat strong {display:block;font:600 16px/24px var(--hc-font);color:var(--hc-on-accent);}
.tm-help .tm-help__chat small {display:block;font:400 14px/20px var(--hc-font);color:var(--hc-on-accent);margin-top:2px;}
.tm-help a.tm-help__email {display:flex;align-items:center;gap:12px;min-height:44px;padding:10px 14px;margin:0;border-radius:10px;text-decoration:none;color:var(--hc-muted);font:500 14px/22px var(--hc-font);}
.tm-help .tm-help__email>span {flex:1;}
.tm-help .tm-help__email>.tm-help__icon {width:18px;height:18px;}
.tm-help a.tm-help__email:hover {color:var(--hc-text);background:var(--hc-hover);}
.tm-help .tm-help__launcher {display:grid;place-items:center;width:64px;height:64px;border:1px solid var(--hc-line);border-radius:50%;padding:0;margin:0;background:#fff;box-shadow:0 6px 24px rgba(23,43,77,.18);cursor:pointer;overflow:hidden;}
.tm-help .tm-help__launcher:hover {background:#fff;box-shadow:0 8px 28px rgba(23,43,77,.25);}
.tm-help .tm-help__launcher .tm-help__icon {width:25px;height:25px;stroke-width:1.7;}
.tm-help :is(a,button):focus-visible {outline:3px solid var(--hc-accent);outline-offset:3px;}
@keyframes hc-appear {from {opacity:0;transform:translateY(5px);}to {opacity:1;transform:none;}}
@media(max-width:480px) {
  .tm-help {right:16px;bottom:calc(16px + env(safe-area-inset-bottom));}
  .tm-help .tm-help__panel {width:calc(100vw - 32px);border-radius:20px;padding:0;}
  .tm-help h2 {font-size:23px;}
  .tm-help .tm-help__header {padding:24px 18px 20px 22px;}
  .tm-help .tm-help__contacts {padding:18px 22px 22px;}
  .tm-help .tm-help__copy>span {font-size:14px;}
}
@media(prefers-reduced-motion:reduce) {.tm-help .tm-help__panel {animation:none;}.tm-help .tm-help__item {transition:none;}}

/* Только демонстрационная страница — не переносить в продукт. */
.preview {margin:0;min-height:100dvh;background:#f5f7fb;color:#192536;font:14px/1.5 "Inter",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;}
.preview__bar {display:flex;align-items:center;justify-content:space-between;gap:24px;padding:22px 32px;border-bottom:1px solid #e6ebf2;background:#fff;}
.preview__brand {display:flex;align-items:center;gap:18px;}.preview__brand strong {font-size:18px;letter-spacing:-.5px;}.preview__brand>span {color:#62718a;font-size:13px;border-left:1px solid #e6ebf2;padding-left:18px;}
.preview__controls {display:flex;align-items:center;gap:16px;}.preview__select {display:flex;align-items:center;gap:8px;font-size:12px;color:#62718a;}
.preview__controls select,.preview__theme {font:500 12px/20px "Inter",ui-sans-serif,"Segoe UI",sans-serif;border:1px solid #dbe2ec;border-radius:9px;background:#fff;color:#192536;padding:9px 12px;min-height:40px;}
.preview__theme {cursor:pointer;font:500 12px/20px "Segoe UI",sans-serif;}
.preview__canvas {min-height:calc(100dvh - 85px);position:relative;overflow:hidden;}
.preview__note {position:relative;padding:90px 64px;z-index:1;max-width:520px;}.preview__eyebrow {font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:#62718a;}.preview__note h1 {font-size:44px;line-height:1.15;letter-spacing:-1.8px;margin:20px 0;}.preview__note p {font-size:15px;line-height:26px;color:#62718a;}
.preview__grid {position:absolute;inset:0;background-image:linear-gradient(#e6ebf266 1px,transparent 1px),linear-gradient(90deg,#e6ebf266 1px,transparent 1px);background-size:64px 64px;mask-image:linear-gradient(135deg,transparent,#000);}
.preview__toast {position:fixed;left:24px;bottom:24px;max-width:min(360px,calc(100vw - 48px));border:1px solid #dbe2ec;border-radius:12px;padding:16px;background:#fff;color:#192536;box-shadow:0 8px 24px #172b4d12;z-index:1100;font-size:13px;}
html[data-theme="dark"] .preview {background:#101722;color:#f0f4fa;}
html[data-theme="dark"] :is(.preview__bar,.preview__toast) {background:#192332;border-color:#2c3b4e;color:#f0f4fa;}
html[data-theme="dark"] :is(.preview__brand>span,.preview__eyebrow,.preview__note p,.preview__select) {color:#a6b5c9;border-color:#2c3b4e;}
html[data-theme="dark"] :is(.preview__controls select,.preview__theme) {background:#192332;border-color:#3b4c63;color:#f0f4fa;}
html[data-theme="dark"] .preview__grid {opacity:.2;}
@media(max-width:900px) {.preview__note {display:none;}.preview__brand>span {display:none;}}
@media(max-width:620px) {.preview__bar {padding:16px;gap:12px;}.preview__controls {gap:8px;}.preview__select>span {display:none;}.preview__note {display:none;}.preview__controls select {max-width:155px;}.preview__toast {bottom:auto;top:90px;left:16px;max-width:calc(100vw - 32px);}}

.tm-help .tm-help__launcher img {display:block;width:60px;height:60px;object-fit:contain;border-radius:50%;}
.tm-help .tm-help__item-icon .tm-help__icon {width:23px;height:23px;}
.tm-help a.tm-help__email {justify-content:center;}
.tm-help .tm-help__email>span {flex:0 1 auto;}
