/*
Theme Name: House of the Game
Theme URI: https://houseofthegame.com/
Author: HOUSE OF THE GAME
Description: Editorial gaming magazine theme. Cinematic cover story, per-category accent colours, live search and a working game filter. Categories act as games; the Story Type taxonomy marks a post as Feature, Retrospective or News.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.1
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: house-of-the-game
Tags: blog, news, magazine, two-columns, custom-menu, featured-images, translation-ready
*/

/* ============================================================
   HOUSE OF THE GAME — editorial gaming stylesheet
   ============================================================ */

:root {
  --navy:        #0B101C;
  --ink:         #060911;
  --surface:     #111726;
  --surface-2:   #161E31;
  --white:       #F4F6FB;
  --muted:       rgba(244, 246, 251, 0.70);
  --muted-soft:  rgba(244, 246, 251, 0.52);
  --rule:        rgba(244, 246, 251, 0.13);
  --rule-strong: rgba(244, 246, 251, 0.26);
  --cyan:        #43D9FF;

  --accent:      var(--cyan);
  --accent-text: var(--cyan);

  --display: "Barlow Condensed", "Oswald", "Arial Narrow", "Liberation Sans Narrow",
             "DejaVu Sans Condensed", "Helvetica Neue Condensed", "Roboto Condensed", sans-serif;
  --body:    "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  --wrap: 1240px;
  --gut:  clamp(1rem, 4vw, 2.5rem);
  --r:    4px;
}

*, *::before, *::after { box-sizing: border-box; }

/* The hidden attribute must win over any display rule below (feed filtering relies on it). */
[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--navy);
  color: var(--white);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; height: auto; }
a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.005em;
  margin: 0;
  text-wrap: balance;
}

:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 2px;
}
:focus:not(:focus-visible) { outline: none; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }

.skip-link {
  position: absolute; left: 50%; top: 0; transform: translate(-50%, -140%);
  z-index: 200; background: var(--cyan); color: var(--ink);
  font-weight: 700; padding: .75rem 1.5rem; text-decoration: none;
  transition: transform .18s ease;
}
.skip-link:focus { transform: translate(-50%, 0); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------------------------------------------------------- eyebrow labels */
.label {
  font-family: var(--display);
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: .17em;
  text-transform: uppercase;
  line-height: 1;
}
.label--game { color: var(--accent-text); }
.label--kind { color: var(--muted-soft); }

.meta-row {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: .55rem .75rem; margin-bottom: .85rem;
}
.accent-rule { display: block; }

.meta-row .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--rule-strong); flex: none; }
.meta-row time { font-size: .8rem; color: var(--muted-soft); letter-spacing: .04em; }

/* ================================================================= HEADER */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11, 16, 28, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
}
.header-bar {
  display: flex; align-items: center; gap: 1.25rem;
  min-height: 74px; flex-wrap: wrap;
}

.wordmark {
  font-family: var(--display); font-weight: 700;
  font-size: 1.32rem; letter-spacing: .13em; text-transform: uppercase;
  text-decoration: none; color: var(--white); white-space: nowrap;
  display: inline-flex; align-items: baseline; gap: .4em; margin-right: auto;
}
.wordmark .wm-mid { color: var(--cyan); font-size: .72em; letter-spacing: .2em; }
.wordmark:hover { color: var(--cyan); }

.nav-toggle {
  display: none; align-items: center; gap: .5rem;
  background: none; border: 1px solid var(--rule-strong); color: var(--white);
  font-family: var(--display); font-size: .95rem; letter-spacing: .15em;
  text-transform: uppercase; padding: .5rem .85rem; border-radius: var(--r); cursor: pointer;
}
.nav-toggle:hover { border-color: var(--cyan); color: var(--cyan); }
.nav-toggle .bars { display: inline-block; width: 16px; height: 2px; background: currentColor; position: relative; }
.nav-toggle .bars::before, .nav-toggle .bars::after {
  content: ""; position: absolute; left: 0; width: 16px; height: 2px; background: currentColor;
}
.nav-toggle .bars::before { top: -5px; }
.nav-toggle .bars::after  { top: 5px; }
.nav-toggle[aria-expanded="true"] { border-color: var(--cyan); color: var(--cyan); }

.drawer { display: flex; align-items: center; gap: 1.5rem; }

