/* auth.css — WP8. Auth surfaces that live OUTSIDE the app shell: the GDPR
 * cookie banner (all pages incl. login), and the login page: the EUDR
 * platform's sign-in and sign-up card, ported (message pills, the two-factor
 * and reset views, the role cards, the sign-up form with its strength meter
 * and consent block, the pre-auth language toggle, the footer links). The
 * legal documents (/terms, /privacy) have their own sheet, legal.css.
 *
 * Colour: every value is a token. These are public pages (always light, no
 * theme-boot), so they sit on the light ground painted by the fixed
 * body[data-public-page]::before layer (layout.css GROUND): nothing here may
 * paint an opaque page background over it. Cards follow the tokens.css glass
 * recipe with no backdrop-filter. The cookie banner is chrome: solid Storm in
 * both themes (--chrome-*), since it also shows over the app shell.
 */

/* ═══════════════════════════ GDPR cookie banner ═══════════════════════════ */
/* spec-theme §4.1 — verbatim geometry. A bar, so it is chrome: solid Storm in
 * both themes, no backdrop-filter (it was 0.97 alpha + blur, which added
 * nothing visible). Its action is a cyan fill with Storm ink, because the
 * light-mode --action is Storm and would vanish into the bar. Hidden in print
 * (spec-theme §2.7). */
#cookieConsentBanner {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  background: var(--chrome-bg);
  color: var(--chrome-ink);
  padding: 16px 24px;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  border-top: 1px solid var(--chrome-line);
}
#cookieConsentBanner :focus-visible {
  outline-color: var(--chrome-active-ink);
}
#cookieConsentBanner .ct-cookie-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
#cookieConsentBanner .ct-cookie-text {
  flex: 1;
  min-width: 280px;
  line-height: 1.5;
}
#cookieConsentBanner .ct-cookie-text strong {
  font-weight: 800;
}
#cookieConsentBanner .ct-cookie-text a {
  color: var(--chrome-active-ink);
  text-decoration: underline;
}
#cookieAcceptBtn {
  background: var(--highlight);
  color: var(--highlight-ink);
  border: none;
  padding: 9px 24px;
  border-radius: 6px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}
#cookieAcceptBtn:hover {
  background: var(--cyan-75);
}
@media print {
  #cookieConsentBanner {
    display: none !important;
  }
}

/* ═══════════════════════════ Login card (/login) ═══════════════════════════ */
/* A port of the EUDR platform's sign-in and sign-up (eudr_platform
 * frontend/css/style.css "AUTH STYLES", mobile.css "AUTH PAGES", and the
 * inline styles of select-role.html / signup.html), recoloured with the
 * tokens: EUDR's forest green is Storm (ink, the primary action, checked
 * boxes) and Cyan (focus, the selected role, washes); its status red, amber
 * and green are the semantic --confirmed / --potential / --clear. One card,
 * five views (templates/login.html): 420px wide like EUDR's sign-in card,
 * 620px for the two sign-up steps like EUDR's sign-up pages. The page around
 * it (ground, background video, scrim) is pages.css; it is always light. */

/* Held in the middle of the screen by .ct-login-wrap (pages.css) and never
   taller than it: a column whose head (logo, title, messages) and foot stay
   put, while the view between them scrolls inside the card should it not fit
   (the company sign-up form on a phone or a short laptop). */
.ct-auth {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: 100%;
  max-width: 420px;
  max-height: 100%;
  margin: 0;
  padding: 18px 28px 20px;
  color: var(--text);
  text-align: center;
  /* EUDR's 92% white sheet, no backdrop blur (it re-ran on every video
     frame). The deeper shadow lifts it off ChemTrust's pale video frame. */
  background: rgb(255 255 255 / 0.94);
  border: 1px solid rgb(255 255 255 / 0.6);
  border-radius: 10px;
  box-shadow: inset 0 0 0 0.5px var(--glass-edge), 0 4px 20px rgb(var(--storm-rgb) / 0.15),
    0 24px 60px rgb(0 0 0 / 0.22);
  transition: opacity 0.2s ease;
}
.ct-auth[data-view="signup"],
.ct-auth[data-view="signup-company"] {
  max-width: 620px;
  padding: 28px 36px 32px;
  border-radius: 12px;
}
/* Until login.js has put the card's strings in (a Greek visitor would see the
   English defaults flash otherwise); shown after 1.5 s whatever happens. */
