/* The sign-up flow (templates/account/_flow_shell.html; tickets/account-pages-polish.md, item 42) in landing
   mockup D's style (docs/design/landing-v2/mockup.html on mockup/landing-v2d, the final panel and the form).
   Mockup D's colours: ink #0b0b14, the blue-violet-pink glow, the yellow #fcd535. Inter for everything,
   JetBrains Mono for the address chip. One yellow button per page (.au-btn--yellow), on the card.
   Text on white is at least 4.5:1 (--muted 6.2:1, the blue 6.1:1); white at 72 % on the panel is 10:1.
   Own classes use the au- prefix. Turnstile's status line keeps its Tailwind classes. */
.au-body {
  --ink: #0b0b14; --text: #23232f; --muted: #5d5d6c; --hint: #6b6b7a;
  --line: #ebebf1; --line2: #dedee8; --line3: #c9c9d6; --soft: #f7f7fa;
  --blue: #2f54eb; --blue-ink: #2443c9; --violet: #7c3aed; --pink: #db2777;
  --yellow: #fcd535; --yellow-hover: #f7cb17;
  --red: #c4321f; --red-tint: #fdecea; --red-line: #f3c4bd;
  --green: #12a150; --green-tint: #e9f7ef; --green-line: #bfe6cf;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  background: #fff; color: var(--text);
  font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01", "ss03";
}
.au-body a { color: inherit; text-decoration: none; }
.au :focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
.au-panel :focus-visible { outline-color: #93a8ff; }

/* ── Layout: the panel on the left, the card on the right ─────────────── */
.au { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }

/* The dark panel: mockup D's .final, the glow rising from the bottom and the dot grid fading out. */
.au-panel {
  position: sticky; top: 16px; align-self: start; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; height: calc(100vh - 32px); min-height: 560px;
  margin: 16px 0 16px 16px; padding: 28px 32px; border-radius: 28px;
  background: #0b0b14; color: #fff;
}
.au-panel::before {
  content: ""; position: absolute; inset: auto -10% -55% -10%; height: 100%; z-index: -1;
  filter: blur(70px); opacity: .9; pointer-events: none;
  background:
    radial-gradient(35% 45% at 25% 50%, #2f54eb, transparent 70%),
    radial-gradient(35% 45% at 55% 55%, #7c3aed, transparent 70%),
    radial-gradient(30% 40% at 82% 50%, #db2777, transparent 70%);
}
.au-panel::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px); background-size: 22px 22px;
  -webkit-mask: linear-gradient(#000, transparent 70%); mask: linear-gradient(#000, transparent 70%);
}
.au-brand {
  display: inline-flex; align-items: center; gap: 10px; align-self: flex-start;
  font-size: 17px; font-weight: 700; letter-spacing: -.02em; color: #fff;
}
.au-logo { width: 32px; height: 32px; border-radius: 9px; background: #fff; display: grid; place-items: center; flex: none; }
.au-logo img { width: 20px; height: 20px; }
.au-hero { margin: auto 0; padding: 24px 0 72px; text-align: center; }
.au-chip {
  display: inline-flex; align-items: center; gap: 9px; max-width: 100%; padding: 8px 16px; border-radius: 999px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16);
  font: 500 14px/1.2 var(--mono); color: rgba(255, 255, 255, .72); white-space: nowrap;
}
.au-chip::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none;
  background: #4ade80; box-shadow: 0 0 0 4px rgba(74, 222, 128, .2);
}
.au-chip b { font-weight: 500; color: #fff; }
.au-h1 {
  margin: 28px auto 0; max-width: 11ch; text-wrap: balance;
  font-size: clamp(44px, 5vw, 76px); line-height: 1; letter-spacing: -.05em; font-weight: 800; color: #fff;
}
.au-h1 em {
  font-style: normal; padding-right: .04em;
  background: linear-gradient(92deg, #93a8ff, #c4a6ff 50%, #ff9fcf);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.au-sub { margin-top: 20px; font-size: 16px; color: rgba(255, 255, 255, .72); }

/* The form side: white, the card centred. */
.au-side { display: flex; align-items: center; justify-content: center; min-width: 0; padding: 48px 32px; }
.au-col { width: 100%; max-width: 400px; }
.au-card {
  padding: 32px; border-radius: 20px; background: #fff; border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(15, 15, 40, .05), 0 8px 24px -8px rgba(15, 15, 40, .10), 0 32px 64px -24px rgba(40, 30, 120, .16);
}
.au-card-c { text-align: center; }
.au-lead { font-size: 15px; color: var(--muted); }
.au-lead strong { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.au-after { margin-top: 20px; text-align: center; font-size: 14px; color: var(--muted); }
.au-after a { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line3); }
.au-after a:hover { text-decoration-color: var(--ink); }

/* ── Controls ─────────────────────────────────────────────────────────── */
.au-field + .au-field { margin-top: 16px; }
.au-label { display: block; margin-bottom: 6px; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.au-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.au-label-row .au-label { margin-bottom: 0; }
.au-input {
  display: block; width: 100%; height: 46px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--line2); background: #fff; color: var(--ink); font: inherit; font-size: 15px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.au-input::placeholder { color: var(--hint); opacity: 1; }
.au-input:hover { border-color: var(--line3); }
.au-input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(47, 84, 235, .16); }
.au-input[aria-invalid="true"] { border-color: #e5484d; }
.au-input[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px rgba(229, 72, 77, .16); }
.au-pass { position: relative; }
.au-pass .au-input { padding-right: 64px; }
.au-show {
  position: absolute; top: 4px; right: 4px; bottom: 4px; padding: 0 12px; border-radius: 9px;
  font-size: 13px; font-weight: 600; color: var(--blue-ink); background: transparent;
}
.au-show:hover { background: var(--soft); }
.au .au-show:focus-visible { outline-offset: 0; }
.au-help { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.au-err { margin-top: 6px; font-size: 12.5px; color: var(--red); }
.au-check { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; color: var(--muted); line-height: 1.45; }
.au-check input {
  width: 16px; height: 16px; margin-top: 2px; flex: none; border-radius: 4px; accent-color: var(--blue);
}
.au-check + .au-err { margin-left: 26px; }
.au-body .au-link {
  color: var(--blue-ink); font-weight: 600; border-radius: 4px;
  text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px;
  text-decoration-color: rgba(36, 67, 201, .35);
}
.au-body .au-link:hover { text-decoration-color: currentColor; }
.au-quiet { font-size: 13px; color: var(--muted); border-radius: 4px; }
.au-quiet:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.au-small { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.au-small a { text-decoration: underline; text-underline-offset: 2px; }
.au-small a:hover { color: var(--ink); }
.au-legal { margin-top: 10px; text-align: center; }

/* Buttons: 48 px pills as in mockup D. The yellow one is the page's only yellow. */
.au-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 48px;
  padding: 0 20px; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-size: 15.5px; font-weight: 650; letter-spacing: -.01em; color: var(--ink);
  transition: transform .15s ease, box-shadow .2s ease, background-color .15s ease, border-color .15s ease;
}
.au-btn--yellow {
  background: var(--yellow);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .06), 0 10px 24px -8px rgba(232, 180, 0, .55), inset 0 -2px 0 rgba(0, 0, 0, .08);
}
.au-btn--yellow:hover {
  background: var(--yellow-hover); transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .06), 0 16px 32px -10px rgba(232, 180, 0, .65), inset 0 -2px 0 rgba(0, 0, 0, .08);
}
.au-btn--yellow svg { transition: transform .2s ease; }
.au-btn--yellow:hover svg { transform: translateX(3px); }
.au-btn--line { background: #fff; border-color: var(--line2); font-weight: 600; font-size: 15px; }
.au-btn--line:hover { background: var(--soft); border-color: var(--line3); }
.au-btn img { width: 20px; height: 20px; }
.au-btn:disabled { opacity: .7; cursor: wait; transform: none; }
.au-submit { margin-top: 24px; }
.au-or {
  display: flex; align-items: center; gap: 12px; margin: 20px 0; font-size: 12.5px; color: var(--muted);
}
.au-or::before, .au-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.au-note {
  display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 12px;
  font-size: 12.5px; color: var(--muted);
}
.au-note svg { width: 14px; height: 14px; flex: none; }

/* Messages and form errors on the card. */
.au-msgs { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.au-msg {
  padding: 10px 12px; border-radius: 10px; font-size: 13.5px; line-height: 1.45;
  background: #eef2ff; border: 1px solid #dbe3ff; color: #1e3a8a;
}
.au-msg.is-bad { background: var(--red-tint); border-color: var(--red-line); color: #9b2414; }
.au-msg.is-ok { background: var(--green-tint); border-color: var(--green-line); color: #0b6b3a; }
.au-foot {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); text-align: center;
}
.au-msgs--top { margin: 16px 0 0; }
/* The email code (confirm_email_verification_code.html; the six cells are styled in that template). */
.au-otp-form { margin-top: 24px; }
.au-otp-form .au-err, .au-otp-form .au-help { margin-top: 12px; }
.au-resend { font-size: 14px; }
.au-body .au-resend[aria-disabled="true"] { color: var(--muted); text-decoration: none; cursor: default; }
.au-icon {
  width: 48px; height: 48px; margin: 0 auto 16px; border-radius: 14px; display: grid; place-items: center;
  background: var(--soft); color: var(--ink);
}
.au-icon svg { width: 24px; height: 24px; }
.au-icon.is-ok { background: var(--green-tint); color: var(--green); }
.au-icon.is-bad { background: var(--red-tint); color: var(--red); }

/* ── The other account pages (item 47): email addresses, two-factor, the social sign-in pages,
   confirm an email link, confirm your password, unsubscribe. ─────────────────────────────────── */
.au-col--wide { max-width: 480px; }
.au-h2 { font-size: 15px; font-weight: 650; color: var(--ink); }
.au-h2 + .au-small { margin-top: 6px; }
.au-lead + .au-small, .au-lead + .au-btns, .au-small + .au-btns { margin-top: 12px; }
/* Buttons side by side; a small one for list rows; red for the one that removes or turns off. */
.au-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.au-btns > .au-btn { flex: 1 1 0; width: auto; min-width: max-content; }
.au-btn--sm { width: auto; height: 34px; padding: 0 14px; font-size: 13.5px; font-weight: 600; }
.au-btn--red { background: #fff; border-color: var(--red-line); color: var(--red); font-weight: 600; }
.au-btn--red:hover { background: var(--red-tint); }
.au-btn--red.au-btn--fill { background: var(--red); border-color: var(--red); color: #fff; }
.au-btn--red.au-btn--fill:hover { background: #a92a1a; }
.au-btn--yellow.au-btn--sm { box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .08); }
.au-btn--yellow.au-btn--sm:hover { transform: none; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .08); }
.au-btns--row { margin-top: 0; flex-wrap: nowrap; flex: none; }
/* Hairline lists: email addresses (a radio each), the two-factor methods. */
.au-list { border: 1px solid var(--line2); border-radius: 14px; }
.au-row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 14px; }
.au-row + .au-row { border-top: 1px solid var(--line); }
label.au-row { cursor: pointer; }
label.au-row:has(:checked) { background: var(--soft); }
.au-list > .au-row:first-child { border-radius: 13px 13px 0 0; }
.au-list > .au-row:last-child { border-radius: 0 0 13px 13px; }
.au-list > .au-row:only-child { border-radius: 13px; }
.au-row input[type="radio"] { width: 16px; height: 16px; margin: 0; flex: none; accent-color: var(--blue); }
.au-row-main { flex: 1; min-width: 0; }
.au-row-k { display: flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; color: var(--ink); }
.au-row-v { font-size: 13px; color: var(--muted); }
.au-row-text { font-size: 14px; color: var(--ink); overflow-wrap: anywhere; }
.au-pills { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.au-pill {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--soft); color: var(--text);
}
.au-pill.is-ok { background: var(--green-tint); color: #0b6b3a; }
.au-pill.is-warn { background: #fff6d6; color: #7a4f00; }
.au-pill.is-blue { background: #eef2ff; color: #1e3a8a; }
.au-sep { height: 1px; margin: 24px 0; border: 0; background: var(--line); }
.au-inline { display: flex; gap: 8px; margin-top: 12px; }
.au-inline .au-input { flex: 1; min-width: 0; }
.au-inline .au-btn { width: auto; flex: none; height: 46px; }
/* A code typed by hand (the authenticator app's 6 digits). */
.au-input.au-code { height: 56px; text-align: center; font: 600 22px/1 var(--mono); letter-spacing: .3em; }
/* The QR code, the secret behind "Can't scan it?", the recovery codes. */
.au-qr { display: flex; justify-content: center; margin: 4px 0 20px; }
.au-qr img { display: block; width: 184px; height: 184px; padding: 12px; border: 1px solid var(--line2); border-radius: 16px; background: #fff; }
.au-more { margin-bottom: 20px; font-size: 13px; color: var(--muted); }
.au-more summary { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; border-radius: 4px; list-style: none; }
.au-more summary::-webkit-details-marker { display: none; }
.au-more summary:hover { color: var(--ink); }
.au-more summary svg { width: 14px; height: 14px; transition: transform .15s ease; }
.au-more[open] summary svg { transform: rotate(90deg); }
.au-secret { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.au-secret code {
  flex: 1; min-width: 0; padding: 8px 10px; border-radius: 10px; background: var(--soft); border: 1px solid var(--line);
  font: 500 12.5px/1.4 var(--mono); color: var(--ink); overflow-wrap: anywhere;
}
.au-codes {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; margin-top: 16px; padding: 14px 16px;
  border-radius: 12px; background: var(--soft); border: 1px solid var(--line); font: 500 14px/1.5 var(--mono); color: var(--ink);
  letter-spacing: .04em;
}
/* An (i) tip that works without script, on touch too: a <details> whose summary is the (i). */
.au-tip { position: relative; display: inline-flex; }
.au-tip summary {
  display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 999px; cursor: pointer;
  color: var(--hint); list-style: none;
}
.au-tip summary::-webkit-details-marker { display: none; }
.au-tip summary:hover, .au-tip[open] summary { color: var(--ink); background: var(--soft); }
.au-tip summary svg { width: 16px; height: 16px; }
.au-tip-pop {
  position: absolute; top: calc(100% + 6px); left: 50%; z-index: 5; transform: translateX(-50%);
  width: max-content; max-width: min(272px, calc(100vw - 48px)); padding: 8px 10px; border-radius: 8px;
  background: #1a1a1a; color: #fff; font-size: 12px; font-weight: 500; line-height: 1.45;
}
/* Fields allauth renders whole ({{ field }}) on the social sign-up page. */
.au-widget :is(input:not([type="checkbox"]), select) {
  display: block; width: 100%; height: 46px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--line2); background: #fff; color: var(--ink); font: inherit; font-size: 15px;
}
.au-widget :is(input, select):focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(47, 84, 235, .16); }
/* Django's form.as_p on the two-factor confirm pages (usually nothing to show). */
.au-form-p p { margin-bottom: 12px; font-size: 13.5px; }

/* ── Below 960 px: the panel on top, shorter; the card under it ───────── */
@media (max-width: 959px) {
  .au { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .au-panel { position: relative; top: auto; height: auto; min-height: 0; margin: 8px; padding: 16px 20px; border-radius: 24px; }
  .au-panel::before { inset: auto -20% -70% -20%; }
  .au-brand { font-size: 16px; }
  .au-logo { width: 28px; height: 28px; border-radius: 8px; }
  .au-logo img { width: 18px; height: 18px; }
  .au-hero { margin: 0; padding: 36px 0 32px; }
  .au-chip { padding: 7px 14px; font-size: 13px; }
  .au-h1 { margin-top: 20px; font-size: clamp(36px, 10.5vw, 48px); }
  .au-sub { margin-top: 12px; font-size: 15px; }
  .au-side { align-items: flex-start; padding: 16px 16px 40px; }
  .au-card { padding: 24px 20px; border-radius: 18px; box-shadow: 0 1px 2px rgba(15, 15, 40, .05), 0 8px 24px -12px rgba(15, 15, 40, .12); }
  .au-input, .au-widget :is(input, select) { font-size: 16px; } /* no iOS zoom on focus */
  .au-row { padding: 10px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .au-btn, .au-btn svg, .au-input, .au-more summary svg { transition: none; }
  .au-btn--yellow:hover, .au-btn--yellow:hover svg { transform: none; }
}