.nav > ul { display: flex; align-items: center; gap: 1.4rem; list-style: none; margin: 0; padding: 0; }
.nav a, .nav .submenu-btn {
  font-family: var(--display); font-weight: 600; font-size: 1.02rem;
  letter-spacing: .14em; text-transform: uppercase; text-decoration: none;
  color: var(--white); background: none; border: 0; padding: .35rem 0; cursor: pointer;
  position: relative; display: inline-flex; align-items: center; gap: .4rem;
}
.nav a::after, .nav .submenu-btn::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--cyan); transform: scaleX(0); transform-origin: left; transition: transform .2s ease;
}
.nav a:hover::after, .nav .submenu-btn:hover::after,
.nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a:hover, .nav .submenu-btn:hover { color: var(--cyan); }
.nav a[aria-current="page"] { color: var(--cyan); }

.submenu-btn .caret { width: 0; height: 0; border: 4px solid transparent; border-top-color: currentColor; margin-top: 3px; }
.submenu-btn[aria-expanded="true"] .caret { transform: rotate(180deg); margin-top: -3px; }

.has-menu { position: relative; }
.submenu {
  display: none; list-style: none; margin: 0; padding: .5rem;
  position: absolute; top: calc(100% + 10px); left: -.75rem; min-width: 232px;
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--r); box-shadow: 0 24px 50px rgba(0,0,0,.55);
}
.submenu-btn[aria-expanded="true"] + .submenu { display: block; }
@media (hover: hover) and (min-width: 900px) { .has-menu:hover .submenu { display: block; } }
.submenu a {
  display: flex; align-items: center; gap: .6rem; padding: .55rem .7rem;
  font-family: var(--body); font-size: .92rem; font-weight: 500;
  letter-spacing: .01em; text-transform: none; border-radius: 3px; width: 100%;
}
.submenu a::after { display: none; }
.submenu a:hover, .submenu a:focus-visible { background: var(--surface-2); color: var(--white); }
.submenu .swatch { width: 9px; height: 9px; border-radius: 2px; background: var(--accent); flex: none; }

/* ---------------------------------------------------------------- search */
.search { position: relative; }
.search-field {
  display: flex; align-items: center; gap: .5rem;
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--r); padding: .45rem .7rem; min-width: 230px;
}
.search-field:focus-within { border-color: var(--cyan); }
.search-field svg { flex: none; opacity: .6; }
.search input {
  background: none; border: 0; color: var(--white);
  font-family: var(--body); font-size: .92rem; width: 100%; padding: .1rem 0;
}
.search input::placeholder { color: var(--muted-soft); }
.search input:focus { outline: none; }

.search-results {
  position: absolute; top: calc(100% + 8px); right: 0; width: min(430px, 86vw);
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r);
  box-shadow: 0 24px 50px rgba(0,0,0,.6); padding: .4rem; margin: 0; list-style: none;
  max-height: 68vh; overflow-y: auto; display: none; z-index: 120;
}
.search-results.is-open { display: block; }
.search-results li { margin: 0; }
.search-results a, .search-empty {
  display: block; padding: .6rem .7rem; text-decoration: none; border-radius: 3px;
}
.search-results a:hover, .search-results a:focus-visible, .search-results a.is-active {
  background: var(--surface-2); outline: none;
}
.search-results .r-title { display: block; font-weight: 600; font-size: .94rem; line-height: 1.35; }
.search-results .r-meta { display: block; font-size: .76rem; color: var(--muted-soft); margin-top: .2rem; letter-spacing: .04em; }
.search-results .r-meta b { color: var(--accent-text); font-weight: 600; }
.search-results mark { background: rgba(67,217,255,.22); color: var(--white); border-radius: 2px; padding: 0 1px; }
.search-empty { color: var(--muted-soft); font-size: .9rem; }

/* ================================================================ FEATURED */
.section { padding-block: clamp(2.75rem, 6vw, 4.75rem); }
.section + .section { padding-top: clamp(1.9rem, 3.6vw, 3rem); }
main > .section:first-child { padding-top: clamp(1.8rem, 3.2vw, 2.75rem); }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1.25rem; flex-wrap: wrap; margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--rule); padding-bottom: .9rem;
}
.section-head h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.45rem); text-transform: uppercase; letter-spacing: .02em;
}
.section-head .more {
  font-family: var(--display); font-size: 1rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--cyan); text-decoration: none; white-space: nowrap;
}
.section-head .more:hover { text-decoration: underline; text-underline-offset: 4px; }

