/* v7: mega-menu header, accordion mobile menu, wide footer and generated content pages. Uses tokens from home.css. */

/* Header with mega-menu */
.header--mega > .container, .mega__in.container { width: min(1320px, calc(100% - 1.35rem)); }
.header--mega .header__row { gap: .6rem; }
.nav--mega { display: none; gap: .1rem; margin-left: .6rem; flex: 1; min-width: 0; overflow: visible; }
.nav--mega .nav__item { flex-shrink: 0; }
.nav__item { position: relative; }
.nav__btn { display: inline-flex; align-items: center; gap: .25rem; min-height: 42px; padding: .4rem .6rem; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font: 700 .9rem var(--font); cursor: pointer; white-space: nowrap; transition: background .2s, color .2s; }
.nav__btn svg { width: 14px; height: 14px; transition: transform .25s var(--ease); }
.nav__btn:hover, .nav__btn[aria-expanded="true"], .nav__btn.is-current { color: var(--accent-2); background: #fff1e6; }
.nav__btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.header__cta { display: none; }
.mega-wrap { position: absolute; left: 0; right: 0; top: var(--header); }
.mega { background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 24px 48px rgba(15, 27, 45, .14); animation: drop .28s var(--ease); }
.mega[hidden] { display: none; }
.mega__in { display: grid; grid-template-columns: 1fr 260px; gap: 2rem; padding: 1.6rem 0 1.8rem; }
.mega__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1.2rem 1.6rem; }
.mega__col { display: grid; align-content: start; gap: .1rem; }
.mega__t { margin: 0 0 .4rem; font-size: .875rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.mega__col a { display: block; padding: .32rem 0; font-size: .92rem; font-weight: 600; color: var(--ink); border-radius: 6px; }
.mega__col a:hover, .mega__col a[aria-current="page"] { color: var(--accent-2); }
.mega__feat { padding: 1.2rem; border-radius: var(--radius-sm); background: var(--navy); color: #fff; display: grid; align-content: start; gap: .6rem; }
.mega__feat .mega__t { color: rgba(255, 255, 255, .6); margin: 0; }
.mega__lead { margin: 0; font-family: var(--display); font-size: 1.05rem; line-height: 1.3; letter-spacing: -.01em; }
.mega__tel { color: #fff; font-weight: 800; font-size: 1.05rem; margin-top: .4rem; }
@media (min-width: 1100px) { .nav--mega { display: flex; } .header--mega .burger { display: none; } .header__cta { display: inline-flex; min-height: 42px; padding: .55rem 1rem; } .header--mega .header__actions { flex-shrink: 0; } }
@media (min-width: 1100px) and (max-width: 1499px) { .header--mega .header__phone { display: none; } .nav__btn { padding: .4rem .4rem; font-size: .84rem; } .header--mega .logo__img { width: 190px; height: auto; } }
@media (min-width: 860px) and (max-width: 1099px) { .header--mega .burger { display: inline-flex !important; } .header--mega .mobile-nav { display: grid !important; } .header--mega .mobile-nav[hidden] { display: none !important; } }
@media (min-width: 860px) { .mnav.mobile-nav[hidden] { display: none !important; } .mnav.mobile-nav { display: block !important; } }
@media (min-width: 1100px) { .mnav.mobile-nav { display: none !important; } }

/* Mobile accordion menu */
.mnav.mobile-nav { display: block; max-height: calc(100dvh - var(--header)); overflow: auto; padding: .5rem 0 1.2rem; }
.mnav__in { width: min(1080px, calc(100% - 1.35rem)); margin-inline: auto; }
.mnav__list { display: grid; }
.macc { border-bottom: 1px solid var(--line); }
.macc__h { display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: 54px; padding: .6rem .15rem; border: 0; background: transparent; font: 700 1.05rem var(--font); color: var(--ink); cursor: pointer; text-align: left; }
.macc__h svg { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.macc__h[aria-expanded="true"] svg { transform: rotate(180deg); }
.macc__b { display: grid; padding: 0 .15rem .8rem; }
.macc__b[hidden] { display: none; }
.mnav .macc__b a { padding: .55rem .6rem; font-size: .98rem; font-weight: 600; color: var(--ink); border-radius: 8px; }
.mnav .macc__b a[aria-current="page"] { color: var(--accent-2); background: #fff1e6; }
.mnav .macc__all { color: var(--accent-2) !important; font-weight: 800 !important; }
.mnav .mnav__link { display: block; padding: .8rem .15rem; font-weight: 700; color: var(--ink); border-bottom: 1px solid var(--line); }
.mnav__foot { padding: 1.1rem 0 0; display: grid; gap: .45rem; }
.mnav__tel { font-family: var(--display); font-size: 1.3rem; color: var(--ink); }
.mnav__foot p { margin: 0; color: var(--muted); font-size: .9rem; }
body.menu-open { overflow: hidden; }
.mnav.mobile-nav[hidden] { display: none !important; }

/* Footer */
.footer__grid--mega { grid-template-columns: 1fr; }
@media (min-width: 720px) { .footer__grid--mega { grid-template-columns: 1.4fr repeat(2, 1fr); } }
@media (min-width: 1000px) { .footer__grid--mega { grid-template-columns: 1.5fr repeat(4, 1fr); } }
.footer__brand { display: grid; gap: .3rem; align-content: start; }
.footer__brand .tiny { margin: 0; }

/* Content pages */
.p-hero { display: grid; gap: 1.2rem; margin-bottom: 1.6rem; }
.p-hero .s-sub { margin-bottom: 1rem; }
.p-price { align-self: start; display: grid; gap: .15rem; padding: 1.1rem 1.25rem; border-radius: var(--radius-sm); background: var(--navy); color: #fff; min-width: 220px; }
.p-price--soft { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.p-price__k { font-size: .875rem; font-weight: 700; opacity: .75; }
.p-price__v { font-family: var(--display); font-size: clamp(1.4rem, 4vw, 1.9rem); letter-spacing: -.02em; line-height: 1.1; }
.p-price small { font-size: .875rem; opacity: .75; }
@media (min-width: 860px) { .p-hero { grid-template-columns: 1fr auto; align-items: start; } }
.p-intro { max-width: 70ch; font-size: 1.05rem; line-height: 1.65; }
.p-intro p { margin: 0 0 .9rem; }
.p-intro a, .p-faq a, .p-sec a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }
.p-tiles { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.p-tile { display: grid; gap: .3rem; padding: 1rem 1.1rem; border-radius: var(--radius-sm); background: #fff; border: 1px solid var(--line); color: var(--ink); transition: border-color .2s, transform .3s var(--ease), box-shadow .3s; }
.p-tile:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.p-tile b { font-size: 1rem; }
.p-tile span { font-size: .85rem; color: var(--muted); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.p-benefits { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.p-benefit { padding: 1.1rem 1.2rem; border-radius: var(--radius-sm); background: var(--paper); border: 1px solid var(--line); }
.p-benefit b { display: block; font-size: 1rem; margin-bottom: .3rem; }
.p-benefit p { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.5; }
.p-specs { width: 100%; max-width: 640px; border-collapse: collapse; background: #fff; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); }
.p-specs th, .p-specs td { padding: .7rem .9rem; text-align: left; border-bottom: 1px solid var(--line); font-size: .95rem; }
.p-specs th { width: 45%; color: var(--muted); font-weight: 600; }
.p-specs tr:last-child th, .p-specs tr:last-child td { border-bottom: 0; }
.p-sec p { max-width: 70ch; line-height: 1.6; }
.p-faq { display: grid; gap: .5rem; max-width: 760px; }
.p-faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 1.1rem; }
.p-faq summary { cursor: pointer; list-style: none; padding: .9rem 0; font-weight: 700; display: flex; justify-content: space-between; gap: 1rem; }
.p-faq summary::-webkit-details-marker { display: none; }
.p-faq summary::after { content: '+'; color: var(--accent); font-weight: 800; flex-shrink: 0; }
.p-faq details[open] summary::after { content: '–'; }
.p-faq details p { margin: 0 0 1rem; color: var(--muted); line-height: 1.55; }
.p-related { display: flex; flex-wrap: wrap; gap: .5rem; }
.p-related .s-chip { text-decoration: none; }
.p-reviews { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.p-review { margin: 0; padding: 1.2rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.p-review p { margin: 0 0 .8rem; line-height: 1.55; }
.p-review footer { display: flex; justify-content: space-between; gap: .6rem; font-size: .85rem; color: var(--muted); }
.p-review footer b { color: var(--ink); }
.p-sitemap { display: grid; gap: 1.2rem 1.6rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.p-sitemap h3 { margin: 0 0 .4rem; font-size: 1rem; }
.p-sitemap ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .15rem; }
.p-sitemap a { color: var(--ink); font-size: .92rem; }
.p-sitemap a:hover { color: var(--accent-2); }
.d-list { display: grid; gap: .5rem; padding: 0; margin: 0; list-style: none; max-width: 70ch; }
.d-list li { position: relative; padding-left: 1.5rem; line-height: 1.5; }
.d-list li::before { content: ''; position: absolute; left: 0; top: .5em; width: .7rem; height: .7rem; border-radius: 50%; background: var(--accent); }
.s-empty { padding: 1.4rem; border-radius: var(--radius-sm); background: var(--paper); border: 1px dashed var(--line); color: var(--muted); }
.s-empty p { margin: 0; }

/* Home hero: original Ivanovo view with the animated brand, plus trust strip. */
body[data-page="home"] .s-page { padding-top: 0; }
.hero--home { min-height: min(100svh, 920px); }
.hero--home .hero__content { max-width: 760px; width: min(760px, calc(100% - 1.35rem)); }
.hero__sub { max-width: 46ch; }
.hero--home .hero__cta { display: grid; gap: .6rem; margin: 0 0 1.1rem; }
.hero__call { display: none; }
.hero--home .btn-ghost { background: rgba(255, 255, 255, .14); color: #fff; border: 1px solid rgba(255, 255, 255, .45); backdrop-filter: blur(8px); }
.hero--home .btn-ghost:hover { background: rgba(255, 255, 255, .26); color: #fff; }
.hero__trust { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; margin: 0; padding: 0; list-style: none; }
.hero__trust li { display: grid; gap: .1rem; padding: .6rem .75rem; border-radius: 12px; background: rgba(15, 27, 45, .42); border: 1px solid rgba(255, 255, 255, .16); backdrop-filter: blur(10px); color: #fff; }
.hero__trust b { font-family: var(--display); font-size: 1.05rem; letter-spacing: -.02em; }
.hero__trust span { font-size: .875rem; opacity: .85; line-height: 1.3; }
.anim-rise { animation: rise .85s var(--ease) both; }
.delay-2 { animation-delay: .16s; } .delay-3 { animation-delay: .24s; } .delay-4 { animation-delay: .32s; }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
@media (min-width: 860px) {
  .hero--home .hero__cta { grid-template-columns: auto auto auto; justify-content: start; gap: .75rem; }
  .hero--home .hero__cta .btn { width: auto; min-width: 180px; }
  .hero__call { display: inline-flex; }
  .hero__trust { grid-template-columns: repeat(3, 1fr); max-width: 600px; }
}
@media (prefers-reduced-motion: reduce) { .hero__img, .hero__shine, .anim-rise, .hero__brand-letter, .hero__brand-glass, .hero__brand-glint, .hero__brand-name, .hero__promise > span { animation: none !important; opacity: 1; } }
@media (max-width: 859px) { .hero--home { padding-bottom: calc(1.4rem + 64px + var(--safe-b)); } }

/* Section covers: page hero media and mega-menu feature picture */
.p-hero__media { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--navy); min-height: 220px; }
.p-hero__img { display: block; width: 100%; height: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.p-hero__media .p-price { position: absolute; left: .8rem; right: .8rem; bottom: .8rem; min-width: 0; background: rgba(19, 34, 56, .88); backdrop-filter: blur(8px); }
.p-hero__media .p-price--soft { background: rgba(255, 255, 255, .92); border: 0; }
@media (min-width: 860px) { .p-hero { grid-template-columns: 1.1fr 1fr; align-items: center; gap: 2rem; } .p-hero__media { min-height: 300px; } }
.mega__feat { position: relative; overflow: hidden; }
.mega__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .38; }
.mega__feat > :not(.mega__img) { position: relative; }
.mega__feat .mega__lead { text-shadow: 0 1px 10px rgba(0, 0, 0, .5); }

/* Generated accessory photos inside cards, tiles and the item page */
.s-card__img img, .h-pt__art img, .h-tile__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.h-tile__photo { display: block; aspect-ratio: 3 / 2; border-radius: var(--radius-sm); overflow: hidden; }
#i-art img { width: 100%; height: 100%; border-radius: var(--radius); display: block; }
.s-photo-note { display: block; margin-top: .4rem; font-size: .875rem; color: var(--muted); }
.s-gallery__stage--photo { padding: 0; }
.h-tile__photo { height: auto !important; background: none !important; }

/* Generated photos of typical windows replace the line drawings */
.type-photo { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 10px; }
.h-pt__art, .s-typ__art { overflow: hidden; }
.s-mini img, .s-line__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pb-pane__art img { width: 100%; height: auto; border-radius: var(--radius-sm); display: block; }

/* Photos inside profile blocks (sills, handles, layouts, glazing, montage) */
.pb-photo { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-sm); }
.pb-stage:has(.pb-photo) { padding: 0; overflow: hidden; background: #fff; }
.pb-stage .pb-photo { max-height: 340px; }
.pb-stage--tall .pb-photo--tall { max-width: 300px; max-height: 420px; }
.pb-stage.is-swap .pb-photo { animation: pb-pop .4s var(--ease); }
.pb-buytop__art img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; display: block; }


/* ---- Round 2: accessibility, price rule block, glossary, reviews ---- */
:focus-visible { outline: 3px solid var(--accent, #ed6500); outline-offset: 2px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent, #ed6500); outline-offset: 2px; }
/* Minimum tap size 44px for header and menu controls */
.nav__btn, .hicon, .burger, .header__cta, .header__phone, .macc__h, .mnav__link, .mnav__tel { min-height: 44px; }
.hicon, .burger { min-width: 44px; }
.hero__trust { grid-template-columns: repeat(3, 1fr); }
.hero__trust li { padding: .55rem .6rem; }
.hero__trust b { font-size: .95rem; }
.h-nums--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 520px) { .h-nums--3 { grid-template-columns: 1fr; } }
.h-incl { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.h-incl__col { padding: 1.1rem 1.2rem; border-radius: 16px; border: 1px solid var(--line, #dfe6ee); background: #fff; }
.h-incl__col h3 { margin: 0 0 .6rem; font-size: 1.05rem; }
.p-gloss { margin-top: .6rem; }
.h-photo-note { display: block; margin-top: .35rem; opacity: .85; }
.p-reviews { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
/* Floating contact widget would collide with the bottom bar on phones */
@media (max-width: 859px) {
  body { padding-bottom: calc(72px + var(--safe-b, 0px)); }
  .contact-widget, .sticky-bar { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
/* Header fit: wider row, phone only on very wide screens, compact nav so items never overlap */
.header--mega > .container, .mega__in.container { width: min(1560px, calc(100% - 1.35rem)); }
@media (min-width: 1100px) and (max-width: 2099px) { .header--mega .header__phone { display: none; } .nav__btn { padding: .4rem .45rem; font-size: .86rem; } }
@media (min-width: 1100px) and (max-width: 1299px) { .nav__btn { padding: .35rem .3rem; font-size: .8rem; } .header--mega .logo__img { width: 160px; } .header__cta { padding: .5rem .75rem; font-size: .85rem; } }
.header__phone { white-space: nowrap; }
/* Price cards: the photo stays inside its frame, text always below it on white */
.h-card__img { display: block; height: auto; aspect-ratio: 16 / 10; overflow: hidden; padding: 0; }
.h-card__img > img, .h-card__img > .type-photo { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.h-card b { font-size: 1.15rem; color: var(--ink, #172637); }
.h-card__text { color: #4a5868; font-size: .95rem; }
/* Works page: large cards, two columns on desktop */
.works-tabs { margin: 0 0 1.2rem; flex-wrap: wrap; }
.works-big { display: grid; gap: 1.4rem; grid-template-columns: 1fr; }
@media (min-width: 860px) { .works-big { grid-template-columns: repeat(2, 1fr); gap: 1.8rem; } }
.works-big .h-work { margin: 0; background: #fff; border-radius: 18px; overflow: hidden; box-shadow: 0 10px 30px rgba(23, 38, 55, .10); }
.works-big .h-work img { width: 100%; aspect-ratio: 4 / 3; height: auto; object-fit: cover; display: block; }
.works-big .h-work figcaption { display: grid; gap: .3rem; padding: 1.1rem 1.3rem 1.3rem; }
.works-big .h-work b { font-family: var(--display); font-size: 1.35rem; }
.works-big .h-work span { font-size: 1.05rem; color: #4a5868; }
.works-big .h-work small { font-size: .95rem; color: var(--accent, #ed6500); font-weight: 700; }
/* Works: click a photo to view it large */
.works-big .h-work img { cursor: zoom-in; transition: transform .35s ease; }
.works-big .h-work:hover img { transform: scale(1.03); }
.work-lb { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 1rem; background: rgba(10, 18, 28, .88); cursor: zoom-out; }
.work-lb img { max-width: min(1400px, 100%); max-height: 84vh; border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.work-lb p { margin: .8rem 0 0; color: #fff; font-size: 1.1rem; text-align: center; }
.work-lb button { position: absolute; top: 1rem; right: 1rem; width: 48px; height: 48px; border: 0; border-radius: 50%; background: #fff; font-size: 1.6rem; cursor: pointer; }

/* ===== Polish pass 2026-11-06: layout width, type scale, lists, cards, mobile carousels, browser surfaces ===== */
/* One content width for header and page, so their edges line up */
@media (min-width: 1100px) {
  .container, .header--mega > .container, .mega__in.container { width: min(1280px, calc(100% - 3rem)); }
  .nav__btn { padding: .4rem .42rem; font-size: .84rem; }
}
@media (min-width: 1100px) and (max-width: 1299px) { .nav__btn { padding: .35rem .26rem; font-size: .78rem; } }
/* Slightly larger type on desktop: everything is rem-based */
@media (min-width: 1280px) { html { font-size: 17px; } }
.s-block { margin-top: clamp(2.6rem, 5vw, 3.6rem); }
h1, h2, h3, .s-title, .h-h2 { text-wrap: balance; }
p, li, figcaption { text-wrap: pretty; }
.nw { white-space: nowrap; }
/* Small-text floor */
.h-pt__name small, .h-pt__name span, .s-note, .h-sw small, .h-sw span, .business-details, .business-details p, .h-photo-note, .h-quiz__k, .consent-check, .consent-check span, .tiny, .h-work small, .h-work em, .pb-sub, .s-cmptable th { font-size: max(.82rem, 13.5px); }
.s-note, .business-details p { line-height: 1.55; }
/* Prices and specs line up digit under digit */
.s-card__price, .h-card__price, .p-price__v, .h-pt, .s-table, .s-cmptable, .h-nums b, #hero-price, .s-line__price, .s-sum { font-variant-numeric: tabular-nums; }

/* Browser surfaces in brand colours */
::selection { background: rgba(232, 93, 4, .22); color: var(--ink); }
html { scrollbar-color: #b9c4d0 transparent; accent-color: var(--accent); caret-color: var(--accent); -webkit-tap-highlight-color: rgba(232, 93, 4, .12); }
a { text-underline-offset: 3px; }

/* Check lists: icon inside the row, never on the border */
.d-list { display: grid; gap: .5rem; max-width: none; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }
.d-list li { position: relative; padding: .8rem 1rem .8rem 2.75rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); font-weight: 650; line-height: 1.4; }
.d-list li::before { content: ""; position: absolute; left: .95rem; top: .88rem; translate: none; width: 1.15rem; height: 1.15rem; border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8.4l2.6 2.6L12 5.4'/%3E%3C/svg%3E") center / 78% no-repeat; }
/* Inside the "what is included" cards the rows are plain: no card in a card */
.h-incl__col .d-list { grid-template-columns: 1fr; gap: 0; }
.h-incl__col .d-list li { background: none; border: 0; border-radius: 0; padding: .6rem 0 .6rem 1.9rem; }
.h-incl__col .d-list li + li { border-top: 1px solid var(--line); }
.h-incl__col .d-list li::before { left: 0; top: .68rem; }
.h-incl__col:nth-child(2) .d-list li::before { background-color: #8b98a8;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M8 4v8M4 8h8'/%3E%3C/svg%3E"); }
.h-incl__col h3 { margin-bottom: .3rem; }

/* "Why" cards: even border instead of a coloured side stripe */
.h-why div { border: 1px solid var(--line); border-left-width: 1px; background: #fff; padding: 1.15rem 1.25rem; }
.h-why b { margin-bottom: .35rem; }
.h-why span { font-size: .92rem; }

/* Direction cards fill the row instead of leaving an empty column */
.h-cards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
@media (min-width: 700px) { .h-cards { grid-template-columns: repeat(auto-fit, minmax(240px, 400px)); } }
.h-card, .s-card, .h-work, .p-tile, .p-benefit { transition: box-shadow .25s cubic-bezier(.16, 1, .3, 1), transform .25s cubic-bezier(.16, 1, .3, 1), border-color .25s; }

/* Guarantee numbers stay in one row on phones */
@media (max-width: 520px) {
  .h-nums--3 { grid-template-columns: repeat(3, 1fr); gap: .5rem; }
  .h-nums--3 div { padding: .9rem .35rem; border-radius: 14px; }
  .h-nums--3 b { font-size: clamp(1.15rem, 5.6vw, 1.6rem); }
  .h-nums--3 span { font-size: .8rem; line-height: 1.25; display: block; }
}

/* Works: titles sized for phones */
.works-big .h-work b { font-size: clamp(1.05rem, 4.2vw, 1.35rem); line-height: 1.2; }
.works-big .h-work span { font-size: 1rem; }

/* Content pages: text column plus a sticky "free measurement" card on wide screens */
.p-aside { display: none; }
@media (min-width: 1100px) {
  .p-cols { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 2.4rem; align-items: start; }
  .p-aside { display: block; position: sticky; top: calc(var(--header, 72px) + 1.2rem); }
  .p-aside__card { display: grid; gap: .8rem; padding: 1.3rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(15, 27, 45, .07); }
  .p-aside__t { font-family: var(--display); font-size: 1.1rem; letter-spacing: -.01em; }
  .p-aside__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; font-size: .92rem; color: #3d4b5c; }
  .p-aside__list li { position: relative; padding-left: 1.5rem; line-height: 1.4; }
  .p-aside__list li::before { content: ""; position: absolute; left: 0; top: .2em; width: 1rem; height: 1rem; border-radius: 50%;
    background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8.4l2.6 2.6L12 5.4'/%3E%3C/svg%3E") center / 78% no-repeat; }
  .p-aside__tel { font-weight: 800; font-size: 1.15rem; color: var(--ink); text-align: center; font-variant-numeric: tabular-nums; }
  .p-aside__tel:hover { color: var(--accent-2); }
  .p-aside__h { margin-top: -.6rem; text-align: center; font-size: .82rem; color: var(--muted); }
  .p-main > .s-block:first-child, .p-main > .p-intro:first-child { margin-top: 0; }
}

/* Phones: long card stacks become swipeable rows; the next card peeks in to show there is more */
@media (max-width: 699px) {
  #prof-grid, .p-main .s-grid[data-systems], #works-list.works-big {
    display: flex; gap: .8rem; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none;
    margin-inline: -.7rem; padding: .2rem .7rem 1rem; scroll-padding-inline: .7rem; -webkit-overflow-scrolling: touch; }
  #prof-grid::-webkit-scrollbar, .p-main .s-grid[data-systems]::-webkit-scrollbar, #works-list.works-big::-webkit-scrollbar { display: none; }
  #prof-grid > *, .p-main .s-grid[data-systems] > * { flex: 0 0 80%; scroll-snap-align: start; }
  #works-list.works-big > * { flex: 0 0 84%; scroll-snap-align: start; }
  #prof-grid > .h-all { flex-basis: 58%; min-height: 0; }
  /* Direction cards: compact rows with the photo on the left */
  .h-card { display: grid; grid-template-columns: 104px 1fr; column-gap: .9rem; row-gap: .15rem; align-items: start; padding: .8rem; }
  .h-card__img { grid-row: 1 / span 4; aspect-ratio: 1; margin: 0; align-self: stretch; height: 100%; min-height: 104px; }
  .h-card b { font-size: 1.05rem; }
  .h-card__text { font-size: .9rem; }
  .h-card__price { margin-top: .2rem; padding-top: 0; }
  /* Chat lives in the bottom bar on phones, not over the content */
  .okc-fab { display: none !important; }
  .okc-menu { bottom: calc(64px + var(--safe-b, 0px) + 10px) !important; right: 10px !important; }
}
/* Polish pass, round 2 */
@media (min-width: 1100px) {
  .nav__btn { font-size: 13.5px; padding: 6px 6px; }
  .header--mega .logo__img { width: 172px; height: auto; }
  .nav--mega { margin-left: .3rem; gap: 0; }
  .h-why { grid-template-columns: repeat(3, 1fr); }
  #prof-grid > .h-all { grid-column: span 2; }
}
@media (min-width: 1100px) and (max-width: 1299px) { .nav__btn { font-size: 12.5px; padding: 6px 4px; } .header--mega .logo__img { width: 150px; } }
.h-pt .btn, .s-card .btn, .btn-lg { white-space: nowrap; }
@media (min-width: 700px) { .h-cards { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } .h-cards > :only-child { max-width: 420px; } }
@media (max-width: 699px) {
  .h-card__img { aspect-ratio: auto; width: 104px; height: auto; min-height: 104px; }
  .h-card > :not(.h-card__img) { grid-column: 2; min-width: 0; }
}
@media (max-width: 520px) { #hero-price .hero-sep { display: none; } #hero-price .nw { display: block; } }
@media (min-width: 1100px) and (max-width: 1299px) { .nav__btn svg, .nav__btn::after { display: none; } .header__cta { padding: .5rem .7rem; font-size: 13px; } .header--mega .header__row { gap: .35rem; } }

/* ---- Catalogue redesign (2026-11): system card, help band, filters ---- */
/* Product photo area: corner samples whole on a neutral background (contain), lifestyle photos fill the frame (cover). */
.s-card__img--cover, .s-card__img--contain, .s-card__img--art { display: block; position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-bottom: 1px solid var(--line); }
.s-card__img--cover { background: #e9edf1; }
.s-card__img--cover img { width: 100%; height: 100%; object-fit: cover; padding: 0; transition: transform .6s var(--ease); }
.s-card:hover .s-card__img--cover img { transform: scale(1.03); }
.s-card__img--contain { background: #eef1f4; }
.s-card__img--contain img { width: 100%; height: 100%; object-fit: contain; padding: 0; }
.s-card__img--art { background: var(--paper); }
.s-card__img--art svg { width: 100%; height: 100%; padding: 8%; }
.s-card__cap { position: absolute; left: .6rem; bottom: .6rem; padding: .2rem .55rem; border-radius: 8px; background: rgba(15, 27, 45, .74); color: #fff; font-size: .78rem; font-weight: 650; }
.s-card h3 { font-size: 1.16rem; }
.s-card__mark { color: var(--muted); font-weight: 650; }
.s-card__who { margin: 0; font-size: .93rem; line-height: 1.4; color: #3d4b5c; }
.s-card__nums { display: flex; flex-wrap: wrap; margin: 0; font-size: .87rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.s-card__nums span { white-space: nowrap; }
.s-card__nums span:not(:last-child)::after { content: "·"; margin: 0 .45rem; color: #a6b2bf; }
.s-card--sys .s-price { font-size: 1.28rem; padding-top: .45rem; }
.s-card--sys .s-card__actions { grid-template-columns: minmax(0, 1fr) auto auto; gap: .4rem; }
.s-card .s-card__cart { padding-inline: .7rem; font-size: .86rem; }
.s-card__actions--one { grid-template-columns: 1fr; }
.s-card h3 a:focus-visible { outline: none; }
.s-card:has(h3 a:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }

/* "Не знаете, какие окна выбрать?" band (ui.js helpBand) */
.help-band { display: grid; gap: 1rem 2rem; align-items: center; margin: 1.2rem 0 1.8rem; padding: 1.25rem 1.3rem; border-radius: var(--radius); background: #fff4ea; border: 1px solid rgba(232, 93, 4, .22); }
@media (min-width: 960px) { .help-band { grid-template-columns: minmax(0, 1fr) auto; padding: 1.5rem 1.8rem; } }
.help-band h2 { font-family: var(--display); font-size: clamp(1.12rem, 2.6vw, 1.4rem); letter-spacing: -.02em; line-height: 1.25; margin: 0 0 .3rem; }
.help-band p { margin: 0; color: #3d4b5c; line-height: 1.5; }
.help-band__actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.help-band__actions .btn { min-height: 50px; }
.help-band__actions svg { width: 20px; height: 20px; flex-shrink: 0; }
.help-band__tel span { font-variant-numeric: tabular-nums; }
.help-band__quiz { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .3rem; font-weight: 750; color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.help-band__quiz:hover { color: var(--accent-2); }
@media (max-width: 560px) { .help-band__actions .btn { flex: 1 1 100%; } .help-band__quiz { justify-content: center; flex: 1 1 100%; } }

/* Catalogue filters, section headings and the compact REHAU table */
.cat-filters { display: grid; gap: .55rem; margin: 1.3rem 0 1.6rem; }
.cat-filter { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .8rem; }
.cat-filter__l { min-width: 4.6rem; font-weight: 750; font-size: .92rem; color: var(--muted); }
.cat-filter .s-chips { margin: 0; }
.cat-filter .s-chip { min-height: 42px; padding-inline: 1rem; }
.cat-h { font-family: var(--display); font-size: clamp(1.2rem, 3vw, 1.5rem); letter-spacing: -.02em; margin: 0 0 1rem; }
.cat-h small { font-family: var(--font, inherit); font-size: .95rem; font-weight: 650; color: var(--muted); letter-spacing: 0; }
.cat-more { margin-top: clamp(2.4rem, 5vw, 3.4rem); }
.cat-more .s-sub { margin-bottom: 1rem; }
.cat-table th, .cat-table td { text-align: left; min-width: 112px; }
.cat-table th[scope="row"] { min-width: 190px; max-width: 260px; }
.cat-table th[scope="row"] a { display: block; font-weight: 800; color: var(--ink); font-size: .98rem; }
.cat-table th[scope="row"] small { display: block; font-weight: 500; line-height: 1.35; margin-top: .15rem; }
.cat-table td b { white-space: nowrap; }
.s-empty .btn { margin-top: .8rem; }
@media (prefers-reduced-motion: reduce) { .s-card__img--cover img { transition: none; } }
/* Home: four short "why" points, accessories as one line of links */
@media (min-width: 700px) { .h-why--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .h-why--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.h-acc-line { margin: 1.2rem 0 0; line-height: 1.7; }
.h-acc-line a { color: var(--ink); font-weight: 650; text-decoration-color: var(--accent); }
.h-acc-line a:hover { color: var(--accent-2); }
#profiles .help-band { margin: 1.6rem 0 0; }
@media (min-width: 1100px) { #prof-grid > .h-all { grid-column: auto; } }
/* Catalogue on phones: compact rows (photo left, facts right, actions below) instead of a long stack of tall cards */
@media (max-width: 599px) {
  #grid-windows { gap: .7rem; }
  #grid-windows .s-card--sys { display: grid; grid-template-columns: 116px minmax(0, 1fr); align-content: start; }
  #grid-windows .s-card--sys .s-card__body { display: contents; }
  #grid-windows .s-card--sys > :first-child { grid-column: 1; grid-row: 1 / span 4; aspect-ratio: auto; height: 100%; min-height: 150px; border-bottom: 0; border-right: 1px solid var(--line); }
  #grid-windows .s-card--sys h3, #grid-windows .s-card--sys .s-card__who, #grid-windows .s-card--sys .s-card__nums, #grid-windows .s-card--sys .s-price { grid-column: 2; padding-inline: .85rem; margin: 0; }
  #grid-windows .s-card--sys h3 { padding-top: .8rem; font-size: 1.05rem; }
  #grid-windows .s-card--sys .s-card__who { padding-top: .25rem; font-size: .88rem; }
  #grid-windows .s-card--sys .s-card__nums { padding-top: .3rem; font-size: .82rem; }
  #grid-windows .s-card--sys .s-price { padding-top: .4rem; padding-bottom: .7rem; font-size: 1.15rem; }
  #grid-windows .s-card--sys .s-card__actions { grid-column: 1 / -1; padding: .7rem .85rem .85rem; border-top: 1px solid var(--line); }
  #grid-windows .s-card__cap { left: .35rem; right: .35rem; bottom: .35rem; font-size: .7rem; }
}
/* Home hero: larger brand lockup on desktop, slogan back under it */
@media (min-width: 1100px) { .hero--home .hero__brand { font-size: clamp(4.2rem, 6.2vw, 6rem); } .hero--home .hero__promise { font-size: 1.05rem; margin-top: .9rem; } }

/* ---- Final QA pass (2026-11-08) ---- */
/* Window type schemes: the drawn layout on a light plate, same box as the photo it replaces */
.type-scheme { display: grid; place-items: center; width: 100%; height: 100%; padding: 8%; background: #f4f7fa; border-radius: inherit; box-sizing: border-box; }
.type-scheme svg { width: 100%; height: 100%; display: block; }
.h-pt__art .type-scheme { padding: 4px; border-radius: 10px; }
.h-pt__art .type-scheme svg { width: 100%; height: 100%; }
.pp-type__img .type-scheme { padding: 10%; }
/* Four benefit cards: two by two instead of three plus an orphan */
@media (min-width: 640px) { .p-benefits:has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Price table fills the container on wide screens and still scrolls on phones */
.c-table { min-width: max(100%, 860px); }
/* Comparison: equal product columns and one picture box size */
.s-cmptable thead td { width: 230px; }
.s-cmptable .s-cmp__img { width: 100%; max-width: 230px; margin: 0 auto .5rem; border-radius: 10px; overflow: hidden; background: #f3f5f7; }
/* Example pictures (sill surfaces) */
.s-examples__grid { display: grid; gap: .8rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .s-examples__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.s-examples figure { margin: 0; border-radius: var(--radius-sm, 12px); overflow: hidden; background: #fff; border: 1px solid var(--line); }
.s-examples img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.s-examples figcaption { padding: .5rem .7rem .6rem; font-size: .9rem; font-weight: 650; }
#acc-extra .s-examples { margin-top: 1.6rem; }
/* Product page: add-ons as picture tiles */
.pp-add__h { margin: 1.6rem 0 .7rem; font-size: 1.05rem; }
.pp-add { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); margin: 0; padding: 0; list-style: none; }
.pp-add a { display: grid; grid-template-columns: 64px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: .75rem; align-items: center; min-height: 64px; padding: .5rem; border-radius: var(--radius-sm, 12px); border: 1px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; transition: border-color .2s; }
.pp-add a:hover { border-color: rgba(232, 93, 4, .45); }
.pp-add__img { grid-row: 1 / span 2; width: 64px; height: 64px; border-radius: 9px; overflow: hidden; background: #f4f7fa; display: grid; place-items: center; }
.pp-add__img img, .pp-add__img svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.pp-add__n { font-weight: 750; align-self: end; }
.pp-add small { color: var(--muted); font-size: max(.82rem, 13.5px); align-self: start; }
/* Generated hero pictures carry their note on the picture */
.p-hero__note { position: absolute; left: .8rem; top: .8rem; padding: .3rem .6rem; border-radius: 8px; background: rgba(255, 255, 255, .9); color: #31415a; font-size: max(.78rem, 13px); font-weight: 650; }
/* Phones: small text links keep their look but get a 44px tap area */
@media (max-width: 767px) {
  .s-crumbs a, .footer a.tiny, .footer__phone { display: inline-block; padding-block: .75rem; margin-block: -.75rem; }
  .footer a.tiny, .footer__phone { margin-block: -.45rem; }
}
/* Accessory page: photos fill the stage, drawn schemes stay whole */
.s-gallery__stage--photo img { object-fit: cover; padding: 0; }

/* Phones: light scrolling. No fade-in on scroll, no sideways snapping inside the page, no smooth-scroll easing. */
@media (max-width: 859px) {
  html { scroll-behavior: auto; }
  body { overflow-x: clip; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .s-cmpwrap { scroll-snap-type: none; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
  #cats.s-tabs { overscroll-behavior-x: contain; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
}
