/*
 * BAOI 5.3.35.1 — Landing & Hub Visual Convergence
 * Exact-route scoped to the 115 landing/hub surfaces observed in the
 * installed 5.3.35.0 diagnostic. No tool route receives these rules.
 */

body.baoi-nontool-v5351{
  --baoi-5351-bg:#07111f;
  --baoi-5351-panel:#0d192a;
  --baoi-5351-panel-2:#101f33;
  --baoi-5351-line:rgba(126,177,214,.22);
  --baoi-5351-line-strong:rgba(83,216,255,.34);
  --baoi-5351-text:#f4f8fc;
  --baoi-5351-muted:#9eb1c4;
  --baoi-5351-cyan:#53d8ff;
  --baoi-5351-blue:#5b9dff;
  --baoi-5351-radius:18px;
  --baoi-5351-shadow:0 18px 52px rgba(0,0,0,.18);
  background:var(--baoi-5351-bg);
}

/* Stable public shell: compact top rhythm and one coherent working width. */
body.baoi-nontool-v5351 .site-main{
  width:min(100%,1360px)!important;
  max-width:1360px!important;
  margin-inline:auto!important;
}
body.baoi-nontool-v5351 .entry-content{
  margin-top:0!important;
}
body.baoi-nontool-v5351 :where(.entry-header,.page-header){
  margin-bottom:clamp(16px,2vw,26px);
}
body.baoi-nontool-v5351 :where(h1,.entry-title){
  color:var(--baoi-5351-text);
  text-wrap:balance;
}
body.baoi-nontool-v5351 :where(p,.description,.subtitle){
  text-wrap:pretty;
}

/* Landing: keep the established homepage identity but remove legacy over-spacing. */
body.baoi-nontool-landing-v5351 .boai-home-v2{
  max-width:1360px!important;
  margin-inline:auto!important;
  padding-bottom:52px!important;
}
body.baoi-nontool-landing-v5351 .boai-h2-legacy-hero{
  border-bottom:1px solid var(--baoi-5351-line);
}
body.baoi-nontool-landing-v5351 :where(
  .boai-h2-baoi-feature,.boai-h2-section,.boai-h2-cybertest,.boai-h2-final
){
  border-radius:var(--baoi-5351-radius)!important;
  box-shadow:none!important;
}
body.baoi-nontool-landing-v5351 .boai-h2-section{
  margin-top:20px!important;
  padding:clamp(22px,2.5vw,30px)!important;
}
body.baoi-nontool-landing-v5351 :where(.boai-h2-section-heading,.boai-h2-knowledge-main){
  max-width:760px;
}
body.baoi-nontool-landing-v5351 :where(
  .boai-h2-journeys>a,.boai-h2-centers>a,.boai-h2-tools-grid>a,.boai-h2-field-grid>a
){
  border-color:var(--baoi-5351-line)!important;
  border-radius:14px!important;
}
body.baoi-nontool-landing-v5351 :where(
  .boai-h2-journeys>a,.boai-h2-centers>a,.boai-h2-tools-grid>a,.boai-h2-field-grid>a
):hover{
  border-color:var(--baoi-5351-line-strong)!important;
}

/* Common hub roots: same application-like frame without replacing their owners. */
body.baoi-nontool-hub-v5351 :where(
  .boai-hub,.boai-guides-app,.boai-scripts-hub,.boai-errors-app,
  .boai-event-app,.boai-comparisons-app,.boai-diag-hub,.boai-memo-app,
  .boai-pannes-app,.boai-software-app,.boai-library-app,.boai-tp
){
  width:100%!important;
  max-width:1320px!important;
  margin-inline:auto!important;
  color:var(--baoi-5351-text);
}

