/*
 * ADA-Assist pages: one stylesheet.
 *
 * Colours come from custom properties set by /theme.css (per organization, light and dark);
 * the few tints below are mixed from them, a short way towards the page background, so a
 * theme that passes its contrast check still passes here. No fonts are downloaded: headings
 * use a serif the reader's system already has, body text the system's own sans-serif.
 * Sizes are in rem so the pages follow the reader's text size, and every layout wraps to one
 * column, so the pages reflow at 320 CSS pixels and at 400% zoom without sideways scrolling.
 * The only motion is a short colour change on hover, and it is off for prefers-reduced-motion.
 */

:root {
  color-scheme: light dark;
  --serif: "Iowan Old Style", "Charter", "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --tint-ok: color-mix(in srgb, var(--ok) 9%, var(--bg));
  --tint-warn: color-mix(in srgb, var(--warn) 9%, var(--bg));
  --tint-bad: color-mix(in srgb, var(--bad) 8%, var(--bg));
  --tint-info: color-mix(in srgb, var(--info) 8%, var(--bg));
  --radius: 0.5rem;
  --measure: 46rem;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
}

@media screen and (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  a,
  .button {
    transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
  }
}

/* ---------- Focus: always visible, on every control ---------- */

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.site-header :focus-visible {
  outline-color: var(--on-brand);
}

main:focus,
[tabindex="-1"]:focus {
  outline: none;
}

[tabindex="-1"]:focus-visible:not(main) {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* ---------- Helpers ---------- */

.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;
  border: 0;
}

[hidden] {
  display: none !important;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -10rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  background: var(--bg);
  color: var(--link);
  border: 2px solid var(--control);
  border-radius: 0.25rem;
  font-weight: 600;
}

.skip-link:focus {
  top: 0.5rem;
}

/* ---------- Header ---------- */

.site-header {
  background: var(--brand);
  color: var(--on-brand);
  border-bottom: 0.25rem solid var(--accent);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 2rem;
  max-width: 74rem;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 0;
  min-height: 2.75rem;
  color: var(--on-brand);
  text-decoration: none;
}

