/* ==========================================================================
   Bearings Direct, Concept D: The Counter
   Platform-agnostic static concept. No framework.
   ========================================================================== */

:root {
  /* Color tokens */
  --ink: #1b232c;            /* Graphite: primary text */
  --ink-soft: #46525e;       /* Secondary text, AA on white and alloy */
  --navy: #17365e;           /* Bearing Navy: brand anchor */
  --navy-deep: #0f2440;      /* Headers, footer, hover */
  --navy-tint: #e3ebf5;      /* Selected and info surfaces */
  --red: #c02f27;            /* Seal Red: one action rule */
  --red-deep: #9e241d;
  --paper: #ffffff;          /* Machined White */
  --alloy: #eef1f4;          /* Cool Alloy: tool panels */
  --alloy-deep: #e2e7ec;
  --line: #ccd4db;           /* Steel Line */
  --line-strong: #a9b4be;
  --stock-ok: #1e6f3d;
  --stock-low: #8a5200;
  --focus: #1d5fd6;

  /* Type */
  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Rhythm */
  --radius: 10px;
  --radius-sm: 8px;
  --container: 1200px;
  --pad: 24px;
}

/* Base ------------------------------------------------------------------ */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--navy-deep);
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; }

a { color: var(--navy); text-underline-offset: 3px; }
a:hover { color: var(--navy-deep); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 3px;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--pad);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy-deep);
  color: #fff;
  padding: 12px 20px;
  z-index: 200;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; color: #fff; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}

.mono { font-family: var(--font-mono); font-weight: 600; }

/* Buttons ----------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-deep); color: #fff; }

.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-deep); color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: var(--navy); background: var(--navy-tint); color: var(--navy-deep); }

.btn-small { min-height: 38px; padding: 6px 14px; font-size: 0.875rem; }

/* Utility bar -------------------------------------------------------------- */

.utility-bar {
  background: var(--navy-deep);
  color: #dbe5f0;
  font-size: 0.8125rem;
}
.utility-bar .container {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 36px;
}
.utility-bar span { display: inline-flex; align-items: center; gap: 6px; }
.utility-bar .u-phone { margin-left: auto; }
.utility-bar a { color: #fff; font-weight: 600; text-decoration: none; }
.utility-bar a:hover { text-decoration: underline; color: #fff; }
.u-dot { width: 4px; height: 4px; border-radius: 50%; background: #516b8c; flex: none; }

/* Header -------------------------------------------------------------------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.header-main {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  padding-block: 16px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--navy);
}
.logo svg { flex: none; }
.logo-word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.375rem;
  letter-spacing: -0.02em;
  color: var(--navy);
  line-height: 1;
}
.logo-word small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin-top: 3px;
}

.header-search { position: relative; max-width: 620px; width: 100%; }
.header-search label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 4px;
}
.search-row { display: flex; }
.search-row input {
  flex: 1;
  min-width: 0;
  min-height: 46px;
  border: 1.5px solid var(--line-strong);
  border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  padding: 8px 14px;
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  color: var(--ink);
  background: var(--paper);
}
.search-row input::placeholder { color: #6c7883; font-family: var(--font-body); }
.search-row input:focus { border-color: var(--navy); outline: none; box-shadow: 0 0 0 3px var(--navy-tint); }
.search-row button { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.header-actions a {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 56px;
  min-height: 44px;
  justify-content: center;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--navy);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
}
.header-actions a:hover { background: var(--alloy); }
.header-actions svg { width: 22px; height: 22px; }
.cart-count {
  font-family: var(--font-mono);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  min-width: 44px;
  background: none;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
}
.nav-toggle:hover { border-color: var(--navy); background: var(--navy-tint); }

/* Primary nav ------------------------------------------------------------- */

.primary-nav { border-top: 1px solid var(--line); }
.primary-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 4px;
  overflow-x: auto;
}
.primary-nav a {
  display: inline-block;
  padding: 12px 14px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--navy-deep);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.primary-nav a:hover { border-bottom-color: var(--navy); }
.primary-nav a.nav-business { color: var(--red-deep); }

/* Mobile drawer ------------------------------------------------------------ */

.mobile-drawer {
  border: none;
  padding: 0;
  width: min(400px, 92vw);
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0 0 0 auto;
  background: var(--paper);
}
.mobile-drawer::backdrop { background: rgba(15, 36, 64, 0.55); }
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.drawer-head strong { font-family: var(--font-display); color: var(--navy-deep); font-size: 1.0625rem; }
.drawer-close {
  min-width: 44px; min-height: 44px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: none;
  font-size: 1.125rem;
  color: var(--navy);
  cursor: pointer;
}
.drawer-body { padding: 20px; overflow-y: auto; height: calc(100dvh - 77px); }
.drawer-search { margin-bottom: 20px; }
.drawer-search label { display: block; font-size: 0.8125rem; font-weight: 600; margin-bottom: 6px; color: var(--ink-soft); }
.drawer-search .search-row input { border-right: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); }
.drawer-search .search-row { gap: 8px; }
.drawer-search .search-row button { border-radius: var(--radius-sm); }

.drawer-body details { border-bottom: 1px solid var(--line); }
.drawer-body summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 10px 4px;
  font-weight: 600;
  color: var(--navy-deep);
  cursor: pointer;
}
.drawer-body summary::-webkit-details-marker { display: none; }
.drawer-body summary::after { content: "+"; font-size: 1.25rem; color: var(--ink-soft); }
.drawer-body details[open] summary::after { content: "\2212"; }
.drawer-body details ul { list-style: none; margin: 0; padding: 0 4px 14px; }
.drawer-body details li a {
  display: block;
  padding: 10px 8px;
  min-height: 44px;
  text-decoration: none;
  color: var(--ink);
  border-radius: var(--radius-sm);
}
.drawer-body details li a:hover { background: var(--alloy); }
.drawer-contact { padding: 20px 4px; font-size: 0.9375rem; }
.drawer-contact a { font-weight: 600; }

