:root {
  --brand: #c45c26;
  --ink: #f3efe6;
  --muted: #9aa08c;
  --line: #2c3026;
  --border-color: var(--line);
  --bg: #10120e;
  --panel: #181b14;
  --paper: #1f231a;
  --danger: #d45a4a;
  --ok: #7cb342;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: radial-gradient(1200px 500px at 10% -10%, color-mix(in srgb, var(--brand) 22%, var(--bg)), var(--bg) 55%);
  color: var(--ink);
}

body {
  font-size: 15px;
}

button,
input {
  font: inherit;
}

.mast {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  padding: 0.7rem 1.4rem;
  border-bottom: 1px solid #222;
  background: #121212;
  position: sticky;
  top: 0;
  z-index: 4;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.partner-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 2px 6px;
  background: transparent;
}

.partner-logo {
  height: 38px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  display: block;
  background: transparent;
}

.brand-divider {
  width: 1px;
  height: 36px;
  background: #333;
  flex-shrink: 0;
}

.brand-copy h1 {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #f3f4f6;
  font-family: ui-sans-serif, system-ui, sans-serif;
}

.brand-tag {
  margin: 0.12rem 0 0;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9ca3af;
}

.logo-mark,
.logo-img {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: contain;
  background: transparent;
  color: #f3f4f6;
  display: grid;
  place-items: center;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.68rem;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, sans-serif;
}

h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
}

.mast-tools,
.view-switch,
.user-chip,
.toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.view-switch {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.15rem;
}

.view-switch button,
.ghost,
.chip,
.primary,
.row-btn {
  border: 0;
  cursor: pointer;
  color: var(--ink);
}

.view-switch button {
  background: transparent;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.view-switch button.is-active {
  background: var(--brand);
  color: #1a120c;
}

.operator-card {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.35rem 0.7rem 0.35rem 0.4rem;
  border: 1px solid #222;
  border-radius: 10px;
  background: #1a1a1a;
  font-family: ui-sans-serif, system-ui, sans-serif;
}

.operator-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #262626;
  color: #f3f4f6;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.operator-meta {
  display: grid;
  gap: 0.08rem;
  min-width: 0;
}

.operator-name {
  font-weight: 600;
  color: #f3f4f6;
  font-size: 0.88rem;
  line-height: 1.15;
}

.operator-role {
  font-size: 11px;
  color: #9ca3af;
  line-height: 1.2;
}

.operator-live {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: #9ca3af;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding-left: 0.55rem;
  border-left: 1px solid #333;
  white-space: nowrap;
}

.user-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
}

main {
  padding: 1rem 1.4rem 2.5rem;
}

.toolbar {
  justify-content: space-between;
  margin-bottom: 1rem;
}

.toolbar-end {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.trash-actions {
  display: none;
  align-items: center;
}

.btn-danger-outline {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid #ef4444;
  color: #ef4444;
  border-radius: 6px;
  padding: 0.35rem 0.7rem;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.82rem;
  cursor: pointer;
  height: auto;
}

.btn-danger-outline:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.2);
}

.btn-danger-outline:disabled {
  opacity: 0.45;
  cursor: default;
}

.toolbar p {
  margin: 0;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, sans-serif;
}

.queue-tabs {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.15rem;
}

.queue-tab {
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--muted);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.queue-tab.is-active {
  background: var(--brand);
  color: #1a120c;
  font-weight: 700;
}

.ghost {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.35rem 0.7rem;
  font-family: ui-sans-serif, system-ui, sans-serif;
}

.alert {
  margin: 0;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--danger);
  background: color-mix(in srgb, var(--danger) 16%, var(--panel));
  border-radius: 8px;
}

