:root {
  --auth-ink: #341f30;
  --auth-muted: #62515d;
  --auth-purple: #391735;
  --auth-purple-hover: #592750;
  --auth-coral: #fa6956;
  --auth-cream: #fff2df;
  --auth-canvas: #fcf8f4;
  --auth-line: #e5d7d0;
  --auth-line-strong: #d4c1ba;
  --auth-surface: #ffffff;
}

* {
  box-sizing: border-box;
}

.auth-page {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at 12% 0%, rgba(250, 105, 86, 0.07), transparent 38%),
              radial-gradient(circle at 88% 8%, rgba(57, 23, 53, 0.05), transparent 36%),
              var(--auth-canvas);
  color: var(--auth-ink);
  font: 16px/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-text-size-adjust: 100%;
}

.auth-skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--auth-purple);
  color: #fff8ef;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}
.auth-skip-link:focus {
  left: 16px;
}

/* Header / Topbar */
.auth-topbar {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 22px 36px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: nowrap;
}

.auth-brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  min-height: 44px;
  min-width: 0;
  color: var(--auth-ink);
  text-decoration: none;
}

.auth-back-home {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 15px;
  border-radius: 999px;
  background: #f5ebe5;
  border: 1px solid #e2cfc7;
  color: #4f2746;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  flex: none;
  transition: background-color 150ms ease, border-color 150ms ease;
}
.auth-back-home:hover {
  background: #eee0d8;
  border-color: #d4bdb3;
}
.auth-back-short {
  display: none;
}

/* Main two-column layout */
.auth-layout {
  width: 100%;
  max-width: 1140px;
  margin: 14px auto 44px;
  padding: 0 36px;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  gap: clamp(36px, 5.5vw, 76px);
  align-items: start;
  flex: 1;
}

/* Editorial story column */
.auth-story {
  position: relative;
  padding-top: 14px;
  min-width: 0;
}

.auth-eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px;
  border-radius: 999px;
  background: #f5e6ef;
  border: 1px solid #e1c8d7;
  color: #5e2046;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.auth-eyebrow-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--auth-coral);
  box-shadow: 0 0 0 3px rgba(250, 105, 86, 0.22);
  flex: none;
}

.auth-story > p {
  color: var(--auth-muted);
  max-width: 42ch;
  font-size: 17px;
  line-height: 1.58;
  margin: 0 0 18px;
}

.auth-template-badge {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 16px 0;
  padding: 13px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fffdfa, #f8eee9);
  border: 1px solid #dfc8d4;
  box-shadow: 0 10px 24px -14px rgba(57, 23, 53, 0.14);
}
.auth-template-badge[hidden] {
  display: none;
}
.auth-template-badge strong {
  display: block;
  font-size: 14px;
  color: #35162f;
}
.auth-template-badge small {
  display: block;
  font-size: 12.5px;
  color: #66505f;
  margin-top: 2px;
  line-height: 1.4;
}

.auth-tpl-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #188654;
  box-shadow: 0 0 0 4px rgba(24, 134, 84, 0.18);
  flex: none;
}

.auth-tpl-mini {
  width: 38px;
  height: 48px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #d5c3ce;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: none;
  box-shadow: 0 4px 10px rgba(45, 18, 40, 0.08);
}
.auth-tpl-mini i {
  display: block;
  height: 3px;
  border-radius: 2px;
  background: #d7cbd3;
}
.auth-tpl-mini i:first-child {
  width: 68%;
  height: 5px;
  background: var(--tpl-accent, #391735);
}
.auth-tpl-mini i:nth-child(2) {
  width: 90%;
}
.auth-tpl-mini i:nth-child(3) {
  width: 76%;
}

.auth-story-hero {
  margin: 16px 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #e2cdd8;
  background: #fffaf5;
  max-height: 210px;
  box-shadow: 0 12px 28px -18px rgba(45, 18, 40, 0.16);
}
.auth-story-hero img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 210px;
  object-fit: cover;
}

