/* ==========================================================================
   SIPPLANCALCULATOR.IN DESIGN SYSTEM - FINTECH GLASSMORPHISM & MOBILE FIRST
   ========================================================================== */

:root {
  --bg-primary: #0a0f1d;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.9);
  --bg-card-hover: rgba(31, 41, 55, 0.95);
  --bg-input: #1f2937;
  
  --text-primary: #f9fafb;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  
  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.25);
  --accent-cyan: #06b6d4;
  --accent-indigo: #6366f1;
  --accent-rose: #f43f5e;
  --accent-amber: #f59e0b;
  --accent-purple: #a855f7;
  
  --border-color: rgba(255, 255, 255, 0.1);
  --border-focus: rgba(16, 185, 129, 0.5);
  --card-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  --glow-shadow: 0 0 35px -5px rgba(16, 185, 129, 0.15);
  
  --toc-bg: rgba(31, 41, 55, 0.85);
  --toc-border: rgba(6, 182, 212, 0.35);
  --toc-link: #38bdf8;
  --toc-link-hover: #34d399;
  --toc-hover-bg: rgba(56, 189, 248, 0.1);
  
  --stat-card-bg: rgba(17, 24, 39, 0.85);
  --stat-label-color: #cbd5e1;
  
  --takeaway-bg: rgba(16, 185, 129, 0.12);
  --takeaway-border: #10b981;
  --takeaway-text: #f9fafb;
  
  --table-header-bg: rgba(16, 185, 129, 0.15);
  --table-header-text: #f9fafb;
  --table-row-border: rgba(255, 255, 255, 0.08);
  --table-highlight-bg: rgba(16, 185, 129, 0.1);
  
  --callout-bg: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(6, 182, 212, 0.08));
  --callout-border: rgba(16, 185, 129, 0.35);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-input: #f1f5f9;
  
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  
  --accent-emerald: #059669;
  --accent-emerald-glow: rgba(5, 150, 105, 0.2);
  --accent-cyan: #0284c7;
  --accent-indigo: #4f46e5;
  --accent-rose: #e11d48;
  --accent-amber: #d97706;
  --accent-purple: #9333ea;
  
  --border-color: rgba(0, 0, 0, 0.12);
  --border-focus: rgba(5, 150, 105, 0.6);
  --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.06), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --glow-shadow: 0 0 25px -5px rgba(5, 150, 105, 0.12);
  
  --toc-bg: #f8fafc;
  --toc-border: rgba(2, 132, 199, 0.35);
  --toc-link: #0369a1;
  --toc-link-hover: #047857;
  --toc-hover-bg: rgba(2, 132, 199, 0.08);
  
  --stat-card-bg: #ffffff;
  --stat-label-color: #475569;
  
  --takeaway-bg: #ecfdf5;
  --takeaway-border: #059669;
  --takeaway-text: #064e3b;
  
  --table-header-bg: #d1fae5;
  --table-header-text: #064e3b;
  --table-row-border: rgba(0, 0, 0, 0.08);
  --table-highlight-bg: #f0fdf4;
  
  --callout-bg: linear-gradient(135deg, #f0fdf4, #ecfeff);
  --callout-border: rgba(5, 150, 105, 0.35);
}

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

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(16, 185, 129, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(99, 102, 241, 0.05) 0%, transparent 40%);
  background-attachment: fixed;
  overflow-x: hidden;
  width: 100%;
}

.container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .container {
    padding: 0 1.5rem;
  }
}

/* Global Link Styling (Prevent Browser Default Blue Text) */
a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

a:visited {
  color: inherit;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 15, 29, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 0;
}

[data-theme="light"] .site-header {
  background: rgba(248, 250, 252, 0.9);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-primary);
  min-width: 0;
}

.logo-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  background: linear-gradient(135deg, var(--accent-emerald), var(--accent-cyan));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  color: #ffffff;
  box-shadow: 0 4px 14px var(--accent-emerald-glow);
}

.brand-text h1 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 640px) {
  .logo-icon {
    width: 42px;
    height: 42px;
    font-size: 1.25rem;
  }
  .brand-text h1 {
    font-size: 1.15rem;
    gap: 0.5rem;
  }
}

