/* ============================================================
   indiaemi.com — global stylesheet
   Forest green editorial theme · matches calculatehours.net family
   ============================================================ */

/* Self-hosted fonts */
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('fonts/fraunces-400.woff2') format('woff2'); }
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('fonts/fraunces-500.woff2') format('woff2'); }
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('fonts/fraunces-600.woff2') format('woff2'); }
@font-face { font-family: 'Fraunces'; font-style: italic; font-weight: 500; font-display: swap;
  src: url('fonts/fraunces-500-italic.woff2') format('woff2'); }
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('fonts/geist-400.woff2') format('woff2'); }
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('fonts/geist-500.woff2') format('woff2'); }
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('fonts/geist-600.woff2') format('woff2'); }
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('fonts/geist-700.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('fonts/jetbrains-mono-400.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('fonts/jetbrains-mono-500.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('fonts/jetbrains-mono-600.woff2') format('woff2'); }

/* ============================================================
   TOKENS — FOREST GREEN EDITORIAL
   ============================================================ */
:root {
  --bg: #ffffff;
  --bg-warm: #f7faf7;
  --paper: #ffffff;
  --ink: #0f1e15;
  --ink-soft: #2d4a35;
  --ink-muted: #5a7062;
  --line: #e2e8e0;
  --line-soft: #f0f4ef;
  --line-strong: #c5d1c3;

  --accent: #047857;
  --accent-deep: #065f46;
  --accent-soft: #d1fae5;
  --accent-tint: #ecfdf5;

  --gold: #b8860b;
  --gold-soft: #fef3c7;

  --warning: #b45309;
  --warning-soft: #fef3c7;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-deep); text-decoration: underline; }

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
  background: var(--ink);
  color: white;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
}
.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar-inner .brand-mark { color: #8da89a; }
.topbar-inner .status {
  color: #ffffff;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}
.topbar-inner .status .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #10b981;
  animation: pulse 2s infinite;
}
.topbar-inner .slogan {
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.topbar-inner .slogan .sep { color: #10b981; margin: 0 7px; }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ============================================================
   HEADER + NAV
   ============================================================ */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-icon {
  font-family: 'JetBrains Mono', monospace;
  font-size: 17px;
  color: var(--accent);
  font-weight: 700;
}
.brand-name {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.brand-tld { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
}
.nav-links > a, .nav-dropdown > a {
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.nav-links > a:hover, .nav-dropdown > a:hover,
.nav-links > a.active, .nav-dropdown > a.active {
  color: var(--accent);
  text-decoration: none;
}
.caret { font-size: 10px; }

.nav-dropdown {
  position: relative;
}
.nav-dropdown .dropdown-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: -16px;
  margin-top: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(15, 30, 21, 0.08);
  padding: 8px 0;
  min-width: 240px;
  z-index: 200;
}
.nav-dropdown:hover .dropdown-panel,
.nav-dropdown:focus-within .dropdown-panel {
  display: block;
}
.dropdown-panel a {
  display: block;
  padding: 8px 18px;
  color: var(--ink-soft);
  font-size: 13.5px;
  text-decoration: none;
}
.dropdown-panel a:hover {
  background: var(--accent-tint);
  color: var(--accent-deep);
  text-decoration: none;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 4px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 12px 24px 24px;
  gap: 4px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.mobile-menu a {
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
}
.mobile-section-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  padding-top: 16px;
  padding-bottom: 4px;
}
.mobile-menu.open { display: flex; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: 60px 32px 30px;
  max-width: 1200px;
  margin: 0 auto;
}
.hero-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 16px;
}
.hero h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--ink);
  max-width: 820px;
  margin-bottom: 18px;
}
.hero h1 em {
  font-style: italic;
  color: var(--accent-deep);
}
.hero p.sub {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 720px;
  line-height: 1.55;
}

.page-header {
  max-width: 1200px;
  margin: 0 auto;
  padding: 50px 32px 24px;
}
.page-header h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(30px, 4.2vw, 44px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 16px;
}
.page-header h1 em { font-style: italic; color: var(--accent-deep); }
.page-header p {
  font-size: 17px;
  color: var(--ink-soft);
  line-height: 1.55;
  max-width: 720px;
}

/* ============================================================
   CALCULATOR
   ============================================================ */
.calc-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 32px 60px;
}
.loan-type-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--line);
  overflow-x: auto;
}
.loan-tab {
  padding: 12px 20px;
  font-family: 'Geist', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s;
}
.loan-tab:hover { color: var(--ink-soft); text-decoration: none; }
.loan-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.calc-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 28px;
}
@media (max-width: 880px) {
  .calc-grid { grid-template-columns: 1fr; }
}

