/*
 * Asset Disposal Guide. The identity borrows the riveted data plate fixed to
 * every machine: the logo, the home page header and each guide's details are
 * plates. Everything else stays quiet so the guides read well.
 */

@font-face {
  font-family: Archivo;
  src: url("/fonts/archivo.woff2") format("woff2");
  font-weight: 400 800;
  font-stretch: 100% 125%;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Literata;
  src: url("/fonts/literata.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Literata;
  src: url("/fonts/literata-italic.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

/* Local fallbacks sized to the web fonts, so text barely moves when they arrive. */
@font-face {
  font-family: "Literata Fallback";
  src: local("Georgia");
  size-adjust: 108%;
  ascent-override: 109%;
  descent-override: 28.5%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Literata Fallback";
  src: local("Georgia Italic"), local("Georgia-Italic");
  font-style: italic;
  size-adjust: 108%;
  ascent-override: 109%;
  descent-override: 28.5%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Archivo Fallback";
  src: local("Arial"), local("ArialMT");
  size-adjust: 98.8%;
  ascent-override: 88.8%;
  descent-override: 21.3%;
  line-gap-override: 0%;
}

:root {
  color-scheme: light;
  --paper: #ffffff;
  --ink: #1e2428;
  --ink-soft: #4d575e;
  --green: #1d5745;
  --green-deep: #123b2e;
  --on-green: #ffffff;
  --green-wash: #e8f1ed;
  --plate: #eef1f2;
  --plate-edge: #c5cdd1;
  --plate-shine: rgb(255 255 255 / 0.9);
  --rule: #dce2e5;
  --rivet: #9aa6ad;
  --brand: #1d5745;
  --brand-ink: #ffffff;
  --brand-rivet: #7fa898;
  --focus: #ffd84d;
  --focus-ink: #1e2428;
  --shadow: rgb(30 36 40 / 0.16);
  --font-text: Literata, "Literata Fallback", Georgia, serif;
  --font-ui: Archivo, "Archivo Fallback", Arial, sans-serif;
  --page: 76rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --measure: 40rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #121719;
    --ink: #e2e7e8;
    --ink-soft: #a9b3b8;
    --green: #8bd0b5;
    --green-deep: #b6e6d3;
    --on-green: #0d1f18;
    --green-wash: #17302a;
    --plate: #1c2326;
    --plate-edge: #3a464c;
    --plate-shine: rgb(255 255 255 / 0.05);
    --rule: #2a3337;
    --rivet: #5c6a71;
    --brand-rivet: #5f9483;
    --shadow: rgb(0 0 0 / 0.5);
  }
}

@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 1.5rem;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  line-height: 1.65;
}

main {
  flex: 1;
  padding-bottom: clamp(3rem, 8vw, 6rem);
}

main:focus {
  outline: none;
}

a {
  color: var(--green);
  text-decoration-thickness: 0.07em;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--green-deep);
  text-decoration-thickness: 0.14em;
}

/* GOV.UK-style focus: a yellow block with a dark underline, visible on any background. */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 0;
  box-shadow: 0 0 0 6px var(--focus-ink);
}

/* The transparent outline shows in Windows forced-colours mode, which drops backgrounds and shadows. */
a:focus-visible {
  outline: 3px solid transparent;
  background: var(--focus);
  color: var(--focus-ink);
  box-shadow: 0 -2px var(--focus), 0 4px var(--focus-ink);
  text-decoration: none;
}

::selection {
  background: var(--focus);
  color: var(--focus-ink);
}

h1,
h2,
h3 {
  font-family: var(--font-ui);
  text-wrap: balance;
  overflow-wrap: break-word;
}

h1 {
  max-width: 22ch;
  margin: 0 0 1.5rem;
  font-size: clamp(2rem, 1.25rem + 3vw, 3.5rem);
  font-stretch: 118%;
  font-weight: 760;
  line-height: 1.04;
  letter-spacing: -0.015em;
}

p,
li {
  text-wrap: pretty;
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--page));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--focus);
  color: var(--focus-ink);
  font-family: var(--font-ui);
  font-weight: 600;
  transform: translateY(-300%);
}

.skip-link:focus {
  transform: none;
}

