.scroll-shell{
  height: var(--app-vh, 100dvh);
  min-height: 100svh;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: auto;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
}

.snap{
  min-height: var(--app-vh, 100dvh);
  min-height: 100svh;
}

/* IMPORTANT: steps must have height */
.snap-step{
  height: var(--app-vh, 100dvh);
  min-height: 100svh;
  display: block;
}

.section{
  display: grid;
  place-items: center;
  padding: 0 var(--pad);
}

.section__inner{
  width: min(1100px, 100%);
  padding: 64px 0;
}

.project-body .section__inner{
  width: min(1040px, 100%);
  padding-block: clamp(44px, 6vh, 72px);
}

/* Project layout tokens (remodulable across project pages) */
:root{
  --proj-pad-a-top: 72px;
  --proj-pad-a-bottom: 40px;
  --proj-pad-b-top: 56px;
  --proj-pad-b-bottom: 2px;
  --proj-pad-c-top: 40px;
  --proj-pad-c-bottom: 56px;
  --proj-pad-d-top: 48px;
  --proj-pad-d-bottom: 28px;
  --proj-pad-e-top: 40px;
  --proj-pad-e-bottom: 72px;
  --proj-pad-f-top: 36px;
  --proj-pad-f-bottom: 38px;
  --proj-pad-g-top: 20px;
  --proj-pad-g-bottom: 56px;
  --proj-pad-h-top: 56px;
  --proj-pad-h-bottom: 44px;
}

.section__inner.layout-pad-a{
  padding-top: var(--proj-pad-a-top) !important;
  padding-bottom: var(--proj-pad-a-bottom) !important;
}

.section__inner.layout-pad-b{
  padding-top: var(--proj-pad-b-top) !important;
  padding-bottom: var(--proj-pad-b-bottom) !important;
}

.section__inner.layout-pad-c{
  padding-top: var(--proj-pad-c-top) !important;
  padding-bottom: var(--proj-pad-c-bottom) !important;
}

.section__inner.layout-pad-d{
  padding-top: var(--proj-pad-d-top) !important;
  padding-bottom: var(--proj-pad-d-bottom) !important;
}

.section__inner.layout-pad-e{
  padding-top: var(--proj-pad-e-top) !important;
  padding-bottom: var(--proj-pad-e-bottom) !important;
}

.section__inner.layout-pad-f{
  padding-top: var(--proj-pad-f-top) !important;
  padding-bottom: var(--proj-pad-f-bottom) !important;
}

.section__inner.layout-pad-g{
  padding-top: var(--proj-pad-g-top) !important;
  padding-bottom: var(--proj-pad-g-bottom) !important;
}

.section__inner.layout-pad-h{
  padding-top: var(--proj-pad-h-top) !important;
  padding-bottom: var(--proj-pad-h-bottom) !important;
}

.section--nav-offset-mobile .section__inner{
  padding-top: calc(var(--scr-nav-height, 80px) + 22px) !important;
}

/* Normalize legacy inline paddings across project templates */
.project-body .section:not(.section--technical-notes) .section__inner[style]{
  padding-top: clamp(44px, 6vh, 72px) !important;
  padding-bottom: clamp(36px, 5vh, 64px) !important;
}

.section__title{
  font-size: var(--h2);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 32px 0 18px;
  line-height: 1.2;
  color: #ffffff;
  padding-top: max(12px, env(safe-area-inset-top));
}

