/* ==========================================================================
   AgenticsPulse.com — Professional Design System (Non-AMP Version)
   ========================================================================== */

/* Google Fonts Import */
:root {
  /* Light Mode Palette */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  
  --accent-primary: #3b82f6; /* Electric Blue */
  --accent-secondary: #06b6d4; /* Neon Cyan */
  --accent-gradient: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  
  --border-color: #e2e8f0;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --card-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'Geist Mono', monospace;
  
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

[data-theme="dark"] {
  /* Dark Mode Palette */
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-tertiary: #1f2937;
  
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  
  --border-color: #1e293b;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --card-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
}

/* Base resets & styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  max-width: 100%;
}

/* Offset Scroll agar Target Anchor tidak tertutup sticky header navbar */
h1[id], h2[id], h3[id], h4[id] {
  scroll-margin-top: 90px;
}

body {
  overflow-x: clip;
  max-width: 100%;
  position: relative;
  width: 100%;
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.05) 0px, transparent 40%),
    radial-gradient(at 100% 0%, rgba(6, 182, 212, 0.04) 0px, transparent 40%),
    radial-gradient(at 50% 60%, rgba(59, 130, 246, 0.02) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(6, 182, 212, 0.03) 0px, transparent 40%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.7;
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

[data-theme="dark"] body {
  background-color: #0b0f19;
  background-image: 
    radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.12) 0px, transparent 45%),
    radial-gradient(at 100% 10%, rgba(6, 182, 212, 0.09) 0px, transparent 40%),
    radial-gradient(at 50% 45%, rgba(59, 130, 246, 0.05) 0px, transparent 50%),
    radial-gradient(at 100% 90%, rgba(6, 182, 212, 0.08) 0px, transparent 45%);
  background-attachment: fixed;
}

main {
  flex: 1;
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header & Navigation (Scope strictly to top navbar) */
body > header, .site-header {
  background-color: rgba(248, 250, 252, 0.88); /* Off-white translucent glass */
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1.5px solid var(--border-color);
  box-shadow: 0 4px 20px -2px rgba(6, 182, 212, 0.05);
  position: relative; /* Diubah dari sticky agar tidak melayang (floating) */
  z-index: 10000; /* Ditingkatkan agar tombol burger di dalamnya selalu di atas elemen lain */
  transition: var(--transition-smooth);
}

body > header::after, .site-header::after {
  content: '';
  position: absolute;
  bottom: -1.5px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(6, 182, 212, 0.55) 20%, rgba(59, 130, 246, 0.5) 50%, rgba(139, 92, 246, 0.35) 80%, transparent 100%);
  pointer-events: none;
}

[data-theme="dark"] body > header, [data-theme="dark"] .site-header {
  background-color: rgba(11, 15, 25, 0.8); /* Dark translucent glass */
  border-bottom: 1.5px solid rgba(30, 41, 59, 0.7);
  box-shadow: 0 4px 24px -2px rgba(6, 182, 212, 0.12);
}

[data-theme="dark"] body > header::after, [data-theme="dark"] .site-header::after {
  background: linear-gradient(90deg, transparent 0%, rgba(6, 182, 212, 0.75) 20%, rgba(59, 130, 246, 0.65) 50%, rgba(139, 92, 246, 0.5) 80%, transparent 100%);
}

.archive-header, .article-header {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* ==========================================================================
   CATEGORY ARCHIVE PILLAR HEADER (Editorial Modern Design)
   ========================================================================== */
.archive-header {
  padding: 56px 0 24px 0;
  margin-bottom: 36px;
  position: relative;
}
.archive-pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent-secondary);
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.25);
  padding: 4px 14px;
  border-radius: 9999px;
  margin-bottom: 16px;
}
.archive-title {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.15;
  margin-bottom: 16px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;
}
@media (min-width: 768px) {
  .archive-title {
    font-size: 3.25rem;
  }
}
.archive-desc {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 680px;
  line-height: 1.7;
  margin-bottom: 20px;
}
.archive-meta-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}
.archive-meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
}
.archive-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.5) 0%, rgba(6, 182, 212, 0.25) 35%, transparent 80%);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
}

.brand-logo, a.brand-logo {
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -1px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-flex; /* Use inline-flex to properly align the glow dot */
  align-items: center;
  gap: 8px;
}

.brand-logo::after, a.brand-logo::after {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--accent-secondary);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-secondary);
}

@keyframes pulse-beat {
  0% { transform: scale(1); }
  15% { transform: scale(1.2); }
  30% { transform: scale(1); }
  45% { transform: scale(1.2); }
  70% { transform: scale(1); }
  100% { transform: scale(1); }
}

.brand-logo svg {
  animation: pulse-beat 2.5s infinite ease-in-out;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 14px;
  list-style: none;
}

@media (min-width: 900px) {
  .nav-links {
    display: flex;
    gap: 14px;
  }
}

@media (min-width: 1200px) {
  .nav-links {
    gap: 20px;
  }
}

.nav-links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--accent-primary);
}

