:root {
  --bg: #fbfaf8;
  --surface: #ffffff;
  --ink: #14131a;
  --muted: #5f5d6b;
  --hair: #dedce4;
  --accent: #5b49f2;
  --danger: #b3261e;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.5 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* sign in */

.shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 40px 24px;
}

.panel {
  width: 100%;
  max-width: 356px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 40px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.brand::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--accent);
}

h1 {
  margin: 0 0 26px;
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.field { margin-bottom: 16px; }

label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  color: var(--muted);
}

input {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  font: inherit;
  font-size: 15.5px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: 9px;
}
input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(91, 73, 242, 0.16);
}
input[aria-invalid="true"] { border-color: var(--danger); }

button {
  width: 100%;
  height: 46px;
  margin-top: 10px;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 9px;
  cursor: pointer;
}
button:hover { background: #4f3ee6; }

.error {
  display: none;
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--danger);
}
.error.show { display: block; }

.foot {
  margin-top: 34px;
  font-size: 13px;
  color: var(--muted);
}
.foot p { margin: 0 0 10px; }
.foot nav {
  display: flex;
  gap: 16px;
}
.foot a {
  color: var(--muted);
  text-decoration: none;
}
.foot a:hover { color: var(--ink); }

/* plain pages */

.shell.top {
  place-items: start center;
  padding-top: 72px;
  padding-bottom: 72px;
}

.doc {
  width: 100%;
  max-width: 520px;
}

.doc h1 {
  font-size: 24px;
  margin-bottom: 22px;
}

.doc h2 {
  margin: 30px 0 8px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.doc p {
  margin: 0 0 12px;
  font-size: 15.5px;
  color: var(--muted);
}

.doc a {
  color: var(--ink);
  text-decoration-color: var(--hair);
  text-underline-offset: 3px;
}

.doc .back {
  margin-bottom: 34px;
  font-size: 14px;
}
