/* Page Check. Design decisions are in docs/HOW-IT-WORKS.md; don't add a
   font, colour, radius, shadow or animation without agreeing it first. */

@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/atkinson-hyperlegible-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/atkinson-hyperlegible-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/atkinson-hyperlegible-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --text: #1B1F23;
  --bg: #FFFFFF;
  --muted: #55606B;
  --rule: #D5DADF;
  --accent: #0B5FA5;  /* button, links and focus ring only */
  --alert: #B3261E;   /* the "Needs fixing" marker only, always with words */
  --radius: 4px;      /* field and button only */
  --width: 680px;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Atkinson Hyperlegible", system-ui, sans-serif;
  line-height: 1.5;
  /* Long web addresses must wrap rather than push the page sideways. */
  overflow-wrap: break-word;
}

.wrap {
  max-width: calc(var(--width) + 32px);
  margin: 0 auto;
  padding: 0 16px;
}

a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }

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

.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  background: var(--bg);
  padding: 8px;
}
.skip:focus { top: 8px; }

/* Header and footer ---------------------------------------------------- */

.site-header {
  border-bottom: 1px solid var(--rule);
  padding: 14px 0;
}
.header-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}
.site-name .muted { font-weight: 400; }
.site-name {
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}
.site-name:hover { text-decoration: underline; }

.site-footer {
  border-top: 1px solid var(--rule);
  margin-top: 64px;
  padding: 20px 0 40px;
  color: var(--muted);
  font-size: 0.89rem;
}
.site-footer p { margin: 0 0 6px; }

/* Type ----------------------------------------------------------------- */

h1 {
  font-size: 2rem;
  line-height: 1.2;
  margin: 28px 0 20px;
}
h2 {
  font-size: 1.45rem;
  line-height: 1.25;
  margin: 0 0 8px;
}
h3 {
  font-size: 1.15rem;
  line-height: 1.3;
  margin: 0 0 6px;
}
p { margin: 0 0 12px; }
ul, ol { margin: 0 0 12px; padding-left: 1.4em; }
li { margin-bottom: 4px; }

.label { font-weight: 700; }
.muted { color: var(--muted); }
code { font-family: inherit; overflow-wrap: anywhere; }

/* Form ----------------------------------------------------------------- */

label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
}

.field-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

input[type="url"] {
  flex: 1 1 320px;
  min-width: 0;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--muted);
  border-radius: var(--radius);
  padding: 10px 12px;
}

.button {
  font: inherit;
  font-weight: 700;
  color: #FFFFFF;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 10px 18px;
  cursor: pointer;
}
.button:hover { text-decoration: underline; }
.button[disabled] { cursor: progress; }

.hint {
  color: var(--muted);
  margin-top: 8px;
}

.status {
  min-height: 1.5em;
  margin: 12px 0 0;
}
.status.is-error { font-weight: 700; }

/* Results -------------------------------------------------------------- */

#results {
  margin-top: 4px;
}
#results h2:focus, h1[tabindex="-1"]:focus, .form-errors:focus { outline: none; }

.checked-line {
  color: var(--muted);
  font-size: 0.89rem;
  overflow-wrap: anywhere;
}

