/* UCDL site. Tokens and their measured contrast are in CLAUDE.md; any new
   colour pair is added to site/scripts/check-contrast.mjs before it is used.
   Blue means normative. Rust means informative, note or warning. */

@font-face { font-family: 'Spectral'; font-style: normal; font-weight: 400; font-display: swap; src: url('/assets/fonts/spectral-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Spectral'; font-style: normal; font-weight: 600; font-display: swap; src: url('/assets/fonts/spectral-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('/assets/fonts/ibm-plex-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: italic; font-weight: 400; font-display: swap; src: url('/assets/fonts/ibm-plex-sans-latin-400-italic.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('/assets/fonts/ibm-plex-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('/assets/fonts/ibm-plex-sans-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('/assets/fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('/assets/fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2'); }

:root {
  color-scheme: light;

  --paper: #FBFAF7;
  --surface: #FFFFFF;
  --panel: #F4F1EB;
  --ink: #1A1917;
  --prose: #2C2A26;
  --secondary: #55514A;
  --muted: #6B655B;
  --muted-large: #857F75; /* display numerals >= 24px only */
  --rule: #E4DFD5;
  --rule-strong: #CFC8B9; /* borders only, never text */
  --normative: #1C4C78;
  --normative-tint: #ECF1F6;
  --informative: #7A3A1C;
  --informative-tint: #F7EFE8;

  --font-display: 'Spectral', Georgia, 'Times New Roman', serif;
  --font-body: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
  --font-code: 'IBM Plex Mono', 'SF Mono', Menlo, monospace;

  --gutter: clamp(1rem, 5vw, 6.25rem);
  --target: 2.75rem; /* 44px navigation and list targets */
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--prose);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
  text-wrap: balance;
}

a { color: var(--normative); }
a:hover { color: var(--informative); }

code, pre { font-family: var(--font-code); }

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

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem; top: -10rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  background: var(--surface);
  color: var(--normative);
  font-weight: 600;
  border: 2px solid var(--normative);
}
.skip-link:focus { top: 1rem; }

/* ---------- Masthead ---------- */

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  min-height: 4.25rem;
  padding: 0.5rem var(--gutter);
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.875rem;
  min-height: var(--target);
  padding: 0.25rem 0;
  color: var(--ink);
  text-decoration: none;
}
.wordmark-name {
  font-family: var(--font-display);
  font-size: 1.4375rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.wordmark-expansion {
  padding-left: 0.875rem;
  border-left: 1px solid var(--rule-strong);
  font-size: 0.8125rem;
  color: var(--muted);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  display: flex;
  align-items: center;
  min-height: var(--target);
  padding: 0 0.875rem;
  color: var(--ink);
  font-size: 0.90625rem;
  font-weight: 500;
  text-decoration: none;
}
.site-nav a:hover { color: var(--normative); text-decoration: underline; }
.site-nav a[aria-current] {
  color: var(--normative);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 0 var(--normative);
}

/* ---------- Document bar ---------- */

.docbar {
  padding: 0.5rem var(--gutter);
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
}
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.84375rem;
}
.breadcrumb li + li::before {
  content: '/';
  padding: 0 0.625rem;
  color: var(--muted);
}
.breadcrumb a {
  display: inline-flex;
  align-items: center;
  min-height: var(--target);
  color: var(--muted);
}
.breadcrumb a[aria-current] { color: var(--ink); text-decoration: none; }

/* ---------- Reader layout ---------- */

.reader {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: 'toc' 'main' 'rail';
  gap: 2rem 3rem;
  max-width: 90rem;
  margin: 0 auto;
  padding: 1.5rem var(--gutter) 4.5rem;
}
.toc { grid-area: toc; }
.main { grid-area: main; min-width: 0; }
.rail { grid-area: rail; }

@media (min-width: 56.25em) {
  .reader {
    grid-template-columns: 17.5rem minmax(0, 40rem);
    grid-template-areas: 'toc main' 'toc rail';
    align-items: start;
    padding-top: 2.75rem;
  }
  .toc > summary { display: none; }
}
@media (min-width: 80em) {
  .reader {
    grid-template-columns: 17.5rem minmax(0, 40rem) 13.5rem;
    grid-template-areas: 'toc main rail';
  }
}

/* ---------- Contents ---------- */

.toc > summary {
  display: flex;
  align-items: center;
  min-height: var(--target);
  padding: 0 1rem;
  background: var(--normative-tint);
  border: 1px solid var(--rule);
  color: var(--normative);
  font-weight: 600;
  cursor: pointer;
}
.toc[open] > summary { margin-bottom: 1rem; }

.nav-label, .rail-label {
  margin: 0;
  font-size: 0.65625rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}
.nav-label {
  margin-top: 1.25rem;
  padding: 1.125rem 0 0.5rem;
  border-top: 1px solid var(--rule);
}

.toc-list, .toc-sub {
  margin: 0;
  padding: 0;
  list-style: none;
}
.toc-list > li > a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: var(--target);
  padding: 0.375rem 0 0.375rem 0.875rem;
  border-left: 2px solid transparent;
  color: var(--secondary);
  font-size: 0.90625rem;
  line-height: 1.35;
  text-decoration: none;
}
.toc-list > li > a:hover { color: var(--normative); text-decoration: underline; }
.toc-list > li > a[aria-current] {
  background: var(--normative-tint);
  border-left-color: var(--normative);
  color: var(--ink);
  font-weight: 600;
}
.toc-num {
  flex: none;
  min-width: 1.5rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.toc-list > li > a[aria-current] .toc-num { color: var(--normative); }
.toc-label code { font-size: 0.8125rem; }

.toc-sub { margin: 0.25rem 0 0.5rem 2.875rem; }
.toc-sub a {
  display: flex;
  align-items: center;
  min-height: var(--target);
  padding: 0.25rem 0 0.25rem 0.75rem;
  border-left: 2px solid var(--rule);
  color: var(--secondary);
  font-size: 0.875rem;
  line-height: 1.35;
  text-decoration: none;
}
.toc-sub a:hover { color: var(--normative); text-decoration: underline; }

/* ---------- Document text ---------- */

.doc-title {
  margin: 0 0 1.5rem;
  color: var(--secondary);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
}

.doc {
  font-size: 1.0625rem;
  line-height: 1.7;
}
.doc > :first-child { margin-top: 0; }
.doc > :first-child h1,
.doc > :first-child h2 { margin-top: 0; }
.doc > hr:last-child { display: none; }

.doc p, .doc ul, .doc ol, .doc blockquote, .doc pre, .doc .scroll { margin: 0 0 1.125rem; }
.doc li + li { margin-top: 0.25rem; }
.doc li > p { margin-bottom: 0.5rem; }

.doc a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.heading {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin: 2.5rem 0 1rem;
}
.heading :is(h1, h2, h3, h4, h5, h6) { margin: 0; }
.doc h1 { font-size: 2.5rem; line-height: 1.15; letter-spacing: -0.015em; }
.doc h2 { font-size: 1.75rem; line-height: 1.25; }
.doc h3 { font-size: 1.5625rem; line-height: 1.25; }
.doc h4 { font-size: 1.25rem; line-height: 1.3; }
.doc h5, .doc h6 { font-size: 1.0625rem; }

/* A page's own section heading, at display size. */
.doc > .heading:first-child h2 { font-size: 2.5rem; line-height: 1.15; letter-spacing: -0.015em; }

.secno {
  margin-right: 0.35em;
  color: var(--muted);
  font-weight: 400;
}
/* Only at display size may the numeral take the large-text grey. */
.doc > .heading:first-child .secno { color: var(--muted-large); }

.permalink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  min-height: 1.5rem;
  color: var(--muted);
  font-size: 0.9375rem;
  text-decoration: none !important;
}
.permalink:hover { color: var(--normative); }

