/* Softwarify auth pages (sign in, sign up, confirmation, invitation, password
   recovery, the OAuth consent page, the plan page, the repository picker and
   the 403 page). Same
   design system as the public landing: Inter 400/500/600, one blue accent on
   the dark navy canvas, 1px borders instead of shadows, pill buttons with navy
   text on blue. Tokens mirror the --landing-* values in DESIGN.md. Sections:
   tokens, reset, shell, split panel, story, card, forms, buttons, alerts, plan
   cards, proof tiles, history rows, two-factor step, connect step, single
   card, responsive. */

/* ---------- Tokens ---------- */
:root {
  --auth-canvas: #020817;
  --auth-canvas-soft: #071024;
  --auth-panel: rgba(7, 16, 36, 0.75);
  --auth-well: rgba(2, 8, 23, 0.7);
  --auth-ink: #f8fafc;
  --auth-muted: #9aa8bd;
  --auth-faint: #7683a0;
  --auth-accent: #3b82f6;
  --auth-accent-hover: #60a5fa;
  --auth-accent-tint: rgba(59, 130, 246, 0.08);
  --auth-accent-border: rgba(59, 130, 246, 0.22);
  --auth-accent-focus: rgba(59, 130, 246, 0.55);
  --auth-border: rgba(148, 163, 184, 0.16);
  --auth-border-strong: rgba(248, 250, 252, 0.24);
  --auth-focus-ring: 0 0 0 4px rgba(59, 130, 246, 0.18);
  --auth-success: #86efac;
  --auth-error: #fca5a5;
  --auth-font: "Space Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --auth-radius-pill: 999px;
  --auth-radius-xl: 28px;
  --auth-radius-lg: 20px;
  --auth-radius: 12px;
  --auth-container: 1100px;
  --auth-gutter: 24px;
  --auth-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--auth-canvas);
  color-scheme: dark;
}

body.auth-body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: clip;
  font-family: var(--auth-font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--auth-ink);
  background: var(--auth-canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* One blurred orb, as on the landing. */
body.auth-body::before {
  content: "";
  position: fixed;
  z-index: -1;
  left: 50%;
  top: -34%;
  width: min(70vw, 980px);
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.38), rgba(59, 130, 246, 0.08) 45%, transparent 68%);
  opacity: 0.6;
  filter: blur(70px);
  pointer-events: none;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--auth-ink);
}

p {
  margin: 0;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--auth-accent);
  outline-offset: 3px;
}

/* ---------- Shell ---------- */
.auth-shell {
  position: relative;
  z-index: 1;
  width: min(var(--auth-container), calc(100% - var(--auth-gutter) * 2));
  margin: 0 auto;
  padding: 32px 0 56px;
}

/* ---------- Split panel ---------- */
.auth-split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--auth-border);
  border-radius: var(--auth-radius-xl);
  background: var(--auth-panel);
}

.auth-split-wide {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
}

/* ---------- Story column ---------- */
.auth-story {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: space-between;
  gap: 36px;
  padding: 44px 42px 40px;
  border-right: 1px solid var(--auth-border);
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  border-radius: var(--auth-radius);
  text-decoration: none;
}

.auth-brand .brand-mark {
  display: block;
  height: 38px;
  width: auto;
}

