:root {
  --bg: #0e0e10;
  --panel: #18181b;
  --border: #2a2a30;
  --text: #ececef;
  --muted: #9a9aa3;
  --accent: #e4b343;
  --accent-text: #0e0e10;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  -webkit-font-smoothing: antialiased;
}

main {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
}

.card {
  width: 100%;
  max-width: 540px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2.5rem 2rem 2.5rem 2rem;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

h1 {
  font-size: 2.75rem;
  letter-spacing: -0.02em;
  margin: 0 0 0.4rem;
  font-weight: 600;
}

.intake-title { padding-bottom: 1.5rem; }

.sub {
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 0.95rem;
  margin: 0 0 2rem;
  line-height: 1.5;
}


fieldset {
  border: none;
  margin: 0;
  padding: 0;
}

.option {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 0.6rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.35;
}

.option:hover { border-color: #3d3d46; background: #1d1d22; }

.option input {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  border: 1.5px solid #4a4a55;
  border-radius: 5px;
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.option input:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.option input:checked::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid var(--accent-text);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

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

button {
  width: 100%;
  margin-top: 1.5rem;
  padding: 0.95rem;
  background: var(--accent);
  color: var(--accent-text);
  border: none;
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 600;
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

button:hover { opacity: 0.9; }
button:disabled { opacity: 0.5; cursor: default; }

#submitBtn { margin-top: 1.5rem; }

.thanks {
  text-align: center;
  padding: 1.5rem 0 1.5rem;
}

.thanks h1 { margin-bottom: 0.5rem; }

.thanks p {
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 0.95rem;
  margin: 0;
}

.field {
  text-align: left;
  margin-top: 1.25rem;
}

.field label {
  display: block;
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.site-credit {
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
  opacity: 0.7;
  padding: 1.5rem 1rem 2rem;
}

.field input[type="text"],
.field input[type="email"] {
  width: 100%;
  padding: 0.8rem 0.9rem;
  background: #0e0e10;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 1rem;
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.field textarea {
  width: 100%;
  padding: 0.8rem 0.9rem;
  background: #0e0e10;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 1rem;
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  resize: vertical;
  min-height: 120px;
}

#statement { margin-top: -1.5rem; }
#statement .field { margin-top: 0; }
#statementText { min-height: 96px; }
#skipBtn { margin-top: 2.25rem; }

.mic-btn {
  width: auto;
  margin: 0.6rem 0 0;
  padding: 0.5rem 0.9rem;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
}

.mic-btn:hover { border-color: var(--accent); opacity: 1; }
.mic-btn:disabled { opacity: 0.6; }

.link-btn {
  width: auto;
  display: block;
  margin: 0.75rem auto 0;
  padding: 0.4rem 0.6rem;
  background: none;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 400;
  text-decoration: underline;
}

.link-btn:hover { opacity: 1; color: var(--text); }

#recordBtn { touch-action: none; user-select: none; -webkit-user-select: none; }
#recordBtn.recording { background: #d9534f; color: #fff; }

.rec-dots span {
  animation: recDot 1.2s infinite;
  opacity: 0.25;
}
.rec-dots span:nth-child(2) { animation-delay: 0.2s; }
.rec-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes recDot {
  0%, 70%, 100% { opacity: 0.25; }
  35% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .rec-dots span { animation: none; opacity: 1; }
}

.btn-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.btn-row #recordBtn {
  width: auto;
  height: 3.25rem;
  margin: 0;
  padding: 0 1.5rem;
  flex: 1 1 auto;
}

.btn-row #recordBtn.recording {
  flex: 0 0 auto;
  min-width: 0;
}

.rec-controls {
  display: flex;
  gap: 0.6rem;
}

.circle-btn {
  flex: 0 0 auto;
  width: 3.25rem;
  height: 3.25rem;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.circle-btn svg { width: 1.3rem; height: 1.3rem; display: block; }

.circle-btn.play { background: #d9534f; color: #fff; }
.circle-btn.delete { background: #fff; color: #000; }

.error {
  color: #f08a8a;
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 0.85rem;
  margin: 0.75rem 0 0;
  min-height: 1.1em;
}

.error.below-card {
  text-align: center;
  margin: 0;
  min-height: 0;
  padding-top: 16px;
}
.error.below-card:empty { padding-top: 0; }

/* Intake error sits below the Submit button: centered both axes, 8px all round. */
#formError {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px;
}

.help {
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 0.9rem;
  line-height: 1.45;
  margin: 1rem 0 1.5rem;
  text-align: center;
}

.testify-intro {
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 0.92rem;
  margin: 1.75rem 0 0;
  line-height: 1.5;
  text-align: left;
}

.hidden { display: none !important; }

.contact-done {
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.95rem;
  margin-top: 1.5rem;
}

@media (pointer: fine) and (prefers-reduced-motion: no-preference) {
  html.moth-cursor-active,
  html.moth-cursor-active * { cursor: none; }
  html.moth-cursor-active input,
  html.moth-cursor-active textarea { cursor: text; }
}

#moth-cursor {
  position: fixed;
  left: 0;
  top: 0;
  width: 675px;
  height: 565px;
  transform-origin: 327px 250px;
  pointer-events: none;
  z-index: 2147483647;
  opacity: 0;
  transition: opacity 0.7s ease;
  contain: layout style size;
}
#moth-cursor.is-ready { opacity: 1; }
#moth-cursor.is-out { opacity: 0; }
#moth-cursor img {
  position: absolute;
  user-select: none;
  -webkit-user-drag: none;
}
