/* ==========================================================================
   audit.css: the free-audit page only. Loaded after base.css.
   ========================================================================== */
/* Phones (759px and narrower): the hero is centred, as on the home page. The stacked points
   (520px and narrower) sit as one centred list with their square bullets lined up on the left. */
@media (max-width: 759px) {
  .hero__copy { align-items: center; text-align: center; }
  .proof { justify-content: center; }
  .hero__sub { text-wrap: balance; }
}
@media (max-width: 520px) { .proof { text-align: left; } }

/* Hero: shorter than the landing page's, so the form starts high on the screen */
/* Royal blue with white type; the white form sits on it */
.ahero {
  /* --deco-h: the fixed height the graph paper is laid out on. It matches the hero's
     height at step 1 and does not depend on the form, so nothing moves as answers are picked and the form grows. */
  --deco-h: clamp(860px, 600px + 28vw, 960px);
  position: relative; isolation: isolate; overflow: clip;
  padding-bottom: clamp(64px, 8vw, 104px); color: var(--white);
  background: var(--pen);
}
.ahero > .wrap { position: relative; z-index: 1; }
.ahero .h1 { font-size: clamp(42px, 5.8vw, 78px); color: var(--white); }
.ahero .hero__sub { max-width: 700px; color: var(--pen-tint); }
.ahero .proof { color: #DCE3F9; }
.ahero .proof li:not(:last-child)::after, .ahero .proof li::before { background: var(--white); }
/* Graph paper and a fitted curve behind the hero: the home hero's decoration (home.css, LOOKS > PLOTTING SHEET) in white on blue.
   The same 26px cells with a heavier line every 104px, centred so the form's edges land on heavy lines. Paper in the flanks,
   clear behind the headline, faded out before the foot of the --deco-h layer. The curve and its points (the home hero's
   path data) show in the outer parts only, from 1100px. Phones keep the paper in the two top corners, as the home page does. */
.deco { position: absolute; left: 0; right: 0; top: 0; height: var(--deco-h); z-index: 0; overflow: hidden; pointer-events: none; }
.deco__grid { --g1: rgba(255, 255, 255, 0.07); --g2: rgba(255, 255, 255, 0.14); position: absolute; inset: 0;
  background-image: linear-gradient(var(--g2) 1px, transparent 1px), linear-gradient(90deg, var(--g2) 1px, transparent 1px), linear-gradient(var(--g1) 1px, transparent 1px), linear-gradient(90deg, var(--g1) 1px, transparent 1px);
  background-size: 104px 104px, 104px 104px, 26px 26px, 26px 26px;
  background-position: 0 25px, calc(50% + 104px) 0, 0 25px, calc(50% + 13px) 0;
  -webkit-mask-image: radial-gradient(ellipse min(760px, 60vw) 300px at 50% 150px, transparent 68%, #000 100%), linear-gradient(#000 62%, transparent 97%); -webkit-mask-composite: source-in;
  mask-image: radial-gradient(ellipse min(760px, 60vw) 300px at 50% 150px, transparent 68%, #000 100%), linear-gradient(#000 62%, transparent 97%); mask-composite: intersect; }
.deco__plot { position: absolute; left: 0; right: 0; top: 50px; height: 560px;
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 13%, transparent 20.5%, transparent 79.5%, #000 87%, #000 100%);
  mask-image: linear-gradient(90deg, #000 0, #000 13%, transparent 20.5%, transparent 79.5%, #000 87%, #000 100%); }
.deco__plot svg { display: block; width: 100%; height: 100%; overflow: visible; }
.deco__fit { fill: none; stroke: #FFFFFF; stroke-width: 1.5; opacity: 0.6; vector-effect: non-scaling-stroke; }
.deco__pts { fill: none; stroke: #FFFFFF; stroke-width: 5.5; stroke-linecap: round; opacity: 0.5; vector-effect: non-scaling-stroke; }
@media (max-width: 1099px) { .deco__plot { display: none; } }
@media (max-width: 759px) {
  .deco__grid { bottom: auto; height: 420px;
    -webkit-mask-image: radial-gradient(ellipse 48% 100% at 0 0, #000 6%, transparent 70%), radial-gradient(ellipse 48% 100% at 100% 0, #000 6%, transparent 70%); -webkit-mask-composite: source-over;
    mask-image: radial-gradient(ellipse 48% 100% at 0 0, #000 6%, transparent 70%), radial-gradient(ellipse 48% 100% at 100% 0, #000 6%, transparent 70%); mask-composite: add; }
}
/* Draw-in, the same as the home hero's: the curve and its points wipe in from the left once, on load (1.7s, after 0.25s).
   data-look on <html> makes /js/early.js add lk-js before the page is drawn, and the block at the end of /js/audit.js
   adds .is-in. The hidden state only applies while lk-js is on, so without the script the curve simply shows.
   Delete these three rules (and that block) for a static curve. */
html.lk-js .deco__plot svg { clip-path: inset(-20px 100% -20px -20px); }
html.lk-js .deco__plot.is-in svg { clip-path: inset(-20px -20px -20px -20px); transition: clip-path 1.7s cubic-bezier(0.5, 0.1, 0.2, 1) 0.25s; }
@media (prefers-reduced-motion: reduce) { html.lk-js .deco__plot svg { clip-path: none; } }

/* --------------------------------------------------------------------------
   The form: a white box with the step rail on top and the question below it,
   and the brief to its right as a separate ruled sheet tucked under its edge.
   Below 940px the brief sits under the box.
   -------------------------------------------------------------------------- */
.aform { --brief-w: clamp(310px, 27vw, 380px); margin-top: clamp(28px, 3.4vw, 44px); display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "brief"; color: var(--ink); scroll-margin-top: 12px; }
.aform__main { grid-area: main; position: relative; z-index: 1; align-self: start; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "steps" "nav"; background: var(--white); border: 1.5px solid var(--ink); border-radius: 4px; box-shadow: 10px 10px 0 var(--ink); }
@media (min-width: 940px) { .aform { grid-template-columns: minmax(0, 1fr) var(--brief-w); grid-template-areas: "main brief"; } }
.aform__top { grid-area: top; display: flex; align-items: center; justify-content: space-between; gap: 8px 24px; padding: 10px clamp(16px, 2.4vw, 28px); border-bottom: 1.5px solid var(--ink); }
.aform__count { flex: none; display: inline-flex; align-items: center; min-height: 28px; padding: 2px 10px; border-radius: 3px; background: var(--pen-soft); font-size: 14px; font-weight: 700; color: var(--ink); }
.aform__steps { grid-area: steps; min-width: 0; padding: clamp(22px, 2.8vw, 34px) clamp(16px, 2.4vw, 28px) 6px; }
.aform__nav { grid-area: nav; display: flex; align-items: center; gap: 12px; padding: 18px clamp(16px, 2.4vw, 28px) clamp(22px, 2.6vw, 30px); }
.aform__nav .btn { min-height: 52px; border: 1px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); transition: transform 0.12s var(--ease), box-shadow 0.12s var(--ease); }
.aform__nav .btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.aform__nav .btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.aform__nav .btn--ghost, .aform__nav .btn--ghost:hover { border: 1.5px solid var(--pen); background: var(--white); box-shadow: 3px 3px 0 var(--pen-soft); }
.aform__nav .btn--ghost:hover { box-shadow: 4px 4px 0 var(--pen-soft); }
.aform__nav .btn--ghost:active { box-shadow: 0 0 0 var(--pen-soft); }
.aform__nav [data-next], .aform__nav [data-send] { margin-left: auto; }
@media (hover: none) { .aform__nav .btn:hover { transform: none; } }
@media (min-width: 940px) { .aform__steps { min-height: 260px; } }
@media (max-width: 520px) { .aform__nav .btn { padding: 0 18px; } .aform__nav [data-next], .aform__nav [data-send] { flex: 1 1 0; } }

/* Step rail */
.rail { list-style: none; margin: 0; padding: 0; flex: 1 1 auto; min-width: 0; max-width: 700px; display: flex; align-items: center; }
.rail li { display: flex; align-items: center; }
.rail li + li { flex: 1 1 auto; }
.rail li + li::before { content: ""; flex: 1 1 auto; min-width: 10px; height: 2px; margin: 0 10px; background: var(--line-tint); }
.rail li.is-done + li::before { background: var(--pen); }
.rail__btn { appearance: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin: 0; padding: 0; border: 0; border-radius: 3px; background: none; color: var(--ink-2); font-family: inherit; font-size: 15px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.rail__btn:disabled { cursor: default; }
.rail__btn i { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 1.5px solid var(--line-tint); border-radius: 3px; background: var(--white) center / 16px 16px no-repeat; color: var(--ink-2); font-style: normal; font-family: var(--cond); font-weight: 800; font-size: 17px; line-height: 1; }
.rail__btn:not(:disabled) { color: var(--ink); }
.rail__btn:not(:disabled) i { border-color: var(--ink); color: var(--ink); }
.rail__btn:not(:disabled):hover span { text-decoration: underline; text-underline-offset: 3px; }
.rail li.is-done .rail__btn i { background-color: var(--pen); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); color: transparent; }
.rail__btn[aria-current] { font-weight: 700; }
.rail__btn[aria-current] i { background-color: var(--ink); background-image: none; color: var(--white); }
@media (max-width: 700px), (min-width: 940px) and (max-width: 1099px) {
  /* step names stay in the accessibility tree; only the current one is shown */
  .rail__btn { position: relative; }
  .rail__btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .rail__btn[aria-current] span { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
  .rail li + li::before { margin: 0 6px; }
  .aform__count { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

@media (min-width: 1100px) and (max-width: 1199px) { .aform__count { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } }

/* A step */
.step { display: flex; flex-direction: column; gap: 18px; }
.step__head { display: flex; flex-direction: column; gap: 6px; }
.step__q:focus { outline: none; }
.step__err { display: flex; align-items: baseline; gap: 10px; font-size: 15.5px; font-weight: 700; color: var(--rep-text); }
.step__err::before { content: ""; flex: none; width: 9px; height: 9px; background: var(--rep); }
.group { display: flex; flex-direction: column; gap: 10px; }
/* Group names are short labels, so they take the landing page's question-card tag style */
.group__name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 0; font-size: 14px; line-height: 1.25; font-weight: 700; }
.group__tag { display: inline-flex; align-items: center; min-height: 28px; padding: 2px 10px; border-radius: 3px; background: var(--pen-soft); color: var(--ink); }
.group__sub { font-size: 15px; font-weight: 400; color: var(--ink-2); }
.js .aform.is-ready .step { animation: step-in 0.24s var(--ease); }
.js .aform.is-ready[data-dir="back"] .step { animation-name: step-back; }
@keyframes step-in { from { opacity: 0; transform: translateX(14px); } }
@keyframes step-back { from { opacity: 0; transform: translateX(-14px); } }
/* Before the script has run: show the first step only. Without JavaScript every step shows, as one long form. */
.js .aform:not(.is-ready) .step:not([data-pos="0"]), .js .aform:not(.is-ready) [data-send], .js .aform:not(.is-ready) [data-back] { display: none; }
.no-js .aform__top, .no-js .brief, .no-js [data-back], .no-js [data-next] { display: none; }
.no-js .aform { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main"; }
.no-js .step + .step { margin-top: 40px; padding-top: 28px; border-top: 1.5px solid var(--ink); }

/* Options: a real radio or checkbox sits inside each label, the label is the drawn control */
.opt { position: relative; cursor: pointer; transition: transform 0.12s var(--ease), box-shadow 0.12s var(--ease), background-color 0.12s ease, border-color 0.12s ease; }
.opt:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 3px; }
.mark { flex: none; width: 20px; height: 20px; border: 1.5px solid var(--ink); border-radius: 3px; background: var(--white) center / 14px 14px no-repeat; }
.mark--radio { border-radius: 50%; }
.opt:has(input:checked) .mark { background-color: var(--pen); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.opt:has(input:checked) .mark--radio { background: var(--white); box-shadow: inset 0 0 0 4.5px var(--pen); }

/* Every option box: thick ink border on white. Hover lifts it with a periwinkle shadow; selected gets a pale blue fill and an ink shadow */
.role, .q, .tog, .model, .band { border: 2px solid var(--ink); border-radius: 4px; background: var(--white); }
@media (hover: hover) { .opt:hover:not(:has(input:checked)) { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--pen-soft); } }
.opt:has(input:checked) { background: var(--pen-tint); transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }

/* Step 1: who you are */
.roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.role { display: flex; flex-direction: column; }
.role__body { flex: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 16px 18px 18px; }
.role__text { display: flex; flex-direction: column; gap: 4px; }
.role__t { font-family: var(--cond); font-weight: 700; font-size: 25px; line-height: 1.1; }
.role__d { font-size: 15px; line-height: 1.4; color: var(--ink-2); }
.role .mark { margin-top: 3px; }
@media (max-width: 700px) { .roles { grid-template-columns: minmax(0, 1fr); gap: 10px; } }

/* Step 2: what you want answered */
.qs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.q { display: grid; grid-template-columns: minmax(0, 1fr) 20px; align-items: start; gap: 14px; min-height: 68px; padding: 14px 16px 15px 18px; }
.q .mark { margin-top: 2px; }
.q__body { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
/* Headline and tag as on the landing page's question cards */
.q__t { font-family: var(--cond); font-size: 20px; line-height: 1.12; font-weight: 700; }
.q__tag { display: inline-flex; align-items: center; min-height: 26px; padding: 2px 9px; border-radius: 3px; background: var(--pen-soft); color: var(--ink); font-size: 13.5px; line-height: 1.25; font-weight: 700; }
.q--wide { grid-column: 1 / -1; min-height: 56px; }
.q--wide .q__tag { min-height: 0; padding: 0; background: none; color: var(--ink-2); font-size: 14.5px; font-weight: 400; }
@media (max-width: 700px) { .qs { grid-template-columns: minmax(0, 1fr); } }

/* Step 3: channels. Tick chips */
.togs { display: flex; flex-wrap: wrap; gap: 8px; }
.tog { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px 0 12px; font-size: 16px; line-height: 1.2; font-weight: 600; }
.tog .mark { width: 18px; height: 18px; background-size: 12px 12px; }

/* Step 3, agencies: how to work together */
.models { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.model { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px 14px 16px; }
.model__row { align-self: stretch; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.model__t { font-family: var(--cond); font-size: 20px; line-height: 1.12; font-weight: 700; }
.model__d { font-size: 14.5px; line-height: 1.4; color: var(--ink-2); }
@media (max-width: 700px) { .models { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Step 4: spend. One box per band */
.bands { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 10px; }
.band { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 56px; padding: 10px 14px 10px 16px; }
.band__t { font-size: 16px; line-height: 1.25; font-weight: 600; }
.band .mark { width: 18px; height: 18px; }
/* Beside the brief the row is narrower: tighter padding, and the five-band row goes to three columns on small desktops */
@media (min-width: 940px) { .band { gap: 8px; padding: 10px 12px 10px 14px; } .band__t { text-wrap: balance; } }
@media (min-width: 940px) and (max-width: 1179px) { .bands--5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .bands { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Step 5: your details */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 15px; font-weight: 700; }
.field input, .field textarea { width: 100%; min-height: 48px; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 3px; background: var(--white); color: var(--ink); font-family: inherit; font-size: 16px; }
.field textarea { line-height: 1.45; resize: vertical; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field--wide { grid-column: 1 / -1; }
.field input:focus-visible, .field textarea:focus-visible { outline: none; border-color: var(--ink); box-shadow: 3px 3px 0 var(--line-tint); }
.field [aria-invalid="true"], .field input[aria-invalid="true"]:focus-visible { border-color: var(--rep); box-shadow: 3px 3px 0 rgba(230, 92, 10, 0.22); }
.field__err { font-size: 15px; font-weight: 700; color: var(--rep-text); }
@media (max-width: 560px) { .fields { grid-template-columns: minmax(0, 1fr); } }

/* The brief: a ruled notepad sheet that fills in as the form is answered. Every line sits on a 28px rule (--rl),
   with a margin line at --ml. The handwritten line at the bottom is the note for the current step.
   Desktop: to the right of the form, tucked under its edge, and it stays in view below the sticky header while the form scrolls.
   Each label has its own line, with the answer on the line or lines below it.
   Below 940px: under the form, answered rows only. */
.brief { --rl: 28px; --ml: 26px; grid-area: brief; position: relative; align-self: start; min-width: 0; display: flex; flex-direction: column; margin: 30px 8px 0; padding: var(--rl) 18px var(--rl) calc(var(--ml) + 14px); border: 1.5px solid var(--ink); border-radius: 3px; background-color: #FCFCFA; background-image: linear-gradient(90deg, transparent var(--ml), rgba(33, 70, 208, 0.24) var(--ml), rgba(33, 70, 208, 0.24) calc(var(--ml) + 1.5px), transparent calc(var(--ml) + 1.5px)), linear-gradient(180deg, transparent calc(var(--rl) - 1px), #D9E0F2 calc(var(--rl) - 1px)); background-size: 100% 100%, 100% var(--rl); box-shadow: 6px 6px 0 var(--ink); transform: rotate(0.8deg); }
.brief::before { content: ""; position: absolute; left: 50%; top: -13px; width: 92px; height: 26px; margin-left: -46px; background: rgba(230, 235, 247, 0.82); border: 1px solid rgba(17, 27, 61, 0.18); transform: rotate(3deg); }
.brief__title { position: relative; top: 3px; margin: 0; line-height: var(--rl); }
.brief__rows { margin: 0; display: flex; flex-direction: column; }
.brief__rows div { display: flex; flex-direction: column; }
.brief__rows dt { position: relative; top: 2px; font-size: 13px; line-height: var(--rl); font-weight: 700; color: var(--ink-2); }
.brief__rows dd { position: relative; top: 4px; margin: 0; min-height: var(--rl); font-family: var(--hand); font-size: 18px; line-height: var(--rl); color: var(--pen); }
.brief .hand { margin-top: var(--rl); }
.brief .hand p { position: relative; top: 5px; font-size: 17px; line-height: var(--rl); color: var(--ink-2); }
@media (max-width: 939px) { .brief__rows div:not(.is-set), .brief__rows:not(:has(.is-set)) { display: none; } }
@media (min-width: 940px) { .brief { --ml: 40px; position: sticky; top: 96px; margin: 40px 0 0 -14px; transform: rotate(1.6deg); } }

/* After sending */
.adone { grid-area: steps; display: flex; flex-direction: column; align-items: flex-start; gap: 18px; padding: clamp(22px, 2.8vw, 34px) clamp(16px, 2.4vw, 28px) clamp(24px, 3vw, 36px); }
.adone:focus { outline: none; }
.aform.is-done .aform__steps, .aform.is-done .aform__nav { display: none; }
.next { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.next li { display: flex; align-items: baseline; gap: 16px; }
.adone__status { padding: 12px 14px; border: 1.5px dashed var(--ink-2); border-radius: 3px; font-size: 15px; line-height: 1.45; }
.next b { flex: none; min-width: 20px; font-family: var(--cond); font-weight: 800; font-size: 30px; line-height: 1; color: var(--pen); }

/* --------------------------------------------------------------------------
   FIT: the form and the brief on one screen (desktop, 940px and wider)
   Every step, with the rail above it and Back / Continue below it, and the brief beside it,
   fits between the header and the bottom of the window on the common desktop heights.
   - Two layout changes at every desktop height: a step's short line ("Pick any that apply.")
     sits beside its question when there is room, and the note on "Something else" sits
     beside its title.
   - Spacing inside the form and the brief's ruled lines follow the window's height:
     clamp(smallest, a share of the window height, largest). Smallest from about 650px tall
     (a 1366 x 768 laptop), the original sizes from about 945px tall (1080p). Where the
     original size also depends on the width, min() keeps it from growing past it.
   - A link to #form, and a step change that leaves Continue below the screen, bring the
     form up to sit just under the header (scroll-margin-top below, and show() in audit.js).
   - Delete this block to go back to the original desktop sizes.
   -------------------------------------------------------------------------- */
@media (min-width: 940px) {
  /* Lands 10px under the 69px header: the 88px scroll-padding-top in base.css less 9px */
  .aform { scroll-margin-top: -9px; }
  .aform__top { padding-top: clamp(6px, calc(1.36vh - 2.8px), 10px); padding-bottom: clamp(6px, calc(1.36vh - 2.8px), 10px); }
  .rail__btn { min-height: clamp(36px, calc(2.71vh + 18.4px), 44px); }
  .aform__steps { min-height: clamp(200px, calc(20.34vh + 67.8px), 260px); padding-top: min(clamp(22px, 2.8vw, 34px), clamp(14px, calc(6.78vh - 30.1px), 34px)); }
  .aform__nav { padding-top: clamp(10px, calc(2.71vh - 7.6px), 18px); padding-bottom: min(clamp(22px, 2.6vw, 30px), clamp(14px, calc(5.42vh - 21.3px), 30px)); }
  .aform__nav .btn { min-height: clamp(44px, calc(2.71vh + 26.4px), 52px); }

  /* A step: the question, with its short line beside it where there is room */
  .step { gap: clamp(12px, calc(2.03vh - 1.2px), 18px); }
  .step__head { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; }
  .group { gap: clamp(8px, calc(0.68vh + 3.6px), 10px); }

  /* Step 2: the question cards */
  .qs { gap: clamp(8px, calc(0.68vh + 3.6px), 10px); }
  .q { min-height: clamp(60px, calc(2.71vh + 42.4px), 68px); padding: clamp(10px, calc(1.36vh + 1.2px), 14px) 16px clamp(11px, calc(1.36vh + 2.2px), 15px) 18px; }
  .q__body { gap: clamp(5px, calc(1.02vh - 1.6px), 8px); }
  .q__t { font-size: clamp(18px, calc(0.68vh + 13.6px), 20px); }
  .q__tag { min-height: clamp(24px, calc(0.68vh + 19.6px), 26px); }
  .q--wide { min-height: 0; }
  .q--wide .q__body { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; }

  /* Steps 3 and 4: chips and bands */
  .togs { gap: clamp(6px, calc(0.68vh + 1.6px), 8px); }
  .tog { min-height: clamp(38px, calc(2.03vh + 24.8px), 44px); }
  .band { min-height: clamp(50px, calc(2.03vh + 36.8px), 56px); }

  /* Step 5: the fields */
  .fields { gap: clamp(10px, calc(2.03vh - 3.2px), 16px); }
  .field { gap: clamp(4px, calc(0.68vh - 0.4px), 6px); }
  .field input { min-height: clamp(42px, calc(2.03vh + 28.8px), 48px); }
  .field textarea { min-height: 0; height: clamp(70px, calc(8.14vh + 17.1px), 94px); }

  /* The brief: rules 25px apart on the shortest windows (28px from about 945px tall), and tucked a little higher */
  .brief { --rl: clamp(25px, calc(1.02vh + 18.4px), 28px); margin-top: clamp(24px, calc(5.42vh - 11.3px), 40px); }
}

/* --------------------------------------------------------------------------
   What's in the audit: the example audit as a folder.
   A row of tabs, a manila body, one white sheet inside it, and the page number
   on the folder's lower edge. One tab and one page per finding; the second part
   of audit.js shows one page at a time. The parts of a page are listed in the
   comment above the folder in src/audit/index.njk.
   Blue is kept for what was measured: chart marks, the "I measured" figure and its range.
   -------------------------------------------------------------------------- */
.fd {
  --manila: #F2DDA6;        /* the folder, and the tab of the open page */
  --manila-deep: #E2C886;   /* the tabs behind it */
  --manila-edge: #C2A155;   /* its edges */
  --fd-tab: 44px;           /* height of a tab (finger-sized; 40px from 1000px wide) */
  --fd-foot: 46px;          /* height of the lower edge */
  --fd-in: 10px;            /* manila showing around the sheet */
  --fp-t: 22px;             /* sheet padding from 1000px wide: top, sides, bottom */
  --fp-x: 28px;
  --fp-b: 18px;
  margin-top: clamp(28px, 3.4vw, 44px);
}

/* Tabs. Each is a button; its shape is two skewed halves that share a top edge. */
.fd__tabs { position: relative; z-index: 1; display: flex; margin: 0 0 -1px; padding: 0 10px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
.fd__tabs::-webkit-scrollbar { display: none; }
.fd__tab { appearance: none; position: relative; isolation: isolate; flex: none; height: var(--fd-tab); margin: 0; padding: 1px 20px 0; border: 0; border-radius: 0; background: none; color: var(--ink); font-family: inherit; font-size: 15px; line-height: 1.1; font-weight: 600; white-space: nowrap; cursor: pointer; }
.fd__tab::before, .fd__tab::after { content: ""; position: absolute; z-index: -1; top: 0; bottom: 1px; width: 60%; background: var(--manila-deep); border: 0 solid var(--manila-edge); border-top-width: 1px; }
.fd__tab::before { left: 0; border-left-width: 1px; border-top-left-radius: 8px; transform: skewX(-10deg); transform-origin: 0 100%; }
.fd__tab::after { right: 0; border-right-width: 1px; border-top-right-radius: 8px; transform: skewX(10deg); transform-origin: 100% 100%; }
.fd__tab[aria-selected="true"] { z-index: 1; font-weight: 700; cursor: default; }
.fd__tab[aria-selected="true"]::before, .fd__tab[aria-selected="true"]::after { bottom: 0; background: var(--manila); }
@media (hover: hover) { .fd__tab:not([aria-selected="true"]):hover::before, .fd__tab:not([aria-selected="true"]):hover::after { background: #EAD397; } }
.fd__tab span { display: block; overflow: hidden; text-overflow: ellipsis; }
/* The name again in bold, hidden and without height: the tab keeps its width when its label turns bold */
.fd__tab span::after { content: attr(data-t); display: block; height: 0; overflow: hidden; visibility: hidden; font-weight: 700; }
.fd__tab:focus-visible { outline-offset: -8px; border-radius: 9px; }
/* Where the tabs don't all fit (under 1000px) they scroll sideways, and fade at the edge that has more */
.fd.more-l .fd__tabs { -webkit-mask-image: linear-gradient(to right, transparent, #000 40px); mask-image: linear-gradient(to right, transparent, #000 40px); }
.fd.more-r .fd__tabs { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); }
.fd.more-l.more-r .fd__tabs { -webkit-mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent); }

.fd__body { position: relative; padding: var(--fd-in) var(--fd-in) 0; background: var(--manila); border: 1px solid var(--manila-edge); border-radius: 8px; }
.fd__sheet { display: grid; background: var(--white); border-radius: 3px 3px 0 0; box-shadow: 0 0 0 1px rgba(110, 84, 24, 0.2); }

/* The folder's lower edge laps over the foot of the sheet, and carries the page number */
.fd__foot { position: relative; display: flex; align-items: center; justify-content: center; gap: 4px; min-height: var(--fd-foot); margin: 0 calc(var(--fd-in) * -1); padding: 0 var(--fd-in); background: var(--manila); border-top: 1px solid var(--manila-edge); border-radius: 0 0 7px 7px; box-shadow: 0 -4px 6px -4px rgba(92, 70, 18, 0.4); }
.fd__count { min-width: 10ch; margin: 0; text-align: center; font-size: 14px; line-height: 1.2; font-weight: 600; font-variant-numeric: tabular-nums; }
.fd__nav { appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; height: var(--fd-foot); margin: 0; padding: 0 10px; border: 0; border-radius: 4px; background: none; color: var(--ink); font-family: inherit; font-size: 14px; line-height: 1.2; font-weight: 600; cursor: pointer; }
.fd__nav svg { flex: none; width: 8px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.fd__nav[aria-disabled="true"] { opacity: 0.3; cursor: default; }
@media (hover: hover) { .fd__nav:not([aria-disabled="true"]):hover span { text-decoration: underline; text-underline-offset: 3px; } }
.fd__nav:focus-visible { outline-offset: -6px; }

/* One page. Phones and tablets first: everything in one column, in reading order.
   Every page sits in the same cell of the sheet; the script marks the one on show with is-on. */
.fp { grid-area: 1 / 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; padding: 18px 16px 20px; }
.fp:focus { outline: none; }
.fp:focus-visible { outline: 2px solid var(--ink); outline-offset: -5px; }
.js .fp:not(.is-on) { display: none; }
.js .fd.is-ready .fp.is-on { animation: fd-in 0.16s ease-out; }
@keyframes fd-in { from { opacity: 0; } }

.fp__head { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 16px; }
.fp__title { flex: 1 1 100%; margin: 0; font-family: var(--cond); font-weight: 800; font-size: clamp(24px, 2.3vw, 29px); line-height: 1.08; }
.fp__opt { align-self: center; margin: 0; font-size: 13.5px; line-height: 1.3; font-weight: 600; color: var(--ink-2); }
.fp__grade { flex: none; min-height: 26px; padding: 0 12px; font-size: 13px; }
/* Grades inside the folder are drawn in ink alone, so that blue is left to the measured figures */
.fd .grade--moderate { background-color: var(--white); background-image: linear-gradient(135deg, transparent calc(50% - 0.5px), rgba(17, 27, 61, 0.3) calc(50% - 0.5px), rgba(17, 27, 61, 0.3) calc(50% + 0.5px), transparent calc(50% + 0.5px)); background-size: 8px 8px; }

.fp__finding { margin: 0; font-size: 18px; line-height: 1.3; font-weight: 700; }

/* The chart: the smaller drawing on phones, the larger one (class chw, 560 units wide) from 560px */
.fp__fig { margin: 0; min-width: 0; }
.fp__chart--wide { display: none; }
.fp__chart--narrow .ch { max-width: 420px; }
.fp__chart--wide .ch { max-width: 680px; max-height: var(--fd-chart, none); }
.fp__cap { margin: 8px 0 0; font-family: var(--hand); font-size: 16px; line-height: 1.3; color: var(--pen); }
.fp__cap-w { display: none; }
.chw .ch-text, .chw .ch-label { font-size: 12.5px; }
.ch-knock { paint-order: stroke; stroke: var(--white); stroke-width: 3.5px; stroke-linejoin: round; }   /* a label on hatching, with a white edge */
.ch-seen { stroke: var(--ink); stroke-width: 3; fill: none; }   /* pricing: the stretch of the axis with prices already charged */
.ch-halo--sm { stroke-width: 3.5; }
.ch-repfill { fill: var(--rep); }

/* The reported and the measured figure, and the range bar (base.css) at full width.
   range__now is an open dot for "today", used on the pricing page. */
.fp__paircap { margin: 0; font-size: 13.5px; line-height: 1.3; font-weight: 600; color: var(--ink-2); }
.fp__figs { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 5px 14px; margin-top: 6px; }
.fp__figs span { font-size: 15px; line-height: 1.2; font-weight: 600; }
.fp__figs b { font-family: var(--cond); font-weight: 800; font-size: 27px; line-height: 1.02; }
.fp__figs .is-rep { color: var(--rep-text); }
.fp__figs .is-mea { color: var(--pen); }
.fp__pair .range { margin-top: 8px; }
.range--wide { max-width: none; }
.range .range__now { left: var(--now); top: 4.5px; width: 13px; height: 13px; margin-left: -6.5px; border-radius: 50%; background: var(--white); border: 1.5px solid var(--ink); }
.fp__rnote { margin: 4px 0 0; font-size: 13.5px; line-height: 1.4; color: var(--ink-2); }

.fp__intro { display: flex; flex-direction: column; gap: 10px; }
.fp__intro p { margin: 0; font-size: 15.5px; line-height: 1.5; }
.fp--list .fp__intro p { font-size: 16.5px; }

.fp__notes { margin: 4px 0 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px 26px; padding-top: 12px; border-top: 1px solid var(--line); }
.fp__notes dt { font-size: 13.5px; line-height: 1.3; font-weight: 700; }
.fp__notes dd { margin: 1px 0 0; font-size: 13.5px; line-height: 1.42; color: var(--ink-2); }

/* Page 5, "What your current reporting can't tell you": shows / can't show */
.cant { display: flex; flex-direction: column; }
.cant__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 16px; padding: 17px 0; border-top: 1px solid var(--line); font-size: 16.5px; line-height: 1.35; }
.cant__row:first-child { padding-top: 2px; border-top: 0; font-weight: 700; }
.cant .yn { gap: 9px; }
.cant .yn i { margin-top: 4.6px; box-shadow: none; }

/* Page 6, "The questions most worth answering, in order" */
.rank { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.rank li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 3px 12px; padding: 17px 0; border-top: 1px solid var(--line); }
.rank li:first-child { padding-top: 2px; border-top: 0; }
.rank b { grid-row: span 3; font-family: var(--cond); font-weight: 800; font-size: 32px; line-height: 0.95; }
.rank__q { font-size: 16.5px; line-height: 1.3; font-weight: 700; }
.rank__bar { display: flex; align-items: center; gap: 8px; margin: 4px 0 3px; font-size: 14.5px; line-height: 1.2; font-weight: 700; white-space: nowrap; }
.rank__bar i { flex: none; width: calc(var(--w) * 0.5); height: 13px; border-radius: 2px; background: repeating-linear-gradient(135deg, rgba(230, 92, 10, 0.7) 0 1.5px, rgba(230, 92, 10, 0.14) 1.5px 6px); }
.rank .small { font-size: 14.5px; }
/* "To settle it:" in blue: in this folder blue marks what gets measured */
.rank .small strong { font-weight: 700; color: var(--pen); }

@media (min-width: 560px) {
  .fp { padding: 20px 22px 20px; }
  .fp__chart--wide { display: block; }
  .fp__chart--narrow, .fp__cap-n { display: none; }
  .fp__cap-w { display: inline; }
  .fp__title { flex: 1 1 14ch; }
  .fp__notes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* From 1000px: all seven tabs in a row, chart on the left, finding on the right, notes along the foot.
   The pages that are not on show stay laid out but invisible, so the sheet takes the height of the
   tallest page: the folder keeps one height and nothing moves when the page changes. */
@media (min-width: 1000px) {
  .fd { --fd-tab: 40px; --fd-foot: 40px; }
  .fd__tabs { overflow: visible; padding: 0 14px; }
  .fd__tab { flex: 1 1 0; min-width: 0; padding: 1px 4px 0; font-size: clamp(13.5px, 1.3vw, 15px); }
  .fp { display: grid; grid-template-columns: minmax(0, 1.42fr) minmax(0, 1fr); grid-template-rows: auto auto auto minmax(0, 1fr) auto; gap: 0 clamp(28px, 3.2vw, 46px); padding: var(--fp-t) var(--fp-x) var(--fp-b); }
  .js .fp:not(.is-on) { display: grid; visibility: hidden; }
  .fp__head { grid-column: 1 / -1; grid-row: 1; flex-wrap: nowrap; margin-bottom: 14px; }
  .fp__fig { grid-column: 1; grid-row: 2 / span 3; }
  .fp__chart--wide .ch { max-width: none; }
  .fp__finding { grid-column: 2; grid-row: 2; margin-bottom: 10px; }
  .fp__pair { grid-column: 2; grid-row: 3; margin-bottom: 14px; }
  .fp__intro { grid-column: 2; grid-row: 4; }
  .fp--list .fp__intro { grid-row: 2; }
  .fp__notes { grid-column: 1 / -1; grid-row: 5; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 16px; }
}

/* The folder is meant to fit one screen under the 69px sticky header: about 615px tall in a desktop
   window 700px tall or more. In shorter windows (laptops at 1366 by 768 or 1280 by 720, and narrow windows
   that are not tall) the same page is set tighter, in two steps, and --fd-chart holds the chart to the
   height the window has left. Checked from 1000 by 570 up; below about 550px of height it no longer fits. */
@media (min-width: 1000px) and (max-height: 699px), (min-width: 1000px) and (max-width: 1099px) and (max-height: 779px) {
  .fd { --fd-tab: 34px; --fd-foot: 32px; --fd-in: 8px; --fp-t: 12px; --fp-x: 24px; --fp-b: 10px; --fd-chart: clamp(262px, calc(100vh - 332px), 320px); }
  .fd__tab { font-size: clamp(13px, 1.25vw, 14px); }
  .fd__count, .fd__nav { font-size: 13.5px; }
  .fp__head { margin-bottom: 8px; }
  .fp__title { font-size: 25px; }
  .fp__grade { min-height: 24px; }
  .fp__finding { margin-bottom: 8px; font-size: 17px; line-height: 1.28; }
  .fp__pair { margin-bottom: 10px; }
  .fp__figs { gap: 3px 14px; margin-top: 4px; }
  .fp__figs b { font-size: 25px; }
  .fp__pair .range { margin-top: 5px; }
  .fp__rnote { margin-top: 2px; font-size: 13px; line-height: 1.35; }
  .fp__intro p { font-size: 14.5px; line-height: 1.45; }
  .fp__cap { margin-top: 5px; font-size: 15px; }
  .fp__notes { margin-top: 10px; padding-top: 9px; column-gap: 22px; }
  .fp__notes dt, .fp__notes dd { font-size: 13px; line-height: 1.36; }
  .cant__row { padding: 10px 0; font-size: 15.5px; }
  .rank li { padding: 10px 0; }
  .rank__q, .fp--list .fp__intro p { font-size: 15.5px; }
}
@media (min-width: 1000px) and (max-height: 599px), (min-width: 1000px) and (max-width: 1099px) and (max-height: 659px) {
  .fd { --fd-tab: 32px; --fd-foot: 30px; --fd-in: 6px; --fp-t: 10px; --fp-b: 8px; --fd-chart: clamp(248px, calc(100vh - 318px), 300px); }
  .fp__head { margin-bottom: 6px; }
  .fp__title { font-size: 24px; }
  .fp__finding { margin-bottom: 6px; font-size: 16.5px; }
  .fp__pair { margin-bottom: 8px; }
  .fp__figs b { font-size: 24px; }
  .fp__rnote { font-size: 12.5px; }
  .fp__intro p { font-size: 14px; line-height: 1.42; }
  .fp__cap { margin-top: 4px; font-size: 14.5px; }
  .fp__notes { margin-top: 8px; padding-top: 7px; }
  .fp__notes dt, .fp__notes dd { font-size: 12.5px; line-height: 1.34; }
}

/* Without scripts every page shows, one after another, and the tabs and pager are hidden */
.no-js .fd__tabs, .no-js .fd__foot { display: none; }
.no-js .fd__body { padding-bottom: var(--fd-in); }
.no-js .fp { grid-area: auto; }
.no-js .fp + .fp { border-top: 1px solid var(--line); }

/* How sure each finding is */
.sure { margin-top: clamp(48px, 6vw, 80px); }
.sure .gdefs { margin-top: 24px; }
.sure .hand { margin-top: 28px; max-width: 560px; }

/* --------------------------------------------------------------------------
   How it works
   -------------------------------------------------------------------------- */
.how { list-style: none; margin: clamp(36px, 4.5vw, 56px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 40px clamp(28px, 4vw, 56px); }
.how li { position: relative; display: flex; flex-direction: column; gap: 10px; padding-top: 22px; border-top: 1.5px solid var(--white); }
.how li::before { content: ""; position: absolute; left: 0; top: -7px; width: 12px; height: 12px; background: #8DA2F2; }
.how b { font-family: var(--cond); font-weight: 800; font-size: clamp(56px, 6vw, 80px); line-height: 0.82; }
.how p { font-size: 16.5px; line-height: 1.5; }
.days { position: absolute; right: 0; top: -7px; display: flex; gap: 4px; padding-left: 10px; background: var(--ink); }
.days i { width: 12px; height: 12px; border: 1.5px solid var(--white); }
.days i:last-child { background: #8DA2F2; border-color: #8DA2F2; }
.how__more { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 40px clamp(40px, 6vw, 96px); margin-top: clamp(48px, 6vw, 80px); }
.how__data { flex: 999 1 460px; min-width: 0; max-width: 720px; display: flex; flex-direction: column; gap: 14px; }
.how__data .h4, .how__who .h4 { color: var(--white); }
.src { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.src li { display: inline-flex; align-items: center; min-height: 34px; padding: 3px 12px; border: 1.5px solid var(--white); border-radius: 3px; background: var(--white); color: var(--ink); font-size: 15.5px; line-height: 1.25; font-weight: 600; }
.src li.is-opt { border-style: dashed; background: transparent; color: var(--white); }
.src__key { display: flex; flex-wrap: wrap; gap: 6px 24px; font-size: 15px; color: var(--pen-tint); }
.src__key span { display: inline-flex; align-items: center; gap: 8px; }
.src__key i { width: 18px; height: 13px; border: 1.5px solid var(--white); border-radius: 2px; background: var(--white); }
.src__key .is-opt i { border-style: dashed; background: transparent; }
.how__who { flex: 1 1 320px; min-width: 0; max-width: 460px; display: flex; flex-direction: column; gap: 14px; }
.how__who .person img { border-color: var(--white); }
.how__who .person__role { color: var(--pen-tint); }
/* FIT: How it works on one screen (desktop, 941px and wider). The same approach as the form above and the
   landing page: spacing, the heading and the step numbers follow the window's height as well as its width (running
   text and the step titles keep their sizes), smallest from about
   650px tall (a 1366 x 768 laptop), the original sizes from about 945px tall (1080p). Each size is
   min(original, clamp(smallest, a share of the window height, original)), so it never grows past the original.
   Delete this block to go back to the original sizes. */
@media (min-width: 941px) {
  #how { --sec: min(clamp(72px, 9vw, 128px), clamp(44px, calc(28.47vh - 141.1px), 128px)); }
  #how .h2 { font-size: min(clamp(34px, 4.4vw, 58px), clamp(36px, calc(7.46vh - 12.5px), 58px)); }
  .how { margin-top: min(clamp(36px, 4.5vw, 56px), clamp(22px, calc(11.53vh - 52.9px), 56px)); }
  .how li { gap: clamp(6px, calc(1.36vh - 2.8px), 10px); padding-top: clamp(14px, calc(2.71vh - 3.6px), 22px); }
  .how b { font-size: min(clamp(56px, 6vw, 80px), clamp(56px, calc(8.14vh + 3.1px), 80px)); }
  .how__more { margin-top: min(clamp(48px, 6vw, 80px), clamp(28px, calc(17.63vh - 86.6px), 80px)); }
  .how__data, .how__who { gap: clamp(10px, calc(1.36vh + 1.2px), 14px); }
  .src { gap: clamp(6px, calc(0.68vh + 1.6px), 8px); }
  .src li { min-height: clamp(30px, calc(1.36vh + 21.2px), 34px); }
  .how__who .person img { width: clamp(60px, calc(5.76vh + 22.5px), 77px); height: clamp(60px, calc(5.76vh + 22.5px), 77px); }
}