/* One premium hero language across discovery/index surfaces. */
body.baoi-nontool-hub-v5351 :where(
  .boai-hub-hero,.boai-guides-hero,.boai-scripts-hero,.boai-errors-hero,
  .boai-event-hero,.boai-comparison-hero,.boai-diag-hub-hero,
  .boai-memo-hero,.boai-library-hero,.boai-tp-hero
){
  margin:0 0 18px!important;
  padding:clamp(20px,2.8vw,30px)!important;
  border:1px solid var(--baoi-5351-line)!important;
  border-radius:var(--baoi-5351-radius)!important;
  background:
    radial-gradient(circle at 88% 8%,rgba(83,216,255,.08),transparent 34%),
    linear-gradient(145deg,#101e32,#0a1525)!important;
  box-shadow:none!important;
}
body.baoi-nontool-hub-v5351 :where(
  .boai-hub-hero,.boai-guides-hero,.boai-scripts-hero,.boai-errors-hero,
  .boai-event-hero,.boai-comparison-hero,.boai-diag-hub-hero,
  .boai-memo-hero,.boai-library-hero,.boai-tp-hero
) h1{
  margin:.28em 0 .35em!important;
  font-size:clamp(2rem,3.4vw,3rem)!important;
  line-height:1.04!important;
  letter-spacing:-.035em!important;
  color:var(--baoi-5351-text)!important;
}
body.baoi-nontool-hub-v5351 :where(
  .boai-hub-kicker,.boai-guides-kicker,.boai-scripts-kicker,
  .boai-errors-kicker,.boai-event-kicker,.boai-comparison-kicker,
  .boai-memo-kicker
){
  color:var(--baoi-5351-cyan)!important;
  font-size:11px!important;
  line-height:1.3!important;
  font-weight:850!important;
  letter-spacing:.12em!important;
  text-transform:uppercase;
}

/* Search/filter bars should read as one compact control strip. */
body.baoi-nontool-hub-v5351 :where(
  .boai-hub-search,.boai-guides-filter,.boai-scripts-toolbar,.boai-errors-search,
  .boai-event-filters,.boai-comparison-search,.boai-memo-filters,
  .boai-library-search,.boai-tp-filters
){
  gap:10px!important;
  margin-block:14px 18px!important;
}
body.baoi-nontool-hub-v5351 :where(
  input[type="search"],input[type="text"],select
){
  min-height:44px;
}
body.baoi-nontool-hub-v5351 :where(
  input[type="search"],input[type="text"],select,textarea
){
  border:1px solid var(--baoi-5351-line)!important;
  border-radius:11px!important;
  background:#091523!important;
  color:var(--baoi-5351-text)!important;
}
body.baoi-nontool-hub-v5351 :where(
  input[type="search"],input[type="text"],select,textarea
):focus{
  border-color:var(--baoi-5351-cyan)!important;
  box-shadow:0 0 0 3px rgba(83,216,255,.12)!important;
}

/* Card geometry/density: preserve family-specific content, normalize chrome. */
body.baoi-nontool-hub-v5351 :where(
  .boai-hub-card,.boai-guide-card,.boai-script-card,.boai-error-card,
  .boai-event-card,.boai-comparison-card,.boai-diag-card,.boai-memo-card,
  .boai-library-card,.boai-tp-resource,.boai-tp-module,.boai-tp-tech
){
  border:1px solid var(--baoi-5351-line)!important;
  border-radius:14px!important;
  background:var(--baoi-5351-panel)!important;
  box-shadow:none!important;
  transition:border-color .16s ease,transform .16s ease,background .16s ease;
}
body.baoi-nontool-hub-v5351 :where(
  .boai-hub-card,.boai-guide-card,.boai-script-card,.boai-error-card,
  .boai-event-card,.boai-comparison-card,.boai-diag-card,.boai-memo-card,
  .boai-library-card,.boai-tp-resource,.boai-tp-module,.boai-tp-tech
):hover{
  border-color:var(--baoi-5351-line-strong)!important;
  background:var(--baoi-5351-panel-2)!important;
  transform:translateY(-1px);
}

/* Technology hubs and centres are numerous: keep their sections compact. */
body.baoi-nontool-hub-v5351.baoi-nontool-family-technology_hub-v5351 :where(.boai-tp-section,.boai-tp-resource-grid,.boai-tp-module-grid),
body.baoi-nontool-hub-v5351.baoi-nontool-family-technical_center-v5351 :where(.boai-tp-section,.boai-tp-resource-grid,.boai-tp-module-grid){
  margin-top:18px!important;
}
body.baoi-nontool-hub-v5351 .boai-tp-section{
  padding-block:4px 8px;
}
body.baoi-nontool-hub-v5351 .boai-tp-section-head{
  margin-bottom:12px!important;
}

/* Buttons keep the established BAOI cyan primary / dark secondary language. */
body.baoi-nontool-hub-v5351 :where(
  button,.button,.boai-btn,.boai-primary,.boai-cta
){
  border-radius:10px!important;
}
body.baoi-nontool-hub-v5351 :where(
  button[type="submit"],.button-primary,.boai-btn-primary,.boai-primary
){
  border-color:var(--baoi-5351-cyan)!important;
}

/* Avoid large dead zones between the hub and footer/support layers. */
body.baoi-nontool-hub-v5351 :where(
  .boai-hub,.boai-guides-app,.boai-scripts-hub,.boai-errors-app,
  .boai-event-app,.boai-comparisons-app,.boai-diag-hub,.boai-memo-app,
  .boai-pannes-app,.boai-software-app,.boai-library-app,.boai-tp
){
  padding-bottom:clamp(24px,4vw,46px)!important;
}

@media (max-width: 900px){
  body.baoi-nontool-v5351 .site-main{
    max-width:100%!important;
  }
  body.baoi-nontool-hub-v5351 :where(
    .boai-hub-hero,.boai-guides-hero,.boai-scripts-hero,.boai-errors-hero,
    .boai-event-hero,.boai-comparison-hero,.boai-diag-hub-hero,
    .boai-memo-hero,.boai-library-hero,.boai-tp-hero
  ){
    padding:20px!important;
  }
}

@media (max-width: 782px){
  body.baoi-nontool-v5351{
    --baoi-5351-radius:15px;
  }
  body.baoi-nontool-landing-v5351 .boai-home-v2{
    padding-left:10px!important;
    padding-right:10px!important;
  }
  body.baoi-nontool-hub-v5351 :where(
    .boai-hub-hero,.boai-guides-hero,.boai-scripts-hero,.boai-errors-hero,
    .boai-event-hero,.boai-comparison-hero,.boai-diag-hub-hero,
    .boai-memo-hero,.boai-library-hero,.boai-tp-hero
  ) h1{
    font-size:clamp(1.85rem,9vw,2.45rem)!important;
  }
}

@media (prefers-reduced-motion: reduce){
  body.baoi-nontool-v5351 :where(
    .boai-hub-card,.boai-guide-card,.boai-script-card,.boai-error-card,
    .boai-event-card,.boai-comparison-card,.boai-diag-card,.boai-memo-card,
    .boai-library-card,.boai-tp-resource,.boai-tp-module,.boai-tp-tech
  ){
    transition:none!important;
  }
}
