/*
 * STRUCTURE AUDIT — contact.php layouts across Projects
 * — Form left · contact details + map/specimen right (a119 tc-contact, a97 pn-board pinboard, a36)
 * — Split plot / dispatch map + form (enterprise traders)
 * — Centered single card only (minimal shells)
 * — Hero + two-column cards (account-style cousins)
 * — Reach stack ct-reach: topic strip above · slim centered form band · large channel card grid below (a119, a120 prior)
 * — Pigeon-hole wall + mail tray (a104 slots)
 * — CHOSEN (this file co-*): OFFSET_LEDGER — form-first DOM · wide compose tray · in-form intent fieldset · narrow sticky desk ledger rail (visual offset) — not form∥map, not topic-then-form stack, not channel blocks before form
 */

.page-contact {
  overflow-x: clip;
  background: var(--at-canvas);
}

.co-desk {
  padding: var(--at-space-5) 0 var(--at-space-7);
  min-width: 0;
}

.co-desk__wrap {
  min-width: 0;
  max-width: 72rem;
}

.co-desk__band {
  max-width: 52ch;
  margin-bottom: var(--at-space-5);
}

.co-desk__band .ds-title {
  font-size: var(--at-text-xl);
}

.co-desk__stage {
  display: grid;
  gap: var(--at-space-5);
  min-width: 0;
  align-items: start;
}

@media (min-width: 1024px) {
  .co-desk__stage {
    grid-template-columns: minmax(12.5rem, 15rem) minmax(0, 1fr);
    gap: var(--at-space-5) var(--at-space-6);
  }

  .co-compose {
    grid-column: 2;
    grid-row: 1;
  }

  .co-ledger {
    grid-column: 1;
    grid-row: 1;
    position: relative;
  }
}

/* Compose tray */
.co-compose {
  min-width: 0;
}

.co-compose__status {
  margin-bottom: var(--at-space-3);
  padding: var(--at-space-3) var(--at-space-4);
  font-size: var(--at-text-sm);
  border: 1px solid var(--at-line);
}

.co-compose__status.is-success {
  border-color: color-mix(in srgb, var(--at-moss) 45%, transparent);
  background: color-mix(in srgb, var(--at-moss) 12%, var(--at-surface));
}

.co-compose__status.is-error {
  border-color: color-mix(in srgb, var(--at-terra) 45%, transparent);
  background: color-mix(in srgb, var(--at-terra) 12%, var(--at-surface));
}

.co-compose__status strong {
  display: block;
  margin-bottom: 0.25rem;
}

.co-compose__panel {
  padding: var(--at-space-4);
  min-width: 0;
  border: 1px solid var(--at-line);
}

@media (min-width: 768px) {
  .co-compose__panel {
    padding: var(--at-space-5);
  }
}

.co-compose__head .ds-title {
  font-size: var(--at-text-lg);
  margin: 0 0 0.25rem;
}

.co-compose__head .ds-lede {
  margin: 0;
  font-size: var(--at-text-sm);
}

.co-compose__grid {
  display: grid;
  gap: var(--at-space-4);
  margin-top: var(--at-space-4);
  min-width: 0;
}

@media (min-width: 768px) {
  .co-compose__grid {
    grid-template-columns: minmax(9rem, 11rem) minmax(0, 1fr);
    gap: var(--at-space-5);
    align-items: start;
  }
}

.co-compose__intent {
  margin: 0;
  padding: 0;
  border: none;
  min-width: 0;
}

.co-compose__intent-legend {
  font-family: var(--at-font-ui);
  font-size: var(--at-text-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--at-ink-soft);
  margin-bottom: var(--at-space-2);
  padding: 0;
}

.co-compose__intent-list {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.15rem;
}

@media (min-width: 768px) {
  .co-compose__intent-list {
    flex-direction: column;
    flex-wrap: nowrap;
    overflow: visible;
    padding-bottom: 0;
  }
}