.brand-mark {
  flex: none;
  width: 2rem;
  height: 2rem;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

a.brand:hover .brand-org,
a.brand:hover .brand-app-only {
  text-decoration: underline;
}

.brand-org,
.brand-app-only {
  font-family: var(--serif);
  font-size: 1.1875rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.brand-app,
.brand-tag {
  font-size: 0.875rem;
}

.brand-logo {
  display: block;
  max-width: 100%;
  max-height: 3rem;
}

.site-nav {
  flex: 1 1 auto;
}

.site-nav-public ul {
  justify-content: flex-end;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.25rem 0.75rem;
  color: var(--on-brand);
  text-decoration: none;
  border-bottom: 0.1875rem solid transparent;
}

.site-nav a:hover {
  text-decoration: underline;
}

/* The current page is marked with a bar and bold text, not by colour alone. */
.site-nav a[aria-current="page"] {
  font-weight: 700;
  border-bottom-color: var(--accent);
}

.account {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  min-width: 0;
}

.account-email {
  font-size: 0.875rem;
  overflow-wrap: anywhere;
}

/* ---------- Main ---------- */

main {
  display: block;
  max-width: 74rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.25;
  text-wrap: balance;
}

h1 {
  margin: 0 0 1rem;
  font-size: 2.25rem;
  letter-spacing: -0.01em;
}

h2 {
  margin: 2.75rem 0 0.875rem;
  font-size: 1.5rem;
}

h3 {
  margin: 1.75rem 0 0.625rem;
  font-size: 1.1875rem;
}

p,
ul,
ol,
dl {
  margin: 0 0 1rem;
}

main p,
main li {
  max-width: var(--measure);
}

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

a:hover {
  text-decoration-thickness: 0.125em;
}

.back {
  margin-bottom: 0.75rem;
  font-size: 0.9375rem;
}

.back a {
  display: inline-flex;
  align-items: center;
  min-height: 1.5rem;
}

.back a::before {
  content: "\2190\00a0";
}

.page-head {
  margin-bottom: 1.75rem;
}

.page-head h1 {
  margin-bottom: 0.5rem;
}

.page-head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.page-head-actions h1 {
  margin: 0;
}

.lede {
  font-size: 1.1875rem;
  color: var(--muted);
}

.eyebrow,
.step-label,
.verdict-eyebrow {
  margin: 0 0 0.375rem;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.doc-title,
.doc-name,
.hash,
.download-name {
  overflow-wrap: anywhere;
}

.hash {
  font-family: var(--mono);
  font-size: 0.875rem;
}

.hint,
.wcag-note,
.doc-summary {
  color: var(--muted);
}

.hint {
  font-size: 0.9375rem;
}

.doc-summary {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.9375rem;
}

/* ---------- Icons and status: an icon and words. Colour is extra, never the only signal. ---------- */

.icon {
  flex: none;
  width: 1.25em;
  height: 1.25em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--info);
  font-weight: 600;
}

.status-ready,
.check-passed,
.outcome-verified,
.tone-ok .verdict-mark,
.proof-passed .icon,
.glance-ok .icon {
  color: var(--ok);
}

.status-not_verified,
.check-failed,
.outcome-not-verified,
.tone-bad .verdict-mark,
.proof-failed .icon,
.glance-bad .icon {
  color: var(--bad);
}

.status-needs_change,
.check-unknown,
.check-unsupported,
.outcome-needs-change,
.tone-warn .verdict-mark,
.proof-unknown .icon,
.proof-unsupported .icon,
.glance-warn .icon {
  color: var(--warn);
}

.tone-info .verdict-mark,
.glance-info .icon {
  color: var(--info);
}

.check-not_applicable,
.tone-muted .verdict-mark,
.proof-not_applicable .icon {
  color: var(--muted);
}

.outcome {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-family: var(--serif);
  font-size: 1.375rem;
  line-height: 1.3;
}

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.5rem 1.125rem;
  background: var(--button);
  color: var(--on-button);
  border: 0.125rem solid var(--button);
  border-radius: 0.375rem;
  font: inherit;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  text-decoration: underline;
  background: color-mix(in srgb, var(--button) 86%, var(--text));
  border-color: color-mix(in srgb, var(--button) 86%, var(--text));
}

.button-secondary {
  background: var(--bg);
  color: var(--link);
  border-color: var(--control);
}

.button-secondary:hover {
  background: var(--surface);
  border-color: var(--link);
}

.button-large {
  min-height: 3rem;
  padding: 0.625rem 1.375rem;
  font-size: 1.0625rem;
}

.button-wide {
  width: 100%;
}

.button-header {
  min-height: 2.75rem;
  padding: 0.25rem 0.875rem;
  background: transparent;
  color: var(--on-brand);
  border-color: var(--on-brand);
  font-weight: 400;
}

.button-header:hover {
  background: transparent;
  border-color: var(--on-brand);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}

/* ---------- Forms ---------- */

.field {
  margin-bottom: 1.25rem;
}

label {
  display: block;
  margin-bottom: 0.375rem;
  font-weight: 600;
}

input[type="email"],
input[type="text"],
textarea {
  display: block;
  width: 100%;
  max-width: 30rem;
  min-height: 3rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg);
  color: var(--text);
  border: 0.125rem solid var(--control);
  border-radius: 0.375rem;
  font: inherit;
}

.code-input {
  max-width: 12rem;
  font-family: var(--mono);
  font-size: 1.375rem;
  letter-spacing: 0.2em;
}

textarea {
  max-width: 40rem;
  resize: vertical;
}

/* An invalid field gets a thicker edge as well as the error colour and the error text. */
[aria-invalid="true"] {
  border-color: var(--bad);
  border-left-width: 0.5rem;
}

.field .hint {
  margin: 0.375rem 0 0;
}

.field-error {
  margin: 0.375rem 0 0;
  color: var(--bad);
  font-weight: 600;
}

.field-error:empty {
  display: none;
}

.notice {
  max-width: var(--measure);
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 0.0625rem solid var(--control);
  border-left-width: 0.375rem;
  border-radius: 0.25rem;
}

.notice-bad {
  border-color: var(--bad);
}

.notice-ok {
  border-color: var(--ok);
}

.notice-warn {
  border-color: var(--warn);
}

/* ---------- Panels ---------- */

.panel {
  max-width: 52rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 0.0625rem solid var(--line);
  border-radius: var(--radius);
}

.panel h2 {
  margin-top: 0;
}

/* ---------- The verdict: the one strong element on a document page ---------- */

