/*
 * ccfullstacka11y application styles.
 *
 * This tool audits sites for WCAG 2.1 AA, so the tool itself is held to it.
 * Specifically:
 *  - every color pair below is verified at >=4.5:1 for text and >=3:1 for
 *    borders and other non-text indicators (1.4.3, 1.4.11), in both schemes
 *  - the layout is fluid with no fixed heights on text, so it reflows at 320px
 *    without a second scrollbar (1.4.10) and survives user text spacing (1.4.12)
 *  - :focus-visible is styled everywhere and never removed (2.4.7)
 *  - severity and status are always carried by text, never color alone (1.4.1)
 *  - forced-colors and reduced-motion preferences are honored
 */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --fg: #1a1c1e;          /* 17.1:1 on --bg */
  --muted: #4a4f54;       /*  8.3:1 on --bg */
  --link: #0b4fa8;        /*  7.8:1 on --bg */
  --link-visited: #6b2d8f;
  --rule: #7a8086;        /*  3.3:1 on the deepest surface - non-text min */
  --rule-soft: #d6dade;   /* decorative only, never load-bearing */
  --surface: #f2f4f6;
  --surface-2: #e7eaed;
  --accent: #0b4fa8;
  --accent-fg: #ffffff;   /*  7.8:1 on --accent */
  --danger: #8c1d18;      /*  8.6:1 on --bg */
  --warn: #6b4100;        /*  7.6:1 on --bg */
  --ok: #14532d;          /*  9.9:1 on --bg */
  --radius: 8px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171a;
    --fg: #eceef0;        /* 15.5:1 on --bg */
    --muted: #b9c0c7;     /*  9.8:1 on --bg */
    --link: #7fb4ff;      /*  8.5:1 on --bg */
    --link-visited: #d3a8f0;
    --rule: #757d85;      /*  3.4:1 on the deepest surface - non-text min */
    --rule-soft: #2c3237;
    --surface: #1e2226;
    --surface-2: #272c31;
    --accent: #7fb4ff;
    --accent-fg: #06101d; /*  8.5:1 on --accent */
    --danger: #f2b8b5;    /* 10.0:1 on --bg */
    --warn: #ffc46b;      /* 11.4:1 on --bg */
    --ok: #86e0a8;        /* 11.5:1 on --bg */
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  /* A long unbroken URL or selector would otherwise push the page wider than
     the viewport and break reflow at 320px (SC 1.4.10). */
  overflow-wrap: break-word;
}

a, code { overflow-wrap: anywhere; }

/* ---------- Skip link (2.4.1) ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--bg);
  color: var(--link);
  padding: 0.75rem 1rem;
  border: 2px solid var(--accent);
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

/* ---------- Focus (2.4.7) ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ---------- Layout ---------- */
.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--surface);
}
.site-header__inner,
.page {
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}
.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.5rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.brand {
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--fg);
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  min-height: 2.75rem;
}
.brand span { font-weight: 400; color: var(--muted); font-size: 0.875rem; }
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius);
  color: var(--link);
  text-decoration: none;
  border: 1px solid transparent;
}
.site-nav a:hover { background: var(--surface-2); text-decoration: underline; }
/* aria-current is the semantic marker; the styling merely reflects it. */
.site-nav a[aria-current="page"] {
  background: var(--bg);
  border-color: var(--rule);
  color: var(--fg);
  font-weight: 650;
}

/*
 * The account block: a native <details>, so the email is what you see and
 * Sign out is one press away rather than sitting in the header on every page.
 *
 * position: relative plus an absolutely positioned panel, because a <details>
 * in a flex header otherwise widens the header when it opens and shoves the
 * navigation sideways.
 */
.signed-in {
  margin: 0 0 0 auto;
  color: var(--muted);
  font-size: 0.875rem;
  position: relative;
}

