/* ==========================================================================
   PitchLight · 绿茵战术板 — Custom Football Theme for Halo 2.x
   Night Mode: Champions League Floodlights Obsidian & Emerald & Ballon d'Or Gold
   Day Mode:   Classic Matchday Programme Warm Cream & Forest Pitch Green
   Typography: Space Grotesk (Display) + Noto Sans SC (CJK) + JetBrains Mono (Data)
   ========================================================================== */

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/space-grotesk-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/space-grotesk-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root,
[data-theme="dark"] {
  --pl-font-sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --pl-font-display: "Space Grotesk", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", -apple-system, BlinkMacSystemFont, sans-serif;
  --pl-font-mono: "JetBrains Mono", "Noto Sans SC", "SFMono-Regular", Menlo, Consolas, monospace;
  --bg-body: #07110d;
  --bg-surface: rgba(13, 27, 22, 0.84);
  --bg-surface-solid: #0d1b16;
  --bg-surface-elevated: #12261f;
  --bg-glass: rgba(10, 22, 18, 0.78);
  --bg-code: #0b1612;
  --bg-quote: rgba(16, 185, 129, 0.08);

  --text-primary: #f1f5f2;
  --text-secondary: #a7bdb3;
  --text-muted: #6e8b7e;

  --accent-emerald: #10b981;
  --accent-emerald-soft: rgba(16, 185, 129, 0.16);
  --accent-gold: #f5b731;
  --accent-gold-bright: #fde047;
  --accent-gold-soft: rgba(245, 183, 49, 0.14);
  --accent-red: #ef4444;

  --border-subtle: rgba(148, 197, 175, 0.14);
  --border-strong: rgba(245, 183, 49, 0.35);
  --chalk-line: rgba(167, 243, 208, 0.065);
  --shadow-card: 0 12px 32px rgba(0, 0, 0, 0.38);
  --shadow-glow: 0 0 40px rgba(16, 185, 129, 0.12);

  --table-head-bg: #112920;
  --table-zebra: rgba(255, 255, 255, 0.025);
  --table-hover: rgba(16, 185, 129, 0.09);
  --chart-plate: #ffffff;
}

[data-theme="light"] {
  --bg-body: #f5f7f4;
  --bg-surface: rgba(255, 255, 255, 0.94);
  --bg-surface-solid: #ffffff;
  --bg-surface-elevated: #eef3ef;
  --bg-glass: rgba(255, 255, 255, 0.88);
  --bg-code: #f0f4f1;
  --bg-quote: rgba(5, 150, 105, 0.07);

  --text-primary: #0f1f19;
  --text-secondary: #3b5248;
  --text-muted: #667d73;

  --accent-emerald: #059669;
  --accent-emerald-soft: rgba(5, 150, 105, 0.12);
  --accent-gold: #c98a10;
  --accent-gold-bright: #d97706;
  --accent-gold-soft: rgba(201, 138, 16, 0.12);
  --accent-red: #dc2626;

  --border-subtle: rgba(15, 31, 25, 0.1);
  --border-strong: rgba(201, 138, 16, 0.38);
  --chalk-line: rgba(5, 150, 105, 0.075);
  --shadow-card: 0 8px 26px rgba(15, 31, 25, 0.07);
  --shadow-glow: 0 0 32px rgba(5, 150, 105, 0.08);

  --table-head-bg: #0f2920;
  --table-zebra: rgba(15, 31, 25, 0.025);
  --table-hover: rgba(5, 150, 105, 0.07);
  --chart-plate: #ffffff;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--pl-font-sans);
  background-color: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* Subtle pitch chalk grid texture */
  background-image:
    radial-gradient(ellipse 75% 420px at 50% -110px, rgba(16, 185, 129, 0.17), transparent 72%),
    radial-gradient(ellipse 45% 260px at 82% -60px, rgba(245, 183, 49, 0.11), transparent 70%),
    linear-gradient(to right, var(--chalk-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--chalk-line) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 72px 72px, 72px 72px;
  background-attachment: fixed;
}

a {
  color: var(--accent-emerald);
  text-decoration: none;
  transition: color 0.18s ease, opacity 0.18s ease;
}

a:hover {
  color: var(--accent-gold);
}

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

.pl-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 22px;
}

/* ---------- Reading Progress Bar ---------- */
.pl-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-emerald), var(--accent-gold), var(--accent-gold-bright));
  z-index: 1000;
  box-shadow: 0 0 10px rgba(245, 183, 49, 0.65);
  transition: width 0.08s linear;
}

