/* Шрифты IBM Plex (OFL) — свои копии, без Google Fonts. */
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url(/static/vendor/fonts/ibm-plex-sans-cyrillic-400-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url(/static/vendor/fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2"); 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; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url(/static/vendor/fonts/ibm-plex-sans-cyrillic-500-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url(/static/vendor/fonts/ibm-plex-sans-latin-500-normal.woff2) format("woff2"); 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; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url(/static/vendor/fonts/ibm-plex-sans-cyrillic-600-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url(/static/vendor/fonts/ibm-plex-sans-latin-600-normal.woff2) format("woff2"); 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; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(/static/vendor/fonts/ibm-plex-mono-cyrillic-400-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(/static/vendor/fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2"); 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; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url(/static/vendor/fonts/ibm-plex-mono-cyrillic-500-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url(/static/vendor/fonts/ibm-plex-mono-latin-500-normal.woff2) format("woff2"); 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 {
  --bg: #F2F3F0; --panel: #FFFFFF; --soft: #F6F7F4; --line: #D9DCD6; --line2: #C9CDC6;
  --ink: #15181C; --ink2: #3A4048; --muted: #4A5058; --accent: #1D4ED8; --accent-d: #1E3A8A;
  --ok-bg: #E3F1E8; --ok: #166534; --bad-bg: #FBE4E2; --bad: #9F1D16; --warn-bg: #FAE7C4;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --sans: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 15px; }
a { color: var(--accent); } a:hover { color: var(--accent-d); }
h1, h2 { margin: 0; letter-spacing: -0.01em; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); font-size: 13px; }
.center { text-align: center; }
.wrap { max-width: 1328px; margin: 0 auto; padding: 0 24px; }

/* шапка всегда сверху; --top-h — её высота: отступ для якорей и прилипающих колонок */
:root { --top-h: 72px; }
html { scroll-padding-top: calc(var(--top-h) + 12px); }
.top { position: sticky; top: 0; z-index: 50; background: var(--panel); border-bottom: 1px solid var(--line); }
.top-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.top-right { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 17px; }
.nav { display: flex; flex-wrap: wrap; gap: 4px; }
.nav a, .nav-off { padding: 10px 14px; border-radius: 8px; color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--ink); background: #F2F3F0; }
.nav a[aria-current] { background: #ECEEEA; color: var(--ink); font-weight: 500; }
.nav-off { opacity: .55; cursor: default; }
.langs { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 9px; font-family: var(--mono); font-size: 13px; }
.langs a, .langs span { display: inline-flex; align-items: center; min-height: 32px; padding: 0 9px; border-radius: 6px; color: var(--muted); text-decoration: none; }
.langs [aria-current] { background: var(--ink); color: #fff; }
/* футера нет (убран по макету) — нижний отступ страницы вместо него */
body > main { padding-bottom: 64px; }

/* ---------- главная (как в макете) ---------- */
.home { padding: 48px 0 0; display: flex; flex-direction: column; gap: 56px; }
.hero { display: flex; flex-wrap: wrap; gap: 40px; align-items: stretch; }
.hero-text { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; justify-content: center; }
.hero h1 { font-size: 44px; line-height: 1.12; font-weight: 600; }
.lead { margin: 0; font-size: 18px; line-height: 1.55; color: var(--ink2); }
.btn-lg { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 10px; font-weight: 500; font-size: 16px; text-decoration: none; }
.btn.btn-lg { background: var(--accent); color: #fff; }
.btn.btn-lg:hover { background: var(--accent-d); color: #fff; }
.btn-sec { background: #fff; border: 1px solid var(--line2); color: var(--ink); }
.btn-sec:hover { border-color: var(--accent); color: var(--ink); }
.is-off { color: var(--muted); cursor: default; }
.is-off:hover { border-color: var(--line2); color: var(--muted); }

.block { display: flex; flex-direction: column; gap: 16px; }
.block h2 { font-size: 22px; font-weight: 600; }
.block-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; }
.search { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.search input { min-height: 44px; width: 260px; max-width: 60vw; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line2); background: #fff; font: inherit; font-size: 15px; color: var(--ink); }
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px #BFD0F7; }

.modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.mode { display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: 14px; background: #fff; border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.mode-main { border: 2px solid var(--accent); padding: 21px; }
a.mode:hover { color: var(--ink); border-color: var(--accent); }
.mode-off { background: var(--soft); border: 1px dashed var(--line2); }
.mode-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mode-title { font-size: 18px; font-weight: 600; }
.mode-text { font-size: 15px; line-height: 1.5; color: var(--ink2); }
.mode-off .mode-text { color: var(--muted); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; color: var(--ink); text-decoration: none; }
a.card:hover { border-color: var(--accent); color: var(--ink); }
.card[hidden] { display: none; }
.card-pic { height: 140px; background: var(--soft); border-bottom: 1px solid #E4E6E1; display: flex; align-items: center; justify-content: center; }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; }
.card-title { font-weight: 600; font-size: 16px; }
.card-sub { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.card-soon .card-pic { opacity: .6; }
.card-none { align-items: center; justify-content: center; gap: 8px; padding: 24px; border: 1px dashed var(--line2); background: transparent; text-align: center; min-height: 220px; }
.card-none a { margin-top: 6px; font-size: 15px; font-weight: 500; }
.pill { display: inline-block; font-size: 12px; font-weight: 500; padding: 4px 10px; border-radius: 999px; background: #ECEEEA; color: var(--muted); vertical-align: middle; white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.beta { background: #E6ECFB; color: var(--accent-d); }

.how { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.how-step { display: flex; gap: 14px; padding: 20px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.how-step div { display: flex; flex-direction: column; gap: 6px; }
.how-step b { font-size: 16px; font-weight: 600; }
.how-step span:not(.how-n) { font-size: 14px; line-height: 1.5; color: var(--ink2); }
.how-n { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 14px; }

.part-head { padding: 24px 0 16px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; }
.part-title { display: flex; flex-direction: column; gap: 6px; }
.crumbs { font-size: 14px; color: var(--muted); }
.part-head h1 { font-size: 30px; font-weight: 600; }
.part { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.part-main { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.part-side { flex: 1 1 340px; max-width: 460px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }

.viewer { border-radius: 14px; overflow: hidden; border: 1px solid #2A3037; background: #1E2328; }
.viewer-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 10px; background: #14181C; }
.seg { display: flex; flex-wrap: wrap; gap: 4px; }
.seg button, .toggle { min-height: 40px; padding: 0 12px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: #C3C8CE; font: inherit; font-size: 14px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: #3A424C; color: #fff; }
.toggle { border-color: #3A424C; }
.toggle[aria-pressed="true"] { background: #2A3037; color: #fff; border-color: #4A5560; }
.viewport { position: relative; height: 480px; }
.viewport canvas { display: block; width: 100%; height: 100%; }
.busy { position: absolute; top: 12px; right: 12px; display: none; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; background: rgba(20, 24, 28, .85); color: #E6E9EC; font-size: 13px; }
.busy.htmx-request { display: flex; }
.spin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #7DB0FF; border-right-color: transparent; animation: s 0.8s linear infinite; }
@keyframes s { to { transform: rotate(360deg); } }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.panel h2 { font-size: 18px; font-weight: 600; }
.panel-head { display: flex; flex-direction: column; gap: 4px; }
.panel-title { font-weight: 600; }

.params fieldset { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 12px; }
.params legend { padding: 0 0 6px; font-family: var(--mono); font-size: 12px; letter-spacing: .06em; color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label, .field .lbl { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.vname { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.inp { display: flex; align-items: center; border: 1px solid var(--line2); border-radius: 9px; background: #fff; overflow: hidden; }
.inp:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px #BFD0F7; }
.inp input { flex: 1; min-width: 0; min-height: 42px; border: 0; padding: 0 12px; font-family: var(--mono); font-size: 15px; color: var(--ink); outline: none; }
.unit { padding: 0 12px; font-size: 13px; color: var(--muted); }
select { min-height: 44px; border: 1px solid var(--line2); border-radius: 9px; padding: 0 8px; background: #fff; font-family: var(--mono); font-size: 15px; color: var(--ink); }
.field select { width: 100%; max-width: 100%; min-width: 0; text-overflow: ellipsis; }
/* выбор с группами (длинные подписи: профили ремней) — обычный шрифт, не шире панели */
select[data-hints], select[data-hints] option, select[data-hints] optgroup { font-family: inherit; font-size: 14px; }
select[data-hints] optgroup { font-weight: 600; color: var(--ink2); }
select[data-hints] option { font-weight: 400; color: var(--ink); }
select[data-hints] option:disabled { color: var(--muted); }
.derived { display: flex; align-items: center; justify-content: space-between; min-height: 42px; padding: 0 12px; border-radius: 9px; background: var(--bg); font-size: 15px; color: var(--ink2); }
.hint { font-size: 12.5px; color: var(--muted); }

.report { display: flex; flex-direction: column; gap: 12px; }
.report h2 { font-size: 18px; font-weight: 600; display: flex; gap: 10px; align-items: center; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.big { font-size: 20px; font-weight: 500; }
.mass { border-collapse: collapse; font-size: 14px; }
.mass td { padding: 1px 12px 1px 0; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; }
.dot { flex: none; width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; background: #16A34A; }
.check.bad .dot { background: #DC2626; }
.check.info .dot { background: #8A9099; }
.errors { border-color: #EBB4AE; background: #FDF3F2; }
.errors h2 { color: var(--bad); }
.errors ul { margin: 0; padding-left: 20px; line-height: 1.6; }

.btn { display: flex; align-items: center; justify-content: center; min-height: 48px; border-radius: 10px; border: 0; background: var(--accent); color: #fff; text-decoration: none; font: inherit; font-size: 16px; font-weight: 500; cursor: pointer; }
.btn:hover { background: var(--accent-d); color: #fff; }
.kompas ol { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.5; color: var(--ink2); }
.dl2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.btn-file { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line2); color: var(--ink); text-decoration: none; }
.btn-file:hover { border-color: var(--accent); color: var(--ink); }
@media (max-width: 640px) { .hero h1 { font-size: 32px; } .home { padding-top: 32px; gap: 40px; } .viewport { height: 340px; } }
.kv { border-collapse: collapse; font-size: 14px; }
.kv td { padding: 4px 16px 4px 0; border-bottom: 1px solid #ECEEEA; }
.kv tr:last-child td { border-bottom: 0; }
.kv td.mono { text-align: right; white-space: nowrap; }
.info-list .kv { width: 100%; table-layout: fixed; }
.info-list .kv td:first-child { width: 42%; }
.info-list .kv td.mono { text-align: left; }
.kv td.txt { text-align: left; white-space: normal; overflow-wrap: anywhere; font-size: 13px; line-height: 1.4; }
.dl-row { display: flex; flex-wrap: wrap; gap: 10px; }
.dl-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line2); background: #fff; color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; }
.dl-btn::before { content: ""; width: 14px; height: 14px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M9 2v10M5 8l4 4 4-4M3 15h12' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M9 2v10M5 8l4 4 4-4M3 15h12' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.dl-btn:hover { border-color: var(--accent); color: var(--ink); }
.dl-main { background: var(--accent); border-color: var(--accent); color: #fff; }
.dl-main:hover { background: var(--accent-d); color: #fff; }
.head-right { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; padding: 8px 12px; border-radius: 999px; }
.status .dot { margin-top: 0; }
.status.ok { background: var(--ok-bg); color: var(--ok); }
.status.bad { background: var(--bad-bg); color: var(--bad); font-weight: 500; }
.status.bad .dot { background: #DC2626; }
.dl-off, .dl-off.dl-main { background: #F2F3F0; border-color: #E0E2DD; color: #8A9099; cursor: not-allowed; }
.dl-off:hover { border-color: #E0E2DD; color: #8A9099; background: #F2F3F0; }

/* ---------- «Новая деталь»: чат + ТЗ + 3D ---------- */
.session-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.session-link { padding: 5px 10px; border-radius: 8px; background: #fff; border: 1px solid var(--line); font-size: 12.5px; color: var(--ink2); max-width: 100%; overflow-wrap: anywhere; user-select: all; }
.chat-page { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.chat-col { flex: 1 1 380px; max-width: 520px; min-width: 0; height: calc(100vh - 170px); min-height: 560px; position: sticky; top: calc(var(--top-h) + 16px);
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.chat-head { padding: 14px 18px; border-bottom: 1px solid #E4E6E1; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.chat-head h2 { margin: 0; font-size: 16px; font-weight: 600; }
.chat-log { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; background: #FBFBFA; }
.msg { display: flex; flex-direction: column; gap: 6px; max-width: 92%; }
.msg-ai { align-self: flex-start; align-items: flex-start; }
.msg-user { align-self: flex-end; align-items: flex-end; max-width: 86%; }
.who { display: inline-flex; padding: 3px 10px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 12.5px; font-weight: 600; letter-spacing: .02em; }
.bubble { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 4px 14px 14px 14px; background: #fff; border: 1px solid var(--line); font-size: 15px; line-height: 1.5; color: var(--ink); overflow-wrap: anywhere; }
.msg-user .bubble { border-radius: 14px 14px 4px 14px; background: #E6ECFB; border-color: #D3DDF6; }
.bubble ul, .bubble ol { margin: 4px 0 0; padding-left: 20px; }
.bubble-bad { border-color: #EBB4AE; background: #FDF3F2; }
.bubble-ok { border-color: #B9DEC6; background: #F1F9F4; }
.questions { padding: 8px 10px; border-radius: 8px; background: #FDF6E9; border: 1px solid #EBCB8E; }
.pre { white-space: pre-wrap; }
.small { font-size: 13px; }
.msg-sys { align-self: center; font-size: 13px; color: var(--muted); padding: 4px 12px; border-radius: 999px; background: #ECEEEA; }
.msg-sys.bad { background: var(--bad-bg); color: var(--bad); }
.typing { flex-direction: row; align-items: center; gap: 10px; color: var(--ink2); }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: blink 1.2s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .2s; } .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .dots i { animation: none; opacity: .7; } .spin { animation: none; } }
.thumb { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 10px; background: #fff; border: 1px solid #C7D3F2; color: var(--ink); text-decoration: none; font-size: 13px; }
.thumb img { width: 120px; height: 84px; object-fit: cover; border-radius: 6px; background: var(--soft); }
.composer { border-top: 1px solid #E4E6E1; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.composer textarea { width: 100%; resize: vertical; min-height: 64px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line2); font: inherit; font-size: 15px; color: var(--ink); }
.composer textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px #BFD0F7; }
.composer-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.attach-btn { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line2); background: #fff; color: var(--ink2); font-size: 14px; cursor: pointer; }
.attach-btn:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px #BFD0F7; }
.attach-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.attach-list { font-size: 12.5px; min-height: 0; }
.attach-list:empty { display: none; }
.kbd-hint { font-size: 12px; flex: 1; text-align: right; }
.send-btn { display: inline-flex; align-items: center; justify-content: center; width: 48px; min-height: 44px; border-radius: 10px; border: 0; background: var(--accent); cursor: pointer; }
.send-btn:hover { background: var(--accent-d); }
.composer :disabled { opacity: .5; cursor: not-allowed; }

.chat-right { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.spec-panel { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.spec-head { padding: 14px 16px; border-bottom: 1px solid #E4E6E1; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.spec-head h2 { margin: 0; font-size: 16px; font-weight: 600; }
.spec-empty { margin: 0; padding: 20px 16px; }
.spec-name { padding: 12px 16px 4px; display: flex; flex-direction: column; gap: 4px; }
.table-scroll { overflow-x: auto; }
.spec-table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 560px; }
.spec-table th { text-align: left; padding: 10px 12px; font-size: 12.5px; font-weight: 500; color: var(--muted); background: var(--soft); }
.spec-table td { padding: 7px 12px; border-top: 1px solid #E4E6E1; vertical-align: middle; }
.spec-table th:first-child, .spec-table td:first-child { padding-left: 16px; }
.spec-table .row-assumed { background: #FDF6E9; }
.spec-table select { min-height: 38px; }
.inp-sm { display: inline-flex; max-width: 170px; }
.inp-sm input { min-height: 36px; width: 100px; }
.origin-text { background: #ECEEEA; color: var(--ink2); } .origin-standard { background: #E6ECFB; color: var(--accent-d); }
.origin-drawing { background: #DDF1EE; color: #115E59; } .origin-user { background: var(--ok-bg); color: var(--ok); }
.origin-assumed { background: var(--warn-bg); color: #7C3A0A; } .origin-default { background: #ECEEEA; color: var(--muted); }
.spec-questions { margin: 10px 16px 0; padding: 10px 12px; border-radius: 10px; background: #FDF6E9; border: 1px solid #EBCB8E; font-size: 14px; }
.spec-questions ol { margin: 6px 0 0; padding-left: 20px; }
.spec-foot { margin-top: 12px; padding: 14px 16px; border-top: 1px solid #E4E6E1; background: var(--soft); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.spec-foot .small { max-width: 520px; color: var(--ink2); }
.ok-form { margin: 0; }
.btn-lg:disabled { opacity: .45; cursor: not-allowed; }
.viewport-chat { height: 380px; }
.viewer-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #C3C8CE; font-size: 15px; text-align: center; padding: 24px; pointer-events: none; }
.viewer-empty[hidden] { display: none; }
.built-grid { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.built-grid .params { flex: 1 1 300px; max-width: 420px; }
.built-grid #result { flex: 999 1 380px; min-width: 0; }
@media (max-width: 900px) { .chat-col { position: static; height: 70vh; max-width: none; } }
.typing { flex-direction: column; align-items: flex-start; gap: 6px; }
.typing-line { display: inline-flex; align-items: center; gap: 10px; }
.timer { font-size: 13px; color: var(--muted); min-width: 3.5em; }
.calc { margin-left: 6px; font-size: 11.5px; padding: 2px 7px; border-radius: 999px; background: #ECEEEA; color: var(--muted); cursor: help; }

/* выбор моделей в чате: строка + окно <dialog> */
.models { border-bottom: 1px solid #E4E6E1; background: #fff; }
.models-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-height: 40px; padding: 4px 18px; font-size: 12.5px; color: var(--muted); }
.models-line b { font-weight: 500; color: var(--ink); }
.models-change { margin-left: auto; min-height: 32px; padding: 0 6px; border: 0; background: none; color: var(--accent); font: inherit; cursor: pointer; }
.models-change:hover { text-decoration: underline; }
.mp-bulb { color: #5B3A9A; display: inline-flex; vertical-align: -1px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mp { width: min(720px, calc(100vw - 32px)); height: min(900px, calc(100vh - 48px)); max-height: none; padding: 0; border: 0; overflow: hidden; overflow: clip; border-radius: 16px; box-shadow: 0 24px 64px rgba(0,0,0,.28); color: var(--ink); }
.mp[open] { display: flex; flex-direction: column; }
.mp::backdrop { background: rgba(21, 24, 28, .45); }
.mp-form { display: flex; flex-direction: column; flex: 1; min-height: 0; min-width: 0; margin: 0; }
.mp-head { flex: none; padding: 18px 20px 0; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.mp-head h2 { margin: 0 0 4px; font-size: 20px; font-weight: 600; }
.mp-x { flex: none; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid var(--line2); background: #fff; color: var(--ink2); cursor: pointer; font-size: 20px; }
.mp-tabs { flex: none; margin: 14px 20px 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mp-tab { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 72px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line2); background: #fff; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.mp-tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.mp-tab-title, .mp-tab-think { font-size: 12.5px; opacity: .8; }
.mp-tab-cur { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.mp-pane { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.mp-pane[hidden] { display: none; }
.mp-think { flex: none; margin: 12px 20px 0; padding: 12px 14px; border-radius: 12px; background: var(--soft); border: 1px solid #E4E6E1; display: flex; align-items: center; gap: 14px; }
.mp-think-ico { color: var(--ink2); display: inline-flex; }
.mp-think-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.mp-switch { flex: none; position: relative; width: 52px; height: 30px; border-radius: 999px; border: 0; padding: 0; background: #C9CDC6; cursor: pointer; }
.mp-switch[aria-checked="true"] { background: #5B3A9A; }
.mp-switch span { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: left .15s; }
.mp-switch[aria-checked="true"] span { left: 25px; }
.mp-switch:disabled { opacity: .55; cursor: not-allowed; }
.mp-switch:focus-visible, .mp-tab:focus-visible, .mp-star:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mp-count { flex: none; margin: 10px 20px 0; display: flex; justify-content: space-between; gap: 8px; }
.mp-list { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; margin-top: 8px; padding: 0 20px 12px; border-top: 1px solid #ECEEEA; display: flex; flex-direction: column; gap: 14px; }
.mp-group { display: flex; flex-direction: column; gap: 6px; }
.mp-group-head { position: sticky; top: 0; z-index: 1; padding: 10px 0 6px; background: #fff; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 12px; letter-spacing: .04em; color: var(--muted); font-family: var(--mono); }
.mp-nokey, .mp-warn { padding: 8px 12px; border-radius: 10px; background: #FDF6E9; border: 1px solid #EBCB8E; font-size: 13px; color: #7C3A0A; }
.mp-warn { flex: none; margin: 0 20px 10px; }
.mp-warn[hidden] { display: none; }
.mp-row { display: flex; align-items: center; gap: 8px; border-radius: 12px; border: 1px solid #E4E6E1; background: #fff; }
.mp-row:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: #F3F6FE; }
.mp-row.is-off { opacity: .5; }
.mp-pick { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 8px 0 8px 12px; cursor: pointer; }
.mp-row.is-off .mp-pick { cursor: not-allowed; }
.mp-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mp-radio { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line2); background: #fff; }
.mp-pick input:checked + .mp-radio { border: 6px solid var(--accent); }
.mp-pick input:focus-visible + .mp-radio { outline: 2px solid var(--accent); outline-offset: 2px; }
.mp-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.mp-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14.5px; }
.mp-id { font-size: 11.5px; color: var(--muted); overflow-wrap: anywhere; }
.mp-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: #F2F3F0; color: var(--muted); }
.tag-eye { background: #E6ECFB; color: var(--accent-d); }
.tag-think { background: #F1ECFB; color: #5B3A9A; }
.mp-star { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; margin-right: 6px; padding: 0 10px; border-radius: 9px; border: 0; background: transparent; color: #8A9099; font: inherit; font-size: 12.5px; cursor: pointer; }
.mp-star svg { fill: none; stroke: currentColor; }
.mp-star.is-def { background: #FBF3E2; color: #7C5310; }
.mp-star.is-def svg { fill: #B7791F; stroke: #B7791F; }
span.mp-star { cursor: default; }
.mp-err, .mp-ok { flex: none; margin: 0 20px 10px; padding: 8px 12px; border-radius: 10px; font-size: 13px; }
.mp-err { background: var(--bad-bg); color: var(--bad); }
.mp-ok { background: var(--ok-bg); color: var(--ok); }
.mp-foot { flex: none; padding: 14px 20px; border-top: 1px solid #E4E6E1; background: var(--soft); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.mp-btns { display: flex; gap: 10px; }
.mp-btn { min-height: 44px; padding: 0 18px; border-radius: 10px; font-size: 15px; }
.btn-sec.mp-btn { border: 1px solid var(--line2); background: #fff; cursor: pointer; font: inherit; font-weight: 500; }
.bad-text { color: var(--bad); }

/* «Параметры изменены» + «Перестроить» (страница шаблона) */
.stale-box { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.stale-box[hidden], #build-status[hidden] { display: none; }
.status.stale { background: var(--warn-bg); color: #7C3A0A; font-weight: 500; }
.status.stale .dot { background: #D97706; }
.rebuild-btn { border: 0; font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; }
.rebuild-btn::before { display: none; }
.rebuild-btn:disabled { opacity: .55; cursor: progress; }

/* поля формы шаблона перерисовываются при смене выбора */
.params-fields { display: flex; flex-direction: column; gap: 18px; }
.fields-busy { display: none; align-items: center; gap: 8px; }
.fields-busy.htmx-request { display: inline-flex; }
.params-fields:has(.fields-busy.htmx-request) fieldset { opacity: .6; transition: opacity .15s; }

/* ---------- инструкция «Как открыть в КОМПАСе» (/kompas, макет KompasHelp) ---------- */
.kh { max-width: 980px; margin: 0 auto; padding: 32px 0 0; display: flex; flex-direction: column; gap: 28px; }
.kh-head { display: flex; flex-direction: column; gap: 10px; }
.kh-head h1 { font-size: 36px; font-weight: 600; line-height: 1.15; letter-spacing: -0.015em; }
.kh-head .lead { max-width: 760px; }
.kh-tested { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; padding: 7px 12px; border-radius: 999px; background: var(--ok-bg); color: var(--ok); }
.kh-tested .dot { margin-top: 0; }
.kh code { font-family: var(--mono); font-size: 14px; background: var(--bg); padding: 2px 6px; border-radius: 5px; }
.kh b { font-weight: 600; color: var(--ink); }
.kh-need { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.kh-card { background: var(--panel); border: 1px solid #E4E6E1; border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.kh-card b { font-size: 16px; }
.kh-card span { font-size: 14.5px; line-height: 1.5; color: var(--ink2); }
.kh-step { background: var(--panel); border: 1px solid #E4E6E1; border-radius: 16px; padding: 22px; display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 28px; align-items: center; }
.kh-text { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.kh-text h3 { margin: 0; display: flex; align-items: center; gap: 12px; font-size: 19px; font-weight: 600; }
.kh-text h2 { font-size: 20px; font-weight: 600; }
.kh-text p, .kh-text ol { margin: 0; font-size: 15.5px; line-height: 1.6; color: var(--ink2); }
.kh-text ol { padding-left: 22px; display: flex; flex-direction: column; gap: 4px; }
.kh-text .kh-note { font-size: 14.5px; line-height: 1.55; color: var(--muted); }
.kh-done { background: #16A34A; }
.kh-warn { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; background: #FAF3E3; font-size: 14px; line-height: 1.5; color: #5B3B0A; }
.kh-warn > span:first-child { flex: none; width: 18px; height: 18px; border-radius: 50%; background: #F5D99B; color: #7C3A0A; font-weight: 600; font-size: 12px; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.kh-warn b { color: inherit; }
.kh-fig { background: var(--bg); border-radius: 12px; padding: 18px; min-width: 0; }
.kh-dl { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px; }
.kh-dl .dl-btn { cursor: default; }
.kh-hl { box-shadow: 0 0 0 4px #BFD0F7; }
/* окно КОМПАСа: меню «Приложения» */
.kh-win { background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; font-size: 13px; }
.kh-menubar { display: flex; gap: 2px; padding: 6px 8px; background: #ECEEEA; border-bottom: 1px solid var(--line); color: var(--ink2); }
.kh-menubar span { padding: 3px 8px; border-radius: 4px; }
.kh-menubar .on { background: var(--accent); color: #fff; }
.kh-menuarea { position: relative; height: 150px; background: repeating-linear-gradient(0deg, #FAFAF8 0 19px, #F1F2EE 19px 20px); }
.kh-menu { position: absolute; left: 110px; top: 0; width: 200px; background: #fff; border: 1px solid var(--line2); border-radius: 0 0 8px 8px; box-shadow: 0 8px 20px rgba(21,24,28,.12); padding: 4px 0; }
.kh-menu div { padding: 7px 12px; color: var(--muted); }
.kh-menu .on { background: #E6ECFB; color: var(--accent); font-weight: 600; }
.kh-menu .ph i { display: block; height: 8px; width: 60%; margin: 4px 0; border-radius: 4px; background: #E4E6E1; }
.kh-menu hr { border: 0; border-top: 1px solid #E4E6E1; margin: 4px 0; }
/* окно «Макрос» — по скриншоту КОМПАС v25 */
.kh-dlg { background: #fff; border: 1px solid #BFC3BC; box-shadow: 0 8px 20px rgba(21,24,28,.10); font-family: "Segoe UI", var(--sans); font-size: 12.5px; }
.kh-dlg-title { display: flex; justify-content: space-between; padding: 7px 10px; background: #EAF3F5; }
.kh-dlg-body { display: grid; grid-template-columns: minmax(0, 1fr) 84px; gap: 8px; padding: 6px 8px 10px; background: #F0F0F0; }
.kh-dlg-list { background: #fff; border: 1px solid #ADADAD; }
.kh-dlg-list .row { display: grid; grid-template-columns: 44% 56%; min-height: 21px; border-bottom: 1px solid #EFEFEF; }
.kh-dlg-list .row span { padding: 3px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-right: 1px solid #EFEFEF; }
.kh-dlg-list .row.head span { padding: 6px; }
.kh-dlg-list .row.sel { background: #CCE4F7; outline: 1px solid var(--accent); outline-offset: -1px; }
.kh-dlg-btns { display: flex; flex-direction: column; gap: 4px; }
.kh-dlg-btns span { text-align: center; padding: 4px 0; border: 1px solid #ADADAD; background: #E1E1E1; }
.kh-dlg-btns span.gap { flex: 1; min-height: 34px; border: 0; background: none; }
.kh-dlg-btns span.hl { border-color: var(--accent); background: #E6ECFB; color: var(--accent); font-weight: 600; box-shadow: 0 0 0 3px #BFD0F7; }
.kh-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; font-size: 12.5px; color: var(--ink2); }
.kh-legend span { display: inline-flex; align-items: center; gap: 6px; }
.kh-legend i { font-style: normal; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; }
/* файлы результата */
.kh-path { display: block; font-size: 12.5px; color: #6B7178; padding: 0 4px 8px; }
.kh-files { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.kh-files li { display: flex; justify-content: space-between; gap: 10px; background: #fff; border: 1px solid #E4E6E1; border-radius: 9px; padding: 9px 12px; font-size: 12.5px; color: #6B7178; }
.kh-files li .mono { font-size: 13px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.kh-files li.main { border-color: var(--accent); color: var(--accent); font-weight: 500; }
/* переменные */
.kh-vars { background: var(--ink); color: #F2F3F0; border-radius: 18px; padding: 28px; display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 32px; align-items: center; }
.kh-vars h2 { font-size: 24px; line-height: 1.25; }
.kh-vars .kh-text p { color: #C9CDC6; }
.kh-vars .kh-text .kh-note { color: #A6ACB3; }
.kh-vars b { color: #fff; }
.kh-vars code { background: none; padding: 0; color: #fff; }
.kh-kicker { font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #9DB4F0; }
.kh-varpanel { background: #fff; color: var(--ink); border-radius: 6px; overflow: hidden; font-family: "Segoe UI", var(--sans); font-size: 12px; display: grid; grid-template-columns: 26px minmax(0, 1fr); }
.kh-varpanel .side { background: #50555C; display: flex; flex-direction: column; gap: 4px; padding-top: 4px; }
.kh-varpanel .side span { height: 26px; display: flex; align-items: center; justify-content: center; color: #fff; font-family: serif; font-size: 10px; }
.kh-varpanel .side span:not(.on)::before { content: ""; width: 12px; height: 10px; border: 1.4px solid #E8E8E8; border-radius: 2px; }
.kh-varpanel .side .on { background: #3A3F46; }
.kh-varpanel .side .on i { font-size: 13px; }
.kh-varpanel .main { min-width: 0; }
.kh-varpanel .title { display: flex; justify-content: space-between; padding: 4px 8px; background: #F3F3F3; border-bottom: 1px solid #DADADA; }
.kh-varpanel .tools { display: flex; gap: 10px; padding: 5px 8px; color: #B8B8B8; font-size: 13px; border-bottom: 1px solid #ECECEC; }
.kh-varpanel .tools i { font-family: serif; }
.kh-varpanel .search { padding: 4px 8px; color: #9A9A9A; border-bottom: 1px solid #ECECEC; }
.kh-varpanel .grid { display: grid; grid-template-columns: 20px 56px 86px 70px 22px minmax(0, 1fr); }
.kh-varpanel .grid > span { border-right: 1px solid #E3E3E3; border-bottom: 1px solid #E3E3E3; padding: 5px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 26px; }
.kh-varpanel .grid > span:nth-child(-n+6) { color: var(--ink2); }
.kh-varpanel .grid .body { grid-column: 1 / -1; background: #FAFAFA; border-right: 0; }
.kh-varpanel .num { text-align: right; }
.kh-varpanel .val { background: #F7F7F7; }
.kh-varpanel .ed { background: #E6ECFB; }
.kh-varpanel .ed b { display: block; border: 1.5px solid var(--accent); background: #fff; padding: 0 4px; margin: -2px -2px; font-weight: 400; color: var(--ink); }
.kh-varpanel .der { color: #6B7178; }
/* вопросы */
.kh-faq { background: var(--panel); border: 1px solid #E4E6E1; border-radius: 14px; overflow: hidden; }
.kh-faq details + details { border-top: 1px solid #E4E6E1; }
.kh-faq summary { display: flex; align-items: center; gap: 12px; padding: 16px 18px; font-size: 16px; font-weight: 500; cursor: pointer; list-style: none; }
.kh-faq summary::-webkit-details-marker { display: none; }
.kh-faq .chev { flex: none; color: var(--muted); transition: transform .15s; }
.kh-faq details[open] .chev { transform: rotate(90deg); }
.kh-faq details > div { padding: 0 18px 16px 44px; font-size: 15px; line-height: 1.6; color: var(--ink2); }
.kh-code { margin: 0; background: var(--ink); color: #D9DCD6; border-radius: 10px; padding: 16px; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; overflow-x: auto; }
.kh-code .c { color: #7C8590; } .kh-code .k { color: #9DB4F0; } .kh-code .s { color: #F2C46D; }
@media (max-width: 900px) {
  .kh-step, .kh-vars { grid-template-columns: minmax(0, 1fr); }
  .kh-head h1 { font-size: 28px; }
}

/* ---------- «О проекте» (/about) ---------- */
.about { max-width: 980px; margin: 0 auto; padding: 48px 0 0; display: flex; flex-direction: column; gap: 12px; }
.about h1 { font-size: 36px; font-weight: 600; letter-spacing: -0.015em; margin-bottom: 8px; }
.about-text { margin: 0; max-width: 720px; font-size: 18px; line-height: 1.6; color: var(--ink2); }
.about-mail { font-size: 18px; font-family: var(--mono); }
.about-copy { margin: 16px 0 0; font-size: 14px; color: var(--muted); }

/* ---------- главная, вариант Б (макет «1b. Главная — вариант Б») ---------- */
.home2 { padding: 40px 0 0; display: flex; flex-direction: column; gap: 48px; }
.h2-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.h2-text { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.h2-kicker { font-family: var(--mono); font-size: 13px; color: #6B7178; letter-spacing: .04em; text-transform: uppercase; }
.h2-hero h1 { font-size: 46px; line-height: 1.1; font-weight: 600; letter-spacing: -0.015em; }
.h2-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.h2-cta .btn { display: inline-flex; }
.h2-cta .pill { font-size: 12px; }
.h2-points { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; color: var(--ink2); }
.h2-points li { display: inline-flex; align-items: center; gap: 8px; }
.h2-points li::before { content: "✓"; flex: none; width: 16px; height: 16px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); font-size: 10px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.h2-fig { margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.h2-fig figcaption { font-size: 13px; color: var(--muted); }
.h2-win { border-radius: 12px; overflow: hidden; border: 1px solid var(--line2); background: #fff; box-shadow: 0 18px 40px rgba(21,24,28,.12); }
.h2-win-bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #ECEEEA; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--ink2); }
.h2-win-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line2); }
.h2-win-bar span { margin-left: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h2-win-view { position: relative; height: 400px; background: linear-gradient(180deg, #FFFFFF 0%, #E9ECEF 100%); }
.h2-win-view img { position: absolute; left: 2%; top: 24px; height: 350px; width: auto; }
.h2-vars { position: absolute; right: 12px; bottom: 12px; width: 250px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 22px rgba(21,24,28,.12); overflow: hidden; font-size: 12px; }
.h2-vars-head { display: flex; justify-content: space-between; padding: 6px 10px; background: #F3F3F3; border-bottom: 1px solid #E4E6E1; color: var(--ink2); }
.h2-vars-grid { display: grid; grid-template-columns: 34px 52px minmax(0, 1fr); font-family: var(--mono); font-size: 12px; }
.h2-vars-grid span { padding: 4px 8px; border-bottom: 1px solid #EFEFEF; }
.h2-vars-grid .num { text-align: right; }
.h2-vars-grid .c { font-family: var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h2-vars-grid .ed { background: #E6ECFB; }
.h2-vars-grid .ed b { display: block; border: 1.5px solid var(--accent); background: #fff; padding: 0 4px; margin: -2px 0; font-weight: 400; text-align: right; }
.h2-vars-grid .der { color: #6B7178; }
.h2-head { display: flex; align-items: baseline; gap: 12px; }
#templates h2, .h2-how > h2 { font-size: 26px; }
.h2-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.h2-card { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; color: var(--ink); text-decoration: none; }
a.h2-card:hover { border-color: var(--accent); color: var(--ink); }
.h2-card[hidden] { display: none; }
.h2-card-pic { height: 168px; padding: 14px; display: flex; align-items: center; justify-content: center; background: #fff; border-bottom: 1px solid #ECEEEA; }
.h2-card-pic img { max-width: 100%; max-height: 100%; object-fit: contain; }
.h2-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.h2-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 4px; }
.tag { font-size: 12px; padding: 3px 8px; border-radius: 999px; background: #ECEEEA; color: var(--ink2); white-space: nowrap; }
.tag.std { background: #E6ECFB; color: var(--accent-d); }
.h2-card-none { justify-content: center; gap: 10px; padding: 22px; border: 1px dashed #9DB4F0; background: #F3F6FD; }
.h2-card-none .muted { font-size: 14px; line-height: 1.5; color: var(--ink2); }
.h2-link { font-size: 15px; font-weight: 500; color: var(--accent); align-self: flex-start; }
.h2-how { border-top: 1px solid var(--line); padding-top: 32px; gap: 18px; }
.h2-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; counter-reset: none; }
.h2-step { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.h2-step.main { border-color: var(--accent); }
.h2-step + .h2-step::before { content: "→"; position: absolute; left: -14px; top: 50%; transform: translate(-50%, -50%); color: #9AA1A8; font-size: 16px; }
.h2-step h3 { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; }
.h2-step .how-n { width: 28px; height: 28px; font-size: 13px; }
.h2-step p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink2); }
.h2-step b { font-weight: 600; color: var(--ink); }
.h2-step pre { margin: 0; padding: 10px 12px; border-radius: 9px; background: var(--soft); border: 1px solid #ECEEEA; font-family: var(--mono); font-size: 12px; line-height: 1.55; color: var(--ink2); white-space: pre-wrap; }
.h2-step pre i { font-style: normal; color: #6B7178; }
.h2-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.h2-fact { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.h2-fact b { font-size: 16px; font-weight: 600; }
.h2-fact span { font-size: 14px; line-height: 1.55; color: var(--ink2); }
@media (max-width: 1100px) {
  .h2-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .h2-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .h2-step + .h2-step::before { display: none; }
}
@media (max-width: 900px) {
  .h2-hero { grid-template-columns: minmax(0, 1fr); }
  .h2-hero h1 { font-size: 34px; }
  .h2-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .h2-facts { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .h2-cards, .h2-steps { grid-template-columns: minmax(0, 1fr); }
  .h2-win-view { height: 330px; }
  .h2-win-view img { height: 280px; }
  .h2-vars { width: 210px; }
}
.about-link { font-size: 18px; font-weight: 500; }

/* ---------- обратная связь (/feedback, макет «7. Обратная связь») ---------- */
.fb { max-width: 720px; margin: 0 auto; padding: 48px 0 0; display: flex; flex-direction: column; gap: 20px; }
.fb h1 { font-size: 36px; font-weight: 600; letter-spacing: -0.015em; }
.fb-lead { margin: 0; font-size: 17px; line-height: 1.6; color: var(--ink2); }
.fb-box { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.fb-box label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 500; }
.fb-box input, .fb-box textarea { width: 100%; min-height: 46px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line2); background: #fff; font: inherit; font-size: 16px; font-weight: 400; color: var(--ink); }
.fb-box textarea { min-height: 180px; padding: 12px 14px; line-height: 1.5; resize: vertical; }
.fb-box input:focus, .fb-box textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px #BFD0F7; }
.fb-box [aria-invalid="true"] { border-color: #DC2626; }
.req { font-style: normal; color: #DC2626; margin-left: 2px; }
.fb-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fb-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.fb-foot .btn { display: inline-flex; padding: 0 26px; }
.fb-err { padding: 12px 14px; border-radius: 10px; background: var(--bad-bg); color: var(--bad); font-size: 14px; line-height: 1.5; }
.fb-sent { flex-direction: row; gap: 16px; align-items: flex-start; padding: 28px; }
.fb-ok { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); display: flex; align-items: center; justify-content: center; font-weight: 600; }
.fb-sent div { display: flex; flex-direction: column; gap: 6px; }
.fb-sent b { font-size: 18px; font-weight: 600; }
.fb-sent span { font-size: 15px; line-height: 1.55; color: var(--ink2); }
.fb-sent a { margin-top: 6px; font-size: 15px; font-weight: 500; }