.signed-in > summary {
  cursor: pointer;
  padding: 0.65rem 0.25rem;
  min-height: 2.75rem;
  box-sizing: border-box;
  border-radius: 4px;
}
.signed-in > .btn {
  position: absolute;
  right: 0;
  z-index: 5;
  margin-top: 0.25rem;
  white-space: nowrap;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 0.4rem 0.75rem;
}

main { padding-top: 2rem; padding-bottom: 5rem; }

h1 { font-size: 1.875rem; line-height: 1.2; margin: 0 0 0.5rem; }
h2 { font-size: 1.375rem; line-height: 1.25; margin: 2.5rem 0 0.75rem; }
h3 { font-size: 1.125rem; margin: 1.5rem 0 0.5rem; }
h4 { font-size: 1rem; margin: 1rem 0 0.35rem; }
p { margin: 0 0 1rem; }
a { color: var(--link); }
a:visited { color: var(--link-visited); }
.lede { font-size: 1.0625rem; color: var(--muted); max-width: 60ch; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }

/* ---------- Forms ---------- */
.sample-hint {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.9375rem;
}
.sample-hint .btn--link { font-size: 0.9375rem; }

.more-options {
  border-top: 1px solid var(--rule);
  margin-top: 1.25rem;
  padding-top: 0.5rem;
}
.more-options > summary {
  cursor: pointer;
  padding: 0.65rem 0;
  min-height: 2.75rem;
  box-sizing: border-box;
  font-weight: 650;
  color: var(--link);
}
.more-options__body { padding-top: 0.75rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1.5rem 0;
}
/* A file being dragged over the document card: the whole box is the target. */
.card--drop-target { outline: 3px dashed var(--accent); outline-offset: -3px; }
/* The drop hint is for a pointer; a phone has nothing to drag with. */
@media (hover: none) { .drop-hint { display: none; } }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { font-weight: 650; padding: 0; margin-bottom: 0.5rem; }
.field { margin-bottom: 1.25rem; }
/* Label and control on one line, for a short control with a short label. */
.field--inline { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 0.75rem; }
.field--inline > label { margin: 0; }
.field--inline > select { width: auto; }
.field > label,
.field > .label { display: block; font-weight: 650; margin-bottom: 0.25rem; }
.hint { color: var(--muted); font-size: 0.875rem; margin: 0 0 0.4rem; }

/*
 * Every text-entry control, listed by type because `input` on its own would
 * also catch checkboxes, radios and buttons.
 *
 * password, email and search were missing, which meant both fields on the
 * sign-in page - the first screen anyone sees - were browser defaults: 21px
 * tall against 40, a 13px font against the page's own, and a hairline border
 * instead of the 2px one everything else has. Nothing failed a check for it,
 * which is why it survived; it is a consistency and target-size problem rather
 * than a conformance one. A test now asserts this list covers every input type
 * the pages actually use, because a list like this stops covering the thing it
 * exists for the moment somebody adds a type to a form.
 */
input[type="text"],
input[type="url"],
input[type="number"],
input[type="file"],
input[type="password"],
input[type="email"],
input[type="search"],
input[type="tel"],
textarea,
select {
  width: 100%;
  max-width: 34rem;
  font: inherit;
  color: var(--fg);
  background: var(--bg);
  border: 2px solid var(--rule);
  border-radius: var(--radius);
  padding: 0.55rem 0.7rem;
}
input[type="file"] { padding: 0.45rem; }
input[aria-invalid="true"] { border-color: var(--danger); }

/*
 * The label is the target, not the 17px box. It is associated by for/id, so
 * pressing anywhere on the text toggles the box, and the row is tall enough
 * for a thumb whether the label is one line or four.
 */
.checkbox {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
  min-height: 2.75rem;
}
.checkbox input { margin: 0; width: 1.25rem; height: 1.25rem; flex: none; }
.checkbox label { font-weight: 400; padding: 0.5rem 0; cursor: pointer; }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin-top: 1.25rem; }