.panel {
  background: var(--paper);
  border: 2px solid var(--line-strong);
  padding: 28px;
  border-radius: 4px;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.panel-step {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 500;
}
.panel-step .num {
  color: var(--accent);
  margin-right: 8px;
  font-weight: 700;
}
.panel-title {
  font-family: 'Fraunces', serif;
  font-size: 19px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.panel-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: var(--ink-muted);
}

/* Input rows */
.input-row { margin-bottom: 22px; }
.input-row:last-child { margin-bottom: 0; }
.input-label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
  gap: 12px;
  flex-wrap: wrap;
}
.input-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}
.input-value-wrap {
  display: flex;
  align-items: baseline;
  gap: 4px;
  background: var(--accent-tint);
  border: 1px solid var(--accent-soft);
  padding: 4px 10px;
  border-radius: 4px;
}
.input-prefix, .input-suffix {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--accent-deep);
  font-weight: 500;
}
.input-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 17px;
  font-weight: 600;
  color: var(--accent-deep);
  background: transparent;
  border: none;
  outline: none;
  width: 100px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Range slider */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: var(--line);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 0 0 1px var(--accent), 0 4px 10px rgba(4, 120, 87, 0.25);
  transition: transform 0.1s;
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }
input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 0 0 1px var(--accent), 0 4px 10px rgba(4, 120, 87, 0.25);
}
.slider-marks {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  padding: 0 2px;
}
.slider-marks span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  color: var(--ink-muted);
  letter-spacing: 0.05em;
}

/* Preset chips */
.preset-row {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.preset {
  padding: 5px 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  background: var(--bg-warm);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  border-radius: 3px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.15s;
}
.preset:hover {
  background: var(--accent-tint);
  border-color: var(--accent-soft);
  color: var(--accent-deep);
}

/* Select dropdown */
.select-wrap {
  display: inline-block;
  position: relative;
}
.select-wrap select {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-deep);
  background: var(--accent-tint);
  border: 1px solid var(--accent-soft);
  padding: 5px 26px 5px 10px;
  border-radius: 4px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.select-wrap::after {
  content: '▾';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--accent-deep);
  font-size: 10px;
}

/* Output panel */
.panel.output { background: var(--bg-warm); }
.big-result {
  text-align: center;
  padding: 20px 0 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
}
.big-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: var(--ink-soft);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 10px;
}
.big-emi {
  font-family: 'Fraunces', serif;
  font-size: clamp(40px, 6.5vw, 64px);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.big-emi .rupee {
  color: var(--ink-soft);
  font-weight: 400;
  font-style: italic;
  margin-right: 4px;
}
.big-emi .small {
  font-size: 0.45em;
  color: var(--ink-soft);
  font-weight: 500;
  font-family: 'Geist', sans-serif;
  font-style: normal;
}

/* Tax callout - the differentiator */
.tax-callout {
  background: white;
  border: 1px dashed var(--accent);
  border-radius: 4px;
  padding: 16px 18px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
@media (max-width: 480px) {
  .tax-callout { flex-direction: column; align-items: flex-start; gap: 10px; }
  .tax-callout-mid { text-align: left !important; }
}
.tax-callout-left {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-deep);
  font-weight: 600;
  max-width: 160px;
  line-height: 1.4;
}
.tax-callout-mid { flex: 1; text-align: right; }
.tax-callout-value {
  font-family: 'Fraunces', serif;
  font-size: 26px;
  font-weight: 500;
  color: var(--accent-deep);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.tax-callout-sub {
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 2px;
}

/* Output stats */
.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  gap: 12px;
}
.stat-row:last-child { border-bottom: none; }
.stat-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: var(--ink-soft);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}
.stat-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stat-row.highlight .stat-value {
  color: var(--gold);
  font-weight: 600;
}
.stat-row.danger .stat-value { color: var(--warning); }
.stat-row.success .stat-value { color: var(--accent-deep); font-weight: 600; }

/* Chart */
.chart-row {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.chart-bar {
  height: 12px;
  background: var(--line);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  margin: 14px 0 10px;
}
.chart-bar .principal {
  background: var(--accent);
  height: 100%;
  transition: width 0.3s ease;
}
.chart-bar .interest {
  background: var(--gold);
  height: 100%;
  transition: width 0.3s ease;
}
.chart-legend {
  display: flex;
  gap: 18px;
  font-size: 12.5px;
  color: var(--ink-soft);
  font-family: 'JetBrains Mono', monospace;
  flex-wrap: wrap;
}
.chart-legend .dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}
.chart-legend .principal-dot { background: var(--accent); }
.chart-legend .interest-dot { background: var(--gold); }

/* Donut chart */
.chart-row {
  display: flex;
  align-items: center;
  gap: 22px;
}
.donut-wrap { flex: 0 0 auto; }
.donut circle { transition: stroke-dasharray 0.4s ease; }
.donut-center-top {
  font-size: 11px;
  fill: var(--ink-muted);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.04em;
}
.donut-center-val {
  font-size: 14px;
  fill: var(--ink);
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
}
.chart-legend-detailed {
  flex: 1 1 auto;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}
.chart-legend-detailed .legend-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.chart-legend-detailed .legend-top { color: var(--ink-soft); }
.chart-legend-detailed .legend-amt {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  color: var(--ink);
  font-size: 13.5px;
}

/* Prepayment block */
.prepay-block {
  border-top: 1px dashed var(--line-strong);
  padding-top: 18px;
  margin-top: 4px;
}
.prepay-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.prepay-optional { color: var(--ink-muted); font-weight: 400; font-size: 12px; }
.prepay-switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--ink-soft);
  cursor: pointer;
}
.prepay-switch input { accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; }
.prepay-type-row { display: flex; gap: 8px; }
.prepay-type, .prepay-goal {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  background: #fff;
  border-radius: 4px;
  font-size: 12.5px;
  color: var(--ink-soft);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}
