/* Keep the principles above the hero art that extends 46px below its box. */
html[data-ui="5"] .public-shell .ui5-home>.ui5-proof-strip { position:relative; z-index:1; }
/* Home visibility: keep every heading, action and illustration; narrow windows
   show the platform principles immediately after the hero copy. */
@media screen and (max-width:900px) {
  html[data-ui="5"] .public-shell .ui5-home { display:flex; flex-direction:column; }
  html[data-ui="5"] .public-shell .ui5-home>.ui5-site-meta { order:0; width:100%; }
  html[data-ui="5"] .public-shell .ui5-home>.ui5-hero { display:contents; }
  html[data-ui="5"] .public-shell .ui5-home .ui5-hero-copy { order:1; padding:14px var(--public-compact-gutter,16px); max-width:none; }
  html[data-ui="5"] .public-shell .ui5-home>.ui5-proof-strip { order:2; position:relative; z-index:1; flex:none; }
  html[data-ui="5"] .public-shell .ui5-home .ui5-product-stage { order:3; padding:16px var(--public-compact-gutter,16px) 24px; }
  html[data-ui="5"] .public-shell .ui5-home>:not(.ui5-site-meta):not(.ui5-hero):not(.ui5-proof-strip) { order:4; }
  /* The original decorative earth stays behind the first part of the page.
     display:contents removes the hero box, so bind its existing art to home. */
  html[data-ui="5"] .public-shell .ui5-home>.ui5-hero::before,
  html[data-ui="5"] .public-shell .ui5-home>.ui5-hero::after { top:0; bottom:auto; height:700px; }
}

/* A 320px body minimum exceeds a 320px window once its 15px scrollbar is
   deducted. This override affects only the public home at the smallest width. */
@media screen and (max-width:360px) {
  html[data-ui="5"] body:has(.public-shell .ui5-home) { min-width:0; }
  /* Preserve both dock actions in the existing bottom rail. Their aria-labels
     remain intact; the Code AI avatar replaces its redundant visible text. */
  html[data-ui="5"] body:has(.public-shell .ui5-home) .experience-dock {
    inset-inline-start:6px; inset-inline-end:auto;
    bottom:max(2px,env(safe-area-inset-bottom)); padding:2px; gap:4px;
  }
  html[data-ui="5"] body:has(.public-shell .ui5-home) .experience-dock .assist-launch {
    width:44px; height:44px; min-width:44px; min-height:44px;
    padding:9px; gap:0; font-size:0;
  }
  html[data-ui="5"] body:has(.public-shell .ui5-home) .experience-dock .assist-launch img { width:24px; height:24px; }
  html[data-ui="5"] body:has(.public-shell .ui5-home) .experience-dock>.btn.icon {
    width:44px; height:44px; min-width:44px; min-height:44px; padding:8px;
  }
  html[data-ui="5"] .public-shell:has(.ui5-home) .public-bottom-nav {
    padding-inline-start:104px; padding-inline-end:6px;
    padding-top:2px; padding-bottom:max(2px,env(safe-area-inset-bottom));
    grid-template-columns:repeat(4,minmax(0,1fr));
  }
  html[data-ui="5"] .public-shell:has(.ui5-home) .public-bottom-nav a { min-width:0; min-height:44px; }
  html[data-ui="5"] .public-shell:has(.ui5-home) { padding-bottom:calc(54px + env(safe-area-inset-bottom)); }
}
