/* =========================================================================
   Shared auth screen styles: /login + /register (auth-v2) and every other
   sign-in screen built on <x-auth.shell> (forgot / reset password, OTP,
   two-factor, confirm password, approve sign-in, deletion pending).
   Page-only parts (tabs, phone + plan pickers) stay inline in auth-v2.
   Fonts come from partials.md3-tokens, include it before this file.
   ========================================================================= */

:root {
  --font-display: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --bg: #ffffff;
  --pane-bg: #f7f8f8;
  --surface: #ffffff;
  --subtle: #f7f8f8;
  --band: #f1f4f4;
  --fg: #1a1f20;
  --ink: #142B2F;
  --muted: #535b5d;
  --border: #dfe3e3;
  --field-bg: #ffffff;
  --field-border: #869294;
  --field-border-hover: #142B2F;

  --accent: #ED2024;
  --accent-hover: #c9171b;
  --accent-ink: #c9171b;
  --link: #c9171b;
  --accent-wash: #fdecec;
  --on-accent: #ffffff;

  --danger: #c02638;
  --danger-wash: #f9e7e9;
  --success: #1f7a4d;
  --success-wash: #e8f4ee;

  --on-media: #ffffff;
  --on-media-soft: rgba(255, 255, 255, 0.86);
  --logo-bg: #ffffff;
  --art-bg: #142B2F;
  --scrim-rgb: 15 19 20;

  --chip-bg: rgba(255, 255, 255, 0.94);
  --chip-border: rgba(20, 43, 47, 0.08);
  --chip-icon-bg: #fdecec;
  --avatar-bg: #142B2F;
  --dot-ring: rgba(237, 32, 36, 0.18);
  --shadow-chip: 0 16px 40px rgba(20, 43, 47, 0.22), 0 2px 6px rgba(20, 43, 47, 0.10);
  --shadow-card: 0 1px 2px rgba(20, 43, 47, 0.06), 0 18px 48px rgba(20, 43, 47, 0.10);
  --shadow-seg: 0 1px 2px rgba(20, 43, 47, 0.14), 0 4px 12px rgba(20, 43, 47, 0.14);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121212;
    --pane-bg: #121212;
    --accent: #dc3333;
    --surface: #1e1e1e;
    --subtle: #262626;
    --band: #262626;
    --fg: #ededed;
    --ink: #5a5a5a;
    --muted: #a3a3a3;
    --border: #313131;
    --field-bg: #1e1e1e;
    --field-border: #5a5a5a;
    --field-border-hover: #8a8a8a;
    --accent-hover: #c9171b;
    --accent-ink: #ff9494;
    --link: #ff9494;
    --accent-wash: rgba(237, 32, 36, 0.28);
    --danger: #ff7a85;
    --danger-wash: rgba(255, 122, 133, 0.16);
    --success: #4ade80;
    --success-wash: rgba(74, 222, 128, 0.12);
    --chip-bg: rgba(30, 30, 30, 0.9);
    --chip-border: rgba(255, 255, 255, 0.08);
    --chip-icon-bg: rgba(237, 32, 36, 0.2);
    --avatar-bg: #313131;
    --dot-ring: rgba(237, 32, 36, 0.3);
    --shadow-chip: 0 16px 40px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.4);
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4), 0 18px 48px rgba(0, 0, 0, 0.45);
    --shadow-seg: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121212;
  --pane-bg: #121212;
  --accent: #dc3333;
  --surface: #1e1e1e;
  --subtle: #262626;
  --band: #262626;
  --fg: #ededed;
  --ink: #5a5a5a;
  --muted: #a3a3a3;
  --border: #313131;
  --field-bg: #1e1e1e;
  --field-border: #5a5a5a;
  --field-border-hover: #8a8a8a;
  --accent-hover: #c9171b;
  --accent-ink: #ff9494;
  --link: #ff9494;
  --accent-wash: rgba(237, 32, 36, 0.28);
  --danger: #ff7a85;
  --danger-wash: rgba(255, 122, 133, 0.16);
  --success: #4ade80;
  --success-wash: rgba(74, 222, 128, 0.12);
  --chip-bg: rgba(30, 30, 30, 0.9);
  --chip-border: rgba(255, 255, 255, 0.08);
  --chip-icon-bg: rgba(237, 32, 36, 0.2);
  --avatar-bg: #313131;
  --dot-ring: rgba(237, 32, 36, 0.3);
  --shadow-chip: 0 16px 40px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4), 0 18px 48px rgba(0, 0, 0, 0.45);
  --shadow-seg: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.3);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--pane-bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
