/* The intro (index.html). Tokens and defaults are in base.css. */
html.bridge-story-active,
body.bridge-story-active {
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}
#story {
  position: fixed;
  inset: 0;
  overflow: hidden;
  touch-action: pan-x;
  isolation: isolate;
}
#background-ink {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
#frame {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
  background: var(--paper);
  z-index: 1;
  isolation: isolate;
  container-type: size;
  box-shadow:
    inset 0 1px 0 rgb(255 253 248 / calc(var(--platform-shadow, 0) * 0.8 * (1 - var(--banded, 0)))),
    0 0 0 calc(var(--edge-lift, 0) * 1.3px) rgb(255 253 248 / calc(var(--edge-lift, 0) * 0.8)),
    0 0 2px rgb(43 26 28 / calc(var(--platform-shadow, 0) * 0.06 * (1 - var(--banded, 0))));
}
.platform-ground-shadow {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  border-radius: 22px;
  background: #402d23;
}
/* New surface being laid along the border (src/ui/platform-elevation.js drawBand). It sits
   beneath the platform, so only the part beyond the old edge shows. */
.platform-band {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: visible;
  pointer-events: none;
  /* The platform's own rim shadow, carried while the band shows (#frame drops it then). */
  filter: drop-shadow(0 0 2px rgb(43 26 28 / calc(var(--platform-shadow, 1) * 0.06)));
}
.platform-band-light {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: visible;
  pointer-events: none;
  fill: rgb(255 253 248 / calc(var(--platform-shadow, 1) * 0.8));
}
.platform-growth {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  z-index: 0;
  pointer-events: none;
}
.platform-growth > svg { display: block; width: 100%; height: 100%; }
#world {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
  border-radius: inherit;
}
.scout-trails {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
  z-index: 1;
}
#platform-ink {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  z-index: 0;
  pointer-events: none;
}
#targets {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}
.person-target {
  position: absolute;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  pointer-events: auto;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.person-target:focus-visible {
  outline: 1px solid var(--red);
  outline-offset: 3px;
}
#portrait {
  position: absolute;
  top: 50%;
  left: 54%;
  width: 39%;
  opacity: 0;
  z-index: 5;
  transform: translateY(-50%);
  pointer-events: none;
}
#portrait:not([inert]) {
  pointer-events: auto;
}
#frame[data-side='right'] #portrait {
  left: 7%;
}
#person-name {
  margin: 0 0 clamp(10px, 2cqw, 25px);
  color: var(--red);
  font-size: clamp(12px, 1.9cqw, 25px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
#quote {
  margin: 0;
  font-size: clamp(15px, var(--quote-size, 3.5cqw), 44px);
  font-weight: 300;
  line-height: 1.22;
  letter-spacing: -0.035em;
  text-wrap: pretty;
}
#story-text {
  position: absolute;
  z-index: 2;
  width: min(83vw, 940px);
  left: 50%;
  margin: 0;
  transform: translateX(-50%);
  font-size: clamp(20px, 2.05vw, 31px);
  font-weight: 300;
  line-height: 1.37;
  letter-spacing: -0.025em;
  text-align: center;
  text-wrap: balance;
  pointer-events: none;
}
.text-part {
  opacity: 0;
}
#notice,
.fallback {
  position: fixed;
  inset: 43% 15% auto;
  text-align: center;
  font-size: 16px;
}
@media (max-width: 700px) {
  #story-text {
    width: 86vw;
    font-size: clamp(19px, 4vw, 24px);
    line-height: 1.37;
  }
  #quote {
    font-size: clamp(12px, var(--quote-size, 3.5cqw), 26px);
  }
  #person-name {
    font-size: clamp(10px, 2.2cqw, 17px);
    margin-bottom: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .citation-panel {
    transition: none !important;
  }
}

#platform-ink svg,
#background-ink svg,
#logo-overlay svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
}
#logo-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  border-radius: inherit;
}
#next-person {
  position: absolute;
  z-index: 6;
  background: transparent;
  border: 0;
  border-radius: 18px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  outline-offset: 5px;
}
#next-person:focus-visible {
  outline: 1px solid var(--rose);
}
#wordmark {
  position: absolute;
  z-index: 4;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: clamp(19px, 2.9cqw, 38px);
  font-weight: 300;
  letter-spacing: -0.045em;
  color: var(--paper);
  opacity: 0;
  line-height: 1.15;
}
#example-text {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  width: min(86vw, 950px);

  font-size: clamp(18px, 1.7vw, 25px);
  font-weight: 300;
  line-height: 1.35;
  letter-spacing: -0.018em;
  text-align: center;
}
@media (max-width: 700px) {
  #example-text {
    font-size: clamp(17px, 3.6vw, 22px);
    width: 92vw;
  }
  #story[data-slide='4'] #story-text {
    font-size: 21px;
  }
}