/* Hero ---------------------------------------------------------------------- */

.hero {
  background: linear-gradient(180deg, var(--paper) 0%, var(--alloy) 100%);
  border-bottom: 1px solid var(--line);
}
.hero .container {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 48px;
  padding-block: 56px 64px;
  align-items: start;
}

.hero h1 {
  font-size: clamp(1.75rem, 1.2rem + 2vw, 2.625rem);
  font-weight: 700;
  max-width: 22ch;
}
.hero-sub {
  font-size: 1.0625rem;
  color: var(--ink-soft);
  max-width: 54ch;
  margin-bottom: 28px;
}

/* Finder */

.finder {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.finder-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
}
.finder-tab {
  flex: 1;
  min-height: 52px;
  background: var(--alloy);
  border: none;
  border-bottom: 3px solid transparent;
  border-right: 1px solid var(--line);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 8px 10px;
}
.finder-tab:last-child { border-right: none; }
.finder-tab:first-child { border-top-left-radius: var(--radius); }
.finder-tab:last-child { border-top-right-radius: var(--radius); }
.finder-tab[aria-selected="true"] {
  background: var(--paper);
  color: var(--navy-deep);
  border-bottom-color: var(--red);
}
.finder-panel { padding: 20px; }
.finder-panel[hidden] { display: none; }

.field-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}
.field-hint {
  font-size: 0.8125rem;
  color: var(--ink-soft);
  margin-top: 8px;
  margin-bottom: 0;
}
.field-hint a { font-weight: 600; }

.finder input[type="text"],
.finder input[type="tel"],
.finder input[type="email"],
.finder textarea {
  width: 100%;
  min-height: 46px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  color: var(--ink);
}
.finder textarea { font-family: var(--font-body); resize: vertical; }
.finder input:focus, .finder textarea:focus {
  border-color: var(--navy);
  outline: none;
  box-shadow: 0 0 0 3px var(--navy-tint);
}

.part-row { display: flex; gap: 10px; }
.part-row input { flex: 1; min-width: 0; }

.unit-toggle {
  display: inline-flex;
  gap: 0;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 14px;
}
.unit-toggle label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  min-height: 42px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  background: var(--alloy);
}
.unit-toggle label:first-of-type { border-right: 1.5px solid var(--line-strong); }
.unit-toggle input { accent-color: var(--navy); width: 16px; height: 16px; }
.unit-toggle label:has(input:checked) {
  background: var(--navy);
  color: #fff;
}

