:root {
  --bg: #f7f5f0;
  --surface: #ffffff;
  --surface-2: #f0ede5;
  --ink: #1d1f22;
  --ink-2: #4a4f57;
  --muted: #5f646c;
  --line: #e2ded4;
  --accent: #d9480f;
  --accent-ink: #b33a0b;
  --accent-soft: #fdebe2;
  --logo: #d9480f; --logo-spine: #9c330a; --logo-ribbon: #2b6cb0;
  --ok: #2b8a3e;
  --ok-soft: #e6f4ea;
  --warn: #b26a00;
  --warn-soft: #fff4dc;
  --danger: #c92a2a;
  --danger-soft: #fdeaea;
  --info-soft: #e8f0fb;
  --info: #1c5fb8;
  --mark: #ffe58f;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.05);
  --radius: 14px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Space Grotesk", var(--font);
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131416;
    --surface: #1b1d20;
    --surface-2: #23262a;
    --ink: #eceae6;
    --ink-2: #c3c2bd;
    --muted: #8f9399;
    --line: #2e3136;
    --accent: #ff7a3d;
    --accent-ink: #ff9a6a;
    --accent-soft: #3a2116; --logo: #ff7a3d; --logo-spine: #c4501f; --logo-ribbon: #5b9be0;
    --ok: #69db7c; --ok-soft: #1a2e1f;
    --warn: #ffc14d; --warn-soft: #33290f;
    --danger: #ff8787; --danger-soft: #3a1b1b;
    --info: #74a8ff; --info-soft: #172338;
    --mark: #6b5400;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.65 var(--font); -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-ink); text-underline-offset: 2px; }
a:hover { color: var(--accent); }
img { max-width: 100%; }
mark { background: var(--mark); color: inherit; border-radius: 3px; padding: 0 2px; }
code, kbd { font-family: var(--mono); font-size: .88em; background: var(--surface-2); padding: .1em .35em; border-radius: 5px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.2; letter-spacing: -.01em; text-wrap: balance; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- header / footer ---------- */
#site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); font-family: var(--display); font-weight: 700; font-size: 1.28rem; letter-spacing: -.01em; }
.brand-mark { display: grid; }
.brand-mark svg { display: block; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--ink-2); padding: 8px 12px; border-radius: 999px; font-weight: 500; font-size: .95rem; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a.active { background: var(--ink); color: var(--bg); }
@media (max-width: 640px) {
  .header-inner { height: auto; padding-top: 10px; padding-bottom: 10px; flex-direction: column; align-items: flex-start; gap: 6px; }
  .nav a { padding: 6px 10px; font-size: .9rem; }
  .brand { font-size: 1.15rem; }
  .brand-mark svg { width: 38px; height: 38px; }
  html { scroll-padding-top: 130px; }
}

#site-footer { border-top: 1px solid var(--line); margin-top: 80px; padding: 40px 0 56px; background: var(--surface); }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; }
.footer-inner p { margin: .4em 0; color: var(--ink-2); }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 720px) { .footer-inner { grid-template-columns: 1fr; } }

/* ---------- hero + search ---------- */
.hero { padding: 64px 0 28px; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); background: var(--accent-soft); padding: 4px 10px; border-radius: 999px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); margin: 16px 0 12px; max-width: 18ch; }
.hero p.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 60ch; margin: 0 0 28px; }

