/*
Theme Name: RomVault
Theme URI: https://nintendo-switch.net/romvault
Author: Adeel khan
Author URI: https://nintendo-switch.net
Description: A retro game ROM, hack, translation and emulator directory theme. Portrait cover cards, console/genre/region/publisher taxonomies, spec sidebar with download counter, star ratings, faceted archive filters, horizontal recommendation carousels and structured data. Warm gold + deep slate design.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: romvault
Tags: custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, two-columns, right-sidebar
*/

/* =========================================================================
   1. Design tokens
   ========================================================================= */
:root {
	--rv-primary:       #f0b65b;
	--rv-primary-dark:  #d99b36;
	--rv-primary-soft:  rgba(240, 182, 91, .15);
	/* Text that sits ON the accent. Recomputed from the accent's brightness in
	   the Customizer, so a dark accent gets white text automatically. */
	--rv-on-primary:    #152226;

	/* Banner gradient. All four follow the accent and dark colours, so the
	   hero re-tints itself whenever those change. */
	--rv-hero-glow:     rgba(221, 51, 51, .42);
	--rv-hero-1:        #152226;
	--rv-hero-2:        #26393f;
	--rv-hero-3:        #39525a;
	/* Where the banner starts dissolving, and what it dissolves into. */
	--rv-hero-fade-start: 40%;
	--rv-hero-fade-color: #ffffff;
	--rv-dark:          #152226;
	--rv-text:          #1f2e33;
	--rv-body:          #3d4e55;
	--rv-muted:         #5c7a86;
	--rv-faint:         #9db0b8;
	--rv-surface:       #f5f7f8;
	--rv-border:        #e2e8ec;
	--rv-white:         #ffffff;
	--rv-red:           #dc2626;
	--rv-red-dark:      #b91c1c;
	--rv-blue:          #2563eb;
	--rv-green:         #059669;
	--rv-green-dark:    #047857;

	--rv-font:          'Outfit', system-ui, -apple-system, "Segoe UI", sans-serif;
	--rv-font-display:  'Rajdhani', 'Outfit', sans-serif;

	--rv-r-sm:  6px;
	--rv-r:     10px;
	--rv-r-lg:  14px;
	--rv-r-xl:  18px;

	--rv-shadow-sm:    0 1px 2px rgba(21, 34, 38, .06);
	--rv-shadow:       0 6px 20px rgba(21, 34, 38, .10);
	--rv-shadow-hover: 0 20px 40px -10px rgba(240, 182, 91, .35);

	--rv-container: 1200px;
}

/* =========================================================================
   2. Reset / base
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; }

body {
	margin: 0;
	background: var(--rv-white);
	color: var(--rv-text);
	font-family: var(--rv-font);
	font-size: 16px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, h5, h6 { margin: 0; }
p { margin: 0 0 18px; }

.rv-container {
	max-width: var(--rv-container);
	margin: 0 auto;
	padding: 0 24px;
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	width: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	word-wrap: normal !important;
}
.screen-reader-text:focus {
	background: var(--rv-white);
	clip: auto;
	clip-path: none;
	color: var(--rv-dark);
	display: block;
	font-weight: 700;
	height: auto;
	left: 8px;
	line-height: normal;
	padding: 14px 22px;
	text-decoration: none;
	top: 8px;
	width: auto;
	z-index: 100000;
	border-radius: var(--rv-r-sm);
	box-shadow: var(--rv-shadow);
}

.rv-skip-link:focus { outline: 2px solid var(--rv-primary); }

/* =========================================================================
   3. Shared atoms
   ========================================================================= */
.rv-badge {
	display: inline-flex;
	align-items: center;
	padding: 4px 9px;
	border-radius: 5px;
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: #fff;
	background: var(--rv-red);
	white-space: nowrap;
}
.rv-badge--hack  { background: var(--rv-blue); }
.rv-badge--trans { background: var(--rv-green); }
.rv-badge--dark  { background: var(--rv-dark); }

.rv-pill {
	display: inline-block;
	padding: 4px 11px;
	border-radius: 6px;
	background: var(--rv-surface);
	border: 1px solid var(--rv-border);
	font-size: 12px;
	font-weight: 600;
	color: var(--rv-muted);
}
a.rv-pill:hover {
	background: var(--rv-primary-soft);
	border-color: var(--rv-primary);
	color: var(--rv-primary-dark);
}
.rv-pill--round { border-radius: 999px; padding: 3px 10px; font-size: 11.5px; }