/* Plates: aluminium, a fine edge and a rivet in each corner. */
.plate,
.nameplate,
.brand {
  --rivet-dot: radial-gradient(circle, var(--rivet-colour) 0 var(--rivet-size), transparent calc(var(--rivet-size) + 0.6px));
  --rivet-colour: var(--rivet);
  --rivet-size: 2px;
  --rivet-box: 8px;
  --rivet-inset: 5px;
  background:
    var(--rivet-dot) left var(--rivet-inset) top var(--rivet-inset) / var(--rivet-box) var(--rivet-box) no-repeat,
    var(--rivet-dot) right var(--rivet-inset) top var(--rivet-inset) / var(--rivet-box) var(--rivet-box) no-repeat,
    var(--rivet-dot) left var(--rivet-inset) bottom var(--rivet-inset) / var(--rivet-box) var(--rivet-box) no-repeat,
    var(--rivet-dot) right var(--rivet-inset) bottom var(--rivet-inset) / var(--rivet-box) var(--rivet-box) no-repeat,
    var(--plate-fill, var(--plate));
  border: 1px solid var(--plate-edge);
  border-radius: 6px;
  box-shadow: inset 0 1px 0 var(--plate-shine);
}

.brand {
  --plate-fill: var(--brand);
  --rivet-colour: var(--brand-rivet);
  --rivet-size: 1.5px;
  --rivet-box: 6px;
  --rivet-inset: 3px;
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.55rem 1.05rem;
  border-color: transparent;
  border-radius: 5px;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.12);
  color: var(--brand-ink);
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-stretch: 125%;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.1;
  text-decoration: none;
  text-transform: uppercase;
}

.brand:hover {
  color: var(--brand-ink);
}

.brand:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  background-color: var(--brand);
  color: var(--brand-ink);
  box-shadow: 0 0 0 7px var(--focus-ink);
}

.plate-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2.25rem;
  width: fit-content;
  max-width: 100%;
  margin: 0;
  padding: 0.8rem 1.5rem;
  font-family: var(--font-ui);
  line-height: 1.35;
}

.plate-fields dt {
  color: var(--ink-soft);
  font-size: 0.8125rem;
}

.plate-fields dd {
  margin: 0.1rem 0 0;
  font-size: 0.9375rem;
  font-weight: 600;
}

.plate-fields a {
  color: inherit;
  text-decoration-color: var(--plate-edge);
}

.plate-fields a:hover {
  color: var(--green);
  text-decoration-color: currentColor;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--rule);
}

.site-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: 0.875rem;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-ui);
  font-size: 0.9375rem;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.75rem;
  color: var(--ink);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--green);
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.site-nav a[aria-current="page"] {
  box-shadow: inset 0 -3px var(--green);
}

.site-nav a:focus-visible {
  box-shadow: inset 0 -4px var(--focus-ink);
}

.site-nav .nav-contact {
  padding: 0 1rem;
  border: 1.5px solid var(--green);
  border-radius: 5px;
  color: var(--green);
  font-weight: 600;
}

.site-nav .nav-contact:hover {
  background: var(--green);
  color: var(--on-green);
  text-decoration: none;
}

.site-nav .nav-contact:focus-visible {
  border-color: var(--focus-ink);
}

/* Page heads and breadcrumbs */
.page-head {
  padding-block: clamp(2rem, 5vw, 3.5rem) clamp(1.75rem, 4vw, 2.75rem);
}

.page-intro {
  max-width: 38rem;
  margin: -0.25rem 0 1.75rem;
  font-size: 1.15em;
  line-height: 1.55;
}