/* ---------- Sticky Top Header ---------- */
.pl-header {
  position: sticky;
  top: 0;
  z-index: 900;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: var(--bg-glass);
  border-bottom: 1px solid var(--border-subtle);
}

.pl-header-inner {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.pl-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-primary);
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: 0.01em;
}

.pl-brand:hover {
  color: var(--accent-gold);
}

.pl-brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 10px rgba(245, 183, 49, 0.35));
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pl-brand:hover .pl-brand-icon {
  transform: scale(1.08) rotate(-4deg);
}

.pl-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.pl-brand-sub {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-gold);
}

.pl-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pl-nav-link {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: background 0.18s ease, color 0.18s ease;
}

.pl-nav-link:hover,
.pl-nav-link.active {
  background: var(--accent-emerald-soft);
  color: var(--text-primary);
}

.pl-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pl-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s ease;
}

.pl-icon-btn:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  transform: translateY(-1px);
}

.pl-lang-btn {
  width: auto;
  min-width: 44px;
  padding: 0 11px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex-shrink: 0;
  color: var(--accent-gold);
  border-color: var(--border-strong);
  background: var(--accent-gold-soft);
}

.pl-lang-btn:hover {
  background: var(--accent-gold);
  color: #07110d;
}

.pl-mobile-toggle {
  display: none;
}

/* ---------- Hero Stadium Tactical Board (Home) ---------- */
.pl-hero {
  position: relative;
  margin: 26px auto 28px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background:
    radial-gradient(circle at 18% 15%, rgba(16, 185, 129, 0.24), transparent 48%),
    radial-gradient(circle at 86% 20%, rgba(245, 183, 49, 0.2), transparent 46%),
    linear-gradient(135deg, #091c15 0%, #0d271d 52%, #091511 100%);
  box-shadow: var(--shadow-card), var(--shadow-glow);
  color: #f8faf9;
}

.pl-hero-pitch-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.34;
}

@keyframes dashPass {
  to { stroke-dashoffset: -48; }
}
.pl-pass-arc {
  stroke-dasharray: 6 6;
  animation: dashPass 4.5s linear infinite;
}

@keyframes radarPing {
  0% { r: 4; opacity: 0.9; }
  100% { r: 16; opacity: 0; }
}
.pl-radar-ring {
  animation: radarPing 2.6s ease-out infinite;
}

.pl-hero-content {
  position: relative;
  z-index: 2;
  padding: 40px 38px 34px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 28px;
}

.pl-season-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 13px;
  border-radius: 999px;
  background: rgba(245, 183, 49, 0.14);
  border: 1px solid rgba(245, 183, 49, 0.42);
  color: #fde047;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.pl-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.75);
  animation: livePulse 2s infinite;
}

@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.75); }
  70% { box-shadow: 0 0 0 9px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.pl-hero-title {
  margin: 0 0 10px;
  font-size: clamp(1.75rem, 3.2vw, 2.55rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.2;
  background: linear-gradient(95deg, #ffffff 10%, #fde68a 65%, #34d399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pl-hero-subtitle {
  margin: 0;
  max-width: 620px;
  font-size: 1rem;
  color: #cbd5d0;
}

.pl-hero-trophy {
  width: 112px;
  height: 112px;
  filter: drop-shadow(0 12px 28px rgba(245, 183, 49, 0.32));
}

/* Broadcast Scoreboard Strip inside Hero Bottom */
.pl-scoreboard {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(148, 197, 175, 0.16);
  background: rgba(4, 12, 9, 0.56);
}

.pl-score-cell {
  padding: 13px 20px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-right: 1px solid rgba(148, 197, 175, 0.12);
}

.pl-score-cell:last-child {
  border-right: none;
}

.pl-score-label {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #86a89a;
  font-weight: 700;
}

.pl-score-val {
  font-size: 1.28rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #ffffff;
}

.pl-score-val span {
  font-size: 0.78rem;
  font-weight: 500;
  color: #fde047;
  margin-left: 4px;
}

/* ---------- Main Grid Layout (Content + Sidebar) ---------- */
.pl-main {
  flex: 1;
  padding-bottom: 56px;
}

.pl-layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
}

.pl-layout-grid > * {
  min-width: 0;
  max-width: 100%;
}

.pl-tactics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(310px, 100%), 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.pl-tactics-grid .pb-card-caption {
  display: none;
}

.pl-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.pl-section-title {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.02em;
}

.pl-section-title::before {
  content: "";
  width: 4px;
  height: 18px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--accent-gold), var(--accent-emerald));
}

