/* MarginPulse — High-Craft Editorial Financial Studio UI */
:root {
  --bg-primary: #f8fafc;
  --bg-elevated: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-dark-card: #0f172a;
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --accent: #059669;
  --accent-hover: #047857;
  --accent-soft: rgba(5, 150, 105, 0.1);
  --brand-blue: #2563eb;
  --brand-blue-soft: rgba(37, 99, 235, 0.1);
  --danger: #e11d48;
  --warning: #d97706;
  --border-subtle: #e2e8f0;
  --border-focus: #059669;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 10px 30px -5px rgba(15, 23, 42, 0.07), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 40px -12px rgba(15, 23, 42, 0.12);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Space Grotesk', 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

[data-theme="dark"] {
  --bg-primary: #0b0f19;
  --bg-elevated: #111827;
  --bg-subtle: #1e293b;
  --bg-dark-card: #060911;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --accent: #10b981;
  --accent-hover: #059669;
  --accent-soft: rgba(16, 185, 129, 0.14);
  --brand-blue: #3b82f6;
  --brand-blue-soft: rgba(59, 130, 246, 0.15);
  --border-subtle: #1e293b;
  --shadow-md: 0 10px 30px -5px rgba(0, 0, 0, 0.45);
}

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

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background-color 150ms cubic-bezier(0.22, 1, 0.36, 1), color 150ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* Typography & Numeric Discipline */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.22;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

.tabular-nums, .metric-value, input[type="number"] {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

a {
  color: var(--brand-blue);
  text-decoration: none;
  transition: color 150ms cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Container & Grid */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Top Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
}

[data-theme="dark"] .site-header {
  background: rgba(17, 24, 39, 0.88);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 1rem;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
}

.brand-badge {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--brand-blue) 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius-sm);
}

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

.theme-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: transform 150ms cubic-bezier(0.22, 1, 0.36, 1), background 150ms;
}

.theme-btn:active {
  transform: scale(0.97);
}

/* Hero Section */
.hero {
  padding: 3.25rem 0 2.25rem;
  background: radial-gradient(circle at 80% 10%, var(--accent-soft), transparent 45%),
              radial-gradient(circle at 15% 40%, var(--brand-blue-soft), transparent 40%);
  border-bottom: 1px solid var(--border-subtle);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(1.9rem, 3.8vw, 2.85rem);
  margin-bottom: 0.85rem;
  max-width: 820px;
}

.hero p.lead {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 740px;
}

/* Main Layout with Sidebar */
.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 2.25rem;
  padding: 2.25rem 0 4rem;
  align-items: start;
}

@media (max-width: 980px) {
  .page-layout {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none;
  }
}

/* Interactive Calculator Studio Card */
.calc-studio {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  margin-bottom: 2.5rem;
}

