/*
Theme Name: JRPG Pursuit
Theme URI: https://jrpgpursuit.com
Author: JRPG Pursuit
Description: Custom theme for the JRPG Pursuit podcast — scored game reviews with per-host takes, plus a podcast archive with video and audio for every episode.
Version: 2.0.1
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: jrpg-pursuit
*/

:root {
  --ink: #16121c;
  --surface: #211a2c;
  --surface-2: #2a2138;
  --line: #372c4a;
  --text: #efe9f4;
  --muted: #9c8fb5;
  --gold: #d2a94f;
  --gold-soft: #e5c78a;
  --serif: "Spectral", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--serif);
  font-weight: 300;
  font-size: 1.0625rem;
  line-height: 1.7;
}

img { max-width: 100%; height: auto; }

a { color: var(--gold-soft); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--gold); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 1.25rem; }
.wrap-narrow { max-width: 46rem; margin: 0 auto; padding: 0 1.25rem; }

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  padding: 1.5rem 0 1.25rem;
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
}

.site-logo { flex: none; line-height: 0; }
.site-logo img { max-height: 56px; width: auto; display: block; }

.site-title {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.site-title a { color: var(--text); text-decoration: none; }
.site-title a:hover { color: var(--gold-soft); }

.site-tagline {
  margin: 0;
  color: var(--muted);
  font-style: italic;
  font-size: 0.95rem;
}

.site-nav { margin-left: auto; }

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 1rem;
}

.site-nav a:hover { color: var(--gold-soft); text-decoration: underline; }

/* ---------- Side rails ---------- */

.side-rail {
  display: none;
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 0;
  pointer-events: none;
}

.side-left { left: 1.5rem; }
.side-right { right: 1.5rem; }

.side-rail-ornament { opacity: 0.55; }
.side-right.side-rail-ornament svg { transform: scaleX(-1); }

.side-rail-art img {
  max-width: 170px;
  height: auto;
  max-height: 80vh;
  object-fit: contain;
}

/* Only show rails when there's comfortable room beside the content column. */
@media (min-width: 1480px) {
  .side-rail { display: block; }
}

/* ---------- Ad slots ---------- */

.ad-slot { padding: 1.25rem 0 0; }

.ad-slot .wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.ad-unit { max-width: 100%; overflow: hidden; text-align: center; }

.ad-unit::before {
  content: "advertisement";
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  font-style: italic;
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
}

/* ---------- Utility bar ---------- */

.utility-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
}

.utility-bar ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin: 0;
  padding: 0.45rem 0;
}

.utility-bar a { color: var(--muted); text-decoration: none; }
.utility-bar a:hover { color: var(--gold-soft); text-decoration: underline; }

/* ---------- Front page spotlight ---------- */

.spotlight-section { padding-top: 2rem; }

.spotlight-head { align-items: baseline; margin-bottom: 1.5rem; }
.spotlight-head h1 { margin: 0; font-size: 1.7rem; font-weight: 700; }
.spotlight-sub { margin: 0; color: var(--muted); font-style: italic; font-size: 0.98rem; }

.spotlight-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
  grid-template-areas: "ep" "lead" "s2" "s3";
}

.spotlight-grid > .spot-lead { grid-area: lead; }
.spotlight-grid > .spot-card:nth-of-type(2) { grid-area: s2; }
.spotlight-grid > .spot-card:nth-of-type(3) { grid-area: s3; }
.spotlight-grid > .hero-episode { grid-area: ep; }

/* Without an episode yet, the spotlight fills the full width. */
.spotlight-grid:not(.has-episode) { grid-template-areas: "lead" "s2" "s3"; }

@media (min-width: 900px) {
  .spotlight-grid.has-episode {
    grid-template-columns: 1fr 1fr 0.95fr;
    grid-template-areas:
      "lead lead ep"
      "s2   s3   ep";
    align-items: start;
  }
  .spotlight-grid:not(.has-episode) {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "lead lead"
      "s2   s3";
  }
}

.spot-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}

.spot-card .card-media { border-bottom: 1px solid var(--line); }

.spot-body { padding: 1.2rem 1.4rem 1.15rem; flex: 1; }

.spot-card .kicker { margin: 0 0 0.35rem; color: var(--gold); font-style: italic; font-size: 0.88rem; }

