/* GPU and CPU landing pages: hero, key numbers, performance-by-game list, side cards */
.hw-hero { position: relative; margin: 22px 0 16px; padding: 34px 34px 30px; border-radius: 24px; overflow: hidden; border: 1px solid var(--ring);
    background: radial-gradient(900px 300px at 88% -30%, var(--accent, rgba(255,122,26,.3)), transparent 70%), linear-gradient(180deg, #171724, #10101a); }
.hw-hero .top { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.hw-hero .vendor { padding: 6px 13px; border-radius: 999px; font: 800 12px 'Inter', sans-serif; letter-spacing: .14em; text-transform: uppercase; color: #fff; background: var(--vc, #444); }
.hw-hero h1 { font: 700 clamp(34px, 5.4vw, 56px)/1.05 'Chakra Petch', 'Inter', sans-serif; margin: 0 0 6px; overflow-wrap: anywhere; }
.hw-hero p { margin: 0 0 22px; color: var(--text-muted); font-size: 17px; }
.hw-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hw-hero .cta-btn { background: var(--or); color: #09090f; font-weight: 800; text-decoration: none; padding: 11px 20px; border-radius: 12px; }
.hw-hero .cta-btn:hover { background: var(--or-hover); }
.affiliate-btn { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.06); border: 1px solid var(--ring); border-radius: 12px; padding: 10px 16px;
    color: var(--text); text-decoration: none; font-size: 15px; }
.affiliate-btn:hover { border-color: var(--or); color: var(--or); }

.hw-kpis { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--ring); border-radius: 18px; background: var(--glass), var(--card); margin-bottom: 22px; overflow: hidden; }
.hw-kpis > div { padding: 18px 22px; border-right: 1px solid var(--ring); }
.hw-kpis > div:last-child { border-right: 0; }
.hw-kpis b { display: block; font: 700 30px 'Chakra Petch', 'Inter', sans-serif; color: var(--green); line-height: 1.1; }
.hw-kpis span { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }

.hw-cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.hw-main { display: grid; gap: 22px; min-width: 0; }
.hw-side { display: grid; gap: 18px; position: sticky; top: 18px; min-width: 0; }
.hw-card { border-radius: 18px; background: var(--glass), var(--card); border: 1px solid var(--ring); padding: 22px 24px; min-width: 0; }
.hw-card h2 { font: 700 18px 'Inter', sans-serif; margin: 0 0 14px; }
.hw-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.hw-head h2 { margin: 0; }
.hw-filter { display: flex; gap: 6px; flex-wrap: wrap; }
.hw-tools { display: flex; gap: 10px 18px; flex-wrap: wrap; align-items: center; }
.hw-tools .hw-filter + .hw-filter:not([hidden]) { padding-left: 18px; border-left: 1px solid var(--ring); }
.hw-filter[hidden] { display: none; }
.hw-filter button { cursor: pointer; font-family: inherit; }
.hw-filter button[aria-pressed="true"] { background: var(--or); border-color: var(--or); color: #09090f; }
.lgb-chip.res { background: rgba(79,195,247,.12); border-color: rgba(79,195,247,.35); color: var(--blue); }

/* Performance by game: one bar per game, lines at 60 and 144 FPS, scale ends at 240 FPS */
.perf { display: grid; gap: 4px; }
/* room for the bars while the script loads them (layout shift); --rows comes from the server, 64px = average row + gap */
#game-grid:empty { min-height: calc(var(--rows, 0) * 64px - 4px); }
#perf-card.has-sort .hw-head { min-height: 27px; }
.perf-row { display: grid; grid-template-columns: 76px minmax(0, 210px) minmax(0, 1fr) 92px; gap: 14px; align-items: center; padding: 8px; border-radius: 12px; text-decoration: none; color: var(--text); }
.perf-row[hidden] { display: none; }
.perf-row:hover { background: rgba(255,255,255,.05); }
.perf-row img { width: 76px; height: 36px; object-fit: cover; border-radius: 7px; background: #0d0d15; }
.perf-row .nm { font-weight: 700; font-size: 15px; line-height: 1.2; }
.perf-row .mt { font-size: 12.5px; color: var(--text-muted); margin-top: 3px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.perf-row .mt .lgb-chip { padding: 2px 9px; font-size: 12px; }
.track { position: relative; height: 10px; border-radius: 6px; background: rgba(255,255,255,.07); margin-bottom: 14px; }
.track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; }
.track u { position: absolute; top: -4px; bottom: -4px; width: 1px; background: rgba(255,255,255,.28); text-decoration: none; }
.track u::after { content: attr(data-l); position: absolute; top: 100%; margin-top: 3px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--text-muted); }
.perf-row .fv { text-align: right; font: 700 20px 'Chakra Petch', 'Inter', sans-serif; }
.perf-row .fv small { font: 500 11px 'Inter', sans-serif; color: var(--text-muted); }
.bg-hi { background: linear-gradient(90deg, #2f9e5b, #4ade80); }
.bg-mid { background: linear-gradient(90deg, #c9a227, #fcd34d); }
.bg-lo { background: linear-gradient(90deg, #c24848, #ff6b6b); }
.hw-note { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

/* Side cards */
.hw-cta { background: linear-gradient(135deg, rgba(255,122,26,.2), rgba(167,139,250,.14)), var(--card); border-color: rgba(255,122,26,.4); }
.hw-cta h2 { font-size: 20px; }
.hw-cta p { margin: 0 0 14px; color: var(--text-muted); font-size: 14.5px; }
.hw-cta a { display: block; text-align: center; padding: 12px; border-radius: 12px; background: var(--or); color: #09090f; font-weight: 800; text-decoration: none; }
.hw-cta a:hover { background: var(--or-hover); }
.prow { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid rgba(255,255,255,.07); text-decoration: none; color: var(--text); font-size: 14.5px; }
.prow:first-of-type { border-top: 0; }
.prow small { color: var(--text-muted); font-size: 12px; display: block; }
.prow > span { min-width: 0; overflow-wrap: anywhere; }
.rk { display: flex; gap: 10px; align-items: center; }
.rk b { flex: 0 0 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: rgba(255,255,255,.08); }
.rk.r1 b { background: #fcd34d; color: #09090f; } .rk.r2 b { background: #d4d4de; color: #09090f; } .rk.r3 b { background: #e0955a; color: #09090f; }

/* Recent benchmarks table */
.tbl-card table { width: 100%; border-collapse: collapse; }
.tbl-card th { text-align: left; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); padding: 8px 10px; font-weight: 600; }
.tbl-card td { padding: 10px; border-top: 1px solid rgba(255,255,255,.06); }
.tbl-card td.when, .tbl-card td.res, .tbl-card td:nth-child(2) { white-space: nowrap; }
.tbl-card tbody tr:hover { background: rgba(255,122,26,.07); }
.tbl-card a { text-decoration: none; }
.tbl-card a:hover { text-decoration: underline; }
.hw-more { text-align: center; margin-top: 16px; }
.hw-more button { background: rgba(255,255,255,.06); border: 1px solid var(--ring); color: var(--text); padding: 10px 24px; border-radius: 12px; cursor: pointer; font-size: 15px; }
.hw-more button:hover { border-color: var(--or); }

@media (max-width: 1000px) {
    .hw-cols { grid-template-columns: 1fr; }
    .hw-side { position: static; }
    .hw-kpis { grid-template-columns: repeat(2, 1fr); }
    .hw-kpis > div:nth-child(2) { border-right: 0; }
    .hw-kpis > div:nth-child(-n+2) { border-bottom: 1px solid var(--ring); }
    .perf-row { grid-template-columns: 56px minmax(0, 1fr) auto; grid-template-areas: 'i n f' 't t t'; gap: 8px 12px; }
    .perf-row img { grid-area: i; width: 56px; }
    .perf-row > div:nth-child(2) { grid-area: n; }
    .perf-row .track { grid-area: t; }
    .perf-row .fv { grid-area: f; }
    #game-grid:empty { min-height: calc(var(--rows, 0) * 97px - 4px); }
}
@media (max-width: 480px) {
    #perf-card.has-sort .hw-head { min-height: 60px; }
}
@media (max-width: 700px) {
    .tbl-card th:nth-child(2), .tbl-card td:nth-child(2), .tbl-card th:nth-child(5), .tbl-card td:nth-child(5), .tbl-card th:nth-child(6), .tbl-card td:nth-child(6) { display: none; }
    .hw-hero { padding: 24px 20px; }
    .hw-kpis b { font-size: 24px; }
    .hw-kpis > div { padding: 14px 16px; }
    .hw-card { padding: 18px 16px; }
    .hw-actions a { flex: 1; text-align: center; justify-content: center; }
}