.auth-arti-card {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin: 16px 0 20px;
  padding: 13px 15px;
  border-radius: 16px;
  background: radial-gradient(circle at 14% 20%, rgba(250, 105, 86, 0.13), transparent 48%),
              linear-gradient(135deg, #fffdfa 0%, #f9efe9 100%);
  border: 1px solid #e2cdd8;
  box-shadow: 0 12px 28px -18px rgba(45, 18, 40, 0.14);
}
.auth-arti-card img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border-radius: 14px;
  background: #fff8f2;
  border: 1px solid #ead8cf;
  padding: 4px;
}
.auth-arti-copy strong {
  display: block;
  font-size: 13px;
  color: #391735;
  margin-bottom: 3px;
}
.auth-arti-copy span {
  display: block;
  font-size: 13px;
  line-height: 1.48;
  color: #5a4453;
}

.auth-story-steps {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
}
.auth-step-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid #e6d7df;
}
.auth-step-item em {
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--auth-purple);
  color: var(--auth-cream);
}
.auth-step-item strong {
  display: block;
  font-size: 14px;
  color: #2f172b;
  margin-bottom: 2px;
}
.auth-step-item p {
  margin: 0;
  font-size: 13px;
  line-height: 1.46;
  color: #624e5c;
}

/* Sign-in / Sign-up Card */
.auth-card {
  background: var(--auth-surface);
  border: 1px solid var(--auth-line);
  border-radius: 22px;
  padding: 30px 32px;
  box-shadow: 0 18px 44px -22px rgba(48, 22, 43, 0.14);
  min-width: 0;
}

.auth-card h1,
.auth-card h2 {
  font-size: clamp(24px, 3vw, 30px);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 4px 0 8px;
  color: var(--auth-ink);
}
.auth-card h1:focus {
  outline: none;
}

.auth-card p {
  color: var(--auth-muted);
  font-size: 14.5px;
  line-height: 1.52;
}
.auth-card .auth-lead {
  margin: 0 0 12px;
}

.auth-card button,
.auth-card input,
.auth-card select {
  font: inherit;
}

/* Segmented Sign in / Create account switcher */
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin: 0 0 18px;
  border-radius: 12px;
  background: #f5ede8;
  border: 1px solid #e6d8d1;
}
.auth-tabs [role="tab"] {
  min-height: 40px;
  padding: 8px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #634d5c;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
}
.auth-tabs [role="tab"]:hover:not([aria-selected="true"]):not(:disabled) {
  color: var(--auth-ink);
}
.auth-tabs [role="tab"][aria-selected="true"] {
  background: #ffffff;
  color: var(--auth-purple);
  box-shadow: 0 2px 8px rgba(57, 23, 53, 0.1);
}

.auth-card-kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #823859;
  margin-bottom: 2px;
}

/* Selected template / destination chip (visible on mobile & desktop) */
.auth-context-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  padding: 9px 12px;
  border-radius: 11px;
  background: #fcf5ef;
  border: 1px solid #e6d3ca;
  color: #46263f;
  font-size: 13px;
  line-height: 1.4;
}
.auth-tpl-swatch {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  flex: none;
  box-shadow: 0 0 0 3px rgba(57, 23, 53, 0.09);
}

/* Compact inline reassurance strip */
.auth-reassure {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 0 0 16px;
  padding: 0;
  font-size: 12.5px !important;
  line-height: 1.4 !important;
  font-weight: 600;
  color: #53364b !important;
}
.auth-reassure span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

/* Social OAuth buttons */
.auth-socials {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
}
.auth-social {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid var(--auth-line-strong);
  border-radius: 11px;
  background: #ffffff;
  color: var(--auth-ink);
  font-size: 15px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}
.auth-social:hover:not(:disabled) {
  background: #fdf8f4;
  border-color: var(--auth-purple);
}
.auth-social:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}
.auth-social svg {
  width: 19px;
  height: 19px;
  flex: none;
}
.auth-social-label {
  white-space: nowrap;
}
.auth-social small {
  font-size: 12px;
  font-weight: 500;
  color: #6b5866;
}
.auth-fast-pill {
  margin-left: auto;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e9f6ef;
  color: #18603c !important;
  border: 1px solid #bfe2cf;
  font-size: 12px !important;
  font-weight: 700 !important;
  white-space: nowrap;
  flex: none;
}

