:root {
  --page: #f3f5f8;
  --card: #ffffff;
  --ink: #1d2433;
  --muted: #5b6577;
  --line: #d5dae3;
  --accent: #2f3b52;
  --accent-ink: #ffffff;
  --focus: #4a78c9;
  --notice-bg: #fdecea;
  --notice-line: #b3261e;
  --notice-ink: #7a1712;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #12161f;
    --card: #1b212d;
    --ink: #e8ebf1;
    --muted: #a3acbd;
    --line: #333c4d;
    --accent: #dfe5f0;
    --accent-ink: #12161f;
    --focus: #8fb2ee;
    --notice-bg: #3a1a18;
    --notice-line: #f2867e;
    --notice-ink: #ffd9d5;
  }
}

* { box-sizing: border-box; }

html { height: 100%; }

body {
  min-height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 2rem 1rem;
  background: var(--page);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.card {
  width: 100%;
  max-width: 24rem;
  padding: 2.25rem 2rem 1.75rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(20, 28, 45, 0.08);
}

.mark { display: block; border-radius: 12px; }

h1 { margin: 1.25rem 0 0.25rem; font-size: 1.6rem; line-height: 1.2; letter-spacing: -0.01em; }

.lede { margin: 0 0 1.5rem; color: var(--muted); }

.notice {
  margin: 0 0 1.25rem;
  padding: 0.7rem 0.9rem;
  border-left: 4px solid var(--notice-line);
  border-radius: 6px;
  background: var(--notice-bg);
  color: var(--notice-ink);
  font-size: 0.95rem;
}

label { display: block; margin-bottom: 0.35rem; font-size: 0.9rem; font-weight: 600; }

input {
  display: block;
  width: 100%;
  margin-bottom: 1.1rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
}

input:focus-visible, button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

button {
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.75rem 1rem;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

button:hover { filter: brightness(1.12); }

.help { margin: 1.5rem 0 0; color: var(--muted); font-size: 0.9rem; text-align: center; }

.back { margin: 0; font-size: 0.9rem; }
.back a { color: var(--muted); text-decoration: none; }
.back a:hover { color: var(--ink); text-decoration: underline; }

/* ---- the coming-soon home page ---- */

body.home { gap: 0; padding: 0; }

.soon {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: 38rem;
  padding: 2rem 1.5rem 6rem;
}

.eyebrow { margin: 0 0 1rem; color: var(--muted); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; }

.soon h1 { margin: 0 0 1rem; font-size: clamp(2rem, 6vw, 3.25rem); line-height: 1.1; letter-spacing: -0.02em; }

.soon .lede { margin: 0 0 0.75rem; font-size: 1.125rem; max-width: 30rem; }

.admin { margin: 0 0 2.5rem; font-size: 0.85rem; font-variant-caps: all-small-caps; letter-spacing: 0.08em; }
.admin a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 1px; }
.admin a:hover { color: var(--ink); border-bottom-color: var(--muted); }
.admin a:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.bar { width: 100%; max-width: 16rem; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.bar span { display: block; width: 62%; height: 100%; border-radius: 2px; background: var(--accent); }

/* ---- the error pages: the home page's layout, without its progress bar ---- */

.home-link { margin: 0.75rem 0 0; font-size: 0.95rem; }
.home-link a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--accent); padding-bottom: 2px; }
.home-link a:hover { border-bottom-color: var(--muted); }
.home-link a:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