.breadcrumb {
  margin-bottom: 1rem;
  font-family: var(--font-ui);
  font-size: 0.9375rem;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumb li + li::before {
  content: "/";
  padding-right: 0.6rem;
  color: var(--ink-soft);
}

.breadcrumb a {
  display: inline-block;
  padding-block: 0.35rem;
  color: var(--ink-soft);
}

.breadcrumb a:hover {
  color: var(--green);
}

/* Home */
.home-hero {
  display: grid;
  gap: clamp(1.75rem, 4vw, 3rem);
  padding-block: clamp(1.5rem, 4vw, 3rem) clamp(2.5rem, 6vw, 4.5rem);
}

.nameplate {
  --rivet-size: 3.5px;
  --rivet-box: 12px;
  --rivet-inset: clamp(8px, 1.5vw, 14px);
  padding: clamp(1.75rem, 5vw, 3.5rem) clamp(1.5rem, 5vw, 3.75rem) clamp(1.25rem, 3vw, 2rem);
  border-width: 1.5px;
  border-radius: 10px;
  box-shadow: inset 0 2px 0 var(--plate-shine), inset 0 -3px 0 rgb(0 0 0 / 0.035);
}

.nameplate h1 {
  max-width: 14ch;
  margin: 0 0 clamp(1.5rem, 4vw, 2.5rem);
  font-size: clamp(2.6rem, 1rem + 6.2vw, 6rem);
  font-stretch: 125%;
  font-weight: 800;
  line-height: 0.94;
  letter-spacing: -0.025em;
}

.nameplate .plate-fields {
  width: auto;
  padding: clamp(1rem, 2.5vw, 1.25rem) 0 0;
  border-top: 1.5px solid var(--plate-edge);
  gap: 0.75rem clamp(1.5rem, 4vw, 3.5rem);
}

.nameplate .plate-fields dd {
  font-size: 1rem;
}

.home-intro {
  display: grid;
  align-items: end;
  gap: 1.5rem clamp(2rem, 5vw, 4rem);
}

.home-intro .lede {
  max-width: 42rem;
}

.lede > p:first-child {
  font-size: 1.2em;
  line-height: 1.55;
}

.home-intro .lede p {
  margin: 0;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 40rem;
  min-height: 3.5rem;
  padding: 0.75rem 1rem;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink-soft);
  font-family: var(--font-ui);
  font-size: 1.0625rem;
  line-height: 1.3;
  text-decoration: none;
}

.search-field svg {
  flex: none;
  color: var(--ink);
}

.search-field span {
  flex: 1;
}

.search-field:hover {
  color: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
}

.search-field:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 0;
  border-color: var(--focus-ink);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 0 0 1px var(--focus-ink), 0 0 0 6px var(--focus);
}

.home-parts .part {
  display: grid;
  gap: 0.5rem clamp(2rem, 5vw, 4rem);
  padding-block: clamp(2rem, 4vw, 2.75rem);
  border-top: 2px solid var(--ink);
}

.home-parts .part > h2 {
  margin: 0;
  font-size: clamp(1.375rem, 1.15rem + 0.8vw, 1.75rem);
  font-stretch: 112%;
  font-weight: 720;
  line-height: 1.15;
}

.home-parts .part-body > :first-child {
  margin-top: 0;
}

.home-parts .part-body > p {
  max-width: 44rem;
}

.home-parts ul:has(> .topic-entry) {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
  column-gap: clamp(1.5rem, 3vw, 2.75rem);
  margin: 0 0 1rem;
  padding: 0;
}

.topic-entry {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-content: start;
  align-items: baseline;
  column-gap: 1rem;
  padding: 0.9rem 0 1rem;
  border-bottom: 1px solid var(--rule);
  list-style: none;
}

.prose .topic-entry + .topic-entry {
  margin-top: 0;
}

.topic-entry > a {
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 1.1875rem;
  font-stretch: 106%;
  font-weight: 650;
  line-height: 1.3;
  text-decoration: none;
}