.brand-badge {
  font-size: 0.6rem;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--accent-emerald), var(--accent-cyan));
  color: #ffffff;
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

@media (min-width: 640px) {
  .header-actions {
    gap: 0.75rem;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  touch-action: manipulation;
}

@media (min-width: 640px) {
  .btn {
    padding: 0.55rem 1.15rem;
    font-size: 0.875rem;
    gap: 0.5rem;
  }
}

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

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

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

.btn-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 0;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 640px) {
  .btn-icon {
    width: 40px;
    height: 40px;
  }
}

/* Hide non-critical buttons on small mobile screens */
@media (max-width: 480px) {
  .header-actions .btn-secondary,
  .header-actions .btn-primary {
    padding: 0.4rem 0.6rem;
    font-size: 0.75rem;
  }
  #exportAiBtn, #shareBadgeBtn {
    display: none;
  }
}

/* Hero Section */
.hero-section {
  padding: 1.5rem 0 1rem;
  text-align: center;
}

@media (min-width: 768px) {
  .hero-section {
    padding: 2.5rem 0 1.5rem;
  }
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--accent-emerald);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.85rem;
  max-width: 100%;
}

.hero-title {
  font-size: clamp(1.65rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.gradient-text {
  background: linear-gradient(135deg, #10b981 0%, #06b6d4 50%, #6366f1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(0.9rem, 2vw, 1.15rem);
  color: var(--text-secondary);
  max-width: 760px;
  margin: 0 auto 1.25rem;
  padding: 0 0.5rem;
}

/* Navigation Tabs (Mobile Scrollable Pills) */
.tab-navigation {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.5rem 0.25rem 1.25rem;
  scrollbar-width: none;
  justify-content: flex-start;
  width: 100%;
}

.tab-navigation::-webkit-scrollbar {
  display: none;
}

@media (min-width: 1024px) {
  .tab-navigation {
    justify-content: center;
    flex-wrap: wrap;
  }
}

.nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.95rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.8rem;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  flex-shrink: 0;
  touch-action: manipulation;
}

@media (min-width: 640px) {
  .nav-tab {
    padding: 0.65rem 1.15rem;
    font-size: 0.875rem;
    gap: 0.5rem;
  }
}

.nav-tab:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.nav-tab.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(6, 182, 212, 0.15));
  border-color: var(--accent-emerald);
  color: var(--accent-emerald);
  box-shadow: 0 0 15px var(--accent-emerald-glow);
}

/* Main Grid Layout */
.main-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 1024px) {
  .main-grid {
    grid-template-columns: 1fr 1.35fr;
    gap: 1.5rem;
    margin-bottom: 3rem;
  }
}

/* Cards & Containers */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--card-shadow);
  transition: border-color 0.2s;
  width: 100%;
}

@media (min-width: 640px) {
  .card {
    padding: 1.75rem;
  }
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

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

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .card-title {
    font-size: 1.25rem;
  }
}

/* Form Controls & Sliders */
.form-group {
  margin-bottom: 1.25rem;
}

.form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  gap: 0.5rem;
}

.form-label {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

@media (min-width: 640px) {
  .form-label {
    font-size: 0.875rem;
  }
}

.input-box-wrapper {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-emerald);
  transition: all 0.2s;
}

.input-box-wrapper:focus-within {
  border-color: var(--accent-emerald);
  box-shadow: 0 0 0 2px var(--accent-emerald-glow);
}

.currency-symbol {
  color: var(--text-muted);
  margin-right: 0.25rem;
}

.unit-symbol {
  color: var(--text-muted);
  margin-left: 0.25rem;
  font-size: 0.85rem;
}

.number-input {
  background: transparent;
  border: none;
  outline: none;
  color: inherit;
  font-family: inherit;
  font-weight: inherit;
  font-size: inherit;
  width: 90px;
  text-align: right;
}

@media (min-width: 640px) {
  .number-input {
    width: 105px;
  }
}

.slider-container {
  position: relative;
  margin-top: 0.5rem;
}

.custom-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--bg-input);
  outline: none;
  cursor: pointer;
  position: relative;
}

