/* The market frame: the card page as one composed view.
   An answer first -- what this card is worth in this grade -- then its working:
   the line, then the ledger of actual sales. No panels; whitespace and hairlines
   do the separating. The answer is gold; the line is green. */

:root {
  --chart-money: #e9be4f;
  --chart-lift: #f7dc8e;
  /* MAZIFIED has one colour on the site: the gold of the tile badge, the sale-list mark and the
     receipt (beta/heritage.css), in the site's gold-text shade for each theme. */
  --chart-mazified: #e9be4f;
  --chart-line: #35e88c;      /* the line is green: it reads as money */
  --chart-line-lift: #a8f7ca;
}
html[data-theme="light"] {
  --chart-money: #a27b12;
  --chart-lift: #c8961d;
  --chart-mazified: #866005;
  --chart-line: #187343;
  --chart-line-lift: #23995a;
}

/* ── Layout ───────────────────────────────────────────────────────────────── */
.card-overview.mk {
  display: grid;
  grid-template-columns: minmax(230px, 330px) minmax(0, 1fr);
  /* The answer beside the card -- price, the grade that sets it, then Add --
     and the market it rests on full width below: the line, then its ledger. */
  grid-template-areas:
    "scan     scan"
    "specimen title"
    "specimen readout"
    "specimen grades"
    "specimen actions"
    "chart    chart"
    "ledger   ledger"
    "check    check"
    "details  details";
  grid-template-rows: auto auto auto auto 1fr;
  column-gap: clamp(28px, 4.5vw, 60px);
  row-gap: 0; /* the old .card-overview sets gap: 55px, which spaced every row */
  align-items: start;
  margin-top: 8px;
}
.mk-title { grid-area: title; }
/* After a scan, "Did we find the correct card?" is prepended here by
   beta/scan-feedback.mjs. Without an area of its own, auto-placement dropped it
   into the first empty cell -- a 140px column on a phone. An empty row is 0px. */
.card-overview.mk > .scan-feedback-panel { grid-area: scan; margin-bottom: 26px; }
.mk-specimen { grid-area: specimen; min-width: 0; }
.mk-readout { grid-area: readout; }
.mk-actions { grid-area: actions; }
.mk-grades { grid-area: grades; }
.mk-chart { grid-area: chart; }
.mk-details { grid-area: details; }
.mk-ledger { grid-area: ledger; }
.mk-check { grid-area: check; }

/* ── Identity ─────────────────────────────────────────────────────────────── */
.mk-title { padding-top: 6px; }
.mk-title h1 {
  font: 600 clamp(42px, 5.4vw, 66px) / .9 var(--display);
  letter-spacing: .004em;
  margin: 10px 0 6px;
}
.mk-title p { margin: 0; color: var(--muted); font-size: 15px; }
.mk-title .text-button { margin-left: 10px; font-size: 11px; color: var(--faint); }
.mk-specimen .specimen-note { margin: 12px 2px 0; font-size: 11px; line-height: 1.55; color: var(--faint); }

/* ── The card ─────────────────────────────────────────────────────────────
   The card itself is the object, not a picture inside a frame. The archive
   holds one size, 164x240, so the face stops at a width where the upscale stays
   modest; bigger sources would let it grow. */
