/*
 * Ascent enquiry form — the "Quiet" direction (chosen 2026-09-25).
 *
 * Its own stylesheet, which is a leftover from when this form was hosted
 * on the Ascent website rather than served by this app. The palette below
 * now matches public/css/style.css exactly, because a participant walks
 * enquiry -> authority -> intake and three visual identities across one
 * journey reads as three different organisations.
 *
 * It had its own moss-and-wheat palette until 2026-09-25. Nothing was
 * wrong with it; it simply was not the same as everything else.
 *
 * The font faces are declared once, in /css/fonts.css, which this page
 * links first. This form makes no third-party requests at all — it
 * collects names, contact details and what supports somebody is seeking —
 * so the files are vendored under /fonts. Until they were, the stack here
 * fell through to Verdana on every visit.
 *
 * WCAG 2.2 AA, measured rather than eyeballed: every pair in the palette
 * clears 4.5:1 for text and 3:1 for the edge of a control.
 */

:root {
  /*
   * The same values as public/css/style.css. The names stay as they were
   * so the 200 lines below did not have to be rewritten to change the
   * look — only what the names point at changed.
   */
  --paper:     #fbfaf8;
  --paper-2:   #ffffff;
  --ink:       #14191f;  /* 16.9:1 on --paper */
  --ink-soft:  #45505f;  /* 7.9:1 on --paper, 8.2:1 on --paper-2 */
  --moss:      #18345a;  /* the navy sampled from the logo; 12.0:1 on --paper */
  --moss-lift: #0f2340;
  /*
   * The default accent on a notice. It was a gold, which read as a
   * highlight against the moss; against navy it would read as a warning,
   * which a neutral notice is not. Amber, at 4.9:1 on paper, so it still
   * carries as an 8px rule rather than disappearing into the border.
   */
  --wheat:     #8a6a12;
  /*
   * Two weights, same rule as public/css/style.css: --stone is a
   * decorative rule, --stone-strong is the edge of a CONTROL, where WCAG
   * 1.4.11 wants 3:1. The single token was 1.42:1 against white, so every
   * text input and button outline on this form was below it.
   */
  --stone:        #ddd8cf;
  --stone-strong: #969188;  /* 3.13:1 on --paper-2, 3.00:1 on --paper */
  --alert:     #a1271b;  /* 7.1:1 on --paper */

  --step: clamp(1rem, 0.6rem + 1.4vw, 1.35rem);
  --gap: clamp(1.25rem, 1rem + 1.5vw, 2rem);
  --radius: 14px;
  --shadow: 0 1px 2px rgba(23, 33, 28, .06), 0 8px 24px -12px rgba(23, 33, 28, .18);

  color-scheme: light;
}

* { box-sizing: border-box }
html { -webkit-text-size-adjust: 100% }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Atkinson Hyperlegible", Verdana, system-ui, sans-serif;
  font-size: var(--step);
  line-height: 1.6;
}

.wrap { max-width: 720px; margin: 0 auto; padding: 0 1.25rem 5rem }

/* ---------- masthead ---------- */
.masthead {
  border-bottom: 1px solid var(--stone);
  background: var(--paper-2);
  padding: 1rem 0;
  margin-bottom: var(--gap);
}
.masthead .wrap { padding-bottom: 0; display: flex; align-items: baseline; gap: .75rem; flex-wrap: wrap }
/* The logo, at the same width as every other form's masthead. */
.mark { width: 7rem; height: auto; display: block }
.mark-sub { font-size: .85rem; color: var(--ink-soft) }

/* ---------- type ---------- */
h1, h2 { font-weight: 700; letter-spacing: -.02em; line-height: 1.15; margin: 0 0 .5rem }
h1 { font-size: clamp(1.9rem, 1.3rem + 2.6vw, 2.9rem) }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.7vw, 2.05rem) }
h2:focus-visible { outline: 3px solid var(--moss); outline-offset: 6px; border-radius: 4px }
h2:focus { outline: none }
.lede { font-size: 1.05em; color: var(--ink-soft); margin: 0 0 var(--gap) }
.help { color: var(--ink-soft); font-size: .95em; margin: .25rem 0 1.25rem }
.eyebrow {
  font-size: .8rem; text-transform: uppercase; letter-spacing: .12em;
  font-weight: 700; color: var(--moss); margin: 0 0 .6rem;
}
.recap-heading { margin-top: 2rem }

/* ---------- landing choice cards ---------- */
.choices { display: grid; gap: 1rem; grid-template-columns: 1fr }
@media (min-width: 620px) { .choices { grid-template-columns: 1fr 1fr } }
.choice {
  display: flex; flex-direction: column;
  background: var(--paper-2);
  border: 2px solid var(--stone);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.choice h3 { font-size: 1.25rem; margin: 0 0 .4rem; letter-spacing: -.01em }
.choice p { margin: 0 0 1rem; color: var(--ink-soft); font-size: .97em; flex: 1 }
.mins {
  display: inline-block; font-size: .8rem; font-weight: 700; color: var(--moss);
  background: rgba(47, 93, 72, .09); border-radius: 999px; padding: .2rem .7rem; margin-bottom: .75rem;
}

/* ---------- buttons ---------- */
.btn {
  font: inherit; font-weight: 700; cursor: pointer;
  border-radius: 10px; padding: .85rem 1.35rem; min-height: 52px;
  border: 2px solid transparent;
  transition: background .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--moss); color: #fff }
.btn-primary:hover { background: var(--moss-lift) }
.btn-ghost { background: transparent; color: var(--moss); border-color: var(--stone-strong) }
.btn-ghost:hover { border-color: var(--moss); background: rgba(47, 93, 72, .06) }
.btn[disabled] { opacity: .6; cursor: default }
.btn-plain {
  background: none; border: none; font: inherit; color: var(--moss);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: .4rem 0;
}
.btn:focus-visible, .btn-plain:focus-visible, a:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--moss); outline-offset: 3px;
}
.actions { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; margin-top: 1.5rem }