.dim-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr) auto;
  gap: 10px;
  align-items: end;
}
.dim-grid .field-example {
  display: block;
  font-size: 0.75rem;
  color: var(--ink-soft);
  margin-top: 4px;
  font-family: var(--font-mono);
}

.chip-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  min-height: 44px;
  padding: 8px 16px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--paper);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--navy-deep);
  cursor: pointer;
}
.chip:hover { border-color: var(--navy); background: var(--navy-tint); }
.chip[aria-pressed="true"] {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.chip[aria-pressed="true"]::before { content: "\2713 "; }

/* Finder results */

.finder-results { border-top: 1px solid var(--line); padding: 16px 20px 20px; }
.finder-results[hidden] { display: none; }
.results-summary {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 12px;
}
.result-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.result-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  background: var(--paper);
}
.result-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; min-width: 0; }
.result-pn {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1rem;
  color: var(--navy-deep);
}
.result-name { font-size: 0.875rem; color: var(--ink-soft); }
.result-dims { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--ink); }
.result-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font-size: 0.8125rem; grid-column: 1; }
.match-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--navy-tint);
  color: var(--navy-deep);
  border: 1px solid #b9cbe2;
}
.match-badge.is-exact { background: #e2f1e7; color: var(--stock-ok); border-color: #b4d9c1; }
.stock { font-weight: 600; }
.stock.ok { color: var(--stock-ok); }
.stock.low { color: var(--stock-low); }
.result-price { font-family: var(--font-mono); font-weight: 700; color: var(--ink); }
.result-actions { display: flex; gap: 8px; grid-row: span 2; }

.finder-empty {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 16px;
  background: var(--alloy);
}
.finder-empty h3 { font-size: 1rem; margin-bottom: 6px; }
.finder-empty p { font-size: 0.9375rem; margin-bottom: 10px; }

/* Counter ticket ------------------------------------------------------------ */

.hero-aside { display: grid; gap: 20px; }

.ticket {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--navy);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.ticket-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--navy);
  background: var(--navy-tint);
  border-radius: 5px;
  padding: 3px 8px;
  margin-bottom: 12px;
}
.ticket-query {
  font-family: var(--font-mono);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}
.ticket p { font-size: 0.9375rem; color: var(--ink-soft); margin-bottom: 12px; }
.ticket-options { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 6px; }
.ticket-options li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--alloy-deep);
  padding-bottom: 6px;
}
.ticket-options .mono { color: var(--navy-deep); }
.ticket-options span:last-child { font-family: var(--font-mono); color: var(--ink-soft); }

.hero-photo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: end;
}
.hero-photo figure {
  margin: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 12px;
}
.hero-photo figcaption {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-soft);
  margin-top: 8px;
  text-align: center;
}
.hero-photo figure:first-child { transform: translateY(14px); }

/* Section scaffolding -------------------------------------------------------- */

.section { padding-block: 64px; }
.section-alloy { background: var(--alloy); border-block: 1px solid var(--line); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}
.section-head h2 {
  font-size: clamp(1.375rem, 1.1rem + 1vw, 1.75rem);
  margin: 0;
  padding-left: 14px;
  border-left: 4px solid var(--red);
}
.prototype-note {
  max-width: 44rem;
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 0.8rem;
}
.counter-note {
  font-size: 0.875rem;
  color: var(--ink-soft);
  max-width: 40ch;
  text-align: right;
  margin: 0;
}
.counter-note strong { color: var(--navy-deep); }

/* Parts table ------------------------------------------------------------------ */

.table-wrap { position: relative; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.parts-table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; min-width: 760px; }
.parts-table caption { text-align: left; padding: 14px 16px 0; font-weight: 600; color: var(--ink-soft); font-size: 0.8125rem; }
.parts-table th {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  padding: 14px 16px 10px;
  border-bottom: 1.5px solid var(--line-strong);
  white-space: nowrap;
}
.parts-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--alloy-deep);
  vertical-align: middle;
}
.parts-table tr:last-child td { border-bottom: none; }
.parts-table tbody tr:hover { background: #f7f9fb; }
.parts-table .cell-pn a {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--navy-deep);
  font-size: 1rem;
}
.parts-table .cell-pn .part-desc { display: block; font-size: 0.8125rem; color: var(--ink-soft); margin-top: 2px; }
.parts-table .cell-dims, .parts-table .cell-price, .parts-table .cell-tier { font-family: var(--font-mono); font-size: 0.875rem; white-space: nowrap; }
.parts-table .cell-price { font-weight: 700; }
.qty-input {
  width: 64px;
  min-height: 44px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  text-align: center;
}
.qty-input:focus { border-color: var(--navy); outline: none; box-shadow: 0 0 0 3px var(--navy-tint); }
.table-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  font-size: 0.875rem;
  color: var(--ink-soft);
}
.table-foot a { font-weight: 600; }

