/*
 * The sign-in surface. Deliberately plain: this page appears for about fifteen
 * seconds, once per machine, between two things that are not a website.
 *
 * Light and dark are both defined explicitly rather than inheriting, because a
 * page that borrows the browser's default background looks broken next to a
 * dark app.
 */

:root {
  color-scheme: light dark;
  --bg: #faf9f7;
  --card: #ffffff;
  --ink: #1c1b19;
  --muted: #6b6862;
  --line: #e4e1db;
  --accent: #1c1b19;
  --accent-ink: #ffffff;
  --error: #a4302a;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171614;
    --card: #201f1c;
    --ink: #f2efe9;
    --muted: #9c988f;
    --line: #33312d;
    --accent: #f2efe9;
    --accent-ink: #171614;
    --error: #e88b84;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

#card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 32px;
}

.brand {
  margin: 0 0 20px;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.lead {
  margin: 0 0 20px;
  font-size: 16px;
}

.hint {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.error {
  color: var(--error);
}

form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

label {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
}

input[type='text'] {
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
}

input[type='text']:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 9px;
  align-items: start;
  margin-top: 16px;
  font-size: 13px;
  font-weight: 400;
}

.check input {
  margin-top: 3px;
}

a {
  color: inherit;
}

.primary {
  margin-top: 22px;
  padding: 11px 16px;
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.primary:hover {
  opacity: 0.9;
}

/* ------------------------------------------------------------------ legal */

/*
 * Terms and privacy. A reading surface rather than a card: these are long, they
 * are meant to be read, and a 420px column with a border round it would be
 * pretending they are a dialog.
 */
.legal {
  max-width: 680px;
  margin: 0 auto;
  padding: 48px 24px 96px;
  text-align: left;
}

.legal h1 {
  margin: 0 0 6px;
  font-size: 26px;
  letter-spacing: -0.015em;
}

.legal .updated {
  margin: 0 0 36px;
  color: var(--muted);
  font-size: 13px;
}

.legal h2 {
  margin: 34px 0 10px;
  font-size: 16px;
}

.legal h3 {
  margin: 22px 0 6px;
  font-size: 14px;
}

.legal p,
.legal li {
  font-size: 14.5px;
  line-height: 1.62;
}

.legal ul {
  padding-left: 20px;
}

.legal li {
  margin-bottom: 7px;
}

.legal table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 14px;
}

.legal th,
.legal td {
  padding: 9px 10px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.legal th {
  font-weight: 600;
}

/* The details only the company can fill in. Marked rather than invented, so a
   placeholder cannot quietly survive to production. */
.legal .todo {
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(220, 160, 30, 0.18);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.87em;
}

.legal .back {
  display: inline-block;
  margin-top: 40px;
  color: var(--muted);
  font-size: 13px;
}