/* Tools ⚡ Header Pill Button (Call-To-Action in Actions Wrapper) */
.tools-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--accent-primary);
  background-color: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--radius-sm);
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tools-pill-btn:hover {
  background-color: var(--accent-primary);
  color: #ffffff !important;
  border-color: var(--accent-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}

.tools-pill-icon {
  font-size: 0.95rem;
}

@media (max-width: 1080px) {
  .tools-pill-text {
    display: none;
  }
  .tools-pill-btn {
    padding: 0;
    width: 38px;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .tools-pill-btn {
    display: none;
  }
}

/* Tools ⚡ Link Elegant Hover-Only Micro-Interaction in Drawer Menu */
.drawer-menu a[href*="tools"],
.drawer-links a[href*="tools"] {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
  color: var(--accent-primary) !important;
  font-weight: 600;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s ease, filter 0.2s ease;
}

.drawer-menu a[href*="tools"]:hover {
  transform: translateY(-1px) scale(1.04);
  filter: drop-shadow(0 0 6px rgba(59, 130, 246, 0.5));
}

.actions-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Theme Toggle Switcher */
.theme-toggle-btn {
  background: none;
  border: 1px solid var(--border-color);
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.theme-toggle-btn:hover {
  background-color: var(--bg-tertiary);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.2);
}

.theme-toggle-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Mobile Menu Button */
.menu-toggle {
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  display: block;
}

@media (min-width: 768px) {
  .menu-toggle {
    display: none;
  }
}

.menu-toggle svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* Hero Section */
.hero-section {
  padding: 80px 0 60px 0;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 300px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, rgba(6, 182, 212, 0.1) 50%, transparent 100%);
  filter: blur(60px);
  z-index: -1;
  pointer-events: none;
  animation: pulseGlow 6s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
  0% { transform: translateX(-50%) scale(1); opacity: 0.8; }
  100% { transform: translateX(-50%) scale(1.2); opacity: 1; }
}

.hero-layout {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

@media (min-width: 1024px) {
  .hero-layout {
    flex-direction: row;
    align-items: center;
    gap: 44px;
  }
  .hero-image-wrapper {
    flex: 1.05;
  }
  .hero-content {
    flex: 0.95;
  }
}

.hero-image-wrapper {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border-color);
  aspect-ratio: 16/9;
  background: var(--bg-secondary);
}

.hero-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transition: transform 0.5s ease;
}

.hero-image-wrapper:hover img {
  transform: scale(1.02);
}

.hero-content {
  display: flex;
  flex-direction: column;
}

.badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 5px 12px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-primary);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.hero-title {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 16px;
  letter-spacing: -0.75px;
  word-break: break-word;
  overflow-wrap: break-word;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 2.15rem;
    line-height: 1.25;
    letter-spacing: -0.8px;
  }
}

@media (min-width: 1200px) {
  .hero-title {
    font-size: 2.35rem;
    line-height: 1.24;
    letter-spacing: -1px;
  }
}

.hero-title a:hover {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-excerpt {
  color: var(--text-secondary);
  font-size: 1.02rem;
  margin-bottom: 20px;
  line-height: 1.55;
}

.meta-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

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

/* Sections & Grid Layouts */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin: 72px 0 28px 0;
  padding-bottom: 16px;
  position: relative;
  gap: 16px;
}

.section-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.5) 0%, rgba(6, 182, 212, 0.25) 30%, transparent 75%);
}

.section-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent-secondary);
}

.section-title {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.75px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-link {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  transition: all 0.25s ease;
  white-space: nowrap;
  margin-bottom: 2px;
}

.section-link:hover {
  color: var(--accent-primary);
  border-color: rgba(59, 130, 246, 0.4);
  background: var(--bg-secondary);
  transform: translateX(3px);
}

.news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 768px) {
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .news-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Compact Text-Only Article Cards */
.compact-news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 24px;
}

@media (min-width: 768px) {
  .compact-news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .compact-news-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.compact-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s ease;
  position: relative;
}

.compact-card:hover {
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.1);
  background: var(--bg-tertiary);
}

.compact-card-category {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  display: inline-block;
}

.compact-card-title {
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 10px;
}

.compact-card-title a {
  color: var(--text-primary);
  text-decoration: none;
}

.compact-card-title a:hover {
  color: var(--accent-primary);
}

.compact-card-excerpt {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.compact-card-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
}

/* News Cards */
.news-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
}

.news-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: var(--radius-md);
  padding: 2px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.5), rgba(59, 130, 246, 0.5));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 10;
  pointer-events: none;
}

.news-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1), 0 0 30px rgba(6, 182, 212, 0.15);
  border-color: transparent;
}

.news-card:hover::before {
  opacity: 1;
}

.card-image-wrapper {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background-color: var(--bg-tertiary);
}

/* ==========================================================================
   BENCHMARK BADGES COMPONENT (Priority Differentiation)
   ========================================================================== */
.benchmark-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.90);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: var(--font-mono);
  border-left: 3px solid;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  pointer-events: none; /* Let clicks pass through to article */
}

