/* Fitment Ledger — drawing-sheet tokens
   Colour encodes the data: blue-ink = the size you have, redline = the size you are considering,
   dimension grey = measurements, check green = a within-tolerance verdict. */
:root {
  --paper: #EDF0F3;
  --paper-2: #E1E6EB;
  --sheet: #F7F9FB;
  --ink: #1C2126;
  --ink-2: #4A535C;
  --rule: #C3CAD2;
  --ref: #2B5C9B;
  --ref-soft: rgba(43, 92, 155, 0.14);
  --new: #B8321A;
  --new-soft: rgba(184, 50, 26, 0.14);
  --dim: #6B7684;
  --ok: #2E7D5B;
  --warn: #9A6A00;
  --focus: #B8321A;
  --font-display: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --font-body: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  --measure: 66ch;
  --wrap: 1080px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14181C; --paper-2: #1C2227; --sheet: #1A1F24; --ink: #E6EAEE; --ink-2: #A7B0B9; --rule: #343D46;
    --ref: #7FA9E0; --ref-soft: rgba(127, 169, 224, 0.18); --new: #E8745A; --new-soft: rgba(232, 116, 90, 0.18);
    --dim: #93A0AD; --ok: #6CC49A; --warn: #E0B04B; --focus: #E8745A;
  }
}
*, *::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.68; overflow-x: hidden; }
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--ref); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--new); }
: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(--sheet); padding: 8px 12px; z-index: 10; }

h1, h2, h3, .brand, nav, th, .button, .stat, legend, label, summary, .post-card h2, figcaption, .crumb, .readout, .tb, .cta-title, .unit-toggle, .verdict { font-family: var(--font-display); }
h1 { font-size: clamp(2.3rem, 5.6vw, 3.8rem); line-height: 0.98; letter-spacing: -0.005em; font-weight: 600; margin: 0 0 16px; max-width: 24ch; }
h2 { font-size: clamp(1.5rem, 2.8vw, 2rem); line-height: 1.1; font-weight: 600; margin: 48px 0 12px; }
h3 { font-size: 1.3rem; line-height: 1.2; font-weight: 600; margin: 26px 0 8px; }
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: 58ch; }
.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; }
.formula { font-family: var(--font-display); font-size: 1.15rem; background: var(--sheet); border-left: 3px solid var(--dim); padding: 10px 16px; margin: 14px 0 18px; max-width: var(--measure); overflow-x: auto; white-space: nowrap; }
.swatch { display: inline-block; width: 12px; height: 12px; vertical-align: -1px; margin-right: 6px; }
.swatch.ref { background: var(--ref); } .swatch.new { background: var(--new); }
.ref-text { color: var(--ref); font-weight: 600; } .new-text { color: var(--new); font-weight: 600; }

/* header / footer */
.site-header { border-bottom: 1px solid var(--rule); background: var(--sheet); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; padding: 14px 16px; }
.brand { font-weight: 700; font-size: 1.45rem; text-decoration: none; color: var(--ink); display: inline-flex; align-items: center; gap: 9px; }
.brand-mark { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; }
.brand-mark circle:last-of-type { stroke: var(--new); }
nav { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 1.1rem; }
nav a { text-decoration: none; color: var(--ink-2); padding-bottom: 2px; border-bottom: 2px solid transparent; }
nav a:hover, nav a[aria-current] { color: var(--ink); border-bottom-color: var(--new); }
main { padding: 32px 16px 64px; }
.site-footer { border-top: 1px solid var(--rule); padding: 28px 0 40px; background: var(--sheet); }
.site-footer p { margin-bottom: 8px; max-width: none; }

