/* ============================================================
   JeffAPierson.com - Main Stylesheet
   Dark-themed editorial site for policy consulting,
   journalism, and advocacy
   ============================================================ */

/* ----------------------------------------------------------
   1. CSS Custom Properties
   ---------------------------------------------------------- */
:root {
  /* Colors — aligned with RULES-AND-STANDARDS.md */
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-card: #1c2128;
  --bg-hover: #292e36;
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  --accent: #58a6ff;
  --accent-hover: #79b8ff;
  --accent-dark: #1f6feb;
  --gold: #d4a843;
  --navy: #2e4a7a;
  --border: #30363d;
  --border-light: #3d444d;
  --success: #3fb950;
  --warning: #d29922;
  --danger: #f85149;
  --shadow: rgba(0, 0, 0, 0.3);
  --radius: 8px;
  --radius-lg: 12px;
  --transition: 0.25s ease;
  /* Typography — editorial trio from Google Fonts */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Serif Pro', Georgia, serif;
  --font-ui: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  /* Layout */
  --sidebar-width: 260px;
  --header-height: 64px;
}

/* ----------------------------------------------------------
   2. Reset & Base Typography
   ---------------------------------------------------------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;  /* RULES: 16px (1rem) base */
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;  /* RULES: 1.6 */
  color: var(--text-primary);
  background-color: var(--bg-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
  margin-bottom: 0.6em;
}

h1 {
  font-size: 1.8rem;   /* RULES: 1.8rem */
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.4rem;   /* RULES: 1.4rem */
  font-weight: 700;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.15rem;  /* RULES: 1.15rem */
  font-weight: 700;
}

h4 {
  font-size: 1rem;
  font-weight: 700;
}

h5 {
  font-size: 0.9rem;
  font-weight: 700;
}

h6 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

p {
  font-family: var(--font-body);
  margin-bottom: 1.25em;
  color: var(--text-primary);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover,
a:focus-visible {
  color: var(--accent-hover);
  text-decoration: underline;
}

strong, b {
  font-weight: 700;
}

em, i {
  font-style: italic;
}

small {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

ul, ol {
  margin-bottom: 1.25em;
  padding-left: 1.5em;
}

li {
  margin-bottom: 0.4em;
}

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

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

::selection {
  background: var(--accent-dark);
  color: #fff;
}

/* ----------------------------------------------------------
   3. Skip-to-Content Link
   ---------------------------------------------------------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  padding: 0.6em 1.4em;
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.9rem;
  z-index: 10000;
  transition: top var(--transition);
}

.skip-link:focus {
  top: 12px;
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  text-decoration: none;
  color: #fff;
}

/* Visible focus ring when navigating via keyboard */
body.keyboard-nav *:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

body:not(.keyboard-nav) *:focus {
  outline: none;
}

/* ----------------------------------------------------------
   4. Site Header
   ---------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

.site-logo img {
  width: 36px;
  height: 36px;
  border-radius: 6px;
}

.logo-text {
  font-family: var(--font-heading);
  font-weight: 700;
}

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

.site-logo .logo-accent {
  color: var(--gold);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  margin-left: auto;
  margin-right: 1rem;
}

.header-nav a {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.3em 0;
  position: relative;
  transition: color var(--transition);
}

.header-nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width var(--transition);
}

.header-nav a:hover,
.header-nav a.active {
  color: var(--text-primary);
  text-decoration: none;
}

.header-nav a:hover::after,
.header-nav a.active::after {
  width: 100%;
}

.hamburger {
  display: none;          /* Hidden on desktop, shown on mobile */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
  z-index: 1100;
  flex-shrink: 0;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.hamburger.is-active span:nth-child(1) {
  transform: rotate(45deg) translateY(5px) translateX(5px);
}

.hamburger.is-active span:nth-child(2) {
  opacity: 0;
}

.hamburger.is-active span:nth-child(3) {
  transform: rotate(-45deg) translateY(-5px) translateX(5px);
}

/* ----------------------------------------------------------
   5. Sidebar Navigation
   Hidden by default on ALL screen sizes.
   Slides in from left when hamburger is clicked.
   ---------------------------------------------------------- */
.sidebar {
  position: fixed;
  top: var(--header-height);
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 900;
  padding: 1.5rem 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border-light) transparent;
  transition: transform 0.3s ease;
}

.sidebar-section {
  margin-bottom: 1.5rem;
}

.sidebar-label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  padding: 1.25rem 1.25rem 0.4rem;
  margin: 0;
  list-style: none;
  border-top: 1px solid var(--border);
}

.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-nav li {
  margin: 0;
}

.sidebar-nav a {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-secondary);
  padding: 0.45rem 1.25rem;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all var(--transition);
}

.sidebar-nav a:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
  text-decoration: none;
}

.sidebar-nav a.active {
  color: var(--gold);
  border-left-color: var(--gold);
  background: rgba(212, 168, 67, 0.06);
  font-weight: 600;
}

/* Collapsible nav groups */
.nav-group {
  margin-bottom: 0.15rem;
}

.nav-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  border-top: 1px solid var(--border);
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  padding: 1rem 1.25rem 0.5rem;
  cursor: pointer;
  text-align: left;
  transition: color var(--transition), background var(--transition);
}

.nav-group:first-child > .nav-group-toggle {
  border-top: none;
}

.nav-group-toggle:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.nav-group-toggle::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.25s ease;
  flex-shrink: 0;
  margin-left: 0.5rem;
}

.nav-group.expanded > .nav-group-toggle::after,
.nav-group-toggle[aria-expanded="true"]::after {
  transform: rotate(45deg);
}

.nav-submenu {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, opacity 0.25s ease;
  opacity: 0;
}

.nav-group.expanded > .nav-group-toggle + .nav-submenu,
.nav-group-toggle[aria-expanded="true"] + .nav-submenu,
.nav-submenu.is-open {
  max-height: 500px;
  opacity: 1;
  transition: max-height 0.35s ease-in, opacity 0.25s ease;
}

.nav-submenu li {
  margin: 0;
}

