/* ============================================================
   Sonisys — industrial part reference archive
   Design language: flat technical-document aesthetic modeled on
   McMaster-Carr / DigiKey. Hairline rules, not cards-with-shadows.
   IBM Plex Sans/Condensed/Mono, self-hosted (no external requests).
   ============================================================ */

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/IBMPlexSans-var.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Sans Condensed';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/IBMPlexSansCondensed-600.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Sans Condensed';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/IBMPlexSansCondensed-700.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/IBMPlexMono-400.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/IBMPlexMono-500.woff2') format('woff2');
}

:root {
  /* Warm "technical paper" surface, not cool SaaS gray */
  --paper: #f6f3ec;
  --surface: #fffefb;
  --surface-sunk: #efeade;
  --ink: #171512;
  --ink-soft: #4a4740;
  --muted: #757064;
  --line: #ddd5c2;
  --line-strong: #b8ac91;

  /* Single accent, sampled from the Sonisys wordmark navy */
  --navy: #0a3577;
  --navy-deep: #062254;
  --navy-wash: #eaeff8;

  --ok: #2f6f4f;
  --ok-wash: #e9f3ec;
  --warn: #8a5b13;
  --warn-wash: #fbf1de;

  --radius: 2px;
  --sans: 'IBM Plex Sans', -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  --display: 'IBM Plex Sans Condensed', var(--sans);
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--navy);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

code {
  font-family: var(--mono);
  background: var(--surface-sunk);
  padding: 1px 5px;
  border-radius: var(--radius);
  font-size: 0.92em;
}

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

.site-header {
  border-bottom: 2px solid var(--ink);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner,
.main,
.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand picture {
  display: block;
  flex: 0 1 auto;
  width: min(196px, 46vw);
}

.brand img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 42px;
  object-fit: contain;
  object-position: left center;
}

.brand-subtitle {
  border-left: 1px solid var(--line-strong);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.2;
  padding-left: 12px;
  white-space: nowrap;
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 600;
}

.nav a {
  color: var(--ink-soft);
  padding: 8px 10px;
  border-bottom: 2px solid transparent;
}

.nav a:hover {
  color: var(--navy);
  border-bottom-color: var(--navy);
  text-decoration: none;
}

/* ---------- Breadcrumbs ---------- */

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 18px 0 14px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.breadcrumbs a {
  color: var(--muted);
}

.breadcrumbs a:hover {
  color: var(--navy);
}

.breadcrumbs span[aria-current] {
  color: var(--ink-soft);
}

.breadcrumbs .sep {
  color: var(--line-strong);
}

/* ---------- Quick jump ---------- */

.quick-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 18px 0 0;
  padding-top: 34px;
  border: 1px solid var(--line);
  border-bottom: 2px solid var(--ink);
  background: var(--surface);
  position: relative;
}

.quick-jump::before {
  content: "Quick Navigation";
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1;
  position: absolute;
  top: 12px;
  left: 16px;
  text-transform: uppercase;
}

.quick-jump a {
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.quick-jump a:hover {
  background: var(--navy-wash);
  color: var(--navy);
  text-decoration: none;
}

.quick-jump a:last-child {
  border-right: 0;
}

.quick-jump-select {
  display: none;
}

@media (max-width: 820px) {
  .quick-jump {
    display: flex;
    padding-top: 32px;
    overflow: visible;
  }

  .quick-jump a {
    min-width: 0;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 10px 8px;
    text-align: center;
    white-space: normal;
  }

  .quick-jump a:nth-child(even) {
    border-right: 0;
  }

  .quick-jump a:last-child {
    border-bottom: 0;
  }

  .quick-jump.enhanced {
    display: block;
    padding: 12px;
  }

  .quick-jump.enhanced::before {
    display: block;
    margin-bottom: 8px;
    position: static;
  }

  .quick-jump.enhanced a {
    display: none;
  }

  .quick-jump.enhanced .quick-jump-select {
    appearance: none;
    background:
      linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%) calc(100% - 18px) 50% / 7px 7px no-repeat,
      linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%) calc(100% - 13px) 50% / 7px 7px no-repeat,
      var(--surface);
    border: 1px solid var(--ink);
    color: var(--ink);
    display: block;
    font: 600 14px/1.3 var(--mono);
    min-height: 44px;
    padding: 10px 36px 10px 12px;
    width: 100%;
  }
}

