/* Shared layout for full-page flows (sign-in, unlock, sign-up). Used by both origins. */

.auth { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); min-height: calc(100vh - 38px); min-height: calc(100dvh - 38px); }
.auth-brand {
  position: relative; overflow: hidden; color: var(--cream); padding: var(--space-7) var(--space-7) var(--space-6);
  background: radial-gradient(120% 80% at 0% 0%, #17305a 0%, rgba(23, 48, 90, 0) 55%), linear-gradient(165deg, #0a1628 0%, #0b1b36 100%);
  display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-6); --focus: var(--gold-light);
}
/* Concentric "vault" rings: one decorative gesture, no imagery to download. */
.auth-brand::before, .auth-brand::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.auth-brand::before { width: 46rem; height: 46rem; right: -22rem; bottom: -20rem; border: 1px solid rgba(228, 204, 122, 0.22); box-shadow: 0 0 0 3rem rgba(228, 204, 122, 0.035), 0 0 0 6rem rgba(228, 204, 122, 0.025), 0 0 0 9rem rgba(228, 204, 122, 0.018); }
.auth-brand::after { width: 9rem; height: 9rem; right: 3rem; bottom: 3rem; background: radial-gradient(circle, rgba(228, 204, 122, 0.22), rgba(228, 204, 122, 0) 70%); }
.auth-brand > * { position: relative; z-index: 1; }
.auth-brand .place { font-size: var(--text-xs); letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-light); font-weight: 600; display: block; margin-top: 10px; }
.auth-brand h2 { font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem); font-weight: 600; letter-spacing: -0.025em; line-height: 1.12; max-width: 17ch; }
.auth-brand h2 em { font-style: normal; color: var(--gold-light); }
.auth-brand p { color: rgba(245, 240, 232, 0.78); max-width: 34ch; margin-top: var(--space-3); }
.auth-brand .points { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-3); font-size: var(--text-sm); color: rgba(245, 240, 232, 0.86); }
.auth-brand .points li { display: flex; gap: var(--space-3); align-items: flex-start; }
.auth-brand .points svg { flex: none; color: var(--gold-light); margin-top: 2px; }

.auth-main { display: grid; align-content: center; justify-items: center; padding: var(--space-6) var(--space-5); position: relative; }
.auth-top { position: absolute; top: var(--space-3); right: var(--space-3); display: flex; gap: var(--space-2); }
.auth-card { width: min(34rem, 100%); display: grid; gap: var(--space-5); }
.auth-card h1 { font-size: var(--text-3xl); letter-spacing: -0.025em; }
.auth-card h1:focus { outline: none; }
.auth-card .lede { color: var(--text-2); margin-top: var(--space-2); }
.auth-form { display: grid; gap: var(--space-4); }
.divider-text { display: flex; align-items: center; gap: var(--space-3); color: var(--text-2); font-size: var(--text-sm); }
.divider-text::before, .divider-text::after { content: ""; height: 1px; flex: 1; background: var(--divider-strong); }
.stack-sm { display: grid; gap: var(--space-3); }
.fine { font-size: var(--text-sm); color: var(--text-2); }
.fine a { font-weight: 500; }
.method-btn { justify-content: flex-start; padding-left: var(--space-4); min-height: 48px; }
.method-btn .mark { width: 22px; display: grid; place-items: center; font-weight: 700; flex: none; }
.center { text-align: center; }

.steps { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--space-2); flex-wrap: wrap; font-size: var(--text-sm); }
.steps li { display: flex; align-items: center; gap: var(--space-2); color: var(--text-2); font-weight: 500; }
.steps li + li::before { content: ""; width: 24px; height: 1px; background: var(--divider-strong); margin-right: var(--space-1); }
.steps .n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: var(--text-xs); font-weight: 700; background: var(--surface-2); color: var(--text); }
.steps .done .n { background: var(--success-text); color: #fff; }
:root[data-theme="dark"] .steps .done .n { color: var(--navy); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .steps .done .n { color: var(--navy); } }
.steps .now { color: var(--text); font-weight: 600; }
.steps .now .n { background: var(--gold-fill); color: var(--navy); }

.choice {
  display: grid; grid-template-columns: auto 1fr auto; gap: var(--space-3); align-items: start; text-align: left; width: 100%;
  padding: var(--space-4); border-radius: var(--radius); border: 1.5px solid var(--divider-strong); background: var(--surface);
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.choice:hover { border-color: var(--text-2); }
.choice[aria-checked="true"] { border-color: var(--gold-fill); background: var(--selected); box-shadow: 0 0 0 1px var(--gold-fill); }
.choice .radio { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--text-2); margin-top: 1px; display: grid; place-items: center; }
.choice[aria-checked="true"] .radio { border-color: var(--gold-fill); background: var(--gold-fill); }
.choice[aria-checked="true"] .radio::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--navy); }
.choice .c-title { font-weight: 600; font-size: var(--text-lg); }
.choice .c-detail { color: var(--text-2); font-size: var(--text-sm); margin-top: 2px; }

.callout { display: flex; gap: var(--space-3); padding: var(--space-4); border-radius: var(--radius); background: var(--surface-2); font-size: var(--text-sm); }
.callout svg { flex: none; margin-top: 2px; }
.callout.warn { background: color-mix(in srgb, var(--warn-text) 13%, var(--surface)); box-shadow: inset 3px 0 0 var(--warn-text); }
.callout.warn svg { color: var(--warn-text); }
.callout .c-title { font-weight: 600; }

.keybox {
  background: var(--surface); border: 1px solid var(--divider-strong); border-radius: var(--radius-lg); padding: var(--space-5);
  display: grid; gap: var(--space-4); box-shadow: var(--shadow-card);
}
.keygrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-2) var(--space-3); margin: 0; padding: 0; list-style: none; font-family: var(--font-mono); font-size: var(--text-lg); font-weight: 700; letter-spacing: 0.04em; user-select: all; }
.keygrid li { padding: 8px 6px; text-align: center; background: var(--surface-2); border-radius: 8px; }
.key-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--divider-strong); border-top-color: var(--gold-fill); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.success-mark { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--selected); color: var(--success-text); box-shadow: inset 0 0 0 2px var(--success-text); }
.print-sheet { display: none; }
.print-sheet .keygrid { font-size: 18pt; }

.tag-demo { font-family: var(--font-mono); font-size: var(--text-xs); }

@media (max-width: 54rem) {
  .auth { grid-template-columns: 1fr; }
  .auth-brand { padding: var(--space-5) var(--space-4) var(--space-5); gap: var(--space-4); }
  .auth-brand .points, .auth-brand p { display: none; }
  .auth-brand h2 { font-size: var(--text-xl); max-width: none; }
  .auth-brand::before { width: 24rem; height: 24rem; right: -12rem; bottom: -14rem; }
  .auth-main { padding: var(--space-5) var(--space-4) var(--space-6); align-content: start; }
  .auth-top { position: static; justify-self: end; margin-bottom: var(--space-2); }
  .auth-card h1 { font-size: var(--text-2xl); }
  .keygrid { grid-template-columns: repeat(3, minmax(0, 1fr)); font-size: var(--text-base); }
}

@media print {
  .print-sheet { display: block; }
}
