:root {
  --accent: #f26b38;
  --accent-ink: #fffaf4;
  --money-green: #1f7a5a;
  --money-green-soft: #dcefe7;
  --warm-surface: #fff8ef;
}

body {
  background:
    radial-gradient(circle at 85% 4%, rgba(242, 107, 56, 0.13), transparent 24rem),
    linear-gradient(180deg, #fffdf8 0, #f6f1e8 42rem, var(--canvas) 100%);
}

main { padding-top: clamp(2.5rem, 8vw, 6.5rem); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(16rem, 0.55fr);
  align-items: end;
  gap: clamp(2rem, 6vw, 6rem);
  padding-bottom: clamp(3rem, 8vw, 6.5rem);
}

.hero__copy { max-width: 52rem; }
.hero h1 { max-width: 13ch; margin-bottom: 1.35rem; }

.hero__lede {
  max-width: 43rem;
  margin-bottom: 1.6rem;
  font-size: clamp(1rem, 2vw, 1.25rem);
}

.trust-row { display: flex; flex-wrap: wrap; gap: 0.55rem; }

.trust-row span {
  border: 1px solid #e6d7c6;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  padding: 0.45rem 0.75rem;
  color: #536071;
  font-size: 0.82rem;
  font-weight: 750;
}

.hero__note {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #17263b;
  padding: clamp(1.5rem, 4vw, 2.2rem);
  color: white;
  box-shadow: 0 24px 65px rgba(19, 32, 53, 0.2);
}

.hero__note::after {
  position: absolute;
  right: -2rem;
  bottom: -3.25rem;
  width: 9rem;
  aspect-ratio: 1;
  border: 1.5rem solid rgba(242, 107, 56, 0.25);
  border-radius: 50%;
  content: '';
}

.hero__note p { position: relative; z-index: 1; color: #cbd3de; }
.hero__note p:last-child { margin-bottom: 0; }
.hero__note strong { color: white; font-size: 1.1rem; }

.hero__note-icon {
  display: grid;
  width: 3rem;
  aspect-ratio: 1;
  place-items: center;
  margin-bottom: 2rem;
  border-radius: 0.9rem;
  background: var(--accent);
  font-size: 1.5rem;
  font-weight: 850;
}

.workspace {
  border: 1px solid rgba(216, 212, 202, 0.9);
  border-radius: clamp(1rem, 3vw, 2rem);
  background: rgba(255, 253, 248, 0.86);
  padding: clamp(1rem, 4vw, 2.5rem);
  box-shadow: 0 30px 80px rgba(23, 31, 48, 0.1);
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.section-heading h2, .section-heading p { margin-bottom: 0; }
.section-heading > p { max-width: 28rem; text-align: right; }

.calculator-tabs {
  display: inline-grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  background: #eee9e0;
  padding: 0.3rem;
}

.calculator-tab {
  min-width: 10.5rem;
  background: transparent;
  color: var(--muted);
}

.calculator-tab[aria-selected="true"] {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 4px 14px rgba(23, 31, 48, 0.08);
}

.calculator-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.8fr);
  gap: clamp(1rem, 4vw, 3rem);
  margin-top: 1rem;
  border-radius: var(--radius-lg);
  background: white;
  padding: clamp(1rem, 4vw, 2.5rem);
}

.input-panel { display: grid; align-content: start; gap: 1.35rem; min-width: 0; width: 100%; }

.panel-intro { display: flex; align-items: flex-start; gap: 1rem; }
.panel-intro h3 { margin: 0 0 0.3rem; font-size: 1.35rem; }
.panel-intro p { margin: 0; }

.step-number {
  display: grid;
  flex: 0 0 auto;
  width: 2.5rem;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background: #17263b;
  color: white;
  font-size: 0.78rem;
  font-weight: 850;
}

.field-stack { display: grid; align-content: start; gap: 0.45rem; }
.field-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

label { display: flex; justify-content: space-between; gap: 0.75rem; }
label span { color: var(--muted); font-size: 0.8rem; font-weight: 650; }

input {
  min-height: 3.4rem;
  border-color: #c5c9cc;
  border-radius: 0.85rem;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  font-weight: 720;
}

input:focus { border-color: var(--accent); outline: 3px solid rgba(242, 107, 56, 0.14); }
input[aria-invalid="true"] { border-color: var(--danger); }

.field-meta { display: flex; justify-content: space-between; gap: 0.5rem; color: var(--muted); font-size: 0.76rem; }
.field-error { min-height: 1.1em; color: var(--danger); font-size: 0.76rem; font-weight: 700; }

.calculate-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3.5rem;
  margin-top: 0.25rem;
  padding-inline: 1.25rem;
  box-shadow: 0 12px 24px rgba(242, 107, 56, 0.2);
}