.desk-notice-stack {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  max-width: 420px;
  width: min(420px, calc(100vw - 3rem));
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.desk-toast {
  position: static;
  max-width: none;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: color-mix(in srgb, var(--ok) 22%, #14200f);
  border: 1px solid color-mix(in srgb, var(--ok) 55%, var(--line));
  color: #d7f0b8;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.88rem;
  box-shadow: var(--shadow);
  animation: desk-toast-in 0.16s ease;
  pointer-events: auto;
}

.desk-notice-stack .alert {
  pointer-events: auto;
}

@keyframes desk-toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.desk-toast.is-error {
  background: color-mix(in srgb, var(--danger) 22%, var(--panel));
  border-color: color-mix(in srgb, var(--danger) 50%, var(--line));
  color: #fecaca;
}

.desk-toast.is-warn {
  background: color-mix(in srgb, #d97706 28%, var(--panel));
  border-color: color-mix(in srgb, #f59e0b 55%, var(--line));
  color: #fde68a;
}

.ebay-view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.2rem;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  background: color-mix(in srgb, var(--ok) 28%, #1a2414);
  border: 1px solid color-mix(in srgb, var(--ok) 65%, var(--line));
  color: #d7f0b8;
  text-decoration: none;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-weight: 650;
}

.ebay-view-btn.is-compact {
  min-height: 1.8rem;
  font-size: 0.78rem;
}

.publish-error {
  margin: 0 0 0.65rem;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--danger) 50%, var(--line));
  background: color-mix(in srgb, var(--danger) 16%, var(--panel));
  color: #fecaca;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.8rem;
}

.published-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  min-height: 0;
}

.published-photo {
  background: #111;
  min-height: 140px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.published-photo img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.published-title {
  margin: 0.35rem 0 0.2rem;
  font-size: 1rem;
  line-height: 1.3;
}

.published-meta {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.85rem;
}

.published-badge {
  background: color-mix(in srgb, var(--ok) 28%, var(--panel));
  color: #d7f0b8;
}

.published-card .card-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0.85rem 1rem 0.9rem;
}

.published-when {
  margin: 0 0 0.65rem;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.75rem;
}

.published-actions {
  margin-top: auto;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.recall-btn,
.row-btn.recall-btn {
  background: #262626;
  color: #fbbf24;
  border: 1px solid #404040;
  border-radius: 6px;
  min-height: 2.2rem;
  padding: 0.4rem 0.75rem;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 650;
  cursor: pointer;
}

.recall-btn:hover,
.row-btn.recall-btn:hover {
  background: #404040;
}

.publish-error-banner {
  margin: 8px 0;
  padding: 10px 12px;
  border-left: 4px solid #c2410c;
  border-radius: 4px;
  background: #fff7ed;
  color: #7c2d12;
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.publish-error-banner .publish-error-when {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  opacity: 0.75;
}

.publish-error-banner .publish-error-hint {
  display: block;
  margin-top: 4px;
  font-weight: 600;
}

.status.is-error {
  background: #c2410c;
  color: #fff7ed;
}

.verify-badge.is-error-badge {
  background: #c2410c;
  color: #fff7ed;
}

.row-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

button.is-publishing {
  opacity: 0.85;
  cursor: wait;
}

.item-card.is-publishing {
  opacity: 0.78;
}

.publish-spinner {
  display: inline-block;
  width: 0.75rem;
  height: 0.75rem;
  margin-right: 0.35rem;
  border: 2px solid color-mix(in srgb, var(--ink) 30%, transparent);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: publish-spin 0.7s linear infinite;
  vertical-align: -0.1rem;
}

@keyframes publish-spin {
  to {
    transform: rotate(360deg);
  }
}

.card-grid {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.item-card.demo2-card {
  display: grid;
  grid-template-columns: minmax(220px, 35%) minmax(280px, 1fr) minmax(200px, 20%);
  grid-template-rows: minmax(0, auto);
  grid-template-areas: "visuals core rail";
  align-items: stretch;
}

.demo2-card .zone-visuals {
  grid-area: visuals;
  background: #111;
  min-width: 0;
  min-height: 0;
  max-height: calc(100vh - 4.5rem);
  max-height: calc(100dvh - 4.5rem);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow: hidden;
}

.demo2-card .zone-visuals .photo {
  border-radius: 0;
  height: auto;
  flex: 0 1 auto;
  min-height: 0;
}

.demo2-card .zone-visuals .photo-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  flex: 0 1 auto;
  min-height: 0;
  max-height: 240px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
  padding: 8px;
}

.demo2-card .zone-visuals .photo-thumbs.grid-cols-4 {
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.demo2-card .zone-visuals .photo-thumbs.grid-cols-6 {
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
}

.demo2-card .zone-visuals .photo-thumb {
  flex: none;
  width: auto;
  min-width: 0;
  aspect-ratio: 1;
  border-radius: 6px;
}

/* Orange is reserved for the one Main photo (index 0, the eBay Gallery Image). */
.demo2-card .zone-visuals .photo-thumb.is-main {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 2px var(--brand);
}

/* The photo currently previewed in the stage is a neutral cursor, never orange. */
.demo2-card .zone-visuals .photo-thumb.is-viewing:not(.is-main) {
  border-color: #d4d4d4;
  box-shadow: inset 0 0 0 2px #d4d4d4;
}

.demo2-card .zone-visuals .photo-thumb .thumb-image {
  position: absolute;
  inset: 0;
  height: 100%;
  border-radius: 6px;
}

.demo2-card .zone-visuals .photo-thumb .thumb-image img,
.demo2-card .zone-visuals .photo-thumb img {
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
}

.demo2-card .zone-visuals .thumb-actions {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 0.12rem;
  gap: 0.12rem;
  border-radius: 0 0 6px 6px;
}

.demo2-card .zone-visuals .thumb-actions button {
  min-width: 0;
  font-size: 0.52rem;
  padding: 0.1rem 0.12rem;
}

.demo2-card .zone-visuals .voice-note {
  display: flex;
  flex-direction: column;
  margin: 0 8px 8px;
  flex: 0 0 auto;
  min-height: 0;
}

.demo2-card .zone-visuals .voice-note blockquote,
.demo2-card .zone-visuals .voice-note .voice-empty {
  max-height: 4.2rem;
  overflow-y: auto;
}

.demo2-card .zone-visuals .voice-player {
  flex: 0 0 auto;
  flex-wrap: wrap;
}

.demo2-card .zone-visuals .voice-time {
  min-width: 0;
}

.demo2-card .zone-visuals .photo-stage {
  flex: 1 1 auto;
  min-height: 0;
  height: min(52vh, 420px);
  max-height: min(52vh, 420px);
}

.demo2-card .zone-core {
  grid-area: core;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.7rem 0.9rem 0.8rem;
  min-width: 0;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.demo2-card .zone-core .preflight {
  gap: 0.35rem 0.55rem;
}

.demo2-card .zone-core .pricing {
  margin-top: 0;
}

.demo2-card .zone-rail {
  grid-area: rail;
  position: sticky;
  top: 4.5rem;
  align-self: start;
  padding: 0.9rem 0.85rem 1rem;
  background: color-mix(in srgb, var(--paper) 86%, #000);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.rail-price-qty {
  display: grid;
  grid-template-columns: 60% 40%;
  gap: 8px;
  min-width: 0;
}

.rail-price-qty > .field {
  min-width: 0;
}

.rail-price-qty .qty-stepper {
  grid-template-columns: 1.5rem minmax(0, 1fr) 1.5rem;
}

.rail-price-qty .qty-stepper input {
  width: 100%;
  min-width: 0;
  text-align: center;
}

.demo2-card > :not(.zone-visuals):not(.zone-core):not(.zone-rail) {
  display: none;
}

.demo2-card .rail-actions {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.demo2-card .rail-actions .primary,
.demo2-card .rail-actions .secondary,
.demo2-card .rail-actions .discard,
.demo2-card .rail-actions .restore {
  width: 100%;
}

.id-contrast {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 1.05rem;
}

.mpn-stamp-row {
  display: flex;
  gap: 0.75rem;
  width: 100%;
  align-items: flex-end;
}

.mpn-stamp-row .field-id {
  flex: 1;
  width: 100%;
  min-width: 0;
}

.mpn-stamp-row .field-id input {
  flex: 1;
  width: 100%;
}

.stamp-preview {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 0.28rem;
  width: 104px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.stamp-preview-label {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.2;
}

.stamp-preview-frame {
  display: block;
  height: 88px;
  border: 1px solid #404040;
  border-radius: 6px;
  overflow: hidden;
  background: #0c0d0a;
}

.stamp-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 72%;
  transform: scale(1.28);
  transform-origin: center 70%;
  transition: transform 0.18s ease;
}

.stamp-preview:hover .stamp-preview-frame {
  border-color: color-mix(in srgb, var(--brand) 55%, #404040);
}

.stamp-preview:hover img {
  transform: scale(1.48);
}

.stamp-preview:focus-visible {
  outline: none;
}

.stamp-preview:focus-visible .stamp-preview-frame {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.place-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.place-chip {
  border: 1px solid var(--line);
  background: #161910;
  color: var(--ink);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-size: 0.78rem;
  cursor: pointer;
}

.place-chip.is-on {
  border-color: var(--brand);
  background: color-mix(in srgb, var(--brand) 28%, #161910);
}

.price-input {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 0.5rem;
  background: #161910;
  transition: border-color 0.18s ease;
}

.price-input.is-adjusted {
  border-color: var(--brand);
}

.price-input input {
  border: 0;
  background: transparent;
  width: 100%;
  color: inherit;
  padding: 0.45rem 0;
}

.qty-stepper {
  display: grid;
  grid-template-columns: 2.2rem 1fr 2.2rem;
  gap: 0.25rem;
}

.qty-stepper button {
  border: 1px solid var(--line);
  background: #161910;
  color: var(--ink);
  border-radius: 8px;
  cursor: pointer;
}

.desk-drawer,
.packaging-acc,
.specifics-acc {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.35rem 0.6rem 0.55rem;
  background: #161910;
}

.desk-drawer summary,
.packaging-acc summary,
.specifics-acc summary {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--muted);
  padding: 0.35rem 0;
  list-style: none;
}

.desk-drawer summary::-webkit-details-marker,
.packaging-acc summary::-webkit-details-marker,
.specifics-acc summary::-webkit-details-marker {
  display: none;
}

.desk-drawer summary::before,
.packaging-acc summary::before,
.specifics-acc summary::before {
  content: "";
  flex: 0 0 auto;
  width: 0.42rem;
  height: 0.42rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transform-origin: 50% 60%;
  transition: transform 0.15s ease;
}

.desk-drawer[open] summary::before,
.packaging-acc[open] summary::before,
.specifics-acc[open] summary::before {
  transform: rotate(45deg);
}

.drawer-tools {
  display: flex;
  justify-content: flex-end;
  margin: -0.15rem 0 0.35rem;
}

.drawer-close-link {
  border: 0;
  background: none;
  padding: 0.1rem 0.25rem;
  color: var(--muted);
  font-size: 0.74rem;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.drawer-close-link:hover,
.drawer-close-link:focus-visible {
  color: var(--ink);
}

.packaging-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.specifics-grid {
  display: grid;
  gap: 0.55rem;
}

.specifics-vehicle {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 0.45rem;
}

/* Category Tree picker + the selected category's item specifics (hydrated by desk.js). */
.dynamic-aspects-container {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
}

.category-tree-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.5rem;
}

.category-tree-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--muted, #9aa08c);
  white-space: nowrap;
}

.category-tree-dropdown {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  border-radius: 8px;
  padding: 0.4rem 0.5rem;
}

.category-tree-error {
  margin: 0;
  color: #ff8a80;
  font-size: 0.8rem;
}

.aspects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.45rem;
}

/* Secondary tier: the "Additional eBay Specifics" drawer under the primary grid. The 0fr -> 1fr row animates the
   height without measuring it; the closed body is hidden from sight and from the tab order (the markup also sets inert). */
.aspects-secondary-wrap {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}

.btn-toggle-secondary-aspects {
  justify-self: start;
  border: 1px dashed var(--line);
  background: transparent;
  color: var(--muted, #9aa08c);
  border-radius: 8px;
  padding: 0.3rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-toggle-secondary-aspects:hover,
.btn-toggle-secondary-aspects:focus-visible,
.aspects-secondary-wrap.is-open .btn-toggle-secondary-aspects {
  border-style: solid;
  color: var(--ink);
}

.aspects-secondary {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  opacity: 0;
  transition:
    grid-template-rows 0.24s ease,
    opacity 0.2s ease,
    visibility 0s linear 0.24s;
}

.aspects-secondary-wrap.is-open .aspects-secondary {
  grid-template-rows: 1fr;
  visibility: visible;
  opacity: 1;
  transition:
    grid-template-rows 0.24s ease,
    opacity 0.2s ease,
    visibility 0s;
}

.aspects-secondary-inner {
  overflow: hidden;
  min-height: 0;
}

.aspects-secondary-inner > .aspects-grid {
  padding-top: 0.1rem;
}

@media (prefers-reduced-motion: reduce) {
  .aspects-secondary,
  .aspects-secondary-wrap.is-open .aspects-secondary {
    transition: none;
  }
}

.aspects-empty {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted, #9aa08c);
  font-size: 0.82rem;
}

.aspect-field.is-missing input,
.aspect-field.is-missing select {
  border-color: #e0a030;
}

.aspect-req {
  margin-left: 0.15rem;
  color: #e0a030;
  text-decoration: none;
}

.spec-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
}

.spec-toggle-btn {
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  border-radius: 8px;
  padding: 0.35rem 0.5rem;
  cursor: pointer;
}

.spec-toggle-btn.is-on {
  border-color: var(--brand);
  background: color-mix(in srgb, var(--brand) 28%, #161910);
}

.spec-toggle-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.photo-thumb {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 0 0 88px;
  width: 88px;
  padding: 0;
  border: 1px solid #404040;
  border-radius: 6px;
  overflow: hidden;
  background: #171717;
  cursor: grab;
}

.photo-thumb .thumb-image {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 6px 6px 0 0;
  background: #111;
}

.photo-thumb .thumb-image img,
.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}

.thumb-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem;
  background: #171717;
  border-top: 1px solid #262626;
  border-radius: 0 0 6px 6px;
  position: static;
}

.thumb-actions button {
  flex: 0 0 auto;
  min-width: 1.35rem;
  border: 0;
  border-radius: 3px;
  background: #2a2e24;
  color: var(--ink);
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1.2;
  padding: 0.2rem 0.22rem;
  cursor: pointer;
}

.thumb-actions button:disabled {
  opacity: 0.35;
  cursor: default;
}

.thumb-actions .thumb-hero-btn {
  flex: 1;
  background: #2a2e24;
  color: var(--ink);
}

.thumb-actions .thumb-hero-btn.is-main,
.photo-thumb.is-main .thumb-hero-btn {
  background: var(--brand);
  color: #1a120c;
}

.demo2-core .field-id input {
  font-weight: 700;
}

#inspector-body .demo2-card {
  grid-template-columns: 1fr;
  grid-template-areas:
    "visuals"
    "core"
    "rail";
}

#inspector-body .demo2-card .zone-rail {
  position: static;
}

@media (max-width: 1100px) {
  .item-card.demo2-card {
    grid-template-columns: 1fr;
    grid-template-areas:
      "visuals"
      "core"
      "rail";
  }
  .demo2-card .zone-core,
  .demo2-card .zone-visuals .photo {
    border: 0;
  }
  .demo2-card .zone-rail {
    position: static;
    border-top: 1px solid var(--line);
  }
}


.item-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-rows: minmax(0, auto) minmax(0, auto);
  min-width: 0;
  transition: opacity 0.22s ease, transform 0.22s ease, box-shadow 0.16s ease;
}

.item-card.is-active,
.desk-table tr.is-active {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 80%, transparent), var(--shadow);
}

.item-card.is-mismatch {
  border-color: #d97706;
}

.item-card.is-mismatch .primary[disabled],
.item-card.is-mismatch .row-btn.approve[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.item-card.is-discard-confirm,
.desk-table tr.is-discard-confirm {
  opacity: 0.45;
  pointer-events: none;
}

.desk-table tr.is-discard-confirm {
  transition: opacity 0.22s ease;
}

.item-card.is-discarding {
  opacity: 0;
  transform: translateY(-10px) scale(0.98);
  pointer-events: none;
}

.status.trashed {
  background: #7f1d1d;
  color: #fecaca;
}

.desk-table tr.is-discarding {
  opacity: 0;
  transition: opacity 0.18s ease;
}

.photo {
  background-color: #111;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  min-height: 0;
  border-radius: 12px 12px 0 0;
}

.photo-stage {
  position: relative;
  height: 190px;
  background-color: #111;
}

.photo-open {
  position: absolute;
  inset: 0;
  display: block;
  padding: 0;
  border: 0;
  background-color: #111;
  cursor: zoom-in;
}

.photo-stage img,
.photo-open img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
}

.photo-expand {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 4;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: rgba(16, 18, 14, 0.72);
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1;
  cursor: zoom-in;
}

.photo-expand:hover {
  background: rgba(196, 92, 38, 0.92);
}

.photo-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 32px;
  height: 44px;
  border: 0;
  border-radius: 6px;
  background: rgba(16, 18, 14, 0.72);
  color: var(--ink);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

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

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

.photo-nav:hover {
  background: rgba(196, 92, 38, 0.92);
}

.photo-thumbs {
  display: flex;
  gap: 6px;
  padding: 8px;
  background: var(--bg);
  overflow-x: auto;
}

.photo-thumb.dragging,
.photo-thumb.is-dragging {
  opacity: 0.45;
}

.photo-thumb.drop-target,
.photo-thumb.is-drop-target {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 65%, transparent);
}

.tenant-ship-default {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--muted);
  cursor: pointer;
}

.photo .ph {
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.8rem;
}

.status,
.uploaded {
  pointer-events: none;
  z-index: 4;
}

.status {
  position: absolute;
  top: 10px;
  left: 10px;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.45rem;
  border-radius: 4px;
  background: color-mix(in srgb, var(--brand) 80%, black);
  color: #fff8ef;
}

.status.published {
  background: var(--ok);
  color: #102006;
}

.uploaded {
  position: absolute;
  top: 10px;
  right: 10px;
  max-width: calc(100% - 8.5rem);
  text-align: right;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  padding: 0.25rem 0.45rem;
  border-radius: 4px;
  background: rgba(12, 13, 10, 0.78);
  color: #fff8ef;
}

.voice-note {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.65rem 0.7rem;
  background: var(--panel);
}

.voice-note h3 {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, sans-serif;
}

.voice-note blockquote {
  margin: 0;
  font-style: italic;
  color: #e4dfd3;
  line-height: 1.4;
}

.voice-player {
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  max-width: 100%;
  margin-top: 0.55rem;
  overflow: visible;
  box-sizing: border-box;
  border-radius: 6px;
  padding: 0.35rem 0.45rem;
  background: color-mix(in srgb, var(--panel) 72%, #000);
}

.voice-note-audio,
.voice-player audio {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}

.voice-play,
.voice-mute {
  flex: 0 0 auto;
  width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #12140f;
  color: var(--ink);
  font-size: 0.72rem;
  line-height: 1;
  cursor: pointer;
}

.voice-play:hover,
.voice-mute:hover {
  background: #1c2018;
}

.voice-player input[type="range"] {
  flex: 1 1 auto;
  min-width: 0;
  height: 0.35rem;
  margin: 0;
  accent-color: var(--brand);
  background: transparent;
  cursor: pointer;
}

.voice-player input[type="range"]::-webkit-slider-runnable-track {
  height: 0.28rem;
  border-radius: 99px;
  background: color-mix(in srgb, var(--brand) 35%, #2a2e26);
}

.voice-player input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 0.7rem;
  height: 0.7rem;
  margin-top: -0.2rem;
  border-radius: 50%;
  background: var(--brand);
  border: 0;
}

.voice-time {
  flex: 0 0 auto;
  min-width: 5.6rem;
  text-align: right;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  color: var(--muted);
  white-space: nowrap;
}

.voice-rate-wrap {
  position: relative;
  flex: 0 0 auto;
  z-index: 50;
}

.voice-rate {
  flex: 0 0 auto;
  min-width: 3.4rem;
  height: 1.5rem;
  padding: 0.125rem 0.5rem;
  border: 1px solid #404040;
  border-radius: 999px;
  background: #171717;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.68rem;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
}

.voice-rate:hover {
  background: #262626;
}

.voice-rate-menu {
  position: absolute;
  bottom: 100%;
  right: 0;
  margin-bottom: 6px;
  min-width: 90px;
  padding: 0.25rem 0;
  background: #171717;
  border: 1px solid #404040;
  border-radius: 0.375rem;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.45);
  z-index: 50;
}

.voice-rate-menu[hidden] {
  display: none;
}

.voice-rate-menu button {
  display: block;
  width: 100%;
  padding: 0.28rem 0.65rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.68rem;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
}

.voice-rate-menu button:hover {
  background: #262626;
}

.voice-rate-menu button.is-active {
  background: color-mix(in srgb, var(--brand) 28%, #171717);
  color: #fff3e4;
}

.voice-rate-menu button.is-active::before {
  content: "✓ ";
}

.voice-empty {
  margin: 0;
  color: var(--muted);
  font-style: italic;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.82rem;
}

.card-body {
  padding: 0.85rem 0.95rem 1rem;
  display: grid;
  gap: 0.7rem;
  min-width: 0;
  overflow: visible;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.6rem;
}

.preflight-kicker {
  margin: 0 0 0.15rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.64rem;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, sans-serif;
}

.verify-badge {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.22rem 0.45rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 35%, var(--bg));
  color: #fff3e4;
  white-space: nowrap;
}

.verify-badge.is-verified {
  background: color-mix(in srgb, var(--ok) 55%, var(--bg));
  color: #e7f6d4;
}

.discrepancy-badge {
  display: inline-block;
  font-size: 0.64rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 800;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: #d97706;
  color: #1a120c;
  white-space: nowrap;
}

.discrepancy-bus {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.discrepancy-bus[hidden] {
  display: none;
}

.discrepancy-flag {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  border: 1px solid #d97706;
  background: rgba(217, 119, 6, 0.16);
  color: #fde68a;
  transition: opacity 0.28s ease;
}

.discrepancy-flag.is-resolving {
  opacity: 0;
  pointer-events: none;
}

.discrepancy-flag p {
  margin: 0;
  flex: 1 1 12rem;
  font-size: 0.82rem;
  line-height: 1.35;
}

.discrepancy-flag.is-alert {
  border-color: #fecaca;
  background: #1a120c;
  color: #fff7ed;
}

.discrepancy-flag.is-alert .discrepancy-badge {
  background: #fff7ed;
  color: #1a120c;
}

.discrepancy-resolve {
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.discrepancy-resolve.is-primary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
  opacity: 1;
  font-weight: 800;
}

.discrepancy-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.discrepancy-resolve.is-ghost {
  opacity: 0.7;
  border: 1px solid var(--border-color);
  background: transparent;
}

@keyframes field-attention-pulse {
  0% {
    border-color: #d97706;
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.55);
  }
  100% {
    border-color: var(--line);
    box-shadow: 0 0 0 0 rgba(217, 119, 6, 0);
  }
}

.field-attention-pulse {
  border-style: solid;
  border-width: 1px;
  animation: field-attention-pulse 1.2s ease;
}

.price-anomaly-pill {
  margin: 0.35rem 0 0;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  border: 1px solid #d97706;
  background: rgba(217, 119, 6, 0.2);
  color: #fde68a;
  font-size: 0.72rem;
  line-height: 1.3;
}

.price-anomaly-pill.is-alert {
  border-color: #fecaca;
  background: #1a120c;
  color: #fff7ed;
  font-weight: 700;
}

.price-anomaly-pill[hidden] {
  display: none;
}

.fitment-line {
  margin: 0;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.78rem;
}

.preflight {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem 0.65rem;
}

.field {
  display: grid;
  gap: 0.22rem;
  font-family: ui-sans-serif, system-ui, sans-serif;
}

.field > span {
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.field-span {
  grid-column: 1 / -1;
}

.preflight input,
.preflight select,
.preflight textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 6px;
  padding: 0.4rem 0.5rem;
  font: inherit;
}

.preflight textarea {
  resize: vertical;
  min-height: 3.2rem;
}

.title-input.has-conflict {
  border: 1px solid #d97706;
}

.title-input.has-conflict:focus {
  border-color: #d97706;
  outline: none;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.28);
}

