/* ============================================================
   EMI calculator — SmartFinance
   Shell (nav, hero, page) aligned with SIP / FD / PPF. Pair with style.css.
   ============================================================ */

:root {
  --brand:        #1d9e75;
  --brand-dark:   #0f7558;
  --brand-tint:   #ecfdf5;
  --brand-tint-2: #d1fae5;
  --brand-line:   #a7f3d0;
  --bg:           #f7f8f6;
  --card:         #ffffff;
  --border:       #e5e7eb;
  --line-soft:    #f1f5f9;
  --text:         #0f172a;
  --muted:        #475569;
  --muted-light:  #94a3b8;
  --danger:       #e24b4a;
  --shadow-sm:    0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 1px rgba(15, 23, 42, 0.03);
  --shadow-md:    0 4px 12px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-lg:    0 14px 40px rgba(15, 23, 42, 0.10), 0 4px 12px rgba(15, 23, 42, 0.06);
  --shadow-glow:  0 12px 36px rgba(29, 158, 117, 0.18);
  --radius:       12px;
  --radius-sm:    8px;

  /* Legacy EMI tokens (used throughout this file) */
  --emi-bg: var(--bg);
  --emi-card: var(--card);
  --emi-border: var(--border);
  --emi-text: var(--text);
  --emi-muted: var(--muted);
  --emi-primary: var(--brand);
  --emi-primary-soft: var(--brand-tint);
  --emi-interest: var(--danger);
  --emi-section-a: #f0fdf9;
  --emi-section-b: #fffbeb;
  --emi-radius: var(--radius);
  --emi-shadow: var(--shadow-sm);
}

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background:
    radial-gradient(1200px 600px at 100% -10%, #ecfdf5 0%, transparent 55%),
    radial-gradient(1000px 500px at -10% 110%, #f1f5f9 0%, transparent 50%),
    var(--bg) !important;
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* ── Top nav ─────────────────────────────────────────────── */
.topnav {
  height: 52px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 4px 20px rgba(15, 23, 42, 0.06);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  padding: 0 24px;
  gap: 6px;
  font-size: 13px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.topnav .breadcrumb-item {
  color: var(--muted-light);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}

.topnav .breadcrumb-item:hover {
  color: var(--text);
}

.topnav .breadcrumb-sep {
  color: #d1d5db;
  user-select: none;
}

.topnav .breadcrumb-current {
  font-weight: 600;
  color: var(--text);
}

.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px 24px 56px;
}

header.hero {
  text-align: left;
  margin: 0 0 18px;
}

/* ── Marketing hero (matches FD / SIP) ───────────────────── */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
  align-items: center;
  background: linear-gradient(135deg, #ffffff 0%, #ecfdf5 45%, #f0fdf8 100%);
  border: 1px solid var(--brand-line);
  border-radius: 20px;
  padding: 26px 28px;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.6) inset;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(600px 220px at 80% -40%, rgba(29, 158, 117, 0.10) 0%, transparent 60%);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--brand-line);
  font-size: 11px;
  font-weight: 600;
  color: var(--brand-dark);
  letter-spacing: 0.01em;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}

.hero-kicker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 3px rgba(29, 158, 117, 0.18);
}

.page-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
}

.page-title-accent {
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand-dark) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.page-sub {
  font-size: 13px;
  color: var(--muted);
  margin: 8px 0 0;
  max-width: 56ch;
  line-height: 1.55;
}

.page-sub a {
  color: var(--brand-dark);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.page-sub a:hover {
  color: var(--brand);
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff 0%, var(--brand-tint) 100%);
  border: 1px solid var(--brand-line);
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-dark);
  box-shadow: var(--shadow-sm);
}

.hero-chip svg {
  flex-shrink: 0;
  color: var(--brand);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--brand);
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #ffffff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(29, 158, 117, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(29, 158, 117, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.cta-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cta-btn.cta-ghost {
  background: #fff;
  color: var(--brand-dark);
  border-color: var(--brand-line);
  box-shadow: var(--shadow-sm);
}

