/* ==========================================================================
   Finance Chemistry - Light (Day) Glassmorphism Design System
   SEO & Performance Optimized | Vanilla CSS | Zero Bloat
   ========================================================================== */

/* --------------------------------------------------------------------------
   Day / Light Mode (Default)
   -------------------------------------------------------------------------- */
:root, [data-theme="light"] {
  /* Color Canvas */
  --bg-canvas: #f8fafc;
  --bg-gradient: radial-gradient(circle at 12% 12%, rgba(5, 150, 105, 0.12) 0%, transparent 45%),
                 radial-gradient(circle at 88% 18%, rgba(2, 132, 199, 0.14) 0%, transparent 50%),
                 radial-gradient(circle at 50% 88%, rgba(99, 102, 241, 0.08) 0%, transparent 55%),
                 #f8fafc;
  
  /* Translucent Glass Surfaces */
  --glass-surface: rgba(255, 255, 255, 0.82);
  --glass-surface-hover: rgba(255, 255, 255, 0.95);
  --glass-card-bg: rgba(255, 255, 255, 0.88);
  --glass-inner-bg: rgba(241, 245, 249, 0.9);
  --glass-border: rgba(226, 232, 240, 0.95);
  --glass-border-subtle: rgba(226, 232, 240, 0.75);
  --glass-border-hover: rgba(5, 150, 105, 0.5);
  --glass-shine: inset 0 1px 2px rgba(255, 255, 255, 1);
  
  /* Accent Colors (Tuned for Crisp Day Contrast) */
  --emerald: #059669;
  --emerald-glow: rgba(5, 150, 105, 0.25);
  --cyan: #0284c7;
  --cyan-glow: rgba(2, 132, 199, 0.25);
  --purple: #6366f1;
  --amber: #d97706;
  --rose: #e11d48;
  
  /* Typography */
  --text-heading: #090d16;
  --text-main: #0f172a;
  --text-muted: #334155;
  --text-sub: #64748b;
  
  /* Shadows & Blurs */
  --glass-blur: blur(20px) saturate(180%);
  --shadow-sm: 0 6px 20px -4px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 12px 28px -6px rgba(15, 23, 42, 0.1), 0 4px 10px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 35px -8px rgba(15, 23, 42, 0.12), 0 8px 16px -4px rgba(15, 23, 42, 0.06);
  --shadow-glow: 0 0 25px rgba(5, 150, 105, 0.2);
  
  --nav-bg: rgba(255, 255, 255, 0.82);
  --footer-bg: rgba(248, 250, 252, 0.9);
}

/* --------------------------------------------------------------------------
   Night / Dark Mode (Toggleable Option)
   -------------------------------------------------------------------------- */