.field > span:has(.title-conflict-badge) {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.title-conflict-badge {
  font-size: 10px;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

@keyframes title-resolved-pulse {
  0% {
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.6);
    border-color: #22c55e;
  }
  100% {
    box-shadow: none;
    border-color: var(--border-color, #333);
  }
}

.title-input.resolved-pulse {
  animation: title-resolved-pulse 0.6s ease-out;
}

.char-count {
  justify-self: end;
  margin-top: 0.15rem;
  font-size: 0.68rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.char-count.is-warn {
  color: #e0b15a;
}

.char-count.is-over {
  color: var(--danger);
  font-weight: 700;
}

.sku {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  color: var(--muted);
}

.title {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.25;
}

.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem 0.8rem;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.8rem;
}

.facts dt {
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.facts dd {
  margin: 0.1rem 0 0;
}

.pricing {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.65rem 0.7rem;
  background: var(--panel);
}

.pricing h3 {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, sans-serif;
}

.comp-source {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  color: var(--muted);
}

/* A calm status line (e.g. sold comps busy); deliberately not an error colour. */
.comp-notice {
  margin: -0.25rem 0 0.45rem;
  font-size: 0.74rem;
  font-style: italic;
  color: var(--muted);
}

/* Amber, not red: the card is waiting on the operator, nothing has failed. */
.comp-source.is-awaiting-fitment {
  color: #b7791f;
  font-weight: 600;
}

.comp-notice[hidden] {
  display: none;
}

.medians {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.4rem;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.78rem;
}

.medians strong {
  display: block;
  font-size: 1rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.55rem;
}

.chip {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.22rem 0.55rem;
  font-size: 0.75rem;
  font-family: ui-sans-serif, system-ui, sans-serif;
}

.chip:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.price-row {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.55rem;
}

.price-row input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 6px;
  padding: 0.4rem 0.5rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.save-status {
  margin-left: auto;
  min-height: 1.1rem;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.save-status.is-saving {
  color: var(--muted);
}

.save-status.is-saved {
  color: #86efac;
}

#cards .item-card [data-save],
#cards .item-card [data-save-status] {
  display: none;
}

.primary,
.row-btn.approve {
  flex: 1;
  background: var(--brand);
  color: #1a120c;
  border-radius: 7px;
  padding: 0.55rem 0.7rem;
  font-weight: 700;
  font-family: ui-sans-serif, system-ui, sans-serif;
}

.secondary {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 7px;
  padding: 0.55rem 0.7rem;
  font-family: ui-sans-serif, system-ui, sans-serif;
  cursor: pointer;
}

.discard {
  background: transparent;
  border: 1px solid #7f1d1d;
  color: #ef4444;
  border-radius: 7px;
  padding: 0.55rem 0.7rem;
  font-family: ui-sans-serif, system-ui, sans-serif;
  cursor: pointer;
}

.discard:hover,
.row-btn.discard-row:hover {
  background: #7f1d1d;
  color: #fecaca;
  border-color: #ef4444;
}

.row-btn.discard-row {
  border-color: #7f1d1d;
  color: #ef4444;
}

.restore {
  flex: 1;
  background: color-mix(in srgb, var(--ok) 22%, var(--bg));
  border: 1px solid color-mix(in srgb, var(--ok) 45%, var(--line));
  color: #d7f0b8;
  border-radius: 7px;
  padding: 0.55rem 0.7rem;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  cursor: pointer;
}

.restore:hover,
.row-btn.restore-row:hover {
  background: color-mix(in srgb, var(--ok) 40%, var(--bg));
}

.purge {
  background: #7f1d1d;
  border: 1px solid #991b1b;
  color: #fecaca;
  border-radius: 7px;
  padding: 0.55rem 0.7rem;
  font-family: ui-sans-serif, system-ui, sans-serif;
  cursor: pointer;
}

.purge:hover,
.row-btn.purge-row:hover {
  background: #991b1b;
  color: #fff;
}

.row-btn.restore-row {
  border-color: color-mix(in srgb, var(--ok) 45%, var(--line));
  color: #d7f0b8;
}

.row-btn.purge-row {
  border-color: #7f1d1d;
  background: #7f1d1d;
  color: #fecaca;
}

.live-link {
  color: var(--brand);
  font-family: ui-sans-serif, system-ui, sans-serif;
}

.grid-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}

.desk-table {
  width: 100%;
  border-collapse: collapse;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.82rem;
}

.desk-table th,
.desk-table td {
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.desk-table th {
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--panel);
  position: sticky;
  top: 0;
}

.desk-table tbody tr {
  cursor: pointer;
}

.desk-table tbody tr:hover {
  background: color-mix(in srgb, var(--brand) 10%, var(--paper));
}

.thumb {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 4px;
  background-color: #111;
  display: block;
}

.thumb-open {
  display: inline-flex;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background-color: #111;
  cursor: zoom-in;
}

.desk-table input {
  width: 88px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 4px;
  padding: 0.28rem 0.35rem;
}

.row-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.row-btn {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.32rem 0.5rem;
  font-size: 0.75rem;
}

.empty,
.empty-state {
  color: var(--muted);
  padding: 2.5rem 0;
  text-align: center;
}

dialog {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 12px;
  width: min(520px, 92vw);
  padding: 0;
}

.label-sheet {
  padding: 0.9rem 1rem 1rem;
}

.label-sheet header,
.label-sheet footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}

.label-sheet h2 {
  margin: 0;
  font-size: 1.05rem;
}

.label-preview {
  margin: 0.8rem 0;
  background: #fff;
  color: #111;
  display: grid;
  place-items: center;
  min-height: 120px;
  border-radius: 6px;
}

.zpl {
  max-height: 140px;
  overflow: auto;
  background: #0c0d0a;
  padding: 0.6rem;
  font-size: 0.72rem;
  border-radius: 6px;
}

a {
  color: var(--brand);
}

[hidden] {
  display: none !important;
}

.photo-dialog {
  width: min(960px, 94vw);
  max-height: 94vh;
  background: #111;
  border-color: var(--line);
}

.photo-sheet {
  padding: 0.7rem 0.8rem 0.9rem;
  display: grid;
  gap: 0.65rem;
}

.photo-sheet header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}

