/* teplotexnics.ru - design system.
   Language: an engineering drawing sheet. Warm paper, graphite ink, one heat accent (#ff8a1e) and one cold
   accent for the second medium. Real dimensions are the decoration: dimension lines, title blocks, port marks.
   No gradients-as-decoration, no glass, no blob shapes, no motion that is not tied to the product. */

@font-face { font-family: "TT Norms"; src: url("/static/fonts/TTNorms-Light.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "TT Norms"; src: url("/static/fonts/TTNorms-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "TT Norms"; src: url("/static/fonts/TTNorms-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "TT Norms"; src: url("/static/fonts/TTNorms-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/static/fonts/plexmono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Plex Mono"; src: url("/static/fonts/plexmono-lat-400.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+2190-21FF, U+2212, U+00D7; }
@font-face { font-family: "Plex Mono"; src: url("/static/fonts/plexmono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Plex Mono"; src: url("/static/fonts/plexmono-lat-500.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+2190-21FF, U+2212, U+00D7; }

:root {
  --paper: #f1efea;
  --paper-2: #e8e5de;
  --sheet: #fbfaf7;
  --ink: #16181b;
  --ink-2: #2b2e33;
  --muted: #5d6168;
  --line: rgba(22, 24, 27, .14);
  --line-strong: rgba(22, 24, 27, .55);
  --heat: #ff8a1e;
  --heat-ink: #c25300;
  --cold: #2f6fde;
  --ok: #2f7d4f;
  --night: #0f1113;
  --night-2: #1a1d21;
  --night-line: rgba(241, 239, 234, .14);
  --night-muted: #9a9ea6;

  --f-sans: "TT Norms", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --gut: 16px;
  --wrap: 1320px;
  --r: 4px;
  --r-lg: 10px;
  --header-h: 64px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}
@media (min-width: 760px) { :root { --gut: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 17px/1.55 var(--f-sans); font-feature-settings: "tnum" 0;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip;
}
img, svg, canvas, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--heat-ink); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--heat); outline-offset: 2px; }
::selection { background: var(--heat); color: var(--ink); }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 14px; }
.skip:focus { top: 8px; }

/* ---------- type ---------- */
h1, h2, h3, h4 { font-weight: 500; line-height: 1.08; letter-spacing: -.02em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.15rem, 5.6vw, 4.9rem); letter-spacing: -.03em; }
.h1-pre { display: block; margin-bottom: .4em; font-size: max(15px, .36em); font-weight: 400; letter-spacing: 0; line-height: 1.3; color: var(--ink-2); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.9rem); }
h3 { font-size: clamp(1.2rem, 1.8vw, 1.5rem); letter-spacing: -.01em; line-height: 1.2; }
p { margin: 0 0 1em; text-wrap: pretty; }
.lead { font-size: clamp(1.08rem, 1.5vw, 1.3rem); line-height: 1.5; color: var(--ink-2); max-width: 40em; }
.mono, .label { font-family: var(--f-mono); }
.label { font-size: 12px; line-height: 1.3; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.muted { color: var(--muted); }
.heat { color: var(--heat-ink); }
small, .small { font-size: 14px; }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
.sec { padding: clamp(40px, 6vw, 80px) 0; }
.sec--tight { padding: clamp(28px, 4vw, 52px) 0; }
.sec--night { background: var(--night); color: var(--paper); }
.sec--night .label, .sec--night .muted { color: var(--night-muted); }
.sec--night .lead { color: #cfd2d6; }
.sec--sheet { background: var(--sheet); }
.sec-head { display: grid; gap: 12px; margin-bottom: clamp(20px, 3vw, 32px); max-width: 52em; }
.sec-head > * { margin-block: 0; }
.sec-head { align-content: start; justify-items: start; }
@media (min-width: 760px) { .g-5-7 > .sec-head { margin-bottom: 0; } }
@media (max-width: 599px) { .sec-head h2 { font-size: 27px; } }
.sec-head .label { display: flex; gap: 10px; align-items: center; }
.sec-head .label::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.grid { display: grid; gap: var(--gut); }
@media (min-width: 760px) {
  .g2 { grid-template-columns: repeat(2, 1fr); }
  .g3 { grid-template-columns: repeat(3, 1fr); }
  .g4 { grid-template-columns: repeat(4, 1fr); }
  .g-7-5 { grid-template-columns: 7fr 5fr; }
  .g-5-7 { grid-template-columns: 5fr 7fr; }
}
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* ---------- buttons ---------- */
.btn {
  --b: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 20px; border: 1px solid var(--b); border-radius: var(--r);
  background: transparent; color: var(--ink); font-weight: 500; font-size: 16px; line-height: 1.1;
  text-decoration: none; cursor: pointer; transition: background .2s var(--ease), color .2s var(--ease), border-color .2s;
  -webkit-tap-highlight-color: transparent; white-space: nowrap;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn--heat { background: var(--heat); border-color: var(--heat); color: var(--ink); }
.btn--heat:hover { background: #ff9d45; border-color: #ff9d45; color: var(--ink); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: var(--ink-2); color: var(--paper); }
.btn--ghost-night { --b: var(--night-line); color: var(--paper); }
.btn--ghost-night:hover { background: var(--paper); color: var(--ink); }
.btn--sm { min-height: 38px; padding: 8px 14px; font-size: 14px; }
.btn--block { width: 100%; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btns { display: flex; flex-wrap: wrap; gap: 10px; }
.link-arrow { display: inline-flex; gap: 8px; align-items: center; font-weight: 500; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }

/* ---------- header ---------- */
.hdr {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: color-mix(in srgb, var(--paper) 92%, transparent); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
}
.hdr .wrap { height: 100%; display: flex; align-items: center; gap: 18px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.logo img { height: 30px; width: auto; }
.nav { display: none; gap: 4px; margin-left: 12px; }
.nav a { padding: 8px 12px; border-radius: var(--r); text-decoration: none; font-size: 15px; color: var(--ink-2); }
.nav a:hover, .nav a[aria-current="page"] { background: var(--paper-2); color: var(--ink); }
.hdr-r { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.hdr-phone { display: none; text-decoration: none; text-align: right; line-height: 1.15; }
.hdr-phone b { display: block; font-weight: 500; font-size: 17px; letter-spacing: -.01em; }
.hdr-phone span { font-size: 12px; color: var(--muted); }
.icon-btn {
  position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r);
  border: 1px solid var(--line); background: var(--sheet); color: var(--ink); text-decoration: none; cursor: pointer;
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn--call { background: var(--heat); border-color: var(--heat); }
.badge {
  position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: var(--ink); color: var(--paper); font: 500 12px/20px var(--f-mono); text-align: center;
}
.badge[data-n="0"] { display: none; }
.burger { display: inline-grid; }
@media (min-width: 1080px) {
  .nav { display: flex; }
  .burger { display: none; }
  .hdr-phone { display: block; }
  .icon-btn--call { display: none; }
}
.mnav { position: fixed; inset: var(--header-h) 0 0; z-index: 49; background: var(--paper); padding: 20px var(--gut) 40px; overflow: auto; display: none; }
.mnav.open { display: block; }
.mnav a { display: flex; justify-content: space-between; padding: 16px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-size: 22px; font-weight: 500; }
.mnav .mnav-contacts { margin-top: 24px; display: grid; gap: 10px; }

/* ---------- drawing-sheet primitives ---------- */
.sheet { position: relative; background: var(--sheet); border: 1px solid var(--line-strong); }
.sheet--grid {
  background-color: var(--sheet);
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 24px 24px; background-position: -1px -1px;
}
.stamp {
  display: grid; grid-template-columns: auto 1fr; font: 400 11px/1.25 var(--f-mono); letter-spacing: .03em;
  border: 1px solid var(--line-strong); background: var(--sheet); color: var(--ink-2); text-transform: uppercase;
}
.stamp > * { padding: 5px 8px; border-bottom: 1px solid var(--line); }
.stamp > :nth-child(odd) { border-right: 1px solid var(--line); color: var(--muted); }
.stamp > :nth-last-child(-n+2) { border-bottom: 0; }
.dim { position: absolute; font: 500 12px/1 var(--f-mono); color: var(--ink-2); pointer-events: none; }
.dim-svg line, .dim-svg path { stroke: var(--ink-2); stroke-width: 1; fill: none; vector-effect: non-scaling-stroke; }
.dim-svg text { font: 500 12px var(--f-mono); fill: var(--ink-2); }
.port { display: inline-grid; place-items: center; min-width: 30px; height: 22px; padding: 0 6px; border: 1px solid currentColor; font: 500 11px/1 var(--f-mono); }
.port--hot { color: var(--heat-ink); }
.port--cold { color: var(--cold); }

/* ---------- tables ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th, .tbl td { text-align: left; padding: 11px 12px 11px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font: 400 12px/1.3 var(--f-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.tbl td.num, .tbl th.num { text-align: right; padding-right: 0; padding-left: 12px; }
.tbl td.num + td:last-child:not(.num), .tbl th.num + th:last-child:not(.num) { padding-left: 20px; }
.models-tbl td { vertical-align: middle; }
.tbl tr.cur td { background: color-mix(in srgb, var(--heat) 12%, transparent); }
.tbl-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 calc(-1 * var(--gut)); padding: 0 var(--gut); }
.spec { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); margin: 0; font-size: 15px; }
.spec dt, .spec dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--line); }
.spec dt { color: var(--muted); padding-right: 16px; }
.spec dd { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

/* ---------- cards ---------- */
.card { position: relative; display: flex; flex-direction: column; background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; text-decoration: none; transition: border-color .2s; }
.card:hover { border-color: var(--line-strong); color: inherit; }
.card-img { aspect-ratio: 4 / 3; background: var(--paper-2); display: grid; place-items: center; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: contain; padding: 12px 8px 4px; transition: transform .5s var(--ease); }
.card:hover .card-img img { transform: scale(1.03); }
.card-body { padding: 16px 18px 18px; display: grid; gap: 6px; flex: 1; align-content: start; }
.card-title { font-size: 20px; font-weight: 500; letter-spacing: -.01em; }
.card-meta { font: 400 13px/1.4 var(--f-mono); color: var(--muted); }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 0 18px 18px; }
.price { font-size: 22px; font-weight: 500; letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.price small { font-size: 14px; color: var(--muted); font-weight: 400; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 99px; border: 1px solid var(--line); font: 400 12px/1.2 var(--f-mono); color: var(--ink-2); background: var(--sheet); }
.chip--ok::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; }
.field label { font-size: 14px; color: var(--muted); }
.inp {
  width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--r);
  background: var(--sheet); font-size: 16px; transition: border-color .15s, box-shadow .15s;
}
.inp:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--heat) 35%, transparent); }
textarea.inp { min-height: 96px; resize: vertical; }
.form, .form-body { display: grid; gap: 14px; }
.form .row2 { display: grid; gap: 14px; }
@media (min-width: 560px) { .form .row2 { grid-template-columns: 1fr 1fr; } }
.form-note { font-size: 13px; color: var(--muted); }
.consent { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 1.4; color: var(--muted); cursor: pointer; }
.consent input { width: 18px; height: 18px; margin: 0; flex: none; }
.consent span { min-width: 0; }
.form-ok { display: none; padding: 16px; border: 1px solid var(--ok); border-radius: var(--r); background: color-mix(in srgb, var(--ok) 8%, var(--sheet)); }
.form.sent .form-ok { display: block; }
.form.sent .form-body { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- breadcrumbs ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; padding: 18px 0 0; margin: 0; list-style: none; font: 400 13px/1.4 var(--f-mono); color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 6px; opacity: .5; }
.crumbs a { text-decoration: none; }

/* ---------- faq ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative; font-size: 19px; font-weight: 500; letter-spacing: -.01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 16px; font: 400 28px/1 var(--f-sans); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .ans { padding: 0 0 22px; max-width: 46em; color: var(--ink-2); }

/* ---------- footer ---------- */
main > .cta:last-child { background: #17191b; padding-bottom: 40px; }
.ftr {
  --ftr-title: #f5f6f7;
  --ftr-top: 32px;
  border-top: 1px solid #586069; background: #17191b; color: #bdc3c9; padding: var(--ftr-top) 0 28px; font-size: 15px;
}
.ftr > .wrap { position: relative; }
.ftr > .wrap::before {
  content: ""; position: absolute; top: calc(-1px - var(--ftr-top)); inset-inline-start: var(--gut);
  width: 48px; height: 3px; background: var(--heat);
}
.ftr a { text-decoration: none; }
.ftr a:hover { color: var(--heat); }
.ftr-grid { display: grid; gap: 32px; }
@media (min-width: 760px) { .ftr-grid { grid-template-columns: 1.4fr 1.2fr 1fr 1fr; } }
.ftr h4 { font: 500 12px/1.3 var(--f-sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ftr-title); margin-bottom: 14px; }
.ftr ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ftr-phone { font-size: 26px; font-weight: 500; color: var(--ftr-title); letter-spacing: -.01em; }
.ftr-bottom { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--night-line); display: flex; flex-wrap: wrap; gap: 12px 28px; font-size: 13px; color: var(--night-muted); }

.ftr-grid > div { min-width: 0; }
.ftr-catalog { display: flex; justify-content: space-between; align-items: center; min-height: 44px; padding: 10px 12px; border: 1px solid var(--night-line); border-radius: var(--r); color: var(--ftr-title); }
.ftr-catalog span { color: var(--heat); }
.ftr-featured { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.ftr-featured a { display: inline-flex; align-items: center; min-height: 36px; padding: 5px 10px; background: var(--night-2); border-radius: var(--r); }
.ftr-series { border-top: 1px solid var(--night-line); }
.ftr-series summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; list-style: none; cursor: pointer; min-height: 44px; padding: 10px 0; font-size: 14px; }
.ftr-series summary::-webkit-details-marker { display: none; }
.ftr-series summary::after { content: "+"; color: var(--heat); font-size: 20px; line-height: 1; }
.ftr-series[open] summary::after { content: "−"; }
.ftr .ftr-series ul { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; max-height: 200px; overflow-y: auto; overscroll-behavior: contain; padding: 4px 8px 12px 0; scrollbar-color: var(--night-muted) var(--night-2); }
.ftr-series li { min-width: 0; }
.ftr-series li a { display: flex; flex-direction: column; justify-content: center; min-height: 48px; padding: 6px 8px; border: 1px solid var(--night-line); border-radius: var(--r); font-size: 14px; }
.ftr-series li span { color: var(--night-muted); font-size: 12px; }
@media (min-width: 760px) and (max-width: 1079px) { .ftr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 759px) {
  main > .cta:last-child { padding-bottom: 28px; }
  .ftr { --ftr-top: 24px; }
  .ftr-grid { gap: 24px; }
  .ftr > .wrap::before { width: 32px; }
}

/* ---------- mobile action bar (product pages) ---------- */
.actbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 8px;
  padding: 8px var(--gut) calc(8px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--paper) 94%, transparent);
  border-top: 1px solid var(--line); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transform: translateY(110%); transition: transform .3s var(--ease);
}
.actbar.on { transform: none; }
.actbar .btn { min-height: 48px; padding: 10px 8px; font-size: 15px; }
.actbar--2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); }
body:has(dialog[open]) .actbar { visibility: hidden; }
@media (min-width: 1080px) { .actbar { display: none; } }
body.has-actbar .ftr { padding-bottom: 110px; }
@media (min-width: 1080px) { body.has-actbar .ftr { padding-bottom: 40px; } }