.cta-btn.cta-ghost:hover {
  background: var(--brand-tint);
  box-shadow: var(--shadow-md);
}

.hero-art {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-art svg {
  width: 100%;
  height: auto;
  max-width: 320px;
  filter: drop-shadow(0 16px 32px rgba(29, 158, 117, 0.22));
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-md);
}

/* ── SEO band below hero ──────────────────────────────────── */
.emi-seo-card {
  margin-bottom: 24px;
  border-radius: 16px !important;
  border: 1px solid var(--border) !important;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, #f8fafc 50%, var(--brand-tint) 100%);
  box-shadow: var(--shadow-md);
  border-left: 5px solid var(--brand) !important;
  position: relative;
  overflow: hidden;
}

.emi-seo-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: min(50%, 200px);
  height: 100%;
  background: radial-gradient(ellipse at 100% 0%, rgba(29, 158, 117, 0.14) 0%, transparent 72%);
  pointer-events: none;
}

.emi-seo-card .seo-intro-title {
  position: relative;
  z-index: 1;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.35;
}

.emi-seo-card .seo-intro-text {
  position: relative;
  z-index: 1;
  font-size: 15px;
  line-height: 1.68;
  color: var(--muted);
}

.emi-seo-card .seo-intro-text a {
  color: var(--brand-dark);
  font-weight: 600;
}

.emi-seo-card .seo-intro-text a:hover {
  color: var(--brand);
}

@media (max-width: 880px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .hero-art {
    order: -1;
  }

  .hero-art svg {
    max-width: 300px;
    margin: 0 auto;
  }
}

@media (max-width: 780px) {
  .topnav > .breadcrumb-sep:nth-child(2),
  .topnav > .breadcrumb-item:nth-child(3),
  .topnav > .breadcrumb-sep:nth-child(4),
  .topnav > .breadcrumb-item:nth-child(5) {
    display: none;
  }
}

@media (max-width: 480px) {
  .topnav {
    height: auto;
    min-height: 48px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .topnav .breadcrumb-sep,
  .topnav .breadcrumb-item {
    display: none;
  }

  .topnav .breadcrumb-current {
    font-size: 13px;
  }

  .cta-btn {
    width: 100%;
    justify-content: center;
  }
}

.emi-main {
  display: flex;
  flex-direction: column;
  gap: 28px;
  color: var(--emi-text);
  padding-top: 4px;
}

.emi-main > section.card,
.emi-main > div.card {
  padding: 24px;
}

.story-block {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--emi-card);
  box-shadow: var(--shadow-md);
}

.story-a {
  background: linear-gradient(165deg, var(--emi-section-a) 0%, #ffffff 42%);
  border-left: 5px solid var(--brand);
}

.story-b {
  background: linear-gradient(165deg, var(--emi-section-b) 0%, #ffffff 42%);
  border-left: 5px solid #ea580c;
}

.sticky-ribbon {
  position: sticky;
  top: 52px;
  z-index: 15;
  padding-top: 2px;
  margin-bottom: 6px;
}

.sticky-stack {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.input-ribbon {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--brand-line);
  border-radius: 16px;
  padding: 22px 22px 20px;
  padding-top: 26px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fffc 55%, #fafafa 100%);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.75) inset, var(--shadow-glow);
}

.input-ribbon::before {
  display: block;
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--brand-dark) 0%, var(--brand) 45%, var(--brand-tint-2) 100%);
  border-radius: 16px 16px 0 0;
}

/* Panel label above sliders — makes the “new shell” obvious */
.emi-tuner-head {
  position: relative;
  z-index: 1;
  margin: 0 0 4px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-soft);
}

.emi-tuner-head-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.emi-tuner-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  padding: 5px 11px;
  border-radius: 7px;
  box-shadow: 0 2px 10px rgba(29, 158, 117, 0.4);
}

.emi-tuner-step {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-light);
}