.nav-submenu a {
  padding-left: 2.25rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.nav-submenu a:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

/* Highlighted Home link at top of sidebar */
.nav-home-item {
  margin: 0.5rem 0.75rem 0.25rem;
}
.nav-home-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  background: rgba(212, 168, 67, 0.12);
  border: 1px solid rgba(212, 168, 67, 0.3);
  border-radius: 6px;
  color: var(--gold, #d4a843) !important;
  font-family: var(--font-ui);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition);
}
.nav-home-link svg {
  flex-shrink: 0;
}
.nav-home-link:hover {
  background: rgba(212, 168, 67, 0.22);
  border-color: var(--gold, #d4a843);
  color: #e8c36a !important;
}
.nav-home-link.active {
  background: rgba(212, 168, 67, 0.25);
  border-color: var(--gold, #d4a843);
}

/* Highlighted Search link */
.nav-item-highlight {
  margin: 0.25rem 0.75rem 0.5rem;
}
.nav-search-link {
  display: block;
  padding: 0.6rem 1rem;
  background: rgba(88, 166, 255, 0.12);
  border: 1px solid rgba(88, 166, 255, 0.3);
  border-radius: var(--radius);
  color: var(--accent) !important;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition);
}
.nav-search-link:hover {
  background: rgba(88, 166, 255, 0.22);
  border-color: var(--accent);
  color: var(--accent-hover) !important;
}
.nav-search-link.active {
  background: rgba(88, 166, 255, 0.25);
  border-color: var(--accent);
}

/* ----------------------------------------------------------
   6. Main Content Area
   ---------------------------------------------------------- */
.main-content {
  margin-left: var(--sidebar-width);
  margin-top: var(--header-height);
  min-height: calc(100vh - var(--header-height));
  padding: 2rem 2.5rem;
}

.content-wrapper {
  max-width: 1200px;
  margin: 0 auto;
}

.content-narrow {
  max-width: 720px;
  margin: 0 auto;
}

/* ----------------------------------------------------------
   6b. Section Headers
   ---------------------------------------------------------- */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-header h2 {
  margin-bottom: 0;
}

.section {
  margin-bottom: 2.5rem;
}

/* ----------------------------------------------------------
   7. Hero Section
   ---------------------------------------------------------- */
.hero {
  background: linear-gradient(135deg, #1f6feb 0%, #0D3B66 60%, #0d1117 100%);
  padding: 4rem 2.5rem 3.5rem;
  margin: -2rem -2.5rem 2.5rem;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 0.4em;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.hero .tagline {
  font-family: var(--font-ui);
  font-size: 1.15rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.78);
  max-width: 600px;
  line-height: 1.6;
}

.hero .tagline strong {
  color: #fff;
  font-weight: 600;
}

.hero-description {
  font-family: var(--font-ui);
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.65);
  max-width: 620px;
  margin-top: 0.8rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.8rem;
  flex-wrap: wrap;
}

.hero-actions .btn {
  font-size: 0.9rem;
  padding: 0.7rem 1.8rem;
}

.hero-actions .btn-secondary {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

.hero-actions .btn-secondary:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* Hero background image support */
.hero--has-bg {
  background-image: url('../assets/images/hero-home.svg');
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
}

/* ----------------------------------------------------------
   8. Stats Grid
   ---------------------------------------------------------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: border-color var(--transition), transform var(--transition);
}

.stat-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
}

.stat-value {
  font-family: var(--font-ui);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
  margin-bottom: 0.3rem;
}

.stat-label {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
}

/* ----------------------------------------------------------
   9. Article Cards (Substack-style)
   ---------------------------------------------------------- */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.75rem;
  margin-bottom: 2.5rem;
}

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition),
              transform var(--transition);
}

.article-card:hover {
  border-color: var(--border-light);
  box-shadow: 0 4px 20px var(--shadow);
  transform: translateY(-2px);
}

.article-card-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.article-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.article-card-content {
  padding: 1.5rem;
}

.article-card-category {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: rgba(88, 166, 255, 0.1);
  padding: 0.2em 0.65em;
  border-radius: 3px;
  margin-bottom: 0.75rem;
}

.article-card-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.6rem;
  color: var(--text-primary);
}

.article-card-title a {
  color: inherit;
  text-decoration: none;
}

.article-card-title a:hover {
  color: var(--accent);
  text-decoration: none;
}

.article-card-excerpt {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.article-card-meta .author {
  font-weight: 600;
  color: var(--text-secondary);
}

.article-card-meta .separator {
  color: var(--border-light);
}

/* Featured article variant */
.article-card.featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
}

.article-card.featured .article-card-image {
  height: 100%;
  min-height: 280px;
  border-bottom: none;
  border-right: 1px solid var(--border);
}

.article-card.featured .article-card-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.article-card.featured .article-card-title {
  font-size: 1.6rem;
}

.article-card.featured .article-card-excerpt {
  -webkit-line-clamp: 5;
}

/* --- Article Sections & Toolbar --- */
.articles-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.articles-view-toggle {
  display: flex;
  gap: 0.4rem;
}
.articles-sort {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.article-section {
  margin-bottom: 3rem;
}
.article-section-header {
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.article-section-header h2 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}
.article-section-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* --- Article Card Share/Download Overlay --- */
.article-card {
  position: relative;
}
.article-card-overlay {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.6rem;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.article-card:hover .article-card-overlay {
  opacity: 1;
}
.overlay-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  background: rgba(13, 17, 23, 0.85);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 0.75rem;
  font-family: var(--font-ui);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, border-color 0.2s ease;
  backdrop-filter: blur(6px);
}
.overlay-btn:hover {
  background: rgba(88, 166, 255, 0.2);
  border-color: var(--accent);
  color: var(--accent);
}

/* --- Article Single Action Bar --- */
.article-action-bar {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding: 1.25rem 0;
  margin-top: 2rem;
  border-top: 1px solid var(--border);
}
.action-bar-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.action-bar-btn:hover {
  background: rgba(88, 166, 255, 0.1);
  border-color: var(--accent);
  color: var(--accent);
}

/* --- Download Modal --- */
.download-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.download-modal-overlay[hidden] { display: none; }
.download-modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: 100%;
  max-width: 420px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.download-modal h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}
.download-modal p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.download-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}
.download-modal-close:hover { color: var(--text-primary); }
.download-privacy {
  font-size: 0.8rem !important;
  color: var(--text-muted) !important;
  margin-top: 0.75rem !important;
  margin-bottom: 0 !important;
}
.download-success {
  color: var(--success) !important;
  font-size: 1.1rem !important;
  font-weight: 600;
  margin-bottom: 1rem !important;
}

/* --- Article List Table --- */
.article-list-table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.article-list-table {
  width: 100%;
  border-collapse: collapse;
}
.article-list-table thead th {
  background: var(--bg-secondary);
  padding: 0.75rem 1rem;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  text-align: left;
  border-bottom: 2px solid var(--border);
}
.article-list-table thead th a {
  color: var(--text-secondary);
  text-decoration: none;
}
.article-list-table thead th a:hover {
  color: var(--accent);
}
.article-list-table tbody td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(48, 54, 61, 0.5);
  vertical-align: middle;
  font-size: 0.9rem;
}
.article-list-table tbody tr:hover {
  background: var(--bg-hover);
}
.list-article-title {
  display: block;
  color: var(--text-primary);
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 0.15rem;
}
.list-article-title:hover {
  color: var(--accent);
}
.list-article-author {
  display: block;
  color: var(--text-muted);
  font-size: 0.8rem;
}
.list-date, .list-views {
  color: var(--text-secondary);
  white-space: nowrap;
}
.list-actions {
  display: flex;
  gap: 0.4rem;
}
.overlay-btn-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}
.overlay-btn-sm:hover {
  background: rgba(88, 166, 255, 0.15);
  border-color: var(--accent);
  color: var(--accent);
}
.page-header-actions {
  margin-top: 0.5rem;
}