.kicker{
  margin: 0 0 16px;
  font-size: 11px;
  line-height: 1.35;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  font-weight: 600;
  opacity: 0.95;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.section__cols{
  column-count: 2;
  column-gap: clamp(48px, 6vw, 80px);
  font-size: clamp(13px, 2vw, 16px);
  line-height: clamp(1.65, 2.1vw, 1.8);
  text-align: left;
  text-wrap: pretty;
  hyphens: auto;
  word-break: break-word;
  orphans: 3;
  widows: 3;
}

.section__cols p{
  font-size: inherit;
  line-height: inherit;
  margin: 0 0 clamp(12px, 1.5vw, 18px);
}

.section__description{
  font-size: clamp(14px, 2.2vw, 16px);
  line-height: 1.6;
  margin: 0 0 20px;
  color: rgba(255,255,255,0.85);
  font-style: italic;
  font-weight: 300;
  max-width: 90%;
}

.section .kicker{
  margin: 0 0 10px;
}

.section__title{
  margin: 0 0 16px;
}

.project-body .section + .media-full{
  margin-top: clamp(8px, 1.2vw, 16px);
}

.project-body .media-full + .section .section__inner{
  padding-top: clamp(44px, 6vh, 72px) !important;
}

/* Materials + links layout */
.materials-grid{
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.8fr);
  gap: 28px;
  align-items: start;
}

.materials-title{
  font-size: 18px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 14px;
}

.materials-subtitle{
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
  margin: 16px 0 6px;
}

.materials-copy p{
  font-size: var(--p);
  line-height: 1.6;
  margin: 0 0 10px;
}

.materials-compact .materials-grid{
  gap: 18px;
}

.materials-compact .materials-subtitle{
  margin: 9px 0 4px;
}

.materials-compact .materials-copy p{
  margin: 0 0 6px;
  line-height: 1.45;
}

.materials-compact .materials-note{
  margin: 0 0 8px;
  font-size: 12px;
}

.tech-rider-wrap{
  width: 100%;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.tech-rider-wrap::-webkit-scrollbar{
  display: none;
  width: 0;
  height: 0;
}

.tech-rider-table{
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.02);
}

.tech-rider-table th,
.tech-rider-table td{
  border: 1px solid rgba(255,255,255,0.14);
  padding: 10px 12px;
  vertical-align: top;
  text-align: left;
  font-size: 13px;
  line-height: 1.45;
}

.tech-rider-table thead th{
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.06);
}

.tech-rider-table tbody th{
  width: 20%;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.86);
}

.materials-note{
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 14px;
  opacity: 0.75;
}

.materials-buttons{
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
  overflow-x: auto;
  padding-bottom: 2px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.materials-buttons::-webkit-scrollbar{
  display: none;
  width: 0;
  height: 0;
}

.materials-model{
  margin-top: 20px;
}

.materials-model__viewer{
  width: min(560px, 100%);
  height: clamp(240px, 34vh, 380px);
  border: 0;
  border-radius: 0;
  background: transparent !important;
}

.materials-ar-btn{
  border: 1px solid rgba(255,255,255,0.35);
  background: transparent;
  color: #fff;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.materials-ar-btn:hover{
  border-color: rgba(255,255,255,0.35);
  background: transparent;
}

.materials-model__hint{
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.45;
  opacity: 0.78;
}

.materials-model--bottom{
  margin-top: 26px;
  text-align: center;
}

.materials-model--bottom .materials-title{
  text-align: center;
}

.materials-model--bottom .materials-model__viewer{
  margin-inline: auto;
}

.rover-lock{
  position: relative;
  min-height: 220vh;
}

.rover-lock__sticky{
  position: sticky;
  top: 0;
  min-height: 100vh;
  padding: calc(var(--scr-nav-height, 80px) + 12px) var(--pad) 18px;
  display: grid;
  grid-template-rows: auto 1fr;
  justify-items: center;
  align-items: stretch;
  gap: 8px;
  background: #000;
}

.rover-lock__close{
  justify-self: end;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,0.72);
  border-radius: 0;
  width: auto;
  height: auto;
  padding: 0;
  font-size: 12px;
  line-height: 1.1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.2s ease;
}

.rover-lock__close:hover{
  color: rgba(255,255,255,0.9);
}

.rover-lock__viewer{
  display: block;
  width: min(1100px, 100%);
  height: min(72vh, 760px);
  border: 0;
  border-radius: 0;
  background: transparent !important;
  touch-action: pan-y;
}

.rover-lock__fallback{
  width: min(1100px, 100%);
  height: min(72vh, 760px);
  display: grid;
  place-items: center;
  background: #040404;
}

