@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* === Reset === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --hero-gradient: linear-gradient(120deg, #b68eff, #7a7df8);
  --calc-submenu-gradient: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(231, 245, 255, 0.95), rgba(245, 235, 255, 0.92));
}

html, body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(to bottom right, #fafaff, #f5f6fb);
  color: #1a1a1a;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

/* Prevent horizontal scroll on mobile only */
@media (max-width: 768px) {
  html, body {
    overflow-x: clip;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 90%;
  }

  header {
    padding: 0.75rem 1rem;
    position: sticky !important;
    top: 0 !important;
    z-index: 100 !important;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }

  header h1 {
    font-size: 1rem;
    margin-bottom: 0;
    text-align: left;
    flex: 1;
  }

  header .header-full {
    display: none;
  }

  header .header-short {
    display: inline;
  }

  header p {
    display: none;
  }
}

@media (max-width: 640px) {
  html {
    font-size: 87%;
  }

  header h1 {
    font-size: 0.95rem;
  }
}

input[type='number'] {
  -moz-appearance: textfield;
  appearance: textfield;
}

input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* === Header === */
header {
  background: linear-gradient(120deg, #b68eff, #7a7df8, #65bff8, #8d7ee8, #b68eff);
  background-size: 300% 300%;
  animation: gradientShift 8s ease infinite;
  padding: 3.5rem 2rem;
  text-align: center;
  color: white;
}

header .header-short {
  display: none;
}

header .header-full {
  display: inline;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

header h1 {
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

header p {
  font-size: 1.1rem;
  opacity: 0.9;
}

.nav-toggle {
  display: none;
  margin: 0.9rem 0 0.85rem 1rem;
  background: linear-gradient(135deg, #f8f7ff, #e7f2ff);
  border: 1px solid rgba(91, 78, 229, 0.45);
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  cursor: pointer;
  box-shadow: 0 18px 38px rgba(91, 78, 229, 0.22);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #4b3fb6;
}

.nav-toggle:focus-visible {
  outline: 2px solid #7a5af8;
  outline-offset: 3px;
}

.nav-toggle .bar,
.nav-toggle .bar::before,
.nav-toggle .bar::after {
  display: block;
  width: 22px;
  height: 3px;
  background: #1f2937;
  border-radius: 999px;
  transition: transform 0.2s ease, width 0.2s ease;
}

.nav-toggle .bar {
  position: relative;
  box-shadow: 0 0 6px rgba(99, 102, 241, 0.35);
}

.nav-toggle .bar::before,
.nav-toggle .bar::after {
  content: "";
  position: absolute;
  left: 0;
  box-shadow: 0 0 4px rgba(99, 102, 241, 0.3);
}

.nav-toggle .bar::before {
  top: -8px;
}

.nav-toggle .bar::after {
  top: 8px;
  width: 22px;
  margin-left: 0;
}

.nav-toggle .toggle-label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  color: #1f1b67;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.6rem 0.5rem;
  background: rgba(255, 255, 255, 0.75);
  border-bottom: 1px solid rgba(122, 90, 248, 0.12);
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.site-nav a {
  text-decoration: none;
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  padding: 0.5rem 0.85rem;
  border-radius: 12px;
  color: #4b3fb6;
  border: 1px solid rgba(75, 63, 182, 0.18);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06), inset 0 0 0 1px rgba(255,255,255,0.5);
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.nav-pill:hover {
  color: #fff;
  background: linear-gradient(120deg, #b68eff, #7a7df8);
  box-shadow: 0 12px 28px rgba(122, 125, 248, 0.25);
  border-color: transparent;
  transform: translateY(-1px);
}

.nav-pill.is-active {
  background: linear-gradient(120deg, #8d7ee8, #65bff8);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 14px 32px rgba(101, 191, 248, 0.3);
}

/* Inline caption next to top nav dropdown text */
.nav-toggle-caption {
  margin-left: 0.35rem;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background-image: linear-gradient(120deg, #60a5fa, #7c3aed);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
  display: inline-block;
  vertical-align: baseline;
  line-height: 1;
  transform: translateY(1px);
  text-shadow: 0 0 8px rgba(124, 58, 237, 0.25), 0 0 4px rgba(96, 165, 250, 0.25);
}

/* Dropdown navigation */
.nav-dropdown {
  position: relative;
  display: inline-block;
}

.nav-dropdown-toggle {
  background: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  font-size: 0.95rem;
  color: inherit;
  font-weight: inherit;
}

.nav-dropdown-toggle svg {
  transition: transform 0.2s ease;
  margin-left: 0.35rem;
  vertical-align: middle;
  display: inline-block;
}

.nav-dropdown.open .nav-dropdown-toggle svg {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.5rem;
  background: rgba(255, 255, 255, 0.97);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.15);
  border: 1px solid rgba(122, 90, 248, 0.12);
  min-width: 240px;
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.nav-dropdown.open .nav-dropdown-menu,
.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-link {
  display: grid;
  grid-template-columns: 26px 1fr;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.75rem;
  color: #1f2937;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.92rem;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.nav-dropdown-link .nav-link-icon svg {
  width: 18px;
  height: 18px;
  color: #7a5af8;
}

.nav-dropdown-link:hover {
  background: rgba(122, 90, 248, 0.08);
  color: #4b3fb6;
  transform: translateX(2px);
}

.nav-dropdown-link.is-active {
  background: linear-gradient(120deg, #8d7ee8, #65bff8);
  color: #fff;
  box-shadow: 0 4px 12px rgba(101, 191, 248, 0.25);
}

.mobile-nav-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100dvh;
  width: min(85vw, 320px);
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.97) 0%, rgba(17, 24, 39, 0.95) 55%, rgba(17,24,39,0.93) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-left: 1px solid rgba(255,255,255,0.08);
  box-shadow: -10px 0 30px rgba(0,0,0,0.4);
  padding: calc(1.25rem + env(safe-area-inset-top)) 1.25rem calc(2rem + env(safe-area-inset-bottom));
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.mobile-nav-panel.open {
  transform: translateX(0);
}

.mobile-nav-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  color: #e5e7eb;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  position: sticky;
  top: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.9));
  padding-top: env(safe-area-inset-top);
}

.mobile-nav-panel a {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.7rem;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.06);
  text-decoration: none;
  font-weight: 700;
  color: #e5e7eb;
  background: rgba(255,255,255,0.04);
  transition: background 0.2s ease, border 0.2s ease, transform 0.2s ease;
}

.mobile-nav-panel a .mobile-nav-icon svg {
  width: 18px;
  height: 18px;
  color: #93c5fd;
}

.mobile-nav-panel a .mobile-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
}

.mobile-nav-panel a .mobile-nav-text {
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

.mobile-nav-panel a.is-active {
  background: linear-gradient(120deg, rgba(147, 197, 253, 0.2), rgba(196, 181, 253, 0.18));
  border: 1px solid rgba(147, 197, 253, 0.35);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08), 0 12px 25px rgba(2, 6, 23, 0.25);
}

.mobile-nav-panel a:not(.is-active):hover {
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.07);
  transform: translateX(2px);
}

.mobile-nav-panel a.non-calculator-link {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-weight: 600;
  color: #cbd5e1;
}

.mobile-nav-panel a.non-calculator-link:hover {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.mobile-nav-panel a.non-calculator-link.is-active {
  background: linear-gradient(120deg, rgba(203, 213, 225, 0.15), rgba(148, 163, 184, 0.16));
  border: 1px solid rgba(203, 213, 225, 0.35);
  color: #e5e7eb;
}

.mobile-submenu-wrapper {
  border-radius: 14px;
  background: rgba(255,255,255,0.02);
  padding: 0.35rem 0.4rem 0.35rem;
  margin: 0.15rem 0 0.15rem;
  border: 1px solid rgba(255,255,255,0.06);
}

.mobile-submenu-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 800;
  color: #c7d2fe;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  text-transform: none;
  padding: 0.35rem 0.4rem;
  width: 100%;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
}

.mobile-submenu-titleblock {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.15rem;
}

.mobile-submenu-titleinline {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
}

.mobile-submenu-titleinline > span:first-child {
  font-size: 0.95rem;
  color: #e5e7eb;
}

.mobile-submenu-caption {
  font-size: 0.7rem;
  color: #9ca3af;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mobile-submenu-caption.inline {
  display: inline-block;
  line-height: 1;
  margin-left: 0.2rem;
  background-image: linear-gradient(120deg, #7dd3fc, #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

.mobile-submenu-caret svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.mobile-submenu-wrapper.is-collapsed .mobile-submenu-caret svg {
  transform: rotate(180deg);
}

.mobile-submenu {
  opacity: 1;
  padding: 0.25rem;
  border-radius: 12px;
  background: transparent;
  margin-top: 0.25rem;
  max-height: 1000px;
  overflow: hidden;
  transition: max-height 0.25s ease, opacity 0.2s ease;
}

.mobile-submenu-wrapper.is-collapsed .mobile-submenu {
  max-height: 0;
  opacity: 0.5;
}

.mobile-submenu .mobile-nav-link {
  padding: 0.5rem 0.6rem;
  margin: 0.3rem 0;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.03);
  color: #dbeafe;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  position: relative;
  font-weight: 700;
}

.mobile-submenu .mobile-nav-link.is-active {
  color: #e5e7eb;
  border-color: rgba(147, 197, 253, 0.35);
  background: linear-gradient(120deg, rgba(147, 197, 253, 0.18), rgba(196, 181, 253, 0.18));
  box-shadow: 0 15px 25px rgba(2, 6, 23, 0.35);
}

/* Accessibility and micro-interactions */
.mobile-nav-panel a:focus-visible {
  outline: 2px solid rgba(147, 197, 253, 0.9);
  outline-offset: 2px;
}

.mobile-nav-panel a {
  position: relative;
}

.mobile-nav-panel a::after {
  content: '›';
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.35);
  font-size: 1rem;
  transition: transform 0.2s ease, color 0.2s ease;
}

.mobile-nav-panel a:hover::after,
.mobile-nav-panel a.is-active::after {
  color: rgba(255,255,255,0.6);
  transform: translateY(-50%) translateX(2px);
}

.nav-close {
  align-self: flex-end;
  position: sticky;
  top: 0.5rem;
  border: none;
  background: rgba(255,255,255,0.06);
  border-radius: 10px;
  width: 36px;
  height: 36px;
  font-size: 1.3rem;
  cursor: pointer;
  color: #e5e7eb;
  margin-bottom: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 2;
}

.nav-close:hover {
  background: rgba(255,255,255,0.1);
  transform: rotate(90deg);
}

.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(120% 120% at 0% 0%, rgba(2,6,23,0.65), rgba(2,6,23,0.5) 40%, rgba(2,6,23,0.45));
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1000;
}

.mobile-nav-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

body.nav-open {
  overflow: hidden;
}

/* === Desktop Navigation === */
.desktop-nav-toggle {
  display: none;
  position: fixed;
  top: 1.25rem;
  left: 1.25rem;
  z-index: 1002;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 247, 255, 0.95));
  border: 1px solid rgba(91, 78, 229, 0.35);
  border-radius: 14px;
  padding: 0.75rem 1rem;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(91, 78, 229, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.6) inset;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  color: #4b3fb6;
  backdrop-filter: blur(12px);
}

