/* Tax Pilot AI - Homepage UX enhancement layer (post-mount) */

/* 1. Top-edge reading progress bar */
.tpx-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  z-index: 999;
  pointer-events: none;
  background: linear-gradient(90deg, #4fee64, #38d5c5 55%, #2c35dd);
  box-shadow: 0 0 18px color-mix(in srgb, #4fee64 60%, transparent);
  transition: width .08s linear, opacity .25s ease;
  opacity: 0;
}
.tpx-progress.is-visible { opacity: 1; }

/* 2. Sticky CTA banner - centered on desktop, full-width pill on mobile.
      Hide ONLY the SPA's duplicate .floating-cta. The back-to-top button stays
      (deduped to a single instance by JS). */
.floating-cta { display: none !important; }

/* Force the modal close-button X to render both diagonals (defensive). */
.modal__close span { display: block !important; }
.modal__close span:first-child { transform: rotate(45deg) !important; }
.modal__close span:last-child  { transform: rotate(-45deg) !important; }

.tpx-sticky-cta {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translate(-50%, 140%);
  z-index: 95;
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  padding: .55rem .55rem .55rem 1.1rem;
  border-radius: 999px;
  background: color-mix(in srgb, #0f1f33 92%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid color-mix(in srgb, #4fee64 35%, transparent);
  box-shadow: 0 22px 40px -16px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.04);
  color: #f5f7fb;
  font-family: inherit;
  font-size: .9rem;
  font-weight: 500;
  letter-spacing: .01em;
  white-space: nowrap;
  max-width: min(560px, calc(100vw - 2rem));
  opacity: 0;
  transition: transform .35s cubic-bezier(.2,.85,.3,1), opacity .25s ease;
}
.tpx-sticky-cta.is-visible { transform: translate(-50%, 0); opacity: 1; }
.tpx-sticky-cta__label { opacity: .85; }
.tpx-sticky-cta__cta {
  background: linear-gradient(135deg, #4fee64, #38d5c5);
  color: #07111f;
  border: 0;
  padding: .5rem 1.1rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: .85rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  transition: transform .15s ease, box-shadow .15s ease;
}
.tpx-sticky-cta__cta:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -8px rgba(79,238,100,.55); }
.tpx-sticky-cta__close {
  background: transparent;
  border: 0;
  color: inherit;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  opacity: .55;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.tpx-sticky-cta__close:hover { opacity: 1; background: color-mix(in srgb, currentColor 10%, transparent); }
:root[data-theme="light"] .tpx-sticky-cta {
  background: color-mix(in srgb, #f7faff 92%, transparent);
  color: #0c1424;
  border-color: color-mix(in srgb, #4fee64 50%, transparent);
}
/* Mobile: full-width sticky bar at the bottom of the viewport. */
@media (max-width: 760px) {
  .tpx-sticky-cta {
    left: 0;
    right: 0;
    bottom: 0;
    transform: translateY(110%);
    max-width: none;
    width: 100%;
    border-radius: 18px 18px 0 0;
    padding: .85rem 1rem .95rem;
    gap: .6rem;
    justify-content: space-between;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    box-shadow: 0 -18px 36px -18px rgba(0,0,0,.55);
  }
  .tpx-sticky-cta.is-visible { transform: translateY(0); }
  .tpx-sticky-cta__label {
    display: inline-block;
    flex: 1;
    min-width: 0;
    white-space: normal;
    font-size: .82rem;
    line-height: 1.3;
    opacity: .9;
  }
  .tpx-sticky-cta__cta { padding: .65rem 1.25rem; font-size: .9rem; }
  .tpx-sticky-cta__close { width: 28px; height: 28px; flex-shrink: 0; }
}

/* 3. Section navigation dots (right-side rail) */
.tpx-dots {
  position: fixed;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  padding: .55rem .35rem;
  border-radius: 999px;
  background: color-mix(in srgb, currentColor 6%, transparent);
  backdrop-filter: blur(6px);
  border: 1px solid color-mix(in srgb, currentColor 14%, transparent);
  opacity: 0;
  transition: opacity .3s ease;
}
.tpx-dots.is-ready { opacity: 1; }
.tpx-dots__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  background: color-mix(in srgb, currentColor 30%, transparent);
  padding: 0;
  position: relative;
  transition: background .2s ease, transform .2s ease;
}
.tpx-dots__dot:hover { transform: scale(1.25); background: color-mix(in srgb, #4fee64 70%, transparent); }
.tpx-dots__dot.is-active {
  background: linear-gradient(135deg, #4fee64, #38d5c5);
  box-shadow: 0 0 10px color-mix(in srgb, #4fee64 50%, transparent);
}
.tpx-dots__dot::after {
  content: attr(data-label);
  position: absolute;
  right: calc(100% + .85rem);
  top: 50%;
  transform: translateY(-50%);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .04em;
  white-space: nowrap;
  background: color-mix(in srgb, #0f1f33 92%, transparent);
  color: #f5f7fb;
  padding: .25rem .55rem;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
}
.tpx-dots__dot:hover::after { opacity: 1; transform: translateY(-50%) translateX(-2px); }
@media (max-width: 1100px) { .tpx-dots { display: none; } }

/* 4. Reveal-on-scroll for sections */
.tpx-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s cubic-bezier(.2,.85,.3,1), transform .7s cubic-bezier(.2,.85,.3,1);
  will-change: opacity, transform;
}
.tpx-reveal.is-revealed { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .tpx-reveal { opacity: 1; transform: none; transition: none; }
}

/* 5. (removed) - using the site's existing .back-to-top button to avoid duplicates */

/* 6. Animated number counter highlight */
.tpx-stat-num { font-variant-numeric: tabular-nums; }

/* 7. Latest-from-blog teaser */
.tpx-latest {
  padding: 4.5rem 1.5rem 4.5rem;
  position: relative;
  z-index: 2;
}
.tpx-latest__inner {
  max-width: 1180px;
  margin: 0 auto;
}
.tpx-latest__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 2rem;
}
.tpx-latest__eyebrow {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #4fee64, #38d5c5);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: .65rem;
}
.tpx-latest__title {
  font-family: "Poppins", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(1.65rem, 2.2vw, 2.25rem);
  line-height: 1.2;
  margin: 0;
}
.tpx-latest__title em { font-style: normal; background: linear-gradient(135deg, #4fee64, #38d5c5); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tpx-latest__more {
  font-weight: 600;
  font-size: .9rem;
  letter-spacing: .02em;
  text-decoration: none;
  color: inherit;
  border: 1px solid color-mix(in srgb, currentColor 25%, transparent);
  padding: .55rem 1.1rem;
  border-radius: 999px;
  transition: background .15s ease, border-color .15s ease;
  display: inline-flex;
  gap: .35rem;
  align-items: center;
}
.tpx-latest__more:hover { background: color-mix(in srgb, currentColor 8%, transparent); border-color: color-mix(in srgb, #4fee64 60%, transparent); }
.tpx-latest__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
}
@media (max-width: 980px) { .tpx-latest__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .tpx-latest__grid { grid-template-columns: 1fr; } }
.tpx-latest__card {
  position: relative;
  display: block;
  padding: 1.5rem 1.4rem 1.35rem;
  border-radius: 18px;
  background: color-mix(in srgb, currentColor 4%, transparent);
  border: 1px solid color-mix(in srgb, currentColor 12%, transparent);
  text-decoration: none;
  color: inherit;
  transition: transform .25s cubic-bezier(.2,.85,.3,1), border-color .25s ease, background .25s ease;
  overflow: hidden;
}
.tpx-latest__card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(540px 240px at top right, var(--tpx-accent, color-mix(in srgb, #4fee64 18%, transparent)), transparent 60%);
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
}
.tpx-latest__card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, #4fee64 55%, transparent);
}
.tpx-latest__card:hover::before { opacity: 1; }
.tpx-latest__pill {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: .25rem .65rem;
  border-radius: 999px;
  background: color-mix(in srgb, currentColor 10%, transparent);
  margin-bottom: .85rem;
}
.tpx-latest__h {
  font-family: "Poppins", system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.32;
  margin: 0 0 .55rem;
}
.tpx-latest__p {
  font-size: .9rem;
  line-height: 1.5;
  opacity: .75;
  margin: 0 0 1.1rem;
}
.tpx-latest__cta {
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .03em;
  opacity: .9;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.tpx-latest__cta::after {
  content: '\2192';
  transition: transform .2s ease;
}
.tpx-latest__card:hover .tpx-latest__cta::after { transform: translateX(4px); }

/* 8. Keyboard shortcut overlay */
.tpx-help {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.tpx-help.is-open { display: flex; }
.tpx-help__panel {
  width: min(440px, 100%);
  background: #0f1f33;
  color: #f5f7fb;
  border-radius: 18px;
  padding: 1.6rem 1.65rem 1.5rem;
  border: 1px solid color-mix(in srgb, #4fee64 35%, transparent);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.6);
}
:root[data-theme="light"] .tpx-help__panel { background: #fff; color: #0c1424; }
.tpx-help__h {
  font-family: "Poppins", system-ui, sans-serif;
  font-weight: 700;
  margin: 0 0 .85rem;
  font-size: 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tpx-help__close {
  background: transparent; border: 0; color: inherit; opacity: .6;
  font-size: 1rem; cursor: pointer; width: 28px; height: 28px;
  border-radius: 50%;
}
.tpx-help__close:hover { opacity: 1; background: color-mix(in srgb, currentColor 12%, transparent); }
.tpx-help__list { display: grid; gap: .55rem; margin: 0; padding: 0; list-style: none; }
.tpx-help__row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.tpx-help__row span { font-size: .9rem; opacity: .85; }
.tpx-help kbd {
  display: inline-block;
  padding: 2px 7px;
  font: inherit;
  font-size: .72rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  border-radius: 5px;
  border: 1px solid color-mix(in srgb, currentColor 28%, transparent);
  background: color-mix(in srgb, currentColor 14%, transparent);
  margin: 0 .15rem;
}

/* 9. Active nav highlight ring */
.desktop-nav a.tpx-current,
.mobile-nav a.tpx-current {
  position: relative;
  color: inherit;
}
.desktop-nav a.tpx-current::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  bottom: -6px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #4fee64, #38d5c5);
}

/* ---------- v2 additions ---------- */

/* Smart sticky header - hide on scroll down, show on scroll up */
.site-header { transition: transform .28s cubic-bezier(.2,.85,.3,1); }
.site-header.tpx-hide { transform: translateY(-110%); }
.site-header.tpx-condensed {
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 14px 28px -22px rgba(0,0,0,.45);
}

/* Toast notifications */
.tpx-toast-rail {
  position: fixed;
  right: 1.15rem;
  bottom: 1.15rem;
  z-index: 250;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  pointer-events: none;
  max-width: 22rem;
}
@media (max-width: 540px) {
  .tpx-toast-rail { right: .75rem; left: .75rem; max-width: none; bottom: 5.2rem; }
}
.tpx-toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .7rem .95rem .7rem .85rem;
  border-radius: 13px;
  background: color-mix(in srgb, #0f1f33 94%, transparent);
  backdrop-filter: blur(12px);
  color: #f5f7fb;
  border: 1px solid color-mix(in srgb, #4fee64 35%, transparent);
  box-shadow: 0 16px 32px -16px rgba(0,0,0,.55);
  font-size: .88rem;
  line-height: 1.35;
  transform: translateX(120%);
  opacity: 0;
  transition: transform .3s cubic-bezier(.2,.85,.3,1), opacity .25s ease;
}
@media (max-width: 540px) {
  .tpx-toast { transform: translateY(120%); }
}
.tpx-toast.is-visible { transform: translateX(0); opacity: 1; }
@media (max-width: 540px) {
  .tpx-toast.is-visible { transform: translateY(0); }
}
.tpx-toast__icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4fee64, #38d5c5);
  color: #07111f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .8rem;
  flex-shrink: 0;
}
:root[data-theme="light"] .tpx-toast {
  background: rgba(255,255,255,.96);
  color: #0c1424;
}

/* Command palette */
.tpx-cmd {
  position: fixed;
  inset: 0;
  z-index: 220;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(8px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 9vh 1.25rem 1.5rem;
  animation: tpx-fade .18s ease;
}
.tpx-cmd.is-open { display: flex; }
.tpx-cmd__panel {
  width: min(560px, 100%);
  background: #0f1f33;
  color: #f5f7fb;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, #4fee64 35%, transparent);
  box-shadow: 0 30px 70px -25px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.04);
  display: flex;
  flex-direction: column;
  max-height: 70vh;
  overflow: hidden;
}
:root[data-theme="light"] .tpx-cmd__panel { background: #fff; color: #0c1424; }
.tpx-cmd__head {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .8rem 1.05rem;
  border-bottom: 1px solid color-mix(in srgb, currentColor 12%, transparent);
}
.tpx-cmd__head svg { width: 18px; height: 18px; opacity: .55; flex-shrink: 0; }
.tpx-cmd__input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  font: inherit;
  color: inherit;
  font-size: 1rem;
}
.tpx-cmd__input::placeholder { opacity: .55; }
.tpx-cmd__hint {
  font-size: .68rem;
  opacity: .55;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.tpx-cmd__hint kbd {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  background: color-mix(in srgb, currentColor 14%, transparent);
  padding: 2px 6px;
  border-radius: 5px;
  font-size: .68rem;
}
.tpx-cmd__results {
  flex: 1;
  overflow-y: auto;
  padding: .45rem .5rem .65rem;
}
.tpx-cmd__group {
  margin-top: .55rem;
}
.tpx-cmd__group:first-child { margin-top: 0; }
.tpx-cmd__group-label {
  padding: .45rem .65rem .25rem;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .5;
}
.tpx-cmd__item {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .55rem .7rem;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  font-size: .92rem;
  line-height: 1.3;
  transition: background .12s ease;
}
.tpx-cmd__item:hover,
.tpx-cmd__item.is-active {
  background: color-mix(in srgb, currentColor 10%, transparent);
}
.tpx-cmd__item-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: color-mix(in srgb, #4fee64 22%, transparent);
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 700;
  flex-shrink: 0;
}
.tpx-cmd__item-meta {
  font-size: .72rem;
  opacity: .55;
  margin-top: 2px;
}
.tpx-cmd__item-body { flex: 1; min-width: 0; }
.tpx-cmd__item mark { background: color-mix(in srgb, #4fee64 30%, transparent); color: inherit; padding: 0 2px; border-radius: 3px; }
.tpx-cmd__empty { padding: 1.5rem 1rem; text-align: center; opacity: .55; font-size: .88rem; }
@keyframes tpx-fade { from { opacity: 0; } to { opacity: 1; } }

/* Newsletter signup widget inside latest-from-blog */
.tpx-newsletter {
  margin: 2.25rem 0 0;
  padding: 1.5rem 1.5rem 1.4rem;
  border-radius: 18px;
  background: linear-gradient(135deg,
    color-mix(in srgb, #4fee64 14%, transparent),
    color-mix(in srgb, #38d5c5 8%, transparent) 50%,
    color-mix(in srgb, #2c35dd 14%, transparent));
  border: 1px solid color-mix(in srgb, #4fee64 28%, transparent);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.5rem;
  align-items: center;
}
@media (max-width: 720px) { .tpx-newsletter { grid-template-columns: 1fr; } }
.tpx-newsletter__h {
  font-family: "Poppins", system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  margin: 0 0 .35rem;
  line-height: 1.25;
}
.tpx-newsletter__p { font-size: .9rem; opacity: .75; margin: 0; line-height: 1.45; }
.tpx-newsletter__form {
  display: flex;
  gap: .5rem;
  background: color-mix(in srgb, currentColor 8%, transparent);
  padding: .4rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
}
.tpx-newsletter__input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  font: inherit;
  color: inherit;
  font-size: .92rem;
  padding: .35rem .85rem;
}
.tpx-newsletter__input::placeholder { opacity: .55; }
.tpx-newsletter__btn {
  background: linear-gradient(135deg, #4fee64, #38d5c5);
  color: #07111f;
  border: 0;
  border-radius: 999px;
  padding: .55rem 1.1rem;
  font: inherit;
  font-weight: 700;
  font-size: .85rem;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.tpx-newsletter__btn:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -10px rgba(79,238,100,.55); }

/* Cmd+K hint chip inside the header (optional, kept small + non-intrusive) */
.tpx-cmdhint {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .65rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .03em;
  background: color-mix(in srgb, currentColor 8%, transparent);
  border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
  cursor: pointer;
  color: inherit;
  opacity: .8;
}
.tpx-cmdhint:hover { opacity: 1; background: color-mix(in srgb, currentColor 14%, transparent); }
.tpx-cmdhint kbd {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .68rem;
  padding: 1px 5px;
  border-radius: 4px;
  background: color-mix(in srgb, currentColor 15%, transparent);
}
@media (max-width: 820px) { .tpx-cmdhint { display: none; } }

/* ---------- v2.3 - cleanup + corner safety ---------- */

/* Hide any leftover Cmd-K chip in the header. */
.tpx-cmdhint { display: none !important; }

/* Hide duplicate back-to-top buttons tagged by JS dedupe. */
.back-to-top[data-tpx-dup="1"] { display: none !important; }

/* Lift the toast rail above the CTA bar so toasts don't sit on the pill. */
body.tpx-has-cta .tpx-toast-rail { bottom: 5rem; }

@media (max-width: 760px) {
  /* Mobile: CTA is a full-width bar at the very bottom.
     Push the back-to-top button above it so they don't overlap. */
  body.tpx-has-cta .back-to-top {
    bottom: 5.5rem !important;
    transition: bottom .3s cubic-bezier(.2,.85,.3,1) !important;
  }
  body.tpx-has-cta .tpx-toast-rail { bottom: 6rem; }
}

/* ---------- v2.4 - home sticky menu parity + UI polish ---------- */

html {
  scroll-padding-top: 96px;
}

body .site-header,
body .site-header.is-scrolled,
body .site-header.tpx-condensed {
  position: sticky !important;
  top: 0 !important;
  z-index: 120 !important;
  transform: translateY(0) !important;
}

body .site-header.tpx-hide {
  transform: translateY(0) !important;
}

body .site-header .header__inner {
  transition:
    min-height .22s cubic-bezier(.2,.85,.3,1),
    padding .22s cubic-bezier(.2,.85,.3,1),
    border-color .22s ease,
    box-shadow .22s ease,
    background .22s ease;
}

body .site-header.tpx-condensed .header__inner,
body .site-header.is-scrolled .header__inner {
  min-height: 62px;
  border-color: color-mix(in srgb, #38d5c5 26%, transparent) !important;
  box-shadow:
    0 22px 55px -34px rgba(0,0,0,.75),
    inset 0 1px 0 rgba(255,255,255,.08) !important;
}

body .desktop-nav {
  padding: .22rem;
  border-radius: 999px;
  background: color-mix(in srgb, currentColor 5%, transparent);
  border: 1px solid color-mix(in srgb, currentColor 10%, transparent);
}

body .desktop-nav a {
  position: relative;
  border-radius: 999px;
  padding: .52rem .82rem;
  transition:
    color .18s ease,
    background .18s ease,
    transform .18s cubic-bezier(.2,.85,.3,1);
}

body .desktop-nav a:hover,
body .desktop-nav a.tpx-current {
  color: #38d5c5 !important;
  background: color-mix(in srgb, #38d5c5 12%, transparent);
  transform: translateY(-1px);
}

body .desktop-nav a[href="/blog/"]::before,
body .mobile-nav a[href="/blog/"]::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: .45rem;
  border-radius: 999px;
  background: #4fee64;
  box-shadow: 0 0 0 4px color-mix(in srgb, #4fee64 16%, transparent);
  vertical-align: middle;
}

body .header__actions .btn,
body .hero__actions .btn,
body .cta-panel .btn,
body .modal-form .btn,
body .email-form .btn {
  min-height: 44px;
}

body .header__actions .btn--primary {
  box-shadow: 0 14px 34px -22px rgba(79,238,100,.65);
}

body .hero__content {
  max-width: 720px;
}

body .hero__lede {
  text-wrap: pretty;
}

body .hero__highlights {
  align-items: stretch;
}

body .hero__highlights span {
  min-height: 40px;
  justify-content: center;
  border-color: color-mix(in srgb, #38d5c5 18%, transparent);
}

body .hero__actions {
  gap: .85rem !important;
}

body .hero__actions .btn {
  box-shadow: 0 16px 42px -28px rgba(0,0,0,.7);
}

body .hero__microcopy {
  padding: .7rem .9rem;
  border-radius: 14px;
  width: fit-content;
  max-width: 100%;
  border: 1px solid color-mix(in srgb, currentColor 12%, transparent);
  background: color-mix(in srgb, currentColor 5%, transparent);
}

body .feature-card,
body .use-case-card,
body .step-card,
body .plan-card,
body .faq-item,
body .tpx-latest__card {
  transition:
    transform .22s cubic-bezier(.2,.85,.3,1),
    border-color .22s ease,
    box-shadow .22s ease,
    background .22s ease;
}

body .feature-card:hover,
body .use-case-card:hover,
body .step-card:hover,
body .plan-card:hover,
body .tpx-latest__card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, #38d5c5 34%, transparent) !important;
  box-shadow: 0 28px 72px -48px rgba(0,0,0,.82), 0 0 0 1px color-mix(in srgb, #38d5c5 16%, transparent);
}

body .email-form,
body .modal-form {
  border-color: color-mix(in srgb, #38d5c5 20%, transparent);
}

body .email-form label,
body .modal-form label {
  gap: .45rem;
}

body .email-form input,
body .email-form select,
body .email-form textarea,
body .modal-form input,
body .modal-form select,
body .modal-form textarea {
  min-height: 46px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

body .email-form input:focus,
body .email-form select:focus,
body .email-form textarea:focus,
body .modal-form input:focus,
body .modal-form select:focus,
body .modal-form textarea:focus {
  border-color: color-mix(in srgb, #38d5c5 62%, transparent) !important;
  box-shadow: 0 0 0 4px color-mix(in srgb, #38d5c5 18%, transparent) !important;
}

body .faq-item summary {
  cursor: pointer;
}

body .faq-item[open] {
  border-color: color-mix(in srgb, #38d5c5 32%, transparent) !important;
  background: color-mix(in srgb, #38d5c5 7%, transparent);
}

:root[data-theme="light"] body .desktop-nav {
  background: rgba(255,255,255,.64);
  border-color: rgba(18,54,93,.1);
}

:root[data-theme="light"] body .hero__microcopy,
:root[data-theme="light"] body .faq-item[open] {
  background: rgba(255,255,255,.72);
}

@media (max-width: 1023px) {
  html {
    scroll-padding-top: 84px;
  }

  body .site-header,
  body .site-header.is-scrolled,
  body .site-header.tpx-condensed {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
  }

  body .mobile-menu {
    position: fixed !important;
    top: var(--header-height, 76px);
    left: 0;
    right: 0;
    z-index: 119;
    max-height: calc(100vh - var(--header-height, 76px));
    overflow: auto;
  }

  body .mobile-menu__inner {
    box-shadow: 0 24px 70px -38px rgba(0,0,0,.76);
  }
}

@media (max-width: 760px) {
  body .hero__actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }

  body .hero__actions .btn,
  body .hero__microcopy {
    width: 100%;
  }

  body .hero__highlights {
    display: grid;
    grid-template-columns: 1fr;
  }

  body .tpx-latest {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  body .tpx-newsletter__form {
    border-radius: 18px;
    display: grid;
  }

  body .tpx-newsletter__btn {
    width: 100%;
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body .desktop-nav a,
  body .feature-card,
  body .use-case-card,
  body .step-card,
  body .plan-card,
  body .tpx-latest__card,
  body .site-header .header__inner {
    transition: none !important;
  }
}

/* ---------- v2.5 - modal/header stacking fix ---------- */
body .modal {
  z-index: 320 !important;
  align-items: start !important;
  place-items: start center !important;
  padding:
    max(112px, calc(var(--header-height, 76px) + 28px + env(safe-area-inset-top)))
    16px
    max(24px, calc(24px + env(safe-area-inset-bottom))) !important;
}

body .modal__backdrop {
  z-index: 0 !important;
}

body .modal__dialog {
  z-index: 1 !important;
  max-height: calc(100dvh - max(112px, calc(var(--header-height, 76px) + 28px + env(safe-area-inset-top))) - max(24px, calc(24px + env(safe-area-inset-bottom)))) !important;
  margin: 0 auto !important;
}

body .modal__close {
  z-index: 3 !important;
}

body.is-locked .site-header,
body.is-locked .site-header.is-scrolled,
body.is-locked .site-header.tpx-condensed {
  z-index: 110 !important;
}

body.is-locked .tpx-sticky-cta,
body.is-locked .back-to-top,
body.is-locked .tpx-dots {
  display: none !important;
}

@media (max-width: 760px) {
  body .modal {
    padding:
      max(88px, calc(var(--header-height, 68px) + 14px + env(safe-area-inset-top)))
      10px
      max(14px, calc(14px + env(safe-area-inset-bottom))) !important;
  }

  body .modal__dialog {
    width: min(100%, 720px) !important;
    max-width: calc(100vw - 20px) !important;
    max-height: calc(100dvh - max(88px, calc(var(--header-height, 68px) + 14px + env(safe-area-inset-top))) - max(14px, calc(14px + env(safe-area-inset-bottom)))) !important;
    border-radius: 22px !important;
  }
}

/* ---------- v2.6 - hero quick actions ---------- */
.tpx-quick-actions {
  position: relative;
  z-index: 3;
  margin: clamp(-2.2rem, -2vw, -1rem) auto 0;
  padding: 0 1.5rem clamp(2.6rem, 5vw, 4.2rem);
}

.tpx-quick-actions__inner {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .9rem;
  padding: .75rem;
  border-radius: 24px;
  border: 1px solid color-mix(in srgb, #38d5c5 22%, transparent);
  background:
    linear-gradient(180deg, color-mix(in srgb, #ffffff 8%, transparent), color-mix(in srgb, #ffffff 3%, transparent)),
    color-mix(in srgb, #07111f 72%, transparent);
  box-shadow: 0 32px 80px -54px rgba(0,0,0,.86), inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter: blur(16px) saturate(130%);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
}

.tpx-quick-card {
  appearance: none;
  border: 1px solid color-mix(in srgb, currentColor 10%, transparent);
  border-radius: 18px;
  min-height: 86px;
  padding: 1rem;
  background: color-mix(in srgb, currentColor 5%, transparent);
  color: inherit;
  display: flex;
  align-items: center;
  gap: .85rem;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
  transition:
    transform .2s cubic-bezier(.2,.85,.3,1),
    border-color .2s ease,
    background .2s ease,
    box-shadow .2s ease;
}

.tpx-quick-card:hover,
.tpx-quick-card:focus-visible {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, #38d5c5 42%, transparent);
  background: color-mix(in srgb, #38d5c5 10%, transparent);
  box-shadow: 0 22px 46px -34px rgba(0,0,0,.78);
}

.tpx-quick-card:focus-visible {
  outline: 2px solid color-mix(in srgb, #38d5c5 78%, transparent);
  outline-offset: 3px;
}

.tpx-quick-card__icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .78rem;
  font-weight: 800;
  color: #07111f;
  background: linear-gradient(135deg, #4fee64, #38d5c5);
  box-shadow: 0 14px 28px -18px rgba(79,238,100,.7);
}

.tpx-quick-card strong {
  display: block;
  font-size: .98rem;
  line-height: 1.2;
}

.tpx-quick-card em {
  display: block;
  margin-top: .25rem;
  color: color-mix(in srgb, currentColor 68%, transparent);
  font-size: .84rem;
  font-style: normal;
  line-height: 1.35;
}

:root[data-theme="light"] .tpx-quick-actions__inner {
  background:
    linear-gradient(180deg, rgba(255,255,255,.92), rgba(246,249,255,.82)),
    rgba(255,255,255,.7);
  border-color: rgba(18,54,93,.12);
  box-shadow: 0 28px 70px -48px rgba(38,82,140,.36);
}

:root[data-theme="light"] .tpx-quick-card {
  background: rgba(255,255,255,.68);
}

@media (max-width: 880px) {
  .tpx-quick-actions {
    margin-top: 0;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .tpx-quick-actions__inner {
    grid-template-columns: 1fr;
    padding: .6rem;
    border-radius: 20px;
  }

  .tpx-quick-card {
    min-height: 74px;
    padding: .9rem;
  }
}

/* ---------- v2.7 - savings calculator ---------- */
.tpx-savings {
  position: relative;
  z-index: 3;
  padding: clamp(3rem, 6vw, 5rem) 1.5rem;
}

.tpx-savings__inner {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(360px, 1.1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: 28px;
  border: 1px solid color-mix(in srgb, #38d5c5 24%, transparent);
  background:
    radial-gradient(80% 110% at 0% 0%, color-mix(in srgb, #4fee64 12%, transparent), transparent 58%),
    radial-gradient(70% 100% at 100% 100%, color-mix(in srgb, #2c35dd 18%, transparent), transparent 60%),
    color-mix(in srgb, #07111f 76%, transparent);
  box-shadow: 0 34px 90px -58px rgba(0,0,0,.88), inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter: blur(16px) saturate(130%);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
}

.tpx-savings__eyebrow {
  display: inline-flex;
  margin-bottom: .8rem;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #38d5c5;
}

.tpx-savings__copy h2 {
  margin: 0 0 .8rem;
  font-family: "Poppins", system-ui, sans-serif;
  font-size: clamp(1.65rem, 3vw, 2.55rem);
  line-height: 1.12;
  text-wrap: balance;
}

.tpx-savings__copy p {
  margin: 0;
  max-width: 54ch;
  color: color-mix(in srgb, currentColor 72%, transparent);
  line-height: 1.65;
}

.tpx-savings__panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem;
  padding: 1rem;
  border-radius: 22px;
  border: 1px solid color-mix(in srgb, currentColor 12%, transparent);
  background: color-mix(in srgb, currentColor 5%, transparent);
}

.tpx-savings__panel label {
  display: grid;
  gap: .45rem;
  color: color-mix(in srgb, currentColor 76%, transparent);
  font-size: .86rem;
  font-weight: 650;
}

.tpx-savings__panel input[type="number"] {
  width: 100%;
  min-height: 48px;
  border: 1px solid color-mix(in srgb, currentColor 14%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, currentColor 7%, transparent);
  color: inherit;
  padding: 0 .85rem;
  font: inherit;
  font-size: 1rem;
}

.tpx-savings__panel input[type="range"] {
  width: 100%;
  accent-color: #38d5c5;
}

.tpx-savings__panel label:has(input[type="range"]) {
  grid-column: 1 / -1;
  grid-template-columns: 1fr auto;
  align-items: center;
}

.tpx-savings__panel label:has(input[type="range"]) input {
  grid-column: 1 / -1;
}

.tpx-savings__panel label strong {
  color: #38d5c5;
  font-size: .95rem;
}

.tpx-savings__results {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
}

.tpx-savings__results div {
  padding: 1rem;
  border-radius: 18px;
  background: linear-gradient(180deg, color-mix(in srgb, #38d5c5 12%, transparent), color-mix(in srgb, currentColor 5%, transparent));
  border: 1px solid color-mix(in srgb, #38d5c5 20%, transparent);
}

.tpx-savings__results span {
  display: block;
  color: color-mix(in srgb, currentColor 64%, transparent);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.tpx-savings__results strong {
  display: block;
  margin-top: .3rem;
  font-family: "Poppins", system-ui, sans-serif;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  line-height: 1;
}

.tpx-savings__cta {
  grid-column: 1 / -1;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #4fee64, #38d5c5);
  color: #07111f;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform .18s cubic-bezier(.2,.85,.3,1), box-shadow .18s ease;
}

.tpx-savings__cta:hover,
.tpx-savings__cta:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px -18px rgba(79,238,100,.7);
}

:root[data-theme="light"] .tpx-savings__inner {
  background:
    radial-gradient(80% 110% at 0% 0%, rgba(79,238,100,.13), transparent 58%),
    radial-gradient(70% 100% at 100% 100%, rgba(44,53,221,.1), transparent 60%),
    rgba(255,255,255,.82);
  border-color: rgba(18,54,93,.12);
  box-shadow: 0 28px 80px -52px rgba(38,82,140,.34);
}

:root[data-theme="light"] .tpx-savings__panel,
:root[data-theme="light"] .tpx-savings__panel input[type="number"] {
  background: rgba(255,255,255,.72);
}

@media (max-width: 900px) {
  .tpx-savings {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .tpx-savings__inner {
    grid-template-columns: 1fr;
    border-radius: 22px;
  }

  .tpx-savings__panel {
    grid-template-columns: 1fr;
  }

  .tpx-savings__results {
    grid-template-columns: 1fr;
  }
}

/* ---------- v2.8 - tighten quiet home-page gaps ---------- */
.use-cases.section {
  padding-top: clamp(4.25rem, 6vw, 5.75rem) !important;
  padding-bottom: clamp(1.5rem, 2.5vw, 2.5rem) !important;
  margin-bottom: clamp(-3.5rem, -4vw, -2rem) !important;
}

.use-cases .section-heading {
  margin-bottom: clamp(1.35rem, 2.4vw, 2rem) !important;
}

.use-case-grid {
  align-items: stretch;
}

.use-cases + .tpx-savings {
  margin-top: clamp(-3rem, -4vw, -1.5rem);
  padding-top: clamp(1.75rem, 3vw, 2.75rem);
}

.tpx-savings + .pricing.section,
.use-cases + .pricing.section {
  padding-top: clamp(2.25rem, 3.5vw, 3.5rem) !important;
}

@media (min-width: 981px) {
  .process-model-section.section {
    padding-bottom: clamp(4rem, 6vw, 5.75rem) !important;
  }

  .process-model__stage {
    min-height: clamp(470px, 43vw, 540px) !important;
    grid-template-rows: repeat(6, minmax(58px, auto)) !important;
    align-content: center;
  }

  .process-step {
    min-height: 160px;
  }

  .process-core {
    width: min(224px, 100%);
  }
}

@media (max-width: 980px) {
  .use-cases.section {
    padding-top: 3.5rem !important;
    padding-bottom: 2rem !important;
    margin-bottom: -1.25rem !important;
  }

  .use-cases + .tpx-savings {
    margin-top: 0;
    padding-top: 2.75rem;
  }
}

/* ---------- v2.9 - make inserted calculator visible ---------- */
.tpx-savings.tpx-reveal {
  opacity: 1 !important;
  transform: none !important;
}

.tpx-savings {
  padding-top: clamp(1.5rem, 3vw, 2.6rem) !important;
  padding-bottom: clamp(2rem, 3.5vw, 3.25rem) !important;
}

.tpx-savings__inner {
  gap: clamp(1rem, 2.5vw, 1.65rem);
  padding: clamp(1rem, 2.2vw, 1.55rem);
}

.tpx-savings__copy h2 {
  font-size: clamp(1.45rem, 2.35vw, 2.1rem);
}

@media (min-width: 901px) {
  .tpx-savings__panel {
    gap: .7rem;
    padding: .85rem;
  }

  .tpx-savings__results div {
    padding: .8rem .9rem;
  }
}
