/* BountyScope site styles. Fonts are self-hosted (no requests to Google). They are cached for a year without a
   ?v= query, so their file names carry the Google Fonts version: give a changed font a new file name. */

@font-face {
  font-family: "Alfa Slab One";
  src: url("../fonts/alfa-slab-one-v21-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Libre Franklin";
  src: url("../fonts/libre-franklin-v20-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Libre Franklin";
  src: url("../fonts/libre-franklin-italic-v20-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* Colours come from the app icon: royal-blue sea, glowing scanner brackets, parchment, the wheel's dark wood and
   the red bandana. */
:root {
  --sea: #012c7a;
  --sea-light: #0a3f9a;
  --sea-deep: #001647;
  --paper: #eadcb0;
  --paper-edge: #d4bf86;
  --ink: #271c15;
  --stamp: #d71f24;
  --glow: #ffc93c;
  --glow-core: #fef179;
  --foam: #f1f4f9;
  --text: #0f1d3a;
  --muted: #4a5878;
  --line: #d5dcea;
  /* Price moves: up in green, down in the bandana red (darkened for text on white). */
  --up: #0f6e3f;
  --up-bg: #e3f3ea;
  --down: #b3171c;
  --down-bg: #fbe6e6;

  --slab: "Alfa Slab One", "Rockwell", "Roboto Slab", Georgia, serif;
  --sans: "Libre Franklin", "Franklin Gothic", "Helvetica Neue", Arial, sans-serif;

  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--foam);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; }

a { color: var(--sea); text-underline-offset: .15em; }
a:hover { color: var(--stamp); }

:focus-visible {
  outline: 3px solid var(--glow);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  padding: .5rem 1rem;
  background: var(--glow);
  color: var(--ink);
  z-index: 10;
}
.skip:focus { left: 1rem; }

/* ---------- Header and footer ---------- */

.top { background: var(--sea); color: #fff; }

.top__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: inherit;
  text-decoration: none;
  font-family: var(--slab);
  font-size: 1.3rem;
  letter-spacing: .01em;
}
.wordmark:hover { color: inherit; }
.wordmark .app-icon { width: 36px; height: 36px; flex: none; }

/* The image files carry the iPhone's rounded icon shape; the shadow follows it. */
.app-icon { display: block; filter: drop-shadow(0 .15rem .3rem rgba(0, 10, 40, .35)); }

.top nav { display: flex; gap: 1.25rem; }
.top nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  font-size: .95rem;
}
.top nav a:hover,
.top nav a[aria-current="page"] { color: var(--glow); }

.foot {
  background: var(--sea-deep);
  color: #c3cde6;
  padding: 3rem 0 2.5rem;
  font-size: .9rem;
}
.foot .wordmark { color: #fff; font-size: 1.15rem; }
.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
  margin: 1.25rem 0 1.5rem;
}
.foot nav a { color: #fff; }
.foot nav a:hover { color: var(--glow); }
.foot__note { max-width: 60ch; margin: .5rem 0 0; color: #94a3c7; }

/* ---------- Store badges ---------- */

.badges {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: .9rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.badges img { display: block; height: 48px; width: auto; }
.badges a { display: block; border-radius: 9px; }
.badge-soon { display: flex; flex-direction: column; gap: .3rem; }
.badge-soon img { opacity: .45; filter: grayscale(1); }
.badge-soon span { font-size: .8rem; font-weight: 600; color: inherit; opacity: .8; }

/* ---------- Home: hero ---------- */

/* On the home page the header sits on the hero, so both share the hero's sea gradient. */
.home .top { position: absolute; left: 0; right: 0; z-index: 2; background: transparent; }

.hero {
  background: radial-gradient(110% 90% at 75% 35%, var(--sea-light) 0%, var(--sea) 45%, var(--sea-deep) 100%);
  color: #fff;
  padding: calc(4rem + clamp(2.5rem, 6vw, 5rem)) 0 clamp(3rem, 7vw, 6rem);
  overflow: hidden;
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
}

.hero h1 {
  font-family: var(--slab);
  font-weight: 400;
  font-size: clamp(2.3rem, 5.2vw, 4rem);
  line-height: 1.05;
  letter-spacing: -.005em;
  margin: 0 0 1.25rem;
  max-width: 14ch;
}

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.55;
  color: #d9e2f5;
  max-width: 34rem;
  margin: 0 0 2rem;
}

.hero__small { margin: 1rem 0 0; font-size: .9rem; color: #9fb0d6; }

/* The phone: the app's scanner with the featured card under the glowing brackets, and its live price. */

.phone {
  justify-self: center;
  width: min(100%, 19rem);
  margin: 0;
}

.phone__screen {
  position: relative;
  display: flex;
  flex-direction: column;
  aspect-ratio: 9 / 19.5;
  overflow: hidden;
  border: .6rem solid #070d1f;
  border-radius: 2.7rem;
  background: var(--sea-deep);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .14),
    0 0 4.5rem rgba(255, 201, 60, .16),
    0 2rem 4rem rgba(0, 10, 40, .6);
  transform: rotate(-3deg);
}

.phone__status {
  position: absolute;
  inset: 0 0 auto;
  z-index: 1;
  padding: .5rem 1.4rem 0;
  font-size: .72rem;
  font-weight: 600;
  color: #fff;
}
.phone__island {
  position: absolute;
  top: .4rem;
  left: 50%;
  width: 34%;
  height: 1.3rem;
  border-radius: 1rem;
  background: #000;
  translate: -50% 0;
}

/* The camera view: the card lying on a dark wooden table (the wood of the icon's wheel). */
.phone__camera {
  flex: 1;
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(97deg, rgba(255, 255, 255, .025) 0 2px, transparent 2px 11px),
    radial-gradient(85% 65% at 50% 45%, #4a3322 0%, #24180f 75%);
}

.scan {
  position: relative;
  width: 64%;
  aspect-ratio: 63 / 88;
}

/* The featured card (a real card image from assets.bountyscope.app, see inc/featured.php). */
.card {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 4.5% / 3.2%;
  background: var(--sea-deep);
  /* Lit up by the scanner: an amber glow that follows the card's edge. */
  box-shadow: 0 0 1.1rem rgba(255, 201, 60, .45), 0 .3rem .8rem rgba(0, 0, 0, .5);
  transform: rotate(4deg);
}

/* Scanner corner brackets, glowing like the icon's. They close in on the card once, on page load. */
.corner {
  position: absolute;
  width: 24%;
  aspect-ratio: 1;
  border: 0 solid var(--glow-core);
  filter: drop-shadow(0 0 3px var(--glow)) drop-shadow(0 0 8px rgba(255, 170, 30, .7));
  animation: lock 0.9s cubic-bezier(.2, .8, .2, 1) .35s both;
}
.corner--tl { left: -12%; top: -9%; border-width: 4px 0 0 4px; border-top-left-radius: 40%; --dx: -18%; --dy: -18%; }
.corner--tr { right: -12%; top: -9%; border-width: 4px 4px 0 0; border-top-right-radius: 40%; --dx: 18%; --dy: -18%; }
.corner--bl { left: -12%; bottom: -9%; border-width: 0 0 4px 4px; border-bottom-left-radius: 40%; --dx: -18%; --dy: 18%; }
.corner--br { right: -12%; bottom: -9%; border-width: 0 4px 4px 0; border-bottom-right-radius: 40%; --dx: 18%; --dy: 18%; }

@keyframes lock {
  from { opacity: 0; translate: var(--dx) var(--dy); }
  to { opacity: 1; translate: 0 0; }
}

/* The scan result, on parchment like a bounty poster: the name, then the price. */
.phone__result {
  position: relative;
  padding: .9rem 1.15rem 1.5rem;
  border-radius: 1.1rem 1.1rem 0 0;
  background: var(--paper);
  color: var(--ink);
}
.phone__result::after {
  content: "";
  position: absolute;
  bottom: .45rem;
  left: 50%;
  width: 36%;
  height: 4px;
  border-radius: 2px;
  background: rgba(39, 28, 21, .45);
  translate: -50% 0;
}
.phone__name {
  margin: 0;
  font-family: var(--slab);
  font-size: 1.05rem;
  line-height: 1.15;
  letter-spacing: .03em;
}
.phone__set {
  margin: .15rem 0 0;
  font-size: .72rem;
  line-height: 1.3;
  color: #5b4a37;
}
.phone__price {
  margin: .45rem 0 0;
  font-family: var(--slab);
  font-size: 2.4rem;
  line-height: 1;
  color: var(--stamp);
  font-variant-numeric: lining-nums;
  transform-origin: left center;
  animation: stamp .35s cubic-bezier(.3, 1.4, .5, 1) 1.15s both;
}
.phone__label { margin: .2rem 0 0; font-size: .72rem; color: #5b4a37; }

@keyframes stamp {
  from { opacity: 0; scale: 1.5; }
  to { opacity: 1; scale: 1; }
}

.phone__note {
  max-width: 26ch;
  margin: 1.6rem auto 0;
  font-size: .85rem;
  line-height: 1.4;
  text-align: center;
  color: #9fb0d6;
}

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

/* ---------- Home: the week's biggest movers ---------- */

.movers {
  background: #fff;
  padding: clamp(3rem, 7vw, 5.5rem) 0;
  border-bottom: 1px solid var(--line);
}

.movers__head p { max-width: 52ch; margin: .6rem 0 2.25rem; color: var(--muted); }

.movers__lists {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.5rem clamp(2rem, 6vw, 5rem);
}

.movers h3 {
  margin: 0 0 .4rem;
  font-size: 1.1rem;
  font-weight: 700;
}
.movers__list--up h3 { color: var(--up); }
.movers__list--down h3 { color: var(--down); }

.movers ol { margin: 0; padding: 0; list-style: none; }

.movers li {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 1rem;
  padding: .75rem 0;
  border-top: 1px solid var(--line);
}
.movers li img {
  display: block;
  width: 2.6rem;
  height: auto;
  border-radius: 3px;
  box-shadow: 0 .1rem .3rem rgba(0, 10, 40, .25);
}

.mover__card { display: flex; flex-direction: column; min-width: 0; }
.mover__name,
.mover__set { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mover__name { font-weight: 700; line-height: 1.3; }
.mover__set { font-size: .85rem; color: var(--muted); }

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

.mover__change {
  min-width: 4.4rem;
  padding: .15rem .55rem;
  border-radius: 1rem;
  font-weight: 700;
  font-size: .95rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.movers__list--up .mover__change { background: var(--up-bg); color: var(--up); }
.movers__list--down .mover__change { background: var(--down-bg); color: var(--down); }

/* ---------- Home: features ---------- */

.features { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }

.features__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 2rem clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.features h2,
.movers h2,
.closing h2 {
  font-family: var(--slab);
  font-weight: 400;
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  line-height: 1.1;
  color: var(--sea);
  margin: 0;
}

.features h2 { position: sticky; top: 2rem; }
.features dl { margin: 0; }
.features dl > div {
  padding: 1.4rem 0;
  border-top: 2px solid var(--line);
}
.features dl > div:first-child { border-top: 0; padding-top: 0; }
.features dt {
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.3;
  margin-bottom: .35rem;
}
.features dd { margin: 0; color: var(--muted); max-width: 52ch; }

/* ---------- Home: closing call to action ---------- */

.closing {
  background: var(--paper);
  color: var(--ink);
  padding: clamp(3rem, 7vw, 5rem) 0;
}
.closing__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 2rem;
}
.closing h2 { color: var(--ink); }
.closing__app { display: flex; align-items: center; gap: 1.25rem; }
.app-icon--large { width: 96px; height: 96px; flex: none; filter: drop-shadow(0 .4rem .8rem rgba(0, 10, 40, .35)); }

/* ---------- Legal and other text pages ---------- */

.doc { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(3.5rem, 8vw, 6rem); }

.doc__body { max-width: 44rem; }

.doc h1 {
  font-family: var(--slab);
  font-weight: 400;
  font-size: clamp(2.1rem, 4.5vw, 3rem);
  line-height: 1.1;
  color: var(--sea);
  margin: 0 0 .5rem;
}
.doc__updated { margin: 0 0 2.25rem; color: var(--muted); font-size: .95rem; }

.doc h2 {
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 2.5rem 0 .6rem;
}
.doc h3 { font-size: 1.05rem; font-weight: 700; margin: 1.6rem 0 .4rem; }
.doc p, .doc ul, .doc ol { margin: 0 0 1rem; }
.doc ul, .doc ol { padding-left: 1.3rem; }
.doc li { margin-bottom: .45rem; }
.doc li::marker { color: var(--muted); }

.summary {
  margin: 0 0 2rem;
  padding: 1.25rem 1.5rem;
  background: #fff;
  border-left: 4px solid var(--sea);
}
.summary ul { margin: 0; }
.summary li:last-child { margin-bottom: 0; }

.notfound { text-align: left; }
.notfound p { max-width: 40ch; }

/* ---------- Shared bits for the card pages ---------- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.muted { color: var(--muted); font-weight: 400; }

.eyebrow {
  margin: 0 0 .35rem;
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow a { color: inherit; }

.foot nav + nav { margin-top: -.75rem; }

/* Search box: a plain form, so it works without scripts. */
.search {
  display: flex;
  gap: .5rem;
  max-width: 36rem;
  margin: 1.25rem 0 0;
}
.search input {
  flex: 1;
  min-width: 0;
  padding: .7rem .9rem;
  border: 2px solid var(--line);
  border-radius: .6rem;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
}
.search input:focus { border-color: var(--sea); outline: none; box-shadow: 0 0 0 3px rgba(255, 201, 60, .6); }
.search button {
  padding: .7rem 1.2rem;
  border: 0;
  border-radius: .6rem;
  background: var(--sea);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.search button:hover { background: var(--stamp); }
.search--light input { border-color: transparent; }
.search--light button { background: var(--glow); color: var(--ink); }
.search--light button:hover { background: var(--glow-core); }

/* Home: the card lookup band under the hero. */
.lookup { background: var(--sea-deep); color: #d9e2f5; padding: 2.5rem 0; }
.lookup__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 1rem 3rem;
}
.lookup h2 { margin: 0 0 .3rem; font-family: var(--slab); font-weight: 400; font-size: 1.8rem; color: #fff; }
.lookup p { margin: 0; }
.lookup a { color: var(--glow); }
.lookup a:hover { color: var(--glow-core); }
.lookup .search { margin: 0; }

.crumbs { padding-top: 1.25rem; font-size: .9rem; }
.crumbs ol { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin: 0 .5rem; color: #9aa6c2; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--stamp); }

/* Sections on card, set and list pages. */
.block { margin-top: clamp(2.5rem, 6vw, 4rem); }
.block h2,
.listpage h1,
.cardview h1,
.appcta h2 {
  font-family: var(--slab);
  font-weight: 400;
  line-height: 1.1;
  color: var(--sea);
  margin: 0;
}
.block h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: .5rem; }
.block__note { max-width: 62ch; margin: 0 0 1.25rem; color: var(--muted); }
.block__more { margin: 1.25rem 0 0; font-weight: 600; }

.listpage { padding-bottom: clamp(3.5rem, 8vw, 6rem); }
.listpage__head { padding-top: clamp(1.5rem, 4vw, 2.5rem); }
.listpage h1 { font-size: clamp(2.1rem, 4.5vw, 3rem); }
.lede-dark { max-width: 60ch; margin: .75rem 0 0; font-size: 1.1rem; color: var(--muted); }

/* Card tiles. */
.cardgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 1.5rem 1.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cardgrid a {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: var(--text);
  text-decoration: none;
}
.cardgrid img {
  display: block;
  width: 100%;
  aspect-ratio: 245 / 342;
  margin-bottom: .55rem;
  border-radius: 4.5% / 3.2%;
  background: #dfe5f0;
  box-shadow: 0 .2rem .5rem rgba(0, 10, 40, .2);
  transition: transform .15s ease;
}
.cardgrid a:hover img { transform: translateY(-3px); }
.cardgrid a:hover .cardgrid__name { color: var(--stamp); }
.cardgrid li { min-width: 0; }
.cardgrid__name { font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.cardgrid__meta { font-size: .8rem; line-height: 1.35; color: var(--muted); }
.cardgrid__price { margin-top: auto; padding-top: .25rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.cardgrid__price .muted { font-size: .85rem; }

/* ---------- Card page ---------- */

.cardview { padding-bottom: clamp(3.5rem, 8vw, 6rem); }

.cardview__top {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 2rem clamp(2rem, 5vw, 4rem);
  align-items: start;
  padding-top: clamp(1.25rem, 3vw, 2rem);
}

.cardview__image { margin: 0; }
.cardview__image img {
  display: block;
  width: 100%;
  max-width: 26rem;
  aspect-ratio: 640 / 894;
  margin: 0 auto;
  border-radius: 4.5% / 3.2%;
  background: #dfe5f0;
  box-shadow: 0 0 0 1px rgba(0, 10, 40, .08), 0 1rem 2.5rem rgba(0, 10, 40, .28);
}

.cardview h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
.cardview__sub { display: block; margin-top: .3rem; font-family: var(--sans); font-weight: 700; font-size: 1.15rem; color: var(--text); }

.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.chips li {
  padding: .15rem .65rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #fff;
  font-size: .85rem;
  font-weight: 600;
}

/* The price, on parchment like the scanner result in the app. */
.pricebox {
  margin: 1.5rem 0 0;
  padding: 1.1rem 1.4rem 1.25rem;
  border: 1px solid var(--paper-edge);
  border-radius: .9rem;
  background: var(--paper);
  color: var(--ink);
}
.pricebox__label { margin: 0; font-family: var(--sans); font-size: .85rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #5b4a37; }
.pricebox__value {
  margin: .2rem 0 0;
  font-family: var(--slab);
  font-size: clamp(2.6rem, 6vw, 3.4rem);
  line-height: 1;
  color: var(--stamp);
}
.pricebox__meta { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin: .6rem 0 0; font-size: .9rem; color: #5b4a37; }
.pricebox__range,
.pricebox__none { margin: .6rem 0 0; font-size: .95rem; }
.pricebox .pricetable { margin-top: .9rem; }
.pricebox .pricetable th, .pricebox .pricetable td { border-color: var(--paper-edge); }

.trend { padding: 0 .5rem; border-radius: 1rem; font-weight: 700; }
.trend--up { background: var(--up-bg); color: var(--up); }
.trend--down { background: var(--down-bg); color: var(--down); }

.pricetable { width: 100%; border-collapse: collapse; font-size: .95rem; }
.pricetable caption { padding-bottom: .3rem; text-align: left; font-weight: 800; font-size: 1.05rem; }
.pricetable th, .pricetable td { padding: .45rem .5rem .45rem 0; border-bottom: 1px solid var(--line); text-align: left; }
.pricetable thead th { font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.pricetable tbody th { font-weight: 600; }
.pricetable td { font-variant-numeric: tabular-nums; }
.pricetable td:nth-child(2) { font-weight: 700; }

.cardview__intro { margin: 1.5rem 0 0; max-width: 60ch; }

.buylinks { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.25rem 0 0; padding: 0; list-style: none; }
.buylinks a {
  display: inline-block;
  padding: .5rem 1rem;
  border: 2px solid var(--sea);
  border-radius: .6rem;
  font-weight: 700;
  text-decoration: none;
}
.buylinks a:hover { border-color: var(--stamp); }

.graded {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 1.5rem 2.5rem;
  align-items: start;
}

.sales { width: 100%; border-collapse: collapse; font-size: .95rem; }
.sales th, .sales td { padding: .55rem .75rem .55rem 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.sales thead th { font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.sales__date { white-space: nowrap; color: var(--muted); }
.sales__title a { color: var(--text); }
.sales__price { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right !important; white-space: nowrap; }

.details {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  gap: 0 2rem;
  margin: 0;
}
.details > div { padding: .6rem 0; border-bottom: 1px solid var(--line); }
.details dt { font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.details dd { margin: .1rem 0 0; font-weight: 600; }

.effect { max-width: 62ch; margin-top: 1.5rem; padding: 1rem 1.25rem; border-left: 4px solid var(--sea); background: #fff; }
.effect h3 { margin: 0 0 .4rem; font-size: 1rem; }
.effect p { margin: 0 0 .5rem; }
.effect p:last-child { margin-bottom: 0; }

.appcta {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin-top: clamp(3rem, 7vw, 4.5rem);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  border-radius: 1rem;
  background: var(--sea);
  color: #d9e2f5;
}
.appcta h2 { font-size: clamp(1.5rem, 3vw, 2rem); color: #fff; }
.appcta p { max-width: 50ch; margin: .5rem 0 1.25rem; }
.appcta__icon { width: 72px; height: 72px; flex: none; }

/* ---------- Sets ---------- */

.setgroup { margin-top: clamp(2.5rem, 6vw, 3.5rem); }
.setgroup h2 { margin: 0 0 1rem; font-size: 1.4rem; font-weight: 800; }

.setlist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.setlist a {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: .8rem;
  background: #fff;
  color: var(--text);
  text-decoration: none;
}
.setlist a:hover { border-color: var(--sea); }
.setlist a:hover .setlist__name { color: var(--stamp); }
.setlist img { width: 100%; height: 4.5rem; margin-bottom: .75rem; object-fit: contain; }
.setlist__code {
  display: grid;
  place-items: center;
  height: 4.5rem;
  margin-bottom: .75rem;
  border-radius: .5rem;
  background: var(--sea);
  color: var(--glow);
  font-family: var(--slab);
  font-size: 1.5rem;
}
.setlist__name { font-weight: 700; line-height: 1.3; }
.setlist__meta { margin-top: auto; padding-top: .3rem; font-size: .85rem; color: var(--muted); }

.setpage__head { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; }
.setpage__logo { width: auto; max-width: 15rem; max-height: 6rem; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 1rem;
  margin: 2rem 0 0;
}
.stats > div { padding: 1rem 1.2rem; border-radius: .8rem; background: var(--paper); color: var(--ink); }
.stats dt { font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #5b4a37; }
.stats dd { margin: .2rem 0 0; font-family: var(--slab); font-size: 1.7rem; line-height: 1.1; }

.faq details { max-width: 62ch; border-bottom: 1px solid var(--line); }
.faq summary { padding: .9rem 0; font-weight: 700; cursor: pointer; }
.faq summary:hover { color: var(--stamp); }
.faq details p { margin: 0 0 1rem; }

.setnav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding-top: 1.5rem;
  border-top: 2px solid var(--line);
  font-weight: 700;
}
.setnav a span { display: block; font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.setnav__all { align-self: flex-end; }
.setnav__next { margin-left: auto; text-align: right; }

/* ---------- Card value page ---------- */

.ranked { margin: 0; padding: 0; list-style: none; max-width: 48rem; }
.ranked li {
  display: grid;
  grid-template-columns: 2rem 2.8rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: .7rem 0;
  border-top: 1px solid var(--line);
}
.ranked__pos { font-family: var(--slab); font-size: 1.2rem; color: var(--muted); text-align: right; }
.ranked img { display: block; width: 2.8rem; border-radius: 3px; box-shadow: 0 .1rem .3rem rgba(0, 10, 40, .25); }
.ranked__card { display: flex; flex-direction: column; min-width: 0; }
.ranked__name { font-weight: 700; line-height: 1.3; color: var(--text); overflow-wrap: anywhere; }
.ranked__meta { font-size: .85rem; color: var(--muted); }
.ranked__price { font-weight: 800; font-variant-numeric: tabular-nums; }

.movers--plain { padding: 0; border: 0; background: none; }
.movers a.mover__name { color: var(--text); text-decoration: none; }
.movers a.mover__name:hover { color: var(--stamp); text-decoration: underline; }

.steps { max-width: 62ch; padding-left: 1.3rem; }
.steps li { margin-bottom: .8rem; }
.prose p { max-width: 62ch; }

/* ---------- Characters, top lists ---------- */

.subhead { margin: 2rem 0 .8rem; font-size: 1.1rem; }
.subhead a { color: var(--text); }
.subhead a:hover { color: var(--stamp); }
.subhead .muted { font-weight: 500; font-size: .9rem; }

.namelist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  gap: .35rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.namelist a { font-weight: 600; color: var(--text); }
.namelist a:hover { color: var(--stamp); }
.namelist .muted { font-size: .85rem; }

.letters { display: flex; flex-wrap: wrap; gap: .35rem; margin: 1rem 0 0; }
.letters a {
  min-width: 2rem;
  padding: .25rem .5rem;
  border-radius: .4rem;
  background: #fff;
  border: 1px solid var(--line);
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  color: var(--sea);
}
.letters a:hover { border-color: var(--sea); }

.toplist { width: 100%; max-width: 52rem; border-collapse: collapse; }
.toplist th, .toplist td { padding: .55rem .6rem .55rem 0; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
.toplist thead th { border-top: 0; font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.toplist a { color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.toplist a:hover { color: var(--stamp); }
.toplist .muted { font-size: .85rem; }
.toplist__price { font-weight: 800; font-variant-numeric: tabular-nums; text-align: right !important; white-space: nowrap; }
.toplist thead th:last-child { text-align: right; }

.stats dd.stats__small { font-size: 1.3rem; }

/* ---------- Price history chart (inline SVG, inc/charts.php) ---------- */

.chart { margin: 0; max-width: 46rem; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart__grid { stroke: var(--line); stroke-width: 1; }
.chart__label { fill: var(--muted); font-family: var(--sans); font-size: 12px; }
.chart__line { fill: none; stroke: var(--sea); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart__last { fill: var(--sea); stroke: #fff; stroke-width: 2; }
.chart__sale { fill: var(--glow); fill-opacity: .85; stroke: #9a6a00; stroke-width: 1; }
.chart__legend { display: flex; flex-wrap: wrap; gap: 1.2rem; margin: .6rem 0 0; padding: 0; list-style: none; font-size: .85rem; color: var(--muted); }
.chart__key::before { content: ""; display: inline-block; margin-right: .4rem; vertical-align: middle; }
.chart__key--line::before { width: 1.2rem; height: 3px; border-radius: 2px; background: var(--sea); }
.chart__key--sale::before { width: .6rem; height: .6rem; border-radius: 50%; background: var(--glow); border: 1px solid #9a6a00; }
.chart figcaption { margin-top: .6rem; max-width: 62ch; font-size: .92rem; color: var(--muted); }
/* The SVG scales with its width; on a phone (about half size) text and marks are drawn bigger to stay readable. */
@media (max-width: 36rem) {
  .chart__label { font-size: 21px; }
  .chart__line { stroke-width: 4; }
  .chart__sale { r: 6px; }
  .chart__last { r: 8px; }
}

/* Four header links don't fit next to the wordmark on a phone: they get their own row. */
@media (max-width: 34rem) {
  .top__inner { flex-wrap: wrap; row-gap: 0; padding-top: .35rem; padding-bottom: .5rem; }
  .top nav { width: 100%; justify-content: space-between; }
}

/* ---------- Small screens ---------- */

@media (max-width: 52rem) {
  .hero__inner,
  .features__inner { grid-template-columns: minmax(0, 1fr); }
  .features h2 { position: static; }
  .phone { width: min(100%, 16.5rem); }
  .movers__lists { grid-template-columns: minmax(0, 1fr); }
  .lookup__inner { grid-template-columns: minmax(0, 1fr); }
  .cardview__top { grid-template-columns: minmax(0, 1fr); }
  .cardview__image img { max-width: 14rem; }
}

@media (max-width: 36rem) {
  .cardgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sales__date { font-size: .85rem; }
  .appcta { flex-direction: column; }
  .search button { padding: .7rem .9rem; }
}

/* Narrow phones: the change goes under the price. */
@media (max-width: 30rem) {
  .movers li { grid-template-columns: 2.4rem minmax(0, 1fr) auto; column-gap: .8rem; row-gap: .2rem; }
  .movers li img { width: 2.4rem; grid-row: span 2; }
  .mover__card { grid-row: span 2; }
  .mover__price { grid-column: 3; }
  .movers li .mover__change { grid-column: 3; min-width: 0; padding: 0; background: none; font-size: .85rem; text-align: right; }
}

@media (max-width: 26rem) {
  .top nav { gap: .8rem; }
  .top nav a { font-size: .9rem; }
  .wordmark .app-icon { width: 30px; height: 30px; }
  .wordmark { font-size: 1.15rem; }
  .badges img { height: 44px; }
}
