:root {
  color-scheme: light;
  --paper: #f8f6ef;
  --surround: #eeeae0;
  --ink: #1d1c1a;
  --muted: #554f43;
  --rule: #9b9485;
  --soft-rule: #d0c8b8;
  --plate: #ece7da;
  --marker: #f3d16b;
  --marker-ink: #251d0b;
  --signal: #9f3024;
  --focus: #234db0;
  --text: Inter, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Courier New", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #23221f;
    --surround: #1b1a17;
    --ink: #f6f1e5;
    --muted: #c9c0ad;
    --rule: #8f8776;
    --soft-rule: #60594d;
    --plate: #302c24;
    --marker: #d1a74b;
    --signal: #ffa89a;
    --focus: #b5caff;
  }
}

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

body {
  margin: 0;
  background: var(--surround);
  color: var(--ink);
  font: 17px/1.6 var(--text);
  overflow-wrap: anywhere;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
}

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

button, input, select, textarea { font: inherit; color: inherit; }
button, a, select { touch-action: manipulation; }

h1, h2, h3, p { margin: 0; }
h1 {
  font-size: clamp(2.2rem, 1.5rem + 2.75vw, 4.4rem);
  font-weight: 760;
  letter-spacing: -0.052em;
  line-height: 1.06;
  text-wrap: balance;
}
h2 { font-size: clamp(1.35rem, 1.15rem + 0.65vw, 1.8rem); letter-spacing: -0.03em; line-height: 1.22; }
h3 { font-size: 1.12rem; font-weight: 670; line-height: 1.32; }
code { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.skip {
  position: absolute;
  inset: 5px auto auto 5px;
  background: var(--paper);
  padding: 8px 12px;
  transform: translateY(-160%);
}
.skip:focus { transform: translateY(0); }

.masthead, .sheet {
  width: min(72rem, calc(100% - 2 * clamp(12px, 3vw, 36px)));
  margin-inline: auto;
}
.masthead {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  column-gap: 16px;
  padding-block: 13px 10px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  font-size: 1.65rem;
  line-height: 1.2;
  font-weight: 790;
  letter-spacing: -0.05em;
  text-decoration: none;
}
.wordmark:hover { text-decoration: underline; }
.edition { color: var(--muted); font-size: 0.94rem; }
.primary-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 clamp(12px, 2.3vw, 26px);
}
.primary-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.96rem;
  text-decoration-thickness: 1px;
}
.primary-nav [aria-current="page"] { font-weight: 740; }
.sheet {
  margin-bottom: 36px;
  padding: clamp(18px, 4vw, 52px);
  border: 1px solid var(--rule);
  border-top: 4px solid var(--ink);
  background: var(--paper);
}

.search-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  column-gap: clamp(24px, 5vw, 70px);
  row-gap: 34px;
  align-items: start;
}
.search-layout h1 { text-wrap: initial; }
.intro { color: var(--muted); margin-top: 16px; max-width: 57ch; }
.intro code { color: var(--ink); }
.search-form { margin-top: 27px; }
.search-fields { display: flex; align-items: stretch; gap: 9px; }
label { display: block; margin-bottom: 7px; font-weight: 650; font-size: 0.96rem; }
input, select, textarea {
  min-height: 52px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
}
.search-code { position: relative; flex: 1; min-width: 0; }
.search-fields input { width: 100%; height: 100%; font: 550 clamp(1rem, 3vw, 1.28rem)/1.2 var(--mono); }
.search-fields input::placeholder { color: var(--muted); opacity: 1; }
.search-suggestions {
  position: absolute;
  z-index: 3;
  inset: calc(100% + 5px) 0 auto;
  max-height: min(17rem, 42vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0;
  padding: 0;
  border: 1px solid var(--ink);
  background: var(--paper);
  box-shadow: 0 5px 0 var(--soft-rule);
  list-style: none;
}
.search-suggestion {
  min-height: 48px;
  padding: 8px 10px;
  cursor: pointer;
  line-height: 1.35;
}
.search-suggestion + .search-suggestion { border-top: 1px solid var(--soft-rule); }
.search-suggestion:hover, .search-suggestion[aria-selected="true"] { background: var(--plate); }
.search-suggestion[aria-selected="true"] { box-shadow: inset 3px 0 var(--focus); }
.search-suggestion code { display: block; font-size: 1rem; font-weight: 700; }
.search-suggestion span { display: block; font-size: 0.875rem; }
.search-suggestion small { display: block; color: var(--muted); font-size: 0.8125rem; }
.search-suggestion-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.primary {
  border: 1px solid var(--ink);
  border-radius: 0;
  min-height: 52px;
  padding: 8px clamp(12px, 2vw, 22px);
  background: var(--ink);
  color: var(--paper);
  font-weight: 720;
  cursor: pointer;
}
.primary:hover { background: var(--muted); }
.text-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 0.96rem; }
.error { color: var(--signal); margin-top: 8px; }

