/* ═══════════════════════════════════════════════════════
   MSP PLAYBOOK — "AUTHORITY" DESIGN SYSTEM v2
   ═══════════════════════════════════════════════════════
   Overrides the base theme with bold, dominant, sleek visuals.
   Dark luxe + glass morphism + dramatic accents.
   ═══════════════════════════════════════════════════════ */

/* ── Premium Color Overrides ── */
[data-theme="dark"] {
  --ink: #e2e8f0;
  --ink-soft: #cbd5e1;
  --ink-muted: #94a3b8;
  --slate: #94a3b8;
  --slate-light: #64748b;
  --cloud: #111927;
  --snow: #060b17;
  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.12);
  --amber-dark: #fbbf24;
  --teal: #2dd4bf;
  --teal-soft: rgba(45, 212, 191, 0.1);
  --red: #ef4444;
  --red-soft: rgba(239, 68, 68, 0.12);
  --green: #4ade80;
  --green-soft: rgba(74, 222, 128, 0.1);
  --blue: #60a5fa;
  --blue-soft: rgba(96, 165, 250, 0.1);
  --purple: #a78bfa;
  --purple-soft: rgba(167, 139, 250, 0.1);
  --bg: #060b17;
  --card: #0c1425;
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.12);
  --sh-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --sh-md: 0 8px 32px rgba(0, 0, 0, 0.5);
  --sh-lg: 0 16px 48px rgba(0, 0, 0, 0.6);
  --r: 12px;
  --r-sm: 8px;
}

/* ── Light mode stays mostly as-is but tweaked ── */
:root {
  --ink: #0b1120;
  --ink-soft: #1e293b;
  --ink-muted: #334155;
  --slate: #475569;
  --slate-light: #94a3b8;
  --cloud: #f1f5f9;
  --snow: #fff;
  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.1);
  --amber-dark: #d97706;
  --teal: #0d9488;
  --teal-soft: rgba(13, 148, 136, 0.08);
  --red: #dc2626;
  --red-soft: rgba(220, 38, 38, 0.08);
  --green: #16a34a;
  --green-soft: rgba(22, 163, 74, 0.08);
  --blue: #2563eb;
  --blue-soft: rgba(37, 99, 235, 0.08);
  --purple: #7c3aed;
  --purple-soft: rgba(124, 58, 237, 0.08);
  --bg: #f8fafc;
  --card: #fff;
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.15);
  --sh-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --sh-md: 0 4px 16px rgba(15, 23, 42, 0.08);
  --sh-lg: 0 12px 40px rgba(15, 23, 42, 0.12);
  --r: 12px;
  --r-sm: 8px;
}