/* Systems grid ------------------------------------------------------------------ */

.systems-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.system-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  align-items: start;
}
.system-card img { width: 96px; height: 96px; }
.system-card h3 { font-size: 1.0625rem; margin-bottom: 4px; }
.system-card h3 a { text-decoration: none; color: var(--navy-deep); }
.system-card h3 a:hover { text-decoration: underline; }
.system-card p { font-size: 0.875rem; color: var(--ink-soft); margin-bottom: 8px; }
.series-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 0.8125rem; }
.series-links a { font-family: var(--font-mono); font-weight: 600; color: var(--navy); white-space: nowrap; }

/* Applications ------------------------------------------------------------------- */

.apps-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}
.app-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
  min-height: 76px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  text-decoration: none;
}
.app-card:hover { border-color: var(--navy); background: var(--navy-tint); }
.app-card strong { color: var(--navy-deep); font-size: 0.9375rem; }
.app-card span { font-size: 0.78125rem; color: var(--ink-soft); }

/* Order desk ------------------------------------------------------------------------ */

.order-desk {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 40px;
  align-items: start;
}
.desk-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.desk-panel h3 { font-size: 1.125rem; }
.desk-panel > p { font-size: 0.9375rem; color: var(--ink-soft); }

.qo-lines { display: grid; gap: 10px; margin-block: 16px; }
.qo-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}
.qo-line input {
  min-height: 46px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  width: 100%;
}
.qo-line input:focus { border-color: var(--navy); outline: none; box-shadow: 0 0 0 3px var(--navy-tint); }
.qo-status { font-size: 0.8125rem; font-weight: 600; }
.qo-status.ok { color: var(--stock-ok); }
.qo-status.quote { color: var(--stock-low); }
.qo-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.qo-total { margin-left: auto; font-family: var(--font-mono); font-weight: 700; font-size: 1rem; }

.desk-facts { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 0; }
.desk-facts li {
  padding: 14px 2px;
  border-bottom: 1px solid var(--line);
  font-size: 0.9375rem;
  display: grid;
  gap: 2px;
}
.desk-facts strong { color: var(--navy-deep); }
.desk-facts span { color: var(--ink-soft); font-size: 0.875rem; }
.desk-contact { font-size: 0.9375rem; }
.desk-contact a { font-weight: 700; }

/* Specialist band -------------------------------------------------------------------- */

.specialist {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 40px;
  align-items: start;
}
.measure-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.measure-card img { margin-block: 8px 12px; }
.measure-card p { font-size: 0.9375rem; color: var(--ink-soft); }
.resource-links { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 0.875rem; }
.resource-links a { font-weight: 600; }

.ask-form {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.ask-form h3 { font-size: 1.125rem; }
.ask-form > p { font-size: 0.9375rem; color: var(--ink-soft); }
.ask-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-block: 14px; }
.ask-grid .full { grid-column: 1 / -1; }
.ask-form input, .ask-form textarea {
  width: 100%;
  min-height: 46px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
}
.ask-form input:focus, .ask-form textarea:focus { border-color: var(--navy); outline: none; box-shadow: 0 0 0 3px var(--navy-tint); }
.ask-form textarea { resize: vertical; }
.ask-confirm {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: #e2f1e7;
  border: 1px solid #b4d9c1;
  color: var(--stock-ok);
  font-weight: 600;
  font-size: 0.9375rem;
}
.ask-confirm[hidden] { display: none; }
.ask-error {
  margin-top: 8px;
  color: var(--red-deep);
  font-weight: 600;
  font-size: 0.875rem;
}
.ask-error[hidden] { display: none; }
.ask-side { font-size: 0.9375rem; color: var(--ink-soft); margin-top: 12px; }
.ask-side a { font-weight: 700; }

