/* ==========================================================
   CALCULATORS - layout + hub + input/result panels
   Matches cream / charcoal / gold palette from styles.css
   ========================================================== */

/* HERO */
.calc-hero {
  padding: 11rem 2rem 5rem;
  text-align: center;
  background: var(--cream);
  position: relative; overflow: hidden;
}
.calc-hero::before {
  content:''; position:absolute; inset:0;
  background: radial-gradient(ellipse 700px 400px at 50% 30%, rgba(184,146,90,.10), transparent 60%);
  pointer-events:none;
}
.calc-hero h1 {
  font-family: var(--ff-display);
  font-size: clamp(2.4rem, 6vw, 4.5rem); font-weight: 500;
  line-height: 1.02; letter-spacing: -.025em;
  max-width: 900px; margin: 1rem auto 1.5rem; color: var(--ink);
  position: relative; z-index: 1;
}
.calc-hero h1 em { font-style: italic; color: var(--gold-deep); font-weight: 400; }
.calc-hero p {
  max-width: 640px; margin: 0 auto;
  color: var(--ink-soft); font-size: 1.08rem;
  position: relative; z-index: 1;
}

/* HUB */
.calc-hub {
  padding: 5rem 0 7rem;
  background: var(--paper);
  border-top: 1px solid var(--line);
}
.hub-group { margin-bottom: 5rem; position: relative; }
.hub-group:last-child { margin-bottom: 0; }
.hub-group-head {
  position: relative; max-width: 700px; margin-bottom: 2.5rem;
  padding-left: 4.5rem;
}
.hub-num {
  position: absolute; left: 0; top: -.25rem;
  font-family: var(--ff-body); font-style: italic; font-weight: 500;
  font-size: 2.6rem; color: var(--gold-deep); line-height: 1;
}
.hub-group-head h2 {
  font-family: var(--ff-display);
  font-size: clamp(1.7rem, 3.5vw, 2.5rem);
  font-weight: 500; letter-spacing: -.01em;
  margin-bottom: .5rem;
}
.hub-group-head p { color: var(--ink-soft); font-size: 1rem; }

.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  position: relative; /* for plane trail */
}

.hub-card {
  position: relative;
  padding: 1.75rem 1.5rem 1.4rem;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: left;
  cursor: pointer;
  font-family: var(--ff-body);
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s, background .3s;
  display: flex; flex-direction: column;
  min-height: 170px;
}
.hub-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
  background: var(--paper);
  box-shadow: 0 10px 30px rgba(29,29,27,.06);
}
.hub-card .hc-n {
  font-family: var(--ff-body); font-style: italic; font-weight: 500;
  font-size: 1.2rem; color: var(--gold-deep);
  margin-bottom: .5rem;
}
.hub-card h4 {
  font-family: var(--ff-display); font-weight: 500;
  font-size: 1.25rem; margin-bottom: .4rem;
  letter-spacing: -.005em;
  color: var(--ink);
}
.hub-card p { font-size: .88rem; color: var(--ink-soft); line-height: 1.55; flex: 1; }
.hub-card .hc-go {
  margin-top: 1rem;
  font-size: .82rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--gold-deep); font-weight: 600;
}

/* VIEW */
.calc-view {
  padding: 8rem 0 6rem;
  background: var(--cream);
  border-top: 1px solid var(--line);
  min-height: 100vh;
}
.calc-view[hidden] { display: none !important; }

.back-link {
  display: inline-flex; align-items: center; gap: .6rem;
  background: transparent; border: 0;
  color: var(--ink); font-weight: 500; font-size: .95rem;
  cursor: pointer; font-family: var(--ff-body);
  margin-bottom: 2rem;
  transition: color .25s, transform .25s var(--ease);
}
.back-link:hover { color: var(--gold-deep); transform: translateX(-3px); }
.back-link .arr { display: inline-block; transition: transform .25s var(--ease); }

.calc-panel[hidden] { display: none !important; }

.calc-header { margin-bottom: 2.5rem; max-width: 720px; }
.calc-header h2 {
  font-family: var(--ff-display);
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 500; letter-spacing: -.015em;
  margin: .35rem 0 .65rem;
  color: var(--ink);
}
.calc-header p { color: var(--ink-soft); font-size: 1rem; }

.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: 0 20px 60px rgba(29,29,27,.05);
}

/* INPUTS */
.calc-inputs .field {
  display: block; margin-bottom: 1.5rem;
}
.calc-inputs label {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-mute); font-weight: 600; margin-bottom: .5rem;
}
.calc-inputs label b {
  display: none !important;
}
.calc-inputs .ctrl {
  position: relative;
  display: flex; align-items: center;
}
.calc-inputs .ctrl .pref, .calc-inputs .ctrl .suf {
  position: absolute; color: var(--ink-mute); font-weight: 500; pointer-events: none;
}
.calc-inputs .ctrl .pref { left: 1rem; }
.calc-inputs .ctrl .suf { right: 1rem; }
.calc-inputs input[type="number"], .calc-inputs input[type="text"], .calc-inputs select {
  width: 100%;
  padding: .85rem 1rem;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  font-family: var(--ff-body);
  font-size: 1rem;
  font-weight: 500;
  transition: border-color .25s, background .25s, box-shadow .25s;
}
.calc-inputs .ctrl:has(.pref) input { padding-left: 2rem; }
.calc-inputs .ctrl:has(.suf) input { padding-right: 2.3rem; }
.calc-inputs input:focus, .calc-inputs select:focus {
  outline: none;
  background: var(--paper);
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(184,146,90,.15);
}