/* ---------- dialog ---------- */
dialog.dlg { width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid var(--line-strong); border-radius: var(--r-lg); background: var(--sheet); color: var(--ink); }
dialog.dlg::backdrop { background: rgba(15, 17, 19, .55); }
.dlg-in { padding: 24px; display: grid; gap: 16px; }
.dlg-x { position: absolute; top: 10px; right: 10px; }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .25s; }

/* Back to top stays above the measured product action bar, including safe area. */
.back-top { position: fixed; z-index: 39; left: max(var(--gut), env(safe-area-inset-left)); bottom: calc(20px + env(safe-area-inset-bottom));
  min-height: 46px; padding: 10px 16px; border: 1px solid var(--line-strong); border-radius: var(--r-lg);
  background: var(--sheet); color: var(--ink); font: 500 15px var(--f-sans); cursor: pointer; box-shadow: 0 3px 18px #0002; }
.back-top[hidden] { display: none; }
.back-top:focus-visible { outline: 3px solid var(--heat); outline-offset: 3px; }
body:has(dialog[open]) .back-top, body:has(.mnav.open) .back-top { visibility: hidden; }
@media (max-width: 1079px) {
  body.has-actbar .back-top { bottom: calc(var(--actbar-height, 76px) + 16px); }
}
@media (min-width: 1080px) and (max-width: 1250px) {
  .hdr .wrap { gap: 10px; }
  .nav { margin-left: 0; gap: 0; }
  .nav a { padding-inline: 7px; }
  .hdr-phone { display: none; }
}

/* Live chat: the floating controls share the measured action-bar clearance. */
.chat-launch { position: fixed; z-index: 39; right: max(var(--gut), env(safe-area-inset-right));
  bottom: calc(20px + env(safe-area-inset-bottom)); min-height: 46px; padding: 10px 16px;
  border: 1px solid var(--heat); border-radius: var(--r-lg); background: var(--heat); color: var(--paper);
  font: 500 15px var(--f-sans); cursor: pointer; box-shadow: 0 3px 18px #0002; }
#chat-badge { background: var(--ink); color: var(--paper); padding: 2px 6px; border-radius: 20px; }
body:has(dialog[open]) .chat-launch, body:has(.mnav.open) .chat-launch { visibility: hidden; }
/* Hide floating controls while filling forms, so they cannot cover inputs or submit buttons. */
body:has(main form:focus-within) .back-top, body:has(main form:focus-within) .chat-launch { visibility: hidden; }
.livechat { position: fixed; inset: auto max(var(--gut), env(safe-area-inset-right)) calc(20px + env(safe-area-inset-bottom)) auto;
  margin: 0; width: min(420px, calc(100vw - 24px)); height: min(740px, calc(100dvh - 40px));
  max-width: none; max-height: none; padding: 0; border: 1px solid var(--line-strong);
  border-radius: var(--r-lg); background: var(--sheet); color: var(--ink); box-shadow: 0 8px 40px #0003; }
.livechat[open] { display: flex; flex-direction: column; }
.livechat::backdrop { background: #0f111344; }
.chat-head { display: flex; align-items: flex-start; gap: 10px; padding: 16px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.chat-head img { flex: none; border-radius: 50%; }
.chat-head b { font-size: 15px; }
.chat-head p { margin: 6px 0 0; }
.chat-head .icon-btn { flex: none; margin-left: auto; }
.chat-log { flex: 1 1 120px; min-height: 80px; overflow-y: auto; padding: 16px; overscroll-behavior: contain; }
.chat-message { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: var(--paper); white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-message--visitor { margin-left: 24px; border: 1px solid var(--line); }
.chat-message--operator { margin-right: 24px; border-left: 3px solid var(--heat); }
.chat-message small, .chat-message a { display: block; }
.chat-form { display: grid; gap: 6px; padding: 12px 16px; border-top: 1px solid var(--line); overflow-y: auto; flex: 0 1 auto; max-height: 65%; }
.chat-form fieldset { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; }
.chat-form fieldset[hidden], .chat-launch[hidden] { display: none; }
.chat-form textarea { min-height: 64px; resize: vertical; }
.chat-form input[type=file] { max-width: 100%; font-size: 13px; }
.chat-form label { font-size: 13px; }
.livechat:focus-visible, .chat-launch:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.ftr { padding-bottom: 90px; }
@media (max-width: 1079px) {
  body.has-actbar .chat-launch { bottom: calc(var(--actbar-height, 76px) + 16px); }
}
@media (max-width: 600px) {
  .back-top { padding: 10px; font-size: 14px; }
  .chat-launch { padding: 10px 12px; font-size: 14px; }
  .livechat { inset: 0; width: 100%; height: var(--chat-viewport, 100dvh); border: 0; border-radius: 0;
    padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
  .chat-head { padding: 12px; }
}

.cookie-settings {
  position: fixed;
  z-index: 60;
  left: var(--gut);
  right: var(--gut);
  bottom: max(12px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  width: fit-content;
  max-width: calc(100% - 2 * var(--gut));
  margin-inline: auto;
  padding: 10px 14px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 4px 24px rgb(0 0 0 / 15%);
}
.cookie-settings[hidden] { display: none; }
.cookie-settings p { margin: 0; font-size: .875rem; }
.cookie-settings p a { text-decoration: underline; }
.cookie-settings .btns { flex-wrap: wrap; gap: 6px; }
