/* Keep the journey overlays in the original position. The full definition
   remains in the static story and is also used by the Product dialog. */
html.avk-journey #site-footer .footer-links,
html.avk-journey:not([data-epilogue='on']) #footer-faq,
html.avk-journey #avalokit-definition .definition-detail,
html.avk-journey.avk-compact-intro :is(#avalokit-definition, #avalokit-launch),
html.avk-journey .static-faq {
  display: none;
}

html.avk-journey #avalokit-definition {
  max-width: 57ch;
  margin: 12px auto 0;
  font-size: 14px;
  line-height: 1.55;
  text-wrap: pretty;
}

html.avk-journey #avalokit-launch {
  margin: 6px auto 0;
  font-size: 12px;
  line-height: 1.55;
}

@media (max-width: 600px) {
  html.avk-journey #avalokit-definition {
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.5;
  }
}

html.avk-journey.avk-compact-story #avalokit-story .story-panel:not(#story-4) {
  width: calc(100% - 32px);
}

html.avk-journey.avk-compact-story #avalokit-story .story-index {
  margin-bottom: 10px;
}

html.avk-journey.avk-compact-story #avalokit-story :is(#story-1, #story-2, #story-3) :is(h1, h2) {
  font-size: clamp(22px, 6.9vw, 29px);
  line-height: 1.2;
}

html.avk-journey.avk-compact-story #avalokit-story :is(#story-1, #story-2, #story-3) .story-reading {
  margin-top: 12px;
}

html.avk-journey.avk-compact-story #avalokit-story :is(#story-1, #story-2, #story-3) p.set {
  font-size: 13px;
  line-height: 1.5;
}

.nav :is(a, button):focus-visible,
#mobile-menu-panel :is(a, button):focus-visible {
  outline: 1px solid #fff;
  outline-offset: 3px;
  border-radius: 2px;
}

.nav .nav-action,
#mobile-menu-primary .nav-action {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.nav a:hover,
#mobile-menu-panel a:hover,
#site-footer a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

#mobile-menu-panel {
  padding: 8px 14px;
  background: rgba(32, 34, 30, .94);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 4px;
  scrollbar-width: thin;
}

#mobile-menu-secondary a {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 44px;
  padding: 4px 0;
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  text-align: right;
}

html.avk-journey #site-footer #footer-faq {
  min-height: 32px;
  margin-bottom: 10px;
  pointer-events: auto;
}

#notice {
  max-height: min(85svh, calc(100dvh - 32px));
  overflow: auto;
  overscroll-behavior: contain;
}

#notice[data-notice='product'] {
  width: min(510px, calc(100% - 32px));
  padding: clamp(20px, 6.5vw, 40px);
}

#notice[data-notice='product'] .tag {
  margin-bottom: 16px;
}

#notice[data-notice='product'] h2 {
  margin-bottom: 12px;
}

#notice[data-notice='product'] p {
  line-height: 1.62;
}

#notice[data-notice='product'] .close {
  margin-top: 14px;
}

#notice-launch {
  margin-top: 14px;
}

#notice-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 10px;
  color: #fff;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

#notice-link[hidden] {
  display: none;
}

/* Without the journey controller, use the same content in a scrolling page. */
html:not(.avk-journey) #journey {
  position: absolute;
  inset: 0 0 auto;
  height: clamp(280px, 56vh, 550px);
  overflow: hidden;
  pointer-events: none;
}

html:not(.avk-journey) #stage {
  position: absolute;
  inset: 0;
  height: auto;
}

html:not(.avk-journey) #avk-entry-shade {
  z-index: 2;
  opacity: 1;
  background: linear-gradient(to bottom, rgba(23, 24, 21, .72), rgba(42, 42, 38, .72) 30%, #2a2a26 96%);
}

html:not(.avk-journey) :is(.foot, #epilogue, #avk-start-hint, #mobile-menu-toggle) {
  display: none;
}

html:not(.avk-journey) .nav {
  position: relative;
  inset: auto;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 20px 0 0;
}

html:not(.avk-journey) .nav::before {
  display: none;
}

html:not(.avk-journey) .nav-links {
  flex-wrap: wrap;
  gap: 0 clamp(16px, 3vw, 26px);
  flex-shrink: 1;
}

html:not(.avk-journey) .nav :is(#product, #cases, #download, #nav-faq) {
  display: inline-flex;
  font-size: 14px;
  font-weight: 550;
  letter-spacing: 0;
}

html:not(.avk-journey) #avalokit-story {
  position: relative;
  inset: auto;
  width: min(668px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(60px, 10vw, 140px) 0 56px;
  pointer-events: auto;
}

html:not(.avk-journey) #avalokit-story :is(.story-panel, #story-4) {
  position: static;
  display: block;
  width: auto;
  max-width: none;
  opacity: 1;
  visibility: visible;
  transform: none;
  text-align: left;
  pointer-events: auto;
}

html:not(.avk-journey) #avalokit-story::before,
html:not(.avk-journey) #avalokit-story .story-index {
  display: none;
}

html:not(.avk-journey) #avalokit-story .story-panel + .story-panel {
  margin-top: 36px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, .18);
}

html:not(.avk-journey) #avalokit-story :is(h1, h2) {
  filter: none;
  line-height: 1.15;
}

html:not(.avk-journey) #avalokit-story h1 {
  font-size: clamp(34px, 7vw, 64px);
}

html:not(.avk-journey) #avalokit-story .story-preface {
  font-size: clamp(15px, 2.8vw, 20px);
}

html:not(.avk-journey) #avalokit-story #story-4 h2 {
  margin: 0;
  font-weight: 400;
  font-size: clamp(27px, 4vw, 38px);
}

html:not(.avk-journey) #avalokit-story :is(#story-1, #story-2, #story-3, #story-4) .story-reading {
  width: auto;
  max-width: none;
  margin: 22px 0 0;
  opacity: 1;
}

html:not(.avk-journey) #avalokit-story :is(#story-1, #story-2, #story-3, #story-4) :is(p.set, .epi-body),
html:not(.avk-journey) #avalokit-story :is(#avalokit-definition, #avalokit-launch) {
  color: #f5f3ed;
  font-size: 16px;
  line-height: 1.65;
  text-align: left;
  letter-spacing: 0;
  text-wrap: pretty;
  overflow-wrap: break-word;
}

html:not(.avk-journey) #avalokit-definition {
  margin-top: 22px;
}

html:not(.avk-journey) #avalokit-launch {
  margin-top: 14px;
  font-weight: 600;
}

.static-faq {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 4px;
  color: #f6cd9c;
  text-decoration: underline;
  text-underline-offset: 4px;
}

html:not(.avk-journey) #site-footer {
  position: relative;
  inset: auto;
  flex-direction: column;
  padding: 18px 20px;
  border-top: 1px solid rgba(255, 255, 255, .18);
  pointer-events: auto;
}

html:not(.avk-journey) #site-footer :is(.footer-links, .footer-policies) {
  flex-wrap: wrap;
}

html:not(.avk-journey) #site-footer :is(.footer-contact, .footer-policy) {
  font-size: 12px;
}

html:not(.avk-journey) #site-footer .footer-policy::before {
  display: none;
}

html:not(.avk-journey) #site-footer #site-copyright {
  position: static;
  margin-top: 10px;
  font-size: 11px;
  line-height: 1.5;
  white-space: normal;
}

@media (max-width: 600px) {
  html:not(.avk-journey) .nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  html:not(.avk-journey) #avalokit-story {
    padding-top: 48px;
  }
}
