:root {
  color-scheme: light dark;

  --background: #fff;
  --foreground: #000;
  --muted: #555;
  --border: #d5d5d5;

  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Helvetica,
    Arial,
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
  color: var(--foreground);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--foreground);
  font-size: 18px;
  line-height: 1.6;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-underline-offset: 0.18em;
}

.authentication-shell {
  width: min(1120px, calc(100% - 48px));
  min-height: 100vh;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 72px 0;
}

.authentication-card {
  width: min(100%, 32rem);
}

.authentication-header {
  margin-bottom: 40px;
}

.product-name {
  margin: 0 0 24px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

h1 {
  margin: 0;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 400;
}

.supporting-copy {
  margin: 24px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.field-group {
  margin-bottom: 24px;
}

.field-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  font-weight: 700;
}

.optional-label {
  color: var(--muted);
  font-weight: 400;
}

.field-group input {
  width: 100%;
  min-height: 52px;
  padding: 10px 12px;
  border: 2px solid var(--foreground);
  border-radius: 0;
  outline: none;
  background: var(--background);
  color: var(--foreground);
}

.field-group input:focus {
  outline: 2px solid var(--foreground);
  outline-offset: 3px;
}

.password-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: -8px 0 24px;
}

.password-tools .secondary-button {
  width: auto;
  min-height: 44px;
  border: 2px solid var(--foreground);
  background: var(--background);
  color: var(--foreground);
}

.choice-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 24px;
}

.choice-field input {
  margin-top: 7px;
  accent-color: var(--foreground);
}

.form-message {
  min-height: 1.5rem;
  margin: 0 0 16px;
  font-weight: 600;
  line-height: 1.4;
}

button,
.button-link {
  display: inline-flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--foreground);
  border-radius: 0;
  padding: 10px 20px;
  background: var(--foreground);
  color: var(--background);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

button:focus-visible,
.button-link:focus-visible,
a:focus-visible {
  outline: 2px solid var(--foreground);
  outline-offset: 3px;
}

button:disabled {
  cursor: wait;
  opacity: 0.55;
}

[hidden] {
  display: none !important;
}

@media (max-width: 700px) {
  .authentication-shell {
    width: min(100% - 32px, 1120px);
    align-items: flex-start;
    padding: 80px 0;
  }

  .authentication-header {
    margin-bottom: 32px;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #000;
    --foreground: #fff;
    --muted: #aaa;
    --border: #333;
  }
}
