/*
Theme Name: Jastun
Theme URI: https://jastun.com/
Author: Jastun Technologies
Author URI: https://jastun.com/
Description: Institutional FinTech & Quantitative SaaS Light-Mode WordPress Theme. Built from the ground up for extreme performance, Core Web Vitals 100/100, Bento Grid layouts, and high-converting Google AdSense integration.
Version: 2.0.0
Tested up to: 6.7
Requires at least: 5.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: jastun
Tags: fintech, trading, saas, light-mode, adsense-ready, responsive, clean, modern, institutional

Jastun Technologies — The Quantitative Trading & Prop Firm Tech Ecosystem
*/

/* ==========================================================================
   1. DESIGN TOKENS (PREMIUM SAAS LIGHT PALETTE - STRIPE & LINEAR STANDARD)
   ========================================================================== */
:root {
  /* Surfaces */
  --bg-app: #ffffff;
  --bg-subtle: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-muted: #f1f5f9;
  --bg-accent: #f8fafc;

  /* Typography Colors */
  --text-hero: #090d16;       /* Ultra deep charcoal */
  --text-title: #0f172a;      /* Slate 900 */
  --text-body: #334155;       /* Slate 700 */
  --text-muted: #64748b;      /* Slate 500 */
  --text-subtle: #94a3b8;     /* Slate 400 */

  /* FinTech Brand Gradients & Accents */
  --primary: #059669;         /* Institutional Emerald 600 */
  --primary-hover: #047857;   /* Emerald 700 */
  --primary-soft: #ecfdf5;    /* Emerald 50 */
  --primary-border: #a7f3d0;  /* Emerald 200 */

  --brand-blue: #2563eb;      /* Blue 600 */
  --brand-blue-soft: #eff6ff; /* Blue 50 */
  --brand-indigo: #4f46e5;    /* Indigo 600 */
  --brand-indigo-soft: #eef2ff;

  --brand-purple: #7c3aed;
  --brand-purple-soft: #f5f3ff;

  --brand-amber: #d97706;
  --brand-amber-soft: #fffbeb;

  /* Crisp SaaS Borders */
  --border-subtle: #e2e8f0;   /* Slate 200 */
  --border-card: #e2e8f0;
  --border-card-hover: #cbd5e1;
  --border-focus: #059669;

  /* High-End Micro Shadows */
  --shadow-micro: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
  --shadow-card: 0 1px 3px 0 rgba(15, 23, 42, 0.05), 0 1px 2px -1px rgba(15, 23, 42, 0.05);
  --shadow-card-hover: 0 12px 24px -4px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.04);
  --shadow-elevated: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.05);

  /* Geometry */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* High-Performance Modern SaaS Font Stack */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* ==========================================================================
   2. GLOBAL RESET & BASE STYLES
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-body);
  line-height: 1.6;
  font-size: 0.9375rem;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