.btn {
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  border-radius: var(--radius);
  padding: 0.6rem 1.2rem;
  border: 2px solid var(--accent);
  background: var(--accent);
  color: var(--accent-fg);
  /* Target size: comfortably above the 24px minimum in WCAG 2.2 SC 2.5.8. */
  min-height: 2.75rem;
}
.btn:hover { filter: brightness(1.08); }
.btn[disabled] { cursor: not-allowed; opacity: 0.6; }

/*
 * The one irreversible action on a screen must not be its quietest control.
 * On the watch list "Stop watching" was a plain link, lighter than the Pause
 * beside it, which is reversible. --danger is already contrast-tested in both
 * themes (8.6:1 light, 10.0:1 dark), so this borrows a proven color rather
 * than introducing one.
 */
/*
 * Short inline links that are real targets, not prose.
 *
 * WCAG 2.2 adds a 24px minimum (2.5.8). It is outside what Section 508
 * incorporates and outside what this tool reports against, which is exactly
 * why it is worth doing here rather than waiting to be told: the report link
 * on every watched row measured 149x22 and the footer status link 84x18.
 */
.recent-list a,
.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.25rem 0;
}

.btn--danger {
  color: var(--danger);
  border-color: var(--danger);
  background: var(--bg);
  font-weight: 650;
}
.btn--secondary { background: var(--bg); color: var(--link); }
.btn--link {
  background: none; border: 0; color: var(--link);
  text-decoration: underline; padding: 0.4rem; min-height: 2.75rem;
}

/* ---------- Status + errors ---------- */
.status {
  border: 1px solid var(--rule);
  border-left: 5px solid var(--muted);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  margin: 1.25rem 0;
  background: var(--surface);
}
.status:empty { display: none; padding: 0; border: 0; margin: 0; }
.status--error { border-left-color: var(--danger); }
.status--ok { border-left-color: var(--ok); }
.status--busy { border-left-color: var(--accent); }
.status p { margin: 0; }
.status p + p { margin-top: 0.4rem; }
.status strong { display: block; }

/*
 * The stage list beside a running scan.
 *
 * aria-hidden in the markup: everything here is said in words in the live
 * region above it, once per stage. This is the visual companion, and it is
 * what makes a five-minute scan look like it is moving.
 */
.scan-progress { margin: -0.75rem 0 1.25rem; padding: 0 0 0 1.1rem; }
.scan-progress .steps { list-style: none; margin: 0; padding: 0; }
.scan-progress .step {
  color: var(--muted);
  padding: 0.15rem 0;
  display: flex;
  gap: 0.55rem;
  align-items: baseline;
}
.scan-progress .step__mark { width: 1rem; flex: none; text-align: center; }
.scan-progress .step--done { color: var(--ok); }
.scan-progress .step--now { color: var(--fg); font-weight: 600; }
.scan-progress p { margin: 0.5rem 0 0; }

/* Progress bar is decorative; the same value is in the live-region text. */
progress { width: 100%; max-width: 34rem; height: 0.75rem; margin-top: 0.6rem; }

/* ---------- Results ---------- */
.recent-list { list-style: none; margin: 1rem 0; padding: 0; }
.recent-list li {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 0.6rem;
  background: var(--surface);
}
.recent-list a { font-weight: 650; overflow-wrap: anywhere; }
/*
 * Anything a person typed can be two hundred characters with no space in it:
 * an address with a long query, a file named by a machine. It wraps rather
 * than pushing a phone screen sideways. `anywhere` rather than `break-word`
 * so the unbreakable run also counts towards the box's minimum width and a
 * grid or flex row cannot be forced wider by it either.
 */
.recent-list li, #results-body { overflow-wrap: anywhere; }
.recent-list .meta { display: block; color: var(--muted); font-size: 0.875rem; margin-top: 0.2rem; }
/*
 * Not muted, and above the count: it changes what the count means. A row that
 * says "0 problems" about a login screen is the most misleading line this list
 * can print (A11Y-016).
 */
