:root {
  --bg-void: #050711;
  --bg-deep: #0B1024;
  --glass: rgba(14, 20, 44, 0.68);
  --glass-strong: rgba(11, 16, 36, 0.86);
  --glass-border: rgba(255, 255, 255, 0.14);
  --glass-highlight: rgba(255, 255, 255, 0.28);
  --ink: #F8FAFC;
  --ink-soft: #94A3B8;
  --gold: #F6CE77;
  --gold-deep: #C98A2B;
  --cyan: #00E5FF;
  --magenta: #FF2A85;
  --purple: #9D4EDD;
  --emerald: #10F5A8;
  --blue: #3B82F6;
  --crimson: #FF3B30;

  /* Dynamic LED Mood Tokens (Aurora Prism default) */
  --led-1: #00E5FF;
  --led-2: #FF2A85;
  --led-3: #F6CE77;
  --led-4: #9D4EDD;
  --spotlight-aura: #00E5FF;

  --radius: 22px;
  --radius-sm: 14px;
  --shadow-3d: 0 24px 60px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

/* 5 Ambient Cabin LED Moods */
:root[data-mood="gold"] {
  --led-1: #F6CE77;
  --led-2: #FF9F1C;
  --led-3: #FFF3B0;
  --led-4: #C98A2B;
}

:root[data-mood="crimson"] {
  --led-1: #FF3B30;
  --led-2: #FF2A85;
  --led-3: #F6CE77;
  --led-4: #991B1B;
}

:root[data-mood="cyber"] {
  --led-1: #00E5FF;
  --led-2: #3B82F6;
  --led-3: #10F5A8;
  --led-4: #6366F1;
}

:root[data-mood="amethyst"] {
  --led-1: #C084FC;
  --led-2: #FF2A85;
  --led-3: #00E5FF;
  --led-4: #7E22CE;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at 50% 0%, #131B3D 0%, var(--bg-deep) 45%, var(--bg-void) 100%);
  color: var(--ink);
  font-family: 'Be Vietnam Pro', system-ui, -apple-system, sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
}

h1,
h2,
h3 {
  font-family: 'Montserrat', 'Be Vietnam Pro', sans-serif;
  line-height: 1.18;
  margin: 0;
  letter-spacing: -0.02em;
}

.font-cockpit,
.tabular {
  font-variant-numeric: tabular-nums;
}

.font-cockpit {
  font-family: 'Chakra Petch', 'Be Vietnam Pro', sans-serif;
}

button,
input,
select {
  font-family: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 2px solid var(--led-1);
  outline-offset: 2px;
}

/* Canvas FX Layers */
#ambient-canvas,
#confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}

#ambient-canvas {
  z-index: 0;
}

#confetti-canvas {
  z-index: 9999;
}

/* 3D Perspective Showroom Floor & Aurora Ambient Light Beams */
.showroom-backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  perspective: 900px;
}

.aurora-beam {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.34;
  transition: background 0.6s ease;
  animation: beamDrift 16s ease-in-out infinite alternate;
}

.beam-1 {
  width: 620px;
  height: 420px;
  top: -120px;
  left: -100px;
  background: radial-gradient(circle, var(--led-1), transparent 70%);
}

.beam-2 {
  width: 640px;
  height: 440px;
  top: 80px;
  right: -140px;
  background: radial-gradient(circle, var(--led-2), transparent 70%);
  animation-delay: -5s;
}

.beam-3 {
  width: 560px;
  height: 360px;
  bottom: -100px;
  left: 30%;
  background: radial-gradient(circle, var(--led-4), transparent 70%);
  animation-delay: -9s;
}

@keyframes beamDrift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(45px, 28px, 0) scale(1.12); }
}

.showroom-floor {
  position: absolute;
  left: -30%;
  right: -30%;
  bottom: -140px;
  height: 440px;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 64px 64px;
  transform: rotateX(68deg);
  transform-origin: center bottom;
  mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.85) 10%, transparent 90%);
  -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.85) 10%, transparent 90%);
}

