/* ==========================================================================
   /cards/sports/<sport> and /cards/tcg/<game> — live "Field Guide" layout.
   Light only: no dark blocks, no deep-purple headings. All collections are
   responsive grids that WRAP — there is no horizontal scroller anywhere.
   Everything is scoped under .catpage so nothing leaks into other pages.
   ========================================================================== */

.catpage { --catp-acc: #b45309; --catp-tint: rgba(180,83,9,.075); padding: 6px 0 36px; color: #111827; }
.catpage *, .catpage *::before, .catpage *::after { box-sizing: border-box; }
.catpage h1, .catpage h2, .catpage h3 { letter-spacing: -.02em; line-height: 1.15; margin: 0; color: #111827; }
.catpage p { margin: 0; }
.catpage a { color: inherit; }
.catpage img { display: block; max-width: 100%; height: auto; }
.catpage :focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; border-radius: 6px; }

.catp-container { min-width: 0; }

/* ── hero ────────────────────────────────────────────────────────────────── */
.catp-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr);
    gap: 30px;
    align-items: center;
    padding: 26px 0 22px;
    border-bottom: 1px solid #eef0f3;
    margin-bottom: 24px;
    background:
        radial-gradient(560px 300px at 92% 6%, var(--catp-tint) 0%, rgba(255, 255, 255, 0) 68%);
}
.catp-copy { min-width: 0; }