.recent-list .wall-note {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.875rem;
  font-weight: 650;
  color: var(--fg);
}
.status { scroll-margin-top: 0.75rem; }
[hidden] { display: none !important; }
/* The service-status page: plain sentences, one to a line. */
.status-list { margin: 1rem 0; padding-left: 1.25rem; }
.status-list li { margin: 0.4rem 0; }
#status-json { overflow-x: auto; font-size: 0.875rem; }
/* The earlier reports of one address sit behind a disclosure on its row. */
.recent-list .earlier { margin-top: 0.25rem; }
.recent-list .earlier > summary {
  cursor: pointer;
  min-height: 2.75rem;
  box-sizing: border-box;
  padding: 0.75rem 0;
  color: var(--link);
  font-size: 0.875rem;
}
.recent-list .earlier ul {
  list-style: none;
  margin: 0.25rem 0 0.25rem;
  padding: 0 0 0 0.75rem;
  border-left: 2px solid var(--rule);
}
.recent-list .earlier li {
  border: 0;
  border-radius: 0;
  padding: 0.35rem 0 0.35rem 0.25rem;
  margin: 0;
  background: transparent;
}
.recent-list .earlier p { margin: 0.25rem 0 0 1rem; }
/* The cadence control sits inside a sentence, at the sentence's size, and still 44px tall. */
.recent-list select.cadence {
  display: inline-block;
  width: auto;
  min-height: 2.75rem;
  font-size: inherit;
  padding: 0.35rem 1.6rem 0.35rem 0.5rem;
  margin: 0 0.15rem;
  vertical-align: middle;
}

/* Counts and dates: every digit the same width, so a column of them lines up
   and a number that changes does not shift what is beside it. */
.summary-grid, .recent-list .meta, .badge, .group__meta { font-variant-numeric: tabular-nums; }

.summary-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  list-style: none;
  margin: 1.25rem 0;
  padding: 0;
}
.summary-grid li {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1rem;
}
.summary-grid .n { display: block; font-size: 1.875rem; font-weight: 700; line-height: 1.15; }
.summary-grid .l { color: var(--muted); font-size: 0.875rem; }

.verdict {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin: 1rem 0;
  background: var(--surface);
}
.verdict h3 { margin-top: 0; }
.verdict dl { margin: 0; }
.verdict dt { font-weight: 650; margin-top: 0.75rem; }
.verdict dd { margin: 0.2rem 0 0; }

.badge {
  display: inline-block;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.05rem 0.6rem;
  font-size: 0.8125rem;
  margin: 0 0.3rem 0.3rem 0;
  white-space: nowrap;
}
.badge--critical, .badge--serious { border-color: var(--danger); color: var(--danger); font-weight: 650; }
.badge--508 { border-color: var(--warn); color: var(--warn); font-weight: 650; }
.badge--ok { border-color: var(--ok); color: var(--ok); font-weight: 650; }

/* A group is one job: several findings that get fixed the same way. */
.group {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin: 1.25rem 0;
  background: var(--surface);
}
.group h4 { margin-top: 0; font-size: 1.125rem; }
.group__meta { margin: 0.5rem 0 0.75rem; }
.group__who, .group__fix { margin-bottom: 0.5rem; }
.group__findings { margin-top: 1rem; }

/* The technical half, always one disclosure deeper than the explanation. */
.technical {
  border: 1px dashed var(--rule);
  border-radius: var(--radius);
  margin-top: 1rem;
  background: var(--bg);
}
.technical > summary {
  cursor: pointer;
  padding: 0.7rem 0.9rem;
  min-height: 2.75rem;
  box-sizing: border-box;
  font-size: 0.9375rem;
  color: var(--muted);
}
.technical > summary:hover { background: var(--surface); }
.technical__body { padding: 0 0.9rem 0.9rem; }
.technical h5 { margin: 0.75rem 0 0.35rem; font-size: 0.9375rem; }