.searchbox { position: relative; max-width: 720px; }
.searchbox input {
  width: 100%; font: inherit; font-size: 1.08rem; padding: 16px 18px 16px 50px;
  border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow); outline: none; transition: border-color .15s;
}
.searchbox input:focus { border-color: var(--accent); }
.searchbox svg { position: absolute; left: 17px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-hints { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .9rem; color: var(--muted); }
.chip {
  font: inherit; font-size: .88rem; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  padding: 5px 12px; border-radius: 999px; cursor: pointer; text-decoration: none; transition: all .12s;
}
.chip:hover { border-color: var(--ink-2); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }

.results { margin-top: 18px; max-width: 720px; display: grid; gap: 8px; }
.result { display: block; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.result:hover { border-color: var(--accent); }
.result .r-title { font-weight: 600; }
.result .r-sub { font-size: .85rem; color: var(--muted); }
.result .r-snip { font-size: .9rem; color: var(--ink-2); margin-top: 4px; }
.r-kind { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--accent-ink); margin-right: 6px; }

/* ---------- vehicle picker ---------- */
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 48px 0 16px; }
.section-head h2 { margin: 0; font-size: 1.6rem; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.year-input { font: inherit; width: 130px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.year-input:focus { outline: none; border-color: var(--accent); }

.rule-note { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; color: var(--ink-2); font-size: .95rem; }

.make-group { margin-top: 28px; }
.make-group h3 { font-size: 1.05rem; margin: 0 0 10px; color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.card {
  position: relative; display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow);
  transition: transform .12s, border-color .12s;
}
.card:hover { transform: translateY(-2px); border-color: var(--accent); }
.card .years { font-family: var(--display); font-size: 1.5rem; font-weight: 700; }
.card .name { font-weight: 600; }
.card .codes { font-family: var(--mono); font-size: .8rem; color: var(--ink-2); }
.card .blurb { font-size: .9rem; color: var(--muted); flex: 1; }
.badge { align-self: flex-start; font-size: .75rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.soon { background: var(--surface-2); color: var(--muted); }
.card.has-guide { border-width: 1.5px; border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); }
.empty { padding: 24px; text-align: center; color: var(--muted); }

/* ---------- guide page ---------- */
.crumbs { font-size: .9rem; color: var(--muted); margin: 24px 0 0; }
.crumbs a { color: var(--muted); }
.guide-hero { padding: 12px 0 8px; }
.guide-hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin: 8px 0; }
.guide-hero .meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--ink-2); font-size: .95rem; }
.guide-hero .meta span b { color: var(--ink); }

.spec-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 22px 0 6px; }
.spec { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.spec .k { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.spec .v { font-weight: 600; font-size: 1.02rem; }
.spec .v small { font-weight: 400; color: var(--muted); }

.layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 40px; margin-top: 28px; }
@media (max-width: 960px) { .layout { grid-template-columns: 1fr; } .toc { position: static !important; max-height: none !important; } .toc-list { display: none; } .toc.open .toc-list { display: block; } .toc-toggle { display: flex !important; } }
.toc { position: sticky; top: 84px; align-self: start; max-height: calc(100vh - 100px); overflow: auto; padding-bottom: 20px; }
.toc-toggle { display: none; width: 100%; justify-content: space-between; align-items: center; font: inherit; font-weight: 600; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; }
.toc .tools { display: grid; gap: 10px; margin-bottom: 18px; }
.toc input { width: 100%; font: inherit; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.toc input:focus { outline: none; border-color: var(--accent); }
.toc-cat { font-size: .74rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; color: var(--muted); margin: 16px 0 4px; }
.toc-list a { display: block; text-decoration: none; color: var(--ink-2); font-size: .92rem; padding: 4px 10px; border-left: 2px solid var(--line); }
.toc-list a:hover { color: var(--ink); border-left-color: var(--ink-2); }
.toc-list a.current { color: var(--accent-ink); border-left-color: var(--accent); font-weight: 600; }

.cat-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.cat-heading { font-size: 1.05rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-ink); margin: 48px 0 0; padding-bottom: 8px; border-bottom: 2px solid var(--accent); }
.cat-heading:first-child { margin-top: 0; }

.g-section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-top: 16px; box-shadow: var(--shadow); }
.g-section h2 { font-size: 1.35rem; margin: 0 0 4px; display: flex; align-items: center; gap: 8px; }
.g-section h2 .anchor { opacity: 0; text-decoration: none; color: var(--muted); font-size: 1rem; transition: opacity .1s; }
.g-section:hover h2 .anchor { opacity: 1; }
.g-section h3 { font-size: 1.05rem; margin: 20px 0 6px; }
.g-section p { margin: .6em 0; }
.g-section ul, .g-section ol { padding-left: 1.3em; margin: .6em 0; }
.g-section li { margin: .25em 0; }
.g-section .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.g-section .tag { font-size: .72rem; color: var(--muted); background: var(--surface-2); padding: 2px 8px; border-radius: 999px; }
@media (max-width: 560px) { .g-section { padding: 18px 16px; } }

