/* The public market and card pages' share of application_layout.css.erb (the dashboard shell), so they don't
   block first paint on ~38KB of dashboard CSS. Same rules, same order; an edit to a base rule there belongs here too. */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { background: var(--bg-primary); }
a, button, input, select, textarea, label, [role="tab"], [role="checkbox"], [onclick], .binder-card, .qa-set-chip { touch-action: manipulation; }
body { font-family: var(--font-sans); background: linear-gradient(to bottom, #222120 0%, #1c1917 30%, #121010 100%) var(--bg-primary); background-attachment: fixed; min-height: 100vh; padding: 32px; color: var(--text-primary); line-height: 1.6; -webkit-font-smoothing: antialiased; }
@supports (-webkit-touch-callout: none) {
  body { background-attachment: scroll; }
}
.container { max-width: 2000px; margin: 0 auto; background: var(--bg-secondary); border-radius: var(--radius-xl); padding: 24px 32px; min-height: calc(100vh - 64px); }
h1 { color: var(--text-primary); margin-bottom: 8px; font-size: 28px; font-weight: 700; font-family: var(--font-display); letter-spacing: -0.3px; }
h1 a { color: var(--text-primary); text-decoration: none; }
h2 { color: var(--text-primary); font-size: 22px; font-weight: 600; letter-spacing: -0.3px; margin-bottom: 8px; font-family: var(--font-display); }
h3 { color: var(--text-primary); font-size: 18px; font-weight: 600; font-family: var(--font-display); }
table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 24px 0; font-size: 18px; }
thead { background: var(--bg-glass); }
th { padding: 8px 12px; text-align: left; font-weight: 500; color: var(--text-muted); text-transform: uppercase; font-size: 11px; letter-spacing: 0.05em; }
th:first-child { border-radius: var(--radius-md) 0 0 0; }
th:last-child { border-radius: 0 var(--radius-md) 0 0; }
td { padding: 11px 16px; transition: background 0.2s ease; vertical-align: middle; }
tbody tr { transition: all 0.2s ease; }
tbody tr:nth-child(even) { background: var(--zebra); }
tbody tr:hover { background: var(--bg-card-hover); }
.stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; margin: 24px 0; }
.stat { background: var(--bg-secondary); border-radius: var(--radius-lg); padding: 24px; transition: all 0.3s ease; min-width: 0; }
.stat-label { font-size: clamp(10px, 1.2vw, 18px); color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 500; }
.stat-value { font-size: clamp(16px, 2vw, 28px); font-weight: 600; font-family: var(--font-mono); font-variant-numeric: tabular-nums; color: var(--text-primary); margin-top: 8px; letter-spacing: -0.5px; overflow: hidden; text-overflow: ellipsis; }
.toolbar-icon { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--radius-md); background: none; border: none; color: var(--text-muted); cursor: pointer; transition: color 0.15s, background 0.15s; font-size: 20px; text-decoration: none; }
.toolbar-icon:hover { color: var(--text-primary); background: rgba(255, 255, 255, 0.05); }
.pricing-popover-stats .stat-value { color: var(--text-primary); font-family: var(--font-mono); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); border-radius: 4px; }
::-webkit-scrollbar-thumb { background: var(--border-subtle); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
::selection { background: rgba(245, 158, 11, 0.25); color: white; }
html[data-theme="light"] body { background: var(--bg-primary); background-attachment: initial; }
.movers-hero-name .num { color: var(--text-muted); font-weight: 400; font-size: 16px; margin-left: 6px; }
.movers-tail-name .num { color: var(--text-muted); font-weight: 400; font-size: 11px; margin-left: 4px; }
.theme-toggle { background: none; border: none; border-radius: var(--radius-md); color: var(--text-muted); cursor: pointer; padding: 0; font-size: 20px; line-height: 1; transition: color 150ms ease; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; }
.theme-toggle:hover { color: var(--text-primary); background: rgba(255, 255, 255, 0.05); }
.binder-card[data-foil].foil-active::after, .card-hover-img-wrap[data-foil].foil-active::after, .binder-detail-img-wrap[data-foil].foil-active::after, .cd-card-img-wrap[data-foil].foil-active::after, .card-row-thumb-wrap[data-foil].foil-active::after { animation-play-state: paused; }
.card-row-thumb-wrap[data-foil].foil-active::after { animation: foil-shift 4s ease infinite; }
.compare-cards-row .compare-remove-btn.cdx-ghost-btn { padding: 4px 10px; min-height: 32px; gap: 4px; }
@media (max-width: 1200px) {
  .stats { gap: 12px; }
  .stat { padding: 16px; }
  .stat-label { font-size: 14px; }
  .stat-value { font-size: 22px; }
}
@media (max-width: 960px) {
  body { padding: 20px; }
  .container { padding: 20px 24px; }
  table { font-size: 15px; }
  th { padding: 8px 12px; }
  td { padding: 9px 14px; }
  .stats { gap: 8px; }
  .stat { padding: 12px; }
  .stat-label { font-size: 12px; }
  .stat-value { font-size: 18px; }
  .stat-value { font-size: 24px; }
}
@media (max-width: 768px) {
  body { padding: 0; }
  .container { padding: 12px 8px; border-radius: 0; border: none; box-shadow: none; min-height: 100vh; }
  h1 { font-size: 22px; }
  h2 { font-size: 16px; margin-bottom: 4px; }
  table { font-size: 14px; }
  th { padding: 8px 10px; }
  td { padding: 8px 10px; }
  .stats { grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 12px 0; }
  .stat { padding: 10px 8px; }
  .stat-label { font-size: 10px; }
  .stat-value { font-size: 16px; }
}
@media (max-width: 480px) {
  h1 { font-size: 20px; }
  .stats { grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 8px 0; }
  .stat { padding: 8px 6px; }
  .stat-label { font-size: 12px; }
  .stat-value { font-size: 16px; }
}
@media (max-width: 360px) {
  body { padding: 0; }
  .container { padding: 8px 3px; }
  h1 { font-size: 18px; }
  .stat-value { font-size: 16px; }
}
@media (max-width: 480px) {
  .compare-cards-row .compare-remove-btn.cdx-ghost-btn { padding: 4px 8px !important; min-height: 32px !important; }
}
.reprice-step.is-active { color: var(--accent-amber); font-weight: 600; }
.stat-value.skeleton { background: linear-gradient(90deg, #292524 25%, #3c3532 50%, #292524 75%); background-size: 200% 100%; animation: skeleton-pulse 1.5s ease-in-out infinite; border-radius: 4px; color: transparent !important; }
[data-theme="light"] .stat-value.skeleton { background: linear-gradient(90deg, #e7e5e4 25%, #d6d3d1 50%, #e7e5e4 75%); background-size: 200% 100%; }
.cdx-seg-item.is-active { background: var(--s3); color: var(--text-primary); font-weight: 600; }
.chx-tip { position: absolute; display: none; pointer-events: none; z-index: 20; min-width: 104px; padding: 7px 9px; background: var(--s1, #1c1917); border: 1px solid var(--border); border-radius: var(--radius-md, 6px); box-shadow: var(--shadow-sm, 0 2px 8px rgba(0,0,0,0.18)); font-family: var(--font-sans); }
.chx-tip .chx-date { color: var(--text-muted); font-size: 14px; margin-bottom: 5px; }
.chx-tip .chx-row { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.chx-tip .chx-row + .chx-row { margin-top: 3px; }
.chx-tip .chx-sw { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.chx-tip .chx-lbl { color: var(--text-secondary); font-size: 14px; }
.chx-tip .chx-num { margin-left: auto; padding-left: 14px; font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 14px; font-weight: 500; color: var(--text-primary); }
.pb-actions { display: flex; justify-content: flex-end; margin-bottom: 4px; }
.cdx-ghost-btn, .cdx-agent-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; min-height: 44px; border: 1px solid var(--border); border-radius: var(--radius-md); background: transparent; color: var(--text-secondary); font: 500 14px 'Geist', sans-serif; line-height: 1; cursor: pointer; text-decoration: none; transition: background 100ms cubic-bezier(.16,1,.3,1), border-color 100ms cubic-bezier(.16,1,.3,1), color 100ms cubic-bezier(.16,1,.3,1); }
.cdx-ghost-btn:hover, .cdx-agent-btn:hover { background: rgba(255, 255, 255, 0.05); border-color: var(--text-muted); color: var(--text-primary); }
.cdx-ghost-btn:focus-visible, .cdx-agent-btn:focus-visible { outline: 2px solid var(--accent-amber); outline-offset: 2px; }
.cdx-ghost-btn:disabled, .cdx-agent-btn:disabled { opacity: 0.6; cursor: default; }
@media (max-width: 480px) {
  .cdx-ghost-btn, .cdx-agent-btn, .cdx-filter-chip { padding: 8px 12px; }
}