.prepay-type:hover, .prepay-goal:hover { border-color: var(--accent); }
.prepay-type.active, .prepay-goal.active {
  background: var(--accent-tint);
  border-color: var(--accent);
  color: var(--accent-deep);
  font-weight: 600;
}
.prepay-goal-row { margin-top: 14px; }
.prepay-goal-label {
  display: block;
  font-size: 12px;
  color: var(--ink-muted);
  margin-bottom: 8px;
  font-family: 'JetBrains Mono', monospace;
}
.prepay-result {
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--accent-tint);
  border: 1px solid var(--accent-soft);
  border-radius: 4px;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.55;
  display: none;
}
.prepay-result.show { display: block; }
.prepay-result strong { color: var(--accent-deep); }

/* Actions */
.actions {
  display: flex;
  gap: 8px;
  margin-top: 22px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  font-family: 'Geist', sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: white;
}
.btn-primary:hover { background: var(--accent-deep); color: white; text-decoration: none; }
.btn-ghost {
  background: white;
  color: var(--ink-soft);
  border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-deep); text-decoration: none; }

/* ============================================================
   AMORTIZATION SCHEDULE
   ============================================================ */
.schedule-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px;
}
.schedule-toggle {
  display: inline-flex;
  background: var(--bg-warm);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 3px;
  margin-bottom: 16px;
}
.schedule-toggle button {
  background: transparent;
  border: none;
  padding: 6px 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: var(--ink-soft);
  cursor: pointer;
  border-radius: 3px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
}
.schedule-toggle button.active {
  background: var(--accent);
  color: white;
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.schedule-table th {
  background: var(--bg-warm);
  text-align: left;
  padding: 10px 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 500;
  border-bottom: 1px solid var(--line);
}
.schedule-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-soft);
  font-variant-numeric: tabular-nums;
}
.schedule-table tr:hover td { background: var(--accent-tint); }
.schedule-table .interest-cell { color: var(--gold); }
.schedule-table .principal-cell { color: var(--accent-deep); }
.schedule-table .total-row {
  background: var(--bg-warm);
  font-weight: 600;
}
/* Expandable year rows */
.schedule-table .year-row { cursor: pointer; }
.schedule-table .year-row td:first-child { font-weight: 500; }
.schedule-table .expand-caret {
  display: inline-block;
  width: 12px;
  color: var(--accent);
  transition: transform 0.15s ease;
  font-size: 10px;
}
.schedule-table .year-row.expanded .expand-caret { transform: rotate(90deg); }
.schedule-table .month-row td {
  background: var(--line-soft);
  font-size: 12.5px;
  padding-top: 7px;
  padding-bottom: 7px;
}
.schedule-table .month-row:hover td { background: var(--accent-tint); }
.schedule-table .month-row .month-label {
  padding-left: 30px;
  color: var(--ink-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
}

/* ============================================================
   FEATURES & FEATURE GRID
   ============================================================ */
.features-section {
  background: var(--bg-warm);
  padding: 60px 32px;
  border-top: 1px solid var(--line);
}
.features-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.features-section h2 {
  font-family: 'Fraunces', serif;
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  color: var(--ink);
}
.features-section h2 em {
  font-style: italic;
  color: var(--accent-deep);
}
.features-section .lede {
  font-size: 16px;
  color: var(--ink-soft);
  max-width: 640px;
  margin-bottom: 36px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}
.feature-card {
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: white;
  transition: all 0.15s;
}
.feature-card:hover {
  border-color: var(--accent-soft);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(15, 30, 21, 0.04);
}
.feature-card .feat-icon {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 10px;
}
.feature-card h3 {
  font-family: 'Fraunces', serif;
  font-size: 19px;
  font-weight: 500;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.feature-card p {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.55;
}

/* Linked feature cards */
a.feature-card { text-decoration: none; color: inherit; display: block; }
a.feature-card:hover { text-decoration: none; }
.feature-card-link {
  display: block;
  margin-top: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.04em;
}

/* ============================================================
   SECTIONS / PROSE
   ============================================================ */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 32px;
}
.section-narrow { max-width: 820px; }

.section h2 {
  font-family: 'Fraunces', serif;
  font-size: clamp(26px, 3.5vw, 36px);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 14px;
  line-height: 1.15;
}
.section h2 em { font-style: italic; color: var(--accent-deep); }
.section .lede {
  font-size: 17px;
  color: var(--ink-soft);
  line-height: 1.55;
  margin-bottom: 28px;
  max-width: 720px;
}

.prose {
  max-width: 720px;
  font-size: 16px;
  color: var(--ink);
  line-height: 1.7;
}
.prose h2 {
  font-family: 'Fraunces', serif;
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.015em;
  margin-top: 36px;
  margin-bottom: 14px;
  color: var(--ink);
}
.prose h3 {
  font-family: 'Geist', sans-serif;
  font-size: 18px;
  font-weight: 600;
  margin-top: 28px;
  margin-bottom: 10px;
  color: var(--ink);
}
.prose p { margin-bottom: 16px; }
.prose ul, .prose ol { margin-bottom: 16px; padding-left: 24px; }
.prose li { margin-bottom: 6px; }
.prose strong { font-weight: 600; color: var(--ink); }
.prose em { font-style: italic; }
.prose code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88em;
  background: var(--bg-warm);
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--ink);
  border: 1px solid var(--line);
}
.prose pre.code-block {
  background: var(--ink);
  color: #e2e8f0;
  padding: 18px 22px;
  border-radius: 4px;
  overflow-x: auto;
  margin: 18px 0;
  font-size: 13px;
  line-height: 1.55;
}
.prose pre.code-block code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}
.prose .data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 14px;
}
.prose .data-table th, .prose .data-table td {
  text-align: left;
  padding: 10px 14px;
  border: 1px solid var(--line);
}
.prose .data-table th {
  background: var(--bg-warm);
  font-weight: 600;
  font-size: 13px;
}

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 6px; margin-top: 20px; }
.faq-item {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 18px 22px;
  transition: border-color 0.15s, background 0.15s;
}
.faq-item:hover { border-color: var(--line-strong); }
.faq-q {
  font-family: 'Geist', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}
