:root {
  --ink: #16201d;
  --muted: #5f6b66;
  --paper: #fbfaf4;
  --panel: #ffffff;
  --line: #d9ded6;
  --forest: #174c3f;
  --blue: #356dbe;
  --shadow: 0 24px 80px rgba(22, 32, 29, 0.13);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Manrope, system-ui, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(320px, 0.78fr) minmax(0, 1fr);
  min-height: 100vh;
}

.auth-aside {
  display: grid;
  align-content: space-between;
  gap: 28px;
  padding: clamp(24px, 4vw, 52px);
  background: #f7f8f4;
  border-right: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.auth-topline {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

.home-link {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--forest);
  font-size: 13px;
  font-weight: 900;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  background: var(--forest);
  color: #fff;
  font-size: 13px;
}

.auth-copy h1 {
  max-width: 560px;
  margin: 0;
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(42px, 6vw, 82px);
  line-height: 0.94;
}

.auth-copy p {
  max-width: 520px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.auth-main {
  display: grid;
  place-items: center;
  padding: clamp(22px, 5vw, 64px);
}

.auth-card {
  width: min(100%, 460px);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(24px, 4vw, 36px);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.auth-card h2 {
  margin: 0 0 8px;
  font-size: 30px;
}

.auth-card > p,
.auth-message,
.auth-switch {
  color: var(--muted);
  line-height: 1.45;
}

.auth-step,
.auth-form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.auth-step[hidden] {
  display: none;
}

label {
  display: grid;
  gap: 7px;
  color: #34413c;
  font-size: 13px;
  font-weight: 900;
}

input {
  min-height: 48px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
}

input:focus-visible {
  border-color: var(--blue);
  outline: 2px solid rgba(53, 109, 190, 0.18);
}

.name-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.password-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: -4px;
}

.password-rule {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border: 1px solid rgba(163, 58, 47, 0.42);
  border-radius: 999px;
  padding: 0 13px;
  background: #fff7f5;
  color: #a33a2f;
  font-size: 13px;
  font-weight: 900;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.password-rule.is-met {
  border-color: rgba(23, 76, 63, 0.46);
  background: #f0fbf5;
  color: var(--forest);
}

.auth-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  background: var(--forest);
  color: #fff;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.auth-button.secondary {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.auth-message {
  min-height: 22px;
  margin: 0;
  font-size: 13px;
  font-weight: 800;
}

.auth-message.is-error {
  color: #a33a2f;
}

.auth-switch a {
  color: var(--forest);
  font-weight: 900;
}

@media (max-width: 820px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-aside {
    min-height: 42vh;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 520px) {
  .name-grid {
    grid-template-columns: 1fr;
  }
}