.emi-tuner-title {
  margin: 0 0 8px;
  font-size: clamp(1.15rem, 2.5vw, 1.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.2;
}

.emi-tuner-hint {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 65ch;
}

.ribbon-basic {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 14px;
  align-items: start;
  position: relative;
  z-index: 1;
}

.ribbon-basic .field {
  min-width: 0;
}

.ribbon-basic button {
  flex-shrink: 0;
  margin-top: 0;
  padding: 11px 24px;
}

.input-toggle {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: center;
  margin-top: 0;
}

.slider-inline {
  margin-top: 0;
  overflow: hidden;
  max-height: 92px;
}

.input-ribbon .field label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.input-ribbon .field input {
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input-ribbon .field input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(29, 158, 117, 0.15);
}

.slider-inline input[type="range"] {
  width: 100%;
  accent-color: #1d9e75;
  cursor: pointer;
}

.slider-annotation {
  margin-top: 2px;
  font-size: 12px;
  color: #6b7280;
  font-weight: 600;
  text-align: right;
}

.ribbon-advanced-strip {
  margin-top: 12px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  color: #111111;
  font-weight: 600;
  font-size: 13px;
  text-align: left;
}

.ribbon-advanced-strip:hover {
  background: #e1f5ee;
}

.ribbon-advanced {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
}

.ribbon-advanced:not(.is-collapsed) {
  max-height: 420px;
  opacity: 1;
}

.ribbon-slider .slider-head {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
  margin-bottom: 0;
}

.slider-pill {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 8px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  color: #111111;
  font-weight: 600;
  font-size: 12px;
}

.ribbon-advanced-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
  align-items: end;
}

.ribbon-stepup .stepup-row {
  display: grid;
  grid-template-columns: auto 90px auto;
  gap: 10px;
  align-items: center;
}

.stepup-toggle {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  user-select: none;
  font-weight: 600;
  color: #111111;
  font-size: 15px;
}

.stepup-suffix {
  color: #6b7280;
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
}

.ribbon-personal {
  margin-top: 12px;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
}

.ribbon-personal:not(.is-collapsed) {
  max-height: 260px;
  opacity: 1;
}

.ribbon-personal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
}

.results-hero .results-hero-top {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 16px;
  align-items: stretch;
}

.hero-emi {
  background: linear-gradient(165deg, #ffffff 0%, var(--brand-tint) 100%);
  border: 2px solid var(--brand-line);
  border-radius: 14px;
  padding: 22px 20px;
  box-shadow: var(--shadow-md), 0 0 32px rgba(29, 158, 117, 0.1);
}

.hero-label {
  font-size: 11px;
  color: var(--brand-dark);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
}

.hero-value,
#emi {
  margin-top: 8px;
  font-size: clamp(1.85rem, 5.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  background: linear-gradient(115deg, var(--brand-dark) 0%, var(--brand) 50%, #0a5c45 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  margin-top: 10px;
  font-size: 14px;
  color: var(--emi-muted);
  line-height: 1.55;
  padding-top: 10px;
  border-top: 1px dashed var(--brand-line);
}

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

.hero-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 14px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.hero-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-line);
  box-shadow: var(--shadow-md);
}

