/* OpenDTC workshop design system.
   Ink + hazard yellow are the house accents. Red is reserved for danger:
   severity, safety callouts and warnings, and nothing else. */

:root {
  color-scheme: light;
  --bg: #f2f0eb;
  --panel: #ffffff;
  --ink: #1b1d20;
  --mut: #5d6167;
  --line: #d7d3cb;
  --yellow: #eab308;
  --red: #c8102e;
  --amber: #a16207;
  /* Darker amber for small text: #a16207 is only 4.32:1 on --bg. */
  --amber-ink: #8a5a00;
  --green: #166534;
  --head: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

/* Anchor jumps clear the sticky chapter strip on the homepage. */
html { scroll-padding-top: 52px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 var(--sans);
}

.wrap { max-width: 940px; margin: 0 auto; padding: 0 20px; }
main.wrap { padding-bottom: 60px; }

/* Links are underlined, not distinguished by colour alone (WCAG 1.4.1). */
a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

/* Placeholder is the only visible prompt in the search fields, so it must
   meet 4.5:1 on white (WCAG 1.4.3). */
::placeholder { color: #5d6167; opacity: 1; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
header.site :focus-visible,
.plate :focus-visible,
h2.sec :focus-visible { outline-color: var(--yellow); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--yellow);
  color: var(--ink);
  padding: 10px 16px;
  font-weight: 700;
}
.skip:focus { left: 0; }

/* Header: ink surface, yellow accents. A flat yellow rule closes the header;
   the hazard stripe is reserved for serious drive warnings. */
header.site { background: var(--ink); color: #fff; border-bottom: 4px solid var(--yellow); }
.bar { display: flex; align-items: center; gap: 18px; min-height: 58px; flex-wrap: wrap; }
.logo {
  font: 700 24px/1 var(--head);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
  white-space: nowrap;
  text-decoration: none;
  padding: 10px 0;
}
.logo span { color: var(--yellow); }
.logo:hover { color: var(--yellow); }
.tagline {
  font: 600 11px/1.4 var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #9aa0a8;
}
.topnav { margin-left: auto; display: flex; gap: 16px; font-size: 14px; }
.topnav a { color: #e6e8ea; text-decoration: none; }
.topnav a:hover { color: var(--yellow); text-decoration: underline; }

.navsearch { display: flex; gap: 0; flex: 1; min-width: 220px; }
.navsearch input {
  flex: 1;
  min-width: 120px;
  min-height: 44px;
  padding: 8px 12px;
  font: 14px var(--mono);
  border: 2px solid var(--ink);
  border-radius: 0;
  background: #fff;
  color: var(--ink);
}
.navsearch button {
  min-height: 44px;
  padding: 8px 14px;
  border: 2px solid var(--yellow);
  border-left: 0;
  border-radius: 0;
  background: var(--yellow);
  color: var(--ink);
  font: 700 12.5px/1 var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
}
.navsearch button:hover { background: var(--ink); color: var(--yellow); }

/* Chapter tab strip: sticky in-page navigation on wide screens; hidden on
   phones where it costs first-viewport height. The active tab is only marked
   by the progressive-enhancement scrollspy script, never hardcoded. */
.chapters {
  display: flex;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 3px solid var(--ink);
  background: var(--panel);
}
.chapters a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 11px 18px;
  font: 700 12.5px/1.3 var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--ink);
  border-right: 1px solid var(--line);
}
.chapters a .n { font-family: var(--mono); margin-right: 8px; }
.chapters a:hover { background: #f7f5f1; }
.chapters a.on {
  background: var(--yellow);
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

h1 {
  font: 700 40px/1.05 var(--head);
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin: 28px 0 6px;
}
h2 {
  font: 700 22px/1.2 var(--head);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 30px 0 12px;
}
h3 {
  font: 600 16px/1.4 var(--head);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 24px 0 8px;
}
h3::after {
  content: "";
  display: block;
  width: 46px;
  height: 3px;
  background: var(--yellow);
  margin-top: 5px;
}
.lead { color: var(--mut); max-width: 62ch; margin: 0 0 18px; }
.sec-p { max-width: 72ch; margin: 0; }

/* Section banners (h2.sec): ink block, white text, yellow number. */
h2.sec {
  display: inline-block;
  background: var(--ink);
  color: #fff;
  font: 700 15px/1.3 var(--head);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 7px 14px;
  margin: 34px 0 12px;
  border: 0;
}
h2.sec .n { font-family: var(--mono); font-size: 13px; color: var(--yellow); margin-right: 8px; }
h2.sec .count {
  background: transparent;
  color: var(--yellow);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

/* Workbench search (the only hard-shadowed panel). */
.workbench {
  background: var(--panel);
  border: 2px solid var(--ink);
  box-shadow: 7px 7px 0 var(--ink);
  padding: 18px;
  margin: 0 0 10px;
}
.lookup-label {
  font: 700 11px/1.4 var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 7px;
}
.lookup { display: flex; gap: 0; max-width: 620px; }
.lookup input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  border: 2px solid var(--ink);
  border-radius: 0;
  padding: 12px 14px;
  font: 16px var(--mono);
  background: #fff;
  color: var(--ink);
}
.lookup input:focus { outline: 2px solid var(--ink); outline-offset: 2px; }
.lookup button {
  min-height: 44px;
  border: 2px solid var(--ink);
  border-left: 0;
  border-radius: 0;
  background: var(--ink);
  color: #fff;
  font: 700 13px/1 var(--head);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0 22px;
  cursor: pointer;
}
.lookup button:hover { background: var(--yellow); color: var(--ink); }
.examples { margin: 12px 0 0; font-size: 14px; color: var(--mut); }
.reassure { margin: 10px 0 0; font-weight: 700; font-size: 14px; }
.examples code { font: 700 14px var(--mono); color: var(--ink); }
.coverage { margin: 16px 0 0; color: var(--mut); font-size: 14px; }
.coverage .mono { color: var(--ink); font-weight: 700; }

/* Dot-leader index */
.idx { columns: 2; column-gap: 44px; margin: 0; padding: 0; list-style: none; }
.idx li { break-inside: avoid; }
.idx a {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 5px 0;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  color: var(--ink);
}
.idx a:hover { text-decoration-thickness: 2px; }
.idx .c { font: 700 14px var(--mono); white-space: nowrap; }
.idx .t {
  font-size: 14.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 0 1 auto;
}
.idx .sub {
  color: var(--mut);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 0 1 auto;
}
.idx .dots { flex: 1 1 16px; border-bottom: 2px dotted #b8b3a9; transform: translateY(-4px); min-width: 16px; }
.idx .b {
  font: 12.5px var(--mono);
  color: var(--mut);
  white-space: nowrap;
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
}

/* Code plate + severity tag */
.plate {
  display: inline-block;
  background: var(--ink);
  color: #fff;
  padding: 10px 20px 12px;
  margin: 4px 0 0;
}
.plate .type {
  display: block;
  font: 600 10.5px/1.6 var(--head);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--yellow);
}
.plate .big { font: 800 32px/1.05 var(--mono); letter-spacing: 0.04em; }
.codehead { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; margin-top: 4px; }
.sevtag {
  display: inline-block;
  border: 2px solid currentColor;
  border-radius: 0;
  padding: 3px 10px;
  font: 800 12px/1.4 var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.sevtag.sev-serious { color: var(--red); }
.sevtag.sev-caution { color: var(--amber-ink); }
.sevtag.sev-info { color: var(--green); }
.best { font: 700 19px/1.35 var(--sans); margin: 10px 0 0; }
.meta { color: var(--mut); font-size: 13.5px; margin: 4px 0 0; }
/* Visible severity scale under the stamp: the colour is never the only cue. */
.sevscale { margin: 7px 0 0; font-size: 13.5px; color: var(--mut); }
.sevscale a { color: inherit; }
/* Compact glossary line for jargon that appears on this code page. */
.keyterms { margin: 8px 0 0; font-size: 13.5px; color: var(--mut); max-width: 78ch; }

/* Numbered causes: ink squares with yellow numerals. */
ol.causes { list-style: none; counter-reset: c; padding: 0; margin: 0; max-width: 72ch; }
ol.causes li { counter-increment: c; padding-left: 36px; position: relative; margin: 7px 0; }
ol.causes li::before {
  content: counter(c);
  position: absolute;
  left: 0;
  top: 1px;
  width: 24px;
  height: 24px;
  background: var(--ink);
  color: var(--yellow);
  font: 700 13px/24px var(--mono);
  text-align: center;
}

/* Drive callout: severity strip on top, severity word always in the label. */
.drive { border: 2px solid var(--ink); background: var(--panel); margin: 20px 0 0; }
.drive .strip { height: 7px; }
.drive.sev-serious .strip {
  background: repeating-linear-gradient(-45deg, var(--ink) 0 9px, var(--yellow) 9px 18px);
}
.drive.sev-caution .strip { background: var(--amber); }
.drive.sev-info .strip { background: var(--green); }
.drive .body { padding: 14px 16px 16px; }
.drive .lbl {
  font: 800 12px/1.4 var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 5px;
}
.drive.sev-serious .lbl { color: var(--red); }
.drive.sev-caution .lbl { color: var(--amber-ink); }
.drive.sev-info .lbl { color: var(--green); }
.drive p { margin: 0; max-width: 72ch; }

/* Tables: dense, uppercase thead with ink rule, hairline row separators.
   The edge shadows use the classic local/scroll attachment trick so they only
   appear when the table actually overflows horizontally. */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background-color: var(--panel);
  background-image:
    linear-gradient(to right, var(--panel) 30%, rgba(255, 255, 255, 0)),
    linear-gradient(to left, var(--panel) 30%, rgba(255, 255, 255, 0)),
    radial-gradient(farthest-side at 0 50%, rgba(27, 29, 32, 0.16), rgba(27, 29, 32, 0)),
    radial-gradient(farthest-side at 100% 50%, rgba(27, 29, 32, 0.16), rgba(27, 29, 32, 0));
  background-position: left center, right center, left center, right center;
  background-repeat: no-repeat;
  background-size: 40px 100%, 40px 100%, 16px 100%, 16px 100%;
  background-attachment: local, local, scroll, scroll;
  scrollbar-width: thin;
  scrollbar-color: #5d6167 transparent;
  border: 1px solid var(--line);
}
.table-scroll:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
/* Above the phone breakpoint the sampled tables fit without horizontal
   scrolling, so the wrapper is not a scroll container there and the sticky
   `thead th` can stick to the page scrollport. Phones keep the swipe. */
@media (min-width: 681px) {
  .table-scroll { overflow: visible; }
}
table { width: 100%; border-collapse: collapse; font: 14.5px/1.45 var(--sans); }
thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--panel);
  font: 700 11px/1.4 var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mut);
  text-align: left;
  border-bottom: 3px solid var(--ink);
  height: 44px;
  padding: 0 12px 0 0;
  white-space: nowrap;
  box-shadow: 0 5px 6px -6px rgba(27, 29, 32, 0.55);
}
/* Sortable header links keep the 11px header type but carry a 44px hit area. */
thead th a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
}
/* The active sort column is distinct by weight, underline and arrow, not by
   the arrow alone (WCAG 1.4.1). */
