:root {
  color-scheme: light dark;
  --page: light-dark(oklch(98% .006 246), oklch(20.3% .023 254));
  --surface: light-dark(white, oklch(25% .025 254));
  --ink: light-dark(oklch(25% .037 255), oklch(96.5% .01 246));
  --muted: light-dark(oklch(43.5% .033 251), oklch(77% .027 246));
  --control: light-dark(oklch(55% .031 251), oklch(66% .034 245));
  --line: light-dark(oklch(29% .037 251 / .14), oklch(87% .027 246 / .17));
  --focus: light-dark(oklch(43% .102 223), oklch(82% .132 211));
  --action: oklch(79% .138 211);
  --action-ink: oklch(20.5% .043 249);
  --error: light-dark(oklch(43% .16 23), oklch(83% .11 24));
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; display: flex; flex-direction: column; background: var(--page); color: var(--ink); }
.brand {
  padding: max(12px,env(safe-area-inset-top)) max(24px,env(safe-area-inset-right)) 12px max(24px,env(safe-area-inset-left));
  background: oklch(18.5% .038 258);
}
.brand img { display: block; width: min(174px, 100%); height: auto; filter: brightness(0) invert(.97); }
main {
  flex: 1; display: grid; place-items: center;
  padding: 32px max(16px,env(safe-area-inset-right)) max(32px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));
}
section {
  width: min(100%, 25rem); padding: clamp(20px, 4vw, 32px);
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
}
h1 { font-size: clamp(1.45rem, 3vw, 1.7rem); line-height: 1.2; margin: 0 0 24px; font-weight: 650; }
form { display: grid; }
label { margin-bottom: 6px; font-size: .925rem; font-weight: 600; }
input, button { font: inherit; }
input:not([type="checkbox"]) {
  width: 100%; min-height: 48px; padding: 9px 12px;
  border-radius: 5px; border: 1px solid var(--control); color: var(--ink); background: var(--surface);
}
#username { margin-bottom: 16px; }
.visibility {
  display: flex; align-items: center; gap: 8px; justify-self: start;
  min-height: 48px; margin: 2px 0 8px; font-weight: 400; color: var(--muted); cursor: pointer;
}
.visibility input {
  width: 18px; height: 18px; margin: 0; accent-color: var(--focus);
  outline: 1px solid var(--control); outline-offset: -1px; border-radius: 3px;
}
button {
  min-height: 48px; padding: 8px 16px; border-radius: 5px; border: 1px solid var(--focus);
  background: var(--action); color: var(--action-ink); font-weight: 650; cursor: pointer;
  transition: transform 150ms ease-out;
}
button:hover { background: color-mix(in oklch, var(--action), white 12%); }
button:active:not(:disabled) { transform: scale(.97); }
button:disabled { background: var(--surface); color: var(--muted); border-color: var(--control); cursor: default; }
:focus-visible, .visibility input:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
#feedback, noscript { font-size: .925rem; line-height: 1.5; margin: 16px 0 0; color: var(--error); }
#feedback:empty { margin: 0; }
#sign-in-notice { margin: -8px 0 20px; font-size: .925rem; line-height: 1.5; color: var(--ink); }
@media (prefers-reduced-motion: reduce) {
  button { transition: none; }
  button:active:not(:disabled) { transform: none; }
}