.rv-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 44px;
	padding: 0 22px;
	border: 0;
	border-radius: var(--rv-r-sm);
	background: var(--rv-primary);
	color: var(--rv-on-primary);
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	transition: background .2s, transform .2s, box-shadow .2s;
	white-space: nowrap;
}
.rv-btn:hover { background: var(--rv-primary-dark); }
.rv-btn svg { width: 16px; height: 16px; stroke-width: 2; }
.rv-btn--ghost {
	background: var(--rv-white);
	border: 1px solid var(--rv-border);
	color: var(--rv-text);
}
.rv-btn--ghost:hover { background: var(--rv-surface); border-color: var(--rv-primary); }
.rv-btn--danger { background: var(--rv-red); color: #fff; height: 34px; padding: 0 15px; font-size: 13px; }
.rv-btn--danger:hover { background: var(--rv-red-dark); }
.rv-btn--block { width: 100%; }

.rv-card {
	background: var(--rv-white);
	border: 1px solid var(--rv-border);
	border-radius: var(--rv-r-lg);
	box-shadow: var(--rv-shadow-sm);
}
.rv-card__pad { padding: 26px 28px; }

.rv-stars { display: inline-flex; align-items: center; gap: 8px; }
.rv-stars__set { display: inline-flex; gap: 1px; }
.rv-stars svg { width: 17px; height: 17px; fill: var(--rv-primary); stroke: none; }
.rv-stars svg.is-off { fill: #d3dbdf; }
.rv-stars b { color: var(--rv-dark); font-size: 15px; }
.rv-stars span { color: var(--rv-muted); font-size: 13px; }

.rv-meta-inline { display: inline-flex; align-items: center; gap: 7px; }
.rv-meta-inline svg { width: 16px; height: 16px; stroke-width: 1.9; }

/* =========================================================================
   4. Header
   ========================================================================= */
.rv-header {
	background: var(--rv-white);
	position: sticky;
	top: 0;
	z-index: 100;
}
.rv-header__inner {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	height: 80px;
	gap: 20px;
}
.rv-logo {
	font-family: var(--rv-font-display);
	font-size: 21px;
	font-weight: 700;
	letter-spacing: .09em;
	color: var(--rv-dark);
	text-transform: uppercase;
	/* Grid blockifies its children, which would stretch this link across the
	   whole column and make dead space clickable. Sizing it to its text keeps
	   the hit area on the wordmark, without disturbing how the grid aligns it. */
	width: max-content;
	max-width: 100%;
}
.rv-logo img { max-height: 44px; width: auto; }

.rv-nav { display: flex; align-items: center; justify-content: center; gap: 30px; }
.rv-nav ul { display: flex; align-items: center; gap: 30px; list-style: none; margin: 0; padding: 0; }
.rv-nav li { position: relative; }
.rv-nav a {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	color: #4b5563;
	font-weight: 500;
	font-size: 15px;
	padding: 6px 0;
	transition: color .2s;
}
.rv-nav a:hover,
.rv-nav .current-menu-item > a,
.rv-nav .current_page_item > a,
.rv-nav .current-menu-parent > a { color: var(--rv-primary); }
.rv-nav__icon { display: inline-flex; width: 18px; height: 18px; flex: none; }
.rv-nav__icon svg { width: 18px; height: 18px; stroke-width: 1.75; }

/* sub menu */
.rv-nav ul ul {
	position: absolute;
	top: 100%;
	left: 0;
	display: none;
	flex-direction: column;
	gap: 0;
	min-width: 200px;
	padding: 8px;
	background: var(--rv-white);
	border: 1px solid var(--rv-border);
	border-radius: var(--rv-r);
	box-shadow: var(--rv-shadow);
	z-index: 20;
}
.rv-nav li:hover > ul,
.rv-nav li:focus-within > ul { display: flex; }
.rv-nav ul ul a { padding: 8px 10px; border-radius: var(--rv-r-sm); width: 100%; }
.rv-nav ul ul a:hover { background: var(--rv-surface); }

.rv-header__right { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.rv-icon-btn {
	width: 38px;
	height: 38px;
	border-radius: var(--rv-r-sm);
	border: 0;
	background: none;
	display: grid;
	place-items: center;
	cursor: pointer;
	color: var(--rv-dark);
	transition: color .2s;
}
.rv-icon-btn:hover { color: var(--rv-primary); }
.rv-icon-btn svg { width: 19px; height: 19px; stroke-width: 1.9; }
.rv-burger { display: none; }

/* Both panels hang off the bottom of the header rather than sitting inside
   its flow — otherwise opening one makes the header taller and shoves the
   whole page down. The header is sticky, so it already positions them. */
.rv-search-drawer,
.rv-mobile-nav {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: 99;
	max-height: calc(100vh - 100%);
	overflow-y: auto;
	overscroll-behavior: contain;
	border-top: 1px solid var(--rv-border);
	box-shadow: 0 16px 30px -14px rgba(21, 34, 38, .30);
}
.rv-search-drawer.is-open,
.rv-mobile-nav.is-open { display: block; }

/* header search drawer */
.rv-search-drawer {
	background: var(--rv-surface);
	padding: 16px 0;
}

/* The WordPress search form, used in the header drawer, search page and 404.
   It owns its own input styling — the shared form-input rule has no room for
   the leading icon. */
.rv-searchform { position: relative; }
.rv-searchform > svg {
	position: absolute;
	left: 15px;
	top: 50%;
	transform: translateY(-50%);
	width: 18px;
	height: 18px;
	stroke-width: 1.9;
	color: var(--rv-faint);
	pointer-events: none;
}
.rv-searchform input[type="search"] {
	width: 100%;
	height: 48px;
	border: 1px solid var(--rv-border);
	border-radius: var(--rv-r);
	padding: 0 16px 0 44px;
	background: var(--rv-white);
	font-size: 15px;
	outline: none;
	transition: border-color .2s, box-shadow .2s;
	-webkit-appearance: none;
	appearance: none;
}
.rv-searchform input[type="search"]::placeholder { color: var(--rv-faint); }
.rv-searchform input[type="search"]:focus {
	border-color: var(--rv-primary);
	box-shadow: 0 0 0 4px var(--rv-primary-soft);
}

/* mobile menu */
.rv-mobile-nav {
	background: var(--rv-white);
	padding: 10px 0 18px;
}
.rv-mobile-nav ul { list-style: none; margin: 0; padding: 0; }
.rv-mobile-nav a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 11px 4px;
	border-bottom: 1px solid var(--rv-border);
	font-weight: 500;
	color: var(--rv-text);
}
.rv-mobile-nav a:hover { color: var(--rv-primary); }

/* =========================================================================
   5. Breadcrumbs
   ========================================================================= */
.rv-crumbs {
	background: var(--rv-surface);
	border-top: 1px solid var(--rv-border);
	border-bottom: 1px solid var(--rv-border);
	padding: 13px 0;
}
.rv-crumbs ol {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 9px;
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 13.5px;
	color: var(--rv-muted);
}
.rv-crumbs li { display: flex; align-items: center; gap: 9px; }
.rv-crumbs li + li::before {
	content: "";
	width: 6px;
	height: 6px;
	border-top: 1.6px solid #b7c4cb;
	border-right: 1.6px solid #b7c4cb;
	transform: rotate(45deg);
}
.rv-crumbs a:hover { color: var(--rv-primary); }
.rv-crumbs .rv-crumbs__current { color: var(--rv-dark); font-weight: 600; }

/* =========================================================================
   6. Home hero + filter bar
   ========================================================================= */
.rv-hero {
	position: relative;
	height: 420px;
	overflow: hidden;
	background:
		radial-gradient(1000px 460px at 14% 6%, var(--rv-hero-glow), transparent 62%),
		radial-gradient(680px 320px at 88% 96%, rgba(255, 255, 255, .10), transparent 60%),
		linear-gradient(155deg, var(--rv-hero-1) 0%, var(--rv-hero-2) 52%, var(--rv-hero-3) 100%);
}
.rv-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* The banner dissolves into the page rather than stopping on a hard edge, and
   the search panel then sits over that faded strip. */
.rv-hero__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to bottom,
		transparent var(--rv-hero-fade-start),
		var(--rv-hero-fade-color) 100%
	);
}

/* Editable copy between the search panel and the first ROM rail. */
.rv-intro {
	padding: 14px 0 6px;
	text-align: center;
}
.rv-intro__heading {
	font-family: var(--rv-font-display);
	font-size: 30px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--rv-intro-heading, var(--rv-text));
	margin: 0 0 10px;
}
.rv-intro__text {
	max-width: 780px;
	margin: 0 auto;
	font-size: 15.5px;
	line-height: 1.8;
	color: var(--rv-muted);
}
.rv-intro__text p { margin: 0 0 12px; }
.rv-intro__text p:last-child { margin-bottom: 0; }
.rv-intro__text a { color: var(--rv-primary-dark); text-decoration: underline; }
.rv-hero__dots {
	position: absolute;
	inset: 0;
	background-image: radial-gradient(rgba(255, 255, 255, .14) 1px, transparent 1px);
	background-size: 22px 22px;
	opacity: .5;
}
/* The panel rides up onto the faded bottom of the banner. */
.rv-searchwrap { padding: 0 0 46px; }
.rv-searchbox {
	background: var(--rv-white);
	border: 1px solid var(--rv-border);
	border-radius: var(--rv-r-xl);
	box-shadow: 0 14px 40px -18px rgba(21, 34, 38, .26);
	padding: 30px 34px 28px;
	margin-top: -78px;
	position: relative;
	z-index: 5;
}
.rv-searchbox__kicker {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	margin: 0 0 10px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--rv-primary);
}
.rv-searchbox__kicker svg { width: 12px; height: 12px; fill: var(--rv-primary); stroke: none; }
.rv-searchbox__title {
	text-align: center;
	font-size: 30px;
	line-height: 1.25;
	font-weight: 700;
	color: var(--rv-dark);
	margin: 0 0 22px;
}
.rv-searchbox__title em { font-style: normal; color: var(--rv-primary); }

/* Row 1 — the keyword field with its inset submit button. */
.rv-searchbox__q { position: relative; margin-bottom: 14px; }
.rv-searchbox__q > svg {
	position: absolute;
	left: 16px;
	top: 50%;
	transform: translateY(-50%);
	width: 18px;
	height: 18px;
	stroke-width: 1.9;
	color: var(--rv-faint);
	pointer-events: none;
}
.rv-searchbox__q input {
	width: 100%;
	height: 50px;
	border: 1px solid var(--rv-border);
	background: var(--rv-surface);
	border-radius: var(--rv-r);
	padding: 0 132px 0 44px;
	font-size: 14.5px;
	outline: none;
	transition: .2s;
}
.rv-searchbox__q input::placeholder { color: var(--rv-faint); }
.rv-searchbox__q input:focus {
	border-color: var(--rv-primary);
	background: var(--rv-white);
	box-shadow: 0 0 0 4px var(--rv-primary-soft);
}
.rv-searchbox__submit {
	position: absolute;
	right: 6px;
	top: 6px;
	height: 38px;
	padding: 0 18px;
	border: 0;
	border-radius: var(--rv-r-sm);
	background: var(--rv-primary);
	color: var(--rv-on-primary);
	font-size: 13.5px;
	font-weight: 600;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	transition: background .2s;
}
.rv-searchbox__submit:hover { background: var(--rv-primary-dark); }
.rv-searchbox__submit svg { width: 15px; height: 15px; stroke-width: 2; }

