/* TireSizeCalc - door-placard world. Tokens first; components below. */
@font-face { font-family: "Geist"; src: url("/assets/fonts/geist.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/assets/fonts/jetbrains-mono.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  --ground: #eef0ec;        /* label stock, cool */
  --paper: #ffffff;         /* placard face */
  --ink: #1d1f22;           /* rubber charcoal */
  --ink-2: #4b5057;         /* secondary text, 7.4:1 on ground */
  --hair: #c3c7c0;          /* inner cell rules */
  --yellow: #f3c812;        /* placard yellow: shell band, selection */
  --yellow-wash: #fdf3c4;   /* highlighted row */
  --blue: #245b8f;          /* the second tire */
  --blue-wash: #e1ebf4;
  --red: #b42318;           /* speedometer change over 3% only */
  --ok: #2f6b3a;
  --font-ui: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-num: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --s1: .25rem; --s2: .5rem; --s3: .75rem; --s4: 1rem; --s5: 1.5rem; --s6: 2rem; --s7: 3rem; --s8: 4.5rem;
  --rule-heavy: 3px solid var(--ink);
  --rule: 1px solid var(--ink);
  --rule-hair: 1px solid var(--hair);
  --wrap: 72rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 1.0625rem/1.55 var(--font-ui); font-feature-settings: "ss01"; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--yellow); color: var(--ink); }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 2px; }
input { caret-color: var(--blue); }
html { scrollbar-color: var(--ink-2) var(--ground); }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-feature-settings: "zero" 0; letter-spacing: -.01em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--s4); }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--s4); top: -3rem; background: var(--paper); padding: var(--s2) var(--s3); z-index: 10; }
.skip:focus { top: var(--s2); }

/* ---------- shell: the placard band ---------- */
.band { background: var(--yellow); border-bottom: var(--rule-heavy); }
.band .wrap { display: flex; align-items: center; gap: var(--s5); min-height: 3.75rem; flex-wrap: wrap; padding-top: var(--s2); padding-bottom: var(--s2); }
.brand { display: flex; align-items: center; gap: var(--s2); text-decoration: none; font-weight: 750; font-size: 1.125rem; letter-spacing: -.01em; }
.brand svg { width: 1.6rem; height: 1.6rem; }
.nav { display: flex; gap: var(--s4); flex-wrap: wrap; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 550; font-size: .95rem; padding: var(--s1) 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--ink); }
.jump { display: flex; align-items: stretch; }
.jump input { width: 10.5rem; }
.dev-banner { background: var(--ink); color: var(--yellow); font-size: .875rem; padding: var(--s2) 0; }

/* ---------- controls ---------- */
.field { display: grid; gap: var(--s1); }
.field label { font-weight: 600; font-size: .9rem; }
.field .hint { font-size: .85rem; color: var(--ink-2); }
input[type="text"] {
  font: 500 1.0625rem/1 var(--font-num); color: var(--ink); background: var(--paper);
  border: var(--rule); border-radius: 0; padding: .7rem .75rem; min-height: 2.9rem; width: 100%;
}
input[type="text"]::placeholder { color: #666b72; }
input[aria-invalid="true"] { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.btn { font: 650 1rem/1 var(--font-ui); background: var(--ink); color: var(--paper); border: var(--rule); border-radius: 0;
  padding: 0 1.1rem; min-height: 2.9rem; cursor: pointer; white-space: nowrap; }
.btn:hover { background: #3a3e44; }
.band .btn { background: var(--ink); }
.error { color: var(--red); font-size: .9rem; min-height: 1.2em; margin: 0; }

/* ---------- page head ---------- */
main { padding-top: var(--s5); padding-bottom: var(--s8); }
.crumbs { font-size: .875rem; color: var(--ink-2); margin: 0 0 var(--s3); }
.crumbs a { color: var(--ink-2); }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.02em; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.25rem); font-weight: 760; }
h1 .num { letter-spacing: -.035em; font-weight: 700; }
h2 { font-size: clamp(1.35rem, 1.15rem + .8vw, 1.75rem); font-weight: 720; margin-top: var(--s8); margin-bottom: var(--s3); }
h3 { font-size: 1.125rem; font-weight: 680; margin-top: var(--s6); margin-bottom: var(--s2); }
.lede { font-size: clamp(1.125rem, 1.05rem + .35vw, 1.3rem); max-width: 40em; margin: var(--s3) 0 var(--s5); }
.lede strong { font-family: var(--font-num); font-weight: 700; }
p, li { max-width: 68ch; }
.note { color: var(--ink-2); font-size: .925rem; }

/* ---------- first viewport grid ---------- */
.lead-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: var(--s6); align-items: start; }
@media (max-width: 860px) { .lead-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s5); } }