.mk-card {
  position: relative; isolation: isolate; overflow: hidden;
  width: min(100%, 256px); aspect-ratio: 5 / 7; margin: 0 auto;
  border-radius: 13px; background: #0d1210;
  box-shadow: 0 34px 60px -22px #000d, 0 0 0 1px color-mix(in srgb, var(--chart-money) 34%, transparent);
  transition: transform .14s cubic-bezier(.2, .8, .2, 1), box-shadow .25s;
  will-change: transform;
}
.mk-card:hover { box-shadow: 0 40px 70px -22px #000e, 0 0 0 1px color-mix(in srgb, var(--chart-money) 60%, transparent), 0 0 46px color-mix(in srgb, var(--chart-money) 16%, transparent); }
.mk-card-face, .mk-card-face > img, .mk-card-face > .no-art { display: block; width: 100%; height: 100%; }
.mk-card-face > img { object-fit: cover; }
.mk-card.portrait .mk-card-face > img { object-position: center 22%; }
.mk-card .art-note {
  position: absolute; left: 10px; bottom: 10px; z-index: 5; padding: 4px 7px; border-radius: 5px;
  font: 500 8.5px var(--mono); letter-spacing: .14em; color: var(--text); background: #000a;
}
.mk-card:hover .card-holo, .mk-card:focus-within .card-holo { opacity: .3; }
.mk-card:hover .card-glare, .mk-card:focus-within .card-glare { opacity: 1; }
/* One light pass as the page opens: the card arrives, it doesn't loop. */
.mk-card::after {
  content: ""; position: absolute; inset: -10%; z-index: 4; pointer-events: none;
  background: linear-gradient(105deg, transparent 38%, #fff6da3d 50%, transparent 62%);
  transform: translateX(-120%); animation: mk-sheen 1.5s .45s cubic-bezier(.2, .8, .2, 1) forwards;
}
@keyframes mk-sheen { to { transform: translateX(120%); } }
.mk-card-caption {
  display: flex; justify-content: space-between; gap: 10px;
  width: min(100%, 256px); margin: 14px auto 0;
  font: 500 9px var(--mono); letter-spacing: .16em; color: var(--faint);
}
.mk-card-caption span:last-child { color: var(--chart-money); }
.mk-card-caption .is-mazified { color: var(--chart-mazified) !important; display: inline-flex; align-items: center; gap: 4px; }
.mk-card-caption svg { width: 11px; height: 11px; }
.mk-specimen .specimen-note { width: min(100%, 256px); margin-left: auto; margin-right: auto; }

/* ── The number ───────────────────────────────────────────────────────────── */
.mk-readout { display: grid; justify-items: start; gap: 8px; padding: 26px 0 22px; }
.mk-label, .mk-eyebrow {
  font: 500 10.5px / 1.3 var(--mono);
  letter-spacing: .2em;
  color: var(--faint);
  text-transform: uppercase;
}
.mk-label b { color: var(--chart-money); font-weight: 500; margin-left: 4px; }
.mk-number {
  font: 600 clamp(64px, 7.6vw, 96px) / .86 var(--display);
  color: var(--chart-money);
  letter-spacing: .005em;
  text-shadow: 0 0 44px color-mix(in srgb, var(--chart-money) 24%, transparent);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}
.mk-range { font: 500 11.5px / 1.4 var(--mono); letter-spacing: .14em; color: var(--faint); text-transform: uppercase; }
.mk-range b { color: var(--chart-money); font-weight: 500; letter-spacing: .04em; margin-left: 6px; }
.mk-range.is-note { text-transform: none; letter-spacing: .02em; color: var(--muted); max-width: 42ch; }
.mk-stats { display: flex; flex-wrap: wrap; gap: 10px 34px; margin: 14px 0 0; }
.mk-stats dt { font: 500 9.5px var(--mono); letter-spacing: .2em; color: var(--faint); }
.mk-stats dd { margin: 5px 0 0; font: 500 15px var(--mono); color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.mk-method { margin-top: 6px; }
.mk-method summary {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none;
  font: 500 10.5px var(--mono); letter-spacing: .12em; color: var(--faint); text-transform: uppercase;
}
.mk-method summary::-webkit-details-marker { display: none; }
.mk-method summary svg { width: 13px; height: 13px; }
.mk-method p { max-width: 58ch; margin: 10px 0 0; font-size: 12px; line-height: 1.65; color: var(--muted); }
.mk-readout.is-pending .mk-number {
  width: 3.2ch; border-radius: 8px;
  background: linear-gradient(90deg, var(--line-soft), var(--line), var(--line-soft));
  background-size: 200% 100%; animation: mk-shimmer 1.4s linear infinite;
}
@keyframes mk-shimmer { to { background-position: -200% 0; } }

/* ── Actions + grades ─────────────────────────────────────────────────────── */
.mk-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 22px; }
.mk-actions .identity-details { margin: 0; }
.mk-actions .identity-details summary { font-size: 12px; color: var(--muted); }
.mk-grades { min-width: 0; margin-top: 26px; }
.mk-grades .grade-options {
  position: relative;
  display: flex; flex-wrap: nowrap; gap: 6px;
  overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
  margin: 10px 0 0; padding: 0 44px 2px 0;
  -webkit-mask-image: linear-gradient(90deg, #000 86%, transparent);
  mask-image: linear-gradient(90deg, #000 86%, transparent);
}
.mk-grades .grade-options::-webkit-scrollbar { display: none; }
.mk-grades .grade-button {
  flex: none; scroll-snap-align: start;
  display: inline-flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px;
  min-height: 46px; min-width: 64px; padding: 7px 13px; border-radius: 12px;
  font: 600 12.5px/1.1 var(--body); white-space: nowrap; text-align: left;
}
.mk-grades .grade-button small { font: 500 10.5px/1.1 var(--mono); color: var(--faint); letter-spacing: .02em; }
.mk-grades .grade-button.is-priced small { color: var(--muted); }
.mk-grades .grade-button.active {
  color: var(--chart-money);
  border-color: color-mix(in srgb, var(--chart-money) 62%, transparent);
  background: color-mix(in srgb, var(--chart-money) 11%, transparent);
}
.mk-grades .grade-button.active small { color: inherit; opacity: .75; }

/* ── The line ─────────────────────────────────────────────────────────────── */
.mk-chart { margin-top: 44px; padding-top: 26px; border-top: 1px solid var(--line-soft); min-width: 0; }
.mk-chart-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mk-chart .segmented { background: none; border: 0; padding: 0; gap: 2px; box-shadow: none; }
.mk-chart .segmented button {
  min-height: 30px; padding: 5px 9px; border-radius: 999px; border: 0; background: none; box-shadow: none;
  font: 500 10.5px var(--mono); letter-spacing: .08em; color: var(--faint);
}
.mk-chart .segmented button.active { color: var(--chart-money); background: color-mix(in srgb, var(--chart-money) 12%, transparent); }
/* A range tab that would repeat ALL, or show nothing: still in its place, so
   the row never jumps, but plainly off. The reason is on the tab and in the
   history-start line below. The label is dimmed, not the button: it stays
   focusable, and opacity would fade the gold focus ring with it. */
.mk-chart .segmented button[aria-disabled="true"] { color: color-mix(in srgb, var(--faint) 40%, transparent); cursor: not-allowed; }
.mk-chart .segmented button.is-empty[aria-disabled="true"] { text-decoration: line-through; text-decoration-thickness: 1px; }
.mk-history-start { margin: 8px 0 0; max-width: 72ch; color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.mk-history-older { display: flex; flex-wrap: wrap; align-items: center; gap: 0 16px; margin: 2px 0 0; }
.mk-history-older .text-link { min-height: 32px; padding: 2px 0; font-size: 12.5px; }
.mk-chart #history-status:empty { display: none; }
.mk-coverage { margin: 6px 0 0; font: 500 10px / 1.6 var(--mono); letter-spacing: .08em; color: var(--faint); }

.mk-line .history-chart {
  display: block; width: 100%; height: auto; overflow: visible;
  touch-action: pan-y; cursor: crosshair; user-select: none; -webkit-user-select: none;
}
.mk-line .history-chart .chart-grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 6; opacity: .75; }
.mk-line .history-chart .chart-tick,
.mk-line .history-chart .chart-date { font: 500 10px var(--mono); letter-spacing: .03em; fill: var(--faint); }
.mk-line .history-chart .chart-band rect { fill: var(--chart-line); fill-opacity: .075; }
.mk-line .history-chart .chart-band path { fill: none; stroke: var(--chart-line); stroke-opacity: .38; stroke-dasharray: 4 5; }
.mk-line .history-chart .chart-band text {
  font: 500 9.5px var(--mono); letter-spacing: .14em; fill: var(--chart-line); fill-opacity: .9;
  paint-order: stroke; stroke: var(--bg); stroke-width: 4px; stroke-linejoin: round; /* legible where the line crosses */
}
.mk-line .history-chart .chart-line {
  fill: none; stroke: url(#mk-stroke); stroke-width: 2.25;
  stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--chart-line) 50%, transparent));
}
/* A bridge joins two points more than 90 days apart (beta/chart.mjs): the same
   green as a row of round dots (the spacing is set per bridge), so the line
   stays whole and the empty stretch reads as empty. Dots, not dashes, so it
   cannot be mistaken for the band's dashed edges. Hover never stops on it: the
   scrub only lands on points. */
.mk-line .history-chart .chart-bridge {
  fill: none; stroke-width: 2.25; stroke-opacity: .72; stroke-linecap: round;
  pointer-events: none; animation: chart-reveal 1.1s var(--ease-out);
}
.mk-line .history-chart .chart-crosshair { stroke: var(--chart-line); stroke-opacity: .32; stroke-dasharray: 2 4; }
.mk-line .history-chart .point-hit { fill: transparent; stroke: none; }
.mk-line .history-chart .point-dot { fill: var(--chart-line); stroke: none; opacity: 0; transition: opacity .15s; }
.mk-line .history-chart .chart-point.is-alone .point-dot { opacity: .9; }
.mk-line .history-chart .chart-point.is-sale .point-dot { opacity: .42; }
.mk-line .history-chart .chart-point.is-mazified .point-dot { fill: var(--chart-mazified); opacity: 1; }
.mk-line .history-chart .chart-point:focus-visible .point-hit { stroke: var(--chart-line); stroke-width: 1.5; }
.mk-line .history-chart .chart-marker { pointer-events: none; transition: transform .14s cubic-bezier(.2, .8, .2, 1); }
.mk-line .history-chart .marker-dot { fill: var(--chart-line-lift); stroke: var(--bg); stroke-width: 2; }
.mk-line .history-chart .marker-ring { fill: none; stroke: var(--chart-line); stroke-opacity: .5; }
.mk-line .history-chart .marker-pulse { fill: var(--chart-line); fill-opacity: 0; transform-box: fill-box; transform-origin: center; }
.mk-line .history-chart .chart-marker.is-latest .marker-pulse { animation: mk-pulse 2.4s ease-out infinite; }
@keyframes mk-pulse { 0% { fill-opacity: .26; transform: scale(.55); } 100% { fill-opacity: 0; transform: scale(1.9); } }
.mk-line .chart-method { margin-top: 6px; }
.mk-line .chart-method summary {
  cursor: pointer; list-style: none;
  font: 500 10px var(--mono); letter-spacing: .12em; color: var(--faint); text-transform: uppercase;
}
.mk-line .chart-method summary::-webkit-details-marker { display: none; }
.mk-line .chart-method p { margin: 8px 0 0; font-size: 11.5px; line-height: 1.6; color: var(--muted); max-width: 70ch; }

/* ── The ledger ───────────────────────────────────────────────────────────── */
.mk-ledger { margin-top: 40px; min-width: 0; }
.mk-ledger-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.mk-ledger-head b { color: var(--text); font-weight: 500; margin-left: 6px; letter-spacing: .04em; }
.mk-ledger select {
  font: 500 11px var(--mono); color: var(--muted);
  background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px;
}
.mk-rows { display: grid; }
.mk-row {
  appearance: none; width: 100%; margin: 0; background: none; color: inherit; cursor: pointer; text-align: left;
  display: grid; grid-template-columns: minmax(4.6em, auto) 4.8em minmax(0, 1fr) auto; align-items: baseline;
  gap: 14px; padding: 12px 4px; border: 0; border-bottom: 1px solid var(--line-soft);
  font: 500 12px var(--mono); letter-spacing: .02em;
}
.mk-row:hover, .mk-row:focus-visible { background: color-mix(in srgb, var(--chart-money) 6%, transparent); outline: none; }
.mk-date { color: var(--muted); white-space: nowrap; }
.mk-grade { color: var(--faint); white-space: nowrap; }
.mk-source {
  display: inline-flex; align-items: center; gap: 5px; min-width: 0;
  color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mk-source svg { width: 12px; height: 12px; flex: none; }
.mk-source.is-mazified { color: var(--chart-mazified); letter-spacing: .1em; }
/* The venue after the MAZIFIED mark ("MAZIFIED · Whatnot"), in the ledger's quieter body type. The
   pill's 5px gap sits before the dot; the space written before it collapses, so none is added here. */
.mk-source .mk-venue { font: 500 12px var(--body); letter-spacing: 0; color: var(--muted); }
.mk-price { font: 500 13.5px var(--mono); color: var(--text); text-align: right; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.mk-show-all {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; padding: 0;
  background: none; border: 0; cursor: pointer;
  font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--chart-money);
}
.mk-show-all svg { width: 13px; height: 13px; }
.mk-ledger .footnote { margin-top: 16px; }
.mk-check { margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--line-soft); }

/* ── Phone: the answer beside the card, on the first screen ───────────────── */
@media (max-width: 760px) {
  .card-overview.mk {
    grid-template-columns: minmax(0, 40%) minmax(0, 1fr);
    grid-template-areas:
      "scan     scan"
      "title    title"
      "specimen readout"
      "grades   grades"
      "actions  actions"
      "chart    chart"
      "ledger   ledger"
      "check    check";
    grid-template-rows: none;
    column-gap: 16px;
  }
  .mk-title { padding: 0 0 16px; }
  .mk-title h1 { font-size: 42px; margin-top: 8px; }
  .mk-title p { font-size: 13px; }
  .mk-specimen .specimen-note { display: none; }
  .mk-card { border-radius: 9px; }
  .mk-card-caption { margin-top: 9px; font-size: 7.5px; letter-spacing: .1em; flex-direction: column; gap: 3px; }
  .mk-readout { padding: 2px 0 0; gap: 6px; align-self: center; }
  .mk-label, .mk-eyebrow { font-size: 9.5px; letter-spacing: .16em; }
  .mk-number { font-size: clamp(46px, 13.5vw, 64px); }
  .mk-range { font-size: 10px; letter-spacing: .1em; }
  .mk-range b { display: block; margin: 4px 0 0; font-size: 12.5px; }
  .mk-stats { gap: 10px 18px; margin-top: 8px; }
  .mk-stats dd { font-size: 13px; }
  .mk-method { display: none; }
  .mk-actions { margin-top: 20px; }
  .mk-actions .button { flex: 1 1 auto; }
  .mk-actions .identity-details { flex: 1 1 100%; }
  .mk-grades { margin-top: 22px; }
  .mk-chart { margin-top: 32px; padding-top: 20px; }
  .mk-history-older .text-link { min-height: 44px; }
  .mk-row { gap: 10px; padding: 12px 2px; font-size: 11.5px; grid-template-columns: auto 4.2em minmax(0, 1fr) auto; }
  .mk-price { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .mk-card { transition: none; }
  .mk-card::after { animation: none; display: none; }
  .mk-line .history-chart .chart-marker { transition: none; }
  .mk-line .history-chart .chart-line,
  .mk-line .history-chart .chart-bridge,
  .mk-line .history-chart .chart-area,
  .mk-line .history-chart .marker-pulse,
  .mk-readout.is-pending .mk-number { animation: none !important; }
}
.mk-stats dd small { font-size: 11px; color: var(--faint); margin-left: 4px; letter-spacing: .04em; }
/* Desktop: the card shares the page's left edge with the breadcrumb and chart. */
@media (min-width: 761px) {
  .mk-card, .mk-card-caption, .mk-specimen .specimen-note { margin-left: 0; margin-right: 0; }
}

/* ── Grades: ladder, fan-out, sold-out ────────────────────────────────────── */
.mk-grades-head { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; }
/* Sold on: a real segmented control. The unselected options sit on a filled
   track so they read as buttons; the selected one is solid gold. A card can show
   up to eight chips (All, Whatnot -- the MAZIFIED source --, eBay, Fanatics Collect,
   Goldin, Auction houses, Private sales, Other marketplaces), so the track may wrap: its 23px
   corners are a pill around one row of 38px chips and a rounded panel around two,
   and a label never breaks inside its chip. */
.mk-sold-on { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.mk-sources {
  display: inline-flex; flex-wrap: wrap; gap: 3px; padding: 3px;
  border: 1px solid var(--line); border-radius: 23px; background: var(--panel-2);
}
.mk-sources button {
  min-height: 34px; padding: 6px 16px; border: 0; border-radius: 999px; cursor: pointer; white-space: nowrap;
  background: transparent; color: var(--text); opacity: .82;
  font: 600 12.5px var(--body); letter-spacing: .01em;
  transition: background .15s, color .15s, opacity .15s;
}
.mk-sources button:hover { opacity: 1; background: color-mix(in srgb, var(--text) 8%, transparent); }
.mk-sources button.active { opacity: 1; background: var(--chart-money); color: #16120a; }
/* Whatnot, the MAZIFIED source, carries the MAZIFIED shield. */
.mk-sources button svg { width: 12px; height: 12px; margin-right: 5px; vertical-align: -1px; }
/* Sold out: still in its place on the ladder, so nothing jumps, but plainly off. */
.mk-grades .grade-button.is-empty {
  opacity: .36; cursor: not-allowed; box-shadow: none;
  background-image: linear-gradient(to top right, transparent calc(50% - .6px), color-mix(in srgb, var(--faint) 80%, transparent) 50%, transparent calc(50% + .6px));
}
.mk-grades .grade-button.is-empty.active { opacity: .7; cursor: default; }
/* The fan-out toggle: a clear pill, and it never moves between states. */
.mk-grade-more {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 6px 14px;
  border: 1px solid color-mix(in srgb, var(--chart-money) 50%, transparent); border-radius: 999px; cursor: pointer;
  background: color-mix(in srgb, var(--chart-money) 9%, transparent); color: var(--chart-money);
  font: 600 12.5px var(--body); transition: background .15s;
  min-width: 136px; justify-content: center; /* same size open or closed: the pill must not move */
}
.mk-grade-more:hover { background: color-mix(in srgb, var(--chart-money) 17%, transparent); }
.mk-grade-more svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.mk-grade-more.is-open svg { transform: rotate(180deg); }
.mk-grades .mk-grade-strip, .mk-grade-all { margin-top: 12px; }
.mk-grade-all { display: grid; }
.mk-grader-row {
  display: grid; grid-template-columns: 46px minmax(0, 1fr); align-items: start; gap: 12px;
  padding: 10px 0; border-top: 1px solid var(--line-soft);
}
.mk-grader-row:first-child { border-top: 0; padding-top: 2px; }
.mk-grader { padding-top: 15px; font: 500 10px var(--mono); letter-spacing: .16em; color: var(--faint); }
.mk-grader-grades { display: flex; flex-wrap: wrap; gap: 6px; }
.mk-grade-all .grade-button { min-width: 58px; animation: mk-fan .34s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i) * 11ms); }
@keyframes mk-fan { from { opacity: 0; transform: translateY(-8px) scale(.94); } }
.mk-scope { font-style: normal; margin-left: 8px; padding: 2px 6px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); letter-spacing: .12em; font-size: 9px; }
.mk-elsewhere { margin: 8px 0 4px; color: var(--muted); font-size: 13px; }
.mk-elsewhere .text-link { font-size: 13px; }
@media (max-width: 760px) {
  .mk-grader-row { grid-template-columns: 38px minmax(0, 1fr); gap: 8px; }
  .mk-grades .grade-button { min-height: 44px; padding: 6px 11px; }
}
@media (prefers-reduced-motion: reduce) { .mk-grade-all .grade-button { animation: none; } }

/* ── Hierarchy pass (2026-09-26) ──────────────────────────────────────────
   Price first, the grade that sets it, then Add; the market full width below,
   with Sold on and the time window on top of the line and the ledger under
   it. Fewer labels: plain headings in the body face, mono for small data. */

/* The card and its status */
.mk-card { width: min(100%, 288px); }
.mk-card-caption { width: min(100%, 288px); justify-content: flex-start; margin-top: 16px; }
.mk-card-caption span {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px;
  border: 1px solid color-mix(in srgb, var(--chart-money) 35%, transparent); border-radius: 999px;
  font: 600 10px/1 var(--mono); letter-spacing: .1em; color: var(--chart-money);
}
.mk-card-caption .is-mazified { border-color: color-mix(in srgb, var(--chart-mazified) 45%, transparent); }
.mk-specimen .specimen-note { width: min(100%, 288px); margin-top: 10px; font-size: 12.5px; }

/* The answer */
.mk-readout { gap: 10px; padding: 30px 0 0; }
.mk-label {
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px;
  font: 500 16px / 1.3 var(--body); letter-spacing: 0; text-transform: none; color: var(--muted);
}
.mk-label b {
  margin: 0; padding: 4px 9px; border-radius: 999px;
  background: color-mix(in srgb, var(--chart-money) 12%, transparent);
  font: 600 12px / 1 var(--mono); letter-spacing: .06em; color: var(--chart-money);
}
.mk-label .mk-scope { margin-left: 0; font: 500 11px / 1 var(--mono); padding: 4px 7px; }
.mk-number { font-size: clamp(84px, 9vw, 124px); margin-top: 4px; }
.mk-range { font: 500 19px / 1.3 var(--body); letter-spacing: 0; text-transform: none; color: var(--text); }
.mk-range b { margin-left: 6px; font-weight: 600; letter-spacing: 0; color: var(--text); }
.mk-range.is-note { font-size: 15px; color: var(--muted); max-width: 48ch; }
.mk-evidence { margin: 0; max-width: 56ch; font-size: 16px; line-height: 1.55; color: var(--muted); }
.mk-readout .mk-stats { display: none; }
.mk-notes { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin-top: 4px; }
.mk-stale-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px;
  border: 1px solid color-mix(in srgb, var(--chart-money) 24%, var(--line)); border-radius: 999px;
  font-size: 13px; color: color-mix(in srgb, var(--chart-money) 62%, var(--text));
}
.mk-stale-chip svg { width: 14px; height: 14px; }
.mk-notes .mk-method { margin: 0; }
.mk-method summary { gap: 7px; font: 600 14px var(--body); letter-spacing: 0; text-transform: none; color: var(--chart-money); }
.mk-method summary svg { width: 15px; height: 15px; }

/* Grades: a heading, the chips, and "All 40" as the last chip */
.mk-grades { margin-top: 34px; padding-top: 28px; border-top: 1px solid var(--line-soft); }
.mk-grades-title { margin: 0; font: 600 16px / 1.2 var(--body); color: var(--text); }
.mk-grades .grade-options {
  flex-wrap: wrap; overflow: visible; gap: 10px; margin-top: 16px; padding: 0;
  -webkit-mask-image: none; mask-image: none;
}
.mk-grades .grade-button { min-height: 64px; min-width: 96px; padding: 8px 18px; border-radius: 14px; gap: 6px; font: 600 16px / 1.1 var(--body); }
.mk-grades .grade-button small { font: 500 12px / 1.1 var(--mono); }
.mk-grade-all .grade-button { min-width: 64px; min-height: 54px; padding: 6px 14px; font-size: 15px; }
.mk-grade-more { min-height: 64px; min-width: 0; padding: 0 20px; gap: 8px; border-radius: 14px; background: transparent; font: 600 16px var(--body); }
.mk-grade-more svg { width: 16px; height: 16px; }
.mk-grade-fewer { padding: 14px 0 2px 58px; }
.mk-grade-fewer .mk-grade-more { min-height: 44px; border-radius: 999px; font-size: 15px; }

/* Actions: Add, with Share beside it on desktop */
.mk-actions { margin-top: 30px; gap: 12px; }
.mk-actions .button { min-height: 56px; padding: 0 30px; font-size: 17px; }
.mk-actions .mk-share { width: 56px; height: 56px; border-radius: 999px; border: 1px solid var(--line); }
.mk-actions .identity-details { display: none; }
.detail-breadcrumb .mk-share-top { display: none; }

/* The market: filters on top of the line, the ledger under it */
.mk-chart { position: relative; margin-top: 96px; padding-top: 56px; }
.mk-chart .mk-chart-head { display: block; }
.mk-chart-head h2 { margin: 0; font: 600 34px / 1.1 var(--body); letter-spacing: -.01em; }
.mk-chart-sub { margin: 8px 0 0; font-size: 16px; color: var(--muted); }
.mk-chart-tools { display: flex; align-items: center; justify-content: space-between; gap: 14px 24px; flex-wrap: wrap; margin-top: 26px; }
.mk-chart-tools .mk-sold-on { margin: 0; gap: 14px; }
.mk-sold-on > span { font-size: 15px; color: var(--muted); }
.mk-sources button { min-height: 38px; padding: 6px 18px; font-size: 14px; }
.mk-sources button.is-empty, .mk-sources button.is-empty:hover { cursor: default; background: none; color: color-mix(in srgb, var(--faint) 45%, transparent); }
/* Sold on left, the time window right while both fit on one line (space-between).
   When a card's groups fill the line, the time window drops under Sold on, left-
   aligned, instead of floating right on a line of its own. Alone, it stays right. */
.mk-chart-tools .chart-periods:only-child { margin-left: auto; }
.mk-chart .segmented { display: inline-flex; gap: 3px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel-2); }
/* Unselected tabs dim their label, never the button: opacity would fade the
   gold focus ring with it (tests/chart-periods.test.mjs). */
