/* SparkyFits. Palette sampled from the Sparky artwork (src/assets/sparky/README.md):
   deep green #306046, body green #4E755B, cream #F9ECD7, amber #D49338.
   Contrast (WCAG AA): white on --green 7.3:1; --ink on --amber 5.9:1; --ink on --paper 14:1.
   Fonts shared with the family: Bricolage Grotesque, Figtree, IBM Plex Mono. */
:root {
  --green: #306046;
  --green-deep: #264D38;
  --green-soft: #E6EEE8;
  --green-body: #4E755B;
  --cream: #F9ECD7;
  --paper: #FDF8EF;
  --card: #FFFFFF;
  --amber: #D49338;
  --amber-hover: #C0822B;
  --ink: #1E2A24;
  --text: #2C3832;
  --muted: #5E6B64;
  --line: #E8DCC6;
  --font-head: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'Figtree', system-ui, -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 14px;
  --max: 1080px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--text); font: 17px/1.55 var(--font-body); }
h1, h2, h3 { font-family: var(--font-head); color: var(--ink); line-height: 1.15; }
h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin: 0 0 .4rem; }
h2 { font-size: 1.3rem; margin: 0 0 .75rem; }
h3 { font-size: 1.1rem; margin: 1.2rem 0 .5rem; }
a { color: var(--green); }
a:hover { color: var(--green-deep); }
code { font-family: var(--font-mono); font-weight: 600; font-size: .95em; color: var(--ink); }
img { max-width: 100%; height: auto; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 8px; background: var(--card); padding: 8px 12px; z-index: 10; }
.muted { color: var(--muted); }