.photo-sheet h2 {
  margin: 0;
  font-size: 0.95rem;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
}

.photo-full {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  background-color: #111;
  border-radius: 6px;
}

.focus-dialog {
  width: min(1100px, 96vw);
  max-height: 96vh;
  background: #111;
  border-color: var(--line);
  padding: 0;
}

.focus-dialog::backdrop {
  background: rgba(8, 9, 7, 0.72);
}

.focus-sheet {
  padding: 0.7rem 0.8rem 0.9rem;
  display: grid;
  gap: 0.65rem;
}

.focus-sheet header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}

.focus-sheet h2 {
  margin: 0;
  font-size: 0.95rem;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
  color: var(--ink);
}

.focus-image {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  background-color: #111;
  border-radius: 6px;
}

.focus-thumbs {
  justify-content: center;
}

#inspector-root {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  justify-content: flex-end;
}

#inspector-root:not([hidden]) {
  display: flex;
}

#inspector-root[hidden] {
  display: none !important;
  pointer-events: none;
}

#inspector-backdrop {
  flex: 1;
  background: rgba(8, 9, 7, 0.55);
}

#inspector-drawer {
  width: min(520px, 100vw);
  max-width: 100%;
  height: 100%;
  background: var(--paper);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: auto;
  transform: translateX(0);
  animation: inspector-in 0.22s ease;
}

