/* ==========================================================================
   TOPSTORIESWEBSITES.COM - MASTER DESIGN SYSTEM & STYLESHEET
   Aesthetics: Clean Institutional Light Mode, High Contrast, Sky Cyan & Emerald Accents
   Typography: Outfit (Headings) + Plus Jakarta Sans (Body)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Color Palette - Premium Light Theme */
  --bg-dark: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-elevated: #ffffff;
  --bg-surface: #f1f5f9;
  
  --border-subtle: #e2e8f0;
  --border-glow: rgba(2, 132, 199, 0.3);
  --border-emerald: rgba(5, 150, 105, 0.3);
  
  --primary-cyan: #0284c7;
  --primary-cyan-glow: rgba(2, 132, 199, 0.1);
  --primary-indigo: #4f46e5;
  --accent-emerald: #059669;
  --accent-emerald-glow: rgba(5, 150, 105, 0.1);
  --accent-amber: #d97706;
  --accent-purple: #7c3aed;
  
  --text-main: #0f172a;
  --text-muted: #334155;
  --text-dim: #64748b;
  
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-card: 0 4px 20px -2px rgba(15, 23, 42, 0.06), 0 0 1px 1px #e2e8f0;
  --shadow-glow: 0 10px 30px -5px rgba(2, 132, 199, 0.15);
  --shadow-emerald: 0 10px 30px -5px rgba(5, 150, 105, 0.15);
  
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  color-scheme: light;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.04) 0%, transparent 45%),
    radial-gradient(circle at 85% 30%, rgba(2, 132, 199, 0.04) 0%, transparent 45%),
    radial-gradient(circle at 50% 80%, rgba(5, 150, 105, 0.03) 0%, transparent 50%);
  background-attachment: fixed;
  min-height: 100vh;
}

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

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

button, input, select {
  font-family: inherit;
  color: inherit;
  outline: none;
}

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

.gradient-text {
  background: linear-gradient(135deg, #0f172a 20%, #0284c7 85%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-text-emerald {
  background: linear-gradient(135deg, #0f172a 20%, #059669 85%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-text-gold {
  background: linear-gradient(135deg, #0f172a 20%, #d97706 85%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

/* ==========================================================================
   Dual Header Architecture: Header 1 (Primary) & Header 2 (Sub-header)
   ========================================================================== */
.header-wrapper {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
  transition: var(--transition);
}

/* Header 1: Primary Brand, Core Navigation, Action CTA */
.header-top {
  border-bottom: 1px solid #f1f5f9;
  background: #ffffff;
}

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

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

.header-top .nav-link {
  font-size: 0.925rem;
  font-weight: 600;
  color: #334155;
  padding: 6px 0;
  position: relative;
  text-decoration: none;
  transition: var(--transition);
}

.header-top .nav-link:hover {
  color: var(--primary-cyan);
}

.header-top .nav-link.active {
  color: var(--primary-cyan);
  font-weight: 700;
}

.header-top .nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary-cyan);
  border-radius: 2px;
}

/* Header 2: Channel Sub-navigation & Live Verification Status */
.header-bottom {
  background: #f8fafc;
  border-top: 1px solid rgba(226, 232, 240, 0.6);
}

.header-subnav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  overflow-x: auto;
  gap: 16px;
  scrollbar-width: none;
}

.header-subnav-container::-webkit-scrollbar {
  display: none;
}

.subnav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  white-space: nowrap;
}

.subnav-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  background: transparent;
  text-decoration: none;
  border: 1px solid transparent;
}

.subnav-link:hover {
  color: var(--primary-cyan);
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.subnav-link.active {
  color: var(--primary-cyan);
  background: rgba(2, 132, 199, 0.08);
  border-color: rgba(2, 132, 199, 0.25);
  font-weight: 700;
}

.subnav-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-emerald);
  white-space: nowrap;
}

.subnav-status .pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.6);
  animation: pulseEmerald 2s infinite;
}