.verdict {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0 1.25rem;
  max-width: 56rem;
  margin: 1.5rem 0 2rem;
  padding: 1.5rem 1.75rem;
  background: var(--surface);
  border: 0.0625rem solid var(--control);
  border-left-width: 0.5rem;
  border-radius: var(--radius);
}

.verdict.tone-ok {
  background: var(--tint-ok);
  border-color: var(--ok);
}

.verdict.tone-warn {
  background: var(--tint-warn);
  border-color: var(--warn);
}

.verdict.tone-bad {
  background: var(--tint-bad);
  border-color: var(--bad);
}

.verdict.tone-info {
  background: var(--tint-info);
  border-color: var(--info);
}

.verdict-mark .icon {
  width: 3rem;
  height: 3rem;
  stroke-width: 1.8;
}

.verdict-body > :last-child {
  margin-bottom: 0;
}

.verdict h2 {
  margin: 0 0 0.75rem;
  font-size: 2rem;
  line-height: 1.2;
}

.verdict-meaning {
  font-size: 1.125rem;
}

.verdict .button-row {
  margin-top: 1.25rem;
}

.verdict-report {
  margin: 0 0 1.25rem;
  padding: 1.25rem 1.5rem;
}

.verdict-report .verdict-mark .icon {
  width: 2.25rem;
  height: 2.25rem;
}

/* ---------- Document page ---------- */

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 2rem;
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.meta > div {
  display: flex;
  gap: 0.375rem;
}

.meta dt::after {
  content: ":";
}

.meta dd {
  margin: 0;
  color: var(--text);
}

.findings {
  max-width: var(--measure);
  padding-left: 1.25rem;
}

.findings li {
  margin-bottom: 0.5rem;
}

.fixes li::marker {
  color: var(--ok);
}

.plain-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* The remediation guide: numbered steps, each with where and the two ways to fix it. */
.guide {
  max-width: 56rem;
}

.guide-lede {
  font-size: 1.125rem;
}

.guide-ways {
  max-width: var(--measure);
  margin: 0 0 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 0.0625rem solid var(--line);
  border-radius: var(--radius);
}

.guide-ways ul {
  margin: 0;
  padding-left: 1.25rem;
}

.guide-ways li + li {
  margin-top: 0.5rem;
}

.guide-ways-title {
  margin-bottom: 0.5rem;
}

.guide-steps {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.guide-step {
  max-width: none;
  margin: 0 0 1.25rem;
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 0.25rem solid var(--control);
}

.guide-step > h3 {
  margin-top: 0.5rem;
}

.guide-number {
  color: var(--muted);
}

.guide-step h4 {
  margin: 1rem 0 0.375rem;
  font-size: 1rem;
}

.guide-places,
.guide-also {
  max-width: var(--measure);
  padding-left: 1.25rem;
}

.guide-places li,
.guide-also li {
  margin-bottom: 0.375rem;
  overflow-wrap: anywhere;
}

.guide-routes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: 0 2rem;
}

.guide-route ol {
  padding-left: 1.25rem;
}

.guide-route li {
  margin-bottom: 0.375rem;
}

/* The checks, as a list to read top to bottom. */
.tally {
  font-weight: 600;
}

.evidence {
  max-width: 56rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  border-top: 0.0625rem solid var(--line);
}

.evidence-item {
  display: grid;
  grid-template-columns: 10.5rem minmax(0, 1fr);
  gap: 0.25rem 1.25rem;
  max-width: none;
  padding: 0.625rem 0;
  border-bottom: 0.0625rem solid var(--line);
}

.evidence-item .status {
  align-self: start;
}

.evidence-body p {
  margin: 0;
}

.evidence-label {
  font-weight: 600;
}

.evidence-detail {
  color: var(--muted);
}

.evidence-places {
  margin: 0.375rem 0 0;
  padding-left: 1.25rem;
}

.evidence-failed,
.evidence-unknown,
.evidence-unsupported {
  background: linear-gradient(to right, var(--surface), var(--bg));
}

/* The rebuilt copy beside the file as uploaded. */
.compare {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 1rem;
  max-width: 56rem;
}

.compare-side {
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 0.0625rem solid var(--line);
  border-radius: var(--radius);
}

.compare-side h3 {
  margin-top: 0;
}

.compare-side > :last-child {
  margin-bottom: 0;
}