/* The whole row is the link target. */
.topic-entry > a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.topic-entry:hover > a {
  color: var(--green);
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.topic-entry:has(> a:focus-visible) {
  background: var(--focus);
}

.topic-entry > a:focus-visible {
  box-shadow: none;
}

.topic-entry-count {
  color: var(--ink-soft);
  font-family: var(--font-ui);
  font-size: 0.875rem;
  white-space: nowrap;
}

.topic-entry-note {
  display: block;
  grid-column: 1 / -1;
  margin-top: 0.2rem;
  color: var(--ink-soft);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.topic-entry-note::first-letter {
  text-transform: uppercase;
}

.topic-entry:has(> a:focus-visible) .topic-entry-note,
.topic-entry:has(> a:focus-visible) .topic-entry-count {
  color: var(--focus-ink);
}

.home-parts .part:last-child {
  border-top-color: var(--green);
}

.home-parts .part:last-child .part-body {
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--green);
  background: var(--green-wash);
}

.home-parts .part:last-child .part-body > :last-child {
  margin-bottom: 0;
}

@media (min-width: 60rem) {
  .home-intro {
    grid-template-columns: minmax(0, 1fr) minmax(20rem, 27rem);
  }

  .home-parts .part {
    grid-template-columns: 17rem minmax(0, 1fr);
  }

  .home-parts .part > h2 {
    position: sticky;
    top: 1.5rem;
    align-self: start;
  }
}

/* Reading pages: one column, contents in a rail on wide screens */
.reading-grid {
  display: grid;
  grid-template-columns: minmax(0, var(--measure));
  column-gap: clamp(3rem, 6vw, 6rem);
}

.rail {
  display: none;
}

@media (min-width: 72rem) {
  .reading-grid {
    grid-template-columns: minmax(0, var(--measure)) minmax(13rem, 17rem);
  }

  .reading {
    grid-column: 1;
    grid-row: 1;
  }

  .rail {
    display: block;
    grid-column: 2;
    grid-row: 1;
  }

  .contents-compact {
    display: none;
  }
}

.rail > * {
  position: sticky;
  top: 1.5rem;
}

.rail {
  font-family: var(--font-ui);
  font-size: 0.9375rem;
}

.rail-title {
  margin: 0 0 0.75rem;
  color: var(--ink-soft);
  font-size: 0.875rem;
  font-stretch: 100%;
  font-weight: 600;
}

.contents ol,
.contents-compact ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.contents ol {
  border-left: 2px solid var(--rule);
}

.contents a {
  display: block;
  margin-left: -2px;
  padding: 0.4rem 0 0.4rem 1rem;
  border-left: 2px solid transparent;
  color: var(--ink-soft);
  line-height: 1.35;
  text-decoration: none;
}

.contents a:hover {
  color: var(--ink);
  border-left-color: var(--plate-edge);
}

.contents a[aria-current="true"] {
  border-left-color: var(--green);
  color: var(--ink);
  font-weight: 600;
}

.rail-next {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}

.rail > .rail-next {
  position: static;
}

.rail-next p {
  margin: 0 0 0.35rem;
  font-weight: 600;
}

.contents-compact {
  margin: 0 0 2rem;
  border-block: 1px solid var(--rule);
  font-family: var(--font-ui);
  font-size: 0.9375rem;
}

.contents-compact summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.contents-compact summary::-webkit-details-marker {
  display: none;
}

.contents-compact summary::after {
  content: "+";
  color: var(--green);
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1;
}

.contents-compact[open] summary::after {
  content: "\2212";
}

.contents-compact ol {
  padding-bottom: 0.75rem;
}

.contents-compact a {
  display: block;
  padding: 0.45rem 0;
}

/* Prose */
.prose {
  min-width: 0;
}

.prose p,
.prose ul,
.prose ol,
.prose blockquote,
.prose pre {
  margin: 0 0 1.15em;
}

.prose h2 {
  margin: 2.4em 0 0.7em;
  font-size: clamp(1.375rem, 1.2rem + 0.6vw, 1.6875rem);
  font-stretch: 110%;
  font-weight: 720;
  line-height: 1.2;
  letter-spacing: -0.01em;
  scroll-margin-top: 1.5rem;
}

.prose h3 {
  margin: 1.8em 0 0.5em;
  font-size: 1.15em;
  font-weight: 650;
  line-height: 1.3;
}

.prose ul,
.prose ol {
  padding-left: 1.3em;
}

.prose li + li {
  margin-top: 0.45em;
}

.prose li::marker {
  color: var(--green);
}

.prose strong {
  font-weight: 650;
}

.prose a {
  overflow-wrap: break-word;
}

.prose blockquote {
  padding: 0.1em 0 0.1em 1.1em;
  border-left: 3px solid var(--green);
  color: var(--ink-soft);
}

.prose pre {
  max-width: 100%;
  overflow-x: auto;
  padding: 1rem 1.15rem;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--plate);
  font-size: 0.8125rem;
  line-height: 1.6;
  tab-size: 2;
}

.prose code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.875em;
}

.reading > .lede > :first-child,
.reading > .part:first-child > h2 {
  margin-top: 0;
}

.page-narrow {
  max-width: var(--measure);
  padding-top: clamp(2rem, 5vw, 3.5rem);
}

.page-narrow .updated {
  color: var(--ink-soft);
  font-family: var(--font-ui);
  font-size: 0.9375rem;
}

