/* ==========================================================================
   File:    acxpa-complaints-audit.css — Complaints Handling Maturity Audit (members)
   Version  1.0.6 — 9 Oct 2026 (space between two section ledes); 1.0.5 (Start the questions button replaced by an All set line); 1.0.4 (organisation details first: Step tags, locked questions; Back to the Complaints Hub link);
            1.0.3 (Last audit marker, consent notice, no focus halo on the question heading); 1.0.2 (Back/Next no longer squashed by the Saved note); 1.0.1 (dimension fold headers, lock pill contrast); 1.0.0
   Owns:    .cma (the [acxpa_complaints_audit] shortcode, mu-plugins/acxpa-complaints-audit.php)
   Builds on acxpa-pulse-check.css (.acp), which the Audit page also loads, so the two
            tools share one look. This file adds only what the Audit has and the Pulse doesn't.
   Enqueue: by the mu-plugin, on the Audit page only. Loads after acxpa-tokens.css and acxpa-pulse-check.css.
   Look:    surfaces vary by section: Sand hero, white organisation card, Harbour tint questions,
            white dimensions, Harbour Deep "Beyond the standards", Gold tint action plan, Success tint
            evidence, white answers. No teal surfaces. Tokens only. No max-width on lede or paragraph text.
   ========================================================================== */