.hero-card .label {
  font-size: 11px;
  color: #6b7280;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

.hero-card .value {
  margin-top: 10px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.milestones-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.locked-callout {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border-radius: 8px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

.locked-title {
  font-weight: 600;
  font-size: 15px;
  color: #111111;
}

.locked-sub {
  margin-top: 8px;
  color: #6b7280;
  font-size: 15px;
  line-height: 1.6;
}

.ghost-btn {
  background: #ffffff;
  color: #1d9e75;
  border: 1px solid #1d9e75;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 13px;
}

.ghost-btn:hover {
  background: #e1f5ee;
  color: #085041;
}

.ribbon-chips {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  gap: 8px;
  align-items: baseline;
  padding: 10px 12px;
  border-radius: 8px;
  background: #e1f5ee;
  border: 1px solid #e5e7eb;
}

.chip-k {
  font-size: 11px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.chip-v {
  font-size: 15px;
  font-weight: 600;
  color: #085041;
}

.ribbon-link {
  margin-left: auto;
  font-size: 15px;
  color: #1d9e75;
  font-weight: 600;
  text-decoration: none;
}

.ribbon-link:hover {
  background-color: #e1f5ee;
  color: #085041;
}

.results-row .hero-kpi .value {
  font-size: 15px;
  letter-spacing: -0.02em;
}

.results-row .results-grid {
  align-items: stretch;
}

.hero-card .value.red {
  color: var(--danger);
  font-weight: 800;
}

.pi-bar {
  margin-top: 12px;
}

.pi-bar-track {
  height: 22px;
  border-radius: 999px;
  overflow: hidden;
  background: #e2e8f0;
  display: flex;
  border: 1px solid var(--border);
  box-shadow: inset 0 2px 4px rgba(15, 23, 42, 0.06);
}

.pi-bar-principal {
  height: 100%;
  width: 0%;
  background: var(--emi-primary);
}

.pi-bar-interest {
  height: 100%;
  width: 0%;
  background: var(--emi-interest);
}

.pi-bar-meta {
  margin-top: 8px;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.6;
}

.emi-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  align-items: start;
}

.emi-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.lhn {
  position: sticky;
  top: 100px;
  z-index: 40;
}

.lhn.is-hidden {
  opacity: 0.4;
  pointer-events: none;
}

.lhn-inner {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
}

.lhn-title {
  font-weight: 600;
  letter-spacing: -0.015em;
  font-size: 15px;
  color: #111111;
}

.lhn-subtitle {
  margin-top: 8px;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.6;
}

.lhn-group {
  margin-top: 12px;
}

.lhn-label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}

.lhn-label {
  font-size: 13px;
  color: #6b7280;
  font-weight: 600;
}

.lhn-value {
  font-size: 15px;
  font-weight: 600;
  color: #111111;
}

.lhn input[type="range"] {
  width: 100%;
  accent-color: #1d9e75;
}

.lhn-inline {
  display: grid;
  grid-template-columns: 1fr 96px;
  gap: 10px;
  align-items: center;
}

.lhn-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: #111111;
  font-size: 15px;
  user-select: none;
}

.lhn-divider {
  margin-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.lhn-cta {
  margin-top: 12px;
  width: 100%;
  padding: 12px 16px;
  border-radius: 8px;
  background: #e1f5ee;
  color: #085041;
  border: 1px solid #1d9e75;
  font-weight: 600;
}

.lhn-cta:hover {
  background: #ffffff;
  color: #1d9e75;
}

.lhn-personal {
  margin-top: 12px;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
}

.lhn-personal:not(.is-collapsed) {
  max-height: 260px;
  opacity: 1;
}

.lhn-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.journey-card .journey-head {
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e9edf1;
}

.journey-card .journey-head > * + * {
  margin-top: 10px;
}

.journey-card .section-title {
  font-size: clamp(1.2rem, 2.8vw, 1.45rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 8px;
  color: var(--text);
  padding-bottom: 12px;
  border-bottom: 3px solid var(--brand-line);
}

.section-intent {
  margin-top: 6px;
  margin-bottom: 8px;
  display: block;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--brand-line);
  border-left: 4px solid var(--brand);
  background: linear-gradient(90deg, var(--brand-tint) 0%, #f8fafc 100%);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: 0;
}

.head-row {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
}

.inline-enable {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: #111111;
  font-weight: 600;
  user-select: none;
}

.info-line {
  margin-top: 6px;
  font-size: 14px;
  color: var(--emi-muted);
  line-height: 1.5;
}

.info-good {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #085041;
  font-size: 15px;
  font-weight: 600;
}

.ok-dot {
  width: 20px;
  height: 20px;
  border-radius: 8px;
  border: 1px solid #1d9e75;
  background: #e1f5ee;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1;
  color: #085041;
  font-weight: 600;
}

.compact-controls {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--emi-border);
  border-radius: 8px;
  background: #f8fafc;
}

#personal-inputs.compact-controls {
  grid-template-columns: 1fr 1fr 1fr;
}

.kpi-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

.kpi {
  background: var(--emi-card);
  border: 1px solid var(--emi-border);
  border-radius: 8px;
  border-bottom: 1px solid var(--emi-border);
  padding: 16px;
}

.kpi-label {
  font-size: 11px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.kpi-value {
  margin-top: 6px;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--emi-text);
  line-height: 1.2;
}

.kpi-sub {
  margin-top: 6px;
  font-size: 13px;
  color: var(--emi-muted);
  line-height: 1.5;
}

.insight-box {
  margin-bottom: 24px;
}

.prepayment-box {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
}

.prepayment-box h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #111111;
}