/* ---------- the placard (signature) ---------- */
.placard { background: var(--paper); border: var(--rule-heavy); }
.placard-head { background: var(--yellow); border-bottom: var(--rule-heavy); display: flex; justify-content: space-between; align-items: baseline;
  gap: var(--s3); padding: var(--s2) var(--s3); flex-wrap: wrap; }
.placard-head .label { font-weight: 800; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; }
.placard-head .code { font-family: var(--font-num); font-weight: 700; font-size: 1.05rem; }
.placard table { width: 100%; border-collapse: collapse; font-size: .975rem; }
.placard th, .placard td { padding: .55rem var(--s3); border-bottom: var(--rule-hair); text-align: left; vertical-align: baseline; }
.placard tr:last-child th, .placard tr:last-child td { border-bottom: 0; }
.placard thead th { font-size: .78rem; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; border-bottom: var(--rule); color: var(--ink); }
.placard tbody th { font-weight: 750; font-size: .8rem; letter-spacing: .05em; text-transform: uppercase; width: 34%; border-right: var(--rule-hair); }
.placard td.v { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.placard td.v small { font-weight: 400; color: var(--ink-2); }
.placard td.b { color: var(--blue); }
.placard td.d { font-family: var(--font-num); white-space: nowrap; }
.placard .src { font-size: .78rem; color: var(--ink-2); font-weight: 450; letter-spacing: 0; text-transform: none; }
.placard .src a { color: var(--ink-2); }
.placard tr.key td, .placard tr.key th { background: var(--yellow-wash); }
.placard-foot { border-top: var(--rule); padding: var(--s2) var(--s3); font-size: .85rem; color: var(--ink-2); display: flex; gap: var(--s3); flex-wrap: wrap; justify-content: space-between; }
.stamp { font-weight: 750; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; border: 1.5px solid var(--ink); padding: .1rem .4rem; color: var(--ink); }
.col-b { display: none; }
.placard.has-b .col-b { display: table-cell; }
.diff-up { color: var(--ink); }
.warn { color: var(--red); font-weight: 700; }

/* ---------- profile drawing (overlay, to scale) ---------- */
.profile { background: var(--paper); border: var(--rule-heavy); padding: var(--s3) var(--s3) var(--s4); margin: 0; }
@media (min-width: 861px) { .lead-grid > div:last-child { position: sticky; top: var(--s4); } }
.profile svg { width: 100%; height: auto; max-height: 26rem; }
.profile .t-main { fill: var(--ink); }
.profile .rim { fill: var(--paper); }
.profile .rim-line { fill: none; stroke: var(--hair); }
.profile .t-side { fill: #d9dcd6; stroke: var(--ink-2); stroke-width: 1; }
.profile .lbl { font: 600 12px var(--font-num); fill: var(--ink-2); }
.profile .lbl-main { fill: var(--ink); font-weight: 750; }
.profile .lbl-2 { font: 400 11px var(--font-num); fill: var(--ink-2); }
.profile .t-alt { fill: none; stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 4 3; }
.profile .t-cmp-halo { fill: none; stroke: var(--paper); stroke-width: 6; }
.profile .t-cmp-o { fill: rgba(36,91,143,.14); stroke: var(--blue); stroke-width: 2.5; }
.profile .t-cmp-rim { fill: none; stroke: var(--blue); stroke-width: 1; stroke-dasharray: 2 2; }
.profile .dim { stroke: var(--ink); stroke-width: 1.25; }
.profile .lead { stroke: var(--ink); stroke-width: .75; stroke-dasharray: 2 3; }
.profile .dimtxt { font: 600 13px var(--font-num); fill: var(--ink); }
.profile .ground { stroke: var(--ink); stroke-width: 2; }
.legend[hidden] { display: none; }
.legend { list-style: none; padding: 0; margin: var(--s3) 0 0; display: grid; gap: .35rem; font-size: .95rem; }
.legend li { display: flex; align-items: center; gap: var(--s2); max-width: none; }
.legend .sw { width: 1.4rem; height: .9rem; flex: none; }
.legend .lg-main .sw { background: var(--ink); }
.legend .lg-cmp .sw { background: rgba(36,91,143,.14); border: 2.5px solid var(--blue); }
.legend .lg-alt .sw { border: 1px dashed var(--ink-2); }
.legend .num { font-weight: 650; }
.legend .muted { font-weight: 400; color: var(--ink-2); margin-left: auto; }
.profile figcaption { font-size: .85rem; color: var(--ink-2); margin-top: var(--s3); border-top: var(--rule-hair); padding-top: var(--s2); }

@media (max-width: 560px) {
  .placard table { table-layout: fixed; }
  .placard th, .placard td { padding: .5rem .4rem; }
  .placard td { overflow-wrap: anywhere; }
  .placard tbody th { hyphens: manual; overflow-wrap: normal; }
  .placard thead th:nth-child(4), .placard td.d { width: 22%; }
  .placard table { font-size: .875rem; }
  .placard tbody th { width: 38%; font-size: .72rem; letter-spacing: .03em; }
  .placard .src { white-space: nowrap; font-size: .7rem; }
  .placard thead th { font-size: .7rem; letter-spacing: .03em; }
  .placard td.v small { display: block; font-size: .75rem; }
  .placard td.v { white-space: normal; }
  .placard td.v .iv { white-space: nowrap; }
  .placard-head .label { font-size: .72rem; }
  .band .wrap { gap: var(--s3); }
  .jump { flex: 1 1 100%; } .jump input { width: auto; flex: 1; min-width: 0; } .jump { min-width: 0; }
  .nav { margin-left: 0; gap: var(--s1) var(--s4); flex-wrap: wrap; width: 100%; }
  .nav a { white-space: nowrap; }
  h1 { font-size: 2rem; }
}
@media (max-width: 480px) {
  .col-w { display: none; }
  table.data { font-size: .84rem; }
  table.data th, table.data td { padding: .45rem .35rem; }
  table.data thead th { font-size: .78rem; white-space: normal; vertical-align: bottom; }
  .barcell { min-width: 4.25rem; }
}
/* ---------- compare box ---------- */
.compare { margin-top: var(--s5); display: grid; grid-template-columns: 1fr auto; gap: var(--s2); align-items: end; }
.compare .error { grid-column: 1 / -1; }
.calc { display: grid; grid-template-columns: 1fr 1fr auto; gap: var(--s3); align-items: end; margin: var(--s5) 0; }
@media (max-width: 640px) { .calc { grid-template-columns: 1fr; } .calc .btn { width: 100%; } }
.calc .error { grid-column: 1 / -1; }

/* ---------- data tables ---------- */
.table-wrap { overflow-x: auto; background: var(--paper); border: var(--rule); }
table.data { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.data th, table.data td { padding: .5rem var(--s3); border-bottom: var(--rule-hair); text-align: left; white-space: nowrap; }
table.data thead th { font-weight: 700; font-size: .85rem; border-bottom: var(--rule); position: sticky; top: 0; background: var(--paper); }
table.data td.n, table.data th.n { text-align: right; font-family: var(--font-num); font-variant-numeric: tabular-nums; }
table.data tr.self td { background: var(--yellow-wash); font-weight: 650; }
table.data tbody tr:hover td { background: #f6f7f4; }
table.data tr.self:hover td { background: var(--yellow-wash); }
.bar { display: inline-block; vertical-align: middle; height: .55rem; background: var(--ink); }
.bar.neg { background: var(--ink-2); }
.barcell { min-width: 9rem; }
.barcell .axis { position: relative; display: block; height: .7rem; }
.barcell .axis::before { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; border-left: 1px solid var(--ink-2); }
.barcell .axis span { position: absolute; top: .075rem; height: .55rem; background: var(--ink); }
.barcell .axis span.neg { background: var(--ink-2); }

[data-speedo] .table-wrap, [data-speedo] p { max-width: 40rem; }
/* ---------- size grid (packed cells) ---------- */
.rimgroup { margin-top: var(--s6); }
.rimgroup h2 { font-size: 1.125rem; margin: 0 0 var(--s2); display: flex; gap: var(--s3); align-items: baseline; }
.rimgroup h2 small { font-weight: 400; color: var(--ink-2); font-size: .875rem; }
.cells { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.25rem, 1fr)); padding: 1px 0 0 1px; }
.cells > * { background: var(--paper); border: var(--rule); margin: -1px 0 0 -1px; }
.cells a { display: grid; gap: .1rem; padding: .55rem .7rem; text-decoration: none; }
.cells a:hover { background: var(--yellow-wash); }
.cells a:focus-visible { outline-offset: -3px; }
.cells .c { font: 650 .98rem/1.2 var(--font-num); }
.cells .h { font: 400 .8rem/1.2 var(--font-num); color: var(--ink-2); }

/* ---------- prose blocks ---------- */
.answer { background: var(--paper); border: var(--rule); padding: var(--s4); max-width: 68ch; }
.faq dt { font-weight: 680; margin-top: var(--s5); }
.faq dd { margin: var(--s2) 0 0; max-width: 68ch; }
.sources { font-size: .9rem; }
.sources li { margin: var(--s2) 0; }
.pill-links { display: flex; flex-wrap: wrap; gap: var(--s2); padding: 0; list-style: none; }
.pill-links a { display: inline-block; border: var(--rule); background: var(--paper); padding: .35rem .65rem; text-decoration: none; font: 600 .9rem var(--font-ui); }
.pill-links a:hover { background: var(--yellow-wash); }

/* ---------- ads (only when configured) ---------- */
.ad { margin: var(--s7) 0; min-height: 280px; display: grid; place-items: center; }
.ad::before { content: "Advertisement"; display: block; font-size: .75rem; color: var(--ink-2); margin-bottom: var(--s1); }

/* ---------- footer ---------- */
footer.site { border-top: var(--rule-heavy); background: var(--paper); padding: var(--s6) 0 var(--s7); font-size: .925rem; }
footer.site .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: var(--s5); }
footer.site h2 { font-size: 1rem; margin: 0 0 var(--s2); }
footer.site ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s1); }
footer.site .credit { margin-top: var(--s6); color: var(--ink-2); }