.calc-inputs input[type="range"] {
  width: 100%; margin-top: .75rem;
  -webkit-appearance: none; appearance: none;
  background: transparent;
}
.calc-inputs input[type="range"]::-webkit-slider-runnable-track {
  height: 3px; background: var(--line); border-radius: 3px;
}
.calc-inputs input[type="range"]::-moz-range-track {
  height: 3px; background: var(--line); border-radius: 3px;
}
.calc-inputs input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px;
  background: var(--gold-deep); border: 3px solid var(--paper);
  border-radius: 50%; margin-top: -8px;
  cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.15);
  transition: transform .2s var(--ease);
}
.calc-inputs input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px;
  background: var(--gold-deep); border: 3px solid var(--paper);
  border-radius: 50%;
  cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.15);
}
.calc-inputs input[type="range"]:hover::-webkit-slider-thumb { transform: scale(1.1); }

.calc-inputs .checkbox {
  display: flex; align-items: center; gap: .6rem;
  justify-content: flex-start;
  font-size: .88rem; color: var(--ink-soft);
  cursor: pointer; margin-top: .5rem;
  text-transform: none; letter-spacing: 0;
  font-weight: 400;
}
.calc-inputs .checkbox[hidden] { display: none; }
.calc-inputs .checkbox input { accent-color: var(--gold-deep); width: 18px; height: 18px; flex: 0 0 18px; margin: 0; }

/* Numeric / currency inputs that show commas - tabular digits only */
.calc-inputs input[data-comma="1"] { font-variant-numeric: tabular-nums; }

/* RESULTS */
.calc-results {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  display: flex; flex-direction: column;
}
.res-cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem;
  margin-bottom: 1.5rem;
}
.rc {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.1rem .85rem;
  text-align: center;
}
.rc span {
  display: block;
  font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-mute); font-weight: 600;
  margin-bottom: .45rem;
}
.rc b {
  display: block;
  font-family: var(--ff-body); font-weight: 500;
  font-size: clamp(1rem, 2.8vw, 1.25rem); color: var(--ink);
  letter-spacing: -.01em;
  line-height: 1.15;
}
.rc.green { border-color: rgba(16,185,129,.3); }
.rc.green b { color: #10b981; }
.rc.gold { border-color: var(--gold); background: linear-gradient(135deg, var(--paper) 0%, rgba(184,146,90,.08) 100%); }
.rc.gold b { color: var(--gold-deep); }

.chart-wrap {
  position: relative;
  flex: 1;
  min-height: 280px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem;
}

.calc-note {
  margin-top: 1rem;
  padding: .9rem 1rem;
  background: rgba(184,146,90,.08);
  border-left: 2px solid var(--gold);
  border-radius: 6px;
  font-size: .85rem; color: var(--ink-soft); line-height: 1.55;
}

/* ==========================================================
   TDS - extra meta rows + FY 2026-27 chart table
   ========================================================== */
.td-meta {
  margin-top: .25rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .35rem .9rem;
  display: grid;
  gap: 0;
}
.td-meta-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: .55rem 0;
  border-bottom: 1px dashed var(--line);
  font-size: .85rem;
}
.td-meta-row:last-child { border-bottom: none; }
.td-meta-row span {
  color: var(--ink-mute);
  text-transform: uppercase; letter-spacing: .08em;
  font-size: .68rem; font-weight: 600;
  flex: 1;
}
.td-meta-row b {
  color: var(--ink); font-weight: 500;
  font-size: .9rem; text-align: right;
  white-space: nowrap;
  flex-shrink: 0;
}

.tds-chart-wrap {
  margin: 2rem 1.75rem 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
}
.tds-chart-head {
  display: flex; flex-wrap: wrap; gap: 1rem;
  align-items: flex-end; justify-content: space-between;
  margin-bottom: 1.25rem;
}
.tds-chart-head h3 {
  font-family: var(--ff-display);
  font-size: 1.4rem; font-weight: 500;
  letter-spacing: -.01em;
  margin: 0 0 .25rem;
  color: var(--ink);
}
.tds-chart-head p {
  font-size: .85rem; color: var(--ink-soft); margin: 0;
}
.tds-chart-head input[type="search"] {
  flex: 0 1 280px;
  padding: .65rem .85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--cream);
  font: inherit; color: var(--ink);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.tds-chart-head input[type="search"]:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184,146,90,.15);
}
.tds-chart-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--cream);
}
.tds-chart-table {
  width: 100%; min-width: 880px;
  border-collapse: collapse;
  font-size: .85rem;
  color: var(--ink);
}
.tds-chart-table thead th {
  background: rgba(184,146,90,.10);
  color: var(--ink);
  text-align: left;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: .7rem;
  padding: .85rem .9rem;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0;
}
.tds-chart-table tbody td {
  padding: .8rem .9rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  line-height: 1.45;
}
.tds-chart-table tbody tr:last-child td { border-bottom: none; }
.tds-chart-table tbody tr:nth-child(odd) td { background: rgba(184,146,90,.03); }
.tds-chart-table tbody tr:hover td { background: rgba(184,146,90,.10); }
.tds-chart-table td:nth-child(1),
.tds-chart-table td:nth-child(2),
.tds-chart-table td:nth-child(5),
.tds-chart-table td:nth-child(6) {
  font-family: var(--ff-body);
  font-feature-settings: 'tnum';
  white-space: nowrap;
}
.tds-chart-table td:nth-child(6) {
  color: var(--gold-deep); font-weight: 600;
}
.tds-chart-empty {
  text-align: center;
  padding: 1.5rem;
  color: var(--ink-soft);
  font-size: .9rem;
  font-style: italic;
}
.tds-chart-foot {
  margin: 1rem 0 0;
  font-size: .78rem;
  color: var(--ink-mute);
  line-height: 1.55;
}

