/* The Gauge by Dialed In. One stylesheet for every page.
   No build step, no framework, nothing loaded from other sites.
   Sections: 1 tokens, 2 base, 3 header and footer, 4 buttons and forms,
   5 the dial, 6 result band, 7 landing, 8 report, 9 grading steps,
   10 message and text pages, 11 wider screens, 12 small screens. */

/* ---------- 1. Tokens ---------- */
@font-face {
  font-family: "Karla";
  src: url("assets/fonts/karla-latin-variable.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap; /* Karla runs within about 1% of Arial's width (measured), so the swap doesn't move the layout */
}
:root {
  /* Colour: Dialed In brand guide */
  --charcoal: #231f20;
  --charcoal-deep: #151213;
  --charcoal-soft: #4d4849;
  --yellow: #fcb316;
  --yellow-light: #ffc440;
  --white: #ffffff;
  --mist: #f3f3f3;
  --line: #d6d6d6;
  --muted: #5f5b5c;         /* 6.6:1 on white */
  --muted-on-dark: #d2d2d2; /* 11:1 on charcoal */
  --pass: #2e7d4f;
  --fail: #b3261e;

  /* Type: Karla, base 17px, scale 1.25 */
  --font: "Karla", Arial, Helvetica, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --t-sm: 0.875rem;    /* 14 */
  --t-base: 1.0625rem; /* 17 */
  --t-md: 1.3125rem;   /* 21 */
  --t-lg: 1.6875rem;   /* 27 */
  --t-xl: 2.125rem;    /* 34 */
  --t-2xl: 2.625rem;   /* 42 */
  --t-3xl: 3.25rem;    /* 52 */

  /* Spacing: 4px base */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;

  --radius: 6px;
  --measure: 720px; /* reading column */
  --wide: 1040px;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--t-base);
  line-height: 1.55;
  color: var(--charcoal);
  background: var(--white);
}
h1, h2, h3, h4, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3, h4 { line-height: 1.15; font-weight: 700; letter-spacing: -0.01em; text-wrap: balance; }
a { color: inherit; }
code { font-family: var(--mono); font-size: .9em; }
:focus-visible { outline: 3px solid var(--charcoal); outline-offset: 3px; border-radius: 2px; }
.dark :focus-visible, .site-header :focus-visible, .site-footer :focus-visible { outline-color: var(--yellow); }
summary { cursor: pointer; }

.wrap { width: 100%; max-width: var(--wide); margin-inline: auto; padding-inline: 20px; }
.narrow { max-width: var(--measure); }
/* For screen readers only */
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.dark { background: var(--charcoal); color: var(--white); }
.section { padding: var(--s7) 0; }
.section.mist { background: var(--mist); }
.section h2 { font-size: var(--t-lg); }
.section .intro { margin-top: var(--s2); color: var(--muted); max-width: 40em; }
/* Notes that are for the people reviewing the mock, never for visitors */
.mock-note { display: inline-block; margin-top: var(--s5); padding: 6px 10px; font-size: var(--t-sm); background: #fff3d1; color: #5c4200; border-radius: 4px; }

/* ---------- 3. Header and footer ---------- */
.site-header { background: var(--charcoal); color: var(--white); }
.site-header .wrap { display: flex; align-items: center; gap: var(--s4); min-height: 64px; }
/* "The Gauge" goes to the landing page; the Dialed In logo goes to dialedin.ca */
.brand { display: flex; align-items: center; gap: var(--s2); }
.brand a { color: inherit; text-decoration: none; }
.brand .by a { display: block; }
.brand .wordmark { font-weight: 800; font-size: var(--t-md); letter-spacing: -0.01em; white-space: nowrap; }
.brand .by { display: inline-flex; align-items: center; gap: 8px; font-size: var(--t-sm); color: var(--muted-on-dark); white-space: nowrap; }
/* Task 29 (the designer, Nov 26): at 123 x 30 the capitals in "Dialed In" match the wordmark's. No larger: the Gauge is the product here. */
.brand .by img { display: block; width: 123px; height: 30px; }
.site-header nav { margin-left: auto; display: flex; gap: var(--s5); font-size: var(--t-sm); }
.site-header nav a { text-decoration: none; padding: var(--s2) 0; white-space: nowrap; }
.site-header nav a:hover { text-decoration: underline; }

.site-footer { background: var(--charcoal-deep); color: var(--muted-on-dark); font-size: var(--t-sm); padding: var(--s5) 0; }
.site-footer .wrap { display: grid; gap: var(--s3); }
.site-footer a { color: var(--white); }
.site-footer ul { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s5); }