/* Top Chromatic Luxury Ticker */
.festive-ticker {
  position: relative;
  z-index: 10;
  background: rgba(6, 9, 22, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  overflow: hidden;
  padding: 8px 0;
}

.festive-ticker::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--led-1), var(--led-2), var(--led-3), var(--led-4), var(--led-1));
  background-size: 200% 100%;
  animation: rainbowFlow 8s linear infinite;
}

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

.ticker-track {
  display: flex;
  width: max-content;
  gap: 32px;
  white-space: nowrap;
  font-weight: 600;
  font-size: 12.5px;
  color: #E2E8F0;
  animation: tickerScroll 36s linear infinite;
}

.ticker-track span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.ticker-track span strong {
  color: var(--gold);
}

@keyframes tickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Main Container */
.page-wrap {
  position: relative;
  z-index: 2;
  max-width: 1260px;
  margin: 0 auto;
  padding: 22px 20px 68px;
}

/* 3D Smoked Glass Card Base */
.glass-panel {
  background: var(--glass);
  backdrop-filter: blur(22px) saturate(155%);
  -webkit-backdrop-filter: blur(22px) saturate(155%);
  border: 1px solid var(--glass-border);
  border-top-color: var(--glass-highlight);
  border-radius: var(--radius);
  box-shadow: var(--shadow-3d);
}

/* 3D Interactive Pointer Tilt & Specular Clearcoat Glare */
.tilt-3d {
  transform-style: preserve-3d;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease, border-color 0.25s ease;
  will-change: transform;
  position: relative;
}

.tilt-3d::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    420px circle at var(--mx, 50%) var(--my, 50%),
    rgba(255, 255, 255, 0.16),
    transparent 60%
  );
  transition: opacity 0.25s ease;
}

.tilt-3d:hover::after {
  opacity: 1;
}

/* Hero Header */
.hero-header {
  padding: 22px 26px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.hero-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--led-1), var(--led-3), var(--led-2), var(--led-4));
}

.hero-top-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.hero-title-group {
  max-width: 720px;
}

.source-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 13px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(246, 206, 119, 0.18), rgba(0, 229, 255, 0.14));
  border: 1px solid rgba(246, 206, 119, 0.45);
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  margin-bottom: 10px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.source-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(246, 206, 119, 0.35);
}

.hero-h1 {
  font-size: clamp(1.7rem, 3.2vw, 2.5rem);
  font-weight: 900;
  background: linear-gradient(110deg, #FFFFFF 15%, var(--gold) 52%, var(--led-1) 88%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  margin: 8px 0 0;
  color: #CBD5E1;
  font-size: 0.94rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* Luxury Metallic / Luminous Buttons */
.btn-luxe {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn-luxe:hover {
  transform: translateY(-2px);
  border-color: var(--led-1);
  box-shadow: 0 10px 26px rgba(0, 229, 255, 0.24);
}

.btn-luxe:active {
  transform: translateY(0);
}

.btn-dice {
  background: linear-gradient(135deg, rgba(246, 206, 119, 0.26), rgba(201, 138, 43, 0.22));
  border-color: rgba(246, 206, 119, 0.55);
  color: var(--gold);
}

.btn-confetti {
  background: linear-gradient(135deg, var(--led-2), var(--led-4));
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 8px 24px rgba(255, 42, 133, 0.35);
}

.btn-sound.muted {
  opacity: 0.65;
}

/* Ambient LED Mood Bar */
.mood-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mood-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-soft);
  margin-right: 4px;
}

.mood-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: #E2E8F0;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.mood-pill:hover {
  background: rgba(255, 255, 255, 0.12);
}

.mood-pill.active {
  background: rgba(255, 255, 255, 0.16);
  border-color: var(--gold);
  color: #FFFFFF;
  box-shadow: 0 0 16px rgba(246, 206, 119, 0.3);
}

.mood-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