.insight-section {
  padding-top: 18px;
  margin-top: 20px;
  border-top: 1px solid var(--emi-border);
  background: #ffffff;
  border: 1px solid #edf0f3;
  border-radius: 8px;
  padding: 18px;
}

.insight-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.insight-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--emi-text);
}

.question-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--emi-primary-soft);
  border: 1px solid #1d9e75;
  color: #085041;
  font-weight: 600;
  letter-spacing: 0;
  font-size: 15px;
}

.question-title::before {
  content: none;
}

.segmented {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
}

.seg-btn {
  border: none;
  background: transparent;
  padding: 8px 12px;
  border-radius: 8px;
  color: #6b7280;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  margin-top: 0;
}

.seg-btn:hover {
  background: #e1f5ee;
  color: #085041;
}

.seg-btn[aria-selected="true"],
.seg-btn.is-active {
  background: #1d9e75;
  color: #ffffff;
}

.mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

.mini-kpi {
  background: var(--emi-card);
  border: 1px solid var(--emi-border);
  border-radius: 8px;
  padding: 12px;
  box-shadow: inset 0 0 0 1px #f3f4f6;
}

.mini-kpi:hover {
  background: #e1f5ee;
  border-color: #1d9e75;
}

.mini-label {
  font-size: 12px;
  color: #6b7280;
  letter-spacing: 0.02em;
}

.mini-value {
  margin-top: 6px;
  font-weight: 600;
  font-size: 14px;
  color: var(--emi-text);
}

.delta-line {
  margin-top: 12px;
  font-size: 14px;
  color: var(--emi-muted);
  line-height: 1.5;
}

.supporting-copy {
  margin-top: 10px;
  font-size: 14px;
  color: var(--emi-muted);
  line-height: 1.65;
  max-width: 72ch;
}

.more-copy {
  margin-top: 10px;
  border-left: 3px solid var(--emi-primary);
  padding-left: 12px;
}

.more-copy summary {
  cursor: pointer;
  font-size: 15px;
  color: #1d9e75;
  font-weight: 600;
  margin-bottom: 8px;
  user-select: none;
}

.more-copy summary:hover {
  background-color: #e1f5ee;
}

.more-copy p {
  margin-top: 8px;
  font-size: 15px;
  color: #6b7280;
  line-height: 1.6;
}

.static-checklist {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.check-row {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  align-items: start;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
}

.check-no {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  background: #e1f5ee;
  border: 1px solid #1d9e75;
  color: #085041;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.check-row p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: #6b7280;
}

.scenario-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid #edf0f3;
  border-radius: 8px;
  background: #ffffff;
}

.scenario-apply {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  border: 1px solid #1d9e75;
}

#opt-emi10,
#opt-annual1l,
#debt-till-age,
#emi-income-now {
  color: #1d9e75;
  font-weight: 600;
}

#debt-guidance {
  color: #1d9e75;
  font-weight: 600;
}

.slider-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.slider-row input[type="range"] {
  width: 100%;
  accent-color: #1d9e75;
}

.slider-value {
  min-width: 60px;
  text-align: right;
  color: #111111;
  font-weight: 600;
  font-size: 15px;
}

.compare-pill {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 8px;
  background: #e1f5ee;
  border: 1px solid #e5e7eb;
  color: #085041;
  font-weight: 600;
  font-size: 13px;
}

.ring-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
  align-items: center;
  margin-top: 12px;
}

.progress-ring {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #e5e7eb;
  display: grid;
  place-items: center;
}

