/* BluTools HOME HEADER + HOME FOOTER — one shared visual authority.
   The header is sticky; the colour treatment lives in blutools-gradient-theme.css.
   Do not add page-specific header or footer markup. */

/* Shared visual header grid: 1220px outer width including 24px side padding. */
header .header-container{width:100%;max-width:1220px;margin-inline:auto;padding:16px 24px;display:flex;align-items:center;justify-content:space-between;gap:24px;min-height:92px}
header .brand{font-size:clamp(1.45rem,2.15vw,2.25rem);line-height:1.12;gap:16px;white-space:nowrap;min-width:0}
header .brand-icon{width:64px;height:64px;flex:0 0 64px;border-radius:14px;font-size:1.65rem}
header .header-actions{margin-left:auto;display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-shrink:0}
@media(max-width:650px){header .header-container{padding:12px 16px;min-height:72px;gap:12px}header .brand{font-size:clamp(1.05rem,4.7vw,1.65rem);gap:9px}header .brand-icon{width:44px;height:44px;flex-basis:44px;font-size:1.2rem}}
@media(max-width:370px){header .brand{font-size:1rem}header .brand-icon{width:38px;height:38px;flex-basis:38px}}



/* Midnight Signature footer — consistent with the existing official header logo */
footer.mtd-signature-footer{background:linear-gradient(150deg,#10243a 0%,#0b1c2e 62%,#091828 100%)!important;border-top:1px solid #29445b!important;color:#aabed0!important;padding:35px max(22px,calc((100vw - 1220px)/2)) 20px!important;text-align:left!important;box-shadow:inset 0 1px 0 rgba(204,236,251,.045)!important}
footer.mtd-signature-footer .mtd-footer-top{display:flex;align-items:flex-start;justify-content:space-between;gap:28px;max-width:1220px;margin:0 auto 27px}
footer.mtd-signature-footer .mtd-footer-brand-block{min-width:0;max-width:520px}
footer.mtd-signature-footer .mtd-footer-brand{display:inline-flex;align-items:center;gap:12px;text-decoration:none!important;color:#f3f8fc!important;font-size:20px;font-weight:800;letter-spacing:-.035em;line-height:1.25}
footer.mtd-signature-footer .mtd-footer-brand .brand-icon{display:grid;place-items:center;flex:0 0 43px;width:43px;height:43px;border-radius:11px;background:linear-gradient(135deg,#82aad5,#9ebedf);border:1px solid rgba(125, 172, 223,.3);color:#accff4;font-size:20px}
footer.mtd-signature-footer .mtd-footer-brand .brand-accent{color:#7dacdf}
footer.mtd-signature-footer .mtd-footer-tagline{font-size:10px;letter-spacing:.14em;font-weight:800;color:#7eaddf;margin:16px 0 9px}
footer.mtd-signature-footer .mtd-footer-description{font-size:12px;line-height:1.65;color:#aabed0;margin:0}
footer.mtd-signature-footer .mtd-footer-explore{display:flex;flex-direction:column;gap:11px;align-items:flex-start;min-width:135px}
footer.mtd-signature-footer .mtd-footer-explore strong{color:#e8f1f9;font-size:12px;font-weight:800;margin-bottom:3px}
footer.mtd-signature-footer a:not(.mtd-footer-brand){color:#aabed0;text-decoration:none;font-size:12px;transition:color .15s ease}
footer.mtd-signature-footer a:hover,footer.mtd-signature-footer button:hover{color:#89b5e3!important}
footer.mtd-signature-footer a:focus-visible,footer.mtd-signature-footer button:focus-visible{outline:2px solid #89b5e3;outline-offset:4px;border-radius:3px}
footer.mtd-signature-footer .mtd-footer-bottom{max-width:1220px;margin:0 auto;border-top:1px solid #2a465b;padding-top:19px;display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap}
footer.mtd-signature-footer .mtd-footer-bottom p{color:#8fa7b9!important;font-size:11px!important;line-height:1.5!important;margin:0!important}
footer.mtd-signature-footer .footer-links{display:flex!important;flex-wrap:wrap!important;gap:9px 22px!important;align-items:center!important;justify-content:flex-end!important;margin:0!important}
footer.mtd-signature-footer .footer-links button{color:#aabed0!important;background:transparent!important;border:0!important;box-shadow:none!important;padding:4px 0!important;margin:0!important;font-size:11px!important;font-weight:500!important;cursor:pointer!important;min-height:0!important;text-transform:none!important}
@media(max-width:620px){footer.mtd-signature-footer{padding:28px 20px 22px!important}footer.mtd-signature-footer .mtd-footer-top{flex-direction:column;gap:23px}footer.mtd-signature-footer .mtd-footer-explore{gap:9px}footer.mtd-signature-footer .mtd-footer-bottom{align-items:flex-start;flex-direction:column;gap:10px}footer.mtd-signature-footer .footer-links{justify-content:flex-start!important;gap:8px 17px!important}}



/* Master beta 01: footer legal links at the right; matched with homepage footer. */
footer.mtd-signature-footer .mtd-footer-bottom .footer-links{margin-left:auto!important;justify-content:flex-end!important;gap:12px clamp(20px,3vw,42px)!important}
footer.mtd-signature-footer .mtd-footer-bottom .footer-links a{color:#aabed0!important;font-size:11px!important;font-weight:500!important;text-decoration:none!important;padding:4px 0!important;line-height:1.45}
footer.mtd-signature-footer .mtd-footer-bottom .footer-links a:hover{color:#89b5e3!important}
footer.mtd-signature-footer .mtd-footer-bottom .footer-links a:focus-visible{outline:2px solid #89b5e3;outline-offset:4px;border-radius:3px}
@media(max-width:620px){footer.mtd-signature-footer .mtd-footer-bottom .footer-links{margin-left:0!important;justify-content:flex-start!important}}



/* BLUTOOLS CANONICAL SITE HEADER — shared geometry authority.
   One consistent header at every page. This stylesheet is the ONLY header geometry authority.
   Keeps the approved order Home → Tools Menu → Theme. */
body > header {
  box-sizing:border-box!important;position:sticky!important;top:0!important;
  width:100%!important;min-height:0!important;height:auto!important;
  margin:0!important;padding:0!important;z-index:1000!important;
  background:transparent!important;border-bottom:1px solid transparent!important;
}
body.light-theme > header {background:transparent!important;border-bottom-color:transparent!important}
body > header .header-container {
  box-sizing:border-box!important;display:flex!important;flex-direction:row!important;
  align-items:center!important;justify-content:space-between!important;flex-wrap:nowrap!important;
  width:min(1200px,calc(100% - 48px))!important;max-width:1200px!important;
  height:76px!important;min-height:76px!important;max-height:76px!important;
  margin:0 auto!important;padding:0!important;gap:18px!important;
}
body > header .brand {
  box-sizing:border-box!important;display:inline-flex!important;flex-direction:row!important;
  align-items:center!important;justify-content:flex-start!important;
  gap:10px!important;flex:0 1 auto!important;min-width:0!important;
  margin:0!important;padding:0!important;border:0!important;
  font-family:Inter,system-ui,sans-serif!important;font-size:26px!important;
  line-height:1.1!important;letter-spacing:-.045em!important;font-weight:800!important;
  text-decoration:none!important;white-space:nowrap!important;
}
body > header .brand > span{font:inherit!important;font-size:inherit!important;line-height:1.1!important;letter-spacing:inherit!important;white-space:nowrap!important}
body > header .brand .brand-icon {
  box-sizing:border-box!important;display:grid!important;place-items:center!important;
  width:42px!important;min-width:42px!important;max-width:42px!important;
  height:42px!important;min-height:42px!important;max-height:42px!important;
  flex:0 0 42px!important;border-radius:11px!important;
  font-size:18px!important;margin:0!important;padding:0!important;
}
body > header .brand .brand-icon i {
  display:inline-flex!important;justify-content:center!important;align-items:center!important;
  width:20px!important;height:20px!important;line-height:1!important;font-size:18px!important;
}
body > header .header-actions {
  box-sizing:border-box!important;display:flex!important;flex-direction:row!important;
  align-items:center!important;justify-content:flex-end!important;flex-wrap:nowrap!important;
  gap:9px!important;flex:0 0 auto!important;width:auto!important;
  margin:0 0 0 auto!important;padding:0!important;
}
body > header .mtd-home-button,
body > header .mtd-tools-menu-toggle,
body > header .theme-toggle {
  box-sizing:border-box!important;display:inline-flex!important;align-items:center!important;
  justify-content:center!important;flex:0 0 40px!important;
  width:40px!important;min-width:40px!important;max-width:40px!important;
  height:40px!important;min-height:40px!important;max-height:40px!important;
  padding:0!important;margin:0!important;border-radius:11px!important;
  border:1px solid #34465c!important;background:transparent!important;
  color:#f8fafc!important;font-size:18px!important;line-height:1!important;
  box-shadow:none!important;cursor:pointer!important;
}
body.light-theme > header .mtd-home-button,
body.light-theme > header .mtd-tools-menu-toggle,
body.light-theme > header .theme-toggle {color:#0f172a!important;border-color:#cbd5e1!important}
body > header .header-actions :is(a,button):hover{background:rgba(138, 176, 216,.1)!important}
body > header .mtd-home-button i,
body > header .mtd-tools-menu-toggle i,
body > header .theme-toggle i {
  display:flex!important;align-items:center!important;justify-content:center!important;
  width:20px!important;height:20px!important;font-size:18px!important;line-height:1!important;
}
/* Keep theme glyph visibility governed by existing theme CSS; no changes to theme logic. */
@media (max-width:700px){
  body > header .header-container{
    width:calc(100% - 28px)!important;max-width:none!important;
    height:66px!important;min-height:66px!important;max-height:66px!important;
    padding:0!important;gap:7px!important;
  }
  body > header .brand{gap:7px!important;font-size:clamp(16px,3.6vw,21px)!important}
  body > header .brand .brand-icon{
    width:35px!important;min-width:35px!important;max-width:35px!important;
    height:35px!important;min-height:35px!important;max-height:35px!important;
    flex-basis:35px!important;border-radius:9px!important;font-size:16px!important;
  }
  body > header .header-actions{gap:6px!important}
  body > header :is(.mtd-home-button,.mtd-tools-menu-toggle,.theme-toggle){
    width:35px!important;min-width:35px!important;max-width:35px!important;
    height:35px!important;min-height:35px!important;max-height:35px!important;
    flex-basis:35px!important;border-radius:9px!important;font-size:16px!important;
  }
  body > header :is(.mtd-home-button,.mtd-tools-menu-toggle,.theme-toggle) i{font-size:16px!important}
}
@media (max-width:390px){
  body > header .header-container{width:calc(100% - 18px)!important;gap:4px!important}
  body > header .brand{gap:5px!important;font-size:14px!important}
  body > header .brand .brand-icon{
    width:30px!important;min-width:30px!important;max-width:30px!important;
    height:30px!important;min-height:30px!important;max-height:30px!important;
    flex-basis:30px!important;
  }
  body > header .header-actions{gap:4px!important}
  body > header :is(.mtd-home-button,.mtd-tools-menu-toggle,.theme-toggle){
    width:32px!important;min-width:32px!important;max-width:32px!important;
    height:32px!important;min-height:32px!important;max-height:32px!important;
    flex-basis:32px!important;
  }
}





/* The footer is hidden only when printing; main content remains available. */
@media print {footer.mtd-signature-footer{display:none!important}}

/* BluTools Phase 1: ONE shared brand presentation for all pages.
   Horizontal marks in the header; substantially smaller stacked marks in the footer. */
body > header .header-container{height:92px!important;min-height:92px!important;max-height:92px!important;}
body > header .brand.bt-brand{display:inline-flex!important;align-items:center!important;justify-content:flex-start!important;flex:0 1 auto!important;min-width:0!important;line-height:1!important;overflow:visible!important;}
body > header .brand.bt-brand .bt-header-logo{display:block!important;width:242px!important;height:72px!important;max-width:100%!important;max-height:72px!important;object-fit:contain!important;object-position:left center!important;}
footer.mtd-signature-footer .mtd-footer-brand.bt-footer-brand{display:inline-block!important;line-height:0!important;max-width:100%!important;}
footer.mtd-signature-footer .bt-footer-logo{display:block!important;width:132px!important;height:auto!important;max-width:132px!important;object-fit:contain!important;}
footer.mtd-signature-footer .mtd-footer-brand-block{max-width:510px!important;}
footer.mtd-signature-footer .mtd-footer-description{margin-top:10px!important;}

/* The existing light footer provides contrast for Day Theme text.
   The existing midnight footer remains untouched in NIGHT mode. */
body.light-theme footer.mtd-signature-footer {
  background:linear-gradient(150deg,#f9fcff 0%,#eaf3fe 100%)!important;
  border-top-color:#d2e2f4!important;color:#2e3a49!important;
  box-shadow:inset 0 1px 0 rgba(14,23,34,.035)!important;
}
body.light-theme footer.mtd-signature-footer .mtd-footer-description,
body.light-theme footer.mtd-signature-footer a:not(.mtd-footer-brand),
body.light-theme footer.mtd-signature-footer .mtd-footer-bottom p,
body.light-theme footer.mtd-signature-footer .mtd-footer-bottom .footer-links a {color:#354456!important;}
body.light-theme footer.mtd-signature-footer .mtd-footer-explore strong {color:#172946!important;}
body.light-theme footer.mtd-signature-footer .mtd-footer-bottom {border-top-color:#d6e5f5!important;}
body.light-theme footer.mtd-signature-footer a:hover,
body.light-theme footer.mtd-signature-footer a:focus-visible {color:#175da7!important;}

@media(max-width:700px){
  body > header .header-container{height:74px!important;min-height:74px!important;max-height:74px!important;}
  body > header .brand.bt-brand .bt-header-logo{width:173px!important;height:51px!important;max-height:51px!important;}
  footer.mtd-signature-footer .bt-footer-logo{width:120px!important;max-width:120px!important;}
}
@media(max-width:370px){
  body > header .header-container{height:70px!important;min-height:70px!important;max-height:70px!important;}
  body > header .brand.bt-brand .bt-header-logo{width:153px!important;height:44px!important;max-height:44px!important;}
  footer.mtd-signature-footer .bt-footer-logo{width:108px!important;max-width:108px!important;}
}


/* BluTools theme-switch correction: identical artwork bounds and zero layout movement.
   Both images remain loaded in one geometry-locked wrapper, switched by visibility only. */
body > header .brand.bt-brand .bt-header-pair {
  display:block!important;position:relative!important;flex:0 0 242px!important;
  width:242px!important;height:72px!important;max-width:100%!important;
  min-width:0!important;margin:0!important;padding:0!important;
  overflow:hidden!important;line-height:0!important;
  transform:none!important;transition:none!important;
}
body > header .brand.bt-brand .bt-header-pair img.bt-header-logo {
  position:absolute!important;inset:0!important;display:block!important;
  width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;
  object-fit:contain!important;object-position:left center!important;
  margin:0!important;padding:0!important;transform:none!important;transition:none!important;
  animation:none!important;pointer-events:none!important;
}
footer.mtd-signature-footer .bt-footer-pair {
  display:block!important;position:relative!important;width:132px!important;height:132px!important;
  max-width:100%!important;margin:0!important;padding:0!important;
  overflow:hidden!important;line-height:0!important;transform:none!important;transition:none!important;
}
footer.mtd-signature-footer .bt-footer-pair img.bt-footer-logo {
  position:absolute!important;inset:0!important;display:block!important;
  width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;
  object-fit:contain!important;object-position:center center!important;
  margin:0!important;padding:0!important;transform:none!important;transition:none!important;
  animation:none!important;pointer-events:none!important;
}
/* No opacity fade or src replacement: avoids intermediate ghosted/silver-blue images. */
body:not(.light-theme) .bt-logo-pair .bt-logo-day,
body.light-theme .bt-logo-pair .bt-logo-night {visibility:hidden!important;opacity:0!important;}
body:not(.light-theme) .bt-logo-pair .bt-logo-night,
body.light-theme .bt-logo-pair .bt-logo-day {visibility:visible!important;opacity:1!important;}
body .bt-logo-pair img {transition:none!important;animation:none!important;}
@media(max-width:700px){
  body > header .brand.bt-brand .bt-header-pair {width:173px!important;flex-basis:173px!important;height:51px!important;}
  footer.mtd-signature-footer .bt-footer-pair {width:120px!important;height:120px!important;}
}
@media(max-width:370px){
  body > header .brand.bt-brand .bt-header-pair {width:153px!important;flex-basis:153px!important;height:44px!important;}
  footer.mtd-signature-footer .bt-footer-pair {width:108px!important;height:108px!important;}
}

/* BLUTOOLS QA: crisp SVG house (no stray dots/font antialias artefacts) */
body > header .mtd-home-button .bt-home-svg {display:block!important;width:20px!important;height:20px!important;flex:0 0 20px!important;fill:currentColor!important;stroke:none!important;vertical-align:middle;pointer-events:none;}
@media(max-width:700px){body > header .mtd-home-button .bt-home-svg{width:18px!important;height:18px!important;flex-basis:18px!important}}


/* BluMotion 02 — navigation progress + guaranteed visible arrival completion.
   Never block navigation; the line is cosmetic feedback only. */
body > header .bt-nav-progress {
  position:absolute !important; left:0 !important;right:0 !important;
  bottom:-1px !important;z-index:1300 !important;height:4px !important;
  pointer-events:none !important;overflow:hidden !important;
  opacity:0;isolation:isolate;
  transition:opacity 140ms ease !important;
}
body > header.bt-nav-loading .bt-nav-progress,
body > header.bt-nav-complete .bt-nav-progress {opacity:1 !important;}
body > header .bt-nav-progress::before {
  content:"";position:absolute;inset:0;
  background:linear-gradient(90deg,transparent,rgba(50,157,254,.24),transparent);
}
body > header .bt-nav-progress-beam {
  position:absolute;inset:0 auto 0 0;width:42%;border-radius:999px;
  background:linear-gradient(90deg,transparent 0%,#1C6FD5 24%,#36B9FF 58%,#DAF6FF 83%,transparent 100%);
  filter:drop-shadow(0 0 5px rgba(70,177,255,.83));
  opacity:0;transform:translate3d(-105%,0,0);will-change:transform;
}
body > header.bt-nav-loading .bt-nav-progress-beam {
  opacity:1;animation:bt-nav-travel 1050ms ease-in-out infinite;
}
@keyframes bt-nav-travel {
  from {transform:translate3d(-105%,0,0);}
  to {transform:translate3d(340%,0,0);}
}
body > header .bt-nav-progress-done {
  position:absolute;inset:0;
  background:linear-gradient(90deg,#1259B9 0%,#2488EB 48%,#8FDBFF 76%,#F3FBFF 100%);
  box-shadow:0 0 12px rgba(55,166,255,.72);
  opacity:0;transform:scaleX(0);transform-origin:left center;
}
body > header.bt-nav-complete .bt-nav-progress-beam {animation:none;opacity:0;}
body > header.bt-nav-complete .bt-nav-progress-done {
  opacity:1;transform:scaleX(1);
  transition:transform 340ms cubic-bezier(.18,.75,.25,1),opacity 80ms ease-out;
}
body.light-theme > header .bt-nav-progress-done {
  background:linear-gradient(90deg,#134F9F,#2378D7,#59B5F6,#C7EAFF);
}
@media(prefers-reduced-motion:reduce) {
  body > header .bt-nav-progress {transition:none !important;}
  body > header.bt-nav-loading .bt-nav-progress-beam {
    animation:none !important;transform:translateX(0);width:42%;opacity:1;
  }
  body > header.bt-nav-complete .bt-nav-progress-done {transition:none !important;}
}

/* BluMotion 02.1 — reading-progress layer in the SAME sticky header rail.
   Navigation loading / completion always takes visual precedence. */
/* BluMotion 04.3: the progress rail exists on every scrollable page from
   the beginning. The soft track does NOT imply progress; only the blue fill
   represents the actual scroll fraction. Navigation feedback still wins. */
body > header.bt-scroll-available:not(.bt-nav-loading):not(.bt-nav-complete) .bt-nav-progress {
  opacity:1 !important;
}
body > header.bt-scroll-available:not(.bt-nav-loading):not(.bt-nav-complete) .bt-nav-progress::before {
  background:linear-gradient(90deg,rgba(80,143,207,.14),rgba(80,143,207,.23),rgba(80,143,207,.14));
}
body.light-theme > header.bt-scroll-available:not(.bt-nav-loading):not(.bt-nav-complete) .bt-nav-progress::before {
  background:linear-gradient(90deg,rgba(24,92,166,.12),rgba(24,92,166,.20),rgba(24,92,166,.12));
}
body > header .bt-scroll-progress-fill {
  position:absolute;top:0;bottom:0;left:0;width:100%;
  transform:scaleX(var(--bt-scroll-fraction, 0));transform-origin:left center;
  background:linear-gradient(90deg,#1353AF 0%,#217BDB 48%,#4AB9FF 88%,#D5F1FF 100%);
  box-shadow:0 0 8px rgba(57,164,255,.55);
  opacity:1;pointer-events:none;will-change:transform;
}
body.light-theme > header .bt-scroll-progress-fill {
  background:linear-gradient(90deg,#1753A5 0%,#277DD5 48%,#62B7F3 90%,#B8E6FF 100%);
}
body > header.bt-nav-loading .bt-scroll-progress-fill,
body > header.bt-nav-complete .bt-scroll-progress-fill {opacity:0;}
@media (prefers-reduced-motion: reduce) {
  body > header .bt-scroll-progress-fill {transition:none !important;}
}
