/* ════════════════════════════════════════════════════════════════════
   collared.app/account
   The site's Stage shell (site.css: nav, page head, footer) around the
   account itself, drawn in the app's dark set, because these are the
   app's settings. Fonts are the site's own (Nunito, served from here), so
   nothing on this page loads from anyone but us.
   ════════════════════════════════════════════════════════════════════ */

/* Stage: the account always wears the app's dark set, like the rest of the site. */
.acct-page {
  --a-bg: transparent; --a-card: #1F1C27; --a-card-2: #1A1722; --a-ink: #F2F0F7; --a-sub: #A7A2B3;
  --a-violet: #9C7DFF; --a-violet-soft: #2E2745; --a-red: #FF8A97; --a-red-soft: #43242B; --a-green: #4CC380; --a-green-soft: #1F3A2B;
  --a-amber: #E9B949; --a-amber-soft: #3B3020;
  --a-border: rgba(255, 255, 255, 0.09); --a-shadow: 0 20px 50px -24px rgba(0, 0, 0, 0.6); --a-field: #17141F;
  --a-switch-off: #4A4458;
  --font-body: Nunito, system-ui, -apple-system, sans-serif;
  color-scheme: dark;
}
.acct-on-dark { display: none; }
.acct-defs { position: absolute; }
[hidden] { display: none !important; }