/* ---------- consent banner ---------- */
.consent { position: fixed; inset: auto var(--s3) var(--s3) var(--s3); max-width: 34rem; margin-left: auto; background: var(--paper); border: var(--rule-heavy);
  padding: var(--s4); z-index: 20; box-shadow: 0 8px 24px rgba(29,31,34,.18); }
.consent p { margin: 0 0 var(--s3); font-size: .925rem; }
.consent .row { display: flex; gap: var(--s2); flex-wrap: wrap; }
.consent .btn.secondary { background: var(--paper); color: var(--ink); }

/* ---------- live update moment (the one motion) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .placard td.v.flash { animation: settle .6s cubic-bezier(.16,1,.3,1); }
  @keyframes settle { from { background: var(--yellow); } to { background: transparent; } }
  .profile .t-cmp { transition: transform .5s cubic-bezier(.16,1,.3,1); }
}
/* share bar */
.share-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); margin: var(--s5) 0; }
.share-bar[hidden] { display: none; }
.btn.ghost { background: transparent; color: var(--ink); padding: .55rem .9rem; font-size: .95rem; }
.btn.ghost:hover { background: var(--paper); }
.share-msg { font-size: .95rem; color: var(--ok); }
.print-only { display: none; }

/* print / save as PDF */
@page { margin: 12mm; }
@media print {
  .band, footer.site, .ad, .consent, .dev-banner, .skip, .crumbs, .share-bar, .rail, .related, .pill-links, .toc,
  .compare, form .btn, form button, .error { display: none !important; }
  html, body { background: #fff !important; font-size: 10pt; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; box-shadow: none !important; }
  .wrap { max-width: none; padding: 0; }
  .has-rail { display: block; }
  h1 { font-size: 20pt; margin: 0 0 4pt; }
  h2 { font-size: 13pt; margin-top: 12pt; break-after: avoid; }
  .lede { font-size: 11pt; margin: 4pt 0 8pt; }
  .lead-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12pt; }
  form.calc { display: flex; flex-wrap: wrap; gap: 4pt 12pt; border: 0; padding: 0; margin: 0 0 8pt; background: none; }
  form.calc fieldset { border: 0; padding: 0; margin: 0; }
  form.calc input, form.calc select { border: 0 !important; background: none !important; padding: 0; font-weight: 650; appearance: none; -webkit-appearance: none; }
  form.calc input:placeholder-shown { display: none; }
  form.calc .field:has(input:placeholder-shown), form.calc fieldset:not(:has(input:not(:placeholder-shown))) { display: none; }
  table, figure, .placard, .answer, svg { break-inside: avoid; }
  .table-wrap { overflow: visible !important; }
  .col-w { display: table-cell !important; }
  a { color: inherit; text-decoration: none; }
  .print-only { display: block; }
  /* tool, size and compare pages: print the result only (everything after the share bar except the print footer) */
  .share-bar ~ *:not(.print-foot), .print-cut ~ *:not(.print-foot) { display: none !important; }
  .gap-out .note, form.calc .hint { display: none !important; }
  table th, table td { padding-top: 3pt !important; padding-bottom: 3pt !important; }
  .share-bar ~ .print-foot { margin-top: 6pt; }
  .lead-grid h2 { margin-top: 8pt !important; }
  main, main .wrap { padding-top: 0 !important; padding-bottom: 0 !important; margin-top: 0 !important; }
  .lead-grid { margin-top: 0 !important; }
  .lead-grid .lede { font-size: 10pt; }
  .lead-grid svg, .wheelfig svg, [data-wheelfig] svg { max-height: 3.4in; }
  .print-foot { margin-top: 10pt; padding-top: 6pt; border-top: 1px solid #000; font-size: 9pt; }
  .sources { font-size: 8pt; }
  .sources li { margin-bottom: 2pt; }
  .guide, p, li { max-width: none; }
}

/* Phone: the 3% table must fit 358px without scrolling (placed last so it wins the cascade). */
@media (max-width: 480px) {
  table.data .barcell { min-width: 0; width: 4.5rem; }
  table.data th, table.data td { padding-left: .3rem; padding-right: .3rem; }
  table.data td.num { font-size: .8rem; }
}

/* ---------- guides ---------- */
.guide { max-width: 46rem; }
.guide .meta { font-size: .85rem; color: var(--ink-2); margin: calc(-1 * var(--s3)) 0 var(--s5); }
.guide h2 { scroll-margin-top: var(--s4); }
.toc { background: var(--paper); border: var(--rule); padding: var(--s3) var(--s4); margin: 0 0 var(--s5); }
.toc h2 { font-size: .8rem; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; margin: 0 0 var(--s2); }
.toc ol { margin: 0; padding-left: 1.25rem; columns: 2 16rem; column-gap: var(--s5); font-size: .95rem; }
.toc li { margin: .15rem 0; break-inside: avoid; }
sup.cite { font: 600 .68rem/0 var(--font-num); margin-left: .1em; }
sup.cite a { text-decoration: none; color: var(--blue); padding: 0 .1em; }
sup.cite a:hover { text-decoration: underline; }
sup.cite.sep::before { content: ","; color: var(--ink-2); }
.guide table.data thead th { white-space: normal; vertical-align: bottom; }
.guide table.data { font-size: .9rem; }

/* decode strip: a size or code split into labelled placard cells */
.decode { margin: var(--s5) 0; }
.decode-row { display: flex; flex-wrap: wrap; background: var(--paper); border: var(--rule-heavy); }
.decode .dc { flex: 1 1 auto; min-width: 5.5rem; display: grid; align-content: space-between; gap: var(--s2);
  padding: var(--s3) var(--s3) var(--s2); border-right: var(--rule-hair); border-bottom: var(--rule-hair); margin-bottom: -1px; }
.decode .dc:last-child { border-right: 0; }
.decode .dc-code { font: 700 clamp(1.25rem, 1rem + 1vw, 1.7rem)/1 var(--font-num); letter-spacing: -.02em; }
.decode .dc-label { font-size: .72rem; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); line-height: 1.25; }
.decode figcaption { font-size: .85rem; color: var(--ink-2); margin-top: var(--s2); }