.featured { display: grid; grid-template-columns: 1.52fr 1fr; gap: clamp(1.5rem, 3vw, 2.75rem); align-items: start; }

.cover { position: relative; text-decoration: none; display: block; }
.cover-media {
  position: relative; overflow: hidden; border-radius: var(--r);
  aspect-ratio: 16 / 9; background: var(--ink);
  border: 1px solid var(--rule);
}
.cover-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.3,1); }
.cover:hover .cover-media img { transform: scale(1.035); }
.cover-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(6,9,17,.92) 2%, rgba(6,9,17,.35) 38%, rgba(6,9,17,0) 70%);
}
.cover-body { position: absolute; left: 0; right: 0; bottom: 0; padding: clamp(1.1rem, 2.4vw, 2.1rem); z-index: 2; }
.cover h2, .cover h1 {
  font-size: clamp(2rem, 4.4vw, 3.5rem); text-transform: uppercase; margin-bottom: .6rem;
}
.cover .dek { color: var(--muted); max-width: 54ch; margin: 0 0 1.15rem; font-size: 1.02rem; }
.cover .accent-rule { width: 54px; height: 3px; background: var(--accent); margin-bottom: 1rem; }

.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--display); font-weight: 600; font-size: 1rem;
  letter-spacing: .15em; text-transform: uppercase;
  background: var(--white); color: var(--ink); text-decoration: none;
  padding: .72rem 1.35rem; border-radius: var(--r); border: 0;
  transition: background .18s ease, color .18s ease;
}
.btn:hover { background: var(--accent); color: var(--ink); }
.btn .arrow { transition: transform .18s ease; }
.btn:hover .arrow { transform: translateX(3px); }

.featured-side { display: grid; gap: 1.5rem; }
.side-story {
  display: grid; grid-template-columns: 116px 1fr; gap: 1rem;
  text-decoration: none; padding-top: 1.25rem; border-top: 1px solid var(--rule);
}
.featured-side .side-story:first-child { border-top: 0; padding-top: 0; }
.side-story .thumb { aspect-ratio: 4 / 3; overflow: hidden; border-radius: 3px; background: var(--ink); }
.side-story .thumb img { width: 100%; height: 100%; object-fit: cover; }
.side-story h3 { font-size: 1.32rem; text-transform: uppercase; margin-bottom: .4rem; }
.side-story:hover h3 { color: var(--accent-text); }
.side-story p { margin: 0; font-size: .88rem; color: var(--muted-soft); line-height: 1.5; }

/* =================================================================== FEED */
.filters { display: flex; flex-wrap: wrap; gap: .55rem; margin-bottom: 2rem; }
.filter {
  font-family: var(--display); font-weight: 600; font-size: .95rem;
  letter-spacing: .13em; text-transform: uppercase;
  background: none; color: var(--muted); cursor: pointer;
  border: 1px solid var(--rule); border-radius: 100px; padding: .48rem 1.05rem;
  display: inline-flex; align-items: center; gap: .5rem;
  transition: color .16s ease, border-color .16s ease, background .16s ease;
}
.filter .swatch { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.filter:hover { color: var(--white); border-color: var(--rule-strong); }
.filter[aria-pressed="true"] {
  color: var(--ink); background: var(--white); border-color: var(--white);
}
.filter[aria-pressed="true"] .swatch { box-shadow: 0 0 0 2px rgba(6,9,17,.25); }

.feed {
  display: grid; gap: clamp(1.6rem, 2.6vw, 2.4rem);
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  list-style: none; margin: 0; padding: 0;
}
.feed[hidden] { display: none; }

.card { display: flex; flex-direction: column; height: 100%; }
.card > a { text-decoration: none; display: flex; flex-direction: column; height: 100%; }
.card-media {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  border-radius: var(--r); background: var(--ink); border: 1px solid var(--rule);
}
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2,.7,.3,1); }
.card:hover .card-media img { transform: scale(1.04); }
.card-media .strip { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--accent); }
.card-body { padding-top: 1rem; display: flex; flex-direction: column; flex: 1; }
.card h3 { font-size: 1.5rem; text-transform: uppercase; margin-bottom: .55rem; }
.card:hover h3 { color: var(--accent-text); }
.card p { margin: 0; color: var(--muted-soft); font-size: .92rem; line-height: 1.55; }