.calc-header {
  padding: 1.35rem 1.75rem;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.calc-header h2 {
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.calc-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-action {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 150ms cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-action:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-action:active {
  transform: scale(0.97);
}

.calc-body {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1.75rem;
  padding: 1.75rem;
}

@media (max-width: 768px) {
  .calc-body {
    grid-template-columns: 1fr;
    padding: 1.25rem;
  }
}

.input-group {
  margin-bottom: 1.15rem;
}

.input-group label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.input-hint {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 400;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-prefix, .input-suffix {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  pointer-events: none;
}

.input-prefix {
  left: 0.85rem;
}

.input-suffix {
  right: 0.85rem;
}

.calc-input, .calc-select {
  width: 100%;
  padding: 0.72rem 0.9rem;
  font-size: 0.98rem;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: border-color 150ms, box-shadow 150ms;
}

.calc-input.has-prefix {
  padding-left: 2rem;
}

.calc-input.has-suffix {
  padding-right: 2.3rem;
}

.calc-input:focus, .calc-select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* Results Panel */
.results-panel {
  background: var(--bg-dark-card);
  color: #f8fafc;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.primary-metric-box {
  padding-bottom: 1.15rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 1.15rem;
}

.primary-metric-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #94a3b8;
  font-weight: 600;
}

.primary-metric-value {
  font-family: var(--font-mono);
  font-size: 2.35rem;
  font-weight: 800;
  color: #34d399;
  margin-top: 0.2rem;
  font-variant-numeric: tabular-nums;
}

.primary-metric-value.negative {
  color: #fb7185;
}

.metric-subrow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  font-size: 0.9rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.metric-subrow:last-of-type {
  border-bottom: none;
}

.metric-subrow span.label {
  color: #cbd5e1;
}

.metric-subrow span.val {
  font-family: var(--font-mono);
  font-weight: 600;
  color: #f8fafc;
}

/* Stacked Distribution Bar */
.split-bar-wrap {
  margin-top: 1.25rem;
}

.split-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #94a3b8;
  margin-bottom: 0.4rem;
}

.split-bar {
  height: 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
  display: flex;
}

.split-seg-profit {
  background: #10b981;
  height: 100%;
  transition: width 200ms ease;
}

.split-seg-fees {
  background: #f59e0b;
  height: 100%;
  transition: width 200ms ease;
}

.split-seg-costs {
  background: #6366f1;
  height: 100%;
  transition: width 200ms ease;
}

.reverse-goal-box {
  margin-top: 1.25rem;
  padding: 0.9rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.84rem;
  color: #e2e8f0;
}

.reverse-goal-box strong {
  color: #38bdf8;
  font-family: var(--font-mono);
}

/* Editorial Content & SEO Article Styling */
.editorial-article {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: var(--shadow-sm);
}

@media (max-width: 640px) {
  .editorial-article {
    padding: 1.35rem;
  }
}

.editorial-article h2 {
  font-size: 1.55rem;
  margin: 2rem 0 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-subtle);
}

.editorial-article h2:first-child {
  margin-top: 0;
}

.editorial-article h3 {
  font-size: 1.2rem;
  margin: 1.5rem 0 0.6rem;
}

.editorial-article p {
  margin-bottom: 1.1rem;
  color: var(--text-secondary);
}

.editorial-article ul, .editorial-article ol {
  margin: 0 0 1.25rem 1.35rem;
  color: var(--text-secondary);
}

.editorial-article li {
  margin-bottom: 0.5rem;
}

.formula-callout {
  background: var(--bg-subtle);
  border-left: 4px solid var(--accent);
  padding: 1.1rem 1.25rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.35rem 0;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-primary);
}

/* Data Tables */
.table-responsive {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

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

.data-table th {
  background: var(--bg-subtle);
  color: var(--text-primary);
  font-weight: 700;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.data-table td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

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

/* FAQ Accordion */
.faq-list {
  margin-top: 1.25rem;
}

.faq-item {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  background: var(--bg-primary);
  overflow: hidden;
}

.faq-item summary {
  padding: 1rem 1.15rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--text-primary);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::after {
  content: '+';
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--accent);
}

.faq-item[open] summary::after {
  content: '−';
}

.faq-item .faq-answer {
  padding: 0 1.15rem 1.1rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Cards Grid for Homepage */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.35rem;
  margin: 1.5rem 0 2.5rem;
}

.tool-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: transform 150ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 150ms, border-color 150ms;
}

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

.tool-tag {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 0.75rem;
  width: fit-content;
}

.tool-card h3 {
  font-size: 1.18rem;
  margin-bottom: 0.5rem;
}

.tool-card p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-bottom: 1.15rem;
}

.tool-card-link {
  position: relative;
  font-weight: 700;
  font-size: 0.9rem;
  color: #ffffff;
  background: linear-gradient(135deg, var(--c1, var(--accent)), var(--c2, var(--brand-blue)));
  padding: 0.68rem 1.1rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.45), 0 6px 16px -3px rgba(15, 23, 42, 0.22);
  animation: ctaHalo 2.4s infinite cubic-bezier(0.4, 0, 0.6, 1);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
  text-decoration: none !important;
  cursor: pointer;
}

.tool-card-link span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  font-size: 1rem;
  transition: transform 200ms ease, background 200ms ease;
}