.desktop-nav-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(91, 78, 229, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
  background: linear-gradient(135deg, rgba(255, 255, 255, 1), rgba(243, 241, 255, 0.98));
}

.desktop-nav-toggle:active {
  transform: translateY(0);
}

.desktop-nav-toggle svg {
  display: block;
  color: #5b4ee5;
  transition: transform 0.3s ease;
}

.desktop-nav-toggle:hover svg {
  transform: scale(1.1);
}

.desktop-toggle-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 800;
  color: #1f1b67;
}

.desktop-nav-panel {
  position: fixed;
  top: 0;
  left: 0;
  height: 100dvh;
  width: min(380px, 28vw);
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.9) 0%, rgba(17, 24, 39, 0.88) 55%, rgba(17,24,39,0.86) 100%);
  border-right: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  padding: calc(1rem + env(safe-area-inset-top)) 1rem calc(1.5rem + env(safe-area-inset-bottom));
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1003;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.desktop-nav-panel.open {
  transform: translateX(0);
}

.desktop-nav-panel::-webkit-scrollbar {
  width: 8px;
}

.desktop-nav-panel::-webkit-scrollbar-track {
  background: rgba(148, 163, 184, 0.1);
  border-radius: 10px;
}

.desktop-nav-panel::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.3);
  border-radius: 10px;
}

.desktop-nav-panel::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.5);
}

/* Use the same close styling as mobile */
.desktop-nav-close {
  display: none;
}

/* Adopt mobile header styling */
.desktop-nav-header { display: none; }

/* Unused when desktop adopts mobile structure */
.desktop-nav-link { display: none; }

.desktop-nav-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 3px;
  background: linear-gradient(180deg, #8d7ee8, #65bff8);
  transform: scaleY(0);
  transition: transform 0.25s ease;
}

.desktop-nav-link:hover::before {
  transform: scaleY(1);
}

.desktop-nav-link-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(245, 243, 255, 0.8));
  border: 1px solid rgba(99, 102, 241, 0.2);
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.desktop-nav-link-icon svg {
  color: #5b4ee5;
  transition: transform 0.25s ease;
}

.desktop-nav-link:hover .desktop-nav-link-icon {
  background: linear-gradient(135deg, #8d7ee8, #65bff8);
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(101, 191, 248, 0.35);
  transform: translateX(4px) scale(1.05);
}

.desktop-nav-link:hover .desktop-nav-link-icon svg {
  color: #fff;
  transform: scale(1.1);
}

.desktop-nav-link:hover {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(99, 102, 241, 0.25);
  padding-left: 1.3rem;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.1);
}

.desktop-nav-link.is-active {
  background: linear-gradient(135deg, rgba(219, 234, 254, 0.95), rgba(243, 232, 255, 0.9));
  border: 1px solid rgba(99, 102, 241, 0.35);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4), 0 8px 20px rgba(99, 102, 241, 0.2);
}

.desktop-nav-link.is-active::before {
  transform: scaleY(1);
}

.desktop-nav-link.is-active .desktop-nav-link-icon {
  background: linear-gradient(120deg, #8d7ee8, #65bff8);
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(101, 191, 248, 0.3);
}

.desktop-nav-link.is-active .desktop-nav-link-icon svg {
  color: #fff;
}

.desktop-nav-link-text {
  flex: 1;
  letter-spacing: 0.01em;
}

/* Unused when desktop adopts mobile structure */
.desktop-submenu-wrapper, .desktop-submenu-header { display: none; }

.desktop-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  z-index: 1001;
}

.desktop-nav-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

body.desktop-nav-open {
  overflow: hidden;
}

/* Show desktop toggle on desktop, hide on mobile */
@media (min-width: 769px) {
  .desktop-nav-toggle {
    display: inline-flex;
  }
}

/* Hide desktop menu elements on mobile */
@media (max-width: 768px) {
  .desktop-nav-toggle,
  .desktop-nav-panel,
  .desktop-nav-overlay {
    display: none !important;
  }
}

/* Reuse mobile styles within the desktop panel */
.desktop-nav-panel .mobile-submenu-wrapper,
.desktop-nav-panel .mobile-submenu-label,
.desktop-nav-panel .mobile-submenu,
.desktop-nav-panel .mobile-nav-link,
.desktop-nav-panel .mobile-nav-header,
.desktop-nav-panel .nav-close {
  all: unset;
}

/* Reapply needed styles from mobile within desktop scope */
.desktop-nav-panel .nav-close {
  align-self: flex-end;
  position: sticky;
  top: 0.5rem;
  border: none;
  background: rgba(255,255,255,0.06);
  border-radius: 10px;
  width: 36px;
  height: 36px;
  font-size: 1.3rem;
  cursor: pointer;
  color: #e5e7eb;
  margin-bottom: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 2;
}

