:root {
  --ink: #15191e;
  --ink-2: #353b42;
  --muted: #646b74;
  --line: #d8d8d1;
  --line-2: #ebebe5;
  --bg: #ffffff;
  --panel: #f5f5f0;
  --panel-2: #fafaf7;
  --accent: #f2b705;
  --accent-ink: #1f1700;
  --link: #0a57b5;
  --link-hover: #073f84;
  --ok: #1d7a3b;
  --ok-bg: #eaf5ec;
  --warn: #a8261d;
  --warn-bg: #fbecea;
  --radius: 4px;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.5 var(--sans);
}
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -0.005em; }
h1 { font-size: 28px; font-weight: 700; }
h2 { font-size: 20px; font-weight: 600; }
h3 { font-size: 16px; font-weight: 600; }
p { margin: 0 0 .75em; }
.mono, code { font-family: var(--mono); }
.muted { color: var(--muted); font-weight: 400; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 50; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }

/* Header */
.site-header { border-top: 4px solid var(--accent); background: var(--bg); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.bar { display: flex; align-items: center; gap: 20px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); flex: none; }
.brand:hover { text-decoration: none; color: var(--ink); }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; background: var(--ink); color: var(--accent); font: 700 15px/1 var(--mono); border-radius: var(--radius); letter-spacing: .02em; }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-weight: 700; font-size: 19px; line-height: 1.1; }
.brand-tag { font-size: 12px; color: var(--muted); }
.search { flex: 1; display: flex; max-width: 680px; }
.search input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid #b9b9b1; border-right: 0; border-radius: var(--radius) 0 0 var(--radius); font: inherit; background: #fff; }
.search input:focus { outline: none; border-color: var(--link); box-shadow: inset 0 0 0 1px var(--link); }
.search button { height: 40px; padding: 0 16px; border: 1px solid var(--ink); background: var(--ink); color: #fff; font: 600 14px var(--sans); border-radius: 0 var(--radius) var(--radius) 0; cursor: pointer; }
.search button:hover { background: #000; }
.quote-btn { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border: 1px solid var(--ink); border-radius: var(--radius); color: var(--ink); font-weight: 600; }
.quote-btn:hover { text-decoration: none; background: var(--panel); color: var(--ink); }
.count { min-width: 24px; height: 22px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 11px; background: var(--line-2); color: var(--ink); font: 600 12px var(--mono); transition: background-color .2s ease, transform .2s ease; }
.count.has { background: var(--accent); color: var(--accent-ink); }
.count.bump { transform: scale(1.18); }
.subnav { background: var(--panel); border-top: 1px solid var(--line-2); }
.subnav-inner { display: flex; gap: 22px; flex-wrap: wrap; padding-top: 7px; padding-bottom: 7px; font-size: 14px; }
.subnav a { color: var(--ink-2); }
.subnav a:hover { color: var(--link); }
.subnav-phone { margin-left: auto; font-weight: 600; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 16px; border-radius: var(--radius); border: 1px solid var(--ink); background: var(--ink); color: #fff; font: 600 14px var(--sans); cursor: pointer; white-space: nowrap; }
.btn:hover { background: #000; color: #fff; text-decoration: none; }
.btn.ghost { background: #fff; color: var(--ink); }
.btn.ghost:hover { background: var(--panel); color: var(--ink); }
.btn.small { height: 32px; padding: 0 12px; font-size: 13px; }
.btn.big { height: 48px; padding: 0 28px; font-size: 16px; }
.btn[disabled] { opacity: .55; cursor: progress; }
.link-btn { background: none; border: 0; padding: 0; color: var(--link); font: inherit; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }

/* Home */
.hero { background: var(--panel-2); border-bottom: 1px solid var(--line-2); }
.lede { font-size: 17px; color: var(--ink-2); max-width: 62ch; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.side-h { font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.side-h + p { margin-bottom: 16px; }
.resume { margin-top: 20px; padding: 12px 14px; border: 1px solid var(--line); background: #fff; border-radius: var(--radius); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.directory, .platforms, .how, .recent { padding-top: 32px; }
.dir-grid { columns: 3 300px; column-gap: 32px; }
.dir-cat { break-inside: avoid; margin-bottom: 22px; }
.dir-cat h3 { font-size: 16px; margin-bottom: 4px; }
.dir-cat h3 a { color: var(--ink); }
.dir-cat h3 a:hover { color: var(--link); }
.dir-cat ul { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.dir-cat li { padding: 1px 0; }
.dir-count { font-size: 12px; color: var(--muted); margin: 4px 0 0; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { display: inline-block; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); font-size: 14px; background: #fff; }
.chips a:hover { border-color: var(--ink); color: var(--ink); text-decoration: none; }
.steps { margin: 0; padding-left: 22px; max-width: 760px; }
.steps li { margin-bottom: 10px; }
.recent-row { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.recent-row .pn { font-family: var(--mono); font-size: 13px; color: var(--ink-2); }

/* Custom add */
.custom-add { margin-top: 36px; margin-bottom: 40px; padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); }
.custom-add h2 { font-size: 18px; }
.custom-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.custom-form .field { margin: 0; }
.custom-form .grow { flex: 1 1 260px; }
.custom-form .qty input { width: 80px; }

/* Fields */
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.req { font-weight: 400; color: var(--muted); font-size: 12px; }
input[type=text], input[type=search], input[type=email], input[type=tel], input[type=number], input[type=date], input:not([type]), select, textarea {
  font: inherit; color: var(--ink); background: #fff; border: 1px solid #c4c4bc; border-radius: var(--radius); padding: 8px 10px; min-height: 38px; width: 100%;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--link); box-shadow: 0 0 0 1px var(--link); }
input.invalid, textarea.invalid { border-color: var(--warn); box-shadow: 0 0 0 1px var(--warn); }
.hint { font-size: 13px; color: var(--muted); }
label.inline { display: inline-flex; align-items: center; gap: 6px; margin-left: 10px; color: var(--ink-2); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Category pages */
.crumbs { padding-top: 14px; font-size: 13px; color: var(--muted); }
.cat-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px; padding-top: 12px; }
.cat-aside { position: sticky; top: 120px; align-self: start; max-height: calc(100vh - 136px); overflow: auto; font-size: 14px; padding-bottom: 20px; }
.aside-block { margin-bottom: 22px; }
.aside-h { font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 6px; }
.aside-note { font-size: 12px; color: var(--muted); margin-top: 6px; }
.fit-list, .cat-nav { list-style: none; margin: 0 0 6px; padding: 0; }
.fit-list label { display: flex; gap: 8px; align-items: center; padding: 2px 0; cursor: pointer; }
.cat-nav li { padding: 3px 0; }
.cat-nav a { color: var(--ink-2); }
.cat-nav .current > a { font-weight: 600; color: var(--ink); }
.cat-nav ul { list-style: none; padding: 4px 0 4px 12px; margin: 0; border-left: 2px solid var(--accent); }
.cat-nav ul a { color: var(--link); font-size: 13px; }
.cat-main h1 { margin-top: 4px; }
.sub { padding-top: 18px; }
.sub > h2 { border-bottom: 2px solid var(--ink); padding-bottom: 6px; margin-bottom: 0; }
.family { padding: 16px 0 10px; border-bottom: 1px solid var(--line-2); scroll-margin-top: 130px; }
.sub { scroll-margin-top: 120px; }
.family h3 { margin-bottom: 2px; }
.fam-desc { color: var(--ink-2); font-size: 14px; margin-bottom: 4px; }
.specify { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.specify span { font-weight: 600; color: var(--ink-2); }
.rows { width: 100%; border-collapse: collapse; font-size: 14px; table-layout: fixed; }
.rows th:nth-child(1) { width: 19%; }
.rows th:nth-child(2) { width: 27%; }
.rows th:nth-child(4) { width: 76px; }
.rows th:nth-child(5) { width: 92px; }
.rows th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 6px 8px; border-bottom: 1px solid var(--line); background: var(--panel); }
.rows td { padding: 6px 8px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.rows tbody tr:hover { background: #fffbea; }
.rows .fits { font-weight: 600; }
.rows .conds { color: var(--ink-2); font-size: 13px; }
.rows .qty-cell { width: 76px; }
.rows .qty-cell input { width: 64px; min-height: 32px; padding: 4px 6px; }
.rows .add-cell { width: 92px; text-align: right; }
.add { height: 32px; min-width: 76px; padding: 0 12px; border: 1px solid var(--link); color: var(--link); background: #fff; border-radius: var(--radius); font: 600 13px var(--sans); cursor: pointer; transition: background-color .15s ease, color .15s ease; }
.add:hover { background: var(--link); color: #fff; }
.add:active { transform: scale(.97); }
.add.done { border-color: var(--ok); background: var(--ok); color: #fff; }
.fit-empty { padding: 12px; background: var(--panel); border-radius: var(--radius); }

/* Search */
.search-page { padding-top: 22px; }
.result-group { margin-top: 18px; }
.result-group h2 { font-size: 15px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; border-bottom: 2px solid var(--ink); padding-bottom: 6px; }
.pn-card { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); margin: 14px 0; background: var(--panel-2); }
.pn-card .pn { font-family: var(--mono); font-size: 18px; }
.pn-card form { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-top: 10px; }
.pn-card .field { margin: 0; }
.pn-card .grow { flex: 1 1 240px; }
.unit-note { display: block; width: fit-content; max-width: 100%; margin-bottom: 8px; padding: 8px 12px; background: #fffbea; border: 1px solid #f0dd9a; border-radius: var(--radius); font-size: 14px; }

/* Quote */
.quote-page { padding-top: 22px; padding-bottom: 40px; }
.quote-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.save-state { font-size: 13px; color: var(--muted); margin: 0; }
.save-state.flash { color: var(--ok); }
.panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; background: #fff; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.panel-head h2 { margin: 0; }
.panel-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.lines { width: 100%; border-collapse: collapse; font-size: 14px; }
.lines th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 6px; border-bottom: 1px solid var(--line); background: var(--panel); }
.lines td { padding: 6px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.lines input, .lines select { min-height: 34px; padding: 5px 8px; font-size: 14px; }
.lines .c-n { width: 34px; color: var(--muted); font-family: var(--mono); font-size: 12px; padding-top: 14px; }
.lines .c-pn { width: 170px; }
.lines .c-pn input { font-family: var(--mono); }
.lines .c-fits { width: 150px; }
.lines .c-cond { width: 160px; }
.lines .c-qty { width: 76px; }
.lines .c-x { width: 40px; text-align: right; }
.remove { width: 32px; height: 32px; border: 1px solid transparent; background: none; color: var(--muted); border-radius: var(--radius); cursor: pointer; font-size: 18px; line-height: 1; }
.remove:hover { border-color: var(--warn); color: var(--warn); background: var(--warn-bg); }
.empty { padding: 22px; text-align: center; color: var(--muted); background: var(--panel-2); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty p { margin-bottom: 10px; }
.paste { margin-top: 14px; border-top: 1px solid var(--line-2); padding-top: 12px; }
.paste summary { cursor: pointer; font-weight: 600; color: var(--link); }
.paste[open] summary { margin-bottom: 8px; }
.paste p { font-size: 13px; color: var(--muted); }
.paste-actions { margin-top: 8px; }
.paste-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 10px; }
.paste-table td, .paste-table th { padding: 4px 6px; border-bottom: 1px solid var(--line-2); text-align: left; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.urgency { border: 0; padding: 0; margin: 0 0 14px; display: flex; gap: 18px; flex-wrap: wrap; }
.urgency legend { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; padding: 0; }
.urgency label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.submit-row { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.form-error { color: var(--warn); background: var(--warn-bg); padding: 10px 12px; border-radius: var(--radius); margin: 0; }
.sent { border: 1px solid #b7dcc1; background: var(--ok-bg); padding: 20px; border-radius: var(--radius); margin-bottom: 18px; }
.sent.fail { border-color: #efc2bd; background: var(--warn-bg); }
.sent h2 { margin-bottom: 6px; }
.sent .rfq { font-family: var(--mono); font-weight: 500; }
.sent-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }

/* History */
.history-page { padding-top: 22px; padding-bottom: 40px; }
.hist { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; }
.hist summary { padding: 12px 14px; cursor: pointer; display: flex; gap: 14px; flex-wrap: wrap; align-items: baseline; }
.hist summary .rfq { font-family: var(--mono); font-weight: 500; }
.hist-body { padding: 0 14px 14px; }

/* Prose */
.prose { max-width: 720px; padding-top: 24px; padding-bottom: 40px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--panel); margin-top: 24px; font-size: 14px; color: var(--ink-2); }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1.6fr .8fr; gap: 32px; padding-top: 28px; padding-bottom: 20px; }
.footer-brand { font-weight: 700; color: var(--ink); }
.footer-h { font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.footer-list { list-style: none; padding: 0; margin: 0; }
.footer-list li { padding: 2px 0; }
.footer-list.cols { columns: 2; column-gap: 20px; }
.footer-list a { color: var(--ink-2); }
.footer-base { border-top: 1px solid var(--line); padding-top: 12px; padding-bottom: 16px; font-size: 12px; color: var(--muted); }
.footer-base p { max-width: 100ch; margin: 0; }

/* Toast */
.toast { position: fixed; right: 16px; bottom: 16px; z-index: 40; max-width: 380px; background: var(--ink); color: #fff; padding: 12px 14px; border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.18); font-size: 14px; opacity: 0; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast a { color: var(--accent); font-weight: 600; margin-left: 8px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* Tablet */
@media (max-width: 960px) {
  .cat-layout { grid-template-columns: 1fr; }
  .cat-aside { position: static; max-height: none; overflow: visible; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
  .fit-list { columns: 2; }
  .aside-cats { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 18px; }
}

/* Phone */
@media (max-width: 700px) {
  body { font-size: 15px; }
  .bar { flex-wrap: wrap; gap: 10px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .quote-btn { margin-left: auto; }
  .brand-tag { display: none; }
  .subnav-inner { gap: 14px; overflow-x: auto; flex-wrap: nowrap; white-space: nowrap; }
  .site-header { position: static; }
  .lede { font-size: 16px; }
  .grid2 { grid-template-columns: 1fr; }
  .rows thead, .lines thead { display: none; }
  .rows, .rows tbody, .rows tr, .rows td { display: block; width: 100%; }
  .rows tr { display: grid; grid-template-columns: 1fr auto auto; gap: 2px 10px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
  .rows td { border: 0; padding: 0; }
  .rows td.fits { grid-column: 1; grid-row: 1; }
  .rows td[data-label="Covers"] { grid-column: 1; grid-row: 2; color: var(--muted); font-size: 13px; }
  .rows td.conds { grid-column: 1; grid-row: 3; color: var(--muted); font-size: 13px; }
  .rows td.qty-cell { grid-column: 2; grid-row: 1 / span 3; align-self: center; width: auto; }
  .rows td.qty-cell input { width: 56px; }
  .rows td.add-cell { grid-column: 3; grid-row: 1 / span 3; align-self: center; width: auto; }
  .rows tbody tr:hover { background: none; }
  .lines, .lines tbody, .lines tr, .lines td { display: block; width: 100% !important; }
  .lines tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; padding: 12px 0; border-bottom: 1px solid var(--line); position: relative; }
  .lines td { border: 0; padding: 0; }
  .lines td::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 2px; }
  .lines .c-n { display: none; }
  .lines .c-desc, .lines .c-notes { grid-column: 1 / -1; }
  .lines .c-x { position: absolute; right: 0; top: 6px; width: auto !important; }
  .lines .c-x::before { display: none; }
  .custom-form .field, .pn-card .field { flex: 1 1 100%; }
  .custom-form .qty, .pn-card .qty { flex: 0 0 100px; }
  .footer-list.cols { columns: 1; }
}

@media print {
  .site-header, .site-footer, .toast, .panel-tools, .paste, .submit-row, .remove, .hp, [data-sent] .sent-actions { display: none !important; }
  .panel { border: 0; padding: 0; }
  input, select, textarea { border: 0; padding: 0; min-height: 0; }
}

/* ---------- search-first home ---------- */
.page-home .site-header .search { display: none; }
.page-home .quote-btn { margin-left: auto; }
.hero-inner { max-width: 900px; padding-top: 52px; padding-bottom: 34px; text-align: center; }
.hero h1 { font-size: clamp(26px, 4.2vw, 38px); margin-bottom: 22px; text-wrap: balance; }
.bigsearch { display: flex; max-width: 760px; margin: 0 auto; box-shadow: 0 2px 10px rgba(21, 25, 30, .08); border-radius: 6px; }
.bigsearch input { flex: 1; min-width: 0; height: 58px; padding: 0 18px; font-size: 18px; border: 2px solid var(--ink); border-right: 0; border-radius: 6px 0 0 6px; }
.bigsearch input:focus { box-shadow: none; border-color: var(--ink); background: #fffdf3; }
.bigsearch button { height: 58px; padding: 0 26px; border: 2px solid var(--ink); background: var(--accent); color: var(--accent-ink); font: 700 16px var(--sans); border-radius: 0 6px 6px 0; cursor: pointer; }
.bigsearch button:hover { background: #ffc81f; }
.examples { list-style: none; padding: 0; margin: 14px 0 0; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; align-items: center; font-size: 14px; }
.examples button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 12px; font: inherit; color: var(--ink-2); cursor: pointer; }
.examples button:hover { border-color: var(--ink); color: var(--ink); }
.hero-note { margin: 16px auto 0; font-size: 14px; color: var(--muted); max-width: 70ch; }
.hero .resume { justify-content: center; max-width: 520px; margin-left: auto; margin-right: auto; }
[data-live-results] { padding-top: 18px; padding-bottom: 24px; }
.steps3 { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.steps3 li { counter-increment: s; border-top: 3px solid var(--ink); padding-top: 10px; font-size: 15px; color: var(--ink-2); }
.steps3 li::before { content: counter(s); display: block; font: 500 13px var(--mono); color: var(--muted); margin-bottom: 4px; }
.steps3 strong { color: var(--ink); display: block; }
.faq { padding-top: 32px; }
.faq details { border-bottom: 1px solid var(--line-2); padding: 10px 0; max-width: 820px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: 8px 0 2px; color: var(--ink-2); }
.home-blog { padding-top: 32px; padding-bottom: 8px; }
.post-links { list-style: none; padding: 0; margin: 0; }
.post-links li { padding: 5px 0; border-bottom: 1px solid var(--line-2); max-width: 820px; }

/* ---------- part-number rows ---------- */
.pn-rows th:nth-child(1) { width: 22%; }
.pn-rows th:nth-child(2) { width: auto; }
.pn-rows th:nth-child(3) { width: 18%; }
.pn-cell { font-weight: 500; word-break: break-all; }
.pn-page h1 .mono { display: block; font-size: 15px; color: var(--muted); font-weight: 500; margin-bottom: 4px; }
.pn-page, .fits-page { padding-top: 12px; padding-bottom: 24px; }

/* ---------- unit, engine and number pages ---------- */
.facts { margin: 6px 0 14px; display: grid; gap: 4px; max-width: 860px; }
.facts > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.toc { list-style: none; padding: 0; margin: 0 0 6px; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; }
.unit-list { list-style: none; padding: 0; margin: 10px 0 0; columns: 4 180px; column-gap: 24px; font-size: 15px; }
.unit-list li { padding: 3px 0; break-inside: avoid; }
.unit-list .muted { font-family: var(--mono); font-size: 12px; }

/* ---------- photos ---------- */
.photo-btn { display: inline-flex; align-items: center; height: 40px; padding: 0 14px; border: 1px dashed #9a9a92; border-radius: var(--radius); background: #fff; color: var(--ink-2); font: 600 14px var(--sans); cursor: pointer; white-space: nowrap; position: relative; }
.photo-btn:hover { border-color: var(--ink); color: var(--ink); }
.photo-btn:focus-within, input.sr:focus + .photo-btn { outline: 2px solid var(--link); outline-offset: 2px; }
.photo-btn.small { height: 30px; padding: 0 10px; font-size: 12px; font-weight: 500; }
.photo-field { justify-content: flex-end; }
.thumbs { flex-basis: 100%; display: flex; gap: 8px; flex-wrap: wrap; }
.thumbs:empty { display: none; }
.thumb { position: relative; width: 56px; height: 56px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); display: inline-block; flex: none; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb button { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border: 0; border-radius: 50%; background: rgba(21, 25, 30, .78); color: #fff; font-size: 14px; line-height: 1; cursor: pointer; padding: 0; }
.thumb.missing { width: auto; height: auto; padding: 4px 8px; font-size: 12px; color: var(--muted); }
.line-photos { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 6px; }

/* ---------- glossary and blog ---------- */
.prose h1 { margin-top: 6px; }
.prose h2 { margin-top: 28px; }
.prose h3 { margin-top: 20px; }
.prose p, .prose li { font-size: 16px; line-height: 1.65; color: var(--ink-2); }
.prose ul, .prose ol { padding-left: 22px; }
.prose table { border-collapse: collapse; width: 100%; margin: 14px 0; font-size: 14px; }
.prose th, .prose td { text-align: left; padding: 7px 9px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: var(--panel); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.prose code { background: var(--panel); padding: 1px 5px; border-radius: 3px; font-size: 14px; }
.glossary { margin: 0; }
.term { padding: 12px 0; border-bottom: 1px solid var(--line-2); scroll-margin-top: 130px; }
.term dt { font-weight: 600; color: var(--ink); }
.term dd { margin: 2px 0 0; color: var(--ink-2); }
.blog-index { max-width: 860px; padding-top: 12px; padding-bottom: 32px; }
.post-card { padding: 16px 0; border-bottom: 1px solid var(--line-2); }
.post-card h2 { font-size: 20px; margin-bottom: 2px; }
.post-card h2 a { color: var(--ink); }
.post-card h2 a:hover { color: var(--link); }
.post-meta { font: 500 12px var(--mono); color: var(--muted); letter-spacing: .03em; margin-bottom: 8px; }
.post-cta { margin: 30px 0 10px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); }
.more-posts { margin-top: 26px; }
.more-posts h2 { font-size: 16px; }

@media (max-width: 700px) {
  .hero-inner { padding-top: 30px; padding-bottom: 24px; }
  .bigsearch input { height: 52px; font-size: 16px; padding: 0 12px; }
  .bigsearch button { height: 52px; padding: 0 16px; }
  .steps3 { grid-template-columns: 1fr; }
  .facts > div { grid-template-columns: 110px minmax(0, 1fr); }
  .pn-rows td.pn-cell { grid-column: 1; grid-row: 1; }
  .pn-rows td[data-label="Description"] { grid-column: 1; grid-row: 2; }
  .pn-rows td[data-label="Maker"] { grid-column: 1; grid-row: 3; color: var(--muted); font-size: 13px; }
  .custom-form .photo-field { flex: 0 0 auto; }
}
[data-sent] { scroll-margin-top: 130px; }
.results { display: flex; flex-direction: column; }
.results [data-search-note] { order: 0; }
.results [data-search-results] { order: 1; }
.results [data-pn-results] { order: 2; }
.results .custom-add { order: 3; }
.results.pn-first [data-pn-results] { order: 1; }
.results.pn-first [data-search-results] { order: 2; }

/* ================= simple, search-first look ================= */
.site-header { border-top: 0; }
.bar { gap: 16px; padding-top: 10px; padding-bottom: 10px; }
.brand-name { font-size: 18px; }
.toplinks { display: flex; gap: 18px; font-size: 14px; flex: none; }
.toplinks a { color: var(--ink-2); }
.toplinks a:hover { color: var(--link); }

/* Home: a logo, a search box, three links. */
.page-home .site-header { border: 0; position: static; }
.page-home .bar { justify-content: flex-end; }
.page-home .brand, .page-home .site-header .search { display: none; }
.page-home .quote-btn { margin-left: 0; }
.g-home { padding: 0 16px; min-height: calc(100vh - 150px); }
body.has-results .g-home { min-height: 0; }
.g-inner { max-width: 680px; margin: 0 auto; padding: 13vh 0 28px; text-align: center; }
.g-logo { display: inline-flex; align-items: center; gap: 12px; }
.g-logo .brand-mark { width: 52px; height: 52px; font-size: 22px; border-radius: 8px; }
.g-name { font: 700 42px/1 var(--sans); letter-spacing: -0.02em; }
.g-tag { font-size: 16px; font-weight: 400; color: var(--muted); margin: 14px 0 24px; letter-spacing: 0; }
.g-home .bigsearch { max-width: none; border: 1px solid var(--line); border-radius: 28px; overflow: hidden; box-shadow: 0 1px 6px rgba(21, 25, 30, .14); background: #fff; }
.g-home .bigsearch:focus-within { border-color: #b9b9b1; box-shadow: 0 2px 12px rgba(21, 25, 30, .2); }
.g-home .bigsearch input { border: 0; border-radius: 0; height: 54px; padding: 0 22px; font-size: 17px; background: #fff; }
.g-home .bigsearch input:focus { background: #fff; box-shadow: none; }
.g-home .bigsearch button { border: 0; border-radius: 0; height: 54px; padding: 0 26px; }
.g-links { margin: 20px 0 0; display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; font-size: 14px; }
.g-links a { color: var(--ink-2); }
.g-links a:hover { color: var(--link); }
.g-home .resume { justify-content: center; margin-top: 22px; }
body.has-results .g-inner { padding-top: 14px; padding-bottom: 10px; }
body.has-results .g-tag, body.has-results .g-links, body.has-results .g-home .resume { display: none; }
body.has-results .g-logo { margin-bottom: 14px; }
body.has-results .g-logo .brand-mark { width: 32px; height: 32px; font-size: 14px; border-radius: 4px; }
body.has-results .g-name { font-size: 24px; }

/* One plain list for every kind of result. */
.result-note { color: var(--muted); font-size: 14px; margin: 2px 0 8px; }
.list { width: 100%; border-collapse: collapse; font-size: 15px; }
.list td { padding: 9px 8px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.list tbody tr:hover { background: #fffbea; }
.list .r-pn { font-weight: 500; margin-right: 12px; }
.list .r-sub { color: var(--muted); font-size: 13px; margin-left: 6px; }
.list .r-fits { color: var(--ink-2); font-size: 13px; width: 30%; }
.list .qty-cell { width: 76px; }
.list .qty-cell input { width: 64px; min-height: 32px; padding: 4px 6px; }
.list .add-cell { width: 92px; text-align: right; }
.results-list { border-top: 1px solid var(--line); }
.results .custom-add { margin-top: 26px; }
.more { margin-top: 12px; }
.family { border-bottom: 0; padding-bottom: 2px; }
.family .list { border-top: 1px solid var(--line-2); }

/* Browse and help pages. */
.browse-page { padding-top: 10px; padding-bottom: 28px; }
.browse-page .dir-cat h2 { font-size: 16px; margin-bottom: 4px; }
.browse-page .dir-cat h2 a { color: var(--ink); }
.browse-h { margin-top: 26px; }
.help-page .steps3 { margin: 18px 0 10px; }
.help-page .faq { padding-top: 0; }

/* Request page: fewer boxes. */
.quote-page { max-width: 920px; }
.panel-tools { margin-top: 12px; align-items: center; gap: 16px; }
.lines .c-pn { width: 210px; }
.lines .c-qty { width: 84px; }
label.inline.first { margin-left: 0; }

@media (max-width: 700px) {
  .toplinks { display: none; }
  .g-inner { padding-top: 7vh; }
  .g-name { font-size: 32px; }
  .g-logo .brand-mark { width: 42px; height: 42px; font-size: 18px; }
  .g-home .bigsearch button { padding: 0 18px; }
  .list, .list tbody, .list tr, .list td { display: block; }
  .list tr { display: grid; grid-template-columns: 1fr auto auto; gap: 2px 10px; padding: 10px 0; border-bottom: 1px solid var(--line-2); align-items: center; }
  .list td { border: 0; padding: 0; width: auto !important; }
  .list .r-part { grid-column: 1; grid-row: 1; }
  .list .r-pn { display: block; }
  .list .r-fits { grid-column: 1; grid-row: 2; }
  .list .qty-cell { grid-column: 2; grid-row: 1 / span 2; }
  .list .qty-cell input { width: 56px; }
  .list .add-cell { grid-column: 3; grid-row: 1 / span 2; }
  .list tbody tr:hover { background: none; }
}

/* Footer: one quiet line. */
.site-footer { margin-top: 28px; background: none; border-top: 1px solid var(--line-2); }
.foot { padding-top: 14px; padding-bottom: 18px; text-align: center; }
.foot-links { display: flex; gap: 6px 20px; justify-content: center; flex-wrap: wrap; font-size: 13px; }
.foot-links a { color: var(--ink-2); }
.foot-links a:hover { color: var(--link); }
.foot-note { margin: 8px 0 0; font-size: 12px; color: var(--muted); max-width: none; }
.g-home { min-height: calc(100vh - 170px); }

/* ================= polish ================= */
::selection { background: #ffe08a; color: var(--ink); }
input, textarea { caret-color: var(--ink); }
a { text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.mono, .r-pn, .qty-cell input, .count { font-variant-numeric: tabular-nums; }
html { scrollbar-color: #c9c9c1 transparent; }

/* Header search matches the home page box. */
.search { border: 1px solid var(--line); border-radius: 22px; overflow: hidden; background: #fff; transition: box-shadow .18s cubic-bezier(.16, 1, .3, 1), border-color .18s; }
.search:focus-within { border-color: #b9b9b1; box-shadow: 0 2px 10px rgba(21, 25, 30, .14); }
.search input { border: 0; border-radius: 0; height: 40px; padding: 0 16px; }
.search input:focus { box-shadow: none; }
.search button { border: 0; border-radius: 0; height: 40px; background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.search button:hover { background: #ffc81f; }
.quote-btn { border-radius: 20px; border-color: var(--line); padding: 0 14px 0 16px; }
.quote-btn:hover { border-color: var(--ink); background: #fff; }
.btn { border-radius: 6px; }

/* Result rows: part number, name, fits, quantity, Add, all on one grid. */
.list .r-pn { width: 190px; font-weight: 500; font-size: 14px; white-space: nowrap; }
.list .r-pn a { color: var(--ink); text-decoration: underline; text-decoration-color: #c9c9c1; }
.list .r-pn a:hover { color: var(--link); text-decoration-color: currentColor; }
.list .r-name a { color: var(--ink); }
.list .r-name a:hover { color: var(--link); }
.list.no-pn .r-pn { display: none; }
.list td { padding: 10px 8px; }
.list tbody tr { transition: background-color .12s; }
.list tbody tr:hover { background: #fff8dd; }
.results-list tbody tr:first-child td { border-top: 0; }
.result-note { font-size: 13px; letter-spacing: .01em; }

/* Add: quiet until wanted. */
.add { border: 1px solid #b9b9b1; color: var(--ink); background: #fff; border-radius: 6px; font-weight: 600; transition: background-color .15s, color .15s, border-color .15s, transform .12s cubic-bezier(.16, 1, .3, 1); }
.add:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.add:active { transform: scale(.96); }
.add.done { background: var(--ok); border-color: var(--ok); color: #fff; }
.pn-page .add, .custom-form .btn, .submit-row .btn.big { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pn-page .add:hover, .custom-form .btn:hover, .submit-row .btn.big:hover { background: #ffc81f; border-color: #ffc81f; color: var(--accent-ink); }
.qty-cell input { text-align: center; border-radius: 6px; }

/* Home details. */
.g-stats { margin: 26px 0 0; font: 500 12px/1.4 var(--mono); color: var(--muted); letter-spacing: .02em; }
.g-stats span { margin: 0 8px; color: #c9c9c1; }
body.has-results .g-stats { display: none; }
.g-home .bigsearch { transition: box-shadow .2s cubic-bezier(.16, 1, .3, 1), border-color .2s; }

/* Browse page: one drawn icon per system. */
.browse-page .dir-grid { columns: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 26px 32px; margin-top: 18px; }
.browse-page .dir-cat { margin: 0; display: grid; grid-template-columns: 32px minmax(0, 1fr); column-gap: 10px; align-content: start; }
.browse-page .dir-cat .sys-icon { grid-row: 1 / span 2; margin-top: 1px; color: var(--ink); }
.browse-page .dir-cat h2 { margin: 2px 0 4px; }
.browse-page .dir-cat ul { grid-column: 2; }
.browse-page .dir-cat li a { color: var(--ink-2); }
.browse-page .dir-cat li a:hover { color: var(--link); }

/* Panels and the add-your-own box. */
.custom-add { border-radius: 8px; }
.custom-add h2 { font-size: 16px; margin-bottom: 12px; }
.panel { border-radius: 8px; }
.crumbs { letter-spacing: .01em; }
.sub > h2 { border-bottom: 1px solid var(--ink); }
.family h3 { font-size: 15px; }

@media (max-width: 700px) {
  .list .r-pn { grid-column: 1; grid-row: 1; width: auto !important; white-space: normal; }
  .list .r-name { grid-column: 1; grid-row: 2; }
  .list .r-fits { grid-column: 1; grid-row: 3; }
  .list.no-pn .r-name, .family .list .r-part { grid-row: 1; }
  .list.no-pn .r-fits { grid-row: 2; }
  .list .qty-cell, .list .add-cell { grid-row: 1 / span 3; }
  .search { border-radius: 22px; }
  .g-stats span { margin: 0 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .add, .search, .g-home .bigsearch, .list tbody tr { transition: none; }
}