.proofs {
  max-width: 56rem;
  padding: 0;
  list-style: none;
}

.proofs li {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.proofs .icon {
  margin-top: 0.15em;
}

.downloads {
  max-width: 56rem;
}

.download-list {
  padding: 0;
  list-style: none;
  border-top: 0.0625rem solid var(--line);
}

.download-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem 1rem;
  max-width: none;
  padding: 0.875rem 0;
  border-bottom: 0.0625rem solid var(--line);
}

.download-list .icon {
  width: 1.75rem;
  height: 1.75rem;
  color: var(--muted);
}

.download-list p {
  margin: 0;
}

.download-name {
  font-weight: 600;
}

.problem {
  max-width: var(--measure);
  margin-top: 3rem;
  padding-top: 0.5rem;
  border-top: 0.0625rem solid var(--line);
}

.problem h2 {
  margin-top: 1.5rem;
  font-size: 1.25rem;
}

/* Progress of a document still being worked on. Each stage says Done, Now or Next. */
.progress-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-width: none;
  margin: 1.25rem 0;
  padding: 0;
  list-style: none;
}

.progress-steps li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: none;
  padding: 0.375rem 0.875rem 0.375rem 0.625rem;
  background: var(--bg);
  border: 0.0625rem solid var(--line);
  border-radius: 2rem;
  font-size: 0.9375rem;
}

.step-dot {
  width: 0.75rem;
  height: 0.75rem;
  border: 0.125rem solid var(--control);
  border-radius: 50%;
}

.step-done .step-dot {
  background: var(--ok);
  border-color: var(--ok);
}

.step-now {
  border-color: var(--info) !important;
  border-width: 0.125rem !important;
  font-weight: 600;
}

.step-now .step-dot {
  background: var(--info);
  border-color: var(--info);
}

.step-state {
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 400;
}

.step-state::before {
  content: "(";
}

.step-state::after {
  content: ")";
}

.progress-announce:empty {
  display: none;
}

/* ---------- Lists of facts ---------- */

.facts {
  max-width: 60rem;
}

.facts > div {
  display: grid;
  grid-template-columns: minmax(0, 16rem) minmax(0, 1fr);
  gap: 0.125rem 1rem;
  padding: 0.5rem 0;
  border-bottom: 0.0625rem solid var(--line);
}

.facts dt {
  color: var(--muted);
}

.facts dd {
  margin: 0;
}

.dash-list,
.tick-list {
  padding: 0;
  list-style: none;
}

.dash-list li {
  position: relative;
  margin-bottom: 0.625rem;
  padding-left: 1.25rem;
}

.dash-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.8em;
  width: 0.625rem;
  border-top: 0.125rem solid var(--control);
}

.tick-list li {
  display: flex;
  gap: 0.625rem;
  margin-bottom: 0.625rem;
}

.tick-list .icon {
  margin-top: 0.15em;
  color: var(--ok);
}

/* ---------- Tables ---------- */