.auth-divider {
  display: flex;
  gap: 12px;
  align-items: center;
  color: #7c6976;
  font-size: 12.5px;
  margin: 16px 0;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--auth-line);
}

/* Status & Error Recovery Banner */
.auth-status {
  border-radius: 11px;
  font-size: 13.5px;
  line-height: 1.48;
  padding: 12px 14px;
  margin: 0 0 14px;
  color: #8b2e24;
  background: #fff2ef;
  border: 1px solid #f0c9c0;
}
.auth-status:empty {
  display: none;
}
.auth-status.success {
  color: #1b6047;
  background: #eef8f2;
  border-color: #bfe2cf;
}
.auth-status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.auth-status-btn {
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #dfb4aa;
  background: #ffffff;
  color: #5e2036;
  font-size: 12.5px;
  font-weight: 650;
  cursor: pointer;
}
.auth-status-btn:hover {
  background: #fdf6f4;
  border-color: var(--auth-purple);
}

/* Form fields */
.auth-form {
  display: grid;
  gap: 14px;
}
.auth-form label {
  display: grid;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 650;
  color: #432b3e;
}
.auth-form input:not([type="checkbox"]),
.auth-form select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--auth-line-strong);
  border-radius: 11px;
  background: #ffffff;
  color: var(--auth-ink);
  font-size: 16px;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.auth-form input:not([type="checkbox"])::placeholder {
  color: #968490;
}
.auth-form input:not([type="checkbox"]):focus,
.auth-form select:focus {
  border-color: var(--auth-purple);
  box-shadow: 0 0 0 3px rgba(57, 23, 53, 0.12);
}

/* Password field with properly centered 44px+ Show/Hide button */
.auth-password {
  position: relative;
  display: block;
}
.auth-password input {
  padding-right: 68px !important;
}
.auth-password button {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  min-height: 40px;
  min-width: 56px;
  padding: 6px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--auth-purple);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}
.auth-password button:hover:not(:disabled) {
  background: #f6ede8;
}

/* Live signup password checklist */
.auth-pw-rules {
  list-style: none;
  margin: -4px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 10px;
  font-size: 12px;
  color: #6d5967;
}
.auth-pw-rules li {
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.35;
}
.auth-pw-rules li i {
  font-style: normal;
  font-weight: 700;
  width: 14px;
  text-align: center;
  color: #957f8e;
}
.auth-pw-rules li.is-met {
  color: #1b6043;
  font-weight: 600;
}
.auth-pw-rules li.is-met i {
  color: #188654;
}

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.auth-form .auth-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  font-size: 13.5px;
  font-weight: 500;
  color: #4d3948;
  cursor: pointer;
}
.auth-check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--auth-purple);
  flex: none;
}

.auth-primary,
.auth-card a.auth-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 13px 18px;
  background: var(--auth-purple);
  color: #fff8ef;
  border: 1px solid var(--auth-purple);
  border-radius: 11px;
  font-size: 15.5px;
  font-weight: 650;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease;
}
.auth-primary:hover:not(:disabled),
.auth-card a.auth-primary:hover {
  background: var(--auth-purple-hover);
  border-color: var(--auth-purple-hover);
}
.auth-primary:disabled {
  opacity: 0.62;
  cursor: wait;
}

.auth-link,
.auth-text-link {
  border: 0;
  background: none;
  color: var(--auth-purple);
  padding: 4px 2px;
  font-size: 13.5px;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-color: rgba(57, 23, 53, 0.35);
  cursor: pointer;
}
.auth-link:hover,
.auth-text-link:hover {
  text-decoration-color: var(--auth-purple);
}
.auth-text-link {
  display: inline-block;
  margin: 12px;
}

.auth-mode {
  margin-top: 16px;
  text-align: center;
  font-size: 13.5px;
  color: var(--auth-muted);
}

.auth-note {
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--auth-line);
  font-size: 12.5px !important;
  line-height: 1.52 !important;
  color: #6b5866 !important;
}
.auth-note a {
  color: var(--auth-purple);
}