[data-theme="dark"] {
  --bg-canvas: #070c18;
  --bg-gradient: radial-gradient(circle at 15% 15%, rgba(0, 230, 118, 0.08) 0%, transparent 40%),
                 radial-gradient(circle at 85% 20%, rgba(0, 210, 255, 0.09) 0%, transparent 45%),
                 radial-gradient(circle at 50% 80%, rgba(121, 40, 202, 0.08) 0%, transparent 50%),
                 #070c18;
  
  --glass-surface: rgba(17, 26, 49, 0.65);
  --glass-surface-hover: rgba(23, 35, 66, 0.85);
  --glass-card-bg: rgba(15, 23, 42, 0.65);
  --glass-inner-bg: rgba(10, 16, 32, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-border-subtle: rgba(255, 255, 255, 0.06);
  --glass-border-hover: rgba(0, 230, 118, 0.4);
  --glass-shine: inset 0 1px 1px rgba(255, 255, 255, 0.15);
  
  --emerald: #00e676;
  --emerald-glow: rgba(0, 230, 118, 0.35);
  --cyan: #00d2ff;
  --cyan-glow: rgba(0, 210, 255, 0.35);
  --purple: #7928ca;
  --amber: #ffb300;
  --rose: #ff3366;
  
  --text-heading: #ffffff;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-sub: #64748b;
  
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px rgba(0, 230, 118, 0.25);
  
  --nav-bg: rgba(15, 23, 42, 0.8);
  --footer-bg: rgba(10, 16, 30, 0.85);
}

:root {
  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

html {
  scroll-behavior: smooth;
  font-family: var(--font-main);
  background: var(--bg-canvas);
  color: var(--text-main);
  line-height: 1.6;
}

body {
  min-height: 100vh;
  background: var(--bg-gradient);
  background-attachment: fixed;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}

/* Glass Surface Utilities */
.glass-panel {
  background: var(--glass-surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm), var(--glass-shine);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.glass-card {
  background: var(--glass-card-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm), var(--glass-shine);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.glass-card:hover {
  transform: translateY(-4px);
  background: var(--glass-surface-hover);
  border-color: var(--glass-border-hover);
  box-shadow: var(--shadow-md), 0 0 20px rgba(5, 150, 105, 0.12);
}

/* Container */
.container {
  width: 100%;
  max-width: 1560px;
  margin: 0 auto;
  padding: 0 28px;
}

.article-container {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
}

/* Typography */
h1, h2, h3, h4, h5 {
  color: var(--text-heading);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.text-gradient {
  background: linear-gradient(135deg, var(--emerald) 0%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

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

a:hover {
  color: var(--cyan);
}

/* Glass Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--emerald) 0%, var(--cyan) 100%);
  color: #ffffff !important;
  box-shadow: 0 4px 15px var(--emerald-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--emerald-glow);
  filter: brightness(1.05);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border-subtle);
  color: var(--text-heading) !important;
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .btn-glass {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main) !important;
}

.btn-glass:hover {
  background: var(--glass-surface-hover);
  border-color: var(--emerald);
  color: var(--emerald) !important;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  background: var(--glass-surface);
  border: 1px solid var(--glass-border-subtle);
  border-radius: var(--radius-full);
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--text-main);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.theme-toggle-btn:hover {
  transform: scale(1.08);
  border-color: var(--emerald);
}

/* Glass Navigation Bar */
.navbar-wrapper {
  position: sticky;
  top: 16px;
  z-index: 1000;
  width: 100%;
  max-width: 1560px;
  margin: 0 auto 30px;
  padding: 0 24px;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  background: var(--nav-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm), var(--glass-shine);
  transition: var(--transition);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-heading);
  flex-shrink: 0;
}

.nav-brand span {
  font-size: 1.5rem;
}

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

.nav-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--emerald);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav-cta-btn {
  padding: 8px 18px;
  font-size: 0.85rem;
  white-space: nowrap;
}

/* Glass Search Button in Navbar */
.nav-search-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .nav-search-btn {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
}

.nav-search-btn:hover {
  background: var(--glass-surface-hover);
  border-color: var(--emerald);
  color: var(--text-heading);
  box-shadow: 0 0 16px var(--emerald-glow);
  transform: translateY(-1px);
}

.search-icon {
  flex-shrink: 0;
  color: var(--emerald);
}

.search-placeholder {
  font-size: 0.85rem;
  color: var(--text-sub);
}

.nav-search-btn:hover .search-placeholder {
  color: var(--text-main);
}

.search-kbd-pill {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: 2px;
}

.search-kbd-pill kbd,
.search-shortcuts kbd,
.spotlight-close-btn {
  display: inline-block;
  padding: 2px 6px;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-sub);
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid var(--glass-border-subtle);
  border-radius: 6px;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.08);
  line-height: 1.2;
}

[data-theme="dark"] .search-kbd-pill kbd,
[data-theme="dark"] .search-shortcuts kbd,
[data-theme="dark"] .spotlight-close-btn {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  border-color: rgba(255, 255, 255, 0.12);
}

/* Spotlight Search Modal Backdrop */
.search-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 70px 16px 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease-in-out;
  overflow-y: auto;
}

.search-modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.search-modal-dialog {
  width: 100%;
  max-width: 740px;
  background: var(--glass-card-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg), 0 25px 60px rgba(0, 0, 0, 0.4);
  border-radius: 20px;
  overflow: hidden;
  transform: translateY(-16px) scale(0.97);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.search-modal-backdrop.is-open .search-modal-dialog {
  transform: translateY(0) scale(1);
}

/* Search Modal Header & Input */
.search-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--glass-border-subtle);
}

.search-input-icon {
  flex-shrink: 0;
  color: var(--emerald);
}

.spotlight-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 1.1rem;
  font-family: inherit;
  font-weight: 500;
  color: var(--text-heading);
}

