/* Tablet and compact desktop layouts. */
@media (761px <= width <= 1420px) {
  html { --ep-header-height: 84px; }
  #ekranpro-first-screen .ep1-header .ep1-mainbar {
    height: 84px;
    padding-block: 0;
    grid-template: "logo nav search contacts social" 1fr / 135px minmax(0, 1fr) 44px max-content 116px;
    gap: 12px;
  }
  #ekranpro-first-screen .ep1-header .ep1-nav { gap: 12px; }
  #ekranpro-first-screen .ep1-header .ep1-search { position: relative; width: 44px; }
  #ekranpro-first-screen .ep1-header .ep1-search input { display: none; }
  #ekranpro-first-screen .ep1-header .ep1-search.ep-search-expanded input {
    display: block;
    position: absolute;
    right: -1px;
    top: calc(100% + 12px);
    z-index: 12;
    width: min(320px, 50vw);
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid #a8b0b9;
    background: #171e27;
  }
  #ekranpro-first-screen .ep1-header:has(.ep-search-expanded) .ep1-catalog {
    top: calc(100% + 40px);
    max-height: calc(100dvh - var(--ep-header-height) - 56px);
  }
  #ekranpro-first-screen .ep1-hero {
    padding-top: calc(var(--ep-header-height) + clamp(24px, 6vh, 64px));
  }
  #ekranpro-first-screen .ep1-hero h1 {
    max-inline-size: 100%;
    font-size: clamp(30px, 4.1vw, 62px);
  }
  #ekranpro-first-screen .ep1-hero h1 .ep-hero-title-end,
  #ekranpro-first-screen .ep1-hero h1 .ep-hero-title-start { display: block; }
  #ekranpro-first-screen .ep1-hero h1 .ep-hero-title-start { text-wrap: balance; }
  #ekranpro-first-screen .ep1-hero h1 .ep-hero-title-break { display: none; }
  #ekranpro-first-screen .ep1-hero-content { max-width: 52%; padding-bottom: 20px; }
  #ekranpro-first-screen .ep1-hero-actions {
    position: static;
    margin-top: clamp(20px, 3.5vh, 38px);
    flex-direction: column;
    align-items: stretch;
    width: min(320px, 100%);
    gap: 8px;
  }
  #ekranpro-first-screen .ep1-hero-actions :is(.ep1-hero-cta, .ep1-catalog-link) {
    flex: none;
    width: 100%;
  }
  .cat-main .sx-hero h1 {
    max-inline-size: 52%;
    font-size: clamp(30px, min(5vw, 9svh), 70px);
    overflow-wrap: break-word;
  }
  .cat-main .sx-hero-lead { max-inline-size: 52%; }
}
@media (761px <= width <= 1180px) {
  #ekranpro-first-screen .ep1-header .ep1-mainbar {
    grid-template: "logo toggle search contacts social" 1fr / minmax(135px, 1fr) 64px 44px max-content 116px;
  }
  #ekranpro-first-screen .ep1-header .ep1-menu-toggle {
    display: block;
    position: relative;
    font-size: 0;
  }
  #ekranpro-first-screen .ep1-header .ep1-menu-toggle::before {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    content: "";
    width: 22px;
    height: 2px;
    background: currentColor;
    box-shadow: 0 -7px currentColor, 0 7px currentColor;
  }
  #ekranpro-first-screen .ep1-header .ep1-menu-toggle[aria-expanded="true"]::before {
    content: "×";
    width: auto;
    height: auto;
    background: none;
    box-shadow: none;
    font-size: 25px;
  }
  #ekranpro-first-screen .ep1-header .ep1-nav { display: none; }
  #ekranpro-first-screen .ep1-header .ep1-nav.is-open {
    display: flex;
    position: absolute;
    top: 100%;
    right: 4.8%;
    z-index: 10;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: min(330px, 90vw);
    max-height: calc(100dvh - var(--ep-header-height) - 16px);
    overflow: auto;
    padding: 12px 22px;
    background: #171e27;
    box-shadow: 0 16px 25px #0004;
  }
  #ekranpro-first-screen .ep1-header .ep1-nav.is-open .ep1-catalog-toggle { width: 100%; justify-content: space-between; }
  #ekranpro-first-screen .ep1-header:has(.ep1-nav.is-open) .ep1-catalog { visibility: hidden; }
  .cat-main .sx-hero-actions { flex-direction: column; align-items: flex-start; gap: 8px; }
  .cat-main .sx-hero-actions > * { flex: none; width: min(320px, 100%); }
}
#ep-page-end #ep-contact .epf-legal-links a {
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}
#ep-podbor .pb-q button {
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  padding-inline: 4px;
}
#ep-podbor .pb-cell:has(> .pb-q) { container: pb-quality / inline-size; }
@container pb-quality (max-width: 265px) {
  #ep-podbor .pb-q { grid-template-columns: minmax(0, 1fr); }
}
#ep-podbor .pb-cta-c #pb-open > span:first-child {
  min-inline-size: 0;
  white-space: normal;
}
@media (max-width: 480px) and (max-height: 700px) {
  #pb-dialog {
    inline-size: calc(100% - 16px);
    max-inline-size: none;
    max-block-size: calc(100dvh - 16px);
  }
  #pb-dialog .pb-dlg { padding: 10px 12px; }
  #pb-dialog .pb-dlg-h { align-items: center; margin-block-end: 6px; }
  #pb-dialog .pb-dlg-h h3 { font-size: 20px; line-height: 1.2; }
  #pb-dialog .pb-x { flex: none; margin: 0; }
  #pb-dialog .pb-sum {
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 1px 8px;
    margin: 0 0 6px;
    padding: 6px 8px;
    font-size: 12px;
    line-height: 1.2;
  }
  #pb-dialog .pb-form { gap: 5px; }
  #pb-dialog .pb-form label { gap: 2px; }
  #pb-dialog .pb-form :is(input, textarea) {
    min-block-size: 44px;
    padding: 6px 8px;
    font-size: 16px;
    line-height: 1.25;
  }
  #pb-dialog .pb-form textarea { block-size: 54px; }
  #pb-dialog .pb-form .pb-btn { min-block-size: 44px; }
  #pb-dialog .pb-note { margin: 0; line-height: 1.2; }
}
#ep-podbor .pb-controls { container: pb-controls / inline-size; }
#ep-podbor .pb-places:not(.pb-places--mf) .pb-place > span {
  max-inline-size: 100%;
  white-space: normal;
}
@container pb-controls (max-width: 340px) {
  #ep-podbor .pb-places:not(.pb-places--mf) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@container pb-controls (max-width: 225px) {
  #ep-podbor .pb-places:not(.pb-places--mf) { grid-template-columns: minmax(0, 1fr); }
}
@container pb-controls (max-width: 275px) {
  #ep-podbor .pb-mount { grid-auto-flow: row; }
  #ep-podbor .pb-mount button { border-right: 0; }
  #ep-podbor .pb-mount button + button { border-top: 1px solid var(--pb-ink); }
}
#ep-podbor .pb-tile-card { inline-size: 100%; }
#ep-podbor .pb-tile-h { white-space: normal; }
#ep-podbor .pb-tags {
  max-inline-size: 100%;
  flex-wrap: wrap;
  justify-content: flex-end;
}
@media (min-width: 761px) {
  #ep-podbor .pb-view .pb .pb-foot {
    grid-column: 1 / -1;
    grid-row: 4;
    padding-inline: 24px;
  }
  #ep-podbor .pb-v--money { white-space: normal; }
  #ep-podbor .pb-cta-c .pb-btn { white-space: normal; }
}
@media (761px <= width <= 1200px) {
  #ep-podbor .pb {
    grid-template-columns: minmax(0, clamp(280px, 30%, 320px)) minmax(0, 1fr);
    grid-template-rows: minmax(240px, 1fr) auto auto auto;
  }
  #ep-podbor .pb-result { display: contents; }
  #ep-podbor .pb-controls {
    grid-area: 1 / 1 / 4 / 2;
    border-right: 1px solid var(--pb-line);
    border-bottom: 0;
  }
  #ep-podbor .pb-scene { grid-area: 1 / 2 / 2 / 3; min-height: 240px; }
  #ep-podbor .pb-out { grid-area: 2 / 2 / 3 / 3; grid-template-columns: minmax(0, 1fr); }
  #ep-podbor .pb-cell { border-right: 0; }
  #ep-podbor .pb-cell + .pb-cell { border-top: 1px solid var(--pb-line); }
  #ep-podbor .pb-cta {
    container: pb-actions / inline-size;
    grid-area: 3 / 2 / 4 / 3;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #ep-podbor .pb-cta-c:empty { display: none; }
}
@container pb-actions (max-width: 460px) {
  #ep-podbor .pb-cta-c { grid-column: 1 / -1; }
}

