/* Kontakt: a task, not a presentation. Text on the left, the form on the right, on the home page's seams (columns 1 to 5 and 7 to 12); on anything narrower the form comes right after the lead. app.js needs .field, .field__err, .input, .textarea, .chip input + span, .spinner and .form__status: they are restyled here, not renamed. */

.hm-kt-obj { min-width: 0; margin-top: 36px; }
.hm-kt-info { margin-top: 40px; }
.hm-kt-info .hm-rows { border-bottom: 0; }
.hm-kt-info .hm-list { margin-top: 32px; }
.hm-kt-info .hm-note { margin-top: 16px; }
.hm-kt-nb { white-space: nowrap; }
@media (min-width: 800px) { .hm-faq__list > div:nth-child(odd) dd { padding-right: 32px; } }
.hm-rows a, .hm-faq__list a { border-radius: 2px; text-decoration: underline; text-decoration-color: var(--l2); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color 120ms linear; }
.hm-rows a { display: inline-block; padding: 6px 0; margin: -6px 0; }

/* The plate: fields, then a hairline, then the one action, as a tile's label row. */
.hm-kt-form { --accent-soft: transparent; }
.hm-kt-fields { display: grid; gap: 20px; padding: 16px 20px 20px; }
.hm-kt-pair { display: grid; align-items: start; gap: 20px 12px; }
@container (min-width: 460px) { .hm-kt-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hm-kt-nojs { margin-top: 0; color: var(--i2); }
.hm-kt-foot { padding: 20px 20px 16px; border-top: var(--hl); }

/* Labels and fields */
.hm-kt-form .field { display: grid; gap: 6px; min-width: 0; }
.hm-kt-form .hm-kt-set { display: block; min-width: 0; border: 0; }
.hm-kt-form .field label, .hm-kt-form legend { color: var(--i2); font: var(--t13); letter-spacing: 0; }
.hm-kt-form legend { display: block; margin-bottom: 6px; }
.hm-kt-form .field .req { color: var(--i3); }
.hm-kt-form .input, .hm-kt-form .textarea, .hm-kt-form .select { display: block; width: 100%; min-height: 44px; padding: 8px 12px; border: var(--hr) solid var(--l2); border-radius: 10px; background-color: #0A0A0A; color: #fff; font: var(--t16); letter-spacing: -.004em; caret-color: #fff; scroll-margin-block: 24px; transition: border-color 120ms linear; }
.hm-kt-form .input::placeholder, .hm-kt-form .textarea::placeholder { color: var(--i3); opacity: 1; }
.hm-kt-form .textarea { min-height: 128px; padding-block: 9px; resize: vertical; }
.hm-kt-form .select { padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.75 6 8 10.25 12.25 6' fill='none' stroke='%23fff' stroke-opacity='.56' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; cursor: pointer; }
.hm-kt-form .select option { background: #1A1A1A; color: #fff; }
/* Focus is a white ring on the field's edge, clear of the blue glow style.css draws from --accent-soft. A text field shows it however it got focus. */
.hm-kt-form .input:focus, .hm-kt-form .textarea:focus, .hm-kt-form .select:focus { border-color: var(--l2); box-shadow: none; }
.hm-kt-form .input:focus, .hm-kt-form .textarea:focus, .hm-kt-form .select:focus-visible { outline: 2px solid #fff; outline-offset: 0; }
/* The browser's autofill must not paint a field blue or yellow on the black plane. */
.hm-kt-form .input:-webkit-autofill, .hm-kt-form .input:-webkit-autofill:hover, .hm-kt-form .input:-webkit-autofill:focus { -webkit-text-fill-color: #fff; caret-color: #fff; -webkit-box-shadow: inset 0 0 0 100px #0A0A0A !important; transition: background-color 9999s linear; }

/* Errors are red because the red says something. */
.hm-kt-form .field--invalid .input, .hm-kt-form .field--invalid .textarea { border-color: #FF7A7A; box-shadow: inset 0 0 0 calc(1px - var(--hr)) #FF7A7A; }
.hm-kt-form .field__err { color: #FF7A7A; font: var(--t13); letter-spacing: 0; }

/* Chips: quiet outline pills, the chosen ones in the primary pill's white. */
.hm-kt-form .chips { gap: 6px; }
.hm-kt-form .chip { display: inline-flex; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
/* The checkbox lies over the whole chip, so Tab scrolls the whole chip into view, not its corner. */
.hm-kt-form .chip input { inset: 0; width: 100%; height: 100%; margin: 0; scroll-margin-block: 24px; }
.hm-kt-form .chip span { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border: 0; border-radius: 999px; box-shadow: inset 0 0 0 var(--hr) var(--l2); color: var(--i2); font: 500 .8125rem/1.25rem var(--f); letter-spacing: 0; transition: background-color 120ms linear, color 120ms linear, box-shadow 120ms linear, transform 180ms var(--e1); }
.hm-kt-form .chip input:checked + span { background: #fff; box-shadow: none; color: #0A0A0A; }
.hm-kt-form .chip input:focus-visible + span { outline: 2px solid #fff; outline-offset: 2px; }
.hm-kt-form .chip:active span { transform: scale(.97); transition: none; }

/* The one action. While it is busy the white pill steps back into the plate, the label and the spinner turn white: it cannot be pressed and it says so. */
.hm-kt-send { border: 0; }
.hm-kt-send .spinner { flex: none; width: 16px; height: 16px; margin-right: 4px; border: 2px solid rgba(255, 255, 255, .28); border-top-color: #fff; }
.hm-kt-send:disabled { background: #2E2E2E; color: #fff; cursor: default; transition: none; }
.hm-kt-send:disabled:active { transform: none; opacity: 1; }

/* What the form answers. Above the pill, so it appears where the eye already is. It stays rendered while empty, so screen readers announce it. */
.hm-kt-form .form__status { display: block; height: 0; overflow: hidden; padding: 0; border: 0; border-radius: 0; background: none; font: var(--t16); letter-spacing: -.004em; scroll-margin-block: 24px; }
.hm-kt-form .form__status.is-visible { height: auto; margin-bottom: 16px; overflow: visible; }
.hm-kt-form .form__status.is-ok { border: 0; background: none; color: #fff; }
.hm-kt-form .form__status.is-err { border: 0; background: none; color: #FF7A7A; }
.hm-kt-form .form__status a { border-radius: 2px; font-weight: 400; text-decoration-thickness: 1px; text-underline-offset: 3px; }
/* An old thank you must not stand next to new field errors: app.js returns before it clears the status. */
.hm-kt-form:has(.field--invalid) .form__status.is-ok { display: none; }

@media (min-width: 800px) {
  .hm-kt-obj { margin-top: 56px; }
  .hm-kt-fields { padding: 28px 32px 24px; }
  .hm-kt-foot { padding: 24px 32px 28px; }
}

/* A narrow window: the facts under the form, in two columns on the page's seam. */
@media (min-width: 800px) and (max-width: 1149px) {
  .hm-kt-info { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; align-items: start; margin-top: 32px; }
  .hm-kt-info .hm-rows { grid-row: 1 / span 2; }
  .hm-kt-info .hm-rows > div { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
  .hm-kt-info .hm-list { margin-top: 0; }
}

/* The split. Left column and plate share top and bottom, as the AI block on the home page. The plate starts on the H1's capitals (11.6 px below its line box at this size). */
@media (min-width: 1150px) {
  .hm-kt { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: auto 1fr; column-gap: 12px; }
  .hm-kt-intro { grid-column: 1 / span 5; grid-row: 1; }
  .hm-kt-info { grid-column: 1 / span 5; grid-row: 2; align-self: end; margin: 40px 0 -6px; }
  .hm-kt-obj { grid-column: 7 / -1; grid-row: 1 / span 2; margin-top: 12px; }
  /* Label and value on the 12 column seams: label in columns 1 and 2, value in 3 to 5. */
  .hm-kt-info .hm-rows > div { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .hm-kt-info .hm-rows dt { grid-column: span 2; }
  .hm-kt-info .hm-rows dd { grid-column: span 3; }
}

@media (hover: hover) {
  .hm-rows a:hover, .hm-faq__list a:hover { color: var(--i2); }
  .hm-kt-form .input:hover, .hm-kt-form .textarea:hover, .hm-kt-form .select:hover { border-color: rgba(255, 255, 255, .34); }
  .hm-kt-form .field--invalid .input:hover, .hm-kt-form .field--invalid .textarea:hover { border-color: #FF7A7A; }
  .hm-kt-form .chip span:hover { box-shadow: inset 0 0 0 var(--hr) rgba(255, 255, 255, .34); color: #fff; }
  .hm-kt-form .chip input:checked + span:hover { background: #E2E2E2; box-shadow: none; color: #0A0A0A; }
  .hm-kt-send:disabled:hover { background: #2E2E2E; }
}
.hm-rows a:active, .hm-faq__list a:active { color: var(--i3); transition: none; }

@media (pointer: coarse) {
  .hm-kt-form .chip span { min-height: 44px; padding: 0 14px; }
  .hm-rows a { padding: 11px 0; margin: -11px 0; }
  .hm-faq__list a, .hm-kt-form .form__status a { padding: 4px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hm-kt-form .chip:active span { transform: none; opacity: .7; }
}
@media (forced-colors: active) {
  .hm-kt-form .chip span { border: 1px solid ButtonText; }
  .hm-kt-form .chip input:checked + span { forced-color-adjust: none; background: Highlight; color: HighlightText; }
  .hm-kt-form .field--invalid .input, .hm-kt-form .field--invalid .textarea { border: 2px solid LinkText; }
  .hm-kt-send .spinner { border-color: ButtonText; border-top-color: Canvas; }
}
@media print {
  .hm-kt-form .input, .hm-kt-form .textarea, .hm-kt-form .select { border: 1px solid #999; background: none; }
  .hm-kt-form .chip span { box-shadow: inset 0 0 0 1px #999; }
  .hm-kt-info { margin-top: 24px; }
  .hm-kt-send { border: 1px solid #000; }
}