.custom-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid var(--accent-emerald);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  cursor: grab;
  transition: transform 0.1s, box-shadow 0.1s;
}

.custom-range::-webkit-slider-thumb:hover,
.custom-range::-webkit-slider-thumb:active {
  transform: scale(1.2);
  box-shadow: 0 0 14px var(--accent-emerald);
}

.range-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 0.4rem;
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Results & Metric Cards */
.results-header-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(6, 182, 212, 0.08));
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 480px) {
  .results-header-banner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
  }
}

.banner-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.banner-value {
  font-size: clamp(1.6rem, 5.5vw, 2.5rem);
  font-weight: 900;
  color: var(--accent-emerald);
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
  word-break: break-all;
}

.banner-words {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 640px) {
  .metrics-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
  }
}

.metric-card {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  position: relative;
  overflow: hidden;
}

@media (min-width: 640px) {
  .metric-card {
    padding: 1.15rem;
  }
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent-emerald);
}

.metric-card.gain::before { background: var(--accent-cyan); }
.metric-card.real::before { background: var(--accent-amber); }
.metric-card.tax::before { background: var(--accent-rose); }

.metric-title {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.metric-number {
  font-size: clamp(1rem, 3.5vw, 1.35rem);
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-primary);
  word-break: break-all;
}

.metric-subtext {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
}

/* Charts Wrapper */
.chart-wrapper {
  position: relative;
  height: 270px;
  width: 100%;
  margin: 1rem 0;
}

@media (min-width: 640px) {
  .chart-wrapper {
    height: 330px;
    margin: 1.5rem 0;
  }
}

/* Milestones */
.milestones-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-top: 1.25rem;
}

@media (min-width: 640px) {
  .milestones-box {
    padding: 1.25rem;
    margin-top: 1.5rem;
  }
}

.milestones-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.milestone-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.825rem;
}

@media (min-width: 480px) {
  .milestone-item {
    flex-direction: row;
    align-items: flex-start;
    gap: 0.75rem;
  }
}

.milestone-item:last-child {
  border-bottom: none;
}

.milestone-badge {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.72rem;
  align-self: flex-start;
}

/* Scenarios & Blog Grid */
.scenarios-section, .blog-section {
  margin: 3rem 0;
}

@media (min-width: 768px) {
  .scenarios-section, .blog-section {
    margin: 4rem 0;
  }
}

.section-header {
  text-align: center;
  margin-bottom: 2rem;
}

.section-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.section-desc {
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto;
  font-size: 0.9rem;
}

.scenarios-grid, .blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .scenarios-grid, .blog-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

@media (min-width: 1024px) {
  .scenarios-grid, .blog-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  }
}

.scenario-card, .blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  color: inherit;
}

.scenario-card:hover, .blog-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-emerald);
  box-shadow: var(--glow-shadow);
}

.scenario-badge, .blog-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.75rem;
  align-self: flex-start;
}

.scenario-card-title, .blog-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  line-height: 1.35;
}

.scenario-card-summary, .blog-card-summary {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.scenario-footer, .blog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
  padding-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--accent-emerald);
  font-weight: 600;
}

/* Blog Article Layout & Rich Content Styles */
.article-container {
  max-width: 860px;
  margin: 1.5rem auto 4rem;
  padding: 0 1rem;
}

.article-header {
  margin-bottom: 2rem;
  text-align: center;
}

.article-title {
  font-size: clamp(1.8rem, 4.5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.25;
  margin: 1rem 0;
  letter-spacing: -0.02em;
}

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

/* Custom Visual Blog Banner Infographic */
.blog-hero-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(6, 182, 212, 0.12) 50%, rgba(99, 102, 241, 0.12) 100%);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 1.5rem 0 2.5rem;
  box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}

.blog-hero-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

.banner-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

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

.banner-stat-card {
  background: var(--stat-card-bg);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem 1rem;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.banner-stat-value {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent-emerald);
}

.banner-stat-label {
  font-size: 0.75rem;
  color: var(--stat-label-color);
  margin-top: 0.35rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* Table of Contents */
.toc-box {
  background: var(--toc-bg);
  border: 1px solid var(--toc-border);
  border-left: 4px solid var(--accent-cyan);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin: 2rem 0;
  box-shadow: 0 4px 15px -2px rgba(0, 0, 0, 0.08);
}

.toc-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 0;
  padding-left: 0;
}