/* Section Headers */
.section-block {
  margin-bottom: 30px;
}

.section-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.section-heading h2 {
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  font-weight: 800;
  color: #FFFFFF;
}

.luxe-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0, 229, 255, 0.4);
  background: rgba(0, 229, 255, 0.12);
  color: var(--cyan);
  font-size: 12px;
  font-weight: 700;
}

/* 3D Trim Selector Grid */
.trim-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
  perspective: 1200px;
}

.trim-card {
  text-align: left;
  background: var(--glass);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  padding: 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 9px;
  color: var(--ink);
}

.trim-card.active {
  background: linear-gradient(155deg, rgba(24, 34, 72, 0.9), rgba(14, 18, 42, 0.95));
  border-color: var(--led-1);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.65), 0 0 28px rgba(0, 229, 255, 0.28);
}

.trim-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  transform: translateZ(16px);
}

.trim-code {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border-radius: 8px;
  background: rgba(246, 206, 119, 0.16);
  border: 1px solid rgba(246, 206, 119, 0.45);
  color: var(--gold);
}

.trim-badge {
  font-size: 11px;
  font-weight: 600;
  color: #CBD5E1;
}

.trim-thumb-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #070B18;
  transform: translateZ(20px);
}

.trim-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.trim-card:hover .trim-thumb-wrap img {
  transform: scale(1.06);
}

.trim-name {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.96rem;
  color: #FFFFFF;
  transform: translateZ(14px);
}

.trim-price {
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  font-size: 1.42rem;
  color: var(--gold);
  text-shadow: 0 0 18px rgba(246, 206, 119, 0.32);
  transform: translateZ(22px);
}

.trim-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: auto;
  transform: translateZ(10px);
}

.trim-specs span {
  font-size: 11px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 2px 8px;
  color: #CBD5E1;
}

/* 3D Illuminated Showroom Turntable Stage */
.spotlight-stage {
  padding: 24px 26px;
  display: grid;
  grid-template-columns: 1.18fr 0.92fr;
  gap: 26px;
  align-items: center;
  perspective: 1200px;
  overflow: hidden;
}

.spotlight-visual {
  position: relative;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 22px 18px 34px;
  background:
    radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--spotlight-aura) 38%, transparent) 0%, rgba(7, 11, 26, 0.94) 72%);
  overflow: hidden;
  transform-style: preserve-3d;
  transition: background 0.4s ease;
}

/* 3D Turntable Rotating Ring beneath the Car */
.turntable-ring {
  position: absolute;
  left: 50%;
  bottom: 10px;
  width: 84%;
  height: 76px;
  transform: translateX(-50%) rotateX(72deg);
  border-radius: 50%;
  border: 2px solid var(--spotlight-aura);
  box-shadow:
    0 0 28px var(--spotlight-aura),
    inset 0 0 24px var(--spotlight-aura);
  opacity: 0.78;
  pointer-events: none;
  animation: turntablePulse 5s ease-in-out infinite alternate;
}

.turntable-ring-outer {
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 94%;
  height: 90px;
  transform: translateX(-50%) rotateX(74deg);
  border-radius: 50%;
  border: 1px dashed rgba(246, 206, 119, 0.55);
  pointer-events: none;
  animation: turntableSpin 18s linear infinite;
}

@keyframes turntablePulse {
  0% { opacity: 0.55; }
  100% { opacity: 0.92; }
}

@keyframes turntableSpin {
  0% { transform: translateX(-50%) rotateX(74deg) rotateZ(0deg); }
  100% { transform: translateX(-50%) rotateX(74deg) rotateZ(360deg); }
}

.spotlight-visual img {
  position: relative;
  z-index: 2;
  width: 100%;
  max-height: 270px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  display: block;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.72), 0 0 32px color-mix(in srgb, var(--spotlight-aura) 32%, transparent);
  transform: translateZ(34px);
}

