/* ============================================================
   FINANCIAL LITERACY — Design System
   Aesthetic: Premium fintech · Dark-anchored · Editorial
   ============================================================ */

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  /* Core palette */
  --ink:         #0a0e14;
  --surface:     #111620;
  --surface-2:   #171d28;
  --surface-3:   #1e2635;
  --border:      rgba(255,255,255,0.07);
  --border-md:   rgba(255,255,255,0.12);

  /* Brand accents */
  --teal:        #00d4aa;
  --teal-dim:    rgba(0,212,170,0.12);
  --teal-glow:   rgba(0,212,170,0.22);
  --gold:        #f5c842;
  --gold-dim:    rgba(245,200,66,0.12);

  /* Semantic */
  --success:     #22c55e;
  --danger:      #ef4444;
  --warning:     #f59e0b;

  /* Text */
  --text-primary:  #eef0f4;
  --text-secondary:#8b95a8;
  --text-muted:    #566070;

  /* Form */
  --input-bg:    #0e1520;
  --input-border:#2a3347;
  --input-focus: #00d4aa;

  /* Radius */
  --r-sm:   8px;
  --r-md:   12px;
  --r-lg:   18px;
  --r-xl:   24px;
  --r-full: 999px;

  /* Shadow */
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.3);
  --shadow-md:  0 8px 24px rgba(0,0,0,0.4);
  --shadow-lg:  0 20px 48px rgba(0,0,0,0.5);
  --shadow-teal:0 0 32px rgba(0,212,170,0.15);

  /* Motion */
  --ease:   all 0.22s cubic-bezier(0.4,0,0.2,1);

  /* Grid */
  --gap: 24px;

  /* Theme-aware UI */
  --header-bg: rgba(10,14,20,0.85);
  --nav-hover-bg: rgba(255,255,255,0.06);
  --mobile-btn-bg: rgba(255,255,255,0.04);
  --mobile-btn-hover-bg: rgba(255,255,255,0.08);
  --hero-stats-shell: var(--border);
  --hero-stat-bg: rgba(255,255,255,0.03);
  --hero-stat-hover-bg: rgba(255,255,255,0.05);
  --footer-btn-color: rgba(255,255,255,0.7);
  --footer-btn-border: rgba(255,255,255,0.2);
  --footer-btn-hover-bg: rgba(255,255,255,0.07);
  --table-head-bg: rgba(255,255,255,0.02);
  --tooltip-bg: rgba(17,22,32,0.97);
  --chart-grid: rgba(255,255,255,0.06);
  --chart-axis: rgba(255,255,255,0.15);
  --chart-guide: rgba(255,255,255,0.2);
  --chart-goal-guide: rgba(255,255,255,0.07);
  --point-stroke: var(--ink);
  --modal-overlay: rgba(0,0,0,0.75);
  --modal-close-bg: rgba(255,255,255,0.05);
  --modal-close-hover-bg: rgba(255,255,255,0.1);
  --theme-toggle-bg: rgba(255,255,255,0.04);
  --theme-toggle-hover-bg: rgba(255,255,255,0.08);
  --theme-toggle-border: var(--border-md);
  --theme-toggle-text: var(--text-secondary);
  --theme-toggle-active: var(--teal-dim);
  --theme-toggle-thumb: #f5f7fb;
  --theme-toggle-track-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
  --theme-toggle-icon-sun: #f5c842;
  --theme-toggle-icon-moon: rgba(255,255,255,0.96);
}

[data-theme="light"] {
  --ink:         #dbe3e8;
  --surface:     #e5ebf0;
  --surface-2:   #d8e0e7;
  --surface-3:   #ccd7e0;
  --border:      rgba(15,23,42,0.10);
  --border-md:   rgba(15,23,42,0.18);

  --text-primary:  #020617;
  --text-secondary:#334155;
  --text-muted:    #475569;

  --input-bg:    #edf2f6;
  --input-border:#b8c5d1;

  --shadow-sm:   0 2px 8px rgba(15,23,42,0.08);
  --shadow-md:   0 12px 30px rgba(15,23,42,0.12);
  --shadow-lg:   0 24px 52px rgba(15,23,42,0.16);
  --shadow-teal: 0 0 32px rgba(0,212,170,0.12);

  --header-bg: rgba(219,227,232,0.84);
  --nav-hover-bg: rgba(15,23,42,0.05);
  --mobile-btn-bg: rgba(233,239,244,0.92);
  --mobile-btn-hover-bg: rgba(15,23,42,0.08);
  --hero-stats-shell: rgba(15,23,42,0.05);
  --hero-stat-bg: rgba(236,242,246,0.86);
  --hero-stat-hover-bg: rgba(245,248,250,0.96);
  --footer-btn-color: var(--text-secondary);
  --footer-btn-border: rgba(15,23,42,0.14);
  --footer-btn-hover-bg: rgba(15,23,42,0.05);
  --table-head-bg: rgba(15,23,42,0.045);
  --tooltip-bg: rgba(229,235,240,0.98);
  --chart-grid: rgba(100,116,139,0.22);
  --chart-axis: rgba(100,116,139,0.35);
  --chart-guide: rgba(100,116,139,0.28);
  --chart-goal-guide: rgba(100,116,139,0.2);
  --point-stroke: var(--surface);
  --modal-overlay: rgba(15,23,42,0.42);
  --modal-close-bg: rgba(15,23,42,0.05);
  --modal-close-hover-bg: rgba(15,23,42,0.1);
  --theme-toggle-bg: rgba(236,242,246,0.95);
  --theme-toggle-hover-bg: rgba(15,23,42,0.08);
  --theme-toggle-border: rgba(15,23,42,0.12);
  --theme-toggle-text: #0f172a;
  --theme-toggle-active: rgba(0,212,170,0.12);
  --theme-toggle-thumb: #ffffff;
  --theme-toggle-track-shadow: inset 0 1px 0 rgba(255,255,255,0.42);
  --theme-toggle-icon-sun: #d89b11;
  --theme-toggle-icon-moon: rgba(255,255,255,0.96);
}

/* ── Reset & Base ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; scroll-padding-top: 96px; }
html[data-theme="dark"] { color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; }

body {
  font-family: 'Manrope', 'Segoe UI', system-ui, sans-serif;
  background: var(--ink);
  color: var(--text-primary);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(circle at 18% 24%, rgba(0,212,170,0.08), transparent 24%),
    radial-gradient(circle at 80% 16%, rgba(53,196,255,0.08), transparent 28%),
    radial-gradient(circle at 28% 88%, rgba(245,200,66,0.08), transparent 22%);
}

[data-theme="light"] body::before {
  background:
    radial-gradient(circle at 18% 24%, rgba(0,212,170,0.05), transparent 20%),
    radial-gradient(circle at 80% 16%, rgba(53,196,255,0.045), transparent 24%),
    radial-gradient(circle at 28% 88%, rgba(245,200,66,0.05), transparent 18%),
    linear-gradient(180deg, rgba(255,255,255,0.18), transparent 24%);
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: var(--teal); }
ul { list-style: none; }

.container {
  width: 92%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 12px;
}

main { margin-top: 72px; }

section { padding: 80px 0; }

.big-screen-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin: 18px 0 0;
  padding: 11px 16px;
  border: 1px dashed rgba(0,212,170,0.32);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  animation: dashPulse 1.5s infinite;
}

.big-screen-notice i {
  color: var(--teal);
  font-size: 15px;
  flex-shrink: 0;
}

h1, h2, h3, h4 {
  line-height: 1.2;
  color: var(--text-primary);
  font-weight: 700;
  margin-bottom: 12px;
}

p {
  color: var(--text-secondary);
  margin-bottom: 14px;
}

p:last-child { margin-bottom: 0; }

/* ── Utility ─────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--r-full);
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.2px;
  transition: var(--ease);
  background: var(--teal);
  color: #041a14;
  text-align: center;
  white-space: nowrap;
}

.btn:hover {
  background: #00f0c2;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,212,170,0.35);
}

.btn-outline {
  background: transparent;
  color: var(--teal);
  border: 1px solid rgba(0,212,170,0.35);
}

.btn-outline:hover {
  background: var(--teal-dim);
  border-color: var(--teal);
  box-shadow: none;
  transform: translateY(-1px);
}

.btn-footer {
  padding: 9px 18px;
  font-size: 13px;
  color: var(--footer-btn-color);
  border-color: var(--footer-btn-border);
}

.btn-footer:hover {
  color: var(--text-primary);
  background: var(--footer-btn-hover-bg);
  box-shadow: none;
}

/* ── Header ──────────────────────────────────────────────── */
header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: var(--header-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  padding: 0;
  height: 72px;
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 24px;
  position: relative;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo i {
  font-size: 20px;
  color: var(--teal);
  filter: drop-shadow(0 0 8px rgba(0,212,170,0.5));
}

.logo h1 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0;
  letter-spacing: -0.3px;
}

nav ul {
  display: flex;
  gap: 2px;
}

nav ul li a {
  display: block;
  padding: 7px 14px;
  border-radius: var(--r-full);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: var(--ease);
  cursor: pointer;
}

nav ul li a:hover {
  color: var(--text-primary);
  background: var(--nav-hover-bg);
}

nav ul li a.active {
  color: var(--teal);
  background: var(--teal-dim);
}

nav ul li a.docs-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

nav ul li a.docs-link i {
  align-self: flex-start;
  font-size: 10px;
  line-height: 1;
  transform: translateY(-2px);
}

.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--r-md);
  border: 1px solid var(--border-md);
  background: var(--mobile-btn-bg);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--ease);
  flex-shrink: 0;
}

.mobile-menu-btn:hover {
  background: var(--mobile-btn-hover-bg);
  color: var(--text-primary);
}

.mobile-menu-btn i { font-size: 17px; }

.theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 64px;
  height: 36px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
}

.theme-toggle-track {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  border: 1px solid var(--theme-toggle-border);
  background: linear-gradient(180deg, var(--theme-toggle-bg), var(--theme-toggle-hover-bg));
  box-shadow: var(--theme-toggle-track-shadow), 0 12px 24px rgba(0,0,0,0.12);
  transition: background 680ms cubic-bezier(0.22, 1, 0.36, 1), border-color 680ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 680ms cubic-bezier(0.22, 1, 0.36, 1);
}

.theme-toggle:hover .theme-toggle-track {
  box-shadow: var(--theme-toggle-track-shadow), 0 0 0 5px rgba(0,212,170,0.08), 0 14px 26px rgba(0,0,0,0.16);
}

