/* KO Quizaxe1 â€” UX v3 (koq). Light interior per /quizaxe/ design system:
   surfaces #FFF / #F8FAFC / #F2F4F5, ink #0F1720, muted #6B7280, line #DFE3EB,
   accent #005BFF (hover #0050E0) dosed; dark blurred backdrop kept.
   All rules hardened vs Elementor kit button/heading styles (.koq-overlay prefix + !important). */
.koq-root{--k-ink:#0F1720;--k-mut:#6B7280;--k-line:#DFE3EB;--k-strong:#C7CDD8;--k-soft:#F8FAFC;--k-subtle:#F2F4F5;--k-card:#FFFFFF;--k-acc:#005BFF;--k-accd:#0050E0;--k-focus:#3DA3FF;--k-sel:#EEF5FF;--k-shell-w:1160px;--k-shell-h:816px;--k-media:#FFFFFF;--ko-container:1000px;--ko-step-breath:18px;--ko-mobile-media:360px;--ko-mobile-choice-head:72px;
  font-family:Inter,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;color:var(--k-ink)}
.koq-root *,.koq-overlay *{box-sizing:border-box}


/* ---- trigger ---- */
.koq-open{display:inline-flex;align-items:center;justify-content:center;min-height:58px;padding:0 22px;font:700 16px/24px Inter,sans-serif!important;color:#fff!important;background:var(--k-acc)!important;border:1px solid var(--k-acc)!important;border-radius:16px!important;cursor:pointer;box-shadow:none;transition:background .15s}
.koq-open:hover{background:var(--k-accd)!important}
.koq-open:focus-visible{outline:3px solid var(--k-focus);outline-offset:2px}


/* ---- shell: dark blurred backdrop, LIGHT modal ---- */
.koq-overlay{position:fixed;inset:0;z-index:100000;display:flex;align-items:center;justify-content:center;padding:24px;background:rgba(11,17,24,.72);backdrop-filter:blur(6px);overscroll-behavior:none}
.koq-overlay[hidden]{display:none}
/* --koq-s5-free / --koq-s5-sq / --koq-s5-top were the v5 step-5 height arithmetic. The step-5 block
   at the end of this file sizes itself from the flex column instead and consumes none of them. */
.koq-modal{--k-pad:32px;--k-gap:12px;position:relative;display:flex;flex-direction:column;width:min(var(--k-shell-w),calc(100vw - 48px));height:min(var(--k-shell-h),calc(100dvh - 48px));min-height:min(640px,calc(100dvh - 48px));background:var(--k-soft);border:1px solid var(--k-line);border-radius:20px;overflow:hidden;color:var(--k-ink);box-shadow:0 24px 70px rgba(15,23,32,.35)}
.koq-modal.koq-noanim,.koq-modal.koq-noanim *{animation:none!important;transition:none!important}
@media(prefers-reduced-motion:reduce){
  .koq-modal{transition:none}
}


/* ---- top: step meta + progress (light) ---- */
.koq-top{flex:none;display:grid;grid-template-columns:minmax(0,1fr) 44px;grid-template-rows:auto auto;gap:8px 12px;align-items:center;padding:var(--k-gap);border-bottom:1px solid var(--k-line);background:#fff}

/* the meta/track column keeps the content inset; the close keeps an equal gap from top and right */
.koq-overlay .koq-meta,.koq-overlay .koq-track{margin-left:calc(var(--k-pad) - var(--k-gap))}
.koq-overlay .koq-meta{grid-area:1/1;display:flex;justify-content:space-between;font:600 13px/1 Inter,sans-serif!important;color:var(--k-mut)!important;margin:0}
.koq-overlay .koq-meta span:last-child{color:var(--k-ink);font-weight:700}
.koq-overlay .koq-track{grid-area:2/1;height:6px;border-radius:999px;background:var(--k-subtle);overflow:hidden}
.koq-overlay .koq-track i{display:block;height:100%;border-radius:999px;background:var(--k-acc);transition:width .25s ease}
.koq-overlay .koq-close{grid-area:1/2/3/3;justify-self:end;align-self:start;width:44px;height:44px;display:inline-flex;align-items:center;justify-content:center;padding:0!important;line-height:0;border:1px solid var(--k-line)!important;border-radius:12px!important;background:#fff!important;color:var(--k-ink)!important;cursor:pointer;transition:border-color .12s}
.koq-overlay .koq-close:hover{border-color:#9CA3AF!important}
.koq-overlay .koq-close svg{display:block}
.koq-overlay .koq-close:focus-visible{outline:3px solid var(--k-focus);outline-offset:2px}
.koq-live{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}


/* ---- body ---- */
.koq-body{flex:1;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;overflow-anchor:none;padding:20px var(--k-pad) 24px}
.koq-overlay .koq-step,.koq-overlay .koq-step--wide{width:100%;max-width:var(--ko-container)!important;margin:0 auto}
/* step enter: light compositor-only fade+lift on every question change (each step is a fresh node
   from innerHTML, so the animation fires once per navigation). Replaces the previous hard swap that
   made question transitions read as abrupt. opacity+transform only — no layout, no paint of a moving
   box model. koqin was defined but unused before v5.4.0. */
.koq-overlay .koq-step,.koq-overlay .koq-step--wide{animation:koqin .2s cubic-bezier(.22,.61,.36,1) both}
@keyframes koqin{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
/* popup open: overlay fades, dialog lifts+fades — masks the synchronous first render */
@keyframes koqoverlayin{from{opacity:0}to{opacity:1}}
@keyframes koqmodalin{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
.koq-overlay.is-opening{animation:koqoverlayin .18s ease both}
.koq-overlay.is-opening .koq-modal{animation:koqmodalin .22s cubic-bezier(.22,.61,.36,1) both}
@media(prefers-reduced-motion:reduce){
  .koq-overlay .koq-step,.koq-overlay .koq-step--wide{animation:none}
  .koq-overlay.is-opening,.koq-overlay.is-opening .koq-modal{animation:none}
  .koq-overlay .koq-track i{transition:none}
}
.koq-overlay .koq-h{font:600 22px/30px Inter,sans-serif!important;letter-spacing:-.1px;color:var(--k-ink)!important;margin:0 0 4px!important}
.koq-overlay .koq-sub{max-width:720px;font:400 14px/1.5 Inter,sans-serif!important;color:var(--k-mut)!important;margin:0 0 16px}


/* ---- shared card base (light system: white card + line border) ---- */
.koq-overlay .koq-big,.koq-overlay .koq-row,.koq-overlay .koq-prod{white-space:normal!important;min-width:0;background:var(--k-card)!important;border:1.5px solid var(--k-line)!important;color:var(--k-ink)!important;font-family:inherit!important;cursor:pointer;text-align:left;transition:border-color .12s,box-shadow .12s;position:relative}
.koq-overlay .koq-big:hover,.koq-overlay .koq-row:hover,.koq-overlay .koq-prod:hover{border-color:var(--k-strong)!important}
.koq-overlay .koq-big:focus-visible,.koq-overlay .koq-row:focus-visible,.koq-overlay .koq-prod:focus-visible{outline:3px solid var(--k-focus);outline-offset:2px}
.koq-overlay .koq-big.is-on,.koq-overlay .koq-row.is-on,.koq-overlay .koq-prod.is-sel{border-color:var(--k-acc)!important;background:var(--k-card)!important;box-shadow:0 0 0 1px var(--k-acc)}
/* Selected-state white .im/.tx background belongs ONLY to the cards that still have a below-image
   text zone: Q5 detail cards (.koq-cz) and the expanded compact branch. Overlay cards (Q1/Q3/Q4 and
   the collapsed Q5 branch) keep a transparent .tx on select — narrowed from the old broad
   `.koq-big.is-on/.koq-prod.is-sel`, which was re-painting a white plate under the overlay title. */
.koq-overlay .koq-cz.is-on>.im,
.koq-overlay .koq-step--cz:not(.is-collapsed) .koq-czbranch.is-on>.im{background:var(--k-media)!important}
.koq-overlay .koq-cz.is-on>.tx,
.koq-overlay .koq-step--cz:not(.is-collapsed) .koq-czbranch.is-on>.tx{background:var(--k-card)!important}


/* step rhythm: every step starts from the same top coordinate; free space stays below */


/* step 1 + 3 big/category cards */
.koq-grid2{display:grid;grid-template-columns:1fr 1fr;gap:18px;max-width:none;margin:0 auto}
.koq-grid4{display:grid;grid-template-columns:repeat(4,1fr);gap:13px}
.koq-overlay .koq-big{display:flex;flex-direction:column;border-radius:16px!important;overflow:hidden;padding:0!important}
.koq-overlay .im{position:relative;overflow:hidden;background:var(--k-media)}

/* Single image mechanic: contain, no manual offsets. Air-crop via object-view-box set from server data. */
.koq-overlay .im img{width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important;object-position:center;display:block;border-radius:0!important;box-shadow:none!important}
.koq-overlay .im::before{content:"";position:absolute;inset:0;background:linear-gradient(100deg,var(--k-subtle) 20%,#fff 40%,var(--k-subtle) 60%);background-size:220% 100%;opacity:0;pointer-events:none;z-index:0}
.koq-overlay .im.is-loading::before{opacity:1;animation:koqskeleton 1.35s ease-in-out infinite}
.koq-overlay .im.is-error::before{opacity:1;background:var(--k-subtle);animation:none}
.koq-overlay .im .koq-img{opacity:0;transition:opacity .16s ease;display:block;z-index:1}
.koq-overlay .im.is-ready .koq-img{opacity:1}
@keyframes koqskeleton{0%{background-position:120% 0}100%{background-position:-120% 0}}
.koq-overlay .koq-big .im{width:100%;height:clamp(300px,calc(100dvh - 435px),390px);background:var(--k-media);display:flex;align-items:center;justify-content:center;padding:10px}
.koq-overlay .koq-big .tx{padding:11px 14px 13px;background:var(--k-card);border-top:1px solid var(--k-line)}
/* Every step-5 card is also a `.koq-big`, and this !important pair used to beat the type scale the
   step-5 block declares. Detail cards were excluded in 5.2.0; branch cards are excluded now too,
   because they must switch to the detail scale the moment the pair starts transforming — an
   !important rule out here can only be all-or-nothing. Step 5 owns both of its states instead. */
.koq-overlay .koq-big:not(.koq-cz):not(.koq-czbranch) .t{font:600 16px/24px Inter,sans-serif!important;letter-spacing:-.1px}
.koq-overlay .koq-big:not(.koq-cz):not(.koq-czbranch) .s{font:400 13px/18px Inter,sans-serif!important;color:var(--k-mut)!important;margin-top:2px}
.koq-grid4 .koq-big .t{font-size:15px!important;line-height:22px!important}

/* step 3 desktop: 4x1, square image on top (chosen over 2x2 by rendered comparison) */
.koq-step--s3 .koq-grid4{grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.koq-step--s3 .koq-big{flex-direction:column;min-height:0}
.koq-step--s3 .koq-big .im{width:100%;aspect-ratio:1/1;height:auto;flex:none;padding:10px}
.koq-step--s3 .koq-big .tx{padding:11px 13px 13px}
.koq-rows{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.koq-overlay .koq-row{display:flex;align-items:center;gap:12px;border-radius:14px!important;padding:14px 16px!important}
.koq-overlay .koq-row.is-wide{grid-column:1/-1}
.koq-overlay .koq-dot{flex:none;width:21px;height:21px;border-radius:999px;border:2px solid var(--k-line);background:#fff}
.koq-overlay .koq-row.is-on .koq-dot{border-color:var(--k-acc);background:radial-gradient(circle,var(--k-acc) 0 5px,#fff 6px)}
.koq-overlay .koq-row .t{font:600 15px/1.3 Inter,sans-serif!important}
.koq-overlay .koq-row .s{font:400 13px/1.4 Inter,sans-serif!important;color:var(--k-mut)!important;margin-top:2px}

/* top two choices: compact horizontal cards (square media/icon left, text right) */

/* bottom three modifications: strict 1:1 square photo on top, text below, one row of three */
@media(min-width:1101px){
  .koq-modal.koq-m-5 .koq-body{padding-bottom:24px}
}


/* check badge */
.koq-ck{position:absolute;top:8px;right:8px;width:26px;height:26px;border-radius:999px;background:var(--k-acc);color:#fff;display:flex;align-items:center;justify-content:center;font-size:14px;opacity:0;transform:scale(.7);transition:.15s;z-index:2}
.is-on .koq-ck,.is-sel .koq-ck{opacity:1;transform:scale(1)}


/* ---- step 4: product grid ---- */
.koq-prods{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.koq-overlay .koq-prod{width:auto}
.koq-overlay .koq-prod{display:flex;flex-direction:column;border-radius:16px!important;overflow:hidden;padding:0!important}
.koq-overlay .koq-prod .im{aspect-ratio:1/1;background:var(--k-media);padding:10px}
.koq-step--s4 .koq-prod .im{height:clamp(150px,calc((100dvh - 476px)/2),206px);aspect-ratio:auto}
.koq-overlay .koq-prod .tx{padding:9px 11px 11px;background:var(--k-card);border-top:1px solid var(--k-line)}
.koq-overlay .koq-prod .t{font:600 14px/21px Inter,sans-serif!important;letter-spacing:-.05px}
.koq-overlay .koq-prod.is-off{opacity:.6;pointer-events:none}
.koq-overlay .koq-prod.is-off .t{color:var(--k-mut)!important}
.koq-overlay .koq-count{display:inline-block;margin-left:10px;font:700 13px/1 Inter,sans-serif!important;color:var(--k-ink)!important;background:var(--k-subtle);border-radius:999px;padding:5px 11px}
/* Counter sits on its own row: a small, systemic gap from the sub above (not glued to it) and a
   clearly smaller gap to the grid below, so it always reads closer to the cards than to the
   heading. Desktop and mobile tuned separately; the actual overflow that used to crowd this row
   against the first card row was a sizing bug in sizeOverlayCards() (see quizaxe.js), fixed there. */
.koq-pickmeta{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:4px 0 16px}
@media(max-width:640px){ .koq-step--s4 .koq-pickmeta{ margin-top:8px; margin-bottom:16px } }
/* Q4 counter moved OFF the grid's flow and into the heading block: it now sits to the right of the
   title+sub column, vertically centred against that block, so it reads as part of the heading rather
   than a row stolen from the grid. sizeOverlayCards() measures whatever is the grid's real previous
   sibling, so removing this as a standalone row hands its old height straight to the card formula
   below — no separate change needed there.
   §7 requires the pill's centre to fall on (titleTop+subtitleBottom)/2 within ±3px — flex
   align-items:center centres the whole .koq-pickmeta BOX (pill + reserved maxhint line below it),
   which pulled the pill itself ~9px above that target (measured live: -9.45px, well outside ±3px).
   Absolutely positioning the pill at exactly 50% of the heading block's own height is centred by
   construction — the heading's height is title+sub alone once the pill leaves flow, so no flex
   arithmetic to get subtly wrong. maxhint sits just under it; sizeOverlayCards() explicitly checks
   its real bottom edge (see quizaxe.js) so the grid still never renders under it when it appears. */
@media(min-width:641px){
  .koq-step--s4 .koq-s4head{position:relative;margin-bottom:14px}
  .koq-step--s4 .koq-s4headtext{min-width:0;padding-right:150px}
  .koq-step--s4 .koq-s4headtext .koq-h{margin-bottom:4px}
  .koq-step--s4 .koq-s4headtext .koq-sub{margin-bottom:0}
  .koq-step--s4 .koq-pickmeta{display:contents}
  .koq-step--s4 .koq-count{position:absolute;top:50%;right:0;transform:translateY(-50%);margin:0;white-space:nowrap}
  .koq-step--s4 .koq-maxhint{position:absolute;top:calc(50% + 17px);right:0;white-space:nowrap}
  /* margin-bottom above is on .koq-s4head itself (outside its own box), not padding — so it never
     changes the box's own height and therefore never shifts the 50% reference the count/maxhint are
     positioned against. It's a CONSTANT gap (present whether or not maxhint is visible), sized to clear
     maxhint's worst-case depth below the head box (measured: title+sub both single-line = 55px head
     height, maxhint bottom edge at 50%+17px+~17px line ≈ 6px past that) with margin — so the grid never
     shifts when N crosses into "full" (§7), it simply always sits this same constant distance down. */
}
.koq-overlay .koq-calm{font:400 13px/1.4 Inter,sans-serif!important;color:var(--k-mut)!important}
.koq-overlay .koq-maxhint{font:700 13px/1.3 Inter,sans-serif!important;color:#B45309!important}
/* position+z-index guard against any future overlay stacking context; the actual overlap bug was
   the grid overflowing UPWARD over this row (sizeOverlayCards() undersizing --koq-avail) — fixed at
   the source in quizaxe.js. This keeps the notice unambiguously above the grid either way. */
.koq-overlay .koq-notice{position:relative;z-index:1;font:600 13px/1.4 Inter,sans-serif!important;color:#166534!important;background:#F0FDF4;border:1px solid #BBF7D0;border-radius:10px;padding:8px 12px;margin:0 0 12px;max-width:360px}


/* inline confirm (category change) */
.koq-warn{background:#fff;border:1px solid var(--k-line);border-left:4px solid #F59E0B;border-radius:12px;padding:14px 16px;margin-bottom:14px;color:var(--k-ink);max-width:640px}
.koq-overlay .koq-warn p{margin:0 0 10px;font:600 14px/1.4 Inter,sans-serif}
.koq-overlay .koq-warn .b{display:flex;gap:10px}
.koq-overlay .koq-warn button{font:700 13px/1 Inter,sans-serif!important;border-radius:10px!important;padding:10px 14px!important;cursor:pointer;border:1px solid var(--k-line)!important;background:#fff!important;color:var(--k-ink)!important}
.koq-overlay .koq-warn button.y{background:var(--k-acc)!important;border-color:var(--k-acc)!important;color:#fff!important}


/* ---- step 6: two-column final ---- */
.koq-final{display:grid;grid-template-columns:1.2fr 1fr;gap:24px;align-items:stretch;min-width:0;max-width:100%}
.koq-final>*{min-width:0;max-width:100%}
/* Variant A (5.7.x) desktop composition: the result used to hug the top and leave ~40% of the body
   empty under a single-model result, with the right column floating detached from the footer CTA.
   The step now fills the body height and the whole two-column block is centred vertically (safe-center
   never clips when the 3-model content is tall), so short and full results both read balanced. The
   right column is a flex column whose secondary-messenger group is pushed to the bottom edge — it now
   sits directly above the footer "Продолжить в МАКС", tying the continuation block to the primary CTA
   instead of stranding it in whitespace. */
@media(min-width:641px){
  .koq-step--s6{display:flex;flex-direction:column;min-height:100%}
  .koq-step--s6 .koq-final{flex:1 1 auto;align-content:stretch}
  .koq-step--s6 .koq-final>*{display:flex;flex-direction:column;min-height:0}
  /* left column (summary): centre the models + answers as a group (safe-center never clips a tall
     3-model list; it just top-starts and scrolls when the content exceeds the height). */
  .koq-step--s6 .koq-final>*:first-child{justify-content:safe center}
  /* right column (continuation): the content is inherently thin (heading + 2 lines + 3 buttons) but has
     to match a tall left column, which left it either top-stranded or with a mid-column void. It is now
     one panel that fills the column height as an intentional surface (no raw whitespace), with its
     content vertically centred so heading, explanation and the secondary messengers read as a single
     continuation block sitting beside the footer's primary "Продолжить в МАКС".
     §10: background is white (var(--k-card)), matching the landing's own "content card" pattern
     (measured live on /quizaxe/: white fill + 1px #DFE3EB border + 16px radius is what its product
     cards, review cards and FAQ-style boxes actually use — var(--k-subtle) grey read as a disabled/
     muted block next to that reference, not a full card). Border/radius unchanged; still one nesting
     level (buttons inside the panel), no heavy/coloured fill. */
  .koq-step--s6 .koq-final>*+*{background:var(--k-card);border:1px solid var(--k-line);
    border-radius:16px;padding:22px 22px;justify-content:safe center}
  .koq-step--s6 .koq-final>*+* .koq-msgsub{max-width:none}
  .koq-step--s6 .koq-final>*+* .koq-msgs--alt{max-width:none}
}
.koq-sumgrid{display:flex;flex-direction:column;gap:8px;margin-bottom:14px}
.koq-overlay .koq-sumcard{display:flex;align-items:center;gap:14px;background:var(--k-card)!important;border:1px solid var(--k-line)!important;border-radius:14px!important;padding:8px 16px 8px 8px;color:var(--k-ink)!important}
.koq-overlay .koq-sumimg{width:112px;height:112px;flex:none;border-radius:10px;background:var(--k-media);padding:8px}
/* Two/three selected models stack vertically (one card per row): with a FIXED 112px image regardless
   of count, 3 stacked cards could outgrow the body height and force a scrollbar the spec forbids at
   1366x768/1440x900 (§14/§24) — this was already reachable before this release. The image is the one
   thing that scales with count (same idea as the desktop overlay squares elsewhere); one model still
   gets the large size the spec asks for. Desktop-only — mobile scrolls the sheet normally. */
@media(min-width:641px){
  .koq-sumgrid--2 .koq-sumimg{width:92px;height:92px}
  .koq-sumgrid--2 .koq-sumcard{padding:6px 14px 6px 6px}
  .koq-sumgrid--3 .koq-sumimg{width:64px;height:64px;padding:5px}
  .koq-sumgrid--3 .koq-sumcard{padding:4px 12px 4px 4px}
  .koq-sumgrid--3{gap:5px}
  /* §9: the single-model case used the SAME small 112px row layout as 2-3 models, leaving most of the
     left column empty (measured: 533px-tall column, ~130px used by the card). One model is the main
     scenario, so it gets its own layout — vertical card, image filling the column width — instead of
     just being "row style, but alone". Two/three keep the compact row untouched. */
  .koq-sumgrid--1 .koq-sumcard{flex-direction:column;align-items:stretch;padding:14px}
  /* --koq-sum1 is measured live by sizeResultSummary() (quizaxe.js) against the real available body
     height for THIS particular answer set (the "Ваши ответы" rows below vary a little in height with
     the actual audience/purpose/category/execution text) — a fixed guess either left height on the
     table (short answers) or overflowed the body (§14/§24 forbid a scrollbar here too). The 240px
     fallback only matters for the first paint before JS has run once. */
  .koq-sumgrid--1 .koq-sumimg{width:100%;height:auto;aspect-ratio:1/1;max-width:var(--koq-sum1, 240px);margin:0 auto;padding:14px}
  .koq-sumgrid--1 .koq-sumcard .t{margin-top:14px;text-align:center}
}
.koq-overlay .koq-sumcard .t{font:700 15px/1.35 Inter,sans-serif!important;letter-spacing:-.1px}
/* S7: цена и ссылка на карточку в сводке результата. Цена — то же число, что
   уходит мессенджеру (формат витрины: 10 050 ₽). Ссылка открывает карточку
   товара в новой вкладке; мессенджер остаётся главным действием шага. */
.koq-overlay .koq-sumprice{font:600 13.5px/1.2 Inter,sans-serif!important;color:var(--k-ink)!important;margin-top:4px}
.koq-overlay .koq-sumlink{display:inline-block;margin-top:6px;font:600 12.5px/1 Inter,sans-serif!important;color:var(--k-acc)!important;text-decoration:none;border-bottom:1px solid var(--k-acc)!important;padding-bottom:2px}
.koq-overlay .koq-sumlink:focus-visible{outline:2px solid var(--k-focus);outline-offset:2px}
.koq-sumgrid--1 .koq-sumlink{margin-top:10px}
/* S8: «В корзину» из результата — та же капсула, что у мессенджера-CTA,
   но нейтральная: не конкурирует с мессенджером за акцент. */
.koq-sumacts{display:flex;align-items:center;gap:14px;margin-top:8px;flex-wrap:wrap}
.koq-overlay .koq-addbtn{font:600 13px/1 Inter,sans-serif!important;color:var(--k-ink)!important;background:var(--k-card)!important;border:1.5px solid var(--k-line)!important;border-radius:999px!important;padding:10px 18px;cursor:pointer;transition:border-color .12s,box-shadow .12s}
.koq-overlay .koq-addbtn:hover:not(:disabled){border-color:var(--k-acc)!important;box-shadow:0 0 0 1px var(--k-acc)}
.koq-overlay .koq-addbtn:disabled{cursor:default;opacity:.75}
.koq-overlay .koq-sumacts .koq-sumlink{margin-top:0}
.koq-overlay .koq-sumlink--cart{border-bottom-color:var(--k-acc)!important}
.koq-chipwrap{border-top:1px solid var(--k-line);padding-top:14px}
.koq-chips{display:flex;flex-wrap:wrap;gap:8px}
.koq-overlay .koq-chip{font:600 12.5px/1 Inter,sans-serif!important;color:var(--k-ink)!important;background:var(--k-subtle)!important;border:1px solid var(--k-line)!important;border-radius:999px!important;padding:8px 13px}
.koq-overlay .koq-note{font:400 14px/1.55 Inter,sans-serif!important;color:var(--k-ink)!important;margin:0 0 14px}
.koq-overlay .koq-note--after{margin:14px 0 0;color:var(--k-mut)!important}
.koq-overlay .koq-note--after+.koq-note--after{margin-top:10px}

/* v1 result: labeled answer rows (replaces chips) */
.koq-sumrows{border-top:1px solid var(--k-line);padding-top:12px;margin:0 0 4px;display:flex;flex-direction:column;gap:7px}
.koq-sumrow{display:flex;gap:8px;align-items:baseline;font:400 14px/1.4 Inter,sans-serif}
.koq-overlay .koq-sumrow dt{flex:0 0 auto;min-width:86px;color:var(--k-mut)!important;font-weight:400;margin:0}
.koq-overlay .koq-sumrow dd{flex:1 1 auto;margin:0;color:var(--k-ink)!important;font-weight:600}

/* messenger explanation line */
.koq-overlay .koq-msgsub{font:400 13px/1.5 Inter,sans-serif!important;color:var(--k-mut)!important;margin:0 0 12px;max-width:380px}

/* result: compact "saved" status — a quiet confirmation, not a system toast and not an order state */
.koq-overlay .koq-statuschip{display:inline-flex;align-items:center;gap:5px;font:600 11.5px/1 Inter,sans-serif!important;
  color:#166534!important;background:#F0FDF4;border:1px solid #BBF7D0;border-radius:999px;padding:3px 9px;margin:0 0 2px}
.koq-overlay .koq-statuschip svg{width:11px;height:11px;flex:none}

/* result: three compact benefit bullets, neutral single-color icons, no photos/collage. Full column
   width (not the 380px messenger-button cap) so the longest item wraps to fewer lines — the panel
   is materially wider than that cap, and this block is what has to fit two-column height parity
   without a scrollbar at 1366x768/1440x900 (see §14/§24). Sized deliberately dense: this is a
   secondary reassurance list beside the primary CTA, not a headline feature block. */
/* §12: this list read too small for the 45-70 target audience — icon/heading/description sizes and
   the near-zero inter-item gap below are the corrected design-system values (icon ~16px, heading
   13.5-14px, description 12.5-13px, line-height 1.3-1.4, ~8px icon/text gap, 10-12px between items),
   cross-checked against the production landing. Grown text needs the panel's own height more, so
   .koq-benefitnote (already optional/droppable under height pressure below) is the first thing to
   give way — see §12's own ordering — before this list's sizes would ever be reconsidered. */
.koq-benefits{display:flex;flex-direction:column;gap:11px;margin:0}
.koq-benefit{display:flex;align-items:flex-start;gap:8px}
.koq-overlay .koq-benefiticon{width:16px;height:16px;flex:none;margin-top:1px;color:var(--k-acc)}
.koq-overlay .koq-benefit-t{font:600 14px/1.35 Inter,sans-serif!important;color:var(--k-ink)!important}
.koq-overlay .koq-benefit-s{font:400 13px/1.35 Inter,sans-serif!important;color:var(--k-mut)!important;margin-top:1px}
.koq-overlay .koq-benefitnote{font-size:10.5px!important;margin-top:4px!important}
/* the honest aside is explicitly optional ("если не перегружает блок") — drop it first under height
   pressure rather than let the panel force a scrollbar the spec forbids at these two viewports. */
@media(max-height:820px) and (min-width:641px){
  /* Dropping the sketch note alone (above) isn't enough room at 1366x768 for the full §12 sizes —
     measured 630px content against a 573px body (57px short). §12's own remedy order is padding
     first, then this note, then "use the available panel height" — none of those free 57px on their
     own, so the ideal sizes step down slightly here, still comfortably above the "never below 10-11px"
     floor for the description (kept at 11px, not the 13px ideal) and the gap between items (7px, not
     the 10-12px ideal). 1440x900 is unaffected (no scrollbar there at the full ideal sizes). */
  .koq-benefits{gap:4px}
  .koq-overlay .koq-benefit-t{font-size:13.5px!important;line-height:1.3!important}
  .koq-overlay .koq-benefit-s{font-size:11px!important;line-height:1.3!important}
  .koq-overlay .koq-althead{margin-top:6px!important;margin-bottom:4px!important}
  .koq-step--s6 .koq-final .koq-h2{margin-bottom:6px!important}
  .koq-step--s6 .koq-final .koq-msgsub{margin-bottom:2px!important}
}
@media(max-height:900px) and (min-width:641px){ .koq-overlay .koq-benefitnote{display:none} }
@media(min-width:641px){
  .koq-overlay .koq-h2{margin-bottom:4px}
  .koq-overlay .koq-msgsub{margin-bottom:4px}
  .koq-step--s6 .koq-final>*+*{padding:6px 20px}
  .koq-modal.koq-m-6 .koq-sub.koq-motiv{margin-bottom:8px}
  .koq-modal.koq-m-6 .koq-sumgrid{margin-bottom:10px}
}

/* result step: no progress percent / bar (only the heading matters) */
.koq-modal.koq-m-6 [data-koq-pct]{visibility:hidden}
.koq-modal.koq-m-6 .koq-track{visibility:hidden}
.koq-overlay .koq-h2{font:700 16px/1.3 Inter,sans-serif!important;color:var(--k-ink)!important;margin:0 0 10px}

/* messengers: MAX/VK/TG are primary; WhatsApp is the quiet alternate channel */
.koq-msgs{display:flex;flex-direction:column;gap:10px;max-width:380px}
.koq-alt{display:flex;align-items:center;gap:12px;margin-top:12px}
.koq-overlay .koq-alt span{font:700 13px/1 Inter,sans-serif!important;color:var(--k-mut)!important}
.koq-overlay .koq-msg{display:flex;align-items:center;justify-content:flex-start;gap:12px;min-height:52px;padding:8px 16px!important;border:none!important;border-radius:14px!important;font:700 15px/1 Inter,sans-serif!important;color:#fff!important;text-decoration:none!important;cursor:pointer;transition:filter .12s}
.koq-overlay .koq-msg:hover{filter:brightness(.94)}
.koq-overlay .koq-msg:focus-visible{outline:3px solid var(--k-focus);outline-offset:2px}
.koq-overlay .koq-msg img{width:28px;height:28px;flex:none;display:block;object-fit:contain;background:transparent;border-radius:0;padding:0;box-sizing:border-box}
.koq-overlay .koq-msg:disabled{opacity:.5;pointer-events:none}
.koq-overlay .koq-msg[aria-disabled="true"]{opacity:.5;pointer-events:none}
.koq-overlay .koq-msg--telegram{background:#229ED9!important}
.koq-overlay .koq-msg--vk{background:#0077FF!important}
.koq-overlay .koq-msg--max{background:linear-gradient(90deg,#B020E8 0%,#7B35FF 26%,#418DFF 62%,#39C5FF 100%)!important}
/* WhatsApp used to be the one "quiet alternate" channel and carried its own geometry (10px radius,
   44px height, 14px text, 0 vertical padding). Since the MAX-first release all three of VK /
   Telegram / WhatsApp render as `.koq-msg--sec`, so that legacy block only made WhatsApp differ
   from its two neighbours. Colour is kept as a safety net for a non-secondary render; every
   geometry override is gone so the three secondary buttons are byte-identical. */
.koq-overlay .koq-msg--whatsapp{background:var(--k-subtle)!important;color:var(--k-ink)!important;border:1px solid var(--k-line)!important}
.koq-overlay .koq-msg--whatsapp:hover{filter:none;border-color:#9CA3AF!important}


/* ---- footer nav (light) ---- */
.koq-foot{flex:none;display:flex;gap:12px;align-items:center;padding-top:13px;padding-bottom:13px;padding-left:max(var(--k-pad),calc((100% - var(--ko-container))/2));padding-right:max(var(--k-pad),calc((100% - var(--ko-container))/2));border-top:1px solid var(--k-line);background:#fff}
.koq-foot.is-empty{display:none}
.koq-footcount{display:none}
.koq-overlay .koq-back{min-height:50px;padding:0 24px!important;border-radius:12px!important;border:1px solid var(--k-line)!important;background:#fff!important;color:var(--k-ink)!important;font:500 16px/24px Inter,sans-serif!important;letter-spacing:-.1px;cursor:pointer;transition:border-color .12s}
.koq-overlay .koq-back:hover{border-color:var(--k-strong)!important}
.koq-overlay .koq-back:focus-visible{outline:3px solid var(--k-focus);outline-offset:2px}
.koq-overlay .koq-next{min-height:50px;min-width:300px;margin-left:auto;padding:0 28px;border:1px solid var(--k-acc)!important;border-radius:12px!important;background:var(--k-acc)!important;color:#fff!important;font:500 16px/24px Inter,sans-serif!important;letter-spacing:-.1px;cursor:pointer;transition:background .15s}
.koq-overlay .koq-next:hover{background:var(--k-accd)!important}
.koq-overlay .koq-next:disabled{background:var(--k-subtle)!important;border-color:var(--k-subtle)!important;color:#9CA3AF!important;opacity:1;cursor:not-allowed}
.koq-overlay .koq-next:focus-visible{outline:3px solid var(--k-focus);outline-offset:2px}


/* scroll lock: keep the page content in the DOM flow (fixed overlay covers it) so the dark
   blurred backdrop blurs the real landing and scroll position survives closing the popup. */
body.koq-lock{overflow:hidden!important;overscroll-behavior:none}
.koq-body::-webkit-scrollbar{width:8px}
.koq-body::-webkit-scrollbar-thumb{background:var(--k-strong);border-radius:99px}
.koq-body::-webkit-scrollbar-track{background:transparent}


/* ============================================================================
   OVERLAY CARDS (v5.6.0) — Q1, Q3, Q4 and Q5 initial (collapsed) state, on BOTH
   desktop and mobile. One shared component (single selector group over all four
   card types): the image fills the whole card, the title sits inside on a LOCAL
   white text-shadow halo (variant A) — no scrim, no plate, .tx transparent in every
   state (incl. selected). Subtitle stays sr-only. Desktop squares are sized from the
   content width (--koq-cw) and body leftover height (--koq-avail), published by JS;
   mobile is width-driven (2 columns) in pure CSS. The Q5 rules require .is-collapsed,
   so the expanded state and the three detail cards are never touched.
   ============================================================================ */
/* --- shared chrome (all viewports) --- */
.koq-overlay .koq-step--s1 .koq-big,
.koq-overlay .koq-step--s3 .koq-big,
.koq-overlay .koq-step--s4 .koq-prod,
.koq-overlay .koq-step--cz.is-collapsed .koq-czbranch{ position:relative; height:auto; overflow:hidden }
.koq-overlay .koq-step--s1 .koq-big>.im,
.koq-overlay .koq-step--s3 .koq-big>.im,
.koq-overlay .koq-step--s4 .koq-prod>.im,
.koq-overlay .koq-step--cz.is-collapsed .koq-czbranch>.im{
  position:absolute!important; inset:0; width:100%!important; height:100%!important; max-height:none!important;
  padding:8px; border-radius:0; background:var(--k-media); display:flex; align-items:center; justify-content:center; aspect-ratio:auto!important }
.koq-overlay .koq-step--s1 .koq-big>.im img,
.koq-overlay .koq-step--s3 .koq-big>.im img,
.koq-overlay .koq-step--s4 .koq-prod>.im img,
.koq-overlay .koq-step--cz.is-collapsed .koq-czbranch>.im img{ width:100%!important; height:100%!important; object-fit:contain!important }
.koq-overlay .koq-step--s1 .koq-big>.tx,
.koq-overlay .koq-step--s3 .koq-big>.tx,
.koq-overlay .koq-step--s4 .koq-prod>.tx,
.koq-overlay .koq-step--cz.is-collapsed .koq-czbranch>.tx{
  position:absolute; left:0; right:0; bottom:0; z-index:2; border-top:0!important; background:transparent!important; box-shadow:none!important;
  padding:12px 14px 13px; display:flex; flex-direction:column; align-items:flex-start; justify-content:flex-end; min-height:0!important; height:auto!important }
.koq-overlay .koq-step--s1 .koq-big.is-on>.tx,
.koq-overlay .koq-step--s3 .koq-big.is-on>.tx,
.koq-overlay .koq-step--s4 .koq-prod.is-sel>.tx,
.koq-overlay .koq-step--cz.is-collapsed .koq-czbranch.is-on>.tx{ background:transparent!important }
.koq-overlay .koq-step--s1 .koq-big>.tx .t,
.koq-overlay .koq-step--s3 .koq-big>.tx .t,
.koq-overlay .koq-step--s4 .koq-prod>.tx .t,
.koq-overlay .koq-step--cz.is-collapsed .koq-czbranch>.tx .t{
  color:#0F1720!important; letter-spacing:-.1px;
  text-shadow:0 0 2px #fff,0 0 4px #fff,0 0 7px rgba(255,255,255,.95),0 0 12px rgba(255,255,255,.85),0 1px 1px rgba(255,255,255,.9);
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden }
.koq-overlay .koq-step--s1 .koq-big>.tx .s,
.koq-overlay .koq-step--s3 .koq-big>.tx .s,
.koq-overlay .koq-step--cz.is-collapsed .koq-czbranch>.tx .s{
  position:absolute!important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0 }
.koq-overlay .koq-step--s1 .koq-big .koq-ck,
.koq-overlay .koq-step--s3 .koq-big .koq-ck,
.koq-overlay .koq-step--s4 .koq-prod .koq-ck,
.koq-overlay .koq-step--cz.is-collapsed .koq-czbranch .koq-ck{ z-index:3 }
.koq-overlay .koq-step--s1 .koq-big:hover>.im img,
.koq-overlay .koq-step--s3 .koq-big:hover>.im img,
.koq-overlay .koq-step--s4 .koq-prod:hover>.im img,
.koq-overlay .koq-step--cz.is-collapsed .koq-czbranch:hover>.im img{ filter:brightness(1.02); transition:filter .12s }
/* Q4 counter's own row-pin is superseded by the .koq-s4head flex layout above (§3 rework) — the
   pickmeta box is now a fixed-content flex child there, not a full-width row needing flex-end. */

/* ================= desktop geometry ================= */
@media(min-width:641px){
  .koq-overlay .koq-step--s1,
  .koq-overlay .koq-step--s3,
  .koq-overlay .koq-step--s4,
  .koq-overlay .koq-step--cz.is-collapsed{ display:flex; flex-direction:column; height:100%; min-height:0 }
  /* Q1 — two squares */
  .koq-overlay .koq-step--s1 .koq-grid2{ flex:1 1 auto; min-height:0; display:flex; justify-content:center; align-items:center; gap:18px }
  .koq-overlay .koq-step--s1 .koq-big{ width:min(calc((var(--koq-cw,1000px) - 18px)/2), var(--koq-avail,478px)); aspect-ratio:1 }
  /* Q3 — strict 2x2 with strictly SQUARE cards. Square side = the per-row height (2 rows fit the body),
     so all four are 1:1 and equal; capped by half the content width too. Footer stays visible, no
     desktop scrollbar. If the popup is short, the squares shrink — aspect stays 1:1, never 4-in-row. */
  .koq-overlay .koq-step--s3 .koq-grid4{ flex:1 1 auto; min-height:0; display:grid; grid-template-columns:repeat(2,auto); justify-content:center; align-content:center; gap:14px }
  .koq-overlay .koq-step--s3 .koq-big{ height:min(calc((var(--koq-avail,478px) - 14px)/2), calc((var(--koq-cw,1000px) - 14px)/2)); width:auto; aspect-ratio:1 }
  /* Q4 — strict 3x2 near-square */
  .koq-overlay .koq-step--s4 .koq-prods{ flex:1 1 auto; min-height:0; display:grid; grid-template-columns:repeat(3,auto); justify-content:center; align-content:center; gap:12px }
  .koq-overlay .koq-step--s4 .koq-prod{ height:calc((var(--koq-avail,478px) - 12px)/2); width:auto; aspect-ratio:1.1 }
  .koq-overlay .koq-step--s4 .koq-prod>.tx .t{ font-size:15px!important; line-height:20px!important }
  /* Q5 initial — two squares */
  .koq-overlay .koq-step--cz.is-collapsed .koq-czmain{ flex:1 1 auto; min-height:0; display:flex; justify-content:center; align-items:center; gap:16px; width:auto; margin:0 }
  .koq-overlay .koq-step--cz.is-collapsed .koq-czbranch{ width:min(calc((var(--koq-cw,1000px) - 16px)/2), var(--koq-avail,478px)); aspect-ratio:1; flex:0 1 auto; max-width:none }
  /* Q5 uses the shared 12px image inset in both closed and open states. Exact zero-edge crop
     exceptions below still win per side for head/handle artwork. */
  .koq-overlay .koq-step--cz.is-collapsed .koq-czbranch>.im{ padding:12px }
  /* The "changes" photo is cropped to its measured alpha bbox by applyViewBox(). Removing only the
     frame's right padding makes the opaque subject reach the divider; top/left/bottom keep normal air. */
  .koq-overlay .koq-step--cz.is-collapsed .koq-czbranch>.im.koq-media--head{ padding-right:0 }
  .koq-overlay .koq-step--cz.is-collapsed .koq-czbranch--changes .koq-mastericon{ height:34%; width:auto }
  .koq-overlay .koq-step--s1 .koq-big>.tx .t,
  .koq-overlay .koq-step--cz.is-collapsed .koq-czbranch>.tx .t{ font-size:20px!important; line-height:25px!important }
  .koq-overlay .koq-step--s3 .koq-big>.tx .t{ font-size:18px!important; line-height:23px!important }
}

/* ================= mobile geometry ==================================================
   Reverted to the pre-5.6.0 (5.5.0) card geometry: ONE column, full width, card height
   driven by the existing --ko-mobile-media (Q5 by its own collapsed clamp), gaps as in
   5.5.0 (Q1 10 / Q3 14 / Q4 10 / Q5 8). Only the OVERLAY STYLING is kept — the title sits
   inside the image on the local halo, the .tx is transparent, no separate white text zone,
   no white background on select. No new mobile grids are introduced. ==================== */
@media(max-width:640px){
  .koq-overlay .koq-step--s1 .koq-grid2{ grid-template-columns:1fr!important; gap:10px!important }
  /* Q3's mobile gap used to be 14px against Q1/Q4's 10px — no functional reason for the difference,
     just an inherited value from before the shared overlay-card system; unified to 10 (§4). */
  .koq-overlay .koq-step--s3 .koq-grid4{ grid-template-columns:1fr!important; gap:10px!important }
  .koq-overlay .koq-step--s4 .koq-prods{ grid-template-columns:1fr!important; gap:10px!important }
  .koq-overlay .koq-step--cz.is-collapsed .koq-czmain{ grid-template-columns:1fr!important; display:grid!important; gap:10px!important; width:auto!important }
  .koq-overlay .koq-step--s1 .koq-big,
  .koq-overlay .koq-step--s3 .koq-big,
  .koq-overlay .koq-step--s4 .koq-prod{ width:auto!important; height:var(--ko-mobile-media)!important; aspect-ratio:auto!important }
  .koq-overlay .koq-step--cz.is-collapsed .koq-czbranch{ width:auto!important; height:var(--ko-mobile-media)!important; aspect-ratio:auto!important; max-width:none!important }
  .koq-overlay .koq-step--cz.is-collapsed .koq-czbranch--changes .koq-mastericon{ height:40%!important; width:auto!important }
  /* The same 12px Q5 image inset is used on mobile; exact zero-edge crop exceptions remain below. */
  .koq-overlay .koq-step--cz.is-collapsed .koq-czbranch>.im{ padding:12px!important }
  /* The alpha bbox removes transparent source pixels; zero frame padding owns the exact visual inset. */
  .koq-overlay .koq-step--cz.is-collapsed .koq-czbranch>.im.koq-media--head{ padding-right:0!important }
  /* mobile overlay title sizes */
  .koq-overlay .koq-step--s1 .koq-big>.tx .t,
  .koq-overlay .koq-step--cz.is-collapsed .koq-czbranch>.tx .t{ font-size:16px!important; line-height:21px!important }
  .koq-overlay .koq-step--s3 .koq-big>.tx .t,
  .koq-overlay .koq-step--s4 .koq-prod>.tx .t{ font-size:15px!important; line-height:20px!important }
  .koq-overlay .koq-step--s1 .koq-big>.tx,
  .koq-overlay .koq-step--s3 .koq-big>.tx,
  .koq-overlay .koq-step--s4 .koq-prod>.tx,
  .koq-overlay .koq-step--cz.is-collapsed .koq-czbranch>.tx{ padding:10px 12px 11px }
}


/* ---- wide desktop ---- */
@media(min-width:1500px){
  .koq-step--s4{max-width:1000px!important}
  .koq-step--s4 .koq-prods{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-height:860px) and (min-width:641px){
  .koq-body{padding-top:var(--ko-step-breath);padding-bottom:var(--ko-step-breath)}
  .koq-step--s1{padding-bottom:0}
  .koq-grid2{gap:16px}
  .koq-step--s3{padding-bottom:0}
  .koq-step--s3 .koq-grid4{gap:10px}
  .koq-step--s4 .koq-prods{gap:10px}
  .koq-step--s4 .koq-prod .tx{padding:8px 10px 9px}
}


/* ---- tablet ---- */
@media(max-width:1100px){
  .koq-overlay{padding:16px}
  .koq-overlay .koq-modal{width:calc(100vw - 32px);height:min(var(--k-shell-h),calc(100dvh - 32px));min-height:min(640px,calc(100dvh - 32px))}
  .koq-prods{grid-template-columns:repeat(2,minmax(0,1fr))}
  .koq-grid4{grid-template-columns:repeat(2,1fr)}
  .koq-step--s3 .koq-grid4{grid-template-columns:repeat(2,minmax(0,1fr))}
  .koq-final{grid-template-columns:1fr;gap:16px}
  .koq-modal{--k-pad:16px}
}


/* ---- mobile: fullscreen, light, compact ---- */
@media(max-width:640px){
  .koq-root{--ko-mobile-media:clamp(150px,min(calc(100vw - 28px),calc(62dvh - 165px)),390px)}
  .koq-step--s6{min-width:0;max-width:100%!important;overflow-x:hidden}
  .koq-overlay .koq-sumcard{min-width:0;gap:10px;padding:8px!important}
  .koq-overlay .koq-sumimg{width:120px;height:120px;min-width:0}
  .koq-overlay .koq-sumcard .t{min-width:0;overflow-wrap:anywhere}
  .koq-overlay{inset:0;width:100vw;height:100vh;height:100dvh;align-items:stretch;justify-content:stretch;padding:0;margin:0;background:var(--k-soft);backdrop-filter:none}
  .koq-overlay .koq-modal{--k-pad:12px;display:grid;grid-template-rows:auto minmax(0,1fr) auto;width:100vw;max-width:none;margin:0;max-height:none;height:100vh;height:100dvh;min-height:0;border-radius:0;border:0;box-shadow:none}
  .koq-top{padding-top:calc(var(--k-gap) + env(safe-area-inset-top));padding-right:max(var(--k-gap),env(safe-area-inset-right));padding-left:max(var(--k-gap),env(safe-area-inset-left))}
  .koq-foot{padding-right:max(12px,env(safe-area-inset-right));padding-bottom:calc(10px + env(safe-area-inset-bottom));padding-left:max(12px,env(safe-area-inset-left))}
  .koq-body{min-height:0;scrollbar-gutter:auto;padding:14px max(var(--k-pad),env(safe-area-inset-right)) 18px max(var(--k-pad),env(safe-area-inset-left));scroll-padding-bottom:18px}
  .koq-overlay .koq-h{font-size:19px!important;line-height:24px!important}
  .koq-overlay .koq-sub{margin-bottom:12px}
  .koq-grid2{grid-template-columns:1fr;gap:10px}
  .koq-overlay .koq-big .im{aspect-ratio:auto}
  .koq-overlay .koq-big .tx{padding:9px 11px 11px}
  .koq-overlay .koq-big:not(.koq-cz):not(.koq-czbranch) .t{font-size:14px!important;line-height:21px!important;letter-spacing:-.05px}
  .koq-overlay .koq-big:not(.koq-cz):not(.koq-czbranch) .s{font-size:12px!important;line-height:18px!important}
  .koq-grid4{grid-template-columns:1fr;gap:10px}
  .koq-step--s1 .koq-big{flex-direction:column;min-height:0}
  .koq-step--s1 .koq-big .im{width:100%;height:var(--ko-mobile-media);aspect-ratio:auto;flex:none;padding:8px}
  .koq-step--s1 .koq-big .tx{flex:none;display:block;height:auto;min-height:0;padding:9px 12px 11px}
  .koq-step--s3 .koq-grid4{grid-template-columns:1fr}
  .koq-step--s3 .koq-big{flex-direction:column;min-height:0;height:auto}
  .koq-step--s3 .koq-big .im{width:100%;height:var(--ko-mobile-media);aspect-ratio:auto;padding:8px}
  .koq-step--s3 .koq-big .tx{height:auto;min-height:0;padding:10px 12px 12px}
  .koq-rows{grid-template-columns:1fr;gap:9px;max-width:none}
  .koq-overlay .koq-row{padding:12px 14px!important}
  .koq-prods{gap:10px}
  .koq-prods{grid-template-columns:1fr}
  .koq-overlay .koq-prod{display:flex;flex-direction:column;align-items:stretch;min-height:0}
  .koq-step--s4 .koq-prod{height:auto;min-height:0}
  .koq-overlay .koq-prod .im{width:100%;min-width:0;height:var(--ko-mobile-media);aspect-ratio:auto;max-height:none;align-self:stretch;flex:none;padding:8px}
  .koq-overlay .koq-prod .tx{flex:none;display:block;height:auto;min-height:0;padding:10px 12px 12px}
  .koq-overlay .koq-prod .t{font-size:14px!important;line-height:21px!important}
  .koq-msgs{max-width:none}
  .koq-foot{padding-right:max(var(--k-pad),env(safe-area-inset-right));padding-left:max(var(--k-pad),env(safe-area-inset-left))}
  .koq-overlay .koq-back,.koq-overlay .koq-next{min-width:0;margin-left:0;min-height:54px;font-size:17px!important;padding-right:12px!important;padding-left:12px!important}
  .koq-overlay .koq-back{flex:0 1 auto;min-width:104px}
  .koq-overlay .koq-next{flex:1}
  .koq-open{width:100%;max-width:360px}
}
@media(max-width:640px) and (max-height:650px){
  .koq-top{gap:6px 12px;padding-top:8px;padding-bottom:8px}
  .koq-body{padding-top:10px;padding-bottom:12px}
  .koq-overlay .koq-sub{margin-bottom:9px}
  .koq-foot{padding-top:8px;padding-bottom:calc(8px + env(safe-area-inset-bottom))}
  .koq-overlay .koq-back,.koq-overlay .koq-next{min-height:52px}
}
@keyframes koqreveal{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}


/* ==== result: messenger hierarchy (MAX accent, the rest neutral but fully clickable) ==== */
/* §11: the MAX footer CTA is a primary action button first, a ".koq-msg" second — it should match
   the same button system as "Далее"/"Назад" (.koq-next/.koq-back: 12px radius, 500/16px/24px,
   -.1px letter-spacing), not the generic messenger-link styling (14px radius, 700/15px/1, no
   letter-spacing) those inherited from the result screen's secondary channel buttons. Gradient
   background, icon and text are untouched — only the button's own geometry/type moved to match. */
.koq-overlay .koq-msg--primary{min-height:56px;border-radius:12px!important;
  font:500 16px/24px Inter,sans-serif!important;letter-spacing:-.1px;padding:0 24px!important}
.koq-althead{font:700 13px/1.3 Inter,sans-serif!important;color:var(--k-mut)!important;margin:14px 0 8px}
.koq-msgs--alt{gap:8px}
.koq-overlay .koq-msg--sec{background:#fff!important;color:var(--k-ink)!important;border:1px solid var(--k-line)!important;min-height:50px;font-weight:600!important;transition:border-color .12s,background .12s}
/* Result-screen right panel is height-constrained (§14/§24 forbid a scrollbar at 1366x768/1440x900);
   the secondary channels are a compact reference list next to the footer's one primary CTA, so they
   don't need the same 50px touch target as a lone action button. Desktop only.
   Tightened again (6->5, 40->36): msg_sub (§2, verbatim, not shortened) wraps to ~4 lines at this
   column width, which pushed 1366x768/1-model past the no-scrollbar rule even before this session's
   changes (confirmed against unmodified production) — recovered from here, which has more slack than
   a hand-picked long sentence does. */
@media(min-width:641px){
  .koq-msgs--alt{gap:5px}
  /* min-height alone didn't shrink these: the 28px icon + 8px top/bottom padding already forces ~44px
     regardless of min-height, so the icon and padding are what actually needed to shrink. */
  .koq-overlay .koq-msg--sec{min-height:36px;padding:5px 16px!important}
  .koq-overlay .koq-msg--sec img{width:20px;height:20px}
}
.koq-overlay .koq-msg--sec:hover{background:var(--k-soft)!important;border-color:var(--k-strong)!important;filter:none}
.koq-overlay .koq-msg--sec:focus-visible{outline:3px solid var(--k-focus);outline-offset:2px}


/* ==== step 4: desktop hover preview (pointer-events:none, lives inside the popup) ==== */
.koq-hoverprev{position:absolute;z-index:5;display:flex;align-items:center;justify-content:center;padding:12px;
  background:rgba(255,255,255,.94);border:1px solid var(--k-line);border-radius:16px;box-shadow:0 18px 48px rgba(15,23,32,.18);
  pointer-events:none;opacity:0;transform:scale(.98);transition:opacity .14s ease,transform .14s ease}
.koq-hoverprev.is-on{opacity:1;transform:scale(1)}
.koq-hoverprev img{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;display:block}
@media(hover:none),(pointer:coarse),(max-width:1023px){
  .koq-hoverprev{display:none!important}
}
@media(prefers-reduced-motion:reduce){
  .koq-hoverprev{transition:none}
}
@media(max-width:640px){
  .koq-althead{margin:12px 0 6px}
}
@media(max-width:640px){
  .koq-overlay .koq-sumimg{width:104px!important;height:104px!important;padding:6px!important}
  /* A single result is the primary choice, not a compact list item. It scales independently from Q5
     because the user may reach the result without opening that branch, but keeps the same visual range. */
  .koq-overlay .koq-sumgrid--1 .koq-sumimg{
    width:clamp(140px,44vw,180px)!important;height:clamp(140px,44vw,180px)!important;padding:10px!important}
  .koq-overlay .koq-sumcard{padding:7px 12px 7px 7px!important}
  .koq-sumgrid{gap:8px!important;margin-bottom:10px!important}
  .koq-sumrows{padding-top:10px;gap:5px}
  .koq-overlay .koq-h2{margin-bottom:8px}
  .koq-overlay .koq-msgsub{margin-bottom:10px}
}


/* ===== result: the single primary CTA lives in the footer ===== */
.koq-overlay .koq-footcta{margin-left:auto;min-width:300px;min-height:50px;justify-content:center;text-decoration:none!important}
.koq-overlay .koq-footcta img{width:24px;height:24px}
@media(max-width:640px){
  .koq-modal.koq-m-6 .koq-foot{position:sticky;bottom:0;z-index:3;box-shadow:0 -6px 18px rgba(15,23,32,.06)}
  .koq-modal.koq-m-6 .koq-body{padding-bottom:calc(24px + env(safe-area-inset-bottom))}
  .koq-overlay .koq-footcta{min-width:0;flex:1;font-size:16px!important}
  .koq-overlay .koq-footcta img{width:22px;height:22px}
}

/* `.koq-grid2` carries `margin:0 auto`; auto cross-axis margins cancel the flex stretch, so the
   compact pair collapsed to fit-content. Width is stated explicitly in both states instead. */

/* headings on one line, two lines always reserved for the subtitle -> both cards end at the same height */


/* --- 2. compact state: media/icon left, title right, subtitle gone, both still clickable --- */

/* not larger than the three detail-card headings (14px) */

/* the media drives the whole shrink: the card height follows its content */


/* --- 3. the heading and the hint fade in with a small lift --- */


/* --- 7. result header: no leftover progress-bar height, real breathing room above the heading --- */
.koq-modal.koq-m-6 .koq-track{display:none}
.koq-modal.koq-m-6 .koq-top{row-gap:0}
.koq-modal.koq-m-6 .koq-body{padding-top:14px}
@media(min-width:641px){ .koq-modal.koq-m-6 .koq-body{padding-bottom:16px} }


/* --- 8. result footer: Back left, primary CTA right, equal height --- */
.koq-overlay .koq-footcta{white-space:nowrap}
@media(max-width:640px){
  .koq-modal.koq-m-6 .koq-foot{gap:10px}
  .koq-modal.koq-m-6 .koq-back{flex:0 0 96px!important;min-width:96px!important;max-width:96px!important;
    min-height:52px!important;font-size:15px!important;padding-left:8px!important;padding-right:8px!important}
  .koq-overlay .koq-footcta{flex:1 1 auto;min-width:0;min-height:52px;
    font-size:clamp(14px,4vw,15px)!important;gap:8px;padding:0 10px!important}
  .koq-overlay .koq-footcta img{width:21px;height:21px}
}


/* --- 7b. the close button keeps one identical gap from the top and the right on every step --- */
.koq-top{position:relative;min-height:calc(44px + var(--k-gap)*2)}
.koq-overlay .koq-close{position:absolute;grid-area:auto;top:var(--k-gap);right:var(--k-gap)}
@media(max-width:640px){
  .koq-overlay .koq-close{top:calc(var(--k-gap) + env(safe-area-inset-top));
    right:max(var(--k-gap),env(safe-area-inset-right))}
  .koq-top{min-height:calc(44px + var(--k-gap)*2 + env(safe-area-inset-top))}
  .koq-modal.koq-m-6 .koq-back{flex:0 0 92px!important;min-width:92px!important;max-width:92px!important}
}


/* --- 7c. mobile shell: the modal is a grid, so its single column must be allowed to shrink.
   Without this the auto column sizes to the content's max-content and the whole shell (header,
   body, footer, close button) renders wider than the screen on 320-360px. --- */
@media(max-width:640px){
  .koq-overlay .koq-modal{grid-template-columns:minmax(0,1fr)}
  .koq-top,.koq-body,.koq-foot{min-width:0}
  .koq-overlay .koq-step,.koq-overlay .koq-step--wide{min-width:0}
}


/* --- 4. mobile: the styled 8px scrollbar of .koq-body is a classic (layout-consuming) one, so it
   ate 8px off the right inset and made the side paddings asymmetric. Touch scrolling needs no
   visible track — hide it and let both sides use the full --k-pad. --- */
@media(max-width:640px){
  .koq-body{scrollbar-width:none;-ms-overflow-style:none}
  .koq-body::-webkit-scrollbar{width:0;height:0;display:none}
}


/* --- 5. result header: with the progress track hidden the meta line kept sitting in the collapsed
   first grid row while the close button is centred on 34px. Give the top a single full-height row
   so "Ваш результат" and the close button share one optical centre line. --- */
.koq-modal.koq-m-6 .koq-top{grid-template-rows:minmax(0,1fr);align-items:center}
.koq-modal.koq-m-6 .koq-meta{grid-row:1;align-self:center}


/* --- 4. the transformation itself is animated, not swapped --- */
@media(max-width:640px){
  .koq-foot{gap:8px}
  .koq-step--s4 .koq-pickmeta{display:none}
  .koq-footcount{display:flex;flex:0 0 64px;min-width:64px;min-height:54px;padding:4px 6px;
    flex-direction:column;align-items:center;justify-content:center;border-radius:12px;background:var(--k-subtle);
    color:var(--k-ink);text-align:center;white-space:nowrap}
  .koq-footcount-label{font:500 11px/14px Inter,sans-serif;color:var(--k-mut)}
  .koq-footcount-value{font:700 13px/16px Inter,sans-serif;color:var(--k-ink)}
  .koq-overlay .koq-back{flex:0 0 auto!important;min-width:0!important;
    padding-left:12px!important;padding-right:12px!important;font-size:15px!important;white-space:nowrap}
  .koq-overlay .koq-next{flex:1 1 auto!important;min-width:0!important;
    padding-left:10px!important;padding-right:10px!important;
    font-size:clamp(14px,3.9vw,17px)!important;white-space:nowrap}
  .koq-modal.koq-m-6 .koq-back{flex:0 0 auto!important;min-width:0!important;max-width:none!important}
  .koq-sumrows{gap:11px!important;padding-top:12px!important;margin-bottom:18px!important}
  .koq-sumrow{align-items:flex-start;gap:12px!important;line-height:1.45}
  .koq-overlay .koq-sumrow dt{min-width:86px}
  .koq-overlay .koq-sumrow dd{line-height:1.45!important}
}


/* --- 9. secondary messengers: shrink to content on desktop, full width on mobile --- */
@media(min-width:641px){
  .koq-msgs--alt{align-items:flex-start}
  .koq-overlay .koq-msg--sec{width:fit-content;min-width:190px;padding:8px 18px!important}
}
@media(max-width:640px){
  .koq-overlay .koq-msg--sec{width:100%;min-width:0}
}


/* --- 7. symmetric side insets: nothing may size to max-content or exceed its box --- */

/* =====================================================================
   STEP 5 — single owner of every branch/detail card rule.
   The v2..v7 layers (199 rules across 9 media contexts) were deleted; this
   is the only place Q5 geometry, animation and crops are defined.
   Layout model: the step is a column flexbox, so the media zone takes the
   leftover height by itself — no dvh arithmetic, no override chains.
   ===================================================================== */

/* ---- tokens ---- */
.koq-step--cz{--cz-gap:12px;--cz-pad:8px;--cz-compact:88px}

/* ---- shared card chrome (branch cards inherit .koq-big from question 1) ---- */
.koq-overlay .koq-cz{display:flex;flex-direction:column;border-radius:16px;overflow:hidden;min-width:0}
.koq-overlay .koq-cz>.im{width:100%;background:var(--k-media);padding:var(--cz-pad);position:relative;overflow:hidden}
.koq-overlay .koq-cz>.tx{flex:none;padding:9px 12px 11px;background:var(--k-card);border-top:1px solid var(--k-line)}
.koq-overlay .koq-cz .t{font:600 14px/19px Inter,sans-serif;letter-spacing:-.05px;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.koq-overlay .koq-cz .s{font:400 12px/16px Inter,sans-serif;color:var(--k-mut);margin-top:5px;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}

/* ---- branch pair: question-1 component while closed, compact row once open ---- */
.koq-czmain{display:grid;grid-template-columns:1fr 1fr;gap:var(--cz-gap);align-items:stretch;min-width:0}
/* shared caption under the two initial branch cards — not a third option, so it is plain text,
   never a button, and sits centered below the pair the same way czhint sits above the detail cards. */
.koq-overlay .koq-czcaption{font:400 13px/1.4 Inter,sans-serif!important;color:var(--k-mut)!important;
  text-align:center;margin:10px 0 0}
.koq-step--cz:not(.is-collapsed) .koq-czcaption{display:none}
.koq-czbranch .koq-branchicon{display:flex;align-items:center;justify-content:center;background:var(--k-media)}
/* One icon rule for both states. The size is taken from the media zone's limiting side (`height`):
   the collapsed zone is landscape and the compact zone is square, so a single percentage lands in
   the 45-55% band in both. `width:34%` used to read as 48% of the zone at 1366 and 59% at 412 —
   one rule, two sizes. The icon never touches the zone edges. */
.koq-overlay .koq-czbranch .koq-mastericon{height:51%;width:auto;aspect-ratio:1/1;color:var(--k-acc)}
.koq-overlay .koq-step--cz:not(.is-collapsed) .koq-czbranch{flex-direction:row;align-items:stretch}
/* Compact media = exactly the detail cards' square. On mobile that is the same expression the three
   detail cards use, so all five media zones resolve to one number; on desktop it is a fixed square. */
.koq-overlay .koq-step--cz:not(.is-collapsed) .koq-czbranch>.im{
  width:var(--cz-compact);min-width:var(--cz-compact);height:var(--cz-compact);flex:none;padding:var(--cz-pad)}
.koq-overlay .koq-step--cz:not(.is-collapsed) .koq-czbranch>.tx{
  flex:1;min-width:0;display:flex;flex-direction:column;justify-content:center;
  border-top:none;border-left:none;padding:8px 12px}
/* Typography: question 1's scale belongs to the closed state only. From the moment the pair starts
   transforming, all five cards share the detail scale — that is why the generic `.koq-big .t/.s`
   !important pair excludes `.koq-czbranch`: it would otherwise pin the branch titles at 16/24. */
.koq-overlay .koq-step--cz.is-collapsed .koq-czbranch .t{font:600 16px/24px Inter,sans-serif;letter-spacing:-.1px;min-height:24px}
.koq-overlay .koq-step--cz.is-collapsed .koq-czbranch .s{font:400 13px/18px Inter,sans-serif;color:var(--k-mut);min-height:36px}
.koq-overlay .koq-czbranch .t{font:600 14px/19px Inter,sans-serif;letter-spacing:-.05px;color:var(--k-ink);
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.koq-overlay .koq-czbranch .s{font:400 12px/16px Inter,sans-serif;color:var(--k-mut);
  overflow:hidden;max-height:60px;opacity:1}
.koq-overlay .koq-step--cz:not(.is-collapsed) .koq-czbranch .s{max-height:0;opacity:0;margin-top:0}

/* Final compact geometry is committed with transitions disabled, measured, then revealed.
   The visible branch transition uses opacity + translateY only; cards never animate scale. */
.koq-overlay .koq-czbranch{transition:opacity .18s ease, transform .26s cubic-bezier(.22,.61,.36,1)}
.koq-overlay .koq-step--cz.is-morphing .koq-czbranch{will-change:transform,opacity}
.koq-overlay .koq-step--cz.is-snap .koq-czbranch{transition:none!important}
.koq-overlay .koq-step--cz.is-settling .koq-czbranch{transform:translateY(10px);opacity:0}
.koq-overlay .koq-czbranch .s{transition:opacity .16s ease}
.koq-overlay .koq-step--cz:not(.is-collapsed) .koq-czbranch .s{opacity:0}

/* details: layout is instant (max-height/visibility flip with 0s), reveal is opacity + translateY */
.koq-czdetails{max-height:0;opacity:0;visibility:hidden;transform:translateY(10px);overflow:hidden;
  transition:opacity 0s, transform 0s, visibility 0s, max-height 0s}
.koq-czdetails.is-open{max-height:2600px;opacity:1;visibility:visible;transform:none;
  transition:opacity .22s ease .02s, transform .24s cubic-bezier(.22,.61,.36,1) .02s, visibility 0s, max-height 0s}
.koq-czgroup,.koq-czhint{opacity:0;transform:translateY(-6px);
  transition:opacity .2s ease .06s,transform .2s ease .06s}
.koq-czdetails.is-open .koq-czgroup,.koq-czdetails.is-open .koq-czhint{opacity:1;transform:none}
/* three detail cards: opacity + translateY only (compositor), tightened 70ms stagger */
.koq-czdetails.is-open .koq-czrow>.koq-cz{animation:koqreveal .26s ease-out both}
.koq-czdetails.is-open .koq-czrow>.koq-cz:nth-child(1){animation-delay:.06s}
.koq-czdetails.is-open .koq-czrow>.koq-cz:nth-child(2){animation-delay:.13s}
.koq-czdetails.is-open .koq-czrow>.koq-cz:nth-child(3){animation-delay:.20s}

/* ---- headings above the three cards ---- */
.koq-czgroup{font:700 14px/1.3 Inter,sans-serif;color:var(--k-ink);text-align:center;padding:2px 0 0}
.koq-overlay .koq-czhint{font:400 13px/1.5 Inter,sans-serif;color:var(--k-mut);
  margin:0 auto 8px;text-align:center;max-width:760px}
.koq-czdetails{margin-top:12px}
.koq-czrow{display:grid;gap:var(--cz-gap);min-width:0}

.koq-overlay .koq-cz>.im.koq-media--manager{color:var(--k-acc);display:flex;align-items:center;justify-content:center}

/* ================= desktop ================= */
@media(min-width:641px){
  /* the step is a column flexbox, so the media zone below simply eats the leftover height */
  .koq-step--cz{display:flex;flex-direction:column;height:100%;min-height:0}
  .koq-czdetails.is-open{display:flex;flex-direction:column;flex:1 1 auto;min-height:0}
  .koq-czrow{grid-template-columns:repeat(3,minmax(0,1fr));flex:1 1 auto;min-height:0;width:100%}
  .koq-czrow>.koq-cz{height:100%;min-height:0}
  .koq-czrow>.koq-cz>.im{flex:1 1 auto;min-height:0;height:auto}
  /* Text zone in normal flow: title, gap, description. The 5.2.0 `min-height:38px/32px` line
     reservations equalised the three zones but parked a whole empty line between the two texts
     whenever the title took one line — which is every desktop width, now that all five cards share
     the 14/19 scale. The reservations are gone; the zones come out equal because the three titles
     and the three descriptions occupy the same number of lines at the same type scale, and the
     clamps keep it that way (title max 2 lines, description max 2). */
  .koq-czrow>.koq-cz>.tx{flex:none}
  .koq-step--cz{--cz-compact:120px;--cz-pad:12px}
  /* The compact icon remains percentage-sized inside the shared 12px image inset. */
  .koq-overlay .koq-step--cz:not(.is-collapsed) .koq-czbranch .koq-mastericon{height:58%}
}

/* ================= mobile ================= */
@media(max-width:640px){
  .koq-czmain{grid-template-columns:1fr;gap:8px}
  .koq-czdetails{margin-top:10px}
  .koq-czrow{grid-template-columns:1fr;gap:8px}
  .koq-overlay .koq-czhint{text-align:left;font-size:12.5px;margin-bottom:8px}
  .koq-czgroup{text-align:left;border-top:1px solid var(--k-line);padding:10px 2px 0;margin-top:4px;font-size:15px}
  /* All five cards are one horizontal component once the pair is open. `--cz-square` is the single
     source of the media size: the three detail cards and the two compact branch cards resolve the
     same expression against the same container width (both grids are one full-width column), so the
     five squares — and therefore the five card heights — come out identical. The branch pair used
     to carry its own 72px, which is what made the top two read as thumbnails next to 118-136px. */
  .koq-step--cz{--cz-square:clamp(118px,38%,136px);--cz-compact:var(--cz-square);--cz-pad:12px;
    /* §7 rework: the shared detail-card square is no longer a fixed viewport-only formula. It is
       measured live by sizeQ5DetailCards() (quizaxe.js) against the ACTUAL rendered title/subtitle of
       all three cards for whichever model is selected — different models produce different dynamic
       text ("Добавить травление…" vs "Изменить или убрать травление…"), so a size tuned for one could
       force another's text onto a 3rd line. --cz-detail-dyn is that measured result; the clamp() is
       only the first-paint fallback before JS has run once. */
    --cz-detail:var(--cz-detail-dyn, clamp(92px,calc((100dvh - 699px)/1.04),220px))}
  .koq-overlay .koq-czdetails .koq-cz{flex-direction:row;align-items:stretch}
  /* Detail image: large square (drives card height). Padding raised from a near-zero 3px (which let
     the alpha-cropped subject read as touching the frame — §7 forbids that) to a real, system-scale
     inset; object-fit:contain still guarantees no head/handle crop regardless of the box size. */
  .koq-overlay .koq-czdetails .koq-cz>.im{
    width:var(--cz-detail);min-width:var(--cz-detail);height:auto;aspect-ratio:1/1;flex:none;padding:12px;
    border-right:1px solid var(--k-line)}
  /* Once Q5 is open, the lower three cards own one measured square. Both upper branch cards inherit
     that exact same value, so all five image boxes and all five horizontal card heights scale together. */
  .koq-overlay .koq-step--cz:not(.is-collapsed) .koq-czbranch>.im{
    width:var(--cz-detail);min-width:var(--cz-detail);height:auto;aspect-ratio:1/1;flex:none;padding:var(--cz-pad)}
  /* Divider between image and text: a plain 1px system-line border on the image box's own right edge,
     inside box-sizing:border-box so it never changes the box's own width (already fixed via
     --cz-detail) or shifts on selection (is-on doesn't touch this rule). Text centred beside the image. */
  .koq-overlay .koq-czdetails .koq-cz>.tx,
  .koq-overlay .koq-step--cz:not(.is-collapsed) .koq-czbranch>.tx{flex:1;min-width:0;display:flex;
    flex-direction:column;justify-content:center;border-top:none;border-left:none;padding:10px 14px}
  /* Title and subtitle may each run up to 2 lines. sizeQ5DetailCards() maximises the shared
     image square until either would need a 3rd line. Text stays fully visible: no clamp,
     ellipsis or per-card font override. */
  .koq-overlay .koq-czdetails .koq-cz .t{display:block;font:600 14px/18px Inter,sans-serif;
    -webkit-line-clamp:unset;-webkit-box-orient:initial;overflow:visible;min-height:0}
  .koq-overlay .koq-czdetails .koq-cz .s{display:block!important;font-size:12px;line-height:16px;
    -webkit-line-clamp:unset;-webkit-box-orient:initial;overflow:visible;margin-top:2px}
  /* closed state keeps question 1's mobile scale; the open state falls through to the shared 14/19 */
  .koq-overlay .koq-step--cz.is-collapsed .koq-czbranch .t{font:600 14px/21px Inter,sans-serif;letter-spacing:-.05px;min-height:21px}
  .koq-overlay .koq-step--cz.is-collapsed .koq-czbranch .s{font:400 12px/18px Inter,sans-serif;min-height:36px}
  /* (removed 5.7.0) collapsed .czbranch>.im height:clamp — dead: identical selector at the overlay
     block sets height:100%!important, which always won; .im fills the card in every collapsed state. */
}

/* Exact Q5 crop/inset ownership comes last so generic responsive padding cannot override it. */
.koq-overlay .koq-cz>.im.koq-media--head,
.koq-overlay .koq-czbranch>.im.koq-media--head{padding-right:0}
/* The expanded branch rule above carries an extra step-state selector and a padding shorthand, so
   the generic head rule loses on specificity. Match that exact state and force the approved zero
   right inset, identical to the engraving/forging detail cards on desktop and mobile. */
.koq-overlay .koq-step--cz:not(.is-collapsed) .koq-czbranch>.im.koq-media--head{padding-right:0!important}
.koq-overlay .koq-cz>.im.koq-media--head img,
.koq-overlay .koq-czbranch>.im.koq-media--head img{object-position:right center}
.koq-overlay .koq-cz>.im.koq-media--handle{padding-left:0;padding-top:0}
.koq-overlay .koq-cz>.im.koq-media--handle img{object-position:left top}

/* One divider on the image-box right edge of every horizontal card in expanded Q5. */
.koq-overlay .koq-step--cz:not(.is-collapsed) .koq-czbranch>.im{border-right:1px solid var(--k-line)}

@media(prefers-reduced-motion:reduce){
  .koq-overlay .koq-czbranch,.koq-overlay .koq-czbranch>.im,.koq-overlay .koq-czbranch .s,
  .koq-czdetails,.koq-czdetails.is-open,.koq-czgroup,.koq-czhint{transition:none}
  .koq-czdetails.is-open .koq-czrow>.koq-cz{animation:none}
  /* the shrink/settle states must also snap (no scale/opacity anim) under reduced motion */
  .koq-overlay .koq-step--cz.is-settling .koq-czbranch{opacity:1;transform:none}
  .koq-overlay .koq-step--cz.is-morphing .koq-czbranch{will-change:auto}
  .koq-czdetails,.koq-czgroup,.koq-czhint{transform:none}
}