/* ---------- Layout shell ---------- */

.main {
  padding: 6px 0 60px;
}

.review-strip {
  border: 1px solid var(--warn);
  background: var(--warn-wash);
  color: var(--warn);
  padding: 9px 12px;
  font-size: 13px;
  margin-bottom: 18px;
}

.workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 0;
  border: 1px solid var(--line);
  background: var(--surface);
}

.panel,
.part-hero {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 28px;
}

.workbench .panel,
.workbench .part-hero {
  border: 0;
}

.metric-panel {
  border-left: 1px solid var(--line);
  padding: 0;
  display: flex;
  flex-direction: column;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--navy);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.12;
  letter-spacing: 0;
  font-family: var(--display);
  font-weight: 700;
  color: var(--ink);
}

h1 {
  font-size: 33px;
  max-width: 780px;
}

h2 {
  font-size: 21px;
}

h3 {
  font-size: 15px;
  font-family: var(--sans);
  font-weight: 600;
}

.lede {
  max-width: 760px;
  color: var(--ink-soft);
  font-size: 16px;
  margin: 12px 0 0;
}

/* ---------- Part identity (number + subtitle) ---------- */

.part-number {
  font-family: var(--mono);
  font-size: 40px;
  font-weight: 500;
  letter-spacing: 0;
  max-width: none;
}

.part-subtitle {
  margin: 6px 0 0;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 600;
  color: var(--navy-deep);
}

@media (max-width: 820px) {
  .part-number {
    font-size: 28px;
  }

  .part-subtitle {
    font-size: 16px;
  }
}

/* ---------- Search ---------- */

.search-form {
  margin-top: 24px;
  display: grid;
  gap: 8px;
}

.search-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0;
  border: 1px solid var(--ink);
}

.search-row input {
  width: 100%;
  height: 46px;
  border: 0;
  border-right: 1px solid var(--ink);
  padding: 0 14px;
  font-family: var(--mono);
  font-size: 15px;
  background: var(--surface);
  color: var(--ink);
}

.search-row input:focus {
  outline: 2px solid var(--navy);
  outline-offset: -2px;
}

.button,
.search-row button {
  min-height: 46px;
  border: 0;
  border-radius: 0;
  background: var(--ink);
  color: var(--surface);
  padding: 0 20px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 120ms ease;
}

.button:hover,
.search-row button:hover {
  background: var(--navy);
  text-decoration: none;
}

.button.secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}

.button.secondary:hover {
  background: var(--ink);
  color: var(--surface);
}

.search-results {
  display: grid;
}

.result-row {
  border-bottom: 1px solid var(--line);
  padding: 10px 2px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
}

.result-row:hover {
  background: var(--surface-sunk);
}

.result-row strong,
.result-row small {
  display: block;
}

.result-row strong {
  font-family: var(--mono);
}

.result-row small {
  color: var(--muted);
  margin-top: 2px;
}

.result-row em {
  color: var(--navy);
  font-style: normal;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  align-self: center;
}

.result-empty {
  color: var(--muted);
  font-size: 14px;
  padding: 10px 2px;
}

/* ---------- Metrics rail ---------- */

.metric {
  border-bottom: 1px solid var(--line);
  padding: 16px 20px;
}

.metric:last-child {
  border-bottom: 0;
}

.metric strong {
  display: block;
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-top: 6px;
  text-transform: uppercase;
}

/* ---------- Section rhythm ---------- */

.section {
  margin-top: 40px;
  padding: 0;
  scroll-margin-top: 78px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ink);
}

.section-head a {
  font-family: var(--display);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.section-kicker {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
}

/* ---------- Ad card (text/CSS, no creative image) ---------- */

.ad-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 18px 0 24px;
  padding: 16px 20px;
  border: 1px solid var(--warn);
  border-left: 3px solid var(--warn);
  background: var(--warn-wash);
}

.ad-card-body {
  flex: 1 1 auto;
  min-width: 0;
}

.ad-card-eyebrow {
  position: relative;
  z-index: 2;
  display: inline-block;
  margin: 0 0 6px;
  color: var(--warn);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}

.ad-card-eyebrow:hover {
  text-decoration: underline;
}