@media (max-width: 37.5em) {
  .doc h1, .doc > .heading:first-child h2 { font-size: 1.75rem; }
  .doc h2 { font-size: 1.375rem; }
  .doc h3 { font-size: 1.25rem; }
  .doc h4 { font-size: 1.125rem; }
  .doc { font-size: 1rem; }
}

/* Per-section normative / informative declaration. Differs by text, not
   only by colour. */
p.status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: fit-content;
  max-width: 100%;
  padding: 0.3125rem 0.75rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
}
p.status em { font-style: normal; }
p.status::before {
  content: '';
  flex: none;
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: currentColor;
}
.status--normative { background: var(--normative-tint); color: var(--normative); }
.status--informative { background: var(--informative-tint); color: var(--informative); }

.doc code {
  padding: 0.1em 0.3em;
  background: var(--panel);
  border-radius: 2px;
  font-size: 0.875em;
}
.doc pre.code {
  padding: 1.25rem 1.375rem;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 2px;
  font-size: 0.875rem;
  line-height: 1.75;
}
.doc pre.code code { padding: 0; background: none; font-size: inherit; }

.doc blockquote {
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 3px solid var(--rule-strong);
  color: var(--secondary);
}
.doc blockquote > :last-child { margin-bottom: 0; }

.doc hr {
  margin: 2.5rem 0;
  border: 0;
  border-top: 1px solid var(--rule);
}

