/* ==========================================================================
   Keelwick Planning — the first-meeting enquiry form's CSS (a demonstration).

   Loaded AFTER assets/css/site.css by the page that mounts the form. EVERY
   RULE IS SCOPED UNDER `.enq` and every class is `enq-`, so no marketing
   component reaches a form control and no form rule reaches a marketing page.
   Every colour is one of site.css's own `:root` tokens.

   THE RULES THIS SHEET KEEPS
     - radios keep their natural width; a label wraps beside its control and
       never squeezes to one word per line at 320 px;
     - text on its own ground at 4.5:1 or better (ink, body and muted on paper
       and bone; white on the button's evergreen);
     - a box the server named is marked WITHOUT its colour: a heavier border,
       a left rule on a choice group, and `aria-invalid` for a screen reader;
     - `[hidden]` hides (a display rule must not outrank it) — the form is
       printed hidden and enquiry.js removes the attribute.
   ========================================================================== */

.enq [hidden] { display: none !important; }
.enq { color: var(--body); font-family: var(--sans); }

/* ------------------------------------------------------------ headings and text */
.enq .enq-h { font-family: var(--serif); color: var(--ink); font-size: clamp(1.35rem, 3.4vw, 1.75rem); line-height: 1.2; margin: 0 0 .7rem; }
.enq .enq-lead { color: var(--ink); line-height: 1.6; margin: 0 0 1.2rem; max-width: 60ch; }
.enq .enq-help { font-size: .9rem; color: var(--muted); line-height: 1.5; margin: 0; }
.enq .enq-fine { font-size: .9rem; color: var(--muted); line-height: 1.6; margin: .9rem 0 0; max-width: 62ch; }
.enq .enq-fine--demo { margin-top: .5rem; color: var(--ink); }
.enq .enq-opt { font-weight: 400; color: var(--muted); }
.enq .enq-noscript { color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--seal-dk); border-radius: var(--r); padding: .8rem 1rem; line-height: 1.55; margin: 0; }

/* ------------------------------------------------------------ the form */
.enq .enq-card { background: var(--bone); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(1.1rem, 3vw, 1.8rem); }
.enq .enq-card:focus-within { border-color: var(--line-2); }
.enq .enq-grid { display: grid; grid-template-columns: 1fr; gap: .1rem 1.2rem; }
@media (min-width: 680px) { .enq .enq-grid { grid-template-columns: 1fr 1fr; } }
.enq .enq-field { display: flex; flex-direction: column; gap: .3rem; margin: 0 0 1rem; min-width: 0; }
.enq .enq-field > label { font-weight: 600; color: var(--ink); font-size: .95rem; line-height: 1.35; }
.enq .enq-field input,
.enq .enq-field select {
  font: inherit; color: var(--body); background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--r);
  padding: .62rem .7rem; width: 100%; box-sizing: border-box; min-height: 2.75rem;
}
.enq .enq-field select { appearance: auto; }
.enq .enq-field input:focus-visible,
.enq .enq-field select:focus-visible { outline: 3px solid var(--seal-dk); outline-offset: 1px; }
.enq .enq-field.enq-bad input,
.enq .enq-field.enq-bad select { border-color: var(--signal); border-width: 2px; padding: calc(.62rem - 1px) calc(.7rem - 1px); }
.enq .enq-field.enq-bad > label { color: var(--signal); }