.spotlight-float-pill {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 4;
  background: rgba(6, 10, 24, 0.84);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(246, 206, 119, 0.55);
  color: var(--gold);
  border-radius: 999px;
  padding: 5px 13px;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  transform: translateZ(46px);
}

.spotlight-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  transform: translateZ(20px);
}

.spotlight-model-title {
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  font-weight: 800;
  color: #FFFFFF;
}

.spotlight-price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
}

.spotlight-price-big {
  font-family: 'Chakra Petch', sans-serif;
  font-size: clamp(1.9rem, 3vw, 2.45rem);
  font-weight: 700;
  background: linear-gradient(90deg, var(--gold), #FFF4CC, var(--led-1));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.spotlight-source-note {
  font-size: 12.5px;
  color: var(--ink-soft);
}

.color-picker-label {
  font-size: 13px;
  font-weight: 600;
  color: #CBD5E1;
  margin-bottom: 10px;
}

.color-picker-label strong {
  color: #FFFFFF;
}

.color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
}

.swatch-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.45);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), inset 0 2px 4px rgba(255, 255, 255, 0.4);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  position: relative;
}

.swatch-btn:hover {
  transform: scale(1.12);
}

.swatch-btn.active {
  border-color: var(--gold);
  box-shadow: 0 0 18px var(--spotlight-aura), 0 0 0 2px var(--gold);
}

.spotlight-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.highlight-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 5px 11px;
  font-size: 12.5px;
  font-weight: 600;
  color: #E2E8F0;
}

/* Main 2-Column Calculator Grid */
.calc-layout {
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  gap: 22px;
  align-items: start;
}

.panel-card {
  padding: 22px;
}

.control-group {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(9, 13, 30, 0.62);
  margin-bottom: 14px;
  transition: border-color 0.2s ease;
}

.control-group:hover {
  border-color: rgba(255, 255, 255, 0.24);
}

.control-group:last-child {
  margin-bottom: 0;
}

.control-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.control-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: #FFFFFF;
}

.control-value-badge {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.2), rgba(157, 78, 221, 0.24));
  border: 1px solid rgba(0, 229, 255, 0.45);
  color: #FFFFFF;
  border-radius: 999px;
  padding: 4px 12px;
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  font-size: 13px;
}

.slider-input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.num-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(5, 8, 20, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 6px 11px;
}

.num-box input {
  width: 66px;
  border: none;
  background: transparent;
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  font-size: 15.5px;
  color: var(--gold);
  text-align: right;
  outline: none;
}

.num-box span {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
}

/* Machined Metallic Luminous Sliders */
input[type="range"].pop-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(
    90deg,
    var(--led-1) 0%,
    var(--led-2) var(--slider-pct, 50%),
    rgba(255, 255, 255, 0.1) var(--slider-pct, 50%),
    rgba(255, 255, 255, 0.1) 100%
  );
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.7);
  cursor: pointer;
}

input[type="range"].pop-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #FFFFFF, var(--gold) 65%, #8B5E1A 100%);
  border: 2px solid #FFFFFF;
  box-shadow: 0 0 16px var(--led-1), 0 4px 10px rgba(0, 0, 0, 0.65);
  cursor: grab;
  transition: transform 0.12s ease;
}

input[type="range"].pop-slider::-webkit-slider-thumb:hover {
  transform: scale(1.14);
}

input[type="range"].pop-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #FFFFFF, var(--gold) 65%, #8B5E1A 100%);
  border: 2px solid #FFFFFF;
  box-shadow: 0 0 16px var(--led-1), 0 4px 10px rgba(0, 0, 0, 0.65);
  cursor: grab;
}

.preset-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 11px;
}

.pill-btn {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  font-size: 12px;
  font-weight: 600;
  color: #CBD5E1;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pill-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
}

.pill-btn.active {
  background: linear-gradient(135deg, var(--led-1), var(--blue));
  border-color: rgba(255, 255, 255, 0.45);
  color: #040814;
  font-weight: 700;
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.35);
}