.theme-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--theme-toggle-thumb);
  box-shadow: 0 8px 18px rgba(0,0,0,0.18);
  transform: translateX(0);
  transition: transform 760ms cubic-bezier(0.22, 1, 0.36, 1), background 680ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 680ms cubic-bezier(0.22, 1, 0.36, 1);
}

.theme-toggle-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: opacity 540ms ease, stroke 540ms ease, transform 760ms cubic-bezier(0.22, 1, 0.36, 1);
}

.theme-toggle-icon-moon {
  left: 10px;
  stroke: var(--theme-toggle-icon-moon);
  opacity: 0;
  transform: translateY(-50%) scale(0.82);
}

.theme-toggle-icon-sun {
  right: 10px;
  stroke: var(--theme-toggle-icon-sun);
  opacity: 1;
  filter: drop-shadow(0 0 6px rgba(216,155,17,0.22));
}

[data-theme="dark"] .theme-toggle-thumb {
  transform: translateX(28px);
}

[data-theme="dark"] .theme-toggle-icon-moon {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

[data-theme="dark"] .theme-toggle-icon-sun {
  opacity: 0;
  transform: translateY(-50%) scale(0.82);
}

.theme-fade {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 3000;
  opacity: 0;
  background:
    radial-gradient(circle at var(--theme-fade-x, 50%) var(--theme-fade-y, 50%), rgba(0,212,170,0.16), transparent 12%),
    radial-gradient(circle at var(--theme-fade-x, 50%) var(--theme-fade-y, 50%), rgba(255,255,255,0.12), transparent 26%),
    linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0));
}

.theme-fade.is-animating {
  animation: theme-fade-away 1120ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.mobile-desktop-prompt {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.mobile-desktop-prompt.is-visible {
  display: flex;
}

.mobile-desktop-prompt__box {
  width: min(100%, 430px);
  padding: 24px;
  border: 1px solid rgba(0,212,170,0.28);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.mobile-desktop-prompt__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--teal-dim);
  color: var(--teal);
  font-size: 18px;
}

.mobile-desktop-prompt__box h2 {
  margin-bottom: 10px;
  font-size: 22px;
}

.mobile-desktop-prompt__box p {
  font-size: 14px;
  line-height: 1.65;
}

.mobile-desktop-prompt__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.mobile-desktop-prompt__actions .btn {
  min-height: 42px;
  border-radius: 8px;
  white-space: normal;
}

@keyframes theme-fade-away {
  0% {
    opacity: 0;
  }
  24% {
    opacity: 0.42;
  }
  58% {
    opacity: 0.72;
  }
  100% {
    opacity: 0;
  }
}

/* ── Section Heading ─────────────────────────────────────── */
.section-heading {
  text-align: center;
  margin-bottom: 48px;
}

.section-heading .eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--teal);
  background: var(--teal-dim);
  border: 1px solid rgba(0,212,170,0.2);
  border-radius: var(--r-full);
  padding: 4px 14px;
  margin-bottom: 16px;
}

.section-heading h2 {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.18;
  margin-bottom: 14px;
  background: linear-gradient(135deg, #eef0f4 30%, #8b95a8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding-bottom: 0.08em;
}

[data-theme="light"] .section-heading h2 {
  background: none;
  color: var(--text-primary);
  -webkit-text-fill-color: currentColor;
}

.section-heading p {
  max-width: 600px;
  margin: 0 auto;
  font-size: 16px;
  line-height: 1.75;
}

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  position: relative;
  background: var(--surface);
  padding: 120px 0 100px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 80% -10%, rgba(0,212,170,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 10% 100%, rgba(245,200,66,0.08) 0%, transparent 50%);
  pointer-events: none;
}

/* Grid lines decoration */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 0%, transparent 70%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 20px;
}

.hero-eyebrow::before {
  content: '';
  width: 28px;
  height: 2px;
  background: var(--teal);
  border-radius: 2px;
}

.hero-content h1 {
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.14;
  margin-bottom: 20px;
  color: var(--text-primary);
  padding-bottom: 0.08em;
}

.hero-content h1 span {
  display: inline-block;
  background: linear-gradient(90deg, var(--teal), #00f0c2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding-bottom: 0.03em;
}

.hero-content > p {
  font-size: 18px;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 580px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 56px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--hero-stats-shell);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.hero-stat {
  background: var(--hero-stat-bg);
  padding: 20px 22px;
  transition: var(--ease);
}

.hero-stat:hover {
  background: var(--hero-stat-hover-bg);
}

.hero-stat h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 4px;
}

.hero-stat p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* ── Tools Section ───────────────────────────────────────── */
.tools {
  background: var(--ink);
  padding: 80px 0;
}

.tool-filter-bar {
  display: flex;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 32px;
  padding: 5px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
}

.tool-filter {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2px;
  padding: 9px 20px;
  border-radius: var(--r-full);
  cursor: pointer;
  transition: var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 120px;
  justify-content: center;
}

.tool-filter-count {
  font-size: 10px;
  font-weight: 800;
  transform: translateY(-6px);
  opacity: 0.6;
}

.tool-filter:hover { color: var(--text-primary); }

.tool-filter.active {
  background: var(--teal);
  color: #041a14;
  box-shadow: 0 4px 16px rgba(0,212,170,0.3);
}

.tool-filter.active .tool-filter-count { color: #041a14; }

.tools-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.tool-card.hidden-tool-card { display: none !important; }

.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 22px;
  cursor: pointer;
  transition: var(--ease);
  display: grid;
  grid-template-columns: 52px minmax(0,1fr);
  gap: 16px;
  align-items: start;
  width: min(500px, 100%);
  flex: 0 1 500px;
  position: relative;
  overflow: hidden;
}

.tool-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,212,170,0.3), transparent);
  opacity: 0;
  transition: var(--ease);
}

.tool-card:hover {
  background: var(--surface-2);
  border-color: rgba(0,212,170,0.25);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md), var(--shadow-teal);
}

.tool-card:hover::after { opacity: 1; }

.tool-icon {
  width: 52px;
  height: 52px;
  background: var(--teal-dim);
  border: 1px solid rgba(0,212,170,0.2);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--ease);
}

.tool-card:hover .tool-icon {
  background: rgba(0,212,170,0.2);
  border-color: rgba(0,212,170,0.4);
  box-shadow: 0 0 20px rgba(0,212,170,0.2);
}

.tool-icon i {
  font-size: 22px;
  color: var(--teal);
}

.tool-card-content { display: grid; gap: 5px; }

.tool-meta {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--teal);
}

.tool-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0;
  line-height: 1.3;
}

.tool-card p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 0;
  line-height: 1.5;
}

.tool-footer {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── FAQ ─────────────────────────────────────────────────── */
.faq { background: var(--surface); }

.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px,1fr));
  gap: 12px;
}

details {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  transition: var(--ease);
}

details[open] {
  border-color: rgba(0,212,170,0.2);
  background: var(--surface-3);
}

details summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  list-style: none;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

details summary::-webkit-details-marker { display: none; }

details summary::after {
  content: '+';
  font-size: 20px;
  color: var(--teal);
  font-weight: 300;
  line-height: 1;
  flex-shrink: 0;
  transition: var(--ease);
}

details[open] summary::after {
  content: '−';
}

details p {
  margin-top: 12px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ── About ───────────────────────────────────────────────── */
.about { background: var(--ink); }

.policy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px,1fr));
  gap: var(--gap);
  margin-top: 32px;
}

.policy-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  transition: var(--ease);
}

.policy-card:hover {
  border-color: var(--border-md);
  background: var(--surface-2);
}

.policy-card h3 {
  font-size: 15px;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.policy-card p {
  font-size: 14px;
  line-height: 1.7;
}

/* ── Footer ──────────────────────────────────────────────── */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-text p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

/* ── Content Section (tool overview pages) ───────────────── */
.content-section { background: var(--surface); }

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px,1fr));
  gap: var(--gap);
}

.content-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px 24px;
  transition: var(--ease);
}

.content-card:hover {
  border-color: rgba(0,212,170,0.18);
  background: var(--surface-3);
}

.content-card h3 {
  font-size: 15px;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.content-card ul {
  display: grid;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
}

.content-card li {
  padding-left: 14px;
  position: relative;
  line-height: 1.55;
}

.content-card li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--teal);
  font-weight: 700;
}

/* ── Calculator Section ──────────────────────────────────── */
.calculator { background: var(--ink); }

.calculator-grid {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

/* ── Input Section ───────────────────────────────────────── */
.input-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 28px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.section-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0;
}

/* ── Form Groups ─────────────────────────────────────────── */
.form-group {
  margin-bottom: 18px;
  text-align: left;
  position: relative;
}

.form-group label {
  display: block;
  margin-bottom: 7px;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-secondary);
  letter-spacing: 0.1px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 11px 14px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--r-md);
  font-size: 14px;
  font-family: inherit;
  font-weight: 500;
  color: var(--text-primary);
  transition: var(--ease);
  -webkit-appearance: none;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0,212,170,0.12);
  outline: none;
  background: #0b1219;
}

.form-group input::placeholder { color: var(--text-muted); }

/* Custom select arrow */
.form-group select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238b95a8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

.tip-text {
  margin-top: 7px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.55;
}

.tip-text p { margin-bottom: 0; }

.inflation-warning,
.stepup-suggestion {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  background: rgba(245,200,66,0.08);
  border: 1px solid rgba(245,200,66,0.2);
  color: #c49a12;
  padding: 10px 12px;
  border-radius: var(--r-md);
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.5;
  animation: fadeIn 0.4s ease;
}

.inflation-warning::before,
.stepup-suggestion::before {
  content: '⚠';
  font-size: 13px;
  flex-shrink: 0;
  margin-top: 1px;
}

.inflation-warning p,
.stepup-suggestion p { margin-bottom: 0; color: inherit; }

/* ── Form grid layouts ───────────────────────────────────── */
.sip-basics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(200px,1fr));
  gap: 16px 20px;
  margin-bottom: 6px;
}

.sip-form-container {
  display: grid;
  grid-template-columns: repeat(3, minmax(200px,1fr));
  gap: 20px;
  margin-bottom: 6px;
}

.sip-category-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.category-primary-field { grid-column: 1 / -1; }
.sip-category-fields .form-group { margin-bottom: 0; }
.sip-basics-grid .form-group { margin-bottom: 0; }