img, svg, picture, video {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

.container {
  width: 100%;
  max-width: 1220px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* ==========================================================================
   3. SAAS NAVBAR (STICKY, BLURRED, DESKTOP + MOBILE DRAWER)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  height: 72px;
  transition: background-color 0.2s ease;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* Brand Logo */
.site-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-emblem {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
  border: 1px solid #e2e8f0;
  overflow: hidden;
  flex-shrink: 0;
  padding: 3px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-brand:hover .brand-emblem {
  border-color: #cbd5e1;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.1);
}

.brand-emblem-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.brand-name-group {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.1875rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--text-hero);
  line-height: 1.15;
}

.brand-subtitle {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  font-family: var(--font-mono);
}

/* Desktop Nav Links & Dropdowns */
.nav-menu-desktop {
  display: flex;
  align-items: center;
}

.nav-menu-list {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu-list > li {
  position: relative;
  list-style: none;
}

.nav-menu-list a,
.nav-link-item {
  font-size: 0.875rem;
  font-weight: 550;
  color: #334155;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.nav-menu-list a:hover,
.nav-link-item:hover {
  color: #0f172a;
}

/* Strictly isolate active highlights to non-dropdown, non-home page items */
.nav-menu-list > .current-menu-item:not(.menu-item-has-children):not(.menu-item-home) > a,
.nav-menu-list > .current_page_item:not(.menu-item-has-children):not(.menu-item-home) > a {
  color: var(--primary);
  font-weight: 600;
}

.nav-chevron {
  font-size: 0.625rem;
  opacity: 0.6;
  transition: transform 0.2s ease;
}

.menu-item-has-children:hover .nav-chevron {
  transform: rotate(180deg);
}

/* SaaS Hover Dropdown Sub-menu */
.nav-menu-list .sub-menu {
  position: absolute;
  top: 100%;
  left: -0.75rem;
  min-width: 210px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 30px -4px rgba(15, 23, 42, 0.12);
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  list-style: none;
  margin: 0;
}

.nav-menu-list li:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-menu-list .sub-menu li {
  list-style: none;
  margin: 0;
}

.nav-menu-list .sub-menu a {
  display: block;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-body);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.nav-menu-list .sub-menu a:hover {
  background-color: var(--bg-muted);
  color: var(--primary);
}

/* Nav Actions (Buttons) */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5625rem 1.125rem;
  font-size: 0.84375rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: 1px solid transparent;
  line-height: 1.3;
}

.btn-secondary {
  background-color: var(--bg-card);
  color: var(--text-title);
  border-color: var(--border-subtle);
  box-shadow: var(--shadow-micro);
}

.btn-secondary:hover {
  background-color: var(--bg-muted);
  border-color: var(--border-card-hover);
  color: var(--text-hero);
}

.btn-primary {
  background-color: var(--text-hero);
  color: #ffffff !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-primary:hover {
  background-color: #1e293b;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

/* Mobile Hamburger Toggle */
.mobile-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  color: var(--text-hero);
  cursor: pointer;
}

/* ==========================================================================
   MOBILE NAVIGATION DRAWER & TOUCH ACCORDION (SOLID WHITE - ZERO BLEED-THROUGH)
   ========================================================================== */
.mobile-nav-drawer {
  display: none;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  background-color: #ffffff !important; /* 100% Solid Pure White */
  border-bottom: 2px solid var(--border-subtle);
  padding: 1.5rem;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
  z-index: 999999;
  max-height: calc(100vh - 72px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-nav-drawer.is-open {
  display: block !important;
  animation: drawerSlideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes drawerSlideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0 0 1.5rem;
  padding: 0;
}

.mobile-nav-links > li {
  list-style: none;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.35rem;
}

.mobile-nav-links > li:last-child {
  border-bottom: none;
}

.mobile-nav-item-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.mobile-nav-links a {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-hero);
  display: flex;
  align-items: center;
  flex-grow: 1;
  padding: 0.625rem 0.5rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.15s ease;
}

.mobile-nav-links a:hover,
.mobile-nav-links a:active {
  background: var(--bg-muted);
  color: var(--primary);
}

/* Touch Toggle Button for Sub-menus */
.mobile-sub-toggle {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #f1f5f9;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-hero);
  cursor: pointer;
  flex-shrink: 0;
  margin-left: 0.5rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-sub-toggle svg {
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-links .menu-item-has-children.is-expanded .mobile-sub-toggle {
  background-color: var(--primary-soft);
  border-color: var(--primary-border);
  color: var(--primary);
}

.mobile-nav-links .menu-item-has-children.is-expanded .mobile-sub-toggle svg {
  transform: rotate(180deg);
}

/* Sub-menus: STRICTLY CLOSED BY DEFAULT */
.mobile-nav-links .sub-menu {
  display: none !important; /* CLOSED UNTIL TOUCHED */
  list-style: none;
  padding: 0.5rem 0 0.5rem 1rem;
  margin: 0.25rem 0 0.5rem;
  flex-direction: column;
  gap: 0.25rem;
  border-left: 2px solid var(--primary);
  background-color: #f8fafc;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* Sub-menus: DISPLAY WHEN EXPANDED ON TOUCH */
.mobile-nav-links .menu-item-has-children.is-expanded > .sub-menu {
  display: flex !important;
  animation: submenuFadeIn 0.2s ease;
}

@keyframes submenuFadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-nav-links .sub-menu li {
  list-style: none;
}

.mobile-nav-links .sub-menu a {
  font-size: 0.84375rem;
  color: var(--text-body);
  font-weight: 500;
  padding: 0.45rem 0.625rem;
  border-radius: var(--radius-sm);
  border-bottom: none;
}

.mobile-nav-links .sub-menu a:hover {
  background-color: #ffffff;
  color: var(--primary);
  font-weight: 600;
}

/* ==========================================================================
   4. HERO SECTION (SAAS TECH BRAND STANDARD - CLEAN LIGHT MODE)
   ========================================================================== */
.hero-wrapper {
  position: relative;
  padding: 5rem 0 4rem;
  background: radial-gradient(100% 60% at 50% 0%, #f8fafc 0%, #ffffff 100%);
  border-bottom: 1px solid var(--border-subtle);
  text-align: center;
  overflow: hidden;
}

/* Background Subtle Grid Texture (Refined SaaS Standard) */
.hero-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to right, rgba(203, 213, 225, 0.35) 1px, transparent 1px),
                    linear-gradient(to bottom, rgba(203, 213, 225, 0.35) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 65% 55% at 50% 15%, #000 35%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 65% 55% at 50% 15%, #000 35%, transparent 100%);
  pointer-events: none;
}

.hero-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.35rem 0.875rem;
  border-radius: var(--radius-full);
  background-color: #ffffff;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-micro);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-body);
  margin-bottom: 2rem;
  transition: all 0.2s ease;
}

.hero-pill:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-sm);
}

.hero-pill-badge {
  background-color: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.6875rem;
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  text-transform: uppercase;
}

.hero-heading {
  font-size: clamp(2.35rem, 4.6vw, 3.65rem);
  font-weight: 750;
  letter-spacing: -0.022em;
  line-height: 1.22;
  color: var(--text-hero);
  max-width: 920px;
  margin: 0 auto 1.5rem;
}

.hero-heading-gradient {
  background: linear-gradient(135deg, #090d16 25%, #059669 85%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(1rem, 1.6vw, 1.1875rem);
  font-weight: 400;
  color: #475569;
  max-width: 680px;
  margin: 0 auto 2.5rem;
  line-height: 1.65;
}

.hero-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3.5rem;
}

.hero-buttons .btn {
  width: auto;
}

/* Interactive SaaS UI Mockup Card (Gives the Billion-Dollar Brand Polish) */
.hero-mockup-container {
  position: relative;
  max-width: 1040px;
  margin: 0 auto;
  border-radius: var(--radius-xl);
  padding: 0.5rem;
  background: linear-gradient(180deg, rgba(226, 232, 240, 0.8) 0%, rgba(241, 245, 249, 0.4) 100%);
  box-shadow: var(--shadow-elevated), 0 0 0 1px rgba(255, 255, 255, 0.8);
}

.hero-mockup-inner {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.mockup-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background-color: #f8fafc;
  border-bottom: 1px solid var(--border-subtle);
}

.mockup-dots {
  display: flex;
  gap: 6px;
}

.mockup-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #e2e8f0;
}

.mockup-dot-red { background-color: #fca5a5; }
.mockup-dot-yellow { background-color: #fde047; }
.mockup-dot-green { background-color: #86efac; }

.mockup-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 1.5rem;
  gap: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
}

.metric-item-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.metric-item-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-hero);
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
}

.metric-item-change {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* ==========================================================================
   5. BENTO GRID PRODUCT SUITE (STRIPE / LINEAR STYLE)
   ========================================================================== */
.ecosystem-section {
  padding: 6rem 0;
  background-color: #ffffff;
}

.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3.5rem;
}

.section-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  font-family: var(--font-mono);
  margin-bottom: 0.75rem;
}

.section-h2 {
  font-size: clamp(1.85rem, 3.2vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-hero);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.section-lead {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* The Bento Grid Container */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
}

.bento-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-card);
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.bento-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-card-hover);
  box-shadow: var(--shadow-card-hover);
}

