:root {
  --pbd-bg: #f5f5f4;
  --pbd-panel: #ffffff;
  --pbd-panel-soft: #f8fafc;
  --pbd-text: #111827;
  --pbd-muted: #64748b;
  --pbd-subtle: #94a3b8;
  --pbd-border: #e5e7eb;
  --pbd-orange: #ea580c;
  --pbd-orange-soft: #fff7ed;
  --pbd-green: #15803d;
  --pbd-yellow: #a16207;
  --pbd-red: #b91c1c;
  --pbd-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body.pbd-standalone {
  margin: 0;
  background: var(--pbd-bg);
  color: var(--pbd-text);
  font-family: Arial, Helvetica, sans-serif;
}

html.pbd-modal-open,
body.pbd-modal-open {
  overflow: hidden;
  overscroll-behavior: contain;
}

.pbd-page a,
.ecosystem-page a {
  color: inherit;
}

.pbd-page button,
.pbd-page input,
.pbd-page select,
.ecosystem-page button,
.ecosystem-page input,
.ecosystem-page select {
  font: inherit;
}

.pbd-page {
  min-height: 100vh;
  padding: 24px 0 48px;
  background: var(--pbd-bg);
  color: var(--pbd-text);
  font-family: Arial, Helvetica, sans-serif;
}

.pbd-page [id],
.pbd-layout [id] {
  scroll-margin-top: 96px;
}

.pbd-container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.pbd-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--pbd-muted);
  font-size: 14px;
}

.pbd-breadcrumbs a {
  color: var(--pbd-orange);
  font-weight: 700;
  text-decoration: none;
}

.pbd-breadcrumbs a:hover {
  text-decoration: underline;
}

.pbd-page-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 16px;
}

.pbd-page-header h1 {
  margin: 0;
  max-width: 860px;
  color: var(--pbd-text);
  font-size: clamp(28px, 3.8vw, 42px);
  line-height: 1.05;
  letter-spacing: 0;
}

.pbd-page-header p {
  max-width: 820px;
  margin: 14px 0 0;
  color: var(--pbd-muted);
  font-size: 16px;
  line-height: 1.5;
}

.pbd-kicker {
  margin: 0 0 6px;
  color: var(--pbd-orange);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pbd-header-status {
  display: grid;
  justify-items: end;
  gap: 8px;
  color: var(--pbd-muted);
  font-size: 13px;
  white-space: nowrap;
}

.pbd-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 2.1fr);
  gap: 18px;
  align-items: start;
}

@media (min-width: 1101px) {
  .pbd-layout {
    width: min(1400px, calc(100vw - 48px));
    margin-left: 50%;
    margin-right: auto;
    transform: translateX(-50%);
    grid-template-columns: minmax(280px, 0.72fr) minmax(0, 2.28fr);
  }
}

.pbd-diagram-panel {
  min-width: 0;
}

.pbd-diagram-card {
  position: sticky;
  top: 24px;
  background: var(--pbd-panel);
  border: 1px solid var(--pbd-border);
  border-radius: 8px;
  box-shadow: var(--pbd-shadow);
  padding: 12px;
}

.pbd-diagram-card.is-zoomed {
  border-color: rgba(234, 88, 12, 0.45);
}

.wsp-lookup-first .wsp-ownership-funnel {
  margin-top: 18px;
}

.wsp-lookup-first .wsp-ownership-funnel .wsp-funnel-hero,
.wsp-lookup-first .wsp-ownership-funnel .wsp-funnel-section[aria-label="Breakdown diagram and parts table"] {
  display: none;
}

.pbd-diagram-card-header,
.pbd-table-toolbar,
.pbd-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.pbd-diagram-card h2,
.pbd-table-toolbar h2,
.pbd-modal-header h2,
.pbd-section-heading h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: 0;
}

.pbd-zoom-controls {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  background: var(--pbd-panel-soft);
  border: 1px solid var(--pbd-border);
  border-radius: 8px;
}

.pbd-zoom-button,
.pbd-modal-close {
  min-width: 42px;
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  color: var(--pbd-text);
  background: transparent;
  cursor: pointer;
  font-weight: 800;
}

.pbd-zoom-button:hover,
.pbd-zoom-button.is-active,
.pbd-modal-close:hover {
  background: var(--pbd-orange);
  color: #ffffff;
}

.pbd-diagram-zoom-trigger {
  position: relative;
  display: block;
  width: 100%;
  margin: 14px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.pbd-diagram-scroll {
  display: block;
  max-height: min(76vh, 780px);
  min-height: 260px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--pbd-border);
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
  scroll-padding-top: 12px;
  cursor: grab;
  scrollbar-gutter: stable;
}

.pbd-diagram-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  transform: none;
  object-position: top center;
  transition: width 180ms ease, max-height 180ms ease;
  user-select: none;
  -webkit-user-drag: none;
}

.pbd-diagram-scroll.is-dragging,
.pbd-modal-scroll.is-dragging,
.pbd-diagram-scroll.is-dragging *,
.pbd-modal-scroll.is-dragging * {
  cursor: grabbing;
}

.pbd-diagram-scroll[data-pbd-zoom-level="2"] .pbd-diagram-image,
.pbd-modal-scroll[data-pbd-zoom-level="2"] .pbd-diagram-image {
  width: 200%;
  max-width: none;
  max-height: none;
}

.pbd-section-jump-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}

.pbd-section-jump-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--pbd-border);
  border-radius: 6px;
  background: #ffffff;
  color: var(--pbd-text);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.pbd-section-jump-nav a:hover {
  border-color: var(--pbd-orange);
  color: var(--pbd-orange);
}

.pbd-alt-diagram-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.pbd-alt-diagram-card {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--pbd-border);
  border-radius: 6px;
  background: var(--pbd-panel-soft);
  color: var(--pbd-text);
  text-decoration: none;
}