/* Badge Variations based on data type */
.benchmark-badge.badge-cost-savings { border-left-color: #10b981; } /* Emerald Green */
.benchmark-badge.badge-performance  { border-left-color: #3b82f6; } /* Electric Blue */
.benchmark-badge.badge-scale        { border-left-color: #8b5cf6; } /* Purple */
.benchmark-badge.badge-blueprint    { border-left-color: #f59e0b; } /* Amber/Orange */
.benchmark-badge.badge-multiplier   { border-left-color: #ec4899; } /* Pink */

.benchmark-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.benchmark-badge .badge-primary {
  font-size: 0.85rem;
  letter-spacing: -0.3px;
  line-height: 1.1;
  display: flex;
  align-items: center;
  gap: 4px;
}

.benchmark-badge .badge-secondary {
  font-size: 0.65rem;
  font-family: var(--font-sans);
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

/* Mobile optimizations for badges */
@media (max-width: 640px) {
  .benchmark-badge {
    top: 8px;
    right: 8px;
    padding: 6px 10px;
  }
  .benchmark-badge .badge-primary {
    font-size: 0.75rem;
  }
  .benchmark-badge .badge-secondary {
    font-size: 0.6rem;
  }
}

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

.news-card:hover .card-image-wrapper img {
  transform: scale(1.05);
}

.card-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-category {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

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

.card-excerpt {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 24px;
  flex-grow: 1;
}

/* Custom Table Design (Premium & Responsive) */
.table-container {
  overflow-x: auto;
  margin: 32px 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
  background-color: var(--bg-secondary);
}

th, td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}

th {
  background-color: var(--bg-tertiary);
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

tr:hover td {
  background-color: rgba(59, 130, 246, 0.02);
}

/* Footer Section (Premium 4-Column Grid) */
.site-footer {
  background-color: var(--bg-secondary);
  border-top: 1.5px solid var(--border-color);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.03);
  padding: 80px 0 40px 0;
  margin-top: 100px;
  position: relative;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: -1.5px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(59, 130, 246, 0.45) 30%, rgba(139, 92, 246, 0.45) 70%, transparent 100%);
  pointer-events: none;
}

[data-theme="dark"] .site-footer {
  border-top-color: #1e293b;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .site-footer::before {
  background: linear-gradient(90deg, transparent 0%, rgba(59, 130, 246, 0.65) 30%, rgba(139, 92, 246, 0.65) 70%, transparent 100%);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  margin-bottom: 64px;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1.35fr 0.85fr 1.45fr 1.35fr;
    gap: 32px;
  }
  .footer-links-list a {
    white-space: nowrap;
  }
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-col-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.footer-logo-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0;
  max-width: 320px;
}

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

.footer-links-list a {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.footer-links-list a:hover {
  color: var(--accent-primary);
  transform: translateX(4px);
}

/* Ensure brand logo in footer retains its styling */
.footer-col a.brand-logo {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
  display: inline-flex;
}

/* System Status Dot */
.system-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981; /* Green */
  border-radius: 50%;
  position: relative;
}

.status-dot::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #10b981;
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

/* Newsletter Subscription Form */
.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 320px;
}

.newsletter-input {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: var(--font-sans);
  outline: none;
  transition: var(--transition-smooth);
}

.newsletter-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.newsletter-btn {
  background: var(--accent-gradient);
  color: #ffffff;
  border: none;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.2);
  transition: var(--transition-smooth);
}

.newsletter-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(59, 130, 246, 0.3);
}

/* Footer Bottom Bar */
.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 20px;
  border-top: 1px solid var(--border-color);
  padding-top: 32px;
  margin-top: 16px;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.footer-copy {
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: none; /* Reset original border */
  padding-top: 0;
}

.footer-bottom-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-bottom-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
}

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


/* Dynamic Mobile Sidebar/Drawer */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(300px, 85vw);
  height: 100vh;
  background-color: var(--bg-secondary);
  border-left: 1px solid var(--border-color);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
  z-index: 100000;
  padding: 40px 24px;
  transform: translateX(105%);
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.mobile-drawer.open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 48px;
}

.drawer-close {
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
}

.drawer-close svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.drawer-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.drawer-menu a {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 99999; /* Diposisikan tepat di bawah mobile-drawer */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.drawer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Article Template Specific Details (Sticky TOC, Progress Bar) */
.reading-progress-container {
  position: fixed;
  top: 0; /* Diubah dari 72px karena header navbar sudah tidak sticky melayang */
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 9999; /* Pastikan selalu berada di paling atas */
  background: transparent;
}

.reading-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent-gradient);
}