ol.steps { list-style: none; counter-reset: step; padding: 0; margin: var(--s4) 0; }
ol.steps > li { counter-increment: step; position: relative; padding: .1rem 0 0 2.6rem; margin: 0 0 var(--s3); min-height: 1.9rem; }
ol.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 1.85rem; height: 1.85rem; display: grid; place-items: center;
  background: var(--ink); color: var(--paper); font: 700 .9rem/1 var(--font-num); }

blockquote.quote { margin: var(--s4) 0; padding: var(--s3) var(--s4); background: var(--paper); border-left: var(--rule-heavy); max-width: 68ch; }
blockquote.quote p { margin: 0; font-size: 1.02rem; }
blockquote.quote footer { margin-top: var(--s2); font-size: .82rem; color: var(--ink-2); }
.callout { background: var(--paper); border: var(--rule); border-left: var(--rule-heavy); padding: var(--s3) var(--s4); margin: var(--s4) 0; max-width: 68ch; }
table.data.text td { white-space: normal; vertical-align: top; }
table.data caption { caption-side: bottom; text-align: left; font-size: .82rem; color: var(--ink-2); padding-top: var(--s2); }
.table-wrap { margin: var(--s4) 0; }

.dotcode { display: grid; gap: var(--s2); background: var(--paper); border: var(--rule); padding: var(--s4); max-width: 30rem; margin: var(--s4) 0; }
.dotcode input { max-width: 9rem; letter-spacing: .12em; }
.dot-out { font: 600 1rem/1.4 var(--font-num); min-height: 1.4em; }
.dot-out .warn { font-family: var(--font-ui); }