/* ----------------------------------------------------------
   10. General Cards
   ---------------------------------------------------------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.card:hover {
  border-color: var(--border-light);
}

.card-header {
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header h2,
.card-header h3 {
  margin-bottom: 0;
}

.card-footer {
  padding-top: 1rem;
  margin-top: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

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

/* Elevated card variant */
.card-elevated {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.card-elevated:hover {
  box-shadow: 0 6px 24px var(--shadow);
  transform: translateY(-2px);
}

/* ----------------------------------------------------------
   11. Buttons
   ---------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.7em 1.5em;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--transition);
}

.btn:hover {
  text-decoration: none;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Primary */
.btn-primary,
.btn {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff;
}

.btn-primary:hover,
.btn:not(.btn-secondary):not(.btn-outline):not(.btn-ghost):not(.btn-danger):hover {
  background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent) 100%);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(88, 166, 255, 0.3);
}

/* Secondary / Outline */
.btn-secondary,
.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover,
.btn-outline:hover {
  background: var(--bg-hover);
  border-color: var(--text-muted);
  color: var(--text-primary);
  transform: translateY(-1px);
}

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: none;
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

/* Danger */
.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  background: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Sizes */
.btn-sm {
  font-size: 0.78rem;
  padding: 0.45em 1em;
}

.btn-lg {
  font-size: 1.05rem;
  padding: 0.85em 2em;
}

/* ----------------------------------------------------------
   12. Tables
   ---------------------------------------------------------- */
.table-wrapper {
  overflow-x: auto;
  margin-bottom: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-ui);
  font-size: 0.88rem;
}

thead th {
  background: var(--bg-secondary);
  font-weight: 600;
  text-align: left;
  padding: 0.85rem 1rem;
  color: var(--text-primary);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: top;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background: var(--bg-hover);
}

tbody tr:hover td {
  color: var(--text-primary);
}

/* ----------------------------------------------------------
   13. Forms
   ---------------------------------------------------------- */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.form-hint {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--text-primary);
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.65em 0.9em;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.15);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.6;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239aa0a6' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9em center;
  padding-right: 2.5em;
  cursor: pointer;
}

.form-checkbox,
.form-radio {
  display: flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.form-checkbox input,
.form-radio input {
  accent-color: var(--accent);
  width: 1.1em;
  height: 1.1em;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ----------------------------------------------------------
   14. Alerts
   ---------------------------------------------------------- */
.alert {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  border-left: 4px solid;
  line-height: 1.5;
}

.alert-success {
  background: rgba(52, 211, 153, 0.08);
  border-left-color: var(--success);
  color: var(--success);
}

.alert-error,
.alert-danger {
  background: rgba(239, 68, 68, 0.08);
  border-left-color: var(--danger);
  color: var(--danger);
}

.alert-warning {
  background: rgba(251, 191, 36, 0.08);
  border-left-color: var(--warning);
  color: var(--warning);
}

.alert-info {
  background: rgba(88, 166, 255, 0.08);
  border-left-color: var(--accent);
  color: var(--accent);
}

.alert strong {
  font-weight: 700;
}

.alert a {
  color: inherit;
  text-decoration: underline;
}

/* ----------------------------------------------------------
   15. Document Listings
   ---------------------------------------------------------- */
.document-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.document-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  background: var(--bg-card);
  transition: border-color var(--transition), background var(--transition);
}

.document-item:hover {
  border-color: var(--border-light);
  background: var(--bg-hover);
}

.document-type {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ui);
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff;
}

