/* Auth entry only: let enlarged text reflow without changing consent choices. */
@media screen {
  body:has(#root .trial-entry) .site-header .wrap {
    height: auto;
    min-height: 64px;
    padding-block: 6px;
    flex-wrap: wrap;
    row-gap: 4px;
  }

  body:has(#root .trial-entry) .site-header .logo {
    flex-shrink: 0;
    max-width: 100%;
  }

  body:has(#root .trial-entry) #account-nav {
    min-width: 0;
  }

  body:has(#root .trial-entry) #account-nav a {
    white-space: nowrap;
  }

  /* Choices stay visible while long copy scrolls within a short viewport. */
  body:has(#root .trial-entry) > .ak-ck-banner {
    display: flex;
    max-height: 60svh;
  }

  body:has(#root .trial-entry) > .ak-ck-banner .ak-ck-inner {
    width: 100%;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  body:has(#root .trial-entry) > .ak-ck-banner .ak-ck-lockup {
    min-height: 0;
    overflow-y: auto;
  }

  /* Enlarged preferences can scroll through every original control. */
  body:has(#root .trial-entry) > .ak-ck-overlay .ak-ck-panel {
    display: block;
    max-height: calc(100dvh - 28px);
    overflow-y: auto;
  }

  body:has(#root .trial-entry) > .ak-ck-overlay .ak-ck-rows {
    overflow: visible;
  }

  body:has(#root .trial-entry) > .ak-ck-overlay .ak-ck-row {
    flex-wrap: wrap;
  }

  body:has(#root .trial-entry) > .ak-ck-overlay .ak-ck-row > div:first-child {
    flex: 1 1 8rem;
    min-width: 0;
  }

  @media (max-width: 640px) {
    body:has(#root .trial-entry) .site-header .wrap { min-height: 58px; }

    body:has(#root .trial-entry) > .ak-ck-banner .ak-ck-inner {
      grid-template-columns: minmax(0, 1fr);
      grid-template-rows: minmax(0, 1fr) auto;
      align-items: stretch;
    }

    body:has(#root .trial-entry) > .ak-ck-banner .ak-ck-actions {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body:has(#root .trial-entry) > .ak-ck-banner .ak-ck-actions .ak-ck-btn {
      min-width: 0;
      padding-inline: 8px;
    }
  }

  @media (max-height: 480px) {
    body:has(#root .trial-entry) .site-header { position: relative; }
  }
}
