/* Account page, calm version. One narrow column, one idea per tile, and only the
   tiles that apply to this account. The page answers "am I signed in and what can
   I do here" at a glance; everything else lives on the pages it belongs to. */
body.account-page .acct2 {
  --a2-ink: #f4f1f9;
  --a2-soft: #b9b0cc;
  --a2-faint: #8a809f;
  --a2-line: rgba(196, 181, 253, .14);
  --a2-tile: rgba(20, 14, 34, .78);
  --a2-violet: #a855f7;
  --a2-violet-2: #c4b5fd;
  position: relative;
  z-index: 1;
  padding: clamp(56px, 10vh, 112px) 16px 72px;
  color: var(--a2-ink);
}
.acct2-wrap { max-width: 640px; margin: 0 auto; }

.acct2 h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(34px, 5vw, 46px);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.05;
  color: var(--a2-ink);
}
.acct2 h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -.01em;
  color: var(--a2-ink);
}
.acct2 p { margin: 0; }

/* ---- signed out */
.acct2-out { text-align: left; }
.acct2-lede { margin-top: 12px !important; font-size: 17px; line-height: 1.5; color: var(--a2-soft); max-width: 34em; }
.acct2-doors { display: grid; gap: 10px; margin-top: 32px; }
body.account-page .acct2-door {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--a2-line);
  border-radius: 14px;
  background: var(--a2-tile) !important;
  color: var(--a2-ink);
  text-decoration: none;
  transition: border-color .15s, transform .15s, background-color .15s;
}
body.account-page .acct2-door:hover,
body.account-page .acct2-door:focus-visible {
  border-color: rgba(168, 85, 247, .7);
  background: rgba(36, 22, 60, .9) !important;
  transform: translateY(-1px);
}
.acct2-door:focus-visible { outline: 2px solid var(--a2-violet); outline-offset: 3px; }
.acct2-door-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 10px;
  background: #fff;
}
.acct2-door-mark svg { width: 22px; height: 22px; }
.acct2-door-copy { display: grid; gap: 2px; }
.acct2-door-copy b { font-size: 16px; font-weight: 600; color: var(--a2-ink) !important; }
.acct2-door-copy em { font-style: normal; font-size: 13px; color: var(--a2-faint); }
.acct2-door-copy em:empty { display: none; }
.acct2-door.is-off { opacity: .55; }
.acct2-fine { margin-top: 16px !important; font-size: 13px; color: var(--a2-faint); }

