/*
 * Leap template foundation
 * Shared layout utilities and the only custom behavior layer shipped to sites.
 */

:root {
  --leap-primary: #1b3a5c;
  --leap-primary-dark: #12283f;
  --leap-secondary: #b08d57;
  /* Text-safe dark variant of the secondary accent: >=4.5:1 on the light
     surfaces (#fff, #f4f5f7) it is used against. create-site.py's contrast
     guard re-derives it from the spec's secondary on retheme. */
  --leap-secondary-text: #866b42;
}

html {
  font-size: 1.125rem;
  scroll-behavior: smooth;
}

/* Keep anchored sections clear of the sticky header */
[id] {
  scroll-margin-top: 6rem;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

.skip-link {
  position: fixed;
  inset: .75rem auto auto .75rem;
  z-index: 9999;
  padding: .75rem 1rem;
  color: #fff;
  background: #17202a;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}

img {
  -webkit-user-drag: none;
}

[data-hero-video] {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

.inherit-color * {
  color: inherit;
}

.rich-text > :not(div):first-child,
.rich-text > div:first-child > :first-child {
  margin-top: 0 !important;
}

.rich-text > :last-child,
.rich-text ol li:last-child,
.rich-text ul li:last-child {
  margin-bottom: 0 !important;
}

.container-medium,
.container-small,
.container-large {
  margin-right: auto !important;
  margin-left: auto !important;
}

img::selection,
svg::selection {
  background: transparent;
}

a,
.form-input,
.form-select,
.tab-link,
.site-nav__link {
  color: inherit;
  text-decoration: inherit;
  font-size: inherit;
}

.text-style-3lines,
.text-style-2lines {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
}

.text-style-3lines {
  -webkit-line-clamp: 3;
}

.text-style-2lines {
  -webkit-line-clamp: 2;
}

.inline-flex {
  display: inline-flex;
}

.hide {
  display: none !important;
}

.margin-0 {
  margin: 0 !important;
}

.padding-0 {
  padding: 0 !important;
}

.spacing-clean {
  margin: 0 !important;
  padding: 0 !important;
}

.margin-top {
  margin-right: 0 !important;
  margin-bottom: 0 !important;
  margin-left: 0 !important;
}

.margin-right {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  margin-left: 0 !important;
}

.margin-bottom {
  margin-top: 0 !important;
  margin-right: 0 !important;
  margin-left: 0 !important;
}

.margin-left {
  margin-top: 0 !important;
  margin-right: 0 !important;
  margin-bottom: 0 !important;
}

.margin-horizontal {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.margin-vertical {
  margin-right: 0 !important;
  margin-left: 0 !important;
}

.padding-top {
  padding-right: 0 !important;
  padding-bottom: 0 !important;
  padding-left: 0 !important;
}

.padding-right {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  padding-left: 0 !important;
}

.padding-bottom {
  padding-top: 0 !important;
  padding-right: 0 !important;
  padding-left: 0 !important;
}

.padding-left {
  padding-top: 0 !important;
  padding-right: 0 !important;
  padding-bottom: 0 !important;
}

.padding-horizontal {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.padding-vertical {
  padding-right: 0 !important;
  padding-left: 0 !important;
}

/* Native interaction replacements */

.hours-grid {
  font-variant-numeric: tabular-nums;
}

.site-nav__menu-button,
.carousel__control--prev,
.carousel__control--next,
.faq__question {
  -webkit-tap-highlight-color: transparent;
}

/* Every interactive element gets a visible, brand-colored keyboard focus
   ring (WCAG 2.4.7). :where() keeps specificity at the pseudo-class alone so
   the component-specific rules below still win where they need to. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--leap-secondary-text);
  outline-offset: 3px;
}

/* Contrast-safe defaults for text that sits on light cards. */
.text-style-muted {
  opacity: 0.74;
}

.hours-grid .text-style-muted {
  color: #566174;
  opacity: 1;
}

.contact-label.text-color-primary {
  color: #686868;
}

.text-color-green {
  color: var(--color-success-text, #15803d);
}

/* Image-backed white text needs a predictable worst-case backdrop. */
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: rgb(0 0 0 / 58%);
}

.hero__content {
  z-index: 1;
}

.blog-image-overlay,
.service-card__overlay {
  background-color: rgb(0 0 0 / 60%);
}

.leap-slider-ready .carousel__viewport {
  touch-action: pan-y;
}

.leap-slider-track {
  display: flex;
  align-items: stretch;
  transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.leap-slider-track.is-resizing {
  transition: none;
}

.leap-slider-track > .carousel__slide {
  flex: 0 0 100%;
  display: block;
}

/* Service groups (#716): a slide the filter row excluded leaves the flow
   entirely, so the track's translate and the grid reflow both stay honest. */
.leap-slider-track > .carousel__slide.is-filtered-out {
  display: none;
}

[data-services-carousel] .carousel__viewport {
  height: auto;
}

[data-services-carousel] .leap-slider-track > .leap-service-card-slide {
  flex: 0 0 calc((100% - 3rem) / 4);
  height: auto;
  margin-right: 1rem;
}

[data-services-carousel] .service-card {
  width: 100%;
  height: 100%;
}

/* Desktop shows the whole service menu at once; the runtime sets
   .leap-slider-grid and suspends paging above 992px. */
[data-services-carousel].leap-slider-grid .leap-slider-track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  transition: none;
  will-change: auto;
}

[data-services-carousel].leap-slider-grid
  .leap-slider-track
  > .leap-service-card-slide {
  flex-basis: auto;
  margin-right: 0;
}

.services-section .services-carousel.leap-slider-grid {
  padding-bottom: 0;
}

.services-section,
.services-section .services-carousel,
.services-section .carousel__viewport {
  background-color: transparent;
  box-shadow: none;
}

.location-card__address-row,
.location-card__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.location-card__address-row {
  gap: 0.75rem 1rem;
}

.location-card__copy {
  flex: none;
  min-height: 2.25rem;
}

#doctors {
  padding-bottom: clamp(5rem, 7vw, 7rem);
}

[data-team-slider] {
  padding-bottom: 4rem;
}

[data-team-slider].leap-slider-single {
  padding-bottom: 0;
}

.carousel__control {
  min-width: 3rem;
  min-height: 3rem;
  padding: 0;
  font: inherit;
  cursor: pointer;
  box-shadow: none;
  transition:
    color 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    opacity 160ms ease,
    transform 160ms ease;
}

.carousel__control:hover {
  border-color: #d0d5dd;
  background-color: #eee;
  box-shadow: none;
}

.carousel__control:active {
  transform: scale(0.96);
}

.carousel__control svg {
  display: block;
  pointer-events: none;
}

.leap-slider-dot {
  width: 0.95rem;
  height: 0.95rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgb(34 34 34 / 40%);
  cursor: pointer;
  transition:
    width 180ms ease,
    background-color 180ms ease,
    transform 160ms ease;
}

.leap-slider-dot:hover {
  background: rgb(34 34 34 / 65%);
}

.leap-slider-dot:active {
  transform: scale(0.96);
}

.leap-slider-dot.is-active {
  width: 1.9rem;
  background: #222;
}

.carousel__pagination-dots {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  /* Every page gets a dot (#698 K); long carousels wrap instead of clipping,
     and the right padding keeps rows out of the prev/next circles. */
  flex-wrap: wrap;
  max-width: 100%;
  padding-right: 8.5rem;
  gap: 0.5rem 0.65rem;
  width: auto;
  min-height: 3rem;
  height: auto;
  padding-top: 0;
}

.carousel__control[hidden],
.carousel__pagination[hidden],
.leap-slider-dot[hidden] {
  display: none !important;
}

.carousel__control--prev[aria-disabled="true"],
.carousel__control--next[aria-disabled="true"],
.carousel__control--prev:disabled,
.carousel__control--next:disabled {
  opacity: 0.38;
  pointer-events: none;
}

/* The bar sits clear of the viewport edge, matching the Leap site CTA. */
.sticky-cta {
  inset: auto 0% 1.25rem;
}

.faq__question {
  cursor: pointer;
}

.faq__icon {
  transition: transform 220ms ease;
}

.faq__item.is-open .faq__icon {
  transform: rotate(180deg);
}

.faq__answer[hidden] {
  display: none !important;
}

.hours-grid .is-current-day {
  color: var(--color-success-text, #15803d);
  font-weight: 600;
  opacity: 1;
}

/* Lightweight reveal system: transform and opacity only. */

.leap-reveal {
  --leap-delay: 0ms;
}

.leap-motion .leap-reveal {
  opacity: 0;
  transform: translate3d(0, 1rem, 0);
  transition:
    opacity 520ms ease var(--leap-delay),
    transform 520ms cubic-bezier(0.22, 1, 0.36, 1) var(--leap-delay);
}

.leap-motion .leap-reveal[data-scale] {
  transform: scale(0.975);
}

.leap-motion .leap-reveal.is-visible {
  opacity: 1;
  transform: none;
}

.fade-in,
.fade-in-20,
.fade-in-40 {
  animation: leap-fade-in 480ms ease both;
}

.fade-in-20 {
  animation-delay: 120ms;
}

.fade-in-40 {
  animation-delay: 220ms;
}

@keyframes leap-fade-in {
  from {
    opacity: 0;
    transform: translate3d(0, -0.5rem, 0);
  }
}

.pulse {
  position: relative;
}

/* The ring is invisible until the JS marks the dot on-screen, and the
   animation is *declared* only on that state rather than paused there: a
   paused animation still resolves to its 0% keyframe, which left a static
   ring around every dot for reduced-motion and off-screen readers. */
.pulse::after {
  content: "";
  position: absolute;
  inset: -0.2rem;
  border: 1px solid currentColor;
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
}

.pulse.is-motion-visible::after {
  animation: leap-pulse 2.2s ease-out infinite;
}

@keyframes leap-pulse {
  from {
    opacity: 0.55;
    transform: scale(0.85);
  }
  to {
    opacity: 0;
    transform: scale(1.8);
  }
}

/* The exported gradient animation and mask shine caused continuous paint
   work: an animated `background-position` on a permanently on-screen element
   repaints the button every frame. The colour shift below is the paint-safe
   version of Prime Choice Dental's persistent CTA (Notion #729 Exhibit B):
   the brand gradient is painted ONCE onto an oversized pseudo-element that
   only ever moves by `transform`, so the compositor slides it under the label
   and nothing repaints. The gradient repeats its first stop at the end, so a
   two-thirds travel is seamless in both directions. The static fill on the
   button itself is the reduced-motion state and the paint behind the label
   before the layer arrives. `overflow: hidden` keeps the layer inside the
   rounded box; `.clip` is already positioned, so the label sits above it. */

.primary-button.animated-gradient-button {
  background: linear-gradient(
    120deg,
    var(--leap-primary),
    var(--leap-secondary)
  ) !important;
  background-size: 100% 100% !important;
  animation: none !important;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

@media (prefers-reduced-motion: no-preference) {
  .primary-button.animated-gradient-button::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 300%;
    z-index: -1;
    background: linear-gradient(
      100deg,
      var(--leap-primary) 0%,
      var(--leap-secondary) 22%,
      var(--leap-primary-dark) 40%,
      var(--leap-secondary-text) 58%,
      var(--leap-primary) 66.667%,
      var(--leap-secondary) 88.667%,
      var(--leap-primary) 100%
    );
    pointer-events: none;
    will-change: transform;
    animation: leap-cta-shift 9s ease-in-out infinite;
  }

  .primary-button.animated-gradient-button:hover::before {
    animation-duration: 3.5s;
  }
}

@keyframes leap-cta-shift {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(-66.667%, 0, 0);
  }
}

.primary-button.animated-gradient-button:hover {
  transform: translateY(-2px);
}

.primary-button.animated-gradient-button:active {
  transform: scale(0.96);
}

.button-link:active,
.service-card__details:active,
.service-card__book:active {
  transform: scale(0.96);
}

.location-image,
.service-card__image,
.team-member__media img,
.technology-card img {
  outline: 1px solid rgb(0 0 0 / 10%);
  outline-offset: -1px;
}

.shine {
  -webkit-mask-image: none !important;
  animation: none !important;
}

.hero__benefits {
  scrollbar-width: none;
}

.hero__benefits::-webkit-scrollbar {
  display: none;
}

.hero__benefit.loop-move-left {
  animation: none !important;
}

/* Service and technology detail drawer.

   The drawer is a modal overlay, so it must outrank every stacking context on
   the page. Do not lower these numbers: the footer sits inside a revealing
   wrapper (.appointment-strip.overflow-mobile here, .scroll_wrap.overflow-mobile
   on the older Webflow forks, which carries z-index 999999) and the book-page
   nav carries z-index 999999999. Anything below those lets the footer paint
   over a drawer opened near the bottom of the page. */

.leap-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  background: rgb(15 18 20 / 55%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms ease;
}

.leap-drawer-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* The side inset keeps a sliver of page visible so the sheet reads as an
   overlay, not a takeover. Kept small: every rem here is reading width lost
   on a 375pt phone. Desktop is unchanged — the 56rem cap bites first. */
.leap-drawer {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2147483647;
  display: flex;
  flex-direction: column;
  width: min(100% - 1.25rem, 56rem);
  max-height: 82dvh;
  margin: 0 auto;
  color: #1a1a1a;
  background: #fff;
  border-radius: 1.25rem 1.25rem 0 0;
  box-shadow: 0 -0.75rem 3rem rgb(0 0 0 / 25%);
  transform: translate3d(0, 100%, 0);
  transition: transform 300ms cubic-bezier(0.32, 0.72, 0, 1);
}

.leap-drawer.is-open {
  transform: none;
}

.leap-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 1.75rem 0.75rem;
}

.leap-drawer-title {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.25;
  font-weight: 700;
}

.leap-drawer-close {
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #1a1a1a;
  background: #f1f1f0;
  font: inherit;
  cursor: pointer;
}

.leap-drawer-close:hover {
  background: #e5e5e3;
}

.leap-drawer-body {
  overflow-y: auto;
  padding: 0 1.75rem 2rem;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.leap-drawer-body img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
}

.leap-drawer-body h2 {
  margin: 1.5em 0 0.5em;
  font-size: 1.2rem;
}

.leap-drawer-loading {
  padding: 3rem 0;
  color: #777;
  text-align: center;
}

.leap-drawer-grabber {
  flex: none;
  width: 2.5rem;
  height: 0.3rem;
  margin: 0.6rem auto 0;
  border-radius: 999px;
  background: #e0e0de;
}

body.leap-drawer-lock,
body.leap-menu-open {
  overflow: hidden;
}

/* Optional eight-image gallery injected by create-site.py. */

.bento-gallery {
  display: grid;
  grid-template-rows: repeat(4, auto);
  grid-template-columns: repeat(6, 1fr);
  grid-auto-columns: 1fr;
  gap: 1rem;
  width: 100%;
  min-height: 55rem;
}

.bento-gallery-item {
  position: relative;
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 2em;
  overflow: hidden;
  color: #fff;
  text-align: center;
  border-radius: 0.5rem;
}

.bento-gallery .bento-image {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: cover;
}

.bento-gallery-item.g1 {
  grid-area: span 2 / span 4;
}

.bento-gallery-item.g2 {
  grid-area: span 1 / span 2;
}

.bento-gallery-item.g5 {
  grid-area: span 2 / span 2;
}

.bento-gallery-item.g3,
.bento-gallery-item.g4,
.bento-gallery-item.g6 {
  grid-area: span 1 / span 1;
}

.bento-gallery-item.g7 {
  grid-area: 4 / 3 / 5 / 4;
}

.bento-gallery-item.g8 {
  grid-area: span 2 / span 3;
}

/* Six- and four-tile galleries (#729 Exhibit D): the pool rarely holds eight
   sharp photos of one business, so the bento now has smaller honest shapes
   instead of not shipping. Six: one 2x4 hero tile with two stacked beside it,
   then a row of three. Four: one tall tile, one wide, two squares. The phone
   scroller below ignores the grid, so only the desktop areas change. */

.bento-gallery.bento-gallery--6 {
  grid-template-rows: repeat(3, minmax(0, 1fr));
  min-height: 42rem;
}

.bento-gallery--6 .bento-gallery-item.g1 {
  grid-area: span 2 / span 4;
}

.bento-gallery--6 .bento-gallery-item.g2,
.bento-gallery--6 .bento-gallery-item.g3,
.bento-gallery--6 .bento-gallery-item.g4,
.bento-gallery--6 .bento-gallery-item.g5,
.bento-gallery--6 .bento-gallery-item.g6 {
  grid-area: span 1 / span 2;
}

.bento-gallery.bento-gallery--4 {
  grid-template-rows: repeat(2, minmax(0, 1fr));
  grid-template-columns: repeat(4, 1fr);
  min-height: 34rem;
}

.bento-gallery--4 .bento-gallery-item.g1 {
  grid-area: span 2 / span 2;
}

.bento-gallery--4 .bento-gallery-item.g2 {
  grid-area: span 1 / span 2;
}

.bento-gallery--4 .bento-gallery-item.g3,
.bento-gallery--4 .bento-gallery-item.g4 {
  grid-area: span 1 / span 1;
}

@media screen and (max-width: 1920px) {
  html {
    font-size: calc(0.625rem + 0.4166666667vw);
  }
}

@media screen and (max-width: 1440px) {
  html {
    font-size: calc(0.8126951093rem + 0.2081165453vw);
  }
}

/* Optional semantic-coverage section injected by source_coverage.py. */
.other-info-section {
  background: #f8f9ff;
}

.other-info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}

.other-info-card {
  background: #fff;
  border: 1px solid #e4e7ec;
  border-radius: 1.25rem;
  box-shadow: 0 0.5rem 1.5rem #1018280d;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.other-info-card__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.other-info-card__media img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.other-info-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem;
}

.other-info-card__body .button-link {
  margin-top: auto;
}

.other-info-card__title {
  font-size: 1.25rem;
  line-height: 1.25;
  margin: 0;
}

@media screen and (max-width: 991px) {
  .other-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hide,
  .hide-tablet {
    display: none !important;
  }

  .site-nav .site-nav__menu {
    top: 100%;
    right: 0;
    left: 0;
    z-index: 1000;
    width: 100%;
    max-height: calc(100dvh - 4.5rem);
    margin: 0;
    overflow-y: auto;
    display: block;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translate3d(0, -0.5rem, 0);
    box-shadow:
      0 8px 16px -8px rgb(16 24 40 / 10%),
      0 20px 36px -16px rgb(16 24 40 / 18%);
    transition:
      opacity 180ms ease,
      transform 180ms cubic-bezier(0.2, 0, 0, 1),
      visibility 0s linear 180ms;
  }

  .site-nav .site-nav__menu-button {
    display: block;
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: 0.625rem;
    color: inherit;
    background: transparent;
    border-radius: 0.75rem;
    transition:
      background-color 160ms ease,
      transform 160ms ease;
  }

  .site-nav .site-nav__menu-button:hover,
  .site-nav .site-nav__menu-button.is-open {
    color: inherit;
    background: rgb(45 64 234 / 7%);
  }

  .site-nav .site-nav__menu-button:active {
    transform: scale(0.96);
  }

  .site-nav .site-nav__menu.is-open {
    display: block;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translate3d(0, 0, 0);
    transition-delay: 0s;
  }

  .site-nav__menu-line--top,
  .site-nav__menu-line--middle,
  .site-nav__menu-line--bottom {
    transition:
      opacity 180ms cubic-bezier(0.2, 0, 0, 1),
      transform 180ms cubic-bezier(0.2, 0, 0, 1);
  }

  .site-nav__menu-button.is-open .site-nav__menu-line--top {
    transform: translateY(8px) rotate(45deg);
  }

  .site-nav__menu-button.is-open .site-nav__menu-line--middle {
    opacity: 0;
    transform: scaleX(0.25);
  }

  .site-nav__menu-button.is-open .site-nav__menu-line--bottom {
    transform: translateY(-8px) rotate(-45deg);
  }

  .bento-gallery {
    min-height: 38rem;
  }

  .bento-gallery.bento-gallery--6 {
    min-height: 30rem;
  }

  .bento-gallery.bento-gallery--4 {
    min-height: 24rem;
  }

  [data-services-carousel] .leap-slider-track > .leap-service-card-slide {
    flex-basis: calc((100% - 1rem) / 2);
  }
}

@media screen and (max-width: 767px) {
  .hide-mobile-landscape {
    display: none !important;
  }

  /* A hidden .hide-mobile-landscape cell must not leave its column behind. */
  .location-grid,
  .location-grid.is-two-column {
    grid-template-columns: 1fr;
  }

  .hero__benefits {
    width: 100% !important;
    max-width: 100%;
    padding-right: 1.25rem;
    padding-left: 1.25rem;
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }

  .hero__benefit {
    scroll-snap-align: start;
  }

  .bento-gallery {
    display: flex;
    min-height: 20rem;
    padding-right: var(--page-padding-mobile);
    padding-left: var(--page-padding-mobile);
    overflow-x: auto;
  }

  .bento-gallery-item.narrow {
    width: 50%;
  }

  [data-services-carousel] .leap-slider-track > .leap-service-card-slide {
    flex-basis: 85%;
  }

  /* Phones scroll carousels natively, like the gallery: the runtime sets
     .leap-slider-scroll below 768px and hides the arrows and dots. */
  .leap-slider-scroll {
    /* width:auto lets the negative margins reach both screen edges. */
    width: auto;
    height: auto;
    margin-inline: calc(-1 * var(--page-padding-mobile));
    padding-bottom: 0;
  }

  .leap-slider-scroll .carousel__viewport {
    width: 100%;
    height: auto;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    touch-action: auto;
    scroll-snap-type: x proximity;
    scroll-padding-left: var(--page-padding-mobile);
  }

  .leap-slider-scroll .leap-slider-track {
    transform: none !important;
    padding-inline: var(--page-padding-mobile);
  }

  .leap-slider-scroll .leap-slider-track > .carousel__slide {
    flex: 0 0 85%;
    margin-right: 1rem;
    scroll-snap-align: start;
  }
}

@media screen and (max-width: 640px) {
  .leap-drawer {
    max-height: 92dvh;
  }

  .leap-drawer-head {
    padding: 1.1rem 1.25rem 0.5rem;
  }

  .leap-drawer-body {
    padding: 0 1.25rem 1.5rem;
  }
}

@media screen and (max-width: 479px) {
  html {
    font-size: calc(0.7494769874rem + 0.8368200837vw);
  }

  .hide-mobile {
    display: none !important;
  }

  .bento-gallery-item {
    width: 95%;
    max-height: 130vw;
  }

  .bento-gallery-item.narrow {
    width: 70%;
  }

  .other-info-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .leap-reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Article covers (W3): Notion-style wide, heavily cropped cover bands — atop
   the detail drawer and atop published blog article pages. */

.leap-drawer-cover {
  flex: none;
  aspect-ratio: 7 / 2;
  overflow: hidden;
  border-radius: 1.25rem 1.25rem 0 0;
}

.leap-drawer-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

.leap-drawer.has-cover .leap-drawer-grabber {
  position: absolute;
  top: 0.6rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  margin: 0;
  background: rgb(255 255 255 / 80%);
}

.leap-drawer-actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 0.5rem;
}

.leap-drawer-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #1a1a1a;
  background: #f1f1f0;
  font: inherit;
  cursor: pointer;
}

.leap-drawer-copy:hover {
  background: #e5e5e3;
}

.leap-drawer-copy:focus-visible {
  outline: 3px solid var(--leap-secondary-text);
  outline-offset: 3px;
}

.leap-drawer-copy.is-copied svg {
  display: none;
}

.leap-drawer-copy.is-copied::after {
  content: "\2713";
  font-weight: 700;
  color: var(--color-success-text, #15803d);
}

.leap-article-cover {
  aspect-ratio: 7 / 2;
  overflow: hidden;
}

.leap-article-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.leap-article-head {
  padding: 2.75rem 0 0.5rem;
}

.leap-article-kicker {
  margin-bottom: 1rem;
  color: #6e6e73;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 767px) {
  .leap-article-cover,
  .leap-drawer-cover {
    aspect-ratio: 5 / 2;
  }
}

/* Bio crests and the credential ring (#437 Exhibit L). create-site.py sets an
   institution's real mark inline beside the name the bio writes out, and rings
   one credential phrase. Ornament on prose: it must not move the text, recolour
   it, or disturb the overflow measurement setupBioScrollHints() relies on. */

/* Mark + the institution's first word travel together, so a line break cannot
   orphan a logo. */
.bio-crest {
  white-space: nowrap;
}

/* Square by design — logo.dev letterboxes every mark into a 128x128 and
   object-fit cannot undo that padding without cropping. The plate is what makes
   a full-bleed mark and a transparent one read as the same kind of object. */
.bio-crest__mark {
  display: inline-block;
  width: 1.15em;
  height: 1.15em;
  margin-right: 0.28em;
  vertical-align: -0.22em;
  border-radius: 0.24em;
  background-color: #fff;
  object-fit: contain;
}

/* inline-block, never inline: one unbroken box is the only geometry a single
   stroke can wrap. line-height:1 keeps the assembly shorter than the bio's 1.5
   line box, so a ring never changes how tall the paragraph is. The side padding
   is load-bearing — the ellipse is narrowest where the text sits. */
.bio-annot {
  position: relative;
  display: inline-block;
  line-height: 1;
  padding: 0.1em 0.78em 0.1em 0.62em;
  white-space: nowrap;
}

/* Without this the left end of the stroke runs through the glyph. */
.bio-annot--icon {
  padding-left: 1em;
}

.bio-annot__text {
  font-weight: 500;
}

/* width/height are explicit: an absolutely positioned <svg> with four insets
   and width:auto falls back to the 300x150 replaced-element default instead of
   stretching. Nudged up off centre because credential phrases are cap-height,
   so a centred ring reads as sagging. */
.bio-annot__ring {
  position: absolute;
  top: -0.34em;
  left: 0;
  width: 100%;
  height: calc(100% + 0.56em);
  color: var(--leap-primary);
  overflow: visible;
  pointer-events: none;
}

/* A black-on-transparent Noun Project PNG used as a mask, so one cached glyph
   paints itself in whatever brand colour the site was rethemed to. create-site
   writes the mask URL inline — a url() in a custom property would resolve
   against this stylesheet's directory, not the page. */
.bio-annot__icon {
  display: inline-block;
  width: 1.02em;
  height: 1.02em;
  margin-right: 0.28em;
  vertical-align: -0.13em;
  background-color: var(--leap-primary);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

@media (max-width: 767px) {
  .bio-annot {
    padding-left: 0.5em;
    padding-right: 0.6em;
  }

  .bio-annot--icon {
    padding-left: 0.86em;
  }

  .bio-annot__ring {
    top: -0.3em;
    height: calc(100% + 0.48em);
  }
}