/* Row 2 — the four taxonomy dropdowns. */
.rv-searchbox__filters {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 12px;
	margin-bottom: 12px;
}

/* Row 3 — sort on the left, apply on the right. */
.rv-searchbox__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	flex-wrap: wrap;
}
.rv-searchbox__foot .rv-icon-select { min-width: 260px; }

/* A select with a leading icon. */
.rv-icon-select { position: relative; }
.rv-icon-select > svg {
	position: absolute;
	left: 13px;
	top: 50%;
	transform: translateY(-50%);
	width: 16px;
	height: 16px;
	stroke-width: 1.8;
	color: var(--rv-muted);
	pointer-events: none;
	z-index: 2;
}
.rv-icon-select .rv-select { padding-left: 38px; height: 44px; }

.rv-field label {
	display: block;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--rv-muted);
	margin-bottom: 6px;
}
.rv-select {
	width: 100%;
	height: 46px;
	border: 1px solid var(--rv-border);
	border-radius: var(--rv-r);
	background-color: var(--rv-white);
	padding: 0 34px 0 12px;
	font-size: 14px;
	cursor: pointer;
	appearance: none;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%235c7a86' stroke-width='2' viewBox='0 0 24 24'><path d='M6 9l6 6 6-6'/></svg>");
	background-repeat: no-repeat;
	background-position: right 10px center;
	background-size: 16px;
}
.rv-select:focus { outline: none; border-color: var(--rv-primary); box-shadow: 0 0 0 4px var(--rv-primary-soft); }

/* =========================================================================
   7. Section heads
   ========================================================================= */
.rv-section { padding: 56px 0; }
.rv-section--alt { background: var(--rv-surface); }
.rv-section--tight { padding-top: 0; }

.rv-section-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 26px;
	flex-wrap: wrap;
}
.rv-eyebrow {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--rv-faint);
	margin: 0 0 6px;
}
.rv-section-head h2 {
	font-family: var(--rv-font-display);
	font-size: 30px;
	font-weight: 700;
	color: var(--rv-text);
	line-height: 1.15;
	position: relative;
	display: inline-block;
	padding-bottom: 8px;
}
.rv-section-head h2::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 56px;
	height: 3px;
	background: var(--rv-primary);
	border-radius: 3px;
}
.rv-view-all {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	font-weight: 600;
	color: var(--rv-muted);
	transition: .2s;
}
.rv-view-all:hover { color: var(--rv-primary); gap: 10px; }
.rv-view-all svg { width: 16px; height: 16px; stroke-width: 2; }

/* =========================================================================
   8. ROM cards
   ========================================================================= */
.rv-grid {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 20px;
}
.rv-grid--4 { grid-template-columns: repeat(4, 1fr); }
.rv-grid--3 { grid-template-columns: repeat(3, 1fr); }
.rv-grid--2 { grid-template-columns: repeat(2, 1fr); }

.rv-rom-card {
	background: var(--rv-white);
	border: 1px solid var(--rv-border);
	border-radius: var(--rv-r-lg);
	overflow: hidden;
	box-shadow: var(--rv-shadow-sm);
	transition: transform .3s, box-shadow .3s, border-color .3s;
}
.rv-rom-card:hover {
	transform: translateY(-12px);
	border-color: var(--rv-primary);
	box-shadow: var(--rv-shadow-hover);
}
.rv-poster {
	position: relative;
	aspect-ratio: 3 / 4;
	overflow: hidden;
	background: var(--rv-surface);
}
.rv-poster img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .5s;
}
.rv-rom-card:hover .rv-poster img { transform: scale(1.1); }
.rv-poster__fallback {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	font-family: var(--rv-font-display);
	font-size: 40px;
	font-weight: 700;
	color: rgba(255, 255, 255, .9);
	text-align: center;
	padding: 10px;
	line-height: 1.05;
}
.rv-poster__badges {
	position: absolute;
	top: 9px;
	left: 9px;
	display: flex;
	gap: 5px;
	z-index: 3;
}
.rv-poster__badges .rv-badge { padding: 3px 7px; font-size: 9.5px; }
.rv-chip-rate {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	background: var(--rv-primary);
	color: var(--rv-on-primary);
	font-size: 10px;
	font-weight: 700;
	padding: 3px 7px;
	border-radius: 5px;
	box-shadow: var(--rv-shadow-sm);
}
.rv-chip-rate svg { width: 10px; height: 10px; fill: var(--rv-on-primary); stroke: none; }

