/* goatlist -- one stylesheet for every page. */
  :root {
    --bg: #10131a; --panel: #171b24; --panel-2: #1e2430; --line: #262e3d;
    --text: #e8ecf3; --muted: #8b98ac; --faint: #667487; --accent: #6ea8fe;
    --t1: #f5c451; --t2: #f0956e; --t3: #6ee7a8; --t4: #7fb2f0; --t5: #9aa4b5; --t6: #6b7686;
    --good: #6ee7a8;
  }
  @media (prefers-color-scheme: light) {
    :root {
      --bg: #f6f7f9; --panel: #ffffff; --panel-2: #f0f2f6; --line: #e4e8ee;
      --text: #171a21; --muted: #5c6673; --faint: #8a93a0; --accent: #2563eb;
      --t1: #a97706; --t2: #b4501d; --t3: #0f7b46; --t4: #2563eb; --t5: #5c6673; --t6: #8a929e;
      --good: #0f7b46;
    }
  }
  * { box-sizing: border-box; }
  [hidden] { display: none !important; }
  body { margin: 0; background: var(--bg); color: var(--text);
         font: 14px/1.5 ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif; }
  header { padding: 26px 24px 6px; display: flex; justify-content: space-between;
           align-items: baseline; gap: 20px; flex-wrap: wrap; }
  h1 { font-size: 26px; margin: 0; letter-spacing: 1.5px; font-weight: 800;
       background: linear-gradient(100deg, var(--t1) 0%, var(--accent) 70%);
       -webkit-background-clip: text; background-clip: text; color: transparent; }
  .sub { color: var(--muted); font-size: 12.5px; }
  .faint { color: var(--faint); }
  .wrap { padding: 0 24px 80px; max-width: 1480px; margin: 0 auto; }

  /* ---- picker ---- */
  .pickrow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
             margin-bottom: 12px; }
  .picklabel { flex: 0 0 74px; font-size: 11px; letter-spacing: 1px;
               text-transform: uppercase; color: var(--faint); font-weight: 600; }
  .chippick { padding: 7px 16px; border-radius: 999px; font-size: 13px;
              background: var(--panel-2); color: var(--muted); cursor: pointer;
              border: 1px solid var(--line); user-select: none;
              transition: transform .08s, background .12s, color .12s; }
  .chippick:hover { color: var(--text); transform: translateY(-1px); }
  .chippick.on { background: linear-gradient(100deg, rgba(245,196,81,.22), rgba(110,168,254,.25));
                 border-color: var(--accent); color: var(--text); font-weight: 600; }
  .chippick .emo { margin-right: 5px; }
  .searchrow { display: flex; gap: 10px; align-items: end; flex-wrap: wrap;
               margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--line); }
  .searchrow .yr { flex: 0 0 92px; }
  /* ---- years: a set, not a range ---- */
  /* Two ways to ask, because there are two questions. A RANGE ("the
     seventies") is the common one and gets the slider. A SET ("1968 and
     1970, not 1969") is the one no from/to box can express, and gets the
     checkboxes. The slider writes the checkboxes, so you can drag a range
     and then untick the middle. It all lives behind one button because a
     product can span seventy years and that many chips is a wall. */
  .yearrow { display: flex; gap: 6px; flex-wrap: wrap; align-items: center;
             margin-bottom: 12px; }
  .yearpick { position: relative; display: inline-flex; align-items: center;
              gap: 6px; }
  .yearbtn { padding: 6px 13px; border-radius: 999px; font-size: 12.5px;
             background: var(--panel-2); color: var(--muted); cursor: pointer;
             border: 1px solid var(--line); user-select: none; font: inherit;
             font-size: 12.5px; }
  .yearbtn:hover { color: var(--text); }
  .yearbtn.on { background: linear-gradient(100deg, rgba(245,196,81,.22), rgba(110,168,254,.25));
                border-color: var(--accent); color: var(--text); font-weight: 600; }
  .yearpop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 40;
             width: 296px; padding: 12px; border-radius: 10px;
             background: var(--panel); border: 1px solid var(--line);
             box-shadow: 0 12px 34px rgba(0,0,0,.5); }
  .yearband-label { font-size: 10.5px; letter-spacing: 1px; font-weight: 600;
                    text-transform: uppercase; color: var(--faint); }
  /* The two handles share one track, so a range reads as a range rather than
     as two unrelated sliders. */
  .yearrails { position: relative; height: 22px; margin: 6px 0 2px; }
  .yearrails input[type=range] { position: absolute; left: 0; width: 100%;
                                 margin: 0; background: none; pointer-events: none;
                                 -webkit-appearance: none; appearance: none; }
  .yearrails input[type=range]::-webkit-slider-runnable-track {
      height: 3px; background: var(--line); border-radius: 2px; }
  .yearrails input[type=range]::-moz-range-track {
      height: 3px; background: var(--line); border-radius: 2px; }
  .yearrails input[type=range]::-webkit-slider-thumb {
      -webkit-appearance: none; pointer-events: auto; width: 14px; height: 14px;
      margin-top: -5.5px; border-radius: 50%; background: var(--accent);
      border: 2px solid var(--panel); cursor: grab; }
  .yearrails input[type=range]::-moz-range-thumb {
      pointer-events: auto; width: 14px; height: 14px; border-radius: 50%;
      background: var(--accent); border: 2px solid var(--panel); cursor: grab; }
  .yearband-out { font-size: 12px; color: var(--muted); text-align: center;
                  margin-bottom: 8px; }
  .yearlist { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px 6px;
              max-height: 172px; overflow-y: auto; padding: 8px 2px;
              border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .yearopt { display: flex; align-items: center; gap: 4px; font-size: 11.5px;
             color: var(--muted); cursor: pointer; user-select: none; }
  .yearopt:hover { color: var(--text); }
  .yearopt input { margin: 0; accent-color: var(--accent); }
  /* A year the set does not list but the user typed anyway. */
  .yearopt.custom { font-style: italic; color: var(--faint); }
  .yearfoot { display: flex; gap: 8px; align-items: center; margin-top: 9px; }
  input.yearadd { flex: 1; padding: 4px 8px; font-size: 12px;
                  background: var(--panel-2); color: var(--text);
                  border: 1px solid var(--line); border-radius: 6px; }
  .yearclear { color: var(--faint); font-size: 11.5px; cursor: pointer;
               user-select: none; }
  .yearclear:hover { color: #e66; }
  .chippick .x { margin-left: 8px; color: var(--faint); font-weight: 700; }
  .chippick .x:hover { color: #e66; }
  .chippick.add { border-style: dashed; }
  .chippick.gone { text-decoration: line-through; opacity: .6; }
  .picknote { color: var(--faint); font-size: 11.5px; margin-left: 2px; }
  button.toggle { background: var(--panel-2); color: var(--muted);
                  border-color: var(--line); font-weight: 500; white-space: nowrap; }
  button.toggle:hover { color: var(--text); }
  button.toggle.on { background: linear-gradient(100deg, rgba(245,196,81,.22), rgba(110,168,254,.25));
                     border-color: var(--accent); color: var(--text); font-weight: 700; }

  /* ---- search panel ---- */
  .panel { background: var(--panel); border: 1px solid var(--line);
           border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; }
  .mainrow { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
  .mainrow .grow { flex: 2 1 260px; }
  .mainrow .mid { flex: 1 1 150px; }
  label { display: block; font-size: 11px; letter-spacing: .5px;
          color: var(--muted); margin-bottom: 5px; }
  select, input { width: 100%; padding: 8px 10px; border-radius: 8px; font-size: 13px;
                  background: var(--panel-2); color: var(--text);
                  border: 1px solid transparent; }
  select:focus, input:focus { outline: none; border-color: var(--accent); }
  button { padding: 9px 20px; border-radius: 8px; border: 1px solid transparent;
           background: var(--accent); color: #fff; font-weight: 600;
           font-size: 13px; cursor: pointer; }
  button.ghost { background: transparent; border-color: transparent;
                 color: var(--muted); font-weight: 500; padding: 9px 10px; }
  button.ghost:hover { color: var(--text); }
  button:disabled { opacity: .5; cursor: default; }
  .advanced { display: none; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
              gap: 12px; margin-top: 14px; padding-top: 14px;
              border-top: 1px solid var(--line); }
  .panel.expanded .advanced { display: grid; }
  .duo { display: flex; gap: 6px; }
  .checks { display: flex; gap: 14px; align-items: center; font-size: 12.5px;
            color: var(--muted); padding-top: 4px; }
  .checks input { width: auto; }

  /* ---- summary ---- */
  .summary { display: flex; gap: 22px; align-items: baseline; flex-wrap: wrap;
             padding: 4px 4px 12px; font-size: 13px; color: var(--muted); }
  .summary b { color: var(--text); font-size: 15px; font-variant-numeric: tabular-nums; }
  .summary details { font-size: 12px; color: var(--faint); }
  .summary summary { cursor: pointer; list-style: none; }
  .summary summary::after { content: " ▸"; }
  .summary details[open] summary::after { content: " ▾"; }
  .banner { border: 1px solid var(--line); background: var(--panel); border-radius: 10px;
            padding: 10px 14px; margin-bottom: 12px; font-size: 13px; color: var(--muted); }
  .warn { border-color: #7a5b12; background: rgba(245,196,81,.09); color: var(--text); }
  .err  { border-color: #7a2222; background: rgba(220,80,80,.1);  color: var(--text); }

  /* ---- toolbar ---- */
  .toolbar { display: flex; gap: 18px; align-items: center; flex-wrap: wrap;
             margin-bottom: 12px; }
  .seg { display: inline-flex; background: var(--panel); border: 1px solid var(--line);
         border-radius: 9px; padding: 3px; }
  .seg button { background: transparent; border: none; color: var(--muted);
                font-weight: 500; padding: 6px 14px; border-radius: 6px; font-size: 12.5px; }
  .seg button.on { background: var(--panel-2); color: var(--text); font-weight: 600; }

  /* ---- tier buckets ---- */
  .bucket { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px;
            background: var(--panel); overflow: hidden; }
  .bhead { display: flex; align-items: center; gap: 18px; padding: 13px 16px;
           cursor: pointer; flex-wrap: wrap; user-select: none; }
  .bhead:hover { background: var(--panel-2); }
  .caret { color: var(--faint); font-size: 11px; width: 12px; transition: transform .12s; }
  .bucket.open .caret { transform: rotate(90deg); }
  .badge { display: inline-block; padding: 2px 10px; border-radius: 999px;
           font-size: 11.5px; font-weight: 700; min-width: 52px; text-align: center; }
  .t1 { background: rgba(245,196,81,.16); color: var(--t1); }
  .t2 { background: rgba(240,149,110,.16); color: var(--t2); }
  .t3 { background: rgba(110,231,168,.14); color: var(--t3); }
  .t4 { background: rgba(127,178,240,.14); color: var(--t4); }
  .t5 { background: rgba(154,164,181,.14); color: var(--t5); }
  .t6 { background: rgba(120,130,145,.12); color: var(--t6); }
  .gb { background: rgba(110,168,254,.14); color: var(--accent);
        min-width: 0; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
  .bstat { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
  .bstat b { color: var(--text); font-variant-numeric: tabular-nums; }
  .bstat a { color: var(--accent); text-decoration: none; font-weight: 600;
             font-variant-numeric: tabular-nums; }
  .bstat a:hover { text-decoration: underline; }
  .rangewrap { flex: 1 1 160px; min-width: 120px; display: flex; align-items: center; gap: 8px; }
  .bar { flex: 1; height: 4px; border-radius: 2px; background: var(--panel-2);
         position: relative; overflow: hidden; }
  .bar span { position: absolute; top: 0; bottom: 0; border-radius: 2px; opacity: .9; }
  .rangelabel { font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums;
                white-space: nowrap; }
  .names { padding: 0 16px 12px 46px; font-size: 12px; color: var(--faint); }
  .names b { color: var(--muted); font-weight: 600; }
  .body { display: none; border-top: 1px solid var(--line); }
  .bucket.open .body { display: block; }

  /* ---- table ---- */
  .scroller { overflow-x: auto; }
  table { width: 100%; border-collapse: collapse; font-size: 13px; }
  th, td { padding: 9px 12px; text-align: left; white-space: nowrap; }
  td { border-top: 1px solid var(--line); }
  th { font-size: 10.5px; text-transform: uppercase; letter-spacing: .6px;
       color: var(--faint); font-weight: 600; }
  tr:hover td { background: rgba(127,178,240,.05); }
  .num { text-align: right; font-variant-numeric: tabular-nums; }
  .player { display: flex; align-items: center; gap: 10px; }
  .thumb { width: 54px; height: 74px; object-fit: cover; border-radius: 6px;
           background: var(--panel-2); flex: none; cursor: zoom-in; }
  .noimg { width: 54px; height: 74px; border-radius: 6px; background: var(--panel-2); flex: none; }
  #imgpeek { position: fixed; z-index: 50; pointer-events: none; display: none;
             border-radius: 10px; box-shadow: 0 8px 32px rgba(0,0,0,.45);
             border: 1px solid var(--line); background: var(--panel);
             max-width: 340px; max-height: 460px; }
  .pname { font-weight: 600; }
  /* The player's name links to its card page; it should read as the name,
     not as a browser-default link. */
  .pname a.cardlink { color: var(--text); text-decoration: none;
                      border-bottom: 1px dotted var(--faint); }
  .pname a.cardlink:hover { color: var(--accent); border-bottom-color: var(--accent); }
  .pmeta { font-size: 11px; color: var(--faint); margin-top: 1px; }
  .hof { color: var(--t1); font-size: 9.5px; font-weight: 700; vertical-align: 1px; }
  /* A prediction, not a fact -- same shape as HOF, dimmed so it never reads
     as an induction that has happened. */
  .hoflikely { color: var(--t1); opacity: .55; font-size: 9.5px;
               font-weight: 700; vertical-align: 1px; }
  .rc  { color: var(--t3); font-size: 9.5px; font-weight: 700;
         border: 1px solid currentColor; border-radius: 3px; padding: 0 3px; vertical-align: 1px; }
  .cardcell .pmeta { margin-top: 1px; }
  .price { font-weight: 600; }
  .ship { font-size: 11px; color: var(--faint); }
  .fmt { font-size: 11px; color: var(--faint); }
  .under { color: var(--good); font-weight: 700; }
  .hidebtn { color: var(--faint); cursor: pointer; font-size: 13px;
             padding: 2px 6px; border-radius: 5px; opacity: 0; }
  tr:hover .hidebtn { opacity: 1; }
  .hidebtn:hover { color: #e66; background: rgba(220,80,80,.12); }
  .hiddenpanel { border: 1px solid var(--line); border-radius: 12px;
                 background: var(--panel); margin-bottom: 12px; padding: 12px 16px; }
  .hiddenpanel h3 { margin: 0 0 8px; font-size: 13px; }
  .hiddenrow { display: flex; gap: 10px; align-items: baseline; padding: 5px 0;
               font-size: 12.5px; border-top: 1px solid var(--line); flex-wrap: wrap; }
  .hiddenrow a { color: var(--muted); text-decoration: none; }
  .hiddenrow a:hover { color: var(--text); text-decoration: underline; }
  .unhide { color: var(--accent); cursor: pointer; font-size: 12px; white-space: nowrap; }
  td.title { white-space: normal; min-width: 240px; max-width: 420px; }
  td.title a { color: var(--muted); text-decoration: none; font-size: 12.5px; }
  td.title a:hover { color: var(--text); text-decoration: underline; }
  .empty { padding: 48px; text-align: center; color: var(--muted); }
  .grade { font-size: 12.5px; }
  /* ---- time remaining ---- */
  /* Tabular figures so a column of "2d 4h" / "11h 3m" lines up on the digits
     and can be scanned without reading. */
  .ends { font-size: 12.5px; white-space: nowrap;
          font-variant-numeric: tabular-nums; }
  /* Under a day is a decision you are making today; under an hour is one you
     are making now. Everything longer is plain text, because colouring it
     would make the whole column shout. */
  .endsin.today { color: var(--accent); }
  .endsin.soon { color: #e88; font-weight: 600; }
  .endsin.gone { color: var(--faint); text-decoration: line-through; }
  .raw { color: var(--faint); }

/* ---- page chrome (multi-page shell) ---- */
.nav { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.nav a { font-size: 13px; color: var(--muted); text-decoration: none;
         padding: 6px 12px; border-radius: 8px; border: 1px solid transparent; }
.nav a:hover { color: var(--text); background: var(--panel-2); }
.nav a.on { color: var(--text); background: var(--panel-2);
            border-color: var(--line); font-weight: 600; }

/* ---- home ---- */
.cards { display: grid; gap: 14px; margin-top: 8px;
         grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card { display: block; text-decoration: none; color: inherit; padding: 18px 20px;
        background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
        transition: transform .08s, border-color .12s; }
.card:hover { transform: translateY(-2px); border-color: var(--accent); }
.card h2 { margin: 0 0 6px; font-size: 16px; }
.card .say { color: var(--text); font-size: 13.5px; font-style: italic;
             margin: 0 0 10px; }
.card p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.card .go2 { display: inline-block; margin-top: 12px; font-size: 12px;
             font-weight: 700; color: var(--accent); }

/* ---- ask row: the plain-English line above each search page ---- */
.ask { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.ask b { color: var(--text); font-weight: 600; }
.fieldrow { display: flex; gap: 10px; align-items: end; flex-wrap: wrap;
            margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--line); }
.fieldrow .wide { flex: 2 1 300px; }
.fieldrow .one { flex: 1 1 150px; }
.fieldrow .tiny { flex: 0 0 104px; }

/* ================= layout: sidebar (eBay style) =================
   A left rail that stays put: the search on top, live refinements under it.
   The refinements are computed from the listings already fetched, so ticking
   one costs nothing and the counts move as you go. */
.rail { display: grid; grid-template-columns: 268px minmax(0, 1fr); gap: 20px;
        align-items: start; }
@media (max-width: 900px) { .rail { grid-template-columns: 1fr; } }
.rail .side { position: sticky; top: 12px; max-height: calc(100vh - 24px);
              overflow: auto; padding-right: 4px; }
.side .panel { padding: 12px 14px; margin-bottom: 12px; }
.side label { margin-bottom: 3px; }
.side .field { margin-bottom: 9px; }
.side .duo { gap: 6px; }
.side .pickrow { margin-bottom: 8px; gap: 6px; }
.side .picklabel { flex: 0 0 100%; margin-bottom: 2px; }
.side .chippick { padding: 5px 11px; font-size: 12px; }
.side button.go { width: 100%; }
.sidehead { font-size: 11px; letter-spacing: 1px; text-transform: uppercase;
            color: var(--faint); font-weight: 600; margin: 0 0 8px; }

/* ---- facets ---- */
.facet { border-top: 1px solid var(--line); }
.facet:first-child { border-top: none; }
.facethead { display: flex; justify-content: space-between; align-items: center;
             cursor: pointer; padding: 9px 2px; font-size: 12.5px;
             font-weight: 600; color: var(--muted); user-select: none; }
.facethead:hover { color: var(--text); }
.facethead .caret { font-size: 10px; transition: transform .12s; }
.facet.open .facethead .caret { transform: rotate(90deg); }
.facetbody { display: none; padding-bottom: 8px; }
.facet.open .facetbody { display: block; }
.facetrow { display: flex; align-items: center; gap: 7px; padding: 3px 2px;
            font-size: 12.5px; color: var(--muted); cursor: pointer;
            border-radius: 6px; }
.facetrow:hover { background: var(--panel-2); color: var(--text); }
.facetrow.on { color: var(--text); font-weight: 600; }
.facetrow input { width: auto; margin: 0; flex: none; }
.facetrow .fname { flex: 1; overflow: hidden; text-overflow: ellipsis;
                   white-space: nowrap; }
.facetrow .fcount { color: var(--faint); font-size: 11.5px;
                    font-variant-numeric: tabular-nums; }
.facetmore { display: inline-block; margin: 4px 2px 0; font-size: 11.5px;
             color: var(--accent); cursor: pointer; }
.reffhead { padding: 2px 0 10px; border-bottom: 1px solid var(--line);
            margin-bottom: 4px; }
.refchips { display: flex; flex-wrap: wrap; gap: 5px; }
.refchip { font-size: 11.5px; padding: 3px 8px; border-radius: 999px;
           background: rgba(110,168,254,.14); color: var(--text); cursor: pointer;
           border: 1px solid var(--accent); }
.refchip b { color: var(--faint); margin-left: 2px; }
.refchip:hover b { color: #e66; }
.clearall { display: inline-block; margin-top: 7px; font-size: 11.5px;
            color: var(--accent); cursor: pointer; }

/* ================= layout: dense =================
   Maximum rows per screen: no thumbnails, tighter type, sticky header. For
   scanning six hundred listings rather than reading twenty. */
body.dense { font-size: 13px; }
body.dense header { padding: 14px 20px 4px; }
body.dense h1 { font-size: 19px; }
body.dense .wrap { padding: 0 20px 60px; max-width: none; }
body.dense .panel { padding: 10px 12px; margin-bottom: 10px; }
body.dense th, body.dense td { padding: 4px 9px; }
body.dense .thumb, body.dense .noimg { width: 30px; height: 41px; }
body.dense .pmeta { font-size: 10px; }
body.dense table { font-size: 12.5px; }
body.dense thead th { position: sticky; top: 0; z-index: 2;
                      background: var(--panel); }
body.dense .bucket { margin-bottom: 8px; }
body.dense .summary { padding: 2px 2px 8px; gap: 16px; font-size: 12px; }
body.dense td.title { max-width: 640px; }

  /* ---- affiliate disclosure ----
     Sits under the results at the same width as .wrap. Quiet, but not so
     quiet a reader cannot find it -- a disclosure that has to be hunted
     for is not a disclosure. */
  footer.affiliate { max-width: 1480px; margin: 0 auto; padding: 0 24px 40px;
                     border-top: 1px solid var(--line); }
  footer.affiliate p { margin: 14px 0 0; color: var(--muted); font-size: 12px;
                       max-width: 70ch; }
  body.dense footer.affiliate { max-width: none; padding: 0 20px 28px; }