/* ---------- progress + answer trail ---------- */
.progress { margin-bottom: 1.25rem }
.progress-meta {
  display: flex; justify-content: space-between; font-size: .85rem;
  color: var(--ink-soft); font-weight: 700; margin-bottom: .4rem;
}
.bar { height: 8px; background: var(--stone); border-radius: 999px; overflow: hidden }
.bar span { display: block; height: 100%; background: var(--moss); border-radius: 999px; transition: width .3s ease }

.trail { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0 0 1.5rem; padding: 0; list-style: none }
.trail li { margin: 0 }
.trail button {
  font: inherit; font-size: .82rem; cursor: pointer;
  background: var(--paper-2); border: 1.5px solid var(--stone-strong); border-radius: 999px;
  padding: .3rem .8rem; color: var(--ink-soft); display: inline-flex; gap: .4rem; align-items: center;
}
.trail button:hover { border-color: var(--moss); color: var(--moss) }
.trail .pencil { font-weight: 700; color: var(--moss) }

/* ---------- option list ---------- */
fieldset { border: none; margin: 0; padding: 0 }
legend { padding: 0 }
.opts { display: grid; gap: .7rem; margin: 0 }
.opt {
  display: flex; align-items: flex-start; gap: .9rem;
  background: var(--paper-2); border: 2px solid var(--stone-strong); border-radius: var(--radius);
  padding: 1rem 1.15rem; min-height: 60px; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.opt:hover { border-color: var(--moss-lift) }
.opt:has(input:checked) { border-color: var(--moss); background: rgba(47, 93, 72, .06) }
.opt:has(input:focus-visible) { outline: 3px solid var(--moss); outline-offset: 3px }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px }
.mark-box {
  flex: 0 0 auto; width: 26px; height: 26px; margin-top: .15rem;
  border: 2px solid var(--ink-soft); background: var(--paper-2);
  display: grid; place-items: center;
}
.opt[data-multi="false"] .mark-box { border-radius: 50% }
.opt[data-multi="true"] .mark-box { border-radius: 6px }
.mark-box::after { content: ""; width: 12px; height: 12px; background: var(--moss); transform: scale(0); transition: transform .12s }
.opt[data-multi="false"] .mark-box::after { border-radius: 50% }
.opt[data-multi="true"] .mark-box::after { border-radius: 3px }
.opt:has(input:checked) .mark-box { border-color: var(--moss) }
.opt:has(input:checked) .mark-box::after { transform: scale(1) }
.opt-text strong { display: block; font-weight: 700 }
.opt-text em { display: block; font-style: normal; color: var(--ink-soft); font-size: .9em; margin-top: .15rem }

/* ---------- text fields ---------- */
.field { margin-bottom: 1.25rem }
.field label { display: block; font-weight: 700; margin-bottom: .3rem }
.field .hint { display: block; font-weight: 400; color: var(--ink-soft); font-size: .9em; margin-bottom: .4rem }
input[type=text], input[type=email], input[type=tel], textarea, select {
  font: inherit; width: 100%; padding: .8rem .9rem; min-height: 52px;
  border: 2px solid var(--stone-strong); border-radius: 10px; background: var(--paper-2); color: var(--ink);
}
textarea { min-height: 130px; resize: vertical }
.err-field { border-color: var(--alert) !important }
.err { color: var(--alert); font-weight: 700; font-size: .9em; margin-top: .35rem }
.errsum {
  border: 2px solid var(--alert); border-left-width: 8px; border-radius: 10px;
  background: #fff; padding: 1rem 1.15rem; margin-bottom: 1.5rem;
}
.errsum h3 { margin: 0 0 .4rem; font-size: 1rem; color: var(--alert) }
.errsum ul { margin: 0; padding-left: 1.2rem }

/* ---------- escape hatch ---------- */
.hatch {
  margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--stone);
  display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; font-size: .92rem; color: var(--ink-soft);
}

/* ---------- notice / outcome ---------- */
.notice {
  background: var(--paper-2); border: 2px solid var(--stone); border-left: 8px solid var(--wheat);
  border-radius: var(--radius); padding: 1.25rem 1.4rem; margin: 0 0 1.5rem;
}
.notice.good { border-left-color: var(--moss) }
.notice h3 { margin: 0 0 .4rem; font-size: 1.1rem }
.notice p:last-child { margin-bottom: 0 }
.recap { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--stone) }
.recap li { padding: .7rem 0; border-bottom: 1px solid var(--stone); display: grid; gap: .1rem }
.recap .q { font-size: .85rem; color: var(--ink-soft); font-weight: 700 }

.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important }
}