.faq-a {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.6;
}
.faq-a p { margin-bottom: 10px; }
.faq-a p:last-child { margin-bottom: 0; }
.faq-a ul { padding-left: 20px; margin-bottom: 10px; }
.faq-a code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88em;
  background: var(--bg-warm);
  padding: 1px 6px;
  border-radius: 3px;
}

/* Blog list */
.blog-list { display: flex; flex-direction: column; gap: 24px; margin-top: 24px; }
.blog-card {
  display: block;
  padding: 26px 30px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  text-decoration: none;
  color: var(--ink);
  transition: all 0.15s;
}
.blog-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(15, 30, 21, 0.06);
  text-decoration: none;
}
.blog-card-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.blog-card-title {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin-bottom: 10px;
  color: var(--ink);
}
.blog-card-excerpt {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.55;
  margin-bottom: 12px;
}
.blog-card-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.blog-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  padding: 3px 9px;
  background: var(--bg-warm);
  color: var(--ink-soft);
  border-radius: 3px;
  border: 1px solid var(--line);
}

/* Tools grid (more-tools.html) */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 24px;
}
.tool-card {
  display: block;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  text-decoration: none;
  color: var(--ink);
  transition: all 0.15s;
}
.tool-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(15, 30, 21, 0.05);
  text-decoration: none;
}
.tool-card-name {
  font-family: 'Fraunces', serif;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
  color: var(--ink);
}
.tool-card-desc {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.55;
  margin-bottom: 12px;
}
.tool-card-link {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: var(--accent);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--ink);
  color: #c5d6cc;
  margin-top: 60px;
  padding: 56px 0 24px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 32px;
}
.footer-col h4 {
  font-family: 'Geist', sans-serif;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: white;
  margin-bottom: 14px;
  font-weight: 700;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 9px; }
.footer-col a {
  color: #c5d6cc;
  text-decoration: none;
  font-size: 14.5px;
}
.footer-col a:hover { color: white; text-decoration: none; }
.footer-brand .brand-name {
  color: white;
  font-size: 21px;
  margin-bottom: 12px;
  display: inline-block;
}
.footer-brand .brand-tld { color: var(--accent); }
.footer-brand p {
  font-size: 14.5px;
  color: #c5d6cc;
  line-height: 1.6;
  max-width: 320px;
}
.footer-disclaimer {
  border-top: 1px solid #1a2e22;
  padding-top: 20px;
  font-size: 12.5px;
  color: #8da89a;
  line-height: 1.6;
}
.footer-disclaimer strong { color: #c5d6cc; }
.footer-bottom {
  margin-top: 20px;
  font-size: 13px;
  color: #8da89a;
}

/* ============================================================
   TOAST
   ============================================================ */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--ink);
  color: white;
  padding: 12px 22px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .topbar-inner .status { display: none; }
  .topbar-inner .brand-mark { display: none; }
  .topbar-inner { font-size: 10px; padding: 8px 18px; justify-content: center; }
  .topbar-inner .slogan .sep { margin: 0 5px; }
  .header-inner { padding: 16px 18px; }
  .nav-links { display: none; }
  .hamburger { display: inline-flex; }
  .hero { padding: 36px 18px 20px; }
  .calc-section { padding: 18px 18px 36px; }
  .features-section { padding: 40px 18px; }
  .section { padding: 36px 18px; }
  .page-header { padding: 36px 18px 18px; }
  .panel { padding: 22px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-inner { padding: 0 24px; }
  .input-value { width: 90px; }
  .schedule-section { padding: 24px 18px; }
  .schedule-table { font-size: 12.5px; }
  .schedule-table th, .schedule-table td { padding: 8px 10px; }
}

/* ============================================================
   PRINT STYLESHEET
   When a user prints any calculator page, we strip the chrome
   (nav, footer, ads, tracking pixels) and produce a clean,
   readable single-page printout with the calculator results.
   ============================================================ */