.table-wrap { overflow-x: auto; margin: 12px 0; border: 1px solid var(--line); border-radius: 10px; }
table { border-collapse: collapse; width: 100%; font-size: .93rem; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--surface-2); font-weight: 600; font-size: .85rem; }
tr:last-child td { border-bottom: 0; }
td.num { font-family: var(--mono); font-size: .88rem; white-space: nowrap; }

.callout { border-radius: 10px; padding: 12px 14px 12px 44px; margin: 14px 0; position: relative; font-size: .95rem; }
.callout::before { position: absolute; left: 14px; top: 11px; font-size: 1.05rem; }
.callout.warn { background: var(--warn-soft); } .callout.warn::before { content: "⚠️"; }
.callout.danger { background: var(--danger-soft); } .callout.danger::before { content: "⛔"; }
.callout.tip { background: var(--ok-soft); } .callout.tip::before { content: "💡"; }
.callout.note { background: var(--info-soft); } .callout.note::before { content: "ℹ️"; }
.callout p:first-child { margin-top: 0; } .callout p:last-child { margin-bottom: 0; }

.parts { display: grid; gap: 8px; margin: 12px 0; }
.part { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 10px 12px; background: var(--surface-2); border-radius: 10px; font-size: .93rem; }
.part b { font-weight: 600; }
@media (max-width: 560px) { .part { grid-template-columns: 1fr; gap: 2px; } }

.source {
  margin-top: 18px; padding-top: 12px; border-top: 1px dashed var(--line);
  display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-size: .85rem; color: var(--muted);
}
.source .who a { font-weight: 600; }
.source .suggest { margin-left: auto; }