.desktop-nav-panel .mobile-nav-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  color: #e5e7eb;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  position: sticky;
  top: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.9));
  padding-top: env(safe-area-inset-top);
}

.desktop-nav-panel .mobile-submenu-wrapper {
  border-radius: 14px;
  background: rgba(255,255,255,0.02);
  padding: 0.35rem 0.4rem 0.35rem;
  margin: 0.15rem 0 0.15rem;
  border: 1px solid rgba(255,255,255,0.06);
}

.desktop-nav-panel .mobile-submenu-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 800;
  color: #c7d2fe;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  text-transform: none;
  padding: 0.35rem 0.4rem;
  width: 100%;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
}

.desktop-nav-panel .mobile-submenu-titleinline {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
}

.desktop-nav-panel .mobile-submenu-titleinline > span:first-child {
  font-size: 0.95rem;
  color: #e5e7eb;
}

.desktop-nav-panel .mobile-submenu-caption.inline {
  display: inline-block;
  line-height: 1;
  margin-left: 0.2rem;
  background-image: linear-gradient(120deg, #7dd3fc, #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

.desktop-nav-panel .mobile-submenu {
  opacity: 1;
  padding: 0.25rem;
  border-radius: 12px;
  background: transparent;
  margin-top: 0.25rem;
  max-height: 1000px;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.2s ease, padding 0.3s ease, margin-top 0.3s ease;
  display: block;
}

.desktop-nav-panel .mobile-submenu-wrapper.is-collapsed .mobile-submenu {
  max-height: 0 !important;
  opacity: 0;
  overflow: hidden;
  margin-top: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.desktop-nav-panel .mobile-submenu-wrapper.is-collapsed .mobile-submenu-caret svg {
  transform: rotate(180deg);
}

.desktop-nav-panel .mobile-submenu-caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.25rem;
}

.desktop-nav-panel .mobile-submenu-caret svg {
  transition: transform 0.2s ease;
}

.desktop-nav-panel .mobile-nav-link {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.06);
  text-decoration: none;
  font-weight: 700;
  color: #e5e7eb;
  background: rgba(255,255,255,0.03);
  transition: background 0.2s ease, border 0.2s ease, transform 0.2s ease;
}

.desktop-nav-panel .mobile-nav-link .mobile-nav-icon svg {
  width: 18px;
  height: 18px;
  color: #93c5fd;
}

.desktop-nav-panel .mobile-nav-link .mobile-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
}

.desktop-nav-panel .mobile-nav-link .mobile-nav-text {
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

.desktop-nav-panel .mobile-nav-link.is-active {
  background: linear-gradient(120deg, rgba(147, 197, 253, 0.2), rgba(196, 181, 253, 0.18));
  border: 1px solid rgba(147, 197, 253, 0.35);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08), 0 12px 25px rgba(2, 6, 23, 0.25);
}

.desktop-nav-panel .mobile-nav-link:not(.is-active):hover {
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.07);
  transform: translateX(2px);
}

/* === Main Layout === */
main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  padding: 0 1.5rem 4rem;
}

main.blog-layout {
  width: 100%;
  gap: 2rem;
  padding: 0 1.5rem 4rem;
}

.intent-intro {
  max-width: 960px;
  margin: 1.5rem auto 0.5rem;
  padding: 1.75rem 2rem;
  text-align: left;
  background: linear-gradient(135deg, rgba(255,255,255,0.96), rgba(245,244,255,0.95));
  border-radius: 22px;
  border: 1px solid rgba(122, 90, 248, 0.15);
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.08);
}

.intent-intro h2 {
  font-size: 1.9rem;
  margin-bottom: 0.4rem;
  color: #17173f;
}

.intent-intro p {
  color: #4b4b63;
  line-height: 1.75;
  margin: 0;
}

.intent-intro a {
  color: #5b4ee5;
  font-weight: 600;
  text-decoration: none;
}

.intent-intro a:hover {
  text-decoration: underline;
}

/* === Calculator Category Section === */
.calculator-category-section {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto 0.1rem;
  padding: 0 2rem;
}

.category-header {
  margin-bottom: 1.5rem;
  text-align: center;
}

.category-header-content {
  display: inline-block;
}

.category-title {
  font-size: 2.25rem;
  font-weight: 800;
  color: #1f2937;
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
}

.category-description {
  font-size: 1rem;
  color: #64748b;
  margin: 0;
  font-weight: 500;
}

/* Compact Grid - 3 columns */
.calculator-grid {
  display: grid;
  grid-template-columns: repeat(3, 0.64fr);
  gap: 0.875rem;
  justify-content: center;
}

/* === Tiny Modern Calculator Cards === */
.calc-card {
  position: relative;
  background: linear-gradient(135deg, #a8b8f0 0%, #b8a8f0 100%);
  border-radius: 12px;
  padding: 1.25rem 1rem;
  text-decoration: none;
  color: #ffffff;
  border: 1.5px solid rgba(168, 184, 240, 0.3);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(168, 184, 240, 0.2), 0 1px 2px rgba(184, 168, 240, 0.15);
  min-height: 110px;
  text-align: center;
  backdrop-filter: blur(16px);
}

.calc-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(168, 184, 240, 0.4), 0 4px 12px rgba(184, 168, 240, 0.3);
}

.calc-card-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
  margin: 0;
  transition: all 0.3s ease;
  line-height: 1;
}

.calc-card:hover .calc-card-icon {
  transform: scale(1.1);
}

.calc-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #000000;
  margin: 0;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.calc-card p {
  display: none;
}

.calc-card-arrow {
  font-size: 1.25rem;
  color: #000000;
  font-weight: 700;
  transition: transform 0.3s ease, opacity 0.3s ease;
  display: block;
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  opacity: 0;
}

.calc-card:hover .calc-card-arrow {
  transform: translateX(3px);
  opacity: 1;
}

/* Category-specific colors */
.calc-card-fire::before {
  background: linear-gradient(180deg, #f59e0b, #fb923c);
}

.calc-card-fire:hover {
  border-color: #f59e0b;
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.2);
}

.calc-card-fire .calc-card-arrow {
  color: #000000;
}

.calc-card-home::before,
.calc-card-rent::before,
.calc-card-mortgage::before,
.calc-card-refinance::before,
.calc-card-heloc::before {
  background: linear-gradient(180deg, #3b82f6, #60a5fa);
}

.calc-card-home:hover,
.calc-card-rent:hover,
.calc-card-mortgage:hover,
.calc-card-refinance:hover,
.calc-card-heloc:hover {
  border-color: #3b82f6;
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.2);
}

.calc-card-home .calc-card-arrow,
.calc-card-rent .calc-card-arrow,
.calc-card-mortgage .calc-card-arrow,
.calc-card-refinance .calc-card-arrow,
.calc-card-heloc .calc-card-arrow {
  color: #000000;
}

.calc-card-airbnb::before,
.calc-card-rental::before,
.calc-card-flip::before {
  background: linear-gradient(180deg, #10b981, #34d399);
}

.calc-card-airbnb:hover,
.calc-card-rental:hover,
.calc-card-flip:hover {
  border-color: #10b981;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.2);
}

.calc-card-airbnb .calc-card-arrow,
.calc-card-rental .calc-card-arrow,
.calc-card-flip .calc-card-arrow {
  color: #000000;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .calculator-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .calculator-category-section {
    padding: 0 1.5rem;
    margin-bottom: 2rem;
  }

  .category-title {
    font-size: 2rem;
  }

  .category-description {
    font-size: 0.95rem;
  }

  .calculator-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
  }

  .calc-card {
    padding: 1.25rem 1rem;
    min-height: 120px;
    gap: 0.4rem;
  }

  .calc-card-icon {
    font-size: 2rem;
    line-height: 1;
  }

  .calc-card h3 {
    font-size: 0.95rem;
    line-height: 1.25;
  }

  .calc-card-arrow {
    font-size: 1.1rem;
    bottom: 0.75rem;
    right: 0.75rem;
  }
}

