:root {
  color-scheme: light;
  --brand-red: #b20e2f;
  --brand-red-dark: #85081f;
  --navy: #23262a;
  --navy-deep: #111315;
  --teal: var(--brand-red);
  --teal-dark: var(--brand-red-dark);
  --blue-pale: #f6e9ed;
  --ink: #202327;
  --muted: #62676d;
  --line: #d4d6d9;
  --paper: #ffffff;
  --ground: #f1f2f3;
  --yellow: #f2b544;
  --standard: #4c555e;
  --hd: #d48723;
  --xhd: var(--brand-red);
  --shadow: 0 16px 40px rgba(17, 19, 21, 0.11);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(178, 14, 47, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(178, 14, 47, 0.028) 1px, transparent 1px),
    var(--ground);
  background-size: 28px 28px;
  min-height: 100vh;
}

button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }

.site-header {
  color: white;
  background: linear-gradient(115deg, #101214, #26292d 72%, #17191c);
  box-shadow: 0 8px 24px rgba(17, 19, 21, 0.24);
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 28px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { display: flex; align-items: center; gap: 18px; min-width: 0; }
.brand-logo-window {
  position: relative;
  width: 300px;
  height: 94px;
  flex: 0 0 auto;
  overflow: hidden;
  background: white;
  border: 3px solid white;
  box-shadow: 0 5px 18px rgba(0,0,0,0.28);
}
.brand-logo-window img {
  position: absolute;
  width: 138%;
  height: auto;
  left: 50%;
  top: 56%;
  transform: translate(-50%, -50%);
}
.brand-copy { display: grid; gap: 1px; }
.brand-copy strong { font-size: 1.15rem; letter-spacing: 0.01em; }
.brand-copy span { color: #d0d2d4; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em; }

.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.header-contact { display: grid; gap: 1px; color: white; text-decoration: none; text-align: right; }
.header-contact span { color: #c7c9cc; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; }
.header-contact strong { font-size: 1.05rem; }
.header-contact:hover strong { color: #ffced7; }

.pricing-badge {
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
  padding: 9px 13px;
  border-radius: 999px;
  font-size: 0.82rem;
  color: #d9edf2;
}

.brand-stripe {
  height: 8px;
  background: linear-gradient(90deg, var(--brand-red) 0 68%, white 68% 70%, #15171a 70% 100%);
}

.page-shell { max-width: 1240px; margin: 0 auto; padding: 30px 28px 56px; }

.lookup-panel {
  background: var(--paper);
  border-top: 5px solid var(--teal);
  box-shadow: var(--shadow);
  padding: 25px 28px 19px;
}

.lookup-heading, .section-heading, .lookup-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 28px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--teal-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 7px; font-size: clamp(1.65rem, 3vw, 2.45rem); line-height: 1.08; letter-spacing: -0.035em; }
h2 { margin-bottom: 0; font-size: 1.45rem; letter-spacing: -0.02em; }
.lookup-heading > div > p:last-child { color: var(--muted); margin-bottom: 0; font-size: 1rem; }

.catalog-summary {
  min-width: 240px;
  display: grid;
  grid-template-columns: repeat(2, minmax(90px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.summary-stat { background: #f5f9fa; padding: 11px 13px; }
.summary-stat strong { display: block; color: var(--brand-red); font-size: 1.25rem; line-height: 1; }
.summary-stat span { color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; }

.lookup-form {
  margin-top: 24px;
  display: grid;
  grid-template-columns: 0.75fr 1fr 1.35fr 42px 1.35fr auto;
  align-items: end;
  gap: 12px;
}

label { display: grid; gap: 7px; }
label > span { color: #42545e; font-size: 0.82rem; font-weight: 750; }

input, select, textarea {
  width: 100%;
  border: 1px solid #aebfc7;
  background: white;
  color: var(--ink);
  border-radius: 4px;
  padding: 11px 12px;
  min-height: 46px;
  outline: none;
}

input:focus, select:focus, textarea:focus { border-color: var(--brand-red); box-shadow: 0 0 0 3px rgba(178,14,47,0.15); }
.part-field input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 700; text-transform: uppercase; }
.or-divider { display: grid; place-items: center; height: 46px; color: #7b8b93; font-size: 0.7rem; font-weight: 800; }

.primary-button, .secondary-button, .quote-button {
  min-height: 46px;
  border-radius: 4px;
  padding: 10px 16px;
  font-weight: 800;
  border: 1px solid transparent;
}
.primary-button, .quote-button { color: white; background: var(--teal); }
.primary-button:hover, .quote-button:hover { background: var(--teal-dark); }
.secondary-button { color: var(--navy); background: white; border-color: #aebfc7; }
.secondary-button:hover { background: var(--blue-pale); }

.lookup-foot { align-items: center; margin-top: 16px; padding-top: 13px; border-top: 1px solid #dde6ea; }
.search-status { margin: 0; font-weight: 800; color: var(--navy); }
.updated { margin: 0; color: var(--muted); font-size: 0.78rem; }
.supplier-note { margin: 12px 0 0; color: #4c5e68; font-size: 0.78rem; line-height: 1.45; }
.supplier-note strong { color: #375623; }

.results-section, .ubolt-section { margin-top: 32px; }
.section-heading { align-items: end; margin-bottom: 14px; }
.legend { display: flex; gap: 15px; color: var(--muted); font-size: 0.78rem; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 9px; height: 9px; display: inline-block; border-radius: 2px; }
.dot.standard { background: var(--standard); }
.dot.hd { background: var(--hd); }
.dot.xhd { background: var(--xhd); }

.results-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.spring-card {
  --card-accent: var(--standard);
  background: white;
  border: 1px solid var(--line);
  border-left: 6px solid var(--card-accent);
  box-shadow: 0 6px 18px rgba(10,45,69,0.06);
  padding: 19px 20px 18px;
  display: grid;
  gap: 15px;
}
.spring-card.hd { --card-accent: var(--hd); }
.spring-card.xhd { --card-accent: var(--xhd); }
.spring-card.special { --card-accent: #72558a; }

.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.part-number { margin: 0 0 3px; color: var(--navy); font: 850 1.32rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: -0.03em; }
.application-line { margin: 0; color: var(--muted); font-size: 0.83rem; }
.capacity-badge { white-space: nowrap; color: white; background: var(--card-accent); border-radius: 3px; padding: 6px 9px; font-size: 0.72rem; font-weight: 850; letter-spacing: 0.08em; }

.pack-summary { margin: 0; font-weight: 750; color: #263d4a; }
.spec-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid #d5e0e5; background: #d5e0e5; gap: 1px; }
.spec { min-height: 58px; padding: 9px 10px; background: #f7fafb; }
.spec span { display: block; color: #657680; font-size: 0.69rem; text-transform: uppercase; letter-spacing: 0.06em; }
.spec strong { display: block; margin-top: 4px; color: var(--navy); font-size: 0.9rem; }

.fitment-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: var(--blue-pale); color: #6f2635; border-radius: 999px; padding: 5px 9px; font-size: 0.72rem; font-weight: 700; }

.hardware-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hardware-item { border-left: 3px solid #c44b63; padding-left: 10px; }
.hardware-item span { display: block; color: var(--muted); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; }
.hardware-item strong { font-size: 0.86rem; }
.verification-note { margin: 0; color: #5a6870; font-size: 0.78rem; line-height: 1.46; }
.card-actions { display: flex; justify-content: flex-end; padding-top: 2px; }
.quote-button { min-height: 41px; }

.empty-state { background: white; border: 1px dashed #9eb1ba; padding: 30px; text-align: center; }
.empty-state strong { display: block; color: var(--navy); font-size: 1.05rem; margin-bottom: 6px; }
.empty-state p { margin: 0; color: var(--muted); }

.measure-chip { color: #79580e; background: #fff0c9; border: 1px solid #e6c465; border-radius: 999px; padding: 7px 11px; font-size: 0.76rem; font-weight: 800; }
.ubolt-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.ubolt-card { background: white; border: 1px solid var(--line); padding: 16px; }
.ubolt-card h3 { margin: 0 0 10px; color: var(--navy); font: 850 1.02rem/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.ubolt-measure { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; background: #d5e0e5; margin-bottom: 11px; }
.ubolt-measure div { background: #f7fafb; padding: 8px; }
.ubolt-measure span { display: block; color: var(--muted); font-size: 0.62rem; text-transform: uppercase; }
.ubolt-measure strong { font-size: 0.82rem; }
.ubolt-card p { margin: 0 0 7px; color: #4c5e68; font-size: 0.75rem; line-height: 1.42; }
.ubolt-card p:last-child { margin-bottom: 0; }

.fitment-warning {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 20px;
  align-items: center;
  background: #fff5da;
  border: 1px solid #e9c86f;
  border-left: 7px solid var(--yellow);
  padding: 17px 20px;
}
.fitment-warning strong { color: #6f4d05; }
.fitment-warning p { margin: 0; color: #674f1e; font-size: 0.86rem; line-height: 1.48; }

footer { background: var(--navy-deep); color: #c7c9cc; padding: 24px 28px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 28px; font-size: 0.78rem; border-top: 5px solid var(--brand-red); }
footer p { margin: 0; text-align: right; }
.footer-brand { display: grid; gap: 2px; }
.footer-brand strong { color: white; font-size: 0.92rem; }
.footer-brand span { color: #aeb1b5; }
.footer-contact { display: flex; gap: 18px; }
.footer-contact a { color: white; text-decoration: none; font-weight: 750; }
.footer-contact a:hover { color: #ffced7; }

.quote-dialog { width: min(980px, calc(100% - 28px)); max-height: calc(100vh - 28px); overflow: auto; border: 0; padding: 0; box-shadow: 0 30px 90px rgba(3,21,33,0.36); }
.quote-dialog::backdrop { background: rgba(5,25,39,0.68); }
.dialog-card { padding: 24px; }
.dialog-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; border-bottom: 1px solid var(--line); padding-bottom: 15px; }
.dialog-header h2 { margin: 0; }
.close-button { width: 38px; height: 38px; border: 1px solid var(--line); background: white; color: var(--navy); font-size: 1.6rem; line-height: 1; }
.quote-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin: 18px 0; }
.quote-notes { grid-column: 1 / -1; }
.quote-notes textarea { min-height: 86px; resize: vertical; }
.small-button { min-height: 36px; padding: 7px 11px; font-size: 0.78rem; width: auto; }
.ubolt-measuring-tool { margin: 0 0 17px; border: 1px solid #c8d6dc; border-left: 5px solid var(--teal); background: #f6fafb; padding: 15px; }
.measure-tool-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.measure-tool-heading h3 { margin: 0 0 4px; color: var(--navy); font-size: 1.02rem; }
.measure-tool-heading p:last-child { margin: 0; color: var(--muted); font-size: 0.77rem; line-height: 1.4; }
.measure-guide { display: grid; grid-template-columns: minmax(240px,.8fr) minmax(280px,1.2fr); gap: 18px; align-items: center; margin: 14px 0; border: 1px solid #d7e2e6; background: white; padding: 12px; }
.measure-diagram { width: 100%; max-height: 220px; }
.ubolt-shape { fill: none; stroke: #1c4456; stroke-width: 15; stroke-linecap: round; stroke-linejoin: round; }
.thread-lines { fill: none; stroke: white; stroke-width: 2; }
.dimension-line { fill: none; stroke: var(--brand-red); stroke-width: 2; }
.measure-diagram text { fill: #6f2635; font: 750 12px/1 sans-serif; }
.measure-guide ol { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: #4e6069; font-size: 0.76rem; line-height: 1.4; }
.measure-guide strong { color: var(--navy); }
.measured-ubolt-rows { display: grid; gap: 10px; }
.measurement-empty { margin: 0; border: 1px dashed #a9bbc3; background: white; padding: 12px; color: var(--muted); font-size: 0.76rem; text-align: center; }
.measured-ubolt-card { border: 1px solid #b9cbd2; background: white; padding: 12px; }
.measured-ubolt-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 9px; }
.measured-ubolt-head strong { color: var(--navy); font-size: 0.84rem; }
.remove-measurement { width: 34px; min-height: 34px; border: 1px solid #c4cfd4; background: white; color: var(--brand-red); font-size: 1.15rem; }
.measurement-fields { display: grid; grid-template-columns: 1.05fr .8fr repeat(4,1fr) .72fr; gap: 8px; align-items: end; }
.measurement-fields input,.measurement-fields select { min-height: 38px; padding: 7px 8px; }
.measurement-result { margin: 9px 0 0; padding: 8px 10px; background: #edf4f6; color: #39515d; font-size: 0.74rem; }
.measurement-result strong { color: var(--navy); }
.measurement-warning { margin: 11px 0 0; color: #695112; background: #fff7df; border-left: 4px solid var(--yellow); padding: 9px 11px; font-size: 0.72rem; line-height: 1.42; }
.quote-preview-label textarea { resize: vertical; min-height: 180px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.81rem; line-height: 1.48; }
.quote-contact { display: flex; justify-content: space-between; gap: 18px; align-items: center; margin: 0 0 17px; padding: 12px 14px; background: #f7e8ec; border-left: 4px solid var(--brand-red); color: #4a3036; font-size: 0.82rem; }
.quote-contact strong { color: var(--brand-red-dark); }
.quote-contact a { color: var(--brand-red-dark); font-weight: 850; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; }
.copy-status { min-height: 20px; margin: 9px 0 0; color: var(--teal-dark); font-size: 0.8rem; font-weight: 750; }
button:disabled { cursor: wait; opacity: 0.68; }

@media (max-width: 980px) {
  .brand-logo-window { width: 250px; height: 80px; }
  .brand-copy { display: none; }
  .header-actions { flex-wrap: wrap; }
  .lookup-form { grid-template-columns: repeat(3, 1fr); }
  .or-divider { display: none; }
  .part-field { grid-column: span 2; }
  .results-grid { grid-template-columns: 1fr; }
  .ubolt-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .measurement-fields { grid-template-columns: repeat(4,1fr); }
}

@media (max-width: 680px) {
  .header-inner, .page-shell { padding-left: 16px; padding-right: 16px; }
  .header-inner { align-items: center; padding-top: 13px; padding-bottom: 13px; }
  .brand-logo-window { width: 210px; height: 68px; }
  .header-contact { display: none; }
  .pricing-badge { display: none; }
  .lookup-panel { padding: 20px 17px 16px; }
  .lookup-heading, .lookup-foot, .section-heading { display: grid; gap: 13px; }
  .catalog-summary { min-width: 0; width: 100%; }
  .lookup-form { grid-template-columns: 1fr; }
  .part-field { grid-column: auto; }
  .secondary-button { width: 100%; }
  .results-grid, .ubolt-grid { grid-template-columns: 1fr; }
  .spec-grid { grid-template-columns: repeat(2,1fr); }
  .hardware-grid { grid-template-columns: 1fr; }
  .legend { flex-wrap: wrap; }
  .fitment-warning { grid-template-columns: 1fr; gap: 6px; }
  footer { grid-template-columns: 1fr; gap: 12px; }
  footer p { text-align: left; }
  .footer-contact { display: grid; gap: 6px; }
  .quote-contact { display: grid; gap: 4px; }
  .quote-fields { grid-template-columns: 1fr; }
  .measure-tool-heading,.measure-guide { display: grid; grid-template-columns: 1fr; }
  .measure-tool-heading .secondary-button { width: 100%; }
  .measurement-fields { grid-template-columns: 1fr 1fr; }
  .dialog-actions { display: grid; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