.ad-card-headline {
  margin: 0;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}

.ad-card-headline .accent {
  color: var(--navy);
}

.ad-card-subtext {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-size: 13.5px;
  max-width: 60ch;
}

.ad-card-cta-wrap {
  flex: 0 0 auto;
}

.ad-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 0 18px;
  background: var(--navy);
  color: var(--surface);
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

.ad-card-cta:hover {
  background: var(--navy-deep);
  text-decoration: none;
}

.ad-card-cta::after {
  content: "\2192";
}

/* Makes the whole .ad-card clickable through to Amazon, not just the
   visible button: this pseudo-element expands the CTA anchor's hit area
   to cover the full card. The eyebrow link above sits at a higher
   z-index so it still routes to the disclosure page on its own. */
.ad-card-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

@media (max-width: 640px) {
  .ad-card {
    flex-direction: column;
    align-items: stretch;
  }

  .ad-card-cta {
    width: 100%;
    justify-content: center;
  }
}

/* ---------- Chip links (popular searches) ---------- */

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-link {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink-soft);
  padding: 5px 10px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
}

.chip-link:hover {
  border-color: var(--navy);
  color: var(--navy);
  background: var(--navy-wash);
  text-decoration: none;
}

/* ---------- Feature grid (homepage "what you get") ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.feature-panel {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 18px 20px;
  background: var(--surface);
}

.feature-panel strong {
  display: block;
  color: var(--navy-deep);
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.feature-panel p {
  color: var(--ink-soft);
  font-size: 13.5px;
  margin: 0;
}

/* ---------- Cards / grids ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.part-card,
.category-card {
  position: relative;
  display: block;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 20px 40px 20px 20px;
  background: var(--surface);
  transition: background-color 120ms ease;
}

.part-card:hover,
.category-card:hover {
  background: var(--navy-wash);
}

.part-card::after,
.category-card::after {
  content: "\2192";
  position: absolute;
  top: 20px;
  right: 18px;
  color: var(--line-strong);
  font-family: var(--mono);
  font-size: 16px;
}

.part-card:hover::after,
.category-card:hover::after {
  color: var(--navy);
}

.part-card strong,
.category-card strong {
  display: block;
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 500;
  color: var(--navy);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
}

.part-card:hover strong,
.category-card:hover strong {
  text-decoration-color: var(--navy);
}

.part-card span,
.category-card span {
  display: block;
  color: var(--ink-soft);
  margin-top: 8px;
  font-size: 14px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}

.tag {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink-soft);
  padding: 3px 8px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
}

.part-hero {
  padding: 28px;
}

.part-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 16px 0 0;
}

.status-pill {
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  padding: 3px 8px;
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
}

.status-pill:first-child {
  border-color: var(--ink-soft);
  color: var(--ink-soft);
}

.status-pill.warn {
  border-color: var(--warn);
  color: var(--warn);
}

.configuration-notice {
  border-left: 3px solid var(--navy);
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 16px 0 0;
  padding: 12px 14px;
  background: var(--surface-sunk);
}

.configuration-notice strong {
  display: block;
  color: var(--navy-deep);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.configuration-notice p {
  color: var(--ink-soft);
  font-size: 14px;
  margin: 5px 0 0;
}

/* ---------- Key facts (label / value rows, not boxes) ---------- */

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.fact {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-left: none;
  padding: 14px 16px;
}

