:root {
  --white: #ffffff;
  --paper: #f8fafc;
  --paper-2: #f2f5f9;
  --ink: #101828;
  --ink-soft: #344054;
  --muted: #667085;
  --line: #e4e7ec;
  --line-strong: #d0d5dd;
  --blue: #2161f0;
  --blue-light: #4f8cff;
  --blue-soft: #edf3ff;
  --green: #12a36f;
  --green-soft: #eafaf4;
  --danger: #d92d20;
  --black: #07101f;
  --container: 1220px;
  --header-height: 76px;
  --shadow-xs: 0 4px 14px rgba(16, 24, 40, 0.05);
  --shadow-sm: 0 10px 30px rgba(16, 24, 40, 0.08);
  --shadow-md: 0 22px 60px rgba(16, 24, 40, 0.11);
  --shadow-lg: 0 35px 95px rgba(16, 24, 40, 0.15);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.18, .89, .32, 1.28);
  --heading: "Hero", "Inter", sans-serif;
  --body: "Poppins", sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--white);
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body.is-loading,
body.menu-open {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

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

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3,
strong {
  font-family: var(--heading);
}

.container {
  width: min(calc(100% - 48px), var(--container));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 9999;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--white);
  font-size: 12px;
  transform: translateY(-150%);
  transition: transform 0.25s ease;
}

.skip-link:focus {
  transform: none;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 3000;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--green));
}

/* =========================================================
   LOADER
   ========================================================= */

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 22px;
  background: var(--white);
  transition:
    opacity 0.55s ease,
    visibility 0.55s ease;
}

.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.page-loader img {
  width: 145px;
  height: auto;
}

.loader-track {
  width: 180px;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}

.loader-track span {
  display: block;
  width: 45%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--green));
  animation: loader-slide 1.1s var(--ease) infinite;
}

/* =========================================================
   CORRECTED NAVBAR
   ========================================================= */

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 2000;
  border-bottom: 1px solid transparent;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(180%) blur(18px);
  transition:
    background 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s var(--ease);
}

.site-header.scrolled {
  border-color: rgba(228, 231, 236, 0.9);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 25px rgba(16, 24, 40, 0.05);
}

.nav-shell {
  display: grid;
  min-height: var(--header-height);
  grid-template-columns: 150px 1fr auto;
  align-items: center;
  gap: 30px;
}

.brand {
  display: inline-flex;
  width: fit-content;
  align-items: center;
}

.brand img {
  width: 128px;
  height: auto;
  object-fit: contain;
}

.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

.desktop-nav a {
  position: relative;
  padding: 28px 0 25px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.25s ease;
}

.desktop-nav a::after {
  position: absolute;
  right: 0;
  bottom: 18px;
  left: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--green));
  content: "";
  opacity: 0;
  transform: scaleX(0);
  transition:
    opacity 0.25s ease,
    transform 0.35s var(--ease);
}

.desktop-nav a:hover,
.desktop-nav a.active {
  color: var(--ink);
}

.desktop-nav a:hover::after,
.desktop-nav a.active::after {
  opacity: 1;
  transform: scaleX(1);
}

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

.text-link {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 500;
  transition: color 0.25s ease;
}

.text-link:hover {
  color: var(--blue);
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  transition:
    color 0.3s ease,
    background 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s var(--ease),
    transform 0.3s var(--ease);
}

.button i {
  font-style: normal;
  transition: transform 0.3s var(--ease);
}

.button:hover i {
  transform: translate(3px, -2px);
}

.button-small {
  min-height: 42px;
  padding-inline: 16px;
  font-size: 10px;
}

.button-dark {
  background: var(--ink);
  color: var(--white);
  box-shadow: 0 8px 22px rgba(16, 24, 40, 0.14);
}

.button-dark:hover {
  background: var(--blue);
  box-shadow: 0 12px 28px rgba(33, 97, 240, 0.22);
  transform: translateY(-2px);
}

.button-primary {
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 10px 26px rgba(33, 97, 240, 0.22);
}

.button-primary:hover {
  background: #144fd7;
  box-shadow: 0 15px 34px rgba(33, 97, 240, 0.27);
  transform: translateY(-2px);
}

