/*
Theme Name: Gridiron 2026
Theme URI: https://nfluk.co.uk
Author: NFLUK Fans
Author URI: https://nfluk.co.uk
Description: A bold, immersive American football fan theme built for 2026. Stadium Glass aesthetic - dark turf backgrounds, yard-line geometry, scoreboard typography. No official NFL branding required.
Version: 1.1.3
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gridiron-2026
Tags: dark, sports, magazine, blog, custom-colors, custom-header, featured-images, full-width-template, post-formats, sticky-post, threaded-comments, translation-ready
*/

/* ============================================================
   DESIGN TOKENS - Stadium Glass 2026
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@0,400;0,600;0,700;0,800;0,900;1,700&family=DM+Mono:wght@400;500&family=Lato:wght@300;400;700&display=swap');

:root {
  /* Colours */
  --turf:          #07120a;
  --turf-mid:      #0d1f11;
  --turf-light:    #122318;
  --turf-stripe:   #0f1e13;
  --chalk:         #f0f4f0;
  --chalk-dim:     #9ab09d;
  --danger:        #d4001a;
  --danger-glow:   #ff1a33;
  --amber:         #f5a623;
  --amber-dim:     #b87a18;
  --steel:         #1e2e22;
  --steel-border:  #2a3d2e;

  /* Typography */
  --font-display:  'Barlow Condensed', sans-serif;
  --font-body:     'Lato', sans-serif;
  --font-mono:     'DM Mono', monospace;

  /* Spacing */
  --gap:           1.5rem;
  --gap-lg:        3rem;
  --radius:        4px;
  --radius-lg:     8px;

  /* Effects */
  --glow-red:      0 0 20px rgba(212, 0, 26, 0.35);
  --glow-amber:    0 0 20px rgba(245, 166, 35, 0.35);
  --card-shadow:   0 4px 24px rgba(0,0,0,0.6);
}

/* ============================================================
   RESET & BASE
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--turf);
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 59px,
      rgba(240, 244, 240, 0.025) 59px,
      rgba(240, 244, 240, 0.025) 60px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 119px,
      rgba(240, 244, 240, 0.015) 119px,
      rgba(240, 244, 240, 0.015) 120px
    );
  color: var(--chalk);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--amber); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--danger-glow); }

/* ============================================================
   SITE HEADER - Scoreboard style
   ============================================================ */

#masthead {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(7, 18, 10, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--danger);
  box-shadow: var(--glow-red);
}

.site-header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--gap);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-branding::before {
  content: '🏈';
  font-size: 1.4rem;
  filter: drop-shadow(0 0 8px var(--amber));
}

.site-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
}

.site-title a {
  color: var(--chalk);
  background: linear-gradient(135deg, var(--chalk) 40%, var(--amber) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.site-tagline {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--chalk-dim);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* ============================================================
   NAVIGATION
   ============================================================ */

#site-navigation ul {
  display: flex;
  list-style: none;
  gap: 0.25rem;
  align-items: center;
}

#site-navigation ul li a {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--chalk-dim);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  transition: all 0.2s;
  border: 1px solid transparent;
}

#site-navigation ul li a:hover,
#site-navigation ul li.current-menu-item a {
  color: var(--chalk);
  border-color: var(--steel-border);
  background: var(--steel);
}

#site-navigation ul li.current-menu-item a {
  color: var(--amber);
  border-color: var(--amber-dim);
}

/* Hamburger */
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--steel-border);
  color: var(--chalk);
  padding: 0.5rem;
  cursor: pointer;
  border-radius: var(--radius);
  font-size: 1.25rem;
}

/* ============================================================
   YARD LINE DIVIDER
   ============================================================ */

.yard-line {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: var(--gap-lg) 0 var(--gap);
}

.yard-line::before,
.yard-line::after {
  content: '';
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--steel-border), transparent);
}

.yard-line-label {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--chalk-dim);
}

/* ============================================================
   SECTION HEADERS - Scoreboard style
   ============================================================ */

.section-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--chalk);
}

.section-title .accent {
  color: var(--danger);
}

.section-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--turf);
  background: var(--amber);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius);
  font-weight: 500;
}

/* ============================================================
   HERO - Featured post
   ============================================================ */

.hero-post {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  min-height: 480px;
  display: flex;
  align-items: flex-end;
  background: var(--turf-mid);
  border: 1px solid var(--steel-border);
}

.hero-post .hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  transition: opacity 0.4s, transform 0.6s;
}

.hero-post:hover .hero-image {
  opacity: 0.65;
  transform: scale(1.02);
}

.hero-post .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(7,18,10,0.98) 0%,
    rgba(7,18,10,0.6) 50%,
    transparent 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 2.5rem;
  width: 100%;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.hero-category {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--turf);
  background: var(--danger);
  padding: 0.2rem 0.6rem;
  border-radius: 2px;
}