@media print {
  /* Reset colors for print — pure black text on white */
  * {
    background: white !important;
    color: black !important;
    box-shadow: none !important;
  }

  /* Hide elements that shouldn't print */
  .topbar,
  .site-header,
  .mobile-menu,
  .site-footer,
  .toast,
  script,
  .hamburger,
  .actions,
  .controls-row,
  .preset-row,
  .features-section,
  iframe[src*="ezoic"],
  [class*="ezoic"],
  [id*="ezoic"] {
    display: none !important;
  }

  /* Tighten typography for print */
  body {
    font-size: 11pt;
    line-height: 1.45;
    background: white;
    color: black;
  }

  .hero {
    padding: 0 0 18pt 0;
    max-width: none;
  }
  .hero-eyebrow {
    color: black !important;
    font-size: 9pt;
    margin-bottom: 8pt;
  }
  .hero h1 {
    font-size: 22pt;
    line-height: 1.15;
    margin-bottom: 8pt;
    color: black !important;
  }
  .hero h1 em {
    color: black !important;
    font-style: italic;
  }
  .hero p.sub {
    font-size: 11pt;
    color: #333 !important;
  }

  /* Calculator panels — stack on single page if possible */
  .calc-grid {
    display: block;
    padding: 0;
    page-break-inside: avoid;
  }
  .panel {
    border: 1pt solid black !important;
    padding: 10pt 14pt;
    margin-bottom: 12pt;
    page-break-inside: avoid;
  }
  .panel-head {
    border-bottom: 0.5pt solid #999 !important;
    padding-bottom: 6pt;
    margin-bottom: 8pt;
  }

  /* Show input values clearly in print */
  .input-value-wrap {
    background: #f5f5f5 !important;
    border: 0.5pt solid #999 !important;
  }

  /* Hide sliders in print — values shown via input-value */
  input[type="range"],
  .slider-marks {
    display: none !important;
  }

  /* Big result section */
  .big-result {
    border: 1pt solid black !important;
    padding: 10pt;
    margin: 10pt 0;
  }
  .big-emi {
    font-size: 28pt;
    color: black !important;
  }
  .big-label {
    color: #333 !important;
  }

  /* Tax callout */
  .tax-callout {
    border: 0.5pt dashed black !important;
    padding: 8pt 12pt;
    margin-bottom: 10pt;
  }
  .tax-callout-left {
    color: black !important;
  }
  .tax-callout-value {
    color: black !important;
    font-size: 18pt;
  }

  /* Stat rows */
  .stat-row {
    border-bottom: 0.3pt solid #ccc !important;
    padding: 5pt 0;
  }
  .stat-value {
    color: black !important;
  }
  .stat-row.highlight .stat-value {
    color: black !important;
    font-weight: 700;
  }

  /* Chart bars — make them visible in B&W */
  .chart-bar {
    border: 0.5pt solid black !important;
    height: 8pt;
  }
  .chart-bar .principal {
    background: #333 !important;
  }
  .chart-bar .interest {
    background: #bbb !important;
  }

  /* Amortization table — keep it readable */
  .schedule-section {
    padding: 14pt 0;
    page-break-before: auto;
  }
  .schedule-table {
    font-size: 9pt;
    width: 100%;
    border-collapse: collapse;
  }
  .schedule-table th,
  .schedule-table td {
    border: 0.3pt solid #999;
    padding: 4pt 6pt;
    text-align: right;
  }
  .schedule-table th {
    background: #eee !important;
    font-weight: 600;
  }
  .schedule-table thead {
    display: table-header-group;  /* repeat header on each page */
  }

  /* Prose pages (FAQ, about, blog) */
  .page-header h1 {
    font-size: 22pt;
    color: black !important;
  }
  .section {
    padding: 12pt 0;
    max-width: none;
  }
  .prose {
    font-size: 11pt;
  }
  .prose h2 {
    font-size: 16pt;
    margin-top: 18pt;
    page-break-after: avoid;
  }
  .prose h3 {
    font-size: 13pt;
    margin-top: 14pt;
    page-break-after: avoid;
  }

  /* FAQ items */
  .faq-item {
    border: 0.5pt solid #999 !important;
    margin-bottom: 8pt;
    padding: 10pt 14pt;
    page-break-inside: avoid;
  }

  /* Add a print-only footer credit */
  body::after {
    content: "Generated by indiaemi.com — Free EMI Calculator for India. For informational purposes only.";
    display: block;
    font-size: 8pt;
    color: #666 !important;
    text-align: center;
    border-top: 0.3pt solid #999;
    padding-top: 6pt;
    margin-top: 14pt;
  }

  /* Show full URL after links (for printed reference) */
  a[href^="http"]::after {
    content: " [" attr(href) "]";
    font-size: 0.85em;
    color: #555 !important;
  }
  /* But don't print absolute URLs for internal links — they're noise */
  a[href^="https://indiaemi.com"]::after,
  a[href^="/"]::after,
  a[href^="./"]::after,
  a[href^="../"]::after {
    content: "";
  }

  /* Page break tweaks */
  h1, h2, h3 {
    page-break-after: avoid;
  }
  table, .panel, .big-result, .tax-callout {
    page-break-inside: avoid;
  }
}

/* ============================================================
   ACCESSIBILITY: Focus states for keyboard navigation
   ============================================================ */