.button-secondary {
  border-color: var(--line);
  background: var(--white);
  color: var(--ink);
}

.button-secondary:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  place-items: center;
  align-content: center;
  gap: 6px;
  border-radius: 50%;
  background: var(--paper);
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--ink);
  transition:
    transform 0.3s var(--ease),
    opacity 0.3s ease;
}

.menu-toggle.active span:first-child {
  transform: translateY(4px) rotate(45deg);
}

.menu-toggle.active span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  top: var(--header-height);
  right: 0;
  left: 0;
  display: none;
  height: calc(100dvh - var(--header-height));
  overflow: auto;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-14px);
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease,
    transform 0.35s var(--ease);
}

.mobile-menu.open {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.mobile-menu-inner {
  display: grid;
  width: min(calc(100% - 36px), 600px);
  margin-inline: auto;
  padding: 20px 0 40px;
}

.mobile-menu-inner > a {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
}

.mobile-menu-inner > a i {
  color: var(--muted);
  font-style: normal;
}

.mobile-menu-inner > a.active {
  color: var(--blue);
}

.mobile-discovery-button {
  min-height: 52px !important;
  justify-content: center !important;
  margin-top: 18px;
  border: 0 !important;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white) !important;
}

/* =========================================================
   REVEAL
   ========================================================= */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.8s var(--ease),
    transform 0.8s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

.delay-1 {
  transition-delay: 0.12s;
}

/* =========================================================
   HERO
   ========================================================= */

.calculator-hero {
  position: relative;
  min-height: 860px;
  overflow: clip;
  padding: 142px 0 50px;
  background:
    radial-gradient(circle at 86% 8%, rgba(33, 97, 240, 0.09), transparent 28%),
    linear-gradient(180deg, #ffffff, #f8faff 78%, #ffffff);
}

.hero-grid-pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(16, 24, 40, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 24, 40, 0.024) 1px, transparent 1px);
  background-size: 82px 82px;
  mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 82%, transparent);
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hero-orb-blue {
  top: 80px;
  right: -170px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(33, 97, 240, 0.11), transparent 68%);
}

.hero-orb-green {
  bottom: 20px;
  left: 24%;
  width: 410px;
  height: 410px;
  background: radial-gradient(circle, rgba(18, 163, 111, 0.07), transparent 70%);
}

.calculator-hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(540px, 1.14fr);
  align-items: center;
  gap: 55px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--blue);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow > span {
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--green));
}

.calculator-hero-copy h1 {
  max-width: 760px;
  margin-top: 22px;
  font-size: clamp(56px, 6.3vw, 82px);
  font-weight: 650;
  letter-spacing: -0.068em;
  line-height: 0.98;
}

.calculator-hero-copy h1 em {
  display: block;
  color: var(--blue);
  font-style: normal;
}

.calculator-hero-copy > p {
  max-width: 640px;
  margin-top: 23px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.72;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 27px;
}

.hero-proof {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 34px;
}

.hero-proof article {
  display: grid;
  gap: 5px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.hero-proof strong {
  font-size: 18px;
  line-height: 1.08;
}

.hero-proof span {
  color: var(--muted);
  font-size: 9px;
}

.calculator-hero-visual {
  position: relative;
  min-height: 620px;
  perspective: 1200px;
}

.finance-console {
  position: absolute;
  inset: 30px 26px 70px 34px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
}

.console-bar {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 0 17px;
  border-bottom: 1px solid var(--line);
  background: #f9fafb;
}

.console-bar > div {
  display: flex;
  gap: 6px;
}

.console-bar > div i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f97066;
}

.console-bar > div i:nth-child(2) {
  background: #fdb022;
}

.console-bar > div i:nth-child(3) {
  background: #32d583;
}

.console-bar > span {
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 600;
}

.console-bar small {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 7px;
}

.console-bar small b {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: live-dot 2s ease-in-out infinite;
}

.console-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  padding: 15px;
}

.console-grid article {
  display: grid;
  gap: 4px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
}

.console-grid span,
.console-grid small {
  color: var(--muted);
  font-size: 7px;
}