.term-personal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px,1fr));
  gap: 16px 20px;
  margin-bottom: 6px;
}

.term-insurance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(200px,1fr));
  gap: 16px 20px;
  margin-bottom: 6px;
}

.term-personal-grid .form-group,
.term-insurance-grid .form-group { margin-bottom: 0; }

.term-investment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px,1fr));
  gap: 16px 20px;
  margin-bottom: 6px;
}

.term-investment-grid .form-group { margin-bottom: 0; }

.goal-planner-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(200px,1fr));
  gap: 16px 20px;
  margin-bottom: 6px;
}

.goal-planner-grid-3 { grid-template-columns: repeat(3, minmax(200px,1fr)); }
.goal-planner-grid .form-group { margin-bottom: 0; }

.span-2 { grid-column: 1 / -1; }

/* ── Investment Category ─────────────────────────────────── */
.investment-category {
  flex: 1;
  min-width: 220px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 20px;
}

.investment-category h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

/* ── Calculate Button ────────────────────────────────────── */
.btn-calculate {
  width: 100%;
  padding: 14px;
  font-size: 15px;
  font-weight: 700;
  margin-top: 6px;
  background: var(--teal);
  color: #041a14;
  border-radius: var(--r-md);
  letter-spacing: 0.3px;
}

.btn-calculate:hover {
  background: #00f0c2;
  box-shadow: 0 8px 28px rgba(0,212,170,0.4);
  transform: translateY(-1px);
}

/* ── Results Section ─────────────────────────────────────── */
.results-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 28px;
  animation: fadeIn 0.5s ease;
}

.results-header {
  text-align: center;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.results-header h2,
.results-header h3 {
  font-size: 20px;
  color: var(--text-primary);
}

.results-header p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ── Result Cards ────────────────────────────────────────── */
.result-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px,1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.result-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  text-align: center;
  transition: var(--ease);
  position: relative;
  overflow: hidden;
}

.result-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  transition: var(--ease);
}

.result-card.nominal::before { background: var(--teal); }
.result-card.real::before { background: var(--gold); }

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

.result-card h4 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 0;
}

.result-value {
  font-size: 24px;
  font-weight: 800;
  margin: 10px 0;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.result-card.nominal .result-value { color: var(--teal); }
.result-card.real .result-value { color: var(--gold); }

.result-caption {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

/* ── Charts ──────────────────────────────────────────────── */
.charts-container { margin-top: 24px; }

.chart {
  margin-bottom: 28px;
  animation: fadeIn 0.7s ease;
}

.chart h4 {
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 14px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.chart-container {
  height: 480px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  margin-bottom: 20px;
}

/* ── Line chart ──────────────────────────────────────────── */
.line-chart { display: grid; gap: 16px; }

.line-chart-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.line-chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 7px 12px;
  border-radius: var(--r-full);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
}

.line-chart-legend-item span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.line-toggle {
  cursor: pointer;
  transition: var(--ease);
  user-select: none;
}

.line-toggle.inactive { opacity: 0.35; }

.line-toggle.active {
  border-color: var(--border-md);
  color: var(--text-primary);
}

.line-chart-legend-swatch {
  width: 24px;
  height: 0;
  border-top-width: 2.5px;
  border-top-style: solid;
  border-top-color: currentColor;
}

.line-chart-legend-swatch.dashed { border-top-style: dashed; }

.line-chart-canvas {
  position: relative;
  width: 100%;
  max-width: 1040px;
  aspect-ratio: 960 / 420;
  min-height: 320px;
  height: auto;
  margin: 0 auto;
  padding: 16px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.line-chart-canvas svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  text-rendering: geometricPrecision;
}

.line-chart-tooltip {
  position: absolute;
  top: 14px;
  left: 14px;
  width: min(220px, calc(100% - 16px));
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--tooltip-bg);
  border: 1px solid var(--border-md);
  box-shadow: var(--shadow-md);
  color: var(--text-primary);
  pointer-events: none;
  z-index: 2;
}

.line-chart-tooltip.hidden { display: none; }

.line-chart-tooltip-year {
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.line-chart-tooltip-list { display: grid; gap: 7px; }

.line-chart-tooltip-row {
  display: grid;
  grid-template-columns: 22px minmax(0,1fr);
  gap: 8px;
  align-items: start;
}

.line-chart-tooltip-swatch {
  width: 20px;
  height: 0;
  margin-top: 8px;
  border-top: 2.5px solid currentColor;
}

.line-chart-tooltip-swatch.dashed { border-top-style: dashed; }

.line-chart-tooltip-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.4;
}

.line-chart-tooltip-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 2px;
}

.line-chart-note, .line-chart-hint {
  margin: 0;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

/* SVG chart styles */
.line-grid-line {
  stroke: var(--chart-grid);
  stroke-width: 1;
  shape-rendering: crispEdges;
  vector-effect: non-scaling-stroke;
}
.line-axis {
  stroke: var(--chart-axis);
  stroke-width: 1;
  shape-rendering: crispEdges;
  vector-effect: non-scaling-stroke;
}
.line-axis-label, .line-tick-label {
  fill: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
}

.line-series-path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.35;
  vector-effect: non-scaling-stroke;
}

.line-series-path.dashed { stroke-dasharray: 7 6; }
.goal-series-path { stroke: var(--teal); }
.line-series-point {
  stroke: var(--point-stroke);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}
.line-series-end-label { font-size: 10.5px; font-weight: 800; dominant-baseline: middle; fill: var(--text-secondary); }
.line-inspection-guide {
  stroke: var(--chart-guide);
  stroke-width: 1;
  stroke-dasharray: 4 4;
  vector-effect: non-scaling-stroke;
}
.line-inspection-point {
  stroke: var(--point-stroke);
  stroke-width: 2.25;
  vector-effect: non-scaling-stroke;
}
.line-chart-hitbox { fill: transparent; cursor: crosshair; }
.goal-marker-guide {
  stroke: var(--chart-goal-guide);
  stroke-width: 1;
  stroke-dasharray: 3 7;
  vector-effect: non-scaling-stroke;
}
.goal-marker-hit-area, .goal-top-hit-area { fill: transparent; }
.goal-top-icon { opacity: 0.85; transition: opacity 150ms ease, transform 150ms ease; pointer-events: none; }
.goal-marker-ring { fill: var(--surface-2); stroke-width: 1.5; transition: var(--ease); }
.goal-marker-center-dot { pointer-events: none; transition: var(--ease); }
.goal-marker-group { cursor: pointer; }
.goal-marker-group:hover .goal-top-icon { opacity: 1; }
.goal-marker-group:hover .goal-marker-ring { stroke-width: 2; fill: var(--surface-3); }

/* ── Goal Builder ────────────────────────────────────────── */
.goal-builder { display: grid; gap: 16px; margin-bottom: 18px; }
.goal-list { display: grid; gap: 16px; }

.goal-item-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.goal-item-header h3 { margin-bottom: 0; font-size: 14px; color: var(--text-secondary); }

.goal-remove-btn {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: var(--r-sm);
  background: rgba(239,68,68,0.08);
  color: var(--danger);
  cursor: pointer;
  transition: var(--ease);
  font-size: 14px;
}

.goal-remove-btn:hover { background: rgba(239,68,68,0.15); border-color: rgba(239,68,68,0.35); }

.goal-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px,1fr));
  gap: 14px;
}

.goal-add-btn { justify-self: flex-start; }

.goal-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-2);
  margin-bottom: 14px;
}

.goal-input-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.goal-input-table th, .goal-input-table td {
  padding: 12px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.goal-input-table th {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  background: var(--table-head-bg);
}

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

.goal-input-table input, .goal-input-table select {
  width: 100%;
  min-width: 110px;
  padding: 9px 12px;
  border: 1px solid var(--input-border);
  border-radius: var(--r-sm);
  font-size: 13px;
  background: var(--input-bg);
  color: var(--text-primary);
  font-family: inherit;
}

.goal-input-table input:focus, .goal-input-table select:focus {
  border-color: var(--teal);
  outline: none;
}

.goal-action-cell { width: 52px; }

/* ── Goal Summary ────────────────────────────────────────── */
.goal-summary { margin-top: 10px; }

.goal-summary-table-wrap {
  margin-top: 12px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-2);
}

.goal-summary-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 13px;
}

.goal-summary-table th, .goal-summary-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.goal-summary-table th {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  background: var(--table-head-bg);
}

.goal-summary-table tr:last-child td { border-bottom: none; }
.goal-summary-table td { color: var(--text-secondary); }
.goal-negative { color: var(--danger) !important; font-weight: 700; }

/* ── Planner Alerts ──────────────────────────────────────── */
.planner-alert {
  padding: 12px 16px;
  border-radius: var(--r-md);
  margin: 14px 0 6px;
  font-size: 13px;
  border: 1px solid transparent;
  white-space: pre-line;
  line-height: 1.6;
}

.planner-alert-success {
  background: rgba(34,197,94,0.08);
  border-color: rgba(34,197,94,0.2);
  color: #4ade80;
}

.planner-alert-error {
  background: rgba(239,68,68,0.08);
  border-color: rgba(239,68,68,0.18);
  color: #f87171;
}

.planner-alert-warning {
  background: rgba(245,200,66,0.08);
  border-color: rgba(245,200,66,0.2);
  color: var(--gold);
}

/* ── Loan Simulator ──────────────────────────────────────── */
.loan-input-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px,1fr));
  gap: 16px 20px;
  margin-bottom: 6px;
}

.loan-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.loan-metric-table-wrap, .loan-prepayment-panel {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-2);
  padding: 12px;
  overflow-x: auto;
}

.loan-prepayment-panel { margin-top: 20px; }

.loan-metric-table, .loan-prepayment-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 580px;
}

.loan-metric-table th, .loan-metric-table td,
.loan-prepayment-table th, .loan-prepayment-table td {
  border-bottom: 1px solid var(--border);
  padding: 10px 10px;
  text-align: left;
}

.loan-metric-table th, .loan-prepayment-table th {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  background: var(--table-head-bg);
}

.loan-metric-table tr:last-child td,
.loan-prepayment-table tr:last-child td { border-bottom: none; }

.loan-metric-table td, .loan-prepayment-table td { color: var(--text-secondary); }

.loan-chart-canvas-wrap {
  height: 360px;
  position: relative;
}