/* Responsive */
@media (max-width: 960px) {
  .calc-grid { grid-template-columns: 1fr; gap: 2rem; padding: 1.5rem; }
  .res-cards { grid-template-columns: 1fr; }
  .hub-group-head { padding-left: 0; }
  .hub-num { position: static; margin-bottom: .5rem; display: block; }
  .tds-chart-wrap { margin: 1.5rem 0 0; padding: 1.25rem; }
  .tds-chart-head { flex-direction: column; align-items: stretch; }
  .tds-chart-head input[type="search"] { flex: 1 1 100%; }
}

/* ==========================================================
   PLANE TRAIL ANIMATION v2 - bigger, smoother, glowing
   ========================================================== */
.trail-layer {
  position: absolute;
  pointer-events: none;
  z-index: 5;
  inset: -30px 0 0 0;
  overflow: visible;
}

.trail-plane {
  position: absolute;
  left: 0; top: 0;
  width: 52px; height: 52px;
  color: var(--gold-deep);
  filter: drop-shadow(0 4px 12px rgba(184,146,90,.45))
          drop-shadow(0 0 6px rgba(184,146,90,.35));
  opacity: 0;
  will-change: transform, opacity;
  transform: translate3d(calc(100% + 60px), 0, 0) rotate(180deg);
}
.trail-plane.go {
  animation: trailFly 3.6s cubic-bezier(.25,.65,.3,1) forwards;
}

/* Plane body subtle wobble / bank while flying */
.trail-plane.go svg {
  animation: planeBank 1.2s ease-in-out infinite alternate;
  transform-origin: 50% 50%;
}

.trail-dot {
  position: absolute;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--gold-deep);
  box-shadow: 0 0 8px rgba(184,146,90,.55);
  opacity: 0;
  transform: translate(-50%,-50%) scale(0);
  will-change: transform, opacity;
}
.trail-dot.go {
  animation: trailDot 2.4s cubic-bezier(.25,.65,.3,1) forwards;
}

/* Glowing contrail streak that fades in behind plane */
.trail-track {
  position: absolute;
  left: 4%; right: 4%;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(184,146,90,.0) 5%,
    rgba(184,146,90,.35) 25%,
    rgba(184,146,90,.55) 50%,
    rgba(184,146,90,.35) 75%,
    transparent 100%);
  opacity: 0;
  filter: blur(.4px);
  transform: scaleX(0);
  transform-origin: right center;
}
.trail-track.go {
  animation: trailTrack 3.6s cubic-bezier(.25,.65,.3,1) forwards;
}
.trail-track::after {
  content:''; position:absolute; inset:-3px 0;
  background: inherit;
  filter: blur(4px); opacity: .5;
}

@keyframes trailFly {
  0%   { transform: translate3d(calc(100% + 60px), 0, 0) rotate(180deg); opacity: 0; }
  8%   { opacity: 1; }
  50%  { transform: translate3d(calc(50vw - 26px), -4px, 0) rotate(180deg); }
  92%  { opacity: 1; }
  100% { transform: translate3d(-80px, 0, 0) rotate(180deg); opacity: 0; }
}

@keyframes planeBank {
  0%   { transform: rotate(-3deg); }
  100% { transform: rotate(3deg); }
}

@keyframes trailDot {
  0%   { opacity: 0; transform: translate(-50%,-50%) scale(0); }
  15%  { opacity: 1; transform: translate(-50%,-50%) scale(1.1); }
  30%  { transform: translate(-50%,-50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%,-50%) scale(.3); }
}

@keyframes trailTrack {
  0%   { opacity: 0; transform: scaleX(0); transform-origin: right center; }
  20%  { opacity: 1; }
  60%  { transform: scaleX(1); transform-origin: right center; }
  80%  { opacity: 1; transform: scaleX(1); transform-origin: left center; }
  100% { opacity: 0; transform: scaleX(0); transform-origin: left center; }
}

@media (prefers-reduced-motion: reduce) {
  .trail-plane, .trail-dot, .trail-track { display: none !important; }
}

/* ==========================================================
   EXTRA VFX  - floating orbs, shimmer, count-up, magnetic hover
   ========================================================== */