@media (max-width: 480px) {
  .calculator-category-section {
    padding: 0 1rem;
    margin-bottom: 1.5rem;
  }

  .category-header {
    margin-bottom: 1.25rem;
  }

  .category-title {
    font-size: 1.65rem;
  }

  .category-description {
    font-size: 0.9rem;
  }

  .calculator-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .calc-card {
    padding: 1.1rem 0.85rem;
    min-height: 115px;
    gap: 0.35rem;
  }

  .calc-card-icon {
    font-size: 1.85rem;
    line-height: 1;
  }

  .calc-card h3 {
    font-size: 0.85rem;
    line-height: 1.2;
  }

  .calc-card-arrow {
    font-size: 1rem;
    bottom: 0.65rem;
    right: 0.65rem;
  }
}

.main-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 1.75rem;
  padding: 3rem 2rem 2rem;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .main-section {
    grid-template-columns: 1fr;
    padding: 3rem 1.5rem;
  }

  .site-nav {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
    position: relative;
    z-index: 50;
    margin: 0;
    padding: 0.5rem 0.6rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
  }

  .nav-toggle .bar,
  .nav-toggle .bar::before,
  .nav-toggle .bar::after {
    background: #1f2937 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
  }

  /* Hide dropdowns on mobile - use mobile menu instead */
  .nav-dropdown {
    display: none;
  }
}

.info-sections {
  width: 100%;
  max-width: 1100px;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.all-calculators-hub {
  max-width: 1000px;
  margin: 2rem auto;
  background: linear-gradient(135deg, rgba(200, 210, 245, 0.4), rgba(210, 200, 245, 0.4));
  border-radius: 24px;
  padding: 2rem 2.5rem;
  border: 2px solid rgba(139,92,246,0.15);
  box-shadow: 0 25px 50px rgba(124,58,237,0.12), 0 8px 16px rgba(124,58,237,0.06);
  backdrop-filter: blur(10px);
}

.all-calculators-hub h2 {
  margin-bottom: 1rem;
  font-size: 2rem;
  font-weight: 800;
  color: #000000;
  text-align: center;
  letter-spacing: -0.02em;
}

.all-calculators-hub ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.all-calculators-hub li {
  padding: 1.25rem 1.5rem;
  background: rgba(255,255,255,0.8);
  border-radius: 12px;
  border-left: 4px solid #a78bfa;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(124,58,237,0.08);
}

.all-calculators-hub li:hover {
  transform: translateX(8px);
  border-left-color: #8b5cf6;
  box-shadow: 0 8px 24px rgba(124,58,237,0.16);
  background: rgba(255,255,255,0.95);
}

.all-calculators-hub li a {
  color: #6d28d9;
  font-weight: 700;
  text-decoration: none;
  font-size: 1.05rem;
  transition: color 0.2s ease;
}

.all-calculators-hub li a:hover {
  color: #8b5cf6;
}

.all-calculators-hub li {
  color: #64748b;
  line-height: 1.6;
}

.latest-guides {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto 2.5rem;
  padding: 2.5rem;
  background: linear-gradient(135deg, rgba(235, 240, 255, 0.5), rgba(240, 235, 255, 0.5));
  border-radius: 24px;
  border: 1.5px solid rgba(139, 92, 246, 0.12);
  box-shadow: 0 8px 32px rgba(124, 58, 237, 0.06);
  backdrop-filter: blur(8px);
}

.latest-guides-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 0;
}

.latest-guides h2 {
  margin: 0;
  color: #1a1a1a;
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* === Card Design === */
.card {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 18px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
  padding: 2rem;
  width: 100%;
  text-decoration: none;
  color: #1a1a1a;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
}

.card-rent {
  background: linear-gradient(135deg, rgba(255,255,255,0.95), #f3e8ff);
  border: 1px solid rgba(122, 90, 248, 0.2);
}

.card-mortgage {
  background: linear-gradient(135deg, rgba(255,255,255,0.95), #e0f2ff);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.card-airbnb {
  background: linear-gradient(135deg, rgba(255,255,255,0.95), #ffe9dc);
  border: 1px solid rgba(251, 146, 60, 0.25);
}
.card-ltr {
  background: linear-gradient(135deg, rgba(245,247,255,0.95), #e6e8ff);
  border: 1px solid rgba(99, 102, 241, 0.2);
}


.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.95);
}

.share-cta {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(99, 102, 241, 0.08);
  border-radius: 14px;
  border: 1px solid rgba(99, 102, 241, 0.2);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: #1f1f38;
}

.share-cta button {
  align-self: flex-start;
  border: none;
  border-radius: 999px;
  padding: 0.5rem 1.2rem;
  background: linear-gradient(120deg, #8d7ee8, #65bff8);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.share-cta button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(101, 191, 248, 0.3);
}

/* Shared share button styles */
.share-container {
  position: relative;
  z-index: 20;
}

.share-btn {
  background: linear-gradient(120deg, #b68eff, #7a7df8);
  border: none;
  color: #fff;
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 10px 25px rgba(122, 125, 248, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.share-btn svg {
  width: 18px;
  height: 18px;
}

.share-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(122, 125, 248, 0.35);
}

.share-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(203, 213, 225, 0.8);
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.12);
  padding: 0.35rem;
  display: none;
  min-width: 220px;
  z-index: 21;
  max-height: 70vh;
  overflow-y: auto;
}

.share-menu.show {
  display: block;
}

.share-option {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  font-size: 0.95rem;
  color: #1f1f38;
  cursor: pointer;
  transition: background 0.2s ease;
}

.share-option svg {
  width: 20px;
  height: 20px;
}

.share-option:hover {
  background: #f4f4fb;
}

/* === Blog & Article Styles === */
.blog-hero {
  width: 100%;
  max-width: 1100px;
  margin: 2rem auto 1.5rem;
  background: linear-gradient(135deg, #ede9fe, #f5f3ff);
  border-radius: 28px;
  padding: 2.5rem;
  border: 1px solid rgba(124, 127, 255, 0.15);
  box-shadow: 0 35px 80px rgba(79, 70, 229, 0.12);
}

.blog-hero .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.8rem;
  color: #5b4bdf;
  margin-bottom: 0.5rem;
}

.blog-hero h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #1c1c34;
}

.blog-hero p {
  color: #4d4d66;
  line-height: 1.7;
}

.blog-grid {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto 2rem;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* Blog search */
.blog-search-wrapper {
  width: 100%;
  max-width: 900px;
  margin: 2rem auto 1.5rem;
  padding: 0 1rem;
}

.blog-search-container {
  position: relative;
  display: flex;
  align-items: center;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,243,255,0.96));
  border: 2px solid rgba(122, 90, 248, 0.35);
  border-radius: 999px;
  padding: 0 1.05rem;
  transition: all 0.2s ease;
  box-shadow: 0 6px 24px rgba(122, 90, 248, 0.12);
}

.blog-search-container:hover {
  border-color: rgba(122, 90, 248, 0.45);
  box-shadow: 0 10px 32px rgba(122, 90, 248, 0.18);
}

.blog-search-container:focus-within {
  border-color: rgba(122, 90, 248, 0.6);
  box-shadow: 0 14px 36px rgba(122, 90, 248, 0.25);
}

.blog-search-icon {
  color: #7a5af8;
  flex-shrink: 0;
  margin-right: 0.75rem;
}

.blog-search-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 1rem 0.5rem;
  font-size: 1rem;
  color: #1f2937;
  background: transparent;
}

.blog-search-input::placeholder {
  color: #6b7280;
}

.blog-search-clear {
  background: rgba(122, 90, 248, 0.1);
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  color: #7a5af8;
}

.blog-search-clear:hover {
  background: rgba(122, 90, 248, 0.2);
  transform: scale(1.1);
}

.blog-search-results-count {
  text-align: center;
  margin-top: 0.75rem;
  font-size: 0.95rem;
  color: #6b7280;
  font-weight: 600;
}

.blog-no-results {
  padding: 4rem 2rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  margin: 2rem auto;
  max-width: 500px;
}

/* Calculator search (home page) */
.calc-search-wrapper {
  width: 100%;
  max-width: 1200px;
  margin: 0.5rem auto 0;
  padding: 0 1rem;
}

.calc-search-container {
  position: relative;
  display: flex;
  align-items: center;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,243,255,0.96));
  border: 2px solid rgba(122, 90, 248, 0.35);
  border-radius: 999px;
  padding: 0 1.05rem;
  transition: all 0.2s ease;
  box-shadow: 0 6px 24px rgba(122, 90, 248, 0.12);
}

