:root {
  color-scheme: light;
  --paper: #f7f1e6;
  --paper-deep: #eee2cf;
  --panel: #fbf7ee;
  --ink: #241c17;
  --muted: #6f6256;
  --line: #d8c7ad;
  --line-strong: #bba17c;
  --oxblood: #8c1d20;
  --oxblood-deep: #631216;
  --green: #1f6a4c;
  --brass: #b98a45;
  --loss: #a43a2f;
  --shadow: 0 18px 45px rgba(42, 30, 19, 0.12);
  --soft-shadow: 0 8px 22px rgba(42, 30, 19, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(140, 29, 32, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(140, 29, 32, 0.04) 1px, transparent 1px),
    var(--paper);
  background-size: 72px 72px;
  color: var(--ink);
  font-family: "Times New Roman", Georgia, serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 0, rgba(255, 255, 255, 0.55), transparent 38%);
  mix-blend-mode: soft-light;
}

a {
  color: inherit;
}

.site-header,
main,
.site-footer {
  width: min(1400px, calc(100% - 48px));
  margin: 0 auto;
}

.site-header {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand-seal,
.collector-monogram {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--oxblood);
  background: var(--ink);
  color: var(--brass);
  font-family: Georgia, serif;
  font-size: 1.45rem;
  font-weight: 700;
  box-shadow: inset 0 0 0 4px #2c241d;
}

.brand-mark strong,
.brand-mark small {
  display: block;
}

.brand-mark strong {
  font-size: 0.96rem;
  font-weight: 700;
  text-transform: uppercase;
}

.brand-mark small,
.eyebrow,
.last-updated,
.site-nav,
label span,
th,
dt {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.brand-mark small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.site-nav a,
.text-link {
  text-decoration: none;
}

.site-nav a:hover,
.text-link:hover {
  color: var(--oxblood);
}

.last-updated {
  padding: 8px 10px;
  border: 1px dashed var(--line-strong);
  color: var(--oxblood);
  font-size: 0.75rem;
  white-space: nowrap;
}

main {
  padding: 26px 0 40px;
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(360px, 0.7fr);
  gap: 28px;
  padding: 42px 0 36px;
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  max-width: 860px;
}

.hero-value-chart {
  min-height: 420px;
  display: grid;
  grid-template-rows: auto minmax(260px, 1fr);
  gap: 22px;
  padding: 24px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 78%, white);
}

.hero-chart-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
}

.hero-value-chart h1 {
  max-width: none;
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 0.95;
}

.hero-chart-kpi {
  min-width: 190px;
  display: grid;
  gap: 6px;
  justify-items: end;
  text-align: right;
}

.hero-chart-kpi span,
.hero-chart-kpi small {
  color: var(--muted);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-chart-kpi strong {
  color: var(--ink);
  font-size: clamp(1.35rem, 3vw, 2.2rem);
  line-height: 1;
}

.hero-chart {
  min-height: 278px;
  position: relative;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  grid-template-rows: 1fr 32px;
  gap: 8px 14px;
  padding: 22px 4px 6px 0;
}

.hero-chart-y-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: end;
  color: var(--muted);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  text-align: right;
}

.hero-chart-plot {
  position: relative;
  min-height: 214px;
  border-left: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.hero-chart-plot svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.hero-chart-plot line {
  stroke: var(--line);
  stroke-width: 0.45;
  vector-effect: non-scaling-stroke;
}

.hero-chart-plot polygon {
  fill: color-mix(in srgb, var(--oxblood) 16%, transparent);
}

.hero-chart-plot polyline {
  fill: none;
  stroke: var(--oxblood);
  stroke-width: 2.4;
  vector-effect: non-scaling-stroke;
}

.hero-chart-point {
  position: absolute;
  z-index: 2;
  width: 10px;
  height: 10px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--oxblood);
  box-shadow: 0 0 0 1px var(--oxblood);
  transform: translate(-50%, -50%);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.hero-chart-point.down {
  background: var(--loss);
  box-shadow: 0 0 0 1px var(--loss);
}

.hero-chart-point:hover {
  transform: translate(-50%, -50%) scale(1.65);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--oxblood) 18%, transparent);
}

.hero-chart-x-axis {
  position: relative;
  grid-column: 2;
  color: var(--muted);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 900;
}

.hero-chart-x-axis span {
  position: absolute;
  top: 4px;
  transform: translateX(-50%);
  white-space: nowrap;
}