.article-layout {
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding-top: 60px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.article-main {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: break-word;
  word-wrap: break-word;
  overflow: hidden; /* Mencegah overflow horizontal dari konten dalam artikel */
  box-sizing: border-box;
}

.article-body {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: break-word;
  word-wrap: break-word;
  box-sizing: border-box;
}

.table-container {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 32px 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
  display: block;
  box-sizing: border-box;
}

.table-container table {
  width: 100%;
  min-width: 560px;
}

pre, .code-block {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}

pre code {
  white-space: pre;
  word-break: normal;
  overflow-x: auto;
}

.article-title {
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  max-width: 100%;
}

@media (max-width: 768px) {
  .container {
    padding: 0 16px;
    width: 100%;
    max-width: 100%;
  }
  .article-layout {
    padding-top: 24px;
    gap: 28px;
    width: 100%;
    max-width: 100%;
  }
  .article-title {
    font-size: 1.65rem !important;
    line-height: 1.25 !important;
    word-break: break-word;
    overflow-wrap: break-word;
    letter-spacing: -0.5px !important;
    margin-bottom: 16px !important;
  }
  .article-main, .article-body {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
  }
  .article-body pre,
  .article-body .code-block,
  .table-container {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    box-sizing: border-box !important;
  }
  .article-body img,
  .featured-image-wrapper img,
  .featured-image-container img {
    max-width: 100% !important;
    height: auto !important;
  }
  .bizcalc-promo-card {
    padding: 20px 16px !important;
  }
  .author-box {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 16px !important;
  }
}

@media (min-width: 1024px) {
  .article-layout {
    flex-direction: row;
  }
  .article-main {
    flex: 1;
    min-width: 0;
    max-width: 800px;
  }
  .article-sidebar {
    width: 280px;
    flex-shrink: 0;
    position: -webkit-sticky;
    position: sticky;
    top: 32px;
    align-self: flex-start;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    scrollbar-width: thin;
  }
}

.toc-wrapper {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
}

.toc-title {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toc-list a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: block;
}

.toc-list a:hover, .toc-list a.active {
  color: var(--accent-primary);
  font-weight: 500;
}

/* Related Architecture Guides Sidebar Widget */
.related-guides-wrapper {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 24px;
}

.related-guides-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.75px;
  margin-bottom: 14px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.related-guides-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.related-guide-item a {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  border: 1px solid transparent;
  transition: all 0.25s ease;
  text-decoration: none;
}

.related-guide-item a:hover {
  border-color: rgba(59, 130, 246, 0.35);
  background: var(--bg-secondary);
  transform: translateX(3px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.08);
}

.related-guide-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.related-guide-heading {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

/* Affiliate Banner Widgets */
.affiliate-banner-sidebar {
  margin-top: 24px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.affiliate-banner-sidebar:hover {
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.affiliate-disclosure-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  display: block;
}

.affiliate-banner-sidebar a {
  display: block;
  line-height: 0;
}

.affiliate-banner-sidebar img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  display: block;
}

/* In-Article Affiliate Banner */
.affiliate-banner-inarticle {
  margin: 40px auto;
  max-width: 728px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
  transition: var(--transition-smooth);
}

.affiliate-banner-inarticle:hover {
  border-color: rgba(59, 130, 246, 0.4);
}

.affiliate-banner-inarticle a {
  display: block;
  line-height: 0;
}

.affiliate-banner-inarticle img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  display: block;
}

/* Interactive Article Rating Widget */
.article-rating-widget {
  margin: 48px 0 32px 0;
  padding: 24px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.article-rating-widget:hover {
  border-color: rgba(59, 130, 246, 0.35);
}

.rating-widget-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.rating-widget-icon {
  color: #fbbf24;
  font-size: 1.25rem;
}

.rating-widget-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.rating-widget-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.rating-stars-container {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  direction: ltr;
  margin-bottom: 12px;
}

.rating-star-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.rating-star-btn svg {
  width: 28px;
  height: 28px;
  fill: #374151;
  stroke: #fbbf24;
  stroke-width: 1.5;
  transition: fill 0.2s ease, transform 0.2s ease;
}

.rating-star-btn:hover {
  transform: scale(1.25);
}

.rating-star-btn.active svg,
.rating-star-btn.hovered svg {
  fill: #fbbf24;
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.5));
}

.rating-meta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.rating-score-val {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.rating-votes-count {
  color: var(--text-muted);
}

.rating-feedback-msg {
  font-size: 0.85rem;
  font-weight: 600;
  color: #10b981;
  opacity: 0;
  transform: translateY(4px);
  transition: all 0.3s ease;
  height: 0;
  overflow: hidden;
}

.rating-feedback-msg.show {
  opacity: 1;
  transform: translateY(0);
  height: auto;
  margin-top: 10px;
}

.article-rating-widget.has-voted .rating-star-btn {
  cursor: default;
}

.article-rating-widget.has-voted .rating-star-btn:hover {
  transform: none;
}

/* Article Body Lists Typography & Indentation */
.article-body ul,
.article-body ol {
  margin-left: 18px;
  padding-left: 18px;
  margin-bottom: 24px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.article-body li {
  margin-bottom: 10px;
  padding-left: 4px;
}

.article-body li::marker {
  color: var(--accent-primary);
  font-weight: 600;
}

/* Code Highlights & Copy Button */
pre {
  background-color: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  padding: 20px;
  overflow-x: auto;
  margin: 24px 0;
  border: 1px solid var(--border-color);
  position: relative; /* Needed for absolute positioning of copy button */
}

/* ASCII Architecture Diagram Box */
pre.diagram-container, .diagram-container {
  background-color: var(--bg-tertiary) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-md) !important;
  padding: 24px !important;
  margin: 32px 0 !important;
  overflow-x: auto !important;
  font-family: var(--font-mono) !important;
  font-size: 0.88rem !important;
  line-height: 1.5 !important;
  color: var(--text-primary) !important;
  box-shadow: var(--card-shadow) !important;
  white-space: pre !important;
}

code {
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.copy-code-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-family: var(--font-sans);
  font-weight: 600;
  cursor: pointer;
  opacity: 0; /* Hidden by default, appears on hover */
  transition: var(--transition-smooth);
}

pre:hover .copy-code-btn {
  opacity: 1;
}

.copy-code-btn:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

/* Back to Top Button (Stacked above AI Chat Trigger) */
.back-to-top {
  position: fixed;
  bottom: 82px;
  right: 24px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 9997;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-3px);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  box-shadow: 0 6px 18px rgba(59, 130, 246, 0.3);
}

