/* Auth ceremony layout (S2 glass-makeover). Pairs with the production
   workspaces/liquid_style.css :root tokens — this file carries ONLY the
   full-viewport ceremony chrome + the canonical purple glow. No token
   duplication: every var() below resolves against liquid_style.css. */

body.ceremony {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  /* layered radial wash matching the approved mocks (D2 surface) */
  background:
    radial-gradient(1100px 600px at 15% -10%, rgba(108, 92, 231, .14), transparent 60%),
    radial-gradient(900px 500px at 110% 35%, rgba(72, 52, 212, .10), transparent 55%),
    linear-gradient(150deg, var(--liquid-bg-start), var(--liquid-bg-mid) 50%, var(--liquid-bg-end));
  background-attachment: fixed;
}

.ceremony .col { max-width: 480px; width: 100%; }

/* Canonical glow: the 3-layer liquid_style.css .lq-panel shadow + an ambient
   0 25px 50px -12px rgba(108,92,231,.18) layer (DECISIONS: "fioletowa poświata"). */
.ceremony .lq-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, .02),
    0 10px 20px -5px rgba(108, 92, 231, .05),
    0 25px 50px -12px rgba(108, 92, 231, .18),
    inset 0 1px 0 var(--glass-highlight);
  position: relative;
  overflow: hidden;
}
.ceremony .lq-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .9), transparent);
}
.ceremony .lq-panel > * { position: relative; z-index: 1; }

