:root {
  color-scheme: light dark;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --background: #eaf0f0;
  --card: #fcfdfd;
  --text: #142725;
  --muted: #4d6661;
  --line: #c9d9d5;
  --accent: #006458;
  --accent-text: #fff;
  --error: #a22a1a;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #101917;
    --card: #1a2623;
    --text: #eaf4f0;
    --muted: #b2c3be;
    --line: #48625b;
    --accent: #8addca;
    --accent-text: #102a23;
    --error: #ffb7a7;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  min-height: 100svh;
  margin: 0;
  padding: 24px;
  display: grid;
  place-items: center;
  background: var(--background);
  color: var(--text);
}

main {
  width: min(100%, 440px);
  padding: clamp(22px, 5vw, 38px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 18px 50px #122b2415;
}

header { display: flex; align-items: center; gap: 12px; }
.mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 21px;
  font-weight: 750;
}
.brand { font-size: 15px; font-weight: 680; }
h1 { margin: 30px 0 8px; font-size: 32px; letter-spacing: -.025em; }
button, input, .primary-link { width: 100%; min-height: 46px; border-radius: 8px; font: inherit; }
button, .primary-link {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-text);
  cursor: pointer;
  font-weight: 620;
}
button:disabled { opacity: .65; cursor: wait; }
.secondary { color: var(--text); background: transparent; border-color: var(--line); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

form, #signed-in { display: grid; gap: 9px; margin-top: 22px; }
label { color: var(--muted); font-size: 14px; }
input { padding: 0 12px; border: 1px solid var(--line); background: var(--card); color: var(--text); }
input + label { margin-top: 6px; }
.captcha-image { display: flex; align-items: center; gap: 9px; min-height: 62px; }
.captcha-image img { min-width: 0; max-width: 70%; height: auto; border: 1px solid var(--line); border-radius: 8px; }
.captcha-image button { width: auto; padding: 0 11px; white-space: nowrap; }
#login { margin-top: 8px; }
.primary-link { display: grid; place-items: center; text-decoration: none; }
#status { color: var(--muted); font-size: 14px; margin: 16px 0 0; }
#status:empty { display: none; }
#status[data-error="true"] { color: var(--error); }
