/* Public landing edition. The full portal retains its own interaction styles. */
body {
  --colorNeutralForeground4: #665e52;
  --colorNeutralStroke1: #746c5e;
  --colorStrokeFocus1: #f4f1e8;
  --colorStrokeFocus2: #1a1712;
  --colorNeutralForegroundOnBrand: #f4f1e8;
}

.j-canvas {
  min-width: 0;
}

#j-content {
  opacity: calc(1 - var(--story-out, 0));
}

.j-explainer {
  opacity: var(--explanation-opacity, 1);
}

#journey[data-scene="invite"] .j-explainer {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(680px, 100%);
  gap: var(--spacingVerticalL);
}

#journey[data-scene="invite"] .j-eyebrow {
  display: block;
}

#j-invitation {
  display: flex;
  justify-content: center;
  padding-top: var(--spacingVerticalS);
  pointer-events: auto;
}

.j-review-copy {
  display: flex;
  flex-direction: column;
  gap: var(--spacingVerticalM);
}

.j-dialog-caption {
  color: var(--colorNeutralForeground2);
  font-size: var(--fontSizeBase200);
}

#j-review-text {
  font-size: var(--fontSizeBase300);
  line-height: 1.6;
}

#j-review-dialog::part(dialog) {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
}

.j-chapter-rail {
  flex: none;
  display: flex;
  align-items: center;
}

#j-chapters {
  --tabPaddingInline: 14px;
  --tabPaddingBlock: 8px;
  gap: 4px;
}

/* The chapter rail stays within the demo, including its closing invitation. */
@media (min-width: 960px) {
  #journey {
    flex-direction: row;
    gap: clamp(20px, 2vw, 40px);
  }
  .j-chapter-rail {
    align-self: center;
    width: 120px;
  }
  #j-chapters {
    /* Fluent's vertical tabs use subgrid; the legacy flex rule would collapse their labels. */
    display: grid;
    width: 100%;
    gap: 8px 0;
  }
  #j-chapters fluent-tab {
    gap: 0;
    text-align: left;
  }
}

#j-chapters fluent-tab {
  min-height: 40px;
  color: #514b40;
  font-weight: 400;
  background: transparent;
  gap: 6px;
}

#j-chapters fluent-tab:hover {
  color: #1a1712;
}

#j-chapters fluent-tab[aria-selected="true"] {
  color: #7b1e3b;
  font-weight: 600;
}

#j-chapters fluent-tab[aria-selected="true"]::after {
  background-color: #7b1e3b;
}

#j-chapters fluent-tab:focus-visible {
  outline: 2px solid #1a1712;
  outline-offset: -2px;
  box-shadow: none;
}

.j-canvas:focus-visible {
  outline: 2px solid #1a1712;
  outline-offset: 4px;
}

.prose fluent-badge.citation {
  color: #701c38;
  cursor: text;
}

@media (max-width: 720px) {
  #j-chapters {
    --tabPaddingInline: 8px;
    gap: 0;
  }
  #j-chapters fluent-tab {
    font-size: 12px;
  }
}

@media (max-width: 560px) {
  #j-chapters {
    --tabPaddingInline: 2px;
    width: 100%;
    min-width: 0;
  }
  #j-chapters fluent-tab {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 11px;
    line-height: 16px;
    text-align: center;
  }
}

@media (forced-colors: active) {
  #j-chapters fluent-tab[aria-selected="true"] {
    color: Highlight;
  }
  #j-chapters fluent-tab[aria-selected="true"]::after {
    background-color: Highlight;
    forced-color-adjust: none;
  }
  #j-chapters fluent-tab:focus-visible {
    outline-color: Highlight;
  }
}