.mk-chart .segmented button { min-height: 38px; padding: 6px 16px; border-radius: 999px; font: 600 14px var(--body); letter-spacing: .01em; color: color-mix(in srgb, var(--text) 82%, transparent); }
.mk-chart .segmented button:hover { color: var(--text); background: color-mix(in srgb, var(--text) 8%, transparent); }
.mk-chart .segmented button.active { background: var(--chart-money); color: #16120a; }
.mk-chart .segmented button[aria-disabled="true"] { background: none; color: color-mix(in srgb, var(--faint) 45%, transparent); }
.mk-chart #mk-chart-host { margin-top: 10px; }
.mk-history-start { margin: 14px 0 0; font-size: 13.5px; color: var(--faint); }
/* The price on the line: a tip over the selected point (beta/chart.mjs). */
.mk-line .chart-plot { position: relative; }
.mk-line .chart-tip {
  position: absolute; z-index: 2; pointer-events: none;
  transform: translate(calc(-100% + 16px), calc(-100% - 16px));
  transition: left .14s cubic-bezier(.2, .8, .2, 1), top .14s cubic-bezier(.2, .8, .2, 1);
}
.mk-line .chart-tip.is-left { transform: translate(-16px, calc(-100% - 16px)); }
.mk-line .chart-tip.is-below { transform: translate(calc(-100% + 16px), 16px); }
.mk-line .chart-tip.is-left.is-below { transform: translate(-16px, 16px); }
.mk-line .chart-tip button {
  pointer-events: auto; display: inline-flex; align-items: baseline; gap: 8px; white-space: nowrap;
  padding: 8px 12px 8px 14px; border: 1px solid color-mix(in srgb, var(--chart-line) 28%, var(--line)); border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 84%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 8px 22px color-mix(in srgb, #000 30%, transparent); color: var(--text); cursor: pointer;
}
.mk-line .chart-tip #chart-selected-meta { font: 500 12px / 1 var(--mono); letter-spacing: .02em; color: var(--muted); }
.mk-line .chart-tip strong { font: 600 15px / 1 var(--body); color: var(--text); font-variant-numeric: tabular-nums; }
.mk-line .chart-tip svg { align-self: center; width: 13px; height: 13px; color: var(--chart-money); }
/* With a mouse the whole plot is the target (a click opens what is selected),
   so the tip never sits between the pointer and the line. On touch it is the
   button that opens the day a finger picked. */
@media (hover: hover) and (pointer: fine) { .mk-line .chart-tip button { pointer-events: none; } }
@media (prefers-reduced-motion: reduce) { .mk-line .chart-tip { transition: none; } }
/* Drawn 1:1 now, so these are real sizes. */
.mk-line .history-chart .chart-tick { font: 500 11.5px var(--mono); letter-spacing: .02em; }
.mk-line .history-chart .chart-date { font: 500 11px var(--mono); letter-spacing: .02em; }
.mk-line .history-chart .chart-band text { font: 500 11px var(--mono); letter-spacing: .08em; }
/* "Daily median of recorded sales, in USD. How this line is drawn" */
.mk-line .chart-method { margin-top: 12px; }
.mk-line .chart-method summary { font: 400 13.5px / 1.5 var(--body); letter-spacing: 0; text-transform: none; color: var(--muted); }
.mk-line .chart-method summary b { font-weight: 600; color: var(--chart-money); }
.mk-line .chart-method p { font-size: 13px; }

.mk-ledger { margin-top: 72px; }
.mk-ledger-head { align-items: baseline; padding-bottom: 14px; }
.mk-ledger-head h2 { margin: 0; font: 600 28px / 1.1 var(--body); }
.mk-ledger-count { font-size: 15px; color: var(--faint); }
/* Fixed columns, so the grade sits by the date and the source reads as a tag,
   not four values spread evenly across the page. */
.mk-row {
  grid-template-columns: minmax(6.5em, 240px) minmax(0, 1fr) minmax(0, 200px) minmax(5.5em, 180px);
  align-items: center; min-height: 58px; padding: 0 4px; font: 500 14px var(--mono);
}
.mk-grade { font: 500 16px var(--body); color: var(--text); }
.mk-source {
  justify-self: start; max-width: 100%; box-sizing: border-box; padding: 5px 10px;
  border: 1px solid var(--line); border-radius: 999px; font: 500 13px var(--body); color: var(--muted);
}
.mk-source.is-mazified { border-color: color-mix(in srgb, var(--chart-mazified) 40%, transparent); font: 600 11px var(--mono); }
.mk-price { font: 600 18px var(--body); }
.mk-show-all {
  min-height: 46px; margin-top: 20px; padding: 0 22px; border: 1px solid var(--line); border-radius: 999px;
  font: 600 15px var(--body); letter-spacing: 0; text-transform: none; color: var(--text);
}

.mk-check.price-check {
  margin-top: 88px; padding: 40px 44px; border: 1px solid var(--line); border-radius: 24px; background: var(--panel);
  grid-template-columns: minmax(0, 1fr) minmax(280px, 440px); gap: 24px 56px; align-items: center;
}
.mk-check h2 { margin: 0; font: 600 28px / 1.15 var(--body); }
.mk-check p { margin: 10px 0 0; font-size: 16px; line-height: 1.5; }
.mk-check .price-input { border-radius: 14px; background: var(--bg); }
.mk-check .price-context { margin-top: 12px; font-size: 14px; }

.mk-details { margin-top: 88px; }
.mk-details h2 { margin: 0; font: 600 28px / 1.1 var(--body); }
.mk-details dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 64px; margin: 18px 0 0; }
.mk-details dl > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; padding: 17px 0; border-top: 1px solid var(--line-soft); }
.mk-details dt { color: var(--faint); }
.mk-details dd { margin: 0; overflow-wrap: anywhere; }

