/* Market value tracker (lib/tracker.js, lib/tracker-ui.js). Phone first, light + dark.
   One accent (the raw-series blue); green and red only for up and down, always with an arrow and a sign. */
:root { --tk-accent: var(--va-raw, #2a78d6); --tk-up: #17804A; --tk-down: #B3261E; --tk-soft: color-mix(in srgb, var(--line) 70%, transparent); --tk-r: 14px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --tk-up: #3DD68C; --tk-down: #FF8A80; } }
:root[data-theme="dark"] { --tk-up: #3DD68C; --tk-down: #FF8A80; }
.tk-page main { max-width: 1040px; }
.tk-num, .tk-big, .tk-kpi b, .tk-chip b, .tk-mv-price, .tk-table td, .tk-pill, .tk-line b { font-variant-numeric: tabular-nums; }
.tk-muted { color: var(--muted); }
.tk-small { font-size: 13px; }
.tk-eyebrow { font: 600 12px var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--tk-accent); margin: 0 0 6px; }
.tk-h1 { font-size: clamp(22px, 5vw, 30px); line-height: 1.15; margin: 0 0 14px; letter-spacing: -.01em; }
.tk-label { font-size: 13px; color: var(--muted); margin: 0; }
.tk-big { font: 700 clamp(40px, 11vw, 64px)/1 var(--body); letter-spacing: -.03em; margin: 4px 0 10px; }
.tk-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 6px; color: var(--muted); font-size: 14px; }
.tk-empty-big { font: 700 28px var(--body); margin: 8px 0; }
.tk-hero { padding: 28px 0 22px; }
.tk-hero-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
.tk-hero-card > * { min-width: 0; }
.tk-hero-card .tk-hero-img { width: 88px; }
@media (min-width: 720px) { .tk-hero-card { grid-template-columns: 200px minmax(0, 1fr); gap: 32px; align-items: center; } .tk-hero-card .tk-hero-img { width: auto; max-width: 200px; } }
.tk-hero-card .tk-cta { grid-column: 1 / -1; }
.tk-cta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tk-cta .btn, .tk-cta form .btn { min-height: 44px; }
/* % pill */
.tk-pill { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; border-radius: 999px; padding: 4px 10px; font: 700 13.5px var(--body); max-width: 100%; }
.tk-pill small { white-space: normal; }
.tk-pill small { font-weight: 500; opacity: .85; }
.tk-up { color: var(--tk-up); background: color-mix(in srgb, var(--tk-up) 13%, transparent); }
.tk-down { color: var(--tk-down); background: color-mix(in srgb, var(--tk-down) 13%, transparent); }
.tk-flat { color: var(--muted); background: var(--sunken); }
/* sparkline */
.tk-spark { display: block; overflow: visible; }
.tk-spark path { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.tk-spark-up path { stroke: var(--tk-up); } .tk-spark-down path { stroke: var(--tk-down); }
.tk-spark-up circle { fill: var(--tk-up); } .tk-spark-down circle { fill: var(--tk-down); }
.tk-spark-none { display: block; height: 36px; }
/* sections: soft hairlines, no heavy boxes */
.tk-chart { padding: 8px 0 4px; border-top: 1px solid var(--tk-soft); }
.tk-chart .pr-chart { min-height: 180px; }
.tk-note, .tk-fine { font-size: 12.5px; color: var(--muted); margin: 6px 0 0; }
.tk-fine { margin: 28px 0 8px; }
.tk-sec { margin-top: 28px; }
.tk-sec-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; border-bottom: 1px solid var(--tk-soft); padding-bottom: 8px; margin-bottom: 4px; }
.tk-sec-h h2 { font-size: 18px; margin: 0; }
.tk-sec-h .tk-muted { font-size: 12.5px; }
.tk-empty { color: var(--muted); padding: 18px 0; margin: 0; }
/* KPI tiles */
.tk-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
@media (min-width: 760px) { .tk-kpis { grid-template-columns: repeat(4, 1fr); } }
.tk-kpi { border: 1px solid var(--tk-soft); border-radius: var(--tk-r); padding: 14px; background: var(--surface); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tk-kpi span { font-size: 12.5px; color: var(--muted); }
.tk-kpi b { font-size: 24px; letter-spacing: -.01em; }
.tk-kpi small { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* top movers */
.tk-movers { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 640px) { .tk-movers { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .tk-movers { grid-template-columns: 1fr 1fr 1fr; } }
.tk-mover { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 12px; border: 1px solid var(--tk-soft); border-radius: var(--tk-r); background: var(--surface); color: inherit; text-decoration: none; min-height: 112px; transition: border-color .15s; }
.tk-mover:hover { border-color: var(--tk-accent); }
.tk-thumb { width: 100%; height: auto; aspect-ratio: 5 / 7; object-fit: cover; border-radius: 8px; background: var(--sunken); display: block; }
.tk-mv-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tk-mv-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-mv-body .tk-muted { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-mv-price { font: 700 24px var(--body); letter-spacing: -.01em; margin-top: 2px; }
.tk-mv-body .tk-pill { align-self: flex-start; }
.tk-mv-body .tk-spark { margin-top: 4px; width: 100%; max-width: 160px; height: 36px; }
/* tables: hairlines, right-aligned tabular prices */
.tk-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tk-table th { text-align: left; font: 600 12px var(--body); color: var(--muted); padding: 10px 8px 8px 0; border-bottom: 1px solid var(--tk-soft); }
.tk-table td { padding: 12px 8px 12px 0; border-bottom: 1px solid var(--tk-soft); vertical-align: top; }
.tk-table .tk-r { text-align: right; padding-right: 0; white-space: nowrap; }
.tk-table td a:first-child { font-weight: 600; }
.tk-cell-sub { display: block; font-size: 12.5px; }
.tk-proof { display: block; font-size: 12px; color: var(--muted); }
.tk-show-s { display: inline; }
.tk-cell-sub.tk-show-s { display: block; }
.tk-hide-s { display: none; }
@media (min-width: 640px) { .tk-show-s, .tk-cell-sub.tk-show-s { display: none; } .tk-hide-s { display: table-cell; } }
/* card page: price per line, stat chips */
.tk-lines { display: flex; gap: 10px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; }
.tk-line { flex: 0 0 auto; min-width: 128px; border: 1px solid var(--tk-soft); border-radius: var(--tk-r); padding: 10px 12px; background: var(--surface); display: flex; flex-direction: column; gap: 2px; }
.tk-line.on { border-color: var(--tk-accent); }
.tk-line-k { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.tk-line b { font-size: 20px; }
.tk-line small { font-size: 11.5px; }
.tk-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
@media (min-width: 760px) { .tk-chips { grid-template-columns: repeat(4, 1fr); } }
.tk-chip { border-radius: var(--tk-r); background: var(--sunken); padding: 10px 12px; display: flex; flex-direction: column; }
.tk-chip span { font-size: 12px; color: var(--muted); }
.tk-chip b { font-size: 18px; }
/* sticky mini header */
.tk-mini { position: fixed; left: 0; right: 0; top: 0; z-index: 40; display: flex; align-items: center; gap: 10px; padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top));
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--tk-soft); transform: translateY(-110%); transition: transform .2s ease; font-size: 14px; }
.tk-mini span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.tk-mini b { font: 700 17px var(--body); font-variant-numeric: tabular-nums; }
.tk-mini.on { transform: none; }
@media (prefers-reduced-motion: reduce) { .tk-mini { transition: none; } .tk-mover { transition: none; } }
/* Collection value on the profile */
.tk-cv .tk-big { font-size: clamp(34px, 9vw, 48px); margin: 0 0 8px; }
.tk-cv-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.tk-cv-top .tk-spark { width: 220px; max-width: 100%; height: 64px; }
.tk-rows { list-style: none; margin: 0; padding: 0; }
.tk-rows li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--tk-soft); align-items: center; min-height: 44px; }
.tk-rows li > a { min-width: 0; font-weight: 600; }
.tk-rows .feed-sub { display: block; font-weight: 400; }
.tk-rows .tk-num { display: flex; flex-direction: column; align-items: flex-end; text-align: right; white-space: nowrap; }
.tk-rows .tk-num small { color: var(--muted); font-size: 11.5px; }
.tk-none { color: var(--muted); font-size: 13px; }
.tk-h3 { font-size: 15px; margin: 14px 0 2px; }
.tk-all summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; }
.tk-vis { margin-top: 8px; }
/* Value section heading (card registry page) */
.va-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.va-head h2 { margin: 0; }
.tk-watch-f { display: inline; margin: 0; }
.tk-watch { min-height: 40px; }
/* watchlist */
.tk-watchlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.tk-watchlist > li { border: 1px solid var(--tk-soft); border-radius: var(--tk-r); }
.tk-wl-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.tk-wl-name { font-weight: 700; font-size: 16px; }
.tk-wl-name .feed-sub { display: block; font-weight: 400; }
.tk-new { background: var(--tk-accent); color: #fff; border-radius: 99px; font-size: 12px; font-weight: 700; padding: 3px 9px; white-space: nowrap; }
.tk-wl-last { margin: 8px 0 4px; }
.tk-wl-last b { font-size: 24px; font-variant-numeric: tabular-nums; }
.tk-wl-dl { margin: 0; display: grid; gap: 4px; }
.tk-wl-dl div { display: flex; justify-content: space-between; gap: 8px; border-top: 1px solid var(--tk-soft); padding-top: 4px; }
.tk-wl-dl dt { color: var(--muted); font-size: 13px; }
.tk-wl-dl dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.tk-wl-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tk-wl-acts form { margin: 0; }
.tk-wl-acts .btn { min-height: 44px; }
/* skeleton loader (pop-up while sales load) */
.tk-skel { display: grid; gap: 10px; padding: 8px 0; }
.tk-skel i { display: block; height: 14px; border-radius: 8px; background: linear-gradient(90deg, var(--sunken) 25%, color-mix(in srgb, var(--sunken) 60%, var(--surface)) 50%, var(--sunken) 75%); background-size: 200% 100%; animation: tk-shimmer 1.2s infinite linear; }
.tk-skel i:nth-child(1) { height: 36px; width: 55%; } .tk-skel i:nth-child(2) { width: 35%; } .tk-skel i:nth-child(3) { height: 120px; }
@keyframes tk-shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .tk-skel i { animation: none; } }
.tk-chart-area .pr-dot { display: none; }
.tk-chart-area .pr-line { stroke: var(--tk-accent); }
.tk-chart-area .pr-area { fill: var(--tk-accent); opacity: .12; }
/* hub with no verified sales yet: one friendly card instead of dashes */
.tk-empty-card { margin: 8px 0 0; padding: 22px 18px; border: 1px solid var(--tk-soft); border-radius: var(--tk-r); background: var(--surface); }
.tk-empty-card .tk-empty-big { font-size: 22px; line-height: 1.25; margin: 0 0 8px; }
.tk-empty-card .tk-sub { margin: 0 0 16px; }
.tk-find label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.tk-find-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tk-find-row input { flex: 1 1 180px; min-width: 0; min-height: 44px; }
.tk-find-row .btn { min-height: 44px; flex: 0 0 auto; }