.hero-date {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--chalk-dim);
  letter-spacing: 0.08em;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.8rem, 4vw, 3rem);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.05;
  color: var(--chalk);
  margin-bottom: 0.75rem;
}

.hero-title a { color: inherit; }
.hero-title a:hover { color: var(--amber); }

.hero-excerpt {
  font-size: 0.95rem;
  color: var(--chalk-dim);
  max-width: 60ch;
  line-height: 1.6;
}

/* ============================================================
   POST CARDS
   ============================================================ */

.post-card {
  background: var(--turf-mid);
  border: 1px solid var(--steel-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
  box-shadow: var(--card-shadow);
}

.post-card:hover {
  border-color: var(--amber-dim);
  transform: translateY(-3px);
  box-shadow: var(--card-shadow), var(--glow-amber);
}

.post-card-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--steel);
}

.post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.post-card:hover .post-card-thumb img {
  transform: scale(1.05);
}

.post-card-thumb .card-category {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--turf);
  background: var(--danger);
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
  z-index: 2;
}

.post-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--chalk-dim);
  letter-spacing: 0.05em;
}

.post-card-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--steel-border);
}

.post-card-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.2;
  color: var(--chalk);
  flex: 1;
}

.post-card-title a { color: inherit; }
.post-card-title a:hover { color: var(--amber); }

.post-card-excerpt {
  font-size: 0.85rem;
  color: var(--chalk-dim);
  line-height: 1.55;
}

.read-more-link {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--amber);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--steel-border);
  transition: gap 0.2s, color 0.2s;
}

.read-more-link::after { content: '→'; }
.read-more-link:hover { color: var(--danger-glow); gap: 0.7rem; }

/* ============================================================
   LAYOUT GRID
   ============================================================ */

.site-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--gap-lg) var(--gap);
}

.content-area {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--gap-lg);
  align-items: start;
}

.main-content {}

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

.posts-grid-wide {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}

/* ============================================================
   SIDEBAR
   ============================================================ */

#secondary {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.widget {
  background: var(--turf-mid);
  border: 1px solid var(--steel-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.widget-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--steel-border);
  background: var(--steel);
}

.widget-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--chalk);
  margin: 0;
}

.widget-icon {
  font-size: 1rem;
}

.widget-body {
  padding: 1.25rem;
}

/* Leaderboard widget */
.leaderboard-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.leaderboard-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  background: var(--turf-light);
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: border-color 0.2s;
}

.leaderboard-item:hover {
  border-color: var(--steel-border);
}

.leaderboard-item:first-child {
  border-color: var(--amber-dim);
  background: rgba(245, 166, 35, 0.08);
}

.leaderboard-rank {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--chalk-dim);
  min-width: 1.5rem;
  text-align: center;
}

.leaderboard-item:first-child .leaderboard-rank {
  color: var(--amber);
}

.leaderboard-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--chalk);
  flex: 1;
}

.leaderboard-score {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--amber);
  font-weight: 500;
}

/* Online members dot */
.online-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #00e676;
  border-radius: 50%;
  box-shadow: 0 0 6px #00e676;
  animation: pulse-dot 2s infinite;
  margin-right: 0.4rem;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* CTA widget */
.cta-widget {
  border-color: var(--danger);
  box-shadow: var(--glow-red);
}

.cta-widget .widget-header {
  background: var(--danger);
}

.cta-widget .widget-title {
  color: #fff;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--turf);
  background: var(--amber);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  width: 100%;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}

.btn-primary:hover {
  background: #ffc14d;
  box-shadow: var(--glow-amber);
  transform: translateY(-1px);
  color: var(--turf);
}

/* ============================================================
   SINGLE POST
   ============================================================ */

.entry-header {
  margin-bottom: 2rem;
}

.entry-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.05;
  color: var(--chalk);
  margin-bottom: 1rem;
}

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--chalk-dim);
  letter-spacing: 0.08em;
}

.entry-meta a { color: var(--amber); }

.entry-featured-image {
  margin-bottom: 2rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--steel-border);
}

.entry-content {
  max-width: 72ch;
}

.entry-content h2, .entry-content h3, .entry-content h4 {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--chalk);
  margin: 2rem 0 0.75rem;
  line-height: 1.1;
}

.entry-content h2 { font-size: 1.8rem; }
.entry-content h3 { font-size: 1.4rem; }
.entry-content h4 { font-size: 1.1rem; color: var(--amber); }

.entry-content p { margin-bottom: 1.25rem; color: var(--chalk-dim); }
.entry-content strong { color: var(--chalk); }

.entry-content blockquote {
  border-left: 4px solid var(--danger);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: var(--turf-mid);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  font-style: italic;
  letter-spacing: 0.02em;
  color: var(--chalk);
}