/* Saved / done notes */
div.cma p.cma-done { display: flex; gap: 10px; align-items: center; margin: 0 0 16px; padding: 12px 18px; border-radius: var(--acxpa-ds-radius-lg); background: var(--acxpa-ds-success-tint); color: var(--acxpa-ds-success-deep); font-weight: 700; }
div.cma p.cma-saved { flex: 1 1 auto; min-width: 0; text-align: center; font-size: var(--acxpa-ds-text-small); color: var(--acxpa-ds-success-deep); font-weight: 600; }
div.cma div.acp-stepNav .acp-btn { flex: 0 0 auto; white-space: nowrap; }
div.cma p.cma-login { margin-top: 14px; font-size: var(--acxpa-ds-text-small); }
div.cma p.cma-login a, div.cma p.cma-orgNote a { color: var(--acxpa-ds-harbour); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* --------------------------------------------------------------------------
   "What the Audit gives you" (locked views)
   -------------------------------------------------------------------------- */
div.cma section.cma-what { margin: 0 0 32px; padding: 40px; border-radius: var(--acxpa-ds-radius-xl); background: var(--acxpa-ds-harbour-tint); }
ul.cma-whatGrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
ul.cma-whatGrid li { display: flex; flex-direction: column; gap: 6px; padding: 22px; border-radius: var(--acxpa-ds-radius-lg); background: var(--acxpa-ds-white); border-top: 5px solid var(--acxpa-ds-harbour); line-height: var(--acxpa-ds-leading-snug); }
ul.cma-whatGrid li:nth-child(2) { border-top-color: var(--acxpa-ds-gold); }
ul.cma-whatGrid li:nth-child(3) { border-top-color: var(--acxpa-ds-success); }
ul.cma-whatGrid li:nth-child(4) { border-top-color: var(--acxpa-ds-clay); }
ul.cma-whatGrid b { font-size: var(--acxpa-ds-text-h4); color: var(--acxpa-ds-teal-800); }
ul.cma-whatGrid span { font-size: var(--acxpa-ds-text-small); color: var(--acxpa-ds-slate); }

/* --------------------------------------------------------------------------
   Organisation details (white card)
   -------------------------------------------------------------------------- */
div.cma section.cma-org { margin: 0 0 32px; padding: 32px 40px; border-radius: var(--acxpa-ds-radius-xl); background: var(--acxpa-ds-white); border: 1px solid var(--acxpa-ds-stone); border-left: 6px solid var(--acxpa-ds-harbour); scroll-margin-top: 120px; }
div.cma section.cma-org.is-missing { border-left-color: var(--acxpa-ds-error); }
div.cma-orgGrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
div.cma label.acp-lbl select { width: 100%; height: 48px; padding: 0 12px; border: 2px solid var(--acxpa-ds-stone); border-radius: var(--acxpa-ds-radius-md); font-family: var(--acxpa-ds-font); font-size: var(--acxpa-ds-text-body); color: var(--acxpa-ds-ink); background: var(--acxpa-ds-white); margin: 0; }
div.cma label.acp-lbl select:focus { border-color: var(--acxpa-ds-harbour); outline: none; }
div.cma section.cma-org.is-done { border-left-color: var(--acxpa-ds-success); }
div.cma p.cma-stepTag { margin: 0 0 6px; font-size: var(--acxpa-ds-text-xs, 13px); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--acxpa-ds-harbour); }
div.cma section.cma-org.is-done p.cma-stepTag { color: var(--acxpa-ds-success); }
div.cma section.cma-org.is-done p.cma-stepTag::after { content: " \2713  Done"; }
div.cma p.cma-orgStatus { margin: 16px 0 0; font-size: var(--acxpa-ds-text-small); font-weight: 600; color: var(--acxpa-ds-slate); }
div.cma span.cma-orgOk { color: var(--acxpa-ds-success); }
div.cma span.cma-orgOk a { color: var(--acxpa-ds-success); text-decoration: underline; text-underline-offset: 3px; }
div.cma section.cma-org:not(.is-done) span.cma-orgOk, div.cma section.cma-org.is-done span.cma-orgTodo { display: none; }
div.cma section.cma-qs.is-locked form.cma-form { display: none; }
div.cma section.cma-qs:not(.is-locked) p.cma-gate { display: none; }
div.cma p.cma-gate { display: flex; gap: 12px; align-items: flex-start; margin: 8px 0 0; padding: 18px 20px; border-radius: var(--acxpa-ds-radius-md); background: var(--acxpa-ds-white); border: 1px dashed var(--acxpa-ds-harbour); }
div.cma p.cma-gate a { color: var(--acxpa-ds-harbour); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
div.cma p.acp-sectionLede + p.acp-sectionLede { margin-top: 10px; }
div.cma p.cma-crumb { margin: 0 0 14px; font-size: var(--acxpa-ds-text-small); }
div.cma p.cma-crumb a { color: var(--acxpa-ds-harbour); font-weight: 600; text-decoration: none; }
div.cma p.cma-crumb a:hover, div.cma p.cma-crumb a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
div.cma p.cma-consent { display: flex; gap: 12px; align-items: flex-start; margin: 20px 0 0; padding: 14px 16px; border-radius: var(--acxpa-ds-radius-md); background: var(--acxpa-ds-sand); font-size: var(--acxpa-ds-text-small); line-height: var(--acxpa-ds-leading-snug); }

/* --------------------------------------------------------------------------
   Questions: the dimension strip and the evidence prompt
   -------------------------------------------------------------------------- */
ol.cma-dimNav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0 0 16px; }
div.cma button.cma-dimBtn { width: 100%; display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; margin: 0; padding: 10px 12px; border-radius: var(--acxpa-ds-radius-md); border: 2px solid transparent; background: var(--acxpa-ds-white); color: var(--acxpa-ds-ink); font-family: var(--acxpa-ds-font); font-size: var(--acxpa-ds-text-caption); font-weight: 600; line-height: 1.25; text-align: left; cursor: pointer; }
div.cma button.cma-dimBtn:hover { border-color: var(--acxpa-ds-harbour); }
div.cma button.cma-dimBtn:focus-visible { outline: 3px solid var(--acxpa-ds-gold); outline-offset: 2px; }
span.cma-dimNum { width: 24px; height: 24px; border-radius: 50%; background: var(--acxpa-ds-harbour-tint); color: var(--acxpa-ds-harbour-deep); font-weight: 800; display: flex; align-items: center; justify-content: center; }
span.cma-dimCount { color: var(--acxpa-ds-slate); white-space: nowrap; }
div.cma button.cma-dimBtn.is-current { border-color: var(--acxpa-ds-harbour); background: var(--acxpa-ds-harbour); color: var(--acxpa-ds-white); }
div.cma button.cma-dimBtn.is-current span.cma-dimCount { color: var(--acxpa-ds-harbour-tint); }
div.cma button.cma-dimBtn.is-complete span.cma-dimNum { background: var(--acxpa-ds-success); color: var(--acxpa-ds-white); }
/* Re-run: the last audit's answer, shown as a marker (never pre-selected) */
div.cma em.cma-was { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: var(--acxpa-ds-radius-pill); background: var(--acxpa-ds-gold-tint); color: var(--acxpa-ds-gold-deep); font-size: var(--acxpa-ds-text-caption); font-style: normal; font-weight: 700; white-space: nowrap; }
/* The question heading takes focus when it changes (for screen readers); no visible ring or halo */
div.cma legend[tabindex]:focus, div.cma legend[tabindex]:focus-visible { outline: none !important; box-shadow: none !important; }
div.cma p.cma-evid { margin-top: 10px; font-size: var(--acxpa-ds-text-small); line-height: var(--acxpa-ds-leading-snug); color: var(--acxpa-ds-slate); }
div.cma p.cma-evid b { color: var(--acxpa-ds-harbour-deep); }
/* 48 dots don't help; the dimension strip does the job */
div.cma ol.acp-dots { display: none; }