.tool-card {
  cursor: pointer;
}

.tool-card:hover .tool-card-link {
  transform: translateY(-2px) scale(1.015);
  filter: brightness(1.08);
  box-shadow: 0 0 0 5px rgba(16, 185, 129, 0.22), 0 12px 24px -4px rgba(15, 23, 42, 0.3);
}

.tool-card:hover .tool-card-link span {
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.34);
}

@keyframes ctaHalo {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.38), 0 6px 16px -3px rgba(15, 23, 42, 0.2);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0), 0 8px 20px -3px rgba(16, 185, 129, 0.32);
  }
}

/* Sidebar Widgets */
.sidebar {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  box-shadow: var(--shadow-sm);
}

.sidebar-card h3 {
  font-size: 1.02rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-list {
  list-style: none;
}

.sidebar-list li {
  margin-bottom: 0.6rem;
}

.sidebar-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.45rem 0.6rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

.sidebar-list a:hover {
  background: var(--bg-subtle);
  color: var(--accent);
}

/* CLS-Safe AdSense Containers (Hidden cleanly until enabled or styled transparently) */
.ad-slot {
  width: 100%;
  min-height: 90px;
  margin: 1.5rem 0;
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ad-slot[data-ad-mode="review-clean"] {
  display: none;
}

/* Footer */
.site-footer {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 0 2rem;
  margin-top: 3rem;
}

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

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

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

.footer-col h4 {
  font-size: 0.95rem;
  margin-bottom: 0.85rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.5rem;
}

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

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

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* GDPR / AdSense Cookie Consent Banner */
.cookie-banner {
  position: fixed;
  bottom: 1.25rem;
  left: 1.25rem;
  right: 1.25rem;
  max-width: 640px;
  margin: 0 auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.35rem;
  box-shadow: var(--shadow-lg);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cookie-banner.visible {
  display: flex;
}

@media (max-width: 600px) {
  .cookie-banner {
    flex-direction: column;
    align-items: stretch;
  }
}

.cookie-text {
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.cookie-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

/* === Vibrant Motion, Gradient Cards & SVG Icon Enhancements === */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3.5px;
  background: linear-gradient(90deg, #10b981, #3b82f6, #8b5cf6, #ec4899);
  transform-origin: 0 50%;
  transform: scaleX(0);
  z-index: 999;
  transition: transform 80ms linear;
}

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 15%, rgba(16, 185, 129, 0.18), transparent 42%),
    radial-gradient(circle at 12% 35%, rgba(59, 130, 246, 0.16), transparent 42%),
    radial-gradient(circle at 55% 85%, rgba(139, 92, 246, 0.12), transparent 45%);
}

.grad-text {
  background: linear-gradient(135deg, #059669 0%, #2563eb 55%, #7c3aed 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

[data-theme="dark"] .grad-text {
  background: linear-gradient(135deg, #34d399 0%, #60a5fa 55%, #c084fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-floaters {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-floaters .floater {
  position: absolute;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
  animation: floatBob 6s ease-in-out infinite;
}

[data-theme="dark"] .hero-floaters .floater {
  background: rgba(30, 41, 59, 0.55);
  border-color: rgba(255, 255, 255, 0.08);
}

.hero-floaters .floater svg {
  width: 24px;
  height: 24px;
}

.hero-floaters .floater:nth-child(1) { top: 14%; right: 6%; color: #ff0050; animation-delay: 0s; }
.hero-floaters .floater:nth-child(2) { top: 52%; right: 15%; color: #0070e0; animation-delay: -1.2s; }
.hero-floaters .floater:nth-child(3) { top: 20%; right: 20%; color: #635bff; animation-delay: -2.4s; }
.hero-floaters .floater:nth-child(4) { bottom: 14%; right: 5%; color: #5e8e3e; animation-delay: -3.6s; }
.hero-floaters .floater:nth-child(5) { top: 44%; right: 27%; color: #f1641e; animation-delay: -4.5s; }
.hero-floaters .floater:nth-child(6) { bottom: 16%; right: 24%; color: #14a800; animation-delay: -5.2s; }

.nav-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
}

.nav-ico {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  flex-shrink: 0;
}

.nav-ico svg {
  width: 14px;
  height: 14px;
}

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

.brand-logo-img.brand-shopify {
  object-fit: contain;
  padding: 13%;
  background: #ffffff;
}

.brand-logo-img.brand-stripe {
  background: #635bff;
}

.icon-pair {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.vs-pill {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--text-muted);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  padding: 0.15rem 0.38rem;
  border-radius: 6px;
}

@media (max-width: 900px) {
  .hero-floaters { display: none; }
}

@keyframes floatBob {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(4deg); }
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.5rem;
}

.stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  font-size: 0.86rem;
  color: var(--text-secondary);
  transition: transform 200ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 200ms;
}

.stat-chip:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-chip strong {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--text-primary);
}

.chip-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--chip, var(--accent));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.chip-icon svg {
  width: 15px;
  height: 15px;
}

/* Vibrant Brand Icon Tiles */
.icon-tile {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--c1, #059669), var(--c2, #2563eb));
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 8px 18px -4px rgba(15, 23, 42, 0.16);
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.icon-tile:has(img) {
  background: #ffffff;
}

.icon-tile svg {
  width: 22px;
  height: 22px;
}

.icon-tile.md {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.icon-tile.md svg {
  width: 18px;
  height: 18px;
}

.icon-tile.sm {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  box-shadow: none;
}

.icon-tile.sm svg {
  width: 15px;
  height: 15px;
}

/* Enhanced Tool Cards */
.tool-card {
  position: relative;
  overflow: hidden;
  border-top: 3px solid var(--c1, var(--accent));
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 220ms, border-color 220ms;
}

.tool-card::after {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--c1, var(--accent)) 0%, transparent 70%);
  opacity: 0.08;
  pointer-events: none;
  transition: opacity 220ms, transform 220ms;
}

.tool-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 36px -10px rgba(15, 23, 42, 0.14);
}

.tool-card:hover::after {
  opacity: 0.18;
  transform: scale(1.15);
}

.tool-card:hover .icon-tile {
  transform: scale(1.08) rotate(-4deg);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.card-top .tool-tag {
  margin-bottom: 0;
}

.calc-studio {
  border-top: 4px solid var(--c1, var(--accent));
}

.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.14);
  color: #10b981;
  margin-left: 0.35rem;
}

.live-dot::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  animation: pulseDot 1.6s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.45); opacity: 0.45; }
}

.primary-metric-value.pop {
  animation: metricPop 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes metricPop {
  0% { transform: scale(0.96); }
  50% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

.sidebar-list a {
  gap: 0.65rem;
}

.sidebar-list a span:nth-child(2) {
  flex: 1;
}

.sidebar-list a.current {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.sidebar-list a .arrow {
  transition: transform 160ms ease;
}

.sidebar-list a:hover .arrow {
  transform: translateX(4px);
}

/* Scroll Reveal */
.reveal-init {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 420ms cubic-bezier(0.22, 1, 0.36, 1), transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-init.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Back to Top Floating Button */
.back-to-top {
  position: fixed;
  right: 1.35rem;
  bottom: 1.35rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--brand-blue));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(5, 150, 105, 0.32);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 200ms, transform 200ms;
  z-index: 150;
}

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

.back-to-top svg {
  width: 20px;
  height: 20px;
}

@media print {
  .site-header, .hero-floaters, .calc-actions, .ad-slot, .sidebar, .site-footer, .cookie-banner, .back-to-top, #scroll-progress {
    display: none !important;
  }
  body {
    background: #ffffff !important;
    color: #0f172a !important;
  }
  .page-layout {
    grid-template-columns: 1fr !important;
    padding: 0.5rem !important;
  }
  .calc-studio {
    box-shadow: none !important;
    border: 1px solid #cbd5e1 !important;
    break-inside: avoid;
  }
}