.document-type.pdf  { background: #e53e3e; }
.document-type.doc  { background: #3182ce; }
.document-type.docx { background: #3182ce; }
.document-type.xls  { background: #38a169; }
.document-type.xlsx { background: #38a169; }
.document-type.csv  { background: #38a169; }
.document-type.ppt  { background: #d97706; }
.document-type.pptx { background: #d97706; }
.document-type.txt  { background: var(--text-muted); }
.document-type.zip  { background: #7c3aed; }
.document-type.img  { background: #ec4899; }

.document-info {
  flex: 1;
  min-width: 0;
}

.document-title {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.document-title a {
  color: inherit;
  text-decoration: none;
}

.document-title a:hover {
  color: var(--accent);
}

.document-meta {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  gap: 0.75rem;
}

/* ----------------------------------------------------------
   16. Policy Content / Article Body Typography
   ---------------------------------------------------------- */
.article-body {
  max-width: 720px;
  margin: 0 auto;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-primary);
}

.article-body h2 {
  margin-top: 2.5rem;
  margin-bottom: 0.8rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

.article-body h3 {
  margin-top: 2rem;
  margin-bottom: 0.6rem;
}

.article-body p {
  margin-bottom: 1.4em;
}

.article-body a {
  text-decoration: underline;
  text-decoration-color: rgba(88, 166, 255, 0.35);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--transition), color var(--transition);
}

.article-body a:hover {
  text-decoration-color: var(--accent);
}

.article-body ul,
.article-body ol {
  margin-bottom: 1.4em;
  padding-left: 1.75em;
}

.article-body li {
  margin-bottom: 0.5em;
}

.article-body img {
  border-radius: var(--radius);
  margin: 2rem auto;
}

.article-body figure {
  margin: 2rem 0;
}

.article-body figcaption {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.6rem;
  font-style: italic;
}

/* Blockquotes */
.article-body blockquote,
blockquote {
  border-left: 3px solid var(--gold);
  margin: 2rem 0;
  padding: 1rem 1.5rem;
  background: rgba(212, 168, 67, 0.04);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--text-secondary);
}

.article-body blockquote p:last-child,
blockquote p:last-child {
  margin-bottom: 0;
}

/* Callout box */
.callout-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.5rem;
  margin: 2rem 0;
}

.callout-box .callout-title {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

/* Code blocks */
.article-body code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.85em;
  background: var(--bg-secondary);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  color: var(--accent);
}

.article-body pre {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  line-height: 1.5;
}

.article-body pre code {
  background: none;
  padding: 0;
  font-size: 0.85rem;
  color: var(--text-primary);
}

/* Article header */
.article-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.article-header h1 {
  font-size: 1.8rem;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.article-meta .author-name {
  font-weight: 600;
  color: var(--text-secondary);
}

/* ----------------------------------------------------------
   17. Pull Quotes
   ---------------------------------------------------------- */
.pull-quote {
  text-align: center;
  margin: 3rem auto;
  padding: 2rem 1.5rem;
  max-width: 600px;
  position: relative;
}

.pull-quote::before,
.pull-quote::after {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background: var(--gold);
  margin: 0 auto;
}

.pull-quote::before {
  margin-bottom: 1.5rem;
}

.pull-quote::after {
  margin-top: 1.5rem;
}

.pull-quote p {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-style: italic;
  font-weight: 700;
  line-height: 1.45;
  color: var(--text-primary);
  margin-bottom: 0;
}

.pull-quote cite {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

/* ----------------------------------------------------------
   18. Gallery Grid
   ---------------------------------------------------------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 4/3;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.06);
}

.gallery-item .gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  padding: 2rem 0.75rem 0.75rem;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: #fff;
  opacity: 0;
  transition: opacity var(--transition);
}

.gallery-item:hover .gallery-caption {
  opacity: 1;
}

/* Gallery Grid (from renderGalleryGrid) */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.gallery-grid .gallery-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  aspect-ratio: auto;
}

.gallery-grid .gallery-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.gallery-grid .gallery-thumb {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}

.gallery-grid .gallery-thumb-placeholder {
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary, #161b22);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-family: var(--font-ui);
}

.gallery-grid .gallery-item-info {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.gallery-grid .gallery-item-title {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gallery-grid .gallery-item-artist {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ---- Audio List / Cards ---- */
.audio-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.audio-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: border-color 0.2s ease;
}

.audio-card:hover {
  border-color: var(--accent);
}

.audio-card-info {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.audio-card-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--bg-tertiary, #161b22);
  display: flex;
  align-items: center;
  justify-content: center;
}

.audio-icon {
  font-size: 1.5rem;
  color: var(--accent);
}

.audio-card-details {
  flex: 1;
  min-width: 0;
}

.audio-card-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.25rem 0;
}

.audio-card-artist {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--gold);
  margin-bottom: 0.25rem;
}

.audio-card-meta {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.audio-card-player {
  width: 100%;
  height: 48px;
  border-radius: var(--radius);
  outline: none;
  background: #2d333b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color-scheme: dark;
  filter: invert(0);
}

/* Force lighter controls on dark backgrounds */
audio::-webkit-media-controls-panel {
  background: #2d333b;
}

audio::-webkit-media-controls-play-button {
  filter: brightness(2);
}

audio::-webkit-media-controls-current-time-display,
audio::-webkit-media-controls-time-remaining-display {
  color: #e6edf3;
}

audio::-webkit-media-controls-timeline {
  filter: brightness(1.5);
}

audio::-webkit-media-controls-volume-slider,
audio::-webkit-media-controls-mute-button {
  filter: brightness(2);
}

video::-webkit-media-controls-panel {
  background: rgba(0, 0, 0, 0.7);
}

/* ---- Video Grid / Cards ---- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.video-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.video-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

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

.video-card-player {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  outline: none;
}

.video-card-info {
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.video-card-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.video-card-artist {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--gold);
}

.video-card-meta {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ---- Music List / Cards ---- */
.music-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.music-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: border-color 0.2s ease;
}

.music-card:hover {
  border-color: var(--accent);
}

.music-card-info {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.music-card-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, #9b59b6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.music-icon {
  font-size: 1.3rem;
  color: #fff;
}

.music-card-details {
  flex: 1;
  min-width: 0;
}

.music-card-title {
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}

.music-card-artist {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--accent);
  display: block;
  margin-bottom: 0.15rem;
}

.music-card-meta {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.music-audio-player {
  width: 100%;
  height: 48px;
  border-radius: var(--radius);
  outline: none;
  background: #2d333b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color-scheme: dark;
}

.music-video-wrap {
  margin-bottom: 1rem;
  border-radius: var(--radius);
  overflow: hidden;
}

.music-video-player {
  width: 100%;
  max-height: 400px;
  background: #000;
  display: block;
}

/* ---- Like Button ---- */
.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.like-btn:hover {
  border-color: #e74c3c;
  color: #e74c3c;
}

.like-btn.liked {
  border-color: #e74c3c;
  color: #e74c3c;
}

.like-btn.liked .like-icon {
  color: #e74c3c;
}

.like-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.like-count {
  font-size: 0.8rem;
  font-family: var(--font-ui);
}

/* ---- Comments Section ---- */
.comments-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.comments-heading {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

.comments-count {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 400;
}

.comments-list {
  margin-bottom: 2rem;
}

.comments-empty {
  color: var(--text-muted);
  font-style: italic;
}

.comment-item {
  padding: 1rem;
  margin-bottom: 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.comment-author {
  font-family: var(--font-ui);
  font-weight: 600;
  color: var(--accent);
  font-size: 0.9rem;
}

.comment-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.comment-body {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Comment Form */
.comment-form-wrap {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.comment-form-title {
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.comment-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

@media (max-width: 600px) {
  .comment-form-row { grid-template-columns: 1fr; }
}

.comment-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.comment-form-msg {
  font-size: 0.85rem;
  font-family: var(--font-ui);
}

.comment-form-msg.success { color: #2ecc71; }
.comment-form-msg.error { color: #e74c3c; }

/* ---- Admin Comments ---- */
.comments-admin-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.comment-admin-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}

.comment-admin-card.pending {
  border-left: 3px solid var(--gold);
}

.comment-admin-card.approved {
  border-left: 3px solid #2ecc71;
}

.comment-admin-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.comment-admin-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.comment-admin-context {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.comment-admin-body {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.comment-admin-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.admin-filter-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.admin-tab {
  padding: 0.4rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  text-decoration: none;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  transition: all 0.2s;
}

.admin-tab:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.admin-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

@media (max-width: 768px) {
  .video-grid {
    grid-template-columns: 1fr;
  }
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}

/* ---- Series / Specials List ---- */
.series-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.series-card {
  display: flex;
  align-items: stretch;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.series-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

.series-card-thumb {
  flex-shrink: 0;
  width: 140px;
  min-height: 100px;
  overflow: hidden;
}

.series-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.series-card-thumb-placeholder {
  background: var(--bg-tertiary, #161b22);
  display: flex;
  align-items: center;
  justify-content: center;
}

.series-card-icon {
  font-size: 2rem;
  color: var(--gold);
  opacity: 0.6;
}

.series-card-body {
  flex: 1;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.series-card-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.35rem 0;
  line-height: 1.3;
}

.series-card:hover .series-card-title {
  color: var(--accent);
}

.series-card-desc {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0 0 0.5rem 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.series-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.series-card-arrow {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  font-size: 1.5rem;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.series-card:hover .series-card-arrow {
  color: var(--accent);
}

@media (max-width: 768px) {
  .series-card {
    flex-direction: column;
  }
  .series-card-thumb {
    width: 100%;
    height: 120px;
  }
  .series-card-arrow {
    display: none;
  }
}

/* ----------------------------------------------------------
   19. Badges & Tags
   ---------------------------------------------------------- */
.badge {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2em 0.65em;
  border-radius: 100px;
  line-height: 1.4;
  white-space: nowrap;
}

.badge-primary {
  background: rgba(88, 166, 255, 0.12);
  color: var(--accent);
}

.badge-gold {
  background: rgba(212, 168, 67, 0.12);
  color: var(--gold);
}

.badge-success {
  background: rgba(52, 211, 153, 0.12);
  color: var(--success);
}

.badge-warning {
  background: rgba(251, 191, 36, 0.12);
  color: var(--warning);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger);
}

.badge-muted {
  background: var(--bg-hover);
  color: var(--text-muted);
}

.tag {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 0.2em 0.6em;
  border-radius: 4px;
  text-decoration: none;
  transition: all var(--transition);
}

.tag:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(88, 166, 255, 0.06);
  text-decoration: none;
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ----------------------------------------------------------
   20. Pagination
   ---------------------------------------------------------- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin: 2.5rem 0;
  font-family: var(--font-ui);
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 0.5em;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  background: var(--bg-card);
  text-decoration: none;
  transition: all var(--transition);
}

.pagination a:hover {
  background: var(--bg-hover);
  border-color: var(--border-light);
  color: var(--text-primary);
  text-decoration: none;
}

.pagination .active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.pagination .disabled {
  opacity: 0.35;
  pointer-events: none;
}

.pagination .ellipsis {
  border: none;
  background: none;
  color: var(--text-muted);
  min-width: auto;
}

/* ----------------------------------------------------------
   21. Footer
   ---------------------------------------------------------- */
.site-footer {
  background: var(--bg-secondary);
  border-top: 2px solid var(--gold);
  padding: 2rem 2.5rem 1.5rem;
  margin-top: 3rem;
  margin-left: var(--sidebar-width);
}

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

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 1rem;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-section a:hover {
  color: var(--text-primary);
}

.footer-section p {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.footer-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.footer-brand strong {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--text-primary);
}

.footer-tagline {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
}

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

.footer-disclaimers {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  margin-bottom: 1rem;
}

.footer-disclaimer {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-copyright {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.footer-company {
  margin-top: 0.25rem;
  font-size: 0.72rem;
}

/* ----------------------------------------------------------
   22. Custom Scrollbar
   ---------------------------------------------------------- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-light) var(--bg-primary);
}

/* ----------------------------------------------------------
   23. Utility Classes
   ---------------------------------------------------------- */

/* ----------------------------------------------------------
   Additional Structural Classes
   ---------------------------------------------------------- */

/* Main container wrapper */
.main-container {
  display: block;
}

/* Breadcrumb navigation */
.breadcrumb-nav {
  margin-bottom: 1rem;
}

.breadcrumb-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  font-family: var(--font-ui);
  font-size: 0.85rem;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  color: var(--text-secondary);
}

.breadcrumb-item a {
  color: var(--accent);
  text-decoration: none;
}

.breadcrumb-item a:hover {
  text-decoration: underline;
  color: var(--accent-hover);
}

.breadcrumb-item.active {
  color: var(--text-primary);
}

.breadcrumb-separator {
  margin: 0 0.5rem;
  color: var(--text-muted);
  font-size: 1rem;
}

/* Page header (used on articles, documents, etc.) */
.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  margin-bottom: 0.4rem;
}

.page-header p {
  color: var(--text-secondary);
  margin-bottom: 0;
}

/* Empty state (no results, no articles, etc.) */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
  font-family: var(--font-ui);
}

.empty-state p {
  color: var(--text-muted);
  font-size: 1rem;
}

/* Filter bar (articles, documents, gallery) */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ---- Media Filter Bar ---- */
.media-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.media-filter-search {
  flex: 1;
  min-width: 200px;
}

.media-filter-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--text-primary);
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.2s ease;
}

.media-filter-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.15);
}

.media-filter-input::placeholder {
  color: var(--text-muted);
}

.media-filter-select select {
  padding: 0.5rem 0.75rem;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--text-primary);
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
  padding-right: 1.75rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b949e' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
}

.media-filter-select select:focus {
  border-color: var(--accent);
}

.media-filter-count {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  padding: 0.3rem 0.5rem;
  background: var(--bg-tertiary, #161b22);
  border-radius: var(--radius);
}

.media-filter-noresults {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .media-filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .media-filter-search {
    min-width: 100%;
  }
  .media-filter-select select {
    width: 100%;
  }
}

/* Form card wrapper (contact, whistleblower) */
.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 720px;
}

/* Document list items */
.doc-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.doc-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  background: var(--bg-card);
  transition: border-color var(--transition);
}

.doc-item:hover {
  border-color: var(--border-light);
}

.doc-ext {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ui);
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent-dark);
}

.doc-info {
  flex: 1;
  min-width: 0;
}

.doc-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.doc-title {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}

.doc-title a {
  color: inherit;
  text-decoration: none;
}

.doc-title a:hover {
  color: var(--accent);
}

.doc-meta {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.doc-description {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* Folder grid (documents page) */
.folder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.folder-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  transition: border-color var(--transition);
  cursor: pointer;
}

.folder-card:hover {
  border-color: var(--accent);
}

.folder-name {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

/* Policy styles */
.policy-list {
  list-style: none;
  padding: 0;
}

.policy-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: border-color var(--transition);
}

.policy-card:hover {
  border-color: var(--border-light);
}

.policy-card-header {
  margin-bottom: 0.75rem;
}

.policy-meta {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.policy-excerpt {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}

.policy-document,
.policy-content {
  max-width: 720px;
  margin: 0 auto;
  font-family: var(--font-body);
  line-height: 1.8;
}

.policy-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.policy-footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.policy-version,
.policy-date,
.policy-author {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Search page */
.search-form {
  margin-bottom: 2rem;
}

.search-input-group {
  display: flex;
  gap: 0.5rem;
}

.search-input {
  flex: 1;
}

.search-summary {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.search-section {
  margin-bottom: 2rem;
}

.search-result {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.search-result:last-child {
  border-bottom: none;
}

/* Upload zone (whistleblower) */
.upload-zone {
  border: 2px dashed var(--border-light);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  transition: border-color var(--transition);
  cursor: pointer;
}

.upload-zone:hover {
  border-color: var(--accent);
}

.upload-hint {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* Body scroll lock (used by mobile menu) */
body.no-scroll {
  overflow: hidden;
}

/* Display */
.d-none     { display: none !important; }
.d-block    { display: block !important; }
.d-flex     { display: flex !important; }
.d-grid     { display: grid !important; }
.d-inline   { display: inline !important; }
.d-inline-block { display: inline-block !important; }

/* Flex utilities */
.flex-row       { flex-direction: row; }
.flex-column    { flex-direction: column; }
.flex-wrap      { flex-wrap: wrap; }
.items-center   { align-items: center; }
.items-start    { align-items: flex-start; }
.items-end      { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end    { justify-content: flex-end; }
.gap-sm         { gap: 0.5rem; }
.gap-md         { gap: 1rem; }
.gap-lg         { gap: 1.5rem; }
.gap-xl         { gap: 2rem; }
.flex-1         { flex: 1; }

/* Text */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-left   { text-align: left; }
.text-primary   { color: var(--text-primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted     { color: var(--text-muted) !important; }
.text-accent    { color: var(--accent) !important; }
.text-gold      { color: var(--gold) !important; }
.text-success   { color: var(--success) !important; }
.text-warning   { color: var(--warning) !important; }
.text-danger    { color: var(--danger) !important; }
.text-sm     { font-size: 0.85rem; }
.text-xs     { font-size: 0.75rem; }
.text-lg     { font-size: 1.15rem; }
.text-xl     { font-size: 1.4rem; }

/* Font families */
.font-heading { font-family: var(--font-heading); }
.font-body    { font-family: var(--font-body); }
.font-ui      { font-family: var(--font-ui); }

/* Font weights */
.fw-normal { font-weight: 400; }
.fw-medium { font-weight: 600; }
.fw-bold   { font-weight: 700; }

/* Spacing */
.m-0  { margin: 0 !important; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mx-auto { margin-left: auto; margin-right: auto; }

.p-0  { padding: 0 !important; }
.p-1  { padding: 0.5rem; }
.p-2  { padding: 1rem; }
.p-3  { padding: 1.5rem; }
.p-4  { padding: 2rem; }
.px-1 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-2 { padding-left: 1rem; padding-right: 1rem; }
.py-1 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2 { padding-top: 1rem; padding-bottom: 1rem; }

/* Width */
.w-full  { width: 100%; }
.max-w-narrow { max-width: 720px; }
.max-w-wide   { max-width: 1200px; }

/* Borders */
.border         { border: 1px solid var(--border); }
.border-top     { border-top: 1px solid var(--border); }
.border-bottom  { border-bottom: 1px solid var(--border); }
.rounded        { border-radius: var(--radius); }
.rounded-lg     { border-radius: var(--radius-lg); }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-auto   { overflow: auto; }
.truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Visibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Line clamp */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ----------------------------------------------------------
   24. Responsive: Mobile Sidebar Overlay
   ---------------------------------------------------------- */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
  z-index: 850;
  opacity: 0;
  transition: opacity var(--transition);
}

.sidebar-overlay.is-visible,
.sidebar-overlay.active {
  display: block;
  opacity: 1;
}

@media (max-width: 1024px) {
  .hamburger {
    display: flex;
  }

  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
  }

  .main-content {
    margin-left: 0;
    padding: 1.5rem;
  }

  .site-footer {
    margin-left: 0;
  }

  .hero {
    margin: -1.5rem -1.5rem 2rem;
    padding: 3rem 1.5rem 2.5rem;
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 1.6rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .article-grid {
    grid-template-columns: 1fr;
  }

  .article-card.featured {
    grid-template-columns: 1fr;
  }

  .article-card.featured .article-card-image {
    height: 200px;
    min-height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

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

  .form-row {
    grid-template-columns: 1fr;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .article-body {
    font-size: 0.95rem;
  }

  .article-header h1 {
    font-size: 1.5rem;
  }

  .pull-quote p {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .site-header {
    padding: 0 1rem;
  }

  .main-content {
    padding: 1rem;
  }

  .hero {
    margin: -1rem -1rem 1.5rem;
    padding: 2.5rem 1rem 2rem;
  }

  .hero h1 {
    font-size: 1.4rem;
  }

  .gallery {
    grid-template-columns: 1fr;
  }

  .stat-value {
    font-size: 1.5rem;
  }

  .article-card-content {
    padding: 1.15rem;
  }

  .pagination a,
  .pagination span {
    min-width: 34px;
    height: 34px;
    font-size: 0.8rem;
  }
}

/* ----------------------------------------------------------
   25. Loading & Skeleton States
   ---------------------------------------------------------- */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-card) 0%,
    var(--bg-hover) 40%,
    var(--bg-card) 80%
  );
  background-size: 800px 100%;
  animation: shimmer 1.6s ease-in-out infinite;
  border-radius: 4px;
}

.skeleton-text {
  height: 1em;
  margin-bottom: 0.6em;
  border-radius: 4px;
}

.skeleton-text.short {
  width: 40%;
}

.skeleton-text.medium {
  width: 70%;
}

.skeleton-heading {
  height: 1.6em;
  width: 55%;
  margin-bottom: 1rem;
  border-radius: 4px;
}

.skeleton-image {
  width: 100%;
  height: 200px;
  border-radius: var(--radius);
}

.skeleton-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.skeleton-badge {
  width: 60px;
  height: 20px;
  border-radius: 100px;
}

/* Loading spinner */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.spinner-lg {
  width: 36px;
  height: 36px;
  border-width: 3px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Loading overlay */
.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 20, 25, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  z-index: 10;
}

/* ----------------------------------------------------------
   Substack Feed Section
   ---------------------------------------------------------- */
.substack-section {
  border-top: 1px solid var(--border);
  padding-top: 2rem;
}

.substack-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.substack-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #ff6719;
  color: #fff;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 100px;
  text-decoration: none;
  transition: background var(--transition);
}

.substack-badge:hover {
  background: #e55a12;
}

.substack-badge svg {
  width: 14px;
  height: 14px;
}

.substack-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.substack-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
}

.substack-card:hover {
  border-color: #ff6719;
  box-shadow: 0 4px 16px rgba(255, 103, 25, 0.12);
  transform: translateY(-2px);
}

.substack-card-image {
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  background: var(--bg-secondary);
}

.substack-card-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(13, 17, 23, 0.45);
  mix-blend-mode: multiply;
  pointer-events: none;
  transition: background var(--transition);
}

.substack-card:hover .substack-card-image::after {
  background: rgba(13, 17, 23, 0.25);
}

.substack-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.substack-card:hover .substack-card-image img {
  transform: scale(1.04);
}

.substack-card-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-hover));
}

.substack-card-image-placeholder svg {
  color: var(--text-muted);
}

.substack-card-content {
  padding: 0.9rem 1rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.substack-card-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.4rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.substack-card:hover .substack-card-title {
  color: #ff6719;
}

.substack-card-excerpt {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0 0 0.6rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.substack-card-date {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.substack-notes-cta {
  margin-top: 1.25rem;
}

.substack-notes-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1.25rem;
  color: var(--text-primary);
  text-decoration: none;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 500;
  transition: border-color var(--transition), background var(--transition);
}

.substack-notes-link:hover {
  border-color: #ff6719;
  background: var(--bg-hover);
}

.substack-notes-link svg {
  color: #ff6719;
  flex-shrink: 0;
}

.substack-notes-arrow {
  margin-left: auto;
  font-size: 1.4rem;
  color: var(--text-muted);
  transition: color var(--transition), transform var(--transition);
}

.substack-notes-link:hover .substack-notes-arrow {
  color: #ff6719;
  transform: translateX(3px);
}

@media (max-width: 900px) {
  .substack-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .substack-grid {
    grid-template-columns: 1fr;
  }
  .substack-header-left {
    flex-wrap: wrap;
  }
}

/* ----------------------------------------------------------
   Broken Dictionary Page
   ---------------------------------------------------------- */
.bd-intro {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
  align-items: start;
}

.bd-intro-image img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px var(--shadow);
  filter: brightness(1.15);
}

.bd-intro-text h2 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.bd-intro-text p {
  font-family: var(--font-body);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

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

.bd-volume-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.bd-volume-card:hover {
  border-color: var(--success);
  box-shadow: 0 4px 20px rgba(63, 185, 80, 0.15);
  transform: translateY(-2px);
}

.bd-volume-image {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  position: relative;
}

.bd-volume-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(13, 17, 23, 0.08);
  pointer-events: none;
  transition: background var(--transition);
}

.bd-volume-card:hover .bd-volume-image::after {
  background: transparent;
}

.bd-volume-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(1.15);
  transition: transform 0.3s ease;
}

.bd-volume-card:hover .bd-volume-image img {
  transform: scale(1.03);
}

.bd-volume-content {
  padding: 1rem 1.25rem 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.bd-volume-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--text-primary);
  margin: 0 0 0.2rem;
}

.bd-volume-subtitle {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 0.5rem;
}

.bd-volume-desc {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  flex: 1;
  margin-bottom: 0.75rem;
}

.bd-volume-cta {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--success);
  font-weight: 600;
}

.bd-volume-card:hover .bd-volume-cta {
  text-decoration: underline;
}

.bd-also {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
}

.bd-also h3 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.bd-also p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.bd-also-links {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

/* Source note for Facebook-origin pages */
.pg-source-note {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
}

.pg-source-note p {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
}

.pg-source-note a {
  color: var(--accent);
}

@media (max-width: 700px) {
  .bd-intro {
    grid-template-columns: 1fr;
  }
  .bd-intro-image {
    max-width: 240px;
    margin: 0 auto;
  }
  .bd-volumes-grid {
    grid-template-columns: 1fr;
  }
}

/* ----------------------------------------------------------
   Presentation Cards
   ---------------------------------------------------------- */
.presentation-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.presentation-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.presentation-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 12px var(--shadow);
}

.presentation-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
}

.presentation-card-icon {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
}

.presentation-card-details {
  flex: 1;
  min-width: 0;
}

.presentation-card-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: var(--text-primary);
  margin: 0 0 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.presentation-card-artist {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--accent);
  margin-bottom: 0.15rem;
}

.presentation-card-meta {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.presentation-card-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.presentation-card-viewer {
  border-top: 1px solid var(--border);
}

.presentation-pdf-frame {
  width: 100%;
  height: 500px;
  border: none;
  background: var(--bg-primary);
}

@media (max-width: 640px) {
  .presentation-card-header {
    flex-wrap: wrap;
  }
  .presentation-card-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .presentation-pdf-frame {
    height: 350px;
  }
}

/* ----------------------------------------------------------
   Print Styles
   ---------------------------------------------------------- */
@media print {
  .site-header,
  .sidebar,
  .sidebar-overlay,
  .hamburger,
  .pagination,
  .btn,
  .skip-link {
    display: none !important;
  }

  .main-content {
    margin: 0;
    padding: 0;
  }

  body {
    color: #000;
    background: #fff;
    font-size: 12pt;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  .card,
  .article-card {
    border: 1px solid #ccc;
    box-shadow: none;
  }
}

/* ============================================================
   Media Notes / Lyrics Display
   ============================================================ */
.media-notes {
    padding: 0.75rem 1rem;
    margin-top: 0.5rem;
    background: rgba(22, 27, 34, 0.6);
    border-left: 3px solid var(--gold, #d4a843);
    border-radius: 0 var(--radius, 6px) var(--radius, 6px) 0;
    font-family: var(--font-body, 'Source Serif Pro', Georgia, serif);
    font-size: 0.9rem;
    line-height: 1.65;
    color: var(--text-secondary, #8b949e);
}
.media-notes p {
    margin: 0 0 0.5em;
}
.media-notes p:last-child {
    margin-bottom: 0;
}
.media-notes strong {
    color: var(--text-primary, #c9d1d9);
}
.media-notes em {
    color: var(--gold, #d4a843);
}
.media-notes a {
    color: var(--accent, #58a6ff);
}
.media-notes ul, .media-notes ol {
    margin: 0.5em 0;
    padding-left: 1.5em;
}
.gallery-item .media-notes {
    display: none;
}
.gallery-item:hover .media-notes,
.gallery-item:focus .media-notes {
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(13, 17, 23, 0.92);
    z-index: 2;
    max-height: 120px;
    overflow-y: auto;
    border-left: none;
    border-top: 2px solid var(--gold, #d4a843);
    border-radius: 0;
    font-size: 0.8rem;
}
.gallery-item {
    position: relative;
    overflow: hidden;
}

/* Music card notes dropdown toggle */
.music-notes-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.6rem 1rem;
    margin-top: 0.25rem;
    background: rgba(88, 166, 255, 0.06);
    border: 1px solid rgba(88, 166, 255, 0.15);
    border-radius: var(--radius, 6px);
    color: var(--accent, #58a6ff);
    font-family: var(--font-ui, 'Source Sans Pro', sans-serif);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.music-notes-toggle:hover {
    background: rgba(88, 166, 255, 0.12);
    border-color: var(--accent, #58a6ff);
}
.music-notes-arrow {
    font-size: 0.75rem;
    transition: transform 0.25s ease;
}
.music-notes-toggle.open .music-notes-arrow {
    transform: rotate(180deg);
}
.music-notes-content {
    padding: 1rem 1.15rem;
    margin-top: 0.35rem;
    background: rgba(22, 27, 34, 0.7);
    border-left: 3px solid var(--gold, #d4a843);
    border-radius: 0 var(--radius, 6px) var(--radius, 6px) 0;
    font-family: var(--font-body, 'Source Serif Pro', Georgia, serif);
    font-size: 0.92rem;
    line-height: 1.75;
    color: var(--text-secondary, #8b949e);
    white-space: pre-line;
    animation: notesSlideDown 0.2s ease-out;
}
.music-notes-content p {
    margin: 0 0 0.6em;
}
.music-notes-content p:last-child {
    margin-bottom: 0;
}
.music-notes-content strong {
    color: var(--text-primary, #c9d1d9);
}
.music-notes-content em {
    color: var(--gold, #d4a843);
}
@keyframes notesSlideDown {
    from { opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; }
    to { opacity: 1; max-height: 1000px; }
}

/* ============================================================
   Share Buttons & Detail Overlay
   ============================================================ */

/* Media item action buttons (share, detail on cards) */
.media-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--border, #30363d);
    border-radius: var(--radius, 6px);
    background: var(--bg-secondary, #161b22);
    color: var(--text-secondary, #8b949e);
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
    flex-shrink: 0;
}
.media-action-btn:hover {
    color: var(--accent, #58a6ff);
    border-color: var(--accent, #58a6ff);
    background: rgba(88, 166, 255, 0.08);
}
.media-action-btn.share-copied {
    color: #3fb950;
    border-color: #3fb950;
}

/* Gallery item action overlay */
.gallery-item .media-item-actions {
    position: absolute;
    top: 6px;
    right: 6px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 3;
}
.gallery-item:hover .media-item-actions,
.gallery-item:focus-within .media-item-actions {
    opacity: 1;
}
.gallery-item .media-action-btn {
    width: 28px;
    height: 28px;
    background: rgba(13, 17, 23, 0.85);
    border-color: rgba(255,255,255,0.15);
    color: #fff;
}
.gallery-item .media-action-btn:hover {
    background: rgba(88, 166, 255, 0.3);
    border-color: var(--accent, #58a6ff);
}

/* Page-level share button */
.page-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.75rem;
    padding: 0.4rem 0.85rem;
    font-family: var(--font-ui, 'Source Sans Pro', sans-serif);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent, #58a6ff);
    background: rgba(88, 166, 255, 0.06);
    border: 1px solid rgba(88, 166, 255, 0.2);
    border-radius: var(--radius, 6px);
    cursor: pointer;
    transition: all 0.2s;
}
.page-share-btn:hover {
    background: rgba(88, 166, 255, 0.12);
    border-color: var(--accent, #58a6ff);
}
.page-share-btn.share-copied {
    color: #3fb950;
    border-color: #3fb950;
    background: rgba(63, 185, 80, 0.08);
}

/* ============================================================
   Detail Overlay (for media item notes/descriptions)
   ============================================================ */
.detail-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}
.detail-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.detail-overlay-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
}
.detail-overlay-panel {
    position: relative;
    width: 90%;
    max-width: 520px;
    max-height: 80vh;
    background: var(--bg-secondary, #161b22);
    border: 1px solid var(--border, #30363d);
    border-radius: var(--radius, 6px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
.detail-overlay-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.15rem;
    border-bottom: 1px solid var(--border, #30363d);
}
.detail-overlay-title {
    font-family: var(--font-heading, 'Playfair Display', Georgia, serif);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary, #e6edf3);
    margin: 0;
}
.detail-overlay-close {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    color: var(--text-secondary, #8b949e);
    font-size: 1.4rem;
    cursor: pointer;
    border-radius: var(--radius, 6px);
    transition: background 0.15s, color 0.15s;
}
.detail-overlay-close:hover {
    background: rgba(255,255,255,0.08);
    color: var(--text-primary, #e6edf3);
}
.detail-overlay-body {
    padding: 1rem 1.15rem;
    overflow-y: auto;
    flex: 1;
}
.detail-meta-row {
    display: flex;
    justify-content: space-between;
    padding: 0.35rem 0;
    border-bottom: 1px solid rgba(48, 54, 61, 0.5);
    font-family: var(--font-ui, 'Source Sans Pro', sans-serif);
    font-size: 0.85rem;
    color: var(--text-secondary, #8b949e);
}
.detail-meta-label {
    font-weight: 600;
    color: var(--gold, #d4a843);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.detail-overlay-notes {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border, #30363d);
    font-family: var(--font-body, 'Source Serif Pro', Georgia, serif);
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--text-secondary, #8b949e);
}
.detail-overlay-notes p {
    margin: 0 0 0.5em;
}
.detail-no-notes {
    color: var(--text-muted, #484f58);
    font-style: italic;
}
.detail-overlay-actions {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1.15rem;
    border-top: 1px solid var(--border, #30363d);
}
.detail-share-btn,
.detail-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* ============================================================
   Lightbox Info / Detail Side Panel
   ============================================================ */
.lightbox-toolbar {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 6px;
    z-index: 20;
}
.lightbox-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
}
.lightbox-btn:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.4);
}
.lightbox-btn.active {
    background: rgba(88, 166, 255, 0.3);
    border-color: var(--accent, #58a6ff);
    color: var(--accent, #58a6ff);
}
.lightbox-btn.has-content {
    border-color: rgba(212, 168, 67, 0.4);
}
.lightbox-btn.share-copied {
    color: #3fb950;
    border-color: #3fb950;
}
/* Move close button into toolbar */
.lightbox-container .lightbox-close {
    position: static;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.2s;
}
.lightbox-container .lightbox-close:hover {
    background: rgba(255,87,87,0.3);
    border-color: rgba(255,87,87,0.5);
}

/* Lightbox main area (holds content + detail panel side by side) */
.lightbox-main {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}
.lightbox-container .lightbox-content {
    flex: 1;
    min-width: 0;
}
.lightbox-detail-panel {
    width: 300px;
    flex-shrink: 0;
    background: rgba(13, 17, 23, 0.95);
    border-left: 1px solid rgba(255,255,255,0.1);
    overflow-y: auto;
    animation: lbPanelSlideIn 0.25s ease;
}
@keyframes lbPanelSlideIn {
    from { width: 0; opacity: 0; }
    to { width: 300px; opacity: 1; }
}
.lightbox-detail-inner {
    padding: 1rem;
}
.lightbox-detail-title {
    font-family: var(--font-heading, 'Playfair Display', Georgia, serif);
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.75rem;
}
.lb-meta-row {
    display: flex;
    justify-content: space-between;
    padding: 0.3rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    font-size: 0.82rem;
    color: rgba(255,255,255,0.7);
}
.lb-meta-label {
    font-weight: 600;
    color: var(--gold, #d4a843);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.lb-notes-label {
    font-weight: 600;
    color: var(--gold, #d4a843);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0.75rem 0 0.35rem;
}
.lightbox-detail-notes {
    font-size: 0.88rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.65);
}
.lightbox-detail-notes p {
    margin: 0 0 0.5em;
}

/* Responsive: panel below on mobile */
@media (max-width: 768px) {
    .lightbox-main {
        flex-direction: column;
    }
    .lightbox-detail-panel {
        width: 100%;
        max-height: 200px;
        border-left: none;
        border-top: 1px solid rgba(255,255,255,0.1);
    }
    @keyframes lbPanelSlideIn {
        from { max-height: 0; opacity: 0; }
        to { max-height: 200px; opacity: 1; }
    }
    .lightbox-info-btn {
        display: flex;
    }
}
