/* THE QWORLD corporate sphere logo – 2026-10-29. */
img.tqw-sphere-logo,
[data-site-logo="1"].tqw-sphere-logo,
header.site-header a.brand[href="/"] > img.tqw-sphere-logo,
footer.footer a.brand[href="/"] > img.tqw-sphere-logo,
header.admin-header a.brand[href="/"] > img.tqw-sphere-logo,
header.admin-header a.brand[href="/admin/"] > img.tqw-sphere-logo,
.af-brand > img.tqw-sphere-logo,
a.qw-brand > img.tqw-sphere-logo {
  display: block !important;
  inline-size: 80px !important;
  block-size: 80px !important;
  width: 80px !important;
  height: 80px !important;
  min-width: 80px !important;
  max-width: 80px !important;
  aspect-ratio: 1 / 1;
  object-fit: contain !important;
  object-position: center;
  border: 0 !important;
  background: transparent !important;
  border-radius: 50%;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  flex: 0 0 80px !important;
  vertical-align: middle;
}
/* Prevent old image-width settings from stretching the new circular mark. */
a.tqw-official-brand {display: inline-flex !important; align-items:center !important; gap: 9px !important; text-decoration:none !important; min-width:0;}
a.tqw-official-brand .tqw-brand-name {font-family: inherit; font-weight:700; font-size:14px; letter-spacing:.04em; line-height:1.12; white-space:nowrap; color:inherit;}
a.qw-brand.tqw-official-brand .qw-brand-logo {display:none !important;}
a.tqw-official-brand .tqw-sphere-logo {opacity:1 !important; visibility:visible !important;}
@media (max-width: 680px) {
 img.tqw-sphere-logo, [data-site-logo="1"].tqw-sphere-logo,
 header.site-header a.brand[href="/"] > img.tqw-sphere-logo,
 footer.footer a.brand[href="/"] > img.tqw-sphere-logo,
 header.admin-header a.brand[href="/"] > img.tqw-sphere-logo,
header.admin-header a.brand[href="/admin/"] > img.tqw-sphere-logo,
 .af-brand > img.tqw-sphere-logo,
 a.qw-brand > img.tqw-sphere-logo {
   inline-size:68px !important; block-size:68px !important;
   width:68px !important; height:68px !important; min-width:68px !important; max-width:68px !important; flex:0 0 68px !important;
 }
 a.tqw-official-brand {gap:7px !important;}
 a.tqw-official-brand .tqw-brand-name {font-size:12px; letter-spacing:.02em;}
}

/* Give double-sized official brand marks room without changing navigation styling. */
header.site-header:has(.tqw-sphere-logo),
header.admin-header:has(.tqw-sphere-logo),
header.af-topbar:has(.tqw-sphere-logo),
header.qw-astra-header:has(.tqw-sphere-logo) {
  min-height: 96px !important;
  box-sizing: border-box;
}
header.site-header:has(.tqw-sphere-logo) .header-inner {
  min-height: 96px;
}
/* On phones the new 68px mark has breathing room, with a compact brand label. */
@media (max-width: 640px) {
  header.site-header:has(.tqw-sphere-logo),
  header.admin-header:has(.tqw-sphere-logo),
  header.af-topbar:has(.tqw-sphere-logo),
  header.qw-astra-header:has(.tqw-sphere-logo) {
    min-height: 84px !important;
  }
  header.site-header:has(.tqw-sphere-logo) .header-inner {
    min-height: 84px;
  }
}

/* THE QWORLD — replace the gold "Q" inside the North Star seal
   with the existing purple 3D sphere. CSS-only to preserve Next.js hydration. */
.quality-seal > strong {
  display: block !important;
  width: 175px !important;
  height: 175px !important;
  flex: 0 0 175px !important;
  max-width: none !important;
  font-size: 0 !important;
  line-height: 0 !important;
  color: transparent !important;
  background: transparent url('/assets/images/theqworld_logo.png?v=20261029-sphere1') center / contain no-repeat !important;
  margin: 4px auto !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden;
}
/* The quality seal becomes 180-190px wide on narrower layouts. */
@media (max-width: 900px) {
  .quality-seal > strong {
    width: 130px !important;
    height: 130px !important;
    flex-basis: 130px !important;
  }
}