.ring-inner {
  width: 92px;
  height: 92px;
  background: #ffffff;
  border-radius: 50%;
  border: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.ring-big {
  font-weight: 600;
  font-size: 15px;
  color: #111111;
}

.ring-small {
  color: #6b7280;
  font-size: 12px;
  font-weight: 600;
}

.ring-copy {
  color: #6b7280;
  font-size: 15px;
  line-height: 1.6;
}

.bar-list {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bar-item {
  display: grid;
  grid-template-columns: 56px 1fr 52px;
  gap: 12px;
  align-items: center;
}

.bar-label {
  font-size: 13px;
  color: #6b7280;
}

.bar-track {
  height: 12px;
  border-radius: 8px;
  background: #f3f4f6;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

.bar-fill {
  height: 100%;
  border-radius: 8px;
  background: var(--emi-primary);
  width: 0%;
}

.bar-val {
  font-size: 13px;
  color: #6b7280;
  text-align: right;
}

.emi-main .chart-wrap {
  min-height: 360px;
  border: 1px solid var(--brand-line);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  padding: 18px;
  margin-top: 16px;
  box-shadow: var(--shadow-sm);
}

#amortization-card .table-wrap {
  margin-top: 14px;
}

.results-row.results-hero,
#results.results-hero {
  background: linear-gradient(145deg, #ffffff 0%, var(--brand-tint) 40%, #ffffff 100%);
  border: 1px solid var(--brand-line);
  border-radius: 18px;
  box-shadow: var(--shadow-lg), 0 0 48px rgba(29, 158, 117, 0.1);
  padding: 22px 24px 24px;
}


.content-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 8px;
}

.content-grid .info-section {
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--brand);
  background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.content-grid .info-section:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--brand-line);
}

.info-section h2 {
  font-size: 1.05rem;
  margin-bottom: 10px;
  color: var(--text);
  font-weight: 700;
}

.info-section h3 {
  font-size: 0.9rem;
  margin: 12px 0 6px;
  color: var(--text);
  font-weight: 600;
}

.info-section p,
.info-section li {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
}

.info-section ul,
.info-section ol {
  padding-left: 16px;
  display: grid;
  gap: 4px;
}