@keyframes pulseEmerald {
  0% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.6); }
  70% { box-shadow: 0 0 0 6px rgba(5, 150, 105, 0); }
  100% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); }
}

/* Header & Navigation */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
}

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

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #0284c7, #4f46e5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 900;
  font-size: 1.2rem;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}

.nav-brand .brand-tld {
  color: var(--primary-cyan);
}

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

.nav-link {
  font-size: 0.925rem;
  font-weight: 600;
  color: var(--text-dim);
  position: relative;
  padding: 6px 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary-cyan);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary-cyan);
  box-shadow: 0 0 6px var(--primary-cyan);
  border-radius: 2px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Button Component */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.925rem;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(2, 132, 199, 0.45);
  background: linear-gradient(135deg, #0369a1, #0284c7);
}

.btn-secondary {
  background: #ffffff;
  color: var(--text-main);
  border: 1px solid #cbd5e1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  transform: translateY(-2px);
  color: #0f172a;
}

.btn-emerald {
  background: linear-gradient(135deg, #059669, #047857);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.3);
}

.btn-emerald:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(5, 150, 105, 0.45);
}

.btn-sm {
  padding: 7px 16px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1.05rem;
}

/* Badges & Status */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.775rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-cyan {
  background: rgba(2, 132, 199, 0.08);
  color: #0284c7;
  border: 1px solid rgba(2, 132, 199, 0.25);
}

.badge-emerald {
  background: rgba(5, 150, 105, 0.08);
  color: #059669;
  border: 1px solid rgba(5, 150, 105, 0.25);
}

.badge-amber {
  background: rgba(217, 119, 6, 0.08);
  color: #b45309;
  border: 1px solid rgba(217, 119, 6, 0.25);
}

.badge-purple {
  background: rgba(124, 58, 237, 0.08);
  color: #7c3aed;
  border: 1px solid rgba(124, 58, 237, 0.25);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.5); }
  70% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 0 8px rgba(5, 150, 105, 0); }
  100% { transform: scale(0.95); opacity: 0.8; box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); }
}

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

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  padding: 6px 18px;
  border-radius: var(--radius-full);
  margin-bottom: 24px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.hero-title {
  font-size: clamp(2.5rem, 5.5vw, 4.25rem);
  font-weight: 800;
  max-width: 980px;
  margin: 0 auto 24px;
  line-height: 1.12;
  color: #0f172a;
}

.hero-description {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 780px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 50px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.08);
}

.stat-item {
  text-align: center;
  padding: 10px;
  border-right: 1px solid var(--border-subtle);
}

.stat-item:last-child {
  border-right: none;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-weight: 600;
}

/* Category Filter Bar */
.filter-section {
  padding: 30px 0 20px;
  position: sticky;
  top: 112px;
  z-index: 90;
  background: rgba(248, 250, 252, 0.95);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}

.filter-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.filter-tab {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  color: var(--text-dim);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.filter-tab:hover {
  color: var(--text-main);
  border-color: #cbd5e1;
  background: #f1f5f9;
}

.filter-tab.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.3);
}

.search-box {
  position: relative;
  min-width: 280px;
}

.search-input {
  width: 100%;
  padding: 10px 16px 10px 42px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-full);
  color: var(--text-main);
  font-size: 0.875rem;
  transition: var(--transition);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.search-input:focus {
  border-color: var(--primary-cyan);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
}

/* Listings Grid */
.marketplace-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(370px, 1fr));
  gap: 24px;
  padding: 40px 0 80px;
}

/* Listing Card */
.listing-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.listing-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #0284c7, #4f46e5);
  opacity: 0;
  transition: var(--transition);
}

.listing-card:hover {
  transform: translateY(-4px);
  border-color: rgba(2, 132, 199, 0.35);
  box-shadow: 0 16px 32px -8px rgba(15, 23, 42, 0.12), 0 0 1px 1px #cbd5e1;
}

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

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
  margin-bottom: 6px;
}