.spotlight-input::placeholder {
  color: var(--text-sub);
  font-size: 1rem;
}

.spotlight-clear-btn {
  background: rgba(0, 0, 0, 0.06);
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--text-sub);
  cursor: pointer;
  transition: var(--transition);
}

[data-theme="dark"] .spotlight-clear-btn {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.spotlight-clear-btn:hover {
  background: var(--rose);
  color: #fff;
}

.spotlight-close-btn {
  cursor: pointer;
  transition: var(--transition);
}

.spotlight-close-btn:hover {
  border-color: var(--emerald);
  color: var(--emerald);
}

/* Search Suggestion Chips */
.search-chips-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--glass-surface);
  border-bottom: 1px solid var(--glass-border-subtle);
  overflow-x: auto;
  scrollbar-width: none;
}
.search-chips-row::-webkit-scrollbar { display: none; }

.search-chips-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-sub);
  white-space: nowrap;
}

.search-chip {
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--glass-border-subtle);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

[data-theme="dark"] .search-chip {
  background: rgba(255, 255, 255, 0.06);
}

.search-chip:hover {
  background: var(--glass-surface-hover);
  border-color: var(--emerald);
  color: var(--emerald);
  transform: translateY(-1px);
}

/* Results List */
.spotlight-results {
  max-height: 480px;
  overflow-y: auto;
  padding: 10px 14px;
}

.spotlight-results::-webkit-scrollbar {
  width: 6px;
}
.spotlight-results::-webkit-scrollbar-thumb {
  background: var(--glass-border);
  border-radius: 9999px;
}

.spotlight-section-heading {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-sub);
  padding: 8px 12px 4px;
}

.spotlight-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
  border: 1px solid transparent;
  margin-bottom: 4px;
  cursor: pointer;
}

.spotlight-item:hover,
.spotlight-item.is-selected {
  background: var(--glass-surface-hover);
  border-color: rgba(5, 150, 105, 0.35);
  transform: translateX(4px);
}

[data-theme="dark"] .spotlight-item:hover,
[data-theme="dark"] .spotlight-item.is-selected {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(0, 230, 118, 0.35);
}

.spotlight-item-thumb {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--glass-border-subtle);
  background: var(--glass-inner-bg);
}

.spotlight-item-body {
  flex: 1;
  min-width: 0;
}

.spotlight-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-sub);
  margin-bottom: 3px;
}

.spotlight-item-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: rgba(5, 150, 105, 0.1);
  color: var(--emerald);
  border: 1px solid rgba(5, 150, 105, 0.2);
}

.spotlight-item-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.spotlight-item-excerpt {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

.spotlight-item-arrow {
  font-size: 1.1rem;
  color: var(--text-sub);
  opacity: 0;
  transition: var(--transition);
  flex-shrink: 0;
}

.spotlight-item:hover .spotlight-item-arrow,
.spotlight-item.is-selected .spotlight-item-arrow {
  opacity: 1;
  transform: translateX(2px);
  color: var(--emerald);
}

/* Search Highlight Match */
.search-highlight {
  background: rgba(5, 150, 105, 0.22);
  color: var(--emerald);
  font-weight: 700;
  border-radius: 3px;
  padding: 0 2px;
}

/* Empty State */
.spotlight-empty {
  text-align: center;
  padding: 36px 20px;
  color: var(--text-muted);
}

.spotlight-empty-icon {
  font-size: 2.2rem;
  margin-bottom: 10px;
}

.spotlight-empty-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 4px;
}

.spotlight-empty-desc {
  font-size: 0.85rem;
  color: var(--text-sub);
  max-width: 440px;
  margin: 0 auto;
}

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

.search-shortcuts {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-heading);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Market Ticker Bar */
.ticker-bar {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 12px 0;
  margin-bottom: 40px;
  scrollbar-width: none;
}
.ticker-bar::-webkit-scrollbar { display: none; }

