/* PLG Agent Application — minimal, mobile-first, no framework */

:root {
  --bg: #f6f8fb;
  --card: #ffffff;
  --text: #15233b;
  --muted: #5b6a86;
  --border: #d9dee8;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --error-bg: #fef2f2;
  --error-text: #991b1b;
  --error-border: #fecaca;
  --radius: 10px;
}

* { box-sizing: border-box; }

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

.card {
  max-width: 640px;
  margin: 0 auto;
  background: var(--card);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
}

header h1 {
  margin: 0 0 0.5rem;
  font-size: 1.625rem;
  font-weight: 600;
}

.subtitle {
  color: var(--muted);
  margin: 0 0 2rem;
}

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

fieldset.consent {
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
}

legend {
  font-weight: 600;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

label {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.9375rem;
}

label > span {
  display: block;
  margin-bottom: 0.375rem;
  font-weight: 500;
}

label > span small {
  font-weight: 400;
  color: var(--muted);
}

input[type=text],
input[type=email],
input[type=tel],
select,
textarea {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  background: white;
  color: var(--text);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

textarea { resize: vertical; }

.row.two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.row.two-cols > label { margin-bottom: 1rem; }

@media (max-width: 480px) {
  .row.two-cols { grid-template-columns: 1fr; }
  .card { padding: 1.25rem; }
}

abbr[title] {
  color: var(--accent);
  text-decoration: none;
  border: none;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.45;
}

.checkbox-row input[type=checkbox] {
  margin-top: 0.25rem;
  flex-shrink: 0;
}

.checkbox-row strong { color: var(--text); }

button[type=submit] {
  width: 100%;
  padding: 0.875rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.15s;
}

button[type=submit]:hover:not(:disabled) { background: var(--accent-hover); }

button[type=submit]:disabled {
  background: var(--muted);
  cursor: not-allowed;
  opacity: 0.7;
}

.error-banner {
  margin-top: 1rem;
  padding: 0.875rem 1rem;
  background: var(--error-bg);
  color: var(--error-text);
  border: 1px solid var(--error-border);
  border-radius: 8px;
  font-size: 0.875rem;
}

.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 0.9375rem; }

#success-state h2 {
  font-size: 1.5rem;
  margin: 0 0 1rem;
  color: var(--accent);
}
