:root {
  color-scheme: light;
  --ink: #251b31;
  --muted: #63536f;
  --paper: #fff;
  --wash: #f7f3fa;
  --line: #ccbed6;
  --primary: #613a84;
  --accent: #f47b20;
  font: 1rem/1.5 system-ui, sans-serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f4eef5;
  --muted: #c6baca;
  --paper: #241d2c;
  --wash: #17141c;
  --line: #80708a;
  --primary: #c9a8ef;
  --accent: #ff9d51;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--wash); color: var(--ink); }
.account-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: .85rem max(1rem, calc((100% - 52rem) / 2));
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.account-header a { color: var(--primary); }
.account-brand { display: inline-flex; align-items: center; gap: .5rem; }
.account-brand img { object-fit: contain; height: auto; }
main { width: min(30rem, calc(100% - 2rem)); margin: 3.5rem auto; }
h1 { margin: 0; line-height: 1.15; font-size: clamp(2rem, 5vw, 3rem); }
h2 { margin: 0 0 1rem; font-size: 1.4rem; }
.account-status { color: var(--muted); margin: .75rem 0 1.75rem; }
.account-panels [hidden] { display: none; }
section { padding: clamp(1rem, 4vw, 1.75rem); background: var(--paper); border: 1px solid var(--line); border-radius: 1rem; }
fieldset { display: grid; gap: .9rem; border: 0; margin: 0; padding: 0; min-width: 0; }
label { display: grid; gap: .35rem; }
input, button {
  min-height: 2.75rem;
  max-width: 100%;
  padding: .5rem .7rem;
  border: 1px solid var(--line);
  border-radius: .55rem;
  font: inherit;
}
input { background: var(--wash); color: var(--ink); }
button { margin-top: .35rem; background: var(--wash); color: var(--muted); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; }
@media (max-width: 36rem) {
  main { margin-top: 2rem; }
  .account-panels { grid-template-columns: 1fr; }
}

.account-submit { background: var(--primary); color: var(--paper); border-color: var(--primary); font-weight: 700; }
.account-submit:disabled { opacity: .74; }
.account-switch { display: block; margin: .85rem auto 0; color: var(--primary); background: none; border-color: transparent; text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
.account-switch:hover { background: var(--wash); }
.account-panels { border-top: 3px solid var(--accent); border-radius: 1rem; }
:root:not([data-theme="dark"]) .account-brand img:last-child {
  filter: brightness(0) saturate(100%) invert(14%) sepia(42%) saturate(2400%) hue-rotate(243deg) brightness(88%) contrast(114%);
}
