:root {
  color-scheme: light;
  --navy: #111827;
  --navy-2: #1f2937;
  --blue: #075fb7;
  --blue-dark: #064e96;
  --blue-soft: #eaf4ff;
  --red: #e10600;
  --ink: #172033;
  --muted: #526277;
  --line: #dfe5ec;
  --soft: #f4f7fa;
  --white: #ffffff;
  --success: #087858;
  --focus: #66b5ff;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--soft);
  min-width: 320px;
}

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

.sr-only,
.skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: white;
  color: var(--navy);
}

.topbar {
  min-height: 76px;
  display: grid;
  grid-template-columns: 360px minmax(280px, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 12px 24px;
  background: var(--navy);
  color: white;
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(225,6,0,.72);
}

.top-actions { display: flex; align-items: center; gap: 10px; }
.language-switch { display: inline-flex; padding: 3px; border: 1px solid rgba(255,255,255,.2); border-radius: 9px; background: rgba(255,255,255,.05); }
.language-switch button { min-width: 84px; height: 34px; padding: 0 9px; border: 0; border-radius: 6px; color: #a8b3c1; background: transparent; font-size: 11px; font-weight: 800; letter-spacing: .02em; white-space: nowrap; }
.language-switch button span { font-size: 15px; margin-right: 4px; }
.language-switch button.active { color: var(--navy); background: white; }

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  color: white;
  text-decoration: none;
  width: fit-content;
}

.primary-logo { display: block; width: 162px; height: 62px; object-fit: contain; }

.brand-copy { display: grid; line-height: 1.05; }
.brand-copy strong { color: white; letter-spacing: .08em; font-size: 12px; }
.brand-copy small { color: #a8b3c1; font-size: 10px; margin-top: 5px; letter-spacing: .04em; text-transform: uppercase; }

.search-shell {
  height: 48px;
  display: grid;
  grid-template-columns: 24px 1fr auto auto;
  align-items: center;
  gap: 10px;
  border-radius: 10px;
  background: white;
  padding: 0 12px 0 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
}

.search-shell:focus-within { outline: 3px solid rgba(102, 181, 255, .45); }
.search-shell svg { width: 21px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.search-shell input { border: 0; outline: 0; min-width: 0; width: 100%; color: var(--ink); font-size: 15px; }
.search-shell input::placeholder { color: #718096; }
.search-shell kbd { color: #718096; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 2px 8px; font-size: 12px; background: var(--soft); }

.clear-search {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: var(--soft);
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
}

.filter-button {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  font-weight: 650;
}

.filter-button {
  min-height: 44px;
  color: #eaf4ff;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.06);
  padding: 0 15px;
}

.filter-button:hover { background: rgba(255,255,255,.12); }
.filter-button svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.filter-count { min-width: 20px; height: 20px; border-radius: 10px; background: var(--blue); display: grid; place-items: center; font-size: 11px; color: white; }

.app-shell {
  min-height: calc(100vh - 76px);
  display: grid;
  grid-template-columns: 276px minmax(0, 1fr);
}

.sidebar {
  background: white;
  border-right: 1px solid var(--line);
  padding: 26px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar-heading {
  padding: 0 12px 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .13em;
  color: #8a98aa;
  text-transform: uppercase;
}

#category-nav { display: grid; gap: 8px; }

.category-button {
  width: 100%;
  min-height: 52px;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: center;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 8px 12px;
  color: var(--muted);
  background: transparent;
}

.category-button:hover { background: #f7f9fc; color: var(--ink); }
.category-button.active { color: var(--blue-dark); border-color: #9ecbfa; background: var(--blue-soft); font-weight: 700; }
.category-icon { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--soft); font-size: 12px; font-weight: 800; }
.category-button.active .category-icon { background: #dbeeff; }

.workspace { min-width: 0; padding: 34px clamp(20px, 4vw, 56px) 52px; }
.workspace-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 24px; }
.eyebrow { color: var(--red); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 8px; }
h1 { margin: 0; font-size: clamp(26px, 3vw, 38px); letter-spacing: -.035em; color: var(--ink); }
.workspace-head p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.workspace-head .market-line { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 12px; color: var(--muted); font-size: 11px; }
.market-line strong { color: var(--ink); font-size: 11px; letter-spacing: .03em; }
.market-line b { color: var(--red); font-weight: 400; }

.compatibility-card {
  flex: 0 0 auto;
  min-width: 270px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f3f9ff;
}
.compatibility-card > label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.compatibility-card select { width: 100%; height: 40px; padding: 0 34px 0 11px; border: 1px solid #9ecbfa; border-radius: 8px; color: var(--ink); background: white; font-weight: 750; }
.software-status { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 8px; }
.software-status > span { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; padding: 7px 8px; border: 1px solid var(--line); border-radius: 7px; background: white; }
.software-status small { color: var(--muted); font-size: 8px; font-weight: 750; line-height: 1.2; text-transform: uppercase; }
.software-status strong { color: var(--blue-dark); font-size: 12px; }
.compatibility-card > p { margin: 7px 0 0; color: var(--muted); font-size: 9px; line-height: 1.35; }
.compatibility-card > p strong { color: var(--ink); }

.quick-start {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: -4px 0 14px;
  padding: 0;
  list-style: none;
}
.quick-start li { display: flex; align-items: center; gap: 9px; min-height: 42px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px; background: white; }
.quick-start li > span { flex: 0 0 auto; width: 23px; height: 23px; display: grid; place-items: center; border-radius: 50%; color: var(--blue-dark); background: var(--blue-soft); font-size: 10px; font-weight: 850; }
.quick-start strong { color: var(--ink); font-size: 11px; }

.field-guide { margin-bottom: 16px; border: 1px solid var(--line); border-radius: 11px; background: var(--white); }
.field-guide summary { min-height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 15px; color: var(--ink); cursor: pointer; font-size: 12px; font-weight: 750; list-style: none; }
.field-guide summary::-webkit-details-marker { display: none; }
.field-guide summary::after { content: "+"; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: var(--blue-dark); background: var(--blue-soft); font-size: 16px; }
.field-guide[open] summary::after { content: "−"; }
.field-guide summary small { margin-left: auto; color: #718096; font-size: 10px; font-weight: 650; }
.field-guide-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.field-guide-grid article { padding: 14px 15px; border-right: 1px solid var(--line); }
.field-guide-grid article:last-child { border-right: 0; }
.field-guide-grid strong { color: var(--ink); font-size: 11px; }
.field-guide-grid p { margin: 6px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }

.source-notice {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 18px 0 0;
  padding: 12px 14px;
  border: 1px solid #cbdff4;
  border-left: 3px solid var(--blue);
  border-radius: 10px;
  background: #f5f9fd;
}
.source-notice-icon { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--blue-dark); font-size: 12px; font-weight: 850; font-style: normal; }
.source-notice p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.source-notice > a { display: grid; grid-template-columns: auto 12px; align-items: center; gap: 2px 5px; min-width: 174px; padding: 8px 11px; border: 1px solid #9ecbfa; border-radius: 8px; color: var(--blue-dark); background: white; font-size: 11px; font-weight: 800; text-decoration: none; }
.source-notice > a:hover { border-color: var(--blue); background: var(--blue-soft); }
.source-notice > a:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.source-notice small { grid-column: 1 / -1; color: var(--muted); font-size: 9px; font-weight: 650; }

.filter-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr)) auto;
  gap: 14px;
  align-items: end;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: white;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}

.filter-field { display: grid; gap: 7px; }
.filter-field label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 750; }
.filter-field select,
.rows-control select {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: var(--ink);
}
.filter-field select { height: 40px; padding: 0 34px 0 11px; }
.reset-filters { height: 40px; border: 0; background: transparent; color: var(--blue-dark); font-weight: 700; padding: 0 8px; }

.table-meta { display: flex; justify-content: space-between; align-items: center; min-height: 38px; gap: 18px; }
.table-meta p { margin: 0; color: var(--muted); font-size: 13px; }
.table-meta > div { display: grid; gap: 4px; }
.table-meta small { color: #718096; font-size: 10px; line-height: 1.4; }
.table-meta strong { color: var(--ink); }
.rows-control { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.rows-control select { height: 30px; padding: 0 24px 0 9px; }

.table-card { margin-top: 10px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: var(--shadow); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 1500px; table-layout: fixed; }
th, td { border-bottom: 1px solid #e7ebf0; padding: 15px 16px; text-align: left; vertical-align: top; }
th { background: #f1f4f7; color: var(--muted); font-size: 10px; line-height: 1.35; text-transform: uppercase; letter-spacing: .07em; white-space: normal; vertical-align: middle; }
th button { border: 0; padding: 0; background: transparent; color: inherit; font-weight: inherit; line-height: inherit; text-align: left; text-transform: inherit; letter-spacing: inherit; }
th button > span:last-child { display: inline-block; width: 8px; margin-left: 3px; color: var(--blue); }
th button.sorted-asc > span:last-child::after { content: "↑"; }
th button.sorted-desc > span:last-child::after { content: "↓"; }
td { font-size: 12px; line-height: 1.45; color: var(--ink); }
tbody tr:hover td { background: #f8fbfe; }
th:nth-child(1), td:nth-child(1) { width: 138px; }
th:nth-child(2), td:nth-child(2) { width: 78px; text-align: center; }
th:nth-child(3), td:nth-child(3) { width: 112px; }
th:nth-child(4), td:nth-child(4) { width: 350px; }
th:nth-child(5), td:nth-child(5) { width: 100px; }
th:nth-child(6), td:nth-child(6) { width: 100px; }
th:nth-child(7), td:nth-child(7) { width: 190px; }
th:nth-child(8), td:nth-child(8) { width: 170px; }
th:nth-child(9), td:nth-child(9) { width: 145px; }
th:nth-child(10), td:nth-child(10) { width: 120px; text-align: center; }
.part-number { font-weight: 780; color: var(--ink); font-variant-numeric: tabular-nums; }
.muted-cell { color: #718096; }
.coding-yes { color: var(--success); font-weight: 750; }
.coding-no { color: #718096; font-weight: 650; }
.yes { color: var(--success); font-weight: 700; }
.no { color: #718096; }

.brand-roles {
  min-height: 96px;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) 1px minmax(260px, 1fr);
  align-items: center;
  gap: 24px;
  margin-top: 24px;
  padding: 18px;
  border-top: 1px solid var(--line);
}
.brand-role { display: flex; align-items: center; gap: 16px; }
.brand-role > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.brand-role img { display: block; height: auto; object-fit: contain; }
.manufacturer-role { justify-content: flex-start; }
.manufacturer-role img { width: 160px; }
.distributor-role { justify-content: flex-end; }
.distributor-role img { width: 205px; max-height: 82px; }
.brand-role-divider { width: 1px; height: 52px; background: var(--line); }
.partnership-note { grid-column: 1 / -1; margin: -4px 0 0; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.5; text-align: center; }

.pagination { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 16px; color: var(--muted); font-size: 12px; }
.page-actions { display: flex; gap: 6px; align-items: center; }
.page-actions > button,
#page-numbers button { min-width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: white; }
.page-actions button:hover:not(:disabled) { border-color: #9ecbfa; color: var(--blue); background: #f5faff; }
.page-actions button:disabled { opacity: .35; cursor: default; }
#page-numbers { display: flex; gap: 5px; }
#page-numbers button.active { color: white; background: var(--blue); border-color: var(--blue); font-weight: 750; }
.page-gap { display: inline-grid; width: 28px; place-items: center; color: #718096; }

.empty-state { text-align: center; padding: 70px 20px; }
.empty-icon { width: 56px; height: 56px; display: grid; place-items: center; margin: 0 auto 14px; border-radius: 50%; color: var(--muted); background: var(--soft); font-size: 30px; }
.empty-state h2 { margin: 0 0 8px; font-size: 18px; }
.empty-state p { margin: 0 0 18px; color: var(--muted); font-size: 13px; }
.empty-state button { border: 0; border-radius: 8px; color: white; background: var(--blue); padding: 10px 14px; font-weight: 700; }

@media (max-width: 980px) {
  .topbar { grid-template-columns: auto 1fr auto; gap: 14px; padding-inline: 16px; }
  .primary-logo { width: 142px; height: 56px; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: sticky; top: 76px; z-index: 12; flex-direction: row; align-items: center; overflow-x: auto; padding: 10px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar-heading { display: none; }
  #category-nav { display: flex; gap: 8px; }
  .category-button { width: auto; min-height: 42px; grid-template-columns: auto; white-space: nowrap; padding: 5px 12px; }
  .category-icon { display: none; }
  .workspace { padding-top: 26px; }
  .field-guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field-guide-grid article:nth-child(2) { border-right: 0; }
  .field-guide-grid article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .source-notice { grid-template-columns: 28px 1fr; }
  .source-notice > a { grid-column: 2; width: fit-content; }
}

@media (max-width: 760px) {
  .topbar { min-height: 116px; grid-template-columns: 1fr auto; gap: 9px 12px; padding: 10px 12px; }
  .brand { grid-column: 1; grid-row: 1; }
  .primary-logo { width: 124px; height: 48px; }
  .brand { align-items: flex-start; flex-direction: column; gap: 2px; }
  .brand-copy strong { max-width: 124px; font-size: 7px; line-height: 1.15; letter-spacing: .04em; }
  .brand-copy small { display: none; }
  .top-actions { grid-column: 2; grid-row: 1; }
  .search-shell { grid-column: 1 / -1; grid-row: 2; height: 44px; padding-inline: 12px; grid-template-columns: 20px 1fr auto; }
  .search-shell kbd { display: none; }
  .filter-button { width: 42px; min-width: 42px; height: 42px; padding: 0; }
  .filter-button > span:not(.filter-count) { display: none; }
  .filter-count { position: absolute; margin: -32px 0 0 31px; }
  .sidebar { top: 116px; }
  .workspace { padding: 22px 12px 36px; }
  .workspace-head { align-items: stretch; flex-direction: column; margin-bottom: 18px; }
  .workspace-head p { max-width: 85%; }
  .compatibility-card { min-width: 0; width: 100%; }
  .quick-start { grid-template-columns: 1fr; }
  .top-actions { gap: 6px; }
  .language-switch button { min-width: 34px; width: 34px; padding: 0; font-size: 0; }
  .language-switch button span { margin: 0; font-size: 17px; }
  .filter-panel { grid-template-columns: 1fr; gap: 12px; }
  .reset-filters { justify-self: start; padding-left: 0; }
  .table-meta { align-items: end; }
  .table-meta p { max-width: 70%; }
  .field-guide summary small { display: none; }
  .field-guide-grid { grid-template-columns: 1fr; }
  .field-guide-grid article { border-right: 0; border-bottom: 1px solid var(--line); }
  .field-guide-grid article:last-child { border-bottom: 0; }
  .source-notice { grid-template-columns: 1fr; gap: 9px; padding: 13px; }
  .source-notice-icon { display: none; }
  .source-notice > a { grid-column: 1; width: 100%; }
  .table-card { border: 0; background: transparent; box-shadow: none; }
  .table-scroll { overflow: visible; }
  table { display: block; min-width: 0; }
  thead { display: none; }
  tbody { display: grid; gap: 12px; }
  tbody tr { display: block; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: white; box-shadow: 0 8px 24px rgba(15, 23, 42, .06); }
  tbody td { width: auto !important; display: grid; grid-template-columns: minmax(112px, 38%) 1fr; gap: 12px; padding: 10px 13px; text-align: left !important; overflow-wrap: anywhere; }
  tbody td::before { content: attr(data-label); color: #718096; font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
  tbody td.part-number { padding-block: 13px; color: #0b5fae; background: #edf6ff; font-size: 14px; }
  tbody tr:hover td { background: white; }
  tbody tr:hover td.part-number { background: #edf6ff; }
  tbody td[hidden] { display: none !important; }
  .pagination { align-items: flex-start; flex-direction: column; }
  #page-numbers button:nth-child(n+5) { display: none; }
  .brand-roles { grid-template-columns: 1fr; gap: 16px; margin-top: 18px; padding-inline: 8px; }
  .brand-role { justify-content: center; flex-direction: column; gap: 8px; text-align: center; }
  .brand-role-divider { width: 70%; height: 1px; justify-self: center; }
  .manufacturer-role img { width: 156px; }
  .distributor-role img { width: 190px; }
}

@media (prefers-reduced-motion: no-preference) {
  .category-button, .filter-button, tbody td { transition: .16s ease; }
}