/* Floating gold orbs (decorative) */
.vfx-orb {
  position: absolute; pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(230,198,141,.35), rgba(184,146,90,.12) 40%, transparent 70%);
  filter: blur(18px);
  animation: orbDrift 18s ease-in-out infinite;
  will-change: transform;
  z-index: 0;
}
.vfx-orb.o1 { width: 380px; height: 380px; top: -80px; right: -60px; animation-duration: 22s; }
.vfx-orb.o2 { width: 260px; height: 260px; bottom: -40px; left: -40px; animation-delay: -8s; animation-duration: 26s; }
.vfx-orb.o3 { width: 200px; height: 200px; top: 40%; left: 55%; animation-delay: -12s; animation-duration: 30s; opacity: .7; }

@keyframes orbDrift {
  0%, 100% { transform: translate(0,0) scale(1); }
  33%      { transform: translate(30px, -20px) scale(1.05); }
  66%      { transform: translate(-20px, 25px) scale(.98); }
}

/* Gradient shimmer sweep on gold numbers */
.shimmer {
  background: linear-gradient(90deg,
    var(--gold-deep) 0%,
    var(--gold-deep) 38%,
    #f0d6a3 50%,
    var(--gold-deep) 62%,
    var(--gold-deep) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: shimmerSweep 3.6s ease-in-out infinite;
}
@keyframes shimmerSweep {
  0%   { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}

/* Animated underline for section eyebrows */
.section-eyebrow::after {
  content:''; display:inline-block;
  width: 28px; height: 1px; margin-left: .7rem;
  background: linear-gradient(90deg, var(--gold), transparent);
  vertical-align: middle;
  transform-origin: left center;
  animation: eyebrowDraw 1.8s cubic-bezier(.2,.8,.2,1) forwards;
}
@keyframes eyebrowDraw {
  from { transform: scaleX(0); opacity: 0; }
  to   { transform: scaleX(1); opacity: 1; }
}

/* Count-up stat with subtle pulse */
.count-up {
  display: inline-block;
  animation: statPulse 2.4s ease-out 1;
}
@keyframes statPulse {
  0%   { transform: scale(.92); opacity: 0; }
  60%  { transform: scale(1.04); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* Card tilt on mouse move - uses --mx/--my custom props */
.tilt {
  transform: perspective(900px)
    rotateX(calc(var(--my, 0) * -4deg))
    rotateY(calc(var(--mx, 0) *  4deg))
    translateZ(0);
  transition: transform .18s ease-out;
}

/* Scroll-driven parallax on hero glow */
.parallax-glow {
  transform: translate3d(0, calc(var(--scroll-y, 0) * .12px), 0);
  will-change: transform;
}

/* Ripple ring on CTA hover */
.btn-gold { position: relative; overflow: hidden; isolation: isolate; }
.btn-gold::after {
  content:''; position:absolute; inset:0;
  background: radial-gradient(circle at var(--rx,50%) var(--ry,50%),
    rgba(255,255,255,.35), transparent 55%);
  opacity: 0; transition: opacity .3s ease;
  pointer-events: none;
}
.btn-gold:hover::after { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .vfx-orb, .shimmer, .count-up, .section-eyebrow::after { animation: none !important; }
  .tilt { transform: none !important; }
}

/* ==========================================================
   TESTIMONIAL CAROUSEL
   Works with any number of .testi-card children.
   ========================================================== */
.testi-carousel {
  position: relative;
  max-width: 1100px; margin: 3.5rem auto 0;
  padding: 0 60px;
}
.testi-viewport {
  overflow: hidden;
  border-radius: var(--radius-lg);
}
.testi-track {
  display: flex;
  transition: transform .6s cubic-bezier(.25,.65,.3,1);
  will-change: transform;
}
.testi-carousel .testi-card {
  flex: 0 0 calc((100% - 1.5rem) / 2);
  margin-right: 1.5rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.5rem 2rem 2rem;
  position: relative;
}
.testi-carousel .testi-card:last-child { margin-right: 0; }
.testi-carousel .testi-card .quote {
  font-family: var(--ff-display);
  font-size: 4rem; line-height: .6;
  color: var(--gold); font-style: italic;
  position: absolute; top: 1rem; left: 1.5rem;
  opacity: .55;
}
.testi-carousel .testi-card .text {
  color: var(--ink); font-size: 1.02rem;
  line-height: 1.65; margin: 1rem 0 1.75rem;
}
.testi-carousel .testi-author {
  display: flex; align-items: center; gap: .85rem;
  padding-top: 1.25rem; border-top: 1px solid var(--line);
}
.testi-carousel .testi-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: var(--cream); font-weight: 600;
  display: grid; place-items: center;
  font-family: var(--ff-display); font-size: 1.15rem;
}
.testi-carousel .testi-author .name {
  font-weight: 600; color: var(--ink); font-size: .95rem;
}
.testi-carousel .testi-author .role {
  color: var(--ink-mute); font-size: .8rem; margin-top: .15rem;
}

.testi-arrow {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  cursor: pointer;
  transition: all .25s var(--ease);
  z-index: 3;
  box-shadow: 0 4px 14px rgba(29,29,27,.06);
}
.testi-arrow svg { width: 18px; height: 18px; }
.testi-arrow.prev { left: 0; }
.testi-arrow.next { right: 0; }
.testi-arrow:hover:not(:disabled) {
  background: var(--ink); color: var(--cream);
  border-color: var(--ink);
  transform: translateY(-50%) scale(1.06);
}
.testi-arrow:disabled {
  opacity: .35; cursor: default;
}

.testi-dots {
  display: flex; justify-content: center; gap: .45rem;
  margin-top: 1.5rem;
}
.testi-dots span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--line);
  transition: all .25s var(--ease);
  cursor: pointer;
}
.testi-dots span.active {
  background: var(--gold-deep);
  width: 24px; border-radius: 4px;
}

@media (max-width: 820px) {
  .testi-carousel { padding: 0 50px; }
  .testi-carousel .testi-card { flex-basis: 100%; margin-right: 0; }
}

/* ==========================================================
   SCROLL-DRIVEN PLANE v3  (overrides v2 trigger behaviour)
   ========================================================== */
.trail-plane.scroll-mode,
.trail-track.scroll-mode,
.trail-dot.scroll-mode {
  animation: none !important;
  transition: transform .2s linear, opacity .3s ease;
}
.trail-plane.scroll-mode { opacity: 1; }
.trail-dot.scroll-mode {
  opacity: 0;
  transform: translate(-50%,-50%) scale(.4);
  transition: opacity .35s ease, transform .35s cubic-bezier(.25,.65,.3,1), background .2s;
}
.trail-dot.scroll-mode.lit {
  opacity: 1;
  transform: translate(-50%,-50%) scale(1.1);
  background: var(--gold-deep);
  box-shadow: 0 0 10px rgba(184,146,90,.6);
}
/* Dashed flight path - dim base line shows the whole route,
   bright gold dashes fill right->left behind the plane */
.trail-track.scroll-mode {
  opacity: 1;
  transform: none;
  filter: none;
  height: 2px;
  background: transparent;
  background-image: repeating-linear-gradient(
    to right,
    rgba(184,146,90,.28) 0,
    rgba(184,146,90,.28) 9px,
    transparent 9px,
    transparent 18px
  );
  overflow: hidden;
}
.trail-track.scroll-mode::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0; right: 0;
  width: calc(var(--trail-progress, 0) * 100%);
  background: transparent;
  background-image: repeating-linear-gradient(
    to right,
    var(--gold-deep) 0,
    var(--gold-deep) 9px,
    transparent 9px,
    transparent 18px
  );
  filter: drop-shadow(0 0 4px rgba(184,146,90,.6));
  inset: auto 0 auto auto;
  transition: width .2s linear;
  opacity: 1;
}

