/* AVS sitewide Unslop polish: existing Engineering Atlas, Golos Text and blue pluses.
   Audit method: Unslop by Damir Sokolovsky, https://github.com/heydamir/unslop,
   CC BY 4.0. Rules address reviewed templates; content and scripts are retained. */

/* Shared labels: quieter hierarchy without changing brand/model spelling. */
body:not(.home-signature):not(.space-signature) main:not(.cp-wave2) :is(.eyebrow,.sem-eyebrow,.catalog-eyebrow,.cp-eyebrow,.cp-kicker) {
  font-size:12px;line-height:1.5;letter-spacing:.02em;text-transform:none;
}
body main :is(.sem-hero-nav,.sem-page-nav)>a {
  min-height:44px;display:inline-flex;align-items:center;
}

/* The gap is shared by the two adjacent blocks: 32+32, mobile24+24. */
body main .legacy-content>.page-title:has(+article.narrow-copy) { padding-bottom:32px; }
body main .legacy-content>.page-title+article.narrow-copy { padding-top:32px; }
body main .legacy-content>.page-title+article.narrow-copy>h2:first-child { margin-top:0; }
body main .legacy-content>.architecture-section>[data-technology-third]>h2:first-child {
  font-size:34px;line-height:1.18;letter-spacing:-.02em;
}

/* Preserve all cells and native table layout; scroll belongs to the table region. */
body main [data-sitewide-scroll-region] {
  max-width:100%;min-width:0;overflow-x:auto;overscroll-behavior-inline:contain;
}
body main [data-sitewide-scroll-region]:focus-visible { outline:2px solid #006f95;outline-offset:4px; }
body main table[data-sitewide-wide-table] { width:100%;min-width:680px;table-layout:auto; }
body main table[data-sitewide-wide-table] :is(th,td) {
  overflow-wrap:normal;word-break:normal;white-space:normal;vertical-align:top;
}
body main .avs-table-mobile-hint { display:none; }

@media(min-width:800px) {
  body main>nav.toc:has(+.featured-portfolio) {
    display:flex;flex-wrap:wrap;gap:8px 24px;padding-block:16px;
  }
  body main>nav.toc:has(+.featured-portfolio)>a { display:inline-flex;align-items:center;min-height:44px; }
}
@media(max-width:700px) {
  body main .legacy-content>.page-title:has(+article.narrow-copy) { padding-bottom:24px; }
  body main .legacy-content>.page-title+article.narrow-copy { padding-top:24px; }
  body main .legacy-content>.architecture-section>[data-technology-third]>h2:first-child { font-size:28px; }
  body main .catalog-page .catalog-directions {
    grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 16px;
  }
  body main .catalog-page .catalog-directions>a {
    font-size:14px;line-height:1.4;min-height:44px;padding:12px 0;gap:8px;min-width:0;overflow-wrap:anywhere;
  }
  body main .catalog-page .catalog-directions>a>span { flex-shrink:0; }
  body main .avs-table-mobile-hint {
    display:block;font-size:13px;line-height:1.5;color:#5b625f;margin:16px 0 12px;
  }
}
@media(max-width:360px) {
  body main .catalog-page .catalog-directions { grid-template-columns:minmax(0,1fr); }
  body:not(.home-signature):not(.space-signature) main:not(.cp-wave2) .legacy-content h1 { font-size:32px;line-height:1.12;overflow-wrap:normal; }
}
/* Art iteration: give long Russian category names the full cell width. */
@media(min-width:361px) and (max-width:700px){
 body main .catalog-page .catalog-directions>a{display:block;overflow-wrap:normal;hyphens:auto;}
 body main .catalog-page .catalog-directions>a>span{display:block;width:16px;margin-top:8px;}
}

/* Shared package/link spacing. Scoped to existing components; no layout changes. */
.avs-package-section .avs-package + .avs-package{margin-top:32px}
.avs-package-section .avs-package>strong:has(+a[data-package]){display:block;margin-bottom:12px}
.avs-package-section .avs-package>a[data-package]{display:inline-flex;align-items:center;min-height:44px;max-width:100%;text-underline-offset:4px}
.cp-main nav.cp-list{display:flex;flex-wrap:wrap;gap:12px 24px;align-items:center;padding-left:0}
.cp-main nav.cp-list>a{display:inline-flex;align-items:center;min-height:44px;max-width:100%}

/* Confirmed adjacent keyword links; preserve text and semantic destinations. */
.keyword-cluster__links{display:flex;flex-wrap:wrap;gap:12px 24px;align-items:center}
.keyword-cluster__links>a{display:inline-flex;align-items:center;min-height:44px;max-width:100%}

/* Existing source-home industry links, visible when its details is expanded. */
body.home-signature .avs-industry-tags{display:flex;flex-wrap:wrap;gap:12px 24px;align-items:center}
body.home-signature .avs-industry-tags>a{display:inline-flex;align-items:center;min-height:44px;max-width:100%}

/* Section navigation retains distinct tap targets and word spacing. */
main nav.atlas-toc{display:flex;flex-wrap:wrap;gap:8px 24px}
main nav.atlas-toc>a{display:inline-flex;align-items:center;min-height:44px}

/* Comfortable modal close control on touch screens. */
@media(max-width:720px){button#marquiz__close{width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;top:0!important;right:0!important;background-position:center!important}}