.pbd-alt-diagram-card:hover {
  border-color: var(--pbd-orange);
}

.pbd-alt-diagram-card img {
  width: 100%;
  height: 72px;
  object-fit: contain;
  background: #ffffff;
  border-radius: 4px;
}

.pbd-alt-diagram-card span {
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.pbd-source-note,
.pbd-page-source-summary {
  width: min(1180px, calc(100% - 32px));
  margin: 14px auto 0;
  color: var(--pbd-muted);
  font-size: 13px;
  line-height: 1.45;
}

.pbd-part-number a {
  color: var(--pbd-orange);
  text-decoration: none;
}

.pbd-part-number a:hover {
  text-decoration: underline;
}

.pbd-diagram-scroll[data-pbd-zoom-level="3"] .pbd-diagram-image,
.pbd-modal-scroll[data-pbd-zoom-level="3"] .pbd-diagram-image {
  width: 300%;
  max-width: none;
  max-height: none;
}

.pbd-zoom-hint {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  opacity: 0;
  pointer-events: none;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.9);
  color: #ffffff;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 800;
  transition: opacity 160ms ease;
}

.pbd-diagram-zoom-trigger:hover .pbd-zoom-hint {
  opacity: 1;
}

.pbd-diagram-note,
.pbd-source-inline {
  color: var(--pbd-muted);
  font-size: 13px;
  line-height: 1.45;
}

.pbd-diagram-note {
  margin: 12px 0 0;
}

.pbd-callout-index {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid var(--pbd-border);
  border-radius: 8px;
}

.pbd-callout-index-label {
  flex: 1 0 100%;
  color: var(--pbd-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.pbd-callout-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 32px;
  padding: 5px 9px;
  color: var(--pbd-text);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--pbd-border);
  border-radius: 6px;
}

.pbd-callout-link:hover,
.pbd-callout-link:focus {
  color: #fff;
  background: var(--pbd-orange);
  border-color: var(--pbd-orange);
}

.pbd-row-anchor {
  color: inherit;
  text-decoration: none;
}

.pbd-row-anchor:hover,
.pbd-row-anchor:focus {
  color: var(--pbd-orange);
  text-decoration: underline;
}

.pbd-source-inline {
  margin: 8px 0 0;
}

.pbd-table-panel,
.parts-breakdown-table-wrap,
.parts-table-section,
.wsp-parts-table-container {
  width: 100%;
  max-width: min(1400px, calc(100vw - 48px));
  min-width: 0;
  overflow: hidden;
  background: var(--pbd-panel);
  border: 1px solid var(--pbd-border);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.pbd-table-toolbar {
  padding: 12px 14px;
  border-bottom: 1px solid var(--pbd-border);
}

.pbd-filter-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.3fr) minmax(170px, 0.8fr);
  gap: 10px;
  align-items: end;
}

.pbd-table-filter.pbd-secondary-filter {
  display: none;
}

.pbd-table-filter {
  display: grid;
  gap: 6px;
  color: var(--pbd-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.pbd-table-filter input,
.pbd-table-filter select {
  width: 100%;
  min-height: 40px;
  padding: 10px 12px;
  border: 1px solid var(--pbd-border);
  border-radius: 8px;
  color: var(--pbd-text);
  background: #ffffff;
}

.pbd-mobile-table-tools {
  display: none;
}

.pbd-disclosure {
  margin: 0;
  padding: 10px 16px;
  border-bottom: 1px solid var(--pbd-border);
  background: var(--pbd-orange-soft);
  color: #7c2d12;
  font-size: 13px;
  line-height: 1.45;
}

.pbd-trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 9px 14px;
  border-top: 1px solid var(--pbd-border);
  border-bottom: 1px solid var(--pbd-border);
  background: #f8fafc;
}

.pbd-trust-badge,
.pbd-row-trust-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.15;
}

.pbd-trust-badge {
  padding: 6px 9px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: #334155;
  background: #ffffff;
}

.pbd-trust-badge-compat {
  border-color: rgba(37, 99, 235, 0.2);
  color: #1d4ed8;
  background: #eff6ff;
}

.pbd-trust-badge-oem {
  border-color: rgba(21, 128, 61, 0.2);
  color: #166534;
  background: #f0fdf4;
}

.pbd-trust-badge-warning {
  border-color: rgba(245, 158, 11, 0.3);
  color: #92400e;
  background: #fffbeb;
}

.pbd-trust-badge-date {
  border-color: rgba(100, 116, 139, 0.18);
  color: #475569;
  background: #f8fafc;
}

.pbd-common-replacements {
  margin-top: 12px;
  border: 1px solid rgba(21, 128, 61, 0.18);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.055);
  overflow: hidden;
}

.pbd-common-replacements-heading {
  display: grid;
  gap: 4px;
  padding: 13px 14px 11px;
  border-bottom: 1px solid rgba(21, 128, 61, 0.14);
}

.pbd-common-replacements-heading h2,
.pbd-fitment-helper h3,
.pbd-replace-first-strip h3 {
  margin: 0;
  color: var(--pbd-text);
  font-size: 18px;
  line-height: 1.2;
}

.pbd-common-replacements-heading p,
.pbd-fitment-helper p {
  margin: 0;
  color: var(--pbd-muted);
  font-size: 13px;
  line-height: 1.45;
}

.pbd-common-replacement-list {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.pbd-common-replacement-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
  padding: 10px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: #ffffff;
}