.scroll { overflow-x: auto; }
.doc table {
  width: 100%;
  border-collapse: collapse;
  border-top: 2px solid var(--ink);
  font-size: 0.875rem;
  line-height: 1.55;
}
.doc th {
  padding: 0.625rem 0.75rem 0.625rem 0;
  border-bottom: 1px solid var(--rule-strong);
  color: var(--muted);
  font-size: 0.71875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
  vertical-align: bottom;
}
.doc td {
  min-width: 5rem;
  padding: 0.5rem 0.75rem 0.5rem 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

/* ---------- Pager ---------- */

.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}
.pager-link {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1 1 15rem;
  max-width: 18.5rem;
  min-height: var(--target);
  padding: 1rem 1.125rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 2px;
  text-decoration: none;
}
.pager-next { margin-left: auto; text-align: right; }
.pager-dir {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.pager-title { color: var(--ink); font-weight: 500; }
.pager-link:hover .pager-title { color: var(--normative); text-decoration: underline; }

/* ---------- Rail ---------- */

.rail {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
@media (min-width: 80em) {
  .rail { position: sticky; top: 1.5rem; }
}
.rail-value { margin: 0.125rem 0 0; color: var(--ink); font-size: 0.875rem; }
.rail-status { font-weight: 500; }
.rail-status--normative { color: var(--normative); }
.rail-status--informative { color: var(--informative); }
.rail-links {
  margin: 0.5rem 0 0;
  padding: 1rem 0 0;
  border-top: 1px solid var(--rule);
  list-style: none;
}
.rail-links a {
  display: flex;
  align-items: center;
  min-height: var(--target);
  font-size: 0.84375rem;
}

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

.eyebrow {
  margin: 0 0 1rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--informative);
}

.home-band {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: 1rem 2.5rem;
  margin: 0;
  padding: 1.25rem var(--gutter);
  background: var(--normative-tint);
  border-bottom: 1px solid var(--rule);
}
.home-band dt {
  font-size: 0.65625rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--normative);
}
.home-band dd { margin: 0.1875rem 0 0; color: var(--ink); font-size: 0.875rem; }
.home-band dd a { display: inline-flex; align-items: center; min-height: var(--target); }
.home-band dd code { font-size: 0.8125rem; }