.guide { border-top: 2px solid var(--ink); padding-top: 15px; }
.guide > p { color: var(--muted); font-size: 0.96rem; }
.plate { margin: 15px 0 12px; padding: clamp(12px, 1.8vw, 20px); border: 1px solid var(--rule); background: var(--plate); }
.plate figcaption { color: var(--muted); font-size: 0.88rem; }
.plate-brand, .plate-code, .plate-serial {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2px 8px;
  align-items: baseline;
}
.plate-brand { margin: 4px 0 8px; font-weight: 790; }
.plate-code, .plate-serial { padding: 5px 7px; font-size: 0.89rem; }
.plate-code { background: var(--marker); color: var(--marker-ink); font-weight: 710; }
.plate-code code { font-size: 1.06rem; }
.plate-serial { color: var(--muted); }

.choices, .parts, .evidence-list { list-style: none; padding: 0; margin: 0; }
.choices { margin-top: 12px; border-bottom: 1px solid var(--rule); }
.choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 70px;
  padding: 10px 5px;
  border-top: 1px solid var(--rule);
  text-decoration: none;
}
.choice:hover { background: var(--plate); }
.choice > span:first-child { display: grid; gap: 1px; }
.choice code { font-size: 1.2rem; }
.choice strong, .choice small { color: var(--muted); font-size: 0.95rem; }
.choice strong { font-weight: 560; }

.back { margin-top: -8px; }
.model-heading { margin: 8px 0 33px; }
.model-heading h1 { font-size: clamp(2rem, 1.4rem + 2.5vw, 3.65rem); text-wrap: initial; }
.model-maker {
  display: block;
  margin-bottom: 7px;
  font-weight: 740;
  font-size: 1rem;
  letter-spacing: 0;
}
.model-code {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 9px;
  margin: 14px 0 0;
  color: var(--muted);
  font: 560 0.97rem/1.45 var(--text);
  letter-spacing: 0;
}
.model-code code { color: var(--ink); font-size: 1.36rem; }
.model-details { color: var(--muted); font-size: 0.96rem; margin-top: 5px; }
.model-summary { max-width: 67ch; margin-block: 14px 23px; }
.model-summary > * + * { margin-top: 8px; }
.parts-section { padding-top: 15px; margin-top: 23px; border-top: 2px solid var(--ink); }
.parts-section > p { margin-top: 7px; color: var(--muted); }
.part { padding: 16px 0 12px; border-bottom: 1px solid var(--rule); }
.part:last-child { border-bottom: 0; }
.part-kind { color: var(--muted); font-size: 0.91rem; margin-bottom: 3px; }
.part-number { display: inline-block; font-size: clamp(1.4rem, 1.15rem + 1.2vw, 1.98rem); letter-spacing: -0.03em; }
.part-report { color: var(--muted); }
.evidence-list { border-left: 2px solid var(--soft-rule); margin: 6px 0 0; padding-left: 13px; }
.evidence { font-size: 0.98rem; max-width: 77ch; }
.evidence + .evidence { margin-top: 7px; }
.evidence-meta { display: flex; flex-wrap: wrap; gap: 0 12px; align-items: baseline; }
.evidence-meta span, .evidence-note { color: var(--muted); }
.evidence-meta a { display: inline-flex; align-items: center; min-height: 44px; }
.evidence-note { margin-top: 1px; }
.model-footer { display: flex; flex-wrap: wrap; gap: 0 20px; margin-top: 21px; border-top: 1px solid var(--soft-rule); }
.model-footer a { display: inline-flex; align-items: center; min-height: 44px; font-size: 0.96rem; }