/* Account & Email Verification States */
.auth-account-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}
.auth-user-icon {
  background: #f7ece6;
  color: var(--auth-purple);
  border: 1px solid #e6d2c9;
  width: 54px;
  height: 54px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 700;
  flex: none;
}
.auth-user-icon.is-envelope {
  width: 60px;
  height: 60px;
  background: #fffaf5;
  border: 1px solid #ead8cf;
  padding: 4px;
}
.auth-user-icon.is-envelope img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.auth-account-email,
.auth-inline-email {
  overflow-wrap: anywhere;
  font-weight: 600;
  color: var(--auth-ink) !important;
  margin: 2px 0 0 !important;
}
.auth-verify-steps {
  margin: 14px 0;
  padding: 12px 14px 12px 30px;
  border-radius: 12px;
  background: #faf6f3;
  border: 1px solid #e6d7d0;
  font-size: 13.5px;
  color: #351d30;
  display: grid;
  gap: 8px;
}
.auth-verify-steps li {
  line-height: 1.45;
}
.auth-verify-live {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 11px;
  background: #eef8f2;
  border: 1px solid #c3e4d1;
  color: #1b5e3c;
  font-size: 12.5px;
  font-weight: 600;
  margin: 10px 0 14px;
}
.auth-account-actions {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
}
.auth-signout-link {
  justify-self: center;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

/* Loading & Outage states */
.auth-loading {
  text-align: center;
  padding: 36px 18px;
  max-width: 520px;
  margin: auto;
}
.auth-loading h1,
.auth-loading h2 {
  font-size: 22px;
  line-height: 1.25;
  margin: 12px 0 6px;
}
.auth-loading p {
  color: var(--auth-muted);
  margin: 0 0 16px;
}
.auth-loading-art {
  display: inline-grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 18px;
  background: #fff8f2;
  border: 1px solid #ead8cf;
  padding: 6px;
}
.auth-loading-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: auth-arti-nod 2.2s ease-in-out infinite;
}
.auth-loading-bar {
  display: block;
  width: min(200px, 75%);
  height: 5px;
  margin: 0 auto;
  border-radius: 999px;
  background: #efe3dc;
  overflow: hidden;
  position: relative;
}
.auth-loading-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 45%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--auth-purple), var(--auth-coral));
  animation: auth-bar-slide 1.35s ease-in-out infinite;
}
.auth-spinner {
  display: inline-block;
  width: 28px;
  height: 28px;
  border: 3px solid #ecdfd8;
  border-top-color: var(--auth-purple);
  border-radius: 50%;
  animation: auth-spin 1s linear infinite;
}

/* Header session actions (shared with staff/public headers) */
.auth-session-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.auth-session-actions a {
  white-space: nowrap;
  font-size: 12.5px;
}
.auth-session-actions button {
  white-space: nowrap;
  font-size: 12.5px;
  border: 1px solid var(--auth-line-strong);
  border-radius: 8px;
  background: #ffffff;
  padding: 8px 12px;
  color: var(--auth-purple);
  cursor: pointer;
}
.auth-account-panel {
  margin-bottom: 24px;
}
.auth-account-panel p {
  overflow-wrap: anywhere;
}
.auth-inline-notice {
  padding: 12px 16px;
  background: #f8eee8;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 18px;
}

/* Footer */
.auth-footer {
  font-size: 13px;
  color: #695663;
  text-align: center;
  padding: 0 16px 26px;
}
.auth-footer nav {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 10px;
}
.auth-footer a {
  color: #5b4554;
  text-decoration: none;
  padding: 6px 4px;
}
.auth-footer a:hover {
  color: var(--auth-purple);
  text-decoration: underline;
}

/* Staff sign-in layout */
.staff-auth-layout {
  display: grid;
  gap: 1.5rem;
  width: min(100% - 2rem, 28rem);
  margin: clamp(1.75rem, 8vh, 5rem) auto;
}
.staff-auth-layout > .rt-wordmark {
  width: min(13rem, 80%);
  height: auto;
}
.staff-auth-layout .auth-card {
  width: 100%;
  min-width: 0;
  margin: 0;
  grid-area: auto;
}
#totp-qr:not([hidden]) {
  display: block;
  width: min(100%, 16rem);
  height: auto;
  margin: 1rem auto;
  image-rendering: pixelated;
}
#totp-manual {
  margin: 0.75rem 0 1.25rem;
  font-size: 0.9rem;
}
#totp-manual summary {
  width: fit-content;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