.back-to-top svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 640px) {
  .back-to-top {
    bottom: 68px;
    right: 16px;
    width: 38px;
    height: 38px;
  }
}

/* ==========================================================================
   Premium Static Page Layout Styling (Global Rules)
   ========================================================================== */
.static-hero {
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 56px 0;
  margin-bottom: 48px;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  font-weight: 500;
}

.breadcrumb a:hover {
  color: var(--accent-primary);
}

.static-title {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -1.5px;
  margin: 0;
  line-height: 1.2;
}

.static-content-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  padding: 32px 24px;
  margin-bottom: 80px;
}

@media (min-width: 768px) {
  .static-content-card {
    padding: 56px 48px;
  }
}

.static-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 52px 0 16px 0; /* Adjusted from 40px to 52px according to audit spacing guidelines */
  letter-spacing: -0.3px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}

.static-body p {
  margin-bottom: 24px;
  line-height: 1.8;
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.static-body ul, .static-body ol {
  margin-bottom: 24px;
  padding-left: 24px;
  color: var(--text-secondary);
}

.static-body li {
  margin-bottom: 12px;
  line-height: 1.6;
}

/* ==========================================================================
   Mid-Article Newsletter CTA Design (Conversion & Trust Focus)
   ========================================================================== */
.mid-article-newsletter-cta {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 32px;
  margin: 48px 0;
  position: relative;
  overflow: hidden;
}

.mid-article-newsletter-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent-gradient);
}

.mid-article-cta-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.mid-article-cta-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
}

.mid-article-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (min-width: 640px) {
  .mid-article-form {
    flex-direction: row;
  }
  .mid-article-form .newsletter-input {
    flex: 1;
  }
}

.mid-article-social-proof {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.mid-article-social-proof svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
}

/* ============================================
   AFFILIATE LINK STYLES
   ============================================ */
a.affiliate-link {
  color: #f97316;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-color: rgba(249, 115, 22, 0.5);
  text-underline-offset: 3px;
  font-weight: 600;
  transition: color 0.2s, text-decoration-color 0.2s;
}

a.affiliate-link::after {
  content: ' \2197';
  font-size: 0.75em;
  font-weight: 400;
  opacity: 0.8;
  vertical-align: super;
}

a.affiliate-link:hover {
  color: #ea580c;
  text-decoration-color: rgba(234, 88, 12, 0.8);
}

[data-theme="light"] a.affiliate-link {
  color: #c2410c;
  text-decoration-color: rgba(194, 65, 12, 0.5);
}

[data-theme="light"] a.affiliate-link:hover {
  color: #9a3412;
}





.internal-link { color: var(--accent-primary); font-weight: 500; text-decoration: underline; text-decoration-color: var(--accent-primary); text-underline-offset: 2px; }
.internal-link:hover { color: var(--accent-secondary); text-decoration-color: var(--accent-secondary); }


/* --- HOMEPAGE LAYOUT VARIATIONS --- */

/* 1. Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
@media (min-width: 1024px) {
  .bento-grid {
    grid-template-columns: 2fr 1fr;
    grid-template-rows: auto auto;
  }
  .bento-grid .news-card:nth-child(1) {
    grid-row: span 2;
  }
  .bento-grid .news-card:nth-child(1) .card-image-wrapper {
    aspect-ratio: 16/9;
  }
}

/* 2. CTA Banner */
.cta-banner {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(59, 130, 246, 0.2));
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: var(--radius-lg);
  padding: 48px;
  text-align: center;
  margin: 64px 0;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.1);
}
.cta-banner::after {
  content: '';
  position: absolute;
  top: -50%; left: -50%; width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 60%);
  transform: rotate(30deg);
  pointer-events: none;
}
.cta-banner h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 16px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.cta-banner p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 32px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.cta-banner .btn {
  background: var(--accent-gradient);
  color: #fff;
  padding: 14px 32px;
  border-radius: 9999px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.3s;
}
.cta-banner .btn:hover {
  transform: scale(1.05);
}

/* 3. List Grid */
.list-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
@media (min-width: 768px) {
  .list-grid .news-card {
    flex-direction: row;
    align-items: center;
  }
  .list-grid .card-image-wrapper {
    width: 35%;
    aspect-ratio: 16/10;
  }
  .list-grid .card-content {
    width: 65%;
    padding: 32px;
  }
}