/* ==========================================================
   SPLASH COVER
   ========================================================== */
html.has-splash, html.has-splash body { overflow: hidden; }
.splash {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--ink);
  display: grid; place-items: center;
  overflow: hidden;
}
.splash.done {
  animation: splashOut .7s cubic-bezier(.75,0,.2,1) forwards;
  pointer-events: none;
}
.splash::before {
  content:''; position:absolute; inset:0;
  background: radial-gradient(circle at 50% 50%, rgba(184,146,90,.28), transparent 58%);
  animation: splashGlow 2.1s ease-in-out;
}
.splash-inner {
  position: relative; text-align: center;
}
.splash.done .splash-inner {
  animation: splashInnerOut .45s cubic-bezier(.6,0,.2,1) forwards;
}
.splash-logo {
  width: 84px; height: 84px;
  margin: 0 auto 1.25rem;
  display: grid; place-items: center;
  border: 1px solid rgba(230,198,141,.35);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(230,198,141,.25), transparent 65%);
  animation: splashPulse 1.6s ease-in-out infinite alternate;
}
.splash-logo img { width: 56px; height: auto; filter: drop-shadow(0 2px 6px rgba(0,0,0,.3)); }
.splash-name {
  font-family: var(--ff-display); font-weight: 500;
  font-size: 1.4rem; color: var(--cream);
  letter-spacing: .02em;
  opacity: 0;
  animation: splashFadeIn .5s .35s forwards;
}
.splash-name em { font-style: italic; color: #e6c68d; font-weight: 400; }
.splash-tag {
  font-family: var(--ff-body);
  font-size: .72rem; letter-spacing: .35em; text-transform: uppercase;
  color: rgba(245,238,223,.55);
  margin-top: .75rem;
  opacity: 0;
  animation: splashFadeIn .5s .55s forwards;
}
.splash-bar {
  width: 160px; height: 2px;
  margin: 1.6rem auto 0;
  background: rgba(245,238,223,.08);
  border-radius: 2px; overflow: hidden;
}
.splash-bar i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, #e6c68d, var(--gold-deep));
  animation: splashBarFill .85s .1s cubic-bezier(.5,0,.1,1) forwards;
}

@keyframes splashOut {
  0%   { opacity: 1; }
  100% { opacity: 0; visibility: hidden; }
}
@keyframes splashInnerOut {
  to { opacity: 0; transform: translateY(-12px); }
}
@keyframes splashGlow {
  0%   { opacity: 0; transform: scale(.8); }
  50%  { opacity: 1; }
  100% { opacity: 0; transform: scale(1.2); }
}
@keyframes splashPulse {
  from { transform: scale(1); box-shadow: 0 0 0 0 rgba(230,198,141,.25); }
  to   { transform: scale(1.05); box-shadow: 0 0 0 14px rgba(230,198,141,0); }
}
@keyframes splashFadeIn {
  to { opacity: 1; }
}
@keyframes splashBarFill {
  to { width: 100%; }
}