/* --------------------------------------------------------------------------
   Results: dimension bars (white)
   -------------------------------------------------------------------------- */
div.cma section.cma-dims { margin: 0 0 32px; padding: 40px; border-radius: var(--acxpa-ds-radius-xl); background: var(--acxpa-ds-white); border: 1px solid var(--acxpa-ds-stone); }
ol.cma-bars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 32px; }
li.cma-bar { padding: 16px 18px; border-radius: var(--acxpa-ds-radius-lg); background: var(--acxpa-ds-sand); --cma-c: var(--acxpa-ds-harbour); }
li.cma-bar.acp-lvl--reactive    { --cma-c: var(--acxpa-ds-error); }
li.cma-bar.acp-lvl--informal    { --cma-c: var(--acxpa-ds-warning); }
li.cma-bar.acp-lvl--developing  { --cma-c: var(--acxpa-ds-harbour); }
li.cma-bar.acp-lvl--established { --cma-c: var(--acxpa-ds-success); }
li.cma-bar.acp-lvl--leading     { --cma-c: var(--acxpa-ds-gold-deep); }
div.cma-barHead { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; line-height: var(--acxpa-ds-leading-snug); }
div.cma-barHead b { font-size: var(--acxpa-ds-text-body); color: var(--acxpa-ds-ink); }
span.cma-barVal { margin-left: auto; font-size: var(--acxpa-ds-text-small); font-weight: 700; color: var(--cma-c); white-space: nowrap; }
div.cma-barTrack { position: relative; height: 12px; margin: 10px 0 8px; border-radius: var(--acxpa-ds-radius-pill); background: var(--acxpa-ds-white); border: 1px solid var(--acxpa-ds-stone); }
div.cma-barTrack span { display: block; height: 100%; border-radius: var(--acxpa-ds-radius-pill); background: var(--cma-c); }
div.cma-barTrack i { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--acxpa-ds-stone); }
div.cma p.cma-barDesc { font-size: var(--acxpa-ds-text-caption); color: var(--acxpa-ds-slate); line-height: var(--acxpa-ds-leading-snug); }
div.cma p.cma-barKey { margin-top: 14px; font-size: var(--acxpa-ds-text-caption); color: var(--acxpa-ds-slate); }
span.cma-tag { padding: 2px 10px; border-radius: var(--acxpa-ds-radius-pill); font-size: var(--acxpa-ds-text-caption); font-weight: 700; }
span.cma-tag--strong { background: var(--acxpa-ds-success-tint); color: var(--acxpa-ds-success-deep); }
span.cma-tag--gap { background: var(--acxpa-ds-clay-tint); color: var(--acxpa-ds-clay-deep); }
span.cma-delta { font-weight: 700; white-space: nowrap; }
span.cma-delta--up { color: var(--acxpa-ds-success); }
span.cma-delta--down { color: var(--acxpa-ds-error); }
span.cma-delta--same { color: var(--acxpa-ds-slate); }

/* Beyond the standards (Harbour Deep) */
div.cma section.cma-beyond { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: center; }
div.cma section.cma-beyond > div > p:not(.acp-eyebrow) { color: var(--acxpa-ds-harbour-tint); }
ul.cma-beyondList { display: grid; gap: 10px; }
li.cma-beyondItem { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: var(--acxpa-ds-radius-md); background: color-mix(in srgb, var(--acxpa-ds-white) 10%, transparent); color: var(--acxpa-ds-white); font-size: var(--acxpa-ds-text-small); line-height: var(--acxpa-ds-leading-snug); }
span.cma-beyondState { align-self: flex-start; padding: 2px 10px; border-radius: var(--acxpa-ds-radius-pill); font-size: var(--acxpa-ds-text-caption); font-weight: 700; }
li.cma-beyondItem--yes span.cma-beyondState { background: var(--acxpa-ds-success-tint); color: var(--acxpa-ds-success-deep); }
li.cma-beyondItem--no span.cma-beyondState { background: var(--acxpa-ds-gold); color: var(--acxpa-ds-ink); }
li.cma-beyondItem--na span.cma-beyondState { background: var(--acxpa-ds-white); color: var(--acxpa-ds-slate); }

/* --------------------------------------------------------------------------
   Action plan (Gold tint): five wide cards, then the rest in a fold
   -------------------------------------------------------------------------- */