.spot-title-row { display: flex; gap: 1rem; align-items: flex-start; }

.spot-text { min-width: 0; flex: 1; }

.spot-title-row .crystal { margin: 0.35rem 0.35rem 0 0.3rem; position: relative; z-index: 1; flex: none; }

.spot-card h3 { margin: 0 0 0.4rem; font-size: 1.2rem; font-weight: 500; line-height: 1.3; }
.spot-lead h3 { font-size: 1.7rem; font-weight: 700; line-height: 1.2; }

.spot-card h3 a { color: var(--text); text-decoration: none; }
.spot-card h3 a::after { content: ""; position: absolute; inset: 0; }
.spot-card:hover { border-color: var(--gold); }
.spot-card:hover h3 a { color: var(--gold-soft); }

.spot-excerpt { margin: 0.25rem 0 0.6rem; font-size: 1rem; }

.spot-card .meta { margin: 0; color: var(--muted); font-size: 0.88rem; font-style: italic; }

/* ---------- Hero episode panel ---------- */

.hero-episode {
  background: var(--surface);
  border: 1px solid var(--gold);
  padding: 1.2rem 1.4rem 1.3rem;
}

.hero-episode .kicker { margin: 0 0 0.75rem; color: var(--gold); font-style: italic; font-size: 0.88rem; }

.hero-episode .episode-thumb { flex: none; max-width: 100%; margin-bottom: 1rem; }

.hero-episode .episode-player { margin: 0 0 1rem; }

.hero-episode h3 { margin: 0 0 0.3rem; font-size: 1.15rem; font-weight: 500; line-height: 1.35; }
.hero-episode h3 a { color: var(--text); text-decoration: none; }
.hero-episode h3 a:hover { color: var(--gold-soft); }
.hero-episode .episode-number { margin-right: 0.4rem; }

.hero-episode .meta { color: var(--muted); font-size: 0.88rem; font-style: italic; margin: 0 0 1rem; }

.hero-episode .episode-actions { margin-top: 0; }

/* ---------- Section headings ---------- */

.section { padding: 3rem 0; }
.section + .section { border-top: 1px solid var(--line); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.section-head h2 {
  margin: 0;
  font-size: 1.7rem;
  font-weight: 700;
}

.section-head a { font-size: 0.95rem; }

/* ---------- Review cards & score crystal ---------- */

.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.review-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}

.card-media {
  line-height: 0;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.card-media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.card-body {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  padding: 1.5rem 1.5rem 1.4rem;
  flex: 1;
}

/* On cards with art, nudge the crystal up so it overlaps the image edge. */
.review-card.has-media .card-body { padding-top: 1.1rem; }
.review-card.has-media .crystal { margin-top: -2.4rem; z-index: 1; }

.review-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.3;
}

.review-card h3 a { color: var(--text); text-decoration: none; }
.review-card h3 a::after { content: ""; position: absolute; inset: 0; }
.review-card:hover { border-color: var(--gold); }
.review-card:hover h3 a { color: var(--gold-soft); }

@media (prefers-reduced-motion: no-preference) {
  .card-media img { transition: transform 400ms ease; }
  .review-card:hover .card-media img { transform: scale(1.03); }
}

.review-card .meta {
  color: var(--muted);
  font-size: 0.9rem;
  font-style: italic;
  margin: 0;
}

/* The score crystal: a rotated square, like a JRPG gem/save crystal */

.crystal {
  flex: none;
  width: 3.4rem;
  height: 3.4rem;
  display: grid;
  place-items: center;
  position: relative;
  margin: 0.3rem 0.4rem 0 0.2rem;
}

.crystal::before {
  content: "";
  position: absolute;
  inset: 0;
  transform: rotate(45deg);
  background: linear-gradient(160deg, var(--surface-2), var(--ink));
  border: 1.5px solid var(--gold);
  box-shadow: inset 0 0 12px rgba(210, 169, 79, 0.25);
}

.crystal span {
  position: relative;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--gold-soft);
  font-variant-numeric: lining-nums;
}

.crystal-lg { width: 5.6rem; height: 5.6rem; }
.crystal-lg span { font-size: 1.9rem; }