/* Splash is shown when html has .has-splash class (set sync before paint). */
html:not(.has-splash) .splash { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .splash, .splash::before, .splash * { animation: none !important; transition: none !important; }
  .trail-plane, .trail-plane.go svg { animation: none !important; }
}

/* ==========================================================
   CALCULATORS - RESPONSIVE LAYER v2
   ========================================================== */

/* Tablet & smaller: 2-col input/results stacks */
@media (max-width: 960px) {
  .calc-view { padding: 6rem 0 4rem; }
  .calc-grid { grid-template-columns: 1fr !important; gap: 2rem !important; padding: 2rem !important; }
  .res-cards { grid-template-columns: 1fr 1fr !important; }
  .tds-chart-wrap { margin: 1.5rem 0 0; padding: 1.25rem; }
  .tds-chart-head { flex-direction: column; align-items: stretch; gap: .75rem; }
  .tds-chart-head input[type="search"] { width: 100%; }
}

/* Phone: chart table reflows to card stack (no horizontal scroll) */
@media (max-width: 720px) {
  .calc-grid { padding: 1.25rem !important; }
  .res-cards { grid-template-columns: 1fr !important; }
  .hub-grid { grid-template-columns: 1fr !important; }
  .back-link { margin-bottom: 1.25rem; }

  /* Reflow TDS chart table: each row becomes a card */
  .tds-chart-scroll { overflow-x: visible; border: none; background: transparent; }
  .tds-chart-table { min-width: 0; display: block; }
  .tds-chart-table thead { display: none; }
  .tds-chart-table tbody, .tds-chart-table tr, .tds-chart-table td { display: block; width: 100%; }
  .tds-chart-table tbody tr {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: .75rem;
    box-shadow: 0 4px 10px rgba(29,29,27,.03);
  }
  .tds-chart-table tbody tr:nth-child(odd) td,
  .tds-chart-table tbody tr:hover td { background: transparent; }
  .tds-chart-table tbody td {
    padding: .35rem 0;
    border: none;
    display: grid;
    grid-template-columns: 9rem 1fr;
    gap: .75rem;
    font-size: .85rem;
    line-height: 1.4;
  }
  .tds-chart-table tbody td::before {
    content: attr(data-label);
    color: var(--ink-mute);
    text-transform: uppercase;
    letter-spacing: .05em;
    font-size: .7rem;
    font-weight: 600;
    align-self: center;
  }
  .tds-chart-table td:nth-child(1)::before { content: "Return code"; }
  .tds-chart-table td:nth-child(2)::before { content: "Old section"; }
  .tds-chart-table td:nth-child(3)::before { content: "New section"; }
  .tds-chart-table td:nth-child(4)::before { content: "Nature"; }
  .tds-chart-table td:nth-child(5)::before { content: "Form"; }
  .tds-chart-table td:nth-child(6)::before { content: "Rate"; }
  .tds-chart-table td:nth-child(7)::before { content: "Threshold"; }
  .tds-chart-table td:nth-child(6) { color: var(--gold-deep); font-weight: 600; }
  .tds-chart-table tbody td:last-child { border-bottom: none; }

  /* Results metadata rows: tighten */
  .td-meta-row { padding: .45rem 0; flex-direction: row; align-items: flex-start; }
  .td-meta-row span { flex: 0 0 auto; font-size: .6rem; }
  .td-meta-row b { font-size: .82rem; }
}

/* Tight phones: shrink the calc UI more */
@media (max-width: 480px) {
  .calc-grid { padding: 1rem !important; gap: 1.25rem !important; }
  .calc-inputs .field { margin-bottom: 1.1rem; }
  .calc-inputs input[type="number"],
  .calc-inputs input[type="text"],
  .calc-inputs select { padding: .7rem .85rem; font-size: .95rem; }
  .calc-inputs .ctrl:has(.pref) input { padding-left: 1.75rem; }
  .calc-results { padding: 1.25rem 1rem; }
  .rc { padding: .85rem .65rem; }
  .rc b { font-size: 1.05rem; }
  .calc-header h2 { font-size: 1.5rem; }
  .calc-hero h1 { font-size: clamp(1.7rem, 7vw, 2.2rem); }
  .tds-chart-table tbody td { grid-template-columns: 7.5rem 1fr; gap: .5rem; }
  .hub-card { padding: 1.25rem 1rem 1rem; min-height: 140px; }
  .hub-card h4 { font-size: 1.1rem; }
}

/* Large monitors */
@media (min-width: 1600px) {
  .calc-grid { gap: 4rem; padding: 3rem; }
  .calc-view { padding: 9rem 0 7rem; }
  .calc-header h2 { font-size: 2.75rem; }
  .tds-chart-table { font-size: .92rem; }
}

@media (min-width: 1920px) {
  .calc-grid { padding: 3.5rem; }
}

/* ==========================================================
   2-column input grid (Spendvest, FIRE)
   ========================================================== */