.feed-status { color: var(--muted-soft); font-size: .9rem; margin: 0 0 1.4rem; }
.no-results {
  border: 1px dashed var(--rule-strong); border-radius: var(--r);
  padding: 2.5rem 1.5rem; text-align: center; color: var(--muted);
}
.no-results[hidden] { display: none; }

/* ========================================================= BROWSE BY GAME */
.game-grid { display: grid; gap: 1.15rem; grid-template-columns: repeat(5, 1fr); }
.game-card {
  position: relative; display: block; text-decoration: none;
  border-radius: var(--r); overflow: hidden; border: 1px solid var(--rule);
  aspect-ratio: 3 / 4; background: var(--ink); isolation: isolate;
}
.game-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.3,1); }
.game-card:hover img { transform: scale(1.06); }
.game-card::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgba(6,9,17,.94) 6%, rgba(6,9,17,.30) 52%, rgba(6,9,17,.05) 100%);
}
.game-card-body { position: absolute; inset: auto 0 0 0; z-index: 2; padding: 1.15rem 1.05rem; }
.game-card h3 { font-size: 1.42rem; text-transform: uppercase; margin-bottom: .45rem; line-height: 1; }
.game-card p { margin: 0; font-size: .82rem; color: var(--muted-soft); line-height: 1.45; }
.game-card .accent-rule { width: 34px; height: 3px; background: var(--accent); margin-bottom: .7rem; }
.game-card .count {
  position: absolute; top: .9rem; right: .95rem; z-index: 2;
  font-family: var(--display); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent-text); background: rgba(6,9,17,.72); border: 1px solid var(--rule);
  padding: .25rem .5rem; border-radius: 100px;
}

/* ========================================================== CATEGORY PAGE */
.cat-hero { position: relative; border-bottom: 1px solid var(--rule); overflow: hidden; }
.cat-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.cat-hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to right, rgba(11,16,28,.95) 22%, rgba(11,16,28,.55) 70%, rgba(11,16,28,.3) 100%);
}
.cat-hero-body { position: relative; z-index: 2; padding-block: clamp(3rem, 8vw, 5.5rem); max-width: 60ch; }
.cat-hero h1 { font-size: clamp(2.6rem, 7vw, 5rem); text-transform: uppercase; margin-bottom: .8rem; }
.cat-hero .accent-rule { width: 64px; height: 4px; background: var(--accent); margin-bottom: 1.1rem; }
.cat-hero p { color: var(--muted); margin: 0; font-size: 1.03rem; }

.crumbs {
  display: flex; gap: .5rem; align-items: center; flex-wrap: wrap;
  font-size: .82rem; color: var(--muted-soft); padding-top: 1.5rem; margin: 0;
  list-style: none; padding-left: 0;
}
.crumbs a { text-decoration: none; color: var(--muted-soft); }
.crumbs a:hover { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.crumbs li { display: flex; align-items: center; gap: .5rem; }
.crumbs li + li::before { content: "/"; color: var(--rule-strong); }
.crumbs [aria-current="page"] { color: var(--accent-text); }

/* =========================================================== ARTICLE PAGE */
.article { padding-bottom: clamp(3rem, 6vw, 5rem); }
.article-head { max-width: 50rem; margin-inline: auto; padding-block: clamp(2rem, 4.5vw, 3.25rem); text-align: center; }
.article-head .accent-rule { width: 56px; height: 3px; background: var(--accent); margin: 0 auto 1.25rem; }
.article-head h1 { font-size: clamp(2.3rem, 5.6vw, 4.1rem); text-transform: uppercase; margin-bottom: .9rem; }
.article-head .dek { color: var(--muted); font-size: 1.1rem; margin: 0 auto 1.3rem; max-width: 46ch; }
.article-head .meta-row { justify-content: center; margin-bottom: 0; }
.byline { font-size: .82rem; color: var(--muted-soft); letter-spacing: .04em; }

.article-hero { margin-bottom: clamp(1.75rem, 4vw, 2.75rem); }
.article-hero figure { margin: 0; }
.article-hero img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: var(--r); border: 1px solid var(--rule); background: var(--ink);
}
.article-hero figcaption { font-size: .78rem; color: var(--muted-soft); padding-top: .65rem; }