.pbd-common-part-label {
  display: block;
  margin-bottom: 3px;
  color: var(--pbd-muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.pbd-common-replacement-card strong {
  display: block;
  color: var(--pbd-text);
  font-size: 16px;
  line-height: 1.2;
}

.pbd-common-replacement-card p {
  margin: 5px 0 0;
  color: #334155;
  font-size: 13px;
  line-height: 1.35;
}

.pbd-common-amazon-button,
.pbd-common-table-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 7px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
}

.pbd-common-amazon-button {
  border: 1px solid #d97706;
  background: #fbbf24;
  color: #111827 !important;
  box-shadow: 0 8px 14px rgba(146, 64, 14, 0.14);
}

.pbd-common-amazon-button:hover,
.pbd-common-amazon-button:focus {
  background: #f59e0b;
  text-decoration: none;
}

.pbd-common-table-link {
  border: 1px solid rgba(37, 99, 235, 0.2);
  background: #eff6ff;
  color: #1d4ed8 !important;
}

.pbd-fitment-helper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border-top: 1px solid var(--pbd-border);
  border-bottom: 1px solid var(--pbd-border);
  background: #f8fafc;
}

.pbd-table-panel .pbd-fitment-helper h3 {
  color: var(--pbd-text) !important;
}

.pbd-fitment-helper a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 7px;
  padding: 9px 13px;
  background: #111827;
  color: #ffffff !important;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.pbd-fitment-helper a:hover {
  background: #374151;
}

.pbd-replace-first-strip {
  display: grid;
  grid-template-columns: minmax(145px, auto) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-top: 1px solid var(--pbd-border);
  border-bottom: 1px solid var(--pbd-border);
  background: #fff7ed;
}

.pbd-replace-first-strip ol {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  padding: 0;
  counter-reset: replace-first;
  list-style: none;
}

.pbd-replace-first-strip li {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid rgba(234, 88, 12, 0.18);
  border-radius: 999px;
  padding: 5px 9px;
  background: #ffffff;
  color: #7c2d12;
  font-size: 12px;
  font-weight: 900;
}

.pbd-replace-first-strip li::before {
  counter-increment: replace-first;
  content: counter(replace-first);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-right: 6px;
  border-radius: 999px;
  background: var(--pbd-orange);
  color: #ffffff;
  font-size: 11px;
}

.pbd-decision-flow {
  width: 100%;
  max-width: min(1400px, calc(100vw - 48px));
  margin: 12px auto 0;
  padding: 13px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-left: 5px solid #2563eb;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.pbd-decision-flow-mig {
  border-left-color: #ea580c;
}

.pbd-decision-flow-plasma {
  border-left-color: #2563eb;
}

.pbd-decision-flow-tig {
  border-left-color: #7c3aed;
}

.pbd-decision-flow-ppe {
  border-left-color: #0891b2;
}

.pbd-decision-flow-gas {
  border-left-color: #15803d;
}

.pbd-decision-heading {
  display: grid;
  gap: 4px;
  max-width: 860px;
  margin-bottom: 10px;
}

.pbd-decision-kicker {
  margin: 0;
  color: var(--pbd-orange);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.pbd-decision-heading h2 {
  margin: 0;
  color: var(--pbd-text);
  font-size: clamp(20px, 2.4vw, 24px);
  line-height: 1.15;
}

.pbd-decision-heading p {
  margin: 0;
  color: var(--pbd-muted);
  font-size: 14px;
  line-height: 1.55;
}

.pbd-decision-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.pbd-decision-card {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: #f8fafc;
}

.pbd-decision-card h3 {
  margin: 0 0 10px;
  color: var(--pbd-text);
  font-size: 15px;
  line-height: 1.25;
}

.pbd-decision-card ol {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 19px;
  color: #334155;
  font-size: 13px;
  line-height: 1.4;
}

.pbd-decision-card li::marker {
  color: var(--pbd-orange);
  font-weight: 900;
}

.pbd-table-scroll {
  max-height: min(78vh, 920px);
  max-width: 100%;
  overflow: auto;
  overflow-x: auto;
  /* Wide tables pan sideways without trapping vertical page scrolling. */
  overscroll-behavior: contain auto;
  -webkit-overflow-scrolling: touch;
}

.pbd-table {
  width: 100%;
  table-layout: auto;
  border-collapse: collapse;
  font-size: 13.5px;
}

.pbd-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f3f4f6;
}

.pbd-table th,
.pbd-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--pbd-border);
  vertical-align: middle;
  text-align: left;
  overflow-wrap: anywhere;
  word-break: normal;
}

.pbd-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f3f4f6;
  color: var(--pbd-text);
  font-size: 12.5px;
  font-weight: 900;
  white-space: nowrap;
}

.pbd-table th:nth-child(1),
.pbd-table td:nth-child(1) {
  width: 12%;
  min-width: 82px;
}

.pbd-table th:nth-child(2),
.pbd-table td:nth-child(2) {
  width: 16%;
  min-width: 132px;
}

.pbd-table th:nth-child(3),
.pbd-table td:nth-child(3) {
  width: 60%;
  min-width: 360px;
}

.pbd-table th:last-child,
.pbd-table td:last-child {
  width: 20%;
  min-width: 170px;
}

.pbd-table.pbd-has-status-col .pbd-status-column {
  display: none;
}

.pbd-table tbody tr:hover,
.pbd-table tbody tr.is-highlighted {
  background: #fff7ed;
}