thead th.sorted { color: var(--ink); }
thead th.sorted a { font-weight: 800; text-decoration-thickness: 2px; }
tbody td { border-bottom: 1px solid var(--line); padding: 8px 12px 8px 0; vertical-align: top; }
tbody tr:hover { background: #f7f5f1; }
tbody tr:last-child td { border-bottom: 0; }
td.code { font-family: var(--mono); font-weight: 700; }
td.mono, .mono { font-family: var(--mono); }
td.src { color: var(--mut); font-size: 12.5px; }
td.desc { min-width: 260px; }
/* The system name is a short, fixed label: keep it on one line so it never
   steals width from the description and forces tall wrapped rows. */
td.system { white-space: nowrap; width: 1%; }
.num, .tabular { font-variant-numeric: tabular-nums; }
th.num, td.num { text-align: right; }
.table-scroll th:first-child,
.table-scroll td:first-child { padding-left: 12px; }
.table-scroll th:last-child,
.table-scroll td:last-child { padding-right: 12px; }

/* Badges stay neutral: red is reserved for danger. */
.badge {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  background: var(--bg);
  color: var(--mut);
  vertical-align: 1px;
  user-select: none;
}
.badge.brand { color: var(--ink); border-color: var(--ink); background: #fdf6dd; }
.badge.sae { color: var(--mut); font-weight: 500; background: transparent; }

/* Copy controls, revealed by the inline script only (hidden without JS).
   Full 44px hit height, 2px ink border, no re-invented pill. */
.copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  font: 600 11px/1 var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0 12px;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  vertical-align: middle;
  margin: 2px 0 2px 6px;
}
.copy:hover { background: var(--yellow); color: var(--ink); }
/* The author display rule above must not defeat the `hidden` attribute: with
   JavaScript off the copy controls stay hidden, exactly as rendered. */
.copy[hidden] { display: none; }
.copy-table { margin: 0; }
.table-tools {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 8px;
}

.count {
  display: inline-block;
  background: var(--line);
  color: var(--ink);
  border-radius: 2px;
  padding: 1px 8px;
  font-size: 12px;
  font-family: var(--mono);
  vertical-align: 2px;
  margin-left: 4px;
}

/* Breadcrumbs */
.crumbs { color: var(--mut); font-size: 13.5px; margin-bottom: 14px; }
.crumbs span, .crumbs a { margin-right: 6px; }

/* DTC page */
.dtc-head { margin-bottom: 8px; }
h1.plate { margin: 4px 0 0; }
.guidance { margin-top: 8px; }
.disclaimer { margin-top: 14px; max-width: 72ch; color: var(--mut); font-size: 13px; }

/* Hairline related list */
ul.related { list-style: none; margin: 0; padding: 0; }
ul.related li { padding: 7px 0; border-bottom: 1px solid var(--line); }
ul.related li:last-child { border-bottom: 0; }
ul.related .code-desc { color: var(--mut); font-size: 13.5px; margin-left: 8px; }
ul.related li a.code { display: inline-block; padding: 2px 0; }

a.code, code {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

/* Search / 404 */
.search-title { word-break: break-word; }
.filter-note {
  background: #fdf6dd;
  border: 2px solid var(--ink);
  padding: 8px 12px;
  margin: 0 0 14px;
  font-size: 14px;
}
.brand-pointer {
  background: #fdf6dd;
  border: 2px solid var(--ink);
  padding: 12px 16px;
  margin: 16px 0;
}
.brand-pointer p { margin: 0; }
.notfound {
  background: var(--panel);
  border: 2px solid var(--ink);
  padding: 22px;
  margin: 16px 0;
}
.notfound h1, .notfound h2 { margin-top: 14px; }
.notfound .lookup { margin: 16px 0 0; }
.notfound .table-scroll { margin-top: 14px; }
.safety-callout {
  background: #fdf3f2;
  border: 2px solid var(--red);
  color: #7a1a12;
  padding: 14px 16px;
  margin: 16px 0;
}
.symptom {
  background: var(--panel);
  border: 2px solid var(--ink);
  padding: 14px 16px;
  margin-bottom: 12px;
}
.symptom h3 { margin: 0 0 8px; }
.pager { margin: 14px 0 0; }
.pager a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 14px;
  border: 2px solid var(--ink);
  text-decoration: none;
  background: var(--panel);
  font-weight: 600;
}
.pager a:hover { background: var(--yellow); }
.pager-status { margin: 6px 0 8px; }
.pager-pages {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pager-pages li { flex: 0 0 auto; }
.pager-pages a,
.pager-pages .current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 10px 13px;
  border: 2px solid var(--ink);
  text-decoration: none;
  background: var(--panel);
  font-weight: 600;
}
.pager-pages a:hover { background: var(--yellow); }
.pager-pages .current { background: var(--ink); color: #fff; }
.pager-pages .gap {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  color: var(--mut);
}
.pager-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pager-controls .lookup { max-width: none; }
.pager-controls .lookup input[type="number"] { flex: 0 0 auto; width: 6.5em; }
/* Jump and per-page live in a native disclosure on phones; hidden on wider
   screens where the row above is always visible. */
.pager-options { display: none; }
.pager-options > summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border: 2px solid var(--ink);
  background: var(--panel);
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
.pager-options > summary::-webkit-details-marker { display: none; }
.pager-options > summary::before {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-right: 10px;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: rotate(45deg);
}
.pager-options[open] > summary { background: var(--yellow); }
.pager-options[open] > summary::before { transform: rotate(-135deg); }
.pager-options .pager-controls { margin-top: 10px; }
/* Selects share the lookup row grammar (brand filter, per-page selector) and
   drop the native chrome for the ink chevron. */
.lookup select {
  flex: 0 0 auto;
  min-height: 44px;
  border: 2px solid var(--ink);
  border-radius: 0;
  padding: 10px 40px 10px 12px;
  font: 15px var(--sans);
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%231b1d20' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  color: var(--ink);
  appearance: none;
  -webkit-appearance: none;
}
.lookup select:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
/* Number spinners add browser-default chrome; the field is typed, not nudged. */
.lookup input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
.lookup input[type="number"]::-webkit-outer-spin-button,
.lookup input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.brand-filter { margin: 0 0 14px; max-width: 620px; }
.brand-filter .lookup select { flex: 1; min-width: 0; }
.sort-arrow { margin-left: 2px; }
.match-note { margin-top: 4px; }
.hint { color: var(--mut); font-size: 13.5px; margin: 10px 0 0; }
.statsline { color: var(--mut); font-size: 14px; margin: 18px 0 0; }
.legend { margin: 10px 0 0; }
.brand-tag { font-weight: 600; }
.muted { color: var(--mut); font-size: 13.5px; }
/* Caveat for rows that carry a status bit or procedure note instead of a
   fault definition. Shown inline after the text and below the headline. */
.status-note { color: var(--mut); font-size: 13.5px; margin: 6px 0 0; }
details.advanced {
  margin-top: 28px;
  border: 2px solid var(--ink);
  background: var(--panel);
  padding: 12px 16px;
}
details.advanced summary { cursor: pointer; font-weight: 700; }

/* About / privacy: prose with ink rules and yellow accents, no red. */
.about p, .about li { max-width: 70ch; }
.about h2 {
  font: 700 22px/1.2 var(--head);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 28px 0 10px;
  padding-bottom: 5px;
  border-bottom: 3px solid var(--ink);
}
.about h2::after {
  content: "";
  display: block;
  width: 52px;
  height: 3px;
  background: var(--yellow);
  margin-top: 5px;
}

footer.site {
  border-top: 3px solid var(--ink);
  margin-top: 48px;
  padding: 14px 0 30px;
  color: var(--mut);
  font-size: 13px;
}
footer.site p { margin: 0 0 8px; max-width: 80ch; }
footer .provenance { color: var(--mut); }

/* Print-only source line: on screen the footer carries provenance instead. */
.printonly { display: none; }
/* Print-only duplicate of the collapsed result tail: the full table prints
   even though the on-screen disclosure is collapsed. */
.printonly-table { display: none; }

@media (max-width: 680px) {
  h1 { font-size: 28px; }
  .idx { columns: 1; }
  .idx .t { max-width: none; }
  /* Brand names win over the vehicle/live-data sub-text on small screens. */
  .idx .sub { display: none; }
  /* Bigger hit areas for standalone index and related links (WCAG 2.5.5). */
  .idx a { padding: 11px 0; }
  ul.related li a.code { padding: 13px 0; }
  /* Stack only the hero and 404 search rows; pager and filter rows stay on
     one line, with the input or select flexing to fill it. */
  .workbench .lookup,
  .notfound .lookup { flex-wrap: wrap; }
  .workbench .lookup button,
  .notfound .lookup button { width: 100%; padding: 13px; border-left: 2px solid var(--ink); border-top: 0; }
  .plate .big { font-size: 26px; }
  .tagline { display: none; }
  /* Chapter tabs cost 77-113px of first viewport and are redundant with the
     banners below, so they are hidden on phones. */
  .chapters { display: none; }
  .topnav { display: none; }
  .navsearch { min-width: 100%; order: 3; }
  .navsearch input { font-size: 16px; }
  /* Keep the description usable; the table scrolls horizontally instead of
     squeezing it into five-line rows. The System label stays on one line. */
  td.desc { min-width: 220px; }
  /* The sticky header sticks inside the table's own scroll area on phones. */
  .table-scroll { max-height: 70vh; overflow-y: auto; }
  /* Fade the right edge only where the table can outgrow the phone width, so
     a clipped column reads as swipeable instead of cut. Fitting tables keep a
     clean edge. */
  .table-scroll:has(td.desc),
  .table-scroll:has(td.mono) {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), rgba(0, 0, 0, 0.55) calc(100% - 10px), rgba(0, 0, 0, 0.3));
    mask-image: linear-gradient(to right, #000 calc(100% - 32px), rgba(0, 0, 0, 0.55) calc(100% - 10px), rgba(0, 0, 0, 0.3));
  }
  /* The mask would clip the outer focus outline, so masked scrollers carry an
     inset ink ring instead. */
  .table-scroll:has(td.desc):focus-visible,
  .table-scroll:has(td.mono):focus-visible {
    outline: 0;
    box-shadow: inset 0 0 0 2px var(--ink);
  }
  /* Compact pager: one scrollable number row, First/Last dropped (the number
     row already reaches both ends) and jump/per-page behind a disclosure. */
  .pager-pages { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .pager-first, .pager-last { display: none; }
  .pager-controls-desktop { display: none; }
  .pager-options { display: block; margin-top: 8px; }
  .dtc-head .best { font-size: 17px; }
  .badge { font-size: 12px; }
  .count { font-size: 13px; }
  .muted, .crumbs { font-size: 14px; }
}

/* Print: content only, no navigation, search or pager UI. */
@media print {
  header.site,
  .chapters,
  .topnav,
  .navsearch,
  .lookup,
  .bigsearch,
  .workbench,
  footer.site,
  .skip,
  details.advanced,
  .crumbs,
  .pager,
  .brand-filter,
  .copy,
  .table-tools,
  .reassure {
    display: none !important;
  }
  body { background: #fff; color: #000; font-size: 12pt; }
  main.wrap { padding: 0; max-width: none; }
  a { color: #000; text-decoration: underline; }
  /* max-height would otherwise be inherited from the phone-width media query
     and clip the printed table. */
  .table-scroll { overflow: visible; max-height: none; border: 1px solid #999; background: #fff; box-shadow: none; -webkit-mask-image: none !important; mask-image: none !important; }
  .printonly-table { display: block !important; margin-top: 10px; }
  .printonly-table .table-tools { display: none !important; }
  .printonly { display: block !important; margin-top: 18px; font-size: 10pt; }
  .badge, .sevtag, .severity { border: 1px solid #000; color: #000 !important; background: transparent !important; }
  .count { border: 1px solid #000; color: #000 !important; background: transparent !important; }
  .plate { background: #fff !important; color: #000 !important; border: 2px solid #000; }
  .plate .type { color: #000 !important; }
  .drive .lbl { color: #000 !important; }
  .safety-callout, .safety-callout strong { color: #000 !important; }
  ol.causes li::before { background: #fff !important; color: #000 !important; border: 1px solid #000; }
  h2.sec { background: #fff !important; color: #000 !important; border: 2px solid #000; }
  h2.sec .n { color: #000 !important; }
  h2.sec .count { color: #000 !important; }
  h3::after { background: #000; }
  .notfound, .symptom, .drive, .filter-note, .brand-pointer, .safety-callout, .workbench {
    border: 1px solid #999;
    background: #fff !important;
    box-shadow: none !important;
  }
  thead th { box-shadow: none; }
  .drive .strip { background: #000 !important; height: 2px; }
  .about h2 { border-color: #000; }
  .about h2::after { background: #000; }
  tbody td, thead th { border-color: #999; }
  button { color: #000; background: #fff; border: 1px solid #000; }
}