.rv-rom-card__body { padding: 11px 13px 13px; }
.rv-rom-card__body h3 {
	margin: 0 0 6px;
	font-size: 13.5px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--rv-text);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 35px;
}
.rv-rom-card:hover .rv-rom-card__body h3 { color: var(--rv-primary-dark); }
.rv-rom-card__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	font-size: 11.5px;
	color: var(--rv-muted);
}
.rv-rom-card__meta .rv-dl { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.rv-rom-card__meta .rv-dl svg { width: 12px; height: 12px; stroke-width: 2; }
.rv-rom-card__meta span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* list view */
.rv-rom-list {
	background: var(--rv-white);
	border: 1px solid var(--rv-border);
	border-radius: var(--rv-r-lg);
	overflow: hidden;
}
.rv-rom-row {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 12px 18px;
	border-bottom: 1px solid var(--rv-border);
	transition: background .2s;
}
.rv-rom-row:last-child { border-bottom: 0; }
.rv-rom-row:hover { background: var(--rv-surface); }
.rv-rom-row__thumb {
	width: 56px;
	height: 64px;
	border-radius: var(--rv-r-sm);
	flex: none;
	overflow: hidden;
	position: relative;
	background: var(--rv-surface);
}
.rv-rom-row__thumb img { width: 100%; height: 100%; object-fit: cover; }
.rv-rom-row__main { flex: 1; min-width: 0; }
.rv-rom-row__main h3 {
	margin: 0 0 3px;
	font-size: 15px;
	font-weight: 600;
	color: var(--rv-text);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.rv-rom-row__sub { font-size: 12.5px; color: var(--rv-muted); }
.rv-rom-row__side { display: flex; align-items: center; gap: 22px; font-size: 12.5px; color: var(--rv-muted); flex: none; }

/* =========================================================================
   9. Emulator + post cards
   ========================================================================= */
/* Vertical emulator card — same footprint as a ROM card, square logo on top. */
.rv-emu-card {
	display: block;
	background: var(--rv-white);
	border: 1px solid var(--rv-border);
	border-radius: var(--rv-r-lg);
	overflow: hidden;
	transition: transform .3s, box-shadow .3s, border-color .3s;
	box-shadow: var(--rv-shadow-sm);
}
.rv-emu-card:hover { border-color: var(--rv-primary); transform: translateY(-8px); box-shadow: var(--rv-shadow); }
.rv-emu-card__logo {
	position: relative;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	display: grid;
	place-items: center;
	font-family: var(--rv-font-display);
	font-weight: 700;
	color: #fff;
	font-size: 34px;
}
.rv-emu-card__logo img { width: 100%; height: 100%; object-fit: cover; }
.rv-emu-card__logo .rv-chip-rate { position: absolute; top: 9px; left: 9px; }
.rv-emu-card__body { padding: 11px 13px 13px; }
.rv-emu-card h3 {
	margin: 0 0 4px;
	font-size: 13.5px;
	font-weight: 700;
	color: var(--rv-dark);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.rv-emu-card__platform { font-size: 11.5px; color: var(--rv-muted); }
.rv-emu-card__stats {
	margin-top: 9px;
	padding-top: 9px;
	border-top: 1px solid var(--rv-border);
	font-size: 11.5px;
	color: var(--rv-muted);
	display: flex;
	justify-content: space-between;
	gap: 10px;
}
.rv-emu-card__stats span { display: inline-flex; align-items: center; gap: 4px; }
.rv-emu-card__stats svg { width: 12px; height: 12px; stroke-width: 2; }

.rv-post-card {
	background: var(--rv-white);
	border: 1px solid var(--rv-border);
	border-radius: var(--rv-r-lg);
	overflow: hidden;
	transition: .3s;
	box-shadow: var(--rv-shadow-sm);
}
.rv-post-card:hover { border-color: var(--rv-primary); transform: translateY(-6px); box-shadow: var(--rv-shadow); }
.rv-post-card__cover { height: 150px; position: relative; overflow: hidden; }
.rv-post-card__cover img { width: 100%; height: 100%; object-fit: cover; }
.rv-post-card__cover .rv-badge { position: absolute; top: 12px; left: 12px; z-index: 2; }
.rv-post-card__body { padding: 16px 18px 20px; }
.rv-post-card__body h3 { margin: 0 0 8px; font-size: 17px; font-weight: 600; line-height: 1.35; color: var(--rv-text); }
.rv-post-card__body p {
	margin: 0 0 12px;
	font-size: 14px;
	color: var(--rv-muted);
	line-height: 1.6;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.rv-post-card__meta {
	display: flex;
	gap: 16px;
	font-size: 12px;
	color: var(--rv-muted);
	border-top: 1px solid var(--rv-border);
	padding-top: 12px;
}

/* =========================================================================
   10. Carousels
   ========================================================================= */
.rv-carousel-sec { margin-top: 38px; }
.rv-carousel-sec h2 { margin: 0 0 16px; font-size: 19px; font-weight: 700; color: var(--rv-dark); }
.rv-carousel {
	display: flex;
	gap: 18px;
	overflow-x: auto;
	padding-bottom: 14px;
	scroll-snap-type: x mandatory;
	scrollbar-color: #9db0b8 #e7ecef;
}
.rv-carousel::-webkit-scrollbar { height: 7px; }
.rv-carousel::-webkit-scrollbar-track { background: #e7ecef; border-radius: 99px; }
.rv-carousel::-webkit-scrollbar-thumb { background: #9db0b8; border-radius: 99px; }
.rv-carousel .rv-rom-card { flex: 0 0 200px; scroll-snap-align: start; }
.rv-carousel .rv-rom-card:hover { transform: translateY(-6px); box-shadow: var(--rv-shadow); }

/* =========================================================================
   11. Single ROM
   ========================================================================= */
.rv-rom-hero { background: var(--rv-white); padding: 34px 0 46px; }
.rv-rom-hero__grid {
	display: grid;
	grid-template-columns: 150px 1fr auto;
	gap: 32px;
	align-items: start;
}
.rv-rom-hero__poster {
	aspect-ratio: 3 / 4;
	border-radius: var(--rv-r-sm);
	overflow: hidden;
	box-shadow: 0 8px 22px rgba(21, 34, 38, .20);
	position: relative;
	background: var(--rv-surface);
}
.rv-rom-hero__poster img { width: 100%; height: 100%; object-fit: cover; }
.rv-rom-hero__badges { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rv-rom-title {
	margin: 14px 0 12px;
	font-family: var(--rv-font-display);
	font-size: 42px;
	font-weight: 700;
	line-height: 1.1;
	color: var(--rv-dark);
}
.rv-rom-hero__stats {
	display: flex;
	align-items: center;
	gap: 22px;
	flex-wrap: wrap;
	font-size: 14px;
	color: var(--rv-muted);
}
.rv-share-btn {
	width: 40px;
	height: 40px;
	border-radius: var(--rv-r-sm);
	border: 1px solid var(--rv-border);
	background: var(--rv-white);
	display: grid;
	place-items: center;
	cursor: pointer;
	color: var(--rv-muted);
	transition: .2s;
}
.rv-share-btn:hover { border-color: var(--rv-primary); color: var(--rv-primary); }
.rv-share-btn svg { width: 17px; height: 17px; stroke-width: 1.9; }

.rv-rom-body { background: var(--rv-surface); padding: 34px 0 50px; }
.rv-body-grid { display: grid; grid-template-columns: 1fr 320px; gap: 30px; align-items: start; }

.rv-desc h2 { margin: 0 0 14px; font-size: 19px; font-weight: 700; color: var(--rv-dark); }
.rv-desc p { margin: 0 0 16px; font-size: 15px; line-height: 1.95; color: #6b8892; }
.rv-desc p:last-child { margin-bottom: 0; }
.rv-desc ul, .rv-desc ol { margin: 0 0 16px; padding-left: 22px; color: #6b8892; line-height: 1.9; }
.rv-desc h3 { margin: 22px 0 10px; font-size: 17px; font-weight: 600; color: var(--rv-text); }

.rv-report {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 13px 18px;
	margin-top: 18px;
	flex-wrap: wrap;
}
.rv-report__label { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--rv-muted); }
.rv-report__label svg { width: 17px; height: 17px; stroke-width: 1.9; flex: none; }

/* spec sidebar */
.rv-spec { padding: 8px 20px 20px; position: sticky; top: 100px; }
.rv-spec__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 13px 0;
	border-bottom: 1px solid var(--rv-border);
}
.rv-spec__row:last-of-type { border-bottom: 0; }
.rv-spec__k {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-size: 14px;
	color: var(--rv-dark);
	font-weight: 500;
}
.rv-spec__k svg { width: 17px; height: 17px; stroke-width: 1.75; color: var(--rv-muted); flex: none; }
.rv-spec__v { font-size: 14px; font-weight: 600; color: var(--rv-dark); text-align: right; }
.rv-spec__v a { color: var(--rv-primary-dark); }
.rv-spec__v a:hover { text-decoration: underline; }

.rv-download {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	width: 100%;
	height: 52px;
	margin-top: 20px;
	border: 0;
	border-radius: var(--rv-r-sm);
	background: var(--rv-primary);
	color: var(--rv-on-primary);
	font-size: 15px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	cursor: pointer;
	transition: .2s;
}
.rv-download:hover { background: var(--rv-primary-dark); box-shadow: var(--rv-shadow-hover); }
.rv-download svg { width: 18px; height: 18px; stroke-width: 2.2; }
.rv-download[disabled] { opacity: .5; cursor: not-allowed; }

/* Counting down — muted and unclickable, but still clearly the same button. */
.rv-download.is-waiting {
	background: var(--rv-surface);
	color: var(--rv-muted);
	border: 1px solid var(--rv-border);
	cursor: default;
	font-variant-numeric: tabular-nums;
}
.rv-download.is-waiting:hover { background: var(--rv-surface); box-shadow: none; }
.rv-download.is-waiting svg { opacity: .5; }

/* Unlocked — green, so "ready" reads at a glance and not just from the label. */
.rv-download.is-ready {
	background: var(--rv-green);
	color: #fff;
	border-color: var(--rv-green);
	animation: rv-unlock .5s ease-out;
}
.rv-download.is-ready:hover {
	background: var(--rv-green-dark);
	box-shadow: 0 8px 18px rgba(5, 150, 105, .4);
}
.rv-download.is-ready svg { opacity: 1; }

@keyframes rv-unlock {
	0%   { transform: scale(.98); box-shadow: 0 0 0 0 rgba(5, 150, 105, .55); }
	100% { transform: scale(1);   box-shadow: 0 0 0 14px rgba(5, 150, 105, 0); }
}
.rv-download__note { text-align: center; font-size: 12.5px; color: var(--rv-muted); margin: 10px 0 0; }

/* The star row doubles as the vote control — one row, not two. */
.rv-stars--rate .rv-stars__set button {
	border: 0;
	background: none;
	padding: 0 1px;
	cursor: pointer;
	line-height: 0;
}
.rv-stars--rate .rv-stars__set svg { fill: #d3dbdf; transition: fill .15s; }
.rv-stars--rate .rv-stars__set button.is-on svg { fill: var(--rv-primary); }

/* Hovering fills every star, then empties the ones past the cursor. */
.rv-stars--rate:hover .rv-stars__set button svg { fill: var(--rv-primary); }
.rv-stars--rate .rv-stars__set button:hover ~ button svg { fill: #d3dbdf; }

.rv-stars--rate.is-voted .rv-stars__set button { cursor: default; }
.rv-rate__msg { font-size: 12.5px; color: var(--rv-primary-dark); font-weight: 600; }
.rv-rate__msg:empty { display: none; }

/* =========================================================================
   12. Archive
   ========================================================================= */
.rv-archive-hero {
	position: relative;
	overflow: hidden;
	padding: 40px 0 34px;
	background:
		radial-gradient(760px 340px at 12% 0%, var(--rv-hero-glow), transparent 64%),
		radial-gradient(600px 260px at 90% 100%, rgba(255, 255, 255, .09), transparent 62%),
		linear-gradient(150deg, var(--rv-hero-1), var(--rv-hero-3));
}
.rv-archive-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: radial-gradient(rgba(255, 255, 255, .12) 1px, transparent 1px);
	background-size: 22px 22px;
	opacity: .55;
}
.rv-archive-hero .rv-container { position: relative; z-index: 2; }
.rv-archive-hero__top { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.rv-archive-hero__icon {
	width: 76px;
	height: 76px;
	border-radius: var(--rv-r-lg);
	flex: none;
	display: grid;
	place-items: center;
	background: linear-gradient(150deg, #f0b65b, #b4581f);
	font-family: var(--rv-font-display);
	font-size: 26px;
	font-weight: 700;
	color: #fff;
	box-shadow: 0 10px 26px rgba(0, 0, 0, .35);
	overflow: hidden;
	text-align: center;
	padding: 6px;
	line-height: 1.05;
}
.rv-archive-hero h1 {
	font-family: var(--rv-font-display);
	font-size: 38px;
	font-weight: 700;
	color: #fff;
	line-height: 1.1;
}
.rv-archive-hero__sub { margin: 6px 0 0; color: #b7cbd3; font-size: 14.5px; display: flex; gap: 18px; flex-wrap: wrap; }
.rv-archive-hero__sub b { color: var(--rv-primary); }
.rv-archive-hero__desc { margin: 20px 0 0; max-width: 760px; color: #a9bfc7; font-size: 14.5px; line-height: 1.7; }

/* Vertical padding only. A `padding` shorthand here would also reset the
   horizontal padding this element inherits from .rv-container — and because
   the mobile .rv-container rule comes later in the file, the shorthand loses
   and the top spacing disappears entirely. */
.rv-archive-wrap {
	display: grid;
	grid-template-columns: 270px 1fr;
	gap: 30px;
	padding-top: 34px;
	padding-bottom: 60px;
	align-items: start;
}

.rv-fbox {
	background: var(--rv-white);
	border: 1px solid var(--rv-border);
	border-radius: var(--rv-r-lg);
	margin-bottom: 16px;
	overflow: hidden;
}
.rv-fbox > summary {
	list-style: none;
	cursor: pointer;
	padding: 14px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-family: var(--rv-font-display);
	font-size: 15px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--rv-text);
}
.rv-fbox > summary::-webkit-details-marker { display: none; }
.rv-fbox > summary svg { width: 16px; height: 16px; stroke-width: 2.2; color: var(--rv-muted); transition: transform .2s; }
.rv-fbox[open] > summary svg { transform: rotate(180deg); }
.rv-fbox[open] > summary { border-bottom: 1px solid var(--rv-border); }
.rv-fbox__body { padding: 12px 16px 16px; max-height: 260px; overflow-y: auto; }
.rv-chk { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 14px; color: var(--rv-body); cursor: pointer; }
.rv-chk input { width: 17px; height: 17px; accent-color: var(--rv-primary); cursor: pointer; flex: none; }
.rv-chk__n { margin-left: auto; font-size: 11.5px; color: var(--rv-muted); }
.rv-chk:hover { color: var(--rv-primary-dark); }

.rv-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	background: var(--rv-white);
	border: 1px solid var(--rv-border);
	border-radius: var(--rv-r-lg);
	padding: 12px 16px;
	margin-bottom: 18px;
	flex-wrap: wrap;
}
.rv-toolbar__left { font-size: 14px; color: var(--rv-muted); }
.rv-toolbar__left b { color: var(--rv-text); }
.rv-toolbar__right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rv-toolbar .rv-select { height: 38px; width: auto; font-size: 13.5px; border-radius: var(--rv-r-sm); }

.rv-view-toggle { display: inline-flex; border: 1px solid var(--rv-border); border-radius: var(--rv-r-sm); overflow: hidden; }
.rv-view-toggle a {
	background: var(--rv-white);
	padding: 8px 11px;
	cursor: pointer;
	color: var(--rv-muted);
	display: grid;
	place-items: center;
	transition: background .2s, color .2s;
}
.rv-view-toggle a:hover { color: var(--rv-primary-dark); }
.rv-view-toggle a.is-on { background: var(--rv-primary); color: var(--rv-on-primary); }
.rv-view-toggle svg { width: 16px; height: 16px; stroke-width: 1.9; }

/* icon standing in for an archive letter tile */
.rv-archive-hero__icon svg { width: 32px; height: 32px; stroke-width: 1.8; }

.rv-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.rv-chip {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	background: var(--rv-primary-soft);
	border: 1px solid var(--rv-primary);
	color: var(--rv-primary-dark);
	padding: 5px 11px;
	border-radius: 999px;
	font-size: 12.5px;
	font-weight: 600;
}
.rv-chip--clear { background: none; border-color: var(--rv-border); color: var(--rv-muted); }

.rv-pagination { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 34px; flex-wrap: wrap; }
.rv-pagination .page-numbers {
	min-width: 42px;
	height: 42px;
	padding: 0 12px;
	display: grid;
	place-items: center;
	border-radius: var(--rv-r-sm);
	background: var(--rv-white);
	border: 1px solid var(--rv-border);
	font-size: 14px;
	font-weight: 600;
	color: var(--rv-text);
	transition: .2s;
}
.rv-pagination a.page-numbers:hover { border-color: var(--rv-primary); color: var(--rv-primary-dark); }
.rv-pagination .page-numbers.current { background: var(--rv-primary); border-color: var(--rv-primary); color: var(--rv-on-primary); }
.rv-pagination .page-numbers.dots { border: 0; background: none; color: var(--rv-muted); }

.rv-seo-block { margin-top: 40px; }
.rv-seo-block h2 { margin: 0 0 12px; font-family: var(--rv-font-display); font-size: 22px; font-weight: 700; color: var(--rv-text); }
.rv-seo-block p { font-size: 15px; line-height: 1.75; color: var(--rv-body); }

.rv-empty { text-align: center; padding: 60px 20px; color: var(--rv-muted); }
.rv-empty h2 { font-family: var(--rv-font-display); font-size: 24px; color: var(--rv-text); margin-bottom: 10px; }

/* =========================================================================
   13. Single post / page
   ========================================================================= */
.rv-post-cover { position: relative; height: 340px; overflow: hidden; background: linear-gradient(140deg, #2563eb, #0b2a5b); }
.rv-post-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rv-post-cover::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: radial-gradient(rgba(255, 255, 255, .13) 1px, transparent 1px);
	background-size: 22px 22px;
	z-index: 1;
}
.rv-post-cover__shade {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(10, 18, 21, .94) 8%, rgba(10, 18, 21, .35) 60%, transparent);
	z-index: 2;
}
.rv-post-cover__inner { position: absolute; inset: auto 0 0 0; padding-bottom: 32px; z-index: 3; }
.rv-post-cover h1 {
	margin: 14px 0 0;
	font-family: var(--rv-font-display);
	font-size: 42px;
	line-height: 1.12;
	font-weight: 700;
	color: #fff;
	max-width: 820px;
}
.rv-post-meta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 16px; color: #bdd0d8; font-size: 13.5px; }
.rv-post-meta .rv-who { display: flex; align-items: center; gap: 9px; color: #fff; font-weight: 600; }
.rv-avatar {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	overflow: hidden;
	background: linear-gradient(150deg, #f0b65b, #b4581f);
	display: grid;
	place-items: center;
	font-family: var(--rv-font-display);
	font-weight: 700;
	color: #fff;
	font-size: 15px;
	flex: none;
}
.rv-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Longhand for the same reason as .rv-archive-wrap above. */
.rv-post-wrap {
	display: grid;
	grid-template-columns: 1fr 320px;
	gap: 36px;
	padding-top: 34px;
	padding-bottom: 60px;
	align-items: start;
}

.rv-article {
	background: var(--rv-white);
	border: 1px solid var(--rv-border);
	border-radius: var(--rv-r-xl);
	padding: 34px 38px;
	box-shadow: var(--rv-shadow-sm);
}
.rv-article > p { font-size: 16px; line-height: 1.8; color: var(--rv-body); }
.rv-article h2 {
	font-family: var(--rv-font-display);
	font-size: 26px;
	font-weight: 700;
	color: var(--rv-text);
	margin: 34px 0 14px;
	padding-left: 14px;
	border-left: 4px solid var(--rv-primary);
	line-height: 1.25;
	scroll-margin-top: 100px;
}
.rv-article h3 { font-size: 19px; font-weight: 600; color: var(--rv-text); margin: 26px 0 10px; }
.rv-article h4 { font-size: 17px; font-weight: 600; color: var(--rv-text); margin: 22px 0 8px; }
.rv-article ul, .rv-article ol { margin: 0 0 18px; padding-left: 24px; color: var(--rv-body); line-height: 1.8; }
.rv-article li { margin-bottom: 8px; }
.rv-article blockquote {
	margin: 26px 0;
	padding: 20px 24px;
	background: var(--rv-surface);
	border-left: 4px solid var(--rv-primary);
	border-radius: 0 var(--rv-r) var(--rv-r) 0;
}
.rv-article blockquote p { margin: 0; font-size: 17px; font-style: italic; color: var(--rv-text); }
.rv-article blockquote cite { display: block; margin-top: 10px; font-size: 13px; font-style: normal; font-weight: 600; color: var(--rv-muted); }
.rv-article img { border-radius: var(--rv-r-lg); }
.rv-article figure { margin: 26px 0; }
.rv-article figcaption { margin-top: 9px; font-size: 13px; color: var(--rv-muted); text-align: center; }
.rv-article code {
	background: var(--rv-surface);
	border: 1px solid var(--rv-border);
	border-radius: 4px;
	padding: 1px 6px;
	font-size: .9em;
}
.rv-article pre {
	background: var(--rv-dark);
	color: #e6eef1;
	padding: 18px 20px;
	border-radius: var(--rv-r);
	overflow-x: auto;
}
.rv-article pre code { background: none; border: 0; color: inherit; }
.rv-article table { width: 100%; border-collapse: collapse; margin: 0 0 20px; }
.rv-article th, .rv-article td { border: 1px solid var(--rv-border); padding: 10px 12px; text-align: left; font-size: 14.5px; }
.rv-article th { background: var(--rv-surface); font-weight: 600; }

.rv-tags {
	display: flex;
	align-items: center;
	gap: 9px;
	flex-wrap: wrap;
	margin-top: 30px;
	padding-top: 22px;
	border-top: 1px solid var(--rv-border);
}
.rv-tags__label,
.rv-share__label {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--rv-muted);
}
.rv-share { display: flex; align-items: center; gap: 9px; margin-top: 18px; flex-wrap: wrap; }
.rv-share a {
	width: 36px;
	height: 36px;
	border-radius: var(--rv-r-sm);
	border: 1px solid var(--rv-border);
	display: grid;
	place-items: center;
	color: var(--rv-muted);
	transition: .2s;
}
.rv-share a:hover { background: var(--rv-primary); border-color: var(--rv-primary); color: var(--rv-on-primary); }
.rv-share svg { width: 16px; height: 16px; stroke-width: 1.9; }

.rv-author-box {
	display: flex;
	gap: 18px;
	align-items: flex-start;
	margin-top: 24px;
	padding: 24px;
	background: var(--rv-white);
	border: 1px solid var(--rv-border);
	border-radius: var(--rv-r-xl);
	box-shadow: var(--rv-shadow-sm);
}
.rv-author-box .rv-avatar { width: 64px; height: 64px; font-size: 26px; }
.rv-author-box h4 { margin: 0 0 3px; font-size: 17px; font-weight: 600; color: var(--rv-text); }
.rv-author-box p { margin: 0; font-size: 14px; line-height: 1.7; color: var(--rv-muted); }

.rv-prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 24px; }
.rv-pn {
	background: var(--rv-white);
	border: 1px solid var(--rv-border);
	border-radius: var(--rv-r-lg);
	padding: 18px 20px;
	transition: .25s;
}
.rv-pn:hover { border-color: var(--rv-primary); transform: translateY(-3px); box-shadow: var(--rv-shadow); }
.rv-pn__dir {
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--rv-muted);
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 7px;
}
.rv-pn svg { width: 14px; height: 14px; stroke-width: 2.2; }
.rv-pn h4 { margin: 0; font-size: 15.5px; font-weight: 600; color: var(--rv-text); line-height: 1.4; }
.rv-pn--next { text-align: right; }
.rv-pn--next .rv-pn__dir { justify-content: flex-end; }

/* =========================================================================
   14. Sidebar widgets
   ========================================================================= */
.rv-sidebar .rv-card + .rv-card { margin-top: 22px; }
.rv-sidebar .rv-card { padding: 20px; }
.rv-widget-title,
.rv-sidebar .rv-card h2 {
	margin: 0 0 14px;
	font-family: var(--rv-font-display);
	font-size: 18px;
	font-weight: 700;
	color: var(--rv-text);
	padding-bottom: 9px;
	border-bottom: 1px solid var(--rv-border);
}
.rv-sidebar ul { list-style: none; margin: 0; padding: 0; }
.rv-sidebar .widget ul li { padding: 7px 0; border-bottom: 1px solid var(--rv-border); font-size: 14px; }
.rv-sidebar .widget ul li:last-child { border-bottom: 0; }
.rv-sidebar .widget a:hover { color: var(--rv-primary-dark); }

.rv-side-list li {
	display: flex;
	gap: 12px;
	align-items: center;
	padding: 9px 0;
	border-bottom: 1px solid var(--rv-border);
}
.rv-side-list li:last-child { border-bottom: 0; }
.rv-side-list__thumb {
	width: 52px;
	height: 52px;
	border-radius: var(--rv-r-sm);
	flex: none;
	overflow: hidden;
	position: relative;
	background: var(--rv-surface);
	display: grid;
	place-items: center;
	font-family: var(--rv-font-display);
	font-weight: 700;
	color: #fff;
	font-size: 16px;
}
.rv-side-list__thumb img { width: 100%; height: 100%; object-fit: cover; }
.rv-side-list h4 { margin: 0 0 2px; font-size: 13.5px; font-weight: 600; color: var(--rv-text); line-height: 1.35; }
.rv-side-list__sub { font-size: 11.5px; color: var(--rv-muted); }
.rv-rank { font-family: var(--rv-font-display); font-size: 18px; font-weight: 700; color: var(--rv-border); width: 20px; flex: none; text-align: center; }

.rv-card--dark { background: var(--rv-dark); border-color: var(--rv-dark); }
.rv-card--dark h2 { color: #fff; border-color: rgba(255, 255, 255, .12); }
.rv-card--dark p { color: #a9bfc7; font-size: 14px; }

/* =========================================================================
   15. Comments
   ========================================================================= */
.rv-comments__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; gap: 12px; }
.rv-comments__head h2 { margin: 0; font-size: 19px; font-weight: 700; color: var(--rv-dark); }
.rv-count-badge {
	min-width: 28px;
	height: 28px;
	padding: 0 9px;
	border-radius: 999px;
	background: var(--rv-surface);
	border: 1px solid var(--rv-border);
	display: grid;
	place-items: center;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--rv-muted);
}
.rv-comment-list { list-style: none; margin: 0 0 10px; padding: 0; }
.rv-comment-list .children { list-style: none; margin: 0 0 0 58px; padding-left: 18px; border-left: 2px solid var(--rv-border); }
.rv-comment { display: flex; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--rv-border); }
.rv-comment:last-child { border-bottom: 0; }
.rv-comment .rv-avatar { width: 44px; height: 44px; font-size: 18px; }
.rv-comment__top { display: flex; align-items: center; gap: 10px; margin-bottom: 5px; flex-wrap: wrap; }
.rv-comment__top b { font-size: 14.5px; color: var(--rv-text); }
.rv-comment__top time { font-size: 12px; color: var(--rv-muted); }
.rv-comment__body p { margin: 0 0 7px; font-size: 14.5px; line-height: 1.7; color: var(--rv-body); }
.rv-comment__actions { font-size: 12.5px; font-weight: 600; color: var(--rv-muted); display: flex; gap: 14px; }
.rv-comment__actions a:hover { color: var(--rv-primary-dark); }

.comment-form { margin-top: 4px; }
.rv-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 16px; }
.rv-field-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--rv-dark); margin-bottom: 7px; }
.rv-field-label .required { color: var(--rv-red); }
.rv-input,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	height: 44px;
	border: 1px solid var(--rv-border);
	border-radius: var(--rv-r-sm);
	padding: 0 14px;
	background: var(--rv-surface);
	outline: none;
	font-size: 14px;
	transition: .2s;
}
.comment-form textarea,
textarea.rv-input { height: 96px; padding: 12px 14px; resize: vertical; }
.rv-input::placeholder { color: var(--rv-faint); }
.rv-input:focus,
.comment-form input:focus,
.comment-form textarea:focus {
	border-color: var(--rv-primary);
	background: #fff;
	box-shadow: 0 0 0 3px var(--rv-primary-soft);
}
.comment-form .form-submit { margin: 16px 0 0; }
.comment-form input[type="submit"] {
	height: 42px;
	padding: 0 22px;
	border: 0;
	border-radius: var(--rv-r-sm);
	background: var(--rv-primary);
	color: var(--rv-dark);
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
}
.comment-form input[type="submit"]:hover { background: var(--rv-primary-dark); }
.comment-form .comment-notes,
.comment-form .logged-in-as { font-size: 12.5px; color: var(--rv-muted); }

.rv-comments__empty { text-align: center; padding: 44px 0 8px; }
.rv-comments__empty svg { width: 34px; height: 34px; stroke-width: 1.5; color: #c3d0d6; margin: 0 auto 12px; }
.rv-comments__empty p { margin: 0; font-size: 14px; color: var(--rv-muted); }

/* =========================================================================
   16. Footer
   ========================================================================= */
.rv-footer { background: var(--rv-white); padding: 38px 0 26px; }
.rv-footer__nav { display: flex; align-items: center; justify-content: center; gap: 26px; flex-wrap: wrap; padding-bottom: 26px; }
.rv-footer__nav ul { display: flex; align-items: center; justify-content: center; gap: 26px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.rv-footer__nav a { font-size: 13.5px; color: var(--rv-muted); transition: .2s; }
.rv-footer__nav a:hover { color: var(--rv-primary); }
.rv-footer__bottom {
	border-top: 1px solid var(--rv-border);
	padding-top: 24px;
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 20px;
}
.rv-footer__copy { font-size: 13.5px; color: var(--rv-muted); text-align: center; }
.rv-socials { display: flex; justify-content: flex-end; gap: 9px; }
.rv-socials a {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--rv-surface);
	display: grid;
	place-items: center;
	color: var(--rv-dark);
	transition: .2s;
}
.rv-socials a:hover { background: var(--rv-primary); color: #fff; }
.rv-socials svg { width: 14px; height: 14px; fill: currentColor; stroke: none; }

.rv-to-top {
	position: fixed;
	right: 26px;
	bottom: 26px;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	border: 0;
	background: var(--rv-primary);
	color: var(--rv-on-primary);
	display: grid;
	place-items: center;
	cursor: pointer;
	box-shadow: 0 6px 18px var(--rv-primary-soft);
	z-index: 60;
	opacity: 0;
	visibility: hidden;
	transition: opacity .25s, visibility .25s, background .2s;
}
.rv-to-top.is-visible { opacity: 1; visibility: visible; }
.rv-to-top:hover { background: var(--rv-primary-dark); }
.rv-to-top svg { width: 19px; height: 19px; stroke-width: 2.4; }

/* =========================================================================
   17. WordPress core classes
   ========================================================================= */
.alignleft  { float: left; margin: 6px 24px 18px 0; }
.alignright { float: right; margin: 6px 0 18px 24px; }
.aligncenter { display: block; margin: 18px auto; }
.alignwide, .alignfull { max-width: 100%; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 13px; color: var(--rv-muted); text-align: center; margin-top: 8px; }
.sticky .rv-post-card { border-color: var(--rv-primary); }
.bypostauthor > .rv-comment .rv-comment__top b::after {
	content: attr(data-author-label);
}

/* =========================================================================
   18. Responsive
   ========================================================================= */
/* Nothing may push the page sideways. Long words, wide tables and code blocks
   are the usual culprits. */
body { overflow-wrap: break-word; }
.rv-article table { display: block; overflow-x: auto; max-width: 100%; }

/* The archive filter drawer trigger — desktop keeps the sidebar open. */
.rv-filter-toggle { display: none; }

@media (max-width: 1200px) {
	.rv-grid { grid-template-columns: repeat(4, 1fr); }
	.rv-archive-wrap { grid-template-columns: 240px 1fr; gap: 22px; }
}

@media (max-width: 1100px) {
	.rv-post-wrap,
	.rv-body-grid { grid-template-columns: 1fr; }
	.rv-spec { position: static; }
	.rv-grid--4 { grid-template-columns: repeat(3, 1fr); }
	.rv-grid--3 { grid-template-columns: repeat(2, 1fr); }
	.rv-searchbox__filters { grid-template-columns: repeat(2, 1fr); }
	.rv-searchbox__title { font-size: 25px; }

	/* Filters collapse behind a button so the results stay at the top of the
	   page instead of below a wall of checkboxes. */
	.rv-archive-wrap { grid-template-columns: 1fr; }
	.rv-filter-toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		gap: 8px;
		width: 100%;
		height: 46px;
		border: 1px solid var(--rv-border);
		border-radius: var(--rv-r);
		background: var(--rv-white);
		color: var(--rv-text);
		font-weight: 600;
		font-size: 14px;
		cursor: pointer;
	}
	.rv-filter-toggle svg { width: 17px; height: 17px; stroke-width: 1.9; }
	.rv-filter-toggle[aria-expanded="true"] { border-color: var(--rv-primary); color: var(--rv-primary-dark); }
	.rv-filters { display: none; }
	.rv-filters.is-open { display: block; margin-top: 14px; }
	.rv-fbox__body { max-height: none; }
}

@media (max-width: 900px) {
	.rv-nav { display: none; }
	.rv-burger { display: grid; }
	.rv-header__inner { grid-template-columns: 1fr auto; }
	.rv-toolbar { flex-direction: column; align-items: stretch; }
	.rv-toolbar__right { justify-content: space-between; }
	.rv-toolbar .rv-select { flex: 1; min-width: 0; }
}

@media (max-width: 820px) {
	.rv-container { padding: 0 16px; }
	.rv-header__inner { height: 64px; }
	.rv-logo { font-size: 18px; }

	.rv-grid,
	.rv-grid--4 { grid-template-columns: repeat(2, 1fr); }
	.rv-grid--3, .rv-grid--2 { grid-template-columns: 1fr; }
	.rv-section { padding: 34px 0; }
	.rv-section-head h2 { font-size: 24px; }

	.rv-hero { height: 230px; }
	.rv-intro { padding-top: 6px; }
	.rv-intro__heading { font-size: 23px; }
	.rv-intro__text { font-size: 14.5px; }
	.rv-searchwrap { padding: 0 0 30px; }
	.rv-searchbox { padding: 20px 18px; margin-top: -46px; }
	.rv-searchbox__title { font-size: 21px; margin-bottom: 18px; }
	.rv-searchbox__filters { grid-template-columns: 1fr; }
	.rv-searchbox__q input { padding-right: 16px; }
	/* The button drops below the field here, so the wrapper is taller than the
	   input. Centre the icon on the input's own height instead of the
	   wrapper's, or it lands in the gap between the two. */
	.rv-searchbox__q > svg { top: 25px; transform: translateY(-50%); }
	.rv-searchbox__submit { position: static; width: 100%; margin-top: 10px; height: 44px; justify-content: center; }
	.rv-searchbox__foot { flex-direction: column; align-items: stretch; }
	.rv-searchbox__foot .rv-icon-select { min-width: 0; }
	.rv-searchbox__foot .rv-btn { width: 100%; }

	.rv-archive-hero { padding: 26px 0 24px; }
	.rv-archive-hero h1 { font-size: 26px; }
	.rv-archive-hero__icon { width: 54px; height: 54px; font-size: 19px; }
	.rv-archive-hero__sub { gap: 12px; font-size: 13px; }

	.rv-rom-hero { padding: 24px 0 30px; }
	.rv-rom-hero__grid { grid-template-columns: 110px 1fr; gap: 18px; }
	.rv-share-btn { display: none; }
	.rv-rom-title { font-size: 26px; margin: 10px 0; }
	.rv-rom-hero__stats { gap: 14px; font-size: 13px; }
	.rv-rom-body { padding: 24px 0 36px; }
	.rv-card__pad { padding: 20px; }
	.rv-report { flex-direction: column; align-items: flex-start; }

	/* List rows stack rather than squeezing five columns into 320px. */
	.rv-rom-row { flex-wrap: wrap; padding: 14px; }
	.rv-rom-row__main { flex: 1 1 60%; }
	.rv-rom-row__side { flex: 1 1 100%; justify-content: space-between; gap: 12px; padding-left: 72px; }

	.rv-carousel .rv-rom-card { flex: 0 0 150px; }

	.rv-post-cover { height: 260px; }
	.rv-post-cover h1 { font-size: 25px; }
	.rv-post-meta { gap: 12px; font-size: 12.5px; }
	.rv-post-wrap { padding-top: 24px; padding-bottom: 40px; gap: 24px; }
	.rv-archive-wrap { padding-top: 26px; padding-bottom: 40px; }
	.rv-article { padding: 22px 18px; }
	.rv-article h2 { font-size: 22px; margin-top: 26px; }
	.rv-article h3 { font-size: 17px; }
	.rv-prevnext { grid-template-columns: 1fr; }
	.rv-pn--next { text-align: left; }
	.rv-pn--next .rv-pn__dir { justify-content: flex-start; }
	.rv-author-box { flex-direction: column; gap: 12px; }

	.rv-form-grid { grid-template-columns: 1fr; }
	.rv-comment-list .children { margin-left: 16px; padding-left: 12px; }

	.rv-footer { padding: 30px 0 22px; }
	.rv-footer__nav ul { gap: 14px 18px; }
	.rv-footer__bottom { grid-template-columns: 1fr; justify-items: center; gap: 14px; }
	.rv-footer__nav { padding-bottom: 20px; }
	.rv-socials { justify-content: center; }
	.rv-to-top { right: 16px; bottom: 16px; }
}

@media (max-width: 560px) {
	.rv-crumbs { font-size: 12.5px; }
	.rv-crumbs ol { gap: 7px; }
	.rv-crumbs li { gap: 7px; }
	.rv-rom-hero__grid { grid-template-columns: 96px 1fr; }
	.rv-rom-title { font-size: 22px; }
	.rv-spec { padding: 6px 16px 16px; }
	.rv-spec__row { padding: 11px 0; }
	.rv-spec__k, .rv-spec__v { font-size: 13.5px; }

	/* Long values wrap under their label instead of squashing it. */
	.rv-spec__row { flex-wrap: wrap; }
	.rv-spec__v { flex: 1 1 100%; text-align: left; padding-left: 27px; }

	.rv-rom-row__side { padding-left: 0; }
	.rv-rom-row__side .rv-btn { display: none; }
	.rv-post-cover { height: 220px; }
	.rv-post-cover h1 { font-size: 21px; }
	.rv-pagination .page-numbers { min-width: 38px; height: 38px; padding: 0 9px; font-size: 13px; }
}

@media (max-width: 400px) {
	.rv-grid,
	.rv-grid--4 { grid-template-columns: 1fr; }
	.rv-carousel .rv-rom-card { flex: 0 0 140px; }
	.rv-searchbox__title { font-size: 19px; }
}

/* Fine on a mouse, unusable on a finger — give every control a real target. */
@media (hover: none) {
	.rv-icon-btn,
	.rv-view-toggle a,
	.rv-share a,
	.rv-socials a { min-width: 40px; min-height: 40px; }
	.rv-rom-card:hover { transform: none; box-shadow: var(--rv-shadow-sm); }
	.rv-post-card:hover,
	.rv-emu-card:hover,
	.rv-pn:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: .01ms !important;
		transition-duration: .01ms !important;
		scroll-behavior: auto !important;
	}
}