.pbd-table tbody tr.pbd-row-common-wear {
  background: linear-gradient(90deg, rgba(240, 253, 244, 0.95), #ffffff 48%);
}

.pbd-table tbody tr.pbd-row-common-wear:hover,
.pbd-table tbody tr.pbd-row-common-wear.is-highlighted {
  background: #ecfdf5;
}

.pbd-item-number {
  color: var(--pbd-text);
  font-weight: 900;
  white-space: nowrap;
}

.pbd-part-number code {
  color: var(--pbd-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-weight: 900;
  white-space: nowrap;
}

.pbd-part-link {
  color: var(--pbd-orange);
  text-decoration: none;
}

.pbd-part-link:hover {
  text-decoration: underline;
}

.pbd-description {
  min-width: 320px;
  color: #374151;
  line-height: 1.42;
}

.pbd-row-meta,
.pbd-row-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.pbd-row-meta {
  gap: 5px;
  margin-top: 5px;
}

.pbd-row-meta span {
  color: #64748b;
}

.pbd-row-support-details {
  margin-top: 7px;
}

.pbd-row-support-details summary {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

.pbd-row-support-details[open] summary {
  margin-bottom: 6px;
}

.pbd-row-meta span,
.pbd-card-meta,
.pbd-buy-status,
.pbd-discontinued,
.wsp-amazon-not-available {
  color: var(--pbd-muted);
  font-size: 12px;
  line-height: 1.45;
}

.wsp-amazon-grouped-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
  min-width: 154px;
}

.wsp-amazon-grouped-links .wsp-amazon-buy-button,
.wsp-amazon-grouped-links .wsp-amazon-not-available {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--pbd-border);
  border-radius: 8px;
  padding: 5px 8px;
  background: #f8fafc;
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
}

.wsp-amazon-grouped-links .wsp-amazon-buy-button {
  border-color: rgba(21, 128, 61, 0.28);
  background: #f0fdf4;
  color: var(--pbd-green);
}

.pbd-status,
.pbd-compat,
.pbd-trouble-chip,
.pbd-common-replacement {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid var(--pbd-border);
  border-radius: 999px;
  padding: 3px 7px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.pbd-status-verified {
  border-color: rgba(21, 128, 61, 0.24);
  background: #f0fdf4;
  color: var(--pbd-green);
}

.pbd-status-reviewer_approved {
  border-color: rgba(4, 120, 87, 0.24);
  background: #ecfdf5;
  color: #047857;
}

.pbd-status-needs_oem_review,
.pbd-status-needs_review,
.pbd-status-needs_verification {
  border-color: rgba(161, 98, 7, 0.24);
  background: #fefce8;
  color: var(--pbd-yellow);
}

.pbd-status-rejected,
.pbd-status-discontinued {
  border-color: rgba(185, 28, 28, 0.24);
  background: #fef2f2;
  color: var(--pbd-red);
}

.pbd-compat {
  gap: 6px;
  border-radius: 6px;
  text-decoration: none;
}

.pbd-compat:hover {
  border-color: rgba(234, 88, 12, 0.36);
}

.pbd-trouble-chip {
  border-color: rgba(234, 88, 12, 0.2);
  background: var(--pbd-orange-soft);
  color: #9a3412;
  text-decoration: none;
}

.pbd-trouble-chip:hover {
  border-color: rgba(234, 88, 12, 0.42);
}

.pbd-common-replacement {
  border-color: rgba(21, 128, 61, 0.22);
  background: #f0fdf4;
  color: var(--pbd-green) !important;
  font-weight: 900;
}

.pbd-compat-pending {
  color: var(--pbd-muted);
}

.pbd-buy-cell {
  min-width: 170px;
  text-align: center;
  white-space: normal;
}

.pbd-buy-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid rgba(100, 116, 139, 0.16);
  border-radius: 7px;
  padding: 7px 9px;
  background: #f8fafc;
  color: #64748b;
  font-weight: 800;
  text-align: center;
}

.pbd-buy-cell .pbd-amazon-button,
.pbd-buy-cell .wsp-amazon-buy-button,
.pbd-buy-cell .wsp-amazon-not-available,
.wsp-amazon-grouped-links .wsp-amazon-buy-button {
  max-width: 100%;
  white-space: normal;
  text-align: center;
}

.pbd-row-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 5px;
  margin-top: 9px;
}

.pbd-row-trust-badge {
  min-height: 24px;
  padding: 5px 7px;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.pbd-row-trust-badge-wear {
  color: #166534;
  background: #ecfdf5;
}

.pbd-row-trust-badge-wear::before {
  content: "\2605";
  margin-right: 5px;
}

.pbd-row-trust-badge-discontinued {
  color: #9a3412;
  background: #ffedd5;
}

.pbd-row-trust-badge-warning {
  color: #92400e;
  background: #fef3c7;
}

@media (max-width: 900px) {
  .pbd-fitment-helper,
  .pbd-replace-first-strip {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .pbd-decision-grid {
    grid-template-columns: 1fr;
  }

  .pbd-filter-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .pbd-page [id],
  .pbd-layout [id] {
    scroll-margin-top: 132px;
  }

  .pbd-decision-flow {
    max-width: calc(100vw - 24px);
    margin-top: 14px;
    padding: 14px;
  }

  .pbd-decision-card {
    padding: 12px;
  }

  .pbd-common-replacements,
  .pbd-fitment-helper,
  .pbd-replace-first-strip {
    border-radius: 8px;
  }

  .pbd-fitment-helper {
    padding: 12px;
  }

  .pbd-fitment-helper a,
  .pbd-common-amazon-button,
  .pbd-common-table-link {
    width: 100%;
  }
}

.pbd-amazon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pbd-buy-cell .pbd-amazon-button,
.pbd-buy-cell .wsp-amazon-buy-button,
.wsp-amazon-grouped-links .wsp-amazon-buy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 128px;
  min-height: 44px;
  margin: 0;
  border: 1px solid #d97706;
  border-radius: 7px;
  padding: 10px 14px;
  background: #fbbf24;
  color: #111827 !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.48) inset, 0 8px 14px rgba(146, 64, 14, 0.14);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: 0;
  text-decoration: none;
  transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
}

.pbd-buy-cell .pbd-amazon-button:hover,
.pbd-buy-cell .pbd-amazon-button:focus,
.pbd-buy-cell .wsp-amazon-buy-button:hover,
.pbd-buy-cell .wsp-amazon-buy-button:focus,
.wsp-amazon-grouped-links .wsp-amazon-buy-button:hover,
.wsp-amazon-grouped-links .wsp-amazon-buy-button:focus {
  background: #f59e0b;
  color: #111827 !important;
  filter: brightness(0.99);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.42) inset, 0 10px 18px rgba(146, 64, 14, 0.18);
}

