:root {
  color-scheme: light dark;
  --ink: #1d2433;
  --muted: #5b6475;
  --line: #d9dee8;
  --panel: #ffffff;
  --page: #f4f6fa;
  --accent: #2456d6;
  --ok: #1d7a46;
  --bad: #b3261e;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e7eaf0;
    --muted: #a2abbb;
    --line: #353d4d;
    --panel: #1b2130;
    --page: #11151f;
    --accent: #7aa2ff;
    --ok: #5fd08f;
    --bad: #ff8a80;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
}

main {
  max-width: 44rem;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

.brand {
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent);
  text-transform: uppercase;
  font-size: 0.85rem;
}

h1 { margin: 0.25rem 0; font-size: 1.6rem; overflow-wrap: anywhere; }
h2 { margin-top: 0; font-size: 1.2rem; }
.lead { margin-top: 0; color: var(--muted); }
a { color: var(--accent); }

section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.25rem;
  margin-top: 1.25rem;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95em;
  overflow-wrap: anywhere;
}

form { display: grid; gap: 0.5rem; margin: 0.75rem 0; }
label { font-weight: 600; }

input[type="file"], textarea {
  width: 100%;
  font: inherit;
  color: inherit;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.5rem;
}

textarea { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.85rem; }

button {
  justify-self: start;
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  cursor: pointer;
}

button:disabled { opacity: 0.6; cursor: progress; }
button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.secret button { padding: 0.2rem 0.6rem; font-size: 0.85rem; }

progress { width: 100%; height: 0.75rem; }

.hint, .status { color: var(--muted); }
.status.ok { color: var(--ok); }
.status.error, .notice.error { color: var(--bad); }

.notice {
  border-left: 4px solid var(--accent);
  padding: 0.5rem 0.75rem;
  margin: 0.75rem 0;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.notice.error { border-left-color: var(--bad); background: color-mix(in srgb, var(--bad) 8%, transparent); }

.details {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.25rem 1rem;
  margin: 0 0 1rem;
}

.details dt { color: var(--muted); }
.details dd { margin: 0; font-family: ui-monospace, Menlo, Consolas, monospace; overflow-wrap: anywhere; }

details { margin-top: 1rem; }
summary { cursor: pointer; font-weight: 600; }

/* Sign-up pages */

input[type="text"], input[type="email"], select {
  width: 100%;
  font: inherit;
  color: inherit;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.5rem;
}

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

#signup-form { display: block; margin: 0; }
#signup-form section > label { display: block; margin-top: 0.75rem; }
#signup-form .hint { margin: 0.25rem 0 0; font-size: 0.9rem; }
#signup-form button { margin-top: 1.25rem; }
.optional { font-weight: 400; color: var(--muted); }

.plans { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }

.plan {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.15rem 0.6rem;
  align-items: baseline;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.75rem;
  cursor: pointer;
  font-weight: 400;
}

.plan:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.plan:has(input:disabled) { opacity: 0.6; cursor: not-allowed; }
.plan input { grid-row: span 3; }
.plan-name { font-weight: 700; }
.plan-price { color: var(--accent); font-weight: 600; }
.plan-summary { color: var(--muted); font-size: 0.9rem; }

.address { display: flex; align-items: center; gap: 0.25rem; }
.address input { flex: 1 1 auto; min-width: 6rem; }
.turnstile { margin: 1.25rem 0 0; min-height: 65px; }
.suffix { color: var(--muted); white-space: nowrap; }

#problems ul { margin: 0; padding-left: 1.25rem; }