/* Hide default outline only when our custom focus is applied */
*:focus { outline: none; }

/* Custom focus ring that works on the forest-green theme */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* For dark backgrounds (topbar, footer), use a lighter ring */
.topbar a:focus-visible,
.site-footer a:focus-visible {
  outline-color: #d1fae5;
}

/* Sliders get a special focus state */
input[type="range"]:focus-visible {
  outline: 3px solid var(--accent-soft);
  outline-offset: 4px;
}

/* Skip-to-content link for screen readers and keyboard users */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent);
  color: white;
  padding: 8px 16px;
  z-index: 1000;
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus {
  top: 0;
}

/* Ensure text contrast meets WCAG AA on all states */
.btn-ghost:hover {
  color: var(--ink) !important;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   CALCULATOR HISTORY PANEL
   Saved scenarios from localStorage, per-calculator
   ============================================================ */
.history-section {
  background: var(--paper);
  border-top: 1px solid var(--line);
  padding: 36px 36px 40px;
  max-width: 1080px;
  margin: 0 auto;
}

.history-panel {
  background: var(--bg-warm);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 22px 26px;
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.history-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.history-label {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.history-count {
  font-size: 12px;
  color: var(--ink-muted);
  letter-spacing: 0.01em;
}

.history-clear {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-muted);
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.15s;
  flex-shrink: 0;
}

.history-clear:hover {
  border-color: #b45309;
  color: #b45309;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.12s;
  text-align: left;
  width: 100%;
  font-family: inherit;
}

.history-item:hover {
  border-color: var(--accent);
  background: var(--accent-tint);
  transform: translateX(2px);
}

.history-item:active {
  transform: translateX(2px) scale(0.99);
}

.history-item-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.history-amount {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.history-details {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
}

.history-item-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex-shrink: 0;
}

.history-emi {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent-deep);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.history-emi-suffix {
  font-size: 11px;
  color: var(--ink-muted);
  font-weight: 500;
  margin-left: 2px;
}

.history-time {
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: 0.01em;
}

/* Hide on print — printouts don't need history */
@media print {
  .history-section { display: none; }
}

@media (max-width: 720px) {
  .history-section {
    padding: 28px 18px 32px;
  }
  .history-panel {
    padding: 18px 18px;
  }
  .history-item {
    padding: 10px 12px;
    gap: 10px;
  }
  .history-amount,
  .history-emi {
    font-size: 14px;
  }
}

/* ============================================================
   LOAN COMPARISON PAGE
   ============================================================ */
.compare-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.loan-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px;
  background: #fff;
}
.loan-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.loan-dot {
  display: inline-block;
  width: 11px; height: 11px;
  border-radius: 50%;
  flex: 0 0 auto;
}
.loan-name {
  border: none;
  border-bottom: 1px dashed var(--line-strong);
  font-family: 'Fraunces', serif;
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  background: transparent;
  flex: 1;
  padding: 2px 0;
}
.loan-name:focus { outline: none; border-bottom-color: var(--accent); }
.loan-remove {
  border: none;
  background: transparent;
  color: var(--ink-muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}
.loan-remove:hover { color: #b91c1c; }
.loan-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--ink-soft);
}
.loan-input-wrap {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 4px 8px;
  background: var(--accent-tint);
}
.loan-input-wrap:focus-within { border-color: var(--accent); }
.loan-input {
  border: none;
  background: transparent;
  text-align: right;
  width: 90px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent-deep);
}
.loan-input:focus { outline: none; }
.loan-input-wrap .input-prefix,
.loan-input-wrap .input-suffix {
  color: var(--ink-muted);
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
}
.compare-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.compare-h2 {
  font-family: 'Fraunces', serif;
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--ink);
}
.compare-note {
  color: var(--ink-soft);
  margin-bottom: 16px;
  font-size: 14px;
}
.compare-table th .loan-dot { margin-right: 6px; }
.compare-winner {
  margin-top: 14px;
  padding: 12px 16px;
  background: var(--accent-tint);
  border: 1px solid var(--accent-soft);
  border-radius: 4px;
  color: var(--ink-soft);
  font-size: 14px;
}
.compare-winner strong { color: var(--accent-deep); }
.chart-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 20px;
  background: #fff;
}
.bar-legend {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 12px;
  font-size: 13px;
  color: var(--ink-soft);
}
.bar-legend .loan-dot { margin-right: 6px; }
.bar-val {
  font-size: 10.5px;
  fill: var(--ink-soft);
  font-family: 'JetBrains Mono', monospace;
}
.bar-axis {
  font-size: 11px;
  fill: var(--ink-muted);
  font-family: 'JetBrains Mono', monospace;
}

/* ============================================================
   LOAN INSIGHTS SECTION (between calculator and schedule)
   ============================================================ */