.pbd-buy-cell .pbd-amazon-button img {
  display: none;
}

.pbd-buy-cell .pbd-buy-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--pbd-border);
  border-radius: 7px;
  padding: 7px 9px;
  background: #f8fafc;
  color: #64748b;
  font-weight: 800;
  text-align: center;
}

.pbd-info-block {
  margin-top: 24px;
}

.pbd-section-heading {
  margin-bottom: 12px;
}

.pbd-card-grid,
.pbd-source-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.pbd-card,
.pbd-source-card {
  min-width: 0;
  background: var(--pbd-panel);
  border: 1px solid var(--pbd-border);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 7px 18px rgba(15, 23, 42, 0.045);
}

.pbd-card h3,
.pbd-source-card h3 {
  margin: 0 0 8px;
  color: var(--pbd-text);
  font-size: 16px;
  line-height: 1.3;
}

.pbd-card p,
.pbd-source-card p {
  margin: 0 0 10px;
  color: var(--pbd-muted);
  font-size: 14px;
  line-height: 1.45;
}

.pbd-card-link {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--pbd-orange);
  font-weight: 800;
  text-decoration: none;
}

.pbd-card-link:hover {
  text-decoration: underline;
}

.pbd-modal[hidden] {
  display: none;
}

.pbd-modal {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  box-sizing: border-box;
  z-index: 30000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: auto;
  overscroll-behavior: contain;
}

.pbd-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
}

.pbd-modal-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: 100%;
  max-width: min(1500px, calc(100vw - 18px));
  height: min(94vh, 1040px);
  max-height: calc(100vh - 18px);
  margin: auto;
  overflow: hidden;
  box-sizing: border-box;
  border-radius: 8px;
  background: var(--pbd-panel);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
}

.pbd-modal-header {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 14px;
  border-bottom: 1px solid var(--pbd-border);
  background: var(--pbd-panel);
}

.pbd-modal-close {
  border: 1px solid var(--pbd-border);
  padding: 0 14px;
}

.pbd-modal-scroll {
  overflow: auto;
  min-height: 0;
  max-width: 100%;
  height: 100%;
  max-height: none;
  padding: 22px 18px 18px;
  scroll-padding-top: 22px;
  background: #ffffff;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
  scrollbar-gutter: stable;
}

.pbd-modal-scroll[data-pbd-zoom-level="1"] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.pbd-modal-scroll .pbd-diagram-image {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: none;
  margin: 0 auto;
  object-fit: contain;
  object-position: center center;
}

.pbd-modal-scroll[data-pbd-zoom-level="1"] .pbd-diagram-image {
  width: var(--pbd-modal-fit-width, auto);
  max-width: 100%;
  max-height: 100%;
  flex: 0 1 auto;
  transition: none;
}

.pbd-modal-scroll[data-pbd-zoom-level="2"] .pbd-diagram-image {
  width: calc(var(--pbd-modal-fit-width, 100%) * 2);
  max-width: none;
  max-height: none;
  transition: none;
}

.pbd-modal-scroll[data-pbd-zoom-level="3"] .pbd-diagram-image {
  width: calc(var(--pbd-modal-fit-width, 100%) * 3);
  max-width: none;
  max-height: none;
  transition: none;
}

.ecosystem-page {
  min-height: 100vh;
  padding: 30px 0 54px;
  background: var(--pbd-bg);
  color: var(--pbd-text);
  font-family: Arial, Helvetica, sans-serif;
}

.ecosystem-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.9fr);
  gap: 20px;
  align-items: stretch;
  margin-bottom: 22px;
}

.ecosystem-hero-main,
.ecosystem-panel,
.ecosystem-card {
  background: var(--pbd-panel);
  border: 1px solid var(--pbd-border);
  border-radius: 8px;
  box-shadow: var(--pbd-shadow);
}

.ecosystem-hero-main {
  padding: 24px;
}

.ecosystem-hero-main h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
}

.ecosystem-hero-main p {
  max-width: 820px;
  margin: 14px 0 0;
  color: var(--pbd-muted);
  font-size: 16px;
  line-height: 1.6;
}

.ecosystem-panel {
  padding: 18px;
}

.ecosystem-panel h2,
.ecosystem-section h2 {
  margin: 0 0 14px;
  font-size: 22px;
  line-height: 1.2;
}

.ecosystem-section {
  margin-top: 22px;
}

.ecosystem-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.ecosystem-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ecosystem-card {
  min-width: 0;
  padding: 16px;
}

.ecosystem-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.25;
}

.ecosystem-card p,
.ecosystem-list,
.ecosystem-meta {
  color: var(--pbd-muted);
  font-size: 14px;
  line-height: 1.5;
}

.ecosystem-card p {
  margin: 0 0 12px;
}

.ecosystem-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ecosystem-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--pbd-orange);
  font-weight: 900;
  text-decoration: none;
}

.ecosystem-link:hover {
  text-decoration: underline;
}

.ecosystem-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.ecosystem-table-wrap {
  overflow: auto;
  border: 1px solid var(--pbd-border);
  border-radius: 8px;
  background: #ffffff;
}

.ecosystem-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.ecosystem-table th,
.ecosystem-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--pbd-border);
  text-align: left;
  vertical-align: top;
}

.ecosystem-table th {
  background: #f3f4f6;
  font-size: 13px;
}

