@font-face {
  font-family: "Space Grotesk";
  src: url("/assets/space-grotesk.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f5f6fa;
  --surface: #fff;
  --raised: #edf0f7;
  --line: #dce1ec;
  --line-strong: #bec7dc;
  --text: #171d2d;
  --muted: #56617a;
  --accent: #3047cc;
  --accent-wash: #e8ecff;
  --print: #3349cf;
  --print-bg: #e9edff;
  --green: #08604b;
  --green-wash: #e6f4ee;
  --red: #9f354b;
  --red-wash: #f9eaf0;
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
  --rail: 218px;
  --bar: 65px;
  --radius: 6px;
  font-family: "Space Grotesk", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) { color-scheme: dark; }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #141720;
  --surface: #1b202c;
  --raised: #222939;
  --line: #30394b;
  --line-strong: #4a5874;
  --text: #eef0f9;
  --muted: #adb7cd;
  --accent: #a4b0ff;
  --accent-wash: #292f4d;
  --print: #a6b0ff;
  --print-bg: #242a43;
  --green: #75d8b8;
  --green-wash: #223b38;
  --red: #f9a2ad;
  --red-wash: #422e3b;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
input, button, select { font: inherit; }
button, select { cursor: pointer; }
button:disabled, select:disabled { cursor: default; opacity: .6; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.shell { width: min(1320px, calc(100% - 72px)); margin-inline: auto; }
.icon { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: middle; shape-rendering: crispEdges; }
.chart-defs { position: absolute; pointer-events: none; }
.sr-only, .skip:not(:focus) {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip:focus { position: fixed; z-index: 8; inset: 6px auto auto 6px; background: var(--surface); padding: 10px; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 5;
  width: var(--rail);
  display: flex;
  flex-direction: column;
  overflow: auto;
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 0 14px 18px;
}
.sidebar-heading { display: flex; justify-content: space-between; align-items: center; min-height: var(--bar); padding-inline: 5px; }
.brand { display: inline-flex; gap: 8px; align-items: center; font-size: 1.03rem; font-weight: 700; letter-spacing: -.045em; white-space: nowrap; }
.brand-mark { width: 26px; height: 26px; flex: none; background: var(--accent); mask: url("/assets/mark.svg") center / contain no-repeat; }
.sidebar nav { display: grid; gap: 4px; padding-block: 20px; }
.nav-label, .location, kbd, .results, .setting > span:first-child, .eyebrow {
  font: 500 .75rem/1.35 var(--mono);
  color: var(--muted);
}
.nav-label { padding: 0 10px 6px; text-transform: uppercase; letter-spacing: .075em; }
.nav-label:not(:first-child) { margin-top: 21px; }
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding-inline: 9px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--muted);
  font-size: .94rem;
  font-weight: 500;
}
.sidebar nav a:hover { background: var(--raised); color: var(--text); }
.sidebar nav a[aria-current] {
  border-color: var(--line);
  background: var(--raised);
  color: var(--text);
  font-weight: 700;
}
.sidebar nav a[aria-current] .icon { color: var(--accent); }
.sidebar-settings { margin-top: auto; border-top: 1px solid var(--line); padding: 12px 0 2px; display: grid; gap: 8px; }
.setting { display: flex; min-height: 36px; align-items: center; justify-content: space-between; gap: 5px; padding-inline: 4px 0; }
.setting select { width: 96px; padding: 5px 25px 5px 9px; min-height: 34px; font-size: .875rem; }
.page { margin-left: var(--rail); min-width: 0; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { height: calc(var(--bar) - 1px); display: flex; align-items: center; gap: 12px; }
.location { display: flex; align-items: center; gap: 9px; }
.location .icon { width: 14px; height: 14px; }
.location strong { color: var(--text); font-weight: 600; }
.search-shortcut {
  display: flex;
  align-items: center;
  min-height: 36px;
  margin-left: auto;
  padding: 4px 6px 4px 9px;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  font-size: .875rem;
}
.search-shortcut:hover { border-color: var(--line-strong); color: var(--accent); background: var(--accent-wash); }
.search-shortcut .icon { width: 17px; height: 17px; }
kbd {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding-inline: 5px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--bg);
}
.menu-button, .mobile-brand { display: none; }
main { padding-block: 32px 64px; }

.market-hero {
  isolation: isolate;
  position: relative;
  min-height: 184px;
  display: flex;
  align-items: center;
  margin-bottom: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.hero-copy { z-index: 1; width: 61%; padding: 22px clamp(20px, 2.4vw, 36px); }
.hero-copy h1 {
  font-size: clamp(1.7rem, 3.35vw, 3.15rem);
  line-height: .96;
  letter-spacing: -.075em;
  font-weight: 700;
}
.hero-copy h1 span { color: var(--accent); }
.market-hero.is-searching { min-height: 0; margin-bottom: 22px; scroll-margin-top: calc(var(--bar) + 10px); }
.is-searching .hero-copy { width: 100%; padding-block: 18px; }
.is-searching .hero-copy h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.is-searching .hero-copy p, .is-searching .hero-print { display: none; }
.is-searching .hero-search { max-width: 470px; }
.hero-copy p { margin: 8px 0 12px; line-height: 1.45; color: var(--muted); text-wrap: pretty; }
.hero-print {
  position: absolute;
  inset: 0 0 0 auto;
  width: 39%;
  display: grid;
  place-items: center;
  border-left: 1px solid var(--line);
  background-color: var(--print-bg);
  background-image: linear-gradient(90deg, var(--line) 1px, transparent 1px), linear-gradient(var(--line) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: center;
}
.hero-print::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--print);
  mask: url("/assets/card-print.svg") center / auto calc(100% + 45px) no-repeat;
}
.hero-print i {
  position: absolute;
  width: 13px;
  height: 13px;
  border: 0 solid var(--print);
}
.hero-print i:nth-child(1) { inset: 15px auto auto 15px; border-width: 1px 0 0 1px; }
.hero-print i:nth-child(2) { inset: 15px 15px auto auto; border-width: 1px 1px 0 0; }
.hero-print i:nth-child(3) { inset: auto auto 15px 15px; border-width: 0 0 1px 1px; }
.hero-print i:nth-child(4) { inset: auto 15px 15px auto; border-width: 0 1px 1px 0; }

.section-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 14px; margin-bottom: 13px; }
h2 { font-size: 1.35rem; line-height: 1.2; letter-spacing: -.04em; font-weight: 700; }
.simple-title h1, .detail-heading h1 {
  font-size: clamp(2.15rem, 4.3vw, 4rem);
  letter-spacing: -.07em;
  line-height: 1.02;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.simple-title { padding-block: 8px 12px; margin-bottom: 17px; }
.simple-title p { margin-top: 9px; color: var(--muted); line-height: 1.5; }
.results { margin-left: auto; align-self: baseline; white-space: nowrap; }

.market-pulse:has(.market-overview:empty) { display: none; }
.market-overview, .skel-market-panels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 33px; }
.market-overview:empty { display: none; }
.market-pulse .section-heading { align-items: center; }
.market-pulse .market-overview { margin-bottom: 22px; }
.overview-empty { padding: 18px 12px; color: var(--muted); font-size: .875rem; }
.market-overview > .notice { grid-column: 1 / -1; }
.skel-market-panels > .skel { height: 190px; }
.overview-panel { min-width: 0; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.overview-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  gap: 6px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--raised);
}
.overview-panel h2 { display: flex; align-items: center; gap: 6px; font-size: .94rem; letter-spacing: -.025em; }
.overview-panel h2 .icon { width: 18px; height: 18px; color: var(--accent); }
.overview-gainers header { background: var(--green-wash); }
.overview-gainers h2 .icon { color: var(--green); }
.overview-losers header { background: var(--red-wash); }
.overview-losers h2 .icon { color: var(--red); }
.overview-releases header { background: var(--accent-wash); }
.overview-panel header a { flex-shrink: 0; color: var(--muted); font-size: .78rem; font-weight: 600; }
.overview-panel a:hover, .overview-panel a:hover strong { color: var(--accent); }
.overview-panel header a:hover { text-decoration: underline; text-underline-offset: 3px; }
.overview-panel ul { list-style: none; margin: 0; padding: 0 11px; }
.overview-panel li + li { border-top: 1px solid var(--line); }
.overview-panel li a, .overview-panel .skel-list li { display: flex; align-items: center; gap: 8px; min-height: 46px; padding-block: 5px; font-size: .875rem; }
.overview-panel li a:focus-visible { outline-offset: -2px; }
.overview-panel .thumb { width: 23px; height: 32px; flex-basis: 23px; }
.overview-panel .thumb-expansion { width: 37px; height: 26px; flex-basis: 37px; padding: 2px; }
.overview-panel .thumb-pokemon { width: 30px; height: 30px; flex-basis: 30px; padding: 2px; }
.overview-name { flex: 1; min-width: 0; }
.overview-name strong, .overview-name small, strong.overview-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.overview-name small, .overview-panel time { color: var(--muted); font-size: .75rem; }
.overview-price { display: grid; justify-items: end; margin-left: auto; white-space: nowrap; font-size: .8rem; font-variant-numeric: tabular-nums; }
.overview-price .up, .overview-price .down { font: 600 .7rem/1.4 var(--mono); white-space: nowrap; }
.overview-panel time { white-space: nowrap; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.market-facets {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--raised);
}
.market-facets select { max-width: 190px; }
.listed { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: .875rem; }
.listed input { appearance: auto; min-height: auto; accent-color: var(--accent); }
.reset-filters { border: 0; background: transparent; padding: 8px; color: var(--accent); font-size: .875rem; }
.reset-filters:hover { text-decoration: underline; text-underline-offset: 3px; }
.search, .select { min-width: 0; position: relative; display: flex; align-items: center; }
.search { flex: 1; }
.search .icon { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
button, input, select {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 4px;
  min-height: 40px;
  padding: 7px 12px;
  font-size: .875rem;
}
button:enabled:hover, select:enabled:hover, input:hover { border-color: var(--line-strong); }
.search input { width: 100%; padding-left: 39px; }
.search input::placeholder { color: var(--muted); }
.hero-search { max-width: 390px; }
.hero-search input {
  min-height: 50px;
  padding-right: 61px;
  font-size: 1rem;
  border-color: var(--line-strong);
  box-shadow: 0 2px 0 var(--line);
  scroll-margin-top: calc(var(--bar) + 18px);
}
.hero-search kbd { position: absolute; right: 11px; pointer-events: none; }
.hero-search input:not(:placeholder-shown) { padding-right: 44px; }
.hero-search input::-webkit-search-cancel-button { display: none; }
.clear-search { position: absolute; right: 6px; min-height: 34px; min-width: 34px; display: grid; place-items: center; padding: 0; border-color: transparent; background: transparent; }
.clear-search .icon { position: static; }
.hero-search input:not(:placeholder-shown) + kbd { display: none; }
.select select { width: 100%; max-width: 225px; padding-right: 32px; text-overflow: ellipsis; appearance: none; }
.select::after {
  content: "";
  position: absolute;
  right: 9px;
  width: 15px;
  height: 14px;
  background: var(--muted);
  clip-path: polygon(15% 29%, 34% 29%, 34% 43%, 43% 43%, 43% 57%, 57% 57%, 57% 43%, 66% 43%, 66% 29%, 85% 29%, 85% 43%, 75% 43%, 75% 57%, 66% 57%, 66% 71%, 57% 71%, 57% 85%, 43% 85%, 43% 71%, 34% 71%, 34% 57%, 25% 57%, 25% 43%, 15% 43%);
  pointer-events: none;
}
.filter-toggle { display: flex; align-items: center; gap: 6px; }
.filter-toggle .icon { width: 17px; height: 17px; }
.filter-toggle[aria-expanded="true"] { border-color: var(--line-strong); color: var(--accent); background: var(--accent-wash); }

.filter-count {
  min-width: 20px;
  padding: 3px 4px;
  border-radius: 2px;
  background: var(--accent-wash);
  color: var(--accent);
  font: 600 .75rem/1 var(--mono);
  text-align: center;
}
.filter-toggle[aria-expanded="true"] .filter-count { background: var(--surface); }

#ranking, .table-scroll { scroll-margin-top: calc(var(--bar) + 12px); }
.table-scroll { position: relative; border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; background: var(--surface); }
table { width: 100%; border-collapse: collapse; }
.card-rankings { min-width: 710px; }
.collection-rankings { min-width: 600px; }
th, td { padding-inline: 10px; }
th:last-child, td:last-child { padding-right: 14px; }
thead th {
  background: var(--raised);
  color: var(--muted);
  font: 600 .72rem/1.3 var(--mono);
  text-align: left;
  padding-block: 11px;
  white-space: nowrap;
}
tbody td, tbody th { border-top: 1px solid var(--line); height: 59px; font-size: .9rem; }
tbody th { text-align: left; }
tbody tr:hover, tbody tr:focus-within { background: var(--raised); }
.collection-rankings tbody th { width: 38%; }
.directory-top-card small { display: block; color: var(--muted); font-size: .75rem; white-space: normal; }
.numeric { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.watch-cell { width: 42px; text-align: center; padding-inline: 4px 1px; }
.rank { width: 39px; color: var(--muted); font: 400 .75rem/1 var(--mono); }
.star { border-color: transparent; background: transparent; color: var(--muted); min-height: 36px; min-width: 36px; padding: 5px; }
.star .icon { width: 19px; height: 19px; }
.star:hover, .starred { color: var(--accent); background: var(--accent-wash); }
.watch-solid, .starred .watch-outline { display: none; }
.starred .watch-solid { display: inline; }
.card-link { display: inline-flex; align-items: center; gap: 9px; min-height: 50px; padding-block: 3px; }
.card-link:hover strong { color: var(--accent); }
.card-link small, .quotes small { display: block; color: var(--muted); margin-top: 3px; font-size: .78rem; }
.thumb { position: relative; overflow: hidden; width: 32px; height: 44px; flex: 0 0 32px; border-radius: 3px; background: var(--raised); }
.thumb img, .image-empty { display: block; width: 100%; height: 100%; object-fit: cover; }
.thumb-expansion { width: 56px; height: 34px; flex-basis: 56px; padding: 3px; }
.thumb-pokemon { width: 42px; height: 42px; flex-basis: 42px; padding: 2px; }
.thumb-expansion img, .thumb-pokemon img { object-fit: contain; }
.thumb-pokemon img { image-rendering: pixelated; }
.image-empty {
  background: var(--line-strong);
  mask: url("/assets/mark.svg") center / min(72%, 84px) auto no-repeat;
}
.estimate { font-weight: 700; }
.up { color: var(--green); }
.down { color: var(--red); }
.muted { color: var(--muted); font-weight: 400; }
.spark { width: 90px; height: 26px; vertical-align: middle; }
.paging { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; margin-top: 14px; gap: 9px; color: var(--muted); font-size: .875rem; }
.paging nav { display: flex; align-items: center; gap: 9px; }
.notice { border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface); padding: 26px; color: var(--muted); text-align: center; }
.notice a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.page-error { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 5vw, 55px); }
.page-error > a { display: inline-flex; margin-top: 20px; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--muted); margin-bottom: 18px; font-size: .875rem; }
.breadcrumb a, .eyebrow a { color: var(--accent); text-underline-offset: 3px; }
.breadcrumb a:hover, .eyebrow a:hover { text-decoration: underline; }
.detail-layout, .detail-grid { display: grid; grid-template-columns: minmax(200px, .7fr) minmax(0, 1.55fr); gap: 14px; }
.detail-grid { margin-top: 14px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.portrait, .detail-main, .panel, .stats > div { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.portrait, .detail-main, .panel { padding: clamp(15px, 2.4vw, 30px); }
.portrait { display: grid; min-height: 280px; place-items: center; }
.detail-layout .portrait { background: transparent; border-color: transparent; }
.card-artwork { width: min(100%, 280px); perspective: 700px; }
.card-face { position: relative; border-radius: 4%; isolation: isolate; overflow: hidden; }
.card-face img { display: block; width: 100%; height: auto; }
.card-face .image-empty { display: block; width: 100%; aspect-ratio: 5 / 7; }
.card-face::before, .card-face::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
}
.card-face::after {
  background: radial-gradient(ellipse at var(--glint-x) var(--glint-y), #fff9, transparent 62%);
  mix-blend-mode: soft-light;
}
.card-artwork[data-finish="holo"] .card-face::before,
.card-artwork[data-finish="reverse"] .card-face::before {
  background-image:
    radial-gradient(ellipse at var(--glint-x) var(--glint-y), #0000 5%, #222b 70%),
    repeating-linear-gradient(124deg, #f8b4ef 0%, #b4c6ff 12%, #93e8dd 24%, #ffedac 35%, #f8b4ef 48%);
  background-size: 100% 100%, 190% 190%;
  background-position: center, var(--glint-x) var(--glint-y);
  mix-blend-mode: color-dodge;
}
.card-artwork[data-finish="reverse"] .card-face::before {
  mask-image: repeating-linear-gradient(0deg, #000 0 2px, #0007 2px 4px);
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .card-face { transition: transform 230ms ease-out; }
  .card-face::before, .card-face::after { transition: opacity 230ms ease-out; }
  .card-artwork.is-tilting .card-face { transform: rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) scale(1.03); transition-duration: 85ms; }
  .card-artwork.is-tilting .card-face::after { opacity: .8; }
  .card-artwork.is-tilting .card-face::before { opacity: .46; }
}
.detail-heading { display: flex; justify-content: space-between; gap: 7px; align-items: start; }
.detail-heading h1 { margin-block: 8px 13px; }
.detail-heading .star { border: 1px solid var(--line); min-width: 42px; min-height: 42px; }
.detail-price { display: grid; gap: 2px; padding-bottom: 16px; }
.detail-price > span, .detail-price small { color: var(--muted); font-size: .875rem; }
.detail-price strong { font-size: clamp(1.75rem, 4vw, 2.35rem); letter-spacing: -.055em; }
.price-history { border-top: 1px solid var(--line); padding-top: 14px; }
.history-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.ranges, .chart-series { display: flex; flex-wrap: wrap; gap: 4px; }
.ranges { border: 1px solid var(--line); border-radius: 4px; padding: 2px; }
.chart-series { margin-block: 12px; }
.chart-series:empty { display: none; }
.ranges button, .chart-series button { min-height: 33px; padding: 4px 8px; color: var(--muted); background: transparent; }
.ranges button { border-color: transparent; }
.ranges button[aria-pressed="true"], .chart-series button[aria-pressed="true"] { background: var(--accent-wash); color: var(--accent); border-color: var(--line); }
.periods { display: flex; flex-wrap: wrap; gap: 15px; color: var(--muted); font-size: .875rem; margin-top: 13px; }
.periods > span > span { margin-left: 4px; }
.chart-empty { display: grid; place-items: center; text-align: center; color: var(--muted); min-height: 125px; background: var(--raised); border-radius: 3px; padding: 12px; }
.large-chart { display: block; width: 100%; color: var(--accent); }
.chart-grid { stroke: var(--line-strong); stroke-width: 1; fill: none; stroke-dasharray: 2 4; vector-effect: non-scaling-stroke; }
#chart-ink path { fill: var(--accent); opacity: .5; }
.chart-plot { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; gap: 8px; margin-bottom: 8px; }
.chart-scale { display: flex; flex-direction: column; justify-content: space-between; color: var(--muted); font: 400 .71rem/1 var(--mono); white-space: nowrap; }
.chart-summary { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 5px 12px; color: var(--muted); font: 400 .75rem/1.4 var(--mono); }
.chart-interaction { position: relative; min-width: 0; cursor: crosshair; touch-action: pan-y pinch-zoom; }
.chart-interaction:has(.chart-scrubber:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
.chart-crosshair line { stroke: var(--muted); stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.chart-crosshair circle { stroke: var(--surface); stroke-width: 2; vector-effect: non-scaling-stroke; }
.chart-tooltip {
  position: absolute;
  z-index: 1;
  top: 8px;
  left: clamp(0px, calc(var(--chart-x) + 10px), calc(100% - 124px));
  width: 124px;
  padding: 7px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
  color: var(--muted);
  font: 400 .72rem/1.35 var(--mono);
  pointer-events: none;
}
.chart-tooltip.before-crosshair { left: clamp(0px, calc(var(--chart-x) - 134px), calc(100% - 124px)); }
.chart-tooltip strong { display: block; margin-top: 2px; color: var(--text); font-size: .9rem; }
.panel h3 { margin-top: 16px; font-size: 1rem; }
.panel p { color: var(--muted); margin-block: 8px; line-height: 1.5; }
.panel dl { margin-bottom: 0; }
.panel dl > div, .quotes li { display: flex; gap: 12px; justify-content: space-between; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.panel dt { color: var(--muted); }
.panel dd { margin: 0; text-align: right; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.quotes { list-style: none; padding: 0; }
.badge-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.detail-badge, .detail-badge-static {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--raised);
  color: var(--text);
  font-size: .875rem;
  line-height: 1.3;
}
.detail-badge:hover { border-color: var(--line-strong); color: var(--accent); background: var(--accent-wash); }
.detail-badge-static { background: var(--surface); color: var(--muted); }
.set-badge-art, .pokemon-badge-art { display: inline-grid; place-items: center; flex: none; }
.set-badge-art img { display: block; max-height: 18px; max-width: 44px; object-fit: contain; }
.pokemon-badge-art img { width: 28px; height: 28px; object-fit: contain; image-rendering: pixelated; }
.pokemon-badge-id { color: var(--muted); font: 400 .75rem/1 var(--mono); }
.type-dot { width: 7px; height: 7px; flex-shrink: 0; background: var(--accent); }
.type-fire { background: #e56745; }
.type-water { background: #5489eb; }
.type-grass { background: #41a87b; }
.type-lightning { background: #d5ab36; }
.type-psychic { background: #ae72da; }
.type-fighting { background: #cb7657; }
.type-darkness { background: #7f86a8; }
.type-metal { background: #8d98ac; }
.type-dragon { background: #bb9a46; }
.type-fairy { background: #d67ba5; }
.type-colorless { background: #939bb1; }
.collection-header { display: flex; align-items: center; gap: 15px; flex-wrap: wrap; }
.collection-art { display: grid; align-items: center; justify-items: center; flex: none; padding: 6px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.collection-art-expansion { width: 140px; height: 72px; }
.collection-art-pokemon { width: 84px; height: 84px; }
.collection-art-card { width: 68px; height: 94px; }
.collection-art img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.collection-art-pokemon img { image-rendering: pixelated; }
.collection-art .image-empty { width: 100%; height: 100%; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.stats > div { display: flex; flex-direction: column; gap: 5px; padding: 12px 14px; }
.stats span, .stats small { color: var(--muted); font-size: .83rem; }
.stats strong { font-size: 1.3rem; line-height: 1.1; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.collection-history { margin-bottom: 28px; }
.collection-chart { margin-top: 12px; }
.panel .chart-cohort { margin: 0 0 8px; font-size: .875rem; }

.skel, .skel-dl > span::before, .skel-dl > span::after, .thumb.is-loading, .collection-art.is-loading {
  background-color: var(--raised);
  background-image: conic-gradient(var(--line) 25%, transparent 0 50%, var(--line) 0 75%, transparent 0);
  background-size: 4px 4px;
}
.skel { display: inline-block; border-radius: 3px; vertical-align: middle; }
.skel-line { height: 13px; max-width: 100%; }
.skel-sm { height: 10px; }
.skel-pill { height: 16px; }
.skel-results { width: 77px; }
.skel-circle { width: 20px; height: 20px; }
.skel-thumb { width: 32px; height: 44px; flex: 0 0 32px; }
.skel-thumb-sm { width: 23px; height: 32px; flex: 0 0 23px; }
.skel-thumb-expansion { width: 56px; height: 34px; flex: 0 0 56px; }
.skel-thumb-expansion-sm { width: 37px; height: 26px; flex: 0 0 37px; }
.skel-thumb-pokemon { width: 42px; height: 42px; flex: 0 0 42px; }
.skel-thumb-pokemon-sm { width: 30px; height: 30px; flex: 0 0 30px; }
.skel-collection-art-expansion { width: 140px; height: 72px; }
.skel-collection-art-pokemon { width: 84px; height: 84px; }
.skel-collection-art-card { width: 68px; height: 94px; }
.skel-spark { width: 90px; height: 23px; }
.skel-stack { display: grid; gap: 4px; align-content: center; flex: 1; }
.skel-num { max-width: none; }
.skel-list li { display: flex; gap: 9px; }
.skel-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.skel-input { flex: 1; min-width: 160px; height: 40px; }
.skel-select { width: 130px; height: 40px; }
.skel-stat { width: min(100%, 118px); height: 25px; }
.skel-portrait { width: min(100%, 280px); aspect-ratio: 5 / 7; }
.skel-chart { width: 100%; height: 145px; margin-top: 12px; }
.skel-chart-wrap { display: grid; gap: 10px; }
.skel-chart-wrap .skel-chart { margin-top: 0; }
.skel-chart-bar, .skel-paging { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.skel-paging { margin-top: 12px; }
.skel-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 12px; }
.skel-tab { width: 110px; height: 32px; }
.skel-dl { display: grid; }
.skel-dl > span { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.skel-dl > span::before, .skel-dl > span::after { content: ""; height: 13px; border-radius: 3px; }
.skel-dl > span::before { width: 34%; }
.skel-dl > span::after { width: 42%; }
.skel-row { pointer-events: none; }
.thumb.is-loading img, .collection-art.is-loading img, .portrait.is-loading img { opacity: 0; }

@media (max-width: 1180px) {
  :root { --rail: 196px; }
  .shell { width: calc(100% - 48px); }
  .market-overview, .skel-market-panels { gap: 8px; }
  .overview-panel header { padding-inline: 8px; }
  .overview-panel ul { padding-inline: 7px; }
}

@media (max-width: 900px) {
  :root { --bar: 58px; }
  .sidebar { width: min(300px, calc(100% - 34px)); display: none; }
  .sidebar.is-open { display: flex; }
  .drawer-backdrop { position: fixed; z-index: 4; inset: 0; background: #0c1123a3; }
  .menu-button { display: inline-grid; place-items: center; min-width: 41px; min-height: 41px; padding: 0; }
  .drawer-open { overflow: hidden; }
  .page { margin-left: 0; }
  .location { display: none; }
  .mobile-brand { display: inline-flex; }
}

@media (max-width: 680px) {
  .shell { width: calc(100% - 28px); }
  main { padding-block: 15px 40px; }
  .market-hero { min-height: 0; margin-bottom: 22px; display: flex; flex-direction: column-reverse; align-items: stretch; }
  .hero-copy { width: 100%; padding: 18px; }
  .hero-copy h1 { font-size: clamp(1.45rem, 6.7vw, 2.7rem); }
  .hero-copy p { margin-block: 9px 13px; }
  .hero-print { position: relative; width: 100%; height: 116px; border: 0; border-bottom: 1px solid var(--line); }
  .hero-print::before { mask-size: auto 135px; }
  .hero-print i { width: 8px; height: 8px; }
  .hero-print i:nth-child(1) { inset: 9px auto auto 9px; }
  .hero-print i:nth-child(2) { inset: 9px 9px auto auto; }
  .hero-print i:nth-child(3) { inset: auto auto 9px 9px; }
  .hero-print i:nth-child(4) { inset: auto 9px 9px auto; }
  .search-shortcut { min-width: 41px; min-height: 41px; justify-content: center; padding: 0; }
  .search-shortcut span, kbd { display: none; }
  .search-shortcut .icon { width: 20px; height: 20px; }
  .hero-search { max-width: none; }
  .hero-search input { min-height: 44px; padding-right: 10px; }
  .market-overview, .skel-market-panels {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: min(82vw, 355px);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 8px;
    margin-bottom: 21px;
    padding-bottom: 5px;
  }
  .overview-panel { scroll-snap-align: start; }
  .overview-panel li:nth-child(n + 4) { display: none; }
  .skel-market-panels > .skel { height: 186px; }
  .filters .search { flex: 1 1 100%; }
  .filters:not(:has(.search)) { gap: 6px; }
  .filters > .select { flex: 1; }
  .filters:not(:has(.search)) > .select:has([name="language"]) { flex: 0 1 102px; }
  .filters > .select select { max-width: none; }
  .market-facets > .select { flex: 1 1 43%; }
  .market-facets > .select select { max-width: none; }
  .search input, .filters select { font-size: 1rem; }
  .table-scroll .rank, .card-rankings th:nth-child(2), .collection-rankings th:first-child { display: none; }
  .card-rankings { min-width: 590px; }
  .card-rankings td:nth-child(3) { width: 155px; }
  th, td { padding-inline: 7px; }
  .detail-layout, .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .portrait { min-height: 0; padding: 18px; }
  .card-artwork, .skel-portrait { width: min(100%, 146px); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .stats > div { padding: 9px; }
  .stats strong { font-size: 1.08rem; }
}
