:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #637087;
  --line: #d9e1ec;
  --soft: #f5f8fc;
  --accent: #1554d1;
  --accent-dark: #0f3fa4;
  --green: #0b7a50;
  --danger: #b42318;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--soft);
}

a { color: var(--accent); }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 70px;
  padding: 12px clamp(18px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.brand {
  color: var(--ink);
  font-size: 26px;
  font-weight: 950;
  text-decoration: none;
}

.header-links,
.footer-links,
.footer-contact {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.header-links a,
.footer-links a,
.footer-contact a {
  color: var(--muted);
  font-weight: 800;
  text-decoration: none;
}

.header-links a:hover,
.footer-links a:hover,
.footer-contact a:hover { color: var(--accent); }

.auth-main {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(360px, 520px);
  align-items: center;
  gap: clamp(32px, 7vw, 92px);
  width: min(1120px, calc(100% - 36px));
  min-height: calc(100vh - 150px);
  margin: 0 auto;
  padding: 42px 0;
}

.auth-intro h1 {
  max-width: 620px;
  margin: 0;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.02;
  letter-spacing: 0;
}

.auth-intro p {
  max-width: 590px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
  font-weight: 680;
  line-height: 1.55;
}

.benefits {
  display: grid;
  gap: 10px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.benefits li {
  padding-left: 20px;
  color: #344054;
  font-weight: 800;
  line-height: 1.45;
}

.benefits li::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: 0 12px 1px -20px;
  border-radius: 50%;
  background: var(--green);
}

.auth-card {
  width: 100%;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(23, 32, 51, 0.1);
}

.auth-card h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: 0;
}

.auth-card > p:first-of-type {
  margin: 8px 0 22px;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.45;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

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

label.wide { grid-column: 1 / -1; }

input {
  width: 100%;
  min-height: 46px;
  border: 1px solid #cfd8e6;
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-weight: 700;
}

input:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(21, 84, 209, 0.13);
}

.consent {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  grid-column: 1 / -1;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.5;
}

.consent input {
  width: 18px;
  min-height: 18px;
  margin: 2px 0 0;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 18px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

button.primary,
.button.primary {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

button.primary:hover,
.button.primary:hover { background: var(--accent-dark); }

.auth-actions {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.status {
  min-height: 22px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
}

.status.ok { color: var(--green); }
.status.error { color: var(--danger); }

.auth-switch {
  margin: 18px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
  font-weight: 750;
}

[hidden] { display: none !important; }

.legal-main {
  width: min(900px, calc(100% - 36px));
  margin: 0 auto;
  padding: 54px 0 72px;
}

.legal-header {
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.legal-header h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: 0;
}

.legal-header p {
  margin: 14px 0 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.55;
}

.legal-content { padding-top: 12px; }

.legal-content section {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.legal-content h2 {
  margin: 0 0 10px;
  font-size: 22px;
  letter-spacing: 0;
}

.legal-content p,
.legal-content li {
  color: #475467;
  font-weight: 650;
  line-height: 1.65;
}

.legal-content ul { padding-left: 22px; }

.legal-note {
  margin-top: 26px;
  padding: 16px;
  border-left: 4px solid var(--green);
  background: #fff;
  color: #344054;
  font-weight: 750;
  line-height: 1.55;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px clamp(18px, 5vw, 64px) 34px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: #fff;
  font-size: 14px;
  font-weight: 750;
}

@media (max-width: 820px) {
  .auth-main { grid-template-columns: 1fr; }
  .auth-intro h1 { font-size: 38px; }
}

@media (max-width: 600px) {
  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-links { gap: 10px 14px; }
  .auth-main { width: min(100% - 24px, 520px); padding: 28px 0; }
  .form-grid { grid-template-columns: 1fr; }
  .legal-main { width: min(100% - 28px, 900px); padding-top: 38px; }
}
