:root {
  color-scheme: light;
  --background: #f5f6f8;
  --surface: #ffffff;
  --text: #1f2733;
  --muted: #66707a;
  --line: #dfe3e9;
  --line-strong: #cdd5de;
  --accent: #2f5f8f;
  --accent-strong: #2a5580;
  --accent-soft: #eaf1f8;
  --danger: #993e32;
  --serif: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "Times New Roman", serif;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--background);
}
p, h1, h2, ul, li, dl, dd { margin: 0; }
a, button, input { -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; }
a { color: var(--accent); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.skip-link { position: absolute; top: -80px; left: 20px; padding: 8px 14px; background: var(--surface); z-index: 4; }
.skip-link:focus { top: 12px; }

/* Soft photographic backdrop; the card stays the focus of the page. */
.login-backdrop {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  filter: saturate(.92);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgb(252 252 251 / 62%), rgb(245 246 248 / 78%));
}

.auth-layout {
  position: relative;
  z-index: 2;
  width: min(940px, 94%);
  flex: 1;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  /* Both cards share the row height and stay top aligned, as in the approved
     design; the pair itself stays centred in the viewport. */
  align-items: stretch;
  align-content: center;
  gap: clamp(20px, 3vw, 34px);
  padding: 40px 0;
}
.auth-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(24px, 3.4vw, 36px);
  box-shadow: 0 18px 50px rgb(31 39 51 / 10%);
}
/* The note at the bottom of each card is anchored to the card foot, so both
   cards keep a baseline even when their content lengths differ. */
.auth-card .card-help { margin-top: auto; }

/* The team card mirrors the member-management panel language. */
.team-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(22px, 3vw, 32px);
  box-shadow: 0 18px 50px rgb(31 39 51 / 10%);
}
.team-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.team-card h2 { font-family: var(--serif); font-size: 25px; font-weight: 600; text-align: left; letter-spacing: .01em; }
.team-card-subtitle { margin-top: 4px; color: var(--muted); font-size: 12.5px; }
.team-card-section { margin: 18px 0 12px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.team-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.team-steps li { display: flex; align-items: flex-start; gap: 12px; }
.team-step-index {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #eef1f5;
  border: 1px solid #dde3ea;
  color: #4a5a6b;
  font-size: 12.5px;
  font-weight: 600;
}
.team-steps div { display: flex; flex-direction: column; gap: 2px; }
.team-steps strong { font-size: 13px; font-weight: 600; }
.team-steps div span { font-size: 12px; color: var(--muted); }
.team-rules { list-style: none; padding: 0; margin: 0; display: grid; gap: 11px; }
.team-rules li { position: relative; padding-left: 16px; color: var(--muted); font-size: 12.5px; line-height: 1.7; }
.team-rules li::before { content: ''; position: absolute; left: 0; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.team-card-foot { margin-top: 0; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11.5px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0 auto 10px;
  border-radius: 14px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid #d7e1ec;
}
.brand-mark svg { width: 24px; height: 24px; }
h1 {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: .01em;
  text-align: center;
  color: var(--text);
}
.card-description {
  margin-top: 8px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
form { display: flex; flex-direction: column; margin-top: 22px; }
label { font-size: 13px; font-weight: 550; color: var(--text); margin: 11px 0 7px; }
label:first-child { margin-top: 0; }
.optional { color: var(--muted); font-weight: 400; font-size: 11px; }
.field-shell {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #838e9b;
  border-radius: 9px;
  background: #fdfdfe;
  transition: border-color 120ms ease, background 120ms ease;
}
.field-shell:focus-within { border-color: var(--accent); background: #fff; }
.field-icon { width: 18px; height: 18px; flex: 0 0 auto; color: #8a97a5; }
.field-shell input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  padding: 11px 0;
}
.field-shell input:focus { outline: none; }
.field-shell input::placeholder { color: #a3adb8; }
.field-toggle {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #8a97a5;
  cursor: pointer;
}
.field-toggle:hover { color: var(--accent); background: var(--accent-soft); }
.field-toggle svg { width: 18px; height: 18px; }
.field-toggle .toggle-off { display: none; }
.field-toggle[aria-pressed='true'] .toggle-on { display: none; }
.field-toggle[aria-pressed='true'] .toggle-off { display: block; }
.field-help { font-size: 11.5px; color: var(--muted); margin-top: 7px; }
.primary-button {
  border: 1px solid var(--accent);
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  min-height: 44px;
  font-size: 14.5px;
  font-weight: 550;
  letter-spacing: .04em;
  margin-top: 18px;
  cursor: pointer;
  transition: background 120ms ease;
}
.primary-button:hover { background: var(--accent-strong); }
button:disabled { opacity: .62; cursor: wait; }
.text-button {
  background: transparent;
  border: 0;
  color: var(--accent);
  min-height: 42px;
  margin-top: 4px;
  font-size: 13px;
  cursor: pointer;
}
.boundary-list {
  list-style: none;
  padding: 16px 0 0;
  margin-top: 18px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 14px;
}
.boundary-list li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
}
.boundary-list svg { width: 17px; height: 17px; flex: 0 0 auto; margin-top: 2px; color: var(--accent); }
.auth-message {
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid #cfd7de;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  margin-top: 16px;
  overflow-wrap: anywhere;
}
.auth-message.is-error { color: var(--danger); background: #fff5f0; border-color: #ecd6cf; }
.card-help {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.85;
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 14px;
}
.site-footer {
  position: relative;
  z-index: 2;
  width: 92%;
  margin: 0 auto;
  padding: 0 0 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-size: 10.5px;
  color: var(--muted);
}
@media (max-width: 860px) {
  .auth-layout { width: min(430px, 92%); grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 22px 0 30px; }
  h1 { font-size: 26px; }
  .auth-card { padding: 24px 20px; border-radius: 14px; }
  .team-card { padding: 20px 18px; border-radius: 14px; }
  .team-card h2 { font-size: 20px; }
  .site-footer { font-size: 10px; }
}
@media (prefers-reduced-motion: no-preference) {
  .field-shell, .primary-button { transition: border-color 120ms ease, background 120ms ease; }
}