/* ------------------------------------------------------------ choice groups */
.enq .enq-set { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--paper); padding: .8rem 1rem 1rem; margin: 0 0 1rem; min-width: 0; }
.enq .enq-set > legend { font-weight: 600; color: var(--ink); font-size: .95rem; line-height: 1.35; padding: 0 .3rem; max-width: 100%; white-space: normal; }
.enq .enq-set.enq-bad { border-color: var(--signal); border-width: 2px; border-left-width: 6px; padding: calc(.8rem - 1px) calc(1rem - 1px) calc(1rem - 1px); }
.enq .enq-set.enq-bad > legend { color: var(--signal); }
.enq .enq-choices { display: flex; flex-wrap: wrap; gap: .45rem .5rem; margin-top: .2rem; }
.enq .enq-choice {
  display: flex; align-items: center; gap: .55rem; cursor: pointer;
  padding: .5rem .8rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper);
  color: var(--body); line-height: 1.35; min-width: 0; min-height: 2.75rem; box-sizing: border-box;
}
.enq .enq-choice:hover { border-color: var(--line-2); background: var(--bone); }
.enq .enq-choice input { flex: 0 0 auto; width: auto; height: auto; margin: 0; accent-color: var(--seal-dk); }
.enq .enq-choice span { flex: 1 1 auto; min-width: 0; overflow-wrap: break-word; }
.enq .enq-choice:has(input:checked) { border-color: var(--seal-dk); background: var(--seal-lt); }
.enq .enq-choice:has(input:focus-visible) { outline: 3px solid var(--seal-dk); outline-offset: 2px; }

/* ------------------------------------------------------------ the honeypot
   out of sight and out of the tab order, never display:none (some bots skip those) */
.enq .enq-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ------------------------------------------------------------ refusals */
.enq .enq-alert {
  font-size: 1rem; line-height: 1.55; color: var(--ink); background: var(--signal-lt);
  border: 1px solid var(--signal); border-left: 6px solid var(--signal); border-radius: var(--r); padding: .75rem 1rem; margin: 0 0 1.1rem;
}
.enq .enq-alert:focus { outline: none; }
.enq .enq-alert:focus-visible { outline: 3px solid var(--seal-dk); outline-offset: 2px; }

/* ------------------------------------------------------------ the button */
.enq .enq-actions { display: flex; flex-wrap: wrap; gap: .7rem 1rem; align-items: center; margin: 1.2rem 0 0; }
.enq .enq-btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-size: 1rem; font-weight: 600; letter-spacing: .005em;
  padding: .85rem 1.6rem; min-height: 2.9rem; border-radius: var(--r); border: 1px solid var(--char);
  background: var(--char); color: #fff; cursor: pointer; text-align: center;
  transition: background-color .18s, border-color .18s, transform .18s;
}
.enq .enq-btn:hover { background: var(--char-2); border-color: var(--char-2); }
.enq .enq-btn:active { transform: translateY(1px); }
.enq .enq-btn:focus-visible { outline: 3px solid var(--seal-dk); outline-offset: 3px; }
.enq .enq-btn[disabled] { opacity: .6; cursor: progress; }
@media (max-width: 420px) { .enq .enq-btn { width: 100%; white-space: normal; } }
.enq .enq-status { margin: 0; font-size: .95rem; color: var(--muted); min-height: 1.4em; }

/* ------------------------------------------------------------ sent */
.enq .enq-sent { background: var(--cool-lt); border: 1px solid var(--line); border-left: 6px solid var(--char-2); border-radius: var(--r-lg); padding: clamp(1.1rem, 3vw, 1.8rem); color: var(--cool-ink); }
.enq .enq-sent:focus { outline: none; }
.enq .enq-sent:focus-visible { outline: 3px solid var(--seal-dk); outline-offset: 3px; }
.enq .enq-sent .enq-h { color: var(--cool-strong); }
.enq .enq-sent p { margin: 0; line-height: 1.6; max-width: 60ch; }
.enq .enq-ref { font-variant-numeric: tabular-nums; letter-spacing: .03em; color: var(--cool-strong); white-space: nowrap; }

/* ------------------------------------------------------------ reduced motion */
@media (prefers-reduced-motion: reduce) { .enq .enq-btn { transition: none; } .enq .enq-btn:active { transform: none; } }

/* the form element itself: the card (.enq-card) carries the ground; the form only stacks its fields (lead, 2026-10-03) */
.enq-form { margin: 0; }
