/*
 * Canonical site shell
 * Owns the global header, primary navigation, mobile menu and footer.
 * Page styles may add explicit modifiers, but must not redefine these base components.
 */
body.menu-open { overflow: hidden; }

header {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: 82px;
  padding: 16px 24px;
  border-bottom: var(--strong);
  background: rgba(255, 255, 255, .96);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: block;
  color: var(--navy);
  text-decoration: none;
  min-width: max-content;
}

.brand strong {
  display: block;
  font-size: 1.05rem;
  line-height: 1.15;
  letter-spacing: -.02em;
  text-transform: uppercase;
}

.brand span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: .67rem;
  letter-spacing: .11em;
  text-transform: uppercase;
}

header nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

header nav > a {
  color: var(--slate);
  font-size: .84rem;
  font-weight: 600;
  text-decoration: none;
}

header nav > a:not(.btn):hover,
header nav > a:not(.btn):focus-visible,
header nav > a[aria-current="page"]:not(.btn) {
  color: var(--navy);
}

.menu-toggle {
  display: none;
  width: 48px;
  height: 48px;
  border: var(--strong);
  background: #fff;
  cursor: pointer;
  font-size: 1.25rem;
}

footer {
  padding: 64px 48px 24px;
  background: var(--navy);
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 44px;
}

footer h3,
footer h4 { margin-bottom: 15px; }

footer p,
footer a {
  color: #cbd5e1;
  font-size: .88rem;
}

footer a {
  display: block;
  margin: 8px 0;
  text-decoration: none;
}

footer a:hover { color: #fff; }

.footer-meta {display:flex;flex-direction:column;align-items:flex-end;gap:8px;max-width:720px;text-align:right;}
.footer-legal a {display:inline;color:inherit;}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 46px;
  padding-top: 20px;
  border-top: 1px solid #475569;
  color: #94a3b8;
  font-size: .74rem;
}

/* Preserve the approved floating-menu treatment on Home and Framework. */
body.shell-floating-menu header {
  z-index: 100;
  gap: 24px;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
body.shell-floating-menu .brand strong { font-size: 1.08rem; }
body.shell-floating-menu .brand span {
  font-size: .62rem;
  letter-spacing: .08em;
}
body.shell-floating-menu header nav {
  gap: 24px;
}
body.shell-floating-menu header nav > a {
  font-size: .86rem;
}

@media (max-width: 980px) {
  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  header nav {
    display: none;
    position: absolute;
    top: 81px;
    right: 0;
    left: 0;
    padding: 22px;
    border-bottom: var(--strong);
    background: #fff;
    flex-direction: column;
    align-items: stretch;
  }

  header nav.open { display: flex; }

  body.shell-floating-menu header nav {
    position: fixed;
    inset: 82px 12px auto 12px;
    z-index: 99;
    padding: 24px;
    border: var(--strong);
  }

  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .footer-meta {align-items:flex-start;text-align:left;}
}

@media (max-width: 680px) {
  header { padding: 14px 18px; }
  body.shell-floating-menu header { padding: 14px 16px; }
  .brand span { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  footer { padding: 52px 20px 22px; }
  body.shell-floating-menu footer { padding: 54px 20px 24px; }
  .footer-bottom { flex-direction: column; }
}

/* Balanced footer bottom row */
.footer-bottom{
  display:grid!important;
  grid-template-columns:minmax(190px,1fr) minmax(320px,2fr) auto!important;
  align-items:center!important;
  gap:28px!important;
}
.footer-copyright{text-align:left}
.footer-advisory{text-align:center;line-height:1.55}
.footer-legal{text-align:right;white-space:nowrap}
footer .footer-legal-link{
  display:inline!important;
  margin:0!important;
  color:#8794a7!important;
  font-size:.72rem!important;
  font-weight:400!important;
  text-decoration:none!important;
  border-bottom:0!important;
  opacity:.82;
}
footer .footer-legal-link:hover{color:#b5c0ce!important;opacity:1;text-decoration:underline!important;text-decoration-color:#64748b!important;text-underline-offset:3px!important}
@media(max-width:980px){
  .footer-bottom{grid-template-columns:1fr auto!important;align-items:start!important}
  .footer-advisory{grid-column:1/-1;grid-row:2;text-align:left}
  .footer-legal{text-align:right}
}
@media(max-width:680px){
  .footer-bottom{grid-template-columns:1fr!important}
  .footer-advisory,.footer-legal{text-align:left!important;white-space:normal}
}

/* Graceful fallback when background blur is unavailable. */
@supports not ((-webkit-backdrop-filter:blur(1px)) or (backdrop-filter:blur(1px))){
  header,
  body.shell-floating-menu header{background:#fff}
}