div.cma section.cma-plan ol.acp-priList { grid-template-columns: 1fr; }
div.cma section.cma-plan li.acp-priCard { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 20px; }
div.cma section.cma-plan div.acp-priRes { display: flex; flex-wrap: wrap; gap: 8px; }
div.cma section.cma-plan a.acp-res { flex: 0 1 260px; }
div.cma p.cma-now { padding: 10px 14px; border-radius: var(--acxpa-ds-radius-md); background: var(--acxpa-ds-sand); font-size: var(--acxpa-ds-text-small); line-height: var(--acxpa-ds-leading-snug); }
div.cma a.cma-res:not(.acp-res--member) { background: var(--acxpa-ds-success-tint); }
div.cma .acp-pill--incl { background: var(--acxpa-ds-success); color: var(--acxpa-ds-white); }
div.cma a.cma-res.acp-res--member .acp-pill--lock { background: var(--acxpa-ds-harbour); color: var(--acxpa-ds-white); }
details.cma-more { margin-top: 16px; border-radius: var(--acxpa-ds-radius-lg); background: var(--acxpa-ds-white); }
details.cma-more > summary, details.cma-dimGroup > summary { cursor: pointer; padding: 16px 20px; font-weight: 700; color: var(--acxpa-ds-teal-800); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details.cma-more > summary::-webkit-details-marker, details.cma-dimGroup > summary::-webkit-details-marker { display: none; }
details.cma-more > summary::after, details.cma-dimGroup > summary::after { content: "+"; font-weight: 800; color: var(--acxpa-ds-harbour); }
details[open].cma-more > summary::after, details[open].cma-dimGroup > summary::after { content: "\2212"; }
ol.cma-moreList { display: grid; gap: 12px; padding: 0 20px 20px; counter-reset: m 5; }
ol.cma-moreList li { counter-increment: m; position: relative; padding: 14px 16px 14px 56px; border-radius: var(--acxpa-ds-radius-md); background: var(--acxpa-ds-sand); line-height: var(--acxpa-ds-leading-snug); }
ol.cma-moreList li::before { content: counter(m); position: absolute; left: 14px; top: 14px; width: 30px; height: 30px; border-radius: 50%; background: var(--acxpa-ds-gold-tint); color: var(--acxpa-ds-gold-deep); font-weight: 800; display: flex; align-items: center; justify-content: center; }
ol.cma-moreList b { display: block; margin: 2px 0 4px; }
ol.cma-moreList p:not(.acp-dim) { font-size: var(--acxpa-ds-text-small); }
ol.cma-moreList div.acp-priRes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
ol.cma-moreList a.acp-res { flex: 0 1 260px; background: var(--acxpa-ds-white); }

/* Evidence checklist (Success tint) */
div.cma section.cma-evidence { margin: 0 0 32px; padding: 40px; border-radius: var(--acxpa-ds-radius-xl); background: var(--acxpa-ds-success-tint); }
ul.cma-evList { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
ul.cma-evList li { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--acxpa-ds-radius-md); background: var(--acxpa-ds-white); font-size: var(--acxpa-ds-text-small); line-height: var(--acxpa-ds-leading-snug); break-inside: avoid; }
span.cma-box { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 2px; border: 2px solid var(--acxpa-ds-success); border-radius: 4px; }

/* All 48, folded by dimension */
details.cma-dimGroup { margin: 0 0 10px; border-radius: var(--acxpa-ds-radius-lg); border: 1px solid var(--acxpa-ds-stone); }
details.cma-dimGroup > summary b { flex: 1 1 auto; }
details.cma-dimGroup > summary span { color: var(--acxpa-ds-slate); }
details.cma-dimGroup ol.acp-cmpList { padding: 0 16px 16px; }
div.cma .acp-cmpHead span.acp-qNum { font-size: var(--acxpa-ds-text-caption); }

/* --------------------------------------------------------------------------
   History: trend, comparison, list
   -------------------------------------------------------------------------- */
div.cma section.cma-trend, div.cma section.cma-compare, div.cma section.cma-histList { margin: 0 0 32px; padding: 40px; border-radius: var(--acxpa-ds-radius-xl); }
div.cma section.cma-trend { background: var(--acxpa-ds-harbour-tint); }
div.cma section.cma-compare { background: var(--acxpa-ds-white); border: 1px solid var(--acxpa-ds-stone); }
div.cma section.cma-histList { background: var(--acxpa-ds-sand); }
ol.cma-trendList { display: flex; gap: 12px; align-items: flex-end; height: 220px; padding: 8px 4px 0; overflow-x: auto; }
ol.cma-trendList li { flex: 0 0 72px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; --cma-c: var(--acxpa-ds-harbour); }
ol.cma-trendList li.acp-lvl--reactive { --cma-c: var(--acxpa-ds-error); }
ol.cma-trendList li.acp-lvl--informal { --cma-c: var(--acxpa-ds-warning); }
ol.cma-trendList li.acp-lvl--established { --cma-c: var(--acxpa-ds-success); }
ol.cma-trendList li.acp-lvl--leading { --cma-c: var(--acxpa-ds-gold-deep); }
span.cma-trendBar { width: 100%; border-radius: var(--acxpa-ds-radius-md) var(--acxpa-ds-radius-md) 0 0; background: var(--cma-c); position: relative; }
span.cma-trendBar b { position: absolute; top: -24px; left: 0; right: 0; text-align: center; font-size: var(--acxpa-ds-text-small); color: var(--acxpa-ds-ink); }
ol.cma-trendList small { font-size: var(--acxpa-ds-text-caption); color: var(--acxpa-ds-slate); white-space: nowrap; }
form.cma-cmpForm { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; margin: 0 0 20px; }
form.cma-cmpForm label.acp-lbl { flex: 1 1 220px; }
table.cma-cmpTable { width: 100%; border-collapse: collapse; font-size: var(--acxpa-ds-text-small); }
table.cma-cmpTable th, table.cma-cmpTable td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--acxpa-ds-stone); }
table.cma-cmpTable thead th { background: var(--acxpa-ds-harbour-tint); color: var(--acxpa-ds-harbour-deep); font-weight: 700; }
table.cma-cmpTable tr.cma-cmpTotal { background: var(--acxpa-ds-gold-tint); font-weight: 700; }
ol.cma-hist { display: grid; gap: 10px; }
li.cma-histRow { display: grid; grid-template-columns: 1.2fr 1fr 1fr auto; gap: 12px; align-items: center; padding: 14px 18px; border-radius: var(--acxpa-ds-radius-md); background: var(--acxpa-ds-white); border-left: 6px solid var(--acxpa-ds-stone); }
li.cma-histRow.acp-lvl--reactive { border-left-color: var(--acxpa-ds-error); }
li.cma-histRow.acp-lvl--informal { border-left-color: var(--acxpa-ds-warning); }
li.cma-histRow.acp-lvl--developing { border-left-color: var(--acxpa-ds-harbour); }
li.cma-histRow.acp-lvl--established { border-left-color: var(--acxpa-ds-success); }
li.cma-histRow.acp-lvl--leading { border-left-color: var(--acxpa-ds-gold); }
span.cma-histDate { font-weight: 700; }
span.cma-histLinks { display: flex; gap: 14px; }
span.cma-histLinks a { color: var(--acxpa-ds-harbour); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* --------------------------------------------------------------------------
   Tablet and mobile
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  ul.cma-whatGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  ol.cma-dimNav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  div.cma section.cma-beyond { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  div.cma section.cma-what, div.cma section.cma-org, div.cma section.cma-dims, div.cma section.cma-evidence,
  div.cma section.cma-trend, div.cma section.cma-compare, div.cma section.cma-histList { padding: 24px 16px; border-radius: var(--acxpa-ds-radius-lg); }
  ul.cma-whatGrid, div.cma-orgGrid, ol.cma-bars, ul.cma-evList { grid-template-columns: 1fr; }
  /* Phones: Back / Next share the row; the Saved note sits above them */
  div.cma div.acp-stepNav { flex-wrap: wrap; gap: 8px 12px; }
  div.cma div.acp-stepNav p.cma-saved { order: -1; flex: 1 1 100%; }
  div.cma div.acp-stepNav .acp-btn { flex: 1 1 0; }
  /* Phones: only the current dimension shows in the strip */
  ol.cma-dimNav { grid-template-columns: 1fr; }
  ol.cma-dimNav li { display: none; }
  ol.cma-dimNav li:has(.is-current) { display: block; }
  div.cma button.cma-dimBtn { padding: 8px 10px; }
  div.cma section.cma-plan li.acp-priCard { grid-template-columns: 1fr; }
  div.cma section.cma-plan a.acp-res, ol.cma-moreList a.acp-res { flex: 1 1 100%; }
  li.cma-histRow { grid-template-columns: 1fr 1fr; }
  table.cma-cmpTable th, table.cma-cmpTable td { padding: 10px 8px; }
}