/* buttons */
.button { display: inline-block; background: var(--ink); color: var(--paper); padding: 10px 18px; text-decoration: none; font-weight: 600; font-size: 1.1rem; border: 2px solid var(--ink); cursor: pointer; line-height: 1.2; }
.button:hover { background: var(--new); border-color: var(--new); color: #fff; }
.button.secondary { background: transparent; color: var(--ink); }
.button.secondary:hover { background: var(--paper-2); color: var(--ink); }

/* home hero: the drawing is the hero */
.hero-section { display: grid; gap: 28px; padding: 8px 0 12px; }
@media (min-width: 900px) { .hero-section { grid-template-columns: 1fr 1.1fr; align-items: start; } }
.hero-section .actions { margin-top: 18px; }
.hero-readouts { border-bottom: 2px solid var(--ink); margin-bottom: 8px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin: 14px 0 8px; }

/* the drawing sheet */
.sheet { background: var(--sheet); border: 1px solid var(--rule); margin-left: 0; margin-right: 0; }
.sheet figcaption { padding: 8px 12px; font-size: 0.95rem; color: var(--ink-2); border-top: 1px solid var(--rule); }
svg.tire-section, svg.wheel-section { width: 100%; height: auto; font-family: var(--font-display); }
.tire-section .sheet, .wheel-section .sheet { fill: none; stroke: var(--rule); }
.centerline, .hubline { stroke: var(--dim); stroke-width: 1; stroke-dasharray: 14 5 3 5; }
.tire .rim { fill: var(--paper-2); stroke: var(--dim); stroke-width: 1; }
.tire .profile { stroke-width: 2; }
.tire.ref .profile { fill: var(--ref-soft); stroke: var(--ref); }
.tire.new .profile { fill: var(--new-soft); stroke: var(--new); }
.tire.new .rim { fill: none; stroke: var(--new); stroke-dasharray: 4 3; }
.dim line, .dim path { stroke-width: 1; }
.dim line { stroke: var(--dim); } .dim path { fill: var(--dim); stroke: none; }
.dim text { font-size: 15px; font-weight: 600; fill: var(--dim); }
.dim.ref text { fill: var(--ref); } .dim.ref line { stroke: var(--ref); } .dim.ref path { fill: var(--ref); }
.dim.new text { fill: var(--new); } .dim.new line { stroke: var(--new); } .dim.new path { fill: var(--new); }
.rimtext { font-size: 14px; fill: var(--ink-2); }
.titleblock text { font-size: 15px; font-weight: 600; fill: var(--ink); }
.titleblock .ref { fill: var(--ref); } .titleblock .new { fill: var(--new); }
.titleblock .note { font-weight: 400; fill: var(--ink-2); font-size: 16px; }
.sheetnote, .side { font-size: 16px; fill: var(--ink-2); }
.side.hub { fill: var(--ink); font-weight: 600; }
.wheel .barrel { fill: var(--paper-2); stroke: var(--dim); }
.wheel .flange { stroke-width: 1; }
.wheel.ref .flange { fill: var(--ref); } .wheel.new .flange { fill: var(--new); }
.wheel.new .barrel { fill: var(--new-soft); stroke: var(--new); stroke-dasharray: 4 3; }
.wheel.ref .wheelcenter { stroke: var(--ref); stroke-dasharray: 3 3; } .wheel.new .wheelcenter { stroke: var(--new); stroke-dasharray: 3 3; }
.hubline { stroke: var(--ink); stroke-width: 3; stroke-dasharray: none; }
.wlabel { font-size: 15px; font-weight: 600; fill: var(--ink); }
.wheel.ref .wlabel { fill: var(--ref); } .wheel.new .wlabel { fill: var(--new); }
.delta { font-size: 16px; fill: var(--ink-2); }

/* tool sheets */
.tool { display: grid; gap: 24px; margin: 22px 0 10px; }
@media (min-width: 880px) { .tool { grid-template-columns: 320px 1fr; align-items: start; } }
.tool form { border-top: 2px solid var(--ink); padding-top: 14px; }
.tool fieldset { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.tool legend { font-weight: 600; font-size: 1.2rem; margin-bottom: 8px; }
.tool legend.ref { color: var(--ref); } .tool legend.new { color: var(--new); }
.tool label { display: block; margin-bottom: 8px; font-size: 1rem; }
.tool input[type="text"], .tool input[type="number"], .tool select { font: inherit; font-family: var(--font-display); font-size: 1.2rem; padding: 8px 10px; border: 1px solid var(--rule); background: var(--sheet); color: var(--ink); width: 100%; margin-top: 3px; }
.tool input:focus { border-color: var(--ink); }
.tool .row { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.unit-toggle { display: inline-flex; border: 1px solid var(--rule); margin: 0 0 14px; }
.unit-toggle button { font: inherit; font-family: var(--font-display); font-size: 1rem; background: transparent; color: var(--ink-2); border: 0; padding: 6px 14px; cursor: pointer; }
.unit-toggle button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.readouts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0 20px; border-top: 1px solid var(--rule); margin: 0 0 16px; }
.readout { padding: 10px 0 8px; border-bottom: 1px solid var(--rule); }
.readout .label { font-size: 0.95rem; color: var(--ink-2); }
.readout .value { font-size: 1.7rem; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.readout.ref .value { color: var(--ref); } .readout.new .value { color: var(--new); }
.verdict { padding: 10px 14px; border-left: 4px solid var(--dim); background: var(--sheet); margin: 0 0 16px; font-size: 1.05rem; }
.verdict.ok { border-left-color: var(--ok); } .verdict.warn { border-left-color: var(--warn); }
.msg { color: var(--new); min-height: 1.4em; }

.callout { background: var(--sheet); border-left: 3px solid var(--dim); padding: 14px 18px; margin: 22px 0; max-width: var(--measure); }
.callout.warn { border-left-color: var(--warn); }
.callout p:last-child { margin-bottom: 0; }

/* CTA */
.cta { border-top: 2px solid var(--new); border-bottom: 1px solid var(--rule); padding: 18px 0 20px; margin: 40px 0; max-width: var(--measure); }
.cta-title { font-weight: 600; font-size: 1.35rem; 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: 560px; font-family: var(--font-display); font-size: 1.05rem; }
th, td { text-align: left; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-weight: 600; white-space: nowrap; color: var(--ink-2); }
tbody th { color: var(--ink); }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
td.ref, th.ref { color: var(--ref); } td.new, th.new { color: var(--new); }
.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; }

/* posts and guides */
.post { max-width: 800px; }
.post-header { margin-bottom: 26px; }
.post .hero { margin-top: 18px; border: 1px solid var(--rule); background: var(--sheet); }
.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; }
.post-body blockquote { margin: 16px 0; padding: 4px 18px; border-left: 3px solid var(--rule); color: var(--ink-2); }
.post-body img { border: 1px solid var(--rule); background: var(--sheet); }
.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.15rem; }
.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: 800px; }
.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(--new); }
.post-card .small { margin: 0 0 4px; }

/* feature rows (home) — rules carry the sequence, no cards */
.features { max-width: none; display: grid; gap: 0 36px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin: 10px 0 0; padding: 0; list-style: none; }
.features li { border-top: 1px solid var(--rule); padding: 14px 0 10px; }
.features h3 { margin: 0 0 4px; }
.features p { margin: 0; color: var(--ink-2); font-size: 0.98rem; }

@media (max-width: 600px) { .tool .row { grid-template-columns: 1fr; } }
@media print { .site-header, .site-footer, .cta, .actions, nav { display: none; } body { background: #fff; color: #000; } .sheet { break-inside: avoid; } }
@media (prefers-reduced-motion: no-preference) { .tire .profile, .wheel rect { transition: d 200ms, x 200ms, width 200ms; } }

/* Drawings keep their lettering legible when the SVG is scaled down on a phone. */
@media (max-width: 640px) {
  .tire-section .dim text, .wheel-section .dim text { font-size: 20px; }
  .tire-section .rimtext, .wheel-section .wlabel { font-size: 19px; }
  .titleblock text { font-size: 19px; }
  .titleblock .note, .sheetnote, .side, .delta { font-size: 19px; }
}
