/* LexiGlobal logo with a theme-coloured ENGLISH LEARNER band (Claude Code 2026-11-11, owner's new logo).
   assets/brand/logo-wide.webp = the owner's logo, transparent, with only the blue inside of the band cut out — its gold frame,
   the gold line above it, "Lexi" (gold), "Global" (white), the globe, the book and OPEN A WIDER WORLD are exactly as drawn.
   The band (.bl-band) sits BEHIND the picture, inside that gold frame, and takes the active theme's own colours
   (--btn-a / --btn-b / --btn-ink: the same colours as the theme's buttons), so it changes at once with the theme.
   Band box = the frame's outer box on the 1280 x 427 logo (410..1228 x 262..342), pulled in 0.3 % so it never shows outside the frame. */
#brandHeader .brand.bl {
  display: block !important; flex: 1 1 auto !important; min-width: 0 !important;
  width: min(100%, 470px) !important; max-width: 470px !important; padding: 0 !important; gap: 0 !important;
}
#brandHeader .brand.bl .bl-wrap, .bl-wrap {
  position: relative; display: block; width: 100%; aspect-ratio: 1280 / 427; container-type: inline-size;
}
#brandHeader .brand.bl .bl-img, .bl-wrap .bl-img {
  position: relative; z-index: 1; display: block; width: 100% !important; height: auto !important; margin: 0 !important;
  max-width: none !important; flex: none !important; pointer-events: none; user-select: none;
}
.bl-wrap .bl-band {
  position: absolute; z-index: 0; left: 32.35%; top: 61.75%; width: 63.3%; height: 17.9%; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: linear-gradient(180deg, var(--btn-a), var(--btn-b));
  box-shadow: inset 0 .25cqw .5cqw rgba(255, 255, 255, .16), inset 0 -.3cqw .6cqw rgba(0, 0, 0, .28);
  transition: background .25s ease, color .25s ease;
}
.bl-wrap .bl-band-t {
  font: 700 4cqw/1 Manrope, var(--sans); letter-spacing: .24em; padding-left: .24em; white-space: nowrap;
  color: var(--btn-ink, #F4F6FA);
  text-shadow: 0 .12cqw .2cqw rgba(0, 0, 0, .45);
  transition: color .25s ease;
}
/* light themes: their buttons are white, the band text their dark ink — no dark shadow */
html:is([data-theme="silver-platinum"], [data-theme="lavender-platinum"], [data-theme="pearl-gold"], [data-theme="champagne-ivory"], [data-theme="sapphire-silver"]):not([data-family]) .bl-wrap .bl-band-t { text-shadow: none; }
@media (prefers-reduced-motion: reduce) { .bl-wrap .bl-band, .bl-wrap .bl-band-t { transition: none; } }

/* the header row: logo left, language pill right, vertically centred */
#brandHeader:has(.brand.bl) { align-items: center !important; }
@media (max-width: 599px) {
  #brandHeader .brand.bl { width: min(100%, 64vw) !important; }
}
/* the logo column may shrink (the picture's own 1280 px width must not set the column) */
#brandHeader:has(.brand.bl) { grid-template-columns: minmax(0, 1fr) auto !important; }
#brandHeader .brand-row:has(.brand.bl) { min-width: 0 !important; }
#brandHeader .brand.bl { width: 100% !important; max-width: 470px !important; }
/* computer side bar (DesktopRail.js; Academic DeskShell.js uses the same) */
.desk-rail .dr-brand.bl { display: block !important; padding: 4px 6px 16px !important; margin-bottom: 8px; }
.desk-rail .dr-brand.bl .bl-wrap { width: 100%; }
.desk-rail .dr-brand.bl .bl-img { filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .35)); }
/* Install / Offline windows: the app icon as crest (was the old book symbol) */
.lux-install .li-crest:has(img[src*="icon-square"]) { width: 76px !important; height: 76px !important; border: 0 !important; background: none !important; box-shadow: none !important; border-radius: 0 !important; }
.lux-install .li-crest img[src*="icon-square"] { width: 76px !important; height: 76px !important; filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .45)); }
/* owner 2026-11-11: "too big once open in app" — the header logo is smaller on phones and tablets */
@media (max-width: 599px) { #brandHeader .brand.bl { width: min(100%, 50vw, 200px) !important; } }
@media (min-width: 600px) { #brandHeader .brand.bl { max-width: 300px !important; } }
/* crown Upgrade — Home page only (owner 2026-11-11: "add this only in homepage for subscribers or members") */
#brandHeader .home-up { display: none; }
body[data-route="home"] #brandHeader .home-up {
  grid-area: up; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 14px;
  border-radius: 999px; cursor: pointer; font: 700 .8rem/1 Manrope, var(--sans); color: #F3E2B3; white-space: nowrap;
  background: color-mix(in srgb, var(--vt-base, #0B1528) 72%, transparent); border: 1px solid rgba(214, 180, 106, .7);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .28); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
body[data-route="home"] #brandHeader .home-up .ic { width: 17px; height: 17px; color: #E7C467; }
body[data-route="home"] #brandHeader .home-up:hover { border-color: #E7C467; }
body[data-route="home"] #brandHeader:has(.brand.bl) { grid-template-columns: minmax(0, 1fr) auto auto !important; grid-template-areas: "brand up pick" "langs langs langs" !important; }
@media (max-width: 599px) {   /* phones: the crown alone, round */
  body[data-route="home"] #brandHeader .home-up { width: 38px; padding: 0; }
  body[data-route="home"] #brandHeader .home-up span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}
@media (min-width: 1100px) and (((hover: hover) and (pointer: fine)) or (orientation: landscape)) {   /* computer Home: crown beside the language pill, search bar makes room */
  body[data-route="home"] #brandHeader .home-up { height: 60px !important; padding: 0 22px !important; font-size: 15px !important; margin-right: 10px; width: auto !important; }
  body[data-route="home"] #brandHeader .home-up span { position: static !important; width: auto !important; height: auto !important; clip: auto !important; }
  #v-home .home-search { padding-right: 340px !important; }
}
/* owner 2026-11-11 "scale smaller as a professional logo — now too big": header logo ~ 1/3 of a phone width */
@media (max-width: 599px) { #brandHeader .brand.bl { width: min(100%, 40vw, 156px) !important; } }
@media (min-width: 600px) { #brandHeader .brand.bl { width: 100% !important; max-width: 220px !important; } }
.desk-rail .dr-brand.bl .bl-wrap { width: 82% !important; margin-inline: auto; }
/* the logo must not stretch to fill its row (flex 1 1 auto made the width rule useless) */
#brandHeader .brand.bl { flex: 0 0 auto !important; }
/* crown sits next to the language button (the smaller logo no longer pushes it right) */
body[data-route="home"] #brandHeader .home-up { margin-left: auto !important; margin-right: 8px !important; }
body[data-route="home"] #brandHeader .home-up { justify-self: end !important; }
body[data-route="home"] #brandHeader .home-up { margin: 0 !important; }
body[data-route="home"] #brandHeader:has(.brand.bl) #langPick { margin-left: 0 !important; }
body[data-route="home"] #brandHeader:has(.brand.bl) { grid-template-columns: minmax(0, 1fr) min-content min-content !important; }
/* the header row spreads items apart (space-between): an auto left margin pulls the crown next to the language button */
body[data-route="home"] #brandHeader .home-up { margin-left: auto !important; margin-right: 8px !important; }
/* owner 2026-11-11: crown as large as the circle allows; background = the theme's card colour with the My Space ring */
@media (max-width: 599px) {
  body[data-route="home"] #brandHeader .home-up {
    width: 40px !important; height: 40px !important; padding: 0 !important; border: 0 !important; backdrop-filter: none !important;
    background: color-mix(in srgb, var(--btn-a) 80%, #000) !important;
    box-shadow: inset 0 0 0 1.5px #C9AE76, 0 4px 12px rgba(0, 0, 0, .28) !important;
  }
  body[data-route="home"] #brandHeader .home-up .ic { width: 27px !important; height: 27px !important; color: #E7C467 !important; margin-top: -2px; }
}
/* computer view: the logo lives in the side bar — never a second one in the header (2026-11-12 fix) */
@media (min-width: 1100px) and (((hover: hover) and (pointer: fine)) or (orientation: landscape)) {
  html body #brandHeader .brand.bl, html body #brandHeader .brand-row .brand.bl { display: none !important; }
}
/* 2026-11-21 owner ("not see key install"): the Install key sits beside the crown (both .home-up, one style); the pair takes the crown's place */
#brandHeader .home-keys { display: none; }
body[data-route="home"] #brandHeader .home-keys { grid-area: up; display: inline-flex; align-items: center; gap: 8px; justify-self: end; margin-left: auto; margin-right: 8px; }
body[data-route="home"] #brandHeader .home-keys .home-up { margin: 0 !important; }
html body #brandHeader .home-up[hidden] { display: none !important; }
@media (min-width: 1100px) and (((hover: hover) and (pointer: fine)) or (orientation: landscape)) {
  body:has(#homeInst:not([hidden]))[data-route="home"] #v-home .home-search { padding-right: 500px !important; }
}