.calculate-button span { font-size: 1.25rem; }

.result-panel {
  align-self: stretch;
  border: 1px solid #d8e8e1;
  border-radius: 1.25rem;
  background: linear-gradient(160deg, #eef8f3, #f9fbf9);
  padding: clamp(1.25rem, 4vw, 2rem);
}

.result-panel--sip { border-color: #f2dccc; background: linear-gradient(160deg, #fff4ea, #fffaf4); }
.result-kicker { margin-bottom: 0.35rem; color: var(--money-green); font-size: 0.78rem; font-weight: 850; letter-spacing: 0.08em; text-transform: uppercase; }
.result-panel--sip .result-kicker { color: #b14b27; }

.result-hero {
  margin-bottom: 0;
  color: #102f26;
  font-size: clamp(2.1rem, 6vw, 3.8rem);
  font-weight: 880;
  letter-spacing: -0.05em;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.result-panel--sip .result-hero { color: #53281c; }
.result-caption { margin: 0.3rem 0 1.8rem; font-size: 0.82rem; }

.breakdown-bar {
  display: flex;
  overflow: hidden;
  height: 0.7rem;
  margin-bottom: 1.25rem;
  border-radius: 999px;
  background: #d8dadd;
}

.breakdown-bar span { transition: width 280ms ease; }
.breakdown-bar__principal { background: #17263b; }
.breakdown-bar__growth { background: var(--accent); }

.result-list { display: grid; gap: 0.8rem; margin: 0; }
.result-list > div { display: flex; justify-content: space-between; gap: 1rem; }
.result-list dt { display: flex; align-items: center; gap: 0.5rem; color: var(--muted); }
.result-list dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 800; text-align: right; }

.result-list__total { margin-top: 0.25rem; border-top: 1px solid rgba(19, 32, 53, 0.12); padding-top: 0.9rem; }
.result-list__total dt, .result-list__total dd { color: var(--ink); font-size: 1.05rem; font-weight: 850; }

.legend-dot { width: 0.55rem; aspect-ratio: 1; border-radius: 50%; }
.legend-dot--principal { background: #17263b; }
.legend-dot--growth { background: var(--accent); }

.formula-card { margin-top: 1.5rem; border-radius: 0.8rem; background: rgba(255, 255, 255, 0.7); padding: 0.9rem 1rem; }
.formula-card strong { font-size: 0.82rem; }
.formula-card p { margin: 0.25rem 0 0; font-size: 0.78rem; }

.explainers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: clamp(2.5rem, 7vw, 5rem);
}

.explainers article { border-top: 2px solid var(--ink); padding: 1rem 0.5rem 0; }
.explainers article > span { color: var(--accent); font-size: 0.78rem; font-weight: 850; }
.explainers h3 { margin: 1rem 0 0.5rem; }
.explainers p { margin: 0; font-size: 0.9rem; }

.financial-disclaimer {
  margin: 0;
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  font-size: 0.82rem;
  color: #536071;
}

.site-footer {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.affiliate-disclosure {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.5;
  color: #6a788c;
  padding-left: 1rem;
}

/* Monetization / Ad Slots (CLS-Safe) */
.ad-slot {
  margin-block: clamp(2rem, 5vw, 3.5rem);
  width: 100%;
}

.ad-slot--leaderboard {
  min-height: 90px;
}

.ad-slot--footer {
  min-height: 90px;
}

.ad-container {
  position: relative;
  border: 1px dashed rgba(242, 107, 56, 0.35);
  border-radius: var(--radius-md);
  background: rgba(255, 248, 239, 0.75);
  padding: 1rem 1.25rem;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.ad-container:hover {
  border-color: var(--accent);
  background: #fff8ef;
}

.ad-badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #7b889a;
  background: rgba(0, 0, 0, 0.05);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.ad-placeholder {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-grow: 1;
  gap: 1rem;
  flex-wrap: wrap;
}

.ad-text {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
}

.ad-cta {
  font-size: 0.88rem;
  font-weight: 750;
  color: var(--accent);
  white-space: nowrap;
}

@media (max-width: 50rem) {
  .hero { grid-template-columns: 1fr; }
  .calculator-panel { grid-template-columns: minmax(0, 1fr); min-width: 0; max-width: 100%; }
  .input-panel, .result-panel { min-width: 0; width: 100%; max-width: 100%; }
  .hero__note { max-width: 35rem; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 0.75rem; text-align: left; }
  .explainers { grid-template-columns: 1fr; }
  .ad-placeholder { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .ad-container { padding: 1rem; }
}

@media (max-width: 38rem) {
  .calculator-tabs {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0.35rem;
    padding: 0.35rem;
    width: 100%;
  }
  .calculator-tabs::-webkit-scrollbar {
    display: none;
  }
  .calculator-tab {
    flex: 1 0 auto;
    min-width: max-content;
    padding: 0.65rem 0.95rem;
    font-size: 0.84rem;
    white-space: nowrap;
    text-align: center;
  }
}

@media (max-width: 48rem) {
  .hero .lang-switcher { display: none !important; }
}

@media (max-width: 34rem) {
  main { padding-top: 0.75rem; }
  .tool-back-nav { margin-bottom: 0.75rem; font-size: 0.78rem; }
  .hero { gap: 1rem; padding-bottom: 1.25rem; }
  .hero h1 { font-size: clamp(1.35rem, 5.2vw, 1.65rem); max-width: 100%; margin-bottom: 0.5rem; line-height: 1.22; text-wrap: pretty; }
  .hero__lede { font-size: 0.88rem; line-height: 1.45; margin-bottom: 0.75rem; }
  .hero__top-row { flex-direction: column; align-items: flex-start !important; gap: 0.35rem !important; margin-bottom: 0.5rem !important; }
  .hero .lang-switcher { display: none !important; }
  .trust-row { gap: 0.35rem; }
  .trust-row span { font-size: 0.72rem; padding: 0.25rem 0.55rem; }
  .hero__note { padding: 0.85rem 1rem; border-radius: 12px; margin-top: 0.25rem; }
  .calculator-panel { padding-inline: 0.75rem; padding-block: 1rem; }
  .field-grid--two { grid-template-columns: 1fr; }
  .field-grid--three { grid-template-columns: 1fr; }
  .result-list > div { align-items: flex-start; }

  /* Mobile Input ergonomics - prevent iOS auto zoom */
  input, select {
    font-size: 16px !important;
    min-height: 2.85rem;
  }

  /* Full-width thumb-friendly button stacking on mobile */
  .form-actions-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
    width: 100%;
  }
  .calculate-button, .btn-reset {
    width: 100%;
    justify-content: center;
    text-align: center;
    min-height: 3rem;
  }
  .btn-export {
    width: 100%;
    justify-content: center;
    text-align: center;
    min-height: 2.75rem;
  }

  /* Mobile-friendly tenure chip touch targets */
  .tenure-presets {
    gap: 0.5rem;
  }
  .tenure-chip, .sip-tenure-chip {
    padding: 0.4rem 0.75rem;
    min-height: 2.2rem;
    font-size: 0.82rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* Quick Tenure Presets */
.tenure-presets {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: -0.25rem;
}

.tenure-presets__label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
}

.tenure-chip,
.sip-tenure-chip {
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fbf9f5;
  color: #4b5563;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tenure-chip:hover,
.sip-tenure-chip:hover {
  background: #f3ece1;
  border-color: #d1c7b7;
  color: var(--ink);
}

.tenure-chip.is-active,
.sip-tenure-chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  box-shadow: 0 2px 8px rgba(242, 107, 56, 0.25);
}

/* Interest Type Segmented Switcher */
.method-toggle-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.4rem;
  padding: 0.3rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: #f4efe7;
}

.method-radio-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  border-radius: 0.65rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
  user-select: none;
}

.method-radio-label input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.method-radio-label.is-active {
  background: white;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
}

/* Flat Rate Notice Card */
.flat-notice-card {
  margin-block: 0.75rem 1rem;
  padding: 0.85rem 1rem;
  border-radius: 0.85rem;
  border: 1px solid #fed7aa;
  background: #fffbeb;
  color: #78350f;
}

.flat-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #fde68a;
  color: #92400e;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
}

.badge-apr {
  font-size: 0.85rem;
  font-weight: 650;
  color: #78350f;
}

.badge-apr strong {
  font-size: 1.05rem;
  color: #b45309;
  font-weight: 850;
  margin-left: 0.25rem;
}

.flat-notice-card p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #92400e;
}

/* Schedule Breakdown View Bar */
.schedule-view-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0.65rem 0.9rem;
  background: #fbf9f6;
  border-bottom: 1px solid #ebe5dc;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.schedule-view-toggle {
  display: inline-flex;
  gap: 0.35rem;
  background: #eee8df;
  padding: 0.25rem;
  border-radius: 999px;
}

.view-chip {
  padding: 0.3rem 0.85rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #536071;
  font-size: 0.78rem;
  font-weight: 750;
  cursor: pointer;
  transition: all 0.15s ease;
}

.view-chip:hover {
  color: var(--ink);
}

.view-chip.is-active {
  background: white;
  color: #17263b;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.09);
}

/* Schedule Drawers & Amortization Table */
.schedule-drawer {
  margin-top: 1.5rem;
  border-top: 1px solid #ebe5dc;
  padding-top: 1.25rem;
}

.schedule-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: #fdfaf6;
  border: 1px solid #e7ded4;
  border-radius: var(--radius-sm, 8px);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.schedule-toggle:hover {
  background: #f6efe4;
  border-color: #d8c9b8;
}

.schedule-toggle[aria-expanded="true"] .schedule-toggle__arrow {
  color: var(--ink);
}

.schedule-toggle__arrow {
  font-size: 0.75rem;
  color: var(--muted);
  transition: transform 0.2s ease;
}

.schedule-box {
  margin-top: 0.85rem;
  background: #fffdfa;
  border: 1px solid #ebe5dc;
  border-radius: var(--radius-sm, 8px);
  overflow: hidden;
  display: block;
}

.schedule-box[hidden] {
  display: none !important;
}

.table-scroll {
  width: 100%;
  max-height: 24rem;
  overflow-x: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  border-radius: var(--radius-sm, 8px);
}

.table-scroll::-webkit-scrollbar {
  height: 6px;
  width: 6px;
}

.table-scroll::-webkit-scrollbar-thumb {
  background: #d6cbbf;
  border-radius: 999px;
}

.table-scroll-hint {
  display: none;
  font-size: 0.74rem;
  color: var(--muted);
  padding: 0.5rem 0.85rem 0.2rem;
  margin: 0;
  font-weight: 650;
  background: #fbf9f6;
  border-bottom: 1px solid #ebe5dc;
}

@media (max-width: 48rem) {
  .table-scroll-hint {
    display: block;
  }
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  text-align: right;
  white-space: nowrap;
}

.schedule-table th,
.schedule-table td {
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid #f0ebe4;
}

.schedule-table th {
  position: sticky;
  top: 0;
  background: #f7f2eb;
  font-weight: 750;
  color: #374151;
  z-index: 1;
}

.schedule-table tbody tr:hover {
  background: #fbf7f0;
}

.schedule-table .col-year {
  text-align: left;
  font-weight: 750;
  color: #17263b;
}

.schedule-table .col-principal {
  color: #2b5c8f;
  font-weight: 600;
}

.schedule-table .col-interest {
  color: #c05621;
}

.schedule-table .col-growth {
  color: #1f7a5a;
  font-weight: 700;
}

.schedule-table .col-balance {
  font-weight: 750;
  color: #111827;
}

/* Mutual Funds Recommendations Section */
.funds-recommendation-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px dashed #e2dbce;
}

.funds-header {
  margin-bottom: 1.5rem;
}

.funds-badge {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: #e6f4ea;
  color: #137333;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.funds-header h3 {
  margin: 0.25rem 0 0.5rem;
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  color: var(--ink);
}

.funds-sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.funds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(17rem, 100%), 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

@media (max-width: 25rem) {
  .fund-card__actions {
    grid-template-columns: 1fr;
  }
}

.fund-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #e5ded4;
  border-radius: var(--radius-md, 12px);
  padding: 1.25rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 4px 12px rgba(23, 31, 48, 0.04);
}

.fund-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(23, 31, 48, 0.08);
  border-color: #d1c5b4;
}