.fact span {
  display: block;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.fact strong {
  display: block;
  margin-top: 5px;
  font-weight: 600;
}

/* ---------- Auction snapshot ---------- */

.auction-snapshot {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.auction-stat {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
  min-height: 88px;
}

.auction-stat span {
  display: block;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
}

.auction-stat strong {
  display: block;
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.2;
  margin-top: 6px;
}

.auction-stat small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 5px;
}

.auction-context {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  margin-top: 0;
  border-left: 1px solid var(--line);
}

.context-panel {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 14px 16px;
}

.context-panel strong {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-family: var(--mono);
  font-weight: 500;
  color: var(--muted);
}

.context-panel p {
  color: var(--ink-soft);
  font-size: 14px;
  margin: 0;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.related-link {
  position: relative;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: inherit;
  display: block;
  padding: 13px 34px 13px 16px;
  text-decoration: none;
}

.related-link:hover {
  background: var(--surface-sunk);
}

.related-link::after {
  content: "\2192";
  position: absolute;
  top: 13px;
  right: 14px;
  color: var(--line-strong);
  font-family: var(--mono);
  font-size: 15px;
}

.related-link:hover::after {
  color: var(--navy);
}

.related-link span {
  color: var(--muted);
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.related-link strong {
  color: var(--navy);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
}

.related-link:hover strong {
  text-decoration-color: var(--navy);
}

/* ---------- Evidence list ---------- */

.evidence-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.evidence-list li {
  padding: 10px 2px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--ink-soft);
}

/* ---------- Grouped specification blocks ---------- */

.spec-group {
  margin-top: 24px;
}

.spec-group:first-child {
  margin-top: 0;
}

.spec-group-head {
  color: var(--navy);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding-bottom: 6px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--line-strong);
}

.spec-group-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.spec-group-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 10px;
  vertical-align: top;
  text-align: left;
}

.spec-group-table th {
  border-bottom: 1px solid var(--line-strong);
  color: var(--navy);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  padding: 10px;
  text-align: left;
  vertical-align: bottom;
}

.additional-section-summary {
  color: var(--ink-soft);
  margin: 0 0 16px;
  max-width: 900px;
}

.additional-table {
  margin-top: 0;
  overflow-x: auto;
}

.spec-group-table td:first-child {
  width: 240px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.spec-group-table td:nth-child(2) {
  font-family: var(--mono);
  font-size: 13.5px;
}

.spec-group-table tr:last-child td {
  border-bottom: 0;
}

@media (max-width: 820px) {
  .spec-group-table td:first-child {
    width: auto;
  }

  .additional-table {
    overflow-x: visible;
  }

  .additional-table .spec-group-table,
  .additional-table .spec-group-table tbody,
  .additional-table .spec-group-table tr,
  .additional-table .spec-group-table td {
    display: block;
    width: 100%;
  }

  .additional-table .spec-group-table thead {
    display: none;
  }

  .additional-table .spec-group-table tr {
    border-bottom: 1px solid var(--line-strong);
    padding: 8px 0;
  }

  .additional-table .spec-group-table td,
  .additional-table .spec-group-table td:first-child,
  .additional-table .spec-group-table td:nth-child(2) {
    border-bottom: 0;
    display: grid;
    grid-template-columns: minmax(88px, 0.32fr) minmax(0, 1fr);
    gap: 12px;
    padding: 6px 0;
    white-space: normal;
  }

  .additional-table .spec-group-table td::before {
    color: var(--navy);
    content: attr(data-label);
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
  }

}

/* ---------- Visible archive evidence ---------- */

.archive-evidence-grid {
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  margin-top: 18px;
}

.archive-evidence-panel {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 16px;
}

.archive-evidence-panel h3 {
  color: var(--navy);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.auction-records-panel {
  padding-bottom: 0;
}

.spec-group-table tr:nth-child(even) {
  background: var(--surface-sunk);
}

.note {
  color: var(--muted);
  font-size: 13px;
  margin-top: 10px;
}

/* ---------- Auction history (dynamic) ---------- */

.auction-history {
  margin-top: 0;
}

.auction-history-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  margin-bottom: 18px;
}

.auction-history-summary div {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
}

.auction-history-summary strong {
  display: block;
  font-family: var(--mono);
  font-size: 19px;
  font-weight: 500;
  color: var(--navy-deep);
}

.auction-history-summary span,
.auction-history-count {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
}

.auction-history-count {
  margin-bottom: 12px;
  display: block;
}

.auction-history-affiliate {
  border: 1px solid var(--line);
  border-left: 3px solid var(--navy);
  background: var(--navy-wash);
  color: var(--ink-soft);
  padding: 11px 14px;
  margin-bottom: 14px;
  font-size: 13px;
}

.auction-history-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1px solid var(--line);
  background: var(--navy-wash);
  padding: 22px;
  margin-bottom: 22px;
}

.auction-history-actions .button.ebay-cta {
  min-height: 54px;
  padding: 0 34px;
  font-size: 15px;
  letter-spacing: 0.03em;
}

.auction-history-list {
  display: block;
  border-top: 1px solid var(--line);
}