.calc-inputs-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.5rem;
  align-items: end;
}
.calc-inputs-2col .field { margin-bottom: .5rem; }
.calc-inputs-2col .field.full { grid-column: 1 / -1; }

@media (max-width: 720px) {
  .calc-inputs-2col { grid-template-columns: 1fr; gap: .75rem; }
}

/* Recommendations / insights card */
.calc-recs {
  margin-top: 1.25rem;
  padding: 1.25rem 1.35rem;
  background: linear-gradient(135deg, var(--paper) 0%, rgba(184,146,90,.06) 100%);
  border: 1px solid var(--gold);
  border-radius: 12px;
}
.calc-recs-head {
  font-family: var(--ff-display);
  font-size: 1.05rem; font-weight: 500;
  color: var(--ink); margin-bottom: .65rem;
  display: flex; align-items: center; gap: .5rem;
}
.calc-recs-head::before {
  content: '✦';
  color: var(--gold-deep);
  font-size: .95rem;
}
.calc-recs ul { list-style: none; padding: 0; margin: 0; }
.calc-recs li {
  padding: .45rem 0 .45rem 1.4rem;
  position: relative;
  font-size: .88rem;
  color: var(--ink-soft);
  line-height: 1.55;
  border-top: 1px dashed var(--line);
}
.calc-recs li:first-child { border-top: none; }
.calc-recs li::before {
  content: '→';
  position: absolute; left: 0; top: .45rem;
  color: var(--gold-deep);
  font-weight: 600;
}
.calc-recs li b { color: var(--ink); font-weight: 500; }

/* ==========================================================
   STACKED layout for planning calcs (inputs on top, results below)
   Used by Spendvest + FIRE which have many inputs.
   ========================================================== */
.calc-grid.calc-grid-stack {
  grid-template-columns: 1fr;
  gap: 2rem;
}
.calc-grid-stack .calc-inputs-2col {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem 1.5rem;
}
@media (max-width: 480px) {
  .calc-grid-stack .calc-inputs-2col { grid-template-columns: 1fr; }
}

/* Section headings inside the input grid */
.input-section {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: .25rem 0 -.25rem;
  padding-top: .5rem;
}
.input-section:first-child { padding-top: 0; margin-top: 0; }
.input-section h3 {
  font-family: var(--ff-display);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -.005em;
  color: var(--ink);
  margin: 0;
  white-space: nowrap;
}
.input-section::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* Results below: 3 res cards full width + meta + recs */
.calc-grid-stack .calc-results { padding: 1.75rem 1.5rem; }
.calc-grid-stack .res-cards { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 720px) {
  .calc-grid-stack .res-cards { grid-template-columns: 1fr; }
}
.calc-grid-stack .td-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0 1.5rem;
  padding: .5rem 1rem;
}
.calc-grid-stack .td-meta-row { padding: .6rem 0; }

/* Fixed rate pills - shown in place of an editable input */
.field.rate-fixed { margin-bottom: 1.25rem; }
.rate-pill {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  padding: .85rem 1rem;
  background: linear-gradient(135deg, var(--cream) 0%, rgba(184,146,90,.08) 100%);
  border: 1px solid var(--gold);
  border-radius: 10px;
}
.rate-pill b {
  font-family: var(--ff-body);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--gold-deep);
  letter-spacing: 0;
  font-style: normal;
  font-variant-numeric: tabular-nums;
}
.rate-pill span {
  font-size: .72rem;
  color: var(--ink-mute);
  font-weight: 500;
  text-transform: none;
  letter-spacing: .01em;
}

/* ==========================================================
   EXPLAINER CARD (what / why / how) above stacked planning calcs
   ========================================================== */
.calc-explainer {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 2.25rem;
  margin-bottom: 1.75rem;
  box-shadow: 0 8px 24px rgba(29,29,27,.04);
}
.calc-explainer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}
.calc-explainer h4 {
  font-family: var(--ff-display);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -.005em;
  color: var(--gold-deep);
  margin: 0 0 .65rem;
  position: relative;
  padding-left: 1.5rem;
}
.calc-explainer h4::before {
  content: '';
  position: absolute;
  left: 0; top: .55rem;
  width: 1rem; height: 1.5px;
  background: var(--gold);
}
.calc-explainer p {
  font-size: .9rem;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0;
}
.calc-explainer p b { color: var(--ink); font-weight: 500; }
.calc-explainer p i { font-style: italic; color: var(--ink-soft); }

@media (max-width: 960px) {
  .calc-explainer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .calc-explainer { padding: 1.5rem 1.5rem; }
}

/* More breathing room inside the stacked input grid */
.calc-grid-stack .calc-inputs-2col {
  gap: 1.5rem 2rem;
}
.calc-grid-stack .input-section {
  margin: 1.25rem 0 .5rem;
}
.calc-grid-stack .input-section:first-child { margin-top: 0; }
.calc-grid-stack .calc-inputs-2col .field { margin-bottom: .25rem; }

/* ==========================================================
   GLOSSARY (collapsible) inside calc-results
   ========================================================== */