.prose { max-width: 42rem; margin-inline: auto; }
.prose > p { margin: 0 0 1.35rem; }
.prose > p:first-of-type { font-size: 1.14rem; color: var(--white); }
.prose h2 {
  font-size: clamp(1.5rem, 2.9vw, 2rem); text-transform: uppercase;
  margin: 2.4rem 0 .9rem; padding-top: 1.1rem; border-top: 1px solid var(--rule);
}
.prose a { color: var(--accent-text); text-underline-offset: 3px; }

.stub-note {
  border: 1px dashed var(--rule-strong); border-left: 3px solid var(--accent);
  border-radius: var(--r); background: var(--surface);
  padding: 1.1rem 1.25rem; margin-bottom: 2rem; font-size: .9rem; color: var(--muted);
}
.stub-note strong {
  display: block; font-family: var(--display); letter-spacing: .14em; text-transform: uppercase;
  font-size: .85rem; color: var(--accent-text); margin-bottom: .35rem;
}
.stub-body { color: var(--muted-soft); }

.related { border-top: 1px solid var(--rule); margin-top: clamp(2.5rem, 5vw, 3.75rem); padding-top: 2rem; }
.related h2 { font-size: 1.65rem; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 1.5rem; }
.related-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(3, 1fr); list-style: none; margin: 0; padding: 0; }

/* ================================================================= FOOTER */
.site-footer { border-top: 1px solid var(--rule); background: var(--ink); margin-top: clamp(2rem, 5vw, 4rem); }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 2.5rem;
  padding-block: clamp(2.5rem, 5vw, 3.5rem); align-items: start;
}
.site-footer .wordmark { font-size: 1.22rem; margin: 0 0 .75rem; }
.site-footer .tagline { color: var(--muted-soft); font-size: .88rem; margin: 0; max-width: 34ch; }
.footer-col h2 {
  font-size: .85rem; letter-spacing: .17em; text-transform: uppercase;
  color: var(--muted-soft); margin-bottom: .9rem; font-weight: 600;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.footer-col a { text-decoration: none; font-size: .93rem; color: var(--muted); display: inline-flex; align-items: center; gap: .55rem; }
.footer-col a:hover { color: var(--white); }
.footer-col .swatch { width: 8px; height: 8px; border-radius: 2px; background: var(--accent); flex: none; }
.to-top {
  display: inline-flex; align-items: center; gap: .5rem; text-decoration: none;
  font-family: var(--display); letter-spacing: .14em; text-transform: uppercase; font-size: .9rem;
  border: 1px solid var(--rule-strong); border-radius: 100px; padding: .55rem 1rem; color: var(--white);
}
.to-top:hover { border-color: var(--cyan); color: var(--cyan); }
.footer-base {
  border-top: 1px solid var(--rule); padding-block: 1.35rem;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-size: .8rem; color: var(--muted-soft);
}
.footer-base p { margin: 0; }

/* ============================================================ RESPONSIVE */
@media (max-width: 1080px) {
  .game-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .to-top { grid-column: 1 / -1; justify-self: start; }
}

@media (max-width: 900px) {
  .header-bar { min-height: 64px; }
  .nav-toggle { display: inline-flex; }
  .drawer {
    display: none; width: 100%; flex-direction: column; align-items: stretch;
    gap: 1.1rem; padding: .25rem 0 1.4rem; border-top: 1px solid var(--rule); margin-top: .25rem;
  }
  .drawer.is-open { display: flex; }
  .nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
  .nav > ul > li { border-bottom: 1px solid var(--rule); }
  .nav > ul > li:last-child { border-bottom: 0; }
  .nav a, .nav .submenu-btn { width: 100%; padding: .85rem 0; font-size: 1.1rem; justify-content: space-between; }
  .nav a::after, .nav .submenu-btn::after { display: none; }
  .submenu {
    position: static; display: none; min-width: 0; border: 0; box-shadow: none;
    background: none; padding: 0 0 .85rem; margin-left: .25rem;
    border-left: 2px solid var(--rule);
  }
  .submenu a { padding: .6rem .9rem; }
  .search-field { min-width: 0; width: 100%; }
  .search-results { right: auto; left: 0; width: 100%; }

  .featured { grid-template-columns: 1fr; }
  .cover-media { aspect-ratio: 4 / 3; }
  .cover h2, .cover h1 { font-size: clamp(1.9rem, 7.5vw, 2.9rem); }
  .related-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  body { font-size: 16px; }
  .wordmark { font-size: 1.08rem; letter-spacing: .1em; }
  .cover-media { aspect-ratio: 3 / 2; }
  .cover-body { padding: 1rem; }
  .cover .dek { display: none; }
  .side-story { grid-template-columns: 96px 1fr; }
  .side-story p { display: none; }
  .game-grid { grid-template-columns: repeat(2, 1fr); }
  .game-card { aspect-ratio: 4 / 5; }
  .feed { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .article-head { text-align: left; }
  .article-head .accent-rule { margin-inline: 0; }
  .article-head .meta-row { justify-content: flex-start; }
}

@media (max-width: 420px) {
  .game-grid { grid-template-columns: 1fr; }
  .game-card { aspect-ratio: 16 / 10; }
}

/* ------------------------------------------------- WordPress core classes */
.alignleft  { float: left;  margin: .4rem 1.6rem 1rem 0; }
.alignright { float: right; margin: .4rem 0 1rem 1.6rem; }
.aligncenter { display: block; margin-inline: auto; }
.alignwide, .alignfull { max-width: none; }
.wp-caption { max-width: 100%; }
.wp-caption-text, .prose figcaption {
  font-size: .8rem; color: var(--muted-soft); padding-top: .55rem;
}
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.screen-reader-text:focus {
  position: static !important; width: auto; height: auto; margin: 0; clip: auto;
}
.prose ul, .prose ol { margin: 0 0 1.35rem; padding-left: 1.3rem; }
.prose li { margin-bottom: .5rem; }
.prose blockquote {
  margin: 1.8rem 0; padding: .3rem 0 .3rem 1.4rem;
  border-left: 3px solid var(--accent); color: var(--white); font-size: 1.1rem;
}
.prose img, .prose figure { border-radius: var(--r); }
.prose figure { margin: 1.8rem 0; }
.prose table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; }
.prose th, .prose td { border: 1px solid var(--rule); padding: .6rem .7rem; text-align: left; }
.prose code, .prose kbd {
  background: var(--surface-2); padding: .12em .4em; border-radius: 3px; font-size: .92em;
}
.prose pre {
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r);
  padding: 1rem; overflow-x: auto; margin-bottom: 1.5rem;
}
.prose pre code { background: none; padding: 0; }