.loan-chart-hint {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

.x-axis-action {
  position: absolute;
  transform: translate(-50%, -100%);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--tooltip-bg);
  border: 1px solid var(--border-md);
  color: var(--text-primary);
  border-radius: var(--r-full);
  padding: 5px 10px 5px 5px;
  font-size: 12px;
  white-space: nowrap;
  pointer-events: auto;
  z-index: 5;
  box-shadow: var(--shadow-md);
  user-select: none;
}

.x-axis-action.hidden { display: none; }

#xAxisInfo { display: block; line-height: 1.3; }

.x-axis-add-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: var(--teal);
  color: #041a14;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
  transition: var(--ease);
}

.x-axis-add-btn:hover { background: #00f0c2; }

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

.loan-prepayment-header h4 {
  margin-bottom: 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.prepayment-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.prepayment-action-btn { padding: 7px 12px; font-size: 12px; }

.auto-event-badge {
  display: inline-block;
  padding: 5px 10px;
  border-radius: var(--r-full);
  font-size: 11px;
  color: #f4c84e;
  background: rgba(245,200,66,0.14);
  border: 1px solid rgba(245,200,66,0.34);
  font-weight: 700;
}

.empty-events {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  padding: 16px !important;
}

/* ── Loan Modal ──────────────────────────────────────────── */
.loan-modal {
  position: fixed;
  inset: 0;
  background: var(--modal-overlay);
  backdrop-filter: blur(6px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1200;
  padding: 16px;
}

.loan-modal.hidden { display: none; }

.loan-modal-content {
  width: min(480px,100%);
  background: var(--surface-2);
  border: 1px solid var(--border-md);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  padding: 22px;
  max-height: 88vh;
  overflow-y: auto;
}

.loan-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.loan-modal-header h3 {
  margin-bottom: 0;
  font-size: 16px;
  color: var(--text-primary);
}

.loan-modal-close {
  border: none;
  background: var(--modal-close-bg);
  border-radius: var(--r-sm);
  width: 32px;
  height: 32px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--ease);
}

.loan-modal-close:hover {
  background: var(--modal-close-hover-bg);
  color: var(--text-primary);
}

.loan-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.loan-modal-actions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ── Developer Page ──────────────────────────────────────── */
.developer-page {
  background: var(--ink);
}

.developer-hero {
  padding: 32px 0 48px;
}

.developer-hero-grid {
  display: grid;
  grid-template-columns: minmax(260px, 420px) 1fr;
  gap: 28px;
  align-items: start;
}

.developer-photo {
  position: sticky;
  top: 92px;
  align-self: start;
  display: flex;
  justify-content: center;
}

.developer-avatar {
  width: clamp(220px, 28vw, 400px);
  height: clamp(220px, 28vw, 400px);
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(0,212,170,0.2);
  background: linear-gradient(135deg, var(--surface-3), var(--surface-2));
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 0 60px rgba(0,212,170,0.1);
}

.developer-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.developer-initials {
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 800;
  color: var(--teal);
  display: none;
}

.developer-avatar.no-photo .developer-initials { display: inline; }

.developer-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 24px;
}

.developer-eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 8px;
}

.developer-card h2 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.developer-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
}

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

.developer-actions .btn { padding: 10px 18px; }

.developer-actions .btn-coffee {
  background: #528ff0;
  color: #ffffff;
}

.developer-actions .btn-coffee:hover {
  background: #3d7be0;
  box-shadow: 0 6px 20px rgba(82, 143, 240, 0.32);
}

.developer-story { display: grid; gap: 16px; }

.developer-story-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 22px;
}

.developer-story-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.developer-story-title i {
  color: var(--gold);
  font-size: 16px;
}

.developer-story-title h3 {
  margin-bottom: 0;
  font-size: 15px;
  color: var(--text-primary);
}

.inspiration-quote {
  margin: 0 0 14px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--teal-dim);
  border: 1px solid rgba(0,212,170,0.15);
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.75;
}

.inspiration-quote strong { color: var(--text-primary); }

.developer-story-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 0;
}

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

.contact-tile {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--gold-dim);
  border: 1px solid rgba(245,200,66,0.18);
  color: var(--text-primary);
  transition: var(--ease);
}

.contact-tile:hover {
  transform: translateY(-2px);
  background: rgba(245,200,66,0.15);
}

.contact-tile i { font-size: 18px; color: var(--gold); }

.contact-label {
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 800;
  margin-bottom: 2px;
}

.contact-value {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 13px;
  word-break: break-word;
}

/* ── Legend ──────────────────────────────────────────────── */
.legend-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
  gap: 10px;
}

.legend-item {
  display: flex;
  align-items: center;
  font-size: 13px;
  color: var(--text-secondary);
  gap: 8px;
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  flex-shrink: 0;
}

.term-cover-color { background-color: rgba(54,162,235,0.8); }
.portfolio-color { background-color: rgba(75,192,192,0.8); }

.note-container {
  background: rgba(245,200,66,0.07);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: 14px 16px;
  margin-top: 18px;
}

.note-container p { color: #c49a12; font-size: 13px; margin: 0; }

/* ── Stepup suggestion (loan page) ───────────────────────── */
.stepup-suggestion.hidden { display: none; }
.stepup-suggestion {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  background: rgba(245,200,66,0.08);
  border: 1px solid rgba(245,200,66,0.2);
  color: #c49a12;
  padding: 10px 12px;
  border-radius: var(--r-md);
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.5;
}

.stepup-suggestion p { margin-bottom: 0; color: inherit; }

/* ── Animations ──────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 992px) {
  .hero-content h1 { font-size: 44px; }

  .sip-basics-grid,
  .sip-form-container { grid-template-columns: repeat(2, minmax(200px,1fr)); }

  .goal-planner-grid { grid-template-columns: repeat(2, minmax(200px,1fr)); }
}

@media (max-width: 768px) {
  .mobile-desktop-prompt {
    align-items: flex-end;
    padding: 12px;
    background: rgba(0, 0, 0, 0.42);
  }

  .mobile-desktop-prompt__box {
    width: 100%;
    padding: 16px;
    text-align: left;
  }

  .mobile-desktop-prompt__icon {
    display: none;
  }

  .mobile-desktop-prompt__box h2 {
    margin-bottom: 6px;
    font-size: 17px;
  }

  .mobile-desktop-prompt__box p {
    font-size: 12.5px;
    line-height: 1.5;
  }

  .mobile-desktop-prompt__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
  }

  .mobile-desktop-prompt__actions .btn {
    min-width: 0;
    min-height: 38px;
    padding: 0 10px;
    font-size: 12px;
  }

  nav ul {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 10px;
    right: 10px;
    flex-direction: column;
    gap: 4px;
    padding: 10px;
    border-radius: var(--r-lg);
    background: var(--tooltip-bg);
    border: 1px solid var(--border-md);
    box-shadow: var(--shadow-lg);
  }

  header.nav-open nav ul { display: flex; }

  nav ul li a {
    padding: 10px 14px;
    border-radius: var(--r-md);
  }

  .mobile-menu-btn { display: inline-flex; }
  .theme-toggle { width: 58px; height: 34px; }
  .theme-toggle-thumb { width: 26px; height: 26px; }
  [data-theme="dark"] .theme-toggle-thumb { transform: translateX(24px); }

  .hero { padding: 110px 0 80px; }
  .hero-content h1 { font-size: 36px; }
  .hero-stats { grid-template-columns: 1fr 1fr; }

  .section-heading h2 { font-size: 28px; }

  .term-personal-grid,
  .term-insurance-grid,
  .term-investment-grid,
  .goal-planner-grid {
    grid-template-columns: 1fr;
  }

  .span-2 { grid-column: auto; }

  .footer-inner { flex-direction: column; align-items: flex-start; }

  .developer-hero { padding-top: 20px; }
  .developer-hero-grid { grid-template-columns: 1fr; }
  .developer-photo { position: static; justify-content: center; }
  .developer-avatar { width: 160px; height: 160px; }
  .developer-card { text-align: left; }
  .developer-actions { flex-direction: column; align-items: stretch; }
  .developer-actions .btn { width: 100%; justify-content: center; }
  .contact-grid { grid-template-columns: 1fr; }

  .loan-input-grid, .loan-modal-grid { grid-template-columns: 1fr; }
  .loan-chart-canvas-wrap { height: 260px; }
  .loan-prepayment-header { flex-direction: column; align-items: stretch; }
  .loan-kpi-grid { grid-template-columns: 1fr; }

  .line-chart-canvas {
    min-height: 280px;
    height: auto;
    padding: 10px;
  }
  .line-chart-legend {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
    gap: 8px;
  }
  .line-chart-legend-item {
    width: 100%;
    justify-content: flex-start;
    border-radius: 8px;
  }
}

@media (max-width: 576px) {
  .container {
    width: 100%;
    padding: 0 10px;
  }

  .logo h1 { font-size: 16px; }

  .hero-content h1 { font-size: 30px; letter-spacing: -0.8px; }
  .hero-content > p { font-size: 15px; }
  .hero-stats { grid-template-columns: 1fr; }

  .sip-basics-grid,
  .sip-form-container,
  .goal-planner-grid { grid-template-columns: 1fr; }

  .sip-category-fields { grid-template-columns: 1fr; }
  .goal-fields { grid-template-columns: 1fr; }
  .goal-input-table { min-width: 640px; }

  .tool-card {
    width: 100%;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .tool-filter-bar { width: 100%; border-radius: var(--r-xl); }
  .tool-filter { width: 100%; text-align: center; }

  .chart-container { height: 340px; }

  .chart {
    margin-left: -2px;
    margin-right: -2px;
  }

  .chart h4 {
    font-size: 12px;
    line-height: 1.35;
    letter-spacing: 0;
  }

  .line-chart {
    gap: 10px;
  }

  .line-chart-canvas {
    aspect-ratio: 1 / 0.82;
    min-height: 230px;
    padding: 8px;
  }

  .line-chart-legend-item {
    gap: 7px;
    padding: 8px 10px;
    font-size: 11px;
    line-height: 1.35;
  }

  .line-chart-legend-swatch {
    width: 20px;
    flex: 0 0 20px;
  }

  .line-chart-tooltip {
    max-width: calc(100% - 16px);
    padding: 9px 10px;
    border-radius: 8px;
  }

  .line-chart-tooltip-row {
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 6px;
  }

  .line-chart-tooltip-swatch {
    width: 16px;
  }

  .line-chart-tooltip-label {
    font-size: 11px;
  }

  .line-chart-tooltip-value {
    font-size: 11.5px;
    overflow-wrap: anywhere;
  }

  .line-chart-note,
  .line-chart-hint {
    font-size: 11px;
    line-height: 1.5;
  }

  .developer-card, .developer-story-card { padding: 16px; border-radius: var(--r-lg); }
  .inspiration-quote { padding: 12px; font-size: 13px; }
  .developer-avatar { width: 130px; height: 130px; }

  .loan-modal-content { padding: 16px; border-radius: var(--r-lg); }

  .x-axis-action { font-size: 11px; padding: 4px 8px 4px 5px; gap: 5px; }
  .x-axis-add-btn { width: 20px; height: 20px; font-size: 13px; }
}

/* Home redesign */
.home-page {
  --home-bg: #060c13;
  --home-panel: #0c131d;
  --home-card: #0d151f;
  --home-soft: rgba(0, 212, 170, 0.1);
  background: var(--home-bg);
}

[data-theme="light"] .home-page {
  --home-bg: #fbfcfb;
  --home-panel: #ffffff;
  --home-card: #ffffff;
  --home-soft: rgba(16, 185, 129, 0.08);
  --ink: #fbfcfb;
  --surface: #ffffff;
  --surface-2: #f6faf7;
  --surface-3: #edf7f1;
  --teal: #079444;
  --teal-dim: rgba(7, 148, 68, 0.11);
  --text-primary: #06101f;
  --text-secondary: #314056;
  --text-muted: #647084;
  --border: rgba(15, 23, 42, 0.1);
  --border-md: rgba(15, 23, 42, 0.16);
  --header-bg: rgba(255, 255, 255, 0.86);
}

.home-page body::before,
body.home-page::before {
  background: none;
}

.home-page .container {
  width: min(92vw, 1600px);
  max-width: 1600px;
}

.home-page header {
  height: 82px;
}

.home-page header .container {
  height: 82px;
}

.home-page .logo {
  color: var(--text-primary);
}

.home-page .logo i {
  font-size: 30px;
  color: var(--teal);
  filter: none;
}

.home-page .logo h1 {
  font-size: 20px;
  letter-spacing: -0.4px;
}

.home-page nav ul {
  gap: 28px;
}

.home-page nav ul li a {
  border-radius: 0;
  padding: 29px 2px 27px;
  color: var(--text-primary);
  background: transparent;
  border-bottom: 3px solid transparent;
}

.home-page nav ul li a.active,
.home-page nav ul li a:hover {
  color: var(--teal);
  background: transparent;
  border-bottom-color: var(--teal);
}

.nav-tools i {
  font-size: 10px;
  margin-left: 5px;
}

.home-page .theme-toggle {
  width: 60px;
  height: 34px;
}

.home-page .theme-toggle-track {
  border-color: var(--border-md);
  background: var(--home-panel);
}

[data-theme="light"] .home-page .theme-toggle-track {
  background: transparent;
}

.home-page .theme-toggle-thumb {
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  background: var(--teal);
}

[data-theme="dark"] .home-page .theme-toggle-thumb {
  transform: translateX(26px);
}

[data-theme="light"] .home-page .theme-toggle-thumb {
  transform: translateX(0);
}

.home-page .theme-toggle-icon {
  z-index: 2;
  width: 13px;
  height: 13px;
}

.home-page .theme-toggle-icon-moon {
  left: 11px;
}

.home-page .theme-toggle-icon-sun {
  left: 10px;
  right: auto;
}

[data-theme="dark"] .home-page .theme-toggle-icon-sun {
  left: auto;
  right: 11px;
}

.home-page main {
  margin-top: 82px;
}

.home-page section {
  padding: 0;
}

.home-page .hero {
  background: var(--home-bg);
  padding: 42px 0 18px;
  min-height: 520px;
  display: flex;
  align-items: center;
}

.home-page .hero::before,
.home-page .hero::after {
  display: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(440px, 0.9fr) minmax(560px, 1.1fr);
  gap: 44px;
  align-items: center;
}

.home-page .hero-content {
  max-width: 660px;
}

.home-page .hero-eyebrow {
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--teal-dim);
  letter-spacing: 0;
  font-size: 12px;
  margin-bottom: 18px;
}