/* A wide table scrolls inside its own box; the page itself never scrolls sideways. */
.table-wrap {
  /* Positioned, so visually hidden text inside a wide table is clipped with it. */
  position: relative;
  max-width: 100%;
  margin-bottom: 1rem;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

caption {
  padding: 0 0 0.5rem;
  color: var(--muted);
  text-align: left;
}

th,
td {
  padding: 0.75rem 0.875rem;
  border-bottom: 0.0625rem solid var(--line);
  text-align: left;
  vertical-align: top;
}

thead th {
  background: var(--surface);
  border-bottom: 0.125rem solid var(--control);
  font-size: 0.9375rem;
}

tbody th {
  font-weight: 600;
}

.checks-table {
  min-width: 40rem;
}

.changes-table {
  max-width: 56rem;
}

.changes-table td:first-child {
  white-space: nowrap;
}

.tools-table {
  max-width: 36rem;
}

.documents-table tbody tr:hover {
  background: var(--surface);
}

.doc-name a {
  font-weight: 600;
}

.row-link {
  display: inline-flex;
  align-items: center;
  min-height: 1.5rem;
}

.doc-date,
.doc-next {
  white-space: nowrap;
  color: var(--muted);
}

/* Shown only when the rows are stacked and the column headings are out of sight. */
.cell-label {
  display: none;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.5rem;
}

.pager a,
.pager span {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

.pager-off {
  color: var(--muted);
}

/* The counts at the top of the documents list. */
.glance {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
}

.glance li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.875rem;
  background: var(--surface);
  border: 0.0625rem solid var(--line);
  border-radius: 2rem;
}

.empty-state {
  max-width: 36rem;
  margin: 1rem 0;
  padding: 2.5rem 2rem;
  text-align: center;
  background: var(--surface);
  border: 0.125rem dashed var(--control);
  border-radius: var(--radius);
}

.empty-state > .icon {
  width: 2.5rem;
  height: 2.5rem;
  color: var(--muted);
}

.empty-state h2 {
  margin-top: 0.5rem;
}

.empty-state p {
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Upload ---------- */

.dropzone {
  max-width: 52rem;
  margin: 1.5rem 0;
  padding: 2.25rem 1.5rem;
  text-align: center;
  background: var(--surface);
  border: 0.1875rem dashed var(--control);
  border-radius: 0.75rem;
}

.dropzone > .icon {
  width: 2.75rem;
  height: 2.75rem;
  color: var(--muted);
}

.dropzone h2 {
  margin-top: 0.5rem;
}

.dropzone p {
  margin-left: auto;
  margin-right: auto;
}

.dropzone .limits {
  font-weight: 600;
}

.dropzone .button-row {
  justify-content: center;
  margin-bottom: 0;
}

/* While a file is dragged over the box its edge turns solid and thicker. */
.dropzone.is-over {
  border-style: solid;
  border-width: 0.3125rem;
  border-color: var(--focus);
  padding: 2.125rem 1.375rem;
  background: var(--tint-info);
}

.upload-summary {
  font-weight: 600;
}

.file-list {
  max-width: 56rem;
  padding: 0;
  list-style: none;
  border-top: 0.0625rem solid var(--line);
}

.file-list li {
  display: grid;
  gap: 0.375rem;
  max-width: none;
  padding: 0.875rem 0;
  border-bottom: 0.0625rem solid var(--line);
}

.file-name {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.file-size {
  color: var(--muted);
  font-weight: 400;
}

.file-state-failed .status,
.file-state-skipped .status {
  color: var(--bad);
}

.file-state-done .status {
  color: var(--ok);
}

.file-check {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.75rem;
  margin: 0;
  font-size: 0.9375rem;
}

.file-check-final {
  font-weight: 600;
}

.file-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}

.file-actions:empty {
  display: none;
}

.file-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 1.5rem;
}

progress {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  max-width: 30rem;
  height: 0.875rem;
  background: var(--bg);
  border: 0.0625rem solid var(--control);
  border-radius: 0.5rem;
  overflow: hidden;
}

progress::-webkit-progress-bar {
  background: var(--bg);
}

progress::-webkit-progress-value {
  background: var(--button);
}

progress::-moz-progress-bar {
  background: var(--button);
}

.mini-steps {
  max-width: var(--measure);
  padding-left: 1.5rem;
}

.mini-steps li {
  margin-bottom: 0.375rem;
}

.after-upload {
  margin-top: 2.5rem;
}

/* ---------- Usage ---------- */

.big-number {
  font-family: var(--serif);
  font-size: 1.375rem;
}

.big-number strong {
  font-size: 3rem;
  line-height: 1;
}

.usage-bar {
  max-width: 100%;
  height: 1.25rem;
}

.remaining {
  font-weight: 600;
}

/* ---------- Sign in ---------- */

.signin {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: 2rem 3rem;
  max-width: 60rem;
  margin: 1rem 0;
}

.signin-card {
  max-width: 30rem;
  padding: 2rem;
  background: var(--surface);
  border: 0.0625rem solid var(--line);
  border-top: 0.25rem solid var(--accent);
  border-radius: var(--radius);
}

.signin-card h1 {
  font-size: 2rem;
}

.signin-aside h2 {
  margin-top: 0.5rem;
  font-size: 1.25rem;
}

/* ---------- Home ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  align-items: center;
  gap: 2rem 3.5rem;
  padding: 1.5rem 0 3rem;
  border-bottom: 0.0625rem solid var(--line);
}

.hero h1 {
  font-size: 2.75rem;
  line-height: 1.15;
}

.ai-statement {
  display: flex;
  gap: 0.625rem;
  padding: 0.875rem 1rem;
  background: var(--surface);
  border-left: 0.375rem solid var(--accent);
  border-radius: 0.25rem;
}

.ai-statement .icon {
  margin-top: 0.2em;
  color: var(--muted);
}

.hero-example {
  margin: 0;
}

.hero-example figcaption {
  margin-bottom: 0.5rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.example-verdict {
  padding: 1.5rem;
  background: var(--tint-ok);
  border: 0.0625rem solid var(--ok);
  border-left-width: 0.5rem;
  border-radius: var(--radius);
}

.example-verdict p,
.example-verdict ul {
  margin: 0 0 0.75rem;
}

.example-file,
.example-checks li {
  display: flex;
  gap: 0.5rem;
  font-size: 0.9375rem;
}

.example-file {
  color: var(--muted);
}

.example-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
}

.example-title .icon,
.example-checks .icon {
  color: var(--ok);
}

.example-title .icon {
  width: 1.75rem;
  height: 1.75rem;
}

.example-checks {
  padding: 0.75rem 0 0;
  list-style: none;
  border-top: 0.0625rem solid var(--line);
}

.example-checks li {
  margin-bottom: 0.25rem;
}

.home-section {
  padding: 1rem 0 2rem;
}

.home-section > h2 {
  font-size: 1.875rem;
}

.section-lede {
  font-size: 1.125rem;
}

.group-title {
  margin-top: 2rem;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.result-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 1rem;
  padding: 0;
  list-style: none;
}

.result-cards-two {
  max-width: 50rem;
}

.result-card {
  max-width: none;
  padding: 1.25rem 1.375rem;
  background: var(--surface);
  border: 0.0625rem solid var(--line);
  border-top: 0.25rem solid var(--control);
  border-radius: var(--radius);
}

.result-card.tone-ok {
  border-top-color: var(--ok);
}

.result-card.tone-warn {
  border-top-color: var(--warn);
}

.result-card.tone-bad {
  border-top-color: var(--bad);
}

.result-card h3,
.callout h3 {
  display: flex;
  gap: 0.5rem;
  margin: 0 0 0.5rem;
}

.result-card h3 .icon {
  margin-top: 0.1em;
}

.tone-ok h3 .icon {
  color: var(--ok);
}

.tone-warn h3 .icon {
  color: var(--warn);
}

.tone-bad h3 .icon {
  color: var(--bad);
}

.result-card p {
  margin: 0;
}

.callout {
  max-width: 50rem;
  margin-top: 1.5rem;
  padding: 1.25rem 1.375rem;
  border: 0.0625rem solid var(--control);
  border-radius: var(--radius);
}

.callout p {
  margin: 0;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: 1rem;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.steps li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.875rem;
  max-width: none;
  padding: 1.125rem 1.25rem;
  border: 0.0625rem solid var(--line);
  border-radius: var(--radius);
}

.steps h3 {
  margin: 0.25rem 0 0.375rem;
}

.steps p {
  margin: 0;
  font-size: 0.9875rem;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 0.125rem solid var(--control);
  border-radius: 50%;
  font-family: var(--serif);
  font-weight: 700;
}

.home-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: 0 3rem;
}

.home-signin {
  margin-top: 1rem;
  padding: 1.5rem 1.75rem;
  background: var(--surface);
  border: 0.0625rem solid var(--line);
  border-radius: var(--radius);
}

.home-signin h2 {
  margin-top: 0;
}

.home-signin .button-row {
  margin-bottom: 0.5rem;
}

/* ---------- Text colour offer ---------- */

.offer {
  max-width: 60rem;
}

.offer-lede {
  font-size: 1.125rem;
}

.terms {
  max-width: var(--measure);
  padding-left: 1.25rem;
}

.terms li {
  margin-bottom: 0.5rem;
}

.decision {
  max-width: 52rem;
  margin: 1.5rem 0;
  padding: 1.5rem;
  border: 0.125rem solid var(--control);
  border-radius: var(--radius);
}

.decision form {
  margin-bottom: 1rem;
}

.decline {
  padding-top: 1rem;
  border-top: 0.0625rem solid var(--line);
}

.decline h3 {
  margin-top: 0;
  font-size: 1.0625rem;
}

.decline p {
  margin: 0;
}

.correction h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.swatch {
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
  vertical-align: middle;
}

.colour-table td.colour {
  white-space: nowrap;
}

.colour-table td.colour span {
  margin-left: 0.375rem;
  font-family: var(--mono);
}

.previews {
  list-style: none;
  margin: 0;
  padding: 0;
}

.previews > li {
  max-width: none;
  margin: 0 0 1.5rem;
}

.preview-pair {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.preview-pair figure {
  margin: 0;
  max-width: 100%;
}

.preview-pair figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
  margin-bottom: 0.375rem;
  font-family: var(--mono);
  font-size: 0.875rem;
}

.preview-tag {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
}

.preview-pair img {
  display: block;
  /* The engine's crops are small; shown larger, with each pixel kept sharp, so a slight
     colour difference can be seen. */
  width: 18rem;
  max-width: 100%;
  height: auto;
  image-rendering: pixelated;
  border: 0.0625rem solid var(--control);
  border-radius: 0.25rem;
  background: #fff;
}

/* ---------- Report ---------- */

.report-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-bottom: 1rem;
  border-bottom: 0.125rem solid var(--text);
}