::selection { background: var(--accent-wash); color: var(--fg); }

/* ---------- Shell ---------- */
.shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ---------- Art panel ---------- */
.art {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  height: clamp(240px, 38vw, 300px);
  border-radius: 0 0 20px 20px;
  background: var(--art-bg);
}
.photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 400ms ease;
}
.photo-login { object-position: 50% 22%; }
.photo-register { object-position: 45% 32%; }
.shell[data-view="login"] .photo-login,
.shell[data-view="register"] .photo-register { opacity: 1; }

.art::before,
.art::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  z-index: 1;
  pointer-events: none;
}
.art::before {
  top: 0;
  height: 42%;
  background: linear-gradient(to bottom, rgb(var(--scrim-rgb) / 0.62), rgb(var(--scrim-rgb) / 0));
}
.art::after {
  bottom: 0;
  height: 78%;
  background: linear-gradient(to bottom,
    rgb(var(--scrim-rgb) / 0) 0%,
    rgb(var(--scrim-rgb) / 0.55) 32%,
    rgb(var(--scrim-rgb) / 0.8) 72%,
    rgb(var(--scrim-rgb) / 0.86) 100%);
}

.art-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 16px;
  padding: 16px;
  color: var(--on-media);
}

/* Original red + dark-blue logo, centred above the card. Dark theme gets a light plate so the blue reads. */
.brand {
  display: inline-flex;
  align-self: center;
  margin-top: auto;
  padding: 8px 14px;
  border-radius: 12px;
  transition: background-color 200ms ease, box-shadow 200ms ease;
}
/* Dark theme swaps in the light-text logo (assets/img/alivecrm-logo-dark.svg), so no plate is needed. */
.brand { color: inherit; }
.brand-logo-dark { display: none; }
:root[data-theme="dark"] .brand-logo-light { display: none; }
:root[data-theme="dark"] .brand-logo-dark { display: block; }
.brand img {
  width: 210px;
  max-width: 60vw;
  height: auto;
}
.brand:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.art-bottom { display: grid; gap: 24px; min-width: 0; }
.art-copies { display: grid; min-width: 0; }
.art-copy, .credit {
  grid-area: 1 / 1;
  align-self: end;
  min-width: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 400ms ease, transform 400ms ease, visibility 0s linear 400ms;
}
.shell[data-view="login"] [data-for="login"],
.shell[data-view="register"] [data-for="register"] {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 400ms ease 80ms, transform 400ms ease 80ms, visibility 0s;
}

.eyebrow {
  margin: 0;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.75rem;
  line-height: 1.2;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow-media { color: var(--on-media-soft); }
.eyebrow-accent { margin-bottom: 10px; color: var(--accent-ink); }

.art-title {
  margin: 10px 0 0;
  max-width: 20ch;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.375rem, 1rem + 1.6vw, 1.75rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--on-media);
  text-wrap: balance;
}
.art-sub {
  display: none;
  margin: 16px 0 0;
  max-width: 42ch;
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--on-media-soft);
  text-wrap: pretty;
}

.art-credits {
  position: absolute;
  top: 18px;
  right: 16px;
  display: grid;
  justify-items: end;
  max-width: 45%;
}
.credit {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  line-height: 1.3;
  letter-spacing: 0.02em;
  text-align: right;
  color: var(--on-media-soft);
  text-shadow: 0 1px 2px rgb(var(--scrim-rgb) / 0.7), 0 0 10px rgb(var(--scrim-rgb) / 0.5);
}

/* ---------- Floating CRM chips ---------- */
.chip {
  position: absolute;
  z-index: 2;
  display: none;
  padding: 14px 16px;
  border: 1px solid var(--chip-border);
  border-radius: 14px;
  background: var(--chip-bg);
  color: var(--fg);
  box-shadow: var(--shadow-chip);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  font-size: 0.875rem;
  line-height: 1.35;
}
.chip-lead { top: 10%; right: 5%; width: 240px; }
.chip-follow { top: 40%; left: 5%; }

.chip-row { display: flex; align-items: center; gap: 10px; }
.chip-title { font-weight: 600; color: var(--fg); }
.chip-meta {
  margin: 4px 0 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--dot-ring);
}
.chip-lead .chip-meta { margin-left: 18px; }
.chip-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--muted);
}
.chip-foot strong { color: var(--fg); font-weight: 600; }
.avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--avatar-bg);
  color: var(--on-media);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.6875rem;
}

