/* Hallmark · macrostructure: Workbench (clipped-edge gallery hero) · tone: collector-literate, utilitarian · anchor hue: signal green 155 (price up only)
 * theme: design.md (locked) · nav: N9 edge-aligned + Log in · footer: Ft2 single line · enrichment: E1 clipped-edge real UI
 * Hallmark · pre-emit critique: P4 H4 E4 S5 R4 V4
 */

/* ─── tokens: design.md / app.css, verbatim ─── */
:root {
  --bone: #f2efe6; --bone-2: #e9e5d8; --bone-3: #ded9c9; --paper: #fbf9f3;
  --ink: #141412; --ink-2: #23231f; --muted: #6d6c62; --flat: #9a988c;
  --hair: rgba(20, 20, 18, .14);
  --signal: #37d17f; --signal-deep: #12a45f;
  --rarity-silver: #9aa0a6;
  --chrome-bg: #141412; --chrome-fg: #f2efe6; --chrome-fg-2: #e9e5d8;
  --chrome-muted: rgba(242, 239, 230, .62);
  --chrome-hair: rgba(242, 239, 230, .16);
  --shadow-lift: rgba(20, 20, 18, .42);
  --holo: linear-gradient(120deg, #ff6b6b, #ffd166, #6bdc8f, #4fb8e8, #b389f0, #ff6b6b);
  --sweep: rgba(255, 255, 255, .30);
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Martian Mono", "SFMono-Regular", ui-monospace, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --gutter: clamp(16px, 4vw, 34px);
  --radius-card: 7px; --radius-pill: 999px;
  --wrap: 1240px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bone: #141412; --bone-2: #1b1b18; --bone-3: #242420; --paper: #292925;
    --ink: #f2efe6; --muted: #8f8d80; --flat: #b0ada0; --hair: rgba(242, 239, 230, .14);
    --signal-deep: #4ee496; --shadow-lift: rgba(0, 0, 0, .6);
  }
}
:root[data-theme='dark'] {
  --bone: #141412; --bone-2: #1b1b18; --bone-3: #242420; --paper: #292925;
  --ink: #f2efe6; --muted: #8f8d80; --flat: #b0ada0; --hair: rgba(242, 239, 230, .14);
  --signal-deep: #4ee496; --shadow-lift: rgba(0, 0, 0, .6);
}

/* ─── base ─── */
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bone); color: var(--ink);
  font: 400 16px/1.55 var(--font); font-variation-settings: 'wdth' 100;
  -webkit-font-smoothing: antialiased;
  transition: background-color 200ms var(--ease), color 200ms var(--ease);
}
h1, h2, h3, p, dl, dd, figure { margin: 0; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
.mono { font-family: var(--mono); font-variation-settings: 'wdth' 87.5; font-feature-settings: 'tnum'; letter-spacing: -.03em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--chrome-bg); color: var(--chrome-fg); padding: 10px 14px; border-radius: var(--radius-pill); }
.skip:focus { top: 12px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* registration state: invite-only by default, ?registration=open flips */
.only-open { display: none !important; }
.reg-open .only-open { display: flex !important; }
.reg-open .only-invite { display: none !important; }
.topnav .only-open { display: none !important; }
.reg-open .topnav .only-open { display: inline-flex !important; }

/* ─── topbar (frozen chrome) ─── */
.topbar {
  background: var(--chrome-bg); color: var(--chrome-fg);
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 14px var(--gutter); border-bottom: 1px solid var(--chrome-hair);
}
.wordmark {
  color: var(--chrome-fg); text-decoration: none; text-transform: uppercase;
  font-variation-settings: 'wdth' 66, 'wght' 900; font-size: 20px; letter-spacing: .01em;
}
.topnav { display: flex; align-items: center; gap: clamp(10px, 2vw, 22px); }
.toplink {
  color: inherit; text-decoration: none; font-weight: 600; font-size: 15px; white-space: nowrap;
  border-bottom: 2px solid transparent; padding: 4px 0; transition: border-color 200ms var(--ease);
}
.toplink:hover { border-bottom-color: currentColor; }
.theme-toggle {
  background: none; border: 1px solid var(--chrome-hair); color: var(--chrome-fg);
  width: 36px; height: 36px; border-radius: var(--radius-pill); display: grid; place-items: center; cursor: pointer;
}
.theme-toggle:hover { border-color: var(--chrome-fg); }
.theme-toggle .i-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme='light']) .theme-toggle .i-moon { display: none; }
}
:root[data-theme='dark'] .theme-toggle .i-sun { display: block; }
:root[data-theme='dark'] .theme-toggle .i-moon { display: none; }

