:root {
  --bg: #ffffff;
  --ink: #111111;
  --ink-soft: #3a3a3a;
  --mute: #8a8780;
  --line: rgba(17, 17, 17, 0.08);
  --danger: #b42318;
  --pad: clamp(1.25rem, 4vw, 3.5rem);
  --font: "Onest", "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* display:grid on .auth-card would otherwise override UA [hidden] */
[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem var(--pad);
}

.brand {
  font-weight: 600;
  letter-spacing: 0.14em;
  font-size: 0.82rem;
}

.auth-shell {
  min-height: calc(100svh - 4.5rem);
  min-height: calc(100dvh - 4.5rem);
  display: grid;
  place-content: center;
  padding: 2rem var(--pad) 4rem;
}

.auth-card {
  width: min(100%, 24rem);
  display: grid;
  gap: 1.25rem;
}

.auth-title {
  margin: 0;
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  letter-spacing: -0.035em;
  font-weight: 600;
  line-height: 1.15;
}

.auth-lead {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.02rem;
  line-height: 1.5;
}

.auth-form {
  display: grid;
  gap: 0.9rem;
  margin-top: 0.35rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field label {
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.field input {
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.25s var(--ease);
}

.field input:focus {
  border-color: color-mix(in srgb, var(--ink) 35%, transparent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.2rem;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover,
.btn:focus-visible {
  opacity: 0.92;
}

.btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.auth-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 0.25rem;
  font-size: 0.95rem;
}

.auth-links a {
  color: var(--ink-soft);
  font-weight: 500;
}

.auth-links a:hover,
.auth-links a:focus-visible {
  color: var(--ink);
}

.auth-status {
  margin: 0;
  min-height: 1.35em;
  font-size: 0.92rem;
  line-height: 1.4;
  color: var(--ink-soft);
}

.auth-status.is-error {
  color: var(--danger);
}

.auth-status.is-ok {
  color: var(--ink);
}

.admin-home {
  width: min(100%, 36rem);
  display: grid;
  gap: 1.25rem;
}

.admin-home h1 {
  margin: 0;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  letter-spacing: -0.035em;
}

.admin-meta {
  margin: 0;
  color: var(--ink-soft);
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