@media (min-width: 1024px) {
  .bento-grid .news-card:not(:first-child) .card-excerpt,
  .bento-grid .news-card:not(:first-child) .meta-info {
    display: none;
  }
  .bento-grid .news-card:not(:first-child) .card-content {
    padding: 16px;
  }
}

  .bento-grid .news-card .card-category {
    display: none;
  }


@media (min-width: 1024px) {
  .bento-grid .news-card:first-child .card-title {
    font-size: 1.75rem;
    margin-bottom: 16px;
  }
  .bento-grid .news-card:first-child .card-excerpt {
    font-size: 1.125rem;
    line-height: 1.6;
    margin-bottom: auto;
  }
  .bento-grid .news-card:first-child .card-content {
    justify-content: space-between;
  }
}


/* Hide meta-info (author and date) on all cards and hero section for cleaner UI */
.news-card .meta-info,
.hero-content .meta-info {
  display: none !important;
}

/* ==========================================================================
   SPOTLIGHT SEARCH MODAL & TRIGGER BUTTON (Ctrl + K)
   ========================================================================== */

.search-trigger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  outline: none;
  user-select: none;
  position: relative;
}

.search-trigger-btn:hover {
  background-color: var(--bg-tertiary);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.2);
}

.search-trigger-icon {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  flex-shrink: 0;
}

/* Hide text and kbd badge to keep header clean and spacious */
.search-trigger-text,
.search-trigger-kbd {
  display: none !important;
}

/* Modal Overlay */
.search-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99999;
  background: rgba(5, 8, 18, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 80px 16px 40px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.search-modal-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

body.search-modal-open {
  overflow: hidden !important;
}

.search-modal-container {
  width: 100%;
  max-width: 660px;
}

.search-modal-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 75vh;
  transform: translateY(-12px) scale(0.98);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-modal-overlay.is-active .search-modal-card {
  transform: translateY(0) scale(1);
}

/* Search Header */
.search-input-header {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  gap: 12px;
  position: relative;
}

.search-header-icon {
  color: var(--accent-primary);
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 1.05rem;
  font-family: inherit;
  color: var(--text-primary);
}

.search-input::placeholder {
  color: var(--text-muted);
  font-size: 0.98rem;
}

.search-clear-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  font-size: 0.95rem;
  border-radius: 50%;
  transition: color 0.15s ease;
}

.search-clear-btn:hover {
  color: var(--text-primary);
}

.search-esc-badge {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

/* Trending Chips */
.search-suggestions-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 20px;
  background-color: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.8rem;
}

.search-suggest-label {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: 4px;
}

.search-suggest-chip {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 3px 10px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.search-suggest-chip:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background-color: rgba(59, 130, 246, 0.08);
}

/* Results Wrapper & List */
.search-results-wrapper {
  overflow-y: auto;
  flex: 1;
  padding: 12px 0;
  scrollbar-width: thin;
}

.search-results-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.search-section-header {
  padding: 8px 20px 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.search-result-item {
  margin: 2px 10px;
  border-radius: var(--radius-md);
  transition: background-color 0.15s ease;
}

.search-result-item.is-focused,
.search-result-item:hover {
  background-color: var(--bg-tertiary);
}

.search-result-link {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 10px 12px;
  text-decoration: none;
  color: inherit;
}

.search-result-thumb-wrapper {
  width: 72px;
  height: 48px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
}

.search-result-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.search-result-content {
  flex: 1;
  min-width: 0;
}

.search-result-top {
  margin-bottom: 4px;
}

.search-result-cat-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-primary);
  letter-spacing: 0.5px;
}