.fund-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.fund-card__cat {
  font-size: 0.75rem;
  font-weight: 750;
  color: #556987;
  background: #f1f5f9;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.fund-card__return {
  font-size: 0.8rem;
  font-weight: 850;
  color: #137333;
  background: #e6f4ea;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}

.fund-card__name {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  color: var(--ink);
  font-weight: 750;
}

.fund-card__plan {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}

.fund-card__highlight {
  font-size: 0.84rem;
  line-height: 1.45;
  color: #4b5563;
  margin: 0 0 1rem;
  flex-grow: 1;
}

.fund-card__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  padding: 0.65rem 0.5rem;
  background: #fbf9f6;
  border-radius: 6px;
  border: 1px solid #efe8df;
  margin-bottom: 1rem;
  text-align: center;
}

.fund-card__stats span {
  display: block;
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
}

.fund-card__stats strong {
  display: block;
  font-size: 0.85rem;
  color: var(--ink);
  font-weight: 750;
  margin-top: 0.15rem;
}

.fund-card__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.fund-card__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.5rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 750;
  text-decoration: none;
  transition: all 0.15s ease;
  text-align: center;
}

.fund-card__btn--groww {
  background: #00d09c;
  color: #0b3425;
}

.fund-card__btn--groww:hover {
  background: #02be8f;
  color: #052016;
}