/* ============================================================
   TICKER / BREAKING NEWS BAR
   ============================================================ */

.news-ticker {
  background: var(--danger);
  padding: 0.5rem 0;
  overflow: hidden;
  border-bottom: 2px solid rgba(255,255,255,0.15);
}

.ticker-label {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0,0,0,0.25);
  padding: 0 1rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.ticker-track {
  display: flex;
  white-space: nowrap;
  animation: ticker 30s linear infinite;
}

.ticker-item {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  padding: 0 2.5rem;
}

.ticker-item::after {
  content: '·';
  margin-left: 2.5rem;
  opacity: 0.5;
}

@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============================================================
   PAGINATION
   ============================================================ */

.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: var(--gap-lg);
}

.pagination .page-numbers {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--chalk-dim);
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--steel-border);
  border-radius: var(--radius);
  background: var(--turf-mid);
  transition: all 0.2s;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
  color: var(--turf);
  background: var(--amber);
  border-color: var(--amber);
}

/* ============================================================
   COMMENTS
   ============================================================ */

.comments-area {
  margin-top: var(--gap-lg);
  padding-top: var(--gap-lg);
  border-top: 2px solid var(--steel-border);
}

.comments-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.6rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--chalk);
  margin-bottom: 1.5rem;
}

.comment-list {
  list-style: none;
}

.comment-body {
  background: var(--turf-mid);
  border: 1px solid var(--steel-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.comment-author {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--amber);
  margin-bottom: 0.25rem;
}

.comment-date {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--chalk-dim);
  margin-bottom: 0.75rem;
}

.comment-content p { color: var(--chalk-dim); font-size: 0.9rem; }

/* Comment form */
.comment-form input,
.comment-form textarea {
  background: var(--turf-light);
  border: 1px solid var(--steel-border);
  border-radius: var(--radius);
  color: var(--chalk);
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 0.75rem 1rem;
  width: 100%;
  transition: border-color 0.2s;
}

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

.comment-form label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--chalk-dim);
  display: block;
  margin-bottom: 0.4rem;
}

.comment-form .submit input {
  width: auto;
  background: var(--danger);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: var(--radius);
  transition: background 0.2s, box-shadow 0.2s;
}

.comment-form .submit input:hover {
  background: var(--danger-glow);
  box-shadow: var(--glow-red);
}

/* ============================================================
   SITE FOOTER
   ============================================================ */

#colophon {
  border-top: 2px solid var(--steel-border);
  background: rgba(5, 12, 7, 0.95);
  margin-top: var(--gap-lg);
  padding: var(--gap-lg) var(--gap) var(--gap);
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--gap-lg);
  margin-bottom: var(--gap-lg);
}

.footer-brand .site-title {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.footer-desc {
  font-size: 0.85rem;
  color: var(--chalk-dim);
  line-height: 1.65;
  max-width: 36ch;
  margin-top: 0.5rem;
}

.footer-disclaimer {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--chalk-dim);
  opacity: 0.6;
  line-height: 1.7;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--steel-border);
}

.footer-col-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--chalk-dim);
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--chalk-dim);
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--amber); }

.footer-bottom {
  border-top: 1px solid var(--steel-border);
  padding-top: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--chalk-dim);
  opacity: 0.7;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1100px) {
  .content-area {
    grid-template-columns: 1fr;
  }
  #secondary {
    position: static;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .site-title { font-size: 1.2rem; }
  .site-tagline { display: none; }
  .menu-toggle { display: flex; align-items: center; }
  #site-navigation {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(7, 18, 10, 0.98);
    border-bottom: 2px solid var(--danger);
    padding: 1rem;
  }
  #site-navigation.is-open { display: block; }
  #site-navigation ul { flex-direction: column; gap: 0.25rem; }
  .posts-grid, .posts-grid-wide { grid-template-columns: 1fr; }
  .hero-post { min-height: 320px; }
  .hero-content { padding: 1.5rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  :root { --gap: 1rem; --gap-lg: 2rem; }
  .hero-title { font-size: 1.6rem; }
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */

.visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.text-danger { color: var(--danger); }
.text-amber  { color: var(--amber); }
.text-dim    { color: var(--chalk-dim); }
.mono        { font-family: var(--font-mono); }
.upper       { text-transform: uppercase; letter-spacing: 0.1em; }


/* ============================================================
   NFLUK COMMUNITY UPGRADE - v1.1
   ============================================================ */

body {
  background-image:
    radial-gradient(circle at top left, rgba(245,166,35,0.10), transparent 32rem),
    radial-gradient(circle at 85% 10%, rgba(212,0,26,0.12), transparent 28rem),
    repeating-linear-gradient(0deg, transparent, transparent 59px, rgba(240,244,240,0.025) 59px, rgba(240,244,240,0.025) 60px),
    repeating-linear-gradient(90deg, transparent, transparent 119px, rgba(240,244,240,0.015) 119px, rgba(240,244,240,0.015) 120px);
}

#masthead {
  border-bottom: 1px solid rgba(245,166,35,0.35);
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}