.search-result-title {
  margin: 0 0 4px 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-item.is-focused .search-result-title,
.search-result-item:hover .search-result-title {
  color: var(--accent-primary);
}

.search-result-excerpt {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-highlight {
  background-color: rgba(59, 130, 246, 0.25);
  color: var(--text-primary);
  border-radius: 2px;
  padding: 0 2px;
  font-weight: 600;
}

/* Empty State */
.search-empty-state {
  padding: 48px 24px;
  text-align: center;
}

.search-empty-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 12px;
  opacity: 0.7;
}

.search-empty-state h4 {
  margin: 0 0 8px 0;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.search-empty-state p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Modal Footer */
.search-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background-color: var(--bg-tertiary);
  border-top: 1px solid var(--border-color);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.search-footer-hint {
  display: flex;
  gap: 12px;
}

.search-footer-hint kbd {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 3px;
  padding: 1px 4px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.search-footer-brand {
  font-weight: 600;
  font-size: 0.72rem;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .search-modal-overlay {
    padding: 16px 10px;
    align-items: flex-start;
  }
  .search-modal-container {
    margin-top: 10px;
    border-radius: 16px;
    max-height: calc(100vh - 32px);
  }
  .search-input {
    font-size: 0.95rem;
    padding: 14px 14px 14px 42px;
  }
  .search-trigger-kbd {
    display: none;
  }
  .search-result-thumb-wrapper {
    display: none;
  }
  .search-footer-hint {
    display: none;
  }
  .search-results-list {
    max-height: calc(100vh - 210px);
  }
  .search-trigger-btn {
    padding: 6px 10px;
  }
  .search-trigger-text {
    display: none;
  }
}

/* ==========================================================================
   FLOATING AI ASSISTANT WIDGET (Bilingual Grounded Assistant)
   ========================================================================== */

.ai-chat-trigger-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9998;
  height: 46px;
  padding: 0 18px;
  border-radius: var(--radius-full);
  background: var(--accent-gradient);
  color: #ffffff;
  border: none;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.ai-chat-trigger-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 30px rgba(59, 130, 246, 0.55);
}

.ai-chat-btn-pulse {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 10px;
  height: 10px;
  background-color: #10b981;
  border-radius: 50%;
  border: 2px solid var(--bg-primary);
}

/* Chat Drawer Box */
.ai-chat-drawer {
  position: fixed;
  bottom: 82px;
  right: 24px;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 520px;
  max-height: calc(100vh - 110px);
  z-index: 9998;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.96);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.ai-chat-drawer.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Chat Header */
.ai-chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
}

.ai-chat-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ai-chat-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.ai-chat-status {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.ai-chat-header-actions {
  display: flex;
  gap: 4px;
}

.ai-chat-icon-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 6px;
  font-size: 0.88rem;
  border-radius: 4px;
  transition: color 0.15s ease;
}

.ai-chat-icon-btn:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.05);
}

/* Quick Prompts Row */
.ai-chat-prompts-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
}

.ai-chat-prompt-pill {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 4px 10px;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.ai-chat-prompt-pill:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background-color: rgba(59, 130, 246, 0.08);
}

/* Messages */
.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background-color: var(--bg-secondary);
  scrollbar-width: thin;
}

.ai-msg {
  display: flex;
  width: 100%;
}

.ai-msg-user {
  justify-content: flex-end;
}

.ai-msg-bot {
  justify-content: flex-start;
}

.ai-msg-bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.45;
}

.ai-msg-user .ai-msg-bubble {
  background: var(--accent-gradient);
  color: #ffffff;
  border-bottom-right-radius: 3px;
}

.ai-msg-bot .ai-msg-bubble {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-bottom-left-radius: 3px;
}

.ai-msg-bubble p {
  margin: 0 0 6px 0;
}

.ai-msg-bubble p:last-child {
  margin-bottom: 0;
}

.ai-msg-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.ai-msg-link-card {
  margin-top: 8px;
  padding: 8px 10px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}

.ai-msg-link-badge {
  display: block;
  font-size: 0.72rem;
  color: var(--accent-primary);
  font-weight: 700;
  margin-bottom: 2px;
}

.ai-msg-link-anchor {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
}

.ai-msg-link-anchor:hover {
  text-decoration: underline;
  color: var(--accent-primary);
}

.ai-msg-bubble a {
  color: var(--accent-primary);
  text-decoration: underline;
  font-weight: 600;
  word-break: break-word;
  transition: color 0.2s ease;
}

.ai-msg-bubble a:hover {
  color: var(--accent-secondary);
}

.ai-chat-heading {
  margin: 10px 0 6px 0;
  font-weight: 700;
  line-height: 1.3;
}

h4.ai-chat-heading {
  font-size: 0.96rem;
  color: var(--accent-primary);
}

h5.ai-chat-heading {
  font-size: 0.88rem;
  color: var(--text-primary);
}

/* Typing indicator */
.ai-msg-typing {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
}

.ai-msg-typing span {
  width: 6px;
  height: 6px;
  background-color: var(--text-muted);
  border-radius: 50%;
  animation: aiTyping 1.4s infinite ease-in-out both;
}

.ai-msg-typing span:nth-child(1) { animation-delay: -0.32s; }
.ai-msg-typing span:nth-child(2) { animation-delay: -0.16s; }

@keyframes aiTyping {
  0%, 80%, 100% { transform: scale(0); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* Chat Input Footer */
.ai-chat-footer {
  padding: 12px;
  background-color: var(--bg-tertiary);
  border-top: 1px solid var(--border-color);
}

.ai-chat-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.ai-chat-input {
  flex: 1;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 8px 14px;
  font-size: 0.86rem;
  font-family: inherit;
  color: var(--text-primary);
  outline: none;
}

.ai-chat-input:focus {
  border-color: var(--accent-primary);
}

.ai-chat-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-gradient);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.ai-chat-send-btn:hover {
  transform: scale(1.06);
}

@media (max-width: 640px) {
  .ai-chat-trigger-btn {
    bottom: 16px;
    right: 16px;
    height: 42px;
    padding: 0 14px;
    font-size: 0.82rem;
  }
  .ai-chat-drawer {
    bottom: 68px;
    left: 12px;
    right: 12px;
    width: auto;
    max-width: 100vw;
    height: min(490px, calc(100vh - 84px));
    max-height: calc(100vh - 84px);
    border-radius: 18px;
  }
  .ai-chat-input-row {
    padding: 8px 10px;
  }
  .ai-chat-input {
    padding: 8px 12px;
    font-size: 0.84rem;
  }
}

/* ==========================================================================
   Mini Stack TCO & SaaS Waste Estimator Component
   ========================================================================== */
.tco-estimator-section {
  margin: 56px 0 48px 0;
}

.tco-card {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(6, 182, 212, 0.05) 50%, rgba(16, 185, 129, 0.05) 100%);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  position: relative;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .tco-card {
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.95) 0%, rgba(30, 41, 59, 0.85) 100%);
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.tco-header {
  margin-bottom: 28px;
}