/* Auction record rows: dense, table-like, one understated outbound
   link per row (text, not a repeated colored button) so a list of
   many records doesn't read as a wall of CTAs. */

.auction-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 14px;
  border-bottom: 1px solid var(--line);
  border-left: 3px solid transparent;
  background: var(--surface);
  padding: 12px 10px 12px 7px;
  color: inherit;
  text-decoration: none;
}

article.auction-card {
  cursor: default;
}

a.auction-card {
  cursor: pointer;
}

a.auction-card:hover {
  border-left-color: var(--navy);
  background: var(--navy-wash);
  text-decoration: none;
}

.auction-card-media {
  width: 76px;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-sunk);
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  text-align: center;
}

.auction-card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.auction-card-media.missing::after {
  content: "No photo";
  padding: 6px;
}

.auction-card-body {
  min-width: 0;
}

.auction-card-topline,
.auction-card-details {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.auction-card-topline {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  margin-bottom: 5px;
}

.auction-status {
  border-radius: var(--radius);
  padding: 2px 7px;
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 10px;
}

.auction-status.complete {
  background: var(--ok-wash);
  color: var(--ok);
}

.auction-status.active {
  background: var(--surface-sunk);
  color: var(--ink-soft);
}

.auction-card h3 {
  font-size: 14px;
  line-height: 1.35;
  margin: 0;
  font-weight: 500;
  color: var(--ink);
}

.auction-card-price {
  color: var(--navy-deep);
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 500;
  margin-top: 6px;
}

.auction-card-details {
  margin-top: 6px;
}

.auction-card-details span,
.auction-card-note {
  color: var(--muted);
  font-size: 11px;
}

.auction-card-details span:not(:last-child)::after {
  content: "\2022";
  margin-left: 8px;
  color: var(--line-strong);
}

.auction-card-note {
  display: block;
  margin-top: 4px;
  font-style: italic;
}

.auction-card-actions {
  margin-top: 6px;
}

.auction-card-link-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--navy);
  font-size: 12px;
  font-weight: 600;
}

.auction-card-link-label::after {
  content: "\2197";
}

a.auction-card:hover .auction-card-link-label {
  text-decoration: underline;
}

.auction-history-more {
  margin-top: 16px;
}

.affiliate-disclosure {
  border: 1px solid var(--line);
  border-left: 3px solid var(--navy);
  background: var(--navy-wash);
  color: var(--ink-soft);
  padding: 12px 15px;
  margin: 16px 0;
  font-size: 14px;
}

.outbound-panel,
.legal-page {
  max-width: 760px;
}

.legal-page h2 {
  font-size: 19px;
  margin: 30px 0 10px;
}

.outbound-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

/* Single, deliberately bold outbound CTA — the only solid-colored
   affiliate button on a page. Everything else is a text link. */
.button.ebay-cta,
.ebay-cta {
  background: var(--navy);
  color: var(--surface);
  border: 0;
}

.button.ebay-cta:hover,
.ebay-cta:hover {
  background: var(--navy-deep);
  text-decoration: none;
}

/* ---------- Image gallery ---------- */

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 10px;
}

.gallery-count {
  grid-column: 1 / -1;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  padding: 0 0 12px;
}

.gallery-more {
  grid-column: 1 / -1;
  justify-self: start;
  margin-top: 14px;
}

.auction-image {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--surface-sunk);
  border: 1px solid var(--line);
}

.auction-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 200ms ease;
}

.auction-image:hover img {
  transform: scale(1.06);
}

/* ---------- Lightbox ---------- */

body.lightbox-open {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: rgba(11, 10, 8, 0.94);
  color: #fff;
}

.lightbox.open {
  display: grid;
}

.lightbox-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(11, 10, 8, 0.85);
  font-family: var(--mono);
}

.lightbox-counter,
.lightbox-caption {
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
}

.lightbox-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.lightbox-tool,
.lightbox-close,
.lightbox-nav {
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  border-radius: var(--radius);
}

.lightbox-tool,
.lightbox-close {
  min-height: 36px;
  padding: 0 12px;
  font-family: var(--mono);
  font-size: 12px;
}

.lightbox-tool {
  font-size: 16px;
}

.lightbox-close {
  background: #fff;
  color: #111;
  border-color: #fff;
}

