:root {
  color-scheme: light dark;
  --bg: #0f1115;
  --card-bg: #1a1d24;
  --text: #eef0f3;
  --muted: #9aa1ac;
  --accent: #6a5cff;
  /* Darker, not lighter, than --accent -- the original lighter shade
     (#8577ff) dropped white button-text contrast to 3.45:1 on hover,
     below WCAG AA's 4.5:1 (caught by the e2e suite's axe-core scan). */
  --accent-hover: #5546d9;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding: 1.5rem;
}

.page {
  max-width: 34rem;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 2.5rem 0;
}

.hero {
  text-align: center;
}

.card {
  width: 100%;
  background: var(--card-bg);
  border-radius: 0.75rem;
  padding: 2.5rem;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  box-sizing: border-box;
}

.footnote {
  padding-top: 1.5rem;
  border-top: 1px solid #262a33;
  text-align: center;
}

.footnote .text-link {
  margin-top: 0.75rem;
}

.footnote p {
  font-size: 0.75rem;
  line-height: 1.6;
  margin: 0;
  text-align: center;
}

.badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  margin: 0 0 0.75rem;
}

.text-link {
  display: block;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.85rem;
  text-decoration: none;
}

.text-link:hover {
  color: var(--text);
  text-decoration: underline;
}

h1 {
  font-size: 1.75rem;
  margin: 0 0 1rem;
}

h2 {
  font-size: 1.25rem;
  margin: 0 0 1rem;
}

p {
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 1.5rem;
}

.button {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 0.75rem 1.75rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.15s ease;
}

.button:hover {
  background: var(--accent-hover);
}

.button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.fine-print {
  margin: 1.25rem 0 0;
  font-size: 0.8rem;
  min-height: 1.1em;
}

form {
  text-align: left;
}

.field {
  display: block;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 1.25rem;
}

.field[hidden] {
  display: none;
}

.field input[type="email"],
.field input[type="text"] {
  display: block;
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.6rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid #333844;
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  box-sizing: border-box;
}

.field input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.instruments {
  border: none;
  padding: 0;
  margin: 0 0 1.25rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem 1rem;
}

.instruments legend {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0;
  margin: 0 0 0.75rem;
  grid-column: 1 / -1;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: normal;
  cursor: pointer;
}

.checkbox input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent);
  /* accent-color only themes the checked state -- unchecked boxes still
     fell back to the OS's native (light) chrome. */
  color-scheme: dark;
}

@media (max-width: 30rem) {
  .instruments {
    grid-template-columns: 1fr;
  }
}