.fund-card__btn--zerodha {
  background: #387ed1;
  color: white;
}

.fund-card__btn--zerodha:hover {
  background: #2b6cb8;
  color: white;
}

.funds-legal-notice {
  margin-top: 1.5rem;
  padding: 0.85rem 1rem;
  background: #fbf9f5;
  border-left: 3px solid #d4c8b8;
  border-radius: 0 6px 6px 0;
  font-size: 0.78rem;
  color: #6b7280;
  line-height: 1.45;
}

.funds-legal-notice p {
  margin: 0;
}

/* FIRE Calculator Specific Styles */
.field-grid--three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (max-width: 40rem) {
  .field-grid--three {
    grid-template-columns: 1fr;
  }
}

.fire-corpus-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin: 1.25rem 0;
}

@media (max-width: 32rem) {
  .fire-corpus-cards {
    grid-template-columns: 1fr;
  }
}

.fire-target-card {
  padding: 1rem 1.1rem;
  border-radius: var(--radius-md, 10px);
  background: #fbf7f0;
  border: 1px solid #ebdccb;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.fire-target-card--standard {
  background: #fff8ef;
  border-color: #f7d2b2;
}

.fire-target-card--future {
  background: #f0f7f4;
  border-color: #c7e5d8;
}

.fire-card-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
}