/* ---------- Matchday Article Cards ---------- */
.pl-post-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.pl-post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.pl-post-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
}

.pl-card-cover-wrap {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: #0a1b14;
}

.pl-card-cover-wrap--tactical {
  display: block;
  height: auto;
}

.pl-card-cover-wrap--tactical .pitchboard-mount:empty {
  aspect-ratio: 1050 / 680;
}

.pl-card-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.pl-post-card:hover .pl-card-cover {
  transform: scale(1.04);
}

/* Auto Tactical Header Bar when post has no cover image */
.pl-card-tactical-strip {
  height: 6px;
  width: 100%;
  background: linear-gradient(90deg, var(--accent-emerald) 0%, var(--accent-gold) 58%, transparent 100%);
}

.pl-card-body {
  padding: 24px 26px 22px;
}

.pl-card-meta-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.pl-matchday-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 6px;
  background: var(--accent-gold-soft);
  border: 1px solid var(--border-strong);
  color: var(--accent-gold);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pl-pinned-badge {
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(239, 68, 68, 0.16);
  color: var(--accent-red);
  font-weight: 700;
  font-size: 0.72rem;
}

.pl-cat-pill {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--accent-emerald-soft);
  color: var(--accent-emerald);
  font-weight: 700;
  font-size: 0.74rem;
}

.pl-card-title {
  margin: 0 0 10px;
  font-size: 1.32rem;
  font-weight: 800;
  line-height: 1.35;
}

.pl-card-title a {
  color: var(--text-primary);
}

.pl-card-title a:hover {
  color: var(--accent-gold);
}

.pl-card-excerpt {
  margin: 0 0 16px;
  font-size: 0.94rem;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pl-card-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.pl-card-stats {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pl-read-more {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
  color: var(--accent-emerald);
}

.pl-read-more:hover {
  color: var(--accent-gold);
}

/* ---------- Sidebar Widgets ---------- */
.pl-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.pl-sidebar.is-sticky-column {
  position: sticky;
  top: 84px;
  max-height: calc(100vh - 102px);
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(245, 183, 49, 0.35) transparent;
}

.pl-sidebar.is-sticky-column::-webkit-scrollbar {
  width: 5px;
}

.pl-sidebar.is-sticky-column::-webkit-scrollbar-thumb {
  background: rgba(245, 183, 49, 0.32);
  border-radius: 999px;
}

.pl-widget {
  border-radius: 18px;
  padding: 20px;
  background: var(--bg-surface-solid);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  flex-shrink: 0;
}

.pl-widget-title {
  margin: 0 0 14px;
  font-size: 0.92rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.pl-popular-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pl-popular-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.pl-rank-num {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.76rem;
  font-weight: 800;
  background: var(--accent-gold-soft);
  color: var(--accent-gold);
  border: 1px solid var(--border-strong);
}

.pl-popular-link {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.42;
  color: var(--text-primary);
}

.pl-popular-link:hover {
  color: var(--accent-gold);
}

.pl-popular-meta {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.pl-pill-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pl-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.pl-pill:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

/* ---------- Article / Match Report View (post.html & page.html) ---------- */
.pl-article-shell {
  margin-top: 26px;
}

.pl-article-card {
  border-radius: 22px;
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
}

.pl-article-header {
  padding: 34px 38px 26px;
  border-bottom: 1px solid var(--border-subtle);
  background:
    radial-gradient(circle at 90% 10%, rgba(245, 183, 49, 0.11), transparent 45%),
    radial-gradient(circle at 10% 0%, rgba(16, 185, 129, 0.12), transparent 50%);
}

.pl-article-title {
  margin: 12px 0 16px;
  font-size: clamp(1.55rem, 2.8vw, 2.2rem);
  font-weight: 900;
  line-height: 1.28;
  color: var(--text-primary);
}

.pl-article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.pl-author-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--text-primary);
}

.pl-author-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--accent-gold);
}

.pl-article-cover {
  width: 100%;
  max-height: 440px;
  object-fit: cover;
  display: block;
}

/* ---------- Editorial Data-Journalism Prose Typography ---------- */
.pl-prose {
  padding: 32px 38px 40px;
  font-size: 1.02rem;
  line-height: 1.82;
  color: var(--text-primary);
  word-break: break-word;
}