/* Tables: rule-lined like a register, scrolling sideways with edge shadows */
.table-scroll {
  max-width: 100%;
  margin: 1.75em 0;
  overflow-x: auto;
  border: 1px solid var(--plate-edge);
  border-radius: 6px;
  background:
    linear-gradient(to right, var(--paper) 30%, transparent) left / 2.5rem 100% no-repeat local,
    linear-gradient(to left, var(--paper) 30%, transparent) right / 2.5rem 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, var(--shadow), transparent) left / 0.9rem 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, var(--shadow), transparent) right / 0.9rem 100% no-repeat scroll;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
}

th,
td {
  min-width: 9rem;
  padding: 0.7rem 0.9rem;
  text-align: left;
  vertical-align: top;
}

th {
  border-bottom: 1px solid var(--plate-edge);
  background: var(--plate);
  font-weight: 650;
  vertical-align: bottom;
}

tbody tr + tr td {
  border-top: 1px solid var(--rule);
}

td:first-child {
  font-weight: 550;
}

/* End of guide */
.sources {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  line-height: 1.45;
}

.prose .sources h2 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-stretch: 100%;
  font-weight: 650;
}

.sources ul {
  padding-left: 0;
  list-style: none;
}

.sources li + li {
  margin-top: 0.75rem;
}

.sources .checked {
  display: block;
  color: var(--ink-soft);
  font-size: 0.8125rem;
}

.guide-note {
  color: var(--ink-soft);
  font-family: var(--font-ui);
  font-size: 0.875rem;
  line-height: 1.5;
}

.next-step {
  margin: 2.5rem 0 3rem;
  padding: clamp(1.25rem, 4vw, 2rem);
  border-top: 4px solid var(--green);
  background: var(--green-wash);
}

.prose .next-step h2 {
  margin: 0 0 0.5rem;
  font-size: 1.375rem;
}

.next-step p {
  margin-bottom: 1rem;
}

.next-step-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  font-family: var(--font-ui);
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding: 0.65rem 1.25rem;
  border-radius: 5px;
  background: var(--green);
  color: var(--on-green);
  font-family: var(--font-ui);
  font-weight: 650;
  line-height: 1.25;
  text-decoration: none;
}

.button:hover {
  background: var(--green-deep);
  color: var(--on-green);
}

.prose .next-step-note {
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--font-ui);
  font-size: 0.875rem;
}

.related h2,
.guide-index h2 {
  margin-bottom: 0.25rem;
}

.prose .guide-list {
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}

.prose .guide-list li {
  margin: 0;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
}

.guide-list a {
  font-family: var(--font-ui);
  font-size: 1.0625rem;
  font-weight: 650;
  line-height: 1.35;
  text-decoration-color: color-mix(in srgb, currentColor 30%, transparent);
}

.guide-list a:hover {
  text-decoration-color: currentColor;
}

