/* ModelFix Guide — tokens. Colour encodes who may act: blue = owner check, red = technician only, grey = resolved. */
:root {
  --paper: #eceff2;
  --paper-2: #e1e5ea;
  --card: #ffffff;
  --ink: #1b1f24;
  --ink-2: #4e5661;
  --rule: #c5ccd3;
  --check: #1a6fb0;
  --check-deep: #11528a;
  --check-tint: #e3eef8;
  --stop: #b83a1a;
  --stop-deep: #8f2b12;
  --stop-tint: #f7e6e0;
  --done: #6b7684;
  --focus: #11528a;
  --font-display: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --font-body: "Atkinson Hyperlegible", "Helvetica Neue", Arial, sans-serif;
  --measure: 66ch;
  --wrap: 1040px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #161a1f; --paper-2: #1e242b; --card: #1c2228; --ink: #e8ebee; --ink-2: #a3acb6; --rule: #343c46;
    --check: #5aa6e6; --check-deep: #8cc3f2; --check-tint: #1a2d3f;
    --stop: #e2704f; --stop-deep: #f0957b; --stop-tint: #3a2119;
    --done: #8f99a4; --focus: #8cc3f2;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.6; overflow-x: hidden; }
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--check-deep); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--check); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--card); padding: 8px 12px; z-index: 10; }

h1, h2, h3, .brand, nav, th, .button, .plate, .crumb, summary, .post-card h2, legend, label, .brand-list, .step-n, .code-list, .lookup-result h2 {
  font-family: var(--font-display);
}
h1 { font-size: clamp(2.2rem, 5.6vw, 3.6rem); line-height: 0.98; font-weight: 700; margin: 0 0 18px; max-width: 24ch; text-wrap: balance; }
h2 { font-size: clamp(1.5rem, 2.8vw, 2rem); line-height: 1.1; font-weight: 600; margin: 46px 0 12px; }
h3 { font-size: 1.3rem; line-height: 1.2; font-weight: 600; margin: 24px 0 6px; }
p, ul, ol { margin: 0 0 1.1em; max-width: var(--measure); }
.lede { font-size: 1.18rem; line-height: 1.5; color: var(--ink-2); max-width: 60ch; }
.small { font-size: 0.9rem; color: var(--ink-2); }
.crumb { font-size: 1rem; color: var(--ink-2); margin: 0 0 10px; }
.crumb a { color: inherit; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; background: var(--paper-2); padding: 1px 5px; border-radius: 3px; }