.guide-list { list-style: none; padding: 0; display: grid; gap: 0; border-top: var(--rule); max-width: 46rem; }
.guide-list li { border-bottom: var(--rule-hair); padding: var(--s3) 0; max-width: none; }
.guide-list a { font-size: 1.08rem; }
.guide-list span { color: var(--ink-2); font-size: .95rem; }

/* ---------- sources, on every page ---------- */
.sources-block { margin-top: var(--s8); border-top: var(--rule-heavy); padding-top: var(--s2); max-width: 52rem; }
.sources-block h2 { margin-top: var(--s3); }
.sources-block ol.sources { padding-left: 1.6rem; }
.sources-block ol.sources li { padding-left: .2rem; overflow-wrap: anywhere; }
.sources-block ol.sources li::marker { font: 600 .85rem var(--font-num); }
.sources-block li:target { background: var(--yellow-wash); }
.sources-block .sec { color: var(--ink-2); }
.sources .hash { font-size: .78rem; word-break: break-all; }
@media (max-width: 480px) {
  .decode .dc { min-width: 4.6rem; padding: var(--s2); }
  .toc ol { columns: 1; }
}

/* speedometer mode and converter */
.speed-in { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); background: var(--paper); border: var(--rule); padding: var(--s3); margin: 0 0 var(--s3); max-width: 40rem; }
.speed-in label { font-weight: 600; }
.speed-in input { width: 5.5rem; font: 500 1.0625rem/1 var(--font-num); border: var(--rule); border-radius: 0; padding: .55rem .6rem; min-height: 2.6rem; }
.speed-in output { font-family: var(--font-num); flex-basis: 100%; }
.convert-out { background: var(--paper); border: var(--rule-heavy); padding: var(--s4); }
.cv-big { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.8rem); font-weight: 700; margin: 0 0 var(--s2); }
.convert-out .table-wrap { margin-bottom: 0; }
.convert-out table.data td:last-child, .convert-out table.data th:last-child { white-space: normal; }
.convert-out table.data th, .convert-out table.data td { padding-left: .5rem; padding-right: .5rem; }