.site-header-inner {
  min-height: 72px;
}

#site-navigation ul li a {
  position: relative;
  overflow: hidden;
}

#site-navigation ul li a::after {
  content: '';
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.25rem;
  height: 2px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

#site-navigation ul li a:hover::after,
#site-navigation ul li.current-menu-item a::after {
  transform: scaleX(1);
}

.news-ticker {
  display: flex;
  align-items: center;
  gap: 0;
  background: linear-gradient(90deg, #8d0012, var(--danger));
  padding: 0;
  min-height: 38px;
}

.ticker-window {
  overflow: hidden;
  flex: 1;
}

.ticker-track {
  animation: ticker 45s linear infinite;
  min-width: max-content;
}

.ticker-track:hover {
  animation-play-state: paused;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  color: #fff;
}

.ticker-item:hover {
  color: var(--amber);
}

@keyframes ticker {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

.nfluk-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 330px);
  gap: 1.5rem;
  align-items: stretch;
  margin-bottom: 1.25rem;
  padding: clamp(1.5rem, 4vw, 3rem);
  overflow: hidden;
  border: 1px solid rgba(245,166,35,0.35);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(7,18,10,0.88), rgba(7,18,10,0.98)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.04) 0 2px, transparent 2px 90px);
  box-shadow: 0 24px 70px rgba(0,0,0,0.45), inset 0 0 0 1px rgba(255,255,255,0.03);
}

.nfluk-hero::before {
  content: '';
  position: absolute;
  inset: -20% -10% auto auto;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,0,26,0.35), transparent 66%);
  z-index: -1;
}

.nfluk-hero::after {
  content: 'NFLUK';
  position: absolute;
  right: 1rem;
  bottom: -1.7rem;
  font-family: var(--font-display);
  font-size: clamp(5rem, 18vw, 12rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.035);
  z-index: -1;
}

.hero-kicker {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 0.75rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid rgba(245,166,35,0.45);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber);
  background: rgba(245,166,35,0.08);
}

.nfluk-hero h1 {
  max-width: 9ch;
  margin: 0 0 0.9rem;
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6.6rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 0.88;
  text-transform: uppercase;
}

.nfluk-hero p {
  max-width: 68ch;
  color: var(--chalk-dim);
  font-size: 1rem;
}

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

.btn-hero {
  width: auto;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.72rem 1rem;
  border: 1px solid var(--steel-border);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.035);
  color: var(--chalk);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: transform 0.15s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn-ghost:hover {
  color: var(--chalk);
  border-color: var(--amber);
  background: rgba(245,166,35,0.09);
  transform: translateY(-1px);
}

.nfluk-hero-board {
  display: grid;
  gap: 0.75rem;
  align-self: center;
}

.nfluk-hero-board div {
  padding: 1rem;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  background: rgba(0,0,0,0.28);
}

.nfluk-hero-board strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
  color: var(--chalk);
}

.nfluk-hero-board span {
  display: block;
  margin-top: 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--chalk-dim);
}

.community-launchpad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.launch-card {
  position: relative;
  overflow: hidden;
  min-height: 128px;
  padding: 1.1rem;
  border: 1px solid var(--steel-border);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(18,35,24,0.92), rgba(7,18,10,0.92));
  color: var(--chalk);
  box-shadow: var(--card-shadow);
}

.launch-card::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: linear-gradient(90deg, var(--danger), var(--amber));
}

.launch-card span {
  font-size: 1.5rem;
}

.launch-card strong {
  display: block;
  margin-top: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.launch-card em {
  display: block;
  margin-top: 0.25rem;
  color: var(--chalk-dim);
  font-style: normal;
  font-size: 0.86rem;
  line-height: 1.45;
}

.launch-card:hover {
  color: var(--chalk);
  border-color: rgba(245,166,35,0.45);
  transform: translateY(-2px);
}

.featured-story {
  margin-top: 0.5rem;
}

.gridiron-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 0.4rem;
  min-height: 100%;
  background:
    radial-gradient(circle at 35% 30%, rgba(245,166,35,0.22), transparent 28%),
    linear-gradient(135deg, #102317, #07120a 62%, #17050a),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.045) 0 2px, transparent 2px 80px);
  text-align: center;
}

.gridiron-placeholder::before,
.gridiron-placeholder::after {
  content: '';
  position: absolute;
  left: 10%;
  right: 10%;
  height: 2px;
  background: rgba(255,255,255,0.14);
}

.gridiron-placeholder::before { top: 33%; }
.gridiron-placeholder::after { bottom: 33%; }

.post-card-thumb .gridiron-placeholder {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}

.entry-featured-placeholder {
  min-height: 320px;
  position: relative;
}

.placeholder-kicker {
  z-index: 1;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
}

.placeholder-title {
  z-index: 1;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 7vw, 5.5rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.88);
}