/* Split Progress Bar */
.split-bar-wrap {
  margin-top: 12px;
}

.split-bar-track {
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  overflow: hidden;
  display: flex;
  background: rgba(255, 255, 255, 0.08);
}

.split-down {
  background: linear-gradient(90deg, var(--emerald), var(--cyan));
  transition: width 0.2s ease;
}

.split-loan {
  background: linear-gradient(90deg, var(--purple), var(--magenta));
  flex: 1;
}

.split-labels {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #CBD5E1;
  margin-top: 6px;
}

/* Method Segmented Toggle */
.segmented-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.seg-btn {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  color: #CBD5E1;
  transition: all 0.16s ease;
}

.seg-btn.active {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.24), rgba(59, 130, 246, 0.32));
  border-color: var(--cyan);
  color: #FFFFFF;
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.22);
}

.helper-note {
  margin: 8px 0 0;
  font-size: 12.5px;
  color: var(--ink-soft);
}

/* Rolling Cost Controls */
.toggle-switch {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  font-weight: 700;
  font-size: 13.5px;
  color: #FFFFFF;
}

.toggle-switch input {
  width: 18px;
  height: 18px;
  accent-color: var(--led-1);
  cursor: pointer;
}

.rolling-details {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  gap: 10px;
}

.region-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.region-select {
  padding: 7px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: #070B19;
  font-weight: 600;
  font-size: 13px;
  color: #FFFFFF;
}

.fee-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.fee-pill {
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 4px 9px;
  color: #E2E8F0;
}

/* Sticky Right Results Dashboard */
.results-sticky {
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.monthly-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.hero-stat-card {
  border-radius: 20px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  gap: 7px;
  position: relative;
  overflow: hidden;
}

.stat-year1 {
  background: linear-gradient(150deg, rgba(16, 245, 168, 0.14), rgba(11, 16, 36, 0.85));
  border-top: 2px solid var(--emerald);
}

.stat-floating {
  background: linear-gradient(150deg, rgba(255, 42, 133, 0.16), rgba(11, 16, 36, 0.85));
  border-top: 2px solid var(--magenta);
}

.stat-label {
  font-size: 12px;
  font-weight: 700;
  color: #CBD5E1;
}

.stat-big-money {
  font-family: 'Chakra Petch', sans-serif;
  font-size: clamp(1.45rem, 2.3vw, 1.9rem);
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.1;
}

.stat-breakdown {
  font-size: 12px;
  color: var(--ink-soft);
}

.delta-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 2px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 11.5px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  color: var(--gold);
}

.kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.kpi-box {
  background: var(--glass);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  padding: 13px 15px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.kpi-box-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
}

.kpi-box-val {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 1.28rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-top: 2px;
}

.kpi-box-sub {
  font-size: 11.5px;
  color: #94A3B8;
}

/* 3D Cockpit Tachometer Comfort Card */
.vibe-card {
  background: linear-gradient(155deg, rgba(16, 23, 52, 0.85), rgba(8, 12, 28, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  padding: 16px 18px;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.55);
}

.vibe-cockpit-grid {
  display: grid;
  grid-template-columns: 162px 1fr;
  gap: 14px;
  align-items: center;
}

.vibe-gauge-wrap {
  width: 162px;
  height: 138px;
}

.vibe-gauge-wrap canvas,
.chart-canvas-wrap canvas {
  width: 100%;
  display: block;
}

.vibe-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 1.02rem;
  color: #FFFFFF;
  margin-bottom: 5px;
}

.vibe-sub {
  font-size: 12.5px;
  color: #CBD5E1;
  margin: 0 0 10px;
}

.snack-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.snack-chip {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--gold);
}

/* VIP Holographic CTA */
.btn-celebrate-big {
  width: 100%;
  padding: 15px 22px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: linear-gradient(110deg, var(--led-2), var(--led-4), var(--led-1));
  background-size: 200% 100%;
  color: #FFFFFF;
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 1.08rem;
  letter-spacing: 0.01em;
  box-shadow: 0 14px 36px rgba(255, 42, 133, 0.35), 0 0 24px rgba(0, 229, 255, 0.25);
  cursor: pointer;
  transition: transform 0.15s ease, background-position 0.4s ease, box-shadow 0.2s ease;
}