@media (max-width: 780px) {
  .layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 992px) {
  .ribbon-basic {
    grid-template-columns: 1fr;
  }

  .ribbon-advanced-row {
    grid-template-columns: 1fr;
  }

  .results-hero .results-hero-top {
    grid-template-columns: 1fr;
  }

  .hero-cards {
    grid-template-columns: 1fr;
  }

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

  .emi-layout {
    grid-template-columns: 1fr;
  }

  .lhn {
    position: static;
  }

  .lhn.is-hidden {
    opacity: 1;
    pointer-events: auto;
  }

  .kpi-strip {
    grid-template-columns: 1fr;
  }

  .compact-controls,
  #personal-inputs.compact-controls {
    grid-template-columns: 1fr;
  }

  .ribbon-personal-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .emi-main > section.card,
  .emi-main > div.card {
    padding: 14px;
  }

  .page {
    padding: 14px 14px 32px;
    padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
  }

  .sticky-ribbon {
    position: static;
  }

  .ribbon-basic {
    grid-template-columns: 1fr;
  }

  .ribbon-advanced-row {
    grid-template-columns: 1fr;
  }

  .compact-controls,
  #personal-inputs.compact-controls {
    grid-template-columns: 1fr;
  }

  .section-intent {
    display: block;
    border-radius: 8px;
    line-height: 1.45;
    font-size: 13px;
    padding: 8px;
  }

  .ribbon-personal-grid {
    grid-template-columns: 1fr;
  }

  .results-hero .results-hero-top {
    grid-template-columns: 1fr;
  }

  .hero-cards {
    grid-template-columns: 1fr;
  }

  .milestones-grid {
    grid-template-columns: 1fr;
  }

  .sticky-stack {
    position: static;
  }

  .input-ribbon {
    flex-direction: column;
    align-items: stretch;
  }

  .ribbon-basic button {
    width: 100%;
    text-align: center;
  }

  .ribbon-basic .field {
    min-width: 100%;
  }

  .emi-layout {
    grid-template-columns: 1fr;
  }

  .lhn {
    position: static;
  }

  .lhn.is-hidden {
    opacity: 1;
    pointer-events: auto;
  }

  .kpi-strip {
    grid-template-columns: 1fr;
  }

  .ribbon-stepup .stepup-row {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .head-row {
    flex-wrap: wrap;
  }

  .insight-row {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
  }

  .segmented {
    flex-wrap: wrap;
    width: 100%;
    justify-content: flex-start;
  }

  .mini-grid {
    grid-template-columns: 1fr;
  }

  .locked-callout {
    flex-direction: column;
    align-items: stretch;
  }

  .ghost-btn {
    width: 100%;
    text-align: center;
    min-height: 44px;
  }

  .lhn-2col {
    grid-template-columns: 1fr;
  }

  .scenario-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
  }

  .scenario-apply {
    width: 100%;
    min-height: 44px;
  }

  .ring-row {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .ring-copy {
    max-width: 100%;
  }

  .bar-item {
    grid-template-columns: 48px 1fr 48px;
    gap: 8px;
  }

  .bar-label,
  .bar-val {
    font-size: 12px;
  }

  .journey-card .section-title {
    font-size: clamp(1.25rem, 5vw, 1.65rem);
  }

  .journey-card .journey-head {
    margin-bottom: 12px;
  }

  .hero-value,
  #emi {
    font-size: clamp(1.5rem, 7vw, 2rem);
    overflow-wrap: anywhere;
  }

  .hero-sub,
  .supporting-copy,
  .delta-line {
    font-size: 13px;
    line-height: 1.45;
  }

  .insight-section {
    margin-top: 12px;
    padding: 10px;
  }

  .kpi-value {
    font-size: clamp(1.25rem, 6vw, 1.65rem);
    overflow-wrap: anywhere;
  }

  .slider-row {
    flex-wrap: wrap;
  }

  .slider-value {
    min-width: 0;
    flex: 1 1 100%;
    text-align: left;
  }

  .emi-main .chart-wrap {
    min-height: 240px;
    padding: 8px;
  }

  .question-title {
    flex-wrap: wrap;
    max-width: 100%;
  }

  .ribbon-chips {
    max-width: 100%;
  }

  .chip {
    max-width: 100%;
    flex-wrap: wrap;
  }

  .ribbon-link {
    margin-left: 0;
    margin-top: 8px;
    display: inline-block;
  }

  .check-row {
    grid-template-columns: 24px 1fr;
    gap: 10px;
    padding: 12px;
  }

  .check-row p {
    font-size: 13px;
    line-height: 1.45;
  }

  .pi-bar-meta {
    font-size: 12px;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 480px) {
  .input-ribbon {
    padding: 12px;
  }

  .emi-main {
    gap: 14px;
  }

  .story-a,
  .story-b {
    border-left-width: 3px;
  }

  .hero-card,
  .kpi,
  .mini-kpi {
    padding: 10px;
  }

  .section-intent,
  .info-line,
  .supporting-copy,
  .delta-line {
    font-size: 12px;
  }

  .input-ribbon .field input,
  .compact-controls .field input,
  .lhn-inline input[type="number"] {
    font-size: 16px;
  }

  .hero-card .value {
    font-size: 14px;
  }

  .seg-btn {
    flex: 1 1 auto;
    min-width: 0;
    text-align: center;
  }
}

/* ── Crawlable SEO intro (above sticky ribbon) ───────────── */
.seo-intro {
  margin-bottom: 20px;
  padding: 18px 20px;
}

.seo-intro-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 12px;
  color: #0f172a;
}

.seo-intro-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: #475569;
}

.seo-intro-text + .seo-intro-text {
  margin-top: 12px;
}

.seo-intro-text strong {
  color: #0f172a;
  font-weight: 600;
}

.seo-intro-text a {
  color: #1d9e75;
  font-weight: 600;
  text-decoration: none;
}

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