.card-domain {
  font-family: var(--font-mono);
  font-size: 0.825rem;
  color: var(--primary-cyan);
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.card-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 14px;
  background: #f8fafc;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  margin-bottom: 20px;
}

.metric-block {
  text-align: center;
}

.metric-title {
  font-size: 0.725rem;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 2px;
}

.metric-val {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.metric-val.green {
  color: var(--accent-emerald);
}

.card-features {
  list-style: none;
  margin-bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.card-feature svg {
  color: var(--accent-emerald);
  flex-shrink: 0;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
  margin-top: auto;
}

.card-price-block {
  display: flex;
  flex-direction: column;
}

.card-price-label {
  font-size: 0.725rem;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 700;
}

.card-price {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
}

/* Verification Engine Simulator Section */
.audit-tool-section {
  padding: 80px 0;
  background: #ffffff;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.tool-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.08);
  max-width: 900px;
  margin: 0 auto;
}

.tool-input-row {
  display: flex;
  gap: 12px;
  margin: 24px 0;
  flex-wrap: wrap;
}

.tool-input {
  flex: 1;
  min-width: 260px;
  padding: 14px 20px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-full);
  color: var(--text-main);
  font-size: 1rem;
}

.tool-input:focus {
  border-color: var(--primary-cyan);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.audit-terminal {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: var(--radius-md);
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: #38bdf8;
  min-height: 180px;
  display: none;
  line-height: 1.7;
}

.audit-terminal.active {
  display: block;
}

.audit-check-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.audit-check-line.pass {
  color: #34d399;
}

.audit-check-line.warn {
  color: #fbbf24;
}

/* Valuation Calculator Section */
.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 32px;
}

.calc-inputs {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.calc-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calc-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

.calc-range {
  width: 100%;
  accent-color: var(--primary-cyan);
  cursor: pointer;
}

.calc-select, .calc-text-input {
  padding: 12px 16px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.95rem;
}

.calc-select:focus, .calc-text-input:focus {
  border-color: var(--primary-cyan);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.calc-result-box {
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  border: 1px solid rgba(2, 132, 199, 0.3);
  border-radius: var(--radius-md);
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  box-shadow: 0 10px 30px -10px rgba(2, 132, 199, 0.2);
}

.calc-val-number {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 900;
  color: var(--primary-cyan);
  margin: 12px 0 6px;
}

/* Comparison Table */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  margin: 36px 0;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

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

.comparison-table th {
  background: #f1f5f9;
  padding: 16px 20px;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--text-main);
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.comparison-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.comparison-table tr:hover td {
  background: #f8fafc;
  color: var(--text-main);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.data-table th {
  background: #f1f5f9;
  padding: 14px 18px;
  font-weight: 700;
  color: #0f172a;
  border-bottom: 1px solid var(--border-subtle);
}

.data-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  color: #334155;
}

.data-table tr:hover td {
  background: #f8fafc;
}

/* FAQ Accordion */
.faq-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-width: 860px;
  margin: 36px auto 0;
}

.faq-item {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.faq-item:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.faq-trigger {
  width: 100%;
  padding: 20px 24px;
  text-align: left;
  background: transparent;
  border: none;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.faq-trigger svg {
  transition: transform 0.3s ease;
  color: var(--primary-cyan);
}

.faq-item.active .faq-trigger svg {
  transform: rotate(180deg);
}

.faq-content {
  padding: 0 24px 20px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  display: none;
}

.faq-item.active .faq-content {
  display: block;
}

/* Modal System */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

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

.modal-box {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-lg);
  padding: 36px;
  width: 100%;
  max-width: 560px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
  transform: scale(0.95);
  transition: transform 0.25s ease;
  position: relative;
}

.modal-overlay.open .modal-box {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text-main);
}

/* Footer - Dark Navy Institutional Anchor for Contrast */
.footer {
  background: #0f172a;
  border-top: 1px solid #1e293b;
  padding: 70px 0 30px;
  margin-top: 112px;
  color: #94a3b8;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1.2fr 1.2fr;
  gap: 32px;
  margin-bottom: 50px;
}

.footer-brand p {
  color: #94a3b8;
  font-size: 0.9rem;
  margin: 16px 0 24px;
  max-width: 320px;
  line-height: 1.6;
}

.footer .nav-brand {
  color: #ffffff;
}

.footer-col-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 20px;
}

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

.footer-links a {
  color: #94a3b8;
  font-size: 0.875rem;
}

.footer-links a:hover {
  color: #38bdf8;
  padding-left: 4px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #64748b;
  font-size: 0.825rem;
  flex-wrap: wrap;
  gap: 16px;
}

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #ffffff;
  border: 1px solid var(--border-emerald);
  box-shadow: 0 10px 25px -5px rgba(5, 150, 105, 0.25);
  padding: 14px 22px;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 2000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* General Layout & Card Helpers for Light Theme */
.card, article, section > div[style*="background: var(--bg-card)"], section > div[style*="background: var(--bg-elevated)"] {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04) !important;
}