/* ── nav: who is signed in ── */
.acct-who { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.acct-disc {
  width: 30px; height: 30px; border-radius: 50%; background: var(--a-violet-soft); color: var(--a-violet);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; flex: none;
}
.acct-who-name { font-size: 14px; font-weight: 700; color: var(--sub); max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.acct-signout { font: 800 14px/1 Nunito, system-ui, sans-serif; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.08); color: var(--text); cursor: pointer; }
.acct-signout:hover { background: rgba(255, 255, 255, 0.12); }
@media (max-width: 1000px) { .acct-who-name { display: none; } }
@media (max-width: 760px) { .acct-page .nav .btn.p { display: none; } }

.acct-band { position: relative; overflow: hidden; background: radial-gradient(50% 80% at 85% 0%, rgba(116, 68, 255, 0.35), transparent 70%), var(--ink); }
.acct-band-geo { position: absolute; width: 520px; height: 520px; top: -140px; right: -120px; color: var(--violet); opacity: 0.6; pointer-events: none; }
.acct-band-in { position: relative; max-width: 680px; margin: 0 auto; padding: 80px 20px 36px; }
.acct-eyebrow { display: block; font: 800 13px/1 Nunito, sans-serif; letter-spacing: 0.14em; text-transform: uppercase; color: var(--tint); margin: 0 0 14px; }
.acct-title { font: 800 clamp(38px, 5.2vw, 60px)/1.02 Nunito, sans-serif; letter-spacing: -0.02em; margin: 0; color: var(--text); }
.acct-sub { margin: 14px 0 0; font-size: 18px; color: var(--sub); overflow-wrap: anywhere; }

/* ── the account ── */
.acct { background: var(--ink); color: var(--a-ink); padding: 8px 20px 96px; min-height: 52vh; }
.acct-col { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.acct-card { background: var(--a-card); border: 1px solid var(--a-border); border-radius: 24px; box-shadow: var(--a-shadow); padding: 20px; }
.acct-card h2 { font-family: var(--font-body); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--tint); font-weight: 800; margin: 0 0 12px; }
.acct-card h3 { font-family: var(--font-body); font-size: 20px; line-height: 1.3; margin: 0 0 6px; font-weight: 800; color: var(--a-ink); }
.acct-card p { margin: 0 0 12px; }
.acct-card p:last-child { margin-bottom: 0; }
.acct-ui .mu { color: var(--a-sub); }
.acct-ui .small { font-size: 14px; }
.acct-ui .center { text-align: center; }
.acct-ui a { color: var(--a-violet); font-weight: 600; }
.acct-row { display: flex; align-items: center; gap: 12px; }
.acct-row + .acct-row { border-top: 1px solid var(--a-border); padding-top: 14px; margin-top: 14px; }
.acct-grow { flex: 1; min-width: 0; }
.acct-ui .k { font-weight: 500; }
.acct-ui .v { color: var(--a-sub); font-size: 14.5px; overflow-wrap: anywhere; }
.acct-ui .v + .v, .acct-ui .v + .tag, .acct-ui .k + .tag { margin-top: 4px; }

.acct-ui .b {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  border: 0; border-radius: 999px; padding: 13px 18px; min-height: 50px;
  font-family: var(--font-body); font-weight: 600; font-size: 15.5px; cursor: pointer; text-decoration: none;
  transition: transform 0.12s ease, filter 0.12s ease;
}
.acct-ui .b:active { transform: scale(0.985); }
.acct-ui .b[disabled] { opacity: 0.55; cursor: default; transform: none; }
.acct-ui .b + .b, .acct-ui form + .b, .acct-ui .err + .b { margin-top: 10px; }
.acct-ui .b svg { width: 18px; height: 18px; flex: none; }
.acct-ui .b-violet { background: var(--a-violet); color: #fff; }
.acct-ui .b-soft { background: var(--a-violet-soft); color: var(--a-violet); }
.acct-ui .b-red { background: var(--a-red); color: #fff; }
.acct-ui .b-redsoft { background: var(--a-red-soft); color: var(--a-red); }
.acct-ui .b-apple { background: #fff; color: #000; }
.acct-ui .b-google { background: var(--a-card); color: var(--a-ink); border: 1px solid rgba(255, 255, 255, 0.2); }
.acct-ui .b-discord { background: #5865F2; color: #fff; }

.acct-ui .b:focus-visible, .acct-ui .field:focus-visible, .acct-ui .linkbtn:focus-visible, .acct-ui .sw:focus-visible { outline: 3px solid var(--a-violet); outline-offset: 2px; }
.acct-ui .linkbtn { background: none; border: 0; padding: 4px 2px; color: var(--a-violet); font-weight: 600; font-size: 15px; cursor: pointer; font-family: var(--font-body); }
.acct-ui .or { display: flex; align-items: center; gap: 12px; color: var(--a-sub); font-size: 13px; margin: 18px 0; }
.acct-ui .or::before, .acct-ui .or::after { content: ""; flex: 1; height: 1px; background: var(--a-border); }
.acct-ui label.f { display: block; font-size: 14px; font-weight: 500; margin: 0 0 6px; }
.acct-ui .field {
  width: 100%; border: 1px solid var(--a-border); background: var(--a-field); color: var(--a-ink);
  border-radius: 14px; padding: 13px 14px; font: inherit; font-size: 16px;
}
.acct-ui .field + label.f { margin-top: 12px; }
.acct-ui .field.code { font-size: 28px; letter-spacing: 0.5em; text-align: center; font-weight: 600; padding-left: calc(14px + 0.5em); font-variant-numeric: tabular-nums; }
.acct-ui .gap { margin-top: 12px; }
.acct-ui .err { color: var(--a-red); font-size: 14.5px; font-weight: 500; margin: 10px 0 0; }
.acct-ui .foot { margin: 4px 0 0; font-size: 14.5px; color: var(--a-sub); text-align: center; }
.acct-ui .toast { background: var(--a-green-soft); color: var(--a-green); border-radius: 14px; padding: 12px 14px; font-weight: 500; font-size: 14.5px; }
.acct-ui .note { background: var(--a-violet-soft); color: var(--a-ink); border-radius: 14px; padding: 12px 14px; font-size: 14.5px; }
.acct-ui .tag { display: inline-block; font-size: 12px; font-weight: 600; border-radius: 7px; padding: 2px 7px; background: var(--a-violet-soft); color: var(--a-violet); white-space: nowrap; }
.acct-ui .tag.g { background: var(--a-green-soft); color: var(--a-green); }
.acct-ui .tag.a { background: var(--a-amber-soft); color: var(--a-amber); }
.acct-ui .back { display: inline-flex; align-items: center; gap: 6px; color: var(--a-violet); font-weight: 600; font-size: 15px; background: none; border: 0; padding: 4px 0; cursor: pointer; align-self: flex-start; font-family: var(--font-body); }
.acct-ui .back svg { width: 18px; height: 18px; }
.acct-ui .ic { width: 38px; height: 38px; border-radius: 11px; background: var(--a-violet-soft); color: var(--a-violet); display: flex; align-items: center; justify-content: center; flex: none; }
.acct-ui .ic svg { width: 19px; height: 19px; }
.acct-ui .lamps { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.acct-ui .lamp { font-size: 12.5px; border-radius: 999px; padding: 4px 10px; background: var(--a-card-2); border: 1px solid var(--a-border); color: var(--a-sub); }
.acct-ui .lamp.lit { background: var(--a-violet-soft); color: var(--a-violet); border-color: transparent; font-weight: 600; }
.acct-ui ul.plain { list-style: none; margin: 0; padding: 0; }

/* the switch */
.acct-ui .sw { width: 52px; height: 32px; border-radius: 999px; background: var(--a-switch-off); position: relative; flex: none; border: 0; padding: 0; cursor: pointer; }
.acct-ui .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform 0.2s ease; }
.acct-ui .sw[aria-checked="true"] { background: var(--a-violet); }
.acct-ui .sw[aria-checked="true"]::after { transform: translateX(20px); }
.acct-ui .sw[disabled] { opacity: 0.6; cursor: default; }

/* the code to scan */
.acct-ui .qr-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; margin: 6px 0 4px; }
.acct-ui .qr { width: 228px; height: 228px; padding: 14px; border-radius: 18px; background: #fff; box-shadow: 0 0 0 1px var(--a-border); }
.acct-ui .qr svg { width: 100%; height: 100%; display: block; }
.acct-ui .qr.dim { opacity: 0.18; }
.acct-ui .qr-clock { font-variant-numeric: tabular-nums; font-size: 14.5px; color: var(--a-sub); }
.acct-ui ol.steps { margin: 0 0 4px; padding-left: 20px; color: var(--a-sub); font-size: 15px; }
.acct-ui ol.steps li + li { margin-top: 4px; }
.acct-ui ol.steps b { color: var(--a-ink); font-weight: 600; }

/* sheets: a confirm, or a fresh sign-in */
.acct-scrim { position: fixed; inset: 0; background: rgba(20, 16, 30, 0.45); display: flex; align-items: flex-end; justify-content: center; z-index: 80; }
.acct-sheet {
  background: var(--a-card); color: var(--a-ink); width: 100%; max-width: 480px;
  border-radius: 24px 24px 0 0; padding: 22px 20px calc(22px + env(safe-area-inset-bottom));
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2); max-height: 92vh; overflow: auto;
}
.acct-sheet h3 { font-family: var(--font-body); font-size: 21px; font-weight: 600; margin: 0 0 8px; }
.acct-sheet p { margin: 0 0 12px; }
.acct-sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--a-border); margin: -8px auto 14px; }
@media (min-width: 700px) {
  .acct-scrim { align-items: center; padding: 20px; }
  .acct-sheet { border-radius: 24px; }
  .acct-sheet .grab { display: none; }
}

@media (max-width: 520px) {
  .acct-band-in { padding: 36px 20px 32px; }
  .acct { padding: 20px 16px 56px; }
  .acct-card { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .acct-ui .sw::after, .acct-ui .b { transition: none; }
}

/* the brand never shrinks to make room for who is signed in */
.acct-page .nav .home { flex: none; }
