:root {
  color-scheme: light dark;
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #1a1d21;
  --muted: #5c6470;
  --border: #d8dde4;
  --accent: #1f6feb;
  --accent-contrast: #ffffff;
  --error: #b42318;
  --radius: 10px;
  --shadow: 0 6px 24px rgba(15, 23, 42, 0.08);
  --template-hover: rgba(31, 111, 235, 0.12);
  --template-selected: rgba(31, 111, 235, 0.18);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1216;
    --card: #161b22;
    --text: #e7ecf3;
    --muted: #9aa4b2;
    --border: #30363d;
    --accent: #58a6ff;
    --accent-contrast: #0f1216;
    --error: #ff8a8a;
    --shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
    --template-hover: rgba(88, 166, 255, 0.14);
    --template-selected: rgba(88, 166, 255, 0.22);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

.wrap {
  max-width: 40rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

.advocacy-hero {
  margin: 0 0 1.35rem;
  font-size: 1.25rem;
  font-weight: 650;
  line-height: 1.45;
  color: var(--text);
  letter-spacing: -0.015em;
}

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

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

.field {
  margin-bottom: 1.1rem;
}

.field-hint {
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.template-picker {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  max-height: min(42vh, 18rem);
  overflow-y: auto;
}

.template-option {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.65rem 0.75rem;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  transition: background-color 0.12s ease, border-color 0.12s ease;
}

.template-option:hover {
  background: var(--template-hover);
  border-color: var(--border);
}

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

.template-option.is-selected {
  background: var(--template-selected);
  border-color: var(--accent);
}

.template-option-title {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}

.template-option-snippet {
  display: block;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.4;
}

select,
textarea {
  width: 100%;
  font: inherit;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}

textarea {
  resize: vertical;
  min-height: 8rem;
  line-height: 1.5;
}

select:focus,
textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.actions {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.btn-send {
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border: none;
  border-radius: 999px;
  padding: 0.65rem 1.25rem;
  background: var(--accent);
  color: var(--accent-contrast);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  text-align: center;
  max-width: 100%;
}

.btn-send-main {
  font-size: 1rem;
  line-height: 1.2;
}

.btn-send-note {
  font-size: 0.78rem;
  font-weight: 500;
  opacity: 0.92;
  line-height: 1.25;
  max-width: 22rem;
}

.btn-send:hover {
  filter: brightness(1.05);
}

.btn-send:active {
  transform: translateY(1px);
}

#status {
  margin-top: 1rem;
  font-size: 0.92rem;
  min-height: 1.4em;
}

#status.error {
  color: var(--error);
}

a {
  color: var(--accent);
}