.guide-art { margin-block: 2rem; }
.guide-art-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 1.35rem;
  margin-top: 0.75rem;
}
.guide-art-figure { margin: 0; min-width: 0; }
.guide-art-svg { display: block; width: 100%; height: auto; border: 1px solid var(--soft-rule); }
.guide-art-figure figcaption { display: grid; gap: 0.2rem; margin-top: 0.45rem; line-height: 1.45; }
.guide-art-figure figcaption span { color: var(--muted); }

.part-art {
  margin: 0;
  min-width: 0;
  width: min(100%, 28rem);
  border: 1px solid var(--soft-rule);
  background: var(--plate);
}
.part-art__svg { display: block; width: 100%; height: auto; }
.part-art__caption {
  display: block;
  padding: 0.55rem 0.8rem;
  border-top: 1px solid var(--soft-rule);
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--muted);
}
.part-overview { display: grid; grid-template-columns: minmax(0, 1fr) minmax(14rem, 26rem); gap: 1.5rem; align-items: center; }
.part-overview > header { margin: 0; }
.part-photo-source { margin-top: 0.7rem; font-size: 0.92rem; }
.guide-search .search-form { max-width: 35rem; }
.part-with-art {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(9rem, 12rem);
  align-items: start;
  gap: 1rem;
}
.part-with-art > .part-art { margin-top: 0.2rem; }
@media (max-width: 45rem) {
  .part-overview { grid-template-columns: minmax(0, 1fr); gap: 0.9rem; }
}
@media (max-width: 33rem) {
  .part-with-art { grid-template-columns: minmax(0, 1fr); gap: 0.35rem; }
  .part-with-art > .part-art { max-width: 16rem; }
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 9px;
  margin: -6px 0 14px;
  color: var(--muted);
  font-size: 0.94rem;
}
.breadcrumbs a { display: inline-flex; align-items: center; min-height: 44px; }
.editorial-section {
  margin-top: clamp(32px, 5.5vw, 72px);
  border-top: 2px solid var(--ink);
  padding-top: clamp(14px, 2vw, 24px);
}
.editorial-section > p { max-width: 68ch; margin-top: 10px; }
.editorial-section p + p { margin-top: 10px; }
.editorial-copy { max-width: 72ch; }
.editorial-copy h2:not(:first-child) { margin-top: 27px; }
.editorial-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 3.5vw, 45px);
  align-items: start;
}
.editorial-grid > * { min-width: 0; }
.editorial-grid > .editorial-section { margin-top: 0; }
.reading-list, .browse-list, .comparison-list {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--soft-rule);
}
.reading-list > li, .browse-list > li, .comparison-list > li {
  padding: 5px 0;
  border-top: 1px solid var(--soft-rule);
}
.choices.browse-list > li, .choices.comparison-list > li { padding: 0; border-top: 0; }
.reading-list a, .browse-list a, .comparison-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 630;
}
.reading-list a:has(code) { display: inline-block; padding-block: 8px; }
.editorial-copy code, .reading-list code, .model-summary code { display: inline-block; max-width: 100%; }
.choices .choice { display: flex; min-height: 70px; }
.reading-list p, .browse-list p, .comparison-list p, .comparison-list dd {
  margin: 0 0 7px;
  max-width: 63ch;
  color: var(--muted);
}
.comparison-list dt { padding-top: 6px; font-weight: 690; }

.narrow { max-width: 36rem; }
.report-form { margin-top: 20px; display: grid; justify-items: start; gap: 13px; }
.report-form > div, textarea, select { width: 100%; }
.select-field { position: relative; }
.select-field::after {
  position: absolute;
  inset: calc(50% - 5px) 15px auto auto;
  width: 8px;
  height: 8px;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
  pointer-events: none;
  content: "";
}
select { -webkit-appearance: none; appearance: none; padding-right: 33px; }
textarea { resize: vertical; display: block; }

@media (max-width: 45rem) {
  .search-layout, .editorial-grid { grid-template-columns: minmax(0, 1fr); }
  .masthead { padding-top: 4px; }
  .primary-nav { column-gap: 14px; }
  .model-heading { margin-bottom: 19px; }
}
