/* The sign-in site's look (docs/ACCOUNT.md "The sign-in site"): the editor's dark colours and accent
   (app/css/style.css :root), one column that reads on a phone. */
:root {
  --bg: #0b0b0e;
  --panel: #15151a;
  --panel-2: #1c1c22;
  --border: #2a2a33;
  --text: #ececf1;
  --muted: #8d8d99;
  --accent: #2ee6d6;
  --accent-ink: #04201e;
  --accent-soft: rgba(46, 230, 214, 0.14);
  --danger: #ff5c6c;
  --radius: 10px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 Inter, "Segoe UI", Roboto, system-ui, sans-serif;
}
button, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }
a { color: var(--accent); text-underline-offset: 2px; }
h1 { font-size: 24px; line-height: 1.25; margin: 0 0 12px; }
h2 { font-size: 18px; line-height: 1.3; margin: 28px 0 8px; }
p, ul, ol { margin: 0 0 12px; }
li { margin-bottom: 4px; }
code { font-family: Consolas, "Roboto Mono", monospace; font-size: .92em; }

/* ---------- Top bar and footer ---------- */
.top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 17px; }
.brand svg { width: 26px; height: 26px; flex: none; fill: var(--accent); }
.foot {
  margin-top: auto;
  padding: 20px 16px 28px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}
.foot a { color: var(--muted); margin: 0 8px; white-space: nowrap; }

/* ---------- Content ---------- */
main { width: 100%; max-width: 720px; margin: 0 auto; padding: 28px 16px 36px; }
main.narrow { max-width: 460px; }
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
}
.lead { font-size: 18px; }
.muted { color: var(--muted); }
.small { font-size: 14px; color: var(--muted); }
.spaced { margin-top: 16px; }
.draft {
  border: 1px solid var(--danger);
  background: rgba(255, 92, 108, 0.1);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 24px;
  font-size: 15px;
}
.draft strong { color: var(--danger); }
.note {
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin: 0 0 16px;
}
.error { color: var(--danger); min-height: 1.55em; margin: 8px 0 0; }

/* ---------- Buttons and forms ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.button:disabled { opacity: .55; cursor: default; }
.button.wide { width: 100%; }
.button.ghost { background: transparent; border-color: var(--border); color: var(--text); }
.button.danger { background: var(--danger); color: #1f0508; }
.button.google { background: #fff; color: #1f1f1f; }
.button.google svg { width: 20px; height: 20px; }
.button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.row .button { flex: 1 1 140px; }
.stack { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; margin: 20px 0 4px; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 4px; }
input[type=email], input[type=password] {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-2);
}
.account { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel-2); overflow-wrap: anywhere; }
.account strong { font-size: 17px; }

/* A slow turn while the page waits for Google. */
.spinner {
  width: 32px; height: 32px;
  margin: 4px auto 14px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: turn 0.9s linear infinite;
}
@keyframes turn { to { transform: rotate(1turn); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }
.center { text-align: center; }
