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

.contact-form label,
.contact-choice legend {
  font-size: .72rem;
  font-weight: 700;
  color: #d3e2fb;
}

.contact-form label em,
.contact-choice legend em {
  margin-inline-start: .45em;
  color: #9fc1ff;
  font-size: .62rem;
  font-style: normal;
}

.contact-form label small {
  margin-inline-start: .45em;
  color: #91a7c6;
  font-size: .62rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  min-block-size: 48px;
  border: 1px solid #7185a4;
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  font-size: 1rem;
}

.contact-form select {
  display: block;
  inline-size: 100%;
  margin-block-start: 5px;
  padding: 11px 12px;
}

.contact-form textarea {
  resize: vertical;
}

.contact-form :is(input, select, textarea):user-invalid {
  border-color: #ffb6b6;
  outline: 2px solid rgba(255, 112, 112, .35);
}

.contact-choice {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 0;
  padding: 14px 16px 16px;
  border: 1px solid #536b91;
}

.contact-choice > p {
  flex: 1 0 100%;
  margin: 0 0 4px;
  color: #aebfda;
  font-size: .67rem;
  line-height: 1.6;
}

.contact-choice .choice-error {
  min-block-size: 1.4em;
  margin: 0;
  color: #ffc0c0;
}

.contact-choice legend {
  padding-inline: 5px;
}

.contact-choice label,
.contact-consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-block-size: 36px;
  color: #fff;
  font-size: .76rem;
  font-weight: 400;
  line-height: 1.6;
}

.contact-choice input,
.contact-consent input {
  flex: 0 0 auto;
  inline-size: 18px;
  min-block-size: 18px;
  block-size: 18px;
  margin-block-start: 2px;
  accent-color: var(--blue);
}

.contact-honeypot {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  inline-size: 1px !important;
  block-size: 1px !important;
}

.form-message {
  min-block-size: 1.5em;
}

.form-message.is-success { color: #b8f2d0; }
.form-message.is-error { color: #ffc0c0; }

.contact-receipt-note {
  margin: -4px 0 4px;
  color: #d8e6fa;
  font-size: .72rem;
  line-height: 1.75;
}

.contact-receipt-note[hidden] { display: none; }
.contact-receipt-note a { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

.line-registration {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  border: 1px solid #5c8ee6;
  background: linear-gradient(110deg, #07337f, #0756d9);
  color: #fff;
}

.line-registration[hidden] { display: none; }
.line-registration p { margin: 0; }
.line-registration strong,
.line-registration span { display: block; }
.line-registration strong { font: 600 .92rem var(--serif); }
.line-registration p span { margin-block-start: 3px; color: #d7e7ff; font-size: .67rem; line-height: 1.6; }
.line-registration a { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 14px; min-block-size: 44px; padding: 9px 14px; border: 1px solid #b4ceff; color: #fff; font-size: .68rem; font-weight: 700; }
.line-registration a[aria-disabled="true"] { cursor: not-allowed; opacity: .58; }

.contact-dialog {
  inline-size: min(680px, calc(100% - 32px));
  max-block-size: min(760px, calc(100dvh - 32px));
  padding: 0;
  border: 0;
  color: var(--ink);
  box-shadow: 0 28px 80px rgba(2, 13, 32, .38);
}

.contact-dialog::backdrop {
  background: rgba(2, 13, 32, .76);
  backdrop-filter: blur(5px);
}

.contact-dialog form { padding: clamp(24px, 5vw, 44px); }
.contact-dialog h2 { margin: 4px 0 20px; font: 600 1.75rem var(--serif); }
.contact-dialog dl { display: grid; grid-template-columns: 9rem 1fr; margin: 0; border-top: 1px solid var(--line); }
.contact-dialog dt,
.contact-dialog dd { margin: 0; padding: 11px 8px; border-bottom: 1px solid var(--line); font-size: .78rem; line-height: 1.7; }
.contact-dialog dt { color: var(--muted); font-weight: 700; }
.contact-dialog dd { white-space: pre-wrap; overflow-wrap: anywhere; }
.contact-dialog-note { color: var(--muted); font-size: .72rem; }
.line-registration--dialog { margin-block-start: 18px; border-color: #b9cdf0; background: #eef4ff; color: var(--navy); }
.line-registration--dialog p span { color: #536987; }
.line-registration--dialog a { border-color: var(--blue); background: var(--blue); color: #fff; }
.contact-dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-block-start: 20px; }
.contact-dialog-actions button { min-block-size: 50px; padding: 12px 15px; border: 1px solid var(--blue); background: #fff; color: var(--blue); font-weight: 700; }
.contact-dialog-actions #contact-send-button { display: flex; justify-content: space-between; align-items: center; background: var(--blue); color: #fff; }
.contact-dialog-actions button:disabled,
.contact-form button:disabled { cursor: wait; opacity: .58; }

@media (max-width: 620px) {
  .contact-fields { grid-template-columns: 1fr; }
  .contact-dialog dl { grid-template-columns: 1fr; }
  .contact-dialog dt { padding-block-end: 2px; border-bottom: 0; }
  .contact-dialog dd { padding-block-start: 2px; }
  .contact-dialog-actions { grid-template-columns: 1fr; }
  .line-registration { align-items: stretch; flex-direction: column; }
  .line-registration a { justify-content: space-between; }
}