.pl-prose h1, .pl-prose h2, .pl-prose h3, .pl-prose h4 {
  color: var(--text-primary);
  font-weight: 800;
  line-height: 1.34;
  scroll-margin-top: 86px;
}

.pl-prose h2 {
  margin: 2.2em 0 0.85em;
  padding-bottom: 10px;
  font-size: 1.48rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 10px;
}

.pl-prose h2::before {
  content: "";
  width: 5px;
  height: 22px;
  border-radius: 3px;
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--accent-gold), var(--accent-emerald));
}

.pl-prose h3 {
  margin: 1.75em 0 0.65em;
  font-size: 1.22rem;
  color: var(--accent-gold);
}

.pl-prose h4 {
  margin: 1.4em 0 0.5em;
  font-size: 1.06rem;
  color: var(--accent-emerald);
}

.pl-prose p {
  margin: 0 0 1.15em;
}

.pl-prose strong {
  color: var(--text-primary);
  font-weight: 700;
}

.pl-prose ul, .pl-prose ol {
  margin: 0 0 1.2em;
  padding-left: 1.55em;
}

.pl-prose li {
  margin-bottom: 0.48em;
}

.pl-prose li::marker {
  color: var(--accent-gold);
  font-weight: 700;
}

.pl-prose hr {
  border: none;
  height: 1px;
  margin: 2.1em 0;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}

.pl-prose blockquote {
  margin: 1.4em 0;
  padding: 16px 20px;
  border-left: 4px solid var(--accent-gold);
  border-radius: 0 14px 14px 0;
  background: var(--bg-quote);
  color: var(--text-secondary);
}

.pl-prose blockquote p:last-child {
  margin-bottom: 0;
}

.pl-prose code {
  font-family: var(--pl-font-mono);
  font-size: 0.88em;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--bg-code);
  border: 1px solid var(--border-subtle);
  color: var(--accent-gold);
}

.pl-prose pre {
  margin: 1.4em 0;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--bg-code);
  border: 1px solid var(--border-subtle);
  overflow-x: auto;
}

.pl-prose pre code {
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-primary);
}

.pl-prose figure {
  margin: 1.5em 0;
  max-width: 100%;
}

.pl-prose figcaption {
  margin-top: 8px;
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--text-muted);
  text-align: center;
}

/* Crisp White Backing Plate + Click-to-Zoom for Data Charts */
.pl-prose img {
  display: block;
  margin: 1.6em auto;
  border-radius: 14px;
  background: var(--chart-plate);
  padding: 6px;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  cursor: zoom-in;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pl-prose figure img {
  margin: 0 auto;
}

.pl-prose img:hover {
  transform: scale(1.01);
  box-shadow: 0 14px 36px rgba(245, 183, 49, 0.2);
}

/* Opta-Style Scrollable Data Tables */
.pl-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5em 0;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-solid);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
}

.pl-prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}

.pl-prose thead th,
.pl-prose tr:first-child th {
  background: var(--table-head-bg);
  color: #fde68a;
  font-weight: 700;
  text-align: left;
  padding: 11px 13px;
  border-bottom: 2px solid var(--accent-gold);
  white-space: nowrap;
}

.pl-prose td {
  padding: 10px 13px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  vertical-align: top;
}

.pl-prose tbody tr:nth-child(even) td {
  background: var(--table-zebra);
}

.pl-prose tbody tr:hover td {
  background: var(--table-hover);
}

/* ---------- Sticky Tactical Board TOC ---------- */
.pl-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 44vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(16, 185, 129, 0.35) transparent;
}

.pl-toc-link {
  display: block;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.84rem;
  line-height: 1.4;
  color: var(--text-secondary);
  border-left: 2px solid transparent;
  transition: all 0.16s ease;
}

.pl-toc-link.level-3 {
  padding-left: 22px;
  font-size: 0.8rem;
}

.pl-toc-link:hover,
.pl-toc-link.active {
  background: var(--accent-emerald-soft);
  color: var(--accent-gold);
  border-left-color: var(--accent-gold);
  font-weight: 700;
}

/* ---------- Prev / Next Fixture Navigation ---------- */
.pl-post-nav {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 22px;
}

.pl-post-nav-card {
  padding: 18px 20px;
  border-radius: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  transition: all 0.18s ease;
  min-width: 0;
}

.pl-post-nav-card--next {
  text-align: right;
}

.pl-post-nav-card:hover {
  border-color: var(--accent-gold);
  transform: translateY(-2px);
}

.pl-post-nav-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-gold);
  margin-bottom: 6px;
}

