/* Ecoverity — enquiry form (contact.html only). Loaded after style.css, so it uses the site's colours and fonts
   (--paper, --ink, --muted, --rule, --accent, --tint, --display, --body, --mono) and adds only what the form needs.
   All styling lives here: the page's security policy blocks inline styles. Raise ?v= in contact.html after a change
   (Cloudflare keeps .css files for 4 hours). */

:root {
  --field: #FFFFFF;          /* inputs and the brief */
  --field-border: #7D8982;   /* 3.5:1 against the page: the visible edge of an input (WCAG non-text contrast) */
  --error: #8A1F1A;
}

[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
html { scroll-padding-top: 24px; }
::selection { background: var(--ink); color: var(--paper); }

nav a[aria-current="page"] { color: var(--accent); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }

/* Frame: one column of about 760px, aligned with the wordmark */
.enquiry .column { max-width: 760px; padding-top: clamp(40px, 7vw, 80px); padding-bottom: clamp(56px, 8vw, 96px); }
.enquiry section { border-top: 0; }
.enquiry p { max-width: none; }

.eyebrow { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.eyebrow::before { content: ""; width: 32px; height: 1px; background: var(--muted); }
.enquiry h1 { font-size: clamp(36px, 5.4vw, 56px); margin-bottom: 22px; }
.enquiry h1 em { color: var(--accent); font-style: italic; }
.nowrap { white-space: nowrap; }   /* keeps "well-posed" from breaking at its hyphen on a phone */
.lede { font-size: 19px; line-height: 1.55; color: var(--muted); margin-bottom: 16px; }
.lede-meta { margin: 0; }
.preview-banner { margin-top: 26px; padding: 12px 16px; border: 1px solid var(--field-border); background: var(--tint); font-family: var(--mono); font-size: 13px; color: var(--ink); }

/* Shown only if the script has not started after two seconds (JavaScript off, or contact.js blocked). */
.js-needed { margin-top: 40px; padding: 14px 16px; border-left: 2px solid var(--accent); background: var(--tint); animation: js-needed-show 0s linear 2s both; }
@keyframes js-needed-show { from { visibility: hidden; } to { visibility: visible; } }

.closed-panel { margin-top: 48px; border-top: 2px solid var(--accent); padding-top: 22px; }
.closed-panel p { color: var(--muted); }

/* Progress */
.progress { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 52px 0 40px; padding: 0; }
.progress li { border-top: 1px solid var(--rule); padding-top: 10px; font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.progress li[aria-current="step"] { border-top: 2px solid var(--accent); padding-top: 9px; color: var(--accent); }
.progress li.done { color: var(--ink); }
.progress b { font-weight: 500; margin-right: 8px; }

/* Steps */
.enquiry fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.enquiry fieldset.field { margin-top: 26px; }   /* the rule above would otherwise cancel .field's spacing */
.enquiry legend { padding: 0; }
.step-title { font-size: clamp(28px, 4vw, 38px); line-height: 1.12; letter-spacing: -0.015em; margin-bottom: 10px; }
.step-title:focus { outline: none; }
.step-intro { color: var(--muted); margin-bottom: 24px; }

/* Choices */
.choice { display: flex; gap: 16px; align-items: flex-start; border-top: 1px solid var(--rule); padding: 16px 8px; cursor: pointer; }
.choice:last-of-type { border-bottom: 1px solid var(--rule); }
.choice input { width: 20px; height: 20px; margin: 5px 0 0; flex: none; accent-color: var(--accent); }
.choice strong { display: block; font-family: var(--display); font-weight: 500; font-size: 21px; line-height: 1.3; }
.choice small { display: block; font-size: 15px; color: var(--muted); margin-top: 2px; }
.choice:has(input:checked) { background: var(--tint); }
.choice:hover strong { color: var(--accent); }

.first-question { margin-top: 28px; padding: 4px 0 4px 22px; border-left: 2px solid var(--accent); }
.first-question .label { display: block; margin-bottom: 6px; }
.first-question p { font-family: var(--display); font-style: italic; font-weight: 400; font-size: 24px; line-height: 1.3; color: var(--accent); }

/* Fields */
.field { margin-top: 26px; }
.field > label, .sub-legend { display: block; font-weight: 600; font-size: 17px; margin-bottom: 4px; }
.opt { font-weight: 400; color: var(--muted); font-size: 15px; }
.hint { font-size: 15px; color: var(--muted); margin-bottom: 8px; }
.enquiry input[type=text], .enquiry input[type=email], .enquiry select, .enquiry textarea {
  width: 100%; font: inherit; font-size: 17px; color: var(--ink); background: var(--field);
  border: 1px solid var(--field-border); border-radius: 2px; padding: 11px 13px; min-height: 48px;
}
.enquiry textarea { min-height: 132px; resize: vertical; line-height: 1.55; }
.enquiry #premortem { min-height: 96px; }
.enquiry textarea::placeholder, .enquiry input::placeholder { color: var(--muted); opacity: 1; }
.enquiry input:focus, .enquiry select:focus, .enquiry textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.enquiry [aria-invalid="true"] { border-color: var(--error) !important; }
.count { font-family: var(--mono); font-size: 12px; color: var(--muted); text-align: right; margin-top: 4px; }
.error { color: var(--error); font-size: 15px; margin-top: 6px; }
.error:focus { outline: none; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 24px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chip span { display: inline-block; font-size: 15px; padding: 9px 14px; border: 1px solid var(--field-border); border-radius: 2px; background: var(--field); min-height: 44px; line-height: 24px; }
.chip input:checked + span { background: var(--accent); color: #fff; border-color: var(--accent); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
details.more { margin-top: 30px; border-top: 1px solid var(--rule); }
details.more summary { cursor: pointer; padding: 14px 0; font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); min-height: 44px; }
details.more summary .opt { font-family: var(--body); text-transform: none; letter-spacing: 0; }
.privacy-note { font-size: 15px; color: var(--muted); margin-top: 22px; padding-left: 14px; border-left: 1px solid var(--field-border); }
.privacy-note strong { color: var(--ink); font-weight: 600; }

/* Buttons: the site's green button and plain link */
.enquiry .actions { margin-top: 36px; gap: 14px 26px; }
.btn { display: inline-block; font-family: var(--body); font-weight: 500; font-size: 16px; line-height: 1.5; background: var(--accent); color: #fff; border: 0; border-radius: 2px; padding: 12px 20px; min-height: 48px; cursor: pointer; }
.btn:hover { background: var(--ink); }
.btn[aria-disabled="true"] { opacity: 0.6; cursor: progress; }
.link-btn { font-family: var(--body); font-weight: 500; font-size: 16px; background: none; border: 0; color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; cursor: pointer; padding: 10px 0; min-height: 44px; }
.link-btn:hover { text-decoration-thickness: 2px; }

/* Brief */
.brief { background: var(--field); border: 1px solid var(--rule); padding: 30px 32px; margin-bottom: 8px; }
.brief-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; border-bottom: 1px solid var(--ink); padding-bottom: 12px; margin-bottom: 8px; }
.brief-head .t { font-family: var(--display); font-size: 24px; font-weight: 560; letter-spacing: -0.01em; }
.brief-head .t span { color: var(--accent); }
.brief dl > div { grid-template-columns: 170px minmax(0, 1fr); gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.brief dl > div:first-child { border-top: 0; }
.brief dt { font-family: var(--mono); font-size: 12px; font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding-top: 4px; }
.brief dd { color: var(--ink); font-size: 17px; white-space: pre-wrap; overflow-wrap: anywhere; }
.sceptic { margin-top: 26px; }
.sceptic h3 { margin-bottom: 4px; }
.sceptic .sub { font-size: 15px; color: var(--muted); margin-bottom: 12px; }
.sceptic ol { list-style: none; counter-reset: q; margin: 0; padding: 0; }
.sceptic li { counter-increment: q; display: grid; grid-template-columns: 34px minmax(0, 1fr); padding: 10px 0; border-top: 1px solid var(--rule); font-family: var(--display); font-style: italic; font-size: 19px; line-height: 1.4; }
.sceptic li::before { content: counter(q, decimal-leading-zero); font-family: var(--mono); font-style: normal; font-size: 12px; color: var(--muted); padding-top: 5px; }
.brief-tools { display: flex; gap: 4px 22px; flex-wrap: wrap; margin: 6px 0 40px; }
.copy-fallback textarea { margin-top: 8px; font-family: var(--mono); font-size: 13px; }
.send-heading { font-size: 28px; margin: 8px 0 4px; }
.sent-note { font-family: var(--mono); font-size: 13px; letter-spacing: 0.06em; color: var(--accent); border-top: 2px solid var(--accent); padding-top: 14px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.turnstile-box { margin-top: 24px; min-height: 65px; }

/* Done */
.done-box { border-top: 2px solid var(--accent); padding-top: 22px; }
.ref { font-family: var(--mono); font-size: 13px; letter-spacing: 0.06em; color: var(--muted); margin: 6px 0 18px; }
.email-preview { margin-top: 30px; border: 1px dashed var(--field-border); background: var(--field); padding: 20px 22px; }
.email-preview .label { display: block; margin-bottom: 10px; }
.email-preview pre { margin: 0; font-family: var(--mono); font-size: 13px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); }
.email-preview .subj { font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--ink); margin-bottom: 12px; overflow-wrap: anywhere; }

@media (max-width: 640px) {
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .brief { padding: 22px 18px; }
  .brief dl > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .progress { gap: 10px; }
  .progress li { font-size: 11px; letter-spacing: 0.04em; }
  .choice strong { font-size: 19px; }
}

@media print {
  .masthead, footer, .progress, .intro-block, .js-needed, .actions, .brief-tools, .send-block, .sent-note,
  .preview-banner, .step:not(#step-3), #step-3 > .step-title, #step-3 > .step-intro { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .enquiry .column { padding: 0; max-width: none; }
  .brief { border: 0; padding: 0; background: #fff; }
}
