/* Contact page. It sits on the shared article paper (blog-article.css) and adds only the form and the help topics. */
.contact-page .contact-lead {
  max-width: 1000px;
  margin: 0;
  color: var(--blog-ink);
  font-size: 21px;
  line-height: 1.6;
}

.contact-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 20px;
}

.contact-field,
.contact-topic-field { min-width: 0; }
.contact-form .contact-field,
.contact-form fieldset { margin: 0 0 20px; }
.contact-topic-field { padding: 0; border: 0; }

.contact-field > label,
.contact-topic-field legend {
  display: block;
  padding: 0;
  margin-bottom: 8px;
  color: var(--blog-ink);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
}
.contact-field > label span,
.contact-topic-field legend > span { color: var(--blog-secondary); font-weight: 400; }

.contact-field :is(input, textarea) {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 11px 12px;
  border: 1px solid var(--blog-secondary);
  border-radius: var(--radius, 3px);
  background: #fff;
  color: var(--blog-ink);
  caret-color: var(--blog-ink);
  font: inherit;
  font-size: 16px;
  line-height: 1.5;
}
.contact-field textarea { min-height: 160px; resize: vertical; }
.contact-field :is(input, textarea):focus-visible,
.contact-topic-option:has(input:focus-visible),
.contact-send-button:focus-visible {
  outline: 3px solid var(--blog-focus);
  outline-offset: 2px;
}

.contact-topic-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.contact-topic-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid var(--blog-rule);
  border-radius: var(--radius, 3px);
  background: #fff;
  color: var(--blog-ink);
  font-size: 16px;
  line-height: 1.4;
  cursor: pointer;
}
.contact-topic-option input {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--blog-band);
}
.contact-topic-option:hover { border-color: var(--blog-secondary); }
.contact-topic-option:has(input:checked) { border-color: var(--blog-band); background: #f8ecc6; }

.contact-form .contact-field-hint,
.contact-form .contact-form-notice {
  margin: 0 0 10px;
  color: var(--blog-secondary);
  font-size: 16px;
  line-height: 1.6;
}
.contact-form .contact-field-error { margin: 8px 0 0; color: #8d2509; font-size: 16px; line-height: 1.5; }
.contact-field [aria-invalid="true"],
.contact-topic-option:has([aria-invalid="true"]) { border-color: #8d2509; }

.contact-send-button {
  min-height: 48px;
  padding: 12px 24px;
  margin-top: 6px;
  border: 1px solid var(--blog-band);
  border-radius: var(--radius, 3px);
  background: var(--blog-band);
  color: var(--blog-on-band);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
}
.contact-send-button:hover:not(:disabled) { background: #10243d; border-color: #10243d; }
.contact-send-button:disabled { opacity: .7; cursor: wait; }

.contact-form .contact-form-status {
  padding: 16px;
  margin: 20px 0 0;
  border-left: 4px solid var(--blog-accent);
  background: #f6f0df;
  color: var(--blog-ink);
  font-size: 16px;
  line-height: 1.6;
}
.contact-form .contact-form-status[data-state="error"] { border-left-color: #8d2509; color: #8d2509; background: #fbeee9; }

.contact-page .contact-topic + .contact-topic { margin-top: 28px; }
.contact-page .contact-topic h3 { margin: 0 0 10px; }
.contact-page blockquote {
  padding: 4px 0 4px 20px;
  margin: 0 0 20px;
  border-left: 4px solid var(--blog-rule);
  color: var(--blog-secondary);
}

@media (max-width: 760px) {
  .contact-page .contact-lead { font-size: 18px; }
  .contact-form-grid { grid-template-columns: minmax(0, 1fr); }
  .contact-topic-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-send-button { width: 100%; }
}