.ceremony .card {
  padding: 2.6rem 2.3rem;
  text-align: center;
  animation: ceremony-rise .55s ease both;
}
@keyframes ceremony-rise {
  from { opacity: 0; transform: translateY(16px) scale(.985); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ceremony .card { animation: none; }
}

/* hero icon tile */
.ceremony .shield {
  width: 84px;
  height: 84px;
  border-radius: 26px;
  margin: 0 auto 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  box-shadow: 0 12px 28px -8px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, .35);
  animation: ceremony-pop .6s .1s cubic-bezier(.34, 1.56, .64, 1) both;
}
@keyframes ceremony-pop {
  from { opacity: 0; transform: scale(.6); }
  to   { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .ceremony .shield { animation: none; }
}
.ceremony .shield.sm { width: 72px; height: 72px; border-radius: 22px; margin-bottom: 1.15rem; }
.ceremony .shield.steel {
  background: linear-gradient(135deg, #94a3b8, #64748b);
  box-shadow: 0 12px 28px -8px rgba(100, 116, 139, .4), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.ceremony .shield svg { width: 40px; height: 40px; stroke: #fff; }
.ceremony .shield.sm svg { width: 34px; height: 34px; }

.ceremony h1 { font: 700 1.55rem/1.25 var(--font-display); margin: .1rem 0 .45rem; letter-spacing: -.02em; }
.ceremony .shield.sm + h1 { font-size: 1.5rem; }
.ceremony p.lead { color: var(--text-muted); margin: 0 auto 1.5rem; font-size: .93rem; max-width: 40ch; }
.ceremony p.lead b { color: var(--text-main); }

/* "dlaczego" — left-aligned benefit list inside the centered card */
.ceremony .why {
  background: var(--glass-bg-solid);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.2rem;
  text-align: left;
  font-size: .84rem;
  margin-bottom: 1.6rem;
  box-shadow: 0 8px 20px -5px rgba(0, 0, 0, .05);
}
.ceremony .why .row { display: flex; gap: .7rem; align-items: flex-start; margin-bottom: .6rem; }
.ceremony .why .row:last-child { margin-bottom: 0; }
.ceremony .why .row svg { flex: 0 0 auto; width: 17px; height: 17px; stroke: var(--accent-dark); margin-top: .1rem; }
.ceremony .why .row b { display: block; font-size: .84rem; color: var(--text-main); }
.ceremony .why .row span { color: var(--text-muted); }

/* buttons (self-contained — kanon c-button shapes) */
.ceremony .lq-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  font: 600 .95rem var(--font-body);
  border-radius: var(--radius-pill);
  padding: .8rem 1.5rem;
  cursor: pointer;
  transition: var(--lq-btn-transition);
  border: 1px solid transparent;
  width: 100%;
  text-decoration: none;
}
.ceremony .lq-btn svg { width: 17px; height: 17px; }
.ceremony .lq-btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  box-shadow: 0 8px 20px -8px var(--accent-glow);
}
.ceremony .lq-btn-primary:not(:disabled):hover { transform: translateY(-1px); box-shadow: 0 12px 26px -8px var(--accent-glow); }
.ceremony .lq-btn-primary svg { stroke: #fff; }
.ceremony .lq-btn-primary:disabled { opacity: .45; cursor: not-allowed; filter: saturate(.4); }
.ceremony .lq-btn.disabled { opacity: .45; pointer-events: none; filter: saturate(.4); }
.ceremony .lq-btn-glass {
  background: transparent;
  border-color: var(--glass-border);
  color: var(--text-muted);
  margin-top: .6rem;
}
.ceremony .lq-btn-glass:hover { background: var(--glass-bg-solid); transform: translateY(-1px); }
.ceremony .lq-btn-glass svg { stroke: var(--text-muted); }

/* footnote (FIDO / admin note) */
.ceremony .fido {
  margin-top: 1.5rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--glass-border);
  display: flex;
  gap: .7rem;
  align-items: flex-start;
  color: var(--text-light);
  font-size: .78rem;
  text-align: left;
}
.ceremony .fido svg { flex: 0 0 auto; width: 16px; height: 16px; stroke: var(--text-light); margin-top: .1rem; }
.ceremony .fido b { color: var(--text-muted); }

/* recovery-code box + scratch overlay */
.ceremony .code-box {
  background: var(--glass-bg-solid);
  border: 1px solid var(--lq-field-border);
  border-radius: var(--radius-md);
  padding: 1.1rem 1rem .9rem;
  margin-bottom: .65rem;
  box-shadow: 0 8px 20px -5px rgba(0, 0, 0, .05);
}
.ceremony .code-wrap { position: relative; display: inline-block; border-radius: 10px; }
.ceremony .code {
  font: 700 1.7rem/1.1 ui-monospace, 'JetBrains Mono', Menlo, Consolas, monospace;
  letter-spacing: .12em;
  color: var(--accent-dark);
  user-select: all;
  padding: .35rem .6rem;
}
.ceremony .scratch {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  cursor: grab;
  transition: opacity .5s ease;
  touch-action: none;
}
.ceremony .scratch.done { opacity: 0; pointer-events: none; }
.ceremony .code-note { font-size: .74rem; color: var(--text-light); margin-top: .45rem; }

/* recovery-code action row (Copy / Print) */
.ceremony .actions { display: flex; gap: .6rem; margin: 0 0 1.4rem; }
.ceremony .actions .lq-btn { flex: 1; width: auto; font-size: .9rem; padding: .65rem 1.1rem; gap: .5rem; }
.ceremony .actions .lq-btn svg { width: 16px; height: 16px; }
.ceremony .lq-btn-soft {
  background: var(--glass-bg-solid);
  border-color: var(--glass-border);
  color: var(--text-main);
}
.ceremony .lq-btn-soft:hover { transform: translateY(-1px); }
.ceremony .lq-btn-soft svg { stroke: var(--text-muted); }

/* amber warn-box (no screenshot) */
.ceremony .warn-box {
  display: flex;
  gap: .65rem;
  align-items: flex-start;
  text-align: left;
  background: rgba(245, 158, 11, .14);
  border: 1px solid rgba(245, 158, 11, .45);
  border-radius: var(--radius-md);
  padding: .85rem 1rem;
  margin: 0 0 1.4rem;
  font-size: .84rem;
  color: #7c4a03;
}
.ceremony .warn-box svg { flex: 0 0 auto; width: 18px; height: 18px; stroke: #b45309; margin-top: .05rem; }
.ceremony .warn-box b { color: #92400e; }

/* checkbox-gate (kanon C2) */
.ceremony .gate {
  display: flex;
  gap: .65rem;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  margin: 0 0 .9rem;
  cursor: pointer;
  user-select: none;
  font-size: .85rem;
  color: var(--text-main);
}
.ceremony .gate input { position: absolute; opacity: 0; pointer-events: none; }
.ceremony .tick {
  flex: 0 0 auto;
  width: 21px;
  height: 21px;
  border-radius: 6px;
  background: var(--glass-bg-solid);
  border: 1px solid var(--lq-field-border);
  display: grid;
  place-items: center;
  transition: all .18s ease;
  box-shadow: inset 0 1px 0 var(--glass-highlight);
}
.ceremony .tick svg { width: 13px; height: 13px; stroke: #fff; stroke-width: 3; opacity: 0; transform: scale(.5); transition: all .18s ease; }
.ceremony .gate input:checked + .tick {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border-color: transparent;
  box-shadow: 0 4px 12px -4px var(--accent-glow);
}
.ceremony .gate input:checked + .tick svg { opacity: 1; transform: scale(1); }

/* recovery_use code field (kanon W) */
.ceremony .field { text-align: left; margin: 0 0 1rem; }
.ceremony .field label { display: block; font: 600 .8rem var(--font-body); color: var(--text-muted); margin: 0 0 .35rem; }
.ceremony .field input {
  width: 100%;
  padding: .75rem .95rem;
  border-radius: 12px;
  border: 1px solid var(--lq-field-border);
  background: var(--lq-field-bg);
  font: 400 .95rem var(--font-body);
  color: var(--text-main);
}
.ceremony .field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(108, 92, 231, .14); }

.ceremony .err {
  background: rgba(239, 68, 68, .1);
  border: 1px solid rgba(239, 68, 68, .2);
  border-radius: var(--radius-md);
  padding: .75rem 1rem;
  color: #991b1b;
  font-size: .82rem;
  margin: 0 0 1rem;
  text-align: left;
}
.ceremony #err { color: #9b1c1c; font-size: .82rem; margin-top: 1rem; min-height: 1.2em; }