/* ── Body: Subtle animated gradient background ── */
body {
  background: var(--snow);
  background-image:
    radial-gradient(ellipse at 15% 30%, rgba(245, 158, 11, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 70%, rgba(96, 165, 250, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 0%, rgba(245, 158, 11, 0.02) 0%, transparent 50%);
  background-attachment: fixed;
  line-height: 1.7;
}

/* ── Progress bar: thick glow ── */
.progress {
  height: 3px;
  background: linear-gradient(90deg, var(--amber), #f97316, var(--amber));
  background-size: 200% 100%;
  animation: shimmer 3s linear infinite;
  z-index: 300;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}

/* ── HEADER: Glass, blurred, luminous ── */
header {
  background: rgba(6, 11, 23, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  height: 56px;
  transition: background 0.3s, border-color 0.3s;
}

[data-theme="dark"] header {
  background: rgba(6, 11, 23, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

/* Light mode header fix */
header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

[data-theme="dark"] .logo {
  color: #f8fafc;
}

.logo {
  font-size: 0.9375rem;
  font-weight: 800;
  letter-spacing: -0.4px;
  gap: 10px;
  text-transform: uppercase;
}

.logo-mark {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--amber), #f97316);
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 900;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.3);
}

nav a {
  color: var(--slate-light);
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  transition: all 0.2s;
}

[data-theme="dark"] nav a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #f8fafc;
}

/* ── Search: Elevated ── */
.search-input {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 7px 14px 7px 32px;
  border-radius: 8px;
  font-size: 0.8125rem;
  width: 200px;
  transition: border-color 0.2s, width 0.25s, background 0.2s;
}

.search-input:focus {
  width: 280px;
  border-color: var(--amber);
  background: rgba(255, 255, 255, 0.1);
}

/* ── HERO: Dramatic glow gradient ── */
.hero {
  background: #060b17;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .hero {
  background: #060b17;
}

/* Ambient glow orbs */
.hero::after {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero::before {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -5%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero h1 {
  font-size: 2.75rem;
  font-weight: 900;
  letter-spacing: -1.5px;
  line-height: 1.1;
  position: relative;
  z-index: 1;
}

.hero h1 .accent {
  background: linear-gradient(135deg, var(--amber), #f97316, #f59e0b);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 6s ease infinite;
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero p {
  font-size: 1.05rem;
  max-width: 560px;
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

.hero .tagline {
  padding: 8px 18px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.15);
  border-radius: 24px;
  font-size: 0.8125rem;
  color: var(--amber);
  font-weight: 600;
}

/* ── Stats: Bold, glass cards ── */
.hero .stat-bar {
  gap: 12px;
  position: relative;
  z-index: 1;
}

.hero .stat-item {
  text-align: center;
  padding: 22px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  backdrop-filter: blur(8px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero .stat-item:hover {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(245, 158, 11, 0.2);
  box-shadow: 0 12px 40px rgba(245, 158, 11, 0.08);
}

.hero .stat-num {
  font-size: 1.875rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--amber), #f97316);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

/* ── Cards: Glass-lift effect ── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--sh-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
  box-shadow: var(--sh-lg);
  transform: translateY(-4px);
}

[data-theme="dark"] .card {
  background: linear-gradient(145deg, rgba(12, 20, 37, 0.9), rgba(15, 25, 45, 0.6));
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* ── Article Tiles: Bold, elevated ── */
.article-tile {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 22px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.article-tile::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--amber), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.article-tile:hover::before {
  opacity: 1;
}

.article-tile:hover {
  border-color: rgba(245, 158, 11, 0.2);
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(245, 158, 11, 0.06);
}

[data-theme="dark"] .article-tile {
  background: linear-gradient(145deg, rgba(12, 20, 37, 0.9), rgba(15, 25, 45, 0.5));
  backdrop-filter: blur(8px);
}

.article-tile h3 {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.4;
}

.article-tile .a-cat {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--amber-dark);
  margin-bottom: 6px;
}

.article-tile .a-meta {
  font-size: 0.75rem;
  color: var(--slate-light);
}

/* ── Category Cards ── */
.cat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px 18px;
  border-left: 4px solid var(--cat-color, var(--slate-light));
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cat-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .cat-card {
  background: linear-gradient(145deg, rgba(12, 20, 37, 0.8), rgba(15, 25, 45, 0.4));
  backdrop-filter: blur(4px);
}

.cat-name {
  font-weight: 700;
  font-size: 0.875rem;
}

.cat-count {
  font-size: 0.7rem;
}

/* ── Tool Cards ── */
.tool-card {
  border-radius: var(--r);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 22px;
  position: relative;
  overflow: hidden;
}

.tool-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cat-color, var(--amber)), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.tool-card:hover::after {
  opacity: 1;
}

.tool-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .tool-card {
  background: linear-gradient(145deg, rgba(12, 20, 37, 0.9), rgba(15, 25, 45, 0.5));
  backdrop-filter: blur(8px);
}

.tool-info h3 {
  font-weight: 700;
  font-size: 0.9375rem;
}

.tool-card:hover .tool-meta {
  text-decoration: none;
  color: var(--amber-dark);
}

/* ── Buttons: Glow CTAs ── */
.btn {
  position: relative;
  padding: 12px 28px;
  background: linear-gradient(135deg, var(--amber), #f97316);
  border: none;
  border-radius: 10px;
  font-weight: 800;
  font-size: 0.875rem;
  color: #060b17;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.25);
  letter-spacing: -0.2px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(245, 158, 11, 0.35);
  background: linear-gradient(135deg, var(--amber-dark), var(--amber));
}

.btn:active {
  transform: translateY(0);
}

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--snow);
  box-shadow: none;
}

.btn-ghost:hover {
  background: rgba(245, 158, 11, 0.1);
  border-color: var(--amber);
  box-shadow: none;
}

/* n-tool-cta from natural theme - upgrade */
.n-tool-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--amber-dark);
  text-decoration: none;
  transition: all 0.2s;
}

.n-tool-cta:hover {
  gap: 10px;
  color: var(--amber);
}

/* ── Typography: Sharp, bold ── */
h1 {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1.15;
}

h2 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  margin-top: 2.5rem;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}

h3 {
  font-weight: 700;
}

.content {
  font-size: 1.05rem;
  line-height: 1.75;
}

.content p {
  margin-bottom: 1.25rem;
}

.content a {
  color: var(--blue);
  text-decoration: underline;
  text-decoration-color: rgba(96, 165, 250, 0.3);
  text-underline-offset: 3px;
  transition: all 0.2s;
  font-weight: 500;
}

.content a:hover {
  text-decoration-color: var(--blue);
}

[data-theme="dark"] .content a {
  color: #7bb7ff;
}

.content blockquote {
  margin: 2rem 0;
  padding: 24px 28px;
  background: rgba(245, 158, 11, 0.06);
  border-left: 4px solid var(--amber);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-style: italic;
  position: relative;
}

[data-theme="dark"] .content blockquote {
  background: rgba(245, 158, 11, 0.05);
}

.content blockquote::before {
  content: '"';
  position: absolute;
  top: 8px;
  left: 12px;
  font-size: 2.5rem;
  color: var(--amber);
  opacity: 0.3;
  font-family: Georgia, serif;
  line-height: 1;
}

.content blockquote cite {
  font-style: normal;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--amber-dark);
  margin-top: 8px;
}

.content table {
  font-size: 0.9rem;
  border-radius: var(--r-sm);
  overflow: hidden;
}

.content th {
  background: #0b1120;
  padding: 12px 16px;
  font-size: 0.8125rem;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

[data-theme="dark"] .content th {
  background: rgba(255, 255, 255, 0.04);
}

.content td {
  padding: 12px 16px;
}

/* ── Related Grid: 4-column ── */
.related-grid {
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.related-grid a {
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] .related-grid a {
  background: linear-gradient(145deg, rgba(12, 20, 37, 0.8), rgba(15, 25, 45, 0.4));
}

.related-grid a:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.related-grid .r-title {
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
}

/* ── Post nav: Bold, glass ── */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 2rem;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.post-nav a {
  padding: 14px 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: all 0.3s;
}

[data-theme="dark"] .post-nav a {
  background: linear-gradient(145deg, rgba(12, 20, 37, 0.8), rgba(15, 25, 45, 0.4));
}

.post-nav a:hover {
  border-color: var(--amber);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.post-nav .title {
  font-size: 0.9rem;
  font-weight: 700;
}

/* ── Continue Reading card ── */
.continue-reading {
  border: 1px solid rgba(245, 158, 11, 0.15);
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .continue-reading {
  background: linear-gradient(145deg, rgba(12, 20, 37, 0.95), rgba(245, 158, 11, 0.04)) !important;
}

.continue-reading::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--amber), #f97316);
  border-radius: 0 2px 2px 0;
}

/* ── Newsletter CTA: Premium dark ── */
.newsletter-cta {
  margin-top: 2rem;
  padding: 32px 36px;
  background: linear-gradient(135deg, #0b1120, #0f172a);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: hidden;
}

.newsletter-cta::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.newsletter-cta h3 {
  font-size: 1.1rem;
  font-weight: 800;
}

.newsletter-cta input {
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--snow);
}

.newsletter-cta input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.newsletter-cta input:focus {
  outline: none;
  border-color: var(--amber);
  background: rgba(255, 255, 255, 0.12);
}

.newsletter-cta button {
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--amber), #f97316);
  border: none;
  border-radius: 10px;
  font-weight: 800;
  font-size: 0.875rem;
  color: #060b17;
  cursor: pointer;
  transition: all 0.2s;
}

.newsletter-cta button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
}

/* ── Testimonials: Bold cards ── */
.testimonial-card {
  border-radius: var(--r);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] .testimonial-card {
  background: linear-gradient(145deg, rgba(12, 20, 37, 0.8), rgba(15, 25, 45, 0.4));
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.testimonial-quote {
  font-size: 3.5rem;
  color: var(--amber);
  opacity: 0.15;
  font-family: Georgia, serif;
  margin-bottom: 4px;
}

/* ── Trending cards ── */
.trending-card {
  border-radius: var(--r);
  transition: all 0.3s;
}

[data-theme="dark"] .trending-card {
  background: linear-gradient(145deg, rgba(12, 20, 37, 0.8), rgba(15, 25, 45, 0.4));
}

.trending-card:hover {
  transform: translateY(-3px);
  border-color: var(--amber);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.trending-num {
  font-size: 1.75rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--amber), #f97316);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  min-width: 36px;
}

/* ── Feedback buttons ── */
.feedback {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 24px;
}

[data-theme="dark"] .feedback {
  background: linear-gradient(145deg, rgba(12, 20, 37, 0.6), rgba(15, 25, 45, 0.3));
}

.fb-btn {
  font-size: 1.2rem;
  padding: 10px 24px;
  border-radius: 10px;
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.fb-btn:hover {
  transform: scale(1.15);
  border-color: var(--amber);
}

/* ── FAQ ── */
.faq-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s;
}

[data-theme="dark"] .faq-item {
  background: linear-gradient(145deg, rgba(12, 20, 37, 0.5), rgba(15, 25, 45, 0.2));
}

.faq-q {
  padding: 16px 20px;
  font-weight: 700;
  font-size: 0.9375rem;
}

/* ── Tags ── */
.tag {
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 0.75rem;
  font-weight: 500;
  transition: all 0.2s;
}

[data-theme="dark"] .tag {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.tag:hover {
  transform: translateY(-1px);
}

/* ── Takeways ── */
.takeaways {
  border-radius: var(--r);
  padding: 24px 28px;
  border-width: 1px;
}

[data-theme="dark"] .takeaways {
  background: rgba(45, 212, 191, 0.04);
}

/* ── Badges ── */
.badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* ── TOC ── */
.toc a {
  padding: 5px 0 5px 14px;
  border-left: 2px solid var(--border);
  font-size: 0.8125rem;
  transition: all 0.2s;
}

.toc a:hover {
  border-left-color: var(--amber);
  color: var(--amber-dark);
  padding-left: 18px;
}

/* ── Footer: Bold brand ── */
footer {
  background: #060b17;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding: 56px 24px;
  margin-top: 64px;
}

footer .brand {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: #f8fafc;
}

footer .heartbeat {
  color: var(--amber);
}

/* ── Divider ── */
.n-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.2), transparent);
  margin: 0 0 40px;
  opacity: 0.5;
}

/* ── Home section headings ── */
.home-section h2 {
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--slate-light);
  border: none;
  padding: 0;
  margin: 0 0 18px 0;
}