.report-head h1 {
  margin-bottom: 0.25rem;
}

.report-file {
  margin-bottom: 0.25rem;
  font-size: 1.1875rem;
}

.report-date {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

.layout-report section {
  max-width: 64rem;
}

.report-foot {
  margin-top: 2rem;
  color: var(--muted);
  font-size: 0.9375rem;
  overflow-wrap: anywhere;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--surface);
  border-top: 0.0625rem solid var(--line);
  color: var(--muted);
  font-size: 0.9375rem;
}

.footer-inner {
  max-width: 74rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2rem;
}

.footer-inner p {
  max-width: var(--measure);
  margin: 0 0 0.5rem;
}

.footer-ai {
  color: var(--text);
}

.footer-inner a {
  display: inline-flex;
  align-items: center;
  min-height: 1.5rem;
}

/* ---------- Narrow screens ---------- */

@media (max-width: 60rem) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero h1 {
    font-size: 2.25rem;
  }
}

@media (max-width: 40rem) {
  body {
    font-size: 1rem;
  }

  main {
    padding: 1.25rem 1rem 3rem;
  }

  .header-inner {
    padding: 0.625rem 1rem;
    gap: 0.25rem 1rem;
  }

  .brand-tag {
    display: none;
  }

  h1,
  .hero h1 {
    font-size: 1.75rem;
  }

  h2,
  .home-section > h2 {
    font-size: 1.375rem;
  }

  .lede {
    font-size: 1.0625rem;
  }

  .verdict {
    grid-template-columns: minmax(0, 1fr);
    padding: 1.25rem 1rem;
  }

  .verdict-mark .icon {
    width: 2.25rem;
    height: 2.25rem;
  }

  .verdict h2 {
    font-size: 1.5rem;
  }

  .verdict .button,
  .home-signin .button,
  .hero .button {
    width: 100%;
  }

  .evidence-item {
    grid-template-columns: minmax(0, 1fr);
  }

  .download-list li {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .download-list li .button {
    grid-column: 1 / -1;
  }

  .facts > div {
    grid-template-columns: minmax(0, 1fr);
  }

  .signin-card {
    padding: 1.25rem 1rem;
  }

  .decision,
  .panel,
  .home-signin {
    padding: 1rem;
  }

  th,
  td {
    padding: 0.5rem 0.375rem;
  }

  /*
   * The documents list becomes one block per document: name, result, then the date and the
   * next step. It is still a table to a screen reader (the roles are in the markup).
   */
  .documents-table,
  .documents-table tbody {
    display: block;
  }

  .documents-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .documents-table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.375rem;
    padding: 0.875rem 0;
    border-bottom: 0.0625rem solid var(--line);
  }

  .documents-table tbody th,
  .documents-table tbody td {
    display: block;
    padding: 0;
    border: 0;
  }

  .cell-label {
    display: inline;
  }
}