.console-grid strong {
  font-size: 18px;
  letter-spacing: -0.04em;
}

.console-chart {
  margin: 0 15px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--white);
}

.console-chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.console-chart-head strong {
  font-size: 9px;
}

.console-chart-head span {
  color: var(--muted);
  font-size: 7px;
}

.console-chart svg {
  width: 100%;
  height: 250px;
  margin-top: 5px;
}

.console-chart-grid path {
  fill: none;
  stroke: #edf0f4;
  stroke-width: 1;
}

.console-chart-area {
  fill: url(#calculatorArea);
}

.console-chart-line {
  fill: none;
  stroke: url(#calculatorLine);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: draw-line 2.2s var(--ease) 0.35s forwards;
}

.console-bars {
  display: grid;
  gap: 11px;
  padding: 14px 15px 17px;
}

.console-bars article {
  display: grid;
  grid-template-columns: 80px 1fr 50px;
  align-items: center;
  gap: 10px;
}

.console-bars span,
.console-bars strong {
  font-size: 7px;
}

.console-bars strong {
  text-align: right;
}

.console-bars i {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f5;
}

.console-bars b {
  display: block;
  width: var(--value);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), #7fa9ff);
  transform: scaleX(0);
  transform-origin: left;
  animation: grow-bar 1.05s var(--ease) 0.8s forwards;
}

.console-bars b.green {
  background: linear-gradient(90deg, var(--green), #69ddb2);
}

.floating-metric {
  position: absolute;
  z-index: 5;
  display: grid;
  gap: 2px;
  min-width: 128px;
  padding: 13px;
  border: 1px solid rgba(208, 213, 221, 0.86);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 18px 48px rgba(16, 24, 40, 0.14);
  backdrop-filter: blur(16px);
  animation: floating-card 5.3s ease-in-out infinite;
}

.floating-metric span,
.floating-metric small {
  color: var(--muted);
  font-size: 7px;
}

.floating-metric strong {
  font-size: 18px;
  letter-spacing: -0.04em;
}

.metric-one {
  top: 0;
  left: 0;
}

.metric-two {
  top: 105px;
  right: -3px;
  animation-delay: -1.8s;
}

.metric-three {
  right: 25px;
  bottom: 14px;
  animation-delay: -3.4s;
}

.calculator-search-shell {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 20px;
  margin-top: 26px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px);
}

.calculator-search {
  display: grid;
  min-height: 54px;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 0 13px;
  border-radius: 13px;
  background: var(--paper);
}

.calculator-search svg {
  width: 20px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.8;
  stroke-linecap: round;
}

.calculator-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
}

.calculator-search input::placeholder {
  color: #98a2b3;
}

.calculator-search kbd {
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--white);
  color: var(--muted);
  font-family: var(--body);
  font-size: 8px;
  box-shadow: var(--shadow-xs);
}

.search-status {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-right: 10px;
}

.search-status span {
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}

.search-status button {
  background: transparent;
  color: var(--blue);
  font-size: 9px;
  font-weight: 600;
}

/* =========================================================
   LIBRARY
   ========================================================= */

.calculator-library {
  padding: 100px 0;
  background: var(--white);
}

.library-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 30px;
}

.kicker {
  color: var(--blue);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.library-heading h2 {
  max-width: 820px;
  margin-top: 14px;
  font-size: clamp(42px, 4.8vw, 64px);
  font-weight: 650;
  letter-spacing: -0.056em;
  line-height: 1.04;
}

.library-status {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 6px;
}

.library-status span {
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}

.library-status button {
  background: transparent;
  color: var(--blue);
  font-size: 9px;
  font-weight: 600;
}

.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 35px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.category-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  transition:
    color 0.3s ease,
    background 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s var(--ease),
    transform 0.3s var(--ease);
}

.category-button span {
  display: grid;
  min-width: 23px;
  height: 23px;
  place-items: center;
  padding-inline: 5px;
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font-size: 7px;
  box-shadow: var(--shadow-xs);
}

.category-button:hover,
.category-button.active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.category-button.active span,
.category-button:hover span {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  box-shadow: none;
}

.calculator-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 28px;
}