/* header / footer */
.site-header { border-bottom: 2px solid var(--ink); background: var(--card); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 28px; padding: 14px 16px; }
.brand { font-weight: 700; font-size: 1.5rem; text-decoration: none; color: var(--ink); display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { width: 20px; height: 14px; border: 2px solid var(--ink); border-left-width: 7px; border-left-color: var(--check); border-right-width: 7px; border-right-color: var(--stop); }
nav { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 1.1rem; font-weight: 500; }
nav a { text-decoration: none; color: var(--ink-2); }
nav a:hover, nav a[aria-current] { color: var(--ink); }
main { padding: 34px 16px 64px; }
.site-footer { border-top: 2px solid var(--ink); padding: 26px 0 40px; }
.site-footer p { margin-bottom: 8px; max-width: none; }

/* code plate: the bordered rating-label at the top of a code page */
.plate { display: inline-grid; grid-template-columns: auto auto; gap: 0; border: 2px solid var(--ink); background: var(--card); margin: 0 0 20px; }
.plate > span { padding: 6px 14px; border-right: 2px solid var(--ink); font-size: 1.05rem; color: var(--ink-2); }
.plate > span:last-child { border-right: 0; }
.plate .plate-code { font-size: 2.2rem; line-height: 1; font-weight: 700; color: var(--ink); padding: 4px 16px; letter-spacing: 0.02em; }
.plate .plate-brand { font-weight: 600; color: var(--ink); }

/* legend: who may act */
.who { display: flex; flex-wrap: wrap; gap: 8px 22px; font-family: var(--font-display); font-size: 1rem; margin: 10px 0 18px; padding: 0; list-style: none; max-width: none; }
.who li { display: inline-flex; align-items: center; gap: 8px; }
.who i { display: inline-block; width: 22px; height: 14px; border: 2px solid var(--check); background: var(--card); }
.who i.sw-dec { border-style: dashed; }
.who i.sw-stop { border-color: var(--stop); background: repeating-linear-gradient(45deg, var(--card) 0 4px, var(--stop) 4px 5px); }
.who i.sw-done { border-color: var(--done); }

/* the decision tree (bold element) */
.tree-wrap { border: 2px solid var(--ink); background: var(--card); padding: 14px 10px 6px; margin: 8px 0 24px; overflow-x: auto; }
.tree-wrap figcaption { font-size: 0.9rem; color: var(--ink-2); padding: 8px 6px 4px; }
.tree { width: 100%; max-width: 760px; height: auto; }
.tree text { font-family: var(--font-display); font-size: 19px; fill: var(--ink); font-weight: 500; }
.tree .t-check { fill: var(--card); stroke: var(--check); stroke-width: 2.5; }
.tree .t-check-n { fill: var(--check); font-weight: 700; }
.tree .t-dec { fill: var(--card); stroke: var(--check); stroke-width: 2.5; stroke-dasharray: 6 4; }
.tree .t-stop { fill: url(#hatch); stroke: var(--stop); stroke-width: 3; }
.tree .t-stop-text { fill: var(--stop); font-weight: 700; }
.tree .t-done { fill: var(--card); stroke: var(--done); stroke-width: 2; }
.tree .t-done-text { fill: var(--done); }
.tree .t-start { fill: var(--ink); }
.tree .t-start-text { fill: var(--paper); font-weight: 700; font-size: 22px; }
.tree .t-edge { stroke: var(--ink); stroke-width: 2; fill: none; }
.tree .t-edge-side { stroke: var(--done); stroke-width: 2; fill: none; stroke-dasharray: 5 4; }
.tree .t-edge-stop { stroke: var(--stop); stroke-width: 2; fill: none; }
.tree .t-lbl { font-size: 16px; fill: var(--done); }
.tree .t-arrow { fill: var(--ink); } .tree .t-arrow-side { fill: var(--done); } .tree .t-arrow-stop { fill: var(--stop); }
.tree .t-hatch { stroke: var(--stop); stroke-width: 1.2; }
@media (max-width: 600px) { .tree { min-width: 560px; } }

/* step list under the tree */
.steps { list-style: none; padding: 0; margin: 0 0 20px; max-width: var(--measure); counter-reset: step; }
.steps li { position: relative; padding: 12px 0 12px 54px; border-top: 1px solid var(--rule); }
.steps li .step-n { position: absolute; left: 0; top: 10px; width: 38px; height: 38px; border: 2px solid var(--check); color: var(--check); font-weight: 700; font-size: 1.3rem; display: grid; place-items: center; background: var(--card); }
.steps li.decision .step-n { border-style: dashed; transform: rotate(45deg); font-size: 0; }
.steps li.decision .step-n::after { content: "?"; font-size: 1.3rem; transform: rotate(-45deg); }
.steps li strong { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; display: block; }
.steps li p { margin: 2px 0 0; color: var(--ink-2); font-size: 0.98rem; }

/* stop block */
.stop-block { border: 3px solid var(--stop); border-left-width: 14px; background: var(--stop-tint); padding: 14px 18px; margin: 22px 0; max-width: var(--measure); }
.stop-block h2, .stop-block h3 { margin-top: 0; color: var(--stop-deep); }
.stop-block p:last-child { margin-bottom: 0; }
.check-block { border: 2px solid var(--check); border-left-width: 14px; background: var(--check-tint); padding: 14px 18px; margin: 22px 0; max-width: var(--measure); }
.check-block h2, .check-block h3 { margin-top: 0; color: var(--check-deep); }
.check-block p:last-child { margin-bottom: 0; }
.callout { background: var(--paper-2); border-left: 4px solid var(--done); padding: 12px 18px; margin: 20px 0; max-width: var(--measure); }
.callout p:last-child { margin-bottom: 0; }

/* buttons */
.button { display: inline-block; background: var(--check-deep); color: #fff; padding: 11px 18px; text-decoration: none; font-weight: 600; font-size: 1.15rem; border: 2px solid var(--check-deep); cursor: pointer; line-height: 1.2; }
.button:hover { background: var(--check); border-color: var(--check); color: #fff; }
.button.secondary { background: transparent; color: var(--check-deep); }
.button.secondary:hover { background: var(--check-tint); color: var(--check-deep); }
@media (prefers-color-scheme: dark) { .button { color: #0f1a24; } .button:hover { color: #0f1a24; } }
.actions { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin: 18px 0 8px; }

/* home hero */
.hero-section { display: grid; gap: 28px; padding: 8px 0 12px; }
@media (min-width: 900px) { .hero-section { grid-template-columns: 1fr 1.15fr; align-items: start; } }
.hero-section > * { min-width: 0; }
.hero-section .sample { max-width: none; }
.hero-section .sample .tree-wrap { margin-top: 0; }

/* CTA */
.cta { border-top: 3px solid var(--check); border-bottom: 1px solid var(--rule); padding: 18px 0 20px; margin: 40px 0; max-width: var(--measure); }
.cta-title { font-family: var(--font-display); font-weight: 600; font-size: 1.4rem; margin-bottom: 4px; }
.cta p:last-of-type { margin-bottom: 14px; color: var(--ink-2); }

/* tables scroll inside their own box */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 14px 0 26px; border-top: 2px solid var(--ink); }
table { border-collapse: collapse; width: 100%; min-width: 600px; font-size: 0.95rem; }
th, td { text-align: left; padding: 9px 12px 9px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-weight: 600; white-space: nowrap; color: var(--ink-2); font-size: 1.05rem; }
tbody th { color: var(--ink); }
td.num, th.num { text-align: right; white-space: nowrap; }
.post-body table { display: block; overflow-x: auto; min-width: 0; border-top: 2px solid var(--ink); margin: 18px 0 26px; }
.post-body table th { white-space: normal; }
td a { overflow-wrap: anywhere; }

/* brand index and code lists */
.brand-list { list-style: none; padding: 0; margin: 0; max-width: none; }
.brand-list > li { border-top: 2px solid var(--ink); padding: 16px 0 10px; display: grid; gap: 4px 28px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .brand-list > li { grid-template-columns: 180px 1fr; } }
.brand-list h2 { margin: 0; font-size: 1.9rem; }
.code-list { list-style: none; padding: 0; margin: 0; max-width: none; }
.code-list li { display: grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: baseline; padding: 7px 0; border-top: 1px solid var(--rule); }
.code-list .cc { font-weight: 700; font-size: 1.4rem; text-decoration: none; color: var(--ink); border: 2px solid var(--ink); padding: 1px 8px; text-align: center; background: var(--card); }
.code-list .cc:hover { color: var(--check-deep); border-color: var(--check-deep); }
.code-list .cm { font-family: var(--font-body); font-size: 0.98rem; color: var(--ink-2); }
.code-list .cm span { font-family: var(--font-display); color: var(--ink); font-size: 1.05rem; }

/* lookup tool */
.lookup { border-top: 2px solid var(--ink); padding: 18px 0 6px; margin: 20px 0; max-width: 720px; }
.lookup label { display: block; margin-bottom: 8px; font-size: 1.1rem; font-weight: 600; }
.lookup select, .lookup input[type="text"] { font: inherit; font-family: var(--font-display); font-size: 1.3rem; padding: 10px 12px; border: 2px solid var(--ink); background: var(--card); color: var(--ink); width: 100%; margin-top: 4px; }
.lookup .row { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .lookup .row { grid-template-columns: 1fr 1fr; } }
.lookup-result { margin-top: 18px; }
.lookup-result ul { list-style: none; padding: 0; }
.lookup-result li { border-top: 1px solid var(--rule); padding: 10px 0; }
.lookup-result li a { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; text-decoration: none; }
.lookup-result .nomatch { border: 2px dashed var(--rule); padding: 12px 16px; }

/* posts */
.post { max-width: 780px; }
.post-header { margin-bottom: 26px; }
.post .hero { margin-top: 18px; border: 2px solid var(--ink); }
.post-body { max-width: var(--measure); }
.post-body h2 { scroll-margin-top: 80px; }
.post-body ul, .post-body ol { padding-left: 1.2em; }
.post-body li { margin-bottom: 6px; }
.faq details { border-bottom: 1px solid var(--rule); padding: 10px 0; max-width: var(--measure); }
.faq summary { cursor: pointer; list-style: none; font-weight: 600; font-size: 1.2rem; }
.faq summary h3 { display: inline; margin: 0; font-size: inherit; }
.faq summary::-webkit-details-marker { display: none; }
.faq details p { margin: 8px 0 2px; }
.author-box, .related { margin-top: 44px; padding-top: 18px; border-top: 2px solid var(--ink); max-width: var(--measure); }
.author-box h2, .related h2 { margin-top: 0; font-size: 1.3rem; }
.post-list { list-style: none; padding: 0; margin: 0; max-width: 780px; }
.post-card { border-top: 1px solid var(--rule); padding: 18px 0; }
.post-card:first-child { border-top: 2px solid var(--ink); }
.post-card h2 { margin: 2px 0 6px; font-size: 1.5rem; }
.post-card h2 a { text-decoration: none; color: var(--ink); }
.post-card h2 a:hover { color: var(--check-deep); }
.post-card .small { margin: 0 0 4px; }

@media print { .site-header, .site-footer, .cta, nav { display: none; } body { background: #fff; color: #000; } .tree-wrap { border-color: #000; } }

/* feature list (home) */
.features { max-width: none; display: grid; gap: 6px 36px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 10px 0 0; padding: 0; list-style: none; }
.features li { border-top: 2px solid var(--ink); padding: 12px 0 10px; }
.features h3 { margin: 0 0 4px; }
.features p { margin: 0; color: var(--ink-2); font-size: 0.98rem; }
.brand-list h2 a { text-decoration: none; color: var(--ink); }