/* ---------- Windows high contrast and other forced colours ---------- */

@media (forced-colors: active) {
  .site-header {
    border-bottom-color: CanvasText;
  }

  .site-nav a[aria-current="page"] {
    border-bottom-color: CanvasText;
  }

  .verdict,
  .result-card,
  .example-verdict {
    border-color: CanvasText;
  }

  .step-done .step-dot,
  .step-now .step-dot {
    forced-color-adjust: none;
    background: CanvasText;
  }

  progress {
    forced-color-adjust: none;
    background: Canvas;
    border-color: CanvasText;
  }

  progress::-webkit-progress-bar {
    background: Canvas;
  }

  progress::-webkit-progress-value {
    background: Highlight;
  }

  progress::-moz-progress-bar {
    background: Highlight;
  }
}

/* ---------- Print: the validation report prints cleanly, in black on white ---------- */

@media print {
  :root {
    color-scheme: light;
    --bg: #ffffff;
    --surface: #ffffff;
    --text: #000000;
    --muted: #333333;
    --line: #999999;
    --control: #555555;
    --brand: #ffffff;
    --on-brand: #000000;
    --accent: #000000;
    --link: #000000;
    --button: #000000;
    --on-button: #ffffff;
    --focus: #000000;
    --ok: #114d2c;
    --warn: #5e3300;
    --bad: #7d1a15;
    --info: #1f3b5c;
    --tint-ok: #ffffff;
    --tint-warn: #ffffff;
    --tint-bad: #ffffff;
    --tint-info: #ffffff;
  }

  body {
    font-size: 11pt;
  }

  .skip-link,
  .site-nav,
  .account,
  .no-print,
  .problem,
  #problem-form,
  [data-print],
  .site-footer a {
    display: none !important;
  }

  .site-header {
    border-bottom-width: 0.0625rem;
  }

  .header-inner,
  main,
  .footer-inner {
    max-width: none;
    padding-left: 0;
    padding-right: 0;
  }

  main {
    padding-top: 1rem;
  }

  .site-footer {
    background: #ffffff;
  }

  .table-wrap {
    overflow: visible;
  }

  .checks-table {
    min-width: 0;
  }

  .verdict {
    break-inside: avoid;
  }

  a {
    text-decoration: none;
  }

  h2 {
    margin-top: 1.5rem;
    break-after: avoid;
  }

  tr,
  li,
  .facts > div {
    break-inside: avoid;
  }

  /* A step of the guide can be longer than a page; its parts keep together instead. */
  .guide-step {
    break-inside: auto;
  }

  .guide-route {
    break-inside: avoid;
  }

  thead {
    display: table-header-group;
  }
}

