/* LWVlife #41 round 10 (Karl 2026-10-30 17:12 PT): large top banners must not cover the page.
   topstrip41.js measures every sticky top bar. A bar that is too tall for the screen
   (taller than max(64px, 12% of the screen height)) is put back into the normal page flow
   (it scrolls away with the page) and a small strip with Back / Close, a one-line title and Home stays on top.
   The main inner header (Back + title + language) is made compact in place instead of copied.
   Loaded LAST so it wins over earlier styles. Normal-size phones keep their compact bars unchanged. */

/* 1) a bar moved into the page flow */
.ts-flow{position:static!important;top:auto!important}
/* buttons that now live in the small strip are hidden in the big banner (no double Back) */
.ts-flow .ts-dup{display:none!important}

/* 2) the small strip */
.ts-strip{position:sticky;top:0;z-index:30;display:flex;align-items:center;gap:6px;min-height:52px;max-height:60px;
  padding:4px 8px;padding-top:calc(4px + env(safe-area-inset-top,0px));box-sizing:border-box;
  background:#1B3A6B;color:#fff;box-shadow:0 2px 6px rgba(0,0,0,.18);font-size:17px;line-height:1.15}
.ts-strip[hidden]{display:none!important}
.ts-strip button{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;gap:4px;min-height:44px;min-width:48px;
  padding:0 10px;border:2px solid #fff;border-radius:22px;background:transparent;color:#fff;font:inherit;font-size:16px;font-weight:800;
  white-space:nowrap;cursor:pointer}
.ts-strip button:focus-visible{outline:3px solid #ffb300;outline-offset:2px}
.ts-strip .ts-t{flex:1 1 auto;min-width:0;font-weight:800;font-size:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center}
@media (max-width:300px){
  .ts-strip{gap:4px;padding-left:4px;padding-right:4px}
  .ts-strip button{padding:0 6px;font-size:15px}
  .ts-strip .ts-home .ts-w{display:none}  /* Home keeps its house icon + accessible name */
  .ts-strip .ts-t{font-size:14px}
}

/* 3) main inner header compact in place (class set by topstrip41.js only when it was too tall) */
#hdr-inner.ts-compact{min-height:0!important;max-height:60px;padding:4px 6px!important;gap:4px!important;flex-wrap:nowrap!important;overflow:hidden}
#hdr-inner.ts-compact h1{font-size:16px!important;line-height:1.15!important;white-space:normal!important;word-break:normal!important;
  overflow-wrap:normal!important;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-width:0}
#hdr-inner.ts-compact #btn-back{min-height:44px!important;padding:0 8px 0 6px!important;font-size:16px}
#hdr-inner.ts-compact #btn-back::after{font-size:15px}
#hdr-inner.ts-compact .chip{min-height:44px!important;min-width:44px!important;padding:0 6px!important;font-size:14px!important}
@media (max-width:300px){
  #hdr-inner.ts-compact #btn-back::after{content:""!important;margin:0!important}   /* arrow only; aria-label stays "Back" */
  #hdr-inner.ts-compact h1{font-size:14px!important}
}

/* 4) bottom menu: on very short screens (200% zoom) it slides away while reading down and comes back on scroll up */
.bnav{transition:transform .2s ease}
html.ts-navaway .bnav{transform:translate(-50%,105%)!important}
@media (prefers-reduced-motion:reduce){.bnav{transition:none}}

/* 5) Aimee guide bar and speaking face sit just below the strip, never on top of each other */
#gd-dock.gd-top{top:calc(var(--ts-top,60px) + 6px)!important}
@media (max-height:500px){#gd-dock{max-height:45vh}}