.pl-post-nav-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* ---------- Comments Box ---------- */
.pl-comments-box {
  margin-top: 24px;
  padding: 26px 32px;
  border-radius: 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
}

/* ---------- Pagination ---------- */
.pl-pagination {
  margin-top: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.pl-page-btn {
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 700;
}

.pl-page-btn:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.pl-page-info {
  font-size: 0.86rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* ---------- Archives Timeline ---------- */
.pl-archive-year {
  margin: 24px 0 12px;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--accent-gold);
}

.pl-archive-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  margin-bottom: 10px;
}

.pl-archive-item:hover {
  border-color: var(--accent-gold);
}

.pl-archive-date {
  font-size: 0.82rem;
  font-family: monospace;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ---------- Lightbox Modal ---------- */
.pl-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(3, 10, 8, 0.92);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
  cursor: zoom-out;
}

.pl-lightbox.open {
  display: flex;
}

.pl-lightbox img {
  max-width: 95vw;
  max-height: 90vh;
  border-radius: 12px;
  background: #ffffff;
  padding: 8px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7);
}

/* ---------- Back To Top Button ---------- */
.pl-back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--accent-gold);
  background: var(--bg-surface-solid);
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: all 0.22s ease;
  z-index: 850;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.pl-back-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.pl-back-top:hover {
  background: var(--accent-gold);
  color: #07110d;
}

/* ---------- Footer ---------- */
.pl-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-glass);
  padding: 28px 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.pl-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.pl-footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  font-weight: 700;
}

/* ---------- Opta Data-Lab Typography Role Bindings ---------- */
.pl-brand,
.pl-nav-link,
.pl-hero-title,
.pl-section-title,
.pl-card-title,
.pl-widget-title,
.pl-article-title,
.pl-prose h1,
.pl-prose h2,
.pl-prose h3,
.pl-prose h4,
.pl-archive-year,
.pl-post-nav-title,
body .pb-title,
body .pb-spotlight-title {
  font-family: var(--pl-font-display);
}

.pl-score-val,
.pl-rank-num,
.pl-matchday-badge,
.pl-lang-btn,
.pl-page-info,
.pl-archive-date,
.pl-card-meta-top time,
.pl-article-meta time,
.pl-prose table,
body .pb-badge,
body .pb-view-pill,
body .pb-card-pill {
  font-family: var(--pl-font-mono);
  font-variant-numeric: tabular-nums;
}

body .pb-root {
  font-family: var(--pl-font-sans);
}

body .pb-svg text {
  font-family: var(--pl-font-display);
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  body {
    background-attachment: scroll;
  }
  .pl-layout-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
  .pl-sidebar {
    order: 2;
  }
  .pl-sidebar.is-sticky-column {
    position: static;
    max-height: none;
    overflow-y: visible;
    padding-right: 0;
  }
  .pl-hero-content {
    grid-template-columns: 1fr;
    padding: 30px 24px 24px;
  }
  .pl-hero-trophy {
    display: none;
  }
  .pl-scoreboard {
    grid-template-columns: repeat(2, 1fr);
  }
  .pl-score-cell:nth-child(2) {
    border-right: none;
  }
  .pl-score-cell:nth-child(1),
  .pl-score-cell:nth-child(2) {
    border-bottom: 1px solid rgba(148, 197, 175, 0.12);
  }
}