.rover-lock__fallback img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rover-lock--fallback .rover-lock__viewer{
  display: none;
}

.rover-lock__viewer::part(default-ar-button){
  border-radius: 999px;
}

.materials-btn{
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  white-space: nowrap;
  width: max-content;
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.materials-btn:hover{
  border-color: rgba(255,255,255,0.45);
}

@media (max-width: 900px){
  .section__cols{
    column-count: 2;
    column-gap: clamp(28px, 4vw, 44px);
    line-height: 1.66;
  }
  .materials-grid{
    grid-template-columns: 1fr;
  }
  .materials-buttons{
    flex-wrap: wrap;
    overflow-x: visible;
  }
  .materials-model__viewer{
    width: 100%;
    height: clamp(220px, 42vh, 320px);
  }
  .rover-lock{
    min-height: 180vh;
  }
  .rover-lock__sticky{
    padding: calc(var(--scr-nav-height, 80px) + 10px) 14px 16px;
  }
  .rover-lock__viewer{
    width: 100%;
    height: min(64vh, 520px);
  }
  .rover-lock__fallback{
    width: 100%;
    height: min(64vh, 520px);
  }
}

@media (max-width: 640px){
  :root{ --pad: 18px; --h1: 34px; --h2: 21px; --p: 14px; }
  .section__inner{ padding: 46px 18px; }
  .project-body .section__inner{
    padding-block: clamp(32px, 5.2vh, 46px);
    padding-inline: 18px;
  }
  .project-body .section:not(.section--technical-notes) .section__inner[style]{
    padding-top: clamp(32px, 5.2vh, 46px) !important;
    padding-bottom: clamp(26px, 4.2vh, 38px) !important;
    padding-left: 18px !important;
    padding-right: 18px !important;
  }
  .section__title{
    margin: 24px 0 18px;
    font-size: 18px;
    line-height: 1.3;
  }
  .kicker{
    margin: 0 0 14px;
    font-size: clamp(10px, 2.5vw, 11px);
    line-height: 1.4;
    color: rgba(255,255,255,0.80);
    opacity: 1;
  }
  .section__cols{
    column-count: 1;
    column-gap: 0;
    line-height: 1.75;
    font-size: 14px;
    text-align: left;
  }
  .section__cols p{
    margin: 0 0 14px;
    font-size: 14px;
    line-height: 1.75;
  }
  .section__description{
    font-size: 14px;
    line-height: 1.75;
  }
  .section__cols.readmore-enabled{
    overflow: visible;
    display: block;
  }
  .section__cols.readmore-enabled.is-collapsed,
  .section__cols.readmore-enabled.is-expanded{
    display: block;
    overflow: visible;
  }
  .section__cols p.is-collapsed,
  .section__cols p.is-expanded{
    display: block;
    overflow: visible;
    text-overflow: clip;
    -webkit-line-clamp: unset;
    line-clamp: unset;
  }
  .readmore-btn{
    display: none !important;
    margin: 0 0 12px;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(255,255,255,0.82);
    font: inherit;
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
  }
  .readmore-btn[hidden]{
    display: none !important;
  }
  .section--technical-notes .section__inner{
    padding-top: 28px !important;
    padding-bottom: 36px !important;
  }
  .section--technical-notes .tech-rider-wrap{
    overflow-x: hidden;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
  }
  .section--technical-notes .tech-rider-table{
    min-width: 0;
    width: 100%;
    table-layout: fixed;
  }
  .section--technical-notes .tech-rider-table th,
  .section--technical-notes .tech-rider-table td{
    font-size: 12px;
    line-height: 1.45;
    padding: 9px 10px;
    word-break: normal;
    overflow-wrap: break-word;
    white-space: normal;
    hyphens: none;
    -webkit-hyphens: none;
    -ms-hyphens: none;
  }
  .section--technical-notes .tech-rider-table tbody th{
    width: auto;
  }
  .section--technical-notes .materials-buttons{
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    overflow: visible;
  }
  .section--technical-notes .materials-btn{
    width: 100%;
    white-space: normal;
    justify-content: center;
    text-align: center;
  }
  .section--nav-offset-mobile .section__inner{
    padding-top: calc(var(--scr-nav-height, 80px) + 20px) !important;
  }
  .media-full{
    min-height: min(64vh, 560px) !important;
  }
  .rover-lock__sticky{
    min-height: 100dvh;
  }
  .rover-lock__viewer,
  .rover-lock__fallback{
    height: clamp(260px, 56vh, 460px);
  }
}

@media (max-width: 480px){
  :root{ --pad: 14px; --h1: 28px; --h2: 19px; --p: 12px; }
  .section__inner{ padding: 36px 0; }
  .project-body .section__inner{
    padding-block: clamp(28px, 4.8vh, 40px);
  }
  .project-body .section:not(.section--technical-notes) .section__inner[style]{
    padding-top: clamp(28px, 4.8vh, 40px) !important;
    padding-bottom: clamp(22px, 3.8vh, 32px) !important;
  }
  .section__cols{
    column-count: 1;
    column-gap: 0;
    line-height: 1.58;
  }
  .split-video__item{
    height: min(40vh, 320px);
  }
  .fullwidth-video__media{
    max-height: 52vh;
  }
  .media-full{
    min-height: min(58vh, 460px) !important;
  }
}

.scroll-buffer{
  height: clamp(10vh, 14vh, 18vh);
}
@media (max-width: 820px){
  .scroll-buffer{
    height: clamp(8vh, 12vh, 16vh);
  }
}
/* Thin black bar at the very bottom of a full-width image */
.media-full{
  position: relative;
  min-height: min(92vh, 920px);
  overflow: hidden;
  margin: 0;
}

.media-full__img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fullwidth-gif{
  width: 100%;
  margin: 0;
  background: #000;
}

.fullwidth-gif img{
  display: block;
  width: 100%;
  height: auto;
  background: #000;
}

.fullwidth-video{
  width: 100%;
  margin: 0;
  background: #000;
}

.fullwidth-video__media{
  display: block;
  width: 100%;
  height: auto;
  max-height: 72vh;
  object-fit: cover;
  background: #000;
}

.split-video-section{
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  margin-top: 10px;
  margin-bottom: 10px;
  background: #000;
}

.split-video{
  width: 100%;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #000;
}

.split-video__item{
  width: 100%;
  height: min(62vh, 560px);
  object-fit: cover;
  display: block;
  background: #000;
}

@media (max-width: 900px){
  .split-video{
    grid-template-columns: 1fr;
  }
  .split-video__item{
    height: min(46vh, 420px);
  }
}

.media-full__altbar{
  position: absolute;
  left: 0px;
  bottom: 0px;
  z-index: 3;

  display: inline-block;
  width: max-content;
  max-width: calc(100% - (var(--pad) * 2));

  background: rgba(0,0,0,1.86);
  backdrop-filter: blur(6px);

  padding: 1px 2px 1px;
  border-radius:1px;

  font-size: 11px;
  line-height: 1.25;
  letter-spacing: 0.02em;
  opacity: 1.92;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 820px){
  .media-full__altbar{
    left: 0px;
    bottom: 0px;
    font-size: 9px;
    padding: 2px 2px 5px;
    border-radius: 1px;
  }
}

.media-full__altbar--inSticky{
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 6;
}
@media (max-width: 820px){
  .media-full__altbar--inSticky{ bottom: 0; }
}

.media-full__altbar--right{
  left: auto;
  right: 0;
  text-align: right;
}
.media-full__altbar--inSticky.media-full__altbar--right{
  left: auto;
  right: 0;
}

.scroll-buffer{
  height: clamp(8vh, 12vh, 16vh);
}
@media (max-width: 820px){
  .scroll-buffer{
    height: clamp(10vh, 14vh, 18vh);
  }
}

.footer-snap{
  min-height: var(--scr-footer-height);
  pointer-events: auto;
}
.footer-snap__inner{
  width: 100%;
  min-height: 100%;
}
