/* Self-assessment page (PAS-12). Uses the pas.css tokens. Behaviour lives in assessment.js and is unchanged;
   it relies on the ids in the page and on .as-bar, .as-steps li, .as-submit, .q, .as-ditem, .is-done,
   .is-current, .is-missing, html.as-all-done and .hidden. */

.as-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.as-badges span { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 14px 0 12px; border-radius: 999px; background: var(--white); box-shadow: inset 0 0 0 1px var(--teal-100); font-size: 15px; font-weight: 500; color: var(--ink-2); }
.as-badges svg { width: 16px; height: 16px; color: var(--teal); flex: none; }

.as-body { padding: 72px 0 112px; }
.as-grid { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 72px; align-items: start; }
.as-main { min-width: 0; max-width: 860px; }

/* ---------- progress card (desktop) ---------- */
.as-side { position: sticky; top: calc(var(--hdr-h) + 28px); padding: 24px 24px 20px; border-radius: var(--r-lg); background: var(--paper); }
.as-side-k { font-size: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px; }
.as-steps { border-top: 1px solid var(--line-2); }
.as-steps li { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line-2); }
.as-step-n {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--white);
  box-shadow: inset 0 0 0 1.5px var(--line-2); font-size: 14px; font-weight: 600; color: var(--ink-3);
  transition: background-color .2s, box-shadow .2s, color .2s;
}
.as-steps b { display: block; font-size: 16px; font-weight: 600; line-height: 1.3; color: var(--ink-3); padding-top: 6px; }
.as-steps li.is-current b { color: var(--ink); }
.as-steps li.is-current .as-step-n { color: var(--teal); box-shadow: inset 0 0 0 1.5px var(--teal), 0 0 0 4px var(--teal-50); }
.as-steps li.is-done b { color: var(--ink-2); }
.as-steps li.is-done .as-step-n { background: var(--teal); box-shadow: none; color: #fff; }
.as-count { display: block; margin-top: 6px; font-size: 14.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.as-count [data-answered] { color: var(--ink); font-weight: 600; }
.as-bar { display: block; height: 5px; margin-top: 10px; overflow: hidden; border-radius: 99px; background: var(--line); }
.as-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--teal); transition: width .35s ease; }
.as-side-note { display: flex; gap: 10px; margin-top: 18px; font-size: 14.5px; line-height: 1.5; color: var(--ink-3); }
.as-side-note svg { width: 16px; height: 16px; flex: none; color: var(--teal); margin-top: 3px; }

/* ---------- intro ---------- */
.as-intro { padding: 22px 24px; border-radius: var(--r-md); background: var(--teal-50); border: 1px solid var(--teal-100); }
.as-intro p { font-size: 17px; line-height: 1.55; color: var(--ink-2); }
.as-email-note { display: flex; gap: 12px; align-items: flex-start; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--teal-100); font-weight: 600; color: var(--teal-700) !important; }
.as-email-note svg { width: 18px; height: 18px; flex: none; margin-top: 3px; color: var(--teal); }

/* ---------- phone progress bar (sticky under the header) ---------- */
.as-mprog { display: none; }

/* ---------- questions ---------- */
.as-part { margin-top: 64px; }
.as-part-h {
  display: flex; align-items: baseline; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line-2);
  font-size: 15px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--teal);
}
.as-part-h span { margin-left: auto; font-size: 14px; font-weight: 500; letter-spacing: .04em; color: var(--ink-3); white-space: nowrap; }

.q { border: 0; margin: 0; padding: 30px 0 32px; min-width: 0; border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--hdr-h) + 36px); }
.q legend { float: left; width: 100%; padding: 0; margin: 0 0 18px; display: grid; grid-template-columns: 56px minmax(0, 1fr); column-gap: 0; }
.q legend + * { clear: both; }
.q-n {
  display: inline-flex; align-items: center; gap: 6px; height: 1.6em; padding-top: 2px;
  font-size: 15px; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums;
}
.q-tick { width: 14px; height: 14px; color: var(--teal); opacity: 0; transform: scale(.6); transition: opacity .2s ease, transform .2s ease; }
.q.is-done .q-n { color: var(--teal); }
.q.is-done .q-tick { opacity: 1; transform: none; }
.q-t { font-size: clamp(19px, 1.6vw, 22px); line-height: 1.35; letter-spacing: -0.016em; font-weight: 600; color: var(--ink); text-wrap: pretty; }
.q-miss { display: none; grid-column: 2; margin-top: 8px; font-size: 14.5px; font-weight: 600; color: var(--ochre); }
.q.is-missing .q-miss { display: block; }
.q.is-missing .q-n { color: var(--ochre); }