.prose .guide-list p {
  margin: 0.3rem 0 0;
  color: var(--ink-soft);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.topic-link {
  font-family: var(--font-ui);
  font-weight: 600;
}

/* All guides and 404 */
.topic-jump {
  margin-bottom: clamp(2rem, 5vw, 3rem);
  padding-block: 1rem;
  border-block: 1px solid var(--rule);
  font-family: var(--font-ui);
  font-size: 0.9375rem;
}

.topic-jump ul {
  columns: 16rem auto;
  column-gap: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.topic-jump a {
  display: inline-block;
  padding-block: 0.3rem;
}

.directory-topic {
  padding-block: 1.5rem 1rem;
  border-top: 2px solid var(--ink);
}

.directory-topic h2,
.error-topics h2 {
  margin: 0 0 1rem;
  font-size: 1.375rem;
  font-stretch: 110%;
  font-weight: 720;
  scroll-margin-top: 1.5rem;
}

.directory-topic h2 a {
  color: var(--ink);
  text-decoration-color: var(--plate-edge);
}

.directory-topic h2 a:hover {
  color: var(--green);
  text-decoration-color: currentColor;
}

.directory-list {
  columns: 22rem auto;
  column-gap: clamp(2rem, 4vw, 3.5rem);
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  line-height: 1.4;
}

.directory-list li {
  break-inside: avoid;
  padding-block: 0.35rem;
}

/* Search dialog */
.search-dialog {
  width: min(100% - 2rem, 42rem);
  max-height: min(100% - 4rem, 40rem);
  margin: clamp(1rem, 10vh, 6rem) auto auto;
  padding: 0;
  border: 1px solid var(--plate-edge);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 60px var(--shadow);
  font-family: var(--font-ui);
}

.search-dialog:not([open]) {
  display: none;
}

.search-dialog[open] {
  display: flex;
  flex-direction: column;
}

.search-dialog::backdrop {
  background: rgb(18 23 25 / 0.55);
}

.search-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.75rem;
  padding: 1rem 1.25rem 0.75rem;
  border-bottom: 1px solid var(--rule);
}

.search-label {
  flex-basis: 100%;
  color: var(--ink-soft);
  font-size: 0.8125rem;
  font-weight: 600;
}

.search-bar input {
  flex: 1;
  min-width: 0;
  min-height: 2.75rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 1.25rem;
}

.search-bar input:focus,
.search-bar input:focus-visible {
  outline: 3px solid transparent;
  box-shadow: none;
}

.search-bar:focus-within {
  box-shadow: inset 0 -3px var(--focus);
}

.search-close {
  min-height: 2.75rem;
  padding: 0 0.9rem;
  border: 1px solid var(--plate-edge);
  border-radius: 5px;
  background: var(--plate);
  color: var(--ink);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
}

.search-status {
  margin: 0;
  padding: 0.75rem 1.25rem 0.25rem;
  color: var(--ink-soft);
  font-size: 0.875rem;
}

.search-status:empty {
  display: none;
}

.search-results {
  flex: 1;
  margin: 0;
  padding: 0.25rem 0.5rem;
  overflow-y: auto;
  list-style: none;
}

.search-results a {
  display: block;
  padding: 0.65rem 0.75rem;
  border-radius: 5px;
  color: var(--ink);
  text-decoration: none;
}

.search-results a:hover {
  background: var(--plate);
}

.search-results .result-title {
  display: block;
  font-weight: 600;
  line-height: 1.35;
}

.search-results .result-topic {
  display: block;
  margin-top: 0.15rem;
  color: var(--ink-soft);
  font-size: 0.8125rem;
}

.search-results a:focus-visible .result-topic {
  color: var(--focus-ink);
}

.search-results mark {
  background: none;
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--green);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

.search-browse {
  margin: 0;
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--rule);
  font-size: 0.9375rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--plate-edge);
  background: var(--plate);
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.footer-grid {
  display: grid;
  gap: 2rem clamp(2rem, 6vw, 5rem);
  padding-block: clamp(2.5rem, 6vw, 3.5rem) 2rem;
}

.footer-about p {
  max-width: 30rem;
  margin: 1rem 0 0;
}

.brand-small {
  font-size: 0.75rem;
}

.footer-topics h2 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 650;
}

.footer-topics ul {
  columns: 13rem auto;
  column-gap: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-topics li {
  break-inside: avoid;
}

.footer-topics a,
.footer-base a {
  display: inline-block;
  padding-block: 0.3rem;
  color: var(--ink);
}

.footer-topics a:hover,
.footer-base a:hover {
  color: var(--green);
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: 1.25rem 2rem;
  border-top: 1px solid var(--plate-edge);
  color: var(--ink-soft);
  font-size: 0.875rem;
}

.footer-base ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-base p {
  margin: 0;
}

@media (min-width: 60rem) {
  .footer-grid {
    grid-template-columns: minmax(16rem, 2fr) 5fr;
  }
}

@media (max-width: 47.99rem) {
  .site-header-inner {
    padding-block: 0.75rem 0.25rem;
  }

  .site-nav {
    width: 100%;
  }

  .site-nav ul {
    gap: 0 1.25rem;
  }

  .nav-contact-item {
    display: none;
  }

  .lede > p:first-child {
    font-size: 1.125em;
  }
}

@media (max-width: 22rem) {
  .brand {
    font-size: 0.8125rem;
    letter-spacing: 0.03em;
  }
}

@media print {
  .site-header,
  .site-footer,
  .breadcrumb,
  .skip-link,
  .rail,
  .contents-compact,
  .search-field,
  .search-dialog,
  .next-step,
  .related {
    display: none;
  }

  body {
    font-size: 11pt;
  }

  .wrap {
    width: 100%;
  }

  .reading-grid {
    display: block;
  }

  .table-scroll,
  .prose pre {
    overflow: visible;
  }

  a {
    color: inherit;
  }

  .sources a::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    overflow-wrap: anywhere;
  }
}