.crystal-sm { width: 2.5rem; height: 2.5rem; margin: 0; }
.crystal-sm span { font-size: 0.95rem; }

/* ---------- Single review ---------- */

.review-header { padding: 3.5rem 0 2rem; }

.review-header .kicker {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-style: italic;
  font-size: 1rem;
}

.review-header h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
}

.review-topline {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.review-topline .byline { color: var(--muted); font-style: italic; margin: 0; }

.verdict-word {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--gold-soft);
  font-style: italic;
}

.gamebox {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  font-size: 0.95rem;
}

.gamebox dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem 1.5rem;
}

.gamebox dt { color: var(--muted); font-style: italic; }
.gamebox dd { margin: 0; font-weight: 500; }

.gamebox .disclosure {
  margin: 1rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-style: italic;
  font-size: 0.875rem;
}

.entry-content { font-size: 1.125rem; }
.entry-content > * { max-width: 46rem; margin-left: auto; margin-right: auto; }
.entry-content h2 { font-size: 1.6rem; font-weight: 700; margin: 2.5rem auto 1rem; }
.entry-content h3 { font-size: 1.3rem; font-weight: 500; margin: 2rem auto 0.75rem; }
.entry-content blockquote {
  border-left: 3px solid var(--gold);
  margin: 2rem auto;
  padding: 0.25rem 0 0.25rem 1.5rem;
  font-style: italic;
  color: var(--gold-soft);
}
.entry-content img { display: block; margin: 2rem auto; }
.entry-content .wp-block-image figcaption,
.entry-content figcaption { color: var(--muted); font-size: 0.875rem; font-style: italic; text-align: center; }
.entry-content .alignwide { max-width: 62rem; }
.entry-content .alignfull { max-width: none; }

/* ---------- Host takes ---------- */

.host-takes {
  max-width: 46rem;
  margin: 3.5rem auto 0;
  padding: 0 1.25rem;
}

.host-takes-inner { border-top: 1px solid var(--line); padding-top: 2rem; }

.host-takes h2 {
  margin: 0 0 1.5rem;
  font-size: 1.5rem;
  font-weight: 700;
}

.take {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.take-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.take-head h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--gold-soft);
}

.take-body { font-size: 1.05rem; }
.take-body p:first-child { margin-top: 0; }
.take-body p:last-child { margin-bottom: 0; }

/* ---------- Features ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}

.feature-card .card-media { border-bottom: 1px solid var(--line); }

.feature-card .feature-body { padding: 1.4rem 1.5rem 1.35rem; flex: 1; }

.feature-card .kicker {
  margin: 0 0 0.4rem;
  color: var(--gold);
  font-style: italic;
  font-size: 0.9rem;
}

.feature-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.3rem;
  font-weight: 500;
  line-height: 1.3;
}

.feature-card h3 a { color: var(--text); text-decoration: none; }
.feature-card h3 a::after { content: ""; position: absolute; inset: 0; }
.feature-card:hover { border-color: var(--gold); }
.feature-card:hover h3 a { color: var(--gold-soft); }

.feature-excerpt { margin: 0 0 0.6rem; color: var(--text); font-size: 0.98rem; }

.feature-card .meta { margin: 0; color: var(--muted); font-size: 0.9rem; font-style: italic; }

/* Lead card: newest feature spans the grid with a bigger presence. */
.feature-card.is-lead { grid-column: 1 / -1; }

@media (min-width: 760px) {
  .feature-card.is-lead { flex-direction: row; }
  .feature-card.is-lead .card-media { flex: 0 0 58%; border-bottom: none; border-right: 1px solid var(--line); }
  .feature-card.is-lead .card-media img { height: 100%; aspect-ratio: auto; }
  .feature-card.is-lead .feature-body { align-self: center; padding: 2rem; }
  .feature-card.is-lead h3 { font-size: 1.9rem; }
}

/* Single feature hero banner */
.feature-hero { line-height: 0; border-bottom: 1px solid var(--line); }

.feature-hero img {
  width: 100%;
  max-height: 55vh;
  object-fit: cover;
  display: block;
}

.feature-header { padding-top: 2.5rem; }
.feature-header .kicker { color: var(--gold); }

/* ---------- Reader takes ("Your Take") ---------- */

.reader-takes { margin-bottom: 1rem; }