.calc-search-container:hover {
  border-color: rgba(122, 90, 248, 0.45);
  box-shadow: 0 10px 32px rgba(122, 90, 248, 0.18);
}

.calc-search-container:focus-within {
  border-color: rgba(122, 90, 248, 0.6);
  box-shadow: 0 14px 36px rgba(122, 90, 248, 0.25);
}

.calc-search-icon {
  color: #7a5af8;
  flex-shrink: 0;
  margin-right: 0.75rem;
}

.calc-search-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 1rem 0.5rem;
  font-size: 1rem;
  color: #1f2937;
  background: transparent;
}

.calc-search-input::placeholder {
  color: #6b7280;
}

.calc-search-clear {
  background: rgba(122, 90, 248, 0.1);
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  color: #7a5af8;
}

.calc-search-clear:hover {
  background: rgba(122, 90, 248, 0.2);
  transform: scale(1.1);
}

.calc-search-results-count {
  text-align: center;
  margin-top: 0.75rem;
  font-size: 0.95rem;
  color: #6b7280;
  font-weight: 600;
}

.calc-no-results {
  padding: 4rem 2rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  margin: 2rem auto;
  max-width: 500px;
}

/* Tab navigation styles moved to line 1760 */

.blog-grid[data-tab-content] {
  display: none;
}

.blog-grid[data-tab-content].is-active {
  display: grid;
}

.blog-grid.compact {
  max-width: none;
  margin-bottom: 0;
}

.blog-actionable {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto -2rem;
  background: linear-gradient(140deg, rgba(235, 240, 255, 0.96), rgba(255, 247, 252, 0.94));
  border-radius: 28px;
  padding: 2.25rem;
  border: 1px solid rgba(124, 127, 255, 0.18);
  box-shadow: 0 30px 65px rgba(67, 56, 202, 0.08);
  text-align: center;
}

.blog-actionable h2 {
  margin: 0 0 0.65rem;
  color: #1f1f38;
}

.blog-actionable p {
  color: #4b4b63;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.blog-actionable .cta-link {
  color: #5a67ff;
  font-weight: 700;
  text-decoration: none;
}

.blog-actionable .cta-link:hover {
  text-decoration: underline;
}

.blog-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 245, 255, 0.8));
  border-radius: 16px;
  padding: 1.75rem;
  border: 1.5px solid rgba(139, 92, 246, 0.15);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
}

.blog-card.gradient-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(245, 240, 255, 0.85));
  border: 1.5px solid rgba(139, 92, 246, 0.18);
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(124, 58, 237, 0.15);
  border-color: rgba(139, 92, 246, 0.25);
}

.card-link {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: block;
}

.blog-card-footer,
.blog-card p,
.blog-card h3,
.blog-card h4,
.blog-card-meta,
.text-link {
  position: relative;
  z-index: 2;
}

.blog-card-meta {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7c3aed;
  font-weight: 600;
}

.blog-card h3,
.blog-card h4 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

/* FAQ home card title + icon */
.card-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(240, 244, 255, 0.92));
  border: 1px solid rgba(99, 102, 241, 0.2);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}

.card-icon svg {
  width: 18px;
  height: 18px;
  color: #5b4ee5;
}

.blog-card p {
  color: #4b4b63;
  line-height: 1.6;
}

.blog-card-author {
  display: block;
  font-size: 0.8rem;
  color: #7c7f99;
  font-style: italic;
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.blog-card-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #6b7280;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(139, 92, 246, 0.1);
}

.text-link {
  color: #7c3aed;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.text-link:hover {
  color: #5b21b6;
}

/* Featured Articles Section */
.featured-section {
  width: 100%;
  max-width: 1100px;
  margin: 2.5rem auto 3rem;
  padding: 0 1rem;
}

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

.featured-header h2 {
  font-size: 2rem;
  margin: 0 0 0.5rem;
  color: #1f1f38;
  font-weight: 700;
}

.featured-header p {
  color: #6b7280;
  font-size: 1.05rem;
  margin: 0;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.featured-card {
  position: relative;
  background: linear-gradient(145deg, rgba(255,255,255,0.98), rgba(243,240,255,0.95));
  border: 2px solid rgba(124,127,255,0.25);
  box-shadow: 0 20px 50px rgba(59, 63, 131, 0.15);
}

.featured-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #8d7ee8, #65bff8);
  border-radius: 18px 18px 0 0;
}

.featured-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 65px rgba(59, 63, 131, 0.25);
  border-color: rgba(124,127,255,0.4);
}

.featured-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

/* Blog Card Tag */
.blog-card-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(122, 90, 248, 0.1);
  color: #5b4ee5;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Load More Button */
.blog-load-more-wrapper {
  width: 100%;
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1rem;
  display: flex;
  justify-content: center;
}

.blog-load-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  background: linear-gradient(120deg, #8d7ee8, #65bff8);
  color: white;
  border: none;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 20px rgba(122, 90, 248, 0.25);
}

.blog-load-more-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(122, 90, 248, 0.35);
}

.blog-load-more-btn:active {
  transform: translateY(0);
}

.blog-load-more-btn svg {
  transition: transform 0.3s ease;
}

.blog-load-more-btn:hover svg {
  transform: translateY(2px);
}

