*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: #0a0807;
  color: #e8e4dd;
  font-family: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-feature-settings: "ss02", "ss03";
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  -webkit-font-smoothing: antialiased;
}
.card {
  width: 100%;
  max-width: 400px;
  background: #0e0c0a;
  border: 1px solid rgba(232, 228, 221, 0.08);
  border-radius: 10px;
  padding: 40px 36px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
.card.card--bare,
.card:has(#provisioning-view:not([hidden])) {
  text-align: center;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}
.glyph-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 128px;
  height: 128px;
  padding: 0;
  background: #0e0c0a;
  border: 1px solid rgba(232, 228, 221, 0.08);
  border-radius: 14px;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.glyph-btn img {
  width: 76px;
  height: 76px;
  opacity: 0.9;
  transition: opacity 0.18s ease;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}
.glyph-btn:hover:not(:disabled) {
  border-color: #e8e4dd;
  background: rgba(232, 228, 221, 0.06);
}
.glyph-btn:hover:not(:disabled) img { opacity: 1; }
.glyph-btn:focus-visible {
  outline: none;
  border-color: #e8e4dd;
  box-shadow: 0 0 0 3px rgba(232, 228, 221, 0.22);
}
.glyph-btn:active:not(:disabled) {
  transform: translateY(1px);
}
.glyph-btn:disabled { opacity: 0.5; cursor: default; }

/* v2 wait interstitial (DSQ-160) — used during VM resume (login),
   first-sign-up provisioning (enroll), and suspend-resume (_wake). No button
   frame, no card chrome: a centered monolith mark + caption, a continuation
   of the lander rather than a separate state card. The mark IS the state —
   /js/interstitial.js drives the lander's breathing + severance-pulse motion
   on the two squares, tuned for an indefinite wait. No spinner, no progress
   bar. */
.wait-stage {
  position: relative;
  text-align: center;
}
.wait-mark {
  display: block;
  width: 96px;
  height: 96px;
  margin: 0 auto;
}
/* will-change hints the compositor to GPU-composite the per-square <g>
   transforms; without it Firefox does a full SVG layout invalidation/frame. */
.wait-mark .sq-big,
.wait-mark .sq-small {
  will-change: transform;
}
/* Anchored absolutely below the mark — same discipline as the v1 glyph: the
   mark holds a fixed Y so a caption line-count change (the timeout copy swap)
   never nudges it. Lander thesis-paragraph register: dim warm-bone, smaller,
   more line-height than the v1 centered-card subtitle. */
.wait-hint {
  position: absolute;
  top: calc(100% + 30px);
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  max-width: 90vw;
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.7;
  letter-spacing: 0.01em;
  color: #9b968d;
}
@media (prefers-reduced-motion: reduce) {
  /* Leave both squares in their canonical full-opacity positions — a
     deliberate static mark, not a frozen animation. interstitial.js also
     bails on reduced-motion, so nothing ever transforms them. */
  .wait-mark .sq-big,
  .wait-mark .sq-small { transform: none !important; }
}
@media (max-width: 600px) {
  .wait-mark { width: 80px; height: 80px; }
}

/* Anchor pattern: the signin glyph stays at a consistent Y by keeping it the
   only thing in normal flow inside its wrapper; the error text is positioned
   absolutely below it, so showing/hiding it doesn't shift the glyph. (The
   wait surfaces use the same discipline via .wait-stage / .wait-hint above.) */
#signin-view:not([hidden]) {
  position: relative;
  text-align: center;
}
#passkey-error {
  position: absolute;
  top: calc(100% + 22px);
  left: 50%;
  transform: translateX(-50%);
  width: 280px;
  max-width: 90vw;
  text-align: center;
  margin: 0;
}
.title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #e8e4dd;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.subtitle {
  font-size: 0.82rem;
  color: #837f78;
  margin-bottom: 32px;
}
label {
  display: block;
  font-size: 0.72rem;
  color: #837f78;
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}
input {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(232, 228, 221, 0.08);
  border-radius: 4px;
  color: #e8e4dd;
  font-family: inherit;
  font-size: 0.88rem;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.15s;
  margin-bottom: 18px;
}
input:focus { border-color: rgba(232, 228, 221, 0.25); }
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px rgba(0, 0, 0, 0.35) inset !important;
  -webkit-text-fill-color: #e8e4dd !important;
  caret-color: #e8e4dd;
  transition: background-color 5000s ease-in-out 0s;
}
input:autofill {
  background-color: rgba(0, 0, 0, 0.35) !important;
  color: #e8e4dd !important;
  box-shadow: 0 0 0 1000px rgba(0, 0, 0, 0.35) inset !important;
}
.btn {
  width: 100%;
  padding: 11px;
  border-radius: 4px;
  border: 1px solid rgba(232, 228, 221, 0.45);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.btn:disabled { opacity: 0.4; cursor: default; }
.btn-primary {
  background: rgba(232, 228, 221, 0.1);
  color: #e8e4dd;
}
.btn-primary:hover:not(:disabled) {
  background: rgba(232, 228, 221, 0.16);
  border-color: rgba(232, 228, 221, 0.65);
}
.error {
  font-size: 0.82rem;
  color: #e8e4dd;
  margin-bottom: 14px;
}
.footer {
  margin-top: 24px;
  font-size: 0.78rem;
  color: #837f78;
  text-align: center;
}
.footer a {
  color: #b0aba2;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(232, 228, 221, 0.25);
}
.footer a:hover {
  color: #e8e4dd;
  text-decoration-color: #e8e4dd;
}
.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0;
}
.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(232, 228, 221, 0.07);
}
.divider span {
  font-size: 0.68rem;
  color: #5d5953;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.btn-passkey {
  background: transparent;
  color: #837f78;
  border-color: rgba(232, 228, 221, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-passkey:hover:not(:disabled) {
  background: rgba(232, 228, 221, 0.04);
  border-color: #e8e4dd;
  color: #b0aba2;
}
.btn-passkey:focus-visible {
  outline: none;
  border-color: #e8e4dd;
}
.btn-passkey svg {
  flex-shrink: 0;
  color: #e8e4dd;
}
#passkey-error {
  margin-top: 8px;
}