.pbd-lifecycle-block {
  background: linear-gradient(180deg, #ffffff 0%, #fffaf5 100%);
}

.pbd-lifecycle-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: 18px;
  align-items: start;
}

.pbd-lifecycle-summary p,
.pbd-continuity-callout p,
.pbd-upgrade-guidance li {
  color: var(--pbd-muted);
  font-size: 14px;
  line-height: 1.55;
}

.pbd-lifecycle-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  margin: 0 6px 8px 0;
  background: #f3f4f6;
  color: #374151;
  font-size: 12px;
  font-weight: 900;
}

.pbd-lifecycle-legacy,
.pbd-lifecycle-superseded {
  background: #fff7ed;
  color: #9a3412;
}

.pbd-lifecycle-current {
  background: #ecfdf5;
  color: #047857;
}

.pbd-lifecycle-partial_compatibility,
.pbd-lifecycle-needs_oem_review,
.pbd-lifecycle-unknown {
  background: #fef3c7;
  color: #92400e;
}

.pbd-current-replacement,
.pbd-continuity-callout {
  border: 1px solid var(--pbd-border);
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
}

.pbd-current-replacement span {
  display: block;
  color: var(--pbd-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.pbd-current-replacement strong {
  display: block;
  margin: 5px 0;
  font-size: 18px;
}

.pbd-current-replacement a {
  color: var(--pbd-orange);
  font-weight: 900;
  text-decoration: none;
}

.pbd-legacy-warning {
  border-left: 4px solid var(--pbd-orange);
  margin: 14px 0;
  padding: 10px 12px;
  background: #fff7ed;
  color: #7c2d12;
  font-weight: 800;
}

.pbd-replacement-timeline {
  display: grid;
  gap: 0;
  margin: 14px 0;
  padding: 0;
  list-style: none;
}

.pbd-replacement-timeline li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  position: relative;
  padding-bottom: 18px;
}

.pbd-replacement-timeline li:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 0;
  left: 8px;
  width: 2px;
  background: #fed7aa;
}

.pbd-timeline-dot {
  position: relative;
  z-index: 1;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border: 3px solid #fb923c;
  border-radius: 999px;
  background: #ffffff;
}

.pbd-replacement-timeline strong,
.pbd-upgrade-guidance h3,
.pbd-continuity-callout strong {
  color: var(--pbd-ink);
}

.pbd-replacement-timeline p {
  margin: 4px 0 8px;
  color: var(--pbd-muted);
  font-size: 14px;
}

.pbd-lifecycle-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.pbd-lifecycle-meta > span:not(.pbd-status):not(.pbd-lifecycle-badge) {
  border-radius: 999px;
  padding: 4px 8px;
  background: #f9fafb;
  color: #4b5563;
  font-size: 12px;
  font-weight: 800;
}

.pbd-upgrade-guidance {
  margin-top: 16px;
}

.pbd-upgrade-guidance ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

@media (max-width: 980px) {
  .pbd-layout,
  .pbd-card-grid,
  .pbd-source-list,
  .pbd-filter-grid,
  .ecosystem-hero,
  .ecosystem-grid,
  .ecosystem-grid.two,
  .pbd-lifecycle-summary {
    grid-template-columns: 1fr;
  }

  .pbd-diagram-card {
    position: static;
  }

  .pbd-diagram-scroll {
    max-height: 62vh;
  }

  .pbd-table-scroll {
    max-height: none;
  }

  .pbd-table {
    min-width: 860px;
  }
}

@media (max-width: 1100px) {
  .pbd-layout {
    width: 100%;
    margin-left: 0;
    transform: none;
    grid-template-columns: 1fr;
  }

  .pbd-diagram-card {
    position: static;
  }

  .pbd-table-scroll {
    max-height: none;
    overflow-x: auto;
  }

  .pbd-table {
    min-width: 860px;
  }
}

