/* The Hit Ledger
   Palette: ink #1B2432 · slab #E4E7EB · paper #FFFFFF · foil #C9A24C · pending #B8323A · verified #1F7A4D
   Type: Barlow Condensed (display) + Barlow (text). One family, two widths. */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700;800&family=Barlow:wght@400;500;600&display=swap');

:root {
  --ink: #1B2432; --ink-2: #3A4556; --ink-3: #6B7686;
  --slab: #E4E7EB; --slab-2: #D3D8DF; --paper: #FFFFFF;
  --foil: #C9A24C; --foil-2: #E7C97A; --foil-dark: #8F6F2A;
  --pending: #B8323A; --verified: #1F7A4D; --rejected: #8A8F98;
  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --text: 'Barlow', system-ui, sans-serif;
  --rail: 232px; --max: 1360px; --r: 3px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--slab); color: var(--ink); font-family: var(--text); font-size: 16px; line-height: 1.45; }
body { margin: 0; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: var(--ink); }
:focus-visible { outline: 3px solid var(--foil); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- top bar + ticker ---------- */
.top { background: var(--ink); color: var(--paper); }
.top-inner { max-width: var(--max); margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 28px; height: 60px; }
.wordmark { font-family: var(--display); font-weight: 800; font-size: 30px; letter-spacing: .5px; text-decoration: none; display: flex; align-items: baseline; gap: 8px; }
.wordmark .stamp { font-size: 22px; }
.nav { display: flex; gap: 18px; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 500; color: #C9D1DD; padding: 6px 2px; border-bottom: 2px solid transparent; }
.nav a.active, .nav a:hover { color: var(--paper); border-color: var(--foil); }
.ticker { background: var(--foil); color: var(--ink); overflow: hidden; height: 34px; display: flex; align-items: center; font-family: var(--display); font-weight: 600; font-size: 17px; }
.ticker-label { background: var(--ink); color: var(--foil-2); padding: 0 14px; height: 100%; display: flex; align-items: center; flex: none; letter-spacing: 1px; }
.ticker-viewport { flex: 1; overflow: hidden; height: 100%; display: flex; align-items: center; }
.ticker-track { display: flex; gap: 48px; white-space: nowrap; animation: ticker 70s linear infinite; padding-left: 20px; will-change: transform; }
.ticker-track span b { font-weight: 800; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- layout ---------- */
.shell { max-width: var(--max); margin: 0 auto; padding: 22px 20px 80px; display: grid; grid-template-columns: var(--rail) 1fr; gap: 28px; }
.shell.single { grid-template-columns: 1fr; }
.rail { position: sticky; top: 16px; align-self: start; display: flex; flex-direction: column; gap: 18px; }
.rail h4 { margin: 0 0 6px; font-family: var(--display); font-size: 15px; font-weight: 600; color: var(--ink-3); letter-spacing: .3px; }

.sports { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.sports button { background: var(--paper); border: 1px solid var(--slab-2); border-radius: var(--r); padding: 8px 0; font-family: var(--display); font-weight: 700; font-size: 17px; color: var(--ink-2); }
.sports button.on { background: var(--ink); color: var(--foil-2); border-color: var(--ink); }

.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 13px; color: var(--ink-3); font-weight: 500; }
.field input, .field select, .field textarea { border: 1px solid var(--slab-2); background: var(--paper); border-radius: var(--r); padding: 8px 10px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; }

.btn { background: var(--ink); color: var(--paper); border: 0; border-radius: var(--r); padding: 9px 14px; font-weight: 600; }
.btn.foil { background: var(--foil); color: var(--ink); }
.btn.ghost { background: transparent; border: 1px solid var(--slab-2); color: var(--ink-2); }
.btn.ok { background: var(--verified); }
.btn.no { background: var(--pending); }
.btn:disabled { opacity: .5; cursor: default; }

/* ---------- headings ---------- */
h1 { font-family: var(--display); font-weight: 800; font-size: 44px; line-height: 1; margin: 0 0 6px; letter-spacing: -.3px; }
h2 { font-family: var(--display); font-weight: 700; font-size: 28px; margin: 28px 0 10px; }
h3 { font-family: var(--display); font-weight: 600; font-size: 20px; margin: 0; }
.lead { color: var(--ink-2); max-width: 62ch; margin: 0 0 18px; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }

/* ---------- stats strip ---------- */
.strip { display: grid; grid-template-columns: repeat(4, auto) 1fr; gap: 26px; align-items: end; padding: 12px 0 18px; border-bottom: 2px solid var(--ink); margin-bottom: 8px; }
.strip .n { font-family: var(--display); font-size: 40px; font-weight: 800; line-height: .9; }
.strip .l { color: var(--ink-3); font-size: 13px; }
.strip .live { justify-self: end; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--verified); box-shadow: 0 0 0 3px rgba(31,122,77,.18); }

/* ---------- ledger rows ---------- */
.newbar { position: sticky; top: 8px; z-index: 5; display: flex; justify-content: center; }
.newbar button { background: var(--foil); color: var(--ink); border: 0; border-radius: 20px; padding: 7px 16px; font-weight: 600; box-shadow: 0 6px 18px rgba(27,36,50,.2); }
.ledger { display: flex; flex-direction: column; }
.row { display: grid; grid-template-columns: 74px 96px 1fr auto; gap: 16px; align-items: center; background: var(--paper); border-bottom: 1px solid var(--slab-2); padding: 12px 14px 12px 0; text-decoration: none; }
.row:first-child { border-top: 1px solid var(--slab-2); }
.row:hover { background: #F6F7F9; }
.stamp { display: flex; flex-direction: column; align-items: center; justify-content: center; align-self: stretch; font-family: var(--display); font-weight: 800; font-size: 26px; line-height: 1; color: var(--foil-dark); border-right: 1px solid var(--slab-2); }
.stamp small { font-size: 11px; font-weight: 600; letter-spacing: .5px; margin-top: 4px; color: var(--ink-3); }
.stamp.plate { color: var(--ink-3); }
.thumb { width: 96px; height: 96px; background: var(--slab); border-radius: var(--r); object-fit: cover; display: block; }
.thumb.empty { display: grid; place-items: center; color: var(--ink-3); font-family: var(--display); font-size: 13px; }
.row .main { min-width: 0; }
.row .title { font-weight: 600; font-size: 17px; line-height: 1.25; margin: 0 0 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.chips { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 13px; color: var(--ink-2); }
.chips .sport { font-family: var(--display); font-weight: 700; color: var(--ink); }
.chips .status { font-weight: 600; }
.chips .status.verified { color: var(--verified); }
.chips .status.unverified { color: var(--pending); }
.chips .status.rejected { color: var(--rejected); }
.row .side { text-align: right; font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.row .side .price { font-family: var(--display); font-size: 24px; font-weight: 700; color: var(--ink); display: block; }
.empty { background: var(--paper); border: 1px dashed var(--slab-2); padding: 34px; text-align: center; color: var(--ink-2); }
.pager { display: flex; justify-content: center; gap: 10px; padding: 18px; }

/* ---------- sets ---------- */
.setgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.setcard { background: var(--paper); border: 1px solid var(--slab-2); border-radius: var(--r); padding: 14px 16px; text-decoration: none; display: flex; flex-direction: column; gap: 8px; }
.setcard .yr { font-family: var(--display); font-weight: 800; font-size: 30px; line-height: 1; }
.setcard .nm { font-weight: 600; font-size: 17px; }
.bar { height: 8px; background: var(--slab); border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--foil-dark), var(--foil-2)); }
.table { width: 100%; border-collapse: collapse; background: var(--paper); font-size: 14px; }
.table th { text-align: left; font-family: var(--display); font-weight: 600; font-size: 15px; color: var(--ink-3); padding: 8px 10px; border-bottom: 2px solid var(--ink); }
.table td { padding: 8px 10px; border-bottom: 1px solid var(--slab-2); vertical-align: top; }
.table td.num { text-align: right; font-family: var(--display); font-size: 17px; font-weight: 700; }
.hit { display: inline-block; font-family: var(--display); font-weight: 800; font-size: 14px; padding: 2px 7px; border-radius: 2px; }
.hit.yes { background: var(--foil); color: var(--ink); }
.hit.pending { background: #F5DEE0; color: var(--pending); }
.hit.no { background: var(--slab); color: var(--ink-3); }

/* ---------- forms / review ---------- */
.form { background: var(--paper); border: 1px solid var(--slab-2); padding: 20px; display: grid; gap: 14px; max-width: 720px; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.notice { background: var(--paper); border-left: 4px solid var(--foil); padding: 12px 14px; margin: 12px 0; }
.notice.bad { border-color: var(--pending); }
.review { display: grid; gap: 10px; }
.review .row { grid-template-columns: 74px 96px 1fr auto 260px; }
.review .actions { display: flex; flex-direction: column; gap: 6px; align-self: center; }
.review .actions input { width: 100%; font-size: 14px; padding: 8px 10px; }
.review .actions input { border: 1px solid var(--slab-2); border-radius: var(--r); padding: 6px 8px; font-size: 13px; }
.srcgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.src { background: var(--paper); border: 1px solid var(--slab-2); padding: 14px 16px; display: grid; gap: 6px; }
.src .nm { font-family: var(--display); font-weight: 700; font-size: 22px; display: flex; justify-content: space-between; align-items: center; }
.src .st { font-size: 13px; }
.src .st.ok { color: var(--verified); } .src .st.bad { color: var(--pending); } .src .st.off { color: var(--ink-3); }
.prose { max-width: 70ch; background: var(--paper); padding: 24px 28px; border: 1px solid var(--slab-2); }
.prose p, .prose li { line-height: 1.55; }
code { background: var(--slab); padding: 1px 5px; border-radius: 2px; font-size: .92em; }

/* ---------- detail modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(27,36,50,.55); display: grid; place-items: center; z-index: 50; padding: 20px; }
.modal { background: var(--paper); max-width: 860px; width: 100%; max-height: 92vh; overflow: auto; display: grid; grid-template-columns: 300px 1fr; }
.modal .img { background: var(--slab); min-height: 300px; display: grid; place-items: center; }
.modal .img img { width: 100%; height: 100%; object-fit: contain; }
.modal .body { padding: 22px; display: grid; gap: 10px; align-content: start; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 4px 12px; font-size: 14px; }
.kv dt { color: var(--ink-3); } .kv dd { margin: 0; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .rail { position: static; }
  .top-inner { height: auto; flex-wrap: wrap; padding: 8px 14px; gap: 8px; }
  .nav { gap: 14px; font-size: 15px; width: 100%; overflow-x: auto; white-space: nowrap; margin-left: 0; padding-bottom: 4px; }
  .wordmark { font-size: 24px; }
  .strip { grid-template-columns: repeat(2, 1fr); }
  .strip .live { justify-self: start; grid-column: 1 / -1; }
  .row { grid-template-columns: 56px 72px 1fr; }
  .row .side { grid-column: 3; text-align: left; }
  .thumb { width: 72px; height: 72px; }
  .review .row { grid-template-columns: 56px 72px 1fr; }
  .review .actions { grid-column: 1 / -1; }
  .modal { grid-template-columns: 1fr; }
  .form .two { grid-template-columns: 1fr; }
}