.btn-celebrate-big:hover {
  transform: translateY(-2px);
  background-position: 100% 0%;
  box-shadow: 0 18px 42px rgba(0, 229, 255, 0.38);
}

/* Charts Section */
.charts-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 20px;
}

.chart-card {
  position: relative;
  padding: 20px;
}

.chart-card h3 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 10px;
  color: #FFFFFF;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: #CBD5E1;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.chart-canvas-wrap {
  position: relative;
  width: 100%;
}

.chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(5, 8, 22, 0.94);
  backdrop-filter: blur(12px);
  color: #FFFFFF;
  border: 1px solid rgba(246, 206, 119, 0.5);
  border-radius: 12px;
  padding: 9px 12px;
  font-size: 12px;
  line-height: 1.5;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65);
  z-index: 5;
  min-width: 190px;
}

.chart-tooltip .tt-title {
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 3px;
}

.chart-tooltip .tt-total {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-weight: 800;
  color: var(--cyan);
}

.donut-legend {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.donut-legend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 600;
  color: #E2E8F0;
}

/* Comparison & Schedule Tables */
.table-card {
  padding: 20px;
}

.table-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.tab-group {
  display: inline-flex;
  gap: 8px;
}

.tab-btn {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #CBD5E1;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  border-color: #FFF3B0;
  color: #060914;
}

.table-scroll {
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

table.pop-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
  background: rgba(7, 10, 24, 0.65);
}

table.pop-table th {
  background: rgba(255, 255, 255, 0.08);
  color: var(--gold);
  text-align: left;
  padding: 12px;
  font-weight: 700;
  white-space: nowrap;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

table.pop-table td {
  padding: 11px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  color: #E2E8F0;
  white-space: nowrap;
}

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

table.pop-table tr.clickable-row {
  cursor: pointer;
  transition: background-color 0.12s ease;
}

table.pop-table tr.clickable-row:hover {
  background: rgba(255, 255, 255, 0.08);
}

table.pop-table tr.active-trim-row {
  background: rgba(0, 229, 255, 0.14);
  font-weight: 700;
}

table.pop-table tr.active-trim-row td {
  color: #FFFFFF;
}

table.pop-table tr.month-13-row {
  background: rgba(255, 42, 133, 0.16);
  font-weight: 700;
}

.phase-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.phase-year1 {
  background: rgba(16, 245, 168, 0.15);
  color: var(--emerald);
  border-color: rgba(16, 245, 168, 0.4);
}

.phase-float {
  background: rgba(255, 42, 133, 0.18);
  color: #FF85B8;
  border-color: rgba(255, 42, 133, 0.45);
}

.phase-payoff {
  background: linear-gradient(135deg, rgba(246, 206, 119, 0.25), rgba(16, 245, 168, 0.2));
  color: var(--gold);
  border-color: rgba(246, 206, 119, 0.65);
}

table.pop-table tr.early-payoff-row {
  background: linear-gradient(90deg, rgba(246, 206, 119, 0.18), rgba(16, 245, 168, 0.1));
  font-weight: 700;
}

table.pop-table tr.early-payoff-row td {
  color: var(--gold);
  border-top: 1px dashed rgba(246, 206, 119, 0.55);
}

/* Early Payoff Banner in Sticky Dashboard */
.early-banner {
  background: linear-gradient(145deg, rgba(246, 206, 119, 0.16), rgba(16, 245, 168, 0.12), rgba(11, 16, 36, 0.92));
  border: 1.5px solid rgba(246, 206, 119, 0.65);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: 0 12px 32px rgba(246, 206, 119, 0.15);
  display: grid;
  gap: 6px;
}

.early-banner[hidden] {
  display: none;
}

.early-banner-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.early-banner-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--gold);
}