/* Footer -------------------------------------------------------------------------------- */

.site-footer { background: var(--navy-deep); color: #c6d3e2; }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding-block: 48px 32px;
}
.site-footer h3 {
  color: #fff;
  font-size: 0.9375rem;
  margin-bottom: 12px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 0.875rem; }
.site-footer a { color: #c6d3e2; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-company p { font-size: 0.875rem; margin-bottom: 10px; }
.footer-company .mono { color: #fff; }
.footer-legal {
  border-top: 1px solid #27436b;
  padding-block: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: #93a7bf;
}

/* Responsive --------------------------------------------------------------------------- */

@media (max-width: 1100px) {
  .systems-grid { grid-template-columns: repeat(2, 1fr); }
  .apps-row { grid-template-columns: repeat(3, 1fr); }
  .hero .container { gap: 32px; }
  .primary-nav a { padding: 12px 9px; font-size: 0.875rem; }
}

@media (max-width: 900px) {
  .header-main { grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; gap: 12px 16px; }
  .header-search { grid-column: 1 / -1; grid-row: 2; max-width: none; }
  .primary-nav { display: none; }
  .nav-toggle { display: inline-flex; }

  .hero .container { grid-template-columns: 1fr; padding-block: 40px 48px; }
  .hero-aside { grid-template-columns: 1fr; }
  .hero-photo { display: none; }

  .order-desk, .specialist { grid-template-columns: 1fr; gap: 24px; }
  .section { padding-block: 48px; }
  .section-head { flex-direction: column; gap: 8px; }
  .counter-note { text-align: left; max-width: 60ch; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}

@media (max-width: 820px) {
  /* Parts table becomes stacked cards */
  .table-wrap { border: none; overflow: visible; background: none; }
  .parts-table { min-width: 0; display: block; }
  .parts-table caption { display: block; padding: 0 0 10px; }
  .parts-table thead { position: absolute; width: 1px; height: 1px; margin: -1px; clip: rect(0 0 0 0); overflow: hidden; }
  .parts-table tr, .parts-table td { display: block; }
  .parts-table tbody { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
  .parts-table tr {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    padding: 6px 0;
  }
  .parts-table td { border-bottom: 1px solid var(--alloy-deep); padding: 10px 16px; }
  .parts-table tr td:last-child { border-bottom: none; }
  .parts-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin-bottom: 2px;
  }
  .parts-table td.cell-action { display: flex; gap: 10px; align-items: center; }
}

@media (max-width: 700px) {
  :root { --pad: 16px; }

  .utility-bar .container { gap: 12px; font-size: 0.75rem; flex-wrap: wrap; padding-block: 6px; }
  .utility-bar .u-stock { display: none; }

  .header-main {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
  }
  .header-search {
    grid-column: 1 / -1;
    min-width: 0;
  }
  .logo {
    min-width: 0;
  }
  .logo svg {
    width: 34px;
    height: 34px;
  }
  .logo-word {
    font-size: 1.05rem;
  }
  .logo-word small {
    font-size: 0.58rem;
  }
  .header-actions {
    min-width: 0;
    gap: 4px;
  }
  .header-actions > a:first-of-type {
    display: none;
  }
  .header-actions a {
    min-width: 48px;
    padding-inline: 4px;
  }

  .systems-grid { grid-template-columns: 1fr; }
  .system-card { grid-template-columns: 72px 1fr; padding: 16px; }
  .system-card img { width: 72px; height: 72px; }
  .apps-row { grid-template-columns: repeat(2, 1fr); }

  .dim-grid { grid-template-columns: 1fr 1fr; }
  .dim-grid .dim-submit { grid-column: 1 / -1; }
  .part-row { flex-direction: column; }
  .finder-tab { font-size: 0.8125rem; padding: 8px 6px; }

  .ask-grid { grid-template-columns: 1fr; }

  .qo-line { grid-template-columns: minmax(0, 1.4fr) 74px; }
  .qo-line .qo-status { grid-column: 1 / -1; }

  .result-item { grid-template-columns: 1fr; }
  .result-actions { grid-row: auto; }

  .parts-table tbody { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .apps-row { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.625rem; }
  .header-actions a { min-width: 48px; }
}