/* Bento Sizes */
.bento-span-7 { grid-column: span 7; }
.bento-span-5 { grid-column: span 5; }
.bento-span-4 { grid-column: span 4; }
.bento-span-6 { grid-column: span 6; }
.bento-span-12 { grid-column: span 12; }

/* Bento Card Elements */
.bento-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.bento-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-micro);
}

.icon-emerald { background: var(--primary-soft); color: var(--primary); border: 1px solid var(--primary-border); }
.icon-blue { background: var(--brand-blue-soft); color: var(--brand-blue); border: 1px solid #bfdbfe; }
.icon-purple { background: var(--brand-purple-soft); color: var(--brand-purple); border: 1px solid #ddd6fe; }
.icon-amber { background: var(--brand-amber-soft); color: var(--brand-amber); border: 1px solid #fde68a; }
.icon-indigo { background: var(--brand-indigo-soft); color: var(--brand-indigo); border: 1px solid var(--indigo-border); }

.bento-pill-tag {
  font-size: 0.6875rem;
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  background-color: var(--bg-muted);
  color: var(--text-muted);
}

.bento-card-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-hero);
  margin-bottom: 0.625rem;
}

.bento-card-desc {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.bento-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin-bottom: 2rem;
  font-size: 0.84375rem;
  color: var(--text-body);
}

.bento-feature-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.bento-feature-item svg {
  color: var(--primary);
  flex-shrink: 0;
}

.bento-cta-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-hero);
  letter-spacing: -0.01em;
  transition: gap 0.15s ease;
}