/* Override inline dark backgrounds in articles & sections for clean light styling */
div[style*="rgba(15, 23, 42"], div[style*="rgba(7, 9, 14"] {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

div[style*="background: rgba(7, 9, 14, 0.9)"], div[style*="background: rgba(7, 9, 14, 0.95)"] {
  background: #0f172a !important; /* Keep code terminal and pre blocks beautifully dark for contrast */
}

input, select, textarea {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

input::placeholder, textarea::placeholder {
  color: #94a3b8 !important;
}

/* Responsive Media Queries */
#mobileMenuToggle {
  display: none;
}

.filter-tabs {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.filter-tabs::-webkit-scrollbar {
  display: none;
}

.table-wrapper {
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 1024px) {
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat-item:nth-child(2) {
    border-right: none;
  }
  .calc-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }

  .nav-container {
    height: 70px;
  }

  #mobileMenuToggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    min-width: 40px;
    font-size: 1.25rem;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #0f172a;
  }

  .nav-actions .btn:not(#mobileMenuToggle) {
    display: none;
  }

  .nav-links {
    display: none;
  }

  .nav-links.mobile-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 112px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 30px 24px;
    gap: 18px;
    z-index: 999;
    overflow-y: auto;
    border-top: 1px solid var(--border-subtle);
    animation: fadeIn 0.2s ease-out forwards;
  }

  .nav-link {
    font-size: 1.15rem;
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
    color: #0f172a;
  }

  .hero {
    padding: 40px 0 30px;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .hero-description {
    font-size: 1rem;
    margin-bottom: 24px;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }

  .hero-actions .btn {
    width: 100%;
    padding: 14px 20px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
    padding: 16px;
    gap: 12px;
  }

  .stat-item {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
    padding: 10px 0;
  }

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

  .stat-number {
    font-size: 1.8rem;
  }

  .filter-section {
    top: 112px;
    padding: 16px 0;
  }

  .filter-wrapper {
    flex-direction: column;
    align-items: stretch;
  }

  .search-box {
    width: 100%;
    min-width: unset;
  }

  .marketplace-grid {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 24px 0 60px;
  }

  .card-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .card-footer .btn {
    width: 100%;
  }

  .tool-card {
    padding: 24px 16px;
  }

  .tool-input-row {
    flex-direction: column;
  }

  .tool-input {
    width: 100%;
  }

  .tool-input-row .btn {
    width: 100%;
  }

  .calc-result-box {
    padding: 24px 16px;
  }

  .calc-val-number {
    font-size: 2.3rem;
  }

  .footer {
    padding: 50px 0 24px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .modal-box {
    padding: 24px 18px;
    max-height: 90vh;
    overflow-y: auto;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.85rem;
  }

  .card-metrics {
    gap: 6px;
    padding: 10px;
  }

  .metric-val {
    font-size: 0.95rem;
  }

  .metric-title {
    font-size: 0.65rem;
  }

  .card-price {
    font-size: 1.4rem;
  }
}

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