@media (max-width: 640px) {
  .pbd-page {
    padding-top: 20px;
    padding-bottom: 42px;
  }

  .pbd-container {
    width: min(100% - 24px, 1180px);
  }

  .pbd-breadcrumbs {
    margin-bottom: 10px;
  }

  .pbd-page-header {
    margin-bottom: 16px;
  }

  .pbd-page-header h1 {
    font-size: 30px;
    line-height: 1.08;
  }

  .pbd-page-header,
  .pbd-diagram-card-header,
  .pbd-table-toolbar,
  .pbd-modal-header {
    align-items: stretch;
    flex-direction: column;
  }

  .pbd-table-panel {
    overflow: visible;
  }

  .pbd-table-toolbar {
    gap: 8px;
    padding-bottom: 10px;
  }

  .pbd-table-toolbar .pbd-filter-grid {
    display: none;
  }

  .pbd-mobile-table-tools {
    position: sticky;
    top: 116px;
    z-index: 8;
    display: grid;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--pbd-border);
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(8px);
  }

  .pbd-mobile-table-search {
    display: grid;
    gap: 6px;
    color: #334155;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .03em;
    text-transform: uppercase;
  }

  .pbd-mobile-table-search input {
    width: 100%;
    min-height: 44px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 12px;
    background: #ffffff;
    color: var(--pbd-text);
    font-size: 16px;
    letter-spacing: 0;
    text-transform: none;
  }

  .pbd-mobile-row-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 4px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f8fafc;
  }

  .pbd-mobile-row-toggle button {
    min-height: 38px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #475569;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
  }

  .pbd-mobile-row-toggle button.is-active {
    background: #111827;
    color: #ffffff;
  }

  .pbd-mobile-table-count {
    color: var(--pbd-muted);
    font-size: 12px;
    font-weight: 800;
  }

  .pbd-table-scroll {
    max-height: none;
    overflow: visible;
  }

  .pbd-table {
    display: block;
    width: 100%;
    min-width: 0 !important;
    border-collapse: separate;
    border-spacing: 0;
  }

  .pbd-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .pbd-table tbody {
    display: grid;
    gap: 10px;
    padding: 10px;
    background: #f8fafc;
  }

  .pbd-table tbody tr[data-pbd-row] {
    display: grid;
    gap: 0;
    border: 1px solid var(--pbd-border);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    overflow: hidden;
  }

  .pbd-table tbody tr[data-pbd-row].pbd-row-common-wear {
    border-color: rgba(21, 128, 61, 0.25);
    background: #ffffff;
  }

  .pbd-table tbody tr[data-pbd-row][hidden] {
    display: none;
  }

  .pbd-table th,
  .pbd-table td,
  .pbd-table th:nth-child(1),
  .pbd-table td:nth-child(1),
  .pbd-table th:nth-child(2),
  .pbd-table td:nth-child(2),
  .pbd-table th:nth-child(3),
  .pbd-table td:nth-child(3),
  .pbd-table th:last-child,
  .pbd-table td:last-child {
    width: auto;
    min-width: 0;
  }

  .pbd-table td {
    display: grid;
    grid-template-columns: minmax(74px, 0.35fr) minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    padding: 9px 10px;
    border-bottom: 1px solid #eef2f7;
    font-size: 13px;
  }

  .pbd-table td:last-child {
    border-bottom: 0;
  }

  .pbd-table td::before {
    content: attr(data-pbd-label);
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .04em;
    line-height: 1.35;
    text-transform: uppercase;
  }

  .pbd-table td[data-pbd-label="Description"] {
    display: block;
  }

  .pbd-table td[data-pbd-label="Description"]::before {
    display: block;
    margin-bottom: 6px;
  }

  .pbd-description {
    min-width: 0;
    font-size: 14px;
  }

  .pbd-row-meta,
  .pbd-row-links,
  .pbd-row-trust {
    gap: 5px;
  }

  .pbd-buy-cell {
    display: block !important;
    min-width: 0;
    text-align: left;
  }

  .pbd-buy-cell::before {
    display: block;
    margin-bottom: 7px;
  }

  .pbd-buy-cell .pbd-amazon-button,
  .pbd-buy-cell .wsp-amazon-buy-button,
  .pbd-buy-cell .wsp-amazon-not-available,
  .pbd-buy-cell .pbd-buy-status,
  .wsp-amazon-grouped-links .wsp-amazon-buy-button {
    width: 100%;
    justify-content: center;
    min-height: 42px;
  }

  .wsp-amazon-grouped-links {
    min-width: 0;
    justify-content: stretch;
  }

  .pbd-modal {
    align-items: stretch;
    padding: 8px;
  }

  .pbd-modal-dialog {
    max-width: calc(100vw - 16px);
    height: calc(100vh - 16px);
    max-height: calc(100vh - 16px);
  }

  .pbd-modal-scroll {
    max-height: none;
    padding: 12px;
  }

  .pbd-modal-scroll .pbd-diagram-image {
    max-height: none;
  }

  .pbd-header-status {
    justify-items: start;
  }

  .pbd-amazon-button img {
    width: 116px;
  }

  .pbd-table-toolbar,
  .pbd-disclosure,
  .pbd-trust-strip {
    padding-left: 12px;
    padding-right: 12px;
  }

  .pbd-decision-flow {
    padding: 12px;
  }

.pbd-card,
.pbd-source-card,
.ecosystem-card,
.ecosystem-panel,
.ecosystem-hero-main {
  padding: 14px;
}
}

.wsp-inline-consumables {
  padding-top: 28px;
  scroll-margin-top: 138px;
}

.wsp-inline-consumables-top {
  margin: 18px 0 26px;
  padding-top: 0;
}

.wsp-inline-consumables .pbd-page-header {
  align-items: end;
  border-top: 1px solid rgba(148, 163, 184, 0.34);
  margin-top: 6px;
  padding-top: 28px;
}

.wsp-inline-consumables .pbd-page-header h2 {
  color: #0f172a;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.04;
  margin: 6px 0 10px;
  max-width: 920px;
}

.wsp-consumable-diagram-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
}

.wsp-consumable-diagram-card {
  display: grid;
  gap: 14px;
}

.wsp-inline-consumables .wsp-consumable-diagram-card h3 {
  color: #0f172a !important;
  font-size: 19px;
  line-height: 1.22;
  margin: 4px 0 0;
}

.wsp-consumable-diagram-card .pbd-diagram-scroll {
  background: #fff;
  max-height: 300px;
  min-height: 190px;
  padding: 12px;
}

.wsp-consumable-diagram-card .pbd-diagram-image {
  max-height: 272px;
  object-fit: contain;
  width: 100%;
}

.wsp-consumable-diagram-card p {
  color: #475569;
  margin: 0;
}