.reader-count { color: var(--muted); font-weight: 300; font-size: 1.1rem; }

.take-date {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.85rem;
  font-style: italic;
  flex: none;
}

.reader-note { color: var(--muted); font-style: italic; }

.comment-awaiting-moderation { color: var(--gold-soft); font-style: italic; font-size: 0.95rem; }

#respond { margin-top: 2.5rem; }

.comment-reply-title { font-size: 1.3rem; font-weight: 700; margin: 0 0 0.35rem; }

.reader-guidelines {
  color: var(--muted);
  font-size: 0.85rem;
  font-style: italic;
  margin: 0 0 1.25rem;
  max-width: 46rem;
}

.comment-form label { display: block; margin-bottom: 0.3rem; color: var(--muted); font-style: italic; }

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form select,
.comment-form textarea {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 0.6rem 0.75rem;
  width: 100%;
  max-width: 100%;
}

.comment-form-author, .comment-form-email { max-width: 24rem; }
.comment-form-score select { width: auto; min-width: 9rem; }

.comment-form textarea { resize: vertical; }

.comment-form input:focus, .comment-form select:focus, .comment-form textarea:focus {
  border-color: var(--gold);
  outline: none;
}

.form-submit input[type="submit"] {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 500;
  color: var(--gold-soft);
  background: transparent;
  border: 1px solid var(--gold);
  padding: 0.6rem 1.4rem;
  cursor: pointer;
}

.form-submit input[type="submit"]:hover {
  background: var(--gold);
  color: var(--ink);
}

.comment-navigation, .comments-pagination { margin-top: 1.5rem; }

/* ---------- Scorecard footer of a review ---------- */

.scorecard {
  max-width: 46rem;
  margin: 3rem auto 0;
  padding: 0 1.25rem;
}

.scorecard-inner {
  background: var(--surface);
  border: 1px solid var(--gold);
  padding: 1.75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.75rem;
  flex-wrap: wrap;
}

.scorecard .final-label { color: var(--muted); font-style: italic; margin: 0 0 0.2rem; }
.scorecard .final-word { font-size: 1.35rem; font-weight: 700; margin: 0; }

/* ---------- Podcast archive ---------- */

.tabs {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.tabs a {
  color: var(--muted);
  text-decoration: none;
  font-size: 1.05rem;
  padding: 0.5rem 1rem 0.6rem;
  border: 1px solid transparent;
  border-bottom: none;
  margin-bottom: -1px;
}

.tabs a:hover { color: var(--gold-soft); }

.tabs a[aria-current="page"] {
  color: var(--gold-soft);
  font-weight: 500;
  background: var(--surface);
  border-color: var(--line);
  border-bottom: 1px solid var(--surface);
}

.episode {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
}

.episode-layout { display: flex; gap: 1.5rem; align-items: flex-start; }

.episode-main { flex: 1; min-width: 0; }

.episode-thumb { flex: 0 0 280px; max-width: 280px; }

.episode-thumb img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  border: 1px solid var(--line);
}

.episode-thumb-btn,
.episode-thumb-link {
  display: block;
  position: relative;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  line-height: 0;
  width: 100%;
}

/* Diamond play mark, echoing the score crystal. */
.episode-thumb-btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2.6rem;
  height: 2.6rem;
  transform: translate(-50%, -50%) rotate(45deg);
  background: rgba(22, 18, 28, 0.75);
  border: 1.5px solid var(--gold);
  z-index: 1;
}

.episode-thumb-btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-38%, -50%);
  border-style: solid;
  border-width: 0.5rem 0 0.5rem 0.8rem;
  border-color: transparent transparent transparent var(--gold-soft);
  z-index: 2;
}

.episode-thumb-btn:hover::before { background: rgba(22, 18, 28, 0.55); box-shadow: 0 0 14px rgba(210, 169, 79, 0.45); }
.episode-thumb-btn:hover img { opacity: 0.9; }

.episode.is-video-open .episode-thumb { display: none; }

@media (max-width: 720px) {
  .episode-layout { flex-direction: column; }
  .episode-thumb { flex: none; max-width: 100%; width: 100%; }
}

.episode-head { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; }