.calculator-card {
  position: relative;
  display: flex;
  min-height: 330px;
  flex-direction: column;
  overflow: hidden;
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow-xs);
  transform-style: preserve-3d;
  transition:
    opacity 0.45s ease,
    border-color 0.35s ease,
    box-shadow 0.35s var(--ease),
    transform 0.35s var(--ease);
}

.calculator-card::before {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(33, 97, 240, 0.10), transparent 29%),
    linear-gradient(135deg, transparent 52%, rgba(18, 163, 111, 0.045));
  content: "";
  opacity: 0;
  transition: opacity 0.35s ease;
}

.calculator-card::after {
  position: absolute;
  top: -90px;
  right: -90px;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(33, 97, 240, 0.10);
  border-radius: 50%;
  content: "";
  transition:
    transform 0.65s var(--ease),
    border-color 0.35s ease;
}

.calculator-card:hover {
  border-color: rgba(33, 97, 240, 0.19);
  box-shadow: var(--shadow-md);
  transform: translateY(-7px);
}

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

.calculator-card:hover::after {
  border-color: rgba(18, 163, 111, 0.18);
  transform: scale(1.22) rotate(20deg);
}

.calculator-card > * {
  position: relative;
  z-index: 2;
}

.calculator-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.calculator-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 15px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 17px;
  font-weight: 700;
  transition:
    color 0.3s ease,
    background 0.3s ease,
    transform 0.45s var(--spring);
}

.calculator-card:nth-child(even) .calculator-icon {
  background: var(--green-soft);
  color: var(--green);
}

.calculator-card:hover .calculator-icon {
  background: var(--ink);
  color: var(--white);
  transform: rotate(-6deg) scale(1.07);
}

.calculator-category {
  padding: 6px 8px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.calculator-card h3 {
  margin-top: 27px;
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -0.043em;
  line-height: 1.16;
}

.calculator-card > p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}

.calculator-card-visual {
  display: grid;
  gap: 8px;
  margin-top: 23px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}

.card-bar {
  display: grid;
  grid-template-columns: 52px 1fr;
  align-items: center;
  gap: 8px;
}

.card-bar span {
  color: var(--muted);
  font-size: 6px;
}

.card-bar i {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--white);
}

.card-bar b {
  display: block;
  width: var(--card-value);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), #7ea9ff);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.75s var(--ease);
}

.card-bar:nth-child(2) b {
  background: linear-gradient(90deg, var(--green), #69ddb2);
}

.card-bar:nth-child(3) b {
  background: linear-gradient(90deg, #344054, #98a2b3);
}

.calculator-card:hover .card-bar b,
.calculator-card.card-visible .card-bar b {
  transform: scaleX(1);
}

.calculator-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 18px;
}

.calculator-card footer > span {
  color: var(--muted);
  font-size: 8px;
}

.calculator-card footer > button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 8px;
  font-weight: 600;
  transition:
    color 0.3s ease,
    background 0.3s ease,
    transform 0.3s var(--ease);
}

.calculator-card footer > button:hover {
  background: var(--blue);
  color: var(--white);
  transform: translateY(-2px);
}

.calculator-card footer > button i {
  font-style: normal;
}

.empty-state {
  display: grid;
  min-height: 400px;
  place-items: center;
  align-content: center;
  gap: 10px;
  margin-top: 28px;
  border: 1px dashed var(--line-strong);
  border-radius: 24px;
  background: var(--paper);
  text-align: center;
}

.empty-state > span {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 17px;
  background: var(--white);
  color: var(--blue);
  font-size: 24px;
  box-shadow: var(--shadow-xs);
}

.empty-state strong {
  font-size: 22px;
}

.empty-state p {
  color: var(--muted);
  font-size: 12px;
}

.empty-state .button {
  margin-top: 7px;
}

.calculator-disclaimer {
  display: flex;
  max-width: 850px;
  align-items: flex-start;
  gap: 12px;
  margin-top: 30px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--paper);
}

.calculator-disclaimer > span {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 10px;
  font-weight: 700;
}

.calculator-disclaimer p {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.65;
}

/* =========================================================
   DIALOG
   ========================================================= */