@keyframes inspector-in {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

.inspector-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.inspector-head h2 {
  margin: 0;
  font-size: 1rem;
}

.inspector-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

#inspector-body {
  padding: 0.75rem;
}

#inspector-body .item-card {
  box-shadow: none;
}

body.inspector-open {
  overflow: hidden;
}

@media (max-width: 720px) {
  .mast,
  .mast-tools {
    flex-wrap: wrap;
  }

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

/* Internal Audit & Notes: handwritten note photos and their OCR, for operator verification only. */
.audit-acc {
  margin-top: 0.75rem;
}

.audit-acc[open] summary {
  color: var(--text, #e8eadf);
}

.audit-hint {
  margin: 0 0 0.6rem;
  font-size: 0.74rem;
  color: var(--muted);
}

.audit-note {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0.75rem;
  margin: 0 0 0.75rem;
}

.audit-note:last-child {
  margin-bottom: 0;
}

.audit-thumb {
  display: block;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0f110b;
  cursor: zoom-in;
  overflow: hidden;
}

.audit-thumb img {
  display: block;
  width: 100%;
  height: 6.5rem;
  object-fit: cover;
}

.audit-ocr {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  line-height: 1.4;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.audit-ocr.is-empty {
  color: var(--muted);
  font-style: italic;
}

.audit-fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
  gap: 0.35rem 0.75rem;
  margin: 0;
}

.audit-fields dt {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.audit-fields dd {
  margin: 0;
  font-size: 0.82rem;
}

.backlog-progress {
  padding: 0.55rem 0.8rem;
  border: 1px solid color-mix(in srgb, #f59e0b 55%, var(--line));
  border-radius: 8px;
  background: #1c1a10;
  font-size: 0.85rem;
}

/* The gallery, voice note and audit drawer each have a container of their own so one can be re-rendered
   without touching the others. The containers add no box: their children lay out as items of the column. */
.demo2-card .zone-visuals > .media-slot {
  display: contents;
}

/* --- eBay Motors powersports taxonomy: category + donor-fitment badges and item-specific pills ---------------
   High contrast for warehouse monitors; every control is touch-sized (44px) on shop-floor tablets. */
.taxonomy-panel {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 10px;
}

.taxonomy-panel[hidden] {
  display: none;
}

.taxonomy-badges,
.aspect-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.badge-category {
  background: rgba(16, 185, 129, 0.15);
  border-color: #10b981;
  color: #6ee7b7;
  font-weight: 600;
}

.badge-category .badge-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.badge-vehicle {
  background: rgba(99, 102, 241, 0.15);
  border-color: #6366f1;
  color: #c7d2fe;
  font-weight: 600;
}

.aspect-pill {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 2px;
  padding: 4px 8px;
  border: 1px solid;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.3;
}

.aspect-pill.valid {
  border-color: #10b981;
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
}

.aspect-pill.missing {
  border-color: #f59e0b;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
}

.aspect-pill .aspect-select,
.aspect-pill .aspect-input {
  min-height: 32px;
  max-width: 100%;
  padding: 2px 6px;
  border: 1px solid #f59e0b;
  border-radius: 4px;
  background: #0f110c;
  color: #fde68a;
  font: inherit;
  font-size: 12px;
}

.aspect-pill .aspect-select:focus-visible,
.aspect-pill .aspect-input:focus-visible {
  outline: 2px solid #fbbf24;
  outline-offset: 1px;
}

/* The one-click "Does Not Apply" next to the part-number input of the missing pill. */
.pill-as-is-btn {
  min-height: 32px;
  padding: 2px 10px;
  border: 1px solid #f59e0b;
  border-radius: 4px;
  background: transparent;
  color: #fbbf24;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.pill-as-is-btn:hover,
.pill-as-is-btn:focus-visible {
  background: rgba(245, 158, 11, 0.2);
  outline: 2px solid #fbbf24;
  outline-offset: 1px;
}

.pill-as-is-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.aspect-pill .aspect-select:disabled,
.aspect-pill .aspect-input:disabled {
  opacity: 0.6;
  cursor: progress;
}

button[data-publish][disabled][title] {
  cursor: not-allowed;
}

@media (max-width: 1100px), (pointer: coarse) {
  .badge {
    font-size: 15px;
  }

  .aspect-pill {
    font-size: 14px;
    padding: 6px 10px;
  }

  .aspect-pill .aspect-select,
  .aspect-pill .aspect-input {
    min-height: 44px;
    min-width: 160px;
    font-size: 16px; /* 16px stops iOS Safari zooming the page when a field is focused */
  }
}

@media (max-width: 720px) {
  .taxonomy-badges,
  .aspect-pills {
    flex-direction: column;
    align-items: stretch;
  }

  .aspect-pill {
    width: 100%;
    justify-content: space-between;
  }

  .aspect-pill .aspect-select,
  .aspect-pill .aspect-input {
    flex: 1 1 160px;
  }
}

/* An empty or $0.00 price: amber until the operator types a real one. */
.input-warning {
  border-color: #f59e0b;
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.35);
}

.price-input:has(.input-warning) {
  border-color: #f59e0b;
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.35);
}

.price-input .input-warning {
  box-shadow: none;
}

/* "Searching eBay sales..." while the desk fetches an item's comps by itself. */
.comp-source.is-loading {
  color: #475569;
  animation: comp-searching 1.2s ease-in-out infinite;
}

@keyframes comp-searching {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

@media (prefers-reduced-motion: reduce) {
  .comp-source.is-loading { animation: none; }
}

.ebay-reconnect-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin: 8px 0;
  padding: 10px 12px;
  border-left: 4px solid #c2410c;
  border-radius: 4px;
  background: #fff7ed;
  color: #7c2d12;
  font-size: 13px;
  line-height: 1.4;
}

.ebay-reconnect-banner[hidden] {
  display: none;
}

.reconnect-ebay-link {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 4px;
  background: #c2410c;
  color: #fff7ed;
  font-weight: 600;
  text-decoration: none;
}

.reconnect-ebay-link:hover {
  background: #9a3412;
}

/* Scan-to-Delist: quick delist box in the masthead, the confirmation dialog and the result badge. */
.quick-delist {
  display: flex;
  align-items: stretch;
  gap: 6px;
  margin: 0;
}

.quick-delist-input {
  width: min(280px, 26vw);
  min-width: 160px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}

.quick-delist-input:focus-visible,
.quick-delist-btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.quick-delist-btn {
  padding: 7px 12px;
  border: 1px solid var(--brand);
  border-radius: 8px;
  background: transparent;
  color: var(--brand);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.quick-delist-btn:hover {
  background: color-mix(in srgb, var(--brand) 16%, transparent);
}

.delist-dialog {
  border: 2px solid var(--danger);
  border-radius: 12px;
  background: var(--panel);
  color: var(--ink);
  padding: 0;
  max-width: min(520px, 92vw);
}

.delist-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

.delist-sheet h2 {
  font-size: 20px;
  line-height: 1.25;
}

.delist-code-line code {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--paper);
  font-size: 18px;
  word-break: break-all;
}

.delist-note {
  color: var(--muted);
  margin: 8px 0 0;
}

.delist-dialog .danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.delist-dialog .danger:disabled {
  opacity: 0.6;
}

.delist-badge {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  max-width: min(720px, 92vw);
  padding: 14px 22px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  color: #fff;
}

.delist-badge.is-success {
  background: #2e7d32;
}

.delist-badge.is-success::before {
  content: "\2713  ";
}

.delist-badge.is-already {
  background: #1565c0;
}

.delist-badge.is-error {
  background: var(--danger);
}

.delist-badge[hidden] {
  display: none;
}

@media (max-width: 900px) {
  .quick-delist {
    width: 100%;
  }

  .quick-delist-input {
    flex: 1;
    width: auto;
  }
}

/* Hero photo: the "Primary / Hero" badge, and the state of its background optimization for eBay. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.photo-thumb .hero-badge {
  position: absolute;
  top: 3px;
  left: 3px;
  z-index: 2;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--brand);
  color: #1a120c;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.4;
  text-transform: uppercase;
  pointer-events: none;
}

.photo-thumb .hero-state {
  position: absolute;
  right: 3px;
  top: 3px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: calc(100% - 6px);
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(15, 17, 12, 0.82);
  color: var(--ink);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.3;
}

.photo-thumb .hero-state.is-enhancing {
  top: auto;
  bottom: 30px;
  right: 3px;
  left: 3px;
  justify-content: center;
  border-radius: 6px;
}

.photo-thumb .hero-state.is-done {
  background: #2e7d32;
  color: #fff;
}

.photo-thumb .hero-state.is-failed {
  background: var(--danger);
  color: #fff;
}

.hero-spinner {
  display: inline-block;
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border: 2px solid rgba(243, 239, 230, 0.35);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: hero-spin 0.8s linear infinite;
}

@keyframes hero-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-spinner {
    animation-duration: 2.4s;
  }
}

/* ==========================================================================
   Industrial workstation theme (WCAG 2.1 AA)
   Additive: nothing above is edited or removed. Later rules win on equal
   specificity, so every selector here is the same one the file already uses.

     canvas        #0b0f17   deep matte slate (page)
     panels        #161a20   cards, rail, header, drawers
     wells         #0b0d11   inputs and nested wells
     dividers      #262c36   card and container borders
     input stroke  #64748b   input / select / textarea borders (3.7:1 on panels, 4.1:1 on wells: WCAG 1.4.11)
     secondary     #94a3b8   labels, metadata, counters (6.8:1 on panels, 7.6:1 on wells)
   ========================================================================== */
:root {
  --bg: #0b0f17;
  --panel: #161a20;
  --paper: #161a20;
  --line: #262c36;
  --muted: #94a3b8;
  --well: #0b0d11;
  --stroke: #64748b;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Monaco, Consolas, monospace;
  color-scheme: dark; /* native select menus, number spinners and scrollbars follow the theme */
}

html,
body {
  background: #0b0f17; /* matte: replaces the warm radial glow */
}

/* Header and chrome */
.mast {
  background: #161a20;
  border-bottom-color: #262c36;
}

.brand-divider,
.operator-live {
  border-color: #262c36;
}

.brand-divider {
  background: #262c36;
}

.brand-tag,
.operator-role,
.operator-live {
  color: #94a3b8;
}

.operator-card {
  border-color: #262c36;
}

/* Cards and panels */
.item-card {
  background: #161a20;
  border-color: #262c36;
}

.demo2-card .zone-visuals {
  background: #0b0d11; /* the well the photos sit in */
}

.demo2-card .zone-rail {
  background: #161a20;
}

.demo2-card .zone-core {
  border-color: #262c36;
}

/* Nested wells */
.pricing,
.desk-drawer,
.packaging-acc,
.specifics-acc,
.place-chip,
.price-input,
.qty-stepper button,
.chip {
  background: #0b0d11;
  border-color: #262c36;
}

.place-chip.is-on,
.spec-toggle-btn.is-on {
  background: color-mix(in srgb, var(--brand) 28%, #0b0d11);
  border-color: var(--brand);
}

.pricing {
  background: #0b0d11;
}

/* Input fields: ultra-dark well, crisp slate stroke */
.preflight input,
.preflight select,
.preflight textarea,
.demo2-card .zone-rail select,
.demo2-card .zone-rail .qty-stepper input,
.price-input,
.qty-stepper button {
  background-color: #0b0d11;
  border-color: #64748b;
  color: var(--ink);
}

.price-input input {
  background: transparent;
}

.demo2-card .zone-rail .qty-stepper input {
  border: 1px solid #64748b;
  border-radius: 8px;
  padding: 0.45rem 0.3rem;
}

.preflight input::placeholder,
.preflight textarea::placeholder,
.price-input input::placeholder {
  color: #8391a7; /* 6.1:1 on #0b0d11 */
  opacity: 1;
}

/* A visible focus indicator on every control (2.4.7), 6.8:1 against the panels */
.demo2-card :is(input, select, textarea, button, summary, a):focus-visible,
.pricing .chip:focus-visible {
  outline: 2px solid #94a3b8;
  outline-offset: 2px;
}

.preflight input:focus,
.preflight select:focus,
.preflight textarea:focus {
  border-color: #94a3b8;
}

/* Secondary labels, metadata tags and character counters */
.field > span,
.preflight-kicker,
.fitment-line,
.char-count,
.sku,
.comp-source,
.comp-notice,
.pricing h3,
.facts dt {
  color: #94a3b8;
}

.char-count.is-warn {
  color: #e0b15a;
}

.char-count.is-over {
  color: var(--danger);
}

.comp-source.is-awaiting-fitment {
  color: #e0a030; /* amber, 7.7:1 on the panel */
}

/* Monospaced alphanumerics: part numbers, labels, bins, SKUs, prices, currency */
.sku,
code,
.price-input,
.medians strong:not([data-comp-velocity]),  /* prices only: velocity is a label, not currency */
.published-meta strong,
:is(.item-card, .desk-table) .id-contrast,
:is(.item-card, .desk-table) .price-input input,
:is(.item-card, .desk-table) .qty-stepper input,
:is(.item-card, .desk-table) [data-field="oem_part_number"],
:is(.item-card, .desk-table) [data-field="oe_oem_part_number"],
:is(.item-card, .desk-table) [data-field="bin_location"],
:is(.item-card, .desk-table) [data-field="listed_price"],
:is(.item-card, .desk-table) [data-field="quantity"],
.desk-table td[data-row-bin],
.desk-table td[data-comp-median7],
.desk-table td[data-comp-median30],
.desk-table td:nth-child(7) {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

/* Middle column: Title, MPN, Brand and the Placement pills flow at their natural height and are never clipped */
.demo2-card .zone-core,
.demo2-card .zone-core .preflight,
.demo2-card .zone-core .field,
.demo2-card .zone-core .place-row {
  max-height: none;
  overflow: visible;
}

/* Right-hand column: Pricing Intelligence sits between Price/Quantity and Shipping Policy */
.demo2-card .zone-rail .pricing {
  margin: 0;
  min-width: 0;
}

.demo2-card .zone-rail select {
  width: 100%;
  min-width: 0;
}

.demo2-card .zone-rail .medians {
  /* three cells when the rail is wide enough for "14 sold/active", two over one when it is not; sizes: see the font scale below */
  grid-template-columns: repeat(auto-fit, minmax(6.75rem, 1fr));
}

.demo2-card .zone-rail .medians strong {
  overflow-wrap: anywhere;
}

.demo2-card .zone-rail .chips .chip {
  flex: 1 1 auto;
  text-align: center;
}

/* The taller rail needs a little more room, and must never trap the Approve button below the fold */
@media (min-width: 1101px) {
  .item-card.demo2-card {
    grid-template-columns: minmax(220px, 35%) minmax(280px, 1fr) minmax(260px, 24%);
  }
}

@media (max-height: 860px) {
  .demo2-card .zone-rail {
    position: static;
  }
}

/* --- Ergonomic font scale: Pricing Intelligence ---
   action buttons  12px (0.75rem) / 600 / padding 0.375rem 0.5rem
   metric labels   12px (0.75rem): "7d median", "30d median", "Velocity"
   median values   15px (0.9375rem) bold */
.demo2-card .pricing {
  font-size: 0.8125rem;
}

.demo2-card .pricing .medians {
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

.demo2-card .pricing .medians strong {
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.25;
}

.demo2-card .pricing .chip {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.375rem 0.5rem;
  line-height: 1.25;
  letter-spacing: 0.01em;
}

/* ==========================================================================
   MPN provenance badges, beside the MPN caption on the card
   CATALOG_DEDUCED (matte amber): the number was inferred, not read from a stamp. Verify fitment.
   STAMPED_OCR (subtle green):   the number was read from casting or stamped metal in the photos.
   MANUAL_INPUT shows no badge: a person typed it.
   They sit inside `.field > span`, which is uppercase with letter spacing, so both are reset here.
   ========================================================================== */
.field > span:has(.badge-mpn-deduced, .badge-mpn-verified) {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.badge-mpn-deduced,
.badge-mpn-verified {
  display: inline-block;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  border-radius: 4px;
  padding: 2px 6px;
}

.badge-mpn-deduced {
  background: #2d2314;
  color: #fbbf24;
  border: 1px solid #78350f;
}

.badge-mpn-verified {
  background: #14291f;
  color: #34d399;
  border: 1px solid #065f46;
}

/* The access-key gate (desk.js, api-auth block): covers the desk until the operator enters the key. */
.api-key-gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(8, 10, 7, 0.92);
}

.api-key-gate-panel {
  width: min(24rem, 100%);
  display: grid;
  gap: 0.8rem;
  padding: 1.4rem;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.api-key-gate-panel h2 {
  margin: 0;
  font-size: 1.1rem;
}

.api-key-gate-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.api-key-gate-panel .api-key-gate-error {
  color: var(--danger);
}

.api-key-gate-panel input {
  padding: 0.6rem 0.7rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.api-key-gate-panel button {
  padding: 0.6rem 0.9rem;
  color: #fff;
  background: var(--brand);
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}