.early-banner-save {
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(16, 245, 168, 0.18);
  border: 1px solid rgba(16, 245, 168, 0.5);
  color: var(--emerald);
  font-size: 12px;
  font-weight: 700;
}

.early-banner-amount {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 1.48rem;
  font-weight: 700;
  color: #FFFFFF;
}

.early-banner-sub {
  font-size: 12.5px;
  color: #CBD5E1;
}

/* Section 2B: 3-Card Early Payoff Strategy Showcase */
.early-compare-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  perspective: 1200px;
}

.early-card {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.early-card.active {
  border-color: var(--gold);
  background: linear-gradient(155deg, rgba(28, 36, 76, 0.9), rgba(10, 14, 34, 0.95));
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.65), 0 0 28px rgba(246, 206, 119, 0.26);
}

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

.early-card-badge {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #E2E8F0;
}

.early-card.active .early-card-badge {
  background: rgba(246, 206, 119, 0.2);
  border-color: var(--gold);
  color: var(--gold);
}

.early-card h3 {
  font-size: 1.08rem;
  font-weight: 800;
  color: #FFFFFF;
}

.early-card-big {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1.15;
}

.early-card-rows {
  display: grid;
  gap: 6px;
  font-size: 12.5px;
  color: #CBD5E1;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.early-card-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.early-card-row strong {
  color: #FFFFFF;
}

.early-savings-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 11px;
  border-radius: 10px;
  background: rgba(16, 245, 168, 0.14);
  border: 1px solid rgba(16, 245, 168, 0.42);
  color: var(--emerald);
  font-size: 12.5px;
  font-weight: 700;
}

.early-savings-pill.neutral {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
  color: #CBD5E1;
}

.early-apply-btn {
  margin-top: auto;
  width: 100%;
}

.early-apply-btn.active {
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  border-color: #FFF3B0;
  color: #060914;
}

/* VIP Holographic Delivery Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 5, 14, 0.78);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 16px;
  z-index: 5000;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-card {
  width: 100%;
  max-width: 570px;
  background: linear-gradient(155deg, rgba(16, 23, 52, 0.96), rgba(7, 10, 24, 0.98));
  border: 1.5px solid rgba(246, 206, 119, 0.6);
  border-radius: 26px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.85), 0 0 42px rgba(0, 229, 255, 0.22);
  padding: 26px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  color: #FFFFFF;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
}

.modal-ticket {
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(246, 206, 119, 0.45);
  border-radius: 16px;
  padding: 16px;
  margin: 14px 0;
  display: grid;
  gap: 9px;
  font-size: 13.5px;
}

.ticket-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #CBD5E1;
}

.ticket-row strong {
  color: #FFFFFF;
  text-align: right;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Footer */
.site-footer {
  margin-top: 32px;
  padding: 16px 20px;
  font-size: 13px;
  color: var(--ink-soft);
}

.site-footer a {
  color: var(--cyan);
  font-weight: 700;
}

/* Responsive */
@media (max-width: 1060px) {
  .trim-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .calc-layout,
  .charts-grid,
  .spotlight-stage,
  .early-compare-grid {
    grid-template-columns: 1fr;
  }
  .results-sticky {
    position: static;
  }
}

@media (max-width: 640px) {
  .trim-grid,
  .monthly-pair,
  .kpi-grid,
  .vibe-cockpit-grid {
    grid-template-columns: 1fr;
  }
  .vibe-gauge-wrap {
    margin: 0 auto;
  }
  .hero-header,
  .panel-card,
  .spotlight-stage {
    padding: 16px;
  }
  .slider-input-row {
    grid-template-columns: 1fr;
  }
  .num-box {
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .aurora-beam,
  .ticker-track,
  .festive-ticker::after,
  .turntable-ring,
  .turntable-ring-outer {
    animation: none !important;
  }
  .tilt-3d {
    transform: none !important;
  }
}
