/* Most Expensive Video Games: page-specific pieces on top of the UAE Savings / Bonds stack */
.tag.free { border-color: rgba(38, 230, 164, 0.4); color: #26e6a4; }
.tag.low { border-color: rgba(0, 204, 255, 0.35); color: var(--accent); }
.tag.high { border-color: rgba(230, 103, 103, 0.5); color: #e66767; }
:root[data-theme="light"] .tag.free { border-color: rgba(4, 120, 87, 0.4); color: #047857; }
:root[data-theme="light"] .tag.low { border-color: rgba(2, 119, 181, 0.4); }
:root[data-theme="light"] .tag.high { border-color: rgba(220, 38, 38, 0.45); color: #dc2626; }

/* Leaderboard: rank / game / total cost / copies / break-even */
#boardHead.board-head, #board .b-row { grid-template-columns: 36px minmax(220px, 1.7fr) minmax(0, 1.1fr) 130px 140px; }
#board .b-name { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 2px 10px; align-items: center; }
#board .b-name .b-bar, #board .b-name .b-plans { grid-column: 1 / -1; }
#board .b-name .b-bar { display: block; height: 5px; border-radius: 3px; background: rgba(var(--fg), 0.07); margin-top: 6px; overflow: hidden; }
#board .b-name .b-bar span { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #fbbf24, #f7931a); }
.g-art { position: relative; width: 52px; height: 62px; border-radius: 9px; overflow: hidden; border: 1px solid var(--card-border); background: rgba(var(--fg), 0.05); cursor: help; }
.g-art:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.g-ph { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-size: 1.05rem; letter-spacing: 0.5px; color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4); }
.g-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.g-main { min-width: 0; }
#board .g-main { line-height: 1.35; }
#board .g-main small { display: block; margin-top: 3px; line-height: 1.4; }
#board .b-row { padding-top: 14px; padding-bottom: 14px; row-gap: 8px; }
#board .b-name { column-gap: 14px; }
#board .b-name .b-plans { gap: 6px; margin-top: 4px; }
.year-pill { display: inline-block; margin-left: 10px; padding: 1px 9px; border-radius: 999px; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.5px; color: var(--accent); border: 1px solid rgba(var(--fg), 0.2); background: rgba(var(--fg), 0.05); vertical-align: 2px; white-space: nowrap; }
.year-pill.tba { color: #ffaa00; border-color: rgba(255, 170, 0, 0.45); }
#boardHead .sort-btn { justify-self: center; white-space: nowrap; }
#boardHead { padding-top: 4px; padding-bottom: 14px; }
#board .b-row { cursor: default; position: relative; left: auto; right: auto; }
@media (max-width: 860px) {
    #boardHead.board-head, #board .b-row { grid-template-columns: 26px minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: none; column-gap: 8px; }
    #board .b-row { padding: 14px 8px; row-gap: 12px; }
    #board .b-row > :nth-child(1) { grid-area: 1 / 1 / 2 / 2; align-self: start; }
    #board .b-row > :nth-child(2) { grid-area: 1 / 2 / 2 / 5; min-width: 0; }
    #board .b-row > :nth-child(3) { grid-area: 2 / 2 / 3 / 3; }
    #board .b-row > :nth-child(4) { grid-area: 2 / 3 / 3 / 4; }
    #board .b-row > :nth-child(5) { grid-area: 2 / 4 / 3 / 5; }
    #board .b-name { grid-template-columns: 44px minmax(0, 1fr); column-gap: 12px; }
    #board .g-art { width: 44px; height: 54px; }
    #board .g-main b { overflow-wrap: anywhere; }
}

/* Picks: roomier cards with cover art */
#picks .cat { padding: 22px 24px; }
#picks .cat-head { margin-bottom: 16px; line-height: 1.5; }
#picks .cat-head small { margin-top: 2px; }
#picks .cat-win { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; align-items: center; margin-bottom: 16px; }
#picks .cat-win .g-art { width: 64px; height: 78px; border-radius: 11px; }
#picks .cat-win .g-ph { font-size: 1.1rem; }
#picks .cat-win .cat-model { font-size: 1.28rem; line-height: 1.3; }
#picks .cat-win .cat-prov { font-size: 0.88rem; margin-top: 5px; line-height: 1.5; }
#picks.cats { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
#picks .cat-run { display: grid; grid-template-columns: 22px 40px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; row-gap: 1px; padding: 11px 0; font-size: 0.92rem; line-height: 1.4; align-items: center; }
#picks .cat-run b { grid-row: 1 / 3; grid-column: 1; }
#picks .cat-run .g-art { grid-row: 1 / 3; grid-column: 2; width: 40px; height: 48px; border-radius: 8px; }
#picks .cat-run .g-ph { font-size: 0.75rem; }
#picks .cat-run .g-main { grid-column: 3; grid-row: 1; align-self: end; overflow-wrap: anywhere; }
#picks .cat-run small { grid-column: 3; grid-row: 2; align-self: start; margin-left: 0; font-size: 0.78rem; line-height: 1.45; text-align: left; }

/* Cost bars: single bar + value, same skeleton as the Bonds page */
.t-fill.cost { background: linear-gradient(90deg, #fbbf24, #f7931a); }
.t-bar span { white-space: nowrap; }
.t-name small { display: block; }
#teasers .t-row { grid-template-columns: 40px minmax(160px, 300px) minmax(0, 1fr); gap: 12px; align-items: center; }
#teasers .t-name { display: block; min-width: 0; }
#teasers .t-name .g-main { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#teasers .t-name small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#teasers .t-bars { min-width: 0; }
#teasers .g-art { flex: none; width: 40px; height: 48px; border-radius: 7px; }
#teasers .g-ph { font-size: 0.8rem; }
@media (max-width: 640px) {
    #teasers .t-row { grid-template-columns: 34px minmax(0, 1.1fr) minmax(0, 1fr); gap: 8px; }
    #teasers .g-art { width: 34px; height: 42px; }
}

/* Stock cases */
#stocks { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 16px; }
.tk-link { color: inherit; text-decoration: none; border-bottom: 1px dotted currentColor; }
.tk-link:hover, .tk-link:focus-visible { color: var(--accent); }
.stock-card .b-plans { margin: 8px 0 4px; }
.timeline { margin-top: 8px; border-left: 2px solid rgba(251, 191, 36, 0.35); padding-left: 12px; display: flex; flex-direction: column; gap: 7px; }
.tl-row { display: grid; grid-template-columns: 92px minmax(0, 1fr) minmax(52px, auto); gap: 8px 16px; font-size: 0.82rem; align-items: baseline; }
.tl-m { text-align: right; }
.timeline { gap: 11px; }
.tl-d { color: var(--accent); font-weight: 600; white-space: nowrap; font-size: 0.75rem; }
.tl-w { color: var(--ink); line-height: 1.45; }
.tl-m { font-weight: 700; color: #fbbf24; white-space: nowrap; font-size: 0.78rem; }
.tl-m.up { color: #26e6a4; }
.tl-m.down { color: #e66767; }
:root[data-theme="light"] .tl-m.up { color: #047857; }
:root[data-theme="light"] .tl-m.down { color: #dc2626; }
.lesson { margin: 10px 0 0; font-size: 0.85rem; line-height: 1.55; color: var(--text-dim); }
.lesson .bi { color: #fbbf24; margin-right: 4px; }
.s-arts { display: flex; gap: 8px; margin: 10px 0 2px; }
.s-arts .g-art { width: 64px; height: 40px; border-radius: 8px; }
.s-arts .g-ph { font-size: 0.72rem; }
.method { grid-column: 1 / -1; }
.promo-row.fine { color: var(--text-dim); font-size: 0.8rem; }
.kpi-card { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
