@layer components {
  .account-modal.welcome-modal {
    inline-size: min(30rem, calc(100vw - 2rem));
  }
  
  /* The dialog drops in once the landing map has started to draw. */
  .account-modal.welcome-modal[open] {
    animation: welcome-modal-drop 520ms cubic-bezier(.2, .8, .2, 1) 180ms both;
  }
  
  .welcome-modal::backdrop {
    animation: welcome-modal-dim 400ms ease-out both;
  }

  .welcome-modal-body {
    --welcome-modal-gap: 1.35rem;

    display: grid;
    gap: var(--welcome-modal-gap);
    max-block-size: inherit;
    padding: clamp(1.35rem, 4vw, 2rem);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .welcome-modal-heading {
    display: grid;
    gap: .6rem;
  }

  .welcome-modal-title {
    display: flex;
    align-items: center;
    gap: .65rem;
    min-block-size: 3rem;
  }

  .welcome-modal-mark {
    flex: none;
    inline-size: 2.5rem;
    block-size: auto;
  }

  .welcome-modal-heading h2 {
    margin: 0;
    font-size: clamp(1.25rem, 5.6vw, 1.9rem);
    line-height: 1.15;
  }

  .welcome-modal-heading p {
    margin: 0;
    color: var(--color-navy-soft);
    font-size: 1rem;
    line-height: 1.5;
  }

  .welcome-modal-heading .welcome-modal-learn-more {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .35rem 1.25rem;
  }

  .welcome-modal-learn-more a {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    color: var(--color-navy);
    font-weight: 650;
    text-decoration-color: rgb(16 38 83 / 35%);
    text-underline-offset: .15rem;
  }

  .welcome-modal-learn-more a:hover {
    text-decoration-color: currentColor;
  }

  /* A small play button before the link text. */
  .welcome-modal-play {
    display: grid;
    flex: none;
    place-items: center;
    inline-size: 1.85rem;
    block-size: 1.85rem;
    border-radius: .55rem;
    background: var(--color-orange);
    color: var(--color-white);
  }

  .welcome-modal-learn-more a:hover .welcome-modal-play {
    background: var(--color-orange-dark);
  }

  .welcome-modal-play .nabry-icon {
    inline-size: .85rem;
    block-size: .85rem;
    margin-inline-start: .1rem;
    fill: currentColor;
  }

  .welcome-modal-steps {
    display: grid;
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .welcome-modal-steps li {
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1fr);
    align-items: start;
    gap: .85rem;
  }

  .welcome-modal-steps .nabry-icon {
    box-sizing: content-box;
    inline-size: 1.1rem;
    block-size: 1.1rem;
    padding: .7rem;
    border-radius: 50%;
    background: var(--color-orange-soft);
    color: var(--color-orange-dark);
  }

  .welcome-modal-steps h3 {
    margin: .1rem 0 0;
    font-size: 1rem;
    line-height: 1.3;
  }

  .welcome-modal-steps p {
    margin: .2rem 0 0;
    color: var(--color-navy-soft);
    font-size: .9rem;
    line-height: 1.45;
  }

  /* A short lead-in carries the reader from the steps to the actions, sitting
     a little closer to the steps above it. */
  .welcome-modal-cta {
    display: grid;
    gap: var(--welcome-modal-gap);
    margin-block-start: -.5rem;
  }

  .welcome-modal-cta p {
    margin: 0;
    color: var(--color-navy-soft);
    font-size: .95rem;
    line-height: 1.5;
  }

  /* Create account takes two thirds of the row and Sign in one third. Their
     icons drop out where space is tight; labels never wrap. */
  .welcome-modal-actions {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: .6rem;
    margin: 0;
    container-type: inline-size;
  }

  /* Primary and secondary actions follow the style guide at the sign-in
     dialog's size; focus keeps the shared orange ring. */
  .welcome-modal-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    min-block-size: 3.1rem;
    padding-inline: .9rem;
    border: .0625rem solid rgb(16 38 83 / 28%);
    border-radius: var(--radius-control);
    background: var(--color-white);
    color: var(--color-navy);
    font: inherit;
    font-weight: 750;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
  }

  .welcome-modal-action:hover {
    border-color: rgb(16 38 83 / 56%);
  }

  .welcome-modal-action.is-primary {
    border-color: transparent;
    background: var(--color-orange);
    color: var(--color-white);
  }

  .welcome-modal-action.is-primary:hover {
    background: var(--color-orange-dark);
  }

  .welcome-modal-action .nabry-icon {
    flex: none;
    inline-size: 1.15rem;
    block-size: 1.15rem;
  }

  .welcome-modal .welcome-modal-message,
  .welcome-modal .page-status {
    margin: 0;
  }

  .welcome-modal-stores {
    justify-content: center;
  }

  .welcome-modal-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .35rem 1.1rem;
    margin-block-start: -.35rem;
    font-size: .84rem;
  }

  .welcome-modal-links a {
    color: var(--color-navy-soft);
    text-decoration-color: rgb(16 38 83 / 35%);
    text-underline-offset: .15rem;
  }

  .welcome-modal-links a:hover {
    color: var(--color-navy);
  }

  @container (max-width: 23rem) {
    .welcome-modal-action .nabry-icon {
      display: none;
    }
  }

  @container (max-width: 20rem) {
    .welcome-modal-action {
      padding-inline: .7rem;
      font-size: .9rem;
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .account-modal.welcome-modal[open],
    .welcome-modal::backdrop {
      animation: none;
    }
  }
  
  @media (forced-colors: active) {
    .welcome-modal-action {
      border-color: ButtonText;
    }

    .welcome-modal-play {
      border: .0625rem solid LinkText;
    }
  }
  
  @keyframes welcome-modal-drop {
    from {
      opacity: 0;
      transform: translateY(-2.5rem);
    }
  }
  
  @keyframes welcome-modal-dim {
    from {
      opacity: 0;
    }
  }
}