.widget-intro {
  margin-bottom: 1rem;
  color: var(--chalk-dim);
  font-size: 0.88rem;
}

.compact-post-list {
  display: grid;
  gap: 0.25rem;
}

.compact-post {
  display: block;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--steel-border);
}

.compact-post:last-child {
  border-bottom: 0;
}

.compact-post span {
  display: block;
  color: var(--chalk);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1.15;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.compact-post small {
  color: var(--chalk-dim);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.widget .ajax-loader,
.widget img[src*="ajax-loader"],
.widget img[src*="spinner"],
.widget .loading:empty {
  display: none !important;
}

.widget.is-widget-failed {
  display: none !important;
}

.leaderboard-name:empty::before,
.team-name:empty::before,
.user-name:empty::before,
.username:empty::before {
  content: 'Free Agent';
  color: var(--chalk-dim);
  font-style: italic;
}

.footer-grid {
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
}

.footer-latest a {
  line-height: 1.35;
}

.mobile-game-nav {
  display: none;
}

@media (max-width: 1100px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 820px) {
  body {
    padding-bottom: 74px;
  }

  .site-content {
    padding-top: 1rem;
  }

  .nfluk-hero {
    grid-template-columns: 1fr;
  }

  .nfluk-hero h1 {
    max-width: 10ch;
  }

  .nfluk-hero-board {
    grid-template-columns: repeat(3, 1fr);
  }

  .community-launchpad {
    grid-template-columns: 1fr;
  }

  .mobile-game-nav {
    position: fixed;
    z-index: 500;
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.25rem;
    padding: 0.45rem;
    border: 1px solid rgba(245,166,35,0.25);
    border-radius: 18px;
    background: rgba(5,12,7,0.94);
    backdrop-filter: blur(16px);
    box-shadow: 0 14px 50px rgba(0,0,0,0.55);
  }

  .mobile-game-nav a {
    display: grid;
    place-items: center;
    gap: 0.05rem;
    min-height: 50px;
    border-radius: 12px;
    color: var(--chalk-dim);
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .mobile-game-nav a:hover {
    color: var(--chalk);
    background: rgba(255,255,255,0.06);
  }

  .mobile-game-nav span {
    display: block;
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
  .site-header-inner {
    height: 64px;
    min-height: 64px;
  }

  #site-navigation ul li a {
    display: block;
    width: 100%;
    padding: 0.8rem 0.9rem;
  }

  .news-ticker {
    min-height: 34px;
  }

  .ticker-label {
    padding: 0.4rem 0.7rem;
    font-size: 0.66rem;
  }

  .ticker-item {
    padding: 0 1.25rem;
  }

  .nfluk-hero {
    border-radius: 14px;
  }

  .nfluk-hero p {
    font-size: 0.95rem;
  }

  .hero-actions a {
    width: 100%;
  }

  .nfluk-hero-board {
    gap: 0.5rem;
  }

  .nfluk-hero-board div {
    padding: 0.75rem 0.45rem;
    text-align: center;
  }

  .nfluk-hero-board strong {
    font-size: 1.7rem;
  }

  .nfluk-hero-board span {
    font-size: 0.56rem;
  }
}

.card-visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}


/* ============================================================
   NFLUK COMMUNITY POLISH - v1.1.1
   ============================================================ */

.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: -0.5rem 0 1.5rem;
}

.category-filter a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 38px;
  padding: 0.48rem 0.75rem;
  border: 1px solid var(--steel-border);
  border-radius: 999px;
  background: rgba(255,255,255,0.035);
  color: var(--chalk-dim);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.category-filter a:hover,
.category-filter a.is-active {
  color: var(--turf);
  border-color: var(--amber);
  background: var(--amber);
}

.category-filter span {
  display: inline-grid;
  place-items: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: rgba(0,0,0,0.24);
  color: inherit;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0;
}

.page-shell {
  max-width: 940px;
}

.page-card {
  overflow: hidden;
  border: 1px solid var(--steel-border);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(13,31,17,0.92), rgba(7,18,10,0.96));
  box-shadow: var(--card-shadow);
}

.page-card .entry-header {
  padding: clamp(1.4rem, 4vw, 2.4rem) clamp(1.4rem, 4vw, 2.8rem) 0;
}

.page-card .entry-content {
  max-width: none;
  padding: 0 clamp(1.4rem, 4vw, 2.8rem) clamp(1.6rem, 4vw, 2.8rem);
}