.calc-glossary {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.calc-glossary summary {
  cursor: pointer;
  font-weight: 500;
  font-size: .92rem;
  color: var(--ink);
  list-style: none;
  position: relative;
  padding-right: 1.5rem;
  outline: none;
}
.calc-glossary summary::-webkit-details-marker { display: none; }
.calc-glossary summary::after {
  content: '+';
  position: absolute;
  right: .25rem; top: 50%;
  transform: translateY(-50%);
  color: var(--gold-deep);
  font-weight: 500;
  font-size: 1.15rem;
  transition: transform .2s var(--ease);
}
.calc-glossary[open] summary::after { content: '–'; }
.calc-glossary dl {
  margin: 1rem 0 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: .75rem 1.25rem;
}
.calc-glossary dt {
  font-weight: 500;
  color: var(--ink);
  font-size: .85rem;
  margin-bottom: .15rem;
}
.calc-glossary dd {
  margin: 0 0 .5rem;
  font-size: .82rem;
  color: var(--ink-soft);
  line-height: 1.55;
}
.calc-glossary dd b { color: var(--ink); font-weight: 500; }
.calc-glossary dd i { font-style: italic; }

@media (min-width: 760px) {
  .calc-glossary dl { grid-template-columns: 12rem 1fr; gap: .65rem 1.5rem; }
  .calc-glossary dt { margin: 0; padding-top: .15rem; }
}

/* ==========================================================
   HUB GROUP HEAD - baseline-aligned number + shiny heading
   Overrides the absolutely-positioned original layout
   ========================================================== */
.hub-group-head {
  display: flex !important;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 1.5rem;
  row-gap: .25rem;
  padding-left: 0 !important;
  position: relative;
  max-width: 800px;
  margin-bottom: 2.5rem;
}
.hub-group-head .hub-num {
  position: static !important;
  display: inline-block;
  font-family: var(--ff-body);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1;
  color: var(--gold-deep);
  flex: 0 0 auto;
}
.hub-group-head h2 {
  font-family: var(--ff-display);
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 500;
  letter-spacing: -.015em;
  margin: 0;
  line-height: 1.05;
  /* Shiny gold gradient text */
  background: linear-gradient(110deg,
              var(--ink) 0%,
              var(--ink) 35%,
              var(--gold-deep) 65%,
              #b89c5e 85%,
              var(--ink) 100%);
  background-size: 200% 100%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  transition: background-position .6s ease;
}
.hub-group:hover .hub-group-head h2 {
  background-position: 100% 50%;
}
.hub-group-head p {
  flex-basis: 100%;
  margin: .5rem 0 0;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.55;
}

/* Polish explainer headings - shiny gradient + cleaner accent */
.calc-explainer h4 {
  font-family: var(--ff-display);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: -.005em;
  margin: 0 0 .7rem;
  padding-left: 0;
  position: relative;
  /* shiny gold gradient text */
  background: linear-gradient(110deg, var(--ink) 0%, var(--ink) 30%, var(--gold-deep) 60%, #b89c5e 80%, var(--ink) 100%);
  background-size: 200% 100%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  transition: background-position .5s ease;
  display: inline-block;
}
.calc-explainer h4::before { display: none; }
.calc-explainer > .calc-explainer-grid > div:hover h4 {
  background-position: 100% 50%;
}

/* ==========================================================
   INLINE TERMS GLOSSARY
   ========================================================== */
.calc-terms {
  margin-top: 2.5rem;
  padding: 2.5rem;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(29,29,27,.03);
}
.calc-terms h3 {
  font-family: var(--ff-display);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 0.5rem;
}
.calc-terms-howto {
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--ink-soft);
  margin: 0 0 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px dashed var(--line);
}
.calc-terms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem 2rem;
}
.calc-terms-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.calc-terms-item h4 {
  font-family: var(--ff-body);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-deep);
  margin: 0;
}
.calc-terms-item p {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0;
}

/* ==========================================================
   GLOBAL SEBI/AMFI DISCLAIMER
   ========================================================== */
.global-disclaimer {
  margin: 3.5rem auto 1.5rem;
  padding: 2.2rem 2.5rem;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  max-width: 1200px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.015);
}
.global-disclaimer-content {
  font-family: var(--ff-body);
  font-size: 0.78rem;
  line-height: 1.65;
  color: var(--ink-soft);
}
.global-disclaimer-title {
  font-family: var(--ff-display);
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink);
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.global-disclaimer-warning {
  background: rgba(154, 121, 69, 0.06);
  border-left: 3px solid var(--gold-deep);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-weight: 500;
  color: var(--ink);
  font-size: 0.8rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.global-disclaimer-list {
  padding-left: 1.2rem;
  margin: 0.5rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.global-disclaimer-list li {
  list-style-type: decimal;
}

/* Style fix for home loan prepayment EMI multiples suffix overlap */
#hlp_emi_field .ctrl input { padding-right: 4.8rem !important; }

/* Premium Compact Layout overrides to bring calculators above the fold */
#view {
  padding-top: 2rem !important;
  padding-bottom: 4rem !important;
}
.back-link {
  margin-bottom: 1.25rem !important;
}
.calc-header {
  margin-bottom: 1.5rem !important;
}
.calc-header h2 {
  margin: 0.2rem 0 0.4rem !important;
}
.calc-grid {
  padding: 2rem !important;
  gap: 2rem !important;
}