.chip-follow .chip-row { align-items: center; gap: 12px; }
.chip-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--chip-icon-bg);
  color: var(--link);
}
.chip-icon svg { width: 18px; height: 18px; }
.chip-col { display: grid; min-width: 0; flex: 1; }
.chip-col .chip-meta { margin-top: 2px; }
.chip-deal { display: grid; justify-items: end; gap: 2px; }
.chip-deal-label {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.chip-deal-value {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}

@keyframes chip-rise {
  from { opacity: 0; transform: translateY(8px); }
}

/* ---------- Form side ---------- */
.pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
/* auto margins centre card + footer when they fit, collapse to 0 (top aligned) when they do not */
.pane-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  min-width: 0;
  padding: 24px 16px 32px;
}


/* ---------- Card ---------- */
.card {
  width: 100%;
  max-width: 440px;
  min-width: 0;
  container: card / inline-size;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  animation: card-in 700ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(16px) scale(0.985); }
}

.panel-head { margin-bottom: 24px; }
h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--fg);
  text-wrap: balance;
  scroll-margin-top: 24px;
}
h1:focus { outline: none; }
.lede {
  margin: 8px 0 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--muted);
  text-wrap: pretty;
}

.form { display: grid; gap: 20px; min-width: 0; }
.grid { display: grid; gap: 20px 16px; align-items: start; min-width: 0; }
@container card (min-width: 456px) {
  .grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .span-2 { grid-column: 1 / -1; }
}

.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: -4px;
}
.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.field { display: grid; gap: 8px; align-content: start; min-width: 0; }
.field > label:not(.check),
.label-row > label {
  font-weight: 500;
  font-size: 0.9375rem;
  line-height: 1.3;
  color: var(--fg);
}
.label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}
.req { margin-left: 2px; color: var(--accent); }
.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;
}

.input {
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--field-border);
  border-radius: 8px;
  background: var(--field-bg);
  color: var(--fg);
  font-size: 1rem;
  line-height: 1.4;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.input::placeholder { color: var(--muted); opacity: 1; }
.input:hover { border-color: var(--field-border-hover); }
.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-wash);
}
.input[aria-invalid="true"] { border-color: var(--danger); }
.input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px var(--danger-wash); }

.control { position: relative; min-width: 0; }
.has-reveal .input { padding-right: 52px; }
.reveal {
  position: absolute;
  top: 2px;
  right: 2px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 150ms ease, background-color 150ms ease;
}
.reveal:hover { color: var(--fg); background: var(--band); }
.reveal:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
.reveal svg { width: 20px; height: 20px; }
.reveal .icon-hide { display: none; }
.reveal[aria-pressed="true"] .icon-show { display: none; }
.reveal[aria-pressed="true"] .icon-hide { display: block; }

.help {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--muted);
}
.field-error {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--danger);
}
.field-error:empty { display: none; }

.row-between {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin-top: -4px;
}

.check {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  padding-block: 11px;
  margin-block: -11px;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--fg);
  cursor: pointer;
}
.box {
  position: relative;
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
}
.box input {
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  inset: 0;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 1px solid var(--field-border);
  border-radius: 5px;
  background: var(--field-bg);
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}
.box input:hover { border-color: var(--field-border-hover); }
.box input:checked { border-color: var(--accent); background: var(--accent); }
.box input:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-wash);
}
.box input[aria-invalid="true"] { border-color: var(--danger); }
.box svg {
  position: absolute;
  inset: 0;
  width: 18px;
  height: 18px;
  padding: 2px;
  color: var(--on-accent);
  opacity: 0;
  transform: scale(0.6);
  pointer-events: none;
  transition: opacity 150ms ease, transform 150ms ease;
}
.box input:checked + svg { opacity: 1; transform: none; }

.link {
  color: var(--link);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: text-decoration-color 150ms ease;
}
.link:hover { text-decoration-color: currentColor; }
.link-inline { text-decoration-color: currentColor; }
.link:focus-visible, .link-btn:focus-visible, .legal a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}
.link-sm { font-size: 0.8125rem; }

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--link);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: text-decoration-color 150ms ease;
}
.link-btn:hover { text-decoration-color: currentColor; }