#totp-key {
  display: block;
  overflow-wrap: anywhere;
  user-select: all;
}

@keyframes auth-spin {
  to { transform: rotate(360deg); }
}
@keyframes auth-arti-nod {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
@keyframes auth-bar-slide {
  0% { transform: translateX(-90%); }
  100% { transform: translateX(220%); }
}

/* Tablet & Mobile Responsive Polish */
@media (max-width: 860px) {
  .auth-topbar {
    max-width: 540px;
    padding: 14px 16px 6px;
  }
  .auth-back-home {
    min-height: 44px;
    padding: 8px 13px;
  }
  .auth-page .auth-layout {
    max-width: 540px;
    margin: 6px auto 28px;
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 22px;
  }
  .auth-layout .auth-card {
    order: 0;
    width: 100%;
    padding: clamp(18px, 5vw, 26px);
    border-radius: 20px;
  }
  .auth-layout .auth-story {
    order: 1;
    padding: 4px 2px 0;
  }
  /* Hide the duplicate template badge in the story below since .auth-context-chip shows inside .auth-card */
  .auth-story .auth-template-badge,
  .auth-story-hero {
    display: none;
  }
  .auth-story > p {
    font-size: 15px;
    margin-bottom: 14px;
  }
  .auth-tabs {
    margin-bottom: 12px;
  }
  .auth-tabs [role="tab"] {
    min-height: 44px;
  }
  .auth-card h1,
  .auth-card h2 {
    font-size: clamp(22px, 5.8vw, 27px);
    margin: 2px 0 6px;
  }
  .auth-card .auth-lead {
    font-size: 13.75px !important;
    line-height: 1.45 !important;
    margin-bottom: 10px;
  }
  .auth-reassure {
    gap: 4px 12px;
    margin-bottom: 12px;
    font-size: 12px !important;
  }
  .auth-socials {
    margin-top: 10px;
  }
  .auth-divider {
    margin: 12px 0;
  }
  .auth-form {
    gap: 12px;
  }
  .auth-password button {
    min-height: 44px;
    min-width: 56px;
  }
  .auth-form .auth-check,
  .auth-row .auth-link,
  .auth-mode .auth-link,
  .auth-status-btn,
  .auth-signout-link,
  .auth-footer a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .auth-session-actions {
    gap: 8px;
  }
  .auth-session-actions a,
  .auth-session-actions button {
    font-size: 12px;
  }
}

@media (max-width: 400px) {
  .auth-topbar {
    padding: 10px 14px 4px;
  }
  .auth-page .auth-layout {
    padding: 0 14px;
  }
  .auth-layout .auth-card {
    padding: 16px;
  }
  .auth-tabs {
    margin-bottom: 10px;
  }
  .auth-tabs [role="tab"] {
    padding: 8px 6px;
    font-size: 13.5px;
    white-space: nowrap;
  }
  .auth-context-chip {
    padding: 7px 10px;
    margin-bottom: 8px;
    font-size: 12.5px;
  }
  .auth-card .auth-lead {
    margin-bottom: 8px;
  }
  .auth-reassure {
    margin-bottom: 10px;
  }
  .auth-socials {
    margin-top: 8px;
  }
  .auth-divider {
    margin: 10px 0;
  }
  .auth-form {
    gap: 10px;
  }
  .auth-back-full {
    display: none;
  }
  .auth-back-short {
    display: inline;
  }
  .auth-fast-pill {
    display: none;
  }
  .auth-pw-rules {
    grid-template-columns: 1fr 1fr;
    gap: 3px 6px;
  }
  .auth-account-head {
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-spinner,
  .auth-loading-art img,
  .auth-loading-bar::after {
    animation: none;
  }
  .auth-loading-bar::after {
    width: 100%;
    opacity: 0.45;
  }
  .auth-back-home,
  .auth-tabs [role="tab"],
  .auth-social,
  .auth-primary,
  .auth-form input {
    transition: none;
  }
}