.finding {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  margin: 0.75rem 0;
  background: var(--bg);
}
.finding > summary {
  cursor: pointer;
  padding: 0.9rem 1.1rem;
  font-weight: 650;
  list-style-position: inside;
}
.finding > summary::marker { color: var(--muted); }
.finding > summary:hover { background: var(--surface); }
.finding__body { padding: 0 1.1rem 1.1rem; border-top: 1px solid var(--rule-soft); }
.finding__meta { margin: 0.75rem 0; }

.shot {
  margin: 0.75rem 0;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  max-width: 100%;
  width: fit-content;
}
.shot img { display: block; max-width: 100%; height: auto; }
.shot figcaption { padding: 0.35rem 0.6rem; background: var(--surface); }

.nodes { list-style: none; padding: 0; margin: 0.5rem 0 0; }
.nodes > li { border-top: 1px solid var(--rule-soft); padding: 0.75rem 0 0; margin-bottom: 0.75rem; }
code, pre { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 0.875rem; }
.selector {
  background: var(--surface-2);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  word-break: break-all;
}
pre {
  background: var(--surface);
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius);
  padding: 0.75rem;
  overflow-x: auto;
  /* Never clip: user text spacing must not lose content (1.4.12). */
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0.5rem 0;
}

.outline { list-style: none; padding: 0; margin: 0.5rem 0; }
.outline li { padding: 0.15rem 0; border-left: 2px solid var(--rule-soft); }
.outline .lvl { color: var(--muted); font-size: 0.8125rem; margin-right: 0.5rem; }
.outline-1 { padding-left: 0.5rem; }
.outline-2 { padding-left: 1.75rem; }
.outline-3 { padding-left: 3rem; }
.outline-4 { padding-left: 4.25rem; }
.outline-5 { padding-left: 5.5rem; }
.outline-6 { padding-left: 6.75rem; }

.downloads { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1rem 0; }
.downloads a { text-decoration: none; }
.downloads-note { margin: -0.25rem 0 1.25rem; }

table { border-collapse: collapse; width: 100%; margin: 1rem 0; }
caption { text-align: left; font-weight: 650; padding-bottom: 0.5rem; }
th, td { border: 1px solid var(--rule); padding: 0.5rem 0.7rem; text-align: left; vertical-align: top; }
th { background: var(--surface); }

.site-footer {
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.875rem;
  padding: 1.5rem 0 3rem;
}

/* Visually hidden but available to assistive technology. */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 40rem) {
  .site-header__inner { padding-top: 0.5rem; padding-bottom: 0.4rem; gap: 0.15rem 1rem; }
  .brand span { display: none; }
  .signed-in { order: 1; }
  .site-nav { order: 2; flex-basis: 100%; }
  .site-nav a { padding: 0.4rem 0.6rem; }
  main { padding-top: 1.25rem; }
  h1 { font-size: 1.625rem; }
  h2 { margin-top: 1.75rem; }
  .card { padding: 1rem; margin: 1rem 0; }
  .status { margin: 1rem 0; padding: 0.75rem 0.9rem; }
  /* The rest of the "Test this page again" sentence goes under the button rather than wrapping beside it. */
  .rerun .small { display: block; margin-top: 0.4rem; }
}

/*
 * Narrow phones: rows that would strand one item alone.
 *
 * At 390px the three navigation items need 425px and have 350px, so the third
 * dropped to a line of its own - which reads as a mistake rather than a
 * decision. Shrinking the type to make them fit needs 13px, and small print on
 * the primary navigation of an accessibility tool is a worse defect than the
 * one being fixed. So they become equal thirds instead: every item the same
 * width, text centered and free to wrap inside its own control, all three on
 * one row at any width. The tap targets get bigger rather than smaller.
 *
 * A form's button row stacks instead. Sign in's row wants 344px for its two
 * secondary links and the card gives it 316, so side by side is not honestly
 * available at this width - and the first attempt at this, which only widened
 * the primary button, produced three lines with the same lonely last one. Every
 * child takes the full width instead: a deliberate stack, where one item to a
 * line is the point rather than the accident, and the primary action ends up
 * the full width of the card under a thumb.
 */