.home-inner { max-width: 90rem; margin: 0 auto; }

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3rem 5rem;
  align-items: start;
  max-width: 90rem;
  margin: 0 auto;
  padding: 4.5rem var(--gutter);
}
@media (min-width: 62em) {
  .home-hero { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
}
.home-intro h1 {
  margin: 0 0 1.5rem;
  font-size: clamp(2.125rem, 5vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
}
.home-lead { color: var(--secondary); font-size: 1.125rem; line-height: 1.6; }
.home-lead p { margin: 0 0 0.75rem; }
.home-lead ol { margin: 0 0 1.75rem; padding-left: 1.5rem; }
.home-lead li + li { margin-top: 0.375rem; }
.home-lead strong { color: var(--ink); }
.home-actions { display: flex; flex-wrap: wrap; gap: 0.875rem; margin: 0; }

.principle {
  margin: 0;
  padding: 2.25rem 2.125rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--normative);
  border-radius: 2px;
}
.principle blockquote {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.3125rem;
  line-height: 1.45;
}
.principle blockquote p { margin: 0; }
/* The figure now carries §1.1's list of goals rather than one sentence: still
   display type, a size down so five items read as a set rather than five
   pronouncements. */
.principle blockquote ul { margin: 0; padding: 0; list-style: none; }
.principle blockquote li { margin: 0 0 0.875rem; font-size: 1.125rem; line-height: 1.4; }
.principle blockquote li:last-child { margin-bottom: 0; }
.principle blockquote li strong { display: block; font-family: var(--font-body); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--normative); }
.principle .eyebrow { margin: 0 0 1rem; }
.principle figcaption { margin-top: 1.25rem; color: var(--muted); font-size: 0.8125rem; }
.principle figcaption a { color: var(--normative); }