.li-insights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}
.li-insight {
  background: var(--accent-tint);
  border: 1px solid var(--accent-soft);
  border-radius: 6px;
  padding: 14px 16px;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.5;
}
.li-insight strong { color: var(--accent-deep); }
.li-charts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
.li-chart {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 20px;
  background: #fff;
}
.li-h3 {
  font-family: 'Fraunces', serif;
  font-size: 19px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 4px;
}
.li-note-p {
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 14px;
}
.li-axis {
  font-size: 11px;
  fill: var(--ink-muted);
  font-family: 'JetBrains Mono', monospace;
}
.li-note {
  font-size: 11px;
  fill: var(--ink-soft);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
}
@media (min-width: 900px) {
  .li-charts { grid-template-columns: 1fr 1fr; }
  .li-chart:nth-child(3) { grid-column: 1 / -1; }
}

/* ============================================================
   STRESS TEST + PREPAYMENT PANEL (compact, main pages)
   ============================================================ */
.stress-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--accent-tint);
  border: 1px solid var(--accent-soft);
  border-radius: 6px;
  padding: 13px 16px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--accent-deep);
  cursor: pointer;
  transition: background 0.15s ease;
}
.stress-toggle:hover { background: var(--accent-soft); }
.stress-ico { margin-right: 6px; }
.stress-caret { transition: transform 0.15s ease; font-size: 11px; }
.stress-toggle.open .stress-caret { transform: rotate(90deg); }
.stress-body {
  border: 1px solid var(--line);
  border-top: none;
  border-radius: 0 0 6px 6px;
  padding: 18px 16px;
  background: #fff;
}
.stress-intro { font-size: 13px; color: var(--ink-soft); margin-bottom: 16px; line-height: 1.5; }
.stress-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.stress-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 10px;
}
.stress-shock-out {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  color: var(--gold);
  font-size: 15px;
}
.stress-chips { display: flex; gap: 6px; margin-top: 10px; }
.stress-chips button {
  flex: 1;
  font-size: 12.5px;
  padding: 7px 0;
  border: 1px solid var(--line-strong);
  background: #fff;
  border-radius: 4px;
  color: var(--ink-soft);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}
