/* Dragon Market — Monetarium royal purple vault (palette from the blind-box design:
   royal purple box, gold trim, peacock rose interior, peacock-eye teal, silver coin) */
:root {
  --bg: #0e0917;
  --panel: #171022;
  --panel-2: #1f1530;
  --paper: #f1eaf8;
  --paper-dim: #b4a6cb;
  --paper-faint: #7d6f97;
  --gold: #c9a24b;
  --gold-bright: #e9c977;
  --royal: #6d43b8;
  --royal-bright: #9a6fe0;
  --rose: #c9699f;
  --teal: #2f8f8f;
  --hairline: rgba(154, 111, 224, .16);
  --hairline-strong: rgba(154, 111, 224, .36);
  --hairline-gold: rgba(233, 201, 119, .32);
  --serif: "Iowan Old Style", Baskerville, "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --sans: "Segoe UI Variable Text", "Segoe UI", Helvetica, Arial, sans-serif;
  --shell: 1280px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
}
a { color: var(--royal-bright); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0 0 .4em; }
h2 small, h1 small { display: block; font-family: var(--sans); font-size: .5em; font-weight: 400; color: var(--paper-dim); letter-spacing: .12em; text-transform: uppercase; margin-top: .35em; }
.shell { max-width: var(--shell); margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); }

/* Demo strip */
.demo-strip {
  background: #45204e;
  color: #f2d9ec;
  text-align: center;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  padding: 6px 12px;
}

/* Masthead */
.masthead { border-bottom: 1px solid var(--hairline); background: rgba(14, 9, 23, .96); position: sticky; top: 0; z-index: 50; }
.masthead-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--paper); }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 42px; height: 42px; display: grid; place-items: center;
  border: 1px solid var(--hairline-gold); border-radius: 4px;
  font-family: var(--serif); font-size: 24px; color: var(--gold-bright);
  background: linear-gradient(160deg, #2a1b45, #120c1e);
}
.brand-word strong { display: block; font-family: var(--serif); font-size: 19px; letter-spacing: .04em; }
.brand-word small { display: block; font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--paper-dim); }
.nav-links { display: flex; gap: clamp(12px, 3vw, 30px); }
.nav-links a { color: var(--paper-dim); font-size: 13.5px; letter-spacing: .06em; padding: 6px 2px; border-bottom: 2px solid transparent; }
.nav-links a:hover { color: var(--paper); text-decoration: none; }
.nav-links a.is-active { color: var(--gold-bright); border-bottom-color: var(--gold); }
.mobile-bottom-nav { display: none; }