.lightbox-stage {
  position: relative;
  min-height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  cursor: grab;
}

.lightbox-stage.zoomed {
  cursor: move;
}

.lightbox-stage.zoomed:active {
  cursor: grabbing;
}

.lightbox-image {
  max-width: min(94vw, 1400px);
  max-height: calc(100vh - 132px);
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  will-change: transform;
  transition: transform 120ms ease;
}

.lightbox.loading .lightbox-image {
  filter: brightness(0.7);
}

.lightbox-loader {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  display: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(11, 10, 8, 0.85);
  color: #fff;
  font-family: var(--mono);
  font-size: 12px;
  padding: 9px 12px;
  transform: translate(-50%, -50%);
}

.lightbox.loading .lightbox-loader {
  display: block;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 44px;
  height: 60px;
  background: rgba(11, 10, 8, 0.65);
  font-size: 38px;
  line-height: 1;
  transform: translateY(-50%);
}

.lightbox-nav:disabled {
  cursor: wait;
  opacity: 0.4;
}

.lightbox-nav.prev {
  left: 14px;
}

.lightbox-nav.next {
  right: 14px;
}

.lightbox-caption {
  padding: 10px 14px 14px;
  text-align: center;
  background: rgba(11, 10, 8, 0.85);
}

/* ---------- Back to top ---------- */

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-width: 52px;
  border: 1px solid var(--ink);
  background: var(--surface);
  color: var(--ink);
  padding: 8px 10px;
  cursor: pointer;
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 4px 14px rgba(23, 21, 18, 0.16);
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 160ms ease, transform 160ms ease, background-color 120ms ease, color 120ms ease;
}

.back-to-top span:first-child {
  font-size: 16px;
  line-height: 1;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--surface);
}

@media (max-width: 820px) {
  .back-to-top {
    right: 14px;
    bottom: 14px;
    min-width: 44px;
    padding: 7px 8px;
  }

  .back-to-top-label {
    display: none;
  }
}

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

.footer {
  border-top: 2px solid var(--ink);
  padding: 24px 0;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  margin-top: 56px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.footer-inner strong {
  display: block;
  font-family: var(--display);
  color: var(--ink);
  font-size: 14px;
}

.footer-inner span {
  display: block;
  margin-top: 3px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-weight: 600;
}

.footer-links a {
  color: var(--ink-soft);
}

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

@media (max-width: 820px) {
  .section {
    scroll-margin-top: 132px;
  }

  .header-inner,
  .main,
  .footer-inner {
    width: min(100% - 24px, 1180px);
  }

  .header-inner,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 12px 0;
  }

  .nav {
    flex-wrap: wrap;
    gap: 0;
  }

  .brand {
    width: 100%;
  }

  .brand picture {
    width: min(220px, 100%);
  }

  .brand-subtitle {
    display: none;
  }

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

  .metric-panel {
    border-left: 0;
    border-top: 1px solid var(--line);
    flex-direction: row;
    flex-wrap: wrap;
  }

  .metric {
    flex: 1 1 50%;
    border-bottom: 1px solid var(--line);
  }

  .grid,
  .facts,
  .link-grid,
  .auction-snapshot,
  .auction-context,
  .auction-history-summary,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .auction-card {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 10px;
  }

  .auction-card-media {
    width: 64px;
  }

  .auction-card-price {
    font-size: 15px;
  }

  .auction-history-actions {
    padding: 18px;
  }

  .auction-history-actions .button.ebay-cta {
    width: 100%;
  }

  h1 {
    font-size: 26px;
  }

  .search-row {
    grid-template-columns: 1fr;
  }

  .search-row input {
    border-right: 0;
    border-bottom: 1px solid var(--ink);
  }

  .spec-group-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .lightbox-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .lightbox-actions {
    width: 100%;
  }

  .lightbox-tool {
    flex: 1 1 54px;
  }

  .lightbox-close {
    flex: 1 1 92px;
  }

  .lightbox-nav {
    width: 38px;
    height: 52px;
    font-size: 30px;
  }

  .lightbox-nav.prev {
    left: 8px;
  }

  .lightbox-nav.next {
    right: 8px;
  }

  .lightbox-image {
    max-width: 100vw;
    max-height: calc(100vh - 170px);
  }
}
