.auction-body {
  min-height: 100vh;
}

.site-nav a[aria-current="page"] {
  color: var(--oxblood);
}

.auction-shell {
  width: min(1400px, calc(100% - 48px));
  padding: 60px 0 72px;
}

.auction-ledger {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 82%, white);
}

.auction-intro {
  padding: 30px 28px 18px;
}

.auction-intro .eyebrow {
  margin: 0 0 10px;
  color: var(--oxblood);
}

.auction-intro h1 {
  max-width: none;
  margin: 0;
  font-size: clamp(3rem, 5vw, 5.3rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.95;
}

.auction-intro > p:not(.eyebrow, .form-message) {
  max-width: 650px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.5;
}

.cert-form {
  max-width: 660px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 14px;
  margin-top: 18px;
}

.cert-field {
  display: grid;
  gap: 7px;
}

.cert-field span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.cert-field input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  outline: none;
  background: rgba(255, 255, 255, 0.28);
  color: var(--ink);
  font: 1rem/1 Georgia, "Times New Roman", serif;
}

.cert-field input:focus {
  border-color: var(--oxblood);
  box-shadow: 0 0 0 2px rgba(140, 29, 32, 0.12);
}

.cert-form .button {
  min-width: 108px;
  height: 48px;
}

.form-message {
  min-height: 20px;
  margin: 9px 0 0;
  color: var(--muted);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.78rem;
}

.form-message:empty {
  display: none;
}

.form-message.error {
  color: var(--loss);
}

.form-message.success {
  color: var(--green);
}

.auction-table-wrap {
  position: relative;
  overflow-x: auto;
}

.auction-table {
  width: 100%;
  min-width: 1050px;
  border-collapse: collapse;
  table-layout: fixed;
}

.auction-table th {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--oxblood-deep);
  font-size: 0.7rem;
  text-align: left;
  text-transform: uppercase;
}

.auction-table th:nth-child(1) { width: 112px; }
.auction-table th:nth-child(2) { width: 29%; }
.auction-table th:nth-child(3) { width: 13%; }
.auction-table th:nth-child(4) { width: 11%; }
.auction-table th:nth-child(5),
.auction-table th:nth-child(6) { width: 17%; }
.auction-table th:nth-child(7) { width: 86px; }

.auction-table td {
  min-height: 126px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.auction-table tbody tr:last-child td {
  border-bottom: 0;
}

.slab-cell {
  text-align: center;
}

.auction-slab-image {
  width: 62px;
  height: 96px;
  display: block;
  margin: 0 auto;
  border: 1px solid var(--line-strong);
  background: var(--paper-deep);
  object-fit: contain;
  box-shadow: 0 5px 12px rgba(42, 30, 19, 0.08);
}

.image-unavailable {
  display: grid;
  place-items: center;
  padding: 6px;
  color: var(--muted);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.62rem;
  line-height: 1.2;
  text-align: center;
}

.auction-card-name strong,
.auction-card-name span {
  display: block;
}

.auction-card-name strong {
  font-size: 1.02rem;
  line-height: 1.25;
}

.auction-card-name span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.82rem;
}

.cert-number,
.grade-value,
.market-value,
.market-note,
.remove-button {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

.cert-number {
  color: var(--ink);
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 4px;
}

.grade-value {
  font-size: 0.84rem;
  font-weight: 700;
}

.market-value {
  display: block;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.market-value.pricecharting {
  color: var(--green);
}

.market-note {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.65rem;
  line-height: 1.35;
}

.market-note a {
  text-underline-offset: 3px;
}

.remove-button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--oxblood);
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
}

.remove-button:hover,
.remove-button:focus-visible {
  border-color: var(--oxblood);
  background: var(--oxblood);
  color: white;
}

.auction-empty {
  min-height: 260px;
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 36px;
  color: var(--muted);
  text-align: center;
}

.auction-empty[hidden],
.auction-table[hidden] {
  display: none !important;
}

.auction-empty strong {
  color: var(--ink);
  font-size: 1.3rem;
}

.auction-empty span {
  font-size: 0.92rem;
}

.skeleton {
  display: block;
  height: 11px;
  margin: 5px 0;
  background: var(--paper-deep);
  animation: skeleton-pulse 1.3s ease-in-out infinite alternate;
}

.skeleton-image { width: 62px; height: 96px; margin: auto; }
.skeleton-title { width: min(220px, 85%); height: 16px; }
.skeleton-copy { width: min(140px, 72%); }
.skeleton-short { width: 54px; }
.skeleton-value { width: 92px; height: 18px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes skeleton-pulse {
  from { opacity: 0.45; }
  to { opacity: 0.95; }
}

@media (max-width: 860px) {
  .auction-shell {
    width: min(100% - 24px, 1400px);
    padding: 28px 0 46px;
  }

  .auction-intro {
    padding: 24px 18px 16px;
  }

  .auction-intro h1 {
    font-size: clamp(2.6rem, 13vw, 4.4rem);
  }

  .cert-form {
    grid-template-columns: 1fr;
  }

  .cert-form .button {
    width: 100%;
  }

}

@media (max-width: 760px) {
  .auction-table-wrap {
    overflow: visible;
  }

  .auction-table,
  .auction-table tbody {
    min-width: 0;
    display: block;
  }

  .auction-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .auction-table tbody {
    padding: 0;
  }

  .auction-table tbody tr {
    position: relative;
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px 14px;
    padding: 22px 44px 22px 18px;
    border-bottom: 1px solid var(--line);
  }

  .auction-table td {
    min-height: 0;
    display: block;
    padding: 0;
    border: 0;
  }

  .auction-table td::before {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-family: Inter, ui-sans-serif, system-ui, sans-serif;
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
  }

  .auction-table .slab-cell {
    grid-column: 1;
    grid-row: 1 / span 3;
  }

  .auction-table .slab-cell::before,
  .auction-table .auction-card-name::before,
  .auction-table .remove-cell::before {
    display: none;
  }

  .auction-table .auction-slab-image {
    width: 58px;
    height: 90px;
  }

  .auction-table .auction-card-name {
    grid-column: 2 / span 2;
    padding-right: 12px;
  }

  .auction-table .remove-cell {
    position: absolute;
    top: 18px;
    right: 12px;
  }

  .auction-table .market-value {
    font-size: 1.1rem;
  }

  .loading-row td:nth-child(n+4) {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton { animation: none; }
}