.ct-auth[data-ta-pending] {
  opacity: 0;
  visibility: hidden;
  animation: ctAuthReveal 0s linear 1.5s forwards;
}
@keyframes ctAuthReveal {
  to {
    opacity: 1;
    visibility: visible;
  }
}

.ct-auth-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ── Head: logo, role badge, title, subtitle ── */
.ct-auth-logo {
  margin-bottom: 6px;
}
.ct-auth .ct-login-logo {
  display: block;
  width: 100px;
  height: auto;
}
.ct-auth-badge {
  display: block;
  width: fit-content;
  margin: 0 auto 14px;
  padding: 4px 12px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--cyan-25), var(--cyan-12));
  color: var(--brand-storm);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.ct-auth-badge[hidden] {
  display: none;
}
.ct-auth-title {
  margin: 0 0 4px;
  color: var(--primary);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
/* Focused by login.js on a view change so a screen reader starts there; a
   heading is not a control, so no ring. */
.ct-auth-title:focus {
  outline: none;
}
.ct-auth-subtitle {
  margin: 0 0 10px;
  color: var(--text-muted);
  font-size: 0.88rem;
}
.ct-auth[data-view="signup"] .ct-auth-title,
.ct-auth[data-view="signup-company"] .ct-auth-title {
  font-size: 1.3rem;
}
.ct-auth[data-view="signup"] .ct-auth-subtitle,
.ct-auth[data-view="signup-company"] .ct-auth-subtitle {
  margin-bottom: 24px;
  font-size: 0.9rem;
}

/* ── Message pills (EUDR auth-notice / auth-error / auth-success) ── */
/* Live regions that are always in the page: an empty one takes no room. */
.ct-auth-msg {
  margin: 0 0 14px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 0.88rem;
  line-height: 1.45;
  text-align: center;
}
.ct-auth-msg:empty {
  margin: 0;
  padding: 0;
  border-width: 0;
}
.ct-auth-msg--notice {
  color: var(--brand-storm);
  background: var(--cyan-06);
  border-color: rgb(var(--cyan-rgb) / 0.5);
}
.ct-auth-msg--error {
  color: var(--confirmed);
  background: var(--confirmed-tint);
  border-color: var(--confirmed-edge);
}
.ct-auth-msg--success {
  color: var(--clear);
  background: var(--clear-tint);
  border-color: var(--clear-edge);
}
/* The resend button inside the notice: reads as a link. */
.ct-auth-linkbtn {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 2px;
  border: 0;
  background: none;
  color: var(--link);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.ct-auth-linkbtn:hover {
  color: var(--link-hover);
}
.ct-auth-linkbtn:disabled {
  color: var(--text-muted);
  cursor: default;
}

/* ── Views and fields ── */
.ct-auth > * {
  flex-shrink: 0;
}
/* The one part of the card that may scroll. Its padding (taken back by the
   negative margin, so nothing shifts) keeps the focus rings and the role
   cards' hover glow from being cut at its edges. */
.ct-auth > .ct-auth-view {
  flex-shrink: 1;
  min-height: 0;
  margin: -6px -16px;
  padding: 6px 16px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.ct-auth-view[hidden] {
  display: none;
}
.ct-auth-form {
  display: grid;
  gap: 8px;
  margin: 0;
  text-align: left;
}
.ct-auth-field {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.ct-auth-field label {
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 600;
}
.ct-auth-field input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: 7px 10px;
  /* storm-56: the field's edge at 3.7:1 on white (WCAG 1.4.11); EUDR's sage
     border was 1.6:1. */
  border: 1px solid var(--storm-56);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 14px;
}
.ct-auth-field input::placeholder {
  color: var(--storm-56);
}
.ct-auth-field input:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: var(--focus-ring);
}
.ct-auth-field input[aria-invalid="true"] {
  border-color: var(--confirmed);
  box-shadow: 0 0 0 3px var(--confirmed-tint);
}
.ct-auth-field-error {
  margin: 4px 0 0;
  color: var(--confirmed);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
}
.ct-auth-desc {
  margin: 0 0 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}
.ct-auth-code {
  font-size: 1rem;
  letter-spacing: 0.15em;
  text-align: center;
}

/* Password with EUDR's eye button inside it. */
.ct-auth-pw {
  position: relative;
}
.ct-auth-pw input {
  padding-right: 44px;
}
.ct-auth-eye {
  position: absolute;
  top: 50%;
  right: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  transform: translateY(-50%);
}
.ct-auth-eye:hover {
  color: var(--primary);
}
.ct-auth-eye-shut,
.ct-auth-eye.is-shown .ct-auth-eye-open {
  display: none;
}
.ct-auth-eye.is-shown .ct-auth-eye-shut {
  display: block;
}

/* The primary action: full width, EUDR's lock icon on "Sign in". */
.ct-auth .ct-auth-submit {
  width: 100%;
  margin-top: 3px;
  padding: 9px 14px;
  gap: 10px;
  font-size: 1rem;
  line-height: 1.2;
  white-space: normal;
}
.ct-auth .ct-auth-submit[aria-busy="true"] {
  cursor: progress;
}

/* Sign-up form: EUDR signup.html's roomier fields. */
.ct-auth[data-view="signup-company"] .ct-auth-form {
  gap: 14px;
}
.ct-auth[data-view="signup-company"] .ct-auth-field {
  gap: 4px;
}
.ct-auth[data-view="signup-company"] .ct-auth-field input {
  padding: 10px 12px;
  border-width: 1.5px;
  border-radius: 8px;
  font-size: 0.92rem;
}
.ct-auth[data-view="signup-company"] .ct-auth-submit {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.95rem;
}

/* Password-strength meter (EUDR signup.js): a 4px track, a coloured fill,
   the tier underneath. */
.ct-pw-strength {
  height: 4px;
  margin-top: 4px;
  border-radius: 2px;
  background: var(--storm-08);
  overflow: hidden;
}
.ct-pw-strength-fill {
  width: 0;
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s ease, background-color 0.3s ease;
}
.ct-pw-strength-fill[data-tier="weak"] {
  background: var(--confirmed);
}
.ct-pw-strength-fill[data-tier="fair"] {
  background: var(--potential);
}
.ct-pw-strength-fill[data-tier="strong"] {
  background: var(--clear);
}
.ct-pw-strength-label {
  min-height: 1.1em;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
}
.ct-pw-strength-label[data-tier="weak"] {
  color: var(--confirmed);
}
.ct-pw-strength-label[data-tier="fair"] {
  color: var(--potential);
}
.ct-pw-strength-label[data-tier="strong"] {
  color: var(--clear);
}

/* Consent block (EUDR consent-section): GDPR consent + Privacy/Terms, both
   required. EUDR's own checkbox: Storm when ticked, a white tick. */
.ct-auth-consent {
  min-width: 0;
  margin: 4px 0 6px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  text-align: left;
}
/* A legend drawn inside the box, not on its border. */
.ct-auth-consent-title {
  float: left;
  width: 100%;
  margin: 0 0 12px;
  padding: 0;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}
.ct-auth-consent-group {
  clear: both;
}
.ct-auth-consent-group + .ct-auth-consent-group {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.ct-auth-consent-group label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.45;
  cursor: pointer;
}
.ct-auth-consent-group input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  flex: none;
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 0;
  margin: 1px 0 0;
  border: 2px solid var(--storm-56);
  border-radius: 4px;
  background: var(--brand-white);
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.ct-auth-consent-group input[type="checkbox"]:hover {
  border-color: var(--brand-storm);
}
.ct-auth-consent-group input[type="checkbox"]:checked {
  background: var(--action);
  border-color: var(--action);
}
.ct-auth-consent-group input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  top: 1px;
  left: 4px;
  width: 6px;
  height: 10px;
  border: solid var(--brand-white);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.ct-auth-consent-group input[type="checkbox"][aria-invalid="true"] {
  border-color: var(--confirmed);
  box-shadow: 0 0 0 3px var(--confirmed-tint);
}
.ct-auth-consent-group a {
  color: var(--link);
  font-weight: 600;
  text-decoration: underline dotted;
  text-underline-offset: 2px;
}
.ct-auth-consent-group a:hover {
  color: var(--link-hover);
  text-decoration-style: solid;
}
.ct-auth-consent-group .ct-auth-field-error {
  margin-left: 28px;
}

/* ── Sign up, step 1: the role cards (EUDR select-role.html) ── */
.ct-auth-roles {
  display: flex;
  gap: 18px;
}
.ct-auth-role {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  padding: 28px 18px 22px;
  border: 2px solid var(--border-strong);
  border-radius: 14px;
  background: var(--brand-white);
  color: inherit;
  font: inherit;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.ct-auth-role:hover,
.ct-auth-role.is-selected {
  border-color: var(--accent);
  box-shadow: 0 6px 20px rgb(var(--cyan-rgb) / 0.24);
  transform: translateY(-3px);
}
.ct-auth-role:active {
  transform: translateY(0);
}
.ct-auth-role-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan-12), rgb(var(--storm-rgb) / 0.06));
  color: var(--brand-storm);
}
.ct-auth-role-title {
  margin-bottom: 6px;
  color: var(--primary);
  font-size: 1.08rem;
  font-weight: 700;
}
.ct-auth-role-desc {
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.45;
}
/* "Invited": who does not sign up, and how they get in instead. */
.ct-auth-invited {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid rgb(var(--cyan-rgb) / 0.5);
  border-radius: 10px;
  background: var(--cyan-06);
  font-size: 0.84rem;
  line-height: 1.5;
  text-align: left;
}
.ct-auth-invited[hidden] {
  display: none;
}
.ct-auth-invited-title {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 0.95rem;
  font-weight: 700;
}
.ct-auth-invited ul {
  margin: 0 0 10px;
  padding-left: 18px;
}
.ct-auth-invited li + li {
  margin-top: 6px;
}
.ct-auth-note {
  margin: 16px 0 0;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--storm-05);
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.45;
}
.ct-auth-note svg {
  margin-right: 4px;
  vertical-align: -2px;
}