.tco-badge-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.tco-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: var(--font-mono);
  background: rgba(59, 130, 246, 0.18);
  color: var(--accent-primary);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.tco-badge-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.tco-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.25;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.tco-desc {
  font-size: 0.98rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 820px;
  margin-bottom: 0;
}

.tco-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: stretch;
}

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

.tco-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.tco-presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

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

.tco-preset-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.tco-preset-btn small {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 400;
}

.tco-preset-btn:hover {
  border-color: var(--accent-primary);
  color: var(--text-primary);
}

.tco-preset-btn.active {
  background: rgba(59, 130, 246, 0.15);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  font-weight: 700;
}

.tco-preset-btn.active small {
  color: var(--accent-primary);
}

.tco-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.tco-input:focus {
  border-color: var(--accent-primary);
}

.tco-stack-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tco-stack-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.tco-stack-card:hover {
  border-color: var(--accent-primary);
}

.tco-stack-card input[type="radio"] {
  accent-color: var(--accent-primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.tco-stack-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tco-stack-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.tco-stack-note {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.tco-result-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
  box-shadow: var(--card-shadow);
}

[data-theme="dark"] .tco-result-box {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(59, 130, 246, 0.25);
}

.tco-result-header {
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 14px;
}

.tco-result-tag {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #ef4444;
  text-transform: uppercase;
  font-family: var(--font-mono);
  margin-bottom: 4px;
}

.tco-waste-amount {
  font-size: 2.25rem;
  font-weight: 800;
  color: #ef4444;
  letter-spacing: -1px;
  line-height: 1.1;
  display: block;
}

.tco-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.tco-breakdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  color: var(--text-secondary);
  padding: 4px 0;
}

.tco-breakdown-item.highlight-green .tco-item-val {
  color: #10b981;
  font-weight: 700;
}

.tco-breakdown-item.highlight-savings .tco-item-val {
  color: var(--accent-primary);
  font-weight: 800;
  font-size: 0.95rem;
}

.tco-savings-bar-wrapper {
  margin-bottom: 20px;
}

.tco-savings-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.tco-progress-track {
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: 9999px;
  overflow: hidden;
}

.tco-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #06b6d4);
  border-radius: 9999px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.tco-action-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tco-primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  background: var(--accent-gradient);
  color: #ffffff;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  flex: 1;
  min-width: 160px;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  transition: transform 0.15s ease;
}

.tco-primary-btn:hover {
  transform: translateY(-1px);
}

.tco-secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.84rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.tco-secondary-btn:hover {
  border-color: var(--accent-primary);
}

/* ==========================================================================
   Article Interactive Tool Callout (Funnel to Calculator)
   ========================================================================== */
.cta-calculator-box {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(6, 182, 212, 0.08) 50%, rgba(16, 185, 129, 0.06) 100%);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-left: 4px solid var(--accent-primary);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  margin: 32px 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .cta-calculator-box {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(30, 41, 59, 0.7) 100%);
  border-color: rgba(59, 130, 246, 0.3);
  border-left: 4px solid var(--accent-primary);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}

.cta-calculator-box h4 {
  margin: 0 0 8px 0;
  color: var(--text-primary);
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cta-calculator-box p {
  margin: 0 0 16px 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.cta-calculator-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--accent-gradient);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 0.88rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cta-calculator-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

/* ==========================================================================
   Cookie Consent Banner (AdSense & Privacy Compliant)
   ========================================================================== */
.cookie-consent-bar {
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: 420px;
  width: calc(100% - 48px);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent-primary);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.25), 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 99999;
  font-family: var(--font-sans);
  opacity: 0;
  transform: translateY(20px);
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s;
}

.cookie-consent-bar.show {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.cookie-consent-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cookie-consent-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cookie-consent-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.cookie-consent-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: inline-flex;
  border-radius: 4px;
  transition: color 0.2s;
}

.cookie-consent-close:hover {
  color: var(--text-primary);
}

.cookie-consent-text {
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.cookie-consent-text a {
  color: var(--accent-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-consent-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.cookie-btn-accept {
  padding: 8px 16px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #ffffff;
  background: var(--accent-gradient);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
  transition: transform 0.15s, box-shadow 0.15s;
}

.cookie-btn-accept:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.45);
}

.cookie-btn-decline {
  padding: 8px 14px;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

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

@media (max-width: 480px) {
  .cookie-consent-bar {
    bottom: 16px;
    right: 16px;
    left: 16px;
    width: auto;
    max-width: none;
    padding: 16px;
  }
}