.fire-target-card strong {
  font-size: clamp(1.2rem, 2.5vw, 1.45rem);
  font-weight: 850;
  color: var(--ink);
}

.fire-target-card small {
  font-size: 0.78rem;
  color: #5a6b82;
}

.fire-variations-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 34rem) {
  .fire-variations-row {
    grid-template-columns: 1fr;
  }
}

.fire-mini-card {
  padding: 0.75rem 0.6rem;
  border-radius: 8px;
  background: #fdfbf7;
  border: 1px solid #ece4d8;
  text-align: center;
}

.fire-mini-card span {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
}

.fire-mini-card strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--ink);
  margin-top: 0.2rem;
}

.fire-mini-card--highlight {
  background: #fff6ee;
  border-color: #fbd3b6;
}

.fire-mini-card--highlight strong {
  color: #c05621;
}

.row-fire-achieved {
  background: #ecfdf5 !important;
}

.fire-badge-status {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.status-fire-ready {
  background: #d1fae5;
  color: #065f46;
}

.status-accumulating {
  background: #f3f4f6;
  color: #4b5563;
}

/* Language Switcher */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: #ece6dc;
  padding: 0.25rem;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.lang-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 750;
  cursor: pointer;
  transition: all 0.15s ease;
}

.lang-btn:hover {
  color: var(--ink);
}