.hero-chart-x-axis span:first-child {
  transform: translateX(0);
}

.hero-chart-x-axis span:last-child {
  transform: translateX(-100%);
}

.hero-axis-title {
  position: absolute;
  color: var(--oxblood);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-y-axis-title {
  top: 0;
  left: 0;
}

.hero-x-axis-title {
  right: 4px;
  bottom: 0;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--oxblood);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 840px;
  margin-bottom: 18px;
  font-size: 4.9rem;
  line-height: 0.92;
  font-weight: 500;
}

h2 {
  margin-bottom: 0;
  font-size: 1.45rem;
  line-height: 1.14;
  font-weight: 500;
}

h3 {
  margin-bottom: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
}

.hero-subtitle {
  max-width: 650px;
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.62;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid var(--oxblood);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--oxblood);
  color: #fff9ef;
}

.button.secondary {
  background: transparent;
  color: var(--oxblood);
}

.collector-card,
.archive-panel,
.tracker-panel,
.collector-profile,
.legacy-cta,
.provenance-card,
.grail-card {
  border: 1px solid var(--line);
  background: rgba(251, 247, 238, 0.9);
}

.collector-card {
  padding: 22px;
  align-self: stretch;
  box-shadow: var(--soft-shadow);
}

.collector-lockup {
  display: flex;
  gap: 16px;
  align-items: center;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.collector-lockup span,
.collector-lockup small {
  display: block;
}

.collector-lockup span {
  color: var(--muted);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.collector-lockup strong {
  display: block;
  margin: 2px 0;
  font-size: 2.1rem;
  font-weight: 500;
}

.collector-lockup small {
  color: var(--muted);
  line-height: 1.35;
}

.hero-stats {
  margin: 22px 0 0;
  display: grid;
  gap: 16px;
}

.hero-stats div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: baseline;
}

dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

dd {
  margin: 0;
}

.hero-stats dd {
  color: var(--oxblood);
  font-size: 2.05rem;
  line-height: 1;
}

.section-block {
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.section-heading.compact {
  margin-bottom: 14px;
}

.text-link,
.as-of {
  color: var(--oxblood);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

.grail-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(200px, 1fr);
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-snap-type: x proximity;
}

.grail-card {
  min-height: 420px;
  position: relative;
  padding: 18px;
  scroll-snap-align: start;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.grail-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--soft-shadow);
}

.lot-number {
  min-width: 34px;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--oxblood);
  color: #fff8ed;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
}

.grail-image,
.provenance-image {
  margin: 14px 0;
  display: flex;
  justify-content: center;
}

.grail-copy p,
.provenance-card p,
.panel-copy,
.collector-profile p,
.legacy-cta p {
  color: var(--muted);
  line-height: 1.55;
}

.grail-copy h3,
.provenance-card h3 {
  min-height: 62px;
  margin-bottom: 12px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  line-height: 1.28;
  text-transform: none;
}