/* ── Links under the forms, and the footer ── */
.ct-auth-switch {
  margin: 8px 0 4px;
  color: var(--text-muted);
  font-size: 0.84rem;
  text-align: center;
}
.ct-auth-switch--tight {
  margin-top: 0;
  margin-bottom: 0;
  font-size: 0.82rem;
}
.ct-auth[data-view="signup"] .ct-auth-switch,
.ct-auth[data-view="signup-company"] .ct-auth-switch {
  margin-top: 14px;
  font-size: 0.82rem;
}
.ct-auth-switch a,
.ct-auth-invited a {
  color: var(--link);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.ct-auth-switch--tight a,
#mfaBackToLogin {
  font-weight: 400;
}
.ct-auth-switch a:hover,
.ct-auth-invited a:hover {
  color: var(--link-hover);
}
.ct-auth-switch .ct-auth-back {
  font-size: 0.88rem;
  font-weight: 400;
  text-decoration: none;
}
.ct-auth-switch .ct-auth-back:hover {
  text-decoration: underline;
}
.ct-auth-footer {
  margin-top: 8px;
}
.ct-auth-powered {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 0.78rem;
}
.ct-login-legal {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  text-align: center;
}
.ct-login-legal a {
  color: var(--link);
  text-decoration: none;
}
.ct-login-legal a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}
.ct-login-legal .ct-login-legal-sep {
  margin: 0 8px;
  opacity: 0.5;
}
.ct-login-dev {
  margin: 8px 0 0;
}