/* Improved Tab Navigation */
.blog-tab-nav {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto 2rem;
  padding: 0 1rem;
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.blog-tab-btn {
  border: 2px solid rgba(99, 102, 241, 0.2);
  background: rgba(255, 255, 255, 0.95);
  color: #312e81;
  border-radius: 999px;
  padding: 0.65rem 1.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.blog-tab-btn:hover {
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(248, 250, 255, 1);
  transform: translateY(-1px);
}

.blog-tab-btn.is-active {
  background: linear-gradient(120deg, #8d7ee8, #65bff8);
  color: #fff;
  box-shadow: 0 10px 25px rgba(101, 191, 248, 0.3);
  border-color: transparent;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
  .featured-header h2 {
    font-size: 1.5rem;
  }

  .featured-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .blog-tab-nav {
    gap: 0.5rem;
  }

  .blog-tab-btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }

  .featured-card h3 {
    font-size: 1.1rem;
  }

  .blog-card-author {
    font-size: 0.75rem;
    margin-top: 0.4rem;
    margin-bottom: 0.6rem;
  }

  .blog-load-more-btn {
    padding: 0.75rem 1.75rem;
    font-size: 0.95rem;
  }
}

.article-wrapper {
  width: 100%;
  max-width: 1240px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.article-byline {
  display: block;
  font-size: 0.9rem;
  color: #7c7f99;
  font-style: italic;
  margin: 0.75rem 0 1.5rem 0;
  line-height: 1.5;
}

.article-content {
  background: #fff;
  border-radius: 28px;
  padding: 2.5rem;
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 25px 70px rgba(15, 23, 42, 0.1);
}

.article-meta {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #7c7c9b;
  margin-bottom: 0.75rem;
}

.article-backlink {
  margin-bottom: 0.5rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.article-backlink .secondary-link {
  color: #7c3aed;
  font-weight: 600;
}

.article-content h1 {
  font-size: 2.2rem;
  margin-bottom: 0.35rem;
  color: #17173f;
}

.article-sharebar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.article-sharebar.bottom {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
}

.article-sharebar.bottom h2 {
  margin: 0;
  font-size: 1.3rem;
  color: #1f1f38;
}

.article-subtitle {
  color: #4b4b63;
  margin-bottom: 2rem;
  font-size: 1.05rem;
}

.article-content h2 {
  margin-top: 2rem;
  font-size: 1.35rem;
  color: #22224a;
}

.article-content p,
.article-content li {
  line-height: 1.75;
  color: #3c3c52;
}

.article-content ol {
  padding-left: 1.25rem;
}

.article-block {
  border-radius: 28px;
  padding: 2rem;
  margin: 1.75rem 0;
  border: 1px solid rgba(124, 127, 255, 0.18);
  box-shadow: 0 25px 60px rgba(93, 95, 173, 0.15);
  background: #fdfdff;
}

.article-block h2 {
  margin-top: 0;
}

.article-block h2:not(:first-child) {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.article-block h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.article-block h4 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.article-block ul + p,
.article-block ol + p {
  margin-top: 1.5rem;
}

.article-block ul + h2,
.article-block ol + h2,
.article-block p + h2,
.article-block ul + h3,
.article-block ol + h3,
.article-block p + h3,
.article-block ul + h4,
.article-block ol + h4,
.article-block p + h4 {
  margin-top: 2rem;
}

.article-block.lilac {
  background: linear-gradient(145deg, rgba(238, 237, 255, 0.95), rgba(230, 247, 255, 0.9));
}

.article-block.blush {
  background: linear-gradient(140deg, rgba(254, 245, 255, 0.95), rgba(236, 233, 255, 0.9));
}

.article-block.mint {
  background: linear-gradient(145deg, rgba(232, 248, 255, 0.95), rgba(245, 255, 248, 0.92));
}

.article-block.slate {
  background: linear-gradient(150deg, rgba(240, 244, 255, 0.95), rgba(226, 238, 255, 0.95));
  color: #1f1f38;
  border: 1px solid rgba(124, 127, 255, 0.2);
}

.article-block.slate a {
  color: #5a67ff;
  text-decoration: none;
  font-weight: 600;
}

.section-lead {
  font-weight: 600;
  color: #273152;
  margin-top: 1.25rem;
  margin-bottom: 0.35rem;
}

.share-card-grid {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  align-items: stretch;
}

.share-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 22px;
  padding: 1.75rem;
  border: 1px solid rgba(124, 127, 255, 0.15);
  box-shadow: 0 22px 50px rgba(57, 69, 146, 0.12);
  display: flex;
  flex-direction: column;
}

@media (max-width: 768px) {
  main.blog-layout {
    padding: 0 1rem 3rem;
    gap: 1.5rem;
  }

  .blog-hero {
    margin: 1.5rem auto 1rem;
    padding: 1.75rem;
  }

  .blog-search-wrapper {
    margin: 1.5rem auto 1rem;
  }

  .blog-search-input {
    font-size: 0.95rem;
    padding: 0.85rem 0.5rem;
  }

  .calc-search-wrapper {
    margin: 0.25rem auto 0;
  }

  .calc-search-input {
    font-size: 0.95rem;
    padding: 0.85rem 0.5rem;
  }

  .blog-tab-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .blog-tab-btn {
    width: 100%;
  }

  .blog-grid {
    padding: 0;
    margin-bottom: 2rem;
    grid-template-columns: 1fr;
  }

  .blog-card {
    padding: 1.5rem;
  }

  .blog-actionable {
    margin: 0 auto 1.1rem;
    padding: 1.75rem;
  }
}

.share-card:nth-child(2) {
  background: linear-gradient(135deg, rgba(255,255,255,0.98), rgba(240,244,255,0.95));
}

.share-card h3 {
  margin-top: 0.4rem;
  margin-bottom: 0.65rem;
  color: #17173f;
}

.share-card ul,
.share-card ol {
  margin-top: 0.75rem;
}

.share-card li + li {
  margin-top: 0.45rem;
}

.article-step-list {
  list-style: none;
  counter-reset: steps;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
}

.article-step {
  counter-increment: steps;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 22px;
  padding: 2.75rem 1.4rem 1.4rem;
  position: relative;
  border: 1px solid rgba(124, 127, 255, 0.15);
  box-shadow: 0 20px 40px rgba(76, 95, 199, 0.12);
  min-height: 240px;
}

.article-step::before {
  content: "Step " counter(steps);
  position: absolute;
  top: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #6d5dfc, #9d7bff);
  color: #fff;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 999px;
  padding: 0.2rem 0.95rem;
  box-shadow: 0 10px 25px rgba(109, 93, 252, 0.35);
}

.article-step h3 {
  margin: 1.4rem 0 0.5rem;
  font-size: 1.2rem;
  color: #1f1f38;
}

.article-step p {
  margin: 0;
}

.article-block.mint ul,
.article-block.mint ol,
.article-block.blush ul,
.article-block.blush ol,
.article-block.lilac ul,
.article-block.lilac ol {
  margin: 1rem 0 0;
  padding-left: 1.1rem;
}

.article-share {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.article-share a {
  margin-right: 0.75rem;
  color: #5a67ff;
  text-decoration: none;
  font-weight: 600;
}

.article-related {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto 4rem;
  padding: 0 1.5rem;
}

.article-related h3 {
  margin-bottom: 1rem;
  color: #1f1f38;
}

@media (max-width: 640px) {
  .article-wrapper {
    padding: 0 1rem;
  }

  .article-content {
    padding: 1.75rem;
  }

  .article-content h1 {
    font-size: 1.75rem;
  }

  .article-byline {
    font-size: 0.85rem;
    margin: 0.5rem 0 1.25rem 0;
  }

  .article-sharebar {
    flex-direction: column;
    align-items: flex-start;
  }

  .article-sharebar.bottom {
    align-items: flex-start;
  }

  .article-block {
    padding: 1.5rem;
  }

  .article-step-list {
    grid-template-columns: 1fr;
  }

  .article-step {
    padding: 2.5rem 1.25rem 1.25rem;
    min-height: auto;
  }

  .share-card-grid {
    grid-template-columns: 1fr;
  }

  .share-card {
    padding: 1.5rem;
  }

  .article-sharebar .share-menu {
    left: 0;
    right: auto;
  }
}

.card h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
  color: #101010;
}

.card p {
  font-size: 0.95rem;
  color: #444;
  line-height: 1.5;
}

/* Related calculators block (centered card-like section) */
.related-block {
  max-width: 960px;
  margin: 2rem auto;
  padding: 1.75rem 1.5rem;
  background: linear-gradient(135deg, rgba(248, 245, 255, 0.6), rgba(233, 229, 255, 0.55));
  border: 1px solid rgba(122, 90, 248, 0.12);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.related-block h2 {
  text-align: center;
  margin-top: 0;
  margin-bottom: 1rem;
  color: #1f2937;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.related-card {
  padding: 1.25rem 1.25rem;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.related-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.1);
}

.related-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  color: #7a5af8;
}

.related-card p {
  margin: 0;
  color: #6b7280;
  font-size: 0.92rem;
}

@media (max-width: 640px) {
  .related-block { padding: 1.25rem; }
  .related-grid { grid-template-columns: 1fr; }
}

/* === Footer === */
footer {
  text-align: center;
  font-size: 0.9rem;
  padding: 2rem 1rem;
  color: rgba(0,0,0,0.6);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255,255,255,0.5);
}

footer a {
  color: #4b3fb6;
  text-decoration: none;
}

.contact-wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

.contact-card {
  background: rgba(255,255,255,0.95);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(122, 90, 248, 0.12);
}

.contact-card.contact-cta {
  background: linear-gradient(130deg, #dfe4ff, #f3e6ff);
  color: #1f1f38;
  box-shadow: 0 35px 90px rgba(102, 126, 234, 0.3);
}

.contact-cta {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 3rem 2.5rem;
}

.contact-icon {
  font-size: 4rem;
}

.contact-cta h2 {
  font-size: 1.9rem;
  color: #1f1f38;
}

.contact-cta p {
  color: #4b5563;
  line-height: 1.7;
}

.contact-reasons {
  text-align: left;
  margin: 0 auto;
  max-width: 540px;
  list-style: disc;
  padding-left: 1.2rem;
  color: #4b5563;
}

.contact-button {
  padding: 1rem 3rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1.15rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 35px rgba(102, 126, 234, 0.45);
}

.contact-note {
  font-size: 0.9rem;
  color: #6b7280;
}

.contact-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
  text-align: left;
}

.contact-meta__label {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: #9ca3af;
}

.contact-meta__value {
  font-weight: 600;
  color: #4338ca;
}

.contact-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.contact-info-grid article {
  background: rgba(255,255,255,0.8);
  border-radius: 18px;
  padding: 1.75rem;
  box-shadow: 0 15px 40px rgba(15, 23, 42, 0.05);
  border: 1px solid rgba(99, 102, 241, 0.1);
}

.contact-info-grid h3 {
  margin-bottom: 0.8rem;
  font-size: 1.2rem;
  color: #1f1f38;
}

.contact-seo {
  margin-top: 2.5rem;
}

.contact-benefits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.contact-benefits div {
  background: rgba(243, 244, 255, 0.8);
  border: 1px solid rgba(129, 140, 248, 0.2);
  border-radius: 16px;
  padding: 1.25rem;
}

.faq-block {
  width: 100%;
  margin-top: 3rem;
  text-align: left;
}

.faq-block h2 {
  margin-bottom: 1rem;
  color: #1f1f38;
}

/* === Responsive === */
@media (max-width: 768px) {
  header h1 {
    font-size: 1.9rem;
  }

  .main-section {
    gap: 1.5rem;
    padding: 2rem;
  }

  .card {
    width: 100%;
  }
}

@media (max-width: 640px) {
  header {
    padding: 0.75rem 1rem !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 100 !important;
  }

  .intent-intro {
    padding: 1.2rem 1.4rem;
    margin: 1rem;
    text-align: left;
  }

  .all-calculators-hub {
    padding: 1.25rem;
    margin: 0 1rem 1.25rem;
  }

  .share-cta {
    padding: 0.75rem;
  }

  .share-cta button {
    width: 100%;
    text-align: center;
  }

  header h1 {
    font-size: 1.8rem;
  }

  header p {
    font-size: 1rem;
  }

  .site-nav {
    justify-content: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }

  .site-nav::-webkit-scrollbar {
    display: none;
  }

  .nav-pill {
    font-size: 0.85rem;
    padding: 0.4rem 0.95rem;
    min-width: max-content;
    scroll-snap-align: start;
  }

  main {
    padding: 0 1rem 3rem;
    gap: 2rem;
  }

  .main-section {
    padding: 2rem 1rem 1.5rem;
    gap: 1.25rem;
  }

  .card {
    padding: 1.5rem;
  }

  .card h2 {
    font-size: 1.15rem;
  }

  .card p {
    font-size: 0.92rem;
  }

  .blog-hero {
    margin: 1.5rem;
    padding: 1.75rem;
  }

  .blog-hero h2 {
    font-size: 1.5rem;
  }

  .blog-grid {
    margin: 0 1rem 2rem;
    grid-template-columns: 1fr;
  }

  .article-content {
    padding: 1.75rem;
  }

  .info-sections,
  .seo-content {
    padding: 1.5rem;
  }

  .breadcrumb-nav {
    padding: 0 1rem;
    font-size: 0.85rem;
  }

  .faq-grid {
    grid-template-columns: 1fr;
  }

  .contact-wrapper {
    padding: 2.5rem 1rem 4rem;
  }

  .contact-card {
    padding: 2rem 1.5rem;
  }

  .contact-cta {
    padding: 2.25rem 1.5rem;
  }

  .contact-cta h2 {
    font-size: 1.6rem;
  }

  .contact-icon {
    font-size: 3rem;
  }

  .contact-meta {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .contact-info-grid,
  .contact-benefits {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 1.75rem;
  }
}

/* === Calculator Page Styling === */
.calculator-page {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: calc(100vh - 200px);
  background: linear-gradient(to bottom right, #fafaff, #f5f6fb);
  padding: 4rem 1rem 6rem;
}

.calculator-card {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 18px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  padding: 2.5rem;
  max-width: 700px;
  width: 100%;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

#calcForm {
  display: flex;
  flex-direction: column;
}

#calcForm label {
  font-weight: 600;
  margin-top: 1.2rem;
  color: #333;
  font-size: 0.95rem;
}

#calcForm input {
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.8rem;
  font-size: 1rem;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fff;
  transition: all 0.2s ease;
}

#calcForm input:focus {
  border-color: #8ca6db;
  outline: none;
  box-shadow: 0 0 0 3px rgba(185, 147, 214, 0.2);
}

.field-help {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 1.1rem;
  height: 1.1rem;
  margin-left: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 999px;
  color: #7a5af8;
  border: 1px solid rgba(122, 90, 248, 0.5);
  cursor: help;
  position: relative;
}

.field-help:hover::after,
.field-help:focus::after {
  content: attr(aria-label);
  position: absolute;
  left: 50%;
  transform: translate(-50%, -120%);
  background: rgba(23, 23, 30, 0.92);
  color: #fff;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  white-space: nowrap;
  font-size: 0.78rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.22);
  z-index: 5;
}