/* What a screen reader gets */
.sr-grid { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 64rem) { .sr-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } .sr-image { position: sticky; top: 1rem; } }
.sr-image { margin: 0; }
.sr-image img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.sr-image figcaption { font-size: 0.875rem; margin-top: 0.25rem; }
.sr-list, .sr-headings { list-style: none; padding: 0; margin: 0; }
.sr-list { counter-reset: sr; }
.sr-item, .sr-headings li { padding: 0.3rem 0.5rem; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.sr-role { display: inline-block; min-width: 6.5rem; font-size: 0.8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; }
.sr-heading { font-weight: 700; }
.sr-picture .sr-text { font-style: italic; }
.sr-target { font-size: 0.875rem; }
.sr-d1 { margin-left: 1rem; } .sr-d2 { margin-left: 2rem; } .sr-d3 { margin-left: 3rem; } .sr-d4 { margin-left: 4rem; }
.sr-d5, .sr-d6, .sr-d7, .sr-d8 { margin-left: 5rem; }
@media (max-width: 40rem) { .sr-d1, .sr-d2, .sr-d3, .sr-d4, .sr-d5, .sr-d6, .sr-d7, .sr-d8 { margin-left: 0.75rem; } .sr-role { min-width: 0; margin-right: 0.4rem; } }
.sr-page { margin-top: 2rem; }

/* ---------- Fix it here ---------- */

.fix-list {
  padding-left: 1.5rem;
}

.fix-item {
  margin-bottom: 1.25rem;
}

.fix-item fieldset {
  border: 0.0625rem solid var(--line);
  border-radius: 0.375rem;
  padding: 0.75rem 1rem;
}

.fix-words {
  font-weight: 600;
}

.fix-check {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}

.fix-check input {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.2rem;
}

.fix-check label {
  font-weight: 400;
}

.fix-page img {
  max-width: 100%;
  border: 0.0625rem solid var(--line);
}

#fix-form select {
  min-height: 3rem;
  max-width: 30rem;
  width: 100%;
  font: inherit;
  padding: 0.5rem 0.75rem;
  background: var(--bg);
  color: var(--text);
  border: 0.125rem solid var(--control);
  border-radius: 0.375rem;
}