/* Pre-auth language switch, in the card's top-right corner (core/i18n.js
   wires any [data-lang-toggle]). */
.ct-login-langtoggle {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--action-2-edge);
  border-radius: 999px;
  background: var(--action-2);
  color: var(--action-2-ink);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.ct-login-langtoggle:hover {
  background: var(--action-2-hover);
  border-color: var(--accent);
}

/* ── Phones (EUDR mobile.css "AUTH PAGES" + style.css ≤400px) ── */
@media (max-width: 768px), (pointer: coarse) {
  /* 44px targets: fields (16px text from mobile.css, no iOS zoom), the eye,
     the language switch, the links on their own line, the consent rows. */
  .ct-auth-field input {
    min-height: 44px;
  }
  .ct-auth-eye {
    width: 44px;
    height: 44px;
    right: 0;
  }
  .ct-auth-pw input {
    padding-right: 48px;
  }
  .ct-auth .ct-auth-submit {
    min-height: 48px;
  }
  .ct-login-langtoggle {
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
  }
  .ct-auth-switch a,
  .ct-auth-invited > a,
  .ct-auth-linkbtn,
  .ct-login-legal a,
  .ct-login-dev a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 4px;
  }
  .ct-auth-consent-group label {
    min-height: 44px;
  }
}
@media (max-width: 520px) {
  .ct-auth[data-view="signup"],
  .ct-auth[data-view="signup-company"] {
    padding: 24px 20px;
  }
  .ct-auth-roles {
    flex-direction: column;
    gap: 14px;
  }
  .ct-auth-role {
    padding: 22px 16px 18px;
  }
}
/* Phones: every view but the company form fits a 360 x 640 screen without
   scrolling (the owner, 2026-11-09), in EUDR's phone measures (mobile.css
   "AUTH PAGES": 12px gutter, 16px corners, 1.05rem title) drawn a little
   tighter: one line-height per text, 44px fields and links, a
   compact legal row, the role choices as rows (icon beside the text). Line
   heights are set explicitly so the heights add up the same on every
   browser. `.ct-auth[data-view]` (every view) outranks the per-view rules
   above. Inputs keep their 16px text (mobile.css): no iOS zoom on focus.
   A phone on its side gets the same, its card scrolling inside if need be. */