#calcBtn {
  margin-top: 2rem;
  width: 100%;
  background: linear-gradient(135deg, #b993d6, #8ca6db);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

#calcBtn:hover {
  transform: scale(1.02);
  background: linear-gradient(135deg, #8ca6db, #b993d6);
}

.result-box {
  margin-top: 2rem;
  background: #f7f8fb;
  border-radius: 10px;
  padding: 1.2rem;
  font-size: 0.95rem;
  color: #333;
  line-height: 1.6;
  animation: fadeIn 0.5s ease-in-out;
}

canvas {
  margin-top: 2rem;
  width: 100%;
  max-width: 100%;
  height: 360px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  display: block;
}

/* Fade-in animation for results */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

canvas {
  max-height: 100% !important;
}

.chart-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: clamp(280px, 48vh, 430px);
  overflow: visible;
  margin-top: 2rem;
  padding-bottom: 2rem;
}
.chart-container canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* === SEO Content Sections === */
.seo-content {
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem;
  background: linear-gradient(135deg, rgba(240, 245, 255, 0.6), rgba(245, 240, 255, 0.6));
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(124, 58, 237, 0.08);
  border: 1.5px solid rgba(139, 92, 246, 0.15);
  backdrop-filter: blur(10px);
}

.seo-content h2 {
  font-size: 1.85rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: #1a1a1a;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.seo-content p {
  line-height: 1.8;
  color: #374151;
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
}

.seo-content a {
  color: #7c3aed;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.seo-content a:hover {
  color: #5b21b6;
  text-decoration: underline;
}

.seo-content ul {
  margin-left: 0;
  padding-left: 0;
  list-style: none;
  color: #374151;
  line-height: 1.8;
}

.seo-content ul li {
  padding-left: 1.75rem;
  position: relative;
  margin-bottom: 1rem;
}

.seo-content ul li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: #a78bfa;
  font-weight: 700;
  font-size: 1.1rem;
}