.bento-cta-link:hover {
  color: var(--primary);
  gap: 0.75rem;
}

/* ==========================================================================
   6. BLOG, RESEARCH & CATEGORY CARDS (HIGH-END EDITORIAL SAAS STYLE)
   ========================================================================== */
.academy-section {
  padding: 5rem 0 6rem;
  background-color: var(--bg-subtle);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

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

.editorial-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.editorial-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-card-hover);
  box-shadow: var(--shadow-card-hover);
}

.editorial-thumb-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 200px;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  overflow: hidden;
  position: relative;
  border-bottom: 1px solid var(--border-subtle);
}

.editorial-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.35s ease;
}

.editorial-card:hover .editorial-thumb-wrap img {
  transform: scale(1.04);
}

.editorial-content-box {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
}

.editorial-meta-line {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-subtle);
  margin-bottom: 0.875rem;
}

.editorial-category-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  background-color: var(--primary-soft);
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
}

.editorial-title {
  font-size: 1.1875rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.35;
  color: var(--text-hero);
  margin-bottom: 0.75rem;
}

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

.editorial-summary {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.editorial-author-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ==========================================================================
   CATEGORY & ARCHIVE VIEWPORT STYLES (STRIPE / LINEAR BLOG STANDARD)
   ========================================================================== */
.category-viewport {
  padding: 4rem 0 6rem;
  background-color: var(--bg-subtle);
  min-height: 70vh;
}

.category-hero-header {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 3.5rem;
}

.category-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.category-type-pill {
  font-size: 0.6875rem;
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  background-color: var(--primary-soft);
  padding: 0.2rem 0.625rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--primary-border);
}

.category-count-badge {
  font-size: 0.6875rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  background: #ffffff;
  padding: 0.2rem 0.625rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.category-main-title {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text-hero);
  line-height: 1.15;
  margin-bottom: 1rem;
}

.category-description-text {
  font-size: 1.0625rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 2rem;
}

/* Interactive Category Filter Pills Bar */
.category-filter-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.cat-pill-link {
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.45rem 1.125rem;
  border-radius: var(--radius-full);
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  color: var(--text-body);
  box-shadow: var(--shadow-micro);
  transition: all 0.15s ease;
}

.cat-pill-link:hover {
  border-color: var(--border-card-hover);
  color: var(--text-hero);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.cat-pill-link.is-active {
  background: var(--text-hero);
  color: #ffffff !important;
  border-color: var(--text-hero);
  box-shadow: var(--shadow-sm);
}

/* Pagination */
.saas-pagination {
  margin-top: 4rem;
  display: flex;
  justify-content: center;
}

.saas-pagination .nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
}

.saas-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.75rem;
  border-radius: var(--radius-md);
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-title);
  transition: all 0.15s ease;
}

.saas-pagination .page-numbers:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.saas-pagination .page-numbers.current {
  background: var(--text-hero);
  color: #ffffff;
  border-color: var(--text-hero);
}

/* ==========================================================================
   7. LONG-FORM ARTICLE READING EXPERIENCE (WORLD-CLASS SAAS EDITORIAL)
   Stripe Press, Linear, Substack & Bloomberg Grade
   ========================================================================== */
.post-viewport {
  padding: 3rem 0 6rem;
  background-color: var(--bg-app);
}

/* Constrained Hero Header Container */
.post-hero-wrapper {
  max-width: 820px;
  margin: 0 auto 2.5rem;
  text-align: left;
}

/* Breadcrumbs Navigation */
.post-breadcrumbs-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  font-family: var(--font-sans);
}

.post-breadcrumbs-nav a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.post-breadcrumbs-nav a:hover {
  color: var(--primary);
}

.breadcrumb-separator {
  color: #cbd5e1;
  font-weight: 400;
  user-select: none;
}

.breadcrumb-current {
  color: var(--text-hero);
  font-weight: 600;
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Category Badges & Read Time Row */
.post-meta-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin-bottom: 1.25rem;
}