.lang-btn.is-active {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Action Controls (Reset & Export) */
.form-actions-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.btn-reset {
  padding: 0.85rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm, 8px);
  background: #fbf8f3;
  color: #4b5563;
  font-size: 0.9rem;
  font-weight: 750;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-reset:hover {
  background: #f3ece1;
  color: var(--ink);
  border-color: #d1c5b4;
}

.btn-export {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1rem;
  border: 1px solid #c9d6df;
  border-radius: var(--radius-sm, 8px);
  background: #f4f8fb;
  color: #1e3a5f;
  font-size: 0.82rem;
  font-weight: 750;
  cursor: pointer;
  margin-top: 1rem;
  transition: all 0.15s ease;
}

.btn-export:hover {
  background: #e6f0f7;
  border-color: #a3bfd4;
}

/* FIRE Educational Guide */
.fire-educational-guide {
  margin-top: 2.75rem;
  border-top: 2px dashed #ebdccb;
  padding-top: 2rem;
}

.fire-guide-header {
  margin-bottom: 1.5rem;
}

.fire-guide-badge {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.fire-guide-header h4 {
  margin: 0.25rem 0 0.5rem;
  font-size: clamp(1.2rem, 2.5vw, 1.45rem);
  color: var(--ink);
}

.fire-guide-lead {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
  max-width: 50rem;
}

.fire-guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

@media (max-width: 48rem) {
  .fire-guide-grid {
    grid-template-columns: 1fr;
  }
}

.fire-guide-card {
  background: #fffdfa;
  border: 1px solid #ebe5dc;
  border-radius: var(--radius-md, 10px);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
}

.fire-guide-card h5 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--ink);
}

.fire-guide-card p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.55;
  color: #4b5563;
}

/* Mutual Fund Last-Updated Badge */
.fund-card__updated {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 650;
  color: #64748b;
  margin-top: 0.25rem;
  padding: 0.15rem 0.45rem;
  background: #f1f5f9;
  border-radius: 4px;
}

/* Telugu typography enhancement */
html[lang="te"] body {
  font-family: 'Noto Sans Telugu', 'Nirmala UI', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
}

html[lang="te"] h1,
html[lang="te"] h2,
html[lang="te"] h3,
html[lang="te"] h4,
html[lang="te"] h5 {
  line-height: 1.35;
}

/* Print Styles */
@media print {
  body {
    background: white !important;
    color: black !important;
  }
  .site-header,
  .site-footer,
  .ad-slot,
  .calculator-tabs,
  .calculate-button,
  .btn-reset,
  .btn-export,
  .funds-recommendation-section,
  .explainers,
  .tenure-presets,
  .lang-switcher,
  .schedule-toggle__arrow {
    display: none !important;
  }
  .hero {
    padding-bottom: 1.5rem !important;
  }
  .calculator-panel {
    display: block !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }
  .input-panel,
  .result-panel {
    page-break-inside: avoid;
  }
  .schedule-box {
    display: block !important;
    max-height: none !important;
    overflow: visible !important;
  }
  .table-scroll {
    max-height: none !important;
    overflow: visible !important;
  }
}