.ticker-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: var(--glass-surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  white-space: nowrap;
  font-size: 0.85rem;
  box-shadow: var(--shadow-sm);
}

.ticker-label { font-weight: 700; color: var(--text-heading); }
.ticker-val { font-family: var(--font-mono); font-weight: 600; }
.ticker-positive { color: var(--emerald); }
.ticker-negative { color: var(--rose); }
.ticker-neutral { color: var(--text-sub); }

/* Hero Section */
.hero {
  padding: 60px 0 80px;
  text-align: center;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  background: rgba(5, 150, 105, 0.1);
  border: 1px solid rgba(5, 150, 105, 0.25);
  border-radius: var(--radius-full);
  color: var(--emerald);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  margin-bottom: 20px;
  color: var(--text-heading);
}

.hero p {
  font-size: 1.15rem;
  max-width: 680px;
  margin: 0 auto 36px;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Grid Layouts */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 28px;
  margin-top: 30px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 28px;
}

/* Section Header */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.section-title {
  font-size: 1.85rem;
  color: var(--text-heading);
}

.section-desc {
  font-size: 0.95rem;
  margin-top: 6px;
  color: var(--text-sub);
}

/* Article Card - Institutional Glassmorphic Design */
.glass-card.article-card {
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 100%;
  background: var(--glass-card-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.glass-card.article-card:hover {
  transform: translateY(-6px);
  border-color: var(--glass-border-hover);
  box-shadow: var(--shadow-lg), 0 0 25px var(--emerald-glow);
}

.card-thumb-wrapper {
  position: relative;
  width: 100%;
  height: 195px;
  overflow: hidden;
  display: block;
  background: var(--glass-inner-bg);
}

.card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card.article-card:hover .card-thumb {
  transform: scale(1.06);
}

.thumb-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.05) 0%, rgba(15, 23, 42, 0.45) 100%);
  pointer-events: none;
}

.badge-overlay {
  position: absolute;
  top: 12px;
  left: 12px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(2, 132, 199, 0.4);
  color: #38bdf8;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0;
}

.badge-read-time {
  position: absolute;
  bottom: 12px;
  right: 12px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f8fafc;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
}

.card-body {
  padding: 18px 20px 14px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.article-category {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: rgba(2, 132, 199, 0.1);
  border: 1px solid rgba(2, 132, 199, 0.25);
  color: var(--cyan);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.article-title {
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.42;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-title a {
  color: var(--text-heading);
  text-decoration: none;
  transition: color 0.2s ease;
}

.article-title a:hover {
  color: var(--emerald);
}

.article-excerpt {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

.article-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--glass-border-subtle);
  margin-top: auto;
  font-size: 0.82rem;
  color: var(--text-sub);
}

.meta-read-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--emerald);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s ease;
}

.meta-read-btn span {
  display: inline-block;
  transition: transform 0.2s ease;
}

.glass-card.article-card:hover .meta-read-btn span {
  transform: translateX(4px);
}

.article-image-box {
  margin: 0 0 36px 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--glass-border-subtle);
  box-shadow: var(--shadow-md);
  max-height: 480px;
  width: 100%;
}

.article-image-box img {
  width: 100%;
  height: 100%;
  max-height: 480px;
  object-fit: cover;
  display: block;
  margin: 0;
  border: none;
  box-shadow: none;
  border-radius: 0;
}

/* Body & In-Content Images */
.article-content-card img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 28px auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border-subtle);
  box-shadow: var(--shadow-sm);
}

.article-content-card .article-image-box img {
  margin: 0;
  border: none;
  box-shadow: none;
  border-radius: 0;
}

/* Article Content Typography & Tables */
.article-content-card table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 28px 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--glass-border-subtle);
}

.article-content-card th {
  background: var(--glass-inner-bg);
  color: var(--text-heading);
  font-weight: 700;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--glass-border-subtle);
  font-size: 0.95rem;
}

.article-content-card td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--glass-border-subtle);
  color: var(--text-main);
  font-size: 0.95rem;
}

.article-content-card tr:last-child td {
  border-bottom: none;
}