/* ---------- 4. Buttons and forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  font: 700 var(--t-base)/1 var(--font);
  padding: 15px 22px; border-radius: var(--radius); border: 2px solid var(--yellow);
  background: var(--yellow); color: var(--charcoal-deep);
  text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--yellow-light); border-color: var(--yellow-light); }
[hidden] { display: none !important; }
.btn-small { padding: 10px 14px; font-size: var(--t-sm); }
.btn-big { padding: 19px 30px; font-size: var(--t-md); }
.btn-quiet { background: transparent; border-color: currentColor; color: inherit; }
.btn-quiet:hover { background: rgba(127,127,127,.18); border-color: currentColor; }

.grade-form { display: flex; gap: var(--s2); max-width: 620px; margin: var(--s6) auto 0; }
.grade-form input {
  flex: 1; min-width: 0;
  font: 400 var(--t-md)/1 var(--font); color: var(--charcoal-deep);
  padding: 16px 18px; border: 2px solid var(--white); border-radius: var(--radius); background: var(--white);
}
.grade-form input:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.grade-form input[aria-invalid="true"] { border-color: var(--yellow); }
/* "Grade another site": a small link under a result's buttons, and a compact address box as the last thing on the page.
   Same field and button as the landing page, drawn quieter so it doesn't compete with the page's main buttons. */