/* Pagination */
.pagination { margin-top: 2.5rem; display: flex; justify-content: center; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: .4rem; }
.pagination .page-numbers {
  font-family: var(--display); letter-spacing: .1em; text-decoration: none;
  border: 1px solid var(--rule); border-radius: var(--r);
  padding: .5rem .9rem; color: var(--muted);
}
.pagination .page-numbers:hover { border-color: var(--cyan); color: var(--cyan); }
.pagination .page-numbers.current { background: var(--white); color: var(--ink); border-color: var(--white); }

/* Comments */
.comments-area { max-width: 42rem; margin: clamp(2.5rem,5vw,3.5rem) auto 0; }
.comments-area h2 { font-size: 1.6rem; text-transform: uppercase; margin-bottom: 1.2rem; }
.comment-list { list-style: none; margin: 0 0 2rem; padding: 0; }
.comment-list li { border-top: 1px solid var(--rule); padding: 1.2rem 0; }
.comment-list .children { list-style: none; padding-left: 1.4rem; }
.comment-meta { font-size: .82rem; color: var(--muted-soft); margin-bottom: .4rem; }
.comment-form label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: .35rem; }
.comment-form input[type=text], .comment-form input[type=email],
.comment-form input[type=url], .comment-form textarea {
  width: 100%; background: var(--surface); color: var(--white);
  border: 1px solid var(--rule); border-radius: var(--r);
  padding: .6rem .7rem; font-family: var(--body); font-size: .95rem; margin-bottom: 1rem;
}
.comment-form .submit {
  font-family: var(--display); letter-spacing: .14em; text-transform: uppercase;
  background: var(--white); color: var(--ink); border: 0;
  padding: .7rem 1.3rem; border-radius: var(--r); cursor: pointer;
}
.comment-form .submit:hover { background: var(--accent); }

/* Admin bar offset for the sticky header */
.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

/* Empty states */
.empty-state {
  border: 1px dashed var(--rule-strong); border-radius: var(--r);
  padding: clamp(2rem,5vw,3.5rem); text-align: center; color: var(--muted);
}
.empty-state h2 { font-size: 1.6rem; text-transform: uppercase; margin-bottom: .7rem; color: var(--white); }
.empty-state p { margin: 0 auto; max-width: 48ch; }
.empty-state .btn { margin-top: 1.4rem; }