.coming { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; margin-top: 28px; }
.coming h2 { margin-top: 0; }
.btn { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-weight: 600; text-decoration: none; background: var(--accent); color: #fff !important; padding: 10px 18px; border-radius: 999px; border: 0; cursor: pointer; }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--ink) !important; border: 1px solid var(--line); }

/* ---------- prose pages ---------- */
.prose { max-width: 720px; }
.prose h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin: 40px 0 12px; }
.prose h2 { margin-top: 40px; font-size: 1.5rem; }
.prose p, .prose li { font-size: 1.06rem; color: var(--ink-2); }
.pill-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 20px 0; }
.pill { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.pill b { display: block; margin-bottom: 4px; font-size: 1rem; color: var(--ink); }
.pill span { font-size: .93rem; color: var(--muted); }
.contact-box { background: var(--accent-soft); border-radius: var(--radius); padding: 24px; margin: 20px 0; }
.contact-box .email { font-family: var(--display); font-size: 1.4rem; font-weight: 700; }

.credit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 16px; }
.credit { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.credit .n { font-weight: 700; font-size: 1.05rem; }
.credit .r { font-size: .9rem; color: var(--ink-2); margin: 4px 0 8px; }
.credit .s { font-size: .82rem; color: var(--muted); }
.credit.featured { grid-column: 1 / -1; border-color: var(--accent); background: linear-gradient(135deg, var(--accent-soft), var(--surface) 70%); }

@media print {
  #site-header, #site-footer, .toc, .cat-chips, .source .suggest, .anchor { display: none !important; }
  .layout { display: block; }
  .g-section { box-shadow: none; break-inside: avoid-page; }
  body { background: #fff; }
}

/* ---------- photos ---------- */
.photo { margin: 0; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.photo img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; background: var(--surface-2); }
.photo figcaption { padding: 8px 12px 10px; font-size: .88rem; color: var(--ink-2); display: grid; gap: 2px; }
.photo figcaption small { font-size: .75rem; color: var(--muted); }
.photo figcaption small a { color: inherit; }
.hero-photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 16px 0 4px; max-width: 760px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 14px 0 4px; }
.photo-links { margin: 14px 0 4px; padding: 10px 14px; border: 1px dashed var(--line); border-radius: 12px; font-size: .92rem; }
.photo-links ul { margin: 4px 0 0; }
@media print { .photo-grid, .hero-photos { grid-template-columns: repeat(3, 1fr); } }

/* keep long tables/code from stretching the guide column on phones */
.layout > * { min-width: 0; }

/* "archived" = Wayback Machine copy of a source */
a.archived { font-size: .72rem; font-weight: 500; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 6px; text-decoration: none; white-space: nowrap; vertical-align: 1px; }
a.archived:hover { color: var(--ink); border-color: var(--ink-2); }

/* photos placed inside the step text (Rob Robinette-style) */
.photo.inline { max-width: 640px; margin: 14px 0 18px; }
.photo.inline img { aspect-ratio: auto; object-fit: contain; max-height: 520px; background: var(--surface-2); }
.photo.inline + .photo.inline { margin-top: -6px; }

/* vehicle photo on home-page cards */
.card-photo { display: block; margin: -18px -18px 6px; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; background: var(--surface-2); }
.card-photo img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.card-photo small { display: block; padding: 4px 18px 0; font-size: .68rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* YouTube videos inside a section (thumbnail first, player loads on click) */
.videos { margin: 16px 0 6px; }
.videos-head { display: block; font-size: .92rem; margin-bottom: 8px; }
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.video { margin: 0; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.video-play, .video iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; padding: 0; background: #000; cursor: pointer; position: relative; }
.video-play img { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-btn { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%); width: 56px; height: 40px; border-radius: 10px; background: rgba(220, 30, 30, .92); color: #fff; display: grid; place-items: center; font-size: 18px; }
.video-play:hover .video-btn, .video-play:focus-visible .video-btn { background: #e00; }
.video figcaption { padding: 8px 12px 10px; font-size: .86rem; display: grid; gap: 2px; }
.video figcaption a { color: var(--ink); text-decoration: none; }
.video figcaption a:hover { text-decoration: underline; }
.video figcaption small { font-size: .75rem; color: var(--muted); }
.video figcaption small a { color: inherit; }
@media print { .videos { display: none; } }

/* guide hero tools */
.guide-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 0; }

/* service log */
.log-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 12px; margin: 10px 0 14px; }
.log-head h1 { margin: 0; }
.log-head p { margin: 4px 0 0; }
.log-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.log-actions .btn { padding: 8px 14px; font-size: .9rem; }
.card-like { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.log-truck { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.log-truck label, .log-form label { display: grid; gap: 4px; font-size: .88rem; font-weight: 600; color: var(--ink-2); }
.log-truck input, .log-form input[type=text], .log-form input[type=number], .log-form input[type=date], .log-form textarea {
  font: inherit; font-weight: 400; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; width: 100%; }
.log-form { display: grid; gap: 12px; }
.log-form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.log-form fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 0; }
.log-form legend { font-size: .88rem; font-weight: 600; color: var(--ink-2); padding: 0 4px; }
.log-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 14px; }
.log-form label.check { display: flex; align-items: center; gap: 8px; font-weight: 400; color: var(--ink); }
.log-form .btn { justify-self: start; }
.log-table td { vertical-align: top; }
.status-pill { display: inline-block; font-size: .78rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.status-pill.ok { background: var(--ok-soft); color: var(--ok); }
.status-pill.soon { background: var(--warn-soft); color: var(--ink); }
.status-pill.due { background: var(--danger-soft); color: var(--ink); }
.link-btn { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; font-size: .85rem; }
@media print {
  .no-print, #site-header, #site-footer, .guide-actions { display: none !important; }
  .status-pill { border: 1px solid #999; }
}

/* search results extras */
.r-count { font-size: .8rem; color: var(--muted); margin: 2px 2px 0; }
.r-note { font-size: .9rem; color: var(--ink-2); background: var(--info-soft); border-radius: 10px; padding: 8px 12px; }
.r-kind.spec { color: var(--ok); }
.r-kind.vehicle { color: var(--ink-2); }
.r-more { justify-self: start; }
.result mark { background: color-mix(in srgb, var(--accent) 28%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }

/* contribute form */
.contribute-form { max-width: 760px; margin-top: 8px; }
.contribute-form select { font: inherit; font-weight: 400; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; width: 100%; }
.contribute-form .opt { font-weight: 400; color: var(--muted); font-size: .8rem; }
.contribute-form label.consent { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; color: var(--ink); }
.contribute-form label.consent input { margin-top: 4px; }
.contribute-form .hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.form-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.form-actions .btn[disabled] { opacity: .5; cursor: not-allowed; }
#form-msg.ok { color: var(--ok); font-weight: 600; }
#form-msg.err { color: var(--danger, #d33); font-weight: 600; }
.contribute-form input[type=url], .contribute-form input[type=email] {
  font: inherit; font-weight: 400; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; width: 100%; }
.contribute-form label .opt { margin-left: 4px; }
.contribute-form label:has(> .opt) { grid-template-columns: auto 1fr; align-items: baseline; }
.contribute-form label:has(> .opt) > input, .contribute-form label:has(> .opt) > textarea, .contribute-form label:has(> .opt) > select { grid-column: 1 / -1; }

/* ---------- maker colors (home page) ----------
   One color per maker, chosen so no two look alike (colors only, no logos). */
.brand-honda      { --b1: #cc0000; --b2: #cc0000; }
.brand-subaru     { --b1: #c9971c; --b2: #c9971c; }
.brand-suzuki     { --b1: #1b3a7a; --b2: #1b3a7a; }
.brand-daihatsu   { --b1: #1e6b3a; --b2: #1e6b3a; }
.brand-mitsubishi { --b1: #5b2a86; --b2: #5b2a86; }
.brand-mazda      { --b1: #e8740c; --b2: #e8740c; }
/* dark mode: lift the dark colors so they show on dark cards */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand-suzuki     { --b1: #4a72c4; --b2: #4a72c4; }
  :root:not([data-theme="light"]) .brand-daihatsu   { --b1: #2f9a57; --b2: #2f9a57; }
  :root:not([data-theme="light"]) .brand-mitsubishi { --b1: #8c5cc4; --b2: #8c5cc4; }
  :root:not([data-theme="light"]) .brand-subaru     { --b1: #e0b13a; --b2: #e0b13a; }
}
:root[data-theme="dark"] .brand-suzuki     { --b1: #4a72c4; --b2: #4a72c4; }
:root[data-theme="dark"] .brand-daihatsu   { --b1: #2f9a57; --b2: #2f9a57; }
:root[data-theme="dark"] .brand-mitsubishi { --b1: #8c5cc4; --b2: #8c5cc4; }
:root[data-theme="dark"] .brand-subaru     { --b1: #e0b13a; --b2: #e0b13a; }

.make-group h3 { display: flex; align-items: center; gap: 10px; }
.brand-bar { display: inline-block; width: 28px; height: 10px; border-radius: 3px;
  background: linear-gradient(90deg, var(--b1) 0 55%, var(--b2) 55% 100%); }
.make-group { padding-left: 14px; border-left: 4px solid var(--b1); }
.brand-card { position: relative; overflow: hidden; }
.brand-card::before { content: ""; position: absolute; z-index: 2; left: 0; right: 0; top: 0; height: 6px;
  background: linear-gradient(90deg, var(--b1) 0 70%, var(--b2) 70% 100%); }
.brand-card:hover { border-color: var(--b1); }
.chip.brand::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 1px;
  background: linear-gradient(90deg, var(--b1) 0 50%, var(--b2) 50% 100%); }
.chip.brand[aria-pressed="true"] { box-shadow: inset 0 -3px 0 var(--b1); }
@media (max-width: 640px) { .make-group { padding-left: 10px; border-left-width: 3px; } }

/* maker color on truck pages (guide + service log) */
.brand-honda, .brand-daihatsu, .brand-mitsubishi, .brand-suzuki, .brand-mazda { --b-ink: #fff; }
.brand-subaru { --b-ink: #2a1f00; }
.brand-page .brand-tag { display: inline-block; margin-top: 12px; padding: 3px 12px; border-radius: 999px; background: var(--b1); color: var(--b-ink);
  font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.brand-page .guide-hero h1 { border-left: 6px solid var(--b1); padding-left: 14px; }
.brand-page .spec { border-top: 3px solid var(--b1); }
.brand-page .cat-heading { border-bottom-color: var(--b1); }
.brand-page .toc-list a.current { border-left-color: var(--b1); }
.brand-page .g-section { border-top: 3px solid var(--b1); }
.brand-page .log-head h1 { border-left: 6px solid var(--b1); padding-left: 14px; }
.brand-page .card-like { border-top: 3px solid var(--b1); }
/* home cards: outline in the maker's color (replaces the green "has guide" outline) */
.card.brand-card, .card.brand-card.has-guide { border: 1.5px solid var(--b1); }
.log-title { display: flex; align-items: center; gap: 16px; }
.log-thumb { width: 120px; height: 80px; object-fit: cover; border-radius: 10px; border: 2px solid var(--b1, var(--line)); flex: none; }
.brand-page .log-title h1 { margin-top: 4px; }
@media (max-width: 480px) { .log-thumb { width: 84px; height: 56px; } }
@media print { .log-thumb { display: none; } }
.brand-page .log-title h1 { border-left: 0; padding-left: 0; }
.brand-page .log-title .brand-tag { margin-top: 0; }
.log-form .opt { font-weight: 400; color: var(--muted); font-size: .8rem; margin-left: 4px; }
.log-form label:has(> .opt) { grid-template-columns: auto 1fr; align-items: baseline; }
.log-form label:has(> .opt) > input, .log-form label:has(> .opt) > select, .log-form label:has(> .opt) > textarea { grid-column: 1 / -1; }
.log-form select { font: inherit; font-weight: 400; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; width: 100%; }

/* what's new */
.wn-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin: 10px 0 6px; }
.wn-filters label { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .9rem; color: var(--ink-2); }
.wn-filters select { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; }
.wn-month { font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); margin: 30px 0 8px; }
.wn-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin: 10px 0; }
.wn-item h3 { margin: 4px 0 4px; font-size: 1.1rem; }
.wn-item h3 a { color: var(--ink); }
.wn-item p { margin: 0 0 8px; color: var(--ink-2); }
.wn-meta { display: flex; gap: 10px; align-items: center; font-size: .82rem; color: var(--muted); }
.wn-type { font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-size: .72rem; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.wn-type.feature { background: var(--info-soft); }
.wn-type.tips { background: var(--ok-soft); color: var(--ink); }
.wn-type.guide { background: var(--accent-soft); color: var(--accent-ink); }
.wn-type.fix { background: var(--warn-soft); }
.wn-trucks { display: flex; flex-wrap: wrap; gap: 6px; }
.wn-truck { font-size: .78rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; border: 1.5px solid var(--b1, var(--line)); color: var(--ink-2); }
.wn-truck.all { border-color: var(--line); }
/* guide "updated" box */
details.updated { margin: 14px 0 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; max-width: 760px; }
details.updated summary { cursor: pointer; font-weight: 600; font-size: .92rem; }
details.updated ul { margin: 8px 0 4px; padding-left: 18px; font-size: .9rem; }
details.updated li { margin: 4px 0; }
/* subscribe */
.sub-make { border-left: 4px solid var(--b1); padding: 4px 0 6px 12px; margin: 8px 0; }
.sub-make > b { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.feed-list { columns: 2; padding-left: 18px; }
@media (max-width: 640px) { .feed-list { columns: 1; } }
/* support / donate */
.support { margin: 28px 0 8px; max-width: 760px; }
.support h2 { margin-top: 0; }
.support-buttons { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- accessibility ---------- */
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 10px; font-weight: 700; text-decoration: none; }
.skip-link:focus { top: 12px; }
main:focus { outline: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.btn:focus-visible, .chip:focus-visible, .card:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .card:hover { transform: none; }
}
/* button contrast (WCAG AA): darker orange with white text in light mode, light orange with dark text in dark mode */
:root { --btn-bg: #b83c0b; --btn-ink: #ffffff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --btn-bg: #ff8a52; --btn-ink: #1d0d04; } }
:root[data-theme="dark"] { --btn-bg: #ff8a52; --btn-ink: #1d0d04; }
.btn:not(.ghost) { background: var(--btn-bg); color: var(--btn-ink) !important; }