.stress-chips button:hover { border-color: var(--accent); }
.stress-chips button.active {
  background: var(--accent-tint);
  border-color: var(--accent);
  color: var(--accent-deep);
  font-weight: 600;
}
.stress-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  cursor: pointer;
}
.stress-switch input { accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; }
.stress-field-row { display: flex; gap: 12px; }
.stress-field {
  flex: 1;
  font-size: 12px;
  color: var(--ink-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stress-field input {
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 7px 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent-deep);
  background: var(--accent-tint);
}
.stress-field input:focus { outline: none; border-color: var(--accent); }
.stress-result {
  border-radius: 6px;
  padding: 14px 16px;
  background: var(--accent-tint);
  border: 1px solid var(--accent-soft);
}
.stress-result:empty { display: none; }
.stress-line { font-size: 13.5px; line-height: 1.6; color: var(--ink-soft); }
.stress-line strong { color: var(--accent-deep); }
.stress-rescue {
  border-top: 1px solid var(--accent-soft);
  margin-top: 12px;
  padding-top: 12px;
}

/* ============================================================
   RBI REPO SHOCK — THREE-WAY COMPARISON
   ============================================================ */
.rs3-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.rs3-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}
.rs3-current { border-color: var(--accent-soft); background: var(--accent-tint); }
.rs3-emi { border-color: #FAC775; background: #FAEEDA; }
.rs3-ten { border-color: #F09595; background: #FCEBEB; }
.rs3-head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
}
.rs3-current .rs3-head { color: var(--accent-deep); }
.rs3-emi .rs3-head { color: #633806; }
.rs3-ten .rs3-head { color: #791F1F; }
.rs3-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.rs3-metric { margin-bottom: 12px; }
.rs3-label {
  display: block;
  font-size: 11px;
  color: var(--ink-muted);
  margin-bottom: 2px;
}
.rs3-emi .rs3-label { color: #854F0B; }
.rs3-ten .rs3-label { color: #A32D2D; }
.rs3-val {
  font-size: 18px;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  color: var(--ink);
}
.rs3-emi .rs3-val { color: #412402; }
.rs3-ten .rs3-val { color: #501313; }
.rs3-delta {
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
  color: #854F0B;
  margin: -8px 0 12px;
}
.rs3-sub { font-size: 11px; margin: -8px 0 12px; }
.rs3-emi .rs3-sub { color: #854F0B; }
.rs3-ten .rs3-sub { color: #A32D2D; }
.rs3-hero {
  margin-top: 16px;
  background: #FCEBEB;
  border: 1px solid #F09595;
  border-radius: 8px;
  padding: 18px;
  text-align: center;
}
.rs3-hero.safe { background: var(--accent-tint); border-color: var(--accent-soft); }
.rs3-hero-top { font-size: 13px; color: #791F1F; margin-bottom: 4px; }
.rs3-hero.safe .rs3-hero-top { color: var(--accent-deep); }
.rs3-hero-num {
  font-size: 34px;
  font-weight: 600;
  color: #A32D2D;
  font-family: 'JetBrains Mono', monospace;
  line-height: 1.1;
}
.rs3-hero.safe .rs3-hero-num { color: var(--accent-deep); }
.rs3-hero-sub { font-size: 13px; color: #791F1F; margin-top: 4px; }
.rs3-hero.safe .rs3-hero-sub { color: var(--accent-deep); }
@media (max-width: 640px) {
  .rs3-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   BALANCE TRANSFER — VERDICT CARD
   ============================================================ */
.verdict-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
  border-top: 4px solid var(--ink-muted);
  background: #fff;
}
.verdict-card.v-yes { border-top-color: var(--accent); background: var(--accent-tint); }
.verdict-card.v-marginal { border-top-color: #BA7517; background: #FAEEDA; }
.verdict-card.v-no { border-top-color: #A32D2D; background: #FCEBEB; }
.verdict-badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}
.v-yes .verdict-badge { background: var(--accent); color: #fff; }
.v-marginal .verdict-badge { background: #BA7517; color: #fff; }
.v-no .verdict-badge { background: #A32D2D; color: #fff; }
.verdict-headline {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--ink);
  margin-bottom: 20px;
}
.verdict-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.verdict-cell {
  background: #fff;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.vc-label { font-size: 11.5px; color: var(--ink-muted); }
.vc-val {
  font-size: 16px;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  color: var(--ink);
}
.verdict-topup {
  margin-top: 18px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.verdict-topup strong { color: var(--accent-deep); }
@media (max-width: 640px) {
  .verdict-grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   BALANCE TRANSFER — BENCHMARK SELECTOR & DIAGNOSTIC
   ============================================================ */
.bt-select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
}
.bt-select:focus { outline: none; border-color: var(--accent); }
.bt-bench-note {
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 8px;
  line-height: 1.5;
}
.bt-bench-note:empty { display: none; }
.bt-bench-note.warn { color: #854F0B; }
.bt-ref {
  font-size: 11.5px;
  color: var(--ink-muted);
  margin-top: 8px;
  font-family: 'JetBrains Mono', monospace;
  line-height: 1.5;
}
.bt-diagnostic {
  border-radius: 8px;
  padding: 16px 18px;
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.55;
  border-left: 4px solid #BA7517;
  border-radius: 0 8px 8px 0;
  background: #FAEEDA;
  color: #633806;
}
.bt-diagnostic.ok {
  border-left-color: var(--accent);
  background: var(--accent-tint);
  color: var(--ink-soft);
}
.bt-diagnostic strong { font-weight: 700; }
.bt-diagnostic.warn strong { color: #633806; }
.bt-diagnostic.ok strong { color: var(--accent-deep); }

/* ============================================================
   "SHOW THE MATH" PANEL
   ============================================================ */
.math-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--line-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 16px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.15s ease;
}
.math-toggle:hover { background: var(--line); }
.math-ico { margin-right: 6px; font-style: italic; font-family: 'Fraunces', serif; }
.math-caret { transition: transform 0.15s ease; font-size: 11px; }
.math-toggle.open .math-caret { transform: rotate(90deg); }
.math-body {
  border: 1px solid var(--line);
  border-top: none;
  border-radius: 0 0 6px 6px;
  padding: 16px;
  background: #fff;
}
.math-intro { font-size: 13px; color: var(--ink-soft); margin-bottom: 14px; line-height: 1.55; }
.math-table { width: 100%; border-collapse: collapse; margin-bottom: 6px; }
.math-table td { padding: 6px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; vertical-align: top; }
.math-table .math-l { color: var(--ink-soft); padding-right: 16px; }
.math-table .math-v {
  text-align: right;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
.math-firstmonth {
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--accent-tint);
  border: 1px solid var(--accent-soft);
  border-radius: 6px;
}
.math-fm-title { font-size: 12.5px; font-weight: 600; color: var(--accent-deep); margin-bottom: 6px; }
.math-firstmonth .math-table td { border-bottom-color: var(--accent-soft); }
.math-note { font-size: 12px; color: var(--ink-muted); margin-top: 12px; line-height: 1.5; font-style: italic; }

/* ============================================================
   FORMULAS PAGE
   ============================================================ */
.formula-block {
  background: var(--accent-tint);
  border: 1px solid var(--accent-soft);
  border-radius: 8px;
  padding: 18px 20px;
  margin: 16px 0;
}
.formula-eq {
  font-family: 'JetBrains Mono', monospace;
  font-size: 15px;
  color: var(--accent-deep);
  line-height: 1.7;
  text-align: center;
}
.formula-eq + .formula-eq { margin-top: 8px; }
.formula-eq sup { font-size: 11px; }
.formula-eq sub { font-size: 11px; }
.formula-key {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 16px;
}
.formula-key td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
  vertical-align: top;
}
.formula-key td:first-child {
  width: 56px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent-deep);
}

/* ============================================================
   ADSTERRA AD BANNER (below nav, above content)
   ============================================================ */
.ad-banner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px 16px;
  background: var(--line-soft);
  border-bottom: 1px solid var(--line);
  min-height: 66px;
}
.ad-banner-inner {
  display: flex;
  justify-content: center;
  align-items: center;
}
.ad-banner-inner.desktop { width: 728px; height: 90px; }
.ad-banner-inner.mobile { display: none; width: 320px; height: 50px; }
@media (max-width: 760px) {
  .ad-banner { min-height: 60px; padding: 8px 12px; }
  .ad-banner-inner.desktop { display: none; }
  .ad-banner-inner.mobile { display: flex; }
}
