/* The contact page: the message form and the other ways to reach the shop (src/pages/contact/index.html,
   src/assets/js/contact.js). Fields, labels and the hidden trap field come from site.css; this adds the layout,
   the topic chips, the error and hint lines, and the sent and couldn't-send states. Errors never rely on color
   alone: the line under the field turns dashed and the message is written out beside a mark. */
.cx { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(34px, 6vw, 96px); align-items: start; margin-top: clamp(26px, 4vw, 52px); }
.cx__h { margin: 0 0 clamp(14px, 2vw, 22px); font: 800 .72rem/1.3 var(--sans); letter-spacing: .2em; text-transform: uppercase; }
.cx__nojs { display: none; color: var(--ink-2); max-width: 34em; }
.no-js .cx__nojs { display: block; }
.no-js .cf { display: none; }

/* the form */
.cf { display: grid; gap: clamp(22px, 2.6vw, 30px); }
.cf__pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(22px, 2.6vw, 30px) 26px; }
.cf__f { min-width: 0; }
.cf input[type="url"] {
  width: 100%; background: transparent; color: var(--ink); border: 0; border-bottom: 2px solid var(--ink-3); border-radius: 0;
  font: 500 1rem/1.3 var(--sans); padding: .75em .1em;
}
.cf input, .cf textarea { min-height: 48px; }
.cf input[type="url"]:focus { outline: none; border-color: var(--ink); box-shadow: 0 2px 0 var(--ink); }
.cf textarea { display: block; resize: vertical; min-height: 9.5em; line-height: 1.55; border: 2px solid var(--ink-3); border-radius: 12px; padding: .85em 1em; background: var(--stock-2); }
.cf textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.cf [aria-invalid="true"] { border-bottom-style: dashed; border-color: var(--ink); }
.cf textarea[aria-invalid="true"] { border-style: dashed; }
.cf__opt { letter-spacing: .08em; text-transform: none; font-weight: 600; color: var(--ink-3); }
.cf__hint { margin: 0; color: var(--ink-3); font-size: .86rem; line-height: 1.45; max-width: 40em; }
.cf__hint:empty { display: none; }
.cf__err { margin: 0; font-size: .88rem; font-weight: 600; line-height: 1.4; color: var(--ink); }
.cf__err:empty { display: none; }
.cf__err::before { content: "!"; display: inline-grid; place-items: center; width: 1.25em; height: 1.25em; margin-right: .5em; border-radius: 50%; background: var(--ink); color: var(--stock); font: 800 .72em/1 var(--sans); vertical-align: .12em; }
.cf__under { display: flex; justify-content: space-between; gap: 6px 18px; flex-wrap: wrap; }
.cf__under:has(> :not(:empty)) { margin-top: 2px; }
.cf__count { margin: 0 0 0 auto; font-size: .8rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.cf__count:empty { display: none; }
.cf__alt { margin: 4px 0 0; font-size: .9rem; line-height: 1.45; color: var(--ink-2); }
.cf__alt a { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; text-decoration-color: var(--ink-3); overflow-wrap: anywhere; }
.cf__alt a:hover { text-decoration-color: var(--ink); }

/* what it's about: a row of chips, each a real radio button */
.cf__topics { margin: 0; padding: 0; border: 0; display: grid; gap: 10px; }
.cf__topics .legend { padding: 0; margin-bottom: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; display: inline-flex; cursor: pointer; }
.chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; min-height: 44px; padding: .55em 1.05em; border: 1.5px solid var(--line-2); border-radius: 999px;
  font-size: .9rem; font-weight: 600; line-height: 1.25; color: var(--ink-2); transition: border-color .15s, background-color .15s, color .15s;
}
.chip:hover span { border-color: var(--ink); color: var(--ink); }
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--stock); }
.chip input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 3px; }
.cf__topics:has([aria-invalid="true"]) .chip span { border-style: dashed; border-color: var(--ink-3); }

/* sending, and what is said when it couldn't be sent */
.cf__go { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; }
.cf__go .btn { min-height: 52px; }
.cf__go .note { margin: 0; min-height: 0; color: var(--ink-2); }
.cf[aria-busy="true"] .btn { cursor: progress; }
.cf__fail:empty { display: none; }
.cf__fail { padding: 16px 18px 16px 16px; border: 2px solid var(--ink); border-left-width: 6px; border-radius: 12px; background: var(--stock-2); color: var(--ink-2); line-height: 1.5; }
.cf__fail b { display: block; color: var(--ink); font: 700 1.08rem/1.3 var(--display); margin-bottom: 4px; }
.cf__fail a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; overflow-wrap: anywhere; }
.cf__fine { margin: -6px 0 0; font-size: .84rem; color: var(--ink-3); }
.cf__fine .link { color: var(--ink-2); }

/* sent */
.cf-done { padding: clamp(24px, 3.4vw, 40px); border: 3px solid var(--ink); border-radius: 20px; background: var(--stock-2); position: relative; }
.cf-done::after { content: ""; position: absolute; inset: 4px; border: 1.5px solid var(--ink); border-radius: 14px; pointer-events: none; }
.cf-done__h { font-size: clamp(2rem, 4.2vw, 3.2rem); line-height: 1.05; margin: .25em 0 .35em; overflow-wrap: anywhere; }
.cf-done__h:focus { outline: none; }
.cf-done__p { color: var(--ink-2); max-width: 32em; margin: 0 0 24px; }
.cf-done__p b { color: var(--ink); overflow-wrap: anywhere; }
.cf-done .btn { position: relative; z-index: 1; }

/* the other ways to reach the shop */
.cx__ways { display: grid; gap: 0; border-top: 3px solid var(--ink); padding-top: clamp(14px, 2vw, 20px); }
.way { padding: 18px 0 22px; border-bottom: 1px solid var(--line-2); display: grid; gap: 6px; justify-items: start; min-width: 0; }
.way__k { margin: 0; font: 800 .68rem/1.3 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); }
.way__v { margin: 0; font: 700 clamp(1.25rem, 2vw, 1.6rem)/1.2 var(--display); overflow-wrap: anywhere; max-width: 100%; }
a.way__v { font-size: clamp(1.02rem, 1.42vw, 1.28rem); line-height: 1.35; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 5px; text-decoration-color: var(--ink-3); }
a.way__v:hover { text-decoration-color: var(--ink); }
.way__digits { margin: -2px 0 0; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.way__note { margin: 4px 0 0; color: var(--ink-3); font-size: .9rem; line-height: 1.45; max-width: 26em; }
.way__go { margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 4px 28px; }
.way__go .textlink { display: inline-flex; align-items: flex-end; min-height: 44px; }

@media (max-width: 900px) {
  .cx { grid-template-columns: minmax(0, 1fr); }
  .cx__ways { max-width: 560px; }
}
@media (max-width: 600px) {
  .cf__pair { grid-template-columns: minmax(0, 1fr); }
  .chip span { font-size: .86rem; }
  .cf__go .btn { width: 100%; }
}