/* 44px hit areas for small standalone links without moving layout */
.link:not(.link-inline), .link-btn, .legal a { position: relative; }
.link:not(.link-inline)::after, .link-btn::after, .legal a::after {
  content: "";
  position: absolute;
  inset: -11px -4px;
}
.legal a::after { inset: -14px -6px; }

/* Cloudflare Turnstile widget (300 x 65) */
.turnstile { min-height: 65px; }

.submit-block { margin-top: 4px; }
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  padding: 12px 24px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  text-align: center;
  text-wrap: balance;
  cursor: pointer;
  transition: background-color 150ms ease, transform 150ms ease;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  box-shadow: 0 0 0 3px var(--accent-wash);
}
.btn-primary svg { flex: none; width: 18px; height: 18px; transition: transform 200ms ease; }
.btn-primary:hover svg { transform: translateX(3px); }

/* phone-width card: tighter button so the label stays on one line */
@container card (max-width: 340px) {
  .btn-primary { padding-inline: 16px; }
}

/* Server messages: success (e.g. after a password reset) and form-level errors */
.form-status, .form-alert { margin: 0; }
.form-status:not(:empty),
.form-alert:not(:empty) {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.9375rem;
}
.form-status:not(:empty) { background: var(--success-wash); color: var(--success); }
.form-alert:not(:empty) { margin-top: 0; background: var(--danger-wash); color: var(--danger); }
.form-status:not(:empty)::before {
  content: "";
  flex: none;
  width: 6px;
  height: 11px;
  margin: 0 2px 3px 4px;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.switch-line {
  margin: 24px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 0.9375rem;
  text-align: center;
  color: var(--muted);
}

/* ---------- Below the card ---------- */
.legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 12px;
  max-width: 100%;
  margin-bottom: auto;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--muted);
}
.legal a {
  color: var(--accent-ink);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: text-decoration-color 150ms ease;
}
.legal a:hover { text-decoration-color: currentColor; }

/* Secondary pill (outlined), same size as .btn-primary. Both also work on <a>. */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  padding: 12px 24px;
  border: 1px solid var(--field-border);
  border-radius: 999px;
  background: transparent;
  color: var(--fg);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}
.btn-secondary:hover { border-color: var(--field-border-hover); background: var(--subtle); }
.btn-secondary:active { transform: translateY(1px); }
.btn-secondary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
a.btn-primary, a.btn-secondary { text-decoration: none; }

/* 6-digit codes (OTP, authenticator, emailed code) */
.input-code {
  height: 56px;
  padding-left: calc(14px + 0.45em);
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 0.45em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.input-code::placeholder { letter-spacing: 0.45em; }

/* A small group of stacked actions (e.g. primary + secondary button) */
.stack { display: grid; gap: 12px; }
.stack form, .stack p { margin: 0; }
.switch-line .form { text-align: left; }

/* ---------- Tablet ---------- */
@media (min-width: 640px) {
  .card { padding: 32px; }
}

/* ---------- Desktop ---------- */
@media (min-width: 1024px) {
  .shell {
    display: grid;
    grid-template-columns: minmax(0, 44fr) minmax(0, 56fr);
  }
  .art {
    position: sticky;
    top: 0;
    align-self: start;
    height: 100vh;
    height: 100dvh;
    border-radius: 0;
  }
  .photo-login { object-position: 46% 24%; }
  .photo-register { object-position: 45% 50%; }
  .art::before { height: 26%; }
  .art::after { height: 58%; }
  .art-overlay { padding: clamp(28px, 3.2vw, 48px); }
  .art-bottom { gap: 28px; }
  .art-title {
    margin-top: 16px;
    max-width: 17ch;
    font-size: clamp(2rem, 0.9rem + 2.2vw, 3rem);
    line-height: 1.04;
    letter-spacing: -0.025em;
  }
  .art-sub { display: block; }
  .art-credits {
    position: static;
    max-width: none;
    justify-self: end;
  }
  .pane-main { padding: clamp(24px, 4vw, 64px); }
}
@media (min-width: 1024px) and (max-height: 720px) {
  .art-sub { display: none; }
}
@media (min-width: 1200px) {
  .chip {
    display: block;
    animation: chip-rise 700ms cubic-bezier(0.2, 0.8, 0.2, 1) 250ms backwards;
  }
  .chip-follow { animation-delay: 370ms; }
}
@media (min-width: 1280px) {
  .shell { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (min-width: 1440px) {
  .card { padding: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