@media (max-width: 720px) {
  .pl-container {
    padding: 0 14px;
  }

  /* Compact, non-wrapping mobile header */
  .pl-header-inner {
    height: 60px;
    gap: 8px;
  }
  .pl-brand {
    min-width: 0;
    flex: 1 1 auto;
    gap: 8px;
    font-size: 0.96rem;
  }
  .pl-brand-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
  }
  .pl-brand-text {
    min-width: 0;
    overflow: hidden;
  }
  .pl-brand-text > span:first-child {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .pl-brand-sub {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.62rem;
    letter-spacing: 0.06em;
  }
  .pl-header-actions {
    flex-shrink: 0;
    gap: 5px;
  }
  .pl-icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 9px;
  }
  .pl-lang-btn {
    width: auto;
    min-width: 0;
    padding: 0 9px;
    font-size: 0.74rem;
  }
  .pl-nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px 14px;
    background: var(--bg-surface-solid);
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35);
  }
  .pl-nav.open {
    display: flex;
  }
  .pl-nav-link {
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.94rem;
  }
  .pl-mobile-toggle {
    display: inline-flex;
  }

  /* Hero & Scoreboard */
  .pl-hero {
    margin: 14px auto 18px;
    border-radius: 16px;
  }
  .pl-hero-content {
    padding: 20px 16px 18px;
    gap: 16px;
  }
  .pl-season-pill {
    font-size: 0.68rem;
    padding: 4px 10px;
    margin-bottom: 10px;
    max-width: 100%;
  }
  .pl-hero-title {
    font-size: 1.48rem;
  }
  .pl-hero-subtitle {
    font-size: 0.9rem;
    line-height: 1.6;
  }
  .pl-score-cell {
    padding: 10px 14px;
  }
  .pl-score-val {
    font-size: 1.08rem;
  }

  /* Unified Section, Feed Cards & Tactics Grid */
  .pl-main {
    padding-bottom: 36px;
  }
  .pl-section-head {
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
  }
  .pl-section-title {
    font-size: 1rem;
  }
  .pl-post-list,
  .pl-tactics-grid {
    gap: 14px;
  }
  .pl-post-card {
    border-radius: 16px;
  }
  .pl-card-cover-wrap {
    height: auto;
    aspect-ratio: 16 / 9;
  }
  .pl-card-cover-wrap--tactical {
    aspect-ratio: auto;
    height: auto;
  }
  .pl-card-body {
    padding: 16px 16px 14px;
  }
  .pl-card-meta-top {
    gap: 6px 8px;
    font-size: 0.74rem;
  }
  .pl-card-title {
    font-size: 1.12rem;
    line-height: 1.38;
  }
  .pl-card-excerpt {
    font-size: 0.88rem;
    margin-bottom: 12px;
  }
  .pl-card-footer {
    gap: 8px;
    padding-top: 12px;
    font-size: 0.78rem;
  }
  .pl-card-stats {
    gap: 10px;
    flex-wrap: wrap;
  }

  /* Article View & Prose */
  .pl-article-shell {
    margin-top: 14px;
  }
  .pl-article-card {
    border-radius: 16px;
  }
  .pl-article-header {
    padding: 20px 16px 16px;
  }
  .pl-article-title {
    font-size: 1.38rem;
    line-height: 1.32;
    margin: 10px 0 12px;
  }
  .pl-article-meta {
    gap: 8px 12px;
    font-size: 0.8rem;
  }
  .pl-article-cover {
    max-height: 240px;
    width: 100%;
    height: auto;
    object-fit: cover;
  }
  .pl-prose {
    padding: 20px 16px 26px;
    font-size: 0.96rem;
    line-height: 1.78;
  }
  .pl-prose h2 {
    font-size: 1.24rem;
    margin: 1.7em 0 0.75em;
    align-items: flex-start;
  }
  .pl-prose h2::before {
    margin-top: 4px;
    height: 18px;
  }
  .pl-prose h3 {
    font-size: 1.08rem;
    margin: 1.45em 0 0.55em;
  }
  .pl-prose blockquote {
    margin: 1.1em 0;
    padding: 12px 14px;
  }
  .pl-prose img {
    margin: 1.1em auto;
    padding: 4px;
    border-radius: 10px;
  }
  .pl-prose figcaption {
    font-size: 0.78rem;
  }
  .pl-table-wrap {
    margin: 1.2em 0;
    border-radius: 10px;
  }
  .pl-prose table {
    font-size: 0.82rem;
  }
  .pl-prose thead th,
  .pl-prose tr:first-child th,
  .pl-prose td {
    padding: 8px 10px;
  }

  /* Post Navigation, Widgets, Comments & Archives */
  .pl-post-nav {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 16px;
  }
  .pl-post-nav-card {
    padding: 14px 16px;
    border-radius: 14px;
  }
  .pl-post-nav-card--next {
    text-align: left;
  }
  .pl-widget {
    padding: 16px;
    border-radius: 16px;
  }
  .pl-comments-box {
    margin-top: 16px;
    padding: 18px 16px;
    border-radius: 16px;
  }
  .pl-archive-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 14px;
  }
  .pl-pagination {
    gap: 10px;
    margin-top: 20px;
  }
  .pl-page-btn {
    padding: 8px 14px;
    font-size: 0.82rem;
  }

  /* Footer + Back-to-Top Safe Clearance */
  .pl-footer {
    padding: 20px 0 72px;
    font-size: 0.8rem;
  }
  .pl-footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .pl-back-top {
    right: 14px;
    bottom: 16px;
    width: 40px;
    height: 40px;
  }
  .pl-lightbox {
    padding: 12px;
  }
}