/* ─── pills (the CTA voice) ─── */
.pill {
  display: inline-flex; align-items: center; justify-content: center; white-space: nowrap;
  min-height: 44px; padding: 0 22px; border-radius: var(--radius-pill);
  text-decoration: none; font-weight: 700; font-size: 16px; font-variation-settings: 'wdth' 90, 'wght' 700;
  transition: transform 200ms var(--ease), background-color 200ms var(--ease);
}
.pill:active { transform: translateY(1px); }
.pill--bone { background: var(--chrome-fg); color: var(--chrome-bg); }
.pill--bone:hover { background: var(--chrome-fg-2); }
.pill--on-chrome { min-height: 36px; padding: 0 16px; font-size: 14px; background: var(--chrome-fg); color: var(--chrome-bg); }
.inline-link { color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; font-weight: 600; }

/* ─── hero: frozen dark band, the gallery page clipped by the edge ─── */
.hero {
  background: var(--chrome-bg); color: var(--chrome-fg);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 4vw, 56px);
  padding: clamp(36px, 4.5vw, 64px) 0 0 var(--gutter);
  max-height: 860px; overflow: hidden; position: relative; border-bottom: 1px solid var(--chrome-hair);
}
.hero-copy { padding-bottom: clamp(40px, 6vw, 84px); align-self: start; padding-top: clamp(0px, 3vw, 40px); min-width: 0; max-width: 560px; }
.display {
  font-variation-settings: 'wdth' 62, 'wght' 850; text-transform: uppercase;
  font-size: clamp(2.9rem, 5.6vw, 5rem); line-height: .9; letter-spacing: -.005em;
  overflow-wrap: anywhere; min-width: 0;
}
.hero-sub { margin-top: 22px; font-size: clamp(17px, 1.5vw, 19px); line-height: 1.5; color: var(--chrome-muted); max-width: 46ch; }
.hero-url {
  margin-top: 26px; font-size: clamp(15px, 1.6vw, 19px); display: flex; flex-wrap: wrap; align-items: baseline;
  padding: 12px 0; border-top: 1px solid var(--chrome-hair); border-bottom: 1px solid var(--chrome-hair);
}
.hero-url .mono { color: var(--chrome-muted); }
.hero-url-name {
  font-family: var(--mono); font-variation-settings: 'wdth' 87.5, 'wght' 700; letter-spacing: -.03em;
  color: var(--chrome-fg); text-decoration: underline dashed; text-underline-offset: 5px; text-decoration-thickness: 1px;
}
.hero-actions { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.hero-note { flex-basis: 100%; font-size: 14.5px; color: var(--chrome-muted); }
.hero-note .inline-link { color: var(--chrome-fg); margin-left: 4px; }
.hero .toplink { color: var(--chrome-fg); }

.sheet { align-self: end; min-width: 0; }
.sheet-cap { font-size: 13px; color: var(--chrome-muted); margin-bottom: 10px; }
.sheet-cap .mono { color: var(--chrome-fg); }
.sheet-page {
  background: var(--bone); color: var(--ink);
  border-radius: 10px 0 0 0; padding: 26px 0 0 28px;
  width: calc(100% + 1px); min-height: 640px;
  transition: background-color 200ms var(--ease);
}
.masthead { padding-right: 28px; }
.eyebrow {
  display: flex; align-items: center; gap: 12px; text-transform: uppercase;
  font-size: 10.5px; font-weight: 700; letter-spacing: .16em; color: var(--muted);
}
.eyebrow::after { content: ''; flex: 1; height: 1px; background: var(--hair); }
.eyebrow--ink { color: var(--muted); }
.sheet-h1 {
  font-variation-settings: 'wdth' 62, 'wght' 900; text-transform: uppercase;
  font-size: clamp(3rem, 6vw, 5.4rem); line-height: .86; margin-top: 8px;
}
.stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 2px solid var(--ink); border-bottom: 1px solid var(--hair); margin: 18px 28px 22px 0;
}
.stats > div { padding: 10px 12px 12px 0; }
.stats > div + div { padding-left: 12px; border-left: 1px solid var(--hair); }
.stats dt { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.stats dd { margin-top: 4px; font-family: var(--mono); font-variation-settings: 'wdth' 87.5, 'wght' 600; font-feature-settings: 'tnum'; letter-spacing: -.04em; font-size: clamp(15px, 1.6vw, 21px); }
.stats dd.text { font-family: var(--font); font-variation-settings: 'wdth' 66, 'wght' 800; text-transform: uppercase; letter-spacing: 0; line-height: 1.05; }

/* ─── grids ─── */
.grid { display: grid; gap: 18px; }
.grid--hero { grid-template-columns: repeat(4, minmax(0, 1fr)); padding-right: 28px; padding-bottom: 28px; gap: 16px; }
.grid--gallery { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.grid--set { grid-template-columns: repeat(6, minmax(0, 1fr)); margin-top: 34px; }

/* ─── card tile (design.md primitive) ─── */
.slot { opacity: 0; transform: translateY(18px); animation: slot-in 480ms var(--ease) forwards; animation-delay: calc(min(var(--i, 0), 11) * 55ms); }
@keyframes slot-in { to { opacity: 1; transform: none; } }
.tile {
  display: flex; flex-direction: column; position: relative; width: 100%; height: 100%;
  background: var(--paper); border: 0; padding: 0; text-align: left; cursor: pointer;
  border-radius: var(--radius-card); overflow: hidden; box-shadow: 0 0 0 1px var(--ink);
  transition: transform 260ms var(--ease), box-shadow 260ms var(--ease), background-color 220ms var(--ease);
}
.tile:hover, .tile:focus-visible {
  transform: translateY(-9px) scale(1.05); z-index: 30;
  box-shadow: 0 0 0 1px var(--ink), 0 26px 40px -16px var(--shadow-lift);
}
.tile:active { transform: translateY(-5px) scale(1.02); transition-duration: 90ms; }
.tile[aria-pressed='true'] { box-shadow: 0 0 0 1px var(--ink), 0 0 0 4px var(--bone), 0 0 0 5px var(--ink); }
div.tile { cursor: default; }
.chead {
  background: var(--chrome-bg); color: var(--chrome-fg); padding: 7px 10px 6px;
  display: flex; justify-content: space-between; align-items: center; gap: 6px; min-height: 29px;
  font-variation-settings: 'wdth' 70, 'wght' 800; text-transform: uppercase; font-size: 10.5px; letter-spacing: .08em;
}
.chead .num { font-family: var(--mono); font-variation-settings: 'wdth' 87.5, 'wght' 600; font-size: 9.5px; letter-spacing: -.03em; color: var(--chrome-muted); }
.rar { padding: 1px 5px; border: 1px solid var(--chrome-hair); border-radius: 3px; font-size: 9px; letter-spacing: .1em; white-space: nowrap; }
.rar.silver { border-color: var(--rarity-silver); color: var(--rarity-silver); }
.rar.chase { border: none; background: var(--holo); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 800; }
.tile.chase::before {
  content: ''; position: absolute; inset: 0; border-radius: var(--radius-card); padding: 1.5px; background: var(--holo);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none; z-index: 1;
}
.imgwrap { aspect-ratio: 245 / 342; background: var(--bone-3); overflow: hidden; position: relative; display: block; animation: shimmer 1.3s ease-in-out infinite; }
.imgwrap:has(img.is-loaded) { animation: none; }
.imgwrap img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 220ms var(--ease); }
.imgwrap img.is-loaded { opacity: 1; }
@keyframes shimmer { 0%, 100% { background-color: var(--bone-3); } 50% { background-color: var(--bone-2); } }
.imgwrap::after {
  content: ''; position: absolute; inset: -20%; pointer-events: none;
  background: linear-gradient(112deg, transparent 42%, var(--sweep) 50%, transparent 58%);
  transform: translateX(-130%); transition: transform 700ms var(--ease);
}
.tile:hover .imgwrap::after, .tile:focus-visible .imgwrap::after { transform: translateX(130%); }
.imgwrap.empty { animation: none; display: flex; align-items: center; justify-content: center; background: repeating-linear-gradient(135deg, var(--bone-2) 0 9px, var(--bone-3) 9px 18px); color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; }
.cbody { padding: 10px 10px 11px; flex: 1; min-width: 0; }
.cname { font-variation-settings: 'wdth' 66, 'wght' 800; text-transform: uppercase; font-size: 15px; line-height: 1; overflow-wrap: anywhere; }
.cset { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .13em; color: var(--muted); margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticker {
  background: var(--chrome-bg); color: var(--flat); min-height: 31px; padding: 7px 10px;
  font-family: var(--mono); font-variation-settings: 'wdth' 87.5, 'wght' 700; font-feature-settings: 'tnum'; font-size: 12.5px; letter-spacing: -.05em;
  display: flex; justify-content: space-between; align-items: center; gap: 6px;
  transition: background 200ms var(--ease);
}
.tile:hover .ticker, .tile:focus-visible .ticker { background: var(--ink-2); }
.ticker.up { color: var(--signal); }
.ticker .cur { font-size: 9px; color: var(--chrome-muted); letter-spacing: 0; margin-left: 4px; }
.arrow { font-size: 9px; transition: transform 300ms var(--ease); }
.tile:hover .arrow.up { transform: translateY(-3px); }
.tile:hover .arrow.down { transform: translateY(3px); }
/* ghost: a card in the set the collector does NOT own */
.tile.ghost { box-shadow: 0 0 0 1px var(--hair); }
.tile.ghost .imgwrap { opacity: .6; }
.tile.ghost .imgwrap img { filter: grayscale(1) contrast(.9); }
.tile.ghost .chead { background: var(--bone-3); color: var(--muted); }
.tile.ghost .num { color: var(--muted); }
.tile.ghost .rar { border-color: var(--hair); }
.tile.ghost .rar.chase { -webkit-background-clip: border-box; background: none; color: var(--muted); border: 1px solid var(--hair); font-weight: 400; }
.tile.ghost .ticker { background: var(--bone-2); color: var(--muted); }
.tile.ghost .ticker .cur { color: var(--muted); }
.tile.ghost .imgwrap::after { display: none; }
.missing-tag { font-family: var(--font); font-size: 9px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }

/* ─── content bands ─── */
.band { padding: clamp(64px, 9vw, 120px) 0; background: var(--bone); transition: background-color 200ms var(--ease); }
.band--2 { background: var(--bone-2); border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.band:focus { outline: none; }
.h2 {
  font-variation-settings: 'wdth' 66, 'wght' 850; text-transform: uppercase;
  font-size: clamp(2.1rem, 4.4vw, 3.7rem); line-height: .94; max-width: 16ch; overflow-wrap: anywhere;
}
.h3 { font-variation-settings: 'wdth' 70, 'wght' 800; text-transform: uppercase; font-size: 21px; line-height: 1.05; }
.claim { margin-top: 18px; max-width: 58ch; font-size: 18px; color: var(--muted); }

.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; margin: 40px 0 22px; }
.count { font-family: var(--mono); font-variation-settings: 'wdth' 87.5, 'wght' 500; font-size: 13px; color: var(--muted); letter-spacing: -.03em; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border: 1px solid var(--hair); border-radius: var(--radius-pill); }
.seg button {
  border: 0; background: none; cursor: pointer; padding: 8px 16px; min-height: 36px; border-radius: var(--radius-pill);
  font-weight: 600; font-size: 14px; white-space: nowrap; transition: background-color 200ms var(--ease), color 200ms var(--ease);
}
.seg button:hover { background: var(--bone-3); }
.seg button[aria-pressed='true'] { background: var(--ink); color: var(--bone); }

/* card page excerpt */
.cardpage {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px);
  margin-top: clamp(48px, 7vw, 88px); padding-top: clamp(32px, 4vw, 48px); border-top: 2px solid var(--ink);
}
.cp-media { min-width: 0; }
.cp-hero { border-radius: 12px; box-shadow: 0 0 0 1px var(--ink); max-width: 440px; }
.thumbs { display: grid; grid-template-columns: repeat(2, minmax(0, 120px)); gap: 12px; margin-top: 14px; }
.thumb { display: flex; flex-direction: column; gap: 6px; font-size: 12px; }
.thumb--slot {
  aspect-ratio: 245 / 342; border: 1.5px dashed var(--muted); border-radius: var(--radius-card);
  align-items: center; justify-content: center; text-align: center; padding: 10px; color: var(--muted);
}
.slot-plus { font-size: 28px; line-height: 1; font-weight: 300; }
.thumb-k { font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: 10px; color: var(--ink); }
.thumb-v { font-size: 11.5px; line-height: 1.3; }
.thumb-img { border-radius: var(--radius-card); box-shadow: 0 0 0 2px var(--ink); }
.cp-body { min-width: 0; align-self: start; }
.cp-name { margin-top: 10px; font-variation-settings: 'wdth' 62, 'wght' 900; text-transform: uppercase; font-size: clamp(2.6rem, 5vw, 4.4rem); line-height: .88; overflow-wrap: anywhere; }
.cp-price { margin-top: 22px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; padding: 14px 0; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.cp-k { flex-basis: 100%; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.cp-v { font-size: clamp(26px, 3vw, 36px); font-variation-settings: 'wdth' 87.5, 'wght' 600; letter-spacing: -.05em; }
.cp-delta { font-size: 13px; color: var(--flat); }
.cp-delta.up { color: var(--signal-deep); }
.cp-block { margin-top: 32px; max-width: 54ch; }
.cp-block p { margin-top: 10px; color: var(--muted); }
.vis { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 14px 16px; background: var(--paper); border-radius: var(--radius-card); box-shadow: 0 0 0 1px var(--hair); }
.switch {
  width: 48px; height: 28px; border-radius: var(--radius-pill); border: 0; padding: 3px; cursor: pointer;
  background: var(--bone-3); display: flex; transition: background-color 200ms var(--ease);
}
.switch .knob { width: 22px; height: 22px; border-radius: 50%; background: var(--paper); box-shadow: 0 0 0 1px var(--hair); transition: transform 200ms var(--ease); }
.switch[aria-checked='true'] { background: var(--ink); }
.switch[aria-checked='true'] .knob { transform: translateX(20px); background: var(--bone); }
.vis-label { font-weight: 700; }
.vis-state { color: var(--muted); font-size: 14.5px; }

/* value */
.value-grid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 20px; margin-top: 44px; }
.panel { background: var(--paper); border-radius: 10px; box-shadow: 0 0 0 1px var(--hair); padding: 22px 24px 20px; min-width: 0; transition: background-color 200ms var(--ease); }
.panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 20px; }
.panel-k { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.panel-k .mono { letter-spacing: -.02em; }
.panel-v { font-size: clamp(26px, 3.4vw, 40px); font-variation-settings: 'wdth' 87.5, 'wght' 600; letter-spacing: -.05em; }
.panel-note { margin-top: 12px; font-size: 13px; color: var(--muted); }
.chart { margin-top: 14px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart { min-height: 200px; }
.chart .line { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .gap { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 4; }
.chart .grid-l { stroke: var(--hair); }
.chart .lbl { fill: var(--muted); font-family: var(--mono); font-size: 11px; letter-spacing: -.03em; }
.chart .dot { fill: var(--ink); }
.movers { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 14px; }
.movers th { text-align: left; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); padding: 0 0 8px; border-bottom: 1px solid var(--ink); }
.movers td { padding: 10px 0; border-bottom: 1px solid var(--hair); vertical-align: top; }
.movers .num { text-align: right; padding-left: 10px; white-space: nowrap; }
.movers td.num { font-family: var(--mono); font-variation-settings: 'wdth' 87.5, 'wght' 500; font-feature-settings: 'tnum'; letter-spacing: -.04em; font-size: 12.5px; }
.movers .mname { font-variation-settings: 'wdth' 70, 'wght' 750; text-transform: uppercase; font-size: 14px; line-height: 1.1; }
.movers .mset { font-size: 9.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.movers .up { color: var(--signal-deep); }
.movers .down { color: var(--flat); }

.markets {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 3fr) minmax(0, 3fr); gap: 0 32px;
  margin-top: clamp(48px, 6vw, 80px); padding-top: 26px; border-top: 2px solid var(--ink); align-items: start;
}
.markets-h { font-size: clamp(26px, 3vw, 34px); font-variation-settings: 'wdth' 66, 'wght' 850; line-height: .98; grid-row: span 2; max-width: 12ch; }
.market { border-left: 1px solid var(--hair); padding-left: 20px; }
.market p:last-child { color: var(--muted); font-size: 15px; margin-top: 6px; }
.market-src { font-variation-settings: 'wdth' 70, 'wght' 800; text-transform: uppercase; font-size: 18px; }
.market-cur { font-size: clamp(30px, 4vw, 48px); font-variation-settings: 'wdth' 87.5, 'wght' 600; line-height: 1.1; margin-top: 4px; }
.markets-body { grid-column: 2 / 4; margin-top: 22px; color: var(--muted); max-width: 64ch; }

/* sets */
.sets { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(24px, 4vw, 56px); margin-top: 44px; align-items: start; }
.setrow { padding: 18px 0; border-top: 1px solid var(--hair); display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 6px 18px; align-items: center; }
.setrow:first-child { border-top: 2px solid var(--ink); }
.setrow img { width: 96px; height: 44px; object-fit: contain; grid-row: span 2; }
.setrow .sname { font-variation-settings: 'wdth' 66, 'wght' 850; text-transform: uppercase; font-size: 22px; line-height: 1; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.setrow .sname .mono { font-size: 15px; font-variation-settings: 'wdth' 87.5, 'wght' 600; }
.bar { height: 6px; background: var(--bone-3); border-radius: 3px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--ink); border-radius: 3px; }
.setmap { display: grid; grid-template-columns: repeat(23, minmax(0, 1fr)); gap: 3px; }
.setmap i { aspect-ratio: 245 / 342; border-radius: 2px; background: var(--flat); opacity: .55; }
.setmap i.miss { background: transparent; opacity: 1; box-shadow: inset 0 0 0 1.5px var(--ink); }
.set-cap { margin-top: 16px; }

/* keep */
.keep { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; margin-top: 40px; border-top: 2px solid var(--ink); }
.keep > div { padding: 22px 0 24px; border-bottom: 1px solid var(--hair); }
.keep dt { font-variation-settings: 'wdth' 70, 'wght' 800; text-transform: uppercase; font-size: 22px; line-height: 1.05; }
.keep dd { margin-top: 8px; color: var(--muted); max-width: 46ch; }
.isnt { margin-top: 28px; font-size: 15px; color: var(--muted); }

/* close (frozen chrome band) */
.close { background: var(--chrome-bg); color: var(--chrome-fg); padding: clamp(72px, 10vw, 140px) var(--gutter); }
.display--close { max-width: 15ch; font-size: clamp(2.6rem, 6vw, 5.2rem); }
.close-actions { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }

.footer { background: var(--chrome-bg); color: var(--chrome-muted); border-top: 1px solid var(--chrome-hair); padding: 22px var(--gutter); font-size: 13px; }
.footer a { color: var(--chrome-fg); }

/* ─── responsive ─── */
@media (max-width: 1100px) {
  .grid--gallery, .grid--set { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid--hero { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .stats > div:nth-child(n+3) { border-top: 1px solid var(--hair); }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); max-height: none; padding-right: 0; }
  .hero-copy { padding-right: var(--gutter); padding-bottom: 0; }
  .sheet-page { min-height: 0; max-height: 620px; overflow: hidden; }
  .cardpage, .value-grid, .sets { grid-template-columns: minmax(0, 1fr); }
  .markets { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
  .markets-h { grid-column: 1 / -1; grid-row: auto; max-width: none; }
  .markets-body { grid-column: 1 / -1; margin-top: 0; }
  .keep { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .grid--gallery, .grid--set, .grid--hero { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .grid--hero { padding-right: 16px; }
  .sheet-page { padding: 18px 0 0 16px; max-height: 560px; }
  .masthead, .stats { margin-right: 16px; padding-right: 0; }
  .topnav .toplink { display: none; }
  .hero-actions .pill, .close-actions .pill { width: 100%; }
  .hero-actions .toplink { display: inline; }
  .setmap { grid-template-columns: repeat(18, minmax(0, 1fr)); gap: 2px; }
  .setrow { grid-template-columns: 72px minmax(0, 1fr); }
  .setrow img { width: 72px; }
  .cname { font-size: 13.5px; }
  .ticker { font-size: 11.5px; padding: 6px 8px; }
  .cbody { padding: 9px 8px 10px; }
  .cp-hero { max-width: 100%; }
  .grid--gallery .slot:nth-child(n+7) { display: none; }
  .seg button { padding: 8px 11px; font-size: 13px; }
}
@media (pointer: coarse) { .seg button { min-height: 44px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0s !important; animation-delay: 0s !important; transition-duration: 0s !important; scroll-behavior: auto !important; }
  html { scroll-behavior: auto; }
  .slot { opacity: 1; transform: none; }
  .tile:hover, .tile:focus-visible { transform: none; box-shadow: 0 0 0 2px var(--ink); }
  .imgwrap::after { display: none; }
}