.auth-eyebrow {
  margin: 28px 0 14px;
  color: var(--auth-accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-title {
  max-width: 18ch;
  font-size: clamp(2.25rem, 4.4vw, 3.5rem);
  letter-spacing: -0.03em;
  line-height: 1.02;
  text-wrap: balance;
}

.auth-accent {
  color: var(--auth-accent);
  font-style: normal;
}

.auth-lede {
  max-width: 52ch;
  margin: 18px 0 0;
  color: var(--auth-muted);
  font-size: 1.125rem;
  line-height: 1.6;
  text-wrap: pretty;
  /* A lede can quote a name the visitor typed (the project on the signup and
     office-start pages); one long unbroken word must wrap, not overflow. */
  overflow-wrap: anywhere;
}

.auth-lede strong,
.auth-note strong,
.auth-signed-in strong {
  color: var(--auth-ink);
  font-weight: 700;
}

.auth-signed-in {
  margin: 18px 0 0;
  color: var(--auth-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* ---------- Card column ---------- */
.auth-card {
  min-width: 0;
  padding: 40px 36px;
  background: var(--auth-canvas-soft);
}

.auth-card-title {
  font-size: 1.75rem;
  letter-spacing: -0.025em;
}

.auth-card-sub {
  margin: 10px 0 24px;
  color: var(--auth-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.auth-status {
  margin: 10px 0 24px;
  color: var(--auth-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.auth-section {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--auth-border);
}

.auth-section .errorlist {
  margin: 0 0 12px;
}

.auth-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.auth-section-head h3 {
  font-size: 1.125rem;
}

.auth-kicker {
  display: block;
  margin-bottom: 6px;
  color: var(--auth-accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-tag {
  flex: 0 0 auto;
  padding: 6px 12px;
  border: 1px solid var(--auth-border);
  border-radius: var(--auth-radius-pill);
  color: var(--auth-muted);
  font-size: 0.8125rem;
  font-weight: 400;
  white-space: nowrap;
}

/* ---------- Forms ---------- */
.auth-form {
  display: grid;
  gap: 16px;
}

.auth-field {
  min-width: 0;
}

.auth-field label {
  display: block;
  margin-bottom: 8px;
  color: var(--auth-ink);
  font-size: 0.875rem;
  font-weight: 700;
}

.auth-field input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]),
.auth-field select,
.auth-field textarea {
  width: 100%;
  min-height: 48px;
  padding: 13px 16px;
  border: 1px solid var(--auth-border);
  border-radius: var(--auth-radius-lg);
  background: var(--auth-well);
  color: var(--auth-ink);
  font: inherit;
  font-size: 0.9375rem;
  line-height: 1.4;
  transition: border-color 160ms var(--auth-ease), box-shadow 160ms var(--auth-ease);
}

.auth-field input::placeholder {
  color: var(--auth-faint);
}

.auth-field input:focus-visible,
.auth-field select:focus-visible,
.auth-field textarea:focus-visible {
  border-color: var(--auth-accent-focus);
  box-shadow: var(--auth-focus-ring);
}

.auth-field-help {
  margin: 8px 0 0;
  color: var(--auth-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.auth-form .errorlist,
.auth-field .errorlist {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  color: var(--auth-error);
  font-size: 0.875rem;
  line-height: 1.5;
}

.auth-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.auth-field-full {
  grid-column: 1 / -1;
}

.auth-meta-row {
  display: flex;
  justify-content: flex-end;
  margin-top: -6px;
}

.auth-form .auth-button {
  margin-top: 8px;
}

/* ---------- Buttons ---------- */
.auth-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--auth-radius-pill);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 160ms var(--auth-ease), border-color 160ms var(--auth-ease), background 160ms var(--auth-ease), color 160ms var(--auth-ease);
}

.auth-button:hover {
  transform: translateY(-1px);
}

.auth-button:active {
  transform: translateY(0);
}

.auth-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.auth-button-primary {
  background: var(--auth-accent);
  color: var(--auth-canvas);
}

.auth-button-primary:hover {
  background: var(--auth-accent-hover);
}

.auth-button-ghost {
  border-color: var(--auth-border-strong);
  background: transparent;
  color: var(--auth-ink);
}

.auth-button-ghost:hover {
  border-color: rgba(248, 250, 252, 0.4);
  background: var(--auth-accent-tint);
}

.auth-button-block {
  width: 100%;
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
}

.auth-actions form {
  margin: 0;
}

.auth-inline-form {
  margin: 0 0 18px;
}

.auth-note + .auth-inline-form {
  margin: 18px 0 0;
}

/* ---------- Account chooser (login page) ----------
   The accounts this browser is still signed in to, each one button: a round
   face with the address's first letter, then the address. */
.auth-accounts {
  display: grid;
  gap: 10px;
  margin: 0 0 32px;
}

.auth-accounts form {
  margin: 0;
}

.auth-account {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 8px 14px;
  border: 1px solid var(--auth-border-strong);
  border-radius: 14px;
  background: transparent;
  color: var(--auth-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.auth-account:hover {
  border-color: rgba(248, 250, 252, 0.4);
  background: var(--auth-accent-tint);
}

.auth-account-face {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--auth-accent);
  color: #fff;
  font-weight: 700;
}

.auth-account-email {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-card-title-next {
  font-size: 1.25rem;
}

/* ---------- Links and notes ---------- */
.auth-link {
  color: var(--auth-accent);
  font-weight: 700;
  text-decoration: none;
  text-underline-offset: 4px;
}

.auth-link:hover {
  color: var(--auth-accent-hover);
  text-decoration: underline;
}

.auth-note {
  margin: 24px 0 0;
  color: var(--auth-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.auth-note-tight {
  margin-top: 18px;
}

.auth-links {
  margin: 0 0 18px;
  font-size: 0.9375rem;
}

.auth-links .auth-sep,
.auth-note .auth-sep {
  color: var(--auth-faint);
  margin: 0 6px;
}

/* ---------- Explained terms ---------- */
/* A word with an explanation (the ai_engineer_term tag in
   projects/templatetags/product_terms.py): a button that reads as text,
   marked by a dotted underline. accounts/js/term-tip.js shows
   the tip on hover, keyboard focus and tap and positions it against the
   viewport, which is why the tip is fixed: .auth-split clips its children. */
.auth-term {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: help;
  text-decoration: underline dotted var(--auth-accent-hover);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.auth-term:hover,
.auth-term:focus-visible {
  color: var(--auth-accent-hover);
}

.auth-term-tip {
  position: fixed;
  z-index: 20;
  /* Narrow enough to read as a note, and never wider than a phone screen. */
  width: max-content;
  max-width: min(300px, calc(100vw - 24px));
  padding: 12px 14px;
  border: 1px solid var(--auth-border-strong);
  border-radius: var(--auth-radius);
  background: var(--auth-canvas-soft);
  color: var(--auth-ink);
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Text for assistive technology only (the "opens in a new tab" note of a link). */
.auth-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Alerts ---------- */
.auth-alert {
  margin: 0 0 18px;
  padding: 12px 16px;
  border: 1px solid var(--auth-border);
  border-radius: var(--auth-radius-lg);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.auth-alert p + p {
  margin-top: 6px;
}

.auth-alert-error {
  border-color: rgba(252, 165, 165, 0.35);
  background: rgba(252, 165, 165, 0.08);
  color: var(--auth-error);
}

.auth-alert-success {
  border-color: rgba(134, 239, 172, 0.3);
  background: rgba(134, 239, 172, 0.08);
  color: var(--auth-success);
}

/* ---------- Plan cards ---------- */
.auth-plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.auth-plan {
  position: relative;
  display: block;
  min-width: 0;
  margin: 0;
  color: inherit;
  text-decoration: none;
}

.auth-plan-radio {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.auth-plan-card {
  position: relative;
  display: flex;
  height: 100%;
  min-height: 240px;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--auth-border);
  border-radius: var(--auth-radius-lg);
  background: var(--auth-well);
  cursor: pointer;
  transition: border-color 160ms var(--auth-ease), background 160ms var(--auth-ease);
}

article.auth-plan-card {
  cursor: default;
}

.auth-plan-card:hover {
  border-color: var(--auth-accent-border);
}

.auth-plan-radio:checked + .auth-plan-card,
.auth-plan-card.is-current {
  border-color: var(--auth-accent);
  background: var(--auth-accent-tint);
}

.auth-plan-radio:focus-visible + .auth-plan-card,
.auth-plan:focus-visible .auth-plan-card {
  outline: 2px solid var(--auth-accent);
  outline-offset: 3px;
}

.auth-plan:focus-visible {
  outline: none;
}

.auth-plan-top {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.auth-plan-badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 4px 10px;
  border: 1px solid var(--auth-accent-border);
  border-radius: var(--auth-radius-pill);
  color: var(--auth-accent);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-plan-name {
  display: block;
  color: var(--auth-ink);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.2;
}

.auth-plan-price {
  display: block;
  margin-top: 6px;
  color: var(--auth-ink);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.auth-plan-summary {
  margin: 0;
  color: var(--auth-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.auth-plan-features {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.auth-plan-features li {
  display: flex;
  gap: 8px;
  color: var(--auth-muted);
  font-size: 0.8125rem;
  line-height: 1.45;
}

.auth-plan-features li::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--auth-accent);
}

.auth-plan-action {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--auth-border);
  color: var(--auth-muted);
  font-size: 0.875rem;
  font-weight: 700;
}

.auth-plan-radio:checked + .auth-plan-card .auth-plan-action,
.auth-plan-card:hover .auth-plan-action {
  color: var(--auth-accent);
}

.auth-plan-card .auth-button,
.auth-plan-card .auth-plan-form {
  margin-top: auto;
  width: 100%;
}

.auth-plan-card .auth-plan-form .auth-button {
  margin-top: 0;
}

/* ---------- Proof tiles (signup story) ---------- */
.auth-proof-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.auth-proof {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--auth-accent-border);
  border-radius: var(--auth-radius-lg);
  background: var(--auth-accent-tint);
}

.auth-proof strong {
  display: block;
  color: var(--auth-ink);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.auth-proof span {
  display: block;
  margin-top: 8px;
  color: var(--auth-muted);
  font-size: 0.875rem;
  line-height: 1.5;
  overflow-wrap: break-word;
}

/* ---------- History rows (plan page) ---------- */
.auth-history {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

/* The payment page's billing-details summary row sits right above the plan
   grid; give the grid the same breathing room the alerts above it get. */
.auth-history + .auth-plan-grid {
  margin-top: 18px;
}

.auth-history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border: 1px solid var(--auth-border);
  border-radius: var(--auth-radius-lg);
  background: var(--auth-well);
}

.auth-history-row strong {
  display: block;
  color: var(--auth-ink);
  font-weight: 700;
}

.auth-history-row span {
  color: var(--auth-muted);
  font-size: 0.875rem;
}

/* ---------- Two-factor step (OAuth consent page) ---------- */
/* The QR code is the one white surface of the auth pages: scanners need dark
   modules on a light ground. The SVG's own 4-module margin is the quiet zone
   they look for; the page draws the modules itself (accounts/oauth_consent.py). */
.auth-qr {
  display: block;
  width: 200px;
  height: 200px;
  margin: 0 0 20px;
  border-radius: var(--auth-radius);
}

.auth-qr-ground {
  fill: #ffffff;
}

.auth-qr-modules {
  fill: var(--auth-canvas);
}

.auth-setup-label {
  margin: 0 0 8px;
  color: var(--auth-ink);
  font-size: 0.875rem;
  font-weight: 700;
}

/* The setup key is base32 (A-Z and 2-7, so no 0/O or 1/I to confuse) and
   reads cleanly in Inter with tabular figures; one tap selects all of it. */
.auth-setup-key {
  padding: 12px 16px;
  border: 1px solid var(--auth-border);
  border-radius: var(--auth-radius-lg);
  background: var(--auth-well);
  color: var(--auth-ink);
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
  overflow-wrap: anywhere;
  user-select: all;
}

/* The code field: larger, spaced figures so the six digits are easy to check.
   The selector repeats the base input selector's :not() list to outrank it. */
.auth-field input.auth-code:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]) {
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.3em;
}

/* ---------- Two-step sign-in ---------- */
/* The second step of a sign-in (templates/accounts/two_factor.html). What the
   page keeps for browsers that know passkeys carries the "hidden" attribute
   until its script removes it (accounts/js/passkey.js); buttons and forms set
   a display of their own, which would otherwise show them anyway. */
.auth-card [hidden] {
  display: none;
}

/* The word between the passkey button and the authenticator code. */
.auth-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  color: var(--auth-faint);
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-or::before,
.auth-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--auth-border);
}

/* ---------- Connect step ---------- */
/* The repository picker that follows a provider sign-in
   (templates/dashboard/repository_connect.html). */

/* Under the picker's list: says the list was cut off at the provider limit. */
.auth-connect-more {
  margin: 0 0 16px;
  color: var(--auth-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

/* The picker's Back link stands clear of the action above it. */
.auth-connect-back {
  margin: 20px 0 0;
}

/* A list or an alert that follows the card title directly (no sub line
   between) keeps the gap the sub line would give. */
.auth-card-title + .repository-choices,
.auth-card-title + .auth-alert {
  margin-top: 18px;
}

/* ---------- Single card (403) ---------- */
.auth-single {
  max-width: 720px;
  margin: 72px auto 0;
  padding: 48px;
  border: 1px solid var(--auth-border);
  border-radius: var(--auth-radius-xl);
  background: var(--auth-panel);
}

.auth-single .auth-eyebrow {
  margin-top: 24px;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  :root {
    --auth-gutter: 16px;
  }

  .auth-shell {
    padding: 20px 0 40px;
  }

  .auth-split,
  .auth-split-wide {
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-story {
    gap: 28px;
    padding: 28px 24px;
    border-right: 0;
    border-bottom: 1px solid var(--auth-border);
  }

  .auth-brand .brand-mark {
    height: 32px;
  }

  .auth-eyebrow {
    margin-top: 24px;
  }

  .auth-title {
    max-width: none;
    font-size: clamp(2rem, 8.5vw, 2.75rem);
  }

  .auth-lede {
    font-size: 1rem;
  }

  .auth-card {
    padding: 28px 24px;
  }

  .auth-card-title {
    font-size: 1.5rem;
  }

  .auth-single {
    margin-top: 24px;
    padding: 28px 24px;
  }

  .auth-actions .auth-button,
  .auth-actions form {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .auth-field-grid,
  .auth-plan-grid,
  .auth-proof-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-plan-card {
    min-height: 0;
  }

  .auth-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .auth-history-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-button,
  .auth-field input,
  .auth-field select,
  .auth-field textarea,
  .auth-plan-card {
    transition: none;
  }

  .auth-button:hover {
    transform: none;
  }
}

/* Repository picker after a GitHub or GitLab sign-in (templates/dashboard/repository_connect.html):
   one full-width button per repository, scrolling inside the card so a long list never
   pushes the "Choose repositories on GitHub" action and the Back link off screen. */
.repository-choices {
  display: grid;
  gap: 8px;
  max-height: min(52vh, 480px);
  overflow-y: auto;
  margin: 0 0 16px;
}

.repository-choice {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--auth-border);
  border-radius: var(--auth-radius-lg);
  background: var(--auth-well);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms var(--auth-ease), background 160ms var(--auth-ease);
}

.repository-choice:hover,
.repository-choice:focus-visible {
  border-color: var(--auth-accent);
}

.repository-choice strong {
  overflow-wrap: anywhere;
}

.repository-choice small {
  color: var(--auth-muted);
}