.another-link { margin-top: var(--s4); font-size: var(--t-sm); }
.another-link a { color: inherit; }
.section.another { padding: var(--s6) 0; }
.another h2 { font-size: var(--t-md); }
.another .grade-form { margin: var(--s3) 0 0; max-width: 520px; }
.another .grade-form input { font-size: var(--t-base); padding: 12px 14px; border-color: #8d8d8d; }
.another .grade-form .btn { padding: 12px 18px; }

/* A link that opens a new tab: a small box-and-arrow mark after the text, drawn in the text's own colour,
   plus hidden words in the link: <span class="vh"> (opens in a new tab)</span>. One version, used everywhere. */
.new-tab::after {
  content: ""; display: inline-block; width: .72em; height: .72em; margin-left: .3em; vertical-align: -.02em;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%23000' stroke-width='1.6' d='M5 2H1.8v8.2H10V7M7 1.2h3.8V5M10.6 1.4 5.6 6.4'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%23000' stroke-width='1.6' d='M5 2H1.8v8.2H10V7M7 1.2h3.8V5M10.6 1.4 5.6 6.4'/%3E%3C/svg%3E") center / contain no-repeat;
}
@media (forced-colors: active) { .new-tab::after { background: LinkText; } }
.form-note { margin-top: var(--s3); font-size: var(--t-sm); color: var(--muted-on-dark); }
.field-error { max-width: 620px; margin: var(--s3) auto 0; padding: var(--s3) var(--s4); background: var(--charcoal-deep); border-left: 6px solid var(--yellow); border-radius: var(--radius); text-align: left; font-weight: 700; }

/* Forms on light pages (opt out, tell us). Every field has a visible label. */
.form { display: grid; gap: var(--s5); max-width: 34em; }
.field { display: grid; gap: var(--s2); }
.field label { font-weight: 700; }
.field .opt { font-weight: 400; color: var(--muted); }
.field input, .field textarea {
  width: 100%; font: 400 var(--t-base)/1.4 var(--font); color: var(--charcoal-deep);
  padding: 13px 14px; border: 2px solid var(--charcoal); border-radius: var(--radius); background: var(--white);
}
.field textarea { resize: vertical; min-height: 7em; }
.field [aria-invalid="true"] { border-color: var(--fail); border-width: 3px; }
.field-msg { color: var(--fail); font-weight: 700; font-size: var(--t-sm); }
.form-error { padding: var(--s3) var(--s4); border-left: 6px solid var(--fail); background: #fbeceb; border-radius: var(--radius); font-weight: 700; }
.form .btn { justify-self: start; }
/* Spam trap: a field people never see or reach. It still has a label, so it passes our own checks. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- 5. The dial ----------
   The brass gauge (task 27): its colours, the needle's motion and the pause are in our own
   assets/dial.css (src/web/dialStyle.ts). Task 18's sweep is gone: the settle replaces it. */
.dial { display: block; width: 100%; max-width: 340px; height: auto; margin-inline: auto; }

/* Small dial on the How we grade page: drawn and styled in assets/dial.css (task 27). */

/* ---------- 6. Result band ---------- */
.result { padding: var(--s6) 0 var(--s7); text-align: center; }
.result .site { font-weight: 700; overflow-wrap: anywhere; }
.result .graded { font-size: var(--t-sm); color: var(--muted-on-dark); margin: var(--s1) 0 var(--s5); }
.result .graded a { color: var(--white); }
/* The visible headline under the dial. Built for a reason of up to 70 characters. */
.result .reason-h { font-size: 1.5rem; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; max-width: 21em; margin: var(--s4) auto 0; text-wrap: balance; }
/* Only when more than one check set the grade */
.result .also { margin-top: var(--s2); font-weight: 700; color: var(--muted-on-dark); }
.result .meaning { font-size: var(--t-md); line-height: 1.4; max-width: 30em; margin: var(--s3) auto 0; color: var(--muted-on-dark); }
.result .note { max-width: 34em; margin: var(--s4) auto 0; padding: var(--s3) var(--s4); background: var(--charcoal-deep); border-radius: var(--radius); }
.result .tally { margin-top: var(--s4); font-weight: 700; }
.result .actions { margin-top: var(--s5); display: flex; flex-wrap: wrap; gap: var(--s3); justify-content: center; }

/* The scale strip under the dial: one row, F to A+, in the dial's order.
   The visitor's letter is wider, filled and says "Your grade".
   Other letters are buttons: hover, focus or tap shows the meaning. The meaning is
   always in the page for screen readers; no script. */
.scale { position: relative; background: var(--charcoal-deep); color: var(--muted-on-dark); font-size: var(--t-sm); padding: var(--s4) 0; }
.scale .wrap { display: grid; gap: var(--s3); justify-items: center; text-align: center; }
.ruler, .stairs { display: flex; gap: 3px; }
.ruler li, .stairs li { position: relative; }
.ruler .stop { display: flex; align-items: center; justify-content: center; gap: var(--s2); min-width: 44px; height: 40px; padding: 0 var(--s2); border: 0; border-radius: 4px; background: var(--charcoal-soft); color: var(--white); font: 700 var(--t-base)/1 var(--font); }
button.stop { cursor: pointer; }
button.stop:hover, button.stop:focus-visible { background: #6a6465; }
.on .stop { background: var(--yellow); color: var(--charcoal-deep); padding: 0 var(--s3); }
.on .stop b { font-weight: 800; font-size: var(--t-md); }
.you { font-size: var(--t-sm); white-space: nowrap; }
.tip { position: absolute; top: calc(100% + 8px); left: 0; z-index: 2; width: max-content; max-width: 230px; padding: var(--s2) var(--s3); border-radius: 4px; background: var(--white); color: var(--charcoal); font: 400 var(--t-sm)/1.4 var(--font); text-align: left; box-shadow: 0 2px 10px rgba(0,0,0,.4);
  clip-path: inset(50%); opacity: 0; pointer-events: none; }
.ruler li:nth-child(n+4) .tip, .stairs li:nth-child(n+4) .tip { left: auto; right: 0; }
button.stop:hover .tip, button.stop:focus .tip { clip-path: none; opacity: 1; }
.scale-next { color: var(--white); }
.scale-next a { color: var(--white); font-weight: 700; }
.scale .ver a { color: var(--white); }

/* ---------- 7. Landing ---------- */
.hero { text-align: center; padding: var(--s8) 0 var(--s7); }
.hero h1 { font-size: var(--t-2xl); }
.hero .lede { text-wrap: balance; max-width: 36em; margin: var(--s4) auto 0; color: var(--muted-on-dark); font-size: var(--t-md); line-height: 1.45; }
.dial-sample { max-width: 380px; margin: var(--s7) auto 0; padding: var(--s4) var(--s5) var(--s5); border: 1px solid var(--charcoal-soft); border-radius: 10px; }
.dial-sample .dial { max-width: 280px; }
.dial-sample .sample-tag { margin-bottom: var(--s3); font-size: var(--t-sm); color: var(--muted-on-dark); }
.dial-sample .sample-reason { margin-top: var(--s3); font-weight: 700; line-height: 1.35; }
.dial-sample .sample-meaning { margin-top: var(--s1); font-size: var(--t-sm); color: var(--muted-on-dark); }

.lines { margin-top: var(--s4); border-top: 1px solid var(--line); }
.lines li { padding: var(--s4) 0; border-bottom: 1px solid var(--line); font-size: var(--t-md); line-height: 1.35; }
.three { display: grid; gap: var(--s6); margin-top: var(--s6); }
.three h3 { font-size: var(--t-md); }
.three p { margin-top: var(--s2); color: var(--muted); }
.three.plain p { margin-top: 0; color: var(--charcoal); font-size: var(--t-md); line-height: 1.4; }
.not { padding: var(--s7) 0; }
.not h2 { font-size: var(--t-lg); color: var(--yellow); }
.not p { margin-top: var(--s4); font-size: var(--t-md); line-height: 1.45; }
.promise { font-size: var(--t-md); font-weight: 700; line-height: 1.4; }
.version { margin-top: var(--s3); font-size: var(--t-sm); color: var(--muted); }
.faq { margin-top: var(--s4); border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { padding: var(--s4) 0; font-weight: 700; font-size: var(--t-md); line-height: 1.3; }
.faq p { padding: 0 0 var(--s4); color: var(--muted); max-width: 40em; }

/* ---------- 8. Report ---------- */
/* Each group is introduced by the question it answers. The group's name and the count sit under it. */
.group-head h2 { margin-bottom: var(--s1); }
.group-head p { font-size: var(--t-sm); color: var(--muted); }
.group-head p b { color: var(--charcoal); }
.hw-group .group-head { display: flex; align-items: center; gap: var(--s4); }
.move { margin-top: var(--s4); font-weight: 700; }
.checks { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s3); margin-top: var(--s5); }

/* Status mark: a shape and a word, never colour alone */
.mark { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: var(--white); font-weight: 800; font-size: 13px; line-height: 1; }
.mark.pass { background: var(--pass); }
.mark.fail { background: var(--fail); }
.mark.na, .mark.unknown, .mark.notrun { background: transparent; border: 2px solid #8d8d8d; color: #6b6b6b; }
.mark.choice { background: var(--charcoal); }

/* A failed check. Closed: one line. Open: the fix, what we found, then a fold for the developer. */
.check { border: 1px solid var(--line); border-left: 6px solid var(--yellow); border-radius: var(--radius); background: var(--white); }
.check.sets-grade { border-left-color: var(--fail); }
.check > summary { display: grid; grid-template-columns: auto 1fr auto; gap: var(--s3); align-items: start; padding: var(--s4); list-style: none; }
.check > summary::-webkit-details-marker { display: none; }
.check > summary::after { content: "+"; font-size: var(--t-lg); line-height: .9; color: var(--muted); width: 1ch; text-align: center; }
.check[open] > summary::after { content: "\2212"; }
.check h3 { font-size: var(--t-md); line-height: 1.25; }
.check .sub { margin-top: 2px; font-size: var(--t-sm); color: var(--muted); }
.check .sub b { color: var(--fail); }
.check-body { padding: 0 var(--s4) var(--s4); display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
.why { max-width: 40em; }
.check h4 { font-size: var(--t-sm); color: var(--muted); font-weight: 700; letter-spacing: 0; }
.findings { display: grid; gap: var(--s3); margin-top: var(--s2); }
.findings li { padding-left: var(--s4); border-left: 3px solid var(--line); }
.findings .pages { display: flex; flex-wrap: wrap; gap: 2px var(--s3); margin-top: 2px; font-size: var(--t-sm); }
.findings .pages span { color: var(--muted); }
.findings .pages a { font-family: var(--mono); overflow-wrap: anywhere; }
.aside { font-size: var(--t-sm); color: var(--muted); }

/* The fix, in developer language, always open inside an open check */
.dev { padding: var(--s3) var(--s4); background: var(--mist); border-radius: var(--radius); }
.dev > p { margin-top: var(--s1); }
.dev dl { display: grid; gap: var(--s1); margin-top: var(--s3); font-size: var(--t-sm); }
.dev dt { color: var(--muted); margin-top: var(--s2); }
.dev dd { overflow-wrap: anywhere; }
.dev pre { margin: var(--s1) 0 0; padding: var(--s3); overflow-x: auto; background: var(--charcoal-deep); color: #f1f1f1; border-radius: var(--radius); font: 400 13px/1.55 var(--mono); font-variant-ligatures: none; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Quiet rows: passed, doesn't apply, couldn't check, not run, our choice */
.quiet { margin-top: var(--s4); border-top: 1px solid var(--line); }
.quiet li { display: grid; grid-template-columns: auto 1fr auto; gap: var(--s3); align-items: start; padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.quiet .mark { width: 22px; height: 22px; font-size: 12px; margin-top: 2px; }
.quiet small { display: block; font-size: var(--t-sm); color: var(--muted); }
.quiet .state { font-size: var(--t-sm); color: var(--muted); white-space: nowrap; padding-top: 2px; }
.quiet li.na, .quiet li.unknown, .quiet li.notrun { color: var(--muted); }
/* When every check in a group passed, the rows fold away under one line */
.all-passed { margin-top: var(--s4); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.all-passed > summary { padding: var(--s3) 0; font-weight: 700; }
.all-passed .quiet { margin-top: 0; }
.all-passed .quiet li:last-child { border-bottom: 0; }

/* Offers of help. Quiet by design: the grade and the fix list stay the loudest things on the page.
   Every link to Dialed In's contact page has the class offer-link, so the address can change in one search. */
.offer { margin-top: var(--s4); font-size: var(--t-sm); color: var(--muted); }
.offer a { color: var(--charcoal); font-weight: 700; }
.behind p { margin: var(--s3) 0 var(--s5); max-width: 38em; }
/* The offer at the end of a report (fable review G4, the designer's spec of Nov 30, a4d6dcf): its own charcoal band,
   left-aligned in the reading column so it can't read as a second grade box. The price, in white, sits with the
   button, apart from the developer line. */
.doit-band { padding: var(--s7) 0; }
.doit-band h2 { font-size: var(--t-lg); color: var(--white); }
.doit-band p { margin-top: var(--s2); max-width: 36em; color: var(--muted-on-dark); }
.doit-offer { display: grid; justify-items: start; gap: var(--s3); margin-top: var(--s5); }
.doit-offer p { margin-top: 0; max-width: 40em; color: var(--white); font-size: var(--t-base); font-weight: 400; }
/* The offer on the homepage: a white card under "What you'll walk away with", with an outlined button.
   The homepage's only yellow button stays the grade button. */
.hand-off { max-width: 820px; margin-top: var(--s7); padding: var(--s5); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.hand-off h3 { font-size: var(--t-md); color: var(--charcoal); }
.hand-off p { margin-top: var(--s2); max-width: 34em; color: var(--muted); }
.hand-off .btn { margin-top: var(--s4); }

.facts h2 { font-size: var(--t-md); }
.facts .intro { font-size: var(--t-sm); }
.facts dl { display: grid; grid-template-columns: minmax(0, 1fr); margin-top: var(--s3); border-top: 1px solid var(--line); font-size: var(--t-sm); }
.facts dl div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s4); padding: var(--s2) 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); }
.facts dd { overflow-wrap: anywhere; }
.facts details { margin-top: var(--s4); font-size: var(--t-sm); }
.facts details summary { font-weight: 700; }
.facts details li { padding: var(--s1) 0; overflow-wrap: anywhere; }
.facts details li span { color: var(--muted); }

.share { display: grid; gap: var(--s4); margin-top: var(--s4); padding: var(--s5); border: 1px solid var(--line); border-radius: var(--radius); }
.share > p { color: var(--muted); }
.share-field { display: grid; gap: var(--s1); }
.share-field label { font-size: var(--t-sm); font-weight: 700; }
.share-field input { width: 100%; font: 400 var(--t-base)/1.3 var(--mono); color: var(--charcoal); padding: 11px 12px; border: 2px solid var(--charcoal); border-radius: var(--radius); background: var(--white); }
.share-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.share-status { font-weight: 700; font-size: var(--t-sm); }
.testnote { font-size: var(--t-sm); color: var(--muted); padding: var(--s5) 0; border-top: 1px solid var(--line); }
.testnote p + p { margin-top: var(--s2); }

/* ---------- 9. Grading steps ---------- */
.steps { border-top: 1px solid var(--line); }
.steps li { display: grid; grid-template-columns: 28px 1fr auto; gap: var(--s3); align-items: center; min-height: 64px; padding: var(--s3) 0; border-bottom: 1px solid var(--line); font-size: var(--t-md); line-height: 1.3; }
.steps .state { font-size: var(--t-sm); color: var(--muted); white-space: nowrap; min-width: 6.5em; text-align: right; }
/* Four states, one class on the row: wait (hollow ring), run (flashing yellow dot, bold, tinted row),
   done (green check), fix (red X: done, and it found something to fix). The state is also in words. */
.steps li.wait, .steps li.skip { color: var(--muted); }
.steps li.run, .steps li.stop { font-weight: 700; }
.steps li.run { background: #fff8e5; box-shadow: -12px 0 0 #fff8e5, 12px 0 0 #fff8e5; }
.steps li.run .state, .steps li.fix .state { color: var(--charcoal); font-weight: 700; }
.steps small { display: block; font-size: var(--t-sm); font-weight: 400; color: var(--pass); }
.steps small.stop { color: var(--fail); }
/* Movement inside the current step, such as "Page 3 of 7". Tabular figures so the line doesn't shift as numbers change. */
.steps small.at { color: var(--muted); font-variant-numeric: tabular-nums; }
/* A small pulse for the step in progress. No spinning. */
.pulse { width: 14px; height: 14px; margin: 5px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 4px #fde6ad; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; transform: scale(.8); } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }
.queue { max-width: 30em; margin: var(--s4) auto 0; padding: var(--s3) var(--s4); background: var(--charcoal-deep); border-radius: var(--radius); font-weight: 700; }
.after-steps { margin-top: var(--s4); font-size: var(--t-sm); color: var(--muted); }

/* ---------- 10. Message pages (bad address, busy, too many, opt out) ---------- */
.message { text-align: center; padding: var(--s8) 0; }
.message h1 { font-size: var(--t-xl); max-width: 16em; margin-inline: auto; }
.message .actions { margin-top: var(--s5); display: flex; flex-wrap: wrap; gap: var(--s3); justify-content: center; }
.message .lede { max-width: 30em; margin: var(--s4) auto 0; font-size: var(--t-md); line-height: 1.45; color: var(--muted-on-dark); }
.prose { display: grid; gap: var(--s4); }
.prose h1 { font-size: var(--t-xl); }
.prose p { max-width: 38em; }

.prose h2 { font-size: var(--t-md); margin-top: var(--s5); }
.prose pre { margin: 0; padding: var(--s4); overflow-x: auto; background: var(--charcoal-deep); color: #f1f1f1; border-radius: var(--radius); font: 400 14px/1.6 var(--mono); }
.prose .lines { margin-top: 0; }
.prose .lines li { font-size: var(--t-base); padding: var(--s3) 0; }
.prose .version { margin-top: 0; }
.draft { justify-self: start; padding: var(--s2) var(--s3); border: 2px dashed var(--fail); border-radius: var(--radius); color: var(--fail); font-weight: 700; }

/* How we grade: plain lists the developer fills from the engine's data */
.rule { border-top: 1px solid var(--line); }
.rule li { display: grid; grid-template-columns: 2.5em 1fr; padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.hw-group { margin-top: var(--s4); }
.hw-group h3 { font-size: var(--t-md); margin-bottom: 2px; }
.hw-checks { margin-top: var(--s3); border-top: 1px solid var(--line); }
.hw-checks li { display: flex; justify-content: space-between; gap: var(--s4); padding: var(--s2) 0; border-bottom: 1px solid var(--line); }
.hw-checks code { color: var(--muted); white-space: nowrap; }

/* The fix-it page: four steps that read as a sequence */
.howto { counter-reset: step; display: grid; gap: var(--s5); margin-top: var(--s6); }
.howto li { counter-increment: step; position: relative; padding-left: 60px; }
.howto li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--charcoal); color: var(--yellow); font-weight: 800; font-size: var(--t-md); }
.howto h3 { font-size: var(--t-md); }
.howto p { margin-top: var(--s2); color: var(--muted); }
.two { display: grid; gap: var(--s6); }
.two h2 { font-size: var(--t-md); }
.two p { margin-top: var(--s2); max-width: 34em; }
.rule span small { display: block; font-size: var(--t-sm); color: var(--muted); }
.offer.foot { margin-top: var(--s5); padding-top: var(--s4); border-top: 1px solid var(--line); font-size: var(--t-base); }
.not-checked { display: grid; gap: var(--s5); }
.faq p a { color: var(--charcoal); font-weight: 700; }

/* ---------- 11. Wider screens ---------- */
@media (min-width: 760px) {
  .hero { padding: var(--s9) 0 var(--s8); }
  .hero h1 { font-size: var(--t-3xl); }
  .three { grid-template-columns: repeat(3, 1fr); }
  .two { grid-template-columns: 1fr 1fr; gap: var(--s8); }
  .howto { grid-template-columns: repeat(4, 1fr); gap: var(--s5); }
  .howto.five { grid-template-columns: repeat(5, 1fr); }
  .hand-off { display: grid; grid-template-columns: 1fr auto; gap: var(--s6); align-items: center; }
  .hand-off .btn { margin-top: 0; }
  .howto li { padding-left: 0; padding-top: 60px; }
  .howto li::after { content: ""; position: absolute; top: 21px; left: 56px; right: calc(-1 * var(--s5) + 12px); height: 2px; background: var(--line); }
  .howto li:last-child::after { display: none; }
  .three.four { grid-template-columns: repeat(2, 1fr); gap: var(--s5) var(--s7); max-width: 820px; }
  .section { padding: var(--s8) 0; }
  .result { padding: var(--s7) 0 var(--s8); }
  .result .reason-h { font-size: var(--t-xl); }
  .dial { max-width: 400px; }
  .scale .wrap { grid-template-columns: auto auto 1fr; align-items: center; justify-items: start; text-align: left; gap: var(--s5); }
  .scale .ver { justify-self: end; text-align: right; }
  .site-footer .wrap { grid-template-columns: 1fr auto; align-items: center; }
  .message h1 { font-size: var(--t-2xl); }
}

/* ---------- 12. Small screens ---------- */
@media (max-width: 520px) {
  .grade-form { flex-direction: column; }
  .doit-band { padding: var(--s6) 0; }
  .doit-band h2 { font-size: var(--t-md); }
  .doit-offer { justify-items: stretch; }
  .doit-band .btn, .hand-off .btn { width: 100%; }
  .brand .wordmark { font-size: var(--t-base); }
  .brand .by { gap: 6px; }
  .brand .by img { width: 90px; height: 22px; } /* 90px is the brand guide's minimum */
  .hero .lede { font-size: var(--t-base); }
  .hero { padding-top: var(--s7); }
  .lines li, .steps li, .faq summary, .three.plain p, .not p { font-size: var(--t-base); }
  .check h3 { font-size: var(--t-base); }
}
/* The header at 320 wide (task 19): without this every page was 327 pixels wide. "by" stays for screen readers. */
/* The scale strip on phones: with "Your grade" beside the letter it was 365 pixels wide, wider than most phones.
   The label goes under the letter, in smaller type, and the other stops narrow a little. */
@media (max-width: 420px) {
  .ruler .stop { min-width: 38px; }
  .ruler .on .stop { flex-direction: column; gap: 2px; height: 48px; padding: 0 var(--s2); }
  .ruler .you { font-size: 11px; line-height: 1; }
  .ruler .tip { max-width: 180px; } /* so the third stop's tip ends inside a 320 screen, and the fourth's starts inside it */
}
@media (max-width: 340px) {
  .site-header .wrap { gap: var(--s2); }
  .brand .by-word { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
