/* ===== CALCULATOR STYLES ===== */
/* Extracted section-specific CSS */

/* ===== HOME AFFORDABILITY CALCULATOR ===== */
.home-affordability-page {
  background:
    radial-gradient(circle at 8% 0%, rgba(34, 197, 94, 0.12), transparent 28%),
    radial-gradient(circle at 92% 4%, rgba(96, 165, 250, 0.1), transparent 30%),
    linear-gradient(135deg, #060b14 0%, #101827 50%, #071318 100%);
}

.home-afford-page {
  max-width: 1400px;
  padding-top: 24px;
}

.home-afford-page .page-title,
.home-afford-page .emi-page-lead {
  color: #fff;
}

.home-afford-page .page-title {
  font-size: clamp(2rem, 4vw, 3.25rem);
  margin-bottom: 8px;
  background: linear-gradient(135deg, #bbf7d0, #60a5fa 58%, #fbbf24);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.home-afford-page .emi-page-lead {
  color: #cbd5e1;
}

.home-afford-mode-card {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin: 14px 0 16px;
  padding: 12px 14px;
  border-radius: 20px;
  background:
    linear-gradient(90deg, rgba(34, 197, 94, 0.16), transparent 32%, rgba(96, 165, 250, 0.12)),
    linear-gradient(145deg, rgba(30, 41, 59, 0.86), rgba(15, 23, 42, 0.92)),
    radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.16), transparent 34%);
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

.home-afford-country-note {
  max-width: 1400px;
  margin: 10px auto 14px;
  padding: 10px 14px;
  border-radius: 14px;
  color: #fde68a;
  background: rgba(120, 53, 15, 0.22);
  border: 1px solid rgba(251, 191, 36, 0.28);
  font-size: 0.9rem;
  font-weight: 800;
}

.home-afford-mode-card span,
.home-afford-input-card h2,
.home-afford-related p,
.home-afford-hero-result span,
.home-afford-result-pair span,
.home-afford-benefits span,
.home-afford-cost-list span {
  display: block;
  color: #86efac;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-afford-mode-card strong {
  display: block;
  color: #fff;
  font-size: 1.05rem;
  margin-top: 3px;
}

.home-afford-tabs {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.home-afford-tabs button,
.home-afford-property-types button {
  border: 0;
  cursor: pointer;
  color: #d1d5db;
  background: transparent;
  font-weight: 900;
  font-family: inherit;
}

.home-afford-tabs button {
  min-height: 38px;
  padding: 8px 15px;
  border-radius: 999px;
  white-space: nowrap;
}

.home-afford-tabs button.active,
.home-afford-property-types button.active {
  color: #052e16;
  background: linear-gradient(135deg, #bbf7d0, #22c55e);
}

.home-afford-grid {
  display: grid;
  grid-template-columns: minmax(430px, 0.42fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.home-afford-left,
.home-afford-right {
  display: grid;
  gap: 10px;
  align-content: start;
}

.home-afford-left {
  position: sticky;
  top: var(--tools-sticky-offset, 96px);
  padding: 10px;
  border-radius: 22px;
  border: 1px solid rgba(34, 197, 94, 0.16);
  background:
    radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(6, 12, 24, 0.76), rgba(15, 23, 42, 0.84));
}

.home-afford-right {
  padding: 10px;
  border-radius: 22px;
  border: 1px solid rgba(96, 165, 250, 0.15);
  background:
    radial-gradient(circle at 100% 0%, rgba(96, 165, 250, 0.1), transparent 36%),
    linear-gradient(180deg, rgba(6, 12, 24, 0.62), rgba(15, 23, 42, 0.78));
}

.home-afford-input-card,
.home-afford-related,
.home-afford-hero-result,
.home-afford-result-pair article,
.home-afford-benefits,
.home-afford-explain article,
.home-afford-cost-list,
.home-afford-property-summary,
.home-afford-chart-card {
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background:
    radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.09), transparent 34%),
    linear-gradient(145deg, rgba(30, 35, 50, 0.92), rgba(20, 25, 35, 0.9));
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.16);
}

.home-afford-input-card,
.home-afford-related,
.home-afford-result-pair article,
.home-afford-benefits,
.home-afford-explain article,
.home-afford-cost-list,
.home-afford-property-summary,
.home-afford-chart-card {
  padding: 12px;
}

.home-afford-input-card:nth-child(2) {
  background:
    radial-gradient(circle at 0% 0%, rgba(96, 165, 250, 0.11), transparent 34%),
    linear-gradient(145deg, rgba(30, 35, 50, 0.92), rgba(20, 25, 35, 0.9));
}

.home-afford-input-card:nth-child(3) {
  background:
    radial-gradient(circle at 0% 0%, rgba(251, 191, 36, 0.1), transparent 34%),
    linear-gradient(145deg, rgba(30, 35, 50, 0.92), rgba(20, 25, 35, 0.9));
}

.home-afford-input-card:nth-child(4) {
  background:
    radial-gradient(circle at 0% 0%, rgba(168, 85, 247, 0.1), transparent 34%),
    linear-gradient(145deg, rgba(30, 35, 50, 0.92), rgba(20, 25, 35, 0.9));
}

.home-afford-input-card h2 {
  margin: 0 0 8px;
}

.home-afford-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.home-afford-row--three {
  grid-template-columns: 1.08fr 0.86fr 1.1fr;
}

.home-afford-input-card label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: #a7f3d0;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  line-height: 1.15;
  white-space: nowrap;
}

.home-afford-input-card input,
.home-afford-input-card select {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(34, 197, 94, 0.26);
  border-radius: 11px;
  padding: 7px 9px;
  color: #fff;
  background: rgba(2, 6, 23, 0.7);
  font: 900 0.94rem/1.1 inherit;
  box-sizing: border-box;
}

.home-afford-check {
  display: flex !important;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.home-afford-check input {
  width: 18px;
  min-height: 18px;
}

.home-afford-toggle-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.home-afford-toggle-line h2 {
  margin: 0;
}

.home-afford-switch {
  display: inline-flex !important;
}

.home-afford-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.home-afford-switch span {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.28);
}

.home-afford-switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.18s ease;
}

.home-afford-switch input:checked + span {
  background: #22c55e;
}

.home-afford-switch input:checked + span::after {
  transform: translateX(20px);
}

.home-afford-related a {
  display: grid;
  grid-template-columns: minmax(120px, 0.42fr) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 38px;
  margin-top: 7px;
  padding: 7px 9px;
  border-radius: 12px;
  color: #fff;
  text-decoration: none;
  background: rgba(34, 197, 94, 0.09);
  border: 1px solid rgba(34, 197, 94, 0.18);
}

.home-afford-related a span {
  white-space: nowrap;
}

.home-afford-related a small {
  color: #9ca3af;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-afford-hero-result {
  padding: 18px 20px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(34, 197, 94, 0.18), transparent 46%),
    linear-gradient(90deg, rgba(34, 197, 94, 0.18), rgba(96, 165, 250, 0.07)),
    linear-gradient(145deg, rgba(20, 83, 45, 0.72), rgba(15, 23, 42, 0.9));
}

.home-afford-hero-result--blue {
  background:
    radial-gradient(circle at 50% 0%, rgba(96, 165, 250, 0.18), transparent 46%),
    linear-gradient(145deg, rgba(30, 64, 175, 0.55), rgba(15, 23, 42, 0.9));
}

.home-afford-hero-result strong {
  display: block;
  color: #bbf7d0;
  font-size: 2.72rem;
  line-height: 1;
  margin: 6px 0;
}

.home-afford-hero-result--blue strong {
  color: #bfdbfe;
}

.home-afford-hero-result p,
.home-afford-result-pair p,
.home-afford-explain p {
  color: #cbd5e1;
  font-size: 0.82rem;
  line-height: 1.35;
  margin: 5px 0 0;
}

.home-afford-result-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.home-afford-result-pair--four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.home-afford-result-pair strong {
  display: block;
  color: #fff;
  font-size: 1.22rem;
  line-height: 1.08;
  margin-top: 5px;
}

.home-afford-result-pair article:nth-child(1) {
  background:
    radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.12), transparent 36%),
    linear-gradient(145deg, rgba(30, 35, 50, 0.92), rgba(20, 25, 35, 0.9));
}

.home-afford-result-pair article:nth-child(2) {
  background:
    radial-gradient(circle at 100% 0%, rgba(96, 165, 250, 0.13), transparent 36%),
    linear-gradient(145deg, rgba(30, 35, 50, 0.92), rgba(20, 25, 35, 0.9));
}

.home-afford-result-pair--four article:nth-child(3) {
  background:
    radial-gradient(circle at 100% 0%, rgba(251, 191, 36, 0.13), transparent 36%),
    linear-gradient(145deg, rgba(30, 35, 50, 0.92), rgba(20, 25, 35, 0.9));
}

.home-afford-result-pair--four article:nth-child(4) {
  background:
    radial-gradient(circle at 100% 0%, rgba(168, 85, 247, 0.12), transparent 36%),
    linear-gradient(145deg, rgba(30, 35, 50, 0.92), rgba(20, 25, 35, 0.9));
}

.home-afford-benefits {
  background:
    radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.16), transparent 35%),
    linear-gradient(145deg, rgba(20, 83, 45, 0.38), rgba(15, 23, 42, 0.88));
}

.home-afford-benefits > div:first-child strong {
  display: block;
  color: #fff;
  font-size: 1.28rem;
  margin-top: 4px;
}

.home-afford-benefit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.home-afford-benefit-grid article {
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.055);
}

.home-afford-benefit-grid b,
.home-afford-benefit-grid span {
  display: block;
}

.home-afford-benefit-grid b {
  color: #fff;
  font-size: 0.9rem;
}

.home-afford-benefit-grid span {
  color: #cbd5e1;
  font-size: 0.78rem;
  line-height: 1.3;
  margin-top: 4px;
  letter-spacing: 0;
  text-transform: none;
}

.home-afford-explain {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.home-afford-explain h2,
.home-afford-chart-card h2 {
  color: #fff;
  font-size: 0.98rem;
  margin: 0 0 6px;
}

.home-afford-property-types {
  display: grid;
  grid-template-columns: 0.86fr 0.72fr 1.18fr 0.82fr;
  gap: 7px;
}

.home-afford-property-types button {
  min-height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.74rem;
  white-space: nowrap;
  padding: 0 5px;
}

.home-afford-input-card > p {
  color: #9ca3af;
  font-size: 0.76rem;
  line-height: 1.34;
  margin: 8px 0 0;
}

.home-afford-cost-list {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.home-afford-cost-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.home-afford-cost-list div:last-child {
  border-bottom: 0;
}

.home-afford-cost-list strong {
  color: #fff;
  font-size: 1rem;
  white-space: nowrap;
}

.home-afford-property-summary {
  display: grid;
  grid-template-columns: minmax(300px, 0.5fr) minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
}

.home-afford-property-summary .home-afford-cost-list,
.home-afford-property-summary .home-afford-result-pair article {
  box-shadow: none;
}

.home-afford-result-pair--property {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-afford-grid[hidden],
.home-afford-page [hidden] {
  display: none !important;
}

@media (max-width: 980px) {
  .home-afford-grid {
    grid-template-columns: 1fr;
  }

  .home-afford-left {
    position: static;
  }

  .home-afford-result-pair--four,
  .home-afford-benefit-grid,
  .home-afford-property-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .home-afford-page {
    padding-top: 14px;
  }

  .home-afford-page .page-title {
    font-size: 1.78rem;
    margin-bottom: 6px;
  }

  .home-afford-mode-card {
    display: grid;
    gap: 10px;
    padding: 10px;
    margin: 10px 0;
    border-radius: 16px;
  }

  .home-afford-tabs {
    width: 100%;
  }

  .home-afford-tabs button {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 0.78rem;
  }

  .home-afford-grid,
  .home-afford-left,
  .home-afford-right {
    gap: 8px;
  }

  .home-afford-left,
  .home-afford-right {
    padding: 8px;
    border-radius: 18px;
  }

  .home-afford-input-card,
  .home-afford-related,
  .home-afford-result-pair article,
  .home-afford-benefits,
  .home-afford-explain article,
  .home-afford-cost-list,
  .home-afford-property-summary,
  .home-afford-chart-card {
    padding: 8px;
  }

  .home-afford-row,
  .home-afford-row--three,
  .home-afford-result-pair,
  .home-afford-result-pair--four,
  .home-afford-result-pair--property,
  .home-afford-benefit-grid,
  .home-afford-explain,
  .home-afford-property-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .home-afford-input-card label {
    font-size: 0.72rem;
    gap: 4px;
    white-space: normal;
  }

  .home-afford-input-card input,
  .home-afford-input-card select {
    min-height: 38px;
    padding: 8px 8px;
    font-size: 16px;
  }

  .home-afford-hero-result {
    padding: 12px 9px;
  }

  .home-afford-hero-result strong {
    font-size: 1.72rem;
  }

  .home-afford-hero-result p,
  .home-afford-result-pair p,
  .home-afford-explain p {
    font-size: 0.78rem;
    line-height: 1.32;
  }

  .home-afford-result-pair strong {
    font-size: 0.92rem;
  }

  .home-afford-mode-card span,
  .home-afford-input-card h2,
  .home-afford-related p,
  .home-afford-hero-result span,
  .home-afford-result-pair span,
  .home-afford-benefits span,
  .home-afford-cost-list span {
    font-size: 0.58rem;
  }

  .home-afford-benefits > div:first-child strong {
    font-size: 1rem;
  }

  .home-afford-benefit-grid b {
    font-size: 0.74rem;
  }

  .home-afford-benefit-grid span {
    font-size: 0.66rem;
  }

  .home-afford-related a {
    grid-template-columns: 1fr;
    gap: 2px;
    min-height: 38px;
  }

  .home-afford-property-types {
    grid-template-columns: 0.86fr 0.72fr 1.22fr 0.82fr;
    gap: 5px;
  }

  .home-afford-property-types button {
    min-height: 36px;
    font-size: 0.58rem;
    padding: 0 3px;
  }

  .home-afford-cost-list div {
    display: grid;
    gap: 2px;
    align-items: center;
    padding: 6px 0;
  }

}

/* Screen reader only - for accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(135deg, #0b0f19 0%, #1a1f2e 100%);
  min-height: 100vh;
  color: #fff;
  line-height: 1.6;
}

header {
  overflow: visible;
}


/* ===== CALCULATOR PAGES ===== */
.calculator-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 20px;
}

.page-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 40px;
  color: #4ade80;
  background: linear-gradient(135deg, #22c55e, #4ade80);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.crypto-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 40px;
  background: linear-gradient(135deg, #22c55e, #4ade80);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.calculator-box {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 40px;
  background: linear-gradient(145deg, rgba(30, 35, 50, 0.9), rgba(20, 25, 35, 0.9));
  padding: 40px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Privacy / legal: same outer width & card shell as tool calculators (single-column prose) */
.calculator-box--legal {
  display: block;
  text-align: left;
}

.calculator-box--legal h2[id] {
  scroll-margin-top: 100px;
}

.privacy-lead {
  text-align: center;
  color: #9ca3af;
  margin: -24px auto 32px;
  font-size: 0.95rem;
}

.page-reviewed {
  color: #9ca3af;
  font-size: 0.92rem;
  margin: -0.35rem 0 1rem;
}

.page-reviewed--footer {
  margin: 1.25rem 0 0;
  text-align: right;
}

@media (max-width: 900px) {
  .calculator-box {
    grid-template-columns: 1fr;
  }

  .calculator-box--emi {
    grid-template-columns: 1fr;
    grid-template-areas:
      "inputs"
      "chart"
      "affiliate";
  }
}

/* EMI calculator: inputs | chart, then full-width affiliate row; related links fill space under sliders */
.calculator-box--emi {
  grid-template-areas:
    "inputs chart"
    "affiliate affiliate";
  align-items: stretch;
}

.calculator-box--emi .inputs {
  grid-area: inputs;
  min-height: 0;
}

.calculator-box--emi .internal-links--emi-fill {
  margin-top: auto;
}

.internal-links--emi-mobile-end {
  display: none;
}

.calculator-box--emi .chart-box {
  grid-area: chart;
  justify-content: flex-start;
}

.calculator-box--ibc .chart-box {
  justify-content: flex-start;
}

.ibc-lead {
  text-align: center;
  color: #9ca3af;
  max-width: none;
  width: 100%;
  margin: -12px auto 20px;
  line-height: 1.6;
}

.ibc-warning {
  max-width: none;
  width: 100%;
  margin: 0 auto 28px;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid rgba(234, 179, 8, 0.35);
  background: rgba(234, 179, 8, 0.08);
  color: #fcd34d;
  font-size: 0.9rem;
  line-height: 1.5;
}

.ibc-steps {
  max-width: none;
  width: 100%;
  margin: 0 0 36px;
}

.ibc-steps-heading {
  font-size: 1.25rem;
  color: #fff;
  margin: 0 0 20px;
  text-align: center;
}

.ibc-step-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ibc-step-list > li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: start;
  padding: 18px 20px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.ibc-step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #22c55e, #15803d);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ibc-step-list h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  color: #e5e7eb;
}

.ibc-step-list p {
  margin: 0;
  color: #9ca3af;
  font-size: 0.92rem;
  line-height: 1.55;
}

.ibc-model-title {
  text-align: center;
  font-size: 1.35rem;
  margin: 0 0 8px;
}

.ibc-model-desc {
  text-align: center;
  color: #9ca3af;
  font-size: 0.9rem;
  max-width: none;
  width: 100%;
  margin: 0 auto 24px;
  line-height: 1.55;
}

.ibc-headline {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
  padding: 18px;
  border: 1px solid rgba(34, 197, 94, 0.16);
  border-radius: 18px;
  background:
    radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.18), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(15, 23, 42, 0.42));
  text-align: center;
}

.ibc-headline span,
.ibc-headline em {
  color: #9ca3af;
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ibc-headline strong {
  color: #bbf7d0;
  font-size: clamp(1.65rem, 3vw, 2.45rem);
  line-height: 1;
}

.ibc-result-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.ibc-result-strip div {
  display: grid;
  gap: 5px;
  min-height: 76px;
  align-content: center;
  padding: 12px;
  border: 1px solid rgba(34, 197, 94, 0.12);
  border-radius: 14px;
  background:
    radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.13), transparent 36%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.052), rgba(15, 23, 42, 0.28));
}

.ibc-result-strip div:nth-child(2) {
  border-color: rgba(56, 189, 248, 0.14);
  background:
    radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.13), transparent 36%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.052), rgba(15, 23, 42, 0.28));
}

.ibc-result-strip div:nth-child(3) {
  border-color: rgba(251, 191, 36, 0.16);
  background:
    radial-gradient(circle at 0% 0%, rgba(251, 191, 36, 0.14), transparent 36%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.052), rgba(15, 23, 42, 0.28));
}

.ibc-result-strip div:nth-child(4) {
  border-color: rgba(168, 85, 247, 0.16);
  background:
    radial-gradient(circle at 0% 0%, rgba(168, 85, 247, 0.13), transparent 36%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.052), rgba(15, 23, 42, 0.28));
}

.ibc-result-strip span {
  color: #9ca3af;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ibc-result-strip strong {
  color: #fff;
  font-size: 1rem;
  line-height: 1.1;
}

.ibc-input-note {
  margin: 0;
  color: #9ca3af;
  font-size: 0.66rem;
  line-height: 1.25;
}

.ibc-premium-note {
  padding: 9px 10px;
  border: 1px solid rgba(251, 191, 36, 0.16);
  border-radius: 12px;
  background:
    radial-gradient(circle at 0% 0%, rgba(251, 191, 36, 0.12), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(15, 23, 42, 0.3));
  color: #fde68a;
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1.32;
}

.ibc-scenario-box {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(34, 197, 94, 0.14);
  border-radius: 13px;
  background:
    radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.14), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(15, 23, 42, 0.3));
}

.ibc-scenario-box p {
  margin: 0;
  color: #bbf7d0;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ibc-scenario-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.ibc-scenario-btn {
  min-height: 36px;
  padding: 7px 6px;
  border: 1px solid rgba(134, 239, 172, 0.14);
  border-radius: 9px;
  background: rgba(15, 23, 42, 0.45);
  color: #cbd5e1;
  cursor: pointer;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 800;
}

.ibc-scenario-btn.active {
  border-color: rgba(34, 197, 94, 0.48);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(56, 189, 248, 0.08));
  color: #bbf7d0;
}

.calculator-box--ibc .summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.calculator-box--ibc .summary > div {
  display: grid;
  gap: 5px;
  min-height: 74px;
  align-content: center;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(15, 23, 42, 0.3));
  color: #9ca3af;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.calculator-box--ibc .summary strong {
  color: #f8fafc;
  font-size: 0.96rem;
  line-height: 1.1;
  text-transform: none;
  letter-spacing: 0;
}

.ibc-insight-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.ibc-insight-card {
  position: relative;
  overflow: hidden;
  min-height: 92px;
  padding: 11px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(15, 23, 42, 0.3));
}

.ibc-insight-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, #22c55e, #38bdf8, #fbbf24);
}

.ibc-insight-card--green {
  border-color: rgba(34, 197, 94, 0.14);
  background:
    radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.13), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(15, 23, 42, 0.3));
}

.ibc-insight-card--blue {
  border-color: rgba(56, 189, 248, 0.14);
  background:
    radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.13), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(15, 23, 42, 0.3));
}

.ibc-insight-card--gold {
  border-color: rgba(251, 191, 36, 0.16);
  background:
    radial-gradient(circle at 0% 0%, rgba(251, 191, 36, 0.13), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(15, 23, 42, 0.3));
}

.ibc-insight-card h3 {
  position: relative;
  margin: 0 0 5px;
  color: #f8fafc;
  font-size: 0.8rem;
  line-height: 1.2;
}

.ibc-insight-card p {
  position: relative;
  margin: 0;
  color: #cbd5e1;
  font-size: 0.68rem;
  line-height: 1.3;
}

.ibc-insight-card ul {
  position: relative;
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ibc-insight-card li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 6px;
  border-radius: 9px;
  background: rgba(15, 23, 42, 0.32);
}

.ibc-insight-card li span {
  color: #9ca3af;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ibc-insight-card li strong {
  color: #fff;
  font-size: 0.74rem;
  line-height: 1.05;
  white-space: nowrap;
}

/* Infinite Banking — smooth in-page scroll (TOC links, anchor jumps) */
html:has(.tool-page-infinite-banking) {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

@media (prefers-reduced-motion: reduce) {
  html:has(.tool-page-infinite-banking) {
    scroll-behavior: auto;
  }
}

@media (min-width: 901px) {
  body.tool-page-infinite-banking main > .calculator-container {
    max-width: 1400px;
    padding-top: 28px;
    padding-bottom: 28px;
  }

  body.tool-page-infinite-banking .page-title {
    margin-bottom: 16px;
    font-size: 2.25rem;
    line-height: 1.08;
    background: linear-gradient(135deg, #ecfdf5, #22c55e 52%, #38bdf8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }

  body.tool-page-infinite-banking .ibc-lead {
    margin-bottom: 14px;
    font-size: 0.9rem;
    line-height: 1.45;
  }

  body.tool-page-infinite-banking .ibc-warning {
    margin-bottom: 16px;
    padding: 11px 14px;
    border-radius: 13px;
    font-size: 0.78rem;
    line-height: 1.38;
  }

  body.tool-page-infinite-banking .ibc-steps {
    margin-bottom: 18px;
  }

  body.tool-page-infinite-banking .ibc-steps-heading,
  body.tool-page-infinite-banking .ibc-model-title {
    margin-bottom: 10px;
    font-size: 1.02rem;
    text-align: left;
  }

  body.tool-page-infinite-banking .ibc-step-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
  }

  body.tool-page-infinite-banking .ibc-step-list > li {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 9px;
    min-height: 126px;
    padding: 12px;
    border-radius: 14px;
    border-color: rgba(34, 197, 94, 0.13);
    background:
      radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.13), transparent 36%),
      linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(15, 23, 42, 0.28));
  }

  body.tool-page-infinite-banking .ibc-step-num {
    width: 30px;
    height: 30px;
    font-size: 0.82rem;
  }

  body.tool-page-infinite-banking .ibc-step-list h3 {
    margin-bottom: 4px;
    font-size: 0.82rem;
  }

  body.tool-page-infinite-banking .ibc-step-list p,
  body.tool-page-infinite-banking .ibc-model-desc {
    font-size: 0.72rem;
    line-height: 1.35;
  }

  body.tool-page-infinite-banking .ibc-model-desc {
    margin-bottom: 14px;
    text-align: left;
  }

  body.tool-page-infinite-banking .calculator-box--ibc {
    position: relative;
    grid-template-columns: minmax(255px, 0.62fr) minmax(0, 1.38fr);
    grid-template-areas:
      "inputs chart"
      "related chart";
    gap: 22px;
    padding: 22px;
    border-radius: 20px;
    border-color: rgba(34, 197, 94, 0.18);
    background:
      radial-gradient(circle at 8% 8%, rgba(34, 197, 94, 0.16), transparent 32%),
      radial-gradient(circle at 90% 0%, rgba(56, 189, 248, 0.12), transparent 30%),
      linear-gradient(145deg, rgba(24, 30, 43, 0.96), rgba(10, 16, 28, 0.94));
    box-shadow: 0 24px 58px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    overflow: hidden;
  }

  body.tool-page-infinite-banking .calculator-box--ibc::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, #22c55e, #38bdf8, #fbbf24);
  }

  body.tool-page-infinite-banking .calculator-box--ibc .inputs {
    grid-area: inputs;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(34, 197, 94, 0.14);
    border-radius: 16px;
    background:
      linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.5)),
      radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.15), transparent 35%);
  }

  body.tool-page-infinite-banking .calculator-box--ibc .ibc-scenario-box,
  body.tool-page-infinite-banking .calculator-box--ibc .ibc-premium-note {
    grid-column: 1 / -1;
  }

  body.tool-page-infinite-banking .calculator-box--ibc .input-group {
    gap: 5px;
    padding: 9px;
    border: 1px solid rgba(34, 197, 94, 0.12);
    border-radius: 12px;
    background:
      radial-gradient(circle at 100% 0%, rgba(56, 189, 248, 0.07), transparent 34%),
      linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(34, 197, 94, 0.026));
  }

  body.tool-page-infinite-banking .calculator-box--ibc .input-group label {
    font-size: 0.66rem;
    letter-spacing: 0.04em;
  }

  body.tool-page-infinite-banking .ibc-input-note {
    font-size: 0.6rem;
    line-height: 1.22;
  }

  body.tool-page-infinite-banking .ibc-premium-note {
    padding: 8px 9px;
    border-radius: 11px;
    font-size: 0.6rem;
    line-height: 1.24;
  }

  body.tool-page-infinite-banking .calculator-box--ibc .input-group input[type="number"],
  body.tool-page-infinite-banking .calculator-box--ibc .input-group input[data-currency-textbox="1"] {
    min-height: 35px;
    padding: 7px 10px;
    border-radius: 9px;
    border-color: rgba(34, 197, 94, 0.22);
    background: rgba(6, 12, 24, 0.78);
    font-size: 0.88rem;
  }

  body.tool-page-infinite-banking .calculator-box--ibc .internal-links {
    grid-area: related;
    align-self: start;
    margin-top: -10px;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(34, 197, 94, 0.18);
    background:
      radial-gradient(circle at 8% 0%, rgba(34, 197, 94, 0.22), transparent 34%),
      radial-gradient(circle at 100% 10%, rgba(56, 189, 248, 0.16), transparent 34%),
      linear-gradient(145deg, rgba(15, 23, 42, 0.84), rgba(20, 83, 45, 0.18));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }

  body.tool-page-infinite-banking .calculator-box--ibc .internal-links p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 7px;
    color: #bbf7d0;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
  }

  body.tool-page-infinite-banking .calculator-box--ibc .internal-links p::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, #22c55e, #38bdf8);
    box-shadow: 0 0 14px rgba(34, 197, 94, 0.65);
  }

  body.tool-page-infinite-banking .calculator-box--ibc .internal-links a {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 5px 0 0;
    padding: 6px 9px;
    border-radius: 9px;
    border-color: rgba(134, 239, 172, 0.18);
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.13), rgba(56, 189, 248, 0.08));
    color: #dcfce7;
    font-size: 0.74rem;
    font-weight: 700;
  }

  body.tool-page-infinite-banking .calculator-box--ibc .internal-links a span {
    display: inline;
    flex: 0 0 auto;
  }

  body.tool-page-infinite-banking .calculator-box--ibc .internal-links a small {
    display: inline;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #9ca3af;
    font-size: 0.6rem;
    font-weight: 600;
    line-height: 1;
  }

  body.tool-page-infinite-banking .calculator-box--ibc .internal-links a:hover {
    border-color: rgba(134, 239, 172, 0.4);
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.22), rgba(56, 189, 248, 0.14));
  }

  body.tool-page-infinite-banking .calculator-box--ibc .chart-box {
    grid-area: chart;
  }

  body.tool-page-infinite-banking .calculator-box--ibc .chart-box canvas {
    max-height: 255px;
    margin-bottom: 12px;
  }

  body.tool-page-infinite-banking .ibc-insight-card {
    min-height: 88px;
    padding: 10px;
    border-radius: 13px;
  }

  body.tool-page-infinite-banking .ibc-insight-card h3 {
    font-size: 0.74rem;
  }

  body.tool-page-infinite-banking .ibc-insight-card p {
    font-size: 0.64rem;
    line-height: 1.28;
  }
}

/* Base hook; padding overridden below after .seo-content so sticky + grid aren’t clipped */
.seo-content--ibc {
  margin-top: 40px;
}

.seo-content--ibc .ibc-guide-outer {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  overflow: visible;
}

/* stretch: sidebar column must be as tall as the article or position:sticky has no scroll range */
.seo-content--ibc .ibc-guide-inner {
  display: grid;
  grid-template-columns: minmax(0, 240px) minmax(0, 1fr);
  column-gap: 20px;
  row-gap: 24px;
  align-items: stretch;
  padding: 40px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: linear-gradient(145deg, rgba(30, 35, 50, 0.9), rgba(20, 25, 35, 0.9));
  overflow: visible;
}

.seo-content--ibc .ibc-toc-sidebar {
  min-width: 0;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
}

.seo-content--ibc .ibc-toc {
  position: sticky;
  top: 100px;
  align-self: flex-start;
  z-index: 15;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding: 16px 12px;
  margin: 0;
  border-radius: 16px;
  border: 1px solid rgba(34, 197, 94, 0.28);
  background: rgba(15, 23, 20, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  scrollbar-width: thin;
  scrollbar-color: rgba(34, 197, 94, 0.45) transparent;
}

.seo-content--ibc .ibc-toc-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #22c55e;
  margin: 0 0 14px;
  font-weight: 700;
}

.seo-content--ibc .ibc-toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
  color: #9ca3af;
  font-size: 0.84rem;
  line-height: 1.45;
}

.seo-content--ibc .ibc-toc li {
  margin-bottom: 6px;
}

.seo-content--ibc .ibc-toc li:last-child {
  margin-bottom: 0;
}

.seo-content--ibc .ibc-toc-link {
  display: block;
  padding: 7px 6px 7px 9px;
  margin: 0;
  border-radius: 8px;
  overflow-wrap: break-word;
  color: #a7f3d0;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.seo-content--ibc .ibc-toc-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ecfdf5;
}

.seo-content--ibc .ibc-toc-link.is-active {
  background: rgba(34, 197, 94, 0.14);
  color: #fff;
  border-left-color: #22c55e;
  font-weight: 600;
}

.seo-content--ibc .ibc-guide-main {
  min-width: 0;
}

.seo-content--ibc .ibc-guide-main h2[id] {
  scroll-margin-top: 100px;
}

.seo-content--ibc .ibc-guide-main > h2:first-of-type {
  margin-top: 0;
}

@media (max-width: 900px) {
  .seo-content--ibc .ibc-guide-inner {
    grid-template-columns: 1fr;
    padding: 24px;
    gap: 24px;
    align-items: start;
  }

  .seo-content--ibc .ibc-toc-sidebar {
    display: none;
  }
}

.calculator-box--emi .emi-affiliate-block {
  grid-area: affiliate;
  margin-top: 0;
}

/* EMI calculator — partner / affiliate CTAs */
.emi-page-lead {
  text-align: center;
  color: #9ca3af;
  max-width: none;
  width: 100%;
  margin: -24px auto 32px;
  font-size: 1rem;
  line-height: 1.5;
}

.emi-affiliate-block {
  margin-top: 4px;
  padding: 20px 22px;
  border-radius: 16px;
  border: 1px solid rgba(34, 197, 94, 0.25);
  background: rgba(34, 197, 94, 0.07);
}

.emi-affiliate-lead {
  font-size: 0.9rem;
  color: #9ca3af;
  margin: 0 0 16px;
  line-height: 1.5;
}

.emi-affiliate-footnote {
  font-size: 0.75rem;
  color: #6b7280;
  margin: 14px 0 0;
}

.emi-affiliate-title {
  font-size: 1.05rem;
  margin: 0 0 8px;
  color: #fff;
}

.emi-affiliate-disclosure {
  font-size: 0.82rem;
  color: #9ca3af;
  line-height: 1.55;
  margin: 0 0 14px;
}

.emi-affiliate-disclosure code {
  font-size: 0.78rem;
  color: #86efac;
  word-break: break-all;
}

.calculator-box--emi .emi-partner-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

body.emi-calculator-page .calculator-box--emi {
  grid-template-columns: minmax(300px, 0.78fr) minmax(0, 1.22fr);
}

body.emi-calculator-page .calculator-box--emi .inputs {
  gap: 10px;
}


/* ===== BUDGET PLANNER ===== */
.budget-planner-page {
  background:
    radial-gradient(circle at 6% 0%, rgba(34, 197, 94, 0.12), transparent 30%),
    radial-gradient(circle at 94% 6%, rgba(56, 189, 248, 0.1), transparent 32%),
    linear-gradient(135deg, #060b14 0%, #101827 52%, #071318 100%);
}

.budget-planner-container {
  max-width: 1400px;
}

.budget-planner-page .page-title {
  margin-bottom: 10px;
  background: linear-gradient(135deg, #bbf7d0, #38bdf8 55%, #facc15);
  -webkit-background-clip: text;
  background-clip: text;
}

.budget-planner-page .emi-page-lead {
  margin: 0 auto 20px;
}

.budget-planner-box {
  grid-template-columns: minmax(370px, 0.72fr) minmax(0, 1.28fr);
  gap: 14px;
  padding: 14px;
  border-radius: 22px;
  border-color: rgba(34, 197, 94, 0.16);
  background:
    radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.14), transparent 34%),
    radial-gradient(circle at 100% 0%, rgba(56, 189, 248, 0.12), transparent 34%),
    linear-gradient(145deg, rgba(24, 30, 43, 0.96), rgba(12, 17, 27, 0.94));
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.28);
}

.budget-left-panel,
.budget-right-panel {
  display: grid;
  gap: 10px;
  align-content: start;
  min-width: 0;
}

.budget-left-panel {
  position: sticky;
  top: var(--tools-sticky-offset, 96px);
  padding: 10px;
  border: 1px solid rgba(34, 197, 94, 0.14);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.56)),
    radial-gradient(circle at 12% 0%, rgba(34, 197, 94, 0.14), transparent 34%);
}

.budget-right-panel {
  padding: 10px;
  border: 1px solid rgba(56, 189, 248, 0.12);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.68), rgba(15, 23, 42, 0.46)),
    radial-gradient(circle at 88% 0%, rgba(56, 189, 248, 0.1), transparent 34%);
}

.budget-panel-head h2,
.budget-chart-card h2 {
  margin: 0 0 4px;
  color: #fff;
  font-size: 1rem;
}

.budget-panel-head p,
.budget-action-card p {
  margin: 0;
  color: #a7b0c0;
  font-size: 0.78rem;
  line-height: 1.35;
}

.budget-input-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.budget-field {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
}

.budget-field--income {
  border-color: rgba(56, 189, 248, 0.2);
  background:
    radial-gradient(circle at 100% 0%, rgba(56, 189, 248, 0.16), transparent 38%),
    linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(15, 23, 42, 0.28));
}

.budget-field--need {
  border-color: rgba(34, 197, 94, 0.18);
  background:
    radial-gradient(circle at 100% 0%, rgba(34, 197, 94, 0.13), transparent 38%),
    linear-gradient(135deg, rgba(34, 197, 94, 0.105), rgba(15, 23, 42, 0.28));
}

.budget-field--want {
  border-color: rgba(250, 204, 21, 0.2);
  background:
    radial-gradient(circle at 100% 0%, rgba(250, 204, 21, 0.15), transparent 38%),
    linear-gradient(135deg, rgba(245, 158, 11, 0.11), rgba(15, 23, 42, 0.28));
}

.budget-field--save {
  border-color: rgba(45, 212, 191, 0.2);
  background:
    radial-gradient(circle at 100% 0%, rgba(45, 212, 191, 0.14), transparent 38%),
    linear-gradient(135deg, rgba(20, 184, 166, 0.11), rgba(15, 23, 42, 0.28));
}

.budget-field--wide {
  grid-column: 1 / -1;
}

.budget-field span,
.budget-score-grid span,
.budget-mini-grid span,
.budget-hero-result span,
.budget-action-card span {
  color: #a7f3d0;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1.15;
  text-transform: uppercase;
}

.budget-field input {
  width: 100%;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid rgba(34, 197, 94, 0.22);
  border-radius: 9px;
  color: #fff;
  background: rgba(6, 12, 24, 0.78);
  font: 800 0.9rem/1.1 inherit;
}

.budget-related-tools {
  display: grid;
  gap: 7px;
  padding: 10px;
  border-radius: 13px;
  border: 1px solid rgba(34, 197, 94, 0.14);
  background: rgba(15, 23, 42, 0.5);
}

.budget-related-tools p {
  margin: 0;
  color: #bbf7d0;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.internal-links.budget-related-tools a {
  display: grid;
  grid-template-columns: minmax(124px, 0.42fr) minmax(0, 1fr);
  column-gap: 12px;
  align-items: center;
  min-height: 34px;
  padding: 7px 8px;
  border-radius: 10px;
  border: 1px solid rgba(34, 197, 94, 0.16);
  color: #fff;
  background:
    radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.12), transparent 34%),
    linear-gradient(145deg, rgba(34, 197, 94, 0.08), rgba(15, 23, 42, 0.28));
  text-decoration: none;
}

.internal-links.budget-related-tools a span,
.internal-links.budget-related-tools a small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.internal-links.budget-related-tools a span {
  justify-self: start;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
}

.internal-links.budget-related-tools a small {
  justify-self: end;
  width: 100%;
  color: #9ca3af;
  font-size: 0.68rem;
  text-align: right;
}

.internal-links.us-compact-related-tools {
  gap: 5px;
  margin-top: 16px;
  padding: 8px;
}

.us-compact-related-tools p {
  margin: 0;
}

.internal-links.us-compact-related-tools a {
  margin: 0;
  min-height: 30px;
  padding: 5px 7px;
}

.internal-links.us-compact-related-tools a span {
  font-size: 0.74rem;
}

.internal-links.us-compact-related-tools a small {
  font-size: 0.63rem;
}

.budget-hero-result,
.budget-chart-card,
.budget-action-card,
.budget-score-grid article,
.budget-mini-grid article,
.budget-projection-grid article {
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.025));
}

.budget-hero-result {
  padding: 16px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(34, 197, 94, 0.2), transparent 48%),
    linear-gradient(135deg, rgba(34, 197, 94, 0.16), rgba(56, 189, 248, 0.08));
}

.budget-hero-result strong {
  display: block;
  margin: 4px 0;
  color: #bbf7d0;
  font-size: 2.4rem;
  line-height: 1;
}

.budget-hero-result p {
  margin: 0;
  color: #cbd5e1;
  font-size: 0.84rem;
}

.budget-score-grid,
.budget-mini-grid,
.budget-projection-grid {
  display: grid;
  gap: 8px;
}

.budget-score-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.budget-mini-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.budget-projection-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.budget-score-grid article,
.budget-mini-grid article,
.budget-projection-grid article {
  display: grid;
  align-content: center;
  min-height: 74px;
  padding: 10px;
  text-align: center;
}

.budget-score-grid article:nth-child(1),
.budget-mini-grid article:nth-child(1) {
  background:
    radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.12), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.025));
}

.budget-score-grid article:nth-child(2),
.budget-mini-grid article:nth-child(2) {
  background:
    radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.12), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.025));
}

.budget-score-grid article:nth-child(3),
.budget-mini-grid article:nth-child(3) {
  background:
    radial-gradient(circle at 0% 0%, rgba(250, 204, 21, 0.13), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.025));
}

.budget-score-grid article:nth-child(4) {
  background:
    radial-gradient(circle at 0% 0%, rgba(168, 85, 247, 0.12), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.025));
}

.budget-projection-grid article:nth-child(1) {
  background:
    radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.14), transparent 40%),
    linear-gradient(145deg, rgba(34, 197, 94, 0.08), rgba(15, 23, 42, 0.28));
}

.budget-projection-grid article:nth-child(2) {
  background:
    radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.14), transparent 40%),
    linear-gradient(145deg, rgba(56, 189, 248, 0.08), rgba(15, 23, 42, 0.28));
}

.budget-projection-grid article:nth-child(3) {
  background:
    radial-gradient(circle at 0% 0%, rgba(250, 204, 21, 0.15), transparent 40%),
    linear-gradient(145deg, rgba(250, 204, 21, 0.08), rgba(15, 23, 42, 0.28));
}

.budget-score-grid strong,
.budget-mini-grid strong,
.budget-projection-grid strong,
.budget-action-card strong {
  display: block;
  margin-top: 4px;
  color: #fff;
  font-size: 1.05rem;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.budget-score-grid small,
.budget-projection-grid small {
  display: block;
  margin-top: 3px;
  color: #9ca3af;
  font-size: 0.66rem;
  line-height: 1.2;
}

.budget-projection-grid small {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  margin-top: 7px;
}

.budget-projection-grid small b {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 6px;
  border-radius: 9px;
  color: #cbd5e1;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.045);
}

.budget-projection-grid small b span,
.budget-projection-grid small b em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-style: normal;
}

.budget-projection-grid small b span {
  color: #9ca3af;
  font-size: 0.56rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.budget-projection-grid small b em {
  color: #fff;
  font-size: 0.7rem;
}

.budget-chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(260px, 1.1fr);
  gap: 8px;
}

.budget-chart-card,
.budget-action-card {
  padding: 12px;
}

.budget-chart-card canvas {
  width: 100%;
  min-height: 250px;
  max-height: 270px;
}

.budget-action-card {
  display: grid;
  align-content: center;
  gap: 7px;
  background:
    radial-gradient(circle at 0% 0%, rgba(250, 204, 21, 0.12), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.025));
}

.budget-action-detail {
  padding: 8px;
  border-radius: 10px;
  background: rgba(250, 204, 21, 0.08);
  border: 1px solid rgba(250, 204, 21, 0.14);
}

.budget-progress-list {
  display: grid;
  gap: 6px;
}

.budget-progress-list div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.045);
}

.budget-progress-list span,
.budget-progress-list strong {
  margin: 0;
  font-size: 0.72rem;
}


/* ===== SALARY TAX CALCULATOR ===== */
.tax-calculator-page .budget-planner-container {
  max-width: 1400px;
}

.tax-calculator-page .page-title {
  background: linear-gradient(135deg, #bbf7d0, #38bdf8 55%, #facc15);
  -webkit-background-clip: text;
  background-clip: text;
}

.tax-calculator-box {
  grid-template-columns: minmax(360px, 0.68fr) minmax(0, 1.32fr);
}

.tax-input-grid select {
  width: 100%;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid rgba(34, 197, 94, 0.22);
  border-radius: 9px;
  color: #fff;
  background: rgba(6, 12, 24, 0.86);
  font: 800 0.9rem/1.1 inherit;
}

.tax-rrsp-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.tax-rrsp-card {
  display: grid;
  gap: 4px;
  min-height: 104px;
  padding: 14px;
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 16px;
  color: #d1fae5;
  background:
    radial-gradient(circle at 100% 0%, rgba(34, 197, 94, 0.18), transparent 42%),
    linear-gradient(135deg, rgba(34, 197, 94, 0.16), rgba(15, 23, 42, 0.86));
  text-align: left;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.tax-rrsp-card:hover {
  transform: translateY(-1px);
  border-color: rgba(74, 222, 128, 0.45);
}

.tax-rrsp-card span {
  color: #cbd5e1;
  font-size: 0.86rem;
  line-height: 1.15;
}

.tax-rrsp-card strong {
  color: #fff;
  font-size: 1.45rem;
  line-height: 1;
}

.tax-rrsp-card em {
  color: #86efac;
  font-size: 0.92rem;
  font-style: normal;
  font-weight: 900;
}

.tax-hero-result {
  background:
    radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.26), transparent 36%),
    radial-gradient(circle at 100% 0%, rgba(56, 189, 248, 0.18), transparent 36%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(20, 83, 45, 0.5));
}

.tax-score-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tax-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 10px;
}

.tax-chart-card canvas {
  min-height: 250px;
  max-height: 280px;
}

.tax-optimizer-card {
  display: grid;
  align-content: stretch;
}

.tax-optimizer-card > strong {
  font-size: 1.05rem;
  color: #fff;
}

.tax-optimizer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  margin-top: 8px;
}

.tax-optimizer-grid article {
  display: grid;
  gap: 3px;
  min-height: 66px;
  padding: 9px;
  border: 1px solid rgba(34, 197, 94, 0.16);
  border-radius: 11px;
  background:
    radial-gradient(circle at 100% 0%, rgba(250, 204, 21, 0.13), transparent 36%),
    linear-gradient(135deg, rgba(34, 197, 94, 0.11), rgba(15, 23, 42, 0.76));
}

.tax-optimizer-grid span,
.tax-note-grid span {
  color: #a7f3d0;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tax-optimizer-grid strong {
  color: #fff;
  font-size: 1rem;
}

.tax-optimizer-grid small {
  color: #a7b0c0;
  font-size: 0.66rem;
  line-height: 1.25;
}

.tax-mini-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.tax-note-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.tax-note-grid article {
  display: grid;
  gap: 5px;
  padding: 11px;
  border: 1px solid rgba(56, 189, 248, 0.15);
  border-radius: 12px;
  background:
    radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.12), transparent 38%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.5));
}

.tax-note-grid p {
  margin: 0;
  color: #dbeafe;
  font-size: 0.78rem;
  line-height: 1.35;
}

.tax-bracket-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 10px;
}

.tax-bracket-card {
  display: grid;
  gap: 12px;
  padding: 13px;
  border: 1px solid rgba(56, 189, 248, 0.15);
  border-radius: 14px;
  background:
    radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.12), transparent 36%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025));
}

.tax-bracket-card:not([open]) {
  gap: 0;
}

.tax-bracket-card--province {
  border-color: rgba(250, 204, 21, 0.16);
  background:
    radial-gradient(circle at 0% 0%, rgba(250, 204, 21, 0.12), transparent 36%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025));
}

.tax-bracket-head,
.tax-bracket-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tax-bracket-head {
  list-style: none;
  cursor: pointer;
}

.tax-bracket-head::-webkit-details-marker {
  display: none;
}

.tax-bracket-head::after {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 2px solid #94a3b8;
  border-bottom: 2px solid #94a3b8;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.tax-bracket-card[open] .tax-bracket-head::after {
  transform: rotate(225deg);
}

.tax-bracket-head span {
  color: #fff;
  font-size: 0.92rem;
  font-weight: 900;
}

.tax-bracket-head strong {
  color: #bbf7d0;
  font-size: 0.78rem;
  white-space: nowrap;
}

.tax-bracket-rows {
  display: grid;
  gap: 9px;
}

.tax-bracket-row {
  display: grid;
  gap: 5px;
}

.tax-bracket-row-head span,
.tax-bracket-row-head strong {
  color: #cbd5e1;
  font-size: 0.68rem;
  font-weight: 900;
}

.tax-bracket-track {
  position: relative;
  height: 22px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.11);
}

.tax-bracket-track i {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  max-width: 100%;
  height: 100%;
  padding: 0 8px;
  border-radius: inherit;
  background: linear-gradient(90deg, #38bdf8, #22c55e);
}

.tax-bracket-row--province .tax-bracket-track i {
  background: linear-gradient(90deg, #facc15, #f97316);
}

.tax-bracket-track b {
  color: #fff;
  font-size: 0.6rem;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.tax-seo-content {
  background:
    radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.1), transparent 34%),
    radial-gradient(circle at 100% 0%, rgba(56, 189, 248, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.68));
  border: 1px solid rgba(34, 197, 94, 0.13);
  border-radius: 18px;
  padding: 24px;
}

.tax-seo-content h2,
.tax-seo-content h3 {
  max-width: none;
}

.tax-seo-content p {
  max-width: none;
}

.tax-seo-lead {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(34, 197, 94, 0.14);
}

.tax-seo-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.tax-seo-content h3 {
  margin: 18px 0 8px;
  color: #e5e7eb;
  font-size: 1.05rem;
  line-height: 1.25;
}

.tax-seo-columns h3:first-child {
  margin-top: 0;
}


/* ===== REGION-SPECIFIC CALCULATORS ===== */
.us-tool-page .budget-planner-box {
  grid-template-columns: minmax(360px, 0.7fr) minmax(0, 1.3fr);
}

.us-tool-page .budget-field input {
  font-variant-numeric: tabular-nums;
}

.us-tool-page .budget-score-grid article,
.us-tool-page .budget-mini-grid article {
  min-height: 78px;
}

.us-tool-analysis .budget-chart-card {
  min-height: 235px;
}

.us-bars {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}

.us-bars div {
  display: grid;
  grid-template-columns: minmax(120px, 0.55fr) minmax(0, 1fr) minmax(86px, auto);
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.us-bars span {
  color: #cbd5e1;
  font-size: 0.72rem;
  font-weight: 800;
}

.us-bars b {
  display: block;
  width: 50%;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #22c55e, #38bdf8);
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.18);
}

.us-bars div:nth-child(2) b {
  background: linear-gradient(90deg, #38bdf8, #818cf8);
}

.us-bars div:nth-child(3) b {
  background: linear-gradient(90deg, #facc15, #fb923c);
}

.us-bars strong {
  color: #fff;
  font-size: 0.88rem;
  text-align: right;
}

.us-tool-seo .container {
  max-width: 1400px;
}

.us-account-stack {
  display: grid;
  gap: 8px;
  padding: 11px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 14px;
  background:
    radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.13), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025));
}

.us-stack-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.us-stack-head span,
.us-stack-grid span {
  color: #a7f3d0;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1.15;
  text-transform: uppercase;
}

.us-stack-head strong {
  color: #fff;
  font-size: 0.92rem;
  text-align: right;
}

.us-stack-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.us-stack-grid article {
  display: grid;
  align-content: center;
  min-height: 72px;
  padding: 8px;
  border-radius: 11px;
  text-align: center;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.us-stack-grid strong {
  margin-top: 4px;
  color: #fff;
  font-size: 0.95rem;
  line-height: 1.1;
}

.us-stack-grid small {
  margin-top: 3px;
  color: #9ca3af;
  font-size: 0.58rem;
  line-height: 1.18;
}

.budget-seo .container {
  max-width: 1400px;
}

body.emi-calculator-page .emi-page-lead {
  text-align: left;
}

.emi-panel-kicker {
  color: #bbf7d0;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.emi-calculator-page .emi-loan-type select {
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(34, 197, 94, 0.22);
  color: #fff;
  background: rgba(6, 12, 24, 0.78);
  font-weight: 800;
}

body.emi-calculator-page .emi-loan-type small,
.emi-input-tip span {
  color: #a7b0c0;
  font-size: 0.76rem;
  line-height: 1.35;
}

.emi-input-tip {
  display: grid;
  gap: 5px;
  padding: 11px;
  border-radius: 14px;
  border: 1px solid rgba(251, 191, 36, 0.18);
  background:
    radial-gradient(circle at 0% 0%, rgba(251, 191, 36, 0.14), transparent 38%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.82), rgba(30, 41, 59, 0.55));
}

.emi-input-tip strong {
  color: #fde68a;
  font-size: 0.9rem;
  line-height: 1.2;
}

body.emi-calculator-page #headline {
  display: grid !important;
  grid-template-columns: auto auto;
  gap: 3px 10px;
  align-items: center;
}

body.emi-calculator-page #headline span,
body.emi-calculator-page #headline em {
  color: #a7f3d0;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.emi-calculator-page #headline strong {
  color: #fff;
  font-size: 1.18rem;
  line-height: 1;
}

body.emi-calculator-page #headline em {
  grid-column: 1 / -1;
  color: #cbd5e1;
  letter-spacing: 0;
  text-transform: none;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.emi-insight-grid {
  grid-area: insights;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 4px;
}

.emi-insight-grid article {
  display: grid;
  align-content: center;
  min-height: 68px;
  padding: 9px 11px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background:
    radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.1), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025));
}

.emi-insight-grid article:nth-child(2) {
  background:
    radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.1), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025));
}

.emi-insight-grid article:nth-child(3) {
  background:
    radial-gradient(circle at 0% 0%, rgba(251, 191, 36, 0.12), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025));
}

.emi-insight-grid article:nth-child(4) {
  background:
    radial-gradient(circle at 0% 0%, rgba(168, 85, 247, 0.11), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025));
}

.emi-insight-grid article:nth-child(5) {
  background:
    radial-gradient(circle at 0% 0%, rgba(34, 211, 238, 0.1), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025));
}

.emi-insight-grid article:nth-child(6) {
  background:
    radial-gradient(circle at 0% 0%, rgba(244, 114, 182, 0.1), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025));
}

.emi-insight-grid span {
  color: #a7f3d0;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1.15;
  text-transform: uppercase;
}

.emi-insight-grid strong {
  display: block;
  margin-top: 4px;
  color: #fff;
  font-size: 0.94rem;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.emi-insight-grid small {
  display: block;
  margin-top: 3px;
  color: #9ca3af;
  font-size: 0.66rem;
  line-height: 1.2;
}

@media (max-width: 768px) {
  .calculator-box--emi .emi-partner-grid {
    grid-template-columns: 1fr;
  }
}


/* ===== DESKTOP COMPOUND CALCULATOR UPGRADE ===== */
@media (min-width: 901px) {
  main:has(#principal) {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px 0;
  }

  main:has(#principal)::after {
    content: "";
    display: block;
    clear: both;
  }

  main:has(#principal) .calculator-container {
    float: left;
    width: min(56%, 760px);
    min-width: 540px;
    max-width: 760px;
    margin: 0 30px 20px 28px;
    padding: 0;
  }

  main:has(#principal) .page-title {
    margin-top: 10px;
    margin-bottom: 6px;
    background: linear-gradient(135deg, #86efac 0%, #22d3ee 48%, #facc15 100%);
    -webkit-background-clip: text;
    background-clip: text;
    font-size: 2.15rem;
    line-height: 1.08;
    text-align: left;
    padding-left: 16px;
  }

  main:has(#principal) .calculator-box {
    position: relative;
    grid-template-columns: minmax(245px, 0.86fr) minmax(0, 1.14fr);
    gap: 14px;
    align-items: stretch;
    padding: 16px;
    border-radius: 20px;
    border-color: rgba(34, 197, 94, 0.18);
    background:
      radial-gradient(circle at 12% 10%, rgba(34, 197, 94, 0.18), transparent 32%),
      radial-gradient(circle at 82% 12%, rgba(34, 211, 238, 0.14), transparent 34%),
      linear-gradient(145deg, rgba(24, 30, 43, 0.95), rgba(12, 17, 27, 0.94));
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.045);
    overflow: hidden;
  }

  body.emi-calculator-page main:has(#principal) .calculator-box--emi {
    grid-template-columns: minmax(335px, 0.95fr) minmax(0, 1.05fr);
  }

  body.emi-calculator-page main:has(#principal) .emi-page-lead {
    margin: 0 0 14px;
    padding-left: 16px;
    font-size: 0.92rem;
    line-height: 1.3;
  }

  main:has(#principal) .calculator-box::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, #22c55e, #22d3ee, #facc15);
  }

  main:has(#principal) .inputs {
    gap: 9px;
    align-self: stretch;
    padding: 10px;
    border: 1px solid rgba(34, 197, 94, 0.15);
    border-radius: 16px;
    background:
      linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.48)),
      radial-gradient(circle at 15% 0%, rgba(34, 197, 94, 0.14), transparent 34%);
  }

  main:has(#principal) .input-group {
    gap: 5px;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
  }

  main:has(#principal) .input-group label {
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.055em;
  }

  main:has(#principal) .input-group input[type="number"],
  main:has(#principal) .input-group select {
    min-height: 36px;
    padding: 7px 10px;
    border-radius: 9px;
    border-color: rgba(34, 197, 94, 0.22);
    background: rgba(6, 12, 24, 0.78);
    font-size: 0.92rem;
    font-weight: 700;
  }

  main:has(#principal) .chart-box {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: max-content minmax(220px, 260px) max-content max-content;
    grid-template-areas:
      "headline"
      "chart"
      "summary"
      "insights";
    gap: 10px;
    align-content: start;
    align-items: stretch;
    justify-content: stretch;
    min-width: 0;
  }

  main:has(#principal) #headline {
    grid-area: headline;
    display: flex;
    align-items: center;
    min-height: 0;
    margin: 0;
    padding: 8px 10px;
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.12), rgba(34, 211, 238, 0.08));
    color: #bbf7d0;
    font-size: 0.92rem;
    line-height: 1.2;
    text-align: left;
    overflow-wrap: anywhere;
  }

  body.emi-calculator-page main:has(#principal) #headline {
    display: grid !important;
    grid-template-columns: auto auto;
    gap: 2px 9px;
    align-items: center;
    min-height: 54px;
    padding: 7px 10px;
  }

  body.emi-calculator-page main:has(#principal) #headline strong {
    font-size: 1.08rem;
  }

  body.emi-calculator-page main:has(#principal) #headline em {
    grid-column: 1 / -1;
    font-size: 0.64rem;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  main:has(#principal) .chart-box canvas {
    grid-area: chart;
    align-self: stretch;
    max-height: 260px;
    min-height: 230px;
    padding: 10px 10px 10px 12px;
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.24);
  }

  main:has(#principal) .summary {
    grid-area: summary;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
  }

  main:has(#principal) .summary > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-content: center;
    min-height: 46px;
    padding: 6px 5px;
    border-radius: 10px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.025));
    text-align: center;
    font-size: 0.64rem;
    line-height: 1.15;
  }

  main:has(#principal) .summary strong {
    margin-top: 3px;
    font-size: 0.78rem;
    line-height: 1.15;
    overflow-wrap: anywhere;
  }

  body.emi-calculator-page main:has(#principal) .inputs .internal-links {
    align-self: stretch;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-top: 0;
    padding: 9px;
    border-radius: 12px;
    border: 1px solid rgba(34, 197, 94, 0.12);
    background:
      radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.1), transparent 36%),
      rgba(15, 23, 42, 0.48);
  }

  body.emi-calculator-page main:has(#principal) .inputs .internal-links p {
    grid-column: 1 / -1;
    margin-bottom: 6px;
    font-size: 0.64rem;
  }

  body.emi-calculator-page main:has(#principal) .inputs .internal-links a {
    display: grid;
    min-height: 34px;
    align-items: center;
    justify-items: center;
    padding: 5px;
    border-radius: 8px;
    font-size: 0.62rem;
    line-height: 1.15;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  main:has(#principal) > .seo-content {
    margin: 0;
    min-height: 640px;
    padding: 0;
    border-top: 0;
    background:
      radial-gradient(circle at 10% 0%, rgba(34, 197, 94, 0.1), transparent 32%),
      radial-gradient(circle at 90% 4%, rgba(56, 189, 248, 0.08), transparent 30%),
      linear-gradient(180deg, rgba(6, 12, 24, 0.98), rgba(15, 23, 42, 0.96));
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 22px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
    overflow: visible;
  }

  main:has(#principal) > .seo-content .container {
    max-width: none;
    padding: 40px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: linear-gradient(145deg, rgba(30, 35, 50, 0.9), rgba(20, 25, 35, 0.9));
    box-sizing: border-box;
  }

  main:has(#principal) > .seo-content h2 {
    margin: 26px 0 10px;
    font-size: 1.28rem;
    line-height: 1.2;
  }

  main:has(#principal) > .seo-content h2:first-child {
    margin-top: 0;
  }

  main:has(#principal) .compound-clear-heading,
  main:has(#principal) .compound-full-heading {
    clear: left;
    padding-top: 8px;
  }

  main:has(#principal) > .seo-content h3 {
    margin: 18px 0 8px;
    font-size: 1rem;
  }

  main:has(#principal) > .seo-content p,
  main:has(#principal) > .seo-content li {
    font-size: 0.92rem;
    line-height: 1.48;
  }

  main:has(#principal) > .seo-content ul,
  main:has(#principal) > .seo-content ol {
    margin: 6px 0 12px 20px;
  }

  main:has(#principal) > .seo-content p {
    margin-bottom: 12px;
  }

  main:has(#principal) > .seo-content li {
    margin-bottom: 5px;
  }
}


/* ===== DESKTOP CRYPTO DCA CALCULATOR UPGRADE ===== */
@media (min-width: 901px) {
  main:has(#coin):has(#volatility) {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px 0;
  }

  main:has(#coin):has(#volatility)::after {
    content: "";
    display: block;
    clear: both;
  }

  main:has(#coin):has(#volatility) .calculator-container {
    float: left;
    width: min(56%, 760px);
    min-width: 540px;
    max-width: 760px;
    margin: 0 30px 20px 28px;
    padding: 0;
  }

  main:has(#coin):has(#volatility) .crypto-title {
    margin-top: 10px;
    margin-bottom: 14px;
    padding-left: 16px;
    background: linear-gradient(135deg, #facc15 0%, #22c55e 48%, #38bdf8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    font-size: 2.15rem;
    line-height: 1.08;
    text-align: left;
  }

  main:has(#coin):has(#volatility) .calculator-box {
    position: relative;
    grid-template-columns: minmax(220px, 0.76fr) minmax(0, 1.24fr);
    gap: 14px;
    align-items: stretch;
    padding: 16px;
    border-radius: 20px;
    border-color: rgba(34, 197, 94, 0.18);
    background:
      radial-gradient(circle at 12% 10%, rgba(250, 204, 21, 0.16), transparent 32%),
      radial-gradient(circle at 82% 12%, rgba(56, 189, 248, 0.14), transparent 34%),
      linear-gradient(145deg, rgba(24, 30, 43, 0.95), rgba(12, 17, 27, 0.94));
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.045);
    overflow: hidden;
  }

  main:has(#coin):has(#volatility) .calculator-box::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, #facc15, #22c55e, #38bdf8);
  }

  main:has(#coin):has(#volatility) .inputs {
    gap: 9px;
    align-self: stretch;
    padding: 10px;
    border: 1px solid rgba(34, 197, 94, 0.15);
    border-radius: 16px;
    background:
      linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.48)),
      radial-gradient(circle at 15% 0%, rgba(250, 204, 21, 0.13), transparent 34%);
  }

  main:has(#coin):has(#volatility) .input-group {
    gap: 5px;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 12px;
    background:
      radial-gradient(circle at 100% 0%, rgba(56, 189, 248, 0.08), transparent 34%),
      linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
  }

  main:has(#coin):has(#volatility) .input-group:first-child {
    border-color: rgba(250, 204, 21, 0.22);
    background:
      radial-gradient(circle at 100% 0%, rgba(250, 204, 21, 0.14), transparent 34%),
      linear-gradient(135deg, rgba(250, 204, 21, 0.07), rgba(255, 255, 255, 0.02));
  }

  main:has(#coin):has(#volatility) .input-group label {
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.055em;
  }

  main:has(#coin):has(#volatility) .input-group input[type="number"],
  main:has(#coin):has(#volatility) .input-group select {
    min-height: 36px;
    padding: 7px 10px;
    border-radius: 9px;
    border-color: rgba(34, 197, 94, 0.22);
    background: rgba(6, 12, 24, 0.78);
    font-size: 0.92rem;
    font-weight: 700;
  }

  main:has(#coin):has(#volatility) .value-display {
    display: none;
  }

  main:has(#coin):has(#volatility) .chart-box {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
      "loading"
      "headline"
      "chart"
      "scenarios"
      "summary";
    gap: 8px;
    align-items: stretch;
    justify-content: stretch;
    min-width: 0;
  }

  main:has(#coin):has(#volatility) .crypto-price-strip {
    grid-area: loading;
    display: grid;
    grid-template-columns: repeat(2, max-content);
    justify-content: start;
    gap: 8px;
    align-items: center;
    margin: 0;
    padding: 0;
    background: transparent;
  }

  main:has(#coin):has(#volatility) .crypto-price-tab {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
    min-height: 32px;
    padding: 7px 10px;
    border: 1px solid rgba(250, 204, 21, 0.18);
    border-radius: 11px;
    background:
      radial-gradient(circle at 100% 0%, rgba(250, 204, 21, 0.14), transparent 40%),
      linear-gradient(135deg, rgba(250, 204, 21, 0.1), rgba(34, 197, 94, 0.06));
  }

  main:has(#coin):has(#volatility) .crypto-price-tab:nth-child(2) {
    border-color: rgba(56, 189, 248, 0.2);
    background:
      radial-gradient(circle at 100% 0%, rgba(56, 189, 248, 0.14), transparent 40%),
      linear-gradient(135deg, rgba(56, 189, 248, 0.1), rgba(34, 197, 94, 0.055));
  }

  main:has(#coin):has(#volatility) .crypto-price-tab span {
    color: #fde68a;
    font-size: 0.66rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.04em;
  }

  main:has(#coin):has(#volatility) .crypto-price-tab strong {
    min-width: 0;
    color: #fff;
    font-size: 0.76rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
  }

  main:has(#coin):has(#volatility) #loading {
    grid-column: 1 / -1;
    color: #fde68a;
    font-size: 0.58rem;
    font-style: normal;
    line-height: 1;
    opacity: 0.78;
    text-align: center;
  }

  main:has(#coin):has(#volatility) #headline {
    grid-area: headline;
    display: flex;
    align-items: center;
    min-height: 0;
    margin: 0;
    padding: 8px 10px;
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.12), rgba(56, 189, 248, 0.08));
    color: #bbf7d0;
    font-size: 0.92rem;
    line-height: 1.2;
    text-align: left;
    overflow-wrap: anywhere;
  }

  main:has(#coin):has(#volatility) .chart-box canvas {
    grid-area: chart;
    align-self: stretch;
    max-height: 260px;
    min-height: 230px;
    padding: 10px 10px 10px 12px;
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.24);
  }

  main:has(#coin):has(#volatility) .summary {
    grid-area: summary;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
  }

  main:has(#coin):has(#volatility) .crypto-model-details {
    grid-column: 1 / -1;
    padding: 10px;
    border: 1px solid rgba(56, 189, 248, 0.16);
    border-radius: 12px;
    background:
      radial-gradient(circle at 100% 0%, rgba(56, 189, 248, 0.12), transparent 36%),
      linear-gradient(145deg, rgba(15, 23, 42, 0.62), rgba(34, 197, 94, 0.06));
  }

  main:has(#coin):has(#volatility) .crypto-model-details h3 {
    margin: 0 0 7px;
    color: #ecfdf5;
    font-size: 0.82rem;
    line-height: 1.15;
  }

  main:has(#coin):has(#volatility) .crypto-model-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
  }

  main:has(#coin):has(#volatility) .crypto-model-grid div {
    min-width: 0;
    padding: 6px 5px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    background: rgba(2, 6, 23, 0.22);
    text-align: center;
  }

  main:has(#coin):has(#volatility) .crypto-model-grid span {
    display: block;
    color: #9ca3af;
    font-size: 0.5rem;
    font-weight: 800;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: 0.035em;
  }

  main:has(#coin):has(#volatility) .crypto-model-grid strong {
    display: block;
    margin-top: 3px;
    color: #fff;
    font-size: 0.62rem;
    line-height: 1.12;
    overflow-wrap: anywhere;
  }

  main:has(#coin):has(#volatility) .crypto-model-details p {
    margin: 7px 0 0;
    color: #a7f3d0;
    font-size: 0.68rem;
    line-height: 1.3;
  }

  main:has(#coin):has(#volatility) .crypto-scenario-grid {
    grid-area: scenarios;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  main:has(#coin):has(#volatility) .crypto-scenario-grid > div {
    display: grid;
    align-content: center;
    justify-items: center;
    min-height: 58px;
    padding: 9px 7px;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 10px;
    text-align: center;
  }

  main:has(#coin):has(#volatility) .crypto-scenario-grid > div:first-child {
    border-color: rgba(34, 197, 94, 0.24);
    background:
      radial-gradient(circle at 100% 0%, rgba(34, 197, 94, 0.18), transparent 38%),
      linear-gradient(145deg, rgba(20, 83, 45, 0.24), rgba(255, 255, 255, 0.03));
  }

  main:has(#coin):has(#volatility) .crypto-scenario-grid > div:last-child {
    border-color: rgba(248, 113, 113, 0.24);
    background:
      radial-gradient(circle at 100% 0%, rgba(248, 113, 113, 0.18), transparent 38%),
      linear-gradient(145deg, rgba(127, 29, 29, 0.24), rgba(255, 255, 255, 0.03));
  }

  main:has(#coin):has(#volatility) .crypto-scenario-grid span {
    color: #9ca3af;
    font-size: 0.62rem;
    font-weight: 800;
    line-height: 1.14;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  main:has(#coin):has(#volatility) .crypto-scenario-grid strong {
    margin-top: 4px;
    color: #fff;
    font-size: 0.9rem;
    line-height: 1.12;
    overflow-wrap: anywhere;
  }

  main:has(#coin):has(#volatility) .summary > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-content: center;
    min-height: 64px;
    padding: 9px 7px;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 10px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.025));
    text-align: center;
    font-size: 0.64rem;
    line-height: 1.15;
  }

  main:has(#coin):has(#volatility) .summary > div:nth-child(1) {
    border-color: rgba(250, 204, 21, 0.22);
    background: linear-gradient(145deg, rgba(250, 204, 21, 0.12), rgba(255, 255, 255, 0.025));
  }

  main:has(#coin):has(#volatility) .summary > div:nth-child(2) {
    border-color: rgba(34, 197, 94, 0.22);
    background: linear-gradient(145deg, rgba(34, 197, 94, 0.14), rgba(255, 255, 255, 0.025));
  }

  main:has(#coin):has(#volatility) .summary > div:nth-child(3) {
    border-color: rgba(56, 189, 248, 0.22);
    background: linear-gradient(145deg, rgba(56, 189, 248, 0.13), rgba(255, 255, 255, 0.025));
  }

  main:has(#coin):has(#volatility) .summary strong {
    margin-top: 4px;
    font-size: 0.88rem;
    line-height: 1.15;
    overflow-wrap: anywhere;
  }

  main:has(#coin):has(#volatility) .internal-links {
    grid-area: links;
    align-self: end;
    margin-top: 0;
    padding: 9px 10px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.48);
  }

  main:has(#coin):has(#volatility) .inputs .crypto-dca-related-tools {
    grid-area: auto;
    margin-top: 0;
    padding: 9px 10px;
    border: 1px solid rgba(250, 204, 21, 0.16);
    border-radius: 12px;
    background:
      radial-gradient(circle at 100% 0%, rgba(250, 204, 21, 0.14), transparent 34%),
      linear-gradient(145deg, rgba(15, 23, 42, 0.72), rgba(34, 197, 94, 0.08));
  }

  main:has(#coin):has(#volatility) .internal-links p {
    margin-bottom: 6px;
    font-size: 0.64rem;
  }

  main:has(#coin):has(#volatility) .internal-links a {
    padding: 5px 7px;
    border-radius: 8px;
    font-size: 0.66rem;
  }

  main:has(#coin):has(#volatility) > .seo-content {
    margin: 0;
    min-height: 640px;
    padding: 0;
    border-top: 0;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 22px;
    background:
      radial-gradient(circle at 10% 0%, rgba(34, 197, 94, 0.1), transparent 32%),
      radial-gradient(circle at 90% 4%, rgba(56, 189, 248, 0.08), transparent 30%),
      linear-gradient(180deg, rgba(6, 12, 24, 0.98), rgba(15, 23, 42, 0.96));
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
    overflow: visible;
  }

  main:has(#coin):has(#volatility) > .seo-content .container {
    max-width: none;
    padding: 40px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: linear-gradient(145deg, rgba(30, 35, 50, 0.9), rgba(20, 25, 35, 0.9));
    box-sizing: border-box;
  }

  main:has(#coin):has(#volatility) > .seo-content h2 {
    margin: 26px 0 10px;
    font-size: 1.28rem;
    line-height: 1.2;
  }

  main:has(#coin):has(#volatility) > .seo-content h2:first-child {
    margin-top: 0;
  }

  main:has(#coin):has(#volatility) .crypto-dca-clear-heading {
    clear: left;
    padding-top: 8px;
  }

  main:has(#coin):has(#volatility) > .seo-content h3 {
    margin: 18px 0 8px;
    font-size: 1rem;
  }

  main:has(#coin):has(#volatility) > .seo-content p,
  main:has(#coin):has(#volatility) > .seo-content li {
    font-size: 0.92rem;
    line-height: 1.48;
  }

  main:has(#coin):has(#volatility) > .seo-content ul,
  main:has(#coin):has(#volatility) > .seo-content ol {
    margin: 6px 0 12px 20px;
  }

  main:has(#coin):has(#volatility) > .seo-content p {
    margin-bottom: 12px;
  }

  main:has(#coin):has(#volatility) > .seo-content li {
    margin-bottom: 5px;
  }
}


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

/* ===== DESKTOP MONTHLY INVESTMENT CALCULATOR WRAP ===== */
@media (min-width: 901px) {
  main:has(.monthly-investment-page) {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px 0;
  }

  main:has(.monthly-investment-page)::after {
    content: "";
    display: block;
    clear: both;
  }

  main:has(.monthly-investment-page) .calculator-container {
    float: left;
    width: min(56%, 760px);
    min-width: 540px;
    max-width: 760px;
    margin: 0 30px 20px 28px;
    padding: 0;
  }

  main:has(.monthly-investment-page) .page-title {
    margin-top: 10px;
    margin-bottom: 14px;
    padding-left: 16px;
    background: linear-gradient(135deg, #86efac 0%, #22d3ee 48%, #facc15 100%);
    -webkit-background-clip: text;
    background-clip: text;
    font-size: 2.15rem;
    line-height: 1.08;
    text-align: left;
  }

  main:has(.monthly-investment-page) .calculator-box {
    position: relative;
    grid-template-columns: minmax(245px, 0.86fr) minmax(0, 1.14fr);
    gap: 14px;
    align-items: stretch;
    padding: 16px;
    border-radius: 20px;
    border-color: rgba(34, 197, 94, 0.18);
    background:
      radial-gradient(circle at 12% 10%, rgba(34, 197, 94, 0.18), transparent 32%),
      radial-gradient(circle at 82% 12%, rgba(34, 211, 238, 0.14), transparent 34%),
      linear-gradient(145deg, rgba(24, 30, 43, 0.95), rgba(12, 17, 27, 0.94));
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.045);
    overflow: hidden;
  }

  main:has(.monthly-investment-page) .calculator-box::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, #22c55e, #22d3ee, #facc15);
  }

  main:has(.monthly-investment-page) .inputs {
    gap: 9px;
    align-self: stretch;
    padding: 10px;
    border: 1px solid rgba(34, 197, 94, 0.15);
    border-radius: 16px;
    background:
      linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.48)),
      radial-gradient(circle at 15% 0%, rgba(34, 197, 94, 0.14), transparent 34%);
  }

  main:has(.monthly-investment-page) .input-group {
    gap: 5px;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
  }

  main:has(.monthly-investment-page) .input-group label {
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.055em;
  }

  main:has(.monthly-investment-page) .input-group input[type="number"],
  main:has(.monthly-investment-page) .input-group select {
    min-height: 36px;
    padding: 7px 10px;
    border-radius: 9px;
    border-color: rgba(34, 197, 94, 0.22);
    background: rgba(6, 12, 24, 0.78);
    font-size: 0.92rem;
    font-weight: 700;
  }

  main:has(.monthly-investment-page) .chart-box {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
      "headline"
      "chart"
      "summary"
      "links";
    gap: 10px;
    align-items: stretch;
    justify-content: stretch;
    min-width: 0;
  }

  main:has(.monthly-investment-page) #headline {
    grid-area: headline;
    display: flex;
    align-items: center;
    min-height: 0;
    margin: 0;
    padding: 10px;
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.12), rgba(34, 211, 238, 0.08));
    color: #bbf7d0;
    font-size: 0.92rem;
    line-height: 1.2;
    text-align: left;
    overflow-wrap: anywhere;
  }

  main:has(.monthly-investment-page) .chart-box canvas {
    grid-area: chart;
    align-self: stretch;
    max-height: 260px;
    min-height: 230px;
    padding: 0;
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.24);
  }

  main:has(.monthly-investment-page) .summary {
    grid-area: summary;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
  }

  main:has(.monthly-investment-page) .summary > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-content: center;
    min-height: 64px;
    padding: 9px 7px;
    border-radius: 10px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.025));
    text-align: center;
    font-size: 0.64rem;
    line-height: 1.15;
  }

  main:has(.monthly-investment-page) .summary strong {
    margin-top: 4px;
    font-size: 0.88rem;
    line-height: 1.15;
    overflow-wrap: anywhere;
  }

  main:has(.monthly-investment-page) .internal-links {
    grid-area: links;
    align-self: end;
    margin-top: 0;
    padding: 9px 10px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.48);
  }

  main:has(.monthly-investment-page) .internal-links p {
    margin-bottom: 6px;
    font-size: 0.64rem;
  }

  main:has(.monthly-investment-page) .internal-links a {
    padding: 5px 7px;
    border-radius: 8px;
    font-size: 0.66rem;
  }

  main:has(.monthly-investment-page) > .seo-content {
    margin: 0;
    min-height: 640px;
    padding: 0;
    border-top: 0;
    background:
      radial-gradient(circle at 10% 0%, rgba(34, 197, 94, 0.1), transparent 32%),
      radial-gradient(circle at 90% 4%, rgba(56, 189, 248, 0.08), transparent 30%),
      linear-gradient(180deg, rgba(6, 12, 24, 0.98), rgba(15, 23, 42, 0.96));
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 22px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
    overflow: visible;
  }

  main:has(.monthly-investment-page) > .seo-content .container {
    max-width: none;
    padding: 40px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: linear-gradient(145deg, rgba(30, 35, 50, 0.9), rgba(20, 25, 35, 0.9));
    box-sizing: border-box;
  }

  main:has(.monthly-investment-page) > .seo-content h2 {
    margin: 26px 0 10px;
    font-size: 1.28rem;
    line-height: 1.2;
  }

  main:has(.monthly-investment-page) > .seo-content h2:first-child {
    margin-top: 0;
  }

  main:has(.monthly-investment-page) .monthly-clear-heading,
  main:has(.monthly-investment-page) .monthly-full-heading {
    clear: left;
    padding-top: 8px;
  }

  main:has(.monthly-investment-page) > .seo-content h3 {
    margin: 18px 0 8px;
    font-size: 1rem;
  }

  main:has(.monthly-investment-page) > .seo-content p,
  main:has(.monthly-investment-page) > .seo-content li {
    font-size: 0.92rem;
    line-height: 1.48;
  }

  main:has(.monthly-investment-page) > .seo-content ul,
  main:has(.monthly-investment-page) > .seo-content ol {
    margin: 6px 0 12px 20px;
  }

  main:has(.monthly-investment-page) > .seo-content p {
    margin-bottom: 12px;
  }

  main:has(.monthly-investment-page) > .seo-content li {
    margin-bottom: 5px;
  }

  main:has(.sip-calculator-page) {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px 0;
  }

  main:has(.sip-calculator-page)::after {
    content: "";
    display: block;
    clear: both;
  }

  main:has(.sip-calculator-page) .calculator-container {
    float: left;
    width: min(56%, 760px);
    min-width: 540px;
    max-width: 760px;
    margin: 0 30px 20px 28px;
    padding: 0;
  }

  main:has(.sip-calculator-page) .page-title {
    margin-top: 10px;
    margin-bottom: 8px;
    padding-left: 16px;
    background: linear-gradient(135deg, #bbf7d0 0%, #22c55e 42%, #38bdf8 78%);
    -webkit-background-clip: text;
    background-clip: text;
    font-size: 2.15rem;
    line-height: 1.08;
    text-align: left;
    color: transparent;
  }

  main:has(.sip-calculator-page) .sip-page-lead {
    margin: 0 0 14px;
    padding-left: 16px;
    color: #cbd5e1;
    font-size: 0.9rem;
    line-height: 1.42;
    text-align: left;
  }

  main:has(.sip-calculator-page) .calculator-box {
    position: relative;
    grid-template-columns: minmax(245px, 0.86fr) minmax(0, 1.14fr);
    gap: 14px;
    align-items: stretch;
    padding: 16px;
    border: 1px solid rgba(34, 197, 94, 0.18);
    border-radius: 20px;
    background:
      radial-gradient(circle at 12% 10%, rgba(34, 197, 94, 0.18), transparent 32%),
      radial-gradient(circle at 100% 12%, rgba(56, 189, 248, 0.12), transparent 36%),
      linear-gradient(145deg, rgba(12, 18, 30, 0.96), rgba(11, 16, 26, 0.92));
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.045);
    overflow: hidden;
  }

  main:has(.sip-calculator-page) .calculator-box::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, #22c55e, #38bdf8, #facc15);
  }

  main:has(.sip-calculator-page) .inputs {
    gap: 9px;
    align-self: stretch;
    padding: 10px;
    border: 1px solid rgba(34, 197, 94, 0.15);
    border-radius: 16px;
    background:
      linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.48)),
      radial-gradient(circle at 15% 0%, rgba(34, 197, 94, 0.14), transparent 34%);
  }

  main:has(.sip-calculator-page) .input-group {
    gap: 5px;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
  }

  main:has(.sip-calculator-page) .input-group label {
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.055em;
  }

  main:has(.sip-calculator-page) .input-group input[type="number"],
  main:has(.sip-calculator-page) .input-group input[data-currency-textbox="1"] {
    min-height: 36px;
    padding: 7px 10px;
    border-radius: 9px;
    border-color: rgba(34, 197, 94, 0.22);
    background: rgba(6, 12, 24, 0.78);
    font-size: 0.92rem;
    font-weight: 700;
  }

  main:has(.sip-calculator-page) .chart-box {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
      "headline"
      "chart"
      "summary";
    gap: 10px;
    align-items: stretch;
    min-width: 0;
  }

  main:has(.sip-calculator-page) #headline {
    grid-area: headline;
    display: flex;
    align-items: center;
    min-height: 0;
    margin: 0;
    padding: 10px;
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.12), rgba(34, 211, 238, 0.08));
    color: #bbf7d0;
    font-size: 0.92rem;
    line-height: 1.2;
    text-align: left;
    overflow-wrap: anywhere;
  }

  main:has(.sip-calculator-page) .chart-box canvas {
    grid-area: chart;
    align-self: stretch;
    max-height: 260px;
    min-height: 230px;
    padding: 0;
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.24);
  }

  main:has(.sip-calculator-page) .summary {
    grid-area: summary;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
  }

  main:has(.sip-calculator-page) .summary > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-content: center;
    min-height: 64px;
    padding: 9px 7px;
    border-radius: 10px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.025));
    text-align: center;
    font-size: 0.64rem;
    line-height: 1.15;
  }

  main:has(.sip-calculator-page) .summary strong {
    margin-top: 4px;
    font-size: 0.88rem;
    line-height: 1.15;
    overflow-wrap: anywhere;
  }

  main:has(.sip-calculator-page) .internal-links {
    display: grid;
    gap: 6px;
    grid-column: 1 / -1;
    margin-top: 0;
    padding: 9px 10px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.48);
  }

  main:has(.sip-calculator-page) .internal-links p {
    margin-bottom: 2px;
    font-size: 0.64rem;
  }

  main:has(.sip-calculator-page) .internal-links a {
    display: grid;
    grid-template-columns: minmax(130px, 0.5fr) minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    min-height: 34px;
    padding: 5px 7px;
    border-radius: 8px;
    font-size: 0.66rem;
  }

  main:has(.sip-calculator-page) .internal-links a small {
    overflow: hidden;
    color: #94a3b8;
    font-size: 0.58rem;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  main:has(.sip-calculator-page) > .seo-content {
    margin: 0;
    padding: 0;
    border-top: 0;
    background:
      radial-gradient(circle at 10% 0%, rgba(34, 197, 94, 0.1), transparent 32%),
      radial-gradient(circle at 90% 4%, rgba(56, 189, 248, 0.08), transparent 30%),
      linear-gradient(180deg, rgba(6, 12, 24, 0.98), rgba(15, 23, 42, 0.96));
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 22px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
    overflow: visible;
  }

  main:has(.sip-calculator-page) > .seo-content .container {
    max-width: none;
    padding: 40px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: linear-gradient(145deg, rgba(30, 35, 50, 0.9), rgba(20, 25, 35, 0.9));
    box-sizing: border-box;
  }

  main:has(.sip-calculator-page) > .seo-content h2 {
    margin: 26px 0 10px;
    font-size: 1.28rem;
    line-height: 1.2;
  }

  main:has(.sip-calculator-page) > .seo-content h2:first-child {
    margin-top: 0;
  }

  main:has(.sip-calculator-page) > .seo-content h3 {
    margin: 18px 0 8px;
    font-size: 1rem;
  }

  main:has(.sip-calculator-page) > .seo-content p,
  main:has(.sip-calculator-page) > .seo-content li {
    font-size: 0.92rem;
    line-height: 1.48;
  }

  main:has(.sip-calculator-page) > .seo-content ul,
  main:has(.sip-calculator-page) > .seo-content ol {
    margin: 6px 0 12px 20px;
  }

  main:has(.sip-calculator-page) > .seo-content p {
    margin-bottom: 12px;
  }

  main:has(.sip-calculator-page) > .seo-content li {
    margin-bottom: 5px;
  }

  main:has(.sip-calculator-page) .top-funds-section {
    clear: both;
    margin: 14px 0 0;
    padding: 18px;
    border-color: rgba(34, 197, 94, 0.14);
    background:
      radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.12), transparent 35%),
      linear-gradient(145deg, rgba(15, 23, 42, 0.86), rgba(2, 6, 23, 0.58));
  }

  main:has(.sip-calculator-page) .funds-title {
    margin-bottom: 6px;
    font-size: 1.18rem;
    text-align: left;
  }

  main:has(.sip-calculator-page) .funds-subtitle {
    max-width: 980px;
    margin-bottom: 14px;
    text-align: left;
    font-size: 0.82rem;
  }

  main:has(.sip-calculator-page) .funds-tabs {
    justify-content: flex-start;
    gap: 7px;
    margin-bottom: 14px;
  }

  main:has(.sip-calculator-page) .fund-tab {
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
  }

  main:has(.sip-calculator-page) .funds-table {
    font-size: 0.78rem;
  }

  main:has(.sip-calculator-page) .funds-table th,
  main:has(.sip-calculator-page) .funds-table td {
    padding: 9px 7px;
  }

  main:has(.sip-calculator-page) .funds-disclaimer {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 10px;
  }
}


/* ===== MOBILE RESPONSIVE ===== */
/* Navbar: two rows (logo + locale, then scrollable nav) so region/currency + links fit */
@media (max-width: 960px) {
  .navbar {
    flex-wrap: wrap;
    align-items: center;
    row-gap: 6px;
    column-gap: 8px;
    padding: 8px 12px 10px;
  }

  .logo {
    flex: 0 0 auto;
    min-width: 0;
    line-height: 0;
    margin-right: 0;
    order: 1;
  }

  .logo img {
    height: 44px;
    width: auto;
    margin: 0;
    vertical-align: middle;
  }

  .locale-selectors {
    flex: 1 1 auto;
    min-width: 0;
    margin-right: 0;
    margin-left: auto;
    justify-content: flex-end;
    max-width: calc(100% - 108px);
    order: 2;
  }

  .nav-links {
    flex: 1 1 100%;
    width: 100%;
    order: 3;
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
    margin: 0 -4px;
    padding-left: 4px;
    padding-right: 4px;
    -webkit-mask-image: linear-gradient(to right, #000 86%, transparent 100%);
    mask-image: linear-gradient(to right, #000 86%, transparent 100%);
  }

  .nav-links::-webkit-scrollbar {
    display: none;
    height: 0;
  }

  .nav-links a {
    flex-shrink: 0;
    padding: 8px 12px;
    font-size: 0.85rem;
  }

  .country-selector-btn,
  .currency-selector-btn {
    padding: 8px 12px;
    font-size: 0.82rem;
    gap: 6px;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 6px 10px 8px;
    row-gap: 4px;
  }

  .logo img {
    height: 38px;
  }

  .locale-selectors {
    max-width: calc(100% - 100px);
  }

  .nav-links a {
    padding: 8px 11px;
    font-size: 0.8rem;
  }

  .country-selector-btn,
  .currency-selector-btn {
    padding: 8px 11px;
    font-size: 0.78rem;
  }

  .hero {
    padding: 60px 20px 50px;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .about-page .hero {
    padding: 56px 20px 24px;
  }

  .about-page .hero::before {
    inset: 12px 12px 0;
    border-radius: 24px;
  }

  .about-hero-stats,
  .about-mission-band,
  .about-values-grid,
  .about-principles,
  .trust-grid {
    grid-template-columns: 1fr;
  }

  .about-wrap,
  .trust-wrap {
    padding: 24px 20px 60px;
  }

  .about-value-card {
    min-height: 0;
  }

  .page-title,
  .crypto-title {
    font-size: 1.8rem;
  }

  .calculator-box {
    padding: 24px;
  }

}


/* ===== SEO CONTENT SECTION ===== */
.seo-content {
  background:
    radial-gradient(circle at 10% 0%, rgba(34, 197, 94, 0.1), transparent 32%),
    radial-gradient(circle at 90% 4%, rgba(56, 189, 248, 0.08), transparent 30%),
    linear-gradient(180deg, rgba(6, 12, 24, 0.98), rgba(15, 23, 42, 0.96));
  padding: 32px 0 14px;
  margin-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.seo-content.seo-content-continuation {
  margin-top: 0;
  border-top: none;
  padding-top: 0;
}

.seo-content .container,
.calculator-container.debt-payoff-page + .seo-content .container,
.calculator-container.emergency-fund-page + .seo-content .container,
.calculator-container.rent-buy-page + .seo-content .container {
  max-width: 1400px;
  padding: 40px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: linear-gradient(145deg, rgba(30, 35, 50, 0.9), rgba(20, 25, 35, 0.9));
  box-sizing: border-box;
}

.seo-content h2 {
  color: #22c55e;
  font-size: 1.5rem;
  margin: 40px 0 16px;
}

.seo-content h2:first-child {
  margin-top: 0;
}

.seo-content h3 {
  color: #fff;
  font-size: 1.1rem;
  margin: 24px 0 12px;
}

.seo-content p {
  color: #9ca3af;
  line-height: 1.8;
  margin-bottom: 16px;
}

.seo-content ul,
.seo-content ol {
  color: #9ca3af;
  line-height: 1.8;
  margin-left: 24px;
  margin-bottom: 16px;
}

.seo-content li {
  margin-bottom: 8px;
}

.seo-content .container > :last-child,
.seo-content p:last-child,
.seo-content ul:last-child,
.seo-content ol:last-child {
  margin-bottom: 0;
}

.seo-content strong {
  color: #fff;
}

.seo-content a {
  color: #22c55e;
  text-decoration: none;
}

.seo-content a:hover {
  text-decoration: underline;
}


/* ===== SITE FEEDBACK ===== */
.site-feedback {
  max-width: 1500px;
  margin: 42px auto 0;
  padding: 0 60px 64px;
}

.site-feedback--calculator {
  max-width: 1400px;
  padding-left: 20px;
  padding-right: 20px;
}

.site-feedback--calculator-wide {
  max-width: 1400px;
}

.site-feedback--calculator-large {
  max-width: 1400px;
}

.site-feedback-inner {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 1.1fr);
  gap: 24px;
  align-items: start;
  padding: 22px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.08), rgba(59, 130, 246, 0.04));
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.site-feedback-copy span {
  display: inline-flex;
  color: #4ade80;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.site-feedback-copy h2 {
  color: #fff;
  font-size: 1.35rem;
  line-height: 1.25;
  margin: 0 0 10px;
}

.site-feedback-copy p,
.site-feedback-bottom p {
  color: #9ca3af;
  line-height: 1.6;
  margin: 0;
}

.site-feedback-form {
  display: grid;
  gap: 12px;
}

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

.site-feedback-choice,
.site-feedback-submit {
  font: inherit;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.site-feedback-choice {
  color: #d1d5db;
  font-weight: 700;
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.site-feedback-choice:hover,
.site-feedback-choice.is-active {
  color: #86efac;
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.36);
  transform: translateY(-1px);
}

.site-feedback-form label {
  color: #cbd5e1;
  font-size: 0.86rem;
  font-weight: 700;
}

.site-feedback-form textarea {
  width: 100%;
  min-height: 92px;
  resize: vertical;
  color: #fff;
  font: inherit;
  line-height: 1.5;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.13);
}

.site-feedback-form textarea:focus {
  outline: none;
  border-color: rgba(34, 197, 94, 0.7);
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

.site-feedback-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.site-feedback-submit {
  color: #04130a;
  font-weight: 800;
  padding: 10px 15px;
  border-radius: 12px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border-color: rgba(34, 197, 94, 0.5);
}

.site-feedback-submit:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.site-feedback--sent .site-feedback-inner {
  border-color: rgba(34, 197, 94, 0.35);
}

.learn-page .site-feedback {
  margin-top: 0;
  padding-bottom: 40px;
}

.learn-page .site-feedback-inner {
  gap: 18px;
  padding: 18px;
}

.learn-page .site-feedback-copy h2 {
  margin-bottom: 6px;
}

.learn-page .site-feedback-form {
  gap: 9px;
}

.learn-page .site-feedback-form textarea {
  min-height: 76px;
}

@media (max-width: 768px) {
  .site-feedback {
    padding: 0 20px 46px;
  }

  .site-feedback-inner {
    grid-template-columns: 1fr;
    padding: 18px;
  }
}

/* Infinite Banking: wins over generic .seo-content padding (was adding 20px sides + breaking sticky feel) */
.seo-content.seo-content--ibc {
  padding: 60px 0;
  overflow: visible;
  background:
    radial-gradient(circle at 10% 0%, rgba(34, 197, 94, 0.1), transparent 32%),
    radial-gradient(circle at 90% 4%, rgba(56, 189, 248, 0.08), transparent 30%),
    linear-gradient(180deg, rgba(6, 12, 24, 0.98), rgba(15, 23, 42, 0.96));
}


/* ===== INTERNAL LINKS ===== */
.internal-links {
  margin-top: 24px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.internal-links p {
  margin: 0 0 10px 0;
  font-size: 0.8rem;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.internal-links a {
  display: inline-block;
  padding: 6px 12px;
  margin: 4px 4px 4px 0;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 6px;
  color: #22c55e;
  font-size: 0.8rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.internal-links a:hover {
  background: rgba(34, 197, 94, 0.2);
  transform: translateY(-1px);
}

.internal-links [data-region-only][hidden] {
  display: none !important;
}


/* ===== FUTURE WEALTH CALCULATOR ===== */
.wealth-result {
  text-align: center;
  padding: 30px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(59, 130, 246, 0.1));
  border-radius: 20px;
  margin-bottom: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.wealth-result .big-number {
  font-size: 3rem;
  font-weight: 700;
  background: linear-gradient(135deg, #22c55e, #4ade80);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.wealth-result .subtitle {
  color: #9ca3af;
  margin-top: 8px;
}

.wealth-tier {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 1.1rem;
  margin-top: 16px;
}

.tier-struggling { background: #7f1d1d; color: #fca5a5; }
.tier-middle { background: #1e3a5f; color: #93c5fd; }
.tier-uppermiddle { background: #1e3a8a; color: #60a5fa; }
.tier-comfortable { background: #065f46; color: #6ee7b7; }
.tier-rich { background: #166534; color: #4ade80; }
.tier-wealthy { background: #854d0e; color: #fcd34d; }
.tier-elite { background: linear-gradient(135deg, #b45309, #d97706); color: #fff; }

.age-milestones {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 30px 0;
}

.milestone-card {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.milestone-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 197, 94, 0.3);
}

.milestone-card .age {
  font-size: 0.85rem;
  color: #9ca3af;
  margin-bottom: 8px;
}

.milestone-card .amount {
  font-size: 1.3rem;
  font-weight: 700;
  color: #22c55e;
}

.milestone-card .tier-label {
  font-size: 0.75rem;
  margin-top: 8px;
  padding: 4px 10px;
  border-radius: 12px;
  display: inline-block;
}

.achievements {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.achievement {
  padding: 8px 16px;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 20px;
  font-size: 0.85rem;
  color: #a78bfa;
}

.achievement.unlocked {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.3);
  color: #4ade80;
}

.comparison-bar {
  margin: 20px 0;
  padding: 20px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
}

.comparison-bar h4 {
  margin: 0 0 12px 0;
  font-size: 0.85rem;
  color: #9ca3af;
}

.bar-container {
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 12px;
  transition: width 0.5s ease;
}

.bar-fill.you {
  background: linear-gradient(90deg, #22c55e, #4ade80);
}

.bar-markers {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 0.75rem;
  color: #6b7280;
}

.lifestyle-preview {
  margin-top: 30px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.lifestyle-preview h4 {
  margin: 0 0 16px 0;
  color: #fff;
}

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

.lifestyle-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
}

.lifestyle-item .icon {
  font-size: 1.5rem;
}

.lifestyle-item .text {
  font-size: 0.9rem;
  color: #9ca3af;
}

.lifestyle-item.unlocked .text {
  color: #4ade80;
}

/* Formula Section */
.formula-section {
  margin-top: 30px;
  padding: 24px;
  background: rgba(59, 130, 246, 0.05);
  border-radius: 16px;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.formula-section h4 {
  margin: 0 0 16px 0;
  color: #fff;
}

.formula-box {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 20px;
}

.formula-text {
  font-family: 'Courier New', monospace;
  color: #93c5fd;
  font-size: 0.95rem;
}

.formula-text strong {
  color: #22c55e;
}

.formula-example {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 20px;
}

.example-title {
  font-size: 0.85rem;
  color: #9ca3af;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.example-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.step {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
}

.step.highlight {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.step-label {
  color: #9ca3af;
  font-size: 0.9rem;
}

.step-value {
  font-weight: 600;
  color: #fff;
  font-family: 'Courier New', monospace;
}

.step.highlight .step-value {
  color: #4ade80;
}

.example-note {
  margin-top: 16px;
  font-size: 0.8rem;
  color: #6b7280;
  font-style: italic;
}

@media (max-width: 768px) {
  .age-milestones {
    grid-template-columns: repeat(2, 1fr);
  }
  .lifestyle-items {
    grid-template-columns: 1fr;
  }
  .wealth-result .big-number {
    font-size: 2rem;
  }
}


/* ===== BITCOIN MILLIONAIRE CALCULATOR ===== */

.prediction-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pred-btn {
  flex: 1;
  min-width: 100px;
  padding: 12px 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
}

.pred-btn span {
  font-size: 0.7rem;
  opacity: 0.7;
}

.pred-btn:hover {
  background: rgba(247, 147, 26, 0.1);
  border-color: rgba(247, 147, 26, 0.3);
}

.pred-btn.active {
  background: rgba(247, 147, 26, 0.2);
  border-color: #f7931a;
  color: #f7931a;
}

.btc-price-prediction {
  margin-top: 20px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(247, 147, 26, 0.1), rgba(247, 147, 26, 0.05));
  border-radius: 16px;
  border: 1px solid rgba(247, 147, 26, 0.2);
}

.prediction-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: #f7931a;
}

.prediction-header .icon {
  font-size: 1.1rem;
}

.prediction-prices {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.price-year {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.price-year span {
  font-size: 0.75rem;
  color: #9ca3af;
}

.price-year strong {
  font-size: 0.95rem;
  color: #fff;
}

.millionaire-result {
  text-align: center;
  padding: 40px 30px;
  background: linear-gradient(135deg, rgba(247, 147, 26, 0.15), rgba(247, 147, 26, 0.05));
  border-radius: 24px;
  border: 2px solid rgba(247, 147, 26, 0.3);
  margin-bottom: 24px;
}

.result-icon {
  font-size: 3rem;
  margin-bottom: 10px;
}

.result-year {
  font-size: 4rem;
  font-weight: 800;
  color: #f7931a;
  line-height: 1;
  margin-bottom: 8px;
  text-shadow: 0 0 40px rgba(247, 147, 26, 0.4);
}

.result-text {
  font-size: 1.3rem;
  color: #e5e7eb;
  margin-bottom: 6px;
}

.result-text .highlight {
  color: #f7931a;
  font-weight: 700;
}

.result-subtext {
  font-size: 0.95rem;
  color: #9ca3af;
}

.btc-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-box {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  padding: 20px 16px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.stat-icon {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.8rem;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.milestone-timeline {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
}

.timeline-title {
  font-size: 1rem;
  color: #fff;
  margin-bottom: 16px;
  text-align: center;
}

.timeline-track {
  display: flex;
  justify-content: space-between;
  position: relative;
  padding: 0 10px;
}

.timeline-track::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 30px;
  right: 30px;
  height: 2px;
  background: linear-gradient(90deg, rgba(247, 147, 26, 0.3), #f7931a);
}

.milestone-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 1;
}

.marker-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #1a1f2e;
  border: 3px solid #f7931a;
}

.marker-dot.gold {
  background: #f7931a;
  box-shadow: 0 0 20px rgba(247, 147, 26, 0.6);
}

.marker-label {
  font-size: 0.85rem;
  color: #e5e7eb;
  font-weight: 600;
}

.marker-year {
  font-size: 0.9rem;
  color: #f7931a;
  font-weight: 700;
}

.scenario-comparison {
  margin-top: 24px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 16px;
}

.scenario-title {
  font-size: 1rem;
  color: #fff;
  margin-bottom: 16px;
  text-align: center;
}

.scenarios {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.scenario-box {
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.scenario-box.active {
  background: rgba(247, 147, 26, 0.15);
  border-color: rgba(247, 147, 26, 0.4);
}

.scenario-name {
  font-size: 0.85rem;
  color: #9ca3af;
  margin-bottom: 6px;
}

.scenario-year {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}

.scenario-box.active .scenario-year {
  color: #f7931a;
}

.model-explanation {
  display: flex;
  gap: 14px;
  padding: 16px;
  background: rgba(247, 147, 26, 0.08);
  border-radius: 14px;
  border-left: 4px solid #f7931a;
  margin-top: 16px;
}

.model-explanation .model-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.model-explanation .model-text strong {
  display: block;
  color: #f7931a;
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.model-explanation .model-text p {
  color: #9ca3af;
  font-size: 0.82rem;
  line-height: 1.5;
  margin: 0;
}

.model-buttons .pred-btn {
  flex: 1;
  min-width: 90px;
}

.prediction-table {
  margin-top: 8px;
}

.price-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.price-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
}

.price-year-label {
  font-size: 0.75rem;
  color: #6b7280;
  font-weight: 500;
}

.price-value {
  font-size: 0.9rem;
  color: #fff;
}

.price-change {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.price-change.positive {
  color: #4ade80;
  background: rgba(34, 197, 94, 0.15);
}

.price-change.negative {
  color: #f87171;
  background: rgba(248, 113, 113, 0.15);
}

.btc-price-status {
  color: #fbbf24;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
}

.prediction-source {
  margin-top: 8px;
  color: #9ca3af;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.3;
}

.currency-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  margin-left: 4px;
  padding: 2px 6px;
  border: 1px solid rgba(247, 147, 26, 0.22);
  border-radius: 999px;
  background: rgba(247, 147, 26, 0.12);
  color: #fbbf24;
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1;
}

.bitcoin-snapshot {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.snapshot-card {
  display: flex;
  min-height: 78px;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  padding: 14px;
  border: 1px solid rgba(247, 147, 26, 0.14);
  border-radius: 16px;
  background:
    radial-gradient(circle at 0% 0%, rgba(247, 147, 26, 0.14), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.052), rgba(15, 23, 42, 0.32));
}

.snapshot-card:nth-child(2) {
  background:
    radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.14), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.052), rgba(15, 23, 42, 0.32));
}

.snapshot-card:nth-child(3) {
  background:
    radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.14), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.052), rgba(15, 23, 42, 0.32));
}

.snapshot-card span {
  color: #9ca3af;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.snapshot-card strong {
  color: #fff7ed;
  font-size: 1rem;
  line-height: 1.1;
}

.snapshot-card--targets strong {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #f8fafc;
  font-size: 0.72rem;
  white-space: nowrap;
}

.snapshot-card--targets strong span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 3px 4px;
  border-radius: 7px;
  background: rgba(15, 23, 42, 0.32);
  color: #f8fafc;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.snapshot-card--targets strong b {
  color: #fbbf24;
  font-size: 0.66rem;
}

@media (max-width: 768px) {
  .btc-stats {
    grid-template-columns: 1fr;
  }
  .scenarios {
    grid-template-columns: 1fr;
  }
  .prediction-buttons {
    flex-direction: column;
  }
  .result-year {
    font-size: 3rem;
  }
  .timeline-track {
    flex-direction: column;
    gap: 16px;
    padding: 0;
  }
  .timeline-track::before {
    display: none;
  }
  .milestone-marker {
    flex-direction: row;
    gap: 12px;
  }
  .price-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .model-explanation {
    flex-direction: column;
    gap: 10px;
  }
}


/* ===== SWP CALCULATOR ===== */

.page-subtitle {
  text-align: center;
  color: #9ca3af;
  margin-top: -10px;
  margin-bottom: 30px;
}

.strategy-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.strat-btn {
  flex: 1;
  min-width: 140px;
  padding: 14px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.9rem;
}

.strat-btn span {
  font-size: 0.7rem;
  opacity: 0.7;
}

.strat-btn:hover {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
}

.strat-btn.active {
  background: rgba(34, 197, 94, 0.2);
  border-color: #22c55e;
  color: #22c55e;
}

.swp-info-box {
  display: flex;
  gap: 14px;
  padding: 16px;
  background: rgba(34, 197, 94, 0.08);
  border-radius: 14px;
  border-left: 4px solid #22c55e;
  margin-top: 16px;
}

.swp-info-box .info-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.swp-info-box .info-text strong {
  display: block;
  color: #22c55e;
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.swp-info-box .info-text p {
  color: #9ca3af;
  font-size: 0.82rem;
  line-height: 1.5;
  margin: 0;
}

.swp-result {
  text-align: center;
  padding: 30px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.05));
  border-radius: 20px;
  border: 2px solid rgba(34, 197, 94, 0.3);
  margin-bottom: 24px;
}

.swp-result .result-icon {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.swp-result .result-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.swp-result .result-label {
  font-size: 1rem;
  color: #9ca3af;
}

.swp-result .result-value {
  font-size: 3rem;
  font-weight: 800;
  color: #22c55e;
  line-height: 1.1;
}

.swp-result .result-status {
  margin-top: 12px;
  font-size: 0.95rem;
  color: #e5e7eb;
}

.swp-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.stat-card .stat-icon {
  font-size: 1.8rem;
}

.stat-card .stat-content {
  display: flex;
  flex-direction: column;
}

.stat-card .stat-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}

.stat-card .stat-label {
  font-size: 0.75rem;
  color: #9ca3af;
  text-transform: uppercase;
}

.withdrawal-schedule {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
}

.schedule-title {
  font-size: 1rem;
  color: #fff;
  margin-bottom: 16px;
}

.schedule-header {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 8px;
  padding: 0 14px;
  color: #9ca3af;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-align: center;
  text-transform: uppercase;
}

.schedule-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.schedule-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  font-size: 0.9rem;
}

.schedule-year {
  color: #9ca3af;
}

.schedule-withdrawal {
  color: #f59e0b;
  text-align: center;
}

.schedule-balance {
  color: #22c55e;
  text-align: right;
}

.swp-insights {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 16px;
  padding: 20px;
  margin-top: 24px;
}

.insight-title {
  font-size: 1rem;
  color: #fff;
  margin-bottom: 16px;
}

.insights-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.insight-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  text-align: center;
}

.insight-icon {
  font-size: 1.5rem;
}

.insight-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
}

.insight-label {
  font-size: 0.8rem;
  color: #9ca3af;
}

.insight-note {
  font-size: 0.7rem;
  color: #6b7280;
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

@media (max-width: 768px) {
  .swp-stats {
    grid-template-columns: 1fr;
  }
  .insights-grid {
    grid-template-columns: 1fr;
  }
  .strategy-buttons {
    flex-direction: column;
  }
  .swp-result .result-value {
    font-size: 2.2rem;
  }
  .schedule-row {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .schedule-withdrawal,
  .schedule-balance {
    text-align: left;
  }
}


/* ===== TOP FUNDS SECTION ===== */


/* ===== DEBT PAYOFF CALCULATOR ===== */
.debt-payoff-page {
  max-width: 1400px;
}

.debt-payoff-box {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 22px;
  align-items: start;
}

.debt-quest-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 22px;
}

.debt-quest-strip div {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px 12px;
  align-items: center;
  padding: 15px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(96, 165, 250, 0.055));
  border: 1px solid rgba(255, 255, 255, 0.075);
}

.debt-quest-strip span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #06120a;
  background: #4ade80;
  font-weight: 1000;
}

.debt-quest-strip strong {
  color: #fff;
  line-height: 1.2;
}

.debt-quest-strip p {
  color: #9ca3af;
  font-size: 0.84rem;
  line-height: 1.35;
  margin: 0;
}

.debt-input-panel,
.debt-results-panel {
  min-width: 0;
}

.debt-input-panel {
  position: relative;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(248, 113, 113, 0.16);
  background:
    linear-gradient(135deg, rgba(248, 113, 113, 0.075), rgba(245, 158, 11, 0.045) 42%, rgba(15, 23, 42, 0.42)),
    rgba(255, 255, 255, 0.025);
}

.debt-input-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 18px 0 0 18px;
  background: linear-gradient(180deg, #fb7185, #f59e0b, #22c55e);
}

.debt-input-panel .debt-panel-head h2 {
  color: #fff7ed;
}

.debt-input-panel .debt-panel-head p {
  color: #cbd5e1;
}

.debt-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.debt-panel-head h2 {
  color: #fff;
  font-size: 1.25rem;
  line-height: 1.25;
  margin: 0 0 6px;
}

.debt-panel-head p {
  color: #9ca3af;
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}

.debt-add-btn {
  flex-shrink: 0;
  padding: 10px 14px;
  font-size: 0.82rem;
  border-color: rgba(251, 191, 36, 0.32);
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.08);
}

.debt-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.debt-row {
  display: grid;
  grid-template-columns: minmax(170px, 1.25fr) repeat(3, minmax(96px, 0.8fr)) 38px;
  gap: 10px;
  align-items: end;
  padding: 14px;
  border: 1px solid rgba(251, 191, 36, 0.14);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.78), rgba(127, 29, 29, 0.12));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.debt-row label,
.debt-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.debt-row span,
.debt-field span {
  color: #fcd34d;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.debt-row input,
.debt-row select,
.debt-field input,
.debt-field select {
  width: 100%;
  border: 1px solid rgba(251, 191, 36, 0.16);
  border-radius: 9px;
  background: rgba(15, 23, 42, 0.88);
  color: #fff;
  font: inherit;
  padding: 10px 11px;
}

.debt-row input:focus,
.debt-row select:focus,
.debt-field input:focus,
.debt-field select:focus {
  outline: none;
  border-color: rgba(251, 191, 36, 0.78);
  box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.16);
}

.debt-field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #9ca3af 50%), linear-gradient(135deg, #9ca3af 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.debt-name-combo {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
}

.debt-name-combo .debt-name {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.debt-name-toggle {
  border: 1px solid rgba(251, 191, 36, 0.16);
  border-left: 0;
  border-radius: 0 9px 9px 0;
  background: rgba(30, 41, 59, 0.94);
  color: #fcd34d;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.debt-name-menu {
  position: absolute;
  z-index: 50;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 230px;
  overflow-y: auto;
  padding: 6px;
  border-radius: 12px;
  background: #111827;
  border: 1px solid rgba(251, 191, 36, 0.18);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.debt-name-menu button {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #d1d5db;
  cursor: pointer;
  font: inherit;
  padding: 8px 9px;
  text-align: left;
}

.debt-name-menu button:hover,
.debt-name-menu button:focus {
  outline: none;
  background: rgba(245, 158, 11, 0.16);
  color: #fff;
}

.debt-goal-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 8px;
}

.debt-remove {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(248, 113, 113, 0.42);
  border-radius: 10px;
  background: rgba(248, 113, 113, 0.13);
  color: #fca5a5;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

.debt-extra-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(34, 197, 94, 0.14);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.08), rgba(15, 23, 42, 0.28));
}

.debt-method-toggle {
  display: inline-flex;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.debt-method-toggle button {
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 8px 10px;
}

.debt-method-toggle button.active {
  background: rgba(34, 197, 94, 0.16);
  color: #86efac;
}

.debt-summary-grid,
.debt-compare-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.debt-summary-grid div,
.debt-compare-grid article,
.debt-action-card {
  position: relative;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.debt-summary-card {
  --summary-accent: #94a3b8;
  --summary-bg: rgba(148, 163, 184, 0.065);
  min-height: 92px;
  overflow: hidden;
  padding: 13px 14px 14px 16px;
  background: linear-gradient(135deg, var(--summary-bg), rgba(15, 23, 42, 0.48)) !important;
  border-color: color-mix(in srgb, var(--summary-accent) 34%, transparent) !important;
}

.debt-summary-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--summary-accent);
}

.debt-summary-card--date {
  --summary-accent: #22c55e;
  --summary-bg: rgba(34, 197, 94, 0.085);
}

.debt-summary-card--total {
  --summary-accent: #14b8a6;
  --summary-bg: rgba(20, 184, 166, 0.085);
}

.debt-summary-card--impact {
  --summary-accent: #f59e0b;
  --summary-bg: rgba(245, 158, 11, 0.1);
}

.debt-summary-card--goal {
  --summary-accent: #60a5fa;
  --summary-bg: rgba(96, 165, 250, 0.1);
}

.debt-summary-grid span,
.debt-compare-grid span,
.debt-action-card span {
  display: block;
  color: #9ca3af;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.debt-summary-grid span {
  color: color-mix(in srgb, var(--summary-accent) 72%, #d1d5db);
  font-size: 0.66rem;
  line-height: 1.2;
}

.debt-summary-grid strong,
.debt-compare-grid strong,
.debt-action-card strong {
  display: block;
  color: #fff;
  font-size: 1rem;
  line-height: 1.25;
  margin-top: 7px;
  overflow-wrap: anywhere;
}

.debt-summary-grid strong {
  color: #f8fafc;
  min-height: 2.45em;
  display: flex;
  align-items: flex-start;
  font-size: clamp(0.7rem, 0.62rem + 0.18vw, 0.86rem);
  line-height: 1.28;
  letter-spacing: 0;
}

.debt-summary-card--impact strong,
.debt-summary-card--goal strong {
  font-size: clamp(0.66rem, 0.58rem + 0.16vw, 0.78rem);
  line-height: 1.22;
}

.debt-compare-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.debt-compare-grid p {
  color: #9ca3af;
  font-size: 0.82rem;
  margin: 6px 0 0;
}

.debt-compare-grid article {
  overflow: hidden;
  padding-left: 16px;
}

.debt-compare-grid article::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
}

.debt-compare-card--avalanche {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.12), rgba(15, 23, 42, 0.42)) !important;
  border-color: rgba(34, 197, 94, 0.24) !important;
}

.debt-compare-card--avalanche::before {
  background: #22c55e;
}

.debt-compare-card--avalanche span {
  color: #86efac;
}

.debt-compare-card--snowball {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.13), rgba(15, 23, 42, 0.42)) !important;
  border-color: rgba(96, 165, 250, 0.25) !important;
}

.debt-compare-card--snowball::before {
  background: #60a5fa;
}

.debt-compare-card--snowball span {
  color: #93c5fd;
}

.debt-action-card {
  position: relative;
  overflow: hidden;
  margin-bottom: 14px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.11), rgba(34, 197, 94, 0.055));
  border-color: rgba(251, 191, 36, 0.18);
}

.debt-action-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, #fbbf24, #22c55e);
}

.debt-action-card p {
  color: #cbd5e1;
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 7px 0 0;
}

.debt-warning {
  color: #fca5a5 !important;
}

.debt-success {
  color: #86efac !important;
}

.debt-chart-wrap {
  height: 330px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
}

@media (max-width: 1024px) {
  .debt-payoff-box {
    grid-template-columns: 1fr;
  }

  .debt-quest-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .debt-row,
  .debt-extra-grid,
  .debt-summary-grid,
  .debt-compare-grid {
    grid-template-columns: 1fr;
  }

  .debt-input-panel,
  .debt-results-panel {
    padding: 14px;
  }

  .debt-panel-head {
    flex-direction: column;
  }

  .debt-chart-wrap {
    height: 280px;
  }
}


/* ===== MOBILE DEBT PAYOFF COMPACT ===== */
@media (max-width: 768px) {
  .calculator-container.debt-payoff-page {
    padding-top: 10px;
  }

  .debt-payoff-box {
    gap: 12px;
  }

  .debt-quest-strip {
    grid-template-columns: 1fr;
    gap: 8px;
    margin: 10px 0 12px;
  }

  .debt-quest-strip div {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 2px 9px;
    padding: 10px;
    border-radius: 12px;
  }

  .debt-quest-strip span {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    font-size: 0.78rem;
  }

  .debt-quest-strip strong {
    font-size: 0.86rem;
  }

  .debt-quest-strip p {
    font-size: 0.7rem;
    line-height: 1.25;
  }

  .debt-input-panel,
  .debt-results-panel {
    padding: 11px;
    border-radius: 14px;
  }

  .debt-input-panel::before {
    width: 3px;
    border-radius: 14px 0 0 14px;
  }

  .debt-panel-head {
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
  }

  .debt-panel-head h2 {
    font-size: 1.02rem;
    margin-bottom: 3px;
  }

  .debt-panel-head p {
    font-size: 0.72rem;
    line-height: 1.3;
  }

  .debt-add-btn {
    min-height: 30px;
    padding: 6px 9px;
    border-radius: 10px;
    font-size: 0.68rem;
    white-space: nowrap;
  }

  .debt-rows {
    gap: 8px;
  }

  .debt-row {
    position: relative;
    grid-template-columns: repeat(3, minmax(0, 1fr)) 30px;
    gap: 7px;
    align-items: end;
    padding: 10px;
    border-radius: 12px;
  }

  .debt-row label:first-child {
    grid-column: 1 / -1;
    padding-right: 36px;
  }

  .debt-row span,
  .debt-field span {
    font-size: 0.56rem;
    line-height: 1;
    letter-spacing: 0.045em;
  }

  .debt-row label,
  .debt-field {
    gap: 4px;
  }

  .debt-row input,
  .debt-row select,
  .debt-field input,
  .debt-field select {
    min-height: 34px;
    padding: 7px 8px;
    border-radius: 8px;
    font-size: 0.78rem;
  }

  .debt-name-combo {
    grid-template-columns: minmax(0, 1fr) 32px;
  }

  .debt-name-toggle {
    border-radius: 0 8px 8px 0;
    font-size: 0.82rem;
  }

  .debt-name-menu {
    max-height: 190px;
    padding: 5px;
    border-radius: 10px;
  }

  .debt-name-menu button {
    padding: 7px 8px;
    font-size: 0.76rem;
  }

  .debt-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    font-size: 0.95rem;
  }

  .debt-extra-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
    padding: 10px;
    border-radius: 12px;
  }

  .debt-extra-grid .debt-field:nth-child(3) {
    grid-column: 1 / -1;
  }

  .debt-goal-picker {
    grid-template-columns: minmax(0, 1fr) 82px;
    gap: 7px;
  }

  .debt-results-panel .debt-panel-head {
    flex-direction: column;
    gap: 8px;
  }

  .debt-method-toggle {
    width: 100%;
    padding: 3px;
    border-radius: 10px;
  }

  .debt-method-toggle button {
    flex: 1;
    min-height: 30px;
    padding: 6px 8px;
    font-size: 0.7rem;
  }

  .debt-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 9px;
  }

  .debt-summary-card,
  .debt-summary-grid div {
    min-height: 66px;
    padding: 9px 9px 9px 11px;
    border-radius: 11px;
  }

  .debt-summary-card::before,
  .debt-compare-grid article::before,
  .debt-action-card::before {
    width: 3px;
  }

  .debt-summary-grid span,
  .debt-compare-grid span,
  .debt-action-card span {
    font-size: 0.55rem;
    line-height: 1.12;
    letter-spacing: 0.045em;
  }

  .debt-summary-grid strong {
    min-height: 0;
    margin-top: 5px;
    font-size: 0.74rem;
    line-height: 1.18;
  }

  .debt-summary-card--impact strong,
  .debt-summary-card--goal strong {
    font-size: 0.68rem;
    line-height: 1.16;
  }

  .debt-compare-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 9px;
  }

  .debt-compare-grid article {
    padding: 10px 9px 10px 11px;
    border-radius: 11px;
  }

  .debt-compare-grid strong {
    margin-top: 5px;
    font-size: 0.86rem;
    line-height: 1.15;
  }

  .debt-compare-grid p {
    font-size: 0.66rem;
    line-height: 1.22;
    margin-top: 4px;
  }

  .debt-action-card {
    margin-bottom: 9px;
    padding: 10px 10px 10px 12px;
    border-radius: 12px;
  }

  .debt-action-card strong {
    margin-top: 5px;
    font-size: 0.9rem;
    line-height: 1.18;
  }

  .debt-action-card p {
    margin-top: 4px;
    font-size: 0.7rem;
    line-height: 1.28;
  }

  .debt-chart-wrap {
    height: 220px;
    padding: 8px;
    border-radius: 12px;
  }
}


/* ===== EMERGENCY FUND CALCULATOR ===== */
.emergency-fund-page {
  max-width: 1400px;
}

.emergency-fund-box {
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  gap: 22px;
  align-items: start;
}

.emergency-input-panel,
.emergency-results-panel {
  min-width: 0;
}

.emergency-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.emergency-hero-result {
  padding: 22px;
  margin-bottom: 14px;
  border: 1px solid rgba(34, 197, 94, 0.22);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.14), rgba(59, 130, 246, 0.08));
}

.emergency-hero-result span,
.emergency-progress-label span {
  display: block;
  color: #9ca3af;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.emergency-hero-result strong {
  display: block;
  color: #fff;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.05;
  margin-top: 8px;
}

.emergency-hero-result p {
  color: #bbf7d0;
  margin: 10px 0 0;
}

.emergency-summary-grid {
  margin-bottom: 16px;
}

.emergency-progress-wrap {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
}

.emergency-progress-label {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 10px;
}

.emergency-progress-label strong {
  color: #86efac;
}

.emergency-progress-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
}

.emergency-progress-track div {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e, #38bdf8);
  transition: width 180ms ease;
}

@media (max-width: 1024px) {
  .emergency-fund-box {
    grid-template-columns: 1fr;
  }
}

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


/* ===== DESKTOP EMERGENCY FUND CALCULATOR UPGRADE ===== */
@media (min-width: 901px) {
  main:has(#monthlyExpenses):has(#targetFund) {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px 0;
  }

  main:has(#monthlyExpenses):has(#targetFund)::after {
    content: "";
    display: block;
    clear: both;
  }

  main:has(#monthlyExpenses):has(#targetFund) .calculator-container.emergency-fund-page {
    float: left;
    width: min(56%, 760px);
    min-width: 540px;
    max-width: 760px;
    margin: 0 30px 20px 28px;
    padding: 0;
  }

  main:has(#monthlyExpenses):has(#targetFund) .page-title {
    margin-top: 10px;
    margin-bottom: 8px;
    padding-left: 16px;
    background: linear-gradient(135deg, #86efac 0%, #38bdf8 48%, #facc15 100%);
    -webkit-background-clip: text;
    background-clip: text;
    font-size: 2.08rem;
    line-height: 1.08;
    text-align: left;
  }

  main:has(#monthlyExpenses):has(#targetFund) .emi-page-lead {
    max-width: 700px;
    margin: 0 0 14px;
    padding-left: 16px;
    color: #a7f3d0;
    font-size: 0.92rem;
    line-height: 1.42;
    text-align: left;
  }

  main:has(#monthlyExpenses):has(#targetFund) .calculator-box.emergency-fund-box {
    position: relative;
    grid-template-columns: minmax(270px, 0.95fr) minmax(0, 1.05fr);
    gap: 14px;
    align-items: stretch;
    padding: 16px;
    border-radius: 20px;
    border-color: rgba(34, 197, 94, 0.18);
    background:
      radial-gradient(circle at 12% 10%, rgba(34, 197, 94, 0.18), transparent 32%),
      radial-gradient(circle at 84% 12%, rgba(56, 189, 248, 0.14), transparent 34%),
      linear-gradient(145deg, rgba(24, 30, 43, 0.95), rgba(12, 17, 27, 0.94));
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.045);
    overflow: hidden;
  }

  main:has(#monthlyExpenses):has(#targetFund) .calculator-box.emergency-fund-box::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, #22c55e, #38bdf8, #facc15);
  }

  main:has(#monthlyExpenses):has(#targetFund) .emergency-input-panel,
  main:has(#monthlyExpenses):has(#targetFund) .emergency-results-panel {
    position: relative;
    padding: 11px;
    border: 1px solid rgba(34, 197, 94, 0.14);
    border-radius: 16px;
    background:
      linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.48)),
      radial-gradient(circle at 15% 0%, rgba(34, 197, 94, 0.14), transparent 34%);
    overflow: hidden;
  }

  main:has(#monthlyExpenses):has(#targetFund) .emergency-input-panel::before,
  main:has(#monthlyExpenses):has(#targetFund) .emergency-results-panel::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 2px;
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.9), rgba(56, 189, 248, 0.75), rgba(250, 204, 21, 0.75));
  }

  main:has(#monthlyExpenses):has(#targetFund) .emergency-input-panel {
    background:
      radial-gradient(circle at 0% 8%, rgba(34, 197, 94, 0.18), transparent 34%),
      radial-gradient(circle at 100% 12%, rgba(250, 204, 21, 0.09), transparent 32%),
      linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.52));
  }

  main:has(#monthlyExpenses):has(#targetFund) .debt-panel-head {
    position: relative;
    margin-bottom: 10px;
  }

  main:has(#monthlyExpenses):has(#targetFund) .debt-panel-head h2 {
    font-size: 1rem;
    line-height: 1.16;
  }

  main:has(#monthlyExpenses):has(#targetFund) .debt-panel-head p {
    margin-top: 4px;
    font-size: 0.72rem;
    line-height: 1.32;
  }

  main:has(#monthlyExpenses):has(#targetFund) .emergency-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  main:has(#monthlyExpenses):has(#targetFund) .emergency-form-grid .debt-field {
    position: relative;
    gap: 5px;
    min-height: 68px;
    padding: 8px;
    border: 1px solid rgba(34, 197, 94, 0.14);
    border-radius: 10px;
    background:
      radial-gradient(circle at 100% 0%, rgba(56, 189, 248, 0.1), transparent 36%),
      linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(34, 197, 94, 0.025));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    overflow: hidden;
  }

  main:has(#monthlyExpenses):has(#targetFund) .emergency-form-grid .debt-field::after {
    content: "";
    position: absolute;
    inset: auto 8px 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(34, 197, 94, 0.38), transparent);
    opacity: 0.65;
  }

  main:has(#monthlyExpenses):has(#targetFund) .emergency-form-grid .debt-field:nth-child(1) {
    border-color: rgba(34, 197, 94, 0.22);
    background:
      radial-gradient(circle at 100% 0%, rgba(34, 197, 94, 0.16), transparent 36%),
      linear-gradient(135deg, rgba(34, 197, 94, 0.09), rgba(255, 255, 255, 0.025));
  }

  main:has(#monthlyExpenses):has(#targetFund) .emergency-form-grid .debt-field:nth-child(2) {
    border-color: rgba(56, 189, 248, 0.22);
    background:
      radial-gradient(circle at 100% 0%, rgba(56, 189, 248, 0.15), transparent 36%),
      linear-gradient(135deg, rgba(56, 189, 248, 0.08), rgba(255, 255, 255, 0.025));
  }

  main:has(#monthlyExpenses):has(#targetFund) .emergency-form-grid .debt-field:nth-child(3) {
    border-color: rgba(250, 204, 21, 0.2);
    background:
      radial-gradient(circle at 100% 0%, rgba(250, 204, 21, 0.14), transparent 36%),
      linear-gradient(135deg, rgba(250, 204, 21, 0.075), rgba(255, 255, 255, 0.025));
  }

  main:has(#monthlyExpenses):has(#targetFund) .emergency-form-grid .debt-field:last-child {
    grid-column: 1 / -1;
  }

  main:has(#monthlyExpenses):has(#targetFund) .emergency-form-grid .debt-field span {
    font-size: 0.58rem;
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: 0.045em;
  }

  main:has(#monthlyExpenses):has(#targetFund) .emergency-form-grid .debt-field input,
  main:has(#monthlyExpenses):has(#targetFund) .emergency-form-grid .debt-field select {
    min-height: 31px;
    padding: 6px 7px;
    border-radius: 7px;
    border-color: rgba(34, 197, 94, 0.22);
    background: rgba(6, 12, 24, 0.78);
    font-size: 0.76rem;
    font-weight: 700;
  }

  main:has(#monthlyExpenses):has(#targetFund) .emergency-hero-result {
    padding: 14px;
    margin-bottom: 9px;
    border-radius: 14px;
    border-color: rgba(34, 197, 94, 0.22);
    background:
      radial-gradient(circle at 100% 0%, rgba(56, 189, 248, 0.16), transparent 34%),
      linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(15, 23, 42, 0.34));
  }

  main:has(#monthlyExpenses):has(#targetFund) .emergency-hero-result span,
  main:has(#monthlyExpenses):has(#targetFund) .emergency-progress-label span {
    font-size: 0.62rem;
  }

  main:has(#monthlyExpenses):has(#targetFund) .emergency-hero-result strong {
    margin-top: 5px;
    font-size: clamp(1.75rem, 3vw, 2.6rem);
    line-height: 1.04;
  }

  main:has(#monthlyExpenses):has(#targetFund) .emergency-hero-result p {
    margin-top: 6px;
    font-size: 0.78rem;
    line-height: 1.3;
  }

  main:has(#monthlyExpenses):has(#targetFund) .emergency-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin-bottom: 8px;
  }

  main:has(#monthlyExpenses):has(#targetFund) .emergency-summary-grid div {
    display: grid;
    align-content: center;
    justify-items: center;
    min-height: 60px;
    padding: 8px 5px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
  }

  main:has(#monthlyExpenses):has(#targetFund) .emergency-summary-grid div:nth-child(1) {
    border-color: rgba(248, 113, 113, 0.24);
    background:
      radial-gradient(circle at 100% 0%, rgba(248, 113, 113, 0.18), transparent 38%),
      linear-gradient(145deg, rgba(127, 29, 29, 0.24), rgba(255, 255, 255, 0.03));
  }

  main:has(#monthlyExpenses):has(#targetFund) .emergency-summary-grid div:nth-child(2) {
    border-color: rgba(56, 189, 248, 0.24);
    background:
      radial-gradient(circle at 100% 0%, rgba(56, 189, 248, 0.18), transparent 38%),
      linear-gradient(145deg, rgba(14, 116, 144, 0.2), rgba(255, 255, 255, 0.03));
  }

  main:has(#monthlyExpenses):has(#targetFund) .emergency-summary-grid div:nth-child(3) {
    border-color: rgba(34, 197, 94, 0.24);
    background:
      radial-gradient(circle at 100% 0%, rgba(34, 197, 94, 0.18), transparent 38%),
      linear-gradient(145deg, rgba(20, 83, 45, 0.24), rgba(255, 255, 255, 0.03));
  }

  main:has(#monthlyExpenses):has(#targetFund) .emergency-summary-grid span {
    font-size: 0.56rem;
    line-height: 1.14;
  }

  main:has(#monthlyExpenses):has(#targetFund) .emergency-summary-grid strong {
    margin-top: 4px;
    font-size: 0.82rem;
    line-height: 1.12;
    overflow-wrap: anywhere;
  }

  main:has(#monthlyExpenses):has(#targetFund) .emergency-progress-wrap {
    padding: 10px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.48);
  }

  main:has(#monthlyExpenses):has(#targetFund) .emergency-progress-label {
    margin-bottom: 7px;
  }

  main:has(#monthlyExpenses):has(#targetFund) .emergency-progress-track {
    height: 9px;
  }

  main:has(#monthlyExpenses):has(#targetFund) .emergency-interpret-section {
    clear: left;
    margin: 4px 0 18px 28px;
    padding: 16px 18px;
    max-width: 760px;
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 18px;
    background:
      radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.16), transparent 34%),
      radial-gradient(circle at 100% 0%, rgba(56, 189, 248, 0.14), transparent 34%),
      linear-gradient(145deg, rgba(24, 30, 43, 0.88), rgba(15, 23, 42, 0.74));
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.18);
  }

  main:has(#monthlyExpenses):has(#targetFund) .emergency-interpret-section h2 {
    margin: 0 0 8px;
    color: #86efac;
    font-size: 1.08rem;
    line-height: 1.2;
  }

  main:has(#monthlyExpenses):has(#targetFund) .emergency-interpret-section p {
    margin: 0 0 8px;
    color: #cbd5e1;
    font-size: 0.86rem;
    line-height: 1.45;
  }

  main:has(#monthlyExpenses):has(#targetFund) .emergency-interpret-section p:last-child {
    margin-bottom: 0;
  }

  main:has(#monthlyExpenses):has(#targetFund) > .seo-content {
    margin: 0;
    min-height: 590px;
    padding: 0;
    border-top: 0;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 22px;
    background:
      radial-gradient(circle at 10% 0%, rgba(34, 197, 94, 0.1), transparent 32%),
      radial-gradient(circle at 90% 4%, rgba(56, 189, 248, 0.08), transparent 30%),
      linear-gradient(180deg, rgba(6, 12, 24, 0.98), rgba(15, 23, 42, 0.96));
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
    overflow: visible;
  }

  main:has(#monthlyExpenses):has(#targetFund) > .seo-content .container {
    max-width: none;
    padding: 40px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: linear-gradient(145deg, rgba(30, 35, 50, 0.9), rgba(20, 25, 35, 0.9));
    box-sizing: border-box;
  }

  main:has(#monthlyExpenses):has(#targetFund) > .seo-content h2 {
    margin: 24px 0 10px;
    font-size: 1.28rem;
    line-height: 1.2;
  }

  main:has(#monthlyExpenses):has(#targetFund) > .seo-content h2:first-child {
    margin-top: 0;
  }

  main:has(#monthlyExpenses):has(#targetFund) .emergency-clear-heading {
    clear: left;
    padding-top: 8px;
  }

  main:has(#monthlyExpenses):has(#targetFund) > .seo-content h3 {
    margin: 18px 0 8px;
    font-size: 1rem;
  }

  main:has(#monthlyExpenses):has(#targetFund) > .seo-content p,
  main:has(#monthlyExpenses):has(#targetFund) > .seo-content li {
    font-size: 0.92rem;
    line-height: 1.48;
  }

  main:has(#monthlyExpenses):has(#targetFund) > .seo-content ul,
  main:has(#monthlyExpenses):has(#targetFund) > .seo-content ol {
    margin: 6px 0 12px 20px;
  }

  main:has(#monthlyExpenses):has(#targetFund) > .seo-content p {
    margin-bottom: 12px;
  }

  main:has(#monthlyExpenses):has(#targetFund) > .seo-content li {
    margin-bottom: 5px;
  }
}


/* ===== RENT VS BUY CALCULATOR ===== */
.rent-buy-page {
  max-width: 1400px;
}

.rent-buy-shell {
  display: grid;
  grid-template-columns: minmax(300px, 0.7fr) minmax(0, 1.3fr);
  gap: 14px;
  align-items: stretch;
}

.rent-buy-box {
  grid-template-columns: minmax(0, 0.98fr) minmax(360px, 1.02fr);
  gap: 22px;
  align-items: start;
}

.rent-buy-input-panel,
.rent-buy-results-panel {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(30, 35, 50, 0.9), rgba(20, 25, 35, 0.9));
}

.rent-buy-input-panel,
.rent-buy-results-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rent-buy-input-panel h2,
.rent-buy-result-grid h2,
.rent-buy-chart-card h2 {
  color: #fff;
  font-size: 1rem;
  line-height: 1.25;
  margin: 0;
}

.rent-buy-input-card {
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.rent-buy-input-card--buy {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.09), rgba(255, 255, 255, 0.035));
}

.rent-buy-input-card--rent {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.08), rgba(255, 255, 255, 0.035));
}

.rent-buy-input-card--time {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(255, 255, 255, 0.035));
}

.rent-buy-card-head,
.rent-buy-result-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}

.rent-buy-card-head span,
.rent-buy-result-head span {
  color: #9ca3af;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.rent-buy-input-card--time p,
.rent-buy-result-grid p {
  color: #9ca3af;
  font-size: 0.72rem;
  line-height: 1.28;
  margin: 5px 0 0;
}

.rent-buy-control {
  margin-bottom: 9px;
}

.rent-buy-mobile-row {
  display: block;
}

.rent-buy-control label,
.rent-buy-control strong {
  display: block;
}

.rent-buy-control label {
  color: #9ca3af;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.rent-buy-input-card .debt-field span {
  color: #9ca3af;
}

.rent-buy-control strong {
  color: #fff;
  font-size: 1.08rem;
  line-height: 1.15;
  margin: 3px 0 5px;
}

.rent-buy-control #homePriceValue,
.rent-buy-control #rentValue,
.rent-buy-down-value #downPaymentValue {
  display: none;
}

.rent-buy-control:has(#downPaymentPct) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 8px;
  align-items: center;
}

.rent-buy-control:has(#downPaymentPct) label {
  min-width: 0;
}

.rent-buy-control:has(#downPaymentPct) .rent-buy-down-value {
  margin: 0;
  min-height: 0;
}

.rent-buy-control:has(#downPaymentPct) > input#downPayment {
  grid-column: 1 / -1;
}

.rent-buy-down-value {
  display: flex !important;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.rent-buy-pct-wrap {
  display: inline-flex;
  align-items: center;
  margin-left: auto;
  color: #bbf7d0;
  font-size: 0.82rem;
  font-weight: 600;
}

.rent-buy-pct-wrap input {
  width: 58px;
  border: 1px solid rgba(34, 197, 94, 0.28);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.72);
  color: #bbf7d0;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 4px 3px 4px 6px;
}

.rent-buy-pct-wrap input:focus {
  outline: none;
  border-color: rgba(34, 197, 94, 0.72);
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.14);
}

.rent-buy-control input[type="range"] {
  width: 100%;
  accent-color: #22c55e;
}

.rent-buy-control input[type="number"],
.rent-buy-control input[data-currency-textbox="1"],
.rent-buy-input-card .debt-field input {
  width: 100%;
  min-height: 34px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.82);
  color: #fff;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.2;
  padding: 7px 9px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.rent-buy-control input[type="number"]:focus,
.rent-buy-control input[data-currency-textbox="1"]:focus,
.rent-buy-input-card .debt-field input:focus {
  border-color: rgba(34, 197, 94, 0.68);
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.13);
}

.rent-buy-control div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: #6b7280;
  font-size: 0.68rem;
  margin-top: 3px;
}

.rent-buy-inline-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.rent-buy-inline-controls--single {
  grid-template-columns: 1fr;
  margin-top: 12px;
}

.rent-buy-winner {
  padding: 10px 12px;
  margin-bottom: 0;
  border: 1px solid rgba(34, 197, 94, 0.24);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(59, 130, 246, 0.08));
}

.rent-buy-winner span,
.rent-buy-result-grid span {
  display: block;
  color: #9ca3af;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.rent-buy-winner strong {
  display: block;
  color: #fff;
  font-size: clamp(1.18rem, 2.4vw, 1.72rem);
  line-height: 1.02;
  margin-top: 4px;
}

.rent-buy-winner p {
  color: #bbf7d0;
  font-size: 0.78rem;
  margin: 4px 0 0;
}

.rent-buy-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 0;
}

.rent-buy-result-grid article,
.rent-buy-chart-card {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.rent-buy-result-grid article {
  position: relative;
  overflow: hidden;
}

.rent-buy-result-grid article::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
}

.rent-buy-result-grid article.is-winner {
  border-color: rgba(34, 197, 94, 0.28);
  background: linear-gradient(145deg, rgba(34, 197, 94, 0.09), rgba(255, 255, 255, 0.04));
}

.rent-buy-result-grid article.is-winner::before {
  background: linear-gradient(90deg, #22c55e, #38bdf8);
}

.rent-buy-result-head b {
  border-radius: 999px;
  padding: 5px 8px;
  background: rgba(255, 255, 255, 0.075);
  color: #d1d5db;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.rent-buy-result-grid article.is-winner .rent-buy-result-head b {
  background: rgba(34, 197, 94, 0.16);
  color: #bbf7d0;
}

.rent-buy-result-grid article > span {
  margin-top: 10px;
}

.rent-buy-result-grid strong {
  display: block;
  color: #fff;
  font-size: 1.08rem;
  line-height: 1.2;
  margin: 5px 0 10px;
}

.rent-buy-result-grid strong:last-child {
  margin-bottom: 0;
}

.rent-buy-mini-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 8px;
}

.rent-buy-mini-stats div {
  padding: 8px 7px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.36);
}

.rent-buy-mini-stats strong {
  font-size: 0.86rem;
  margin-bottom: 0;
}

.rent-buy-chart-card {
  height: 288px;
}

.rent-buy-chart-card canvas {
  width: 100% !important;
  height: 232px !important;
}

.rent-buy-timeline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
}

.rent-buy-timeline span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  color: #d1d5db;
  background: rgba(255, 255, 255, 0.06);
}

.rent-buy-timeline span.buy {
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.14);
}

.rent-buy-timeline span.rent {
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.14);
}

@media (max-width: 1024px) {
  .rent-buy-shell,
  .rent-buy-box {
    grid-template-columns: 1fr;
  }
}

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

  .rent-buy-input-panel,
  .rent-buy-results-panel {
    padding: 12px;
    border-radius: 16px;
  }

  .rent-buy-input-card {
    padding: 14px;
    border-radius: 14px;
  }

  .rent-buy-card-head,
  .rent-buy-result-head {
    gap: 10px;
    margin-bottom: 12px;
  }

  .rent-buy-card-head h2,
  .rent-buy-result-grid h2,
  .rent-buy-chart-card h2 {
    font-size: 0.95rem;
  }

  .rent-buy-control {
    margin-bottom: 12px;
  }

  .rent-buy-mobile-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    align-items: end;
  }

  .rent-buy-mobile-row .rent-buy-control,
  .rent-buy-mobile-row .debt-field {
    margin-bottom: 12px;
    min-width: 0;
  }

  .rent-buy-control strong {
    font-size: 1.25rem;
  }

  .rent-buy-inline-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .rent-buy-control input[type="number"],
  .rent-buy-control input[data-currency-textbox="1"],
  .rent-buy-input-card .debt-field input {
    min-height: 38px;
    padding: 8px 9px;
    border-radius: 9px;
    font-size: 0.86rem;
  }

  .rent-buy-input-card .debt-field span,
  .rent-buy-control label {
    font-size: 0.62rem;
    line-height: 1.15;
    letter-spacing: 0.055em;
  }

  .rent-buy-pct-wrap input {
    min-height: 34px;
    width: 70px;
  }

  .rent-buy-result-grid article,
  .rent-buy-chart-card {
    padding: 18px;
  }
}

.top-funds-section {
  margin-top: 40px;
  padding: 30px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.funds-title {
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 8px;
  text-align: center;
}

.funds-subtitle {
  font-size: 0.9rem;
  color: #9ca3af;
  text-align: center;
  margin-bottom: 24px;
}

.funds-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 24px;
}

.fund-tab {
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #9ca3af;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.fund-tab:hover {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
}

.fund-tab.active {
  background: rgba(34, 197, 94, 0.2);
  border-color: #22c55e;
  color: #22c55e;
}

.funds-table-container {
  overflow-x: auto;
}

.funds-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.funds-table th {
  text-align: left;
  padding: 14px 12px;
  color: #9ca3af;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
}

.funds-table td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #e5e7eb;
}

.funds-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.funds-table td.funds-loading {
  text-align: center;
  color: #9ca3af;
  padding: 28px 16px;
  font-size: 0.9rem;
}

.fund-name {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fund-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
}

.return-cell {
  font-weight: 600;
  white-space: nowrap;
}

.return-cell.positive {
  color: #4ade80;
}

.return-cell.negative {
  color: #f87171;
}

.risk-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.risk-moderate {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.risk-mod-high {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
}

.risk-high {
  background: rgba(249, 115, 22, 0.15);
  color: #f97316;
}

.risk-very-high {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.min-sip {
  color: #9ca3af;
  white-space: nowrap;
}

.funds-disclaimer {
  margin-top: 20px;
  padding: 16px;
  background: rgba(251, 191, 36, 0.08);
  border-radius: 10px;
  border-left: 4px solid #fbbf24;
}

.funds-disclaimer p {
  margin: 0;
  font-size: 0.85rem;
  color: #9ca3af;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .funds-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 10px;
  }
  .fund-tab {
    flex-shrink: 0;
    padding: 8px 14px;
    font-size: 0.8rem;
  }
  .funds-table {
    font-size: 0.8rem;
  }
  .funds-table th,
  .funds-table td {
    padding: 10px 8px;
  }
  .fund-name {
    min-width: 180px;
  }
}


/* ===== MOBILE POLISH OVERRIDES ===== */
@media (max-width: 768px) {
  body {
    background:
      radial-gradient(circle at 20% 0%, rgba(34, 197, 94, 0.11), transparent 34%),
      linear-gradient(135deg, #070b14 0%, #111827 100%);
  }

  .navbar {
    position: sticky;
    top: 0;
    padding: 8px 12px 10px;
    background: rgba(7, 11, 20, 0.94);
    border-bottom-color: rgba(148, 163, 184, 0.12);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  }

  .nav-links {
    padding-top: 4px;
  }

  .nav-links a {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.055);
  }

  .nav-links a.active {
    border-color: rgba(34, 197, 94, 0.28);
  }

  .hero-home {
    display: block;
    min-height: 0;
    padding: 34px 18px 26px;
    text-align: left;
    background:
      radial-gradient(circle at top right, rgba(34, 197, 94, 0.16), transparent 36%),
      linear-gradient(180deg, rgba(255, 255, 255, 0.026), rgba(255, 255, 255, 0));
  }

  .hero-content {
    max-width: none;
  }

  .hero-badge {
    margin-bottom: 14px;
    padding: 7px 11px;
    font-size: 0.72rem;
    font-weight: 800;
  }

  .hero-title {
    font-size: clamp(2rem, 10vw, 3rem);
    line-height: 1.03;
    margin-bottom: 14px;
  }

  .hero-desc {
    font-size: 0.98rem;
    line-height: 1.58;
    margin-bottom: 20px;
    max-width: 34rem;
  }

  .hero-buttons {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .hero-buttons .btn,
  .home-game-actions .btn,
  .featured-tools-header .btn,
  .rules-header .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
    padding: 12px 16px;
  }

  .stats-section {
    margin: 0 12px;
    padding: 18px;
    border-radius: 22px;
    background:
      linear-gradient(135deg, rgba(34, 197, 94, 0.09), rgba(59, 130, 246, 0.055)),
      rgba(255, 255, 255, 0.018);
    border: 1px solid rgba(255, 255, 255, 0.07);
  }

  .stats-intro {
    align-items: flex-start;
    text-align: left;
  }

  .stats-intro h2 {
    font-size: 1.08rem;
    max-width: none;
  }

  .stats-intro p {
    max-width: none;
  }

  .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .stat-item {
    padding: 9px 7px;
    text-align: center;
    border-radius: 13px;
  }

  .stat-number {
    font-size: 1.22rem;
  }

  .stat-suffix {
    font-size: 0.74rem;
  }

  .stat-label {
    font-size: 0.58rem;
  }

  .stats-engagement {
    gap: 12px;
  }

  .fof-card-wrapper,
  .mini-insight-card,
  .take-home-card,
  .compound-card,
  .invest-card,
  .rule-card,
  .featured-card,
  .canada-rate-card,
  .start-path-card {
    border-radius: 18px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.16);
  }

  .fof-card-wrapper,
  .mini-insight-card {
    padding: 16px;
  }

  .fof-header {
    text-align: left;
  }

  .fof-meta {
    justify-content: flex-start;
  }

  .fof-question {
    justify-content: flex-start;
    text-align: left;
  }

  .fof-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mini-insight-action {
    min-height: 0;
  }

  .mini-insight-controls {
    align-items: center;
  }

  .start-path,
  .home-game-feature {
    padding-left: 18px;
    padding-right: 18px;
  }

  .start-path {
    margin-top: 18px;
    padding-top: 30px;
    padding-bottom: 30px;
  }

  .start-path-header h2,
  .home-game-copy h2,
  .section-header h2,
  .rules-header h2,
  .featured-tools-header h2,
  .canada-rates-header h2 {
    font-size: 1.55rem;
    line-height: 1.16;
  }

  .start-path-grid {
    gap: 10px;
  }

  .start-path-card {
    display: grid;
    grid-template-columns: 36px 1fr;
    column-gap: 12px;
    padding: 15px;
  }

  .start-path-card > span {
    grid-row: span 2;
    width: 34px;
    height: 34px;
    font-size: 0.86rem;
  }

  .start-path-card h3,
  .start-path-card p {
    margin: 0;
  }

  .start-path-guide {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .why-invest,
  .compound-quiz-wrapper,
  .rules-section,
  .featured-tools,
  .canada-rates-section {
    padding: 42px 18px;
  }

  .compound-quiz-wrapper {
    gap: 16px;
  }

  .compound-card,
  .take-home-card {
    padding: 18px;
  }

  .take-home-header h2,
  .compound-content h2 {
    font-size: 1.28rem;
  }

  .take-home-main-result strong {
    font-size: 1.45rem;
  }

  .take-home-split,
  .take-home-paychecks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .take-home-breakdown {
    grid-template-columns: 1fr;
  }

  .compound-controls {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .timeline-item {
    grid-template-columns: 54px 1fr;
    gap: 8px 10px;
    text-align: left;
  }

  .timeline-bar {
    height: 18px;
  }

  .timeline-amounts {
    grid-column: 2;
    text-align: left;
    flex-direction: row;
    justify-content: space-between;
    gap: 8px;
  }

  .compound-cta .btn {
    width: 100%;
    text-align: center;
  }

  .section-header {
    margin-bottom: 26px;
    text-align: left;
  }

  .section-header p {
    margin-left: 0;
    margin-right: 0;
  }

  .invest-cards,
  .rules-grid,
  .featured-grid,
  .canada-rates-grid {
    gap: 12px;
  }

  .invest-card,
  .rule-card,
  .featured-card {
    padding: 18px;
    min-height: 0;
  }

  .invest-comparison div {
    grid-template-columns: 54px 82px 1fr;
  }

  .rule-top {
    margin-bottom: 14px;
  }

  .rule-number {
    font-size: 1.55rem;
  }

  .featured-tools-header,
  .rules-header,
  .canada-rates-header {
    gap: 14px;
    margin-bottom: 18px;
  }

  .featured-card p {
    max-width: none;
  }

  .featured-card-meta {
    margin-top: 16px;
  }

  .featured-arrow {
    opacity: 1;
    transform: none;
    top: 18px;
    right: 18px;
  }

  .canada-rates-status {
    padding: 12px 14px;
    border-radius: 14px;
  }

  .canada-rate-card {
    padding: 16px;
  }

  .canada-rate-card strong {
    font-size: 1.65rem;
  }
}

@media (max-width: 420px) {
  .hero-home,
  .start-path,
  .home-game-feature,
  .why-invest,
  .compound-quiz-wrapper,
  .rules-section,
  .featured-tools,
  .canada-rates-section {
    padding-left: 14px;
    padding-right: 14px;
  }

  .stats-section {
    margin-left: 10px;
    margin-right: 10px;
    padding: 14px;
  }

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

  .stat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-align: left;
    padding: 10px 12px;
  }

  .stat-value {
    margin: 0;
  }

  .stat-label {
    font-size: 0.68rem;
  }

  .take-home-split,
  .take-home-paychecks,
  .fof-buttons {
    grid-template-columns: 1fr;
  }

  .timeline-amounts {
    flex-direction: column;
  }
}


/* ===== MOBILE PAGE POLISH OVERRIDES ===== */
@media (max-width: 768px) {
  main:has(> .tools-hub) > .hero,
  .blogs-page .hero,
  .learn-page .hero,
  .about-page .hero,
  main:has(> .calculator-container) > .hero {
    margin: 10px 12px 0;
    padding: 20px 14px 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 24px;
    background:
      linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(240, 249, 255, 0.88)),
      radial-gradient(circle at top right, rgba(20, 184, 166, 0.16), transparent 34%);
    box-shadow: 0 22px 54px rgba(15, 23, 42, 0.1);
    text-align: left;
  }

  main:has(> .tools-hub) > .hero h1,
  .blogs-page .hero h1,
  .learn-page .hero h1,
  .about-page .hero h1,
  main:has(> .calculator-container) > .hero h1 {
    font-size: clamp(1.55rem, 7.5vw, 2.15rem);
    line-height: 1.03;
    margin-bottom: 7px;
  }

  main:has(> .tools-hub) > .hero p,
  .blogs-page .hero p,
  .learn-page .hero p,
  .about-page .hero p,
  main:has(> .calculator-container) > .hero p {
    margin-left: 0;
    margin-right: 0;
    font-size: 0.8rem;
    line-height: 1.35;
  }

  .tools-hero-stats,
  .blogs-hero-stats,
  .learn-hero-stats,
  .about-hero-stats {
    grid-template-columns: 1fr;
    gap: 7px;
    margin-top: 10px;
  }

  .tools-hero-stats div,
  .blogs-hero-stats div,
  .learn-hero-stats div,
  .about-hero-stats div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 0;
    padding: 8px 10px;
    text-align: left;
  }

  .tools-hub,
  .blogs-wrap,
  .learn-content,
  .about-page main > section:not(.hero),
  .calculator-container,
  .seo-content {
    padding-left: 14px;
    padding-right: 14px;
  }

  .tools-hub-intro,
  .blogs-intro,
  .learn-intro {
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
  }

  .tools-hub-intro,
  .learn-intro {
    grid-template-columns: 1fr;
  }

  .tools-hub-intro h2,
  .blogs-intro h2,
  .learn-intro h2 {
    font-size: 1.55rem;
    line-height: 1.16;
  }

  .tools-hub-chips,
  .blogs-topic-chips,
  .learn-topic-chips {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    margin-left: -4px;
    margin-right: -4px;
    padding: 2px 4px 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .tools-hub-chips::-webkit-scrollbar,
  .blogs-topic-chips::-webkit-scrollbar,
  .learn-topic-chips::-webkit-scrollbar {
    display: none;
  }

  .tools-hub-chips span,
  .blog-filter-btn,
  .learn-filter-btn,
  .learn-random-btn {
    flex: 0 0 auto;
    min-height: 40px;
  }

  .tools-layout,
  .tools-hub .tools-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .tools-sidebar {
    position: sticky;
    top: 74px;
    z-index: 10;
    margin-inline: -14px;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
  }

  .tools-sidebar-nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .tools-sidebar-link {
    flex: 0 0 auto;
    border-radius: 999px;
    white-space: nowrap;
  }

  .tools-main,
  .tools-hub .tools-main {
    gap: 20px;
  }

  .tools-hub .tools-category {
    padding: 18px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
  }

  .tools-category-title {
    font-size: 1.4rem;
  }

  .grid,
  .grid.grid-3,
  .tools-hub .grid.grid-3,
  .blogs-grid,
  .article-grid,
  .tips-grid,
  .about-values-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .card,
  .tools-hub .card,
  .blog-card,
  .article-card,
  .tip-card,
  .about-value-card {
    border-radius: 20px;
    padding: 14px;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
  }

  .blogs-page .blog-card {
    padding: 14px 12px;
  }

  .tools-card-meta,
  .blog-card-meta,
  .about-card-meta {
    gap: 6px;
  }

  .tools-card-meta span,
  .blog-card-meta span,
  .about-card-meta span {
    font-size: 0.68rem;
  }

  .blog-meta-row {
    gap: 6px;
    font-size: 0.72rem;
  }

  .blogs-page .blog-meta-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .blogs-page .blog-meta-row::-webkit-scrollbar {
    display: none;
  }

  .blogs-page .blog-chip {
    padding: 3px 7px;
    font-size: 0.64rem;
  }

  .blogs-page .blog-meta-row > span {
    font-size: 0.7rem;
    white-space: nowrap;
  }

  .blogs-page .blog-meta-row > span:nth-child(3) {
    margin-left: auto;
    margin-right: auto;
  }

  .blog-card h2,
  .blog-card h3,
  .article-card h3 {
    font-size: 1.12rem;
    line-height: 1.22;
  }

  .article-card {
    min-height: 0;
  }

  .article-card.is-expanded {
    grid-column: auto;
  }

  .article-content {
    padding-top: 14px;
  }

  .learn-random-btn--hero {
    width: 100%;
    justify-content: center;
    margin-top: 18px;
  }

  .learn-picker-dialog {
    width: min(94vw, 520px);
    max-height: 86vh;
    padding: 22px;
    border-radius: 24px;
    overflow-y: auto;
  }

  .calculator-container {
    margin-top: 18px;
  }

  .calculator-box {
    padding: 18px;
    border-radius: 22px;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.09);
  }

  .inputs,
  .results,
  .chart-box,
  .calculator-actions,
  .calc-methodology-grid,
  .calculator-page-grid {
    grid-template-columns: 1fr;
  }

  .inputs input,
  .inputs select,
  .inputs button,
  .calculator-box input,
  .calculator-box select,
  .calculator-box button {
    min-height: 44px;
  }

  .seo-content .container,
  .calculator-container.debt-payoff-page + .seo-content .container,
  .calculator-container.emergency-fund-page + .seo-content .container,
  .calculator-container.rent-buy-page + .seo-content .container {
    max-width: none;
    padding: 18px;
    border-radius: 18px;
  }

  .seo-content h2 {
    font-size: 1.45rem;
    line-height: 1.18;
  }

  .seo-content p,
  .seo-content li,
  .blog-article-body p,
  .blog-article-body li {
    font-size: 0.98rem;
    line-height: 1.72;
  }

  .blog-article {
    padding-left: 14px;
    padding-right: 14px;
  }

  .blog-article-body {
    padding: 20px;
    border-radius: 22px;
  }
}

@media (max-width: 420px) {
  main:has(> .tools-hub) > .hero,
  .blogs-page .hero,
  .learn-page .hero,
  .about-page .hero,
  main:has(> .calculator-container) > .hero {
    margin-left: 10px;
    margin-right: 10px;
    padding: 18px 12px 14px;
    border-radius: 22px;
  }

  .tools-hub,
  .blogs-wrap,
  .learn-content,
  .calculator-container,
  .seo-content,
  .blog-article {
    padding-left: 10px;
    padding-right: 10px;
  }

  .tools-hub-intro,
  .blogs-intro,
  .learn-intro,
  .tools-hub .tools-category,
  .calculator-box,
  .blog-article-body {
    padding: 16px;
    border-radius: 20px;
  }

  .tools-sidebar {
    margin-inline: -10px;
  }

  .learn-picker-dialog {
    padding: 18px;
  }
}


/* ===== MOBILE TIGHTENING PASS ===== */
@media (max-width: 768px) {
  body {
    background: linear-gradient(135deg, #0f1117 0%, #1a1d29 100%);
  }

  .locale-selectors {
    flex: 0 0 auto;
    max-width: none;
    gap: 6px;
  }

  .country-selector-btn,
  .currency-selector-btn {
    min-height: 34px;
    padding: 6px 8px;
    gap: 4px;
    border-radius: 999px;
  }

  .country-selector-text,
  .currency-selector-text {
    max-width: 54px;
    overflow: hidden;
    white-space: nowrap;
  }

  .country-chevron,
  .currency-chevron {
    width: 12px;
    height: 12px;
  }

  .country-dropdown,
  .currency-dropdown {
    right: 0;
    left: auto;
    width: min(88vw, 280px);
  }

  .start-path {
    padding-top: 22px;
    padding-bottom: 22px;
  }

  .start-path-header {
    margin-bottom: 14px;
  }

  .start-path-header h2 {
    font-size: 1.35rem;
  }

  .start-path-header p {
    font-size: 0.86rem;
    line-height: 1.52;
  }

  .start-path-grid {
    gap: 8px;
  }

  .start-path-card {
    grid-template-columns: 30px 1fr;
    column-gap: 10px;
    padding: 12px;
    border-radius: 14px;
  }

  .start-path-card > span {
    width: 28px;
    height: 28px;
    font-size: 0.78rem;
  }

  .start-path-card h3 {
    font-size: 0.98rem;
    line-height: 1.2;
  }

  .start-path-card p {
    font-size: 0.76rem;
    line-height: 1.38;
    margin-top: 3px;
  }

  .home-game-preview {
    display: none;
  }

  .home-game-feature {
    grid-template-columns: 1fr;
    padding-top: 0;
    padding-bottom: 24px;
  }

  .home-game-copy {
    padding: 18px;
  }

  .take-home-card {
    gap: 8px;
    padding: 15px;
  }

  .take-home-header {
    gap: 4px;
  }

  .take-home-header h2 {
    font-size: 1.12rem;
  }

  .take-home-header p {
    font-size: 0.72rem;
    line-height: 1.32;
  }

  .take-home-form,
  .take-home-card[data-pay-country="US"] .take-home-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .take-home-card[data-pay-country="US"] .take-home-field:first-child {
    grid-column: 1 / -1;
  }

  .take-home-field {
    gap: 4px;
  }

  .take-home-money-input,
  .take-home-field select {
    min-height: 36px;
    border-radius: 9px;
  }

  .take-home-results {
    gap: 7px;
  }

  .take-home-main-result {
    padding: 8px 10px;
  }

  .take-home-main-result strong {
    font-size: 1.22rem;
  }

  .take-home-paychecks,
  .take-home-split,
  .take-home-breakdown {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .take-home-paychecks div,
  .take-home-split div {
    padding: 7px 8px;
  }

  .take-home-breakdown div {
    padding: 4px 0;
  }

  .take-home-note {
    display: none;
  }

  .why-invest,
  .compound-quiz-wrapper,
  .rules-section,
  .featured-tools,
  .canada-rates-section {
    width: calc(100% - 24px);
    max-width: none;
    margin-left: auto;
    margin-right: auto;
    padding-left: 14px;
    padding-right: 14px;
    box-sizing: border-box;
  }

  .canada-rates-section,
  .rules-section,
  .featured-tools {
    padding-top: 28px;
    padding-bottom: 28px;
  }

  .canada-rates-header,
  .rules-header,
  .featured-tools-header {
    gap: 10px;
    margin-bottom: 14px;
  }

  .canada-rates-header h2,
  .rules-header h2,
  .featured-tools-header h2 {
    font-size: 1.38rem;
  }

  .canada-rates-header p,
  .rules-header p,
  .featured-tools-header p {
    font-size: 0.86rem;
    line-height: 1.48;
  }

  main:has(> .tools-hub) > .hero,
  .blogs-page .hero,
  .learn-page .hero,
  .about-page .hero,
  main:has(> .calculator-container) > .hero {
    background: transparent;
    border: 0;
    box-shadow: none;
    margin: 0 auto;
    border-radius: 0;
  }

  main:has(> .tools-hub) > .hero::before,
  .blogs-page .hero::before,
  .learn-page .hero::before,
  .about-page .hero::before {
    inset: 12px 12px 0;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.08), rgba(59, 130, 246, 0.04));
    border: 1px solid rgba(255, 255, 255, 0.045);
  }

  .tools-hub-intro,
  .blogs-intro,
  .learn-intro {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.07), rgba(59, 130, 246, 0.035));
    border-color: rgba(148, 163, 184, 0.15);
    box-shadow: none;
  }

  .tools-hub .tools-category,
  .tools-hub .card,
  .blog-card,
  .article-card,
  .tip-card,
  .about-value-card {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.08), rgba(59, 130, 246, 0.04));
    border-color: rgba(255, 255, 255, 0.075);
    box-shadow: none;
  }

  .tools-hub .tools-sidebar {
    top: 0;
    z-index: 60;
  }
}

@media (max-width: 420px) {
  .locale-selectors {
    gap: 4px;
  }

  .country-selector-text {
    max-width: 40px;
  }

  .currency-selector-text {
    max-width: 48px;
  }

  .country-selector-btn,
  .currency-selector-btn {
    padding: 6px 7px;
  }

  .start-path-card {
    align-items: center;
  }

  .take-home-split,
  .take-home-paychecks,
  .take-home-breakdown {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .take-home-breakdown {
    gap: 4px 8px;
  }
}


/* ===== MOBILE REGRESSION FIXES ===== */
@media (max-width: 768px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  main {
    max-width: 100%;
    overflow-x: hidden;
  }

  .hero-home,
  .stats-section,
  .start-path,
  .home-game-feature,
  .why-invest,
  .compound-quiz-wrapper,
  .canada-rates-section,
  .rules-section,
  .featured-tools,
  .tools-hub,
  .blogs-wrap,
  .learn-content,
  .about-wrap,
  .trust-wrap,
  .contact-wrap,
  .calculator-container,
  .seo-content,
  .blog-article,
  main .container {
    width: min(100% - 24px, 1500px);
    max-width: none;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0;
    padding-right: 0;
    box-sizing: border-box;
  }

  .hero-home {
    padding-top: 30px;
    padding-bottom: 24px;
    overflow: hidden;
  }

  .hero-content,
  .hero-title,
  .hero-desc {
    max-width: 100%;
    min-width: 0;
  }

  .hero-title {
    font-size: clamp(2rem, 11vw, 2.7rem);
    overflow-wrap: anywhere;
  }

  .hero-title .gradient-text {
    display: block;
    max-width: 100%;
  }

  .hero-desc {
    font-size: 0.94rem;
  }

  .stats-section {
    padding: 14px;
    overflow: hidden;
  }

  .stats-rail,
  .stats-engagement,
  .stats-intro,
  .stats-intro h2,
  .stats-intro p {
    max-width: 100%;
    min-width: 0;
  }

  .stats-intro h2,
  .stats-intro p,
  .section-header h2,
  .canada-rates-header h2,
  .rules-header h2,
  .featured-tools-header h2,
  .learn-intro h2,
  .blogs-intro h2 {
    overflow-wrap: anywhere;
  }

  .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
  }

  .stat-item {
    min-width: 0;
    padding: 8px 5px;
  }

  .stat-value {
    min-width: 0;
  }

  .stat-number {
    font-size: 1.08rem;
  }

  .stat-label {
    font-size: 0.52rem;
    overflow-wrap: anywhere;
  }

  .start-path {
    padding-top: 22px;
    padding-bottom: 22px;
  }

  .start-path-card {
    grid-template-columns: 30px minmax(0, 1fr);
    padding: 12px;
    min-height: 0;
  }

  .start-path-card p {
    display: block;
    color: #9ca3af;
    font-size: 0.75rem;
    line-height: 1.42;
    margin: 4px 0 0;
  }

  .home-game-preview {
    display: none !important;
  }

  .home-game-feature {
    padding-bottom: 22px;
  }

  .home-game-copy {
    width: 100%;
    padding: 18px;
    box-sizing: border-box;
  }

  .compound-card {
    padding: 15px;
    gap: 8px;
  }

  .compound-content h2 {
    font-size: 1.14rem;
    margin-bottom: 5px;
  }

  .compound-content > p {
    font-size: 0.78rem;
    line-height: 1.35;
    margin-bottom: 10px;
  }

  .compound-controls {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .compound-controls label {
    gap: 4px;
  }

  .compound-controls span {
    font-size: 0.64rem;
  }

  .compound-controls input {
    min-height: 34px;
    padding: 7px 8px;
    font-size: 0.82rem;
  }

  .compound-result {
    margin-top: 8px;
  }

  .compound-result strong {
    font-size: 1.28rem;
  }

  .timeline-item {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 6px 8px;
    padding: 7px 0;
  }

  .timeline-year {
    font-size: 0.7rem;
  }

  .timeline-bar {
    height: 14px;
  }

  .timeline-amounts {
    gap: 6px;
  }

  .timeline-amounts span,
  .timeline-amounts strong {
    font-size: 0.68rem;
  }

  .compound-cta .btn {
    padding: 9px 12px;
    font-size: 0.8rem;
  }

  .canada-rates-section,
  .rules-section,
  .featured-tools {
    padding-top: 26px;
    padding-bottom: 26px;
  }

  .canada-rates-header,
  .rules-header,
  .featured-tools-header,
  .section-header,
  .tools-hub-intro,
  .blogs-intro,
  .learn-intro {
    width: 100%;
    box-sizing: border-box;
  }

  .canada-rates-header,
  .rules-header,
  .featured-tools-header {
    padding-left: 0;
    padding-right: 0;
  }

  .canada-rates-grid,
  .rules-grid,
  .featured-grid,
  .invest-cards,
  .blogs-grid,
  .article-grid,
  .tools-hub .grid,
  .about-values-grid,
  .trust-grid {
    width: 100%;
    box-sizing: border-box;
  }

  .canada-rate-card,
  .rule-card,
  .featured-card,
  .invest-card,
  .blog-card,
  .article-card,
  .tools-hub .card,
  .about-value-card,
  .trust-card {
    width: 100%;
    box-sizing: border-box;
  }

  .learn-hero-stats,
  .blogs-hero-stats,
  .tools-hero-stats,
  .about-hero-stats {
    width: 100%;
    box-sizing: border-box;
  }

  .learn-hero-stats div,
  .blogs-hero-stats div,
  .tools-hero-stats div,
  .about-hero-stats div {
    padding: 11px 12px;
  }

  .learn-intro,
  .blogs-intro,
  .tools-hub-intro {
    padding: 16px;
    overflow: hidden;
  }

  .learn-topic-chips,
  .blogs-topic-chips,
  .tools-hub-chips {
    max-width: 100%;
  }

  .tools-hub .tools-sidebar {
    top: 0;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    overflow: hidden;
  }

  .nav-links {
    gap: 3px;
  }

  .nav-links a {
    padding: 7px 9px;
    font-size: 0.76rem;
  }

  .blogs-topic-chips,
  .learn-topic-chips,
  .tools-hub-chips {
    flex-wrap: wrap;
    overflow: visible;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
  }

  .blog-filter-btn,
  .learn-filter-btn,
  .learn-random-btn,
  .tools-hub-chips span {
    white-space: normal;
  }
}

@media (max-width: 420px) {
  .hero-home,
  .stats-section,
  .start-path,
  .home-game-feature,
  .why-invest,
  .compound-quiz-wrapper,
  .canada-rates-section,
  .rules-section,
  .featured-tools,
  .tools-hub,
  .blogs-wrap,
  .learn-content,
  .about-wrap,
  .trust-wrap,
  .contact-wrap,
  .calculator-container,
  .seo-content,
  .blog-article,
  main .container {
    width: calc(100% - 20px);
  }

  .compound-controls {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .compound-controls input {
    font-size: 0.76rem;
    padding-left: 6px;
    padding-right: 6px;
  }

  .hero-title {
    font-size: clamp(1.9rem, 10.2vw, 2.35rem);
  }

  .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  body:not(.course-guide-page) main > .hero:has(+ .blog-article) {
    width: calc(100% - 24px);
    margin-top: 8px;
    padding: 24px 18px 20px;
    border-radius: 22px;
  }

  body:not(.course-guide-page) main > .hero:has(+ .blog-article)::after {
    position: static;
    display: inline-flex;
    margin-bottom: 12px;
    font-size: 0.56rem;
    transform: none;
  }

  body:not(.course-guide-page) main > .hero:has(+ .blog-article) h1 {
    font-size: clamp(1.7rem, 8vw, 2.25rem);
    line-height: 1.08;
  }

  body:not(.course-guide-page) main > .hero:has(+ .blog-article) p {
    font-size: 0.88rem;
    line-height: 1.48;
  }

  body:not(.course-guide-page) main > .hero + .blog-article {
    width: calc(100% - 24px);
    max-width: none;
    padding: 12px 0 34px;
  }

  body:not(.course-guide-page) main > .hero + .blog-article .blog-article-body {
    padding: 24px 20px;
    border-radius: 24px;
  }

  body:not(.course-guide-page) main > .hero + .blog-article .blog-meta-row {
    width: auto;
    margin-bottom: 14px;
    padding: 8px;
    border-radius: 14px;
  }

  body:not(.course-guide-page) main > .hero + .blog-article .blog-article-body > p:first-of-type {
    margin-bottom: 24px;
    padding: 18px 20px;
    border-radius: 12px;
    font-size: 1rem;
    line-height: 1.7;
  }

  body:not(.course-guide-page) main > .hero + .blog-article .blog-article-body h2 {
    margin-top: 32px;
    padding-bottom: 10px;
    font-size: 1.35rem;
  }

  body:not(.course-guide-page) main > .hero + .blog-article .blog-article-body p,
  body:not(.course-guide-page) main > .hero + .blog-article .blog-article-body li {
    font-size: 0.94rem;
    line-height: 1.68;
  }

  .seo-content {
    margin-top: 8px;
    padding-top: 18px;
    padding-bottom: 8px;
  }

  .contact-wrap,
  .about-wrap,
  .trust-wrap,
  main .container,
  .blog-article,
  .seo-content,
  .calculator-container {
    width: calc(100% - 24px);
    max-width: none;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0;
    padding-right: 0;
    box-sizing: border-box;
  }

  .contact-layout,
  .trust-grid,
  .about-mission-band,
  .about-values-grid,
  .about-principles {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .contact-card,
  .trust-card,
  .about-mission-band,
  .about-value-card,
  .about-principles div,
  .legal-doc,
  .blog-article-body {
    border-radius: 18px;
  }

  .contact-card,
  .trust-card,
  .about-mission-band,
  .about-value-card {
    padding: 18px;
  }

  .legal-doc {
    padding-top: 0;
  }
}

@media (max-width: 420px) {
  .contact-wrap,
  .about-wrap,
  .trust-wrap,
  main .container,
  .blog-article,
  .seo-content,
  .calculator-container {
    width: calc(100% - 20px);
  }
}


/* ===== MOBILE HOME SECTION FINISH ===== */
@media (max-width: 768px) {
  .fof-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px;
  }

  .fof-btn {
    min-height: 42px;
    padding: 9px 10px;
  }

  .invest-value-split {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px;
  }

  .invest-value-split div {
    min-width: 0;
    padding: 10px;
  }

  .invest-value-split strong {
    font-size: 1rem;
    overflow-wrap: anywhere;
  }

  .invest-growth-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 7px;
  }

  .invest-growth-steps span {
    min-width: 0;
    padding: 9px 6px;
    text-align: center;
  }

  .invest-growth-steps strong {
    font-size: 0.82rem;
    overflow-wrap: anywhere;
  }

  .why-invest {
    padding-bottom: 20px;
  }

  .invest-card:last-child {
    margin-bottom: 0;
  }

  .compound-quiz-wrapper {
    padding-top: 20px;
    padding-bottom: 20px;
  }

  .compound-card {
    margin-bottom: 0;
  }

  .canada-rates-section {
    padding-top: 20px;
  }

  .rules-section,
  .featured-tools,
  .canada-rates-section {
    padding-left: 14px;
    padding-right: 14px;
    overflow: hidden;
  }

  .rules-section::before,
  .featured-tools::before,
  .canada-rates-section::before {
    inset: 0;
    border-radius: 22px;
  }

  .rules-header,
  .featured-tools-header,
  .canada-rates-header,
  .rules-grid,
  .featured-grid,
  .canada-rates-grid {
    max-width: 100%;
  }

  .rule-card,
  .featured-card {
    min-width: 0;
  }

  .blogs-intro {
    gap: 14px;
  }

  .blogs-topic-chips {
    align-items: flex-start;
    gap: 8px;
  }

  .blog-filter-btn {
    flex: 0 1 auto;
    max-width: 100%;
    line-height: 1.15;
    padding: 8px 10px;
  }
}

@media (max-width: 420px) {
  .fof-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .fof-label {
    font-size: 0.82rem;
  }

  .invest-value-split {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .invest-growth-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .rules-section,
  .featured-tools,
  .canada-rates-section {
    padding-left: 12px;
    padding-right: 12px;
  }
}


/* ===== MOBILE COMPACT FINISH ===== */
@media (max-width: 768px) {
  .stats-grid .stat-number {
    font-size: 0.92rem;
  }

  .stats-grid .stat-suffix {
    font-size: 0.58rem;
  }

  .stats-grid .stat-label {
    font-size: 0.48rem;
    letter-spacing: 0.06em;
  }

  .home-game-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .home-game-actions .btn {
    width: auto;
    min-height: 38px;
    padding: 9px 10px;
    font-size: 0.76rem;
    line-height: 1.18;
  }

  .section-header {
    margin-bottom: 18px;
  }

  .section-header h2 {
    font-size: 1.34rem;
    line-height: 1.18;
    margin-bottom: 8px;
  }

  .section-header p {
    font-size: 0.88rem;
    line-height: 1.52;
  }

  .canada-rates-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .canada-rate-card {
    padding: 12px 10px;
    border-radius: 14px;
  }

  .canada-rate-card > span {
    font-size: 0.56rem;
    letter-spacing: 0.06em;
  }

  .canada-rate-card strong {
    font-size: 1.34rem;
    margin: 8px 0 6px;
  }

  .canada-rate-card p {
    font-size: 0.66rem;
    line-height: 1.35;
  }

  .tools-hero-stats div {
    align-items: center;
  }

  .tools-hero-stats div span {
    max-width: 58%;
    margin-top: 0;
    text-align: right;
    line-height: 1.25;
  }

  .tools-hero-stats div strong {
    flex: 0 0 auto;
    font-size: 0.98rem;
  }

  .tools-hub .tools-sidebar {
    position: sticky !important;
    top: var(--tools-sticky-offset, 74px) !important;
    overflow: visible;
    z-index: 75;
  }

  .tools-sidebar-link {
    padding: 6px 10px;
    font-size: 0.74rem;
  }

  .btn,
  .card .btn,
  .tools-hub .card .btn,
  .featured-tools-header .btn,
  .rules-header .btn {
    min-height: 36px;
    padding: 9px 12px;
    font-size: 0.76rem;
    line-height: 1.18;
    border-radius: 10px;
  }

  .tools-hub .card .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    box-shadow: none;
  }

  .hero-buttons .btn {
    min-height: 40px;
    padding: 10px 12px;
    font-size: 0.82rem;
  }
}

@media (max-width: 420px) {
  .home-game-actions .btn {
    font-size: 0.72rem;
    padding-left: 8px;
    padding-right: 8px;
  }

  .canada-rates-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* ===== MOBILE REQUESTED FINAL POLISH ===== */
@media (max-width: 768px) {
  .hero-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .hero-buttons .btn {
    width: auto;
    min-height: 38px;
    padding: 9px 8px;
    font-size: 0.76rem;
    line-height: 1.16;
  }

  .stat-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    column-gap: 5px;
    padding: 7px 6px;
  }

  .stat-value {
    margin: 0;
    gap: 1px;
    min-width: max-content;
  }

  .stats-grid .stat-number {
    font-size: 0.82rem;
  }

  .stats-grid .stat-suffix {
    font-size: 0.48rem;
  }

  .stats-grid .stat-label {
    font-size: 0.44rem;
    line-height: 1.05;
    text-align: left;
    letter-spacing: 0.055em;
  }

  .blogs-hero-stats div,
  .about-hero-stats div,
  .tools-hero-stats div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-align: left;
  }

  .blogs-hero-stats div span,
  .about-hero-stats div span,
  .tools-hero-stats div span {
    max-width: 58%;
    margin-top: 0;
    text-align: right;
    line-height: 1.25;
  }

  .blogs-hero-stats div strong,
  .about-hero-stats div strong,
  .tools-hero-stats div strong {
    flex: 0 0 auto;
    font-size: 0.98rem;
  }

  .home-game-feature {
    padding-top: 0;
    padding-bottom: 16px;
  }

  .home-game-copy {
    padding: 14px !important;
    border-radius: 16px !important;
  }

  .home-game-copy h2 {
    font-size: 1.18rem !important;
    margin: 6px 0 6px !important;
  }

  .home-game-copy p {
    font-size: 0.78rem !important;
    line-height: 1.42 !important;
  }

  .home-game-actions {
    margin-top: 12px !important;
  }

  .home-game-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    text-align: center;
  }

  .invest-card {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    padding: 18px;
    gap: 10px;
  }

  .invest-card .invest-icon {
    grid-column: 1;
    grid-row: 1;
    width: 34px;
    height: 34px;
    margin: 0;
  }

  .invest-card .invest-icon + .invest-card-label {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    align-items: center;
    min-height: 34px;
  }

  .invest-card h3,
  .invest-card .invest-comparison,
  .invest-card .invest-value-split,
  .invest-card .invest-growth-steps,
  .invest-card p {
    grid-column: 1 / -1;
  }

  .invest-card h3 {
    font-size: 1.06rem;
  }

  .invest-card p {
    font-size: 0.78rem;
    line-height: 1.45;
  }

  .rules-section {
    padding-top: 22px;
    padding-bottom: 22px;
  }

  .rules-grid {
    gap: 10px;
  }

  .rule-card {
    min-height: 0;
    padding: 16px;
    border-radius: 16px;
  }

  .rule-top {
    margin-bottom: 12px;
  }

  .rule-number {
    font-size: 1.45rem;
  }

  .rule-chip {
    padding: 5px 8px;
    font-size: 0.52rem;
  }

  .rule-card h3 {
    font-size: 1rem;
    margin-bottom: 8px;
  }

  .rule-card p {
    font-size: 0.78rem;
    line-height: 1.45;
    margin-bottom: 10px;
  }

  .rule-card strong {
    font-size: 0.72rem;
  }

  .tools-hub .tools-sidebar {
    position: sticky !important;
    top: 0 !important;
    z-index: 120;
    overflow: hidden;
    backdrop-filter: blur(16px);
  }

  .tools-hub .tools-main {
    margin-top: 14px;
  }
}

@media (max-width: 420px) {
  .hero-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-buttons .btn {
    font-size: 0.72rem;
    padding-left: 6px;
    padding-right: 6px;
  }
}


/* ===== MOBILE FINAL MICRO-TUNING ===== */
@media (max-width: 768px) {
  .logo img {
    height: 42px;
  }

  .locale-selectors {
    gap: 4px;
    max-width: calc(100% - 116px);
  }

  .country-selector-btn,
  .currency-selector-btn {
    min-height: 31px;
    padding: 5px 7px;
    font-size: 0.72rem;
    gap: 3px;
  }

  .locale-selectors .country-selector-btn,
  .locale-selectors .currency-selector-btn {
    min-height: 31px;
    padding: 5px 7px;
    font-size: 0.72rem;
    gap: 3px;
  }

  .currency-sym {
    display: none;
  }

  .country-chevron,
  .currency-chevron {
    width: 10px;
    height: 10px;
  }

  .stats-grid .stat-item:first-child .stat-number {
    font-size: 0.74rem;
  }

  .stats-grid .stat-item:first-child .stat-suffix {
    font-size: 0.42rem;
  }

  .stats-grid .stat-item:nth-child(2) {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .stats-grid .stat-item:nth-child(2) .stat-number {
    font-size: 0.94rem;
  }

  .stats-grid .stat-item:nth-child(2) .stat-suffix {
    font-size: 0.5rem;
  }

  .why-invest {
    padding-left: 14px;
    padding-right: 14px;
    overflow: hidden;
  }

  .why-invest::before {
    inset: 0;
    border-radius: 22px;
  }

  .rules-section {
    margin-bottom: 12px;
  }

  .featured-tools {
    margin-top: 12px;
  }
}

@media (max-width: 420px) {
  .logo img {
    height: 40px;
  }

  .country-selector-text {
    max-width: 34px;
  }

  .currency-selector-text {
    max-width: 40px;
  }
}


/* ===== MOBILE FINAL SPACING + STICKY FIX ===== */
@media (max-width: 768px) {
  .hero-buttons .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .stats-grid {
    grid-template-columns: 0.93fr 1.28fr 1.05fr;
  }

  .stats-grid .stat-item {
    min-width: 0;
  }

  .stats-grid .stat-item:nth-child(-n+2) .stat-value,
  .stats-grid .stat-item:nth-child(-n+2) .stat-label {
    white-space: nowrap;
  }

  .stats-grid .stat-number,
  .stats-grid .stat-item:first-child .stat-number,
  .stats-grid .stat-item:nth-child(2) .stat-number {
    font-size: 0.82rem;
  }

  .stats-grid .stat-suffix,
  .stats-grid .stat-item:first-child .stat-suffix,
  .stats-grid .stat-item:nth-child(2) .stat-suffix {
    font-size: 0.46rem;
  }

  .stats-grid .stat-label {
    font-size: 0.43rem;
  }

  .canada-rates-section {
    margin-bottom: 14px;
  }

  .rules-section {
    margin-top: 14px;
  }

  main:has(> .tools-hub) > .hero {
    padding-bottom: 14px;
  }

  .tools-hub {
    padding-top: 18px;
  }

  .tools-hub-intro {
    margin-bottom: 18px;
  }

  .tools-hub .tools-sidebar {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: var(--tools-sticky-offset, 72px) !important;
    z-index: 200;
    margin-top: 0;
    margin-bottom: 16px;
    background: rgba(11, 15, 25, 0.96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }

  .tools-hub .tools-main {
    margin-top: 0;
  }

  .tools-hub .tools-category {
    margin-top: 0;
    margin-bottom: 18px;
  }

  .tools-hub .tools-category:last-child {
    margin-bottom: 0;
  }
}

@media (max-width: 420px) {
  .stats-grid {
    grid-template-columns: 0.86fr 1.2fr 1fr;
  }
}


/* ===== MOBILE HEADER LOGO BALANCE ===== */
@media (max-width: 768px) {
  .navbar {
    padding-top: 5px;
    padding-bottom: 7px;
    row-gap: 3px;
  }

  .logo {
    line-height: 0;
  }

  .logo img {
    height: 46px;
    margin: 0;
  }

  .locale-selectors {
    max-width: calc(100% - 126px);
  }
}

@media (max-width: 420px) {
  .logo img {
    height: 38px;
  }

  .locale-selectors {
    max-width: calc(100% - 118px);
  }
}


/* ===== MOBILE HEADER SINGLE-ROW MENU ===== */
@media (max-width: 768px) {
  .navbar {
    flex-wrap: nowrap;
    align-items: center;
    column-gap: 6px;
    row-gap: 0;
    padding: 5px 8px 6px;
  }

  .logo {
    order: 1;
    flex: 0 0 auto;
  }

  .logo img {
    height: 38px;
  }

  .nav-links {
    order: 2;
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 0 2px 1px;
    gap: 3px;
    justify-content: flex-start;
  }

  .nav-links a {
    padding: 6px 8px;
    font-size: 0.72rem;
    border-radius: 8px;
    line-height: 1;
  }

  .locale-selectors {
    order: 3;
    flex: 0 0 50px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    max-width: 50px;
    margin-left: 0;
    padding: 2px;
    border-radius: 10px;
  }

  .locale-selectors .country-selector,
  .locale-selectors .currency-selector {
    width: 100%;
  }

  .locale-selectors .country-selector-btn,
  .locale-selectors .currency-selector-btn {
    width: 100%;
    min-height: 22px;
    justify-content: center;
    gap: 2px;
    padding: 3px 4px;
    border-radius: 8px;
    font-size: 0.58rem;
    line-height: 1;
  }

  .locale-selectors .currency-selector-btn {
    border-left: 0;
  }

  .country-selector-text,
  .currency-selector-text {
    max-width: 34px;
    gap: 2px;
  }

  .country-chevron,
  .currency-chevron {
    width: 8px;
    height: 8px;
  }
}

@media (max-width: 420px) {
  .navbar {
    column-gap: 5px;
    padding-left: 7px;
    padding-right: 7px;
  }

  .logo img {
    height: 36px;
  }

  .nav-links a {
    padding: 6px 7px;
    font-size: 0.69rem;
  }

  .locale-selectors {
    flex-basis: 48px;
    max-width: 48px;
  }
}


/* ===== MOBILE TOOLS HERO STATS ROW ===== */
@media (max-width: 768px) {
  main:has(> .tools-hub) .tools-hero-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  main:has(> .tools-hub) .tools-hero-stats div {
    min-width: 0;
    padding: 8px 7px;
    gap: 6px;
    border-radius: 11px;
  }

  main:has(> .tools-hub) .tools-hero-stats div:nth-child(3) {
    grid-column: 1 / -1;
  }

  main:has(> .tools-hub) .tools-hero-stats div:nth-child(3) span {
    max-width: 76%;
    text-align: left;
    white-space: nowrap;
  }

  main:has(> .tools-hub) .tools-hero-stats div strong {
    font-size: 0.78rem;
    white-space: nowrap;
  }

  main:has(> .tools-hub) .tools-hero-stats div span {
    max-width: 62%;
    font-size: 0.53rem;
    line-height: 1.18;
  }
}

@media (max-width: 420px) {
  main:has(> .tools-hub) .tools-hero-stats div:nth-child(3) {
    gap: 6px;
  }

  main:has(> .tools-hub) .tools-hero-stats div:nth-child(3) span {
    max-width: 78%;
    font-size: 0.62rem;
  }
}


/* ===== MOBILE TOOLS CATEGORY BAR COMPACT ===== */
@media (max-width: 768px) {
  .tools-sidebar-heading {
    display: none;
  }

  .tools-hub .tools-sidebar {
    gap: 0;
    padding-top: 5px;
    padding-bottom: 5px;
  }

  .tools-sidebar-nav {
    gap: 5px;
  }

  .tools-sidebar-link {
    padding: 6px 9px;
    font-size: 0.72rem;
  }
}


/* ===== MOBILE TOOLS SUGGESTION COMPACT ===== */
@media (max-width: 768px) {
  .tools-hub {
    padding-top: 8px;
    padding-bottom: 24px;
  }

  .tools-hub-intro {
    margin-top: 0;
    margin-bottom: 12px;
    padding: 13px 14px;
    gap: 10px;
    border-radius: 16px;
  }

  .tools-hub-eyebrow {
    margin-bottom: 5px;
    font-size: 0.58rem;
  }

  .tools-hub-intro-text {
    font-size: 0.78rem;
    line-height: 1.38;
  }

  .tools-hub-chips {
    gap: 6px;
  }

  .tools-hub-chips span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 28px;
    padding: 6px 8px;
    font-size: 0.64rem;
    line-height: 1;
  }

  .tools-hub .tools-main {
    margin-bottom: 0;
  }

  .tools-hub .tools-category:last-child {
    margin-bottom: 0;
  }
}

@media (max-width: 420px) {
  .tools-hub {
    padding-bottom: 18px;
  }
}


/* ===== MOBILE TOOLS CARD DENSITY ===== */
@media (max-width: 768px) {
  .tools-hub .grid,
  .tools-hub .grid.grid-3 {
    gap: 10px;
  }

  .tools-hub .tools-main {
    gap: 14px;
  }

  .tools-hub .tools-category {
    padding: 14px;
    border-radius: 18px;
    margin-bottom: 12px;
  }

  .tools-category-title {
    font-size: 1.18rem;
    margin-bottom: 4px;
  }

  .tools-category-desc {
    font-size: 0.78rem;
    line-height: 1.35;
    margin-bottom: 12px;
  }

  .tools-hub .grid .card {
    min-height: 0;
    padding: 14px;
    border-radius: 15px;
    row-gap: 0;
  }

  .tools-card-tag {
    margin-bottom: 8px;
    font-size: 0.56rem;
  }

  .tools-hub .card h3 {
    font-size: 1rem;
    line-height: 1.22;
    margin-bottom: 6px;
  }

  .tools-hub .card p {
    font-size: 0.76rem;
    line-height: 1.36;
    margin-bottom: 8px;
  }

  .tools-hub .card > .tools-card-meta,
  .tools-hub .card > .btn {
    margin-top: 4px;
  }

  .tools-hub .card > .btn {
    min-height: 30px;
    padding: 7px 9px;
    font-size: 0.7rem;
  }

  .tools-card-meta {
    gap: 4px;
  }

  .tools-card-meta span {
    padding: 5px 7px;
    font-size: 0.6rem;
    line-height: 1;
  }
}


/* ===== MOBILE SIX HABITS COMPACT ===== */
@media (max-width: 768px) {
  .rules-section {
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .rules-section::before {
    inset: 0;
    border-radius: 20px;
  }

  .rules-header {
    gap: 10px;
    margin-bottom: 12px;
  }

  .rules-header h2 {
    font-size: 1.18rem;
    margin: 5px 0 5px;
  }

  .rules-header p {
    font-size: 0.76rem;
    line-height: 1.35;
    white-space: normal;
  }

  .rules-grid {
    gap: 8px;
  }

  .rule-card {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    column-gap: 10px;
    row-gap: 4px;
    padding: 12px;
    border-radius: 14px;
  }

  .rule-top {
    grid-column: 1;
    grid-row: 1 / span 3;
    align-self: start;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    margin: 0;
  }

  .rule-number {
    font-size: 1.18rem;
  }

  .rule-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    min-width: 22px;
    padding: 7px 4px;
    font-size: 0.48rem;
    line-height: 1;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    white-space: nowrap;
  }

  .rule-card h3,
  .rule-card p,
  .rule-card strong {
    grid-column: 2;
  }

  .rule-card h3 {
    font-size: 0.94rem;
    line-height: 1.18;
    margin: 0;
  }

  .rule-card p {
    font-size: 0.72rem;
    line-height: 1.32;
    margin: 0;
  }

  .rule-card strong {
    margin-top: 2px;
    font-size: 0.68rem;
    line-height: 1.25;
  }
}


/* ===== MOBILE POPULAR CALCULATORS COMPACT ===== */
@media (max-width: 768px) {
  .featured-tools {
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .featured-tools::before {
    inset: 0;
    border-radius: 20px;
  }

  .featured-tools-header {
    gap: 10px;
    margin-bottom: 12px;
  }

  .featured-tools-header h2 {
    font-size: 1.18rem;
    margin: 5px 0 5px;
  }

  .featured-tools-header p {
    font-size: 0.76rem;
    line-height: 1.35;
  }

  .featured-grid {
    gap: 9px;
  }

  .featured-card {
    min-height: 0;
    padding: 10px 11px;
    border-radius: 14px;
  }

  .featured-tag {
    margin-bottom: 7px;
    font-size: 0.52rem;
    letter-spacing: 0.07em;
  }

  .featured-card h3 {
    font-size: 0.98rem;
    line-height: 1.18;
    margin-bottom: 5px;
    padding-right: 18px;
  }

  .featured-card p {
    max-width: none;
    flex-grow: 0;
    font-size: 0.7rem;
    line-height: 1.28;
    margin-bottom: 6px;
  }

  .featured-card-meta {
    gap: 5px;
    margin-top: 2px;
  }

  .featured-card-meta span {
    padding: 4px 6px;
    font-size: 0.56rem;
    line-height: 1;
  }

  .featured-arrow {
    top: 10px;
    right: 12px;
    font-size: 1rem;
    opacity: 1;
    transform: none;
  }
}


/* ===== MOBILE COMPOUND CALCULATOR COMPACT ===== */
@media (max-width: 768px) {
  main:has(#principal) .calculator-container {
    padding-top: 10px;
    padding-bottom: 18px;
  }

  main:has(#principal) .page-title {
    font-size: 1.55rem;
    line-height: 1.12;
    margin-bottom: 14px;
  }

  main:has(#principal) .calculator-box {
    gap: 12px;
    padding: 12px;
    border-radius: 16px;
  }

  main:has(#principal) .inputs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  main:has(#principal) .input-group {
    gap: 5px;
    min-width: 0;
    padding: 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.06);
  }

  main:has(#principal) .internal-links {
    grid-column: 1 / -1;
  }

  main:has(#principal) .input-group label {
    font-size: 0.56rem;
    line-height: 1.1;
    letter-spacing: 0.045em;
  }

  main:has(#principal) .input-group input[type="number"] {
    min-height: 34px;
    padding: 7px 8px;
    border-radius: 8px;
    font-size: 0.78rem;
  }

  main:has(#principal) .input-group select {
    min-height: 34px;
    padding: 7px 9px;
    border-radius: 9px;
    font-size: 0.78rem;
  }

  main:has(#principal) .internal-links {
    margin-top: 0;
    padding: 10px;
    border-radius: 12px;
  }

  main:has(#principal) .internal-links p {
    margin-bottom: 7px;
    font-size: 0.7rem;
  }

  main:has(#principal) .internal-links a {
    padding: 5px 7px;
    font-size: 0.66rem;
  }

  main:has(#principal) .chart-box {
    min-width: 0;
  }

  main:has(#principal) #headline {
    margin-bottom: 8px;
    font-size: 0.98rem;
    line-height: 1.2;
  }

  main:has(#principal) .chart-box canvas {
    max-height: 210px;
  }

  main:has(#principal) .summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin-top: 10px;
    padding-top: 10px;
  }

  main:has(#principal) .summary > div {
    min-width: 0;
    padding: 9px 6px;
    border-radius: 11px;
    font-size: 0.56rem;
    line-height: 1.15;
  }

  main:has(#principal) .summary strong {
    margin-top: 5px;
    font-size: 0.74rem;
    line-height: 1.15;
    overflow-wrap: anywhere;
  }
}


/* ===== MOBILE STANDARD CALCULATORS COMPACT ===== */
@media (max-width: 768px) {
  .crypto-scenario-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin: 7px 0;
  }

  .crypto-scenario-grid > div {
    display: flex;
    min-width: 0;
    min-height: 48px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 4px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    text-align: center;
  }

  .crypto-scenario-grid > div:first-child {
    border-color: rgba(34, 197, 94, 0.22);
    background:
      radial-gradient(circle at 100% 0%, rgba(34, 197, 94, 0.16), transparent 38%),
      linear-gradient(145deg, rgba(20, 83, 45, 0.22), rgba(255, 255, 255, 0.026));
  }

  .crypto-scenario-grid > div:last-child {
    border-color: rgba(248, 113, 113, 0.22);
    background:
      radial-gradient(circle at 100% 0%, rgba(248, 113, 113, 0.16), transparent 38%),
      linear-gradient(145deg, rgba(127, 29, 29, 0.22), rgba(255, 255, 255, 0.026));
  }

  .crypto-scenario-grid span {
    color: #9ca3af;
    font-size: 0.5rem;
    font-weight: 800;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: 0.035em;
  }

  .crypto-scenario-grid strong {
    margin-top: 3px;
    color: #fff;
    font-size: 0.68rem;
    line-height: 1.12;
    overflow-wrap: anywhere;
  }

  .crypto-price-strip {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    justify-content: start;
    gap: 6px;
    margin-bottom: 6px;
    padding: 0;
  }

  .crypto-price-tab {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    min-height: 28px;
    padding: 6px 7px;
    border: 1px solid rgba(250, 204, 21, 0.18);
    border-radius: 8px;
    background:
      radial-gradient(circle at 100% 0%, rgba(250, 204, 21, 0.13), transparent 40%),
      linear-gradient(135deg, rgba(250, 204, 21, 0.09), rgba(34, 197, 94, 0.055));
  }

  .crypto-price-tab:nth-child(2) {
    border-color: rgba(56, 189, 248, 0.2);
    background:
      radial-gradient(circle at 100% 0%, rgba(56, 189, 248, 0.13), transparent 40%),
      linear-gradient(135deg, rgba(56, 189, 248, 0.09), rgba(34, 197, 94, 0.05));
  }

  .crypto-price-tab span {
    color: #fde68a;
    font-size: 0.5rem;
    font-weight: 800;
    line-height: 1;
  }

  .crypto-price-tab strong {
    min-width: 0;
    color: #fff;
    font-size: 0.58rem;
    white-space: nowrap;
  }

  .crypto-price-strip #loading {
    grid-column: 1 / -1;
    color: #fde68a;
    font-size: 0.5rem;
    font-style: normal;
    line-height: 1;
    opacity: 0.72;
    text-align: center;
  }

  .crypto-model-details {
    padding: 8px;
    margin: 7px 0;
    border: 1px solid rgba(56, 189, 248, 0.16);
    border-radius: 10px;
    background:
      radial-gradient(circle at 100% 0%, rgba(56, 189, 248, 0.1), transparent 36%),
      linear-gradient(145deg, rgba(15, 23, 42, 0.62), rgba(34, 197, 94, 0.06));
  }

  .crypto-model-details h3 {
    margin: 0 0 6px;
    color: #ecfdf5;
    font-size: 0.72rem;
    line-height: 1.15;
  }

  .crypto-model-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }

  .crypto-model-grid div {
    min-width: 0;
    padding: 5px 4px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 7px;
    background: rgba(2, 6, 23, 0.22);
    text-align: center;
  }

  .crypto-model-grid span {
    display: block;
    color: #9ca3af;
    font-size: 0.46rem;
    font-weight: 800;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: 0.03em;
  }

  .crypto-model-grid strong {
    display: block;
    margin-top: 2px;
    color: #fff;
    font-size: 0.58rem;
    line-height: 1.1;
    overflow-wrap: anywhere;
  }

  .crypto-model-details p {
    margin: 6px 0 0;
    color: #a7f3d0;
    font-size: 0.58rem;
    line-height: 1.24;
  }

  .calculator-container:not(.debt-payoff-page):not(.rent-buy-page):not(.emergency-fund-page) {
    padding-top: 10px;
    padding-bottom: 18px;
  }

  .calculator-container:not(.debt-payoff-page):not(.rent-buy-page):not(.emergency-fund-page) .page-title,
  .calculator-container:not(.debt-payoff-page):not(.rent-buy-page):not(.emergency-fund-page) .crypto-title {
    font-size: 1.55rem;
    line-height: 1.12;
    margin-bottom: 14px;
  }

  .calculator-container:not(.debt-payoff-page):not(.rent-buy-page):not(.emergency-fund-page) .calculator-box:not(.calculator-box--legal) {
    gap: 12px;
    padding: 12px;
    border-radius: 16px;
  }

  .calculator-container:not(.debt-payoff-page):not(.rent-buy-page):not(.emergency-fund-page) .inputs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .calculator-container:not(.debt-payoff-page):not(.rent-buy-page):not(.emergency-fund-page) .input-group {
    gap: 5px;
    min-width: 0;
    padding: 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.06);
  }

  .calculator-container:not(.debt-payoff-page):not(.rent-buy-page):not(.emergency-fund-page) .input-group:has(.prediction-buttons),
  .calculator-container:not(.debt-payoff-page):not(.rent-buy-page):not(.emergency-fund-page) .input-group:has(.scenario-selector),
  .calculator-container:not(.debt-payoff-page):not(.rent-buy-page):not(.emergency-fund-page) .input-group:has(.strategy-buttons),
  .calculator-container:not(.debt-payoff-page):not(.rent-buy-page):not(.emergency-fund-page) .internal-links,
  .calculator-container:not(.debt-payoff-page):not(.rent-buy-page):not(.emergency-fund-page) .model-explanation,
  .calculator-container:not(.debt-payoff-page):not(.rent-buy-page):not(.emergency-fund-page) .swp-info-box,
  .calculator-container:not(.debt-payoff-page):not(.rent-buy-page):not(.emergency-fund-page) .historical-scenarios,
  .calculator-container:not(.debt-payoff-page):not(.rent-buy-page):not(.emergency-fund-page) .insight-box,
  .calculator-container:not(.debt-payoff-page):not(.rent-buy-page):not(.emergency-fund-page) .emi-affiliate-block {
    grid-column: 1 / -1;
  }

  .calculator-container:not(.debt-payoff-page):not(.rent-buy-page):not(.emergency-fund-page) .input-group label {
    font-size: 0.56rem;
    line-height: 1.1;
    letter-spacing: 0.045em;
  }

  .calculator-container:not(.debt-payoff-page):not(.rent-buy-page):not(.emergency-fund-page) .input-group input[type="number"],
  .calculator-container:not(.debt-payoff-page):not(.rent-buy-page):not(.emergency-fund-page) .input-group input[data-currency-textbox="1"],
  .calculator-container:not(.debt-payoff-page):not(.rent-buy-page):not(.emergency-fund-page) .input-group select {
    min-height: 34px;
    padding: 7px 8px;
    border-radius: 8px;
    font-size: 0.78rem;
  }

  .calculator-container:not(.debt-payoff-page):not(.rent-buy-page):not(.emergency-fund-page) .value-display {
    display: none;
  }

  .calculator-container:not(.debt-payoff-page):not(.rent-buy-page):not(.emergency-fund-page) .internal-links {
    margin-top: 0;
    padding: 10px;
    border-radius: 12px;
  }

  .calculator-container:not(.debt-payoff-page):not(.rent-buy-page):not(.emergency-fund-page) .internal-links p {
    margin-bottom: 7px;
    font-size: 0.7rem;
  }

  .calculator-container:not(.debt-payoff-page):not(.rent-buy-page):not(.emergency-fund-page) .internal-links a {
    padding: 5px 7px;
    font-size: 0.66rem;
  }

  .calculator-container:not(.debt-payoff-page):not(.rent-buy-page):not(.emergency-fund-page) .chart-box {
    min-width: 0;
  }

  .calculator-container:not(.debt-payoff-page):not(.rent-buy-page):not(.emergency-fund-page) #headline {
    margin-bottom: 8px;
    font-size: 0.98rem;
    line-height: 1.2;
  }

  .calculator-container:not(.debt-payoff-page):not(.rent-buy-page):not(.emergency-fund-page) .chart-box canvas {
    max-height: 210px;
  }

  .calculator-container:not(.debt-payoff-page):not(.rent-buy-page):not(.emergency-fund-page) .summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin-top: 10px;
    padding-top: 10px;
  }

  .calculator-container:not(.debt-payoff-page):not(.rent-buy-page):not(.emergency-fund-page) .summary > div {
    min-width: 0;
    padding: 9px 6px;
    border-radius: 11px;
    font-size: 0.56rem;
    line-height: 1.15;
  }

  .calculator-container:not(.debt-payoff-page):not(.rent-buy-page):not(.emergency-fund-page) .summary strong {
    margin-top: 5px;
    font-size: 0.74rem;
    line-height: 1.15;
    overflow-wrap: anywhere;
  }
}


/* ===== MOBILE CALCULATOR DESIGN PASS ===== */
@media (max-width: 768px) {
  .emi-page-lead,
  .page-subtitle,
  .ibc-lead,
  .ibc-model-desc {
    margin: -4px auto 14px;
    padding: 0 8px;
    font-size: 0.9rem;
    line-height: 1.42;
  }

  .calculator-container:not(.debt-payoff-page) {
    padding-left: 10px;
    padding-right: 10px;
  }

  .calculator-container:not(.debt-payoff-page):not(.rent-buy-page):not(.emergency-fund-page) .input-group:has(.scenario-selector) {
    grid-column: 1 / -1;
  }

  .calculator-container:not(.debt-payoff-page):not(.rent-buy-page):not(.emergency-fund-page) .input-group:has(.prediction-buttons),
  .calculator-container:not(.debt-payoff-page):not(.rent-buy-page):not(.emergency-fund-page) .input-group:has(.strategy-buttons) {
    grid-column: 1 / -1;
    padding: 10px;
  }

  .calculator-container:not(.debt-payoff-page):not(.rent-buy-page):not(.emergency-fund-page) .input-group:has(.scenario-selector) {
    padding: 10px;
  }

  .prediction-buttons,
  .strategy-buttons {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .scenario-selector {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .pred-btn,
  .strat-btn,
  .scenario-btn {
    min-width: 0;
    min-height: 44px;
    padding: 9px 8px;
    border-radius: 10px;
    font-size: 0.74rem;
    line-height: 1.2;
  }

  .pred-btn span,
  .strat-btn span {
    font-size: 0.62rem;
  }

  .model-explanation,
  .swp-info-box,
  .btc-price-prediction {
    margin-top: 0;
    padding: 12px;
    border-radius: 12px;
  }

  .btc-price-prediction {
    grid-column: 1 / -1;
  }

  .model-buttons {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .model-buttons .pred-btn {
    min-height: 58px;
    padding: 8px 5px;
    font-size: 0.66rem;
  }

  .model-buttons .pred-btn span {
    font-size: 0.56rem;
  }

  .model-explanation .model-icon,
  .swp-info-box .info-icon {
    font-size: 1.25rem;
  }

  .model-explanation .model-text p,
  .swp-info-box .info-text p {
    font-size: 0.74rem;
    line-height: 1.38;
  }

  .price-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .price-cell {
    padding: 8px 5px;
  }

  .price-year-label,
  .price-change {
    font-size: 0.58rem;
  }

  .price-value {
    font-size: 0.72rem;
  }

  .millionaire-result,
  .swp-result,
  .wealth-result {
    padding: 16px;
    margin-bottom: 12px;
    border-radius: 14px;
  }

  .millionaire-result .result-icon,
  .swp-result .result-icon {
    font-size: 1.6rem;
    margin-bottom: 6px;
  }

  .result-year {
    font-size: 2.2rem;
  }

  .result-text,
  .swp-result .result-label {
    font-size: 0.86rem;
    line-height: 1.3;
  }

  .result-subtext,
  .swp-result .result-status {
    font-size: 0.78rem;
  }

  .btc-stats,
  .swp-stats,
  .insights-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin-bottom: 12px;
  }

  .stat-box,
  .stat-card,
  .insight-card {
    display: block;
    min-width: 0;
    padding: 10px 6px;
    border-radius: 11px;
    text-align: center;
  }

  .stat-icon,
  .stat-card .stat-icon,
  .insight-icon {
    font-size: 1.1rem;
    margin: 0 0 4px;
  }

  .stat-value,
  .stat-card .stat-value,
  .insight-value {
    font-size: 0.82rem;
    line-height: 1.15;
    overflow-wrap: anywhere;
  }

  .stat-label,
  .stat-card .stat-label,
  .insight-label {
    font-size: 0.52rem;
    line-height: 1.15;
    letter-spacing: 0.04em;
  }

  .milestone-timeline,
  .scenario-comparison,
  .withdrawal-schedule,
  .swp-insights,
  .formula-section,
  .lifestyle-preview,
  .comparison-bar {
    padding: 12px;
    margin-bottom: 12px;
    border-radius: 12px;
  }

  .timeline-track {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 0;
  }

  .timeline-track::before {
    display: none;
  }

  .milestone-marker {
    flex-direction: row;
    justify-content: space-between;
    gap: 8px;
    padding: 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.035);
  }

  .marker-dot {
    width: 12px;
    height: 12px;
    border-width: 2px;
  }

  .marker-label,
  .marker-year {
    font-size: 0.72rem;
  }

  .scenarios {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .scenario-box {
    padding: 10px 6px;
    border-radius: 10px;
  }

  .scenario-name {
    font-size: 0.62rem;
  }

  .scenario-year {
    font-size: 0.95rem;
  }

  .age-milestones {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 12px 0;
  }

  .milestone-card {
    padding: 12px 8px;
    border-radius: 12px;
  }

  .milestone-card .amount {
    font-size: 0.96rem;
  }

  .wealth-result .big-number {
    font-size: 1.75rem;
    line-height: 1.1;
  }

  .wealth-tier {
    padding: 7px 12px;
    font-size: 0.82rem;
  }

  .achievement {
    padding: 6px 9px;
    font-size: 0.72rem;
  }

  .bitcoin-millionaire-page .calculator-container {
    padding-top: 10px;
    padding-bottom: 18px;
  }

  .bitcoin-millionaire-page .page-title {
    font-size: 1.42rem;
    line-height: 1.12;
    margin-bottom: 10px;
  }

  .bitcoin-millionaire-page .calculator-box {
    gap: 10px !important;
    padding: 10px !important;
    border-radius: 13px !important;
    border-color: rgba(247, 147, 26, 0.2) !important;
    background:
      radial-gradient(circle at 8% 0%, rgba(247, 147, 26, 0.16), transparent 34%),
      radial-gradient(circle at 100% 0%, rgba(250, 204, 21, 0.1), transparent 30%),
      linear-gradient(145deg, rgba(24, 30, 43, 0.96), rgba(10, 16, 28, 0.95)) !important;
  }

  .bitcoin-millionaire-page .inputs {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 7px !important;
    padding: 0 !important;
    background: transparent !important;
  }

  .bitcoin-millionaire-page .input-group {
    gap: 3px !important;
    padding: 6px !important;
    border-radius: 9px !important;
    border-color: rgba(247, 147, 26, 0.12) !important;
    background:
      radial-gradient(circle at 100% 0%, rgba(250, 204, 21, 0.08), transparent 36%),
      linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(247, 147, 26, 0.03)) !important;
  }

  .bitcoin-millionaire-page .input-group:nth-child(n + 5),
  .bitcoin-millionaire-page .model-explanation,
  .bitcoin-millionaire-page .btc-price-prediction,
  .bitcoin-millionaire-page .bitcoin-related-tools {
    grid-column: 1 / -1 !important;
  }

  .bitcoin-millionaire-page .input-group label {
    font-size: 0.48rem !important;
    line-height: 1.1 !important;
    letter-spacing: 0.035em !important;
  }

  .bitcoin-millionaire-page .input-group input[type="number"],
  .bitcoin-millionaire-page .input-group input[data-currency-textbox="1"] {
    min-height: 28px !important;
    padding: 5px 6px !important;
    border-radius: 8px !important;
    font-size: 0.72rem !important;
  }

  .bitcoin-millionaire-page .btc-price-status {
    font-size: 0.48rem;
    line-height: 1.1;
   }

  .bitcoin-millionaire-page .currency-pill {
    min-width: 24px;
    margin-left: 2px;
    padding: 1px 4px;
    font-size: 0.44rem;
  }

  .bitcoin-millionaire-page .model-buttons {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  .bitcoin-millionaire-page .model-buttons .pred-btn {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    min-height: 54px;
    align-items: center;
    justify-content: center;
    justify-items: center;
    row-gap: 2px;
    padding: 7px 4px;
    text-align: center;
    font-size: 0.72rem;
    line-height: 1.12;
  }

  .bitcoin-millionaire-page .model-buttons .pred-btn .btn-label {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    align-items: center;
    gap: 2px;
    width: 100%;
    text-align: center;
  }

  .bitcoin-millionaire-page .model-buttons .pred-btn span {
    display: block;
    text-align: center;
    font-size: 0.64rem;
    line-height: 1.12;
  }

  .bitcoin-millionaire-page .model-buttons .pred-btn .ui-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
    align-self: center;
    justify-self: center;
    margin-top: 0;
    transform: translateY(0);
  }

  .bitcoin-millionaire-page .model-buttons .pred-btn .model-title {
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.05;
  }

  .bitcoin-millionaire-page .model-buttons .pred-btn > span:last-child {
    font-size: 0.6rem;
    line-height: 1.05;
  }

  .bitcoin-millionaire-page .model-explanation {
    align-items: center;
    gap: 8px;
    margin-top: 0;
    padding: 9px;
    border-left-width: 3px;
    border-radius: 10px;
    background:
      radial-gradient(circle at 100% 0%, rgba(250, 204, 21, 0.1), transparent 44%),
      linear-gradient(135deg, rgba(247, 147, 26, 0.11), rgba(15, 23, 42, 0.28));
  }

  .bitcoin-millionaire-page .model-explanation .model-icon {
    display: none;
  }

  .bitcoin-millionaire-page .model-explanation .model-text strong {
    margin-bottom: 3px;
    font-size: 0.72rem;
    line-height: 1.15;
  }

  .bitcoin-millionaire-page .model-explanation .model-text p {
    font-size: 0.62rem;
    line-height: 1.25;
  }

  .bitcoin-millionaire-page .btc-price-prediction {
    padding: 9px;
    border-radius: 10px;
    background:
      radial-gradient(circle at 100% 0%, rgba(250, 204, 21, 0.12), transparent 44%),
      linear-gradient(135deg, rgba(247, 147, 26, 0.1), rgba(255, 255, 255, 0.025));
  }

  .bitcoin-millionaire-page .prediction-header {
    align-items: center;
    margin-bottom: 7px;
    font-size: 0.66rem;
  }

  .bitcoin-millionaire-page .prediction-source {
    margin-top: 6px;
    font-size: 0.52rem;
    line-height: 1.2;
  }

  .bitcoin-millionaire-page .price-grid {
    gap: 5px;
  }

  .bitcoin-millionaire-page .price-cell {
    padding: 6px 3px;
    border-radius: 8px;
  }

  .bitcoin-millionaire-page .price-year-label,
  .bitcoin-millionaire-page .price-change {
    font-size: 0.5rem;
    line-height: 1.1;
  }

  .bitcoin-millionaire-page .price-value {
    font-size: 0.6rem;
    line-height: 1.1;
  }

  .bitcoin-millionaire-page .millionaire-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 82px;
    padding: 9px;
    margin-bottom: 8px;
    border-width: 1px;
    border-radius: 11px;
    background:
      radial-gradient(circle at 50% 0%, rgba(250, 204, 21, 0.18), transparent 46%),
      linear-gradient(145deg, rgba(247, 147, 26, 0.16), rgba(15, 23, 42, 0.56));
  }

  .bitcoin-millionaire-page .millionaire-result .result-icon {
    display: none;
  }

  .bitcoin-millionaire-page .result-year {
    margin-bottom: 3px;
    font-size: 1.55rem;
    line-height: 1;
  }

  .bitcoin-millionaire-page .result-text {
    margin-bottom: 2px;
    font-size: 0.68rem;
    line-height: 1.2;
  }

  .bitcoin-millionaire-page .result-subtext {
    font-size: 0.62rem;
    line-height: 1.2;
  }

  .bitcoin-millionaire-page .bitcoin-snapshot {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    margin-bottom: 8px;
  }

  .bitcoin-millionaire-page .snapshot-card {
    min-height: 54px;
    gap: 3px;
    padding: 6px 4px;
    border-radius: 9px;
    text-align: center;
  }

  .bitcoin-millionaire-page .snapshot-card span {
    font-size: 0.48rem;
    line-height: 1.05;
  }

  .bitcoin-millionaire-page .snapshot-card strong {
    font-size: 0.62rem;
    line-height: 1.08;
  }

  .bitcoin-millionaire-page .snapshot-card--targets strong {
    display: flex;
    gap: 2px;
    font-size: 0.5rem;
    white-space: nowrap;
  }

  .bitcoin-millionaire-page .snapshot-card--targets strong span {
    gap: 3px;
    padding: 2px;
    border-radius: 5px;
    font-size: 0.44rem;
  }

  .bitcoin-millionaire-page .snapshot-card--targets strong b {
    font-size: 0.44rem;
  }

  .bitcoin-millionaire-page .btc-stats {
    gap: 5px;
    margin-bottom: 8px;
  }

  .bitcoin-millionaire-page .stat-box {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    min-height: 58px;
    align-items: center;
    justify-content: center;
    column-gap: 5px;
    padding: 6px 4px;
    border-radius: 9px;
    text-align: left;
    background:
      radial-gradient(circle at 0% 0%, rgba(247, 147, 26, 0.13), transparent 38%),
      linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(15, 23, 42, 0.26));
  }

  .bitcoin-millionaire-page .stat-box:nth-child(2) {
    background:
      radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.14), transparent 38%),
      linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(15, 23, 42, 0.26));
  }

  .bitcoin-millionaire-page .stat-box:nth-child(3) {
    background:
      radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.14), transparent 38%),
      linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(15, 23, 42, 0.26));
  }

  .bitcoin-millionaire-page .stat-icon {
    grid-row: span 2;
    display: flex;
    width: 18px;
    height: 18px;
    align-items: center;
    justify-content: center;
    align-self: center;
    justify-self: center;
    font-size: 0.92rem;
    margin-bottom: 0;
  }

  .bitcoin-millionaire-page .stat-value {
    align-self: end;
    margin-bottom: 2px;
    font-size: 0.8rem;
    line-height: 1;
    text-align: left;
  }

  .bitcoin-millionaire-page .stat-label {
    align-self: start;
    margin-top: 2px;
    font-size: 0.54rem;
    line-height: 1;
    letter-spacing: 0.03em;
    text-align: left;
  }

  .bitcoin-millionaire-page .milestone-timeline {
    padding: 8px;
    margin-bottom: 8px;
    border-radius: 10px;
    border: 1px solid rgba(247, 147, 26, 0.12);
    background:
      radial-gradient(circle at 100% 0%, rgba(247, 147, 26, 0.1), transparent 38%),
      linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(15, 23, 42, 0.28));
  }

  .bitcoin-millionaire-page .timeline-title {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 6px;
    font-size: 0.7rem;
    line-height: 1.15;
    text-align: left;
  }

  .bitcoin-millionaire-page .timeline-title .title-with-icon {
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
  }

  .bitcoin-millionaire-page .timeline-track {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    padding: 0;
  }

  .bitcoin-millionaire-page .timeline-track::before {
    display: none;
  }

  .bitcoin-millionaire-page .milestone-marker {
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr);
    min-width: 0;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    column-gap: 4px;
    row-gap: 1px;
    padding: 5px 3px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    text-align: left;
  }

  .bitcoin-millionaire-page .marker-dot {
    grid-row: span 2;
    display: block;
    align-self: center;
    justify-self: center;
    width: 8px;
    height: 8px;
    border-width: 2px;
  }

  .bitcoin-millionaire-page .marker-label,
  .bitcoin-millionaire-page .marker-year {
    font-size: 0.56rem;
    line-height: 1;
    text-align: left;
  }

  .bitcoin-millionaire-page .marker-label {
    align-self: end;
  }

  .bitcoin-millionaire-page .marker-year {
    align-self: start;
    margin-top: 2px;
  }

  .lifestyle-items {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .lifestyle-item {
    padding: 9px;
  }

  .formula-box,
  .formula-example {
    padding: 12px;
  }

  .formula-text {
    font-size: 0.72rem;
    overflow-wrap: anywhere;
  }

  .step {
    gap: 10px;
    padding: 9px 10px;
  }

  .step-label,
  .step-value {
    font-size: 0.72rem;
  }

  .calculator-box--emi {
    grid-template-areas:
      "inputs"
      "chart"
      "affiliate";
  }

  .calculator-box--emi .inputs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calculator-box--emi .input-group:first-child {
    grid-column: 1 / -1;
  }

  .calculator-box--emi .internal-links--emi-fill {
    grid-column: 1 / -1;
    margin-top: 0;
  }

  .emi-affiliate-block {
    padding: 12px;
    border-radius: 12px;
  }

  .emi-affiliate-title {
    font-size: 0.92rem;
  }

  .emi-affiliate-lead,
  .emi-affiliate-disclosure,
  .emi-affiliate-footnote {
    font-size: 0.72rem;
    line-height: 1.35;
  }

  .calculator-box--emi .emi-partner-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .emi-card {
    padding: 11px 12px;
    border-radius: 10px;
  }

  .emi-card h4 {
    font-size: 0.9rem;
    margin-bottom: 4px;
  }

  .emi-card p,
  .emi-cta {
    font-size: 0.72rem;
  }

  body.emi-calculator-page .calculator-box--emi {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px;
  }

  body.emi-calculator-page .calculator-box--emi .inputs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px;
    padding: 8px;
  }

  body.emi-calculator-page .calculator-box--emi .emi-panel-kicker,
  body.emi-calculator-page .calculator-box--emi .emi-loan-type,
  body.emi-calculator-page .calculator-box--emi .emi-input-tip,
  body.emi-calculator-page .calculator-box--emi .internal-links--emi-fill {
    grid-column: 1 / -1;
  }

  body.emi-calculator-page .calculator-box--emi .internal-links--emi-fill {
    display: none;
  }

  body.emi-calculator-page .calculator-box--emi .internal-links--emi-mobile-end {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    padding: 7px;
    margin-top: 10px !important;
  }

  body.emi-calculator-page .calculator-box--emi .internal-links--emi-mobile-end p {
    grid-column: 1 / -1;
    margin-bottom: 2px;
  }

  body.emi-calculator-page .calculator-box--emi .internal-links--emi-mobile-end a {
    display: grid;
    align-items: center;
    justify-items: center;
    min-height: 34px;
    padding: 5px 3px;
    text-align: center;
    font-size: 0.54rem;
    line-height: 1.1;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  body.emi-calculator-page .calculator-box--emi .input-group {
    gap: 4px;
    padding: 6px 5px;
  }

  body.emi-calculator-page .calculator-box--emi .input-group label {
    min-height: 20px;
    font-size: 0.46rem;
    line-height: 1.05;
    letter-spacing: 0.025em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
  }

  body.emi-calculator-page .calculator-box--emi .input-group input[type="number"],
  body.emi-calculator-page .calculator-box--emi .emi-loan-type select {
    height: 36px;
    min-height: 36px;
    padding: 7px 8px;
    font-size: 0.78rem;
    line-height: 1.1;
  }

  body.emi-calculator-page #headline {
    padding: 8px;
    grid-template-columns: auto auto;
    gap: 2px 4px;
  }

  body.emi-calculator-page #headline strong {
    font-size: 1rem;
  }

  body.emi-calculator-page #headline em {
    grid-column: 1 / -1;
    white-space: normal;
  }

  body.emi-calculator-page .summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  body.emi-calculator-page .summary > div {
    min-height: 48px;
    padding: 6px 4px;
    font-size: 0.58rem;
  }

  body.emi-calculator-page .summary strong {
    font-size: 0.72rem;
  }

  body.emi-calculator-page .emi-insight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-top: 9px;
  }

  body.emi-calculator-page .emi-insight-grid article {
    min-height: 68px;
    padding: 8px;
  }

  body.emi-calculator-page .emi-insight-grid span {
    font-size: 0.55rem;
  }

  body.emi-calculator-page .emi-insight-grid strong {
    font-size: 0.78rem;
  }

  body.emi-calculator-page .emi-insight-grid small {
    font-size: 0.58rem;
  }

  body.budget-planner-page .calculator-container {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    padding: 22px 10px;
  }

  body.tax-calculator-page {
    overflow-x: hidden;
  }

  body.tax-calculator-page .calculator-container {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
    margin-left: auto;
    margin-right: auto;
    padding-left: 0;
    padding-right: 0;
  }

  body.budget-planner-page .page-title {
    font-size: 1.48rem;
    line-height: 1.15;
    margin-bottom: 8px;
    overflow-wrap: anywhere;
  }

  body.budget-planner-page .emi-page-lead {
    margin: 0 0 12px;
    font-size: 0.82rem;
    line-height: 1.35;
  }

  .budget-planner-box {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px;
    border-radius: 16px;
  }

  .budget-right-panel {
    position: static;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    gap: 8px;
    padding: 8px;
    border-radius: 14px;
  }

  .budget-left-panel {
    display: contents;
  }

  .budget-panel-head,
  .budget-input-grid {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 8px;
    border: 1px solid rgba(34, 197, 94, 0.12);
    border-radius: 14px;
    background:
      linear-gradient(180deg, rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.5)),
      radial-gradient(circle at 12% 0%, rgba(34, 197, 94, 0.1), transparent 34%);
  }

  .budget-panel-head {
    order: 1;
  }

  .budget-input-grid {
    order: 2;
  }

  .budget-right-panel {
    order: 3;
  }

  .budget-panel-head h2,
  .budget-chart-card h2 {
    font-size: 0.86rem;
  }

  .budget-panel-head p,
  .budget-action-card p {
    font-size: 0.66rem;
    line-height: 1.28;
  }

  .budget-input-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .budget-field {
    gap: 3px;
    padding: 6px;
    border-radius: 9px;
  }

  .budget-field span,
  .budget-score-grid span,
  .budget-mini-grid span,
  .budget-projection-grid span,
  .budget-hero-result span,
  .budget-action-card span {
    font-size: 0.52rem;
    line-height: 1.1;
  }

  .budget-field input,
  .budget-field input[data-currency-textbox="1"] {
    min-height: 31px !important;
    height: 31px !important;
    padding: 5px 6px !important;
    border-radius: 8px !important;
    font-size: 0.74rem !important;
    line-height: 1.1 !important;
  }

  .budget-related-tools {
    order: 4;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    padding: 7px;
  }

  .budget-related-tools p {
    grid-column: 1 / -1;
    font-size: 0.58rem;
  }

  .internal-links.budget-related-tools a {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    min-height: 32px;
    padding: 5px 3px;
    text-align: center;
  }

  .internal-links.budget-related-tools a span {
    font-size: 0.54rem;
  }

  .internal-links.budget-related-tools a small {
    display: none;
  }

  .budget-hero-result {
    padding: 11px;
  }

  .budget-hero-result strong {
    font-size: 1.6rem;
  }

  .budget-hero-result p {
    font-size: 0.68rem;
  }

  .budget-score-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
  }

  .budget-mini-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .budget-projection-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .budget-score-grid article,
  .budget-mini-grid article,
  .budget-projection-grid article {
    min-height: 60px;
    padding: 6px 4px;
    border-radius: 9px;
  }

  .budget-score-grid strong,
  .budget-mini-grid strong,
  .budget-projection-grid strong,
  .budget-action-card strong {
    font-size: 0.72rem;
  }

  .budget-score-grid small,
  .budget-projection-grid small {
    font-size: 0.48rem;
    line-height: 1.12;
  }

  .budget-projection-grid small {
    gap: 3px;
    margin-top: 4px;
  }

  .budget-projection-grid small b {
    padding: 3px 2px;
    border-radius: 6px;
  }

  .budget-projection-grid small b span {
    font-size: 0.38rem;
  }

  .budget-projection-grid small b em {
    font-size: 0.5rem;
  }

  .budget-action-detail {
    padding: 6px;
    border-radius: 8px;
  }

  .budget-chart-grid {
    grid-template-columns: 1fr;
  }

  .budget-chart-card,
  .budget-action-card {
    padding: 9px;
    border-radius: 11px;
  }

  .budget-chart-card canvas {
    min-height: 210px;
    max-height: 220px;
  }

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

  body.tax-calculator-page .emi-page-lead,
  .tax-calculator-box > *,
  .tax-main-grid,
  .tax-rrsp-actions,
  .tax-score-grid,
  .tax-mini-grid,
  .tax-note-grid {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }

  .tax-input-grid select {
    min-height: 31px;
    height: 31px;
    padding: 5px 6px;
    border-radius: 8px;
    font-size: 0.74rem;
    line-height: 1.1;
  }

  .tax-rrsp-actions {
    order: 3;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    padding: 0;
  }

  .tax-rrsp-card {
    min-height: 74px;
    padding: 9px;
    border-radius: 10px;
  }

  .tax-rrsp-card span {
    font-size: 0.58rem;
  }

  .tax-rrsp-card strong {
    font-size: 1rem;
  }

  .tax-rrsp-card em {
    font-size: 0.64rem;
  }

  .tax-main-grid {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .tax-score-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }

  .tax-chart-card canvas {
    min-height: 200px;
    max-height: 215px;
  }

  .tax-optimizer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .tax-optimizer-grid article {
    min-height: 62px;
    padding: 6px 4px;
    text-align: center;
  }

  .tax-optimizer-grid span,
  .tax-note-grid span {
    font-size: 0.48rem;
    line-height: 1.1;
  }

  .tax-optimizer-grid strong {
    font-size: 0.68rem;
  }

  .tax-optimizer-grid small {
    font-size: 0.46rem;
    line-height: 1.12;
  }

  .tax-mini-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .tax-note-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }

  .tax-note-grid article {
    padding: 7px;
    border-radius: 9px;
  }

  .tax-note-grid p {
    font-size: 0.56rem;
    line-height: 1.2;
  }

  .tax-bracket-grid {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .tax-bracket-card {
    gap: 8px;
    padding: 9px;
    border-radius: 10px;
  }

  .tax-bracket-head span {
    font-size: 0.68rem;
  }

  .tax-bracket-head strong,
  .tax-bracket-row-head span,
  .tax-bracket-row-head strong {
    font-size: 0.54rem;
  }

  .tax-bracket-rows {
    gap: 6px;
  }

  .tax-bracket-track {
    height: 16px;
  }

  .tax-bracket-track b {
    font-size: 0.46rem;
  }

  .tax-seo-content {
    padding: 14px 10px;
    border-radius: 14px;
  }

  .tax-seo-lead {
    margin-bottom: 10px;
    padding-bottom: 10px;
  }

  .tax-seo-columns {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .tax-seo-content h3 {
    margin: 16px 0 6px;
    font-size: 0.92rem;
  }

  .budget-progress-list div {
    padding: 6px;
  }

  .budget-progress-list span,
  .budget-progress-list strong {
    font-size: 0.62rem;
  }

  .us-tool-page .budget-planner-box {
    grid-template-columns: 1fr;
  }

  .us-tool-analysis .budget-chart-card {
    min-height: 0;
  }

  .us-bars {
    gap: 6px;
    margin-top: 6px;
  }

  .us-bars div {
    grid-template-columns: 1fr;
    gap: 4px;
    min-height: 54px;
    padding: 6px;
    text-align: center;
  }

  .us-bars span {
    font-size: 0.5rem;
  }

  .us-bars b {
    justify-self: center;
    height: 8px;
  }

  .us-bars strong {
    font-size: 0.62rem;
    text-align: center;
  }

  .us-account-stack {
    gap: 6px;
    padding: 7px;
    border-radius: 10px;
  }

  .us-stack-head {
    display: grid;
    gap: 3px;
    text-align: center;
  }

  .us-stack-head span {
    font-size: 0.5rem;
  }

  .us-stack-head strong {
    font-size: 0.66rem;
    text-align: center;
  }

  .us-stack-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .us-stack-grid article {
    min-height: 62px;
    padding: 5px 3px;
    border-radius: 8px;
  }

  .us-stack-grid span {
    font-size: 0.43rem;
  }

  .us-stack-grid strong {
    font-size: 0.62rem;
  }

  .us-stack-grid small {
    font-size: 0.43rem;
    line-height: 1.12;
  }

  .ibc-warning,
  .ibc-steps {
    margin-bottom: 16px;
  }

  .ibc-warning {
    padding: 10px 12px;
    font-size: 0.78rem;
    border-radius: 10px;
  }

  .ibc-step-list {
    gap: 6px;
  }

  .ibc-step-list > li {
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 6px;
    padding: 8px;
    border-radius: 10px;
  }

  .ibc-step-num {
    width: 22px;
    height: 22px;
    font-size: 0.66rem;
  }

  .ibc-step-list h3 {
    margin-bottom: 2px;
    font-size: 0.72rem;
  }

  .ibc-step-list p {
    font-size: 0.58rem;
    line-height: 1.22;
  }

  .ibc-model-title {
    font-size: 1.05rem;
  }

  .calculator-box--ibc .inputs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calculator-box--ibc .internal-links {
    grid-column: 1 / -1;
  }

  .calculator-box--ibc .ibc-premium-note {
    grid-column: 1 / -1;
  }

  .tool-page-infinite-banking .calculator-box--ibc {
    gap: 10px !important;
    padding: 10px !important;
    border-radius: 16px !important;
    border-color: rgba(255, 255, 255, 0.075) !important;
    background: linear-gradient(145deg, rgba(30, 35, 50, 0.9), rgba(20, 25, 35, 0.9)) !important;
  }

  .tool-page-infinite-banking .calculator-box--ibc .inputs {
    gap: 7px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }

  .tool-page-infinite-banking .calculator-box--ibc .input-group {
    gap: 3px !important;
    padding: 6px !important;
    border-radius: 9px !important;
    border: 1px solid rgba(255, 255, 255, 0.075);
    background: rgba(255, 255, 255, 0.04) !important;
  }

  .tool-page-infinite-banking .ibc-scenario-box {
    grid-column: 1 / -1;
    gap: 5px;
    padding: 7px;
    border-radius: 9px;
    border-color: rgba(255, 255, 255, 0.075);
    background: rgba(255, 255, 255, 0.04);
  }

  .tool-page-infinite-banking .ibc-scenario-box p {
    font-size: 0.48rem;
  }

  .tool-page-infinite-banking .ibc-scenario-buttons {
    gap: 4px;
  }

  .tool-page-infinite-banking .ibc-scenario-btn {
    min-height: 28px;
    padding: 5px 3px;
    border-radius: 7px;
    font-size: 0.52rem;
  }

  .tool-page-infinite-banking .calculator-box--ibc .input-group label {
    font-size: 0.48rem !important;
    line-height: 1.1 !important;
    letter-spacing: 0.035em !important;
  }

  .tool-page-infinite-banking .ibc-input-note {
    font-size: 0.44rem;
    line-height: 1.1;
  }

  .tool-page-infinite-banking .ibc-premium-note {
    padding: 6px;
    border-radius: 8px;
    font-size: 0.46rem;
    line-height: 1.18;
    background: rgba(255, 255, 255, 0.04);
  }

  .tool-page-infinite-banking .calculator-box--ibc .input-group input[type="number"],
  .tool-page-infinite-banking .calculator-box--ibc .input-group input[data-currency-textbox="1"] {
    min-height: 28px !important;
    padding: 5px 6px !important;
    border-radius: 8px !important;
    font-size: 0.72rem !important;
  }

  .ibc-headline {
    margin-bottom: 8px;
    padding: 10px;
    border-radius: 11px;
  }

  .ibc-headline span,
  .ibc-headline em {
    font-size: 0.52rem;
  }

  .ibc-headline strong {
    font-size: 1.35rem;
  }

  .ibc-result-strip,
  .calculator-box--ibc .summary,
  .ibc-insight-grid {
    gap: 5px;
    margin-bottom: 8px;
  }

  .ibc-result-strip,
  .calculator-box--ibc .summary {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    width: 100%;
  }

  .ibc-insight-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    align-items: start;
    margin-top: 10px;
  }

  .ibc-result-strip div,
  .calculator-box--ibc .summary > div {
    min-height: 46px;
    gap: 2px;
    padding: 4px 2px;
    border-radius: 9px;
    min-width: 0;
    text-align: center;
  }

  .ibc-result-strip span,
  .calculator-box--ibc .summary > div {
    font-size: 0.38rem;
    line-height: 1.05;
    letter-spacing: 0.02em;
  }

  .ibc-result-strip strong,
  .calculator-box--ibc .summary strong {
    font-size: 0.5rem;
    line-height: 1.08;
  }

  .ibc-insight-card {
    min-height: 72px;
    height: 72px;
    display: grid;
    align-content: start;
    padding: 6px 4px;
    border-radius: 9px;
  }

  .tool-page-infinite-banking .ibc-insight-card--blue {
    align-self: stretch;
    display: grid;
    min-height: 72px;
    height: 72px;
    grid-template-rows: auto 1fr;
    gap: 2px;
    align-content: start;
    padding: 5px 3px;
    text-align: center;
  }

  .ibc-insight-card h3 {
    margin-bottom: 3px;
    font-size: 0.48rem;
    text-align: center;
  }

  .ibc-insight-card p {
    font-size: 0.43rem;
    line-height: 1.15;
  }

  .ibc-insight-card ul {
    gap: 1px;
  }

  .ibc-insight-card li {
    display: block;
    padding: 2px;
    text-align: center;
  }

  .ibc-insight-card li span {
    display: block;
    margin-bottom: 1px;
    font-size: 0.34rem;
    line-height: 1.05;
  }

  .ibc-insight-card li strong {
    font-size: 0.42rem;
    line-height: 1.05;
  }

  .tool-page-infinite-banking .ibc-insight-card--blue h3 {
    margin: 0;
    font-size: 0.5rem;
    line-height: 1.08;
    text-align: center;
  }

  .tool-page-infinite-banking .ibc-insight-card--blue ul {
    display: grid;
    gap: 2px;
    margin: 0;
    padding: 0;
    align-content: center;
    justify-items: center;
    place-items: center;
    text-align: center;
  }

  .tool-page-infinite-banking .ibc-insight-card--blue li {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    min-height: 0;
    width: 100%;
    padding: 1px 0;
    background: transparent;
    line-height: 1;
    text-align: center;
  }

  .tool-page-infinite-banking .ibc-insight-card--blue li span {
    display: block;
    width: 100%;
    margin-bottom: 0;
    font-size: 0.36rem;
    line-height: 1;
    text-align: center;
  }

  .tool-page-infinite-banking .ibc-insight-card--blue li strong {
    display: block;
    width: 100%;
    font-size: 0.46rem;
    line-height: 1;
    text-align: center;
  }

  .tool-page-infinite-banking .ibc-insight-card--gold p {
    font-size: 0.48rem;
    line-height: 1.16;
  }

  .tool-page-infinite-banking .calculator-box--ibc .ibc-related-tools {
    background: rgba(255, 255, 255, 0.04);
  }

  .seo-content.seo-content--ibc {
    background: rgba(0, 0, 0, 0.3);
  }

  .seo-content--ibc .ibc-guide-inner {
    padding: 18px;
    border-radius: 18px;
    background: transparent;
    border-color: rgba(255, 255, 255, 0.08);
  }

  .seo-content--ibc .ibc-toc {
    background: rgba(255, 255, 255, 0.04);
  }

  .tool-page-infinite-banking .calculator-box--ibc .ibc-related-tools {
    order: 20;
    margin-top: 2px;
    padding: 8px;
    border-radius: 10px;
    border-color: rgba(255, 255, 255, 0.075);
    background: rgba(255, 255, 255, 0.04);
  }

  .tool-page-infinite-banking .calculator-box--ibc .ibc-related-tools p {
    margin-bottom: 5px;
    font-size: 0.52rem;
    color: #bbf7d0;
  }

  .tool-page-infinite-banking .calculator-box--ibc .ibc-related-tools a {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 4px;
    padding: 5px 6px;
    border-radius: 8px;
    font-size: 0.56rem;
    color: #dcfce7;
  }

  .tool-page-infinite-banking .calculator-box--ibc .ibc-related-tools a small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #9ca3af;
    font-size: 0.46rem;
  }

  .internal-links {
    text-align: left;
  }

  .internal-links a {
    white-space: normal;
  }

  .historical-scenarios {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .historical-scenarios label {
    flex-basis: 100%;
  }

  .historical-btn {
    margin: 0;
  }
}


/* ===== MOBILE FUTURE WEALTH TIGHTENING ===== */
@media (max-width: 768px) {
  .future-wealth-page .calculator-container {
    padding-top: 10px;
    padding-bottom: 18px;
  }

  .future-wealth-page .page-title {
    font-size: 1.42rem;
    line-height: 1.12;
    margin-bottom: 10px;
  }

  .future-wealth-page .calculator-box {
    position: relative;
    gap: 10px;
    border-color: rgba(34, 197, 94, 0.18);
    background:
      radial-gradient(circle at 8% 8%, rgba(34, 197, 94, 0.17), transparent 32%),
      radial-gradient(circle at 88% 0%, rgba(56, 189, 248, 0.13), transparent 30%),
      linear-gradient(145deg, rgba(24, 30, 43, 0.96), rgba(10, 16, 28, 0.94));
    overflow: hidden;
  }

  .future-wealth-page .calculator-box::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, #22c55e, #38bdf8, #fbbf24);
  }

  .future-wealth-page .inputs {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 7px;
    padding: 8px;
    border: 1px solid rgba(34, 197, 94, 0.14);
    border-radius: 14px;
    background:
      linear-gradient(180deg, rgba(15, 23, 42, 0.84), rgba(15, 23, 42, 0.48)),
      radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.15), transparent 35%);
  }

  .future-wealth-page .input-group {
    gap: 3px;
    min-height: 58px;
    padding: 5px 6px !important;
    border-radius: 8px !important;
    border: 1px solid rgba(34, 197, 94, 0.12);
    background:
      radial-gradient(circle at 100% 0%, rgba(56, 189, 248, 0.07), transparent 34%),
      linear-gradient(135deg, rgba(255, 255, 255, 0.062), rgba(34, 197, 94, 0.026));
  }

  .future-wealth-page .input-group label {
    font-size: 0.5rem !important;
    line-height: 1.1 !important;
    letter-spacing: 0.035em !important;
  }

  .future-wealth-page .input-group input[type="number"] {
    min-height: 28px !important;
    padding: 5px 6px !important;
    border-radius: 8px !important;
    font-size: 0.72rem !important;
  }

  .future-wealth-page .value-display {
    display: none;
  }

  .future-wealth-page .wealth-result {
    padding: 8px;
    margin-bottom: 6px;
    border-radius: 10px;
    border-color: rgba(56, 189, 248, 0.14);
    background:
      radial-gradient(circle at 100% 0%, rgba(56, 189, 248, 0.14), transparent 34%),
      linear-gradient(145deg, rgba(30, 35, 50, 0.86), rgba(15, 23, 42, 0.9));
  }

  .future-wealth-page .wealth-result .big-number {
    font-size: 1.24rem;
    line-height: 1.05;
  }

  .future-wealth-page .wealth-result .subtitle {
    margin-top: 3px;
    font-size: 0.62rem;
    line-height: 1.25;
  }

  .future-wealth-page .wealth-tier {
    margin-top: 5px;
    padding: 3px 7px;
    border-radius: 999px;
    font-size: 0.58rem;
  }

  .future-wealth-page .age-milestones {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    margin: 5px 0;
  }

  .future-wealth-page .milestone-card {
    min-height: 40px;
    padding: 4px 2px;
    border-radius: 7px;
    border-color: rgba(56, 189, 248, 0.12);
    background: linear-gradient(145deg, rgba(56, 189, 248, 0.07), rgba(255, 255, 255, 0.025));
  }

  .future-wealth-page .milestone-card:first-child {
    border-color: rgba(34, 197, 94, 0.22);
    background: linear-gradient(145deg, rgba(34, 197, 94, 0.16), rgba(255, 255, 255, 0.03));
  }

  .future-wealth-page .milestone-card:nth-child(2) {
    border-color: rgba(56, 189, 248, 0.22);
    background: linear-gradient(145deg, rgba(56, 189, 248, 0.14), rgba(255, 255, 255, 0.026));
  }

  .future-wealth-page .milestone-card:nth-child(3) {
    border-color: rgba(251, 191, 36, 0.24);
    background: linear-gradient(145deg, rgba(251, 191, 36, 0.15), rgba(255, 255, 255, 0.026));
  }

  .future-wealth-page .milestone-card:nth-child(4) {
    border-color: rgba(168, 85, 247, 0.22);
    background: linear-gradient(145deg, rgba(168, 85, 247, 0.13), rgba(255, 255, 255, 0.024));
  }

  .future-wealth-page .milestone-card .age {
    margin-bottom: 2px;
    font-size: 0.48rem;
    line-height: 1.1;
  }

  .future-wealth-page .milestone-card .amount {
    font-size: 0.55rem;
    line-height: 1.12;
    overflow-wrap: anywhere;
  }

  .future-wealth-page .milestone-card .tier-label {
    display: none;
  }

  .future-wealth-page .chart-box canvas {
    height: 155px !important;
    max-height: 155px !important;
    margin: 4px 0;
  }

  .future-wealth-page .future-wealth-wide-panels {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 6px;
    margin-top: 2px;
  }

  .future-wealth-page .internal-links,
  .future-wealth-page .comparison-bar,
  .future-wealth-page .lifestyle-preview,
  .future-wealth-page .formula-section {
    padding: 8px;
    margin: 6px 0;
    border-radius: 9px;
    border-color: rgba(34, 197, 94, 0.16);
    background:
      radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.15), transparent 34%),
      radial-gradient(circle at 100% 0%, rgba(251, 191, 36, 0.1), transparent 32%),
      linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(15, 23, 42, 0.34));
  }

  .future-wealth-page .internal-links p {
    margin-bottom: 5px !important;
    font-size: 0.58rem !important;
    line-height: 1.15;
  }

  .future-wealth-page .internal-links a {
    min-height: 25px !important;
    padding: 4px 7px !important;
    border-radius: 7px !important;
    font-size: 0.58rem !important;
    line-height: 1.15 !important;
  }

  .future-wealth-page .internal-links a small {
    display: none;
  }

  .future-wealth-page .achievements {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 3px;
    margin: 5px 0;
  }

  .future-wealth-page .achievement {
    display: flex;
    min-height: 30px;
    align-items: center;
    justify-content: center;
    padding: 3px 2px;
    border-radius: 6px;
    font-size: 0.42rem;
    line-height: 1.05;
    text-align: center;
  }

  .future-wealth-page .comparison-bar h4,
  .future-wealth-page .lifestyle-preview h4,
  .future-wealth-page .formula-section h4 {
    margin-bottom: 6px;
    font-size: 0.68rem;
    line-height: 1.2;
  }

  .future-wealth-page .bar-container {
    height: 10px;
  }

  .future-wealth-page .bar-markers {
    margin-top: 4px;
    font-size: 0.5rem;
  }

  .future-wealth-page .lifestyle-items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }

  .future-wealth-page .lifestyle-item {
    gap: 4px;
    min-width: 0;
    padding: 5px;
    border-radius: 7px;
  }

  .future-wealth-page .lifestyle-item .icon {
    font-size: 0.9rem;
  }

  .future-wealth-page .lifestyle-item .text {
    font-size: 0.58rem;
    line-height: 1.15;
  }

  .future-wealth-page .formula,
  .future-wealth-page .formula-example {
    padding: 5px;
    margin-bottom: 4px;
    border-radius: 7px;
  }

  .future-wealth-page .formula-text {
    font-size: 0.56rem;
    line-height: 1.22;
  }

  .future-wealth-page .example-title {
    margin-bottom: 4px;
    font-size: 0.56rem;
  }

  .future-wealth-page .example-steps {
    display: flex;
    flex-direction: column;
    gap: 3px;
  }

  .future-wealth-page .example-column {
    display: contents;
    gap: 3px;
    min-width: 0;
  }

  .future-wealth-page .step {
    min-height: 0;
    padding: 3px 5px;
    border-radius: 5px;
  }

  .future-wealth-page .step-label,
  .future-wealth-page .step-value,
  .future-wealth-page .example-note {
    font-size: 0.54rem;
    line-height: 1.14;
  }

  .future-wealth-page .step-label {
    overflow-wrap: anywhere;
  }
}

@media (max-width: 768px) {
  .rent-buy-page,
  .emergency-fund-page {
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 8px;
    padding-bottom: 14px;
  }

  .rent-buy-page .page-title,
  .emergency-fund-page .page-title {
    font-size: 1.55rem;
    line-height: 1.12;
    margin-bottom: 12px;
  }

  .rent-buy-shell,
  .emergency-fund-box {
    gap: 8px;
  }

  .rent-buy-input-panel,
  .rent-buy-results-panel,
  .emergency-input-panel,
  .emergency-results-panel {
    padding: 8px;
    border-radius: 13px;
  }

  .rent-buy-input-panel,
  .rent-buy-results-panel {
    gap: 7px;
  }

  .rent-buy-input-card {
    padding: 8px;
    border-radius: 11px;
  }

  .rent-buy-card-head,
  .rent-buy-result-head {
    margin-bottom: 6px;
  }

  .rent-buy-card-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .rent-buy-card-head h2 {
    flex: 1 1 100%;
    font-size: 0.86rem;
  }

  .rent-buy-card-head span,
  .rent-buy-result-head span,
  .rent-buy-control label,
  .rent-buy-input-card .debt-field span,
  .rent-buy-winner span,
  .rent-buy-result-grid span,
  .emergency-hero-result span,
  .emergency-progress-label span {
    font-size: 0.58rem;
    line-height: 1.15;
  }

  .rent-buy-control strong {
    font-size: 0.96rem;
    margin: 2px 0 4px;
  }

  .rent-buy-mobile-row {
    gap: 6px;
  }

  .rent-buy-mobile-row .rent-buy-control,
  .rent-buy-mobile-row .debt-field {
    margin-bottom: 6px;
  }

  .rent-buy-mobile-row .rent-buy-control strong {
    min-height: 20px;
  }

  .rent-buy-mobile-row .rent-buy-control > strong:not(.rent-buy-down-value) {
    font-size: 0.9rem;
    white-space: nowrap;
  }

  .rent-buy-down-value {
    display: flex !important;
    gap: 3px;
    align-items: center;
    justify-content: flex-end;
    font-size: 0.74rem !important;
  }

  .rent-buy-down-value #downPaymentValue {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .rent-buy-control input[type="number"],
  .rent-buy-control input[data-currency-textbox="1"],
  .rent-buy-input-card .debt-field input {
    min-height: 29px;
    padding: 5px 6px;
    border-radius: 8px;
    font-size: 0.7rem;
  }

  .rent-buy-pct-wrap {
    display: inline-flex;
    align-items: center;
    font-size: 0.66rem;
    margin-left: 0;
  }

  .rent-buy-pct-wrap input {
    width: 32px;
    min-height: 21px;
    border-radius: 7px;
    font-size: 0.66rem;
    padding: 3px 1px 3px 4px;
  }

  .rent-buy-control div {
    font-size: 0.68rem;
  }

  .rent-buy-result-grid article,
  .rent-buy-chart-card,
  .rent-buy-winner {
    padding: 9px;
    border-radius: 11px;
  }

  .rent-buy-result-grid strong {
    font-size: 0.86rem;
    margin: 3px 0 7px;
  }

  .rent-buy-mini-stats {
    gap: 5px;
    margin-top: 6px;
  }

  .rent-buy-mini-stats div {
    padding: 6px 4px;
  }

  .rent-buy-mini-stats strong {
    font-size: 0.66rem;
  }

  .rent-buy-chart-card {
    height: 220px;
  }

  .rent-buy-chart-card canvas {
    height: 170px !important;
  }

  .emergency-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .emergency-input-panel .debt-panel-head {
    margin-bottom: 10px;
  }

  .emergency-input-panel .debt-panel-head h2,
  .emergency-results-panel .debt-panel-head h2 {
    font-size: 1rem;
  }

  .emergency-input-panel .debt-panel-head p,
  .emergency-results-panel .debt-panel-head p {
    font-size: 0.76rem;
    line-height: 1.35;
  }

  .emergency-form-grid .debt-field {
    gap: 5px;
    padding: 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.06);
  }

  .emergency-form-grid .debt-field:first-child,
  .emergency-form-grid .debt-field:nth-child(2),
  .emergency-form-grid .debt-field:nth-child(3) {
    grid-column: 1 / -1;
  }

  .emergency-form-grid .debt-field span {
    color: #9ca3af;
    font-size: 0.56rem;
    line-height: 1.12;
  }

  .emergency-form-grid .debt-field input,
  .emergency-form-grid .debt-field select {
    min-height: 34px;
    padding: 7px 8px;
    border-radius: 8px;
    font-size: 0.78rem;
  }

  .emergency-hero-result {
    padding: 14px;
    margin-bottom: 10px;
    border-radius: 13px;
  }

  .emergency-hero-result strong {
    font-size: 1.65rem;
  }

  .emergency-hero-result p {
    font-size: 0.8rem;
  }

  .emergency-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin-bottom: 10px;
  }

  .emergency-summary-grid div {
    min-width: 0;
    padding: 10px 6px;
  }

  .emergency-summary-grid span {
    font-size: 0.52rem;
    line-height: 1.15;
  }

  .emergency-summary-grid strong {
    font-size: 0.78rem;
    overflow-wrap: anywhere;
  }

  .emergency-progress-wrap {
    padding: 12px;
    border-radius: 12px;
  }
}


/* ===== MOBILE EMERGENCY FUND TIGHTENING ===== */
@media (max-width: 768px) {
  .emergency-fund-page {
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 10px;
    padding-bottom: 18px;
  }

  .emergency-fund-page .page-title {
    font-size: 1.42rem;
    line-height: 1.12;
    margin-bottom: 10px;
  }

  .emergency-fund-page .emi-page-lead {
    margin-bottom: 12px;
    font-size: 0.78rem;
    line-height: 1.35;
  }

  .calculator-box.emergency-fund-box {
    gap: 7px;
    padding: 0 !important;
    border-radius: 11px;
  }

  .emergency-input-panel,
  .emergency-results-panel {
    padding: 8px;
    border-radius: 11px;
    border: 1px solid rgba(34, 197, 94, 0.14);
    background:
      radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.13), transparent 34%),
      linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.5));
  }

  .emergency-input-panel .debt-panel-head,
  .emergency-results-panel .debt-panel-head {
    margin-bottom: 8px;
  }

  .emergency-input-panel .debt-panel-head h2,
  .emergency-results-panel .debt-panel-head h2 {
    font-size: 0.88rem;
    line-height: 1.18;
  }

  .emergency-input-panel .debt-panel-head p,
  .emergency-results-panel .debt-panel-head p {
    font-size: 0.66rem;
    line-height: 1.28;
  }

  .emergency-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 7px;
  }

  .emergency-form-grid .debt-field,
  .emergency-form-grid .debt-field:first-child,
  .emergency-form-grid .debt-field:nth-child(2),
  .emergency-form-grid .debt-field:nth-child(3) {
    grid-column: auto;
  }

  .emergency-form-grid .debt-field {
    gap: 3px;
    padding: 6px !important;
    border-radius: 9px !important;
    border: 1px solid rgba(34, 197, 94, 0.12);
    background:
      radial-gradient(circle at 100% 0%, rgba(56, 189, 248, 0.08), transparent 36%),
      linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(34, 197, 94, 0.025));
  }

  .emergency-form-grid .debt-field:nth-child(1) {
    border-color: rgba(34, 197, 94, 0.2);
    background:
      radial-gradient(circle at 100% 0%, rgba(34, 197, 94, 0.13), transparent 36%),
      linear-gradient(135deg, rgba(34, 197, 94, 0.075), rgba(255, 255, 255, 0.025));
  }

  .emergency-form-grid .debt-field:nth-child(2) {
    border-color: rgba(56, 189, 248, 0.2);
    background:
      radial-gradient(circle at 100% 0%, rgba(56, 189, 248, 0.13), transparent 36%),
      linear-gradient(135deg, rgba(56, 189, 248, 0.07), rgba(255, 255, 255, 0.025));
  }

  .emergency-form-grid .debt-field:nth-child(3) {
    border-color: rgba(250, 204, 21, 0.18);
    background:
      radial-gradient(circle at 100% 0%, rgba(250, 204, 21, 0.12), transparent 36%),
      linear-gradient(135deg, rgba(250, 204, 21, 0.06), rgba(255, 255, 255, 0.025));
  }

  .emergency-form-grid .debt-field span {
    font-size: 0.48rem !important;
    line-height: 1.1 !important;
    letter-spacing: 0.035em;
  }

  .emergency-form-grid .debt-field input,
  .emergency-form-grid .debt-field select {
    min-height: 28px !important;
    padding: 5px 6px !important;
    border-radius: 8px !important;
    font-size: 0.72rem !important;
  }

  .emergency-form-grid .debt-field:last-child {
    grid-column: 1 / -1;
  }

  .emergency-hero-result {
    padding: 9px;
    margin-bottom: 8px;
    border-radius: 11px;
    border-color: rgba(34, 197, 94, 0.22);
    background:
      radial-gradient(circle at 100% 0%, rgba(56, 189, 248, 0.14), transparent 34%),
      linear-gradient(135deg, rgba(34, 197, 94, 0.14), rgba(15, 23, 42, 0.34));
  }

  .emergency-hero-result span,
  .emergency-progress-label span {
    font-size: 0.52rem;
    line-height: 1.15;
  }

  .emergency-hero-result strong {
    margin-top: 4px;
    font-size: 1.32rem;
    line-height: 1.05;
  }

  .emergency-hero-result p {
    margin-top: 4px;
    font-size: 0.64rem;
    line-height: 1.25;
  }

  .emergency-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3px;
    margin-bottom: 5px;
  }

  .emergency-summary-grid div {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 44px;
    padding: 4px 2px;
    border-radius: 7px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
  }

  .emergency-summary-grid div:nth-child(1) {
    border-color: rgba(248, 113, 113, 0.22);
    background:
      radial-gradient(circle at 100% 0%, rgba(248, 113, 113, 0.16), transparent 38%),
      linear-gradient(145deg, rgba(127, 29, 29, 0.22), rgba(255, 255, 255, 0.026));
  }

  .emergency-summary-grid div:nth-child(2) {
    border-color: rgba(56, 189, 248, 0.22);
    background:
      radial-gradient(circle at 100% 0%, rgba(56, 189, 248, 0.16), transparent 38%),
      linear-gradient(145deg, rgba(14, 116, 144, 0.18), rgba(255, 255, 255, 0.026));
  }

  .emergency-summary-grid div:nth-child(3) {
    border-color: rgba(34, 197, 94, 0.22);
    background:
      radial-gradient(circle at 100% 0%, rgba(34, 197, 94, 0.16), transparent 38%),
      linear-gradient(145deg, rgba(20, 83, 45, 0.22), rgba(255, 255, 255, 0.026));
  }

  .emergency-summary-grid span {
    display: block;
    font-size: 0.5rem;
    line-height: 1.1;
  }

  .emergency-summary-grid strong {
    display: block;
    margin-top: 2px;
    font-size: 0.64rem;
    line-height: 1.15;
    overflow-wrap: anywhere;
  }

  .emergency-progress-wrap {
    padding: 8px;
    border-radius: 10px;
    border-color: rgba(56, 189, 248, 0.16);
    background: linear-gradient(145deg, rgba(56, 189, 248, 0.08), rgba(15, 23, 42, 0.42));
  }

  .emergency-progress-label {
    margin-bottom: 5px;
  }

  .emergency-progress-label strong {
    font-size: 0.68rem;
  }

  .emergency-progress-track {
    height: 8px;
  }

  .emergency-interpret-section {
    margin: 7px 0 10px;
    padding: 9px;
    border: 1px solid rgba(56, 189, 248, 0.18);
    border-radius: 10px;
    background:
      radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.12), transparent 34%),
      linear-gradient(145deg, rgba(56, 189, 248, 0.08), rgba(15, 23, 42, 0.42));
  }

  .emergency-interpret-section h2 {
    margin: 0 0 5px;
    color: #86efac;
    font-size: 0.78rem;
    line-height: 1.15;
  }

  .emergency-interpret-section p {
    margin: 0 0 5px;
    color: #cbd5e1;
    font-size: 0.62rem;
    line-height: 1.28;
  }

  .emergency-interpret-section p:last-child {
    margin-bottom: 0;
  }

}

@media (max-width: 768px) {
  .retirement-page .calculator-container {
    padding: 10px 10px 18px;
  }

  .retirement-page .page-title {
    font-size: 1.55rem;
    line-height: 1.12;
    margin-bottom: 12px;
  }

  .retirement-page .page-subtitle {
    margin-bottom: 14px;
    font-size: 0.86rem;
  }

  .retirement-page .calculator-box {
    position: relative;
    gap: 12px;
    padding: 12px;
    border-radius: 16px;
    border-color: rgba(34, 197, 94, 0.18);
    background:
      radial-gradient(circle at 8% 8%, rgba(34, 197, 94, 0.17), transparent 32%),
      radial-gradient(circle at 88% 0%, rgba(56, 189, 248, 0.13), transparent 30%),
      linear-gradient(145deg, rgba(24, 30, 43, 0.96), rgba(10, 16, 28, 0.94));
    overflow: hidden;
  }

  .retirement-page .calculator-box::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, #22c55e, #38bdf8, #fbbf24);
  }

  .retirement-page .inputs {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 7px;
    padding: 8px;
    border: 1px solid rgba(34, 197, 94, 0.14);
    border-radius: 14px;
    background:
      linear-gradient(180deg, rgba(15, 23, 42, 0.84), rgba(15, 23, 42, 0.48)),
      radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.15), transparent 35%);
  }

  .retirement-page .assumptions-tooltip,
  .retirement-page .internal-links,
  .retirement-page .input-group:has(#retirementSpend) {
    grid-column: 1 / -1;
  }

  .retirement-page .input-group:has(#currentAge) {
    grid-column: span 2;
    order: 1;
  }

  .retirement-page .input-group:has(#annualIncome) {
    grid-column: span 2;
    order: 2;
  }

  .retirement-page .input-group:has(#retirementAge) {
    grid-column: span 2;
    order: 3;
  }

  .retirement-page .input-group:has(#currentSavings) {
    grid-column: span 3;
    order: 4;
  }

  .retirement-page .input-group:has(#monthlyContribution) {
    grid-column: span 3;
    order: 5;
  }

  .retirement-page .input-group:has(#retirementSpend) {
    order: 6;
  }

  .retirement-page .assumptions-tooltip {
    width: 100%;
    justify-content: space-between;
    margin-bottom: 0;
    padding: 8px 10px;
    border-color: rgba(56, 189, 248, 0.24);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(34, 197, 94, 0.08));
    font-size: 0.72rem;
  }

  .retirement-page .retirement-related-tools {
    margin-top: 0;
    padding: 10px;
    border-radius: 12px;
    background:
      radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.18), transparent 42%),
      linear-gradient(145deg, rgba(15, 23, 42, 0.78), rgba(34, 197, 94, 0.08));
  }

  .retirement-page .retirement-related-tools p {
    margin-bottom: 7px;
    font-size: 0.64rem;
    color: #bbf7d0;
  }

  .retirement-page .retirement-related-tools a {
    padding: 5px 7px;
    margin: 3px 3px 3px 0;
    border-radius: 8px;
    font-size: 0.66rem;
  }

  .retirement-page .retirement-related-tools a small {
    display: none;
  }

  .retirement-page .input-group {
    gap: 4px;
    min-width: 0;
    padding: 8px;
    border-radius: 10px;
    background:
      radial-gradient(circle at 100% 0%, rgba(56, 189, 248, 0.07), transparent 34%),
      linear-gradient(135deg, rgba(255, 255, 255, 0.062), rgba(34, 197, 94, 0.026));
    border: 1px solid rgba(34, 197, 94, 0.12);
  }

  .retirement-page .input-group label {
    font-size: 0.52rem;
    line-height: 1.1;
    letter-spacing: 0.045em;
  }

  .retirement-page .input-group:has(#annualIncome) label {
    font-size: 0.49rem;
    white-space: nowrap;
  }

  .retirement-page .input-group input[type="number"] {
    min-height: 31px;
    padding: 6px 7px;
    border-radius: 7px;
    font-size: 0.74rem;
  }

  .retirement-page .value-display {
    display: none;
  }

  .retirement-page .input-group label:has(#spendFromIncome) {
    margin-top: 4px !important;
    font-size: 0.64rem !important;
    line-height: 1.2;
    text-transform: none;
    letter-spacing: 0;
  }

  .retirement-page .input-group:has(#currentAge),
  .retirement-page .input-group:has(#annualIncome),
  .retirement-page .input-group:has(#retirementAge),
  .retirement-page .input-group:has(#currentSavings),
  .retirement-page .input-group:has(#monthlyContribution),
  .retirement-page .input-group:has(#retirementSpend) {
    gap: 3px !important;
    padding: 6px !important;
    border-radius: 9px !important;
  }

  .retirement-page .input-group:has(#currentAge) label,
  .retirement-page .input-group:has(#annualIncome) label,
  .retirement-page .input-group:has(#retirementAge) label,
  .retirement-page .input-group:has(#currentSavings) label,
  .retirement-page .input-group:has(#monthlyContribution) label,
  .retirement-page .input-group:has(#retirementSpend) label:first-child {
    font-size: 0.48rem !important;
    line-height: 1.05 !important;
  }

  .retirement-page .input-group:has(#currentAge) input,
  .retirement-page .input-group:has(#annualIncome) input,
  .retirement-page .input-group:has(#retirementAge) input,
  .retirement-page .input-group:has(#currentSavings) input,
  .retirement-page .input-group:has(#monthlyContribution) input,
  .retirement-page .input-group:has(#retirementSpend) input[type="number"] {
    min-height: 28px !important;
    padding: 5px 6px !important;
    font-size: 0.7rem !important;
  }

  .retirement-overview {
    padding: 11px;
    margin-bottom: 10px;
    border-radius: 12px;
    border-color: rgba(56, 189, 248, 0.14);
    background:
      radial-gradient(circle at 100% 0%, rgba(56, 189, 248, 0.14), transparent 34%),
      linear-gradient(145deg, rgba(30, 35, 50, 0.86), rgba(15, 23, 42, 0.9));
  }

  .retirement-overview-top {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
    margin-bottom: 9px;
  }

  .retirement-overview-copy .eyebrow {
    gap: 6px;
    margin-bottom: 5px;
    font-size: 0.66rem;
    line-height: 1.15;
  }

  .retirement-overview-copy .eyebrow .ui-icon {
    width: 16px;
    height: 16px;
  }

  .retirement-big-number {
    font-size: 1.55rem;
  }

  .retirement-big-subtitle,
  .retirement-chart-note {
    font-size: 0.68rem;
    line-height: 1.28;
  }

  .retirement-big-subtitle {
    margin-top: 5px;
  }

  .readiness-pill {
    width: 100%;
    justify-content: center;
    padding: 6px 9px;
    border-radius: 9px;
    font-size: 0.68rem;
    line-height: 1.15;
  }

  .readiness-meter {
    margin-top: 6px;
  }

  .readiness-meter-row {
    margin-bottom: 5px;
    font-size: 0.66rem;
    line-height: 1.2;
  }

  .readiness-meter-track {
    height: 8px;
  }

  .retirement-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin: 9px 0;
  }

  .retirement-milestones {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    margin: 7px 0 2px;
  }

  .retirement-stat,
  .retirement-milestone {
    display: block;
    padding: 8px 6px;
    border-radius: 9px;
  }

  .retirement-page .retirement-stat {
    border: 1px solid rgba(34, 197, 94, 0.12) !important;
    background:
      radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.12), transparent 36%),
      linear-gradient(145deg, rgba(255, 255, 255, 0.058), rgba(56, 189, 248, 0.03)) !important;
  }

  .retirement-stat {
    border-color: rgba(34, 197, 94, 0.12);
    background:
      radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.12), transparent 36%),
      linear-gradient(145deg, rgba(255, 255, 255, 0.058), rgba(56, 189, 248, 0.03));
  }

  .retirement-milestone {
    padding: 6px 3px;
    text-align: center;
    border-color: rgba(56, 189, 248, 0.12);
    background: linear-gradient(145deg, rgba(56, 189, 248, 0.07), rgba(255, 255, 255, 0.025));
  }

  .retirement-milestone:first-child {
    border-color: rgba(34, 197, 94, 0.22);
    background: linear-gradient(145deg, rgba(34, 197, 94, 0.16), rgba(255, 255, 255, 0.03));
  }

  .retirement-milestone:nth-child(2) {
    border-color: rgba(56, 189, 248, 0.22);
    background: linear-gradient(145deg, rgba(56, 189, 248, 0.14), rgba(255, 255, 255, 0.026));
  }

  .retirement-milestone:nth-child(3) {
    border-color: rgba(251, 191, 36, 0.24);
    background: linear-gradient(145deg, rgba(251, 191, 36, 0.15), rgba(255, 255, 255, 0.026));
  }

  .retirement-milestone:nth-child(4) {
    border-color: rgba(168, 85, 247, 0.22);
    background: linear-gradient(145deg, rgba(168, 85, 247, 0.13), rgba(255, 255, 255, 0.024));
  }

  .retirement-milestone:nth-child(5) {
    border-color: rgba(244, 114, 182, 0.22);
    background: linear-gradient(145deg, rgba(244, 114, 182, 0.13), rgba(255, 255, 255, 0.024));
  }

  .retirement-stat-icon {
    display: none;
  }

  .retirement-stat-value,
  .retirement-milestone-value {
    font-size: 0.78rem;
    overflow-wrap: anywhere;
  }

  .retirement-stat-label,
  .retirement-stat-note,
  .retirement-milestone-age {
    font-size: 0.55rem;
    line-height: 1.18;
  }

  .retirement-milestone-value {
    margin-top: 3px;
    font-size: 0.58rem;
    line-height: 1.12;
  }

  .retirement-stat-note {
    display: none;
  }

  .retirement-milestone-note {
    display: none;
  }

  .retirement-page .chart-box canvas {
    max-height: 210px;
  }

  .retirement-callout {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .retirement-callout-card {
    position: relative;
    overflow: hidden;
    padding: 12px;
    border-radius: 12px;
    border-color: rgba(34, 197, 94, 0.16);
    background:
      radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.15), transparent 34%),
      radial-gradient(circle at 100% 0%, rgba(251, 191, 36, 0.1), transparent 32%),
      linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(15, 23, 42, 0.34));
  }

  .retirement-callout-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 2px;
    background: linear-gradient(90deg, #22c55e, #38bdf8, #fbbf24);
  }

  .retirement-callout-card h4 {
    position: relative;
    color: #ecfdf5;
    font-size: 0.88rem;
  }

  .retirement-callout-card p,
  .retirement-callout-card li,
  .retirement-assumption {
    position: relative;
    font-size: 0.74rem;
    line-height: 1.35;
  }

  .retirement-assumption {
    padding: 5px 7px;
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 9px;
    background: rgba(15, 23, 42, 0.32);
  }
}


/* ===== DESKTOP BITCOIN MILLIONAIRE COMPACT ===== */
@media (min-width: 901px) {
  body.bitcoin-millionaire-page main > .calculator-container {
    max-width: 1400px;
    padding-top: 28px;
    padding-bottom: 28px;
  }

  body.bitcoin-millionaire-page main .page-title {
    margin-bottom: 16px;
    font-size: 2.25rem;
    line-height: 1.08;
    background: linear-gradient(135deg, #fff7ed, #f7931a 55%, #facc15);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }

  body.bitcoin-millionaire-page main .calculator-box {
    position: relative;
    grid-template-columns: minmax(270px, 0.66fr) minmax(0, 1.34fr);
    gap: 22px;
    padding: 22px;
    border-radius: 20px;
    border-color: rgba(247, 147, 26, 0.22);
    background:
      radial-gradient(circle at 8% 8%, rgba(247, 147, 26, 0.18), transparent 32%),
      radial-gradient(circle at 90% 0%, rgba(250, 204, 21, 0.12), transparent 30%),
      linear-gradient(145deg, rgba(24, 30, 43, 0.96), rgba(10, 16, 28, 0.94));
    box-shadow: 0 24px 58px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    overflow: hidden;
  }

  body.bitcoin-millionaire-page main .calculator-box::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, #f7931a, #facc15, #fb7185);
  }

  body.bitcoin-millionaire-page main .inputs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(247, 147, 26, 0.16);
    border-radius: 16px;
    background:
      linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.5)),
      radial-gradient(circle at 0% 0%, rgba(247, 147, 26, 0.16), transparent 35%);
  }

  body.bitcoin-millionaire-page main .input-group:nth-child(n + 5),
  body.bitcoin-millionaire-page main .model-explanation,
  body.bitcoin-millionaire-page main .btc-price-prediction,
  body.bitcoin-millionaire-page main .bitcoin-related-tools {
    grid-column: 1 / -1;
  }

  body.bitcoin-millionaire-page main .input-group {
    gap: 5px;
    padding: 9px;
    border: 1px solid rgba(247, 147, 26, 0.13);
    border-radius: 12px;
    background:
      radial-gradient(circle at 100% 0%, rgba(250, 204, 21, 0.08), transparent 34%),
      linear-gradient(135deg, rgba(255, 255, 255, 0.062), rgba(247, 147, 26, 0.03));
  }

  body.bitcoin-millionaire-page main .input-group label {
    font-size: 0.68rem;
    letter-spacing: 0.04em;
  }

  body.bitcoin-millionaire-page main .input-group input[type="number"],
  body.bitcoin-millionaire-page main .input-group input[data-currency-textbox="1"] {
    min-height: 35px;
    padding: 7px 10px;
    border-radius: 9px;
    border-color: rgba(247, 147, 26, 0.24);
    background: rgba(6, 12, 24, 0.78);
    font-size: 0.88rem;
  }

  body.bitcoin-millionaire-page main .value-display {
    display: none;
  }

  body.bitcoin-millionaire-page main .model-buttons {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  body.bitcoin-millionaire-page main .model-buttons .pred-btn {
    display: grid;
    min-width: 0;
    min-height: 64px;
    grid-template-rows: 1fr auto;
    justify-items: center;
    gap: 4px;
    padding: 8px 5px;
    border-radius: 11px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(247, 147, 26, 0.035));
    text-align: center;
  }

  body.bitcoin-millionaire-page main .model-buttons .pred-btn.active {
    background:
      radial-gradient(circle at 50% 0%, rgba(250, 204, 21, 0.18), transparent 54%),
      linear-gradient(145deg, rgba(247, 147, 26, 0.24), rgba(247, 147, 26, 0.08));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }

  body.bitcoin-millionaire-page main .model-buttons .pred-btn .btn-label {
    display: grid;
    justify-items: center;
    gap: 4px;
  }

  body.bitcoin-millionaire-page main .model-buttons .pred-btn .ui-icon {
    width: 18px;
    height: 18px;
  }

  body.bitcoin-millionaire-page main .model-buttons .model-title {
    font-size: 0.7rem;
    line-height: 1.05;
  }

  body.bitcoin-millionaire-page main .model-buttons .pred-btn > span:last-child {
    font-size: 0.6rem;
    line-height: 1.1;
  }

  body.bitcoin-millionaire-page main .model-explanation {
    gap: 0;
    margin-top: 0;
    padding: 11px;
    border-left-width: 3px;
    border-color: rgba(247, 147, 26, 0.42);
    border-radius: 12px;
    background:
      radial-gradient(circle at 100% 0%, rgba(251, 191, 36, 0.12), transparent 42%),
      linear-gradient(135deg, rgba(247, 147, 26, 0.11), rgba(15, 23, 42, 0.28));
  }

  body.bitcoin-millionaire-page main .model-explanation .model-icon {
    display: none;
  }

  body.bitcoin-millionaire-page main .model-explanation .model-text strong {
    margin-bottom: 4px;
    font-size: 0.82rem;
  }

  body.bitcoin-millionaire-page main .model-explanation .model-text p {
    font-size: 0.72rem;
    line-height: 1.38;
  }

  body.bitcoin-millionaire-page main .btc-price-prediction {
    margin-top: 0;
    padding: 11px;
    border-radius: 12px;
    background:
      radial-gradient(circle at 100% 0%, rgba(250, 204, 21, 0.14), transparent 44%),
      linear-gradient(135deg, rgba(247, 147, 26, 0.11), rgba(255, 255, 255, 0.03));
  }

  body.bitcoin-millionaire-page main .btc-price-status {
    margin-top: 2px;
    font-size: 0.62rem;
  }

  body.bitcoin-millionaire-page main .currency-pill {
    padding: 2px 6px;
    font-size: 0.58rem;
  }

  body.bitcoin-millionaire-page main .prediction-header {
    margin-bottom: 8px;
    font-size: 0.78rem;
  }

  body.bitcoin-millionaire-page main .prediction-source {
    margin-top: 7px;
    font-size: 0.62rem;
  }

  body.bitcoin-millionaire-page main .price-grid {
    gap: 7px;
  }

  body.bitcoin-millionaire-page main .price-cell {
    gap: 3px;
    padding: 8px 5px;
    border: 1px solid rgba(247, 147, 26, 0.12);
    background: rgba(15, 23, 42, 0.36);
  }

  body.bitcoin-millionaire-page main .price-year-label,
  body.bitcoin-millionaire-page main .price-change {
    font-size: 0.6rem;
  }

  body.bitcoin-millionaire-page main .price-value {
    font-size: 0.74rem;
  }

  body.bitcoin-millionaire-page main .chart-box {
    justify-content: flex-start;
  }

  body.bitcoin-millionaire-page main .millionaire-result {
    display: flex;
    min-height: 132px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    padding: 16px;
    border-width: 1px;
    border-radius: 18px;
    background:
      radial-gradient(circle at 50% 0%, rgba(250, 204, 21, 0.18), transparent 42%),
      linear-gradient(145deg, rgba(247, 147, 26, 0.17), rgba(15, 23, 42, 0.58));
  }

  body.bitcoin-millionaire-page main .millionaire-result .result-icon {
    display: none;
  }

  body.bitcoin-millionaire-page main .result-year {
    margin-bottom: 5px;
    font-size: clamp(2.15rem, 3.2vw, 3rem);
  }

  body.bitcoin-millionaire-page main .result-text {
    margin-bottom: 4px;
    font-size: 0.92rem;
  }

  body.bitcoin-millionaire-page main .result-subtext {
    font-size: 0.78rem;
  }

  body.bitcoin-millionaire-page main .bitcoin-snapshot {
    gap: 10px;
    margin-bottom: 12px;
  }

  body.bitcoin-millionaire-page main .snapshot-card {
    min-height: 70px;
    gap: 5px;
    padding: 11px;
    border-radius: 14px;
  }

  body.bitcoin-millionaire-page main .snapshot-card span {
    font-size: 0.64rem;
  }

  body.bitcoin-millionaire-page main .snapshot-card strong {
    font-size: 0.88rem;
  }

  body.bitcoin-millionaire-page main .btc-stats {
    gap: 10px;
    margin-bottom: 12px;
  }

  body.bitcoin-millionaire-page main .stat-box {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    min-height: 76px;
    align-items: center;
    column-gap: 9px;
    padding: 11px;
    border-radius: 14px;
    text-align: left;
    background:
      radial-gradient(circle at 0% 0%, rgba(247, 147, 26, 0.13), transparent 38%),
      linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(15, 23, 42, 0.26));
  }

  body.bitcoin-millionaire-page main .stat-box:nth-child(2) {
    background:
      radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.14), transparent 38%),
      linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(15, 23, 42, 0.26));
  }

  body.bitcoin-millionaire-page main .stat-box:nth-child(3) {
    background:
      radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.14), transparent 38%),
      linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(15, 23, 42, 0.26));
  }

  body.bitcoin-millionaire-page main .stat-icon {
    grid-row: span 2;
    display: flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    margin: 0;
    border-radius: 11px;
    background: rgba(247, 147, 26, 0.14);
    color: #fbbf24;
    font-size: 1.1rem;
  }

  body.bitcoin-millionaire-page main .stat-value {
    align-self: end;
    margin-bottom: 3px;
    font-size: 1rem;
    line-height: 1;
  }

  body.bitcoin-millionaire-page main .stat-label {
    align-self: start;
    font-size: 0.66rem;
    line-height: 1.12;
    letter-spacing: 0.035em;
  }

  body.bitcoin-millionaire-page main .milestone-timeline,
  body.bitcoin-millionaire-page main .scenario-comparison {
    margin-bottom: 12px;
    padding: 13px;
    border: 1px solid rgba(247, 147, 26, 0.13);
    border-radius: 15px;
    background:
      radial-gradient(circle at 100% 0%, rgba(247, 147, 26, 0.11), transparent 38%),
      linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(15, 23, 42, 0.28));
  }

  body.bitcoin-millionaire-page main .timeline-title,
  body.bitcoin-millionaire-page main .scenario-title {
    justify-content: flex-start;
    margin-bottom: 9px;
    font-size: 0.84rem;
    text-align: left;
  }

  body.bitcoin-millionaire-page main .timeline-track {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    padding: 0;
  }

  body.bitcoin-millionaire-page main .timeline-track::before {
    display: none;
  }

  body.bitcoin-millionaire-page main .milestone-marker {
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr);
    min-height: 50px;
    align-items: center;
    column-gap: 6px;
    row-gap: 2px;
    padding: 7px 6px;
    border: 1px solid rgba(247, 147, 26, 0.1);
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.34);
    text-align: left;
  }

  body.bitcoin-millionaire-page main .marker-dot {
    grid-row: span 2;
    justify-self: center;
    width: 10px;
    height: 10px;
    border-width: 2px;
  }

  body.bitcoin-millionaire-page main .marker-label {
    align-self: end;
    font-size: 0.68rem;
    line-height: 1;
  }

  body.bitcoin-millionaire-page main .marker-year {
    align-self: start;
    margin-top: 3px;
    font-size: 0.74rem;
    line-height: 1;
  }

  body.bitcoin-millionaire-page main .chart-box canvas {
    max-height: 250px;
    margin: 4px 0 12px;
  }

  body.bitcoin-millionaire-page main .internal-links {
    margin: 0 0 12px;
    padding: 9px 11px;
    border: 1px solid rgba(247, 147, 26, 0.14);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(247, 147, 26, 0.1), rgba(15, 23, 42, 0.28));
  }

  body.bitcoin-millionaire-page main .internal-links p {
    font-size: 0.72rem;
  }

  body.bitcoin-millionaire-page main .internal-links a {
    padding: 5px 8px;
    font-size: 0.72rem;
  }

  body.bitcoin-millionaire-page main .bitcoin-related-tools {
    margin: 0;
  }

  body.bitcoin-millionaire-page main .scenario-comparison {
    margin-top: 0;
    margin-bottom: 0;
  }

  body.bitcoin-millionaire-page main .scenarios {
    gap: 8px;
  }

  body.bitcoin-millionaire-page main .scenario-box {
    padding: 10px 8px;
    border-radius: 11px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(247, 147, 26, 0.026));
  }

  body.bitcoin-millionaire-page main .scenario-year {
    font-size: 1.05rem;
  }

  body.bitcoin-millionaire-page main .scenario-name {
    font-size: 0.7rem;
  }
}


/* ===== DESKTOP RETIREMENT COMPACT ===== */
@media (min-width: 901px) {
  body.retirement-page main > .calculator-container {
    max-width: 1400px;
    padding-top: 28px;
    padding-bottom: 28px;
  }

  body.retirement-page main .page-title {
    margin-bottom: 14px;
    font-size: 2.25rem;
    line-height: 1.08;
  }

  body.retirement-page main .page-subtitle {
    max-width: 760px;
    margin-bottom: 22px;
    font-size: 0.94rem;
    line-height: 1.45;
  }

  body.retirement-page main .calculator-box {
    position: relative;
    grid-template-columns: minmax(250px, 0.62fr) minmax(0, 1.38fr);
    gap: 24px;
    padding: 24px;
    border-radius: 20px;
    border-color: rgba(34, 197, 94, 0.18);
    background:
      radial-gradient(circle at 8% 8%, rgba(34, 197, 94, 0.17), transparent 32%),
      radial-gradient(circle at 88% 0%, rgba(56, 189, 248, 0.13), transparent 30%),
      linear-gradient(145deg, rgba(24, 30, 43, 0.96), rgba(10, 16, 28, 0.94));
    box-shadow: 0 24px 58px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    overflow: hidden;
  }

  body.retirement-page main .calculator-box::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, #22c55e, #38bdf8, #fbbf24);
  }

  body.retirement-page main .inputs {
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(34, 197, 94, 0.14);
    border-radius: 16px;
    background:
      linear-gradient(180deg, rgba(15, 23, 42, 0.84), rgba(15, 23, 42, 0.48)),
      radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.15), transparent 35%);
  }

  body.retirement-page main .retirement-related-tools {
    margin-top: 0;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(34, 197, 94, 0.18);
    background:
      radial-gradient(circle at 8% 0%, rgba(34, 197, 94, 0.22), transparent 34%),
      radial-gradient(circle at 100% 10%, rgba(56, 189, 248, 0.16), transparent 34%),
      linear-gradient(145deg, rgba(15, 23, 42, 0.84), rgba(20, 83, 45, 0.18));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }

  body.retirement-page main .retirement-related-tools p {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 7px;
    color: #bbf7d0;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
  }

  body.retirement-page main .retirement-related-tools p::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, #22c55e, #38bdf8);
    box-shadow: 0 0 14px rgba(34, 197, 94, 0.65);
  }

  body.retirement-page main .retirement-related-tools a {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 5px 0 0;
    padding: 6px 9px;
    border-radius: 9px;
    border-color: rgba(134, 239, 172, 0.18);
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.13), rgba(56, 189, 248, 0.08));
    color: #dcfce7;
    font-size: 0.74rem;
    font-weight: 700;
  }

  body.retirement-page main .retirement-related-tools a span {
    display: inline;
    flex: 0 0 auto;
  }

  body.retirement-page main .retirement-related-tools a small {
    display: inline;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #9ca3af;
    font-size: 0.6rem;
    font-weight: 600;
    line-height: 1;
  }

  body.retirement-page main .retirement-related-tools a:hover {
    border-color: rgba(134, 239, 172, 0.4);
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.22), rgba(56, 189, 248, 0.14));
  }

  body.retirement-page main .assumptions-tooltip {
    margin-bottom: 0;
    padding: 6px 10px;
    border-color: rgba(56, 189, 248, 0.24);
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(34, 197, 94, 0.08));
    font-size: 0.74rem;
  }

  body.retirement-page main .input-group {
    gap: 5px;
    padding: 9px;
    border: 1px solid rgba(34, 197, 94, 0.12);
    border-radius: 12px;
    background:
      radial-gradient(circle at 100% 0%, rgba(56, 189, 248, 0.07), transparent 34%),
      linear-gradient(135deg, rgba(255, 255, 255, 0.062), rgba(34, 197, 94, 0.026));
  }

  body.retirement-page main .input-group label {
    font-size: 0.7rem;
    letter-spacing: 0.04em;
  }

  body.retirement-page main .input-group input[type="number"] {
    min-height: 36px;
    padding: 7px 10px;
    border-radius: 9px;
    border-color: rgba(34, 197, 94, 0.22);
    background: rgba(6, 12, 24, 0.78);
    font-size: 0.88rem;
  }

  body.retirement-page main .chart-box {
    justify-content: flex-start;
  }

  body.retirement-page main .retirement-overview {
    padding: 20px;
    margin-bottom: 14px;
    border-radius: 18px;
    border-color: rgba(56, 189, 248, 0.14);
    background:
      radial-gradient(circle at 100% 0%, rgba(56, 189, 248, 0.14), transparent 34%),
      linear-gradient(145deg, rgba(30, 35, 50, 0.86), rgba(15, 23, 42, 0.9));
  }

  body.retirement-page main .retirement-overview-top {
    gap: 14px;
    margin-bottom: 12px;
  }

  body.retirement-page main .retirement-overview-copy .eyebrow {
    margin-bottom: 6px;
    font-size: 0.74rem;
  }

  body.retirement-page main .retirement-big-number {
    font-size: clamp(2rem, 3vw, 2.75rem);
  }

  body.retirement-page main .retirement-big-subtitle {
    margin-top: 6px;
    font-size: 0.84rem;
  }

  body.retirement-page main .readiness-pill {
    padding: 8px 12px;
    font-size: 0.78rem;
  }

  body.retirement-page main .readiness-meter-row {
    margin-bottom: 6px;
    font-size: 0.78rem;
  }

  body.retirement-page main .readiness-meter-track {
    height: 9px;
  }

  body.retirement-page main .retirement-stats {
    gap: 10px;
    margin: 14px 0;
  }

  body.retirement-page main .retirement-stat {
    gap: 10px;
    padding: 12px;
    border-radius: 14px;
    border-color: rgba(34, 197, 94, 0.12);
    background:
      radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.12), transparent 36%),
      linear-gradient(145deg, rgba(255, 255, 255, 0.058), rgba(56, 189, 248, 0.03));
  }

  body.retirement-page main .retirement-stat-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  body.retirement-page main .retirement-stat-value {
    font-size: 1rem;
  }

  body.retirement-page main .retirement-stat-label {
    font-size: 0.74rem;
  }

  body.retirement-page main .retirement-stat-note {
    margin-top: 5px;
    font-size: 0.72rem;
  }

  body.retirement-page main .retirement-milestones {
    gap: 8px;
    margin: 14px 0 4px;
  }

  body.retirement-page main .retirement-milestone {
    padding: 11px 8px;
    border-radius: 13px;
    border-color: rgba(56, 189, 248, 0.12);
    background:
      linear-gradient(145deg, rgba(56, 189, 248, 0.07), rgba(255, 255, 255, 0.025));
  }

  body.retirement-page main .retirement-milestone:first-child {
    border-color: rgba(34, 197, 94, 0.22);
    background: linear-gradient(145deg, rgba(34, 197, 94, 0.16), rgba(255, 255, 255, 0.03));
  }

  body.retirement-page main .retirement-milestone:nth-child(2) {
    border-color: rgba(56, 189, 248, 0.22);
    background: linear-gradient(145deg, rgba(56, 189, 248, 0.14), rgba(255, 255, 255, 0.026));
  }

  body.retirement-page main .retirement-milestone:nth-child(3) {
    border-color: rgba(251, 191, 36, 0.24);
    background: linear-gradient(145deg, rgba(251, 191, 36, 0.15), rgba(255, 255, 255, 0.026));
  }

  body.retirement-page main .retirement-milestone:nth-child(4) {
    border-color: rgba(168, 85, 247, 0.22);
    background: linear-gradient(145deg, rgba(168, 85, 247, 0.13), rgba(255, 255, 255, 0.024));
  }

  body.retirement-page main .retirement-milestone:nth-child(5) {
    border-color: rgba(244, 114, 182, 0.22);
    background: linear-gradient(145deg, rgba(244, 114, 182, 0.13), rgba(255, 255, 255, 0.024));
  }

  body.retirement-page main .retirement-milestone-age {
    font-size: 0.68rem;
  }

  body.retirement-page main .retirement-milestone-value {
    margin-top: 6px;
    font-size: 0.86rem;
  }

  body.retirement-page main .retirement-milestone-note {
    margin-top: 4px;
    font-size: 0.68rem;
  }

  body.retirement-page main .chart-box canvas {
    max-height: 255px;
  }

  body.retirement-page main .retirement-chart-note {
    margin-top: 8px;
    font-size: 0.76rem;
    line-height: 1.4;
  }

  body.retirement-page main .retirement-callout {
    gap: 12px;
  }

  body.retirement-page main .retirement-callout-card {
    position: relative;
    overflow: hidden;
    padding: 14px;
    border-radius: 14px;
    border-color: rgba(34, 197, 94, 0.16);
    background:
      radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.15), transparent 34%),
      radial-gradient(circle at 100% 0%, rgba(251, 191, 36, 0.1), transparent 32%),
      linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(15, 23, 42, 0.34));
  }

  body.retirement-page main .retirement-callout-card:has(.retirement-assumptions) {
    align-self: start;
  }

  body.retirement-page main .retirement-callout-card:has(.retirement-assumptions) h4 {
    margin-bottom: 5px;
  }

  body.retirement-page main .retirement-callout-card:has(.retirement-assumptions) .retirement-assumptions {
    margin-top: 8px;
    gap: 7px;
  }

  body.retirement-page main .retirement-callout-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 2px;
    background: linear-gradient(90deg, #22c55e, #38bdf8, #fbbf24);
  }

  body.retirement-page main .retirement-callout-card h4 {
    position: relative;
    margin-bottom: 7px;
    color: #ecfdf5;
    font-size: 0.92rem;
  }

  body.retirement-page main .retirement-callout-card p,
  body.retirement-page main .retirement-callout-card li,
  body.retirement-page main .retirement-assumption {
    position: relative;
    font-size: 0.78rem;
    line-height: 1.42;
  }

  body.retirement-page main .retirement-assumption {
    padding: 5px 7px;
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 9px;
    background: rgba(15, 23, 42, 0.32);
  }

  body.retirement-page main .retirement-callout-card ul {
    margin-top: 8px;
  }
}


/* ===== DESKTOP FUTURE WEALTH COMPACT UPGRADE ===== */
@media (min-width: 901px) {
  body.future-wealth-page main > .calculator-container {
    max-width: 1400px;
    padding-top: 28px;
    padding-bottom: 28px;
  }

  body.future-wealth-page main .page-title {
    margin-bottom: 18px;
    font-size: 2.25rem;
    line-height: 1.08;
    background: linear-gradient(135deg, #86efac 0%, #38bdf8 52%, #fbbf24 100%);
    -webkit-background-clip: text;
    background-clip: text;
  }

  body.future-wealth-page main .calculator-box {
    position: relative;
    grid-template-columns: minmax(250px, 0.62fr) minmax(0, 1.38fr);
    gap: 18px;
    padding: 18px;
    border-radius: 18px;
    border-color: rgba(34, 197, 94, 0.18);
    background:
      radial-gradient(circle at 8% 8%, rgba(34, 197, 94, 0.17), transparent 32%),
      radial-gradient(circle at 88% 0%, rgba(56, 189, 248, 0.13), transparent 30%),
      linear-gradient(145deg, rgba(24, 30, 43, 0.96), rgba(10, 16, 28, 0.94));
    box-shadow: 0 24px 58px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    overflow: hidden;
  }

  body.future-wealth-page main .calculator-box::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, #22c55e, #38bdf8, #fbbf24);
  }

  body.future-wealth-page main .inputs {
    gap: 8px;
    padding: 10px;
    border: 1px solid rgba(34, 197, 94, 0.14);
    border-radius: 16px;
    background:
      linear-gradient(180deg, rgba(15, 23, 42, 0.84), rgba(15, 23, 42, 0.48)),
      radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.15), transparent 35%);
  }

  body.future-wealth-page main .input-group {
    gap: 4px;
    min-height: 68px;
    padding: 8px;
    border: 1px solid rgba(34, 197, 94, 0.12);
    border-radius: 10px;
    background:
      radial-gradient(circle at 100% 0%, rgba(56, 189, 248, 0.07), transparent 34%),
      linear-gradient(135deg, rgba(255, 255, 255, 0.062), rgba(34, 197, 94, 0.026));
  }

  body.future-wealth-page main .input-group label {
    font-size: 0.58rem;
    line-height: 1.12;
    letter-spacing: 0.045em;
  }

  body.future-wealth-page main .input-group input[type="number"] {
    min-height: 31px;
    padding: 6px 7px;
    border-radius: 7px;
    border-color: rgba(34, 197, 94, 0.22);
    background: rgba(6, 12, 24, 0.78);
    font-size: 0.74rem;
  }

  body.future-wealth-page main .value-display {
    display: none;
  }

  body.future-wealth-page main .future-wealth-related-tools {
    margin-top: 0;
    padding: 8px;
    border-radius: 10px;
    border: 1px solid rgba(34, 197, 94, 0.18);
    background:
      radial-gradient(circle at 8% 0%, rgba(34, 197, 94, 0.22), transparent 34%),
      radial-gradient(circle at 100% 10%, rgba(56, 189, 248, 0.16), transparent 34%),
      linear-gradient(145deg, rgba(15, 23, 42, 0.84), rgba(20, 83, 45, 0.18));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }

  body.future-wealth-page main .future-wealth-related-tools p {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 5px;
    color: #bbf7d0;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.06em;
  }

  body.future-wealth-page main .future-wealth-related-tools p::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, #22c55e, #38bdf8);
    box-shadow: 0 0 14px rgba(34, 197, 94, 0.65);
  }

  body.future-wealth-page main .future-wealth-related-tools a {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 4px 0 0;
    padding: 5px 7px;
    border-radius: 8px;
    border-color: rgba(134, 239, 172, 0.18);
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.13), rgba(56, 189, 248, 0.08));
    color: #dcfce7;
    font-size: 0.66rem;
    font-weight: 700;
  }

  body.future-wealth-page main .future-wealth-related-tools a span {
    flex: 0 0 auto;
  }

  body.future-wealth-page main .future-wealth-related-tools a small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #9ca3af;
    font-size: 0.55rem;
    font-weight: 600;
  }

  body.future-wealth-page main .chart-box {
    justify-content: flex-start;
  }

  body.future-wealth-page main .wealth-result,
  body.future-wealth-page main .comparison-bar,
  body.future-wealth-page main .lifestyle-preview,
  body.future-wealth-page main .formula-section {
    border-color: rgba(34, 197, 94, 0.16);
    background:
      radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.15), transparent 34%),
      radial-gradient(circle at 100% 0%, rgba(251, 191, 36, 0.1), transparent 32%),
      linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(15, 23, 42, 0.34));
  }

  body.future-wealth-page main .wealth-result {
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 12px;
  }

  body.future-wealth-page main .wealth-result .big-number {
    font-size: clamp(1.55rem, 2.25vw, 2.1rem);
    line-height: 1.05;
  }

  body.future-wealth-page main .wealth-result .subtitle {
    margin-top: 5px;
    font-size: 0.78rem;
  }

  body.future-wealth-page main .wealth-tier {
    margin-top: 6px;
    padding: 5px 11px;
    font-size: 0.72rem;
  }

  body.future-wealth-page main .age-milestones {
    gap: 5px;
    margin: 7px 0;
  }

  body.future-wealth-page main .milestone-card {
    min-height: 58px;
    padding: 6px 5px;
    border-radius: 9px;
    border-color: rgba(56, 189, 248, 0.12);
    background: linear-gradient(145deg, rgba(56, 189, 248, 0.07), rgba(255, 255, 255, 0.025));
  }

  body.future-wealth-page main .milestone-card:first-child {
    border-color: rgba(34, 197, 94, 0.22);
    background: linear-gradient(145deg, rgba(34, 197, 94, 0.16), rgba(255, 255, 255, 0.03));
  }

  body.future-wealth-page main .milestone-card:nth-child(2) {
    border-color: rgba(56, 189, 248, 0.22);
    background: linear-gradient(145deg, rgba(56, 189, 248, 0.14), rgba(255, 255, 255, 0.026));
  }

  body.future-wealth-page main .milestone-card:nth-child(3) {
    border-color: rgba(251, 191, 36, 0.24);
    background: linear-gradient(145deg, rgba(251, 191, 36, 0.15), rgba(255, 255, 255, 0.026));
  }

  body.future-wealth-page main .milestone-card:nth-child(4) {
    border-color: rgba(168, 85, 247, 0.22);
    background: linear-gradient(145deg, rgba(168, 85, 247, 0.13), rgba(255, 255, 255, 0.024));
  }

  body.future-wealth-page main .milestone-card .age {
    margin-bottom: 4px;
    font-size: 0.62rem;
    line-height: 1.1;
  }

  body.future-wealth-page main .milestone-card .amount {
    font-size: 0.86rem;
    line-height: 1.08;
  }

  body.future-wealth-page main .milestone-card .tier-label {
    margin-top: 4px;
    padding: 2px 6px;
    font-size: 0.55rem;
  }

  body.future-wealth-page main .chart-box canvas {
    max-height: 220px;
  }

  body.future-wealth-page main .achievements {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 5px;
    margin: 6px 0;
  }

  body.future-wealth-page main .achievement {
    display: flex;
    min-height: 32px;
    align-items: center;
    justify-content: center;
    padding: 4px 5px;
    border-radius: 8px;
    font-size: 0.56rem;
    line-height: 1.1;
    text-align: center;
  }

  body.future-wealth-page main .future-wealth-wide-panels {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 10px;
    margin-top: 2px;
  }

  body.future-wealth-page main .comparison-bar,
  body.future-wealth-page main .lifestyle-preview,
  body.future-wealth-page main .formula-section {
    padding: 9px;
    margin-top: 7px;
    border-radius: 12px;
  }

  body.future-wealth-page main .future-wealth-wide-panels .lifestyle-preview,
  body.future-wealth-page main .future-wealth-wide-panels .formula-section {
    margin-top: 0;
  }

  body.future-wealth-page main .comparison-bar h4,
  body.future-wealth-page main .lifestyle-preview h4,
  body.future-wealth-page main .formula-section h4 {
    margin-bottom: 8px;
    font-size: 0.82rem;
  }

  body.future-wealth-page main .bar-container {
    height: 14px;
  }

  body.future-wealth-page main .bar-markers {
    margin-top: 4px;
    font-size: 0.6rem;
  }

  body.future-wealth-page main .lifestyle-items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }

  body.future-wealth-page main .lifestyle-item {
    gap: 5px;
    padding: 6px;
    border-radius: 8px;
  }

  body.future-wealth-page main .lifestyle-item .icon {
    font-size: 1.05rem;
  }

  body.future-wealth-page main .lifestyle-item .text {
    font-size: 0.74rem;
    line-height: 1.25;
  }

  body.future-wealth-page main .formula,
  body.future-wealth-page main .formula-example,
  body.future-wealth-page main .step,
  body.future-wealth-page main .lifestyle-item {
    border-color: rgba(148, 163, 184, 0.1);
    background: rgba(15, 23, 42, 0.32);
  }

  body.future-wealth-page main .formula,
  body.future-wealth-page main .formula-example {
    padding: 6px;
    margin-bottom: 5px;
    border-radius: 8px;
  }

  body.future-wealth-page main .formula-text,
  body.future-wealth-page main .example-note {
    font-size: 0.66rem;
    line-height: 1.24;
  }

  body.future-wealth-page main .example-title {
    margin-bottom: 5px;
    font-size: 0.66rem;
  }

  body.future-wealth-page main .example-steps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 12px;
    row-gap: 6px;
  }

  body.future-wealth-page main .example-column {
    display: grid;
    gap: 5px;
    min-width: 0;
  }

  body.future-wealth-page main .step {
    min-height: 34px;
    padding: 5px 7px;
    border-radius: 7px;
  }

  body.future-wealth-page main .step-label,
  body.future-wealth-page main .step-value {
    font-size: 0.78rem;
    line-height: 1.14;
  }

  body.future-wealth-page main .step-label {
    overflow-wrap: anywhere;
  }
}


/* ===== MOBILE SWP TIGHTENING ===== */
@media (max-width: 768px) {
  .calculator-container:has(#savings):has(#withdrawal) .strategy-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    align-items: stretch;
  }

  .calculator-container:has(#savings):has(#withdrawal) .strat-btn {
    display: flex;
    min-height: 54px;
    padding: 8px 6px;
    border-radius: 10px;
    font-size: 0.66rem;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .calculator-container:has(#savings):has(#withdrawal) .strat-btn span {
    display: block;
    font-size: 0.56rem;
    line-height: 1.2;
    text-align: center;
  }

  .calculator-container:has(#savings):has(#withdrawal) .strat-btn .btn-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
  }

  .calculator-container:has(#savings):has(#withdrawal) .swp-result {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px 10px;
    align-items: center;
    text-align: left;
    padding: 12px;
    margin-bottom: 10px;
  }

  .calculator-container:has(#savings):has(#withdrawal) .swp-result .result-icon {
    grid-row: span 2;
    margin: 0;
    font-size: 1.35rem;
  }

  .calculator-container:has(#savings):has(#withdrawal) .swp-result .result-main {
    gap: 1px;
  }

  .calculator-container:has(#savings):has(#withdrawal) .swp-result .result-value {
    font-size: 1.35rem;
    line-height: 1.05;
  }

  .calculator-container:has(#savings):has(#withdrawal) .swp-result .result-status {
    grid-column: 2;
    margin: 0;
    font-size: 0.68rem;
    line-height: 1.25;
  }

  .calculator-container:has(#savings):has(#withdrawal) .swp-stats {
    gap: 7px;
  }

  .calculator-container:has(#savings):has(#withdrawal) .stat-card {
    display: flex;
    min-height: 82px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 9px 5px;
    text-align: center;
  }

  .calculator-container:has(#savings):has(#withdrawal) .stat-card .stat-content {
    align-items: center;
  }

  .calculator-container:has(#savings):has(#withdrawal) .stat-card .stat-icon {
    margin: 0;
  }

  .calculator-container:has(#savings):has(#withdrawal) .stat-card .stat-value {
    font-size: 0.76rem;
  }

  .calculator-container:has(#savings):has(#withdrawal) .stat-card .stat-label {
    max-width: 100%;
    text-align: center;
  }

  .calculator-container:has(#savings):has(#withdrawal) .withdrawal-schedule {
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 11px;
  }

  .calculator-container:has(#savings):has(#withdrawal) .schedule-title {
    margin-bottom: 8px;
    font-size: 0.82rem;
  }

  .calculator-container:has(#savings):has(#withdrawal) .schedule-header {
    grid-template-columns: 0.7fr 1.15fr 1fr;
    gap: 5px;
    margin-bottom: 5px;
    padding: 0 8px;
    font-size: 0.52rem;
    line-height: 1.1;
  }

  .calculator-container:has(#savings):has(#withdrawal) .schedule-grid {
    gap: 5px;
  }

  .calculator-container:has(#savings):has(#withdrawal) .schedule-row {
    grid-template-columns: 0.7fr 1.15fr 1fr;
    gap: 5px;
    padding: 7px 8px;
    border-radius: 8px;
    font-size: 0.68rem;
    line-height: 1.2;
    text-align: center;
  }

  .calculator-container:has(#savings):has(#withdrawal) .schedule-withdrawal,
  .calculator-container:has(#savings):has(#withdrawal) .schedule-balance {
    text-align: center;
  }
}

/* Formatted money textboxes keep the same visual treatment as numeric money inputs. */
input[data-currency-textbox="1"] {
  appearance: none;
  -webkit-appearance: none;
}


/* ===== RRSP VS TFSA CANADA ===== */
.rrsp-tfsa-page .rrsp-tfsa-subtitle {
  max-width: 48rem;
  margin: -8px auto 18px;
  color: #9ca3af;
  font-size: 0.94rem;
  line-height: 1.55;
  text-align: center;
}

.rrsp-tfsa-country-note {
  max-width: 1400px;
  margin: 0 auto 14px;
  padding: 10px 12px;
  border: 1px solid rgba(34, 197, 94, 0.18);
  border-radius: 12px;
  background: rgba(34, 197, 94, 0.08);
  color: #bbf7d0;
  font-size: 0.78rem;
  line-height: 1.35;
}

.rrsp-tfsa-country-note--warn {
  border-color: rgba(251, 191, 36, 0.22);
  background: rgba(251, 191, 36, 0.08);
  color: #fde68a;
}

.rrsp-tfsa-mode-card,
.rrsp-tfsa-limit-card {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(34, 197, 94, 0.14);
  border-radius: 13px;
  background:
    radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.14), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(15, 23, 42, 0.3));
}

.rrsp-tfsa-mode-card p,
.rrsp-tfsa-related-tools p {
  margin: 0;
  color: #bbf7d0;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.rrsp-tfsa-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  align-self: center;
}

.rrsp-tfsa-tab {
  align-self: center;
  min-height: 24px;
  padding: 3px 4px;
  border: 1px solid rgba(134, 239, 172, 0.14);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.45);
  color: #cbd5e1;
  cursor: pointer;
  font: inherit;
  font-size: 0.58rem;
  font-weight: 800;
}

.rrsp-tfsa-tab.active {
  border-color: rgba(34, 197, 94, 0.48);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(56, 189, 248, 0.08));
  color: #bbf7d0;
}

.rrsp-tfsa-limit-card {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 10px;
}

.rrsp-tfsa-limit-card div {
  display: grid;
  gap: 3px;
  min-height: 52px;
  align-content: center;
  padding: 8px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.32);
}

.rrsp-tfsa-limit-card span,
.rrsp-tfsa-score-card span,
.rrsp-tfsa-breakdown span {
  color: #9ca3af;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.rrsp-tfsa-limit-card strong {
  color: #f8fafc;
  font-size: 0.9rem;
  line-height: 1.05;
}

.rrsp-tfsa-headline {
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(34, 197, 94, 0.16);
  border-radius: 16px;
  background:
    radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.18), transparent 36%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(15, 23, 42, 0.28));
  text-align: center;
}

.rrsp-tfsa-headline span,
.rrsp-tfsa-headline em {
  color: #9ca3af;
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.rrsp-tfsa-headline strong {
  color: #bbf7d0;
  font-size: clamp(1.15rem, 1.8vw, 1.55rem);
  line-height: 1.08;
}

.rrsp-tfsa-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.rrsp-tfsa-choice-card {
  position: relative;
  display: grid;
  min-height: 112px;
  align-content: center;
  align-content: center;
  padding: 11px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 15px;
  box-shadow: none;
}

.rrsp-tfsa-choice-card--tfsa {
  border-color: rgba(56, 189, 248, 0.16);
  background:
    radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.13), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(15, 23, 42, 0.3));
}

.rrsp-tfsa-choice-card--rrsp {
  border-color: rgba(34, 197, 94, 0.18);
  background:
    radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.15), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(15, 23, 42, 0.3));
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.12);
}

.rrsp-tfsa-choice-icon {
  margin-bottom: 5px;
  color: #94a3b8;
  font-size: 0.92rem;
}

.rrsp-tfsa-choice-card h2 {
  margin: 0;
  color: #f8fafc;
  font-size: 0.88rem;
  line-height: 1.1;
}

.rrsp-tfsa-choice-card p {
  margin: 2px 0 7px;
  color: #9ca3af;
  font-size: 0.64rem;
}

.rrsp-tfsa-choice-card em {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-bottom: 6px;
  color: #94a3b8;
  font-size: 0.54rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.rrsp-tfsa-choice-card em b {
  color: #f8fafc;
  font-size: 0.72rem;
  letter-spacing: 0;
}

.rrsp-tfsa-choice-card span {
  color: #9ca3af;
  font-size: 0.54rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.rrsp-tfsa-choice-card strong {
  margin-top: 3px;
  font-size: clamp(1.18rem, 2.2vw, 1.65rem);
  line-height: 1;
}

.rrsp-tfsa-choice-card--tfsa strong {
  color: #38bdf8;
}

.rrsp-tfsa-choice-card--rrsp strong {
  color: #86efac;
}

.rrsp-tfsa-choice-card small {
  margin-top: 4px;
  color: #9ca3af;
  font-size: 0.58rem;
  font-weight: 700;
}

.rrsp-tfsa-winner-badge {
  position: absolute;
  top: 9px;
  right: 9px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.14);
  color: #bbf7d0;
  font-size: 0.56rem;
  font-weight: 900;
}

.rrsp-tfsa-scoreboard,
.rrsp-tfsa-breakdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.rrsp-tfsa-score-card,
.rrsp-tfsa-breakdown div {
  display: grid;
  gap: 5px;
  min-height: 74px;
  align-content: center;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 14px;
  background:
    radial-gradient(circle at 12% 0%, rgba(34, 197, 94, 0.12), transparent 40%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.052), rgba(15, 23, 42, 0.32));
  text-align: center;
}

.rrsp-tfsa-breakdown div:nth-child(2) {
  border-color: rgba(56, 189, 248, 0.14);
  background:
    radial-gradient(circle at 12% 0%, rgba(56, 189, 248, 0.13), transparent 40%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.052), rgba(15, 23, 42, 0.32));
}

.rrsp-tfsa-breakdown div:nth-child(3) {
  border-color: rgba(251, 191, 36, 0.14);
  background:
    radial-gradient(circle at 12% 0%, rgba(251, 191, 36, 0.13), transparent 40%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.052), rgba(15, 23, 42, 0.32));
}

.rrsp-tfsa-breakdown div:nth-child(4) {
  border-color: rgba(167, 139, 250, 0.14);
  background:
    radial-gradient(circle at 12% 0%, rgba(167, 139, 250, 0.12), transparent 40%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.052), rgba(15, 23, 42, 0.32));
}

.rrsp-tfsa-score-card--winner {
  border-color: rgba(34, 197, 94, 0.2);
  background:
    radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.16), transparent 36%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.052), rgba(15, 23, 42, 0.28));
}

.rrsp-tfsa-score-card strong,
.rrsp-tfsa-breakdown strong {
  color: #f8fafc;
  font-size: 0.92rem;
  line-height: 1.08;
}

.rrsp-tfsa-insights {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 10px;
  margin: 14px 0 12px;
}

.rrsp-tfsa-insight {
  position: relative;
  overflow: hidden;
  min-height: 92px;
  padding: 11px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(15, 23, 42, 0.3));
}

.rrsp-tfsa-insight::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, #22c55e, #38bdf8, #fbbf24);
}

.rrsp-tfsa-insight--green {
  border-color: rgba(34, 197, 94, 0.14);
}

.rrsp-tfsa-insight--blue {
  border-color: rgba(56, 189, 248, 0.14);
}

.rrsp-tfsa-insight--gold {
  border-color: rgba(251, 191, 36, 0.16);
}

.rrsp-tfsa-insight h3 {
  position: relative;
  margin: 0 0 5px;
  color: #f8fafc;
  font-size: 0.8rem;
  line-height: 1.2;
}

.rrsp-tfsa-insight p {
  position: relative;
  margin: 0;
  color: #cbd5e1;
  font-size: 0.68rem;
  line-height: 1.3;
}

@media (min-width: 901px) {
  body.rrsp-tfsa-page main > .calculator-container {
    max-width: 1400px;
    padding-top: 28px;
    padding-bottom: 28px;
  }

  body.rrsp-tfsa-page .page-title {
    margin-bottom: 16px;
    font-size: 2.25rem;
    line-height: 1.08;
    background: linear-gradient(135deg, #ecfdf5, #22c55e 52%, #38bdf8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }

  body.rrsp-tfsa-page .rrsp-tfsa-box {
    position: relative;
    grid-template-columns: minmax(260px, 0.62fr) minmax(0, 1.38fr);
    gap: 18px;
    padding: 18px;
    border-radius: 18px;
    border-color: rgba(34, 197, 94, 0.18);
    background:
      radial-gradient(circle at 8% 8%, rgba(34, 197, 94, 0.16), transparent 32%),
      radial-gradient(circle at 90% 0%, rgba(56, 189, 248, 0.12), transparent 30%),
      linear-gradient(145deg, rgba(24, 30, 43, 0.96), rgba(10, 16, 28, 0.94));
    box-shadow: 0 24px 58px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    overflow: hidden;
    align-items: stretch;
  }

  body.rrsp-tfsa-page .rrsp-tfsa-box::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    display: block;
    height: 3px;
    background: linear-gradient(90deg, #22c55e, #38bdf8, #fbbf24);
  }

  body.rrsp-tfsa-page .rrsp-tfsa-inputs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 12px;
    row-gap: 18px;
    padding: 5px;
    align-content: start;
    align-items: start;
    grid-auto-rows: max-content;
    border: 1px solid rgba(34, 197, 94, 0.14);
    border-radius: 15px;
    background:
      linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.5)),
      radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.15), transparent 35%);
  }

  body.rrsp-tfsa-page .rrsp-tfsa-panel-card {
    display: grid;
    gap: 4px;
    padding: 5px;
    align-content: start;
    align-items: start;
    border: 1px solid rgba(34, 197, 94, 0.12);
    border-radius: 10px;
    background:
      radial-gradient(circle at 100% 0%, rgba(56, 189, 248, 0.07), transparent 34%),
      linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(34, 197, 94, 0.026));
    box-shadow: none;
  }

  body.rrsp-tfsa-page .rrsp-tfsa-panel-card--situation,
  body.rrsp-tfsa-page .rrsp-tfsa-panel-card--withdrawal,
  body.rrsp-tfsa-page .rrsp-tfsa-panel-card--contribution,
  body.rrsp-tfsa-page .rrsp-tfsa-panel-card--room,
  body.rrsp-tfsa-page .rrsp-tfsa-related-tools {
    grid-column: 1 / -1;
  }

  body.rrsp-tfsa-page .rrsp-tfsa-panel-card--contribution {
    grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(0, 1fr));
  }

  body.rrsp-tfsa-page .rrsp-tfsa-panel-card--situation,
  body.rrsp-tfsa-page .rrsp-tfsa-panel-card--withdrawal,
  body.rrsp-tfsa-page .rrsp-tfsa-panel-card--room {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.rrsp-tfsa-page .rrsp-tfsa-panel-card h2 {
    grid-column: 1 / -1;
    margin: 0;
    color: #bbf7d0;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  body.rrsp-tfsa-page .rrsp-tfsa-panel-card .input-group {
    display: grid;
    grid-template-rows: 20px 30px 12px;
    gap: 2px;
    min-height: 0;
    align-self: start;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  body.rrsp-tfsa-page .rrsp-tfsa-panel-card .input-group label {
    display: flex;
    align-items: end;
    white-space: nowrap;
    font-size: 0.64rem;
    line-height: 1.12;
    letter-spacing: 0.04em;
  }

  body.rrsp-tfsa-page .rrsp-tfsa-panel-card .input-group input[type="number"],
  body.rrsp-tfsa-page .rrsp-tfsa-panel-card .input-group input[data-currency-textbox="1"] {
    width: 100%;
    height: 30px;
    min-height: 30px;
    box-sizing: border-box;
    padding: 5px 7px;
    border-radius: 7px;
    border-color: rgba(34, 197, 94, 0.2);
    background: rgba(6, 12, 24, 0.72);
    font-size: 0.9rem;
  }

  body.rrsp-tfsa-page .rrsp-tfsa-panel-card .value-display {
    min-height: 12px;
    font-size: 0.62rem;
    line-height: 1;
  }

  body.rrsp-tfsa-page .rrsp-tfsa-panel-card input[type="number"]::-webkit-outer-spin-button,
  body.rrsp-tfsa-page .rrsp-tfsa-panel-card input[type="number"]::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
  }

  body.rrsp-tfsa-page .rrsp-tfsa-panel-card input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
  }

  body.rrsp-tfsa-page .rrsp-tfsa-room-note {
    grid-column: 1 / -1;
    margin: 0;
    color: #94a3b8;
    font-size: 0.62rem;
    line-height: 1.22;
  }

  body.rrsp-tfsa-page .rrsp-tfsa-related-tools {
    margin-top: 0;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(34, 197, 94, 0.16);
    background:
      radial-gradient(circle at 0% 0%, rgba(34, 197, 94, 0.16), transparent 34%),
      linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(15, 23, 42, 0.3));
    box-shadow: none;
  }

  body.rrsp-tfsa-page .rrsp-tfsa-related-tools p {
    margin-bottom: 7px;
  }

  body.rrsp-tfsa-page .rrsp-tfsa-related-tools a {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 5px 0 0;
    padding: 6px 9px;
    border-radius: 9px;
    border-color: rgba(134, 239, 172, 0.16);
    background: rgba(34, 197, 94, 0.1);
    color: #dcfce7;
    font-size: 0.72rem;
    font-weight: 700;
  }

  body.rrsp-tfsa-page .rrsp-tfsa-related-tools a small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #9ca3af;
    font-size: 0.58rem;
    font-weight: 600;
  }

  body.rrsp-tfsa-page .rrsp-tfsa-results canvas {
    max-height: 210px;
  }

  body.rrsp-tfsa-page .rrsp-tfsa-results {
    min-height: 100%;
    height: 100%;
    display: grid;
    align-content: start;
  }
}

@media (max-width: 768px) {
  .rrsp-tfsa-page .calculator-container {
    padding-left: 0;
    padding-right: 0;
  }

  .rrsp-tfsa-page .page-title {
    font-size: 1.55rem;
    line-height: 1.12;
    margin-bottom: 8px;
  }

  .rrsp-tfsa-page .rrsp-tfsa-subtitle {
    margin: 0 4px 10px;
    font-size: 0.72rem;
    line-height: 1.35;
  }

  .rrsp-tfsa-country-note {
    margin: 0 0 10px;
    padding: 8px;
    border-radius: 10px;
    font-size: 0.58rem;
  }

  .rrsp-tfsa-page .rrsp-tfsa-box {
    gap: 10px;
    padding: 10px;
    border-radius: 16px;
    border-color: rgba(255, 255, 255, 0.075);
    background: linear-gradient(145deg, rgba(30, 35, 50, 0.9), rgba(20, 25, 35, 0.9));
  }

  .rrsp-tfsa-page .rrsp-tfsa-inputs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 10px;
    row-gap: 7px;
    align-content: start;
    align-items: start;
    grid-auto-rows: max-content;
  }

  .rrsp-tfsa-page .rrsp-tfsa-panel-card {
    display: grid;
    gap: 2px;
    padding: 3px 4px;
    align-content: start;
    align-items: start;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    box-shadow: none;
  }

  .rrsp-tfsa-page .rrsp-tfsa-panel-card--situation,
  .rrsp-tfsa-page .rrsp-tfsa-panel-card--withdrawal,
  .rrsp-tfsa-page .rrsp-tfsa-panel-card--contribution,
  .rrsp-tfsa-page .rrsp-tfsa-panel-card--room,
  .rrsp-tfsa-page .rrsp-tfsa-related-tools {
    grid-column: 1 / -1;
  }

  .rrsp-tfsa-page .rrsp-tfsa-panel-card--contribution {
    grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(0, 1fr));
  }

  .rrsp-tfsa-page .rrsp-tfsa-panel-card--situation,
  .rrsp-tfsa-page .rrsp-tfsa-panel-card--withdrawal,
  .rrsp-tfsa-page .rrsp-tfsa-panel-card--room {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rrsp-tfsa-page .rrsp-tfsa-panel-card h2 {
    grid-column: 1 / -1;
    margin: 0;
    color: #bbf7d0;
    font-size: 0.5rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .rrsp-tfsa-page .rrsp-tfsa-panel-card .input-group {
    display: grid;
    grid-template-rows: auto 24px;
    gap: 0;
    min-height: 0;
    align-self: start;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .rrsp-tfsa-page .rrsp-tfsa-panel-card .input-group label {
    display: flex;
    align-items: end;
    font-size: 0.42rem;
    line-height: 1.1;
  }

  .rrsp-tfsa-page .rrsp-tfsa-panel-card .input-group input[type="number"],
  .rrsp-tfsa-page .rrsp-tfsa-panel-card .input-group input[data-currency-textbox="1"] {
    width: 100%;
    height: 24px !important;
    min-height: 24px !important;
    box-sizing: border-box;
    padding: 4px 5px;
    border-radius: 7px;
    font-size: 0.64rem;
  }

  .rrsp-tfsa-page .rrsp-tfsa-panel-card .value-display {
    display: none;
  }

  .rrsp-tfsa-page .rrsp-tfsa-panel-card input[type="number"]::-webkit-outer-spin-button,
  .rrsp-tfsa-page .rrsp-tfsa-panel-card input[type="number"]::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
  }

  .rrsp-tfsa-page .rrsp-tfsa-panel-card input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
  }

  .rrsp-tfsa-page .rrsp-tfsa-room-note {
    grid-column: 1 / -1;
    margin: 0;
    font-size: 0.42rem;
    line-height: 1.08;
    color: #94a3b8;
  }

  .rrsp-tfsa-tab {
    min-height: 28px;
    padding: 3px 2px;
    border-radius: 7px;
    font-size: 0.48rem;
    line-height: 1.05;
    white-space: normal;
  }

  .rrsp-tfsa-limit-card div {
    min-height: 44px;
    padding: 5px;
    border-radius: 8px;
  }

  .rrsp-tfsa-limit-card span,
  .rrsp-tfsa-score-card span,
  .rrsp-tfsa-breakdown span {
    font-size: 0.38rem;
    line-height: 1.05;
  }

  .rrsp-tfsa-limit-card strong {
    font-size: 0.56rem;
  }

  .rrsp-tfsa-page .rrsp-tfsa-results .rrsp-tfsa-limit-card {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    margin-bottom: 8px;
  }

  .rrsp-tfsa-headline {
    margin-bottom: 7px;
    padding: 9px;
    border-radius: 11px;
  }

  .rrsp-tfsa-headline span,
  .rrsp-tfsa-headline em {
    font-size: 0.46rem;
  }

  .rrsp-tfsa-headline strong {
    font-size: 0.98rem;
    line-height: 1.12;
  }

  .rrsp-tfsa-choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 8px;
  }

  .rrsp-tfsa-choice-card {
    min-height: 94px;
    padding: 8px;
    border-radius: 10px;
  }

  .rrsp-tfsa-choice-icon {
    margin-bottom: 3px;
    font-size: 0.78rem;
  }

  .rrsp-tfsa-choice-card h2 {
    font-size: 0.68rem;
  }

  .rrsp-tfsa-choice-card p {
    margin: 2px 0 5px;
    font-size: 0.54rem;
  }

  .rrsp-tfsa-choice-card em {
    gap: 3px;
    margin-bottom: 4px;
    font-size: 0.44rem;
  }

  .rrsp-tfsa-choice-card em b {
    font-size: 0.54rem;
  }

  .rrsp-tfsa-choice-card span {
    font-size: 0.46rem;
  }

  .rrsp-tfsa-choice-card strong {
    font-size: 0.98rem;
  }

  .rrsp-tfsa-choice-card small {
    margin-top: 3px;
    font-size: 0.5rem;
  }

  .rrsp-tfsa-winner-badge {
    top: 7px;
    right: 7px;
    padding: 4px 7px;
    font-size: 0.48rem;
  }

  .rrsp-tfsa-scoreboard,
  .rrsp-tfsa-breakdown {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
    margin-bottom: 8px;
  }

  .rrsp-tfsa-score-card,
  .rrsp-tfsa-breakdown div {
    min-height: 48px;
    gap: 2px;
    padding: 4px 2px;
    border-radius: 9px;
  }

  .rrsp-tfsa-score-card strong,
  .rrsp-tfsa-breakdown strong {
    font-size: 0.5rem;
    line-height: 1.08;
  }

  .rrsp-tfsa-results canvas {
    max-height: 210px;
  }

  .rrsp-tfsa-insights {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 5px;
    margin: 8px 0;
  }

  .rrsp-tfsa-insight {
    min-height: 72px;
    height: 72px;
    padding: 6px 4px;
    border-radius: 9px;
    text-align: center;
  }

  .rrsp-tfsa-insight h3 {
    margin-bottom: 3px;
    font-size: 0.48rem;
    text-align: center;
  }

  .rrsp-tfsa-insight p {
    font-size: 0.5rem;
    line-height: 1.18;
  }

  .rrsp-tfsa-related-tools {
    grid-column: 1 / -1;
    order: 20;
    margin-top: 2px;
    padding: 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
  }

  .rrsp-tfsa-related-tools a {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 4px;
    padding: 5px 6px;
    border-radius: 8px;
    font-size: 0.56rem;
    color: #dcfce7;
  }

  .rrsp-tfsa-related-tools a small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #9ca3af;
    font-size: 0.46rem;
  }

  .rrsp-tfsa-seo {
    padding-top: 24px;
  }
}

@media (max-width: 768px) {
  .calculator-container:not(.debt-payoff-page):not(.rent-buy-page):not(.emergency-fund-page) .input-group input[data-currency-textbox="1"] {
    min-height: 34px;
    padding: 7px 8px;
    border-radius: 8px;
    font-size: 0.78rem;
  }

  .rent-buy-control input[data-currency-textbox="1"] {
    min-height: 38px;
    padding: 8px 9px;
    border-radius: 9px;
    font-size: 0.82rem !important;
  }

  body.emi-calculator-page .calculator-box--emi .input-group input[data-currency-textbox="1"] {
    min-height: 36px !important;
    height: 36px !important;
    padding: 7px 8px !important;
    border-radius: 9px !important;
    font-size: 0.78rem !important;
    line-height: 1.1 !important;
  }

  .bitcoin-millionaire-page .input-group input[data-currency-textbox="1"] {
    min-height: 28px !important;
    padding: 5px 6px !important;
    border-radius: 8px !important;
    font-size: 0.72rem !important;
  }

  .rrsp-tfsa-page .rrsp-tfsa-panel-card .input-group input[data-currency-textbox="1"] {
    width: 100%;
    height: 24px !important;
    min-height: 24px !important;
    box-sizing: border-box;
    padding: 4px 5px !important;
    border-radius: 7px !important;
    font-size: 0.64rem !important;
  }

  body.rrsp-tfsa-page .rrsp-tfsa-inputs {
    row-gap: 5px !important;
  }

  body.rrsp-tfsa-page .rrsp-tfsa-panel-card {
    gap: 1px !important;
    padding: 2px 4px !important;
  }

  body.rrsp-tfsa-page .rrsp-tfsa-panel-card h2 {
    line-height: 1;
    margin-bottom: 3px;
  }

  body.rrsp-tfsa-page .rrsp-tfsa-panel-card .input-group {
    grid-template-rows: auto 22px !important;
    gap: 3px !important;
    padding: 3px 4px !important;
    border: 1px solid rgba(255, 255, 255, 0.045) !important;
    border-radius: 7px !important;
    background: rgba(255, 255, 255, 0.025) !important;
  }

  body.rrsp-tfsa-page .rrsp-tfsa-panel-card .input-group input[type="number"],
  body.rrsp-tfsa-page .rrsp-tfsa-panel-card .input-group input[data-currency-textbox="1"] {
    height: 22px !important;
    min-height: 22px !important;
  }

  body.rrsp-tfsa-page .rrsp-tfsa-tab {
    min-height: 30px;
    font-size: 0.56rem;
    line-height: 1.05;
  }

  body.rrsp-tfsa-page .rrsp-tfsa-room-note {
    margin: 2px 0 3px;
    font-size: 0.5rem;
    line-height: 1.2;
  }

  body.rrsp-tfsa-page .rrsp-tfsa-panel-card--room {
    gap: 4px !important;
  }
}

@media (min-width: 901px) {
  body.bitcoin-millionaire-page main .input-group input[data-currency-textbox="1"] {
    min-height: 35px;
    padding: 7px 10px;
    border-radius: 9px;
    border-color: rgba(247, 147, 26, 0.24);
    background: rgba(6, 12, 24, 0.78);
    font-size: 0.88rem;
  }

  body.retirement-page main .input-group input[data-currency-textbox="1"],
  body.future-wealth-page main .input-group input[data-currency-textbox="1"] {
    min-height: 36px;
    padding: 7px 10px;
    border-radius: 9px;
    border-color: rgba(34, 197, 94, 0.22);
    background: rgba(6, 12, 24, 0.78);
    font-size: 0.88rem;
  }
}

/* SIP vs Lump Sum: compact calculator pass */
body.sip-vs-lumpsum-page .sip-vs-lumpsum-container {
  max-width: 1400px;
  padding-top: 22px;
}

body.sip-vs-lumpsum-page .page-title {
  margin-bottom: 6px;
}

body.sip-vs-lumpsum-page .sip-lump-lead {
  max-width: 840px;
  margin: 0 auto 18px;
  color: #cbd5e1;
  font-size: 0.98rem;
  line-height: 1.5;
  text-align: center;
}

body.sip-vs-lumpsum-page .calculator-box {
  display: grid;
  grid-template-columns: minmax(330px, 0.34fr) minmax(0, 1fr);
  gap: 16px;
  padding: 14px;
  border: 1px solid rgba(34, 197, 94, 0.16);
  border-radius: 22px;
  background:
    radial-gradient(circle at 12% 0%, rgba(34, 197, 94, 0.12), transparent 32%),
    radial-gradient(circle at 100% 14%, rgba(59, 130, 246, 0.13), transparent 34%),
    rgba(6, 12, 24, 0.84);
}

body.sip-vs-lumpsum-page .inputs,
body.sip-vs-lumpsum-page .chart-box {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.74);
}

body.sip-vs-lumpsum-page .inputs {
  display: grid;
  gap: 10px;
  align-content: start;
}

body.sip-vs-lumpsum-page .input-group {
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(34, 197, 94, 0.1);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.08), rgba(59, 130, 246, 0.045));
}

body.sip-vs-lumpsum-page .input-group label,
body.sip-vs-lumpsum-page .historical-scenarios label {
  color: #c7d2fe;
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
}

body.sip-vs-lumpsum-page .input-group input[type="number"],
body.sip-vs-lumpsum-page .input-group input[data-currency-textbox="1"] {
  min-height: 36px;
  padding: 7px 10px;
  border-color: rgba(34, 197, 94, 0.22);
  border-radius: 10px;
  background: rgba(3, 7, 18, 0.82);
  font-size: 0.9rem;
}

body.sip-vs-lumpsum-page .value-display {
  display: none;
}

body.sip-vs-lumpsum-page .scenario-selector {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

body.sip-vs-lumpsum-page .scenario-btn {
  min-height: 54px;
  padding: 7px 4px;
  border-radius: 11px;
  font-size: 0.63rem;
  line-height: 1.12;
}

body.sip-vs-lumpsum-page .scenario-btn .icon {
  margin-bottom: 2px;
}

body.sip-vs-lumpsum-page .historical-scenarios {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

body.sip-vs-lumpsum-page .historical-scenarios label {
  grid-column: 1 / -1;
}

body.sip-vs-lumpsum-page .historical-btn {
  min-height: 36px;
  padding: 7px 6px;
  border-radius: 10px;
  font-size: 0.68rem;
}

body.sip-vs-lumpsum-page .insight-box {
  margin-top: 0;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 0.82rem;
  line-height: 1.38;
}

body.sip-vs-lumpsum-page #headline {
  margin-bottom: 8px;
  font-size: 1.15rem;
  line-height: 1.25;
}

body.sip-vs-lumpsum-page .chart-box canvas {
  max-height: 275px;
}

body.sip-vs-lumpsum-page .internal-links {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  margin: 0;
  padding: 10px;
  border-color: rgba(34, 197, 94, 0.14);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.08), rgba(59, 130, 246, 0.05));
}

body.sip-vs-lumpsum-page .internal-links p {
  margin: 0;
  color: #bbf7d0;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

body.sip-vs-lumpsum-page .internal-links a {
  display: grid;
  grid-template-columns: minmax(130px, 0.56fr) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 36px;
  padding: 7px 8px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.68);
  color: #f8fafc;
  font-size: 0.76rem;
}

body.sip-vs-lumpsum-page .internal-links a small {
  overflow: hidden;
  color: #94a3b8;
  font-size: 0.62rem;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.sip-vs-lumpsum-page .race-tracker {
  margin: 8px 0;
  padding: 10px;
  border-radius: 14px;
}

body.sip-vs-lumpsum-page .fun-facts {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0;
}

body.sip-vs-lumpsum-page .fact-card {
  min-height: 82px;
  padding: 9px 6px;
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(59, 130, 246, 0.06));
}

body.sip-vs-lumpsum-page .fact-icon {
  margin-bottom: 3px;
}

body.sip-vs-lumpsum-page .fact-value {
  font-size: 1rem;
  line-height: 1.1;
}

body.sip-vs-lumpsum-page .fact-label {
  font-size: 0.58rem;
  line-height: 1.15;
}

body.sip-vs-lumpsum-page .milestones {
  margin: 8px 0;
}

body.sip-vs-lumpsum-page .comparison-summary {
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
}

body.sip-vs-lumpsum-page .strategy-box {
  padding: 12px;
  border-radius: 14px;
}

body.sip-vs-lumpsum-page .strategy-title {
  margin-bottom: 9px;
  font-size: 0.92rem;
}

body.sip-vs-lumpsum-page .strategy-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

body.sip-vs-lumpsum-page .stat-row {
  display: grid;
  gap: 3px;
  font-size: 0.78rem;
}

body.sip-vs-lumpsum-page .seo-content .container {
  max-width: 1400px;
}

@media (max-width: 768px) {
  body.sip-vs-lumpsum-page .sip-vs-lumpsum-container {
    padding: 10px;
  }

  body.sip-vs-lumpsum-page .page-title {
    margin-bottom: 5px;
    font-size: 1.48rem;
  }

  body.sip-vs-lumpsum-page .sip-lump-lead {
    margin-bottom: 10px;
    padding: 0 4px;
    font-size: 0.78rem;
    line-height: 1.35;
  }

  body.sip-vs-lumpsum-page .calculator-box {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 8px;
    border-radius: 15px;
  }

  body.sip-vs-lumpsum-page .inputs,
  body.sip-vs-lumpsum-page .chart-box {
    padding: 8px;
    border-radius: 13px;
  }

  body.sip-vs-lumpsum-page .inputs {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 7px;
  }

  body.sip-vs-lumpsum-page .input-group {
    gap: 4px;
    padding: 7px;
    border-radius: 10px;
  }

  body.sip-vs-lumpsum-page .input-group:has(.scenario-selector),
  body.sip-vs-lumpsum-page .historical-scenarios,
  body.sip-vs-lumpsum-page .insight-box,
  body.sip-vs-lumpsum-page .internal-links {
    grid-column: 1 / -1;
  }

  body.sip-vs-lumpsum-page .input-group label,
  body.sip-vs-lumpsum-page .historical-scenarios label {
    font-size: 0.5rem;
    line-height: 1.05;
    white-space: nowrap;
  }

  body.sip-vs-lumpsum-page .input-group input[type="number"],
  body.sip-vs-lumpsum-page .input-group input[data-currency-textbox="1"] {
    min-height: 28px;
    padding: 5px 6px;
    border-radius: 8px;
    font-size: 0.72rem;
  }

  body.sip-vs-lumpsum-page .scenario-selector {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 4px;
  }

  body.sip-vs-lumpsum-page .scenario-btn {
    min-height: 42px;
    padding: 5px 2px;
    border-radius: 8px;
    font-size: 0.48rem;
    line-height: 1.08;
  }

  body.sip-vs-lumpsum-page .scenario-btn .icon {
    margin-bottom: 1px;
  }

  body.sip-vs-lumpsum-page .historical-scenarios {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    margin: 8px 0 0;
    padding: 7px;
    border-radius: 10px;
  }

  body.sip-vs-lumpsum-page .historical-btn {
    min-height: 30px;
    padding: 5px 3px;
    font-size: 0.52rem;
    line-height: 1.1;
  }

  body.sip-vs-lumpsum-page .insight-box {
    padding: 8px;
    font-size: 0.68rem;
  }

  body.sip-vs-lumpsum-page #headline {
    margin-bottom: 6px;
    font-size: 0.9rem;
  }

  body.sip-vs-lumpsum-page .chart-box canvas {
    max-height: 190px;
  }

  body.sip-vs-lumpsum-page .chart-box > .internal-links {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px !important;
    margin: 12px 0 0 !important;
    padding: 4px !important;
    border-radius: 9px !important;
    order: 99 !important;
  }

  body.sip-vs-lumpsum-page .chart-box > .internal-links p {
    grid-column: 1 / -1;
    margin-bottom: 2px !important;
    text-align: center;
    font-size: 0.52rem;
  }

  body.sip-vs-lumpsum-page .chart-box > .internal-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    grid-template-columns: 1fr;
    gap: 1px;
    min-height: 30px !important;
    padding: 3px 3px !important;
    border-radius: 7px !important;
    font-size: 0.52rem !important;
    line-height: 1.1;
    text-align: center;
  }

  body.sip-vs-lumpsum-page .chart-box > .internal-links a span {
    display: block;
    width: 100%;
    text-align: center;
  }

  body.sip-vs-lumpsum-page .chart-box > .internal-links a small {
    display: none;
  }

  body.sip-vs-lumpsum-page .race-tracker {
    margin: 6px 0;
    padding: 7px;
  }

  body.sip-vs-lumpsum-page .race-tracker h4 {
    margin-bottom: 6px;
    font-size: 0.66rem;
  }

  body.sip-vs-lumpsum-page .race-bar {
    height: 24px;
  }

  body.sip-vs-lumpsum-page .fun-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    margin: 7px 0;
  }

  body.sip-vs-lumpsum-page .fact-card {
    min-height: 60px;
    padding: 6px 3px;
    border-radius: 9px;
  }

  body.sip-vs-lumpsum-page .fact-icon {
    margin-bottom: 2px;
  }

  body.sip-vs-lumpsum-page .fact-icon .ui-icon {
    width: 15px;
    height: 15px;
  }

  body.sip-vs-lumpsum-page .fact-value {
    font-size: 0.68rem;
  }

  body.sip-vs-lumpsum-page .fact-label {
    font-size: 0.45rem;
  }

  body.sip-vs-lumpsum-page .comparison-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-top: 7px;
    padding-top: 7px;
  }

  body.sip-vs-lumpsum-page .strategy-box {
    padding: 7px 5px;
    border-radius: 10px;
  }

  body.sip-vs-lumpsum-page .strategy-title {
    margin-bottom: 5px;
    font-size: 0.58rem;
    line-height: 1.1;
  }

  body.sip-vs-lumpsum-page .strategy-title .dot {
    width: 7px;
    height: 7px;
  }

  body.sip-vs-lumpsum-page .strategy-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }

  body.sip-vs-lumpsum-page .stat-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
    padding: 3px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.025);
    font-size: 0.46rem;
    line-height: 1.12;
  }

  body.sip-vs-lumpsum-page .stat-row .value {
    font-size: 0.52rem;
    line-height: 1.08;
  }
}

@media (max-width: 768px) {
  body.sip-calculator-page main {
    padding: 0 10px 28px;
  }

  main:has(.sip-calculator-page) .calculator-container {
    padding-top: 10px;
  }

  main:has(.sip-calculator-page) .page-title {
    margin-bottom: 5px;
    font-size: 1.5rem;
  }

  main:has(.sip-calculator-page) .sip-page-lead {
    margin-bottom: 10px;
    padding: 0 4px;
    font-size: 0.78rem;
    line-height: 1.34;
  }

  main:has(.sip-calculator-page) .calculator-box {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 7px;
    border-radius: 15px;
  }

  main:has(.sip-calculator-page) .inputs,
  main:has(.sip-calculator-page) .chart-box {
    padding: 7px;
    border-radius: 12px;
  }

  main:has(.sip-calculator-page) .inputs {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px;
  }

  main:has(.sip-calculator-page) .calculator-container.sip-calculator-page .input-group {
    gap: 3px;
    padding: 6px !important;
    border-radius: 9px !important;
  }

  main:has(.sip-calculator-page) .input-group label {
    font-size: 0.5rem;
    line-height: 1.05;
    white-space: nowrap;
  }

  main:has(.sip-calculator-page) .input-group input[type="number"],
  main:has(.sip-calculator-page) .input-group input[data-currency-textbox="1"] {
    min-height: 26px;
    padding: 4px 6px;
    border-radius: 7px;
    font-size: 0.7rem;
  }

  main:has(.sip-calculator-page) #headline {
    padding: 7px;
    border-radius: 10px;
    font-size: 0.78rem;
  }

  main:has(.sip-calculator-page) .chart-box canvas {
    max-height: 175px;
    min-height: 165px;
  }

  main:has(.sip-calculator-page) .summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  main:has(.sip-calculator-page) .calculator-container.sip-calculator-page .summary > div {
    min-height: 46px;
    padding: 5px 3px !important;
    border-radius: 8px !important;
    font-size: 0.48rem !important;
  }

  main:has(.sip-calculator-page) .summary strong {
    margin-top: 2px;
    font-size: 0.6rem;
  }

  main:has(.sip-calculator-page) .chart-box > .internal-links {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 4px !important;
    margin: 12px 0 0 !important;
    padding: 4px !important;
    border-radius: 8px !important;
    order: 99 !important;
  }

  main:has(.sip-calculator-page) .chart-box > .internal-links p {
    grid-column: 1 / -1;
    margin-bottom: 0;
    text-align: center;
    font-size: 0.5rem;
  }

  main:has(.sip-calculator-page) .chart-box > .internal-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 28px;
    padding: 3px !important;
    border-radius: 6px !important;
    font-size: 0.5rem !important;
    line-height: 1.1;
    text-align: center;
  }

  main:has(.sip-calculator-page) .chart-box > .internal-links a small {
    display: none;
  }

  main:has(.sip-calculator-page) > .seo-content {
    border-radius: 16px;
  }

  main:has(.sip-calculator-page) > .seo-content .container {
    padding: 18px;
    border-radius: 16px;
  }

  main:has(.sip-calculator-page) .top-funds-section {
    margin: 10px 0 14px;
    padding: 8px;
    border-radius: 12px;
  }

  main:has(.sip-calculator-page) .funds-title {
    font-size: 1rem;
  }

  main:has(.sip-calculator-page) .funds-subtitle {
    margin-bottom: 8px;
    font-size: 0.68rem;
    line-height: 1.28;
  }

  main:has(.sip-calculator-page) .funds-tabs {
    gap: 5px;
    margin-bottom: 8px;
  }

  main:has(.sip-calculator-page) .fund-tab {
    padding: 5px 9px;
    font-size: 0.64rem;
  }

  main:has(.sip-calculator-page) .funds-table {
    font-size: 0.72rem;
  }

  main:has(.sip-calculator-page) .funds-table th,
  main:has(.sip-calculator-page) .funds-table td {
    padding: 8px 7px;
  }

  main:has(.sip-calculator-page) .funds-disclaimer {
    margin-top: 8px;
    padding: 7px;
  }
}

@media (max-width: 768px) {
  body.course-guide-page .hero {
    padding-top: 34px !important;
    padding-bottom: 22px !important;
  }

  body.course-guide-page .hero h1 {
    margin-bottom: 8px !important;
    font-size: clamp(2rem, 10vw, 3rem) !important;
  }

  body.course-guide-page .hero p {
    max-width: 680px !important;
    font-size: 0.98rem !important;
  }

  body.course-guide-page .blog-article {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  body.course-guide-page .blog-article-body {
    padding: 18px !important;
  }

  body.course-guide-page .course-lesson-shell {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    padding: 10px !important;
  }

  body.course-guide-page .course-module-tabs {
    display: flex !important;
    overflow-x: auto !important;
  }

  body.course-guide-page .course-module-detail,
  body.course-guide-page .course-lesson-panel {
    min-width: 0 !important;
    width: 100% !important;
  }

  .course-lesson-notes {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .course-lesson-note {
    min-height: 0 !important;
    padding: 12px !important;
  }
}

body.course-guide-page .hero {
  padding-top: 42px;
  padding-bottom: 28px;
}

body.course-guide-page .hero h1 {
  margin-bottom: 10px;
  font-size: clamp(2.6rem, 5.4vw, 4.6rem);
}

body.course-guide-page .hero p {
  max-width: 780px;
  font-size: 1.04rem;
  line-height: 1.55;
}

body.course-guide-page .course-overview {
  gap: 10px;
  margin: 12px 0 16px;
}

body.course-guide-page .course-panel {
  padding: 10px 12px;
  border-radius: 13px;
}

body.course-guide-page .course-panel h2 {
  margin-bottom: 6px;
  font-size: 1.04rem;
}

body.course-guide-page .course-panel ul {
  margin-bottom: 0;
}

body.course-guide-page .course-panel li {
  font-size: 0.9rem;
  line-height: 1.38;
}

body.course-guide-page .course-panel li + li {
  margin-top: 3px;
}

body.course-guide-page .course-example {
  font-size: 0.88rem;
  line-height: 1.42;
}

body.course-guide-page .course-module-detail .course-quiz-panel.is-active::before,
body.course-guide-page .course-module-detail .course-quiz-panel.is-active::after {
  content: none !important;
  display: none !important;
}

body.course-guide-page .course-module-detail .course-quiz-panel.is-active {
  padding: 0 !important;
  background:
    radial-gradient(circle at 12% 0%, rgba(34, 197, 94, 0.12), transparent 34%),
    linear-gradient(145deg, #0b1220, #111827) !important;
}

body.course-guide-page .course-module-detail .course-quiz-panel.is-active .course-quiz-hero {
  display: none !important;
}

body.course-guide-page .course-module-detail .course-quiz-panel.is-active .course-quiz-question {
  display: block !important;
  position: relative !important;
  z-index: 2 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 10px 14px 8px !important;
  color: #ffffff !important;
  font-size: clamp(1.2rem, 2.2vw, 1.75rem) !important;
  font-weight: 950 !important;
  line-height: 1.16 !important;
  background: transparent !important;
}

body.course-guide-page .course-module-detail .course-quiz-panel.is-active .course-quiz-options {
  position: relative !important;
  z-index: 2 !important;
  padding: 7px 14px 8px !important;
  background: transparent !important;
}

.course-quiz-layout {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(220px, 1fr);
  gap: 14px;
}

.course-quiz-main {
  min-width: 0;
}

.course-answer-box {
  align-self: stretch;
  display: grid;
  align-content: center;
  gap: 12px;
  margin: 7px 14px 14px 0;
  padding: 14px;
  border-radius: 18px;
  color: #dbeafe;
  background:
    radial-gradient(circle at 20% 0%, rgba(56, 189, 248, 0.2), transparent 36%),
    linear-gradient(145deg, rgba(15, 23, 42, 0.94), rgba(6, 78, 59, 0.5));
  border: 1px solid rgba(34, 197, 94, 0.22);
}

.course-answer-box span {
  color: #86efac;
  font-size: 0.7rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.course-answer-text {
  min-height: 96px;
  margin: 0;
  color: #e5e7eb;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.55;
  transition: filter 0.2s ease, opacity 0.2s ease;
}

.course-answer-text strong {
  display: inline-block;
  margin-bottom: 6px;
  color: #ffffff;
  font-size: 2.2rem;
  line-height: 1;
}

.course-answer-text.is-blurred {
  filter: blur(5px);
  opacity: 0.55;
  user-select: none;
}

.course-answer-toggle {
  min-height: 38px;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid rgba(134, 239, 172, 0.28);
  color: #dcfce7;
  background: rgba(34, 197, 94, 0.14);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 900;
  cursor: pointer;
}

.course-quiz-shell {
  display: grid;
  gap: 7px;
  padding: 14px;
}

.course-quiz-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.course-quiz-top .course-quiz-kicker,
.course-quiz-progress {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.course-quiz-top .course-quiz-kicker {
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.16);
  border: 1px solid rgba(34, 197, 94, 0.26);
}

.course-quiz-progress {
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.14);
  border: 1px solid rgba(96, 165, 250, 0.22);
}

.course-quiz-meter {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
}

.course-quiz-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e, #38bdf8);
  transition: width 0.2s ease;
}

body.course-guide-page .course-module-detail .course-quiz-panel.is-active .course-quiz-option {
  min-height: 42px;
  padding: 9px 12px;
  border-radius: 13px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  color: #e5e7eb;
  background: rgba(15, 23, 42, 0.78);
  font-size: 0.92rem;
}

body.course-guide-page .course-module-detail .course-quiz-panel.is-active .course-quiz-option:hover,
body.course-guide-page .course-module-detail .course-quiz-panel.is-active .course-quiz-option.is-selected {
  color: #ffffff;
  border-color: rgba(34, 197, 94, 0.58);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.24), rgba(56, 189, 248, 0.12));
}

.course-quiz-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 0 14px 14px;
}

.course-quiz-actions.is-complete {
  justify-content: center;
}

.course-quiz-nav {
  min-height: 38px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.76);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
}

.course-quiz-nav:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.45);
}

.course-quiz-nav--primary {
  color: #03130a;
  background: linear-gradient(135deg, #86efac, #38bdf8);
  border-color: transparent;
}

.course-quiz-nav--restart {
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(134, 239, 172, 0.24);
}

.course-quiz-score {
  display: flex;
  justify-content: flex-end;
  padding: 0 14px 14px;
  text-align: center;
  color: #e5e7eb;
}

.course-quiz-score[hidden] {
  display: none;
}

@media (max-width: 768px) {
  body.course-guide-page .course-module-detail .course-quiz-panel.is-active .course-quiz-question {
    padding: 12px 12px 8px !important;
    font-size: 1.12rem !important;
  }

  body.course-guide-page .course-module-detail .course-quiz-panel.is-active .course-quiz-options {
    gap: 8px !important;
    padding: 8px 12px 10px !important;
  }

  .course-quiz-layout {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .course-answer-box {
    margin: 0 12px 12px;
    padding: 14px;
  }

  .course-answer-text {
    min-height: 72px;
    font-size: 0.84rem;
  }

  .course-quiz-shell {
    padding: 10px;
  }

  .course-quiz-actions {
    padding: 0 10px 10px;
    gap: 6px;
  }

  .course-quiz-nav {
    padding-left: 10px;
    padding-right: 10px;
    font-size: 0.76rem;
  }

  body.course-guide-page .course-module-detail .course-quiz-panel.is-active .course-quiz-option {
    min-height: 44px;
    font-size: 0.84rem;
  }
}

