:root {
  --auth-paper:var(--bg);--auth-panel:var(--surface);--auth-ink:var(--ink);
  --auth-soft:var(--ink-soft);--auth-rule:var(--rule);--auth-gold:var(--accent);
  --auth-gold-deep:var(--accent);--auth-focus:var(--focus);
}

* { box-sizing: border-box; }

body.auth-page {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 3.5rem);
  background:
    radial-gradient(circle at 85% 10%, rgba(169, 129, 47, 0.14), transparent 25rem),
    var(--auth-paper);
  color: var(--auth-ink);
  font: 400 var(--text-base)/1.55 var(--font-text);
}

.auth-shell {
  width: min(68rem, 100%);
  min-height: min(42rem, calc(100vh - 3rem));
  display: grid;
  grid-template-columns: minmax(17rem, 0.88fr) minmax(21rem, 1.12fr);
  overflow: hidden;
  border: 1px solid var(--auth-rule);
  border-radius: 4px;
  background: var(--auth-panel);
  box-shadow: 0 1.5rem 4rem rgba(27, 36, 54, 0.12);
}

.auth-story {
  display: flex;
  flex-direction: column;
  padding: clamp(2rem, 5vw, 4rem);
  background: var(--ink);
  color: var(--surface);
}

.auth-logo {
  width: min(15rem, 100%);
  height: auto;
  margin-bottom: auto;
  filter: none;
}

.auth-eyebrow {
  margin: 3rem 0 0.7rem;
  color: var(--accent);
  font: 600 0.72rem/1.3 ui-monospace, monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.auth-story h1 {
  margin: 0;
  max-width: 11ch;
  color: var(--surface);
  font: 600 clamp(2.25rem, 5vw, 4.3rem)/1.02 var(--font-display);
}

.auth-story p {
  max-width: 29rem;
  margin: 1.4rem 0 0;
  color: var(--surface-2);
  font-size: 0.98rem;
}

.auth-proof {
  display: grid;
  gap: 0.65rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--surface);
  font-size: 0.9rem;
}

.auth-proof li::before { content: "—"; color: var(--accent); margin-right: 0.6rem; }

.auth-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 6vw, 5rem);
}

.auth-panel h2 {
  margin: 0;
  color: var(--auth-ink);
  font: 600 clamp(2rem, 4vw, 3.2rem)/1.08 var(--font-display);
}

.auth-intro { margin: 0.8rem 0 2rem; color: var(--auth-soft); }

.auth-form { display: grid; gap: 1.15rem; }
.auth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.auth-field { display: grid; gap: 0.42rem; }
.auth-field label {
  position: static !important;
  transform: none !important;
  color: var(--auth-ink) !important;
  font: 600 0.73rem/1.2 ui-monospace, monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.auth-field input[type="text"],
.auth-field input[type="email"],
.auth-field input[type="password"] {
  width: 100% !important;
  height: 3.25rem !important;
  margin: 0 !important;
  padding: 0 0.95rem !important;
  border: 1px solid var(--auth-rule) !important;
  border-radius: 2px !important;
  background: var(--surface) !important;
  color: var(--auth-ink) !important;
  box-shadow: none !important;
  font: 400 1rem var(--font-text);
}

.auth-field input:focus {
  border-color: var(--auth-gold) !important;
  outline: 3px solid var(--auth-focus);
  outline-offset: 1px;
}

.auth-helper { color: var(--auth-soft); font-size: 0.8rem; }

.auth-submit {
  min-height: 3.2rem;
  border: 1px solid var(--auth-ink);
  border-radius: 2px;
  background: var(--auth-ink);
  color: var(--auth-panel);
  cursor: pointer;
  font: 600 1rem var(--font-text);
  text-transform: none;
  box-shadow: none;
}
.auth-submit:hover, .auth-submit:focus-visible { filter:brightness(1.12);box-shadow:inset 0 -3px var(--auth-gold); }
.auth-standalone-action {
  display: grid;
  place-items: center;
  text-decoration: none;
}

.auth-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.3rem;
  width: auto;
  height: auto;
  min-height: 0;
  margin-top: 1.5rem;
  padding: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  font-size: 0.9rem;
  line-height: inherit;
}
.auth-links a { padding: 0; }
.auth-links a, .auth-consent a { color: var(--auth-gold-deep); text-decoration: underline; text-underline-offset: 0.18em; }

.auth-consents { display: grid; gap: 0.75rem; margin: 0.2rem 0; }
.auth-consent label { display: flex; gap: 0.65rem; align-items: flex-start; color: var(--auth-soft); font-size: 0.86rem; }
.auth-consent input {
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  margin-top: 0.32rem;
  opacity: 1 !important;
  position: static !important;
  pointer-events: auto !important;
  appearance: auto;
}
.auth-consent label > span { padding-left: 0 !important; }
.auth-consent input + span::before,
.auth-consent input + span::after { display: none !important; }

.auth-message {
  margin: 0 0 1.2rem;
  padding: 0.9rem 1rem;
  border-left: 3px solid var(--auth-gold);
  background: var(--surface-2);
  color: var(--auth-ink);
  font-size: 0.9rem;
}
.auth-message p { margin: 0; color: inherit; }

@media (max-width: 760px) {
  body.auth-page { padding: 0; place-items: stretch; }
  .auth-shell { min-height: 100vh; grid-template-columns: 1fr; border: 0; }
  .auth-story { min-height: 19rem; padding: 1.5rem; }
  .auth-logo { width: 11rem; margin-bottom: 2rem; }
  .auth-eyebrow { margin-top: 0; }
  .auth-story h1 { font-size: clamp(2.2rem, 11vw, 3.5rem); }
  .auth-story p, .auth-proof { display: none; }
  .auth-panel { padding: 2rem 1.5rem 3rem; }
  .auth-row { grid-template-columns: 1fr; }
}