.home-example {
  padding: 4rem var(--gutter);
  background: var(--surface);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.home-example .home-inner { max-width: 56rem; }
.home-example h2 { margin: 0 0 0.5rem; font-size: 2rem; line-height: 1.2; }
.home-example h2 .secno { margin-right: 0.35em; color: var(--muted); font-weight: 400; }
.home-example-source { margin: 0 0 1.5rem; color: var(--secondary); }
.home-example .doc pre.code { background: var(--paper); }

.home-doors { max-width: 90rem; margin: 0 auto; padding: 4.25rem var(--gutter) 3.75rem; }
.doors {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.door {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.75rem 1.875rem 2rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--informative);
  border-radius: 2px;
}
/* Blue marks the normative document; the others are informative. */
.door--spec { border-top-color: var(--normative); }
.door h3 { margin: 0; font-size: 1.625rem; line-height: 1.2; }
.door h3 a { display: inline-flex; align-items: center; min-height: var(--target); color: var(--ink); text-decoration: none; }
.door h3 a:hover { color: var(--normative); text-decoration: underline; }
.door-title { margin: 0 0 0.25rem; color: var(--secondary); font-size: 0.9375rem; line-height: 1.5; }
.door-links { margin: 0; padding: 0; list-style: none; }
.door-links a {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-height: var(--target);
  color: var(--secondary);
  font-size: 0.90625rem;
  line-height: 1.35;
  /* Underlined, not only on hover: colour alone does not distinguish a link
     from the text around it (WCAG 1.4.1). Hover changes the colour and keeps
     the underline — taking the affordance away at the moment it is being used
     would be a strange thing to do. */
  text-decoration: underline;
}
.door-links a:hover { color: var(--normative); }
.door-links code { font-size: 0.8125rem; }

.button {
  display: inline-flex;
  align-items: center;
  min-height: var(--target);
  padding: 0 1.25rem;
  background: var(--normative);
  color: var(--surface);
  font-weight: 600;
  text-decoration: none;
  border-radius: 2px;
}
.button:hover { background: var(--informative); color: var(--surface); }
.button--secondary {
  background: var(--surface);
  /* The boundary is the button's shape against the page, so it needs 3:1
     (WCAG 1.4.11); the rule greys do not reach it. */
  border: 1px solid var(--muted);
  color: var(--ink);
}
.button--secondary:hover { background: var(--surface); color: var(--normative); text-decoration: underline; }

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

.site-footer {
  padding: 3.25rem var(--gutter) 2.5rem;
  background: var(--surface);
  border-top: 1px solid var(--rule);
}
.footer-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: 1.5rem 3rem;
  max-width: 90rem;
  margin: 0 auto;
}
.footer-label {
  margin: 0 0 0.25rem;
  font-size: 0.65625rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer-nav ul { margin: 0; padding: 0; list-style: none; }
.footer-nav a { display: flex; align-items: center; min-height: var(--target); font-size: 0.90625rem; }
.footer-version {
  max-width: 90rem;
  margin: 2.75rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.8125rem;
}
.footer-licence {
  max-width: 90rem;
  margin: 0.5rem auto 0;
  color: var(--muted);
  font-size: 0.8125rem;
}

/* ---------- Search ---------- */

.docbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}
.search-form { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.search-form input {
  width: 16rem;
  max-width: 100%;
  min-width: 0;
  min-height: var(--target);
  padding: 0 0.75rem;
  background: var(--surface);
  /* A field's boundary needs 3:1 against its ground (WCAG 1.4.11); the
     rule greys do not reach it, so the field is edged in muted. */
  border: 1px solid var(--muted);
  border-radius: 2px;
  color: var(--ink);
  font: inherit;
}
.search-form button {
  min-height: var(--target);
  padding: 0 1rem;
  background: var(--normative);
  border: 0;
  border-radius: 2px;
  color: var(--surface);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.search-form button:hover { background: var(--informative); }

.search-page,
.not-found,
.coming-soon { max-width: 50rem; margin: 0 auto; padding: 3rem var(--gutter) 5rem; }
.search-page h1,
.not-found h1,
.coming-soon h1 { margin: 0 0 1.5rem; font-size: 2.5rem; line-height: 1.15; }
/* The package name is one 21-character word in a monospace face; at 320px
   it is wider than the column, so it may break anywhere (WCAG 2.2 SC 1.4.10). */
.coming-soon h1 code { overflow-wrap: anywhere; }
.search-page .search-form label,
.not-found .search-form label { flex-basis: 100%; color: var(--ink); font-weight: 600; }
.search-page .search-form input,
.not-found .search-form input { width: 26rem; }
.not-found .search-form { margin-top: 2rem; }
.search-status { margin: 1.5rem 0 1rem; color: var(--secondary); }
.search-results { margin: 0; padding: 0; list-style: none; }
.search-results li { padding: 1rem 0; border-top: 1px solid var(--rule); }
.search-results a { font-family: var(--font-display); font-size: 1.1875rem; font-weight: 600; }
.search-result-doc {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.search-results p { margin: 0.375rem 0 0; }
mark { background: var(--informative-tint); color: var(--ink); }

/* The document's front matter: terms and their values, laid out as pairs so
   the relationship is visible as well as marked up. */
.docmeta { margin: 0 0 2rem; display: grid; grid-template-columns: max-content 1fr; gap: 0.25rem 1.25rem; }
.docmeta dt { color: var(--muted); font-size: 0.8125rem; font-weight: 600; }
.docmeta dd { margin: 0; color: var(--prose); font-size: 0.9375rem; }
.docmeta dd code { font-size: 0.8125rem; }

@media (max-width: 30rem) {
  /* One column at phone width: a max-content term column and a long value
     force a horizontal scroll otherwise. */
  .docmeta { grid-template-columns: 1fr; gap: 0 0; }
  .docmeta dd { margin: 0 0 0.75rem; }
}

/* ---------- Validator ---------- */

.validate { max-width: 50rem; margin: 0 auto; padding: 3rem var(--gutter) 5rem; }
.validate h1 { margin: 0 0 1.5rem; font-size: 2.5rem; line-height: 1.15; }
.validate h2 { margin: 2.5rem 0 0.75rem; font-size: 1.375rem; }
.validate h3 { margin: 2rem 0 0.75rem; font-size: 1.125rem; }
.validate-lede { max-width: 42rem; color: var(--prose); }

.validate-form .field { margin: 1.75rem 0; }
.validate-form label { display: block; color: var(--ink); font-weight: 600; }
.validate-form .field-hint { margin: 0.25rem 0 0.5rem; color: var(--secondary); font-size: 0.9375rem; }
.validate-form textarea {
  display: block;
  width: 100%;
  padding: 0.75rem;
  background: var(--surface);
  /* A field's boundary needs 3:1 against its ground (WCAG 1.4.11). */
  border: 1px solid var(--muted);
  border-radius: 2px;
  color: var(--ink);
  font-family: var(--font-code);
  font-size: 0.875rem;
  line-height: 1.6;
  resize: vertical;
}
.validate-form input[type='file'] {
  min-height: var(--target);
  max-width: 100%;
  color: var(--prose);
}
.validate-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.validate-actions button { min-height: var(--target); border: 0; font: inherit; cursor: pointer; }
.validate-actions .button--secondary { border: 1px solid var(--muted); }
.validate-actions button[disabled] { cursor: wait; }

.validate-privacy {
  margin: 2rem 0 0;
  padding: 1.25rem 1.5rem;
  background: var(--informative-tint);
  border-left: 3px solid var(--informative);
}
.validate-privacy h2 { margin: 0 0 0.5rem; color: var(--informative); font-size: 1rem; }
.validate-privacy p { margin: 0 0 0.75rem; color: var(--ink); font-size: 0.9375rem; }
.validate-privacy p:last-child { margin-bottom: 0; }

.validate-status { margin: 1.5rem 0 0; color: var(--prose); }
.validate-status:empty { margin: 0; }
.validate-unavailable { margin: 1.5rem 0 0; color: var(--ink); }

.validate-results { margin-top: 2.5rem; }
.validate-results h2 { margin-top: 0; }
/* The heading takes focus when a result arrives, which is a programmatic
   focus on a tabindex="-1" element — :focus-visible is not reliably
   matched for that, so the indicator hangs off :focus. */
.validate-results h2:focus { outline: 2px solid var(--normative); outline-offset: 4px; }

/* Status is glyph + word + colour, never colour alone (spec.md §6.2). */
.glyph { flex: none; margin-right: 0.5rem; }
.result-verdict { display: flex; align-items: flex-start; margin: 0; color: var(--ink); font-size: 1.125rem; }
.result-verdict--met { color: var(--normative); }
.result-verdict--unmet { color: var(--informative); }
.result-status { margin-right: 0.35rem; font-weight: 600; }
.result-detail, .result-about { margin: 0.5rem 0 0; color: var(--secondary); font-size: 0.9375rem; }

.conditions { margin: 0; padding: 0; list-style: none; }
.condition {
  display: flex;
  align-items: flex-start;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--rule);
  color: var(--prose);
}
.condition--met { color: var(--normative); }
.condition--unmet { color: var(--informative); }
.condition--unchecked { color: var(--secondary); }
.condition-word { margin-right: 0.35rem; font-weight: 600; }
.condition a { display: inline-flex; align-items: center; min-height: var(--target); color: var(--normative); }

.findings { margin: 0; padding: 0; list-style: none; }
.finding {
  margin: 0 0 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-left: 3px solid var(--informative);
}
.finding--note { border-left-color: var(--normative); }
.finding-head { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 0.35rem; }
.finding-severity { color: var(--informative); font-weight: 600; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.06em; }
.finding--note .finding-severity { color: var(--normative); }
.finding-code { color: var(--muted); font-family: var(--font-code); font-size: 0.75rem; }
.finding-message { margin: 0; color: var(--ink); }
.finding-where { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.8125rem; }
.finding-hint { margin: 0.5rem 0 0; color: var(--prose); font-size: 0.9375rem; }
.finding-frame {
  margin: 0.75rem 0 0;
  padding: 0.75rem;
  overflow-x: auto;
  background: var(--panel);
  font-size: 0.8125rem;
  line-height: 1.6;
}
.frame-line { display: block; color: var(--prose); }
.frame-line--marked { color: var(--ink); font-weight: 500; }
.frame-number { display: inline-block; width: 2.5rem; color: var(--muted); text-align: right; padding-right: 0.75rem; }
.frame-text { white-space: pre; }

@media (max-width: 30rem) {
  .validate h1 { font-size: 2rem; }
  .validate-actions button { width: 100%; justify-content: center; }
}