.read-time-pill,
.date-badge {
  font-size: 0.8125rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

/* Single Article H1 */
.single-article-title {
  font-size: clamp(2.1rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.2;
  color: var(--text-hero);
  margin: 0.5rem 0 1.5rem;
}

/* Byline & Author Row */
.single-byline-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 2.25rem;
}

.author-info-group {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.author-avatar-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #090d16 0%, #1e293b 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  border: 2px solid #e2e8f0;
  box-shadow: var(--shadow-micro);
  flex-shrink: 0;
}

.author-name-stack {
  display: flex;
  flex-direction: column;
}

.author-name-text {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-hero);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.author-role-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

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

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-hero);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-sans);
}

.share-btn:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
  transform: translateY(-1px);
}

/* Featured Image Frame (Clamped & Framed: Never blown-out) */
.featured-image-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 400px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.08);
  margin-bottom: 3rem;
  background: var(--bg-muted);
  position: relative;
}

.featured-image-asset {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* 2-Column SaaS Reading Grid */
.single-layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 4rem;
  align-items: start;
  max-width: 1160px;
  margin: 0 auto;
}

.single-content-column {
  max-width: 760px;
  min-width: 0;
  width: 100%;
}

.single-sidebar-rail {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

/* In-Page Table of Contents Card */
.in-page-toc-box {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 2.5rem;
}

.toc-header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-hero);
  font-family: var(--font-mono);
  margin-bottom: 1rem;
}

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

.toc-list li a {
  color: var(--text-body);
  text-decoration: none;
  font-size: 0.9375rem;
  line-height: 1.45;
  transition: all 0.15s ease;
  display: inline-block;
}

.toc-list li a:hover {
  color: var(--primary);
  transform: translateX(4px);
  font-weight: 600;
}

.toc-sub-item {
  padding-left: 1.25rem;
}

.toc-sub-item a {
  font-size: 0.875rem !important;
  color: var(--text-muted) !important;
}

/* Desktop Sidebar TOC & Widgets */
.sidebar-widget-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
}

.sidebar-widget-title {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-hero);
  font-family: var(--font-mono);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-toc-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  font-size: 0.8125rem;
  padding: 0;
  margin: 0;
  max-height: 380px;
  overflow-y: auto;
}

.sidebar-toc-links a {
  color: var(--text-muted);
  text-decoration: none;
  line-height: 1.4;
  transition: color 0.15s ease;
  display: block;
}

.sidebar-toc-links a:hover {
  color: var(--primary);
}

.sidebar-toc-sub {
  padding-left: 0.875rem;
  font-size: 0.75rem;
}

.adsense-rail-box {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fafafa;
  border: 1px dashed #cbd5e1;
}

.ecosystem-promo-card {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border: 1px solid var(--border-subtle);
}

/* Article Prose Typography (Optimal Line Length & Hierarchy) */
.article-prose {
  font-size: 1.125rem;
  line-height: 1.85;
  color: #334155;
  word-break: break-word;
}

.article-prose h2 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-hero);
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.625rem;
  border-bottom: 1px solid var(--border-subtle);
  line-height: 1.3;
}

.article-prose h3 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-hero);
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
  line-height: 1.35;
}

.article-prose h4 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-hero);
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

.article-prose p {
  margin-bottom: 1.625rem;
}

.article-prose ul,
.article-prose ol {
  margin-bottom: 1.75rem;
  padding-left: 1.75rem;
}

.article-prose li {
  margin-bottom: 0.625rem;
  line-height: 1.75;
}

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

.article-prose a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
}

.article-prose a:hover {
  color: var(--primary-hover);
}

/* Clamped in-article images */
.article-prose img {
  max-width: 100%;
  max-height: 420px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  margin: 2.25rem auto;
  display: block;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.article-prose figure {
  margin: 2.5rem 0;
}

.article-prose figcaption {
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.625rem;
  font-family: var(--font-mono);
}

.article-prose blockquote {
  border-left: 3px solid var(--primary);
  background-color: var(--primary-soft);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 1.25rem 1.75rem;
  margin: 2.25rem 0;
  font-style: italic;
  color: #1e293b;
  font-size: 1.0625rem;
  line-height: 1.7;
}

.article-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 2.5rem 0;
  font-size: 0.875rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.article-prose th,
.article-prose td {
  padding: 0.875rem 1.125rem;
  border: 1px solid var(--border-subtle);
  text-align: left;
}

.article-prose th {
  background-color: var(--bg-muted);
  font-weight: 700;
  color: var(--text-hero);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.article-prose tr:nth-child(even) {
  background-color: #fafbfc;
}

/* Author Box (E-E-A-T Compliant) */
.eeat-author-card {
  background-color: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 4rem 0 3rem;
  display: flex;
  gap: 1.5rem;
  align-items: center;
  box-shadow: var(--shadow-card);
}

.eeat-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #090d16 0%, #1e293b 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.25rem;
  flex-shrink: 0;
}

/* Post Navigation (Next / Prev) */
.post-navigation-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  margin-top: 3.5rem;
}