.episode-number {
  color: var(--gold);
  font-weight: 700;
  font-size: 1.05rem;
  flex: none;
}

.episode h2, .episode h3 { margin: 0; font-size: 1.35rem; font-weight: 500; line-height: 1.3; }
.episode h2 a, .episode h3 a { color: var(--text); text-decoration: none; }
.episode h2 a:hover, .episode h3 a:hover { color: var(--gold-soft); }

.episode .meta { color: var(--muted); font-style: italic; font-size: 0.9rem; margin: 0.35rem 0 0; }

.episode-notes { margin-top: 0.85rem; }
.episode-notes p { margin: 0; }

.episode-actions { display: flex; gap: 0.75rem; margin-top: 1.25rem; flex-wrap: wrap; }

.btn {
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--gold-soft);
  background: transparent;
  border: 1px solid var(--gold);
  padding: 0.5rem 1.1rem;
  cursor: pointer;
}

.btn:hover, .btn[aria-expanded="true"] {
  background: var(--gold);
  color: var(--ink);
}

.btn-link { text-decoration: none; display: inline-block; }

.episode-player { margin-top: 1.25rem; }

.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.episode-player audio { width: 100%; }

.listen-links { margin-top: 0.75rem; font-size: 0.95rem; }

/* ---------- Jetpack Related Posts (relocated & themed) ---------- */

.jp-related-wrap {
  max-width: 46rem;
  margin: 3rem auto 0;
  padding: 0 1.25rem;
}

.jp-related-wrap #jp-relatedposts {
  border-top: 1px solid var(--line);
  padding-top: 2rem;
  margin: 0;
}

.jp-related-wrap #jp-relatedposts h3.jp-relatedposts-headline {
  font-family: var(--serif);
  font-size: 1.5rem;
  margin: 0 0 1.25rem;
  color: var(--text);
}

.jp-related-wrap #jp-relatedposts h3.jp-relatedposts-headline em {
  font-style: normal;
  font-weight: 700;
  color: var(--text);
  border: none;
}

.jp-related-wrap #jp-relatedposts .jp-relatedposts-post {
  opacity: 1;
}

.jp-related-wrap #jp-relatedposts .jp-relatedposts-post-title {
  font-family: var(--serif);
  font-size: 1.05rem;
}

.jp-related-wrap #jp-relatedposts .jp-relatedposts-post-title a.jp-relatedposts-post-a {
  color: var(--gold-soft) !important;
  font-weight: 500;
  text-decoration: none;
}

.jp-related-wrap #jp-relatedposts .jp-relatedposts-post-title a.jp-relatedposts-post-a:hover {
  color: var(--gold) !important;
  text-decoration: underline;
}

.jp-related-wrap #jp-relatedposts .jp-relatedposts-post-date,
.jp-related-wrap #jp-relatedposts .jp-relatedposts-post-context {
  font-family: var(--serif);
  color: var(--muted) !important;
  font-style: italic;
  font-size: 0.85rem;
  opacity: 1;
}

.jp-related-wrap #jp-relatedposts .jp-relatedposts-items-visual .jp-relatedposts-post img.jp-relatedposts-post-img {
  border: 1px solid var(--line);
}

/* ---------- Archive headers, pagination, generic ---------- */

.archive-header { padding: 3.5rem 0 0.5rem; }
.archive-header h1 { margin: 0 0 0.5rem; font-size: clamp(2rem, 5vw, 2.8rem); font-weight: 700; }
.archive-header p { margin: 0; color: var(--muted); font-style: italic; max-width: 55ch; }

.pagination { margin: 2.5rem 0 0; font-size: 1rem; }
.pagination .nav-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.pagination .page-numbers { color: var(--gold-soft); }
.pagination .page-numbers.current { color: var(--text); }

.page-content { padding: 3rem 0; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 4rem;
  padding: 2rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-style: italic;
}

.site-footer .wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* ---------- Small screens ---------- */

@media (max-width: 640px) {
  .site-nav { margin-left: 0; width: 100%; }
  .scorecard-inner { gap: 1.25rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .review-card, .btn { transition: border-color 160ms ease, background 160ms ease, color 160ms ease; }
}

/* ---------- Accessibility helpers ---------- */

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  overflow: hidden;
  position: absolute;
  word-wrap: normal;
}