.faq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

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

  .latest-guides {
    padding: 2rem 1.5rem;
    margin-bottom: 2rem;
  }

  .latest-guides h2 {
    font-size: 1.65rem;
  }

  .blog-grid {
    gap: 1rem;
  }

  .blog-card {
    padding: 1.5rem;
  }

  .all-calculators-hub {
    padding: 2rem;
    margin: 1.5rem auto;
  }

  .all-calculators-hub h2 {
    font-size: 1.65rem;
    margin-bottom: 1rem;
  }

  .all-calculators-hub ul {
    gap: 0.65rem;
  }

  .all-calculators-hub li {
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
  }

  .seo-content {
    padding: 2rem;
    margin-bottom: 2rem;
  }

  .seo-content h2 {
    font-size: 1.65rem;
  }

  .seo-content p {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .latest-guides {
    padding: 1.5rem 1rem;
    margin-bottom: 1.5rem;
    border-radius: 18px;
  }

  .latest-guides-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
  }

  .latest-guides h2 {
    font-size: 1.5rem;
  }

  .blog-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .blog-card {
    padding: 1.25rem;
    gap: 0.65rem;
  }

  .blog-card h3,
  .blog-card h4 {
    font-size: 1.05rem;
  }

  .blog-card-meta {
    font-size: 0.75rem;
  }

  .blog-card p {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  .all-calculators-hub {
    padding: 1.5rem;
    margin: 1.25rem auto;
    border-radius: 18px;
  }

  .all-calculators-hub h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }

  .all-calculators-hub ul {
    gap: 0.6rem;
  }

  .all-calculators-hub li {
    padding: 0.9rem 1.1rem;
    font-size: 0.9rem;
    line-height: 1.6;
  }

  .info-sections {
    gap: 1.5rem;
  }

  .seo-content {
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    border-radius: 16px;
  }

  .seo-content h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }

  .seo-content p {
    font-size: 0.95rem;
    line-height: 1.7;
  }

  .seo-content ul li {
    padding-left: 1.5rem;
    margin-bottom: 0.85rem;
    font-size: 0.9rem;
    line-height: 1.6;
  }

  .seo-content ul li::before {
    font-size: 1rem;
  }
}

.faq-item {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  background: white;
  padding: 1rem 1.25rem;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
}

/* Shared SEO enhancements */
.breadcrumb-nav {
  max-width: 960px;
  margin: 1.25rem auto 1.5rem;
  padding: 0 1rem;
  font-size: 0.9rem;
  color: #6b7280;
}

.breadcrumb-nav ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
}

.breadcrumb-nav a {
  color: #6366f1;
  text-decoration: none;
  font-weight: 600;
}

.breadcrumb-nav li::after {
  content: "/";
  margin-left: 0.35rem;
  color: #9ca3af;
}

.breadcrumb-nav li:last-child::after {
  content: "";
}

.benefit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0 2rem;
}

.benefit-card {
  background: linear-gradient(145deg, #f5f3ff, #eef2ff);
  border-radius: 16px;
  padding: 1.5rem;
  border: 1px solid rgba(99, 102, 241, 0.2);
  box-shadow: 0 10px 30px rgba(79, 70, 229, 0.08);
}

.benefit-card h3 {
  margin-top: 0;
  color: #4c1d95;
  font-size: 1.05rem;
}

.benefit-card p {
  color: #4338ca;
  line-height: 1.6;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.stat-grid li {
  background: #0f172a;
  color: #f8fafc;
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
  box-shadow: 0 15px 35px rgba(15, 23, 42, 0.25);
}

.stat-label {
  display: block;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(248, 250, 252, 0.8);
  margin-bottom: 0.35rem;
}

.stat-detail {
  font-size: 0.95rem;
  font-weight: 600;
}

.keyword-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1.25rem 0 2rem;
}

.keyword-tag {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.12);
  color: #4338ca;
  font-weight: 600;
  font-size: 0.85rem;
}

.resource-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.resource-links a {
  display: block;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: #f1f5f9;
  color: #0f172a;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.resource-links a:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.15);
}

.playbook-steps {
  margin: 1.5rem 0 1rem 1.25rem;
  line-height: 1.7;
}

.playbook-steps li {
  margin-bottom: 0.85rem;
  font-weight: 500;
  color: #1f2937;
}

.playbook-steps strong {
  color: #4c1d95;
}

.faq-item summary {
  font-weight: 600;
  cursor: pointer;
  outline: none;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  min-height: 2.4rem;
}

/* Ensure title takes remaining inline space */
.faq-title {
  flex: 1 1 auto;
  min-width: 0;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

/* Add an icon before the text for FAQ items */
.faq-item summary::before {
  content: "❓";
  display: inline-block;
  font-size: 1rem;
  color: #7a5af8;
  margin-right: 0.25rem;
}

.faq-item summary::after {
  content: "＋";
  margin-left: 0.5rem;
  font-weight: 600;
  color: #7a5af8;
}

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

/* Anchor link styling aligned to the right */
.faq-anchor {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(122, 90, 248, 0.08);
  border: 1px solid rgba(122, 90, 248, 0.2);
  color: #7a5af8;
  transition: background 0.2s ease, transform 0.2s ease;
}

.faq-anchor:hover {
  background: rgba(122, 90, 248, 0.18);
  transform: translateY(-1px);
}

.faq-anchor svg {
  width: 14px;
  height: 14px;
}

/* Beautify FAQ items to match calculator card aesthetics */
.faq-item {
  border: 1px solid rgba(122, 90, 248, 0.12);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,255,255,0.96), rgba(246,243,255,0.95));
  padding: 1.25rem 1.5rem;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.faq-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 45px rgba(15, 23, 42, 0.1);
}

.faq-item p {
  margin-top: 0.8rem;
  color: #4a4a4a;
  line-height: 1.6;
}
.share-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #10b981, #059669);
  color: #f0fff4;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.35);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 9999;
}

.share-toast.visible {
  opacity: 1;
  transform: translate(-50%, -0.25rem);
}

/* Shared calculator component classes */
.next-steps-cta {
  display: block;
  padding: 0.75rem 1.5rem;
  border-left: 4px solid #7a5af8;
  background: #f8f9ff;
  border-radius: 6px;
  margin: 0.75rem 0 0;
}
.next-steps-cta a {
  color: #7a5af8;
  text-decoration: none;
}
.next-steps-cta a:first-of-type {
  margin-left: 0.5rem;
}

/* Per-calculator variants */
.next-steps-cta.mortgage {
  border-left-color: #6366f1;
  background: #f5f7ff;
}
.next-steps-cta.mortgage a { color: #6366f1; }

.next-steps-cta.refi {
  border-left-color: #f59e0b;
  background: #fff8eb;
}
.next-steps-cta.refi a { color: #d97706; }

.next-steps-cta.affordability {
  border-left-color: #7a5af8;
  background: #f8f9ff;
}
.next-steps-cta.affordability a { color: #7a5af8; }

/* Related guides section */
.related-guides-section {
  margin-top: 1rem;
  padding: 1.5rem;
  background: #f8f9fa;
  border-left: 4px solid #7a5af8;
  border-radius: 4px;
}
.related-guides-section h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: #333;
}
.related-guides-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.related-guides-section li { margin-bottom: 0.5rem; }
.related-guides-section a {
  color: #7a5af8;
  text-decoration: none;
  font-weight: 500;
}

/* Tables */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.comparison-table thead th {
  background: #6366f1;
  color: #fff;
  padding: 1rem;
  text-align: left;
}
.comparison-table tbody td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}
.comparison-table tbody tr:last-child td { border-bottom: none; }

/* Chart sizing */
.chart-container-sm {
  height: clamp(280px, 48vh, 420px);
  position: relative;
}
.chart-container-sm canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* Disclaimer warning box */
.disclaimer-warning {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-left: 5px solid #f59e0b;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  color: #78350f;
}
.disclaimer-warning h3 {
  margin: 0 0 0.6rem;
  color: #92400e;
  font-size: 1.1rem;
  font-weight: 700;
}
.disclaimer-warning p { margin: 0.75rem 0; line-height: 1.6; }
.disclaimer-warning details { margin-top: 0.75rem; }
.disclaimer-warning summary { cursor: pointer; font-weight: 600; color: #92400e; }
.disclaimer-warning a { color: #92400e; }

/* Simple info card */
.info-box {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 8px 20px rgba(15,23,42,0.06);
}

/* Additional CTA variants */
.next-steps-cta.rvb {
  border-left-color: #7a5af8;
  background: #f8f9ff;
}
.next-steps-cta.rvb a { color: #7a5af8; }

.next-steps-cta.airbnb {
  border-left-color: #f59e0b;
  background: #fff7ed;
}
.next-steps-cta.airbnb a { color: #d97706; }

.next-steps-cta.fix {
  border-left-color: #10b981;
  background: #ecfdf5;
}
.next-steps-cta.fix a { color: #047857; }

/* Utility helpers */
.is-hidden { display: none; }