.wsp-consumable-diagram-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (min-width: 1101px) {
  .pbd-layout > .pbd-diagram-panel {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  .pbd-layout > .wsp-inline-consumables-top,
  .pbd-layout > .pbd-table-panel {
    grid-column: 2;
  }
}

@media (max-width: 640px) {
  .wsp-inline-consumables .pbd-page-header {
    align-items: stretch;
  }

  .wsp-consumable-diagram-grid {
    grid-template-columns: 1fr;
  }
}

/* Simple breakdown order: identify the item, show the diagram, then show rows. */
.pbd-page > .pbd-container {
  display: flex;
  flex-direction: column;
}

.pbd-page > .pbd-container > .pbd-breadcrumbs { order: 1; }
.pbd-page > .pbd-container > .pbd-page-header { order: 2; }
.pbd-page > .pbd-container > .wsp-simple-detail-actions { order: 2; }
.pbd-page > .pbd-container > .pbd-layout { order: 3; }
.pbd-page > .pbd-container > .wsp-fitment-shell { order: 5; }
.pbd-page > .pbd-container > .pbd-info-block { order: 5; }
.pbd-page > .pbd-container > details.pbd-info-block { order: 9; }

.pbd-layout {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  transform: none;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.pbd-layout > .pbd-diagram-panel,
.pbd-layout > .pbd-table-panel {
  grid-column: auto !important;
  grid-row: auto !important;
}

.pbd-diagram-card {
  position: static;
  max-width: 820px;
  margin: 0 auto;
  box-shadow: none;
}

.pbd-diagram-scroll {
  max-height: min(70vh, 760px);
}

.pbd-table-panel {
  box-shadow: none;
}

.pbd-table-toolbar {
  padding: 11px 13px;
}

.pbd-disclosure {
  padding: 8px 13px;
}

.pbd-table th,
.pbd-table td {
  padding: 9px 10px;
}

.pbd-card,
.pbd-source-card {
  box-shadow: none;
}

@media (min-width: 641px) {
  .pbd-table-scroll {
    max-height: none;
  }
}

@media (max-width: 640px) {
  .pbd-layout {
    gap: 10px;
  }

  .pbd-diagram-card {
    padding: 10px;
  }

  .pbd-diagram-scroll {
    min-height: 220px;
    max-height: 62vh;
  }

  .pbd-common-replacement-list,
  .pbd-table tbody {
    gap: 8px;
  }

  .pbd-table tbody {
    padding: 8px;
  }

  .pbd-table tbody tr[data-pbd-row] {
    box-shadow: none;
  }
}

/* Diagram-first lookup keeps one search and four primary columns. */
.wsp-diagram-first .pbd-page-header h1 { font-size: 32px; line-height: 1.15; letter-spacing: 0; }
.wsp-diagram-first .pbd-page-header { margin-bottom: 12px; }
.wsp-diagram-first .pbd-page-header p { margin: 6px 0; }
.wsp-diagram-first .pbd-layout { display: flex; flex-direction: column; }
.wsp-diagram-first .pbd-diagram-panel { width: 100%; }
.wsp-diagram-first .pbd-diagram-card { border-radius: 6px; }
.wsp-diagram-first .pbd-table-panel { min-width: 0; overflow: visible; border-radius: 6px; }
.wsp-diagram-first .pbd-table-toolbar { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.wsp-diagram-first .pbd-table-toolbar .pbd-filter-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; width: 100%; align-items: start; }
.wsp-diagram-first .pbd-table-filter { min-width: 0; text-transform: none; letter-spacing: 0; }
.wsp-diagram-first .pbd-table-filter input { width: 100%; min-width: 0; font-size: 16px; min-height: 44px; }
.wsp-diagram-first .pbd-extra-filters summary { padding: 12px; cursor: pointer; font-size: 14px; color: #263b46; }
.wsp-diagram-first .pbd-extra-filters[open] { max-width: 240px; }
.wsp-diagram-first .pbd-extra-filters .pbd-table-filter { display: grid; padding: 8px; }
.wsp-diagram-first .pbd-result-count { margin: 0; color: #46535a; font-size: 13px; }
.wsp-diagram-first .pbd-empty-results { padding: 16px; }
.wsp-diagram-first .pbd-auxiliary-column { display: none !important; }
.wsp-diagram-first .pbd-row-detail-notes { margin-top: 7px; font-size: 13px; }
.wsp-diagram-first .pbd-row-detail-notes summary { cursor: pointer; color: #25475a; }
.wsp-diagram-first .pbd-quantity-note { margin-top: 6px; font-size: 13px; }
.wsp-diagram-first .pbd-table td { vertical-align: top; }
.wsp-diagram-first .pbd-table .pbd-item-number { font-size: 17px; font-weight: 700; }
.wsp-diagram-first .pbd-table .pbd-part-number { font-size: 16px; overflow-wrap: anywhere; }
.wsp-diagram-first .pbd-buy-cell a.wsp-amazon-buy-button { min-height: 44px; border-radius: 5px; letter-spacing: 0; }
.wsp-diagram-first .pbd-table [hidden] { display: none !important; }
.wsp-diagram-first .wsp-simple-detail-action-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.wsp-diagram-first .wsp-simple-detail-actions { padding: 8px 0; margin: 0 0 12px; background: transparent; border: 0; }
.wsp-diagram-first .wsp-simple-detail-action-grid a { min-height: 40px; padding: 8px 12px; }

@media (max-width: 640px) {
  .wsp-diagram-first .pbd-page-header h1 { font-size: 26px; }
  .wsp-diagram-first .pbd-table-toolbar { position: sticky; top: 68px; z-index: 7; background: #fff; border-bottom: 1px solid #d5dce0; }
  .wsp-diagram-first .pbd-table-toolbar h2 { font-size: 20px; margin: 0; }
  .wsp-diagram-first .pbd-table-toolbar .pbd-filter-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .wsp-diagram-first .pbd-extra-filters summary { padding: 8px 0 0; }
  .wsp-diagram-first .pbd-extra-filters[open] { max-width: none; }
  .wsp-diagram-first .pbd-table tbody tr[data-pbd-row] { grid-template-columns: 78px minmax(0, 1fr); }
  .wsp-diagram-first .pbd-table td { display: block; font-size: 14px; }
  .wsp-diagram-first .pbd-table td::before { display: block; margin-bottom: 4px; letter-spacing: 0; }
  .wsp-diagram-first .pbd-table td:not(.pbd-item-number):not(.pbd-part-number) { grid-column: 1 / -1; }
  .wsp-diagram-first .pbd-table .pbd-buy-cell::before { display: none; }
  .wsp-diagram-first .pbd-table .pbd-buy-cell a.wsp-amazon-buy-button { display: flex; width: 100%; justify-content: center; }
}