.article-content-card tr:hover td {
  background: var(--glass-surface);
}

.article-content-card ul, .article-content-card ol {
  padding-left: 24px;
  margin-bottom: 24px;
}

.article-content-card li {
  margin-bottom: 10px;
}

.article-content-card strong {
  color: var(--text-heading);
}

/* Glass Calculator Section */
.calculator-box {
  background: var(--glass-surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-lg);
  padding: 36px;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg), var(--glass-shine);
}

.calc-input-group {
  margin-bottom: 24px;
}

.calc-label-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.95rem;
  color: var(--text-main);
}

.calc-val-badge {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--emerald);
}

.glass-range {
  width: 100%;
  height: 7px;
  border-radius: 4px;
  background: rgba(148, 163, 184, 0.3);
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.glass-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 10px var(--emerald-glow);
  cursor: pointer;
  border: 2px solid #ffffff;
}

.calc-results {
  background: var(--glass-inner-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: var(--shadow-sm);
}

.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--glass-border-subtle);
}

.result-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.result-value {
  font-size: 1.4rem;
  font-family: var(--font-mono);
  font-weight: 800;
  color: var(--text-heading);
}

.result-highlight {
  color: var(--emerald);
  text-shadow: 0 0 12px var(--emerald-glow);
}

/* Glass Form Inputs */
.glass-input {
  width: 100%;
  padding: 14px 18px;
  background: var(--glass-surface);
  border: 1px solid var(--glass-border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

.glass-input:focus {
  border-color: var(--emerald);
  box-shadow: 0 0 12px var(--emerald-glow);
  background: #ffffff;
}

[data-theme="dark"] .glass-input:focus {
  background: rgba(15, 23, 42, 0.9);
}

/* ==========================================
   Article 2-Column Layout with Right Sidebar
   ========================================== */
.article-layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 36px;
  align-items: start;
}

.article-main-col {
  min-width: 0;
}

.article-sidebar-col {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Sidebar Glass Widgets */
.sidebar-widget {
  background: var(--glass-card-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm), var(--glass-shine);
  border-radius: var(--radius-md);
  padding: 22px;
  transition: var(--transition);
}

.sidebar-widget:hover {
  border-color: var(--glass-border-hover);
  box-shadow: var(--shadow-md);
}

.sidebar-widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--glass-border-subtle);
}

.sidebar-widget-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-heading);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-view-all {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--emerald);
  transition: var(--transition);
}

.sidebar-view-all:hover {
  color: var(--cyan);
}

/* Recent Posts List in Sidebar */
.sidebar-posts-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-post-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--glass-border-subtle);
  transition: var(--transition);
}

.sidebar-post-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.sidebar-post-thumb {
  width: 66px;
  height: 66px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--glass-border-subtle);
  background: var(--glass-inner-bg);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
}

.sidebar-post-item:hover .sidebar-post-thumb {
  transform: scale(1.06);
  border-color: var(--emerald);
}

.sidebar-post-content {
  flex: 1;
  min-width: 0;
}

.sidebar-post-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--radius-full);
  background: rgba(5, 150, 105, 0.1);
  color: var(--emerald);
  border: 1px solid rgba(5, 150, 105, 0.2);
  margin-bottom: 4px;
}

.sidebar-post-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.35;
  margin-bottom: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.sidebar-post-item:hover .sidebar-post-title {
  color: var(--emerald);
}

.sidebar-post-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  color: var(--text-sub);
}

/* Category List in Sidebar */
.sidebar-category-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-category-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--glass-surface);
  border: 1px solid var(--glass-border-subtle);
  color: var(--text-main);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.sidebar-category-link:hover,
.sidebar-category-link.is-active {
  background: var(--glass-surface-hover);
  border-color: var(--emerald);
  color: var(--emerald);
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.12);
}

.sidebar-cat-name {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-category-count {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(5, 150, 105, 0.1);
  color: var(--emerald);
  border: 1px solid rgba(5, 150, 105, 0.2);
}

/* Sidebar CTA & Ad Box */
.sidebar-cta-widget {
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.08) 0%, rgba(14, 165, 233, 0.08) 100%);
  border-color: rgba(5, 150, 105, 0.25);
  text-align: center;
}