/* Campaign carousel */
.campaign-hero {
  position: relative; min-height: clamp(620px, 64vw, 760px); overflow: hidden;
  border-bottom: 1px solid var(--hairline); margin: 0 auto;
  background: #090610;
}
.campaign-slide {
  position: absolute; inset: 0; opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .75s ease, visibility .75s ease;
}
.campaign-slide.is-active { opacity: 1; visibility: visible; pointer-events: auto; }
.campaign-media, .campaign-media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.campaign-media img { object-fit: cover; object-position: center; }
.campaign-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(9, 6, 16, .97) 0%, rgba(9, 6, 16, .84) 34%, rgba(9, 6, 16, .22) 66%, rgba(9, 6, 16, .05) 100%),
    linear-gradient(0deg, rgba(9, 6, 16, .78), transparent 42%);
}
.campaign-content {
  position: relative; z-index: 2; min-height: clamp(620px, 64vw, 760px);
  padding-top: clamp(64px, 9vw, 120px); padding-bottom: 110px;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
}
.eyebrow { font-size: 11.5px; letter-spacing: .28em; text-transform: uppercase; color: var(--gold-bright); margin: 0 0 14px; }
.campaign-content h1, .campaign-content h2 { font-size: clamp(34px, 5.2vw, 62px); max-width: 10.5em; text-wrap: balance; }
.campaign-content h1 small, .campaign-content h2 small { font-size: .24em; margin-top: .9em; }
.campaign-lead { max-width: 42em; color: #d1c4e2; font-size: clamp(14.5px, 1.6vw, 17px); text-shadow: 0 2px 18px rgba(0, 0, 0, .8); }
.campaign-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.campaign-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 11px 18px; border: 1px solid transparent; border-radius: 999px;
  color: #fff; font: 600 13px/1.2 var(--sans); cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.campaign-button:hover { transform: translateY(-2px); text-decoration: none; }
.campaign-button small { font-size: 9px; letter-spacing: .12em; text-transform: uppercase; opacity: .68; }
.campaign-button-solid { background: linear-gradient(135deg, #8153d3, #593096); border-color: #a880e7; box-shadow: 0 12px 34px rgba(88, 42, 150, .32); }
.campaign-button-line { background: rgba(15, 9, 27, .55); border-color: rgba(233, 201, 119, .5); color: #f6e8c3; backdrop-filter: blur(8px); }
.campaign-controls {
  position: absolute; z-index: 4; left: 0; right: 0; bottom: 58px;
  display: flex; align-items: center; gap: 14px; pointer-events: none;
}
.campaign-controls button { pointer-events: auto; }
.campaign-arrow {
  width: 38px; height: 38px; border: 1px solid rgba(233, 201, 119, .34); border-radius: 50%;
  background: rgba(11, 7, 19, .62); color: var(--gold-bright); font-size: 25px; line-height: 1;
  cursor: pointer; backdrop-filter: blur(8px);
}
.campaign-arrow:hover { background: rgba(109, 67, 184, .7); }
.campaign-dots { display: flex; gap: 8px; }
.campaign-dots button {
  width: 28px; height: 4px; padding: 0; border: 0; border-radius: 999px;
  background: rgba(241, 234, 248, .36); cursor: pointer; transition: width .2s ease, background .2s ease;
}
.campaign-dots button.is-active { width: 54px; background: var(--gold-bright); }

/* Registry snapshot */
.market-snapshot {
  position: relative; z-index: 8; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-top: -34px; margin-bottom: clamp(42px, 6vw, 74px); padding: 0;
  border: 1px solid var(--hairline-gold); border-radius: 14px; overflow: hidden;
  background: rgba(23, 16, 34, .94); box-shadow: 0 22px 60px rgba(0, 0, 0, .38); backdrop-filter: blur(18px);
}
.market-snapshot div { padding: 17px 16px; border-right: 1px solid var(--hairline); }
.market-snapshot div:last-child { border-right: 0; }
.market-snapshot strong { display: block; color: var(--gold-bright); font: 600 clamp(22px, 2.6vw, 31px)/1 var(--serif); font-variant-numeric: tabular-nums; }
.market-snapshot span { display: block; margin-top: 7px; color: var(--paper-dim); font-size: 11px; letter-spacing: .06em; }
.market-snapshot span small { display: block; color: var(--paper-faint); font-size: 8.5px; letter-spacing: .13em; text-transform: uppercase; }

/* Blind box to registry journey */
.dragon-journey { margin-top: 0; }
.journey-head { align-items: end; }
.journey-head .eyebrow { margin-bottom: 7px; }
.journey-head h2 { max-width: 760px; }
.journey-more { border: 0; background: transparent; cursor: pointer; font-family: var(--sans); }
.journey-grid { display: grid; grid-template-columns: 1fr 1fr .78fr; gap: 16px; }
.journey-card {
  position: relative; min-height: 310px; overflow: hidden; border: 1px solid var(--hairline);
  border-radius: 14px; background: var(--panel); color: var(--paper); isolation: isolate;
}
.journey-card:hover { text-decoration: none; border-color: var(--gold); }
.journey-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.journey-card:hover img { transform: scale(1.035); }
.journey-card::after { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(0deg, rgba(9, 6, 16, .98), rgba(9, 6, 16, .06) 74%); }
.journey-copy { position: absolute; z-index: 2; left: 20px; right: 20px; bottom: 18px; display: flex; align-items: center; gap: 13px; }
.journey-copy b { color: var(--gold-bright); font: 500 27px/1 var(--serif); }
.journey-copy span { display: flex; flex-direction: column; }
.journey-copy strong { font: 600 17px/1.2 var(--serif); }
.journey-copy small { margin-top: 4px; color: var(--paper-dim); font-size: 11.5px; }
.journey-card-data { background: radial-gradient(circle at 50% 38%, #4b2777, #171022 66%); }
.journey-card-data::after { background: linear-gradient(0deg, rgba(9, 6, 16, .95), transparent 76%); }

/* MG grading feature */
.mg-feature {
  position: relative; min-height: 470px; padding: 0; overflow: hidden; isolation: isolate;
  border: 1px solid var(--hairline-gold); border-radius: 18px; background: #090610;
}
.mg-feature-media, .mg-feature-media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.mg-feature-media img { object-fit: cover; object-position: center; }
.mg-feature-shade {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(8, 5, 14, .97) 0%, rgba(8, 5, 14, .85) 38%, rgba(8, 5, 14, .12) 72%);
}
.mg-feature-content { position: relative; z-index: 2; width: min(58%, 690px); padding: clamp(44px, 6vw, 78px); }
.mg-feature-content h2 { font-size: clamp(30px, 4.1vw, 49px); max-width: 11em; text-wrap: balance; }
.mg-feature-content > p:not(.eyebrow) { color: #d4c8e3; max-width: 43em; }
.mg-feature-points { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 19px; }
.mg-feature-points span { padding: 5px 11px; border: 1px solid rgba(233, 201, 119, .35); border-radius: 999px; color: #f0d89c; font-size: 11px; letter-spacing: .08em; }

/* Journey dialog */
.journey-dialog {
  width: min(980px, calc(100vw - 32px)); max-height: min(760px, calc(100vh - 32px)); padding: 0;
  border: 1px solid rgba(233, 201, 119, .45); border-radius: 18px; overflow: hidden;
  background: #130d1e; color: var(--paper); box-shadow: 0 40px 130px rgba(0, 0, 0, .82);
}
.journey-dialog[open] { display: grid; grid-template-columns: minmax(300px, .9fr) 1.1fr; }
.journey-dialog::backdrop { background: rgba(6, 3, 11, .78); backdrop-filter: blur(8px); }
.journey-dialog form { position: absolute; z-index: 4; top: 12px; right: 12px; margin: 0; }
.dialog-close { width: 38px; height: 38px; border: 1px solid rgba(255, 255, 255, .3); border-radius: 50%; background: rgba(9, 6, 16, .7); color: #fff; font-size: 23px; cursor: pointer; }
.dialog-visual { min-height: 580px; background: #090610; }
.dialog-visual img { width: 100%; height: 100%; object-fit: cover; }
.dialog-copy { padding: clamp(32px, 5vw, 58px); overflow: auto; }
.dialog-copy h2 { font-size: clamp(28px, 3.8vw, 42px); text-wrap: balance; }
.dialog-copy > p:not(.eyebrow) { color: var(--paper-dim); }
.dialog-copy ol { list-style: none; padding: 0; margin: 26px 0; display: grid; gap: 12px; }
.dialog-copy li { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; color: var(--paper-dim); font-size: 13px; }
.dialog-copy li b { color: var(--gold-bright); font: 18px/1.2 var(--serif); }
.dialog-copy li strong { color: var(--paper); margin-right: 6px; }
.dialog-note { display: block; margin-top: 20px; color: var(--paper-faint); font-size: 10.5px; }

.campaign-button:focus-visible, .campaign-arrow:focus-visible, .campaign-dots button:focus-visible,
.journey-more:focus-visible, .dialog-close:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* Sections */
section { margin: clamp(34px, 6vw, 64px) auto; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.section-head h2 { font-size: clamp(20px, 2.6vw, 27px); margin: 0; }
.minor-link { font-size: 13px; color: var(--paper-dim); }
.minor-link:hover { color: var(--gold-bright); }

/* Tabs + filters */
.browse-heading { margin-bottom: 20px; }
.browse-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.tab {
  display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 14px; align-items: center;
  min-height: 96px; padding: 9px; overflow: hidden; color: var(--paper-dim);
  border: 1px solid var(--hairline); border-radius: 13px; background: linear-gradient(135deg, rgba(40, 25, 62, .76), rgba(22, 14, 34, .95));
}
.tab-media { width: 78px; aspect-ratio: 1; overflow: hidden; border-radius: 9px; background: #110b1d; }
.tab-media img { width: 100%; height: 100%; object-fit: cover; }
.tab-copy { display: flex; min-width: 0; flex-direction: column; }
.tab-copy strong { color: var(--paper); font: 600 18px/1.25 var(--serif); }
.tab-copy small { margin-top: 3px; color: var(--royal-bright); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.tab-copy em { margin-top: 8px; color: var(--paper-faint); font-size: 11px; font-style: normal; }
.tab:hover { text-decoration: none; color: var(--paper); border-color: var(--royal-bright); }
.tab.is-active { border-color: var(--gold); box-shadow: inset 0 0 0 1px rgba(233, 201, 119, .16), 0 14px 34px rgba(0, 0, 0, .18); }
.tab.is-active .tab-copy strong { color: var(--gold-bright); }
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-chip { padding: 6px 14px; border: 1px solid var(--hairline-strong); border-radius: 999px; font-size: 13px; color: var(--paper-dim); }
.filter-chip:hover { color: var(--paper); text-decoration: none; }
.filter-chip.is-active { background: var(--royal); border-color: var(--royal); color: #fff; font-weight: 600; }
.sorts { display: flex; gap: 14px; font-size: 12.5px; }
.sort-link { color: var(--paper-faint); }
.sort-link.is-active { color: var(--royal-bright); }
.sort-menu { display: none; }
.result-count { font-size: 12px; color: var(--paper-faint); letter-spacing: .08em; margin: 4px 0 14px; }

/* Card grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); gap: 16px; }
.grid-featured { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card {
  display: flex; flex-direction: column; background: var(--panel);
  border: 1px solid var(--hairline); border-radius: 10px; overflow: hidden;
  color: var(--paper); transition: transform .15s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--royal-bright); text-decoration: none; }
.card-visual { position: relative; aspect-ratio: 1 / 1; background: radial-gradient(120% 120% at 30% 20%, #2c1f47, #120c1e); }
.card-visual img { width: 100%; height: 100%; object-fit: cover; }
.card-number {
  position: absolute; left: 10px; bottom: 10px;
  font-family: var(--serif); font-size: 15px; letter-spacing: .06em;
  background: rgba(14, 9, 23, .8); border: 1px solid var(--hairline-gold);
  color: var(--gold-bright); padding: 3px 10px; border-radius: 4px;
}
.card-visual .chip-fancy, .card-visual .chip-sealed { position: absolute; top: 10px; right: 10px; }
.card-mystery {
  position: relative; width: 100%; height: 100%; overflow: hidden; background: #130c20;
}
.card-mystery img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.82) brightness(.62); transform: scale(1.025); }
.mystery-veil { position: absolute; inset: 0; background: radial-gradient(circle at 50% 44%, transparent 0 22%, rgba(15, 8, 26, .18) 44%, rgba(9, 5, 16, .8) 100%); }
.mystery-emblem {
  position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 54px; height: 54px;
  transform: translate(-50%, -50%) rotate(45deg); border: 1px solid rgba(233, 201, 119, .72); border-radius: 12px;
  background: rgba(17, 9, 30, .78); color: var(--gold-bright); font-size: 24px; box-shadow: 0 0 34px rgba(130, 81, 208, .62); backdrop-filter: blur(7px);
}
.mystery-emblem::first-letter { transform: rotate(-45deg); }
.card-mystery.big { height: 390px; }
.card-mystery.big .mystery-emblem { width: 76px; height: 76px; font-size: 31px; }
.card-unrevealed { border-style: dashed; opacity: .85; }
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.card-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.card-row-price { justify-content: space-between; margin-top: 2px; }
.price { font-family: var(--serif); font-size: 18px; color: var(--gold-bright); font-variant-numeric: tabular-nums; }
.price-none { font-family: var(--sans); font-size: 12px; color: var(--paper-faint); }
.top-offer { font-size: 11.5px; color: var(--paper-dim); }
.card-owner { font-size: 12px; color: var(--paper-dim); border-top: 1px solid var(--hairline); padding-top: 8px; }
.card-owner-none { color: var(--paper-faint); font-style: italic; }

/* Chips */
.chip { display: inline-block; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; border: 1px solid transparent; white-space: nowrap; }
.chip-grade { border-color: var(--gold); color: var(--gold-bright); }
.chip-fancy { background: var(--gold); color: #241536; font-weight: 700; }
.chip-vault { background: rgba(47, 143, 143, .2); border-color: var(--teal); color: #9fe0dc; }
.chip-self { border-color: var(--hairline-strong); color: var(--paper-dim); }
.chip-ghost { border-color: var(--hairline); color: var(--paper-faint); }
.chip-plain { border-color: var(--hairline); color: var(--paper-dim); }
.chip-sealed { background: rgba(201, 105, 159, .28); border-color: var(--rose); color: #f4d2e6; }
.chip-lg { font-size: 12px; padding: 5px 14px; }

/* Pager */
.pager { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 22px; }
.pager a { min-width: 34px; text-align: center; padding: 6px 8px; border: 1px solid var(--hairline); border-radius: 6px; font-size: 13px; color: var(--paper-dim); font-variant-numeric: tabular-nums; }
.pager a.is-active { background: var(--royal); border-color: var(--royal); color: #fff; font-weight: 700; }
.pager a:hover { text-decoration: none; border-color: var(--royal-bright); }

/* Trust tiers */
.tier-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.tier { background: var(--panel); border: 1px solid var(--hairline); border-radius: 10px; padding: 20px 22px; }
.tier-vault { border-color: var(--teal); }
.tier h3 { font-size: 16px; font-family: var(--sans); font-weight: 700; letter-spacing: .04em; }
.tier p { margin: 0; color: var(--paper-dim); font-size: 13.5px; }

/* Coin page */
.breadcrumb { font-size: 12.5px; color: var(--paper-faint); margin: 22px 0 18px; }
.coin-layout { display: grid; grid-template-columns: minmax(300px, 5fr) 7fr; gap: clamp(22px, 4vw, 48px); align-items: start; }
.slab { position: relative; background: var(--panel); border: 1px solid var(--hairline-gold); border-radius: 14px; overflow: hidden; box-shadow: 0 30px 60px rgba(0, 0, 0, .5); }
.slab img { width: 100%; }
.slab-label { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--hairline-gold); background: linear-gradient(180deg, #2a1b45, #171022); }
.slab-brand { font-size: 10px; letter-spacing: .22em; color: var(--paper-dim); }
.slab-grade { font-family: var(--serif); font-size: 22px; color: var(--gold-bright); }
.slab-cert { font-size: 11px; color: var(--paper-faint); font-variant-numeric: tabular-nums; }
.slab-number { text-align: center; font-family: var(--serif); font-size: 22px; letter-spacing: .1em; color: var(--gold-bright); padding: 14px; border-top: 1px solid var(--hairline); }
.slab-mystery { padding-bottom: 10px; }
.mystery-note { text-align: center; color: var(--paper-dim); font-size: 13px; padding: 0 24px 18px; margin: 0; }
.coin-info h1 { font-size: clamp(28px, 4vw, 42px); margin-top: 10px; }
.coin-sub { color: var(--paper-dim); margin-top: -4px; }
.fact-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); border-radius: 10px; overflow: hidden; margin: 22px 0; }
.fact { background: var(--panel); padding: 12px 16px; }
.fact-key { display: block; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--paper-faint); }
.fact-value { font-size: 15px; font-weight: 600; }
.deal-panel { background: var(--panel-2); border: 1px solid var(--hairline-strong); border-radius: 12px; padding: 20px 22px; margin: 20px 0; display: flex; flex-direction: column; gap: 12px; }
.deal-ask span { display: block; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--paper-faint); }
.deal-ask strong { font-family: var(--serif); font-size: 34px; color: var(--gold-bright); font-variant-numeric: tabular-nums; }
.deal-note { margin: 0; font-size: 12.5px; color: var(--paper-dim); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 8px; font-size: 14.5px; font-weight: 600; cursor: pointer; border: 1px solid transparent; font-family: var(--sans); }
.button small { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; opacity: .7; }
.button-solid { background: var(--royal); color: #fff; }
.button-line { background: transparent; border-color: var(--hairline-strong); color: var(--paper); }
.button[disabled] { opacity: .55; cursor: not-allowed; }
.offers h2 { font-size: 19px; margin-top: 26px; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--paper-faint); padding: 8px 10px; border-bottom: 1px solid var(--hairline-strong); }
.table td { padding: 9px 10px; border-bottom: 1px solid var(--hairline); }
.table td.num { font-variant-numeric: tabular-nums; }
.block-context { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--paper-dim); border-top: 1px solid var(--hairline); margin-top: 22px; padding-top: 14px; }

/* Provenance timeline */
.provenance h2 { font-size: 22px; }
.timeline { list-style: none; margin: 14px 0 0; padding: 0; border-left: 2px solid var(--hairline-strong); }
.timeline-item { position: relative; padding: 0 0 18px 22px; }
.timeline-item::before { content: ''; position: absolute; left: -6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--paper-faint); }
.timeline-item.kind-graded::before, .timeline-item.kind-sealed-cert::before { background: var(--gold-bright); }
.timeline-item.kind-transfer-escrow::before, .timeline-item.kind-transfer-auction::before { background: var(--royal-bright); }
.timeline-item.kind-reveal::before { background: var(--rose); }
.timeline-date { display: block; font-size: 11px; letter-spacing: .1em; color: var(--paper-faint); }
.timeline-body { font-size: 14px; }
.timeline-price { color: var(--gold-bright); margin-left: 8px; font-variant-numeric: tabular-nums; }

/* Population page */
.page-head { margin: 30px 0 8px; }
.page-head h1 { font-size: clamp(26px, 4vw, 38px); }
.page-head p { color: var(--paper-dim); max-width: 52em; }
.pop-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); border-radius: 12px; overflow: hidden; margin: 22px 0; }
.pop-stats div { background: var(--panel); padding: 16px 18px; display: flex; flex-direction: column; }
.pop-stats strong { font-family: var(--serif); font-size: 26px; color: var(--gold-bright); font-variant-numeric: tabular-nums; }
.pop-stats span { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--paper-faint); }
.pop-grid-hint { font-size: 12.5px; color: var(--paper-dim); margin: 0 0 14px; }
.pop-grid { display: grid; grid-template-columns: repeat(40, 1fr); gap: 3px; }
.pop-cell { display: block; aspect-ratio: 1 / 1; border-radius: 2px; background: #241a38; border: 1px solid rgba(154, 111, 224, .1); }
.pop-cell.revealed { background: #4a3a6e; border-color: rgba(154, 111, 224, .35); }
.pop-cell.revealed.graded { background: var(--gold); border-color: var(--gold-bright); }
.pop-cell.vault { background: var(--teal); border-color: #57bdbd; }
.pop-cell.fancy { outline: 1px solid var(--gold-bright); outline-offset: 1px; }
a.pop-cell:hover { transform: scale(1.6); position: relative; z-index: 2; }
.pop-legend { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 16px; font-size: 12px; color: var(--paper-dim); }
.pop-legend span { display: inline-flex; align-items: center; gap: 7px; }
.pop-legend i.pop-cell { width: 13px; height: 13px; aspect-ratio: auto; }
.pop-columns { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(24px, 4vw, 56px); align-items: start; }
.population-panel { margin: 0; overflow: hidden; border: 1px solid var(--hairline); border-radius: 13px; background: var(--panel); }
.population-panel summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 20px; cursor: pointer; list-style: none; }
.population-panel summary::-webkit-details-marker { display: none; }
.panel-heading { color: var(--paper); font: 600 21px/1.2 var(--serif); }
.panel-heading small { display: block; margin-top: 5px; color: var(--paper-faint); font: 400 10px/1.2 var(--sans); letter-spacing: .13em; text-transform: uppercase; }
.panel-toggle { position: relative; flex: none; width: 28px; height: 28px; border: 1px solid var(--hairline-strong); border-radius: 50%; }
.panel-toggle::before, .panel-toggle::after { content: ''; position: absolute; left: 7px; right: 7px; top: 13px; height: 1px; background: var(--gold-bright); transition: transform .2s ease; }
.panel-toggle::after { transform: rotate(90deg); }
.population-panel[open] .panel-toggle::after { transform: rotate(0); }
.population-panel-body { padding: 2px 20px 22px; }
.table-scroll { overflow-x: auto; }
.table-scroll .table { min-width: 480px; }
.population-recent { margin-top: clamp(24px, 4vw, 42px); }
.grade-bars { display: flex; flex-direction: column; gap: 9px; }
.grade-bar { display: grid; grid-template-columns: 48px 1fr 42px; align-items: center; gap: 12px; font-size: 13px; }
.grade-bar-label { font-family: var(--serif); color: var(--gold-bright); }
.grade-bar-track { background: #241a38; border-radius: 4px; height: 14px; overflow: hidden; }
.grade-bar-track i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-bright)); }
.gw-0 { width: 2%; } .gw-5 { width: 5%; } .gw-10 { width: 10%; } .gw-15 { width: 15%; } .gw-20 { width: 20%; }
.gw-25 { width: 25%; } .gw-30 { width: 30%; } .gw-35 { width: 35%; } .gw-40 { width: 40%; } .gw-45 { width: 45%; }
.gw-50 { width: 50%; } .gw-55 { width: 55%; } .gw-60 { width: 60%; } .gw-65 { width: 65%; } .gw-70 { width: 70%; }
.gw-75 { width: 75%; } .gw-80 { width: 80%; } .gw-85 { width: 85%; } .gw-90 { width: 90%; } .gw-95 { width: 95%; }
.gw-100 { width: 100%; }
.grade-bar-count { text-align: right; font-variant-numeric: tabular-nums; color: var(--paper-dim); }
.fancy-table small { color: var(--paper-faint); margin-left: 6px; }
.row-dim td { opacity: .62; }
.reveal-feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.reveal-feed li { display: flex; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--hairline); border-radius: 8px; padding: 10px 16px; font-size: 13.5px; flex-wrap: wrap; }
.reveal-date { color: var(--paper-faint); font-size: 12px; margin-left: auto; }

/* Profile */
.profile-head { display: flex; gap: 22px; align-items: flex-start; margin: 34px 0 10px; }
.avatar {
  width: 76px; height: 76px; flex: none; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--serif); font-size: 32px; color: var(--paper);
  background: hsl(270, 30%, 36%); border: 1px solid var(--hairline-strong);
}
.avatar.hue-0 { background: hsl(0, 32%, 34%); } .avatar.hue-30 { background: hsl(30, 32%, 34%); }
.avatar.hue-60 { background: hsl(60, 26%, 32%); } .avatar.hue-90 { background: hsl(90, 26%, 32%); }
.avatar.hue-120 { background: hsl(120, 26%, 32%); } .avatar.hue-150 { background: hsl(150, 26%, 32%); }
.avatar.hue-180 { background: hsl(180, 28%, 32%); } .avatar.hue-210 { background: hsl(210, 32%, 36%); }
.avatar.hue-240 { background: hsl(240, 28%, 38%); } .avatar.hue-270 { background: hsl(270, 28%, 38%); }
.avatar.hue-300 { background: hsl(300, 26%, 36%); } .avatar.hue-330 { background: hsl(330, 30%, 36%); }
.profile-head h1 { font-size: clamp(24px, 3.4vw, 34px); margin-bottom: 4px; }
.profile-meta { color: var(--paper-faint); font-size: 13px; margin: 0; }
.profile-bio { color: var(--paper-dim); margin: 8px 0 0; }
.profile-stats { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 12px; font-size: 13px; color: var(--paper-dim); }
.profile-stats strong { color: var(--gold-bright); font-family: var(--serif); font-size: 17px; margin-right: 4px; }
.empty-note { color: var(--paper-faint); margin: 40px 0 80px; }

/* Verify */
.verify-form { display: flex; gap: 12px; max-width: 520px; margin: 22px 0 30px; }
.verify-form input {
  flex: 1; min-width: 0; background: var(--panel); border: 1px solid var(--hairline-strong); border-radius: 8px;
  padding: 12px 16px; color: var(--paper); font-size: 15px; letter-spacing: .06em;
}
.verify-form input:focus { outline: 2px solid var(--royal); border-color: var(--royal); }
.verify-result { border-radius: 12px; padding: 22px 26px; max-width: 640px; margin-bottom: 60px; }
.verify-result h2 { font-size: 20px; }
.verify-result p { margin: 0; color: var(--paper-dim); }
.verify-ok { background: rgba(201, 162, 75, .12); border: 1px solid var(--gold); }
.verify-bad { background: rgba(201, 105, 159, .14); border: 1px solid var(--rose); }

/* MG grading page */
.grading-hero { position: relative; min-height: 610px; margin: 0; overflow: hidden; isolation: isolate; background: #090610; }
.grading-hero-media, .grading-hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.grading-hero-media img { object-fit: cover; object-position: center; }
.grading-hero-shade { position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(8, 5, 14, .98) 0%, rgba(8, 5, 14, .86) 37%, rgba(8, 5, 14, .12) 72%); }
.grading-hero-content { position: relative; z-index: 2; min-height: 610px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding-top: 70px; padding-bottom: 80px; }
.grading-hero-content h1 { max-width: 10.5em; font-size: clamp(37px, 5vw, 62px); text-wrap: balance; }
.grading-hero-content > p:not(.eyebrow) { max-width: 46em; color: #d4c8e3; text-shadow: 0 2px 18px rgba(0, 0, 0, .8); }
.grading-principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.grading-principles article, .grading-service-grid article { padding: clamp(21px, 3vw, 31px); border: 1px solid var(--hairline); border-radius: 14px; background: linear-gradient(145deg, rgba(35, 22, 53, .95), rgba(20, 13, 31, .95)); }
.grading-principles b { color: var(--gold-bright); font: 26px/1 var(--serif); }
.grading-principles h3, .grading-service-grid h3 { margin-top: 16px; font-size: 21px; }
.grading-principles p, .grading-service-grid p { margin-bottom: 0; color: var(--paper-dim); font-size: 13.5px; }
.grading-steps { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; }
.grading-steps li { display: flex; align-items: flex-start; gap: 13px; min-height: 118px; padding: 19px 17px; border: 1px solid var(--hairline); border-radius: 12px; background: var(--panel); }
.grading-steps b { color: var(--gold-bright); font: 21px/1 var(--serif); }
.grading-steps span { display: flex; min-width: 0; flex-direction: column; }
.grading-steps strong { font-size: 14px; }
.grading-steps small { margin-top: 6px; color: var(--paper-faint); font-size: 10.5px; line-height: 1.45; }
.grading-service-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grading-service-grid .minor-link { display: inline-block; margin-top: 16px; color: var(--gold-bright); }
.service-tag { display: inline-block; padding: 4px 9px; border: 1px solid var(--hairline-gold); border-radius: 999px; color: var(--gold-bright); font-size: 9px; letter-spacing: .15em; }
.concept-note { margin-top: 18px; color: var(--paper-faint); font-size: 11px; }

/* Error */
.error-page { text-align: center; padding: 90px 0 120px; }
.error-page h1 { font-size: 64px; color: var(--gold-bright); }

/* Footer */
.footer { border-top: 1px solid var(--hairline); margin-top: 70px; }
.footer-inner { padding: 34px 0 44px; text-align: center; }
.footer-inner p { margin: 4px 0; }
.footer-inner strong { letter-spacing: .3em; font-size: 13px; }
.footer-discipline { color: var(--paper-dim); font-size: 13px; font-style: italic; }
.footer-fine { color: var(--paper-faint); font-size: 11.5px; }

/* Responsive */
@media (max-width: 900px) {
  .market-snapshot { grid-template-columns: repeat(3, 1fr); }
  .market-snapshot div:nth-child(3) { border-right: 0; }
  .market-snapshot div:nth-child(-n+3) { border-bottom: 1px solid var(--hairline); }
  .journey-grid { grid-template-columns: 1fr 1fr; }
  .journey-card-data { grid-column: 1 / -1; min-height: 260px; }
  .journey-dialog[open] { grid-template-columns: minmax(260px, .8fr) 1.2fr; }
  .coin-layout { grid-template-columns: 1fr; }
  .pop-columns { grid-template-columns: 1fr; }
  .pop-grid { grid-template-columns: repeat(25, 1fr); }
  .grading-principles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grading-principles article:last-child { grid-column: 1 / -1; }
  .grading-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .masthead-inner { min-height: 60px; }
  .nav-links { display: none; }
  .mobile-bottom-nav {
    position: fixed; z-index: 100; left: 0; right: 0; bottom: 0;
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    min-height: calc(64px + env(safe-area-inset-bottom)); padding: 5px 6px env(safe-area-inset-bottom);
    border-top: 1px solid rgba(233, 201, 119, .24); background: rgba(13, 8, 22, .94);
    box-shadow: 0 -16px 40px rgba(0, 0, 0, .42); backdrop-filter: blur(18px);
  }
  .mobile-bottom-nav a { display: flex; min-width: 0; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 3px 2px; color: var(--paper-faint); border-radius: 9px; }
  .mobile-bottom-nav a:hover { color: var(--paper); text-decoration: none; }
  .mobile-bottom-nav a.is-active { color: var(--gold-bright); background: linear-gradient(180deg, rgba(109, 67, 184, .24), rgba(109, 67, 184, .08)); }
  .mobile-bottom-nav svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
  .mobile-bottom-nav a:nth-child(2) svg { fill: currentColor; stroke: none; }
  .mobile-bottom-nav span { display: flex; min-width: 0; flex-direction: column; align-items: center; font-size: 10.5px; line-height: 1.05; white-space: nowrap; }
  .mobile-bottom-nav small { margin-top: 2px; font-size: 7.5px; letter-spacing: .05em; text-transform: uppercase; opacity: .64; }
}
@media (max-width: 560px) {
  body { font-size: 14px; }
  .campaign-hero, .campaign-content { min-height: 760px; }
  .campaign-media img { object-position: center top; }
  .campaign-shade {
    background:
      linear-gradient(0deg, rgba(8, 5, 14, .99) 0%, rgba(8, 5, 14, .93) 35%, rgba(8, 5, 14, .18) 70%, rgba(8, 5, 14, .02) 100%),
      linear-gradient(90deg, rgba(8, 5, 14, .25), transparent 70%);
  }
  .campaign-content { justify-content: flex-end; padding-top: 330px; padding-bottom: 110px; }
  .campaign-content h1, .campaign-content h2 { max-width: 12em; font-size: clamp(31px, 10.5vw, 42px); }
  .campaign-lead { max-width: 100%; font-size: 14px; line-height: 1.5; }
  .campaign-actions { margin-top: 15px; }
  .campaign-button { min-height: 42px; padding: 9px 14px; font-size: 12px; }
  .campaign-button small { display: none; }
  .campaign-controls { bottom: 40px; }
  .campaign-arrow { width: 34px; height: 34px; }
  .campaign-dots button { width: 20px; }
  .campaign-dots button.is-active { width: 38px; }
  .market-snapshot { grid-template-columns: repeat(2, 1fr); margin: 0; border-width: 1px 0; border-radius: 0; }
  .market-snapshot div, .market-snapshot div:nth-child(3) { border-right: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
  .market-snapshot div:nth-child(even) { border-right: 0; }
  .market-snapshot div:nth-last-child(-n+2) { border-bottom: 0; }
  .market-snapshot strong { font-size: 25px; }
  .dragon-journey { margin-top: 44px; }
  .journey-grid { grid-template-columns: 1fr; }
  .journey-card, .journey-card-data { grid-column: auto; min-height: 290px; }
  .journey-head { align-items: flex-start; }
  .journey-copy { left: 16px; right: 16px; bottom: 15px; }
  .journey-copy strong { font-size: 16px; }
  .mg-feature { min-height: 700px; border-radius: 0; border-left: 0; border-right: 0; }
  .mg-feature-media img { object-position: center top; }
  .mg-feature-shade { background: linear-gradient(0deg, rgba(8, 5, 14, .99) 0%, rgba(8, 5, 14, .93) 42%, rgba(8, 5, 14, .12) 76%); }
  .mg-feature-content { width: 100%; padding: 350px 20px 36px; }
  .mg-feature-content h2 { font-size: 34px; }
  .mg-feature-points { margin-top: 14px; }
  .journey-dialog { width: calc(100vw - 18px); max-height: calc(100vh - 18px); }
  .journey-dialog[open] { grid-template-columns: 1fr; overflow: auto; }
  .dialog-visual { min-height: 43vh; max-height: 430px; }
  .dialog-copy { padding: 28px 22px 30px; overflow: visible; }
  .dialog-copy h2 { font-size: 29px; }
  .dialog-copy .campaign-actions { flex-direction: column; align-items: stretch; }
  .grid, .grid-featured { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .masthead-inner { flex-wrap: nowrap; gap: 12px; padding-top: 8px; padding-bottom: 8px; }
  .brand { gap: 9px; }
  .brand-mark { width: 38px; height: 38px; font-size: 21px; }
  .brand-word strong { font-size: 17px; }
  .brand-word small { font-size: 8.5px; letter-spacing: .16em; }
  .hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 10px; }
  .hero-stats strong { font-size: 22px; }
  .card-body { padding: 10px 11px 12px; }
  .card-number { font-size: 13px; padding: 2px 8px; left: 8px; bottom: 8px; }
  .price { font-size: 16px; }
  .mystery-emblem { width: 43px; height: 43px; font-size: 19px; border-radius: 9px; }
  .card-mystery.big { height: 280px; }
  .card-mystery.big .mystery-emblem { width: 62px; height: 62px; font-size: 27px; }
  .filter-bar { flex-direction: column; align-items: flex-start; }
  .featured, .browse, .tiers, .mg-feature, .grading-intro, .grading-flow, .grading-services { margin-top: 58px; }
  .section-head { margin-bottom: 23px; }
  .browse-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .tab { grid-template-columns: 1fr; gap: 8px; min-height: 0; padding: 7px 7px 11px; }
  .tab-media { width: 100%; aspect-ratio: 16 / 10; }
  .tab-copy { padding: 0 3px; }
  .tab-copy strong { font-size: 16px; }
  .tab-copy small { font-size: 8.5px; }
  .tab-copy em { display: none; }
  .filter-bar { width: 100%; gap: 10px; }
  .chips { width: calc(100vw - 32px); flex-wrap: nowrap; overflow-x: auto; padding: 1px 0 6px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .filter-chip { flex: none; padding: 6px 12px; }
  .sorts-desktop { display: none; }
  .sort-menu { position: relative; display: block; width: 100%; }
  .sort-menu summary { display: flex; justify-content: space-between; padding: 9px 12px; cursor: pointer; list-style: none; border: 1px solid var(--hairline-strong); border-radius: 9px; color: var(--paper-dim); font-size: 12px; }
  .sort-menu summary::-webkit-details-marker { display: none; }
  .sort-menu summary span { color: var(--gold-bright); }
  .sort-menu > div { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; padding: 9px 0 2px; }
  .sort-menu .sort-link { padding: 8px 10px; border: 1px solid var(--hairline); border-radius: 8px; text-align: center; }
  .sort-menu .sort-link.is-active { border-color: var(--royal); background: rgba(109, 67, 184, .16); }
  .profile-head { flex-direction: column; }
  .pop-grid { grid-template-columns: repeat(20, 1fr); gap: 2px; }
  .pop-stats { grid-template-columns: repeat(2, 1fr); }
  .pop-grid-section { margin-bottom: 32px; }
  .pop-columns { gap: 12px; }
  .population-panel summary { padding: 16px; }
  .population-panel-body { padding: 0 16px 18px; }
  .panel-heading { font-size: 18px; }
  .population-recent { margin-top: 12px; }
  .grading-hero { min-height: 740px; }
  .grading-hero-media img { object-position: center top; }
  .grading-hero-shade { background: linear-gradient(0deg, rgba(8, 5, 14, .99) 0%, rgba(8, 5, 14, .94) 43%, rgba(8, 5, 14, .14) 76%); }
  .grading-hero-content { min-height: 740px; justify-content: flex-end; padding-top: 360px; padding-bottom: 54px; }
  .grading-hero-content h1 { font-size: 35px; }
  .grading-principles { grid-template-columns: 1fr; }
  .grading-principles article:last-child { grid-column: auto; }
  .grading-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .grading-steps li { min-height: 110px; padding: 15px 12px; gap: 9px; }
  .grading-steps b { font-size: 18px; }
  .grading-service-grid { grid-template-columns: 1fr; }
  .fact-row { grid-template-columns: repeat(2, 1fr); }
  .deal-ask strong { font-size: 28px; }
  .verify-form { flex-direction: column; }
  .block-context { flex-direction: column; align-items: flex-start; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