/* The section's fixed navigation manages its own reveal. Its page wrapper scrolls normally. */
html body #ekranpro-first-screen:has(> .cat-main > .sx-hero) {
  position: relative !important;
  inset: auto;
}

@media (min-width: 761px) and (max-width: 1200px) {
  #ep-podbor .pb-row {
    grid-template-columns: minmax(74px, 1fr) minmax(48px, 1fr) 64px;
    gap: 8px;
  }
}

/* Audit follow-up: small-screen controls, hero readability and article tables. */
@media (max-width: 374px) {
  #ep-podbor #pb-q { grid-template-columns: minmax(0, 1fr); }
  html .ep-mbar > :is(a, button) {
    flex: 1 1 0 !important;
    min-inline-size: 0 !important;
    gap: 4px !important;
    font-size: 12px !important;
    white-space: normal !important;
    text-align: center !important;
  }
  html .ep-mbar svg { inline-size: 14px !important; block-size: 14px !important; }
  html.ep-ms .cat-main .ek-tiles { grid-template-columns: minmax(0, 1fr) !important; }
}
@media (min-width: 761px) {
  #ekranpro-first-screen .ep1-hero #ep1-main-title.ep-audit-city-title {
    max-inline-size: min(100%, 50vw);
    font-size: clamp(30px, 4.3vw, 66px);
    overflow-wrap: break-word;
  }
  .ep-audit-city-name { display: inline-block; max-inline-size: 100%; }
  .cat-main .sx-hero:has(#sx-h1) h1 {
    max-inline-size: min(52%, 37rem);
    font-size: clamp(32px, min(5.2vw, 9svh), 72px);
  }
  .cat-main .sx-hero:has(#sx-h1)::before {
    background: linear-gradient(90deg, #050b12e6 0%, #050b12cc 35%, #050b1299 52%, #050b1200 76%),
      linear-gradient(0deg, #050b12f5 0%, #050b12dc 13%, #050b1200 45%);
  }
}

/* The secondary dark controls retain their light labels. */
body :is(.ep1-hero-cta, .ep-btn--coral, .ep-mbar-cta, .ep-mbtn-cta, .ehc-btn, .epf-button,
  .ek-btn--cta, .ek-details, .pb-btn:not(.pb-btn--ink, .pb-btn--back)):not(:hover, :focus-visible, :active) {
  color: #171a1c !important;
}
body .ep-mbar .ep-mbar-cta:is(:hover, :focus-visible, :active) {
  background: #a73525 !important;
  color: #fff !important;
}
html.ep-ms :is(#ek-grid, #ek-related, .sx-models-grid) .ek-card .ek-details {
  color: #171a1c !important;
}
html.ep-ms :is(#ek-grid, #ek-related, .sx-models-grid) .ek-card .ek-details::before {
  color: inherit;
}
.ep-table-scroll-hint { display: none; }
@media (max-width: 700px) {
  .bl-text p.ep-table-scroll-hint {
    display: block;
    margin-block: 1.2rem .45rem;
    color: #303a40;
    font-size: .875rem;
    font-weight: 600;
  }
}
.bl-text .sx-scroll[tabindex="0"]:focus-visible { outline: 2px solid #935140; outline-offset: 3px; }

/* Site search uses WordPress titles, with a standard form and shareable results. */
#ekranpro-first-screen .ep1-nav .ep-site-search-mobile { display: none; }
@media (max-width: 760px) {
  #ekranpro-first-screen .ep1-nav.is-open .ep-site-search-mobile { display: flex; }
}
#ekranpro-first-screen .ep1-catalog .ep-site-search-all {
  display: inline-block;
  margin-block: 12px;
  color: #692115;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: .22em;
}
.ep-search-page,
.ep-search-page * { box-sizing: border-box; }
.ep-search-page { margin: 0; color: #171a1c; background: #f6f6f3; font-family: Inter, Arial, sans-serif; }
.ep-search-page a:focus-visible,
.ep-search-page :is(button, input):focus-visible { outline: 2px solid #935140; outline-offset: 3px; }
.ep-search-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 18px clamp(16px, 4.8vw, 76px);
  background: #171a1c;
  color: #fff;
}
.ep-search-page-header img { display: block; }
.ep-search-page-header nav { display: flex; flex-wrap: wrap; gap: 12px 20px; }
.ep-search-page-header a { color: inherit; }
.ep-search-page-main { max-inline-size: 920px; padding: clamp(24px, 5vw, 64px) 16px; margin-inline: auto; }
.ep-search-page-main h1 { margin: 0 0 .65em; font-size: clamp(30px, 5vw, 48px); }
.ep-search-page-field { display: flex; align-items: stretch; gap: 8px; margin-top: 8px; }
.ep-search-page-field input { min-inline-size: 0; flex: 1; padding: 12px; border: 1px solid #8b9296; font: inherit; }
.ep-search-page-field button { padding: 12px 20px; border: 0; background: #f36b52; color: #171a1c; font: inherit; font-weight: 600; cursor: pointer; }
.ep-search-page-field button:hover { background: #171a1c; color: #fff; }
.ep-search-page-main a { color: #692115; }
.ep-search-page-group { margin-top: 2rem; }
.ep-search-page-group h2 { font-size: clamp(20px, 4vw, 28px); }
.ep-search-page-group h2 span { color: #585f65; font-size: .75em; }
.ep-search-page-group ul { padding: 0; margin: 0 0 12px; list-style: none; border-top: 1px solid #d8dad7; }
.ep-search-page-group li a { display: block; padding: 10px 0; overflow-wrap: anywhere; border-bottom: 1px solid #d8dad7; }
.ep-search-page-back { display: inline-block; margin-top: 20px; }
.ep-search-page-pagination { display: flex; flex-wrap: wrap; gap: 10px 20px; }