.grail-copy dl,
.provenance-card dl,
.profile-facts {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.grail-copy dt,
.provenance-card dt,
.profile-facts dt {
  margin-bottom: 3px;
}

.grail-copy dd,
.provenance-card dd,
.profile-facts dd {
  color: var(--ink);
  font-size: 0.92rem;
}

.overview-grid,
.analytics-grid,
.insight-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.overview-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.analytics-grid {
  grid-template-columns: 1.05fr 0.9fr 1.45fr 1fr 1.25fr;
}

.insight-grid {
  grid-template-columns: 1.15fr 1fr 0.9fr;
}

.archive-panel {
  min-height: 176px;
  padding: 20px;
  border-left: 0;
}

.archive-panel:first-child {
  border-left: 1px solid var(--line);
}

.breakdown-row {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}

.breakdown-row div,
.performer-row,
.value-summary dl div,
.collection-counts dl div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.breakdown-row span:first-child,
.performer-row span,
.value-summary dt,
.collection-counts dt {
  color: var(--muted);
}

.breakdown-row strong,
.performer-row strong {
  white-space: nowrap;
}

.bar {
  height: 5px;
  display: block;
  overflow: hidden;
  background: #e7d9c5;
}

.bar i {
  height: 100%;
  display: block;
  background: var(--oxblood);
}

.portfolio-health {
  display: grid;
  align-content: start;
}

.daily-movers-panel {
  min-width: 0;
}

.daily-movers-heading {
  margin-bottom: 14px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.daily-movers-heading h3 {
  margin: 0;
}

.daily-movers-heading span {
  color: var(--muted);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

.daily-movers {
  display: grid;
  gap: 13px;
}

.mover-group {
  min-width: 0;
}

.mover-group + .mover-group {
  padding-top: 11px;
  border-top: 1px solid var(--line);
}

.mover-group h4 {
  margin: 0 0 6px;
  color: var(--green);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.mover-group.loss h4 {
  color: var(--red);
}

.mover-row {
  min-width: 0;
  min-height: 30px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
}

.mover-rank {
  color: var(--muted);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.65rem;
  font-weight: 800;
}

.mover-card {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.76rem;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mover-change {
  display: grid;
  justify-items: end;
  color: var(--green);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  line-height: 1.05;
}

.mover-change.loss {
  color: var(--red);
}

.mover-change strong {
  font-size: 0.7rem;
}

.mover-change small {
  margin-top: 2px;
  font-size: 0.59rem;
  font-weight: 800;
  opacity: 0.78;
}

.mover-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.grade-badge {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  border: 2px solid var(--brass);
  background: var(--ink);
  color: var(--brass);
  font-size: 2rem;
  font-weight: 700;
}

.value-summary dl,
.collection-counts dl {
  margin: 0;
  display: grid;
  gap: 14px;
}

.value-summary dd,
.collection-counts dd {
  font-size: 1.06rem;
  font-weight: 700;
}

.trend-line {
  min-height: 236px;
  position: relative;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  grid-template-rows: 1fr 34px;
  gap: 8px 12px;
  padding: 22px 4px 6px 0;
}

.trend-y-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: end;
  padding-bottom: 2px;
  color: var(--muted);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  text-align: right;
}

.trend-plot {
  position: relative;
  min-height: 166px;
  border-left: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.grid-line {
  position: absolute;
  right: 0;
  left: 0;
  height: 1px;
  background: var(--line);
  pointer-events: none;
}

.grid-line.top {
  top: 0;
}

.grid-line.upper {
  top: 25%;
}

.grid-line.middle {
  top: 50%;
}

.grid-line.lower {
  top: 75%;
}

.trend-bars {
  position: absolute;
  inset: 0 0 0 0;
  display: flex;
  align-items: end;
  gap: 8px;
  padding: 0 8px;
}

.trend-bar {
  position: relative;
  flex: 1;
  min-width: 10px;
  background: linear-gradient(180deg, var(--oxblood), var(--brass));
  opacity: 0.86;
  transition: opacity 180ms ease, transform 180ms ease;
}

.trend-bar b {
  position: absolute;
  right: 50%;
  bottom: calc(100% + 6px);
  transform: translateX(50%) rotate(-18deg);
  transform-origin: center bottom;
  color: var(--muted);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 1;
  opacity: 0;
  white-space: nowrap;
  transition: opacity 180ms ease;
}

.trend-bar:hover {
  opacity: 1;
  transform: scaleY(1.03);
}

.trend-bar:hover b {
  opacity: 1;
}

.trend-x-axis {
  position: relative;
  grid-column: 2;
  color: var(--muted);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
}

.trend-x-axis span {
  position: absolute;
  top: 4px;
  transform: translateX(-50%);
  white-space: nowrap;
}

.trend-x-axis span:first-child {
  transform: translateX(0);
}

.trend-x-axis span:last-child {
  transform: translateX(-100%);
}

.chart-axis-title {
  position: absolute;
  color: var(--oxblood);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.y-axis-title {
  top: 0;
  left: 0;
}

.x-axis-title {
  right: 4px;
  bottom: 0;
}

.score {
  display: block;
  margin: 10px 0;
  color: var(--oxblood);
  font-size: 3.2rem;
  line-height: 1;
  font-weight: 500;
}

.provenance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.provenance-card {
  position: relative;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
}

.provenance-card .lot-number {
  position: absolute;
  top: 18px;
  left: 18px;
}

.provenance-card h4 {
  margin: 18px 0 6px;
  color: var(--oxblood);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.68rem;
  text-transform: uppercase;
}

.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 28px;
}

.acquisition-list,
.timeline,
.milestone-list {
  display: grid;
  gap: 12px;
}

.acquisition-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.acquisition-row time,
.timeline time {
  color: var(--oxblood);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.acquisition-row strong,
.timeline strong {
  display: block;
  line-height: 1.25;
}

.acquisition-row span,
.timeline span,
.milestone p {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.35;
}

.acquisition-row b {
  color: var(--oxblood);
  white-space: nowrap;
}

.timeline {
  position: relative;
  padding-left: 22px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 8px;
  left: 5px;
  width: 1px;
  background: var(--line-strong);
}

.timeline article {
  position: relative;
}

.timeline article::before {
  content: "";
  position: absolute;
  top: 6px;
  left: -21px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--oxblood);
}

.milestone {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 250, 241, 0.58);
}

.milestone > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 1px solid var(--line);
  color: var(--brass);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.rarity-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.rarity-stats div {
  padding: 16px 10px;
  border: 1px solid var(--line);
  text-align: center;
}

.rarity-stats strong {
  display: block;
  color: var(--oxblood);
  font-size: 2rem;
  line-height: 1;
}

.rarity-stats span {
  display: block;
  margin-top: 6px;
  font-weight: 700;
}

.rarity-stats p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.performer-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.risk-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.risk-grid div {
  padding: 12px;
  border: 1px solid var(--line);
}

.risk-grid span {
  display: block;
  color: var(--muted);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.risk-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 1.2rem;
}

.collector-profile {
  display: grid;
  grid-template-columns: 1.2fr 0.85fr;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.collector-profile > article,
.legacy-cta {
  padding: 24px;
}

.legacy-cta {
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
}

.profile-facts {
  margin-top: 24px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tracker-panel {
  overflow: hidden;
}

.panel-header {
  padding: 22px 22px 0;
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
}

.panel-header p {
  margin: 6px 0 0;
  color: var(--muted);
}

.status-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.registry-actions {
  display: grid;
  justify-items: end;
  gap: 12px;
  min-width: min(100%, 430px);
}

.status-pill,
.status,
.image-pending {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f3eadb;
  color: var(--muted);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.74rem;
  font-weight: 800;
  white-space: nowrap;
}

button.status-pill {
  appearance: none;
  cursor: pointer;
  letter-spacing: 0;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

button.status-pill:hover {
  border-color: var(--red);
  transform: translateY(-1px);
}

button.status-pill:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

button.status-pill.active {
  border-color: var(--red);
  box-shadow: inset 0 0 0 1px var(--red);
  color: var(--ink);
}

.status-pill.all {
  background: #efe7da;
  color: var(--ink);
}

.status-pill strong {
  color: var(--ink);
}

.market-refresh-panel {
  width: 100%;
  max-width: 430px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 2px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 250, 241, 0.62);
}

.market-refresh-panel strong {
  display: block;
  color: var(--ink);
}

.market-refresh-panel span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.market-refresh-panel a {
  color: var(--red);
  font-weight: 800;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.market-refresh-button {
  min-width: 170px;
  min-height: 38px;
  padding: 0 14px;
  font-size: 0.72rem;
}

.market-refresh-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.status.vaulted,
.status-pill.vaulted {
  background: #e7efe7;
  color: var(--green);
}

.status.already-shipped,
.status-pill.already-shipped,
.status.in-transit,
.status-pill.in-transit {
  background: #f4ead3;
  color: #7f5b16;
}

.controls {
  padding: 18px 22px 22px;
  display: flex;
  gap: 12px;
  align-items: end;
  justify-content: space-between;
}

.search {
  flex: 1;
}

.reset-button {
  width: 180px;
  height: 42px;
  flex: 0 0 auto;
}

.reset-button:disabled {
  cursor: default;
  opacity: 0.45;
  transform: none;
}

.mobile-sort-control {
  display: none;
}

label span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

input,
select {
  width: 100%;
  height: 42px;
  margin-top: 7px;
  border: 1px solid var(--line);
  background: #fffaf1;
  color: var(--ink);
  font: inherit;
}

input {
  padding: 0 12px;
}

select {
  min-width: 180px;
  padding: 0 10px;
}

.slab-list-shell {
  display: none;
  padding: 0 22px 22px;
}

.slab-list {
  display: grid;
  gap: 12px;
}

.slab-list-card {
  min-height: 178px;
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr) minmax(170px, auto);
  gap: 22px;
  align-items: stretch;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.86);
  box-shadow: 0 10px 28px rgba(42, 30, 19, 0.06);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.slab-list-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 16px 34px rgba(42, 30, 19, 0.1);
  transform: translateY(-1px);
}

.slab-list-media {
  min-width: 0;
  display: flex;
  align-items: center;
}

.slab-card-image-link {
  width: 100%;
  max-width: 116px;
  height: 146px;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f4eadc;
  box-shadow: var(--soft-shadow);
}

.slab-card-image-link img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 24%;
  transition: transform 220ms ease;
}

.slab-card-image-link:hover img,
.slab-card-image-link:focus-visible img {
  transform: scale(1.05);
}

.slab-list-main {
  min-width: 0;
  display: grid;
  align-content: space-between;
  gap: 14px;
}

.slab-list-title h3 {
  margin: 0 0 10px;
  color: #0f0d0b;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(1.35rem, 2vw, 2.05rem);
  line-height: 1.08;
  font-weight: 800;
  text-transform: none;
}

.slab-list-title h3 span {
  color: #8a8178;
  font-weight: 500;
}

.slab-list-set,
.slab-list-source {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #8a8178;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(1rem, 1.5vw, 1.32rem);
  line-height: 1.2;
}

.slab-list-source {
  margin-top: 9px;
  color: var(--ink);
}

.slab-list-set span,
.slab-list-source span {
  width: 22px;
  color: var(--ink);
  font-size: 1.05rem;
  text-align: center;
}

.slab-list-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  color: #8a8178;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
}

.slab-list-meta strong {
  color: #0f0d0b;
  font-size: 1.15rem;
}

.slab-list-meta > span:not(.status) {
  padding-left: 16px;
  border-left: 1px solid var(--line);
}

.slab-list-values {
  margin: 0;
  min-width: 164px;
  display: grid;
  align-content: space-between;
  justify-items: end;
  gap: 18px;
  text-align: right;
}

.slab-list-values div {
  display: grid;
  gap: 2px;
}

.slab-list-values dt {
  color: #8a8178;
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
}

.slab-list-values dd {
  color: #050403;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(1.35rem, 2vw, 1.82rem);
  line-height: 1.08;
  font-weight: 800;
  white-space: nowrap;
}

.slab-list-values small {
  color: #a9a29b;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.88rem;
}

.slab-list-empty {
  min-height: 160px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.72);
  color: var(--muted);
  text-align: center;
}

.table-shell {
  max-height: 72vh;
  overflow: auto;
  border-top: 1px solid var(--line);
}

table {
  width: 100%;
  min-width: 1160px;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--paper-deep);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

th.numeric .sort-button {
  justify-content: flex-end;
  text-align: right;
}

.sort-button {
  width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
  text-transform: inherit;
}

.sort-button::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  opacity: 0.34;
}

.sort-button[data-sort-direction="asc"]::after {
  border-bottom: 6px solid var(--oxblood);
  opacity: 1;
}

.sort-button[data-sort-direction="desc"]::after {
  border-top: 6px solid var(--oxblood);
  opacity: 1;
}

.sort-button:hover {
  color: var(--oxblood);
}

.sort-button:focus-visible {
  outline: 2px solid var(--oxblood);
  outline-offset: 3px;
}

tbody tr {
  transition: background 180ms ease;
}

tbody tr:hover {
  background: rgba(255, 250, 241, 0.75);
}

.numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.gain-loss-cell {
  min-width: 128px;
}

.gain-loss-combo {
  display: grid;
  gap: 3px;
  justify-items: end;
  white-space: nowrap;
}

.gain-loss-combo strong,
.gain-loss-combo small {
  display: block;
}

.gain-loss-combo small span {
  font-size: 0.78rem;
}

.price-chart-cell {
  min-width: 138px;
}

.row-sparkline {
  width: 126px;
  display: grid;
  gap: 3px;
  color: var(--green);
}

.row-sparkline.down {
  color: var(--loss);
}

.sparkline-plot {
  position: relative;
  width: 126px;
  height: 38px;
  display: block;
}

.row-sparkline svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.row-sparkline line {
  stroke: rgba(117, 105, 90, 0.3);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.row-sparkline polyline {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.sparkline-point {
  position: absolute;
  top: var(--point-y);
  left: var(--point-x);
  width: 7px;
  height: 7px;
  padding: 0;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  background: var(--paper);
  color: inherit;
  cursor: crosshair;
  transform: translate(-50%, -50%);
}

.sparkline-point.latest {
  width: 9px;
  height: 9px;
  background: currentColor;
  box-shadow: 0 0 0 2px var(--paper);
}

.sparkline-point:hover,
.sparkline-point:focus-visible {
  z-index: 1;
  background: currentColor;
  outline: 2px solid color-mix(in srgb, currentColor 22%, transparent);
  outline-offset: 2px;
}

.sparkline-tooltip {
  position: fixed;
  z-index: 120;
  min-width: 112px;
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  background: #5b1717;
  box-shadow: 0 6px 16px rgba(45, 29, 22, 0.18);
  color: #fffaf0;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.68rem;
  line-height: 1.25;
  pointer-events: none;
}

.sparkline-tooltip[hidden] {
  display: none;
}

.sparkline-tooltip time {
  opacity: 0.78;
}

.sparkline-tooltip strong {
  font-size: 0.76rem;
  letter-spacing: 0;
}

.row-sparkline small,
.sparkline-empty {
  color: var(--muted);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}

.card-name {
  min-width: 320px;
  font-weight: 700;
}

.date-cell {
  min-width: 126px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.slab-image-cell {
  width: 78px;
  min-width: 78px;
  position: relative;
  overflow: visible;
}

.slab-image-link,
.catalog-placeholder {
  width: 44px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  background: #221b16;
  color: var(--brass);
  box-shadow: var(--soft-shadow);
}

.slab-image-link.large,
.catalog-placeholder.large {
  width: 122px;
  height: 174px;
}

.catalog-placeholder {
  flex-direction: column;
  gap: 5px;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  text-align: center;
}

.catalog-placeholder span {
  font-size: 0.62rem;
  font-weight: 800;
}

.catalog-placeholder strong {
  font-size: 0.84rem;
}

.catalog-placeholder.large span {
  font-size: 0.75rem;
}

.catalog-placeholder.large strong {
  font-size: 1.2rem;
}

.slab-thumb {
  width: 40px;
  height: 60px;
  display: block;
  object-fit: cover;
}

.slab-image-link.large .slab-thumb {
  width: 114px;
  height: 166px;
}

.slab-preview {
  width: max-content;
  max-width: min(520px, calc(100vw - 44px));
  display: flex;
  position: fixed;
  top: var(--preview-top, 12px);
  left: var(--preview-left, 12px);
  z-index: 5;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(0.98);
  transform-origin: top left;
  transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
}

.slab-preview img {
  width: auto;
  height: 260px;
  max-width: 238px;
  display: block;
  object-fit: contain;
}

.slab-image-link:hover .slab-preview,
.slab-image-link:focus .slab-preview {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.cert-link {
  color: #233f63;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-weight: 800;
  text-decoration-color: rgba(35, 63, 99, 0.35);
  text-underline-offset: 3px;
}

.cert-link:hover {
  text-decoration-color: #233f63;
}

.subtle {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 400;
  line-height: 1.32;
}

.gain {
  color: var(--green);
  font-weight: 800;
}

.loss {
  color: var(--loss);
  font-weight: 800;
}

.empty {
  height: 180px;
  color: var(--muted);
  text-align: center;
  vertical-align: middle;
}

.site-footer {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

@media (max-width: 1180px) {
  h1 {
    font-size: 3.8rem;
  }

  .hero-section,
  .collector-profile {
    grid-template-columns: 1fr;
  }

  .overview-grid,
  .analytics-grid,
  .split-section,
  .insight-grid,
  .provenance-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .archive-panel {
    border-left: 1px solid var(--line);
  }

  .legacy-cta {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 760px) {
  .site-header,
  main,
  .site-footer {
    width: min(100% - 24px, 1400px);
  }

  .site-header {
    min-height: auto;
    padding: 14px 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    width: 100%;
    justify-content: space-between;
  }

  .last-updated {
    white-space: normal;
  }

  .hero-section {
    padding-top: 24px;
  }

  .hero-value-chart {
    min-height: 360px;
    padding: 18px;
  }

  .hero-chart-header {
    flex-direction: column;
  }

  .hero-chart-kpi {
    justify-items: start;
    text-align: left;
  }

  .hero-chart {
    grid-template-columns: 66px minmax(0, 1fr);
  }

  .hero-chart-plot {
    min-height: 178px;
  }

  h1 {
    font-size: 2.9rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .section-heading,
  .panel-header,
  .controls {
    align-items: stretch;
    flex-direction: column;
  }

  .registry-actions,
  .market-refresh-panel {
    justify-items: stretch;
    max-width: none;
    width: 100%;
  }

  .market-refresh-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .market-refresh-button {
    width: 100%;
  }

  .reset-button {
    width: 100%;
  }

  .overview-grid,
  .analytics-grid,
  .split-section,
  .insight-grid,
  .provenance-grid,
  .collector-profile,
  .profile-facts {
    grid-template-columns: 1fr;
  }

  .grail-rail {
    grid-auto-columns: minmax(230px, 82%);
  }

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

  .provenance-image {
    justify-content: flex-start;
    padding-top: 34px;
  }

  .rarity-stats {
    grid-template-columns: 1fr;
  }

  select {
    min-width: 100%;
  }

  .slab-list-shell {
    display: block;
    padding: 0 16px 18px;
  }

  .mobile-sort-control {
    display: block;
  }

  .slab-list-card {
    min-height: 0;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 14px;
    padding: 13px;
    border-radius: 14px;
  }

  .slab-card-image-link {
    height: 116px;
    border-radius: 7px;
  }

  .slab-list-values {
    grid-column: 2;
    min-width: 0;
    display: flex;
    align-items: end;
    justify-content: space-between;
    justify-items: stretch;
    gap: 14px;
    text-align: left;
  }

  .slab-list-values div:last-child {
    text-align: right;
  }

  .slab-list-values dt {
    font-size: 0.76rem;
  }

  .slab-list-values dd {
    font-size: 1.08rem;
  }

  .slab-list-values small {
    font-size: 0.76rem;
  }

  .slab-list-title h3 {
    margin-bottom: 7px;
    font-size: 1.14rem;
  }

  .slab-list-set,
  .slab-list-source {
    gap: 7px;
    font-size: 0.92rem;
  }

  .slab-list-set span,
  .slab-list-source span {
    width: 18px;
  }

  .slab-list-meta {
    gap: 8px 10px;
    font-size: 0.84rem;
  }

  .slab-list-meta strong {
    font-size: 0.96rem;
  }

  .table-shell {
    display: none;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
  }

  table {
    min-width: 0;
  }

  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  tbody {
    display: grid;
    gap: 12px;
    padding: 0 16px 18px;
  }

  tbody tr {
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: var(--soft-shadow);
  }

  td {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(106px, 34%) minmax(0, 1fr);
    gap: 12px;
    padding: 11px 14px;
    text-align: right;
    overflow-wrap: anywhere;
  }

  td::before {
    content: attr(data-label);
    color: var(--muted);
    font-family: Inter, ui-sans-serif, system-ui, sans-serif;
    font-size: 0.72rem;
    font-weight: 900;
    text-align: left;
    text-transform: uppercase;
  }

  .card-name {
    min-width: 0;
    text-align: left;
  }

  .slab-image-cell {
    width: auto;
    min-width: 0;
  }

  .slab-image-link,
  .catalog-placeholder {
    justify-self: end;
  }

  .slab-preview {
    top: var(--preview-top, 12px);
    left: var(--preview-left, 12px);
    right: auto;
  }

  .slab-preview img {
    height: 220px;
    max-width: 202px;
  }

  .numeric,
  .date-cell {
    text-align: right;
  }

  .gain-loss-combo {
    justify-items: end;
  }

  .price-chart-cell {
    display: grid;
  }

  .row-sparkline {
    justify-self: end;
  }

  .empty {
    height: auto;
    padding: 48px 16px;
  }

  .empty::before {
    content: "";
  }

  .site-footer {
    padding: 18px 0;
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 460px) {
  h1 {
    font-size: 2.35rem;
  }

  .collector-lockup,
  .hero-stats div,
  .acquisition-row,
  .grail-copy dl,
  .provenance-card dl {
    grid-template-columns: 1fr;
  }

  .collector-lockup {
    display: grid;
  }

  td {
    grid-template-columns: 1fr;
    gap: 5px;
    text-align: left;
  }

  .numeric,
  .date-cell {
    text-align: left;
  }

  .slab-image-link,
  .catalog-placeholder {
    justify-self: start;
  }

  .slab-preview {
    position: static;
    margin-top: 8px;
  }

  .slab-list-card {
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 11px;
  }

  .slab-card-image-link {
    height: 102px;
  }

  .slab-list-values {
    grid-column: 1 / -1;
  }
}