.toc-list li {
  margin: 0;
}

.toc-list li a {
  color: var(--toc-link) !important;
  text-decoration: none !important;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-sm);
}

.toc-list li a:hover {
  color: var(--toc-link-hover) !important;
  background: var(--toc-hover-bg);
  transform: translateX(4px);
}

.article-body {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text-secondary);
}

@media (min-width: 640px) {
  .article-body {
    padding: 2.5rem;
  }
}

.article-body h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  letter-spacing: -0.01em;
}

.article-body h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 1.75rem 0 0.75rem;
}

.article-body p {
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
  font-size: 1.05rem;
}

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

.article-body a {
  color: var(--accent-emerald);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
  transition: color 0.15s;
}

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

.article-body ul, .article-body ol {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
}

.article-body li {
  margin-bottom: 0.6rem;
  color: var(--text-secondary);
}

/* Styled Financial Data Tables */
.data-table-wrapper {
  overflow-x: auto;
  margin: 1.75rem 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
}

.seo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.925rem;
  text-align: left;
}

.seo-table th {
  background: var(--table-header-bg);
  color: var(--table-header-text);
  font-weight: 700;
  padding: 0.85rem 1rem;
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap;
}

.seo-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--table-row-border);
  color: var(--text-secondary);
}

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

.seo-table tr.highlight-winner {
  background: var(--table-highlight-bg);
  font-weight: 600;
  color: var(--text-primary);
}

/* Contextual Calculator Callout Box */
.calc-callout-box {
  background: var(--callout-bg);
  border: 1px solid var(--callout-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin: 2rem 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}

@media (min-width: 640px) {
  .calc-callout-box {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.calc-callout-text h4 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.calc-callout-text p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}

/* Author Box (E-E-A-T) */
.author-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin: 2.5rem 0 1.5rem;
  display: flex;
  gap: 1.25rem;
  align-items: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.author-avatar {
  width: 60px;
  height: 60px;
  min-width: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-emerald), var(--accent-indigo));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
}

.author-info h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.author-info p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0;
  line-height: 1.5;
}

.article-takeaway {
  background: var(--takeaway-bg);
  border-left: 4px solid var(--takeaway-border);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 1.75rem 0;
  color: var(--takeaway-text);
  font-size: 1rem;
  line-height: 1.7;
}

.article-takeaway strong {
  color: var(--takeaway-text);
}

.article-cta {
  background: var(--callout-bg);
  border: 1px solid var(--callout-border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  text-align: center;
  margin: 2.5rem 0 1rem;
}

/* FAQ Section */
.faq-section {
  margin: 3rem 0;
}

.faq-list {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s;
}

.faq-question {
  width: 100%;
  padding: 1rem 1.25rem;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .faq-question {
    padding: 1.25rem 1.5rem;
    font-size: 1.05rem;
  }
}

.faq-icon {
  font-size: 1.25rem;
  transition: transform 0.2s;
  min-width: 20px;
  text-align: right;
}

.faq-answer {
  padding: 0 1.25rem 1rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.65;
  display: none;
}

@media (min-width: 640px) {
  .faq-answer {
    padding: 0 1.5rem 1.25rem;
    font-size: 0.925rem;
  }
}

.faq-item.open .faq-answer {
  display: block;
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 640px;
  width: 100%;
  padding: 1.25rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  max-height: 90vh;
  overflow-y: auto;
}

@media (min-width: 640px) {
  .modal-content {
    padding: 1.75rem;
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.close-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
}

.canvas-preview-wrapper {
  background: #000000;
  border-radius: var(--radius-md);
  padding: 0.5rem;
  margin-bottom: 1.25rem;
  display: flex;
  justify-content: center;
}

#shareCanvas {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
  padding: 2.5rem 0;
  margin-top: 3.5rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

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

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
  }
}

.footer-heading {
  font-size: 0.95rem;
  color: var(--text-primary);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

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

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
}

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

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
}