@media (max-width: 26rem) {
  .site-nav li { flex: 1 1 0; min-width: 0; }
  .site-nav a {
    width: 100%;
    justify-content: center;
    text-align: center;
    padding: 0.4rem 0.35rem;
  }

  .actions > * { flex: 1 1 100%; }
  .actions > .btn { justify-content: center; }
}

@media (forced-colors: active) {
  .btn { border: 2px solid ButtonText; }
  .badge, .card, .finding, .status { border: 1px solid CanvasText; }
  a:focus-visible, button:focus-visible { outline: 3px solid CanvasText; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ------------------------------------------------------------------ *
 * Keyboard shortcut help.
 *
 * A <dialog>, so the focus trap, the inert background, Escape and the return
 * of focus on close are the browser's job rather than ours.
 * ------------------------------------------------------------------ */

.shortcut-help {
  max-width: 34rem;
  width: calc(100% - 2rem);
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--bg);
  color: var(--fg);
}

.shortcut-help::backdrop {
  /* Not a color token: ::backdrop cannot see custom properties in every
     engine, and this needs to work rather than be tidy. */
  background: rgba(0, 0, 0, 0.55);
}

.shortcut-help__body { padding: 1.5rem; }
.shortcut-help__body h2 { margin-top: 0; }

.shortcut-help__list {
  margin: 0 0 1.5rem;
  border-top: 1px solid var(--rule);
}

.shortcut-help__row {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--rule);
}

.shortcut-help__row dt { flex: 0 0 4.5rem; margin: 0; }
.shortcut-help__row dd { margin: 0; }

kbd {
  display: inline-block;
  min-width: 1.6rem;
  padding: 0.15rem 0.45rem;
  border: 1px solid var(--rule);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: var(--surface);
  font: 600 0.9em/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-align: center;
}

.shortcut-help__toggle { margin-bottom: 1.5rem; }

/* The one action that follows reading a report: do it again and compare. */
.rerun {
  margin: 2rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

/* What changed since the last test. Deliberately quiet: it is the second thing
   somebody reads, after the verdict, and it is absent entirely on a first scan
   rather than present and empty. */
.changes {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--surface);
}

.changes h3 { margin-top: 0; }
.changes h4 { margin-bottom: 0.25rem; }
.changes__list { margin: 0 0 1rem; padding-left: 1.25rem; }
.changes__new h4 { color: var(--fg); }

/* Writing the alt text the tool refuses to invent. Two columns where there is
   room, stacked on a narrow screen - and the preview capped, because some of
   these are full-width diagrams. */
.describe { margin: 0 0 1.5rem; padding: 0; list-style: none; }

.describe__item {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
}

.describe__preview { flex: 0 0 12rem; }

.describe__preview img {
  max-width: 100%;
  max-height: 9rem;
  border: 1px solid var(--rule);
  background: var(--surface);
}

.describe__field { flex: 1 1 18rem; min-width: 0; }
.describe__field textarea { width: 100%; }

/* Finding one report among two hundred. */
.recent-filter { max-width: 24rem; margin-bottom: 0.5rem; }
.recent-filter input { width: 100%; }

/* Was an inline style attribute on the page-count box. Inline styles are the
   one thing the content policy has to keep permitting; fewer of them is
   better. */
.narrow { max-width: 8rem; }

.narrow-wide { max-width: 20rem; }

/* How an address has gone over time. The chart is the secondary
   representation: the sentence above it says the same thing, and the numbers
   are a disclosure below. */
.trend {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border: 1px solid var(--rule);
  border-radius: 6px;
}

.trend h3 { margin-top: 0; }

.trend__chart {
  display: block;
  max-width: 100%;
  height: auto;
  color: var(--accent);
  fill: var(--accent);
  margin-bottom: 0.5rem;
}

.trend__table { border-collapse: collapse; }
.trend__table caption { text-align: left; padding-bottom: 0.5rem; }
.trend__table th, .trend__table td {
  border: 1px solid var(--rule);
  padding: 0.35rem 0.75rem;
  text-align: left;
}