.calculator-dialog {
  width: min(calc(100% - 38px), 1120px);
  max-height: calc(100dvh - 38px);
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 28px;
  background: transparent;
}

.calculator-dialog::backdrop {
  background: rgba(7, 16, 31, 0.68);
  backdrop-filter: blur(10px);
}

.calculator-dialog[open] {
  animation: dialog-enter 0.45s var(--ease);
}

.dialog-shell {
  position: relative;
  max-height: calc(100dvh - 38px);
  overflow: auto;
  border: 1px solid rgba(228, 231, 236, 0.9);
  border-radius: 28px;
  background: var(--white);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.25);
}

.dialog-close {
  position: sticky;
  top: 14px;
  z-index: 8;
  display: grid;
  width: 40px;
  height: 40px;
  float: right;
  place-items: center;
  margin: 14px 14px 0 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 23px;
  line-height: 1;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
}

.dialog-header {
  padding: 38px 42px 26px;
  border-bottom: 1px solid var(--line);
}

.dialog-category {
  color: var(--blue);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.dialog-header h2 {
  max-width: 800px;
  margin-top: 10px;
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 650;
  letter-spacing: -0.052em;
  line-height: 1.07;
}

.dialog-header p {
  max-width: 760px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.dialog-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(430px, 1.1fr);
}

.calculator-form {
  padding: 32px 42px;
  border-right: 1px solid var(--line);
}

.calculator-fields {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px 12px;
}

.calc-field {
  display: grid;
  gap: 7px;
}

.calc-field label {
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 600;
}

.input-shell {
  display: flex;
  min-height: 52px;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
  transition:
    border-color 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease;
}

.input-shell:focus-within {
  border-color: rgba(33, 97, 240, 0.38);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(33, 97, 240, 0.07);
}

.input-shell > span {
  padding: 0 13px;
  color: var(--muted);
  font-size: 10px;
}

.input-shell input,
.input-shell select {
  width: 100%;
  min-width: 0;
  min-height: 50px;
  padding: 0 13px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.input-shell > span + input {
  padding-left: 0;
}

.calculator-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 23px;
}

.result-panel {
  min-height: 530px;
  padding: 32px;
  background:
    radial-gradient(circle at top right, rgba(33, 97, 240, 0.22), transparent 32%),
    linear-gradient(145deg, #091426, #12233e);
  color: var(--white);
}

.result-placeholder {
  display: grid;
  min-height: 465px;
  place-items: center;
  align-content: center;
  gap: 8px;
  text-align: center;
}

.result-placeholder > span {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  color: #8eafff;
  font-size: 24px;
}

.result-placeholder strong {
  margin-top: 6px;
  font-size: 17px;
}

.result-placeholder p {
  color: rgba(255, 255, 255, 0.45);
  font-size: 10px;
}

.result-content {
  display: flex;
  min-height: 465px;
  flex-direction: column;
}

.result-highlight {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
}

.result-highlight > span {
  color: rgba(255, 255, 255, 0.50);
  font-size: 8px;
}

.result-highlight > strong {
  display: block;
  margin-top: 7px;
  color: #91b0ff;
  font-size: clamp(34px, 4.5vw, 54px);
  font-weight: 650;
  letter-spacing: -0.055em;
  line-height: 1;
}

.result-pulse {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: flex;
  height: 54px;
  align-items: end;
  gap: 5px;
}

.result-pulse i {
  width: 7px;
  height: var(--pulse-height);
  border-radius: 4px 4px 1px 1px;
  background: linear-gradient(180deg, #75ddb6, #2161f0);
  animation: pulse-bars 1.6s ease-in-out infinite alternate;
}

.result-pulse i:nth-child(1) { --pulse-height: 28%; }
.result-pulse i:nth-child(2) { --pulse-height: 48%; animation-delay: -0.25s; }
.result-pulse i:nth-child(3) { --pulse-height: 78%; animation-delay: -0.5s; }
.result-pulse i:nth-child(4) { --pulse-height: 58%; animation-delay: -0.75s; }
.result-pulse i:nth-child(5) { --pulse-height: 92%; animation-delay: -1s; }

.result-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.result-card {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  animation: result-enter 0.45s var(--ease) both;
}

.result-card:nth-child(2) { animation-delay: 0.05s; }
.result-card:nth-child(3) { animation-delay: 0.10s; }
.result-card:nth-child(4) { animation-delay: 0.15s; }
.result-card:nth-child(5) { animation-delay: 0.20s; }

.result-card span {
  color: rgba(255, 255, 255, 0.46);
  font-size: 7px;
}

.result-card strong {
  font-size: 15px;
  line-height: 1.3;
}

.result-disclaimer {
  margin-top: auto;
  padding-top: 18px;
  color: rgba(255, 255, 255, 0.40);
  font-size: 8px;
  line-height: 1.6;
}

.dialog-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 16px 42px 22px;
  border-top: 1px solid var(--line);
}

.dialog-tools button,
.dialog-tools a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 8px;
  font-weight: 600;
  transition:
    color 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s var(--ease);
}

.dialog-tools button:hover,
.dialog-tools a:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
  transform: translateY(-2px);
}