.home-page .hero-eyebrow::after {
  content: '\f201';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  margin-left: 4px;
  border-radius: 5px;
  color: var(--teal);
}

.home-page .hero-eyebrow::before {
  display: none;
}

.home-page .hero-content h1 {
  font-size: clamp(42px, 4.15vw, 64px);
  letter-spacing: -1.3px;
  line-height: 1.14;
  margin-bottom: 16px;
}

.home-page .hero-content h1 span {
  background: none;
  color: var(--teal);
  -webkit-text-fill-color: currentColor;
}

.home-page .hero-content > p {
  max-width: 560px;
  font-size: 16px;
  line-height: 1.72;
  margin-bottom: 22px;
}

.home-page .btn {
  border-radius: 8px;
  min-height: 42px;
  padding: 0 20px;
  background: var(--teal);
  color: #ffffff;
}

.home-page .btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--teal);
}

.hero-visual {
  position: relative;
  min-height: 390px;
}

.hero-orbit {
  position: absolute;
  inset: -30px 70px 0 10px;
  border-radius: 46% 54% 48% 52%;
  background: radial-gradient(circle at 58% 48%, rgba(0, 212, 170, 0.12), transparent 54%);
  border-left: 1px solid rgba(0, 212, 170, 0.25);
}

[data-theme="light"] .hero-orbit {
  background: radial-gradient(circle at 58% 48%, rgba(7, 148, 68, 0.08), transparent 56%);
}

.hero-dashboard {
  position: absolute;
  right: 142px;
  top: 28px;
  width: 420px;
  height: 294px;
  display: grid;
  grid-template-columns: 94px 1fr;
  border-radius: 18px;
  background: #151d28;
  box-shadow: 14px 26px 52px rgba(0, 0, 0, 0.34);
  transform: perspective(900px) rotateY(-8deg) rotateX(2deg);
  overflow: hidden;
}

[data-theme="light"] .hero-dashboard {
  background: #ffffff;
  box-shadow: 12px 22px 50px rgba(15, 23, 42, 0.14);
}