/* ── Scrollbar: Sleek ── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ── Selection ── */
::selection {
  background: rgba(245, 158, 11, 0.3);
  color: inherit;
}

/* ── Changelog ── */
.changelog {
  border-radius: var(--r);
}

[data-theme="dark"] .changelog {
  background: linear-gradient(145deg, rgba(12, 20, 37, 0.8), rgba(15, 25, 45, 0.4));
}

/* ── Modal ── */
.modal-overlay {
  background: rgba(6, 11, 23, 0.8);
  backdrop-filter: blur(4px);
}

.modal {
  border-radius: var(--r);
  padding: 32px 36px;
}

[data-theme="dark"] .modal {
  background: linear-gradient(145deg, rgba(12, 20, 37, 0.95), rgba(15, 25, 45, 0.8));
  border-color: rgba(255, 255, 255, 0.08);
}

/* ── Responsive tweaks ── */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 1.75rem;
  }

  .hero .stat-num {
    font-size: 1.5rem;
  }

  .hero {
    padding: 36px 20px;
  }

  .related-grid {
    grid-template-columns: 1fr !important;
  }

  .search-input {
    width: 110px;
  }

  .search-input:focus {
    width: 180px;
  }

  .post-nav {
    grid-template-columns: 1fr;
  }

  .newsletter-cta {
    padding: 24px 20px;
  }

  .newsletter-cta form {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .hero .stat-bar {
    grid-template-columns: 1fr 1fr !important;
  }

  h1 {
    font-size: 1.5rem;
  }

  .card {
    padding: 16px;
  }
}

/* ── Utility: Glass card (for any element) ── */
.glass {
  background: rgba(12, 20, 37, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* ── Gradient text helper ── */
.text-gradient {
  background: linear-gradient(135deg, var(--amber), #f97316);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Animated border on focus elements ── */
@keyframes border-glow {
  0%, 100% { border-color: rgba(245, 158, 11, 0.2); }
  50% { border-color: rgba(245, 158, 11, 0.5); }
}