.assessment-grid {
  display: grid;
  grid-column: 1 / -1;
  gap: 12px;
}

.assessment-question {
  display: grid;
  gap: 9px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
}

.assessment-question > span {
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.5;
}

.score-options {
  display: flex;
  gap: 6px;
}

.score-options label {
  cursor: pointer;
}

.score-options input {
  position: absolute;
  opacity: 0;
}

.score-options b {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--white);
  color: var(--muted);
  font-size: 8px;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.score-options input:checked + b {
  border-color: var(--blue);
  background: var(--blue);
  color: var(--white);
}

/* =========================================================
   TOAST
   ========================================================= */

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 4000;
  display: flex;
  min-width: 260px;
  align-items: center;
  gap: 11px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px);
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease,
    transform 0.35s var(--ease);
}

.toast.show {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.toast > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
}

.toast > div {
  display: grid;
  gap: 2px;
}

.toast strong {
  font-size: 10px;
}

.toast small {
  color: var(--muted);
  font-size: 8px;
}

/* =========================================================
   FOOTER
   ========================================================= */

.footer {
  padding: 70px 0 20px;
  background: var(--black);
  color: var(--white);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.45fr repeat(3, 1fr);
  gap: 50px;
}

.footer-brand img {
  width: 135px;
  filter: brightness(0) invert(1);
}

.footer-brand p {
  max-width: 300px;
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.50);
  font-size: 11px;
  line-height: 1.7;
}

.footer-grid > div:not(.footer-brand) {
  display: grid;
  align-content: start;
  gap: 11px;
}

.footer-grid strong {
  margin-bottom: 4px;
  font-size: 10px;
}

.footer-grid a,
.footer-grid span {
  color: rgba(255, 255, 255, 0.54);
  font-size: 9px;
  transition: color 0.25s ease;
}

.footer-grid a:hover {
  color: var(--white);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 50px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
}

.footer-bottom > span {
  color: rgba(255, 255, 255, 0.40);
  font-size: 8px;
}

.footer-bottom button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
  transition:
    background 0.25s ease,
    transform 0.25s var(--ease);
}

.footer-bottom button:hover {
  background: var(--blue);
  transform: translateY(-3px);
}

/* =========================================================
   ANIMATION KEYFRAMES
   ========================================================= */

@keyframes loader-slide {
  from { transform: translateX(-130%); }
  to { transform: translateX(330%); }
}

@keyframes live-dot {
  0%,
  100% { box-shadow: 0 0 0 4px rgba(18, 163, 111, 0.10); }
  50% { box-shadow: 0 0 0 9px rgba(18, 163, 111, 0); }
}

@keyframes draw-line {
  to { stroke-dashoffset: 0; }
}

@keyframes grow-bar {
  to { transform: scaleX(1); }
}

@keyframes floating-card {
  0%,
  100% { margin-top: 0; }
  50% { margin-top: -8px; }
}