@media (max-width: 480px), (max-height: 520px) and (orientation: landscape) {
  .ct-auth[data-view] {
    padding: 16px 16px 12px;
    border-radius: 16px;
  }
  .ct-auth[data-view] .ct-login-langtoggle {
    top: 6px;
    right: 6px;
  }
  .ct-auth[data-view] .ct-auth-logo {
    margin-bottom: 4px;
    line-height: 0;
  }
  .ct-auth[data-view] .ct-login-logo-wrap {
    margin-bottom: 0;
  }
  .ct-auth[data-view] .ct-login-logo {
    width: 80px; /* EUDR's phone logo */
  }
  .ct-auth[data-view] .ct-auth-badge {
    margin: 0 auto 6px;
    padding: 2px 10px;
    font-size: 0.72rem;
    line-height: 1.4;
  }
  .ct-auth[data-view] .ct-auth-title {
    margin: 0 0 2px;
    font-size: 1.05rem;
    line-height: 1.25;
  }
  .ct-auth[data-view] .ct-auth-subtitle {
    margin: 0 0 8px;
    font-size: 0.8rem;
    line-height: 1.35;
  }
  .ct-auth[data-view] .ct-auth-msg:not(:empty) {
    margin-bottom: 8px;
    padding: 8px 10px;
    font-size: 0.8rem;
    line-height: 1.35;
  }
  .ct-auth[data-view] .ct-auth-form {
    gap: 6px;
  }
  .ct-auth[data-view] .ct-auth-field {
    gap: 2px;
  }
  .ct-auth[data-view] .ct-auth-field label {
    font-size: 0.78rem;
    line-height: 1.3;
  }
  .ct-auth[data-view] .ct-auth-field input {
    height: 44px;
    min-height: 44px;
    padding: 0 12px;
    line-height: 1.25;
  }
  .ct-auth[data-view] .ct-auth-pw input {
    padding-right: 48px;
  }
  .ct-auth[data-view] .ct-auth-field-error {
    margin-top: 2px;
    font-size: 0.76rem;
    line-height: 1.3;
  }
  .ct-auth[data-view] .ct-auth-submit {
    min-height: 46px;
    margin-top: 2px;
    padding: 8px 14px;
  }
  .ct-auth[data-view] .ct-auth-desc {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.35;
  }
  .ct-auth[data-view] .ct-auth-switch {
    margin: 4px 0 0;
    font-size: 0.82rem;
    line-height: 1.3;
  }
  .ct-auth[data-view] .ct-auth-switch--tight {
    margin-top: 0;
  }
  .ct-auth[data-view] .ct-auth-footer {
    margin-top: 6px;
  }
  .ct-auth[data-view] .ct-auth-powered {
    margin: 0;
    font-size: 0.72rem;
    line-height: 1.3;
  }
  .ct-auth[data-view] .ct-login-legal,
  .ct-auth[data-view] .ct-login-dev {
    margin: 0;
    font-size: 0.75rem;
    line-height: 1.3;
  }
  /* Compact legal row: 32px targets (WCAG 2.5.8 asks 24). */
  .ct-auth[data-view] .ct-login-legal a,
  .ct-auth[data-view] .ct-login-dev a {
    min-height: 32px;
  }

  /* Sign up, step 1: each choice a row, the icon beside its text. */
  .ct-auth[data-view] .ct-auth-roles {
    flex-direction: column;
    gap: 8px;
  }
  .ct-auth[data-view] .ct-auth-role {
    flex: none;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    column-gap: 12px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 12px;
    text-align: left;
  }
  .ct-auth[data-view] .ct-auth-role:hover,
  .ct-auth[data-view] .ct-auth-role.is-selected {
    transform: none;
  }
  .ct-auth[data-view] .ct-auth-role-icon {
    grid-row: span 2;
    width: 40px;
    height: 40px;
    margin: 0;
  }
  .ct-auth[data-view] .ct-auth-role-icon svg {
    width: 24px;
    height: 24px;
  }
  .ct-auth[data-view] .ct-auth-role-title {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.25;
  }
  .ct-auth[data-view] .ct-auth-role-desc {
    font-size: 0.76rem;
    line-height: 1.35;
  }
  .ct-auth[data-view] .ct-auth-note {
    margin-top: 8px;
    padding: 8px 10px;
    font-size: 0.72rem;
    line-height: 1.35;
    text-align: left;
  }
  .ct-auth[data-view] .ct-auth-invited {
    margin-top: 8px;
    padding: 10px 12px;
    font-size: 0.78rem;
    line-height: 1.4;
  }

  /* Sign up, step 2 (scrolls inside the card on a phone): the same measures. */
  .ct-auth[data-view] .ct-auth-consent {
    margin: 2px 0 4px;
    padding: 10px 12px;
  }
  .ct-auth[data-view] .ct-auth-consent-title {
    margin-bottom: 6px;
  }
  .ct-auth[data-view] .ct-auth-consent-group + .ct-auth-consent-group {
    margin-top: 6px;
    padding-top: 6px;
  }
  .ct-auth[data-view] .ct-auth-consent-group label {
    font-size: 0.78rem;
    line-height: 1.35;
  }
}
@media (max-height: 520px) and (orientation: landscape) {
  .ct-auth[data-view] .ct-login-logo {
    width: 48px;
  }
}

/* Company sign-up on a phone: the only view taller than the screen. The card
   stays fixed and centred and the form scrolls inside it; the footer lines
   (Auth0 note, Terms/Privacy: both already linked in the consent box, the dev
   link) step aside so the form gets the room, and a soft fade at the bottom
   edge says there is more below. */
@media (max-width: 600px) {
  .ct-auth[data-view="signup-company"] .ct-auth-footer {
    display: none;
  }
  .ct-auth[data-view="signup-company"] #view-signup-company {
    -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 28px), transparent);
    mask-image: linear-gradient(180deg, #000 calc(100% - 28px), transparent);
    padding-bottom: 24px;
  }
}