.page-card .entry-featured-image {
  margin: 1.5rem clamp(1.4rem, 4vw, 2.8rem) 0;
}

.page-kicker {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 0.75rem;
  padding: 0.32rem 0.62rem;
  border: 1px solid rgba(245,166,35,0.45);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber);
  background: rgba(245,166,35,0.08);
}

@media (max-width: 768px) {
  .category-filter {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    scrollbar-width: thin;
  }

  .category-filter a {
    flex: 0 0 auto;
  }
}

/* ============================================================
   NFLUK MOBILE STABILITY HOTFIX - v1.1.2
   ============================================================ */

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

#page {
  overflow-x: clip;
}

.site-branding,
.site-branding > div {
  min-width: 0;
}

.custom-logo-link,
.custom-logo {
  max-width: min(220px, 58vw);
  height: auto;
}

@media (max-width: 820px) {
  body {
    padding-bottom: calc(88px + env(safe-area-inset-bottom));
  }

  .site-content {
    width: 100%;
    padding: 1rem clamp(0.85rem, 4vw, 1.25rem);
  }

  .content-area,
  .main-content,
  .widget-area,
  .posts-grid,
  .posts-grid-wide {
    min-width: 0;
  }

  .site-header-inner {
    gap: 0.75rem;
    padding-inline: clamp(0.85rem, 4vw, 1.25rem);
  }

  .site-branding {
    flex: 1 1 auto;
    max-width: calc(100% - 56px);
  }

  .site-title {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nfluk-hero {
    gap: 1rem;
    padding: clamp(1rem, 5vw, 1.45rem);
    border-radius: 14px;
  }

  .nfluk-hero::before {
    width: 260px;
    height: 260px;
    opacity: 0.7;
  }

  .nfluk-hero::after {
    right: -0.4rem;
    bottom: -0.75rem;
    font-size: clamp(4rem, 26vw, 7rem);
  }

  .nfluk-hero h1 {
    max-width: 11ch;
    font-size: clamp(2.25rem, 13vw, 3.4rem);
    line-height: 0.93;
  }

  .nfluk-hero p {
    max-width: 100%;
  }

  .nfluk-hero-board {
    grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
    gap: 0.45rem;
  }

  .nfluk-hero-board div {
    min-width: 0;
    padding: 0.7rem 0.45rem;
  }

  .nfluk-hero-board strong {
    font-size: clamp(1.45rem, 8vw, 2rem);
    overflow-wrap: anywhere;
  }

  .nfluk-hero-board span {
    font-size: 0.54rem;
    letter-spacing: 0.08em;
  }

  .hero-actions {
    gap: 0.55rem;
  }

  .hero-actions a,
  .btn-primary,
  .btn-ghost {
    max-width: 100%;
  }

  .community-launchpad {
    gap: 0.75rem;
  }

  .launch-card {
    min-height: auto;
    padding: 0.95rem;
  }

  .section-header {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
  }

  .section-title {
    font-size: clamp(1.55rem, 9vw, 2rem);
  }

  .hero-post {
    min-height: 340px;
    border-radius: 14px;
  }

  .hero-content {
    padding: 1.1rem;
  }

  .hero-meta,
  .post-card-meta,
  .entry-meta {
    flex-wrap: wrap;
    row-gap: 0.35rem;
  }

  .hero-title {
    font-size: clamp(1.55rem, 9vw, 2.2rem);
  }

  .post-card-body,
  .widget-body {
    padding: 1rem;
  }

  #secondary {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .page-card .entry-header,
  .page-card .entry-content {
    padding-inline: 1rem;
  }

  .page-card .entry-featured-image {
    margin-inline: 1rem;
  }

  .mobile-game-nav {
    left: max(0.65rem, env(safe-area-inset-left));
    right: max(0.65rem, env(safe-area-inset-right));
    bottom: max(0.65rem, env(safe-area-inset-bottom));
    padding: 0.35rem;
    border-radius: 16px;
  }

  .mobile-game-nav a {
    min-width: 0;
    min-height: 48px;
    padding: 0.25rem 0.1rem;
    font-size: clamp(0.58rem, 2.8vw, 0.72rem);
    letter-spacing: 0.035em;
  }
}

@media (max-width: 520px) {
  .news-ticker {
    min-height: 32px;
  }

  .ticker-label {
    font-size: 0.58rem;
    letter-spacing: 0.08em;
    padding-inline: 0.55rem;
  }

  .ticker-item {
    font-size: 0.74rem;
    padding-inline: 1rem;
  }

  .hero-kicker,
  .page-kicker {
    font-size: 0.58rem;
    letter-spacing: 0.1em;
  }

  .nfluk-hero h1 {
    max-width: 100%;
    font-size: clamp(2.05rem, 12vw, 2.85rem);
  }

  .nfluk-hero-board {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nfluk-hero-board div {
    padding: 0.62rem 0.25rem;
  }

  .nfluk-hero-board strong {
    font-size: clamp(1.25rem, 7vw, 1.65rem);
  }

  .nfluk-hero-board span {
    font-size: 0.48rem;
    letter-spacing: 0.035em;
  }

  .category-filter {
    margin-inline: -0.85rem;
    padding-inline: 0.85rem;
  }

  .category-filter a {
    min-height: 34px;
    padding: 0.42rem 0.65rem;
    font-size: 0.68rem;
    letter-spacing: 0.065em;
  }

  .footer-grid {
    gap: 1.25rem;
  }
}

@media (max-width: 380px) {
  .site-title {
    font-size: 1.02rem;
    letter-spacing: 0.05em;
  }

  .site-branding::before {
    font-size: 1.05rem;
  }

  .ticker-label {
    display: none;
  }

  .nfluk-hero h1 {
    font-size: 2rem;
  }

  .nfluk-hero-board {
    grid-template-columns: 1fr;
  }

  .nfluk-hero-board div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    text-align: left;
  }

  .nfluk-hero-board span {
    margin-top: 0;
    text-align: right;
  }

  .mobile-game-nav a {
    font-size: 0.56rem;
  }
}


/* ============================================================
   PEEPSO READABILITY RESCUE - v1.1.3
   ============================================================
   PeepSo renders a lot of its feed on light cards. The theme is
   deliberately dark, so inherited chalk/white text made the wall look
   invisible on mobile. These rules keep PeepSo readable without
   changing the rest of the Stadium Glass identity.
   ============================================================ */

/* Let community/plugin pages breathe a bit more than article pages. */
.page-card .entry-content:has(#peepso),
.page-card .entry-content:has(.peepso),
.page-card .entry-content:has(.ps-page),
.page-card .entry-content:has(.ps-postbox) {
  padding-inline: clamp(0.75rem, 3vw, 1.4rem);
}

body .entry-content #peepso,
body .entry-content .peepso,
body .entry-content .ps-page,
body .entry-content .ps-wrapper,
body .entry-content .ps-postbox,
body .entry-content .ps-post,
body .entry-content .ps-comment,
body .entry-content .ps-navbar,
body .entry-content .ps-focus,
body .entry-content .ps-members,
body .entry-content .ps-profile,
body .entry-content .ps-notifications,
body .entry-content .ps-groups {
  --ps-community-ink: #172018;
  --ps-community-muted: #58675b;
  --ps-community-link: #9a630c;
  --ps-community-card: #ffffff;
  --ps-community-panel: #f7faf7;
  color: var(--ps-community-ink) !important;
}

body .entry-content #peepso,
body .entry-content .peepso,
body .entry-content .ps-page,
body .entry-content .ps-wrapper {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border-radius: 14px;
  background: var(--ps-community-panel) !important;
  color: var(--ps-community-ink) !important;
  overflow: hidden;
}

/* PeepSo cards, forms and feed surfaces. */
body .entry-content :where(
  #peepso,
  .peepso,
  .ps-page,
  .ps-postbox,
  .ps-post,
  .ps-comment,
  .ps-commentbox,
  .ps-navbar,
  .ps-focus,
  .ps-profile,
  .ps-widget,
  .ps-dropdown,
  .ps-modal,
  .ps-dialog,
  .ps-form,
  .ps-alert,
  .ps-list,
  .ps-members__item,
  .ps-groups__item
) {
  color: var(--ps-community-ink, #172018) !important;
}

body .entry-content :where(
  .ps-postbox,
  .ps-post,
  .ps-comment,
  .ps-commentbox,
  .ps-navbar,
  .ps-focus,
  .ps-profile,
  .ps-widget,
  .ps-members__item,
  .ps-groups__item
) {
  background-color: var(--ps-community-card, #fff) !important;
  border-color: rgba(23,32,24,0.12) !important;
}

/* Override the theme's dark article text inside PeepSo. */
body .entry-content :where(
  #peepso,
  .peepso,
  .ps-page,
  .ps-wrapper,
  .ps-postbox,
  .ps-post,
  .ps-comment,
  .ps-commentbox,
  .ps-navbar,
  .ps-focus,
  .ps-profile,
  .ps-widget,
  .ps-modal,
  .ps-dialog
) :where(p, span, div, label, small, time, li, td, th, h1, h2, h3, h4, h5, h6, strong, em) {
  color: inherit !important;
}

body .entry-content :where(
  #peepso,
  .peepso,
  .ps-page,
  .ps-wrapper
) :where(
  .ps-post__title,
  .ps-post__title a,
  .ps-post__author,
  .ps-comment__author,
  .ps-comment__author a,
  .ps-postbox__input,
  .ps-stream-title,
  .ps-focus__title,
  .ps-profile__title
) {
  color: var(--ps-community-ink, #172018) !important;
}

body .entry-content :where(
  #peepso,
  .peepso,
  .ps-page,
  .ps-wrapper
) :where(
  .ps-post__meta,
  .ps-post__meta a,
  .ps-comment__meta,
  .ps-post__actions,
  .ps-post__action,
  .ps-post__footer,
  .ps-postbox__menu,
  .ps-postbox__moods,
  .ps-postbox__options,
  .ps-toolbar,
  .ps-navbar__menu,
  .ps-notification__desc,
  .ps-muted
) {
  color: var(--ps-community-muted, #58675b) !important;
}

body .entry-content :where(#peepso, .peepso, .ps-page, .ps-wrapper) a {
  color: var(--ps-community-link, #9a630c) !important;
}

body .entry-content :where(#peepso, .peepso, .ps-page, .ps-wrapper) a:hover {
  color: #6f000d !important;
}

/* Inputs and placeholders: stop the “ghost typing” effect. */
body .entry-content :where(#peepso, .peepso, .ps-page, .ps-wrapper) :where(input, textarea, select, .ps-input, .ps-textarea, .ps-postbox__input) {
  background: #fff !important;
  color: var(--ps-community-ink, #172018) !important;
  border-color: rgba(23,32,24,0.18) !important;
  caret-color: #d4001a;
}

body .entry-content :where(#peepso, .peepso, .ps-page, .ps-wrapper) :where(input, textarea, .ps-input, .ps-textarea, .ps-postbox__input)::placeholder {
  color: #667569 !important;
  opacity: 1 !important;
}

/* Buttons: keep primary actions on-brand and readable. */
body .entry-content :where(#peepso, .peepso, .ps-page, .ps-wrapper) :where(.ps-btn, button, input[type="button"], input[type="submit"]) {
  border-color: rgba(23,32,24,0.16) !important;
}

body .entry-content :where(#peepso, .peepso, .ps-page, .ps-wrapper) :where(.ps-btn--primary, .ps-btn-primary, .ps-btn--action, .ps-postbox__action--post) {
  background: var(--amber) !important;
  border-color: var(--amber-dim) !important;
  color: var(--turf) !important;
  font-weight: 800;
}

/* Media and shared links should never exceed the phone viewport. */
body .entry-content :where(#peepso, .peepso, .ps-page, .ps-wrapper) :where(img, video, iframe, canvas, object, embed) {
  max-width: 100% !important;
  height: auto;
}

body .entry-content :where(#peepso, .peepso, .ps-page, .ps-wrapper) :where(.ps-post, .ps-postbox, .ps-comment, .ps-media, .ps-post__content, .ps-comment__content) {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: normal;
}

/* WordPress blocks with light backgrounds inside community pages. */
.entry-content .has-background,
.entry-content [style*="background-color: #fff"],
.entry-content [style*="background-color:#fff"],
.entry-content [style*="background: #fff"],
.entry-content [style*="background:#fff"],
.entry-content [style*="background-color: white"],
.entry-content [style*="background:white"] {
  color: #172018 !important;
}

.entry-content .has-background :where(p, span, div, a, strong, em, h1, h2, h3, h4, h5, h6),
.entry-content [style*="background-color: #fff"] :where(p, span, div, a, strong, em, h1, h2, h3, h4, h5, h6),
.entry-content [style*="background-color:#fff"] :where(p, span, div, a, strong, em, h1, h2, h3, h4, h5, h6),
.entry-content [style*="background: #fff"] :where(p, span, div, a, strong, em, h1, h2, h3, h4, h5, h6),
.entry-content [style*="background:#fff"] :where(p, span, div, a, strong, em, h1, h2, h3, h4, h5, h6),
.entry-content [style*="background-color: white"] :where(p, span, div, a, strong, em, h1, h2, h3, h4, h5, h6),
.entry-content [style*="background:white"] :where(p, span, div, a, strong, em, h1, h2, h3, h4, h5, h6) {
  color: inherit !important;
}

@media (max-width: 820px) {
  body .entry-content #peepso,
  body .entry-content .peepso,
  body .entry-content .ps-page,
  body .entry-content .ps-wrapper {
    border-radius: 10px;
  }

  body .entry-content :where(.ps-postbox, .ps-post, .ps-comment, .ps-navbar, .ps-focus, .ps-profile) {
    border-radius: 8px !important;
  }

  /* When typing into PeepSo, get the game nav out of the way. */
  body.is-community-input-focused .mobile-game-nav {
    transform: translateY(calc(120% + env(safe-area-inset-bottom)));
    opacity: 0;
    pointer-events: none;
  }
}