.post-navigation-row a {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-hero);
  text-decoration: none;
  transition: color 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.post-navigation-row a:hover {
  color: var(--primary);
}

/* ==========================================================================
   8. SMART ADSENSE CONTAINERS (ZERO LAYOUT SHIFT)
   ========================================================================== */
.adsense-placement {
  margin: 2.5rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.adsense-tagline {
  font-size: 0.625rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
  margin-bottom: 0.35rem;
}

.adsense-unit {
  width: 100%;
  overflow: hidden;
  display: flex;
  justify-content: center;
}

.adsense-in-article {
  min-height: 250px;
  background-color: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 0.5rem;
}

/* ==========================================================================
   9. INSTITUTIONAL FOOTER & COMPLIANCE
   ========================================================================== */
.site-footer {
  background-color: #ffffff;
  border-top: 1px solid var(--border-subtle);
  padding: 5rem 0 2.5rem;
  margin-top: auto;
}

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

.footer-brand-summary p {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.65;
  margin-top: 1rem;
  max-width: 320px;
}

.footer-group-title {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-hero);
  margin-bottom: 1.25rem;
  font-family: var(--font-mono);
}

.footer-links-list {
  list-style: none;
  font-size: 0.875rem;
}

.footer-links-list li {
  margin-bottom: 0.75rem;
}

.footer-links-list a {
  color: var(--text-muted);
}

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

/* CFTC Legal Risk Banner */
.cftc-risk-banner {
  background-color: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 2rem;
}

.cftc-risk-banner strong {
  color: var(--text-hero);
}

.footer-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8125rem;
  color: var(--text-subtle);
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--primary);
}

/* ==========================================================================
   10. FLAWLESS MOBILE & TABLET RESPONSIVENESS
   ========================================================================== */
@media (max-width: 1024px) {
  .nav-menu-list {
    gap: 1.125rem;
  }
  .nav-actions .btn-secondary {
    display: none;
  }
  .bento-span-7, .bento-span-5, .bento-span-4 {
    grid-column: span 6;
  }
  .editorial-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-nav-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
  .single-layout-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .single-sidebar-rail {
    position: static;
  }
  .featured-image-frame {
    max-height: 320px;
  }
}

@media (max-width: 880px) {
  .nav-menu-desktop, .nav-actions {
    display: none;
  }
  .mobile-toggle {
    display: block;
  }
  .bento-grid {
    grid-template-columns: 1fr;
  }
  .bento-span-7, .bento-span-5, .bento-span-4, .bento-span-6, .bento-span-12 {
    grid-column: span 1;
  }
  .editorial-grid {
    grid-template-columns: 1fr;
  }
  .mockup-metric-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 1rem;
  }
  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }
  .hero-buttons .btn {
    width: 100%;
  }
  .footer-nav-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-bottom-bar {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  /* Mobile Single Post & Editorial Fixes */
  .post-viewport {
    padding: 2rem 0 4rem;
  }
  .featured-image-frame {
    max-height: 220px;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
  }
  .single-article-title {
    font-size: 1.85rem;
    line-height: 1.25;
  }
  .single-byline-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .social-share-group {
    width: 100%;
  }
  .social-share-group .share-btn {
    width: 100%;
    justify-content: center;
  }
  .article-prose {
    font-size: 1.0625rem;
    line-height: 1.75;
  }
  .article-prose h2 {
    font-size: 1.45rem;
    margin-top: 2.25rem;
  }
  .article-prose h3 {
    font-size: 1.2rem;
  }
  .article-prose img {
    max-height: 280px;
    margin: 1.5rem auto;
  }
  .eeat-author-card {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
  }

  /* Mobile Category Fixes */
  .category-viewport {
    padding: 2.5rem 0 4rem;
  }
  .category-hero-header {
    margin-bottom: 2rem;
  }
  .category-main-title {
    font-size: 2rem;
  }
  .category-description-text {
    font-size: 0.9375rem;
  }
  .category-filter-nav {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.75rem;
    -webkit-overflow-scrolling: touch;
  }
  .cat-pill-link {
    white-space: nowrap;
    flex-shrink: 0;
  }
}