/* ---- signed in: identity */
.acct2-who {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--a2-line);
}
.acct2-avatar {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: radial-gradient(circle at 30% 25%, #c084fc, #7c3aed 60%, #4c1d95);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .12) inset, 0 10px 30px -10px rgba(168, 85, 247, .8);
  font-size: 28px;
  font-weight: 700;
  color: #fff;
}
.acct2-mail { margin-top: 4px !important; font-size: 14px; color: var(--a2-soft); overflow-wrap: anywhere; }
/* The name a provider gives is often not the one you use, so it can be corrected here. */
.acct2-name-btn { margin-top: 6px; padding: 0; border: 0; background: none; color: var(--a2-violet); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.acct2-name-btn:hover { color: var(--a2-ink); }
.acct2-name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.acct2-name label { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--a2-faint); }
.acct2-name input { min-width: 0; flex: 1 1 180px; max-width: 260px; padding: 8px 10px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.05); color: var(--a2-ink); font: inherit; }
.acct2-name input:focus-visible { outline: 2px solid var(--a2-violet); outline-offset: 1px; border-color: var(--a2-violet); }
.acct2-name .btn { padding: 8px 14px; font-size: 14px; }
body.account-page .acct2-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
body.account-page .acct2-chips .chip {
  padding: 3px 8px;
  border-radius: 999px;
  font-family: var(--display);
  font-size: 11.5px;
  letter-spacing: 0;
  text-transform: none;
  border: 1px solid var(--a2-line) !important;
  background: rgba(255, 255, 255, .04) !important;
  color: var(--a2-soft) !important;
}
body.account-page .acct2-chips .chip--owner { color: var(--a2-violet-2) !important; border-color: rgba(168, 85, 247, .45) !important; }
body.account-page .acct2-chips .chip.chip--link-twitch { background: #9146ff !important; color: #fff !important; border-color: #9146ff !important; }

/* ---- tiles */
.acct2-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}
.acct2-tile {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 150px;
  padding: 20px;
  border: 1px solid var(--a2-line);
  border-radius: 16px;
  background: var(--a2-tile);
}
.acct2-tile[hidden] { display: none; }
.acct2-tile--wide { grid-column: 1 / -1; min-height: 0; }
.acct2-tile--hub {
  border-color: rgba(168, 85, 247, .38);
  background: linear-gradient(160deg, rgba(88, 28, 135, .42), rgba(20, 14, 34, .82) 70%);
}
.acct2-tile p { font-size: 14px; line-height: 1.45; color: var(--a2-soft); }
.acct2-tile p:empty { display: none; }
.acct2-meta { font-size: 13px !important; color: var(--a2-faint) !important; }
.acct2-act { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 8px; }
.acct2-act:empty { display: none; }
body.account-page .acct2 .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid var(--a2-line) !important;
  background: rgba(255, 255, 255, .05) !important;
  color: var(--a2-ink) !important;
  text-decoration: none;
}
body.account-page .acct2 .btn:hover { border-color: rgba(168, 85, 247, .6) !important; background: rgba(168, 85, 247, .14) !important; }
body.account-page .acct2 .btn.primary { background: #7c3aed !important; border-color: #8b5cf6 !important; color: #fff !important; }
body.account-page .acct2 .btn.primary:hover { background: #8b5cf6 !important; }
body.account-page .acct2 .btn[hidden] { display: none; }
body.account-page .acct2 .btn .icon { width: 13px; height: 13px; }
/* "build not uploaded" chips repeat the status line above them */
body.account-page .acct2-act .chip { display: none; }

.acct2-key {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, .35);
  border: 1px solid var(--a2-line);
  font-size: 12.5px;
  color: var(--a2-violet-2);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.acct2-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.acct2-form[hidden] { display: none; }
.acct2-form label { display: grid; gap: 4px; flex: 1 1 220px; font-size: 12px; color: var(--a2-faint); }
.acct2-form input {
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--a2-line);
  background: rgba(0, 0, 0, .3);
  color: var(--a2-ink);
  font: inherit;
  font-size: 14px;
}
.acct2-form input:focus-visible { outline: 2px solid var(--a2-violet); outline-offset: 1px; }
/* the StreamKit tile: key, form, then the two buttons and one calm line of help */
.acct2-tile[data-tile="streamkit"] .acct2-act { margin-top: 4px; }
.acct2-tile[data-tile="streamkit"] .acct2-meta { margin: 0; }

/* the transfer list stays, but small */
body.account-page .acct2 .acct-links { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
body.account-page .acct2 .acct-links[hidden] { display: none; }

/* ---- mail switch */
.acct2-switch {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  font-size: 14px;
  color: var(--a2-soft);
  cursor: pointer;
}
.acct2-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.acct2-switch-track {
  position: relative;
  width: 40px;
  height: 22px;
  flex: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  transition: background .15s;
}
.acct2-switch-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform .15s;
}
.acct2-switch input:checked + .acct2-switch-track { background: #7c3aed; }
.acct2-switch input:checked + .acct2-switch-track::after { transform: translateX(18px); }
.acct2-switch input:focus-visible + .acct2-switch-track { outline: 2px solid var(--a2-violet); outline-offset: 2px; }
.acct2 .form-status { margin-top: 10px; font-size: 13px; color: var(--a2-soft); min-height: 1em; }

/* ---- who runs this */
.acct2-about {
  margin-top: 56px !important;
  padding-top: 20px;
  border-top: 1px solid var(--a2-line);
  font-size: 14px;
  line-height: 1.55;
  color: var(--a2-faint);
}
.acct2-about a { color: var(--a2-violet-2); }

@media (max-width: 560px) {
  .acct2-grid { grid-template-columns: minmax(0, 1fr); }
  .acct2-tile { min-height: 0; }
  .acct2-who { grid-template-columns: auto minmax(0, 1fr); }
  .acct2-out-btn { grid-column: 1 / -1; justify-self: start; }
  .acct2-avatar { width: 52px; height: 52px; border-radius: 15px; font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .acct2-door, .acct2-switch-track, .acct2-switch-track::after { transition: none; }
}