@keyframes dialog-enter {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes result-enter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes pulse-bars {
  from { transform: scaleY(0.55); opacity: 0.55; }
  to { transform: scaleY(1); opacity: 1; }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1180px) {
  .nav-shell {
    grid-template-columns: 135px 1fr auto;
    gap: 20px;
  }

  .desktop-nav {
    gap: 19px;
  }

  .desktop-nav a {
    font-size: 11px;
  }

  .calculator-hero-grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(500px, 1.1fr);
    gap: 38px;
  }

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

@media (max-width: 1020px) {
  .desktop-nav,
  .nav-actions .text-link,
  .nav-actions .button {
    display: none;
  }

  .nav-shell {
    grid-template-columns: 1fr auto;
  }

  .menu-toggle {
    display: grid;
  }

  .mobile-menu {
    display: block;
  }

  .calculator-hero-grid {
    grid-template-columns: 1fr;
  }

  .calculator-hero-copy {
    max-width: 790px;
  }

  .calculator-hero-visual {
    width: min(780px, 100%);
    margin-inline: auto;
  }

  .dialog-layout {
    grid-template-columns: 1fr;
  }

  .calculator-form {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 760px) {
  .container {
    width: min(calc(100% - 34px), var(--container));
  }

  .calculator-hero {
    min-height: auto;
    padding-top: 112px;
  }

  .calculator-hero-copy h1 {
    font-size: clamp(47px, 10.5vw, 66px);
  }

  .calculator-hero-visual {
    min-height: 540px;
  }

  .finance-console {
    inset: 25px 5px 70px 15px;
  }

  .calculator-search-shell {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .search-status {
    justify-content: space-between;
    padding: 0 7px 3px;
  }

  .library-heading {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .library-status {
    justify-content: space-between;
  }

  .category-filter {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 15px;
    scrollbar-width: none;
  }

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

  .category-button {
    flex: 0 0 auto;
  }

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

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  :root {
    --header-height: 70px;
  }

  .brand img {
    width: 118px;
  }

  .calculator-hero {
    padding-top: 103px;
  }

  .calculator-hero-copy h1 {
    font-size: 42px;
    line-height: 1.02;
  }

  .calculator-hero-copy > p {
    font-size: 15px;
    line-height: 1.75;
  }

  .hero-actions {
    display: grid;
  }

  .hero-actions .button {
    width: 100%;
  }

  .hero-proof {
    grid-template-columns: 1fr;
  }

  .calculator-hero-visual {
    min-height: 440px;
  }

  .finance-console {
    inset: 15px 0 55px;
  }

  .console-grid article:nth-child(n + 2) {
    display: none;
  }

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

  .console-chart svg {
    height: 180px;
  }

  .floating-metric {
    transform: scale(0.80);
  }

  .metric-one {
    left: -17px;
  }

  .metric-two {
    right: -18px;
  }

  .metric-three {
    right: 0;
  }

  .calculator-search kbd {
    display: none;
  }

  .calculator-search {
    grid-template-columns: 22px 1fr;
  }

  .calculator-library {
    padding: 78px 0;
  }

  .library-heading h2 {
    font-size: 38px;
    line-height: 1.08;
  }

  .calculator-card {
    min-height: 350px;
  }

  .calculator-card h3 {
    font-size: 24px;
  }

  .calculator-card > p {
    font-size: 13px;
    line-height: 1.68;
  }

  .calculator-category,
  .calculator-card footer > span,
  .calculator-card footer > button {
    font-size: 10px;
  }

  .card-bar span {
    font-size: 9px;
  }

  .calculator-disclaimer p {
    font-size: 12px;
  }

  .calculator-dialog {
    width: calc(100% - 16px);
    max-height: calc(100dvh - 16px);
  }

  .dialog-shell {
    max-height: calc(100dvh - 16px);
    border-radius: 21px;
  }

  .dialog-header {
    padding: 30px 18px 22px;
  }

  .dialog-header h2 {
    font-size: 34px;
  }

  .dialog-header p {
    font-size: 14px;
  }

  .calculator-form {
    padding: 24px 18px;
  }

  .calculator-fields {
    grid-template-columns: 1fr;
  }

  .calc-field label {
    font-size: 13px;
  }

  .input-shell input,
  .input-shell select {
    font-size: 15px;
  }

  .result-panel {
    min-height: 500px;
    padding: 24px 18px;
  }

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

  .result-card span {
    font-size: 10px;
  }

  .result-card strong {
    font-size: 18px;
  }

  .dialog-tools {
    padding: 15px 18px 20px;
  }

  .dialog-tools button,
  .dialog-tools a {
    flex: 1 1 calc(50% - 8px);
    justify-content: center;
    font-size: 10px;
  }

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

  .footer-brand p,
  .footer-grid a,
  .footer-grid span {
    font-size: 12px;
  }

  .footer-grid strong {
    font-size: 13px;
  }
}

@media (max-width: 420px) {
  .calculator-hero-copy h1 {
    font-size: 38px;
  }

  .calculator-hero-visual {
    min-height: 405px;
  }

  .floating-metric {
    transform: scale(0.72);
  }

  .library-heading h2 {
    font-size: 34px;
  }

  .calculator-card {
    padding: 18px;
  }

  .dialog-tools button,
  .dialog-tools a {
    flex-basis: 100%;
  }
}

@media print {
  body > *:not(.calculator-dialog) {
    display: none !important;
  }

  .calculator-dialog {
    position: static;
    display: block;
    width: 100%;
    max-height: none;
  }

  .calculator-dialog::backdrop,
  .dialog-close,
  .calculator-form,
  .dialog-tools {
    display: none !important;
  }

  .dialog-shell {
    max-height: none;
    overflow: visible;
    border: 0;
    box-shadow: none;
  }

  .dialog-layout {
    grid-template-columns: 1fr;
  }

  .result-panel {
    color: #000;
    background: #fff;
  }

  .result-highlight,
  .result-card {
    border-color: #ddd;
    background: #fff;
    color: #000;
  }

  .result-highlight > span,
  .result-card span,
  .result-disclaimer {
    color: #555;
  }

  .result-highlight > strong {
    color: #000;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* =========================================================
   OUTFINX READABILITY SYSTEM V5
   ========================================================= */
body { font-size:16px; line-height:1.68; }
.desktop-nav a,.text-link { font-size:14px; }
.button,.button-small { font-size:13px; }
.eyebrow,.kicker { font-size:12px; }
.calculator-hero-copy h1 {
  font-size:clamp(46px,5vw,62px);
  line-height:1.03;
}
.calculator-hero-copy > p {
  font-size:17px;
  line-height:1.72;
}
.hero-proof span,.search-status span,.library-status span { font-size:11px; }
.library-heading h2 {
  font-size:clamp(34px,3.5vw,46px);
  line-height:1.1;
}
.calculator-search input { font-size:15px; }
.category-button span,
.calculator-category,
.calculator-card footer > span,
.calculator-card footer > button,
.card-bar span,
.calculator-disclaimer > span {
  font-size:11px;
}
.calculator-card h3 {
  font-size:22px;
  line-height:1.25;
}
.calculator-card > p,
.calculator-disclaimer p {
  font-size:14px;
  line-height:1.65;
}
.dialog-header h2 {
  font-size:clamp(30px,3vw,40px);
  line-height:1.12;
}
.dialog-header p { font-size:15px; line-height:1.7; }
.input-shell > span { font-size:12px; }
.input-shell input,.input-shell select { font-size:15px; }
.result-placeholder p { font-size:13px; }
.result-highlight > span,.result-card span,.score-options b { font-size:11px; }
.result-card strong { font-size:17px; }
.toast strong { font-size:12px; }
.toast small { font-size:11px; }
.footer-brand p,.footer-grid a,.footer-grid span { font-size:12px; }
.footer-grid strong,.footer-bottom > span { font-size:11px; }
@media(max-width:640px){
  .calculator-hero-copy h1{font-size:40px!important;line-height:1.08!important}
  .calculator-hero-copy > p,.calculator-card > p,.calculator-disclaimer p,.dialog-header p{font-size:15px!important;line-height:1.7!important}
  .library-heading h2{font-size:32px!important}
  .calculator-card h3{font-size:21px!important}
  .dialog-header h2{font-size:30px!important}
  .mobile-menu-inner>a{font-size:18px!important}
  .button,.button-small{font-size:14px!important}
}