/* Nav and footer */
.site-nav { background: var(--green); }
.nav-inner { max-width: var(--max); margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.logo { display: inline-flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font: 800 1.25rem var(--font-head); }
.logo-icon { border-radius: 8px; box-shadow: 0 0 0 2px var(--cream); }
.nav-links { list-style: none; display: flex; gap: 18px; margin: 0; padding: 0; }
.nav-links a { color: #fff; text-decoration: none; font-weight: 600; }
.nav-links a:hover { text-decoration: underline; color: #fff; }
.site-footer { background: var(--ink); color: #D9DED9; margin-top: 3rem; }
.site-footer a { color: #fff; }
.footer-inner { max-width: var(--max); margin: 0 auto; padding: 2rem 16px; display: grid; gap: 1.5rem; grid-template-columns: 2fr 1fr; }
.footer-heading { color: #fff; font-size: 1rem; }
.footer-links ul { list-style: none; padding: 0; margin: 0; line-height: 2; }
.footer-fine { font-size: .85rem; color: #AEB8B1; }
.footer-bottom { border-top: 1px solid #34413A; text-align: center; font-size: .85rem; padding: 1rem 16px; }
.site-footer .logo { color: #fff; }

/* Breadcrumb */
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 0 0; margin: 0; font-size: .9rem; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: var(--muted); }

/* Home */
.hero { background: var(--cream); border-bottom: 1px solid var(--line); }
.hero-inner { display: flex; align-items: center; gap: 24px; padding-top: 2rem; padding-bottom: 2rem; }
.hero-copy { flex: 1; min-width: 0; }
.lede { font-size: 1.1rem; margin: 0 0 1.2rem; }
.hero-sparky { flex: none; display: block; }
.hero-sparky img { display: block; }
.lookup { display: flex; gap: 8px; flex-wrap: wrap; }
.lookup input { flex: 1 1 240px; min-width: 0; font: 600 1.1rem var(--font-mono); padding: 12px 14px; border: 2px solid var(--green); border-radius: var(--radius); background: #fff; color: var(--ink); }
.btn-primary { background: var(--green); color: #fff; border: 0; border-radius: var(--radius); padding: 12px 20px; font: 700 1rem var(--font-body); cursor: pointer; }
.btn-primary:hover { background: var(--green-deep); }
.results { margin-top: 1rem; }
.results .empty { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px dashed var(--line); padding: 12px; border-radius: var(--radius); }
.results .empty p { margin: 0; }
.results .empty img { flex: none; width: 72px; height: auto; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 1.5rem 0; }
.tile { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-decoration: none; color: var(--ink); }
.tile strong { display: block; font-family: var(--font-head); font-size: 1.1rem; }
.tile span { color: var(--muted); font-size: .9rem; }
.model-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.model-list a { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; text-decoration: none; color: var(--text); }
.model-list strong { color: var(--ink); }

/* Machine and engine pages */
.mp { padding-top: 1rem; }
.mp-head { margin: .5rem 0 1rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .06em; font-size: .8rem; font-weight: 700; color: var(--green); margin: 0 0 .3rem; }
.meta { color: var(--muted); font-size: .92rem; margin: 0; }
.disclosure { font-size: .85rem; color: var(--muted); margin: 0 0 .75rem; }
.members { margin: 0 0 1rem; }
.members p { margin: 0 0 .4rem; }
.members ul { margin: 0; padding-left: 1.1rem; }
.serial-flag { background: #FFF4E0; border-left: 4px solid var(--amber); padding: 10px 12px; border-radius: 6px; }
.answer-card { background: var(--card); border: 2px solid var(--green); border-radius: var(--radius); padding: 16px; box-shadow: 0 10px 28px rgba(30,42,36,.07); }
.answer-top { display: flex; align-items: center; gap: 12px; margin-bottom: .5rem; }
.found-it img { display: block; height: 72px; width: auto; }
.about-sparky img, .empty-sparky img { display: block; margin: 0 auto 1rem; height: auto; }
.about-sparky img { margin-left: 0; }
.answer-top h2 { margin: 0; }
.parts-table { width: 100%; border-collapse: collapse; }
.parts-table th, .parts-table td { text-align: left; vertical-align: top; padding: 10px 6px; border-top: 1px solid var(--line); }
.parts-table thead th { border-top: 0; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding-top: 0; }
.parts-table tbody th { font-weight: 700; color: var(--ink); width: 28%; }
.parts-table td.buy { text-align: right; width: 1%; white-space: nowrap; }
.parts-table td.buy .btn-shop { white-space: nowrap; }
.pn code { white-space: nowrap; }
.pn, .qty, .size, .where { display: block; }
.where { font-weight: 500; font-size: .82rem; color: var(--amber-hover); }
.size, .qty { color: var(--muted); font-size: .92rem; }
.pn-link { font-size: .8rem; margin-left: 4px; }
.btn-shop { display: inline-block; background: var(--amber); color: var(--ink); font-weight: 700; text-decoration: none; padding: 8px 14px; border-radius: 999px; }
.btn-shop:hover { background: var(--amber-hover); color: var(--ink); }
.tuneup { margin: .8rem 0 0; }
.btn-tuneup { display: inline-block; background: var(--green); color: #fff; font-weight: 700; text-decoration: none; padding: 10px 16px; border-radius: 999px; }
.btn-tuneup:hover { background: var(--green-deep); color: #fff; }
.mp-section { margin-top: 2rem; }
.spec-list { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.spec-list dt { font-weight: 700; color: var(--ink); }
.spec-list dd { margin: 0; }
.sources ul { padding-left: 1.1rem; font-size: .92rem; }
.sources li { margin-bottom: .3rem; overflow-wrap: anywhere; }
.shared { padding-left: 1.1rem; }
.prose { max-width: 720px; }
.empty-state { text-align: center; padding: 3rem 16px; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero-sparky { display: none; }
  .footer-inner { grid-template-columns: 1fr; }
  .parts-table thead { display: none; }
  .parts-table tr { display: grid; grid-template-columns: 1fr auto; border-top: 1px solid var(--line); padding: 8px 0; }
  .parts-table th, .parts-table td { border-top: 0; padding: 2px 4px; }
  .parts-table tbody th { width: auto; grid-column: 1 / -1; }
  .parts-table td.buy { grid-column: 1 / -1; text-align: left; padding-top: 6px; }
  .spec-list { grid-template-columns: 1fr; }
  .spec-list dd { margin-bottom: 6px; }
}
