.hero-viewport {
  --hero-viewport: 100vh;
  --hero-gutter: clamp(12px, 2vw, 32px);
  min-height: var(--hero-viewport);
  isolation: isolate;
}

@supports (height: 100dvh) {
  .hero-viewport {
    --hero-viewport: 100dvh;
  }
}

.hero-intro {
  position: relative;
  z-index: 1;
}

.hero-slot {
  position: relative;
  z-index: 2;
}

.hero-intro .auditbar:focus-within {
  outline: 2px solid #6293dc;
  outline-offset: 3px;
}

.b-content {
  padding-top: clamp(35px, 7vh, 63px);
}

.b-visual {
  margin-top: clamp(28px, 7.22vh, 65px);
}

/* ScrollTrigger pins the viewport. The slot stays in flow as the starting
   coordinate, while the panel is laid out at its final size for a uniform zoom. */
.hero-scroll-story.is-pinned .hero-viewport {
  height: var(--hero-viewport);
  min-height: 0;
  overflow: clip;
}

.hero-scroll-story.is-pinned .hero-slot {
  width: 100%;
  max-width: none;
  height: 0;
  padding: 0;
}

.hero-scroll-story.is-pinned .b-stage-wrap {
  margin-top: clamp(28px, 7.22vh, 65px);
}

.hero-scroll-story.is-pinned .hero-showcase {
  position: absolute;
  top: 0;
  left: var(--hero-gutter);
  width: calc(100% - 2 * var(--hero-gutter));
  max-width: none;
  height: calc(var(--hero-viewport) - 2 * var(--hero-gutter));
  margin: 0;
  transform-origin: 50% 0;
}

.hero-scroll-story.is-pinned .a-stage {
  border-radius: 22px;
}

.hero-scroll-story.is-pinned .b-visual {
  border: 1px solid #ffffff66;
  border-radius: 18px;
}

.hero-scroll-story.is-pinned .a-showcase {
  height: calc(100% - 88px);
}

.hero-scroll-story.is-pinned .a-web-body {
  height: calc(100% - 55px);
}

.a-ops {
  min-height: 320px;
  height: auto;
}

.hero-scroll-story.is-pinned .b-line-chart {
  height: clamp(182px, calc(var(--hero-viewport) - 500px), 600px);
}

/* Keep the approved dashboard columns, including the side panels, on laptops. */
.b-ui-main {
  grid-template-columns: minmax(150px, 17%) minmax(0, 1fr) minmax(218px, 20%);
}

.b-ui-center {
  padding: 30px clamp(15px, 2.4vw, 35px);
}

.b-ui-kpis {
  gap: clamp(12px, 2.9vw, 42px);
}

.b-ui-kpis strong {
  font-size: clamp(23px, 2.43vw, 35px);
}

@media (max-height: 830px) and (min-width: 801px) {
  .hero-intro .nav {
    height: clamp(72px, 11vh, 94px);
  }

  .a-top {
    padding-top: clamp(25px, 4.4vh, 45px);
    padding-bottom: clamp(23px, 3.7vh, 37px);
  }

  .b-content {
    padding-top: clamp(29px, 5.2vh, 63px);
  }

  .b-content h1,
  .a-top h1 {
    font-size: clamp(51px, min(6.3vw, 11vh), 104px);
  }

  .b-visual,
  .hero-scroll-story.is-pinned .b-stage-wrap {
    margin-top: clamp(25px, 5.3vh, 65px);
  }
}

@media (max-width: 960px) {
  .b-visual {
    height: auto;
  }

  .b-ui-main {
    height: auto;
    grid-template-columns: minmax(150px, 23%) minmax(0, 1fr);
  }

  .b-ui-right {
    grid-column: 1 / -1;
    border-top: 1px solid #e6ebf2;
  }

  .b-ui-top {
    height: auto;
    min-height: 65px;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 20px;
  }

  .b-ui-top .tabs {
    flex-wrap: wrap;
    gap: 8px 18px;
  }
}

@media (max-width: 800px) {
  .a-top {
    padding: 32px 22px 27px;
  }

  .b-content {
    padding-top: 33px;
  }

  .a-top h1,
  .b-content h1 {
    font-size: clamp(35px, 8.7vw, 67px);
  }

  .b-content h1 {
    margin-top: 0;
  }

  .a-tag {
    margin-bottom: 18px;
  }

  .b-content .eyebrow {
    margin-bottom: 18px;
  }

  .a-top p,
  .b-content .b-sub {
    font-size: 16px;
    margin: 17px auto 20px;
  }

  .a-top .auditbar {
    max-width: 100%;
  }

  .a-stage-wrap {
    padding: 0 22px;
  }

  .a-stage {
    display: grid;
    gap: 15px;
    height: auto;
    padding: 15px;
  }

  .a-stage-top,
  .a-showcase,
  .a-ops,
  .a-corner-note {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
  }

  .a-stage-top {
    gap: 12px;
    font-size: 10px;
  }

  .a-web-nav {
    min-height: 55px;
    height: auto;
    gap: 8px 16px;
    padding: 11px 14px;
    flex-wrap: wrap;
  }

  .a-web-nav div {
    gap: 6px 12px;
    flex-wrap: wrap;
  }

  .a-web-body {
    height: auto;
  }

  .a-website-copy {
    position: relative;
    inset: auto;
    padding: 28px 16px;
  }

  .a-website-copy h3 {
    font-size: clamp(36px, 8vw, 52px);
    margin-top: 16px;
  }

  .a-aura {
    width: 100%;
  }

  .a-ops-hd,
  .a-ops-inner {
    padding-inline: 14px;
  }

  .a-stat {
    font-size: clamp(38px, 12vw, 56px);
  }

  .b-visual {
    margin-top: 27px;
  }
}

@media (max-width: 620px) {
  .b-content .auditbar {
    column-gap: 8px;
    padding-left: 12px;
  }

  .hero-intro .nav {
    column-gap: 12px;
  }

  .hero-intro .mark {
    gap: 7px;
    font-size: clamp(16px, 5vw, 21px);
  }

  .hero-intro .nav-right .btn {
    padding-inline: clamp(8px, 3.4vw, 18px);
    font-size: clamp(10px, 3vw, 13px);
  }

  .b-ui-main {
    grid-template-columns: minmax(0, 1fr);
  }

  .b-ui-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 14px;
    border-right: 0;
    border-bottom: 1px solid #e9edf3;
  }

  .b-ui-menu .b-ui-lbl {
    flex-basis: 100%;
  }

  .b-ui-menu .menuitem {
    margin: 0;
    padding: 6px 8px;
  }

  .b-ui-kpis i {
    display: block;
    width: fit-content;
    margin: 3px 0;
  }

  .b-ui-right {
    border-left: 0;
  }
}
