:root {
  --paper: #edf1ec;
  --surface: #f8faf7;
  --surface-2: #e4eae3;
  --ink: #18201b;
  --muted: #5d6860;
  --line: #cbd4cc;
  --dark: #10271f;
  --lime: #c8ff5a;
  --danger: #9a422f;
  --shadow: 0 28px 70px rgba(21, 35, 27, .16);
}
* { box-sizing: border-box; }
html { color-scheme: light; background: var(--paper); }
html[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0c110e;
  --surface: #151d18;
  --surface-2: #1b261f;
  --ink: #e0f1e5;
  --muted: #9eada2;
  --line: #2c3b31;
  --dark: #10271f;
  --danger: #ffb09c;
  --shadow: 0 30px 80px rgba(0, 0, 0, .34);
}
body {
  min-height: 100dvh;
  margin: 0;
  padding: clamp(14px, 3vw, 34px);
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.auth-shell {
  min-height: calc(100dvh - clamp(28px, 6vw, 68px));
  max-width: 1240px;
  margin: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr);
  overflow: hidden;
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.auth-story {
  min-height: 680px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(26px, 5vw, 62px);
  color: white;
  background:
    radial-gradient(circle at 70% 25%, rgba(200,255,90,.16), transparent 31%),
    linear-gradient(145deg, #173a2f 0%, #10271f 48%, #091710 100%);
}
.auth-brand { display: flex; align-items: center; gap: 12px; }
.auth-mark { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: var(--lime); color: #142119; font-weight: 900; letter-spacing: -.06em; }
.auth-brand strong, .auth-brand small { display: block; }
.auth-brand strong { font-size: 15px; }
.auth-brand small { margin-top: 2px; color: #aabcb1; font-size: 11px; }
.auth-copy { max-width: 660px; padding-block: 90px; }
.auth-state { display: flex; align-items: center; gap: 9px; margin: 0 0 22px; color: #c8d7ce; font-size: 12px; font-weight: 800; }
.auth-state span { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 5px rgba(200,255,90,.12); }
h1 { max-width: 700px; margin: 0; font: 650 clamp(50px, 8vw, 98px)/.9 Georgia, "Times New Roman", serif; letter-spacing: -.038em; }
.auth-copy > p:last-child { max-width: 56ch; margin: 28px 0 0; color: #c7d4cc; font-size: clamp(16px, 2vw, 20px); line-height: 1.55; }
.auth-story footer { display: grid; gap: 5px; max-width: 65ch; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.14); }
.auth-story footer strong { font-size: 12px; }
.auth-story footer span { color: #9fb0a5; font-size: 12px; line-height: 1.5; }
.auth-action { align-self: center; padding: clamp(28px, 6vw, 64px); }
.auth-action-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 42px; }
.auth-action-head strong { font: 650 30px/1 Georgia, "Times New Roman", serif; }
.auth-action-head span { order: 2; color: var(--muted); font-size: 11px; font-weight: 800; }
.auth-form { display: grid; gap: 12px; }
.auth-form label { margin-top: 6px; font-size: 12px; font-weight: 800; }
.auth-form input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 12px 14px;
  background: var(--surface-2);
  color: var(--ink);
  outline: none;
}
.auth-form input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lime) 40%, transparent); }
.primary-action, .secondary-action {
  min-height: 50px;
  border-radius: 13px;
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 850;
}
.primary-action { margin-top: 8px; border: 1px solid var(--lime); background: var(--lime); color: #162019; }
.primary-action:hover { background: #d7ff85; }
.secondary-action { border: 1px solid var(--line); background: transparent; color: var(--ink); }
.secondary-action:hover { border-color: var(--ink); background: var(--surface-2); }
button:focus-visible { outline: 3px solid color-mix(in srgb, var(--lime) 70%, transparent); outline-offset: 3px; }
button[disabled] { cursor: wait; opacity: .65; }
.form-note { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.auth-message { min-height: 22px; margin-top: 22px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.auth-message.error { padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--danger) 45%, var(--line)); border-radius: 13px; color: var(--danger); background: color-mix(in srgb, var(--danger) 8%, var(--surface)); }
.auth-assurance { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--line); }
.auth-assurance span { border-radius: 999px; padding: 6px 9px; background: var(--surface-2); color: var(--muted); font-size: 10px; font-weight: 750; }
.recovery-codes h2 { margin: 0 0 10px; font: 650 32px/1.05 Georgia, "Times New Roman", serif; }
.recovery-codes p { color: var(--muted); font-size: 12px; line-height: 1.5; }
.recovery-codes pre { max-height: 250px; overflow: auto; padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-2); color: var(--ink); font: 700 12px/1.7 ui-monospace, SFMono-Regular, Consolas, monospace; }
.recovery-codes button { width: 100%; margin-top: 8px; }
[hidden] { display: none !important; }
@media (max-width: 820px) {
  body { padding: 0; }
  .auth-shell { min-height: 100dvh; grid-template-columns: 1fr; border-radius: 0; }
  .auth-story { min-height: 390px; padding: max(22px, env(safe-area-inset-top)) 22px 34px; }
  .auth-copy { padding-block: 64px 34px; }
  h1 { font-size: clamp(50px, 15vw, 72px); }
  .auth-story footer { display: none; }
  .auth-action { width: 100%; padding: 32px 22px max(38px, env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