.dashboard-side {
  background: #111a25;
  padding: 20px;
  display: grid;
  align-content: start;
  gap: 14px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .dashboard-side {
  background: #172232;
}

.dashboard-side span,
.window-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dashboard-side span:nth-child(1),
.window-dots span:nth-child(1) { background: #ef4444; }
.dashboard-side span:nth-child(2),
.window-dots span:nth-child(2) { background: #f5c842; }
.dashboard-side span:nth-child(3),
.window-dots span:nth-child(3) { background: #22c55e; }

.dashboard-side i {
  color: var(--teal);
  font-size: 14px;
}

.dashboard-main {
  position: relative;
  padding: 22px 26px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.04), transparent);
}

.window-dots {
  display: flex;
  gap: 9px;
  margin-bottom: 16px;
}

.chart-lines span {
  display: block;
  width: 72px;
  height: 9px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.32);
  margin-bottom: 10px;
}

.chart-lines span:nth-child(2) { width: 106px; }
.chart-lines span:nth-child(3) { width: 78px; }

.growth-line {
  position: absolute;
  left: 28px;
  top: 84px;
  width: 250px;
  height: 145px;
}

.growth-line polyline,
.growth-line path,
.mini-dashboard svg polyline {
  stroke: var(--teal);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.bars {
  position: absolute;
  left: 42px;
  right: 30px;
  bottom: 36px;
  display: flex;
  align-items: end;
  gap: 20px;
}

.bars span {
  width: 36px;
  border-radius: 6px 6px 3px 3px;
  background: linear-gradient(180deg, #16d48c, #079444);
}

.bars span:nth-child(1) { height: 46px; }
.bars span:nth-child(2) { height: 76px; }
.bars span:nth-child(3) { height: 104px; }
.bars span:nth-child(4) { height: 154px; }

.hero-plant {
  position: absolute;
  left: 68px;
  bottom: 34px;
  width: 118px;
  height: 154px;
  transform: scale(0.88);
  transform-origin: bottom left;
}

.hero-plant span {
  position: absolute;
  bottom: 48px;
  left: 48px;
  width: 42px;
  height: 74px;
  border-radius: 80% 20% 80% 20%;
  background: linear-gradient(135deg, #55d957, #078c42);
  transform-origin: bottom center;
}

.hero-plant span:nth-child(1) { transform: rotate(-48deg); left: 18px; height: 64px; }
.hero-plant span:nth-child(2) { transform: rotate(-22deg); left: 36px; height: 86px; }
.hero-plant span:nth-child(3) { transform: rotate(22deg); left: 58px; height: 92px; }
.hero-plant span:nth-child(4) { transform: rotate(48deg); left: 76px; height: 66px; }
.hero-plant b {
  position: absolute;
  left: 34px;
  bottom: 0;
  width: 64px;
  height: 54px;
  border-radius: 8px 8px 24px 24px;
  background: linear-gradient(180deg, #2a313b, #080d13);
}

[data-theme="light"] .hero-plant b {
  background: linear-gradient(180deg, #ffffff, #dfe7e8);
}

.coin-stack {
  position: absolute;
  right: 94px;
  bottom: 28px;
  width: 136px;
  height: 98px;
  transform: scale(0.9);
  transform-origin: bottom right;
}

.coin-stack span {
  position: absolute;
  bottom: 0;
  width: 74px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffd85b, #f0a51d);
  box-shadow: 0 -13px 0 #f8bf2d, 0 -26px 0 #ffd35b;
}

.coin-stack span:nth-child(2) { left: 18px; bottom: 6px; }
.coin-stack span:nth-child(3) { left: 2px; bottom: -8px; }
.coin-stack strong {
  position: absolute;
  right: 2px;
  bottom: 4px;
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #ffe68d, #f5aa19 64%);
  border: 5px solid #ffc93c;
  color: #fff5bd;
  font-size: 46px;
  line-height: 1;
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.18);
}

.orbit-icons span {
  position: absolute;
  right: 0;
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--home-panel);
  color: var(--teal);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  font-size: 26px;
}

.orbit-icons span:nth-child(1) { top: 56px; right: 44px; }
.orbit-icons span:nth-child(2) { top: 132px; right: -5px; }
.orbit-icons span:nth-child(3) { top: 207px; right: 52px; }
.orbit-icons span:nth-child(4) { top: 278px; right: 18px; }

.home-summary {
  padding: 0 0 18px;
  background: var(--home-bg);
}

.summary-grid,
.clarity-strip,
.about-panel {
  border: 1px solid var(--border);
  background: var(--home-card);
  box-shadow: var(--shadow-sm);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-radius: 14px;
  padding: 20px 18px;
}

.summary-item {
  display: flex;
  gap: 16px;
  padding: 0 18px;
  border-right: 1px solid var(--border);
}

.summary-item:last-child {
  border-right: 0;
}

.summary-item > i,
.policy-card > i {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--teal-dim);
  color: var(--teal);
  font-size: 21px;
}

.summary-item h3 {
  font-size: 15px;
  color: var(--teal);
  margin-bottom: 4px;
}

.summary-item p {
  font-size: 12px;
  line-height: 1.58;
}

.clarity-strip {
  margin-top: 14px;
  border-radius: 12px;
  display: grid;
  grid-template-columns: minmax(360px, 1.25fr) minmax(480px, 1fr);
  align-items: center;
  gap: 20px;
  padding: 14px 20px;
}

.clarity-lead {
  display: flex;
  align-items: center;
  gap: 14px;
}

.clarity-lead i {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--teal-dim);
  color: var(--teal);
  font-size: 25px;
}

.clarity-lead p {
  color: var(--text-primary);
  font-size: 13px;
}

.clarity-lead strong {
  color: var(--teal);
}

.clarity-strip ul {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  justify-content: end;
  gap: 24px;
  color: var(--text-primary);
  font-size: 12px;
  white-space: nowrap;
}

.clarity-strip li i {
  color: var(--teal);
  margin-right: 7px;
}

.home-page .tools,
.home-page .faq,
.home-page .about {
  background: var(--home-bg);
  padding: 18px 0 22px;
}

.home-page .section-heading {
  margin-bottom: 20px;
}

.home-page .section-heading .eyebrow {
  letter-spacing: 0;
  padding: 5px 14px;
  border: 0;
}

.home-page .section-heading h2 {
  font-size: 25px;
  letter-spacing: -0.5px;
  background: none;
  color: var(--text-primary);
  -webkit-text-fill-color: currentColor;
  margin-bottom: 8px;
}

.home-page .section-heading p {
  max-width: 680px;
  font-size: 13px;
}

.home-page .tools-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.home-page .tool-card {
  width: auto;
  min-height: 238px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border-radius: 8px;
  padding: 20px 20px 18px;
  background: var(--home-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.home-page .tool-card:hover {
  border-color: rgba(0, 212, 170, 0.45);
}

.home-page .tool-card::after {
  display: none;
}

.home-page .tool-icon {
  margin-bottom: 12px;
}

.home-page .tool-icon.icon-goals { color: #8b5cf6; background: rgba(139, 92, 246, 0.14); }
.home-page .tool-icon.icon-protection { color: #3b82f6; background: rgba(59, 130, 246, 0.14); }
.home-page .tool-icon.icon-debt { color: #f59e0b; background: rgba(245, 158, 11, 0.15); }

.home-page .tool-card h3 {
  font-size: 16px;
  margin-bottom: 10px;
}

.home-page .tool-card p {
  font-size: 12.5px;
  line-height: 1.68;
  flex: 1;
}

.home-page .tool-card span {
  color: var(--teal);
  font-weight: 800;
  font-size: 13px;
}

.home-page .tool-card span i {
  margin-left: 8px;
}

.home-page .faq-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
}

.home-page details {
  border-radius: 8px;
  background: var(--home-card);
  box-shadow: var(--shadow-sm);
}

.home-page summary {
  padding: 14px 20px;
}

.home-page details p {
  padding: 0 20px 14px;
}

.about-panel {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 32px;
  align-items: center;
  border-radius: 8px;
  padding: 28px 30px;
}

.about-content .section-heading {
  text-align: left;
}

.about-content .section-heading p {
  max-width: 760px;
  margin-left: 0;
}

.about-visual {
  position: relative;
  min-height: 198px;
  transform: scale(0.9);
  transform-origin: center left;
}

.mini-dashboard {
  position: absolute;
  left: 54px;
  top: 6px;
  width: 210px;
  height: 166px;
  border-radius: 12px;
  background: var(--home-panel);
  border: 1px solid var(--border-md);
  box-shadow: var(--shadow-md);
  padding: 18px;
}

.mini-lines span {
  display: block;
  width: 68px;
  height: 7px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.34);
  margin-top: 8px;
}

.mini-lines span:nth-child(2) { width: 92px; }
.mini-lines span:nth-child(3) { width: 60px; }

.mini-dashboard svg {
  position: absolute;
  left: 38px;
  bottom: 52px;
  width: 140px;
}

.mini-dashboard svg polyline {
  stroke-width: 5;
}

.mini-bars {
  position: absolute;
  left: 34px;
  right: 24px;
  bottom: 22px;
  display: flex;
  align-items: end;
  gap: 13px;
}

.mini-bars span {
  width: 22px;
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, #16d48c, #079444);
}

.mini-bars span:nth-child(1) { height: 28px; }
.mini-bars span:nth-child(2) { height: 42px; }
.mini-bars span:nth-child(3) { height: 58px; }
.mini-bars span:nth-child(4) { height: 76px; }

.hero-plant.small {
  left: 0;
  bottom: 0;
  transform: scale(0.78);
  transform-origin: bottom left;
}

.magnifier {
  position: absolute;
  right: 24px;
  bottom: 28px;
  width: 86px;
  height: 86px;
  border: 9px solid #2b3948;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow-md);
}

.magnifier::after {
  content: '';
  position: absolute;
  width: 76px;
  height: 13px;
  border-radius: 999px;
  background: #2b3948;
  transform: rotate(45deg);
  right: -48px;
  bottom: -28px;
}

.home-page .policy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.home-page .policy-card {
  display: flex;
  gap: 16px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.home-page .policy-card h3 {
  font-size: 14px;
  margin-bottom: 8px;
}

.home-page .policy-card p {
  font-size: 12px;
  line-height: 1.8;
}

.home-page footer {
  margin-top: 26px;
  background: var(--home-bg);
}

.home-page .footer-inner {
  align-items: center;
}

.footer-brand p {
  font-size: 12px;
  margin-top: 2px;
}

.footer-brand .logo {
  margin-bottom: 6px;
}

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

  .hero-visual {
    min-height: 330px;
  }

  .summary-grid,
  .home-page .tools-grid,
  .home-page .policy-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .summary-item:nth-child(2) {
    border-right: 0;
  }

  .about-panel {
    grid-template-columns: 1fr;
  }

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

  .clarity-strip ul {
    justify-content: start;
  }
}

@media (max-width: 768px) {
  .home-page header,
  .home-page header .container {
    height: 72px;
  }

  .home-page main {
    margin-top: 72px;
  }

  .home-page nav ul {
    gap: 4px;
  }

  .home-page nav ul li a {
    padding: 10px 14px;
    border: 0;
    border-radius: var(--r-md);
  }

  .home-page .hero {
    padding-top: 30px;
    min-height: auto;
  }

  .hero-visual {
    transform: scale(0.72);
    transform-origin: top left;
    width: 139%;
    margin-bottom: -92px;
  }

  .summary-grid,
  .home-page .tools-grid,
  .home-page .faq-grid,
  .home-page .policy-grid {
    grid-template-columns: 1fr;
  }

  .summary-item {
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding: 14px 4px;
  }

  .summary-item:last-child {
    border-bottom: 0;
  }

  .clarity-strip {
    align-items: flex-start;
  }

  .clarity-strip ul {
    grid-template-columns: 1fr;
    white-space: normal;
    gap: 12px;
  }

  .about-panel {
    padding: 22px 18px;
  }
}

@media (max-width: 560px) {
  .home-page .logo i {
    font-size: 24px;
  }

  .home-page .logo h1 {
    font-size: 16px;
  }

  .home-page .hero-content h1 {
    font-size: 31px;
  }

  .home-page .hero-actions {
    flex-direction: column;
  }

  .hero-visual {
    display: none;
  }

  .summary-grid {
    padding: 10px 16px;
  }

  .home-page .tool-card {
    min-height: 214px;
  }

  .about-visual {
    min-height: 190px;
    transform: scale(0.82);
    transform-origin: top left;
    width: 122%;
  }
}

/* Shared compact app styling for calculator and developer pages */
body:not(.home-page) {
  --app-bg: #060c13;
  --app-panel: #0d151f;
  --app-panel-2: #101a26;
  --app-soft: rgba(0, 212, 170, 0.1);
  background: var(--app-bg);
}

[data-theme="light"] body:not(.home-page) {
  --app-bg: #fbfcfb;
  --app-panel: #ffffff;
  --app-panel-2: #f6faf7;
  --app-soft: rgba(7, 148, 68, 0.1);
  --ink: #fbfcfb;
  --surface: #ffffff;
  --surface-2: #f6faf7;
  --surface-3: #edf7f1;
  --teal: #079444;
  --teal-dim: rgba(7, 148, 68, 0.11);
  --text-primary: #06101f;
  --text-secondary: #314056;
  --text-muted: #647084;
  --border: rgba(15, 23, 42, 0.1);
  --border-md: rgba(15, 23, 42, 0.16);
  --header-bg: rgba(255, 255, 255, 0.86);
  --input-bg: #ffffff;
  --input-border: rgba(15, 23, 42, 0.14);
}

body:not(.home-page)::before {
  background: none;
}

body:not(.home-page) .container {
  width: min(92vw, 1440px);
  max-width: 1440px;
}

body:not(.home-page) header {
  height: 76px;
}

body:not(.home-page) header .container {
  height: 76px;
}

body:not(.home-page) main {
  margin-top: 76px;
}

body:not(.home-page) .logo i {
  font-size: 28px;
  color: var(--teal);
  filter: none;
}

body:not(.home-page) .logo h1 {
  font-size: 19px;
  letter-spacing: -0.4px;
}

body:not(.home-page) nav ul {
  gap: 24px;
}

body:not(.home-page) nav ul li a {
  border-radius: 0;
  padding: 26px 2px 24px;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--text-primary);
  font-weight: 700;
}

body:not(.home-page) nav ul li a:hover,
body:not(.home-page) nav ul li a.active {
  color: var(--teal);
  background: transparent;
  border-bottom-color: var(--teal);
}

body:not(.home-page) .theme-toggle {
  width: 60px;
  height: 34px;
}

body:not(.home-page) .theme-toggle-track {
  background: var(--app-panel);
  border-color: var(--border-md);
}

[data-theme="light"] body:not(.home-page) .theme-toggle-track {
  background: transparent;
}

body:not(.home-page) .theme-toggle-thumb {
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  background: var(--teal);
}

[data-theme="dark"] body:not(.home-page) .theme-toggle-thumb {
  transform: translateX(26px);
}

[data-theme="light"] body:not(.home-page) .theme-toggle-thumb {
  transform: translateX(0);
}

body:not(.home-page) .theme-toggle-icon {
  z-index: 2;
  width: 13px;
  height: 13px;
}

body:not(.home-page) .theme-toggle-icon-moon {
  left: 11px;
}

body:not(.home-page) .theme-toggle-icon-sun {
  left: 10px;
  right: auto;
}

[data-theme="dark"] body:not(.home-page) .theme-toggle-icon-sun {
  left: auto;
  right: 11px;
}

body:not(.home-page) section {
  padding: 34px 0;
}

body:not(.home-page) .content-section,
body:not(.home-page) .calculator,
body:not(.home-page) .faq,
body:not(.home-page) .developer-page {
  background: var(--app-bg);
}

body:not(.home-page) .content-section:first-child,
body:not(.home-page) .developer-hero {
  padding-top: 48px;
}

body:not(.home-page) .tool-hero-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.92fr) minmax(320px, 0.72fr);
  gap: 28px;
  align-items: center;
  margin-bottom: 24px;
  min-height: 290px;
}

body:not(.home-page) .tool-hero-copy {
  text-align: left;
  margin-bottom: 0;
}

body:not(.home-page) .tool-hero-copy h2,
body:not(.home-page) .tool-hero-copy p {
  margin-left: 0;
  margin-right: 0;
}

body:not(.home-page) .tool-hero-copy h2 {
  max-width: 600px;
}

body:not(.home-page) .tool-hero-copy p {
  max-width: 560px;
}

body:not(.home-page) .tool-hero-art {
  position: relative;
  justify-self: center;
  width: min(360px, 100%);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  overflow: visible;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 52%, rgba(0, 212, 170, 0.2), transparent 58%),
    radial-gradient(circle at 48% 56%, rgba(255, 255, 255, 0.05), transparent 62%);
}

[data-theme="light"] body:not(.home-page) .tool-hero-art {
  background: radial-gradient(circle at 50% 52%, rgba(7, 148, 68, 0.08), transparent 62%);
}

body:not(.home-page) .tool-hero-goals .tool-hero-art {
  background:
    radial-gradient(circle at 50% 52%, rgba(139, 92, 246, 0.26), transparent 58%),
    radial-gradient(circle at 48% 56%, rgba(255, 255, 255, 0.05), transparent 62%);
}

body:not(.home-page) .tool-hero-insurance .tool-hero-art {
  background:
    radial-gradient(circle at 50% 52%, rgba(59, 130, 246, 0.24), transparent 58%),
    radial-gradient(circle at 48% 56%, rgba(255, 255, 255, 0.05), transparent 62%);
}

body:not(.home-page) .tool-hero-loan .tool-hero-art {
  background:
    radial-gradient(circle at 50% 52%, rgba(245, 158, 11, 0.23), transparent 58%),
    radial-gradient(circle at 48% 56%, rgba(255, 255, 255, 0.05), transparent 62%);
}

[data-theme="light"] body:not(.home-page) .tool-hero-goals .tool-hero-art {
  background: radial-gradient(circle at 50% 52%, rgba(139, 92, 246, 0.12), transparent 62%);
}

[data-theme="light"] body:not(.home-page) .tool-hero-insurance .tool-hero-art {
  background: radial-gradient(circle at 50% 52%, rgba(59, 130, 246, 0.1), transparent 62%);
}

[data-theme="light"] body:not(.home-page) .tool-hero-loan .tool-hero-art {
  background: radial-gradient(circle at 50% 52%, rgba(245, 158, 11, 0.1), transparent 62%);
}

body:not(.home-page) .tool-hero-art img {
  width: 104%;
  height: 104%;
  object-fit: contain;
  border-radius: 46%;
  filter: drop-shadow(0 24px 42px rgba(0, 0, 0, 0.22));
  -webkit-mask-image: radial-gradient(ellipse 54% 50% at 50% 52%, #000 50%, rgba(0, 0, 0, 0.82) 62%, transparent 76%);
  mask-image: radial-gradient(ellipse 70% 58% at 50% 52%, #000 50%, rgba(0, 0, 0, 0.82) 62%, transparent 76%);
  z-index: 1;
}

[data-theme="dark"] body:not(.home-page) .tool-hero-art img {
  opacity: 0.92;
  mix-blend-mode: screen;
}

body:not(.home-page) .section-heading {
  margin-bottom: 22px;
}

body:not(.home-page) .section-heading .eyebrow,
body:not(.home-page) .developer-eyebrow {
  letter-spacing: 0;
  border: 0;
  color: var(--teal);
  background: var(--teal-dim);
  border-radius: 999px;
  padding: 5px 13px;
  font-size: 11px;
  font-weight: 800;
}

body:not(.home-page) .section-heading h2,
body:not(.home-page) .developer-card h2 {
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
  font-size: clamp(26px, 3.1vw, 42px);
  line-height: 1.16;
  letter-spacing: -0.7px;
  background: none;
  color: var(--text-primary);
  -webkit-text-fill-color: currentColor;
}

body:not(.home-page) .section-heading p {
  max-width: 760px;
  font-size: 14px;
  line-height: 1.7;
}

body:not(.home-page) .content-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

body:not(.home-page) .content-card,
body:not(.home-page) .input-section,
body:not(.home-page) .results-section,
body:not(.home-page) .investment-category,
body:not(.home-page) .chart,
body:not(.home-page) .loan-metric-table-wrap,
body:not(.home-page) .loan-prepayment-panel,
body:not(.home-page) .goal-table-wrap,
body:not(.home-page) .goal-summary-table-wrap,
body:not(.home-page) .developer-card,
body:not(.home-page) .developer-story-card {
  min-width: 0;
  background: var(--app-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

body:not(.home-page) .content-card {
  padding: 20px;
}

body:not(.home-page) .content-card:hover,
body:not(.home-page) .investment-category:hover,
body:not(.home-page) .result-card:hover,
body:not(.home-page) .developer-story-card:hover {
  transform: none;
  border-color: rgba(0, 212, 170, 0.42);
}

body:not(.home-page) .content-card h3,
body:not(.home-page) .investment-category h3,
body:not(.home-page) .chart h4,
body:not(.home-page) .developer-story-title h3 {
  font-size: 15px;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}

body:not(.home-page) .content-card li {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.72;
  padding-left: 22px;
}

body:not(.home-page) .content-card li::before {
  content: '\f061';
  top: 0.27em;
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--teal-dim);
  color: var(--teal);
  box-shadow: none;
  font-family: 'Font Awesome 6 Free';
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
}

body:not(.home-page) .calculator-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
}

body:not(.home-page) .calculator-subheading {
  margin: 0 0 16px;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 700;
  text-align: center;

  padding: 10px;
  border: 2px dashed #7C3AED;
  animation: dashPulse 1.5s infinite;
}

@keyframes dashPulse {
  0% {
    border-color: #7C3AED;
    box-shadow: 0 0 0 rgba(124,58,237,0);
  }
  50% {
    border-color: transparent;
    box-shadow: 0 0 10px rgba(124,58,237,0.9);
  }
  100% {
    border-color: #7C3AED;
    box-shadow: 0 0 0 rgba(124,58,237,0);
  }
}

body:not(.home-page) #term-insurance-form .step-indicator {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin-bottom: 16px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--teal-dim);
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
}

body:not(.home-page) .section-header-with-action {
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

body:not(.home-page) .btn-skip-investments {
  min-height: 34px;
  padding: 0 12px;
  font-size: 12px;
  white-space: normal;
}

body:not(.home-page) .form-group label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

body:not(.home-page) .tooltip-trigger {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--teal-dim);
  color: var(--teal);
  cursor: help;
  font: inherit;
  font-size: 12px;
  line-height: 1;
}

body:not(.home-page) .tooltip-trigger::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 9px);
  z-index: 8;
  width: min(280px, 78vw);
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--tooltip-bg);
  box-shadow: var(--shadow-lg);
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.45;
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: var(--ease);
}