.catp-crumbs {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
    font-size: 12.5px; color: #6b7280; margin-bottom: 14px;
}
.catp-crumbs a { color: #6b7280; text-decoration: none; }
.catp-crumbs a:hover { color: #111827; text-decoration: underline; }
.catp-crumbs [aria-current] { color: #111827; font-weight: 700; }

.catp-eyebrow {
    font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
    color: var(--catp-acc); margin: 0 0 8px;
}
.catp-copy h1 { font-size: clamp(28px, 3.4vw, 44px); margin: 0 0 14px; }
.catp-lede { font-size: 15.5px; line-height: 1.65; color: #4b5563; max-width: 62ch; }

.catp-ctas { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; }
.catp-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 44px; padding: 0 20px; border-radius: 999px;
    font-size: 14px; font-weight: 800; text-decoration: none; line-height: 1;
    border: 1px solid transparent; cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, filter .15s ease;
}
/* Every state rule is scoped under .catpage so it out-specifies the generic
   `.catpage a { color: inherit }` (0,1,1). Un-scoped, the filled buttons
   inherited the dark body colour instead of their own white label — and only
   the :hover rules (0,2,0) turned white, which is why hover looked right. */
.catpage .catp-btn--solid {
    background-color: var(--catp-acc);
    background-image: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 58%);
    color: #fff; border-color: rgba(0, 0, 0, .07);
    box-shadow: 0 10px 20px -12px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .18);
    text-shadow: 0 1px 1px rgba(0, 0, 0, .12);
}
.catpage .catp-btn--solid:hover {
    transform: translateY(-1px); color: #fff;
    background-image: linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 58%),
                      linear-gradient(0deg, rgba(0, 0, 0, .10), rgba(0, 0, 0, .10));
    box-shadow: 0 14px 26px -14px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.catpage .catp-btn--solid:active {
    transform: translateY(0); color: #fff;
    box-shadow: 0 6px 12px -10px rgba(0, 0, 0, .5), inset 0 2px 4px rgba(0, 0, 0, .18);
}
.catpage .catp-btn--ghost { background: #fff; border-color: #d1d5db; color: #111827; }
.catpage .catp-btn--ghost:hover { background: #f9fafb; border-color: #9ca3af; color: #111827; transform: translateY(-1px); }
.catpage .catp-btn--light { background: #fff; color: #111827; box-shadow: 0 10px 20px -14px rgba(0, 0, 0, .5); }
.catpage .catp-btn--light:hover { color: #111827; transform: translateY(-1px); }
.catp-btn--full { width: 100%; margin-top: 14px; }

.catp-chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 18px 0 0; }
.catp-chips li {
    padding: 7px 12px; border-radius: 999px;
    background: #fff; border: 1px solid #e5e7eb; color: #4b5563; font-size: 12.5px;
}
.catp-chips li b { font-weight: 800; color: #111827; }

/* Hero card stack: a plain 3-column grid (no overlap tricks that could spill). */
.catp-fan {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px; align-items: start; padding: 10px; min-width: 0;
}
.catp-fan-card {
    position: relative; display: block; border-radius: 12px; overflow: hidden;
    background: #fff; border: 1px solid #e5e7eb; text-decoration: none;
    box-shadow: 0 18px 34px -24px rgba(16, 24, 40, .5);
    aspect-ratio: 5 / 7;
}
.catp-fan-card img { width: 100%; height: 100%; object-fit: cover; }
.catp-fan-0 { transform: rotate(-2deg) translateY(8px); }
.catp-fan-1 { transform: translateY(0); z-index: 2; }
.catp-fan-2 { transform: rotate(2deg) translateY(8px); }
.catp-fan-card .catp-gpill { position: absolute; top: 7px; right: 7px; }
.catp-fan-ph {
    display: grid; place-items: center; gap: 6px; padding: 12px; text-align: center;
    background: linear-gradient(160deg, var(--catp-tint), #fff 72%);
}
.catp-fan-ph b { font-size: 34px; }
.catp-fan-ph span { font-size: 11.5px; font-weight: 700; color: #4b5563; }

.catp-gpill {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 38px; height: 26px; padding: 0 8px; border-radius: 7px;
    font-size: 13px; font-weight: 900;
    background: #f3f4f6; color: #374151; border: 1px solid #e5e7eb;
}
.catp-gpill.gem { background: #dcfce7; border-color: #86efac; color: #166534; }
.catp-gpill.good { background: #dbeafe; border-color: #93c5fd; color: #1e40af; }
.catp-gpill.low { background: #fee2e2; border-color: #fca5a5; color: #991b1b; }

/* ── examples grid ───────────────────────────────────────────────────────── */
.catp-examples { margin: 0 0 26px; }
.catp-sechead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.catp-sechead h2 { font-size: 20px; }
.catp-sechead p { font-size: 13px; color: #6b7280; margin-top: 4px; max-width: 74ch; }
.catp-link { font-size: 13px; font-weight: 800; color: var(--catp-acc); text-decoration: none; white-space: nowrap; }
.catp-link:hover { text-decoration: underline; }

.catp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    min-width: 0;
}
.catp-tile {
    position: relative; display: flex; flex-direction: column;
    border-radius: 12px; overflow: hidden; text-decoration: none;
    background: #fff; border: 1px solid #e5e7eb;
    box-shadow: 0 2px 6px rgba(16, 24, 40, .05);
    transition: transform .16s, box-shadow .16s, border-color .16s;
    min-width: 0;
}
.catp-tile:hover { transform: translateY(-3px); border-color: #cbd5e1; box-shadow: 0 16px 30px -18px rgba(16, 24, 40, .35); }
.catp-tileimg { display: block; aspect-ratio: 5 / 7; background: #f1f5f9; overflow: hidden; }
.catp-tileimg img { width: 100%; height: 100%; object-fit: cover; }
.catp-tile .catp-gpill { position: absolute; top: 8px; right: 8px; box-shadow: 0 4px 10px rgba(16, 24, 40, .18); }
.catp-tilemeta { display: block; padding: 9px 10px 11px; min-width: 0; }
.catp-tilemeta b {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; font-size: 13px; line-height: 1.3; color: #111827;
}
.catp-tilemeta span { display: block; margin-top: 3px; font-size: 11.5px; color: #6b7280; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.catp-tilemeta em { display: block; margin-top: 4px; font-style: normal; font-size: 11.5px; font-weight: 700; color: #374151; }
.catp-tiletag {
    position: absolute; top: 8px; left: 8px; z-index: 2;
    font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
    padding: 3px 7px; border-radius: 999px; background: #fff; color: #7c2d12; border: 1px solid #f3d5b6;
}
.catp-tile--set .catp-tileimg--set {
    display: grid; place-items: center;
    background: linear-gradient(150deg, var(--catp-tint), #fff 74%);
    border-bottom: 1px dashed #e5e7eb;
}
.catp-tile--set .catp-tileimg--set span { font-size: 40px; opacity: .85; }
.catp-tile--set .catp-tilemeta span { white-space: normal; }
.catp-empty { padding: 18px; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; color: #4b5563; font-size: 14px; }
.catp-empty a { color: var(--catp-acc); font-weight: 700; }

/* ── body / aside ────────────────────────────────────────────────────────── */
.catp-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 34px; align-items: start; }
.catp-main { display: grid; gap: 26px; min-width: 0; }
.catp-sec { min-width: 0; }
.catp-sec h2 { font-size: 21px; margin-bottom: 12px; }
.catp-sec p { color: #4b5563; font-size: 14px; line-height: 1.72; margin-bottom: 11px; }
.catp-sec p:last-child { margin-bottom: 0; }
.catp-quick { background: var(--catp-tint); border: 1px solid #f3d5b6; border-radius: 12px; padding: 20px 22px; }
.catp-quick h2 { font-size: 20px; margin-bottom: 10px; }
.catp-quick p { font-size: 14.5px; line-height: 1.72; color: #4b5563; }
.catp-quick strong { color: #111827; }

.catp-reads { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.catp-reads li { position: relative; padding: 9px 12px 9px 32px; border-radius: 9px; background: #f9fafb; border: 1px solid #eef0f3; font-size: 13px; color: #374151; }
.catp-reads li::before { content: ""; position: absolute; left: 11px; top: 13px; width: 9px; height: 9px; border-radius: 3px; background: var(--catp-acc); opacity: .85; }
.catp-bullets { margin: 0; padding-left: 18px; color: #4b5563; font-size: 14px; }
.catp-bullets li { margin-bottom: 7px; }

.catp-minigrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.catp-mini { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; }
.catp-mini b { font-size: 22px; line-height: 1; }
.catp-mini span { font-size: 12.5px; color: #6b7280; line-height: 1.5; }
.catp-mini strong { display: block; color: #111827; font-size: 13px; margin-bottom: 2px; }

.catp-muted { color: #6b7280; font-size: 13.5px; margin-top: 12px; }

.catp-eras { display: grid; gap: 12px; }
.catp-era-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: #4b5563; margin-bottom: 5px; }
.catp-era-top b { color: #111827; font-size: 12.5px; }
.catp-era-track { height: 10px; border-radius: 999px; background: #eef0f3; overflow: hidden; }
.catp-era-track i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--catp-acc), var(--catp-tint)); background-color: var(--catp-acc); }

.catp-faq { display: grid; gap: 8px; }
.catp-faq details { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 0 14px; }
.catp-faq summary { cursor: pointer; padding: 13px 22px 13px 0; position: relative; font-size: 14px; font-weight: 700; color: #111827; list-style: none; }
.catp-faq summary::-webkit-details-marker { display: none; }
.catp-faq summary::after { content: "+"; position: absolute; right: 0; top: 11px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 999px; background: #f3f4f6; color: #6b7280; font-size: 15px; font-weight: 800; }
.catp-faq details[open] summary::after { content: "–"; }
.catp-faq details p { padding: 0 0 14px; font-size: 13.5px; color: #4b5563; line-height: 1.65; }

/* The whole sidebar is ONE sticky column.
   The first panel used to carry `position: sticky` on its own, but it sits
   inside this `display:grid; align-content:start` aside, so its containing
   block was its own auto-sized grid row — exactly its own height, giving the
   panel zero travel. It therefore just scrolled away with the page (and slid
   under the 72px sticky site header), so the "Grade a card" CTA and the link
   lists became unreachable about a screen into the article.
   Pinning the column keeps every panel in view for the whole content block.
   `max-height` + `overflow-y:auto` only produce a scrollbar when the column is
   taller than the viewport (short laptops), so nothing is ever unreachable and
   taller screens show no inner scrollbar at all. */
.catp-aside {
    display: grid; gap: 16px; align-content: start; min-width: 0;
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 96px);
    max-height: calc(100dvh - 96px);
    overflow-y: auto;
    scrollbar-width: thin;
}
.catp-panel { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 18px; min-width: 0; }
.catp-panel h2 { font-size: 15px; margin-bottom: 12px; }
/* Superseded: the column is sticky now, so the panel must stay in flow. */
.catp-panel--sticky { position: static; }
.catp-facts { margin: 0; display: grid; gap: 10px; }
.catp-facts > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 9px; border-bottom: 1px solid #f1f3f6; }
.catp-facts > div:last-child { border-bottom: 0; padding-bottom: 0; }
.catp-facts dt { font-size: 12.5px; color: #6b7280; }
.catp-facts dd { margin: 0; font-size: 15px; font-weight: 800; color: #111827; }
.catp-fine { color: #9ca3af; font-size: 11.5px; margin-top: 8px; }

.catp-minilist { list-style: none; margin: 0 0 8px; padding: 0; }
.catp-minilist li { border-bottom: 1px solid #f1f3f6; }
.catp-minilist li:last-child { border-bottom: 0; }
.catp-minilist a { display: block; padding: 8px 0; font-size: 13px; color: #374151; text-decoration: none; }
.catp-minilist a:hover { color: var(--catp-acc); }

.catp-band { margin: 30px 0 20px; padding: 30px 28px; border-radius: 14px; background: var(--catp-tint); border: 1px solid #e5e7eb; text-align: center; }
.catp-band h2 { font-size: 24px; margin-bottom: 10px; }
.catp-band p { color: #4b5563; font-size: 14px; max-width: 68ch; margin: 0 auto 18px; line-height: 1.7; }

.catp-sibs { margin-top: 18px; }
.catp-sibs h2 { font-size: 19px; margin-bottom: 12px; }
.catp-sibgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.catp-sibgrid a { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 9px; background: #fff; border: 1px solid #e5e7eb; text-decoration: none; font-size: 13px; font-weight: 700; color: #374151; }
.catp-sibgrid a:hover { border-color: #cbd5e1; background: #f9fafb; color: #111827; }
.catp-sibgrid a span { font-size: 16px; }

/* ── responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 1000px) {
    .catp-hero { grid-template-columns: 1fr; gap: 20px; padding: 20px 0 18px; }
    .catp-fan { max-width: 520px; width: 100%; margin: 0 auto; }
    .catp-body { grid-template-columns: 1fr; gap: 26px; }
    /* Below 1000px the aside becomes a multi-column row, so it must not stick
       or clip — reset the desktop sticky-column behaviour entirely. */
    .catp-aside { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); position: static; max-height: none; overflow: visible; }
    .catp-panel--sticky { position: static; }
}

@media (max-width: 560px) {
    .catpage { padding-top: 2px; }
    .catp-copy h1 { font-size: clamp(25px, 8vw, 34px); }
    .catp-lede { font-size: 14.5px; }
    .catp-ctas .catp-btn { flex: 1 1 auto; }
    .catp-fan { gap: 7px; padding: 8px; }
    .catp-fan-ph b { font-size: 26px; }
    .catp-grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 9px; }
    .catp-tilemeta b { font-size: 12.5px; }
    .catp-quick { padding: 16px; }
    .catp-band { padding: 24px 18px; }
    .catp-band h2 { font-size: 20px; }
    .catp-sibgrid { grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
    .catpage * { transition: none !important; animation: none !important; }
}