.co-compose__intent-btn {
  flex: 0 0 auto;
  min-height: 2.75rem;
  padding: 0.5rem 0.85rem;
  border-radius: var(--at-radius-sm);
  border: 1px solid var(--at-line);
  background: var(--at-surface);
  font-family: var(--at-font-ui);
  font-size: var(--at-text-sm);
  font-weight: 700;
  cursor: pointer;
  color: var(--at-ink);
  text-align: left;
  width: 100%;
}

@media (max-width: 767px) {
  .co-compose__intent-btn {
    width: auto;
    border-radius: var(--at-radius-pill);
  }
}

.co-compose__intent-btn.is-active {
  border-color: var(--at-moss);
  background: color-mix(in srgb, var(--at-moss) 10%, var(--at-surface));
  box-shadow: inset 3px 0 0 var(--at-terra);
}

.co-compose__fields {
  min-width: 0;
  display: grid;
  gap: var(--at-space-3);
}

.co-compose__fieldset {
  margin: 0;
  padding: 0;
  border: none;
  display: grid;
  gap: var(--at-space-3);
  min-width: 0;
}

.co-compose__field {
  display: grid;
  gap: 0.35rem;
  font-size: var(--at-text-sm);
  font-weight: 600;
  min-width: 0;
}

.co-compose__field span {
  font-family: var(--at-font-ui);
  font-size: var(--at-text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--at-ink-soft);
}

.co-compose__field .ds-input {
  width: 100%;
  min-height: 2.75rem;
  min-width: 0;
}

.co-compose__field textarea.ds-input {
  min-height: 7rem;
  resize: vertical;
  line-height: 1.45;
}

.co-compose__form.is-client-error .ds-input:invalid,
.co-compose__form.is-error .ds-input[aria-invalid="true"] {
  border-color: var(--at-terra);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--at-terra) 22%, transparent);
}

.co-compose__hint {
  margin: 0;
  font-size: var(--at-text-sm);
  font-weight: 600;
  color: var(--at-terra);
}

.co-compose__hint[hidden] {
  display: none;
}

.co-compose__submit {
  width: 100%;
  min-height: 2.75rem;
  justify-content: center;
}

.co-compose__submit.is-pressing {
  opacity: 0.85;
}

.co-compose__form.is-success .co-compose__submit {
  pointer-events: none;
}

/* Desk ledger rail */
.co-ledger {
  min-width: 0;
  padding: var(--at-space-4);
  border: 1px solid var(--at-line);
  border-radius: var(--at-radius-md);
  background: var(--at-surface);
}

.co-ledger__list {
  margin: var(--at-space-3) 0 0;
  padding: 0;
  min-width: 0;
}

.co-ledger__row {
  display: grid;
  gap: 0.2rem;
  padding: var(--at-space-3) 0;
  border-top: 1px dashed var(--at-line);
  min-width: 0;
}

.co-ledger__row:first-child {
  border-top: none;
  padding-top: 0;
}

.co-ledger__row dt {
  font-family: var(--at-font-ui);
  font-size: var(--at-text-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--at-ink-soft);
  margin: 0;
}

.co-ledger__row dd {
  margin: 0;
  font-size: var(--at-text-sm);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.co-ledger__row dd a {
  color: var(--at-moss);
  font-weight: 700;
}

.co-ledger__plain {
  display: block;
  font-weight: 600;
  color: var(--at-ink);
}

.co-ledger__meta {
  display: block;
  margin-top: 0.35rem;
  font-size: var(--at-text-xs);
  color: var(--at-ink-soft);
}

.co-ledger__action {
  margin-top: var(--at-space-2);
  width: 100%;
  min-height: 2.75rem;
  justify-content: center;
}

.co-ledger__quick {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: var(--at-space-4);
  padding-top: var(--at-space-3);
  border-top: 1px solid var(--at-line);
}

.co-ledger__quick .ds-btn {
  min-height: 2.75rem;
  width: 100%;
  justify-content: center;
}

@media (min-width: 768px) and (max-width: 1023px) {
  .co-ledger__quick {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .co-ledger__quick .ds-btn {
    flex: 1 1 8rem;
    width: auto;
  }
}

@media (max-width: 359px) {
  .co-ledger__quick .ds-btn {
    width: 100%;
  }
}