body:not(.home-page) .tooltip-trigger:hover::after,
body:not(.home-page) .tooltip-trigger:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

body:not(.home-page) .rupee-format {
  min-height: 18px;
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

body:not(.home-page) .quick-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}

body:not(.home-page) .quick-chip {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--app-panel-2);
  color: var(--text-secondary);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: var(--ease);
}

body:not(.home-page) .quick-chip:hover,
body:not(.home-page) .quick-chip:focus-visible {
  border-color: var(--teal);
  color: var(--teal);
  outline: none;
}

body:not(.home-page) .results-placeholder {
  display: grid;
  min-height: 180px;
  place-items: center;
  padding: 24px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: var(--app-panel-2);
  color: var(--text-secondary);
  font-size: 14px;
  text-align: center;
}

body:not(.home-page) .results-intro {
  margin: 0 0 14px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

body:not(.home-page) .results-loading {
  display: grid;
  gap: 14px;
}

body:not(.home-page) .skeleton-line,
body:not(.home-page) .skeleton-chart {
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--app-panel-2), rgba(0, 212, 170, 0.14), var(--app-panel-2));
  background-size: 220% 100%;
  animation: skeletonPulse 1.2s ease-in-out infinite;
}

body:not(.home-page) .skeleton-line {
  height: 16px;
  max-width: 520px;
}

body:not(.home-page) .skeleton-title {
  height: 24px;
  max-width: 320px;
}

body:not(.home-page) .skeleton-chart {
  height: 330px;
}

@keyframes skeletonPulse {
  from { background-position: 120% 0; }
  to { background-position: -120% 0; }
}

body:not(.home-page) .input-section,
body:not(.home-page) .results-section {
  padding: 22px;
}

body:not(.home-page) .results-section {
  grid-column: 1 / -1;
  width: 100%;
}