.sidebar-cta-icon {
  font-size: 2.2rem;
  margin-bottom: 10px;
}

.sidebar-ad-widget {
  text-align: center;
  background: var(--glass-surface);
  border: 1px dashed var(--glass-border);
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 16px;
}

.ad-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-sub);
  margin-bottom: 8px;
  display: block;
}

@media (max-width: 1080px) {
  .article-layout-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .article-sidebar-col {
    position: static;
  }
}

/* Glass Newsletter Subscription Card */
.newsletter-card {
  text-align: center;
  padding: 56px 32px;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(240, 253, 250, 0.88) 50%, rgba(240, 249, 255, 0.92) 100%);
  border: 1px solid rgba(5, 150, 105, 0.22);
  box-shadow: 0 16px 45px rgba(5, 150, 105, 0.08), inset 0 1px 2px rgba(255, 255, 255, 0.8);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  transition: var(--transition);
}

[data-theme="dark"] .newsletter-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(6, 78, 59, 0.28) 50%, rgba(12, 74, 110, 0.28) 100%);
  border-color: rgba(0, 230, 118, 0.25);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 30px rgba(0, 230, 118, 0.12);
}

.newsletter-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(5, 150, 105, 0.1);
  border: 1px solid rgba(5, 150, 105, 0.25);
  border-radius: var(--radius-full);
  color: var(--emerald);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 20px;
}

[data-theme="dark"] .newsletter-badge {
  background: rgba(0, 230, 118, 0.1);
  border-color: rgba(0, 230, 118, 0.25);
}

.newsletter-title {
  font-size: clamp(1.85rem, 3.5vw, 2.5rem);
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.newsletter-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 30px;
  line-height: 1.6;
}

.newsletter-form {
  display: flex;
  gap: 12px;
  justify-content: center;
  max-width: 520px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.newsletter-input {
  flex: 1;
  min-width: 260px;
  padding: 14px 22px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.95);
  border: 1.5px solid var(--glass-border-subtle);
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .newsletter-input {
  background: rgba(15, 23, 42, 0.8);
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.newsletter-input:focus {
  border-color: var(--emerald);
  box-shadow: 0 0 16px var(--emerald-glow);
  background: #ffffff;
}

[data-theme="dark"] .newsletter-input:focus {
  background: rgba(15, 23, 42, 0.95);
}

.newsletter-trust {
  margin-top: 20px;
  font-size: 0.8rem;
  color: var(--text-sub);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Footer */
.footer {
  margin-top: 80px;
  padding: 60px 0 30px;
  background: var(--footer-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-top: 1px solid var(--glass-border);
}

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

.footer-brand p {
  margin: 16px 0;
  max-width: 320px;
}

.footer-col h4 {
  font-size: 1rem;
  margin-bottom: 16px;
  color: var(--text-heading);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

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

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

.footer-disclaimer {
  padding: 24px;
  border-radius: var(--radius-sm);
  background: var(--glass-surface);
  border: 1px solid var(--glass-border-subtle);
  font-size: 0.8rem;
  color: var(--text-sub);
  margin-bottom: 30px;
  line-height: 1.6;
}

.footer-bottom {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-sub);
  padding-top: 20px;
  border-top: 1px solid var(--glass-border-subtle);
}

/* Mobile Responsive */
@media (max-width: 1024px) {
  .search-placeholder,
  .search-kbd-pill {
    display: none;
  }
  .nav-search-btn {
    padding: 8px 10px;
  }
}

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

@media (max-width: 768px) {
  .navbar-wrapper {
    padding: 0 12px;
    top: 8px;
    margin-bottom: 20px;
  }
  .navbar {
    padding: 10px 16px;
  }
  .nav-cta-btn {
    display: none;
  }
  .nav-links {
    display: none;
  }
  .nav-toggle {
    display: block;
  }
  .search-modal-backdrop {
    padding: 24px 10px 16px;
  }
  .search-modal-dialog {
    border-radius: 16px;
  }
  .search-shortcuts {
    display: none;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .grid-3 {
    grid-template-columns: 1fr;
  }
}
