/* A quiet, readable letter form using the shared editorial palette. */
.contact-page .contact-main {
  width: min(100% - 64px, 940px);
  margin: 0 auto;
  padding: 48px 0 72px;
}
.contact-page .contact-intro { max-width: 650px; margin-bottom: 36px; }
.contact-page h1 { margin: 16px 0 20px; font-size: clamp(38px, 4.6vw, 58px); line-height: 1.14; }
.contact-page .contact-intro p { max-width: 590px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.75; }
.contact-page .contact-form { max-width: 940px; padding-top: 28px; border-top: 1px solid var(--rule); }
.contact-page label { display: block; margin-bottom: 8px; color: var(--ink); font-size: 14px; font-weight: 500; }
.contact-page :is(input, textarea, select) {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: var(--paper-light);
  color: var(--ink);
  font: 16px/1.5 var(--font-sans);
  box-shadow: none;
}
.contact-page textarea { min-height: 152px; resize: vertical; }
.contact-page :is(input, textarea)::placeholder { color: #72756a; opacity: 1; }
.contact-page :is(input, textarea, select):hover { border-color: #969e8e; }
.contact-page :is(input, textarea, select):focus { border-color: var(--accent); }
.contact-page :is(input, textarea, select)[aria-invalid="true"] { border-color: #aa433c; }
.contact-page :is(input, textarea, select):disabled { opacity: .7; }
.contact-page .contact-field { min-width: 0; margin-bottom: 24px; }
.contact-page :is(.contact-field-help, .contact-optional, .contact-required, .contact-count, .contact-privacy-note) { color: var(--muted); font-size: 12px; line-height: 1.6; font-weight: 400; }
.contact-page .contact-field-help { margin: 7px 0 0; }
.contact-page .contact-optional { margin-left: 6px; }
.contact-page .contact-count { margin-top: 6px; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.contact-page :is(.contact-field-error, .contact-validation-summary) { color: #963d37; font-size: 13px; line-height: 1.5; margin: 7px 0 0; }
.contact-page .contact-feedback { margin: 0 0 24px; padding: 16px 18px; border: 1px solid var(--rule); background: var(--paper-light); line-height: 1.65; font-size: 14px; }
.contact-page .contact-feedback h2 { margin: 0 0 8px; font-size: 23px; }
.contact-page .contact-feedback p { margin: 0; }
.contact-page .contact-feedback.is-error { border-color: #c69b92; color: #84392f; background: #fbf0e8; }
.contact-page .contact-feedback.is-uncertain { border-color: #bbaa79; background: #f5eed9; }
.contact-page .contact-feedback a { display: inline-block; margin-top: 12px; color: var(--accent); text-underline-offset: 4px; }
.contact-page .contact-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 28px; }
.contact-page .contact-actions .btn { min-height: 48px; padding: 13px 22px; font-size: 15px; }
.contact-page .contact-privacy-note { max-width: 330px; margin: 0; }
.contact-page .contact-success { max-width: 680px; padding: 36px 0; border-top: 1px solid var(--rule); }
.contact-page .contact-success h2 { margin: 18px 0 14px; font-size: 36px; line-height: 1.2; }
.contact-page .contact-success p { color: var(--muted); font-size: 16px; }
.contact-page .contact-success strong { color: var(--ink); overflow-wrap: anywhere; }
.contact-page .contact-success .btn { margin-top: 20px; }
.contact-page .contact-honeypot { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.contact-page .contact-submit-status { min-height: 20px; margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.contact-page .contact-fields-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.contact-page .contact-message-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; }
.contact-page .contact-required { margin-left: 6px; }

/* Colour samples become an accessible topic selector, like bars in a presentation box. */
.contact-page .contact-topic-fieldset { min-width: 0; margin: 0 0 30px; padding: 0; border: 0; }
.contact-page .contact-topic-legend { margin: 0 0 14px; padding: 0; color: var(--ink); font: 20px/1.4 var(--font-editorial); }
.contact-page .contact-topic-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid #b9b9a8;
  outline: 1px solid #d9d6c7;
  outline-offset: 3px;
  background: #efebdf;
  box-shadow: inset 0 2px 5px #5146330d;
}
.contact-page .contact-topic-tile {
  --soap: #d6b199;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
  min-height: 126px;
  margin: 0;
  padding: 14px 12px 16px;
  border: 1px solid #61533e35;
  border-radius: 8px 7px 9px 6px;
  background: linear-gradient(155deg, #ffffff30, transparent 45%, #473e280c), var(--soap);
  color: #34372c;
  box-shadow: inset 0 2px 1px #ffffff52, inset 0 -3px 3px #61533e16, 0 2px 3px #55472e14;
  cursor: pointer;
  transition: box-shadow .16s ease, transform .16s ease;
}
.contact-page .contact-topic-tile[data-topic="deployment"] { --soap: #d9aa94; }
.contact-page .contact-topic-tile[data-topic="api"] { --soap: #bbc5a3; }
.contact-page .contact-topic-tile[data-topic="annotation"] { --soap: #e6c571; }
.contact-page .contact-topic-tile[data-topic="research"] { --soap: #bfb5cf; }
.contact-page .contact-topic-tile[data-topic="general"] { --soap: #e2b6af; }
.contact-page .contact-topic-tile:hover { transform: translateY(-2px); box-shadow: inset 0 2px 1px #ffffff52, inset 0 -3px 3px #61533e16, 0 4px 6px #55472e24; }
.contact-page .contact-topic-tile.is-selected { outline: 2px solid var(--accent); outline-offset: 3px; }
.contact-page .contact-topic-tile:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 4px; }
.contact-page .contact-topic-tile input { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; margin: 0; border: 0; opacity: 0; clip-path: inset(50%); }
.contact-page .contact-topic-number { font: 14px/1 var(--font-editorial); letter-spacing: .09em; opacity: .8; text-shadow: 0 1px #ffffff55; }
.contact-page .contact-topic-name { font: 17px/1.35 var(--font-editorial); text-shadow: 0 1px #ffffff33; }
.contact-page .contact-topic-check { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 23px; height: 23px; border: 1px solid #34403077; border-radius: 50%; background: #ffffff35; font: 14px/1 var(--font-sans); }
.contact-page .contact-topic-tile:not(.is-selected) .contact-topic-check { visibility: hidden; }
.contact-page .contact-topic-fieldset:disabled .contact-topic-tile { cursor: default; transform: none; opacity: .75; }
@media (prefers-reduced-motion: reduce) {
  .contact-page .contact-topic-tile { transition: none; }
  .contact-page .contact-topic-tile:hover { transform: none; }
}
@media (max-width: 760px) {
  .contact-page .contact-topic-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .contact-page .contact-topic-tile { min-height: 112px; }
}
@media (max-width: 600px) {
  .contact-page .contact-main { width: calc(100% - 40px); padding: 36px 0 52px; }
  .contact-page .contact-intro { margin-bottom: 28px; }
  .contact-page h1 { font-size: 36px; margin-top: 12px; }
  .contact-page .contact-intro p { font-size: 15px; }
  .contact-page .contact-form { padding-top: 24px; }
  .contact-page .contact-field { margin-bottom: 22px; }
  .contact-page .contact-actions { align-items: stretch; gap: 14px; }
  .contact-page .contact-actions .btn { width: 100%; }
  .contact-page .contact-privacy-note { max-width: none; }
  .contact-page .contact-success h2 { font-size: 31px; }
  .contact-page .contact-fields-row { grid-template-columns: 1fr; gap: 0; }
  .contact-page .contact-topic-options { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 10px; gap: 10px; }
  .contact-page .contact-topic-tile:last-child { grid-column: 1 / -1; min-height: 68px; flex-direction: row; justify-content: flex-start; align-items: center; gap: 14px; }
  .contact-page .contact-topic-name { font-size: 16px; }
  .contact-page .contact-message-meta { gap: 12px; }
}
@media (max-width: 360px) {
  .contact-page .contact-topic-options { grid-template-columns: 1fr; }
  .contact-page .contact-topic-tile {
    min-height: 68px;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 14px;
    padding-right: 36px;
  }
  .contact-page .contact-topic-check { top: 8px; right: 8px; width: 20px; height: 20px; }
  .contact-page .contact-topic-name { font-size: 15px; }
}