.opts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-left: 56px; }
.opt { position: relative; display: flex; min-width: 0; }
.opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.opt span {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 10px;
  min-height: 92px; padding: 16px 8px 14px; text-align: center; overflow-wrap: anywhere;
  background: var(--white); border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line-2);
  font-size: 15px; font-weight: 500; line-height: 1.3; color: var(--ink-2);
  transition: background-color .15s, box-shadow .15s, color .15s;
}
.opt span::before {
  content: ""; flex: none; width: 20px; height: 20px; border-radius: 50%; box-sizing: border-box;
  border: 1.5px solid var(--line-2); background: #fff; transition: border-color .15s, border-width .15s, background-color .15s;
}
.opt input:hover + span { box-shadow: inset 0 0 0 1.5px var(--teal); background: var(--teal-50); }
.opt input:hover + span::before { border-color: var(--teal); }
.opt input:checked + span { background: var(--teal); box-shadow: 0 8px 20px -10px rgba(30, 88, 86, .7); color: #fff; }
.opt input:checked + span::before { border: 6px solid #fff; background: var(--teal); }
.opt input:focus-visible + span { outline: 2.5px solid var(--teal); outline-offset: 3px; }
.q.is-missing .opt span { box-shadow: inset 0 0 0 1px #dcc595; }

/* ---------- submit ---------- */
.as-submit { padding: 40px 0 8px; margin-left: 56px; scroll-margin-top: calc(var(--hdr-h) + 36px); }
.as-submit .form-error { margin: 0 0 14px; }
.as-btn-lg { min-height: 58px; padding: 0 30px; font-size: 17px; }
.as-all-done .as-submit .btn { box-shadow: 0 12px 28px -12px rgba(30, 88, 86, .8); }

/* ---------- email gate ---------- */
.as-gate { margin-top: 48px; scroll-margin-top: calc(var(--hdr-h) + 28px); }
.as-gate .form-card { max-width: 660px; }
.as-gate-mark { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--teal-50); color: var(--teal); margin-bottom: 18px; }
.as-gate-mark svg { width: 21px; height: 21px; }
.as-gate h2 { font-size: clamp(26px, 2.4vw, 32px); outline: none; }
.as-gate-p { margin-top: 14px; font-size: 17px; color: var(--ink-2); }
.as-gate-one { margin-top: 8px; font-size: 16px; color: var(--ink-3); }
.as-gate-form { margin-top: 24px; }
.as-optin { display: flex; gap: 12px; align-items: flex-start; margin-top: 18px; font-size: 15.5px; line-height: 1.5; color: var(--ink-2); cursor: pointer; }
.as-optin input { flex: none; width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent, #2a6b6b); cursor: pointer; }
.as-label { display: block; margin-bottom: 8px; font-size: 16px; font-weight: 600; color: var(--ink); }
.as-gate .inline-form .btn { flex: 0 0 auto; min-height: 52px; }
.as-gate .form-error { margin-top: 10px; }
.as-gate-fine { margin-top: 18px; font-size: 14.5px; line-height: 1.55; color: var(--ink-3); }
.as-gate-fine a { color: var(--ink-3); }

/* ---------- results ---------- */
.as-results { margin-top: 56px; scroll-margin-top: calc(var(--hdr-h) + 28px); }
.as-results .h2 { max-width: 20ch; outline: none; margin-top: 4px; }
.as-rbody { margin-top: 24px; max-width: 40em; }
.as-rbody p { font-size: 18px; line-height: 1.65; color: var(--ink-2); }
.as-rbody p + p { margin-top: 14px; }
.as-rbody p:first-child { font-size: clamp(21px, 1.8vw, 24px); line-height: 1.45; letter-spacing: -0.015em; font-weight: 500; color: var(--ink); }
.as-domains { margin-top: 44px; }
.as-dh { padding-bottom: 14px; border-bottom: 1px solid var(--line-2); font-size: 15px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; line-height: 1.4; color: var(--teal); }
.as-ditems { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.as-ditem { padding: 22px 0 24px; border-bottom: 1px solid var(--line); }
.as-ditem h4 { margin: 0 0 8px; font-size: 20px; line-height: 1.3; letter-spacing: -0.015em; font-weight: 600; color: var(--ink); }
.as-ditem p { font-size: 16.5px; line-height: 1.6; color: var(--ink-2); }
.as-ditems .as-ditem:only-child { grid-column: 1 / -1; }
.as-reframe { margin-top: 44px; padding: 4px 0 4px 22px; border-left: 3px solid var(--teal-300); }
.as-reframe p { font-family: var(--f-serif); font-style: italic; font-size: clamp(23px, 2vw, 28px); line-height: 1.35; color: var(--ink); }
.as-next { margin-top: 40px; padding: 32px; border-radius: var(--r-lg); background: var(--teal-50); border: 1px solid var(--teal-100); }
.as-next h3 { margin-bottom: 10px; }
.as-next p { margin-bottom: 22px; font-size: 17px; color: var(--ink-2); max-width: 40em; }
.as-offer { margin-top: 20px; padding: 26px 32px; border-radius: var(--r-lg); border: 1px solid var(--teal-100); background: #fff; }
.as-offer h3 { margin-bottom: 8px; }
.as-offer p { margin-bottom: 18px; font-size: 16px; line-height: 1.55; color: var(--ink-2); max-width: 40em; }
.as-offer .as-offer-done { margin: 0; font-weight: 600; color: var(--ink); }
.as-offer .form-error { margin: 12px 0 0; }
.as-reassure p { margin-top: 32px; font-family: var(--f-serif); font-style: italic; font-size: 20px; line-height: 1.5; color: var(--ink-2); max-width: 34em; }
.as-disclaimer { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.55; color: var(--ink-3); max-width: 44em; }

/* ---------- tablet / phone ---------- */
@media (max-width: 960px) {
  .as-grid { grid-template-columns: minmax(0, 1fr); }
  .as-side { display: none; }
  .as-main { max-width: none; }
  .as-mprog {
    display: flex; align-items: center; gap: 14px; position: sticky; top: var(--hdr-h); z-index: 20;
    margin: 28px calc(-1 * var(--gutter)) 0; padding: 12px var(--gutter);
    background: rgba(255, 255, 255, .94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
  }
  .as-mprog-t { font-size: 14.5px; color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
  .as-mprog-t b { color: var(--ink); font-weight: 600; }
  .as-mprog .as-bar { flex: 1; margin: 0; }
  .as-part:first-of-type { margin-top: 28px; }
  .q, .as-submit { scroll-margin-top: calc(var(--hdr-h) + 64px); }
}
@media (max-width: 720px) {
  .as-body { padding: 48px 0 80px; }
  .as-badges { margin-top: 22px; }
  .as-badges span { font-size: 14.5px; }
  .as-part { margin-top: 48px; }
  .q { padding: 24px 0 26px; }
  .q legend { grid-template-columns: 40px minmax(0, 1fr); margin-bottom: 16px; }
  .q-t { font-size: 18.5px; }
  .opts { grid-template-columns: 1fr; margin-left: 0; gap: 8px; }
  .opt span { flex-direction: row; justify-content: flex-start; min-height: 56px; padding: 12px 16px; gap: 14px; text-align: left; font-size: 16.5px; }
  .as-submit { margin-left: 0; padding-top: 32px; }
  .as-submit .btn { width: 100%; }
  .as-ditems { grid-template-columns: 1fr; }
  .as-next { padding: 24px 20px; border-radius: 24px; }
  .as-next .btn-row .btn { width: 100%; }
  .as-offer { padding: 22px 20px; border-radius: 24px; }
  .as-offer .btn { width: 100%; }
  .as-gate .inline-form .btn { width: 100%; }
  .as-rbody p { font-size: 17px; }
}

/* 20 Oct 2026: 18+ check before the questions (L14) and the values/faith note on results */
.as-age { margin: 24px 0 32px; }
.as-age-p { margin: 10px 0 18px; font-size: 17px; line-height: 1.55; color: var(--ink-2); }
.as-age-under { margin-top: 4px; font-size: 17px; line-height: 1.6; color: var(--ink); max-width: 36em; }
.as-age-under:focus { outline: none; }
.as-values { margin-top: 36px; font-size: 17px; line-height: 1.6; color: var(--ink-2); max-width: 40em; }