body:not(.home-page) .section-header {
  margin: 8px 0 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

body:not(.home-page) .section-header:first-child {
  margin-top: 0;
}

body:not(.home-page) .section-header h3 {
  font-size: 14px;
  color: var(--teal);
  letter-spacing: 0;
}

body:not(.home-page) .form-group {
  margin-bottom: 14px;
}

body:not(.home-page) .form-group label {
  margin-bottom: 6px;
  font-size: 12px;
  letter-spacing: 0;
  color: var(--text-primary);
}

body:not(.home-page) .form-group input,
body:not(.home-page) .form-group select {
  height: 42px;
  padding: 9px 12px;
  border-radius: 8px;
  background: var(--input-bg);
  border-color: var(--input-border);
  color: var(--text-primary);
  font-size: 13px;
}

body:not(.home-page) .form-group input:focus,
body:not(.home-page) .form-group select:focus {
  box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.1);
}

body:not(.home-page) .tip-text,
body:not(.home-page) .stepup-suggestion,
body:not(.home-page) .inflation-warning,
body:not(.home-page) .note-container {
  margin-top: 8px;
  padding: 9px 11px;
  border-radius: 8px;
  border: 1px solid rgba(0, 212, 170, 0.16);
  background: var(--teal-dim);
}

body:not(.home-page) .tip-text p,
body:not(.home-page) .stepup-suggestion p,
body:not(.home-page) .inflation-warning p,
body:not(.home-page) .note-container p {
  color: var(--text-secondary);
  font-size: 11.5px;
  line-height: 1.55;
}

body:not(.home-page) .sip-basics-grid,
body:not(.home-page) .sip-form-container,
body:not(.home-page) .term-personal-grid,
body:not(.home-page) .term-insurance-grid,
body:not(.home-page) .term-investment-grid,
body:not(.home-page) .goal-planner-grid,
body:not(.home-page) .loan-input-grid {
  gap: 14px;
}

body:not(.home-page) #loan-prepayment-form .loan-input-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body:not(.home-page) #loan-prepayment-form .form-group.span-2 {
  grid-column: span 1;
}

body:not(.home-page) .investment-category {
  padding: 16px;
}

body:not(.home-page) .sip-category-fields {
  gap: 12px;
}

body:not(.home-page) .btn {
  border-radius: 8px;
  min-height: 42px;
  padding: 0 18px;
  background: var(--teal);
  color: #ffffff;
}

body:not(.home-page) .btn-outline {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--teal);
}

body:not(.home-page) .btn-calculate {
  display: flex;
  margin: 16px auto 0;
  width: auto;
  min-width: 190px;
}

body:not(.home-page) .results-header {
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

body:not(.home-page) .results-header h2,
body:not(.home-page) .results-header h3 {
  font-size: 18px;
  letter-spacing: -0.3px;
}

body:not(.home-page) .results-header p {
  font-size: 13px;
}

body:not(.home-page) .result-cards,
body:not(.home-page) .loan-kpi-grid {
  gap: 14px;
}

body:not(.home-page) .result-card {
  padding: 18px;
  border-radius: 8px;
  background: var(--app-panel-2);
  border: 1px solid var(--border);
}

body:not(.home-page) .result-card::before {
  height: 3px;
}

body:not(.home-page) .result-card h4 {
  font-size: 12px;
}

body:not(.home-page) .result-value {
  font-size: clamp(24px, 3vw, 34px);
}

body:not(.home-page) .result-caption {
  font-size: 11.5px;
}

body:not(.home-page) .chart,
body:not(.home-page) .chart-container,
body:not(.home-page) .line-chart-canvas,
body:not(.home-page) .loan-chart-canvas-wrap {
  min-width: 0;
  background: var(--app-panel-2);
  border-radius: 8px;
}

body:not(.home-page) .chart {
  padding: 18px;
}

body:not(.home-page) .charts-container {
  margin-top: 16px;
}

body:not(.home-page) .line-chart {
  gap: 12px;
}

body:not(.home-page) .line-chart-canvas {
  min-height: 330px;
  height: auto;
}

body:not(.home-page) .chart-container {
  height: 350px;
}

body:not(.home-page) .loan-chart-canvas-wrap {
  height: 330px;
}

body:not(.home-page) .loan-metric-table-wrap,
body:not(.home-page) .loan-prepayment-panel,
body:not(.home-page) .goal-table-wrap,
body:not(.home-page) .goal-summary-table-wrap {
  padding: 10px;
}

body:not(.home-page) table th {
  color: var(--text-muted);
  background: var(--table-head-bg);
}

body:not(.home-page) table td {
  color: var(--text-secondary);
}

body:not(.home-page) .faq-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
}

body:not(.home-page) details {
  border-radius: 8px;
  background: var(--app-panel);
  box-shadow: var(--shadow-sm);
}

body:not(.home-page) summary {
  padding: 15px 20px;
  font-size: 13px;
}

body:not(.home-page) details p {
  padding: 0 20px 15px;
  font-size: 12.5px;
}

body:not(.home-page) footer {
  background: var(--app-bg);
  margin-top: 18px;
}

body:not(.home-page) .footer-inner {
  align-items: center;
}

/* Developer page alignment with the tool style */
body:not(.home-page) .developer-page {
  min-height: auto;
}

body:not(.home-page) .developer-hero-grid {
  grid-template-columns: minmax(260px, 360px) minmax(520px, 1fr);
  gap: 28px;
}

body:not(.home-page) .developer-photo {
  top: 98px;
}

body:not(.home-page) .developer-avatar {
  width: clamp(210px, 22vw, 320px);
  height: clamp(210px, 22vw, 320px);
  border-radius: 8px;
  border-color: var(--border-md);
  box-shadow: var(--shadow-sm);
}

body:not(.home-page) .developer-card,
body:not(.home-page) .developer-story-card {
  padding: 22px;
}

body:not(.home-page) .developer-card h2 {
  margin: 12px 0 8px;
  font-size: clamp(28px, 3.2vw, 44px);
}

body:not(.home-page) .developer-subtitle,
body:not(.home-page) .developer-story-text,
body:not(.home-page) .inspiration-quote {
  font-size: 13px;
  line-height: 1.75;
}

body:not(.home-page) .developer-actions {
  gap: 10px;
}

body:not(.home-page) .inspiration-quote {
  border-radius: 8px;
  background: var(--teal-dim);
  border-color: rgba(0, 212, 170, 0.16);
}

@media (max-width: 992px) {
  body:not(.home-page) .tool-hero-layout {
    grid-template-columns: 1fr;
    min-height: auto;
    text-align: center;
  }

  body:not(.home-page) .tool-hero-copy {
    text-align: center;
  }

  body:not(.home-page) .tool-hero-copy h2,
  body:not(.home-page) .tool-hero-copy p {
    margin-left: auto;
    margin-right: auto;
  }

  body:not(.home-page) .tool-hero-art {
    width: min(300px, 80vw);
  }

  body:not(.home-page) .calculator-grid,
  body:not(.home-page) .developer-hero-grid {
    grid-template-columns: 1fr;
  }

  body:not(.home-page) #loan-prepayment-form .loan-input-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body:not(.home-page) .content-grid,
  body:not(.home-page) .faq-grid {
    grid-template-columns: 1fr;
  }

  body:not(.home-page) .developer-photo {
    position: static;
  }
}

@media (max-width: 768px) {
  body:not(.home-page) header,
  body:not(.home-page) header .container {
    height: 72px;
  }

  body:not(.home-page) main {
    margin-top: 72px;
  }

  body:not(.home-page) nav ul {
    gap: 4px;
  }

  body:not(.home-page) nav ul li a {
    padding: 10px 14px;
    border: 0;
    border-radius: var(--r-md);
  }

  body:not(.home-page) section,
  body:not(.home-page) .content-section:first-child,
  body:not(.home-page) .developer-hero {
    padding: 24px 0;
  }

  body:not(.home-page) .tool-hero-layout {
    gap: 14px;
    margin-bottom: 18px;
  }

  body:not(.home-page) .input-section,
  body:not(.home-page) .results-section,
  body:not(.home-page) .developer-card,
  body:not(.home-page) .developer-story-card {
    padding: 18px;
  }

  body:not(.home-page) .chart {
    padding: 14px;
  }

  body:not(.home-page) .line-chart-canvas,
  body:not(.home-page) .chart-container,
  body:not(.home-page) .loan-chart-canvas-wrap {
    height: 280px;
  }

  body:not(.home-page) .line-chart-canvas {
    min-height: 260px;
    height: auto;
  }

  body:not(.home-page) .section-header-with-action {
    flex-wrap: wrap;
    align-items: center;
  }

  body:not(.home-page) .btn-skip-investments {
    justify-content: center;
  }

  body:not(.home-page) #calculator .sip-form-container {
    grid-template-columns: 1fr;
  }

  body:not(.home-page) #calculator .investment-category {
    width: 100%;
  }
}

@media (max-width: 576px) {
  body:not(.home-page) .container {
    width: 100%;
    padding: 0 10px;
  }

  body:not(.home-page) .section-heading h2,
  body:not(.home-page) .developer-card h2 {
    font-size: 25px;
  }

  body:not(.home-page) .big-screen-notice,
  body:not(.home-page) .calculator-subheading {
    font-size: 12px;
    line-height: 1.45;
  }

  body:not(.home-page) .input-section,
  body:not(.home-page) .results-section {
    padding: 12px;
  }

  body:not(.home-page) .chart {
    padding: 10px;
    margin-left: -4px;
    margin-right: -4px;
  }

  body:not(.home-page) .chart h4 {
    font-size: 12px;
    letter-spacing: 0;
    line-height: 1.35;
  }

  body:not(.home-page) .line-chart {
    gap: 10px;
  }

  body:not(.home-page) .line-chart-canvas {
    min-height: 230px;
    aspect-ratio: 1 / 0.82;
    padding: 8px;
  }

  body:not(.home-page) .chart-container,
  body:not(.home-page) .loan-chart-canvas-wrap {
    height: 260px;
    padding: 8px;
  }

  body:not(.home-page) .line-chart-legend-item {
    padding: 8px 10px;
    font-size: 11px;
    line-height: 1.35;
  }

  body:not(.home-page) .line-chart-note,
  body:not(.home-page) .line-chart-hint {
    font-size: 11px;
    line-height: 1.45;
  }

  body:not(.home-page) .developer-avatar {
    width: 180px;
    height: 180px;
  }

  body:not(.home-page) .btn-calculate {
    width: 100%;
  }

  body:not(.home-page) #loan-prepayment-form .loan-input-grid {
    grid-template-columns: 1fr;
  }
}