.summary {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.summary-more { margin-bottom: 4px; }

.share {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin: 20px 0 8px;
  padding: 16px 0 12px;
}
.share-url {
  font-size: 1.1rem;
  overflow-wrap: anywhere;
  margin-bottom: 10px;
}
.share-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
}
.privacy {
  color: var(--muted);
  font-size: 0.89rem;
}
details { margin-bottom: 4px; }
summary {
  cursor: pointer;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
details[open] summary { margin-bottom: 8px; }

.issues {
  list-style: none;
  padding: 0;
  margin: 0;
}
.issue {
  border-bottom: 1px solid var(--rule);
  padding: 20px 0 12px;
  margin: 0;
}
.issue:last-child { border-bottom: 0; }
.marker {
  color: var(--alert);
  font-weight: 700;
  font-size: 0.89rem;
  margin-bottom: 2px;
}
.issue .label { margin-bottom: 4px; }
.steps { margin-bottom: 8px; }

.all-clear {
  font-weight: 700;
  margin-top: 20px;
}

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

.report-intro { color: var(--muted); }

.support {
  border-top: 1px solid var(--rule);
  margin-top: 40px;
  padding-top: 24px;
}
.support h3 { margin-top: 28px; }

.facts {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 16px;
  font-size: 0.89rem;
}
.facts th, .facts td {
  text-align: left;
  vertical-align: top;
  padding: 6px 12px 6px 0;
  border-bottom: 1px solid var(--rule);
}
.facts th {
  width: 34%;
  font-weight: 700;
}
.facts td { overflow-wrap: anywhere; }

@media (max-width: 480px) {
  h1 { font-size: 1.6rem; margin-top: 28px; }
  .button { width: 100%; }
  .share-actions .button { width: auto; }
  .facts th, .facts td { display: block; width: auto; padding-right: 0; }
  .facts th { border-bottom: 0; padding-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}

/* Demo banner, request support and help pages ---------------------------- */

.demo-banner {
  border: 2px solid var(--text);
  padding: 10px 14px;
  margin: 24px 0 0;
}

.lede { font-size: 1.1rem; }

.button-quiet {
  font: inherit;
  color: var(--accent);
  background: var(--bg);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 6px 14px;
  cursor: pointer;
}
.button-quiet:hover { text-decoration: underline; }
a.button { display: inline-block; text-decoration: none; }
a.button:hover { text-decoration: underline; }

fieldset {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 24px 0 0;
  padding: 16px 0 0;
}
legend {
  font-size: 1.15rem;
  font-weight: 700;
  padding: 0 8px 0 0;
}
.field { margin-bottom: 16px; }
.support-form input[type="text"],
.support-form input[type="email"],
.support-form input[type="tel"],
.support-form textarea {
  display: block;
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--muted);
  border-radius: var(--radius);
  padding: 10px 12px;
}
.support-form textarea { line-height: 1.45; resize: vertical; }
.support-form .hint { margin: -4px 0 8px; }
.remember { display: flex; gap: 8px; align-items: baseline; }
.remember label { font-weight: 400; margin: 0; }
.remember input { width: 1.1em; height: 1.1em; }
.field-error { font-weight: 700; margin-bottom: 6px; }
[aria-invalid="true"] { border-width: 2px !important; border-color: var(--text) !important; }
.form-errors {
  border-top: 2px solid var(--text);
  border-bottom: 2px solid var(--text);
  padding: 12px 0 4px;
  margin: 20px 0;
}
.attached {
  border-left: 3px solid var(--rule);
  padding-left: 14px;
  margin: 8px 0 20px;
}
.question-text {
  border-left: 3px solid var(--rule);
  padding-left: 14px;
  margin-bottom: 20px;
}

.help-steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.help-step {
  border-top: 1px solid var(--rule);
  padding: 24px 0 8px;
  margin: 0;
}
.help-step h2 { margin-bottom: 10px; }
.diagram { margin: 12px 0 18px; }
.diagram svg { width: 100%; height: auto; display: block; }
.diagram figcaption { color: var(--muted); font-size: 0.89rem; margin-top: 6px; }
.compare { width: 100%; border-collapse: collapse; margin: 8px 0 18px; }
.compare th, .compare td {
  text-align: left;
  vertical-align: top;
  padding: 8px 12px 8px 0;
  border-bottom: 1px solid var(--rule);
}
.compare thead th { border-bottom: 2px solid var(--text); }

@media (max-width: 480px) {
  .compare thead { display: none; }
  .compare tr { display: block; border-bottom: 1px solid var(--rule); padding: 8px 0; }
  .compare th, .compare td { display: block; border: 0; padding: 2px 0; }
}
