/* LIVER V1.5 — Adaptive hero & category rail. Loaded last. */
:root { --liver-dock-overlap:22px; --liver-scroll-offset:84px; }

/* Keep all overlay controls inside the visible hero even if vh is 35 or the browser is zoomed. */
.hero {
  position:relative; isolation:isolate; overflow:hidden;
  min-width:0; min-height:0!important; max-height:none!important;
}
.hero-main { min-height:0; }
.hero-slide, .hero-bg { inset:0; overflow:hidden; }
.hero-secondary-chair { max-width:min(40vw, 640px); object-fit:contain; }
.hero-copy {
  box-sizing:border-box;
  max-height:calc(100% - 90px);
  overflow-wrap:anywhere;
}
.hero-copy h1, .hero-copy > p { white-space:normal!important; }
.hero-stamp { max-width:calc(100% - 60px); }
.hero-scroll {
  /* Above the white category dock and the hero footer; no more overlap. */
  bottom:var(--liver-scroll-offset)!important;
  z-index:7;
  color:#5a5e68;
  display:flex;
  pointer-events:none;
  transition:opacity .24s ease;
}
.hero .hero-scroll .scroll-device { border-color:rgba(206,11,50,.48); }
.hero .hero-scroll .scroll-device span { background:#ca0b33; }
.hero-floater { z-index:8; }

/* In a short viewport the headline gets priority, decoration and secondary actions recede. */
.hero.hero--compact .hero-copy,
.hero.hero--micro .hero-copy {
  animation:none!important;
  top:calc(50% + 28px)!important;
  bottom:auto!important;
  transform:translateY(-50%)!important;
  left:clamp(18px,6vw,90px)!important;
  right:auto!important;
  width:min(520px,46vw)!important;
  padding:12px 17px 12px 0!important;
  background:linear-gradient(270deg,rgba(255,255,255,.93),rgba(255,255,255,.25))!important;
  max-height:calc(100% - 105px);
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-width:thin;
}
.hero.hero--compact .hero-copy h1 { font-size:clamp(23px,2.8vw,44px)!important;line-height:1.32!important; }
.hero.hero--compact .hero-kicker { margin:0 0 6px!important;font-size:9px!important; }
.hero.hero--compact .hero-copy > p { margin:0 0 9px!important;line-height:1.65!important;font-size:clamp(11px,1.05vw,14px)!important; }
.hero.hero--compact .thin-line { margin:6px 0 11px auto!important; }
.hero.hero--compact .hero-actions .btn { min-height:36px!important;padding:0 12px!important;font-size:11px!important; }
.hero.hero--compact .hero-stamp,
.hero.hero--compact .hero-brand-spine { display:none!important; }
.hero.hero--compact .hero-scroll { bottom:60px!important; }
.hero.hero--compact .hero-floater { bottom:16px!important; }
.hero.hero--compact .hero-secondary-chair { max-height:80%!important;bottom:5%!important; }

.hero.hero--micro .hero-copy { top:calc(50% + 30px)!important;max-height:calc(100% - 96px);width:min(400px,48vw)!important; }
.hero.hero--micro .hero-copy h1 { font-size:clamp(18px,2.1vw,30px)!important;line-height:1.27!important; }
.hero.hero--micro .hero-kicker,
.hero.hero--micro .hero-copy > p,
.hero.hero--micro .thin-line,
.hero.hero--micro .hero-actions .btn-video,
.hero.hero--micro .hero-side-index,
.hero.hero--micro .hero-scroll,
.hero.hero--micro .hero-floater,
.hero.hero--micro .hero-stamp,
.hero.hero--micro .hero-brand-spine { display:none!important; }
.hero.hero--micro .hero-copy .btn-gold { min-height:32px!important;padding:0 10px!important;font-size:10px!important; }
.hero.hero--micro .hero-actions { margin-top:7px; }
.hero.hero--micro .hero-secondary-chair { max-height:85%!important;bottom:0!important; }

/* The icon dock is part of document flow, never absolute and never below a clipped slide. */
.liver-category-rail {
  position:relative;
  z-index:16;
  width:100%;
  margin-top:calc(-1 * var(--liver-dock-overlap));
  padding-bottom:12px;
}
.category-strip.category-strip-v14 {
  margin:0 auto!important;
  max-width:calc(100% - 32px);
  min-width:0;
}
.liver-category-controls { display:none; }
.liver-category-controls[hidden] { display:none!important; }

@media(max-width:1100px) {
  .hero-copy { max-width:calc(100vw - 65px); }
  .hero-stamp { max-width:180px; }
}
@media(max-width:980px) {
  .liver-category-rail { margin-top:0; }
  .category-strip.category-strip-v14 {
    margin:0 auto!important;
    width:calc(100% - 24px)!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
    touch-action:pan-x;
    scroll-snap-type:x proximity;
    overscroll-behavior-inline:contain;
    scroll-padding-inline:12px;
    padding:18px 12px 14px!important;
    border-radius:20px!important;
    gap:8px!important;
  }
  .category-strip.category-strip-v14::-webkit-scrollbar { display:none; }
  .category-strip.category-strip-v14 .category-link {
    flex:0 0 clamp(132px,29vw,176px)!important;
    min-width:0!important;
    scroll-snap-align:center;
    min-height:120px!important;
  }
  /* Visible arrows are also keyboard-operable; swipe remains native. */
  .liver-category-controls {
    display:flex;
    align-items:center;
    justify-content:center;
    gap:18px;
    padding:8px 12px 12px;
    color:#747983;
    font-size:11px;
  }
  .liver-category-arrow {
    width:34px; height:34px;
    flex:0 0 34px;
    display:grid;place-items:center;
    color:#161920;background:#fff;
    border:1px solid #e5e7ec;
    border-radius:50%;
    box-shadow:0 4px 13px rgba(23,26,31,.05);
    transition:background .2s,color .2s,border-color .2s;
  }
  .liver-category-arrow svg{width:17px;height:17px;stroke:currentColor}
  .liver-category-arrow:hover,
  .liver-category-arrow:focus-visible {background:#ce0b32;border-color:#ce0b32;color:#fff}
  .liver-category-arrow:disabled {opacity:.3;cursor:default;box-shadow:none}
  /* The window gets smaller when zoomed; it must not cause over-wide layers. */
  .hero-secondary-chair { max-width:50vw; }
  .hero.hero--compact .hero-copy,.hero.hero--micro .hero-copy {
    width:min(460px,60vw)!important;
    left:20px!important;
    max-height:calc(100% - 90px);
  }
}
@media(max-width:700px) {
  .hero { min-height:0!important;max-height:none!important; }
  .hero-copy {
    box-sizing:border-box;
    width:calc(100% - 32px);
    max-height:calc(100% - 95px);
    left:16px!important;
    right:16px!important;
    padding:10px 14px!important;
    border-right-width:3px;
  }
  .hero.hero--compact .hero-copy,.hero.hero--micro .hero-copy {
    right:16px!important;
    left:16px!important;
    width:auto!important;
    top:auto!important;
    bottom:25px!important;
    transform:none!important;
    max-height:calc(100% - 98px);
    background:rgba(255,255,255,.93)!important;
    box-shadow:0 6px 30px rgba(20,20,20,.055);
  }
  .hero.hero--compact .hero-copy h1 {font-size:clamp(20px,5.5vw,29px)!important}
  .hero.hero--micro .hero-copy {bottom:10px!important;max-height:calc(100% - 85px)}
  .hero.hero--micro .hero-copy h1 {font-size:clamp(18px,5vw,24px)!important}
  .hero.hero--compact .hero-copy > p {display:none!important}
  .hero.hero--compact .hero-scroll {display:none!important}
  .hero.hero--compact .hero-secondary-chair {max-height:55%!important;bottom:31%!important;max-width:68vw!important;}
  .hero.hero--micro .hero-secondary-chair {max-height:48%!important;bottom:36%!important;}
  .hero-floater,.hero-stamp {display:none!important}
  .hero-scroll {display:none!important}
  .category-strip.category-strip-v14 {
    width:calc(100% - 20px)!important;
    margin:0 auto!important;
    padding:14px 9px!important;
    min-height:0!important;
    border-radius:17px!important;
  }
  .category-strip.category-strip-v14 .category-link {
    flex:0 0 clamp(122px,38vw,160px)!important;
    min-height:116px!important;
  }
  .liver-category-controls {gap:12px;padding:9px 12px 10px}
}
@media(max-width:410px) {
  .hero.hero--compact .hero-copy,.hero.hero--micro .hero-copy {right:12px!important;left:12px!important;}
  .liver-category-controls{font-size:10px}
}
@media(prefers-reduced-motion:reduce) {
  .liver-category-arrow, .hero-scroll{transition:none!important}
}