/* wheel offset and re-gear tools */
.wheelcalc { display: grid; gap: var(--s3); }
.wheelcalc fieldset { border: var(--rule); background: var(--paper); margin: 0; padding: var(--s3); display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr); gap: var(--s2); }
.wheelcalc legend { font-weight: 750; font-size: .8rem; letter-spacing: .05em; text-transform: uppercase; padding: 0 .3rem; }
.wheelcalc fieldset:last-of-type legend { color: var(--blue); }
.gearcalc { display: grid; gap: var(--s3); }
.wheelfig .wf-a { fill: var(--ink); }
.wheelfig .wf-a-rim { fill: #d9dcd6; stroke: var(--ink-2); stroke-width: 1; }
.wheelfig .wf-b { fill: rgba(36,91,143,.14); stroke: var(--blue); stroke-width: 2.5; }
.wheelfig .wf-b-rim { fill: none; stroke: var(--blue); stroke-width: 1.25; stroke-dasharray: 3 2; }
.wheelfig .wf-face { stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 5 3; }
.wheel-placard { margin-top: var(--s5); }
.wheel-placard td.d small { display: block; color: var(--ink-2); font-family: var(--font-ui); }
.wheel-summary { font-size: 1.08rem; margin-top: var(--s3); max-width: 60ch; }
[data-gearcard] td.v { font-size: 1.15rem; }
[data-gearcard] tbody th { width: 52%; }
@media (max-width: 560px) { .wheelcalc fieldset { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .wheelcalc fieldset .field:first-of-type { grid-column: 1 / -1; } }
.wheel-placard td.v, .wheel-placard td.d, [data-gearcard] td.d { white-space: normal; overflow-wrap: anywhere; }
[data-gearcard] td.d { font-size: .85rem; color: var(--ink-2); }
@media (max-width: 560px) { .wheel-placard thead th:first-child, .wheel-placard tbody th { width: 34%; } .wheel-placard td.v { font-size: .8rem; } }
form.calc.wheelcalc { grid-template-columns: minmax(0, 1fr); align-items: stretch; }
form.calc.wheelcalc .btn { justify-self: start; min-width: 10rem; }
form.calc.gearcalc { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
form.calc.gearcalc .btn, form.calc.gearcalc .error { grid-column: 1 / -1; justify-self: start; }
form.calc.gearcalc .btn { min-width: 10rem; }
@media (max-width: 640px) { form.calc.wheelcalc .btn, form.calc.gearcalc .btn { justify-self: stretch; } }

/* plus-size finder and clearance */
select { font: 500 1rem/1 var(--font-ui); color: var(--ink); background: var(--paper); border: var(--rule); border-radius: 0; padding: 0 .6rem; min-height: 2.9rem; width: 100%; }
form.calc.plusform { grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)) auto; }
@media (max-width: 860px) { form.calc.plusform { grid-template-columns: repeat(2, minmax(0, 1fr)); } form.calc.plusform .btn { grid-column: 1 / -1; } }
.plus-head { font-size: 1.05rem; margin: var(--s4) 0 var(--s2); }
.wheelcalc fieldset.gaps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wheelcalc fieldset.gaps legend { color: var(--ink-2); text-transform: none; letter-spacing: 0; font-size: .85rem; font-weight: 650; }
@media (max-width: 560px) { .wheelcalc fieldset.gaps { grid-template-columns: minmax(0, 1fr); } }
.gap-out .warn { color: var(--red); font-weight: 700; }

/* tire pressure light and tread depth */
form.calc.tpmsform { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; }
form.calc.treadform { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
form.calc.treadform .btn, form.calc.treadform .error { grid-column: 1 / -1; justify-self: start; min-width: 10rem; }
@media (max-width: 640px) { form.calc.tpmsform, form.calc.treadform { grid-template-columns: minmax(0, 1fr); } form.calc.treadform .btn { justify-self: stretch; } }
.tpms-sum { font-size: 1.08rem; max-width: 60ch; }
[data-tcard] td.v, [data-rcard] td.v { font-size: 1.1rem; white-space: nowrap; }
[data-tcard] td.d, [data-rcard] td.d { font-size: .82rem; color: var(--ink-2); white-space: normal; }
[data-tcard] tbody th, [data-rcard] tbody th { width: 48%; }
td.warn { color: var(--red); font-weight: 700; }

/* related tools box, tools page and right rail */
.related { margin: var(--s6) 0; padding: var(--s4) var(--s5); border: var(--rule); border-top: var(--rule-heavy); background: var(--paper); }
.related h2 { margin: 0 0 var(--s3); font-size: 1.05rem; }
.related ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.related li { max-width: none; }
.related li a { font-weight: 650; }
.related li span { display: block; font-size: .9rem; color: var(--ink-2); }
.tool-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: var(--s3) var(--s5); }
.tool-list li { max-width: none; padding: var(--s3) 0; border-bottom: var(--rule-hair); }
.tool-list li span { display: block; color: var(--ink-2); font-size: .95rem; }
.has-rail .rail .related { margin-top: var(--s6); }
@media (min-width: 1200px) {
  .has-rail { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--s6); align-items: start; }
  .has-rail .rail { position: sticky; top: var(--s4); }
  .has-rail .rail .related { margin-top: var(--s5); }
}

/* free tools network */
.net-group { margin-top: var(--s7); }
.net-group h2 small { font: 500 .9rem var(--font-num); color: var(--ink-2); margin-left: var(--s2); }
.net-grid { list-style: none; padding: 0; margin: var(--s4) 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: var(--s4); }
.net-card { max-width: none; display: flex; gap: var(--s4); align-items: flex-start; background: var(--paper); border: var(--rule); padding: var(--s4); }
.net-ico { flex: none; width: 2.5rem; height: 2.5rem; padding: .45rem; background: var(--yellow); color: var(--ink); border: var(--rule); }
.net-card h3 { margin: 0; font-size: 1.02rem; line-height: 1.3; }
.net-card p { margin: var(--s1) 0 var(--s2); font-size: .93rem; color: var(--ink-2); }
.net-url { color: var(--blue); font-weight: 700; overflow-wrap: anywhere; }
.net-url:hover { text-decoration-thickness: 2px; }