/* Phone: today's compact answer beside the card; Card details stays a disclosure. */
@media (max-width: 760px) {
  .mk-card, .mk-card-caption, .mk-specimen .specimen-note { width: 100%; }
  .mk-card-caption { margin-top: 9px; }
  .mk-card-caption span { padding: 4px 6px; font-size: 7.5px; letter-spacing: .08em; }
  .mk-readout { padding: 2px 0 0; gap: 6px; align-self: center; }
  .mk-label { gap: 4px; font: 500 9.5px / 1.3 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }
  .mk-label b { padding: 0; background: none; font: 500 9.5px / 1.3 var(--mono); letter-spacing: .16em; }
  .mk-label .mk-scope { font-size: 8px; padding: 2px 4px; }
  .mk-number { font-size: clamp(46px, 13.5vw, 64px); margin-top: 2px; }
  .mk-range { font: 500 10px / 1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
  .mk-range b { display: block; margin: 4px 0 0; font: 500 12.5px var(--mono); letter-spacing: .04em; color: var(--chart-money); }
  .mk-range.is-note { font: 400 12px / 1.45 var(--body); letter-spacing: 0; text-transform: none; color: var(--muted); }
  .mk-evidence { display: none; }
  .mk-readout .mk-stats { display: flex; }
  .mk-notes { margin-top: 8px; }
  .mk-stale-chip { gap: 5px; padding: 4px 8px; font-size: 11px; }
  .mk-stale-chip svg { width: 12px; height: 12px; }
  .mk-grades { margin-top: 24px; padding-top: 22px; }
  .mk-grades-title { font-size: 15px; }
  .mk-grades .grade-options {
    flex-wrap: nowrap; overflow-x: auto; gap: 8px; margin-top: 14px; padding: 0 44px 2px 0;
    -webkit-mask-image: linear-gradient(90deg, #000 86%, transparent); mask-image: linear-gradient(90deg, #000 86%, transparent);
  }
  .mk-grades .grade-button { min-height: 56px; min-width: 76px; padding: 6px 14px; font-size: 15px; }
  .mk-grade-more { flex: none; min-height: 56px; padding: 0 16px; font-size: 15px; }
  .mk-grade-fewer { padding-left: 46px; }
  .mk-actions { margin-top: 22px; }
  .mk-actions .button { font-size: 16px; }
  .mk-actions .mk-share { display: none; }
  .mk-actions .identity-details { display: block; }
  .detail-breadcrumb .mk-share-top { display: inline-grid; }
  .mk-chart { margin-top: 56px; padding-top: 34px; }
  .mk-chart-head h2 { font-size: 26px; }
  .mk-chart-sub { font-size: 13.5px; }
  .mk-chart-tools { flex-direction: column; align-items: stretch; gap: 10px; margin-top: 18px; }
  .mk-chart-tools .mk-sold-on { flex-direction: column; align-items: stretch; gap: 8px; }
  .mk-chart-tools .mk-sources, .mk-chart .segmented { display: flex; width: 100%; box-sizing: border-box; }
  .mk-chart-tools .chart-periods, .mk-chart-tools .chart-periods:only-child { margin-left: 0; }
  .mk-chart .segmented button { flex: 1; padding: 6px 4px; }
  /* Chips grow to fill each row but never squeeze below their label: equal widths
     broke "Fanatics Collect" and "Auction houses" onto two lines. */
  .mk-chart-tools .mk-sources button { flex: 1 1 auto; padding: 6px 10px; }
  .mk-ledger { margin-top: 48px; }
  .mk-ledger-head h2 { font-size: 22px; }
  /* Two lines: the date, then grade · source; the price on the right. */
  .mk-row { grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px; min-height: 64px; padding: 10px 2px; }
  .mk-date { grid-column: 1 / 3; grid-row: 1; font-size: 12px; color: var(--faint); }
  .mk-grade { grid-column: 1; grid-row: 2; font-size: 15px; }
  .mk-source { grid-column: 2; grid-row: 2; padding: 0; border: 0; border-radius: 0; font-size: 15px; }
  .mk-source::before { content: "·"; color: var(--faint); }
  .mk-source.is-mazified { font-size: 10.5px; }
  .mk-source .mk-venue { font-size: 14px; }
  .mk-price { grid-column: 3; grid-row: 1 / 3; font-size: 17px; }
  .mk-check.price-check { margin-top: 48px; padding: 26px 22px; border-radius: 20px; grid-template-columns: 1fr; gap: 16px; }
  .mk-check h2 { font-size: 22px; }
  .mk-check p { font-size: 14px; }
  .mk-details { display: none; }
}

/* ── Auction-house lot photos (beta/lot-photo.mjs) ───────────────────────────
   A Goldin or Fanatics Collect photo of the copy that sold names its house
   beside the picture, never over it: on a tile, the first line of the tile's
   text ("GOLDIN PHOTO · THIS COPY"); on the card page, a chip in the caption
   and a note saying which copy it is. The note stays on phones, where the
   generic "Reference image" note is hidden: the credit is not optional. */
.tile-info .tile-photo-credit {
  display: block; width: fit-content; max-width: 100%; margin: 0 0 7px; padding: 3px 6px; border-radius: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 600 7.5px/1.2 var(--mono); letter-spacing: .12em;
  color: var(--text); background: color-mix(in srgb, var(--text) 7%, transparent);
  border: 1px solid color-mix(in srgb, var(--text) 16%, transparent);
}
/* The whole photo, never cropped (the house's logo and watermark stay in it), and nothing laid over
   it: on the card page the house is named in the caption under the card instead. */
.mk-card.lot-photo .mk-card-face > img { object-fit: contain; }
.mk-card.lot-photo .art-note.lot-tag { display: none; }
.mk-specimen .specimen-note.lot-photo-note { color: var(--muted); }
.lot-photo-note .lot-photo-links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; }
.lot-photo-note .text-link { display: inline-flex; align-items: center; gap: 4px; padding: 0; font-size: inherit; }
.lot-photo-note .text-link svg, .receipt-lot svg { width: 11px; height: 11px; }
.receipt-lot { margin: 14px 0 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.receipt-lot a { display: inline-flex; align-items: center; gap: 4px; margin-left: 4px; color: var(--gold); font-weight: 600; }
html[data-theme="light"] .receipt-lot a { color: #866005; }
@media (max-width: 760px) {
  .mk-specimen .specimen-note.lot-photo-note { display: block; margin-top: 8px; font-size: 10.5px; line-height: 1.45; }
  .tile-info .tile-photo-credit { margin-bottom: 6px; padding: 3px 5px; font-size: 7px; letter-spacing: .1em; }
}
