/* PaisaCalc — blue/white fintech, yellow + red accents. Tune tokens here. */
:root {
  --navy: #0b1f4d;
  --navy-soft: #3d4d6b;
  --blue: #1747c9;
  --blue-deep: #1239a8;
  --ice: #f4f7ff;
  --white: #ffffff;
  --line: #d8deef;
  --line-strong: #b7c2de;
  --yellow: #ffc83d;
  --yellow-soft: #ffe9a8;
  --red: #e5383b;
  --red-aa: #d5292d; /* white text on this meets WCAG AA at small sizes */
  --focus: #1747c9;
  --chip: #e8eeff;
  --ok-bg: #eef3ff;
  --serif: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --sans: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --gutter: 1rem;
  --max: 70rem;
  --tap: 2.75rem;
  --radius: 0.9rem;
  --shadow: 0 1px 0 rgba(11, 31, 77, 0.04), 0 14px 32px rgba(11, 31, 77, 0.07);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--navy);
  background: var(--ice);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  min-height: 100vh;
  max-width: 100%;
}

img, svg, video { max-width: 100%; height: auto; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 0.16em; }
a:hover { color: var(--blue-deep); }

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

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--navy);
  color: var(--white);
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

.wrap {
  width: min(var(--max), 100%);
  margin-inline: auto;
  padding-inline: var(--gutter);
  min-width: 0;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  position: sticky;
  top: 0;
  z-index: 30;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 3.4rem;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: inherit;
  text-decoration: none;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  min-height: var(--tap);
}
.logo small {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy-soft);
}
.mark {
  width: 1.45rem;
  height: 1.45rem;
  background: var(--blue);
  color: var(--yellow);
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  flex: none;
  border-radius: 0.35rem;
}

.nav-toggle {
  display: none;
  min-height: var(--tap);
  min-width: var(--tap);
  border: 1px solid var(--navy);
  background: var(--white);
  color: var(--navy);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  padding: 0 0.7rem;
  border-radius: 0.5rem;
}
.nav-toggle:hover {
  background: var(--navy);
  color: var(--white);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
  align-items: center;
}
.nav a {
  color: var(--navy);
  text-decoration: none;
  min-height: var(--tap);
  display: inline-flex;
  align-items: center;
  padding: 0 0.55rem;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: 0.4rem;
}
.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--blue);
  box-shadow: inset 0 -2px 0 var(--yellow);
}

.ad-chip {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--red-aa);
  color: var(--white);
  border: 1px solid var(--red-aa);
  padding: 0 0.45rem;
  min-height: 1.75rem;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  margin-left: 0.25rem;
  border-radius: 0.3rem;
}
.ad-chip:hover { background: var(--navy); border-color: var(--navy); color: var(--white); }

/* Type */
.kicker {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--blue);
}
h1, h2, h3, .serif { font-family: var(--serif); letter-spacing: -0.03em; font-weight: 700; }
h1 { font-size: clamp(1.75rem, 6vw, 3rem); line-height: 1.12; margin: 0 0 0.5rem; }
h2 { font-size: 1.3rem; margin: 0 0 0.5rem; }
h3 { font-size: 1.05rem; margin: 1.15rem 0 0.35rem; }
.lede { margin: 0; color: var(--navy-soft); max-width: 38rem; font-size: 1.08rem; }
.updated {
  margin: 0.7rem 0 0;
  font-size: 0.82rem;
  color: var(--navy-soft);
}
.updated strong { color: var(--navy); font-weight: 650; }

/* Home hero */
.hero {
  padding: 1.4rem 0 1.6rem;
}
.hero-grid {
  display: grid;
  gap: 1.25rem 2rem;
  align-items: center;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 840px) {
  .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 22rem); }
}
.hero-copy { min-width: 0; }
.hero-art {
  width: min(100%, 26rem);
  margin-inline: auto;
  height: auto;
  display: block;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 0.75rem;
  align-items: center;
  margin-top: 1.15rem;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 0.45rem 1.15rem;
  background: var(--blue);
  color: var(--white);
  border: 1px solid var(--blue);
  border-radius: 0.6rem;
  font-weight: 700;
  text-decoration: none;
  font-family: var(--sans);
}
.btn-primary:hover { background: var(--blue-deep); border-color: var(--blue-deep); color: var(--white); }

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.9rem;
}
.quick-links a {
  min-height: 2.25rem;
  display: inline-flex;
  align-items: center;
  padding: 0 0.7rem;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--navy);
  text-decoration: none;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
}
.quick-links a:hover { border-color: var(--blue); color: var(--blue); }

/* Tool cards */
.tools-block { padding: 0 0 2.4rem; }
.tools-block h2 { font-size: 1.45rem; margin-bottom: 0.85rem; }
.tools {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}
@media (min-width: 640px) {
  .tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  .tools { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 1.05rem 1.05rem 1.15rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  min-height: var(--tap);
  border-radius: var(--radius);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
a.card:hover,
a.card:focus-visible {
  border-color: var(--blue);
  box-shadow: 0 12px 28px rgba(23, 71, 201, 0.12);
  transform: translateY(-2px);
  color: inherit;
}
.icon-tile {
  width: 3.15rem;
  height: 3.15rem;
  border-radius: 0.8rem;
  background: var(--chip);
  display: grid;
  place-items: center;
  margin-bottom: 0.35rem;
}
.icon-tile svg { width: 1.85rem; height: 1.85rem; display: block; }
.card h2 { font-size: 1.2rem; margin: 0; }
.card p { margin: 0; color: var(--navy-soft); font-size: 0.95rem; flex: 1; }
.card-cta {
  margin-top: 0.7rem;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0 0.85rem;
  background: var(--navy);
  color: var(--white);
  font-weight: 700;
  font-size: 0.88rem;
  border-radius: 0.5rem;
}
a.card:hover .card-cta,
a.card:focus-visible .card-cta { background: var(--blue); }

/* Tool layout */
.tool-hero { padding: 1.1rem 0 0.4rem; }
.answer {
  background: var(--navy);
  color: #f5f7ff;
  padding: 1rem 1rem 1.1rem;
  margin: 0.85rem 0 1rem;
  min-width: 0;
  border-radius: var(--radius);
}
.answer .lbl {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--yellow);
  margin: 0 0 0.15rem;
}
.answer .val {
  font-family: var(--serif);
  font-size: clamp(1.85rem, 8vw, 3rem);
  line-height: 1.05;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
  margin: 0;
  color: var(--white);
}
.answer .sub {
  margin: 0.4rem 0 0;
  color: #d5dcf0;
  font-size: 0.95rem;
}
.answer .sub strong { color: #fff; }
.answer-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7.25rem, 1fr));
  gap: 0.45rem;
  margin-top: 0.85rem;
}
.answer-metrics .metric {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 200, 61, 0.28);
  padding: 0.45rem 0.55rem;
  min-width: 0;
  border-radius: 0.5rem;
}
.answer-metrics .lbl { color: var(--yellow); }
.answer-metrics .val {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  color: #fff;
  overflow-wrap: anywhere;
}

.sticky-answer {
  position: sticky;
  top: 3.4rem;
  z-index: 20;
}

.panel {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 0.9rem 0.9rem 1rem;
  min-width: 0;
  margin-bottom: 0.75rem;
  border-radius: var(--radius);
}

label {
  display: block;
  font-weight: 650;
  font-size: 0.88rem;
  margin: 0.7rem 0 0.2rem;
}
.hint { display: block; font-weight: 400; color: var(--navy-soft); font-size: 0.8rem; }

.field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: end;
}
.field-row input[type="text"],
.field-row input[type="number"] {
  width: 8.2rem;
  max-width: 38vw;
}

input[type="text"],
input[type="number"],
input[type="search"],
select,
textarea {
  width: 100%;
  max-width: 100%;
  min-height: var(--tap);
  font: inherit;
  font-variant-numeric: tabular-nums;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--navy);
  background: #fff;
  color: var(--navy);
  border-radius: 0.5rem;
}

input[type="range"] {
  width: 100%;
  max-width: 100%;
  height: var(--tap);
  margin: 0;
  accent-color: var(--blue);
  cursor: pointer;
}

.row-2, .row-3 {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 560px) {
  .row-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.check {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  font-weight: 500;
  margin-top: 0.7rem;
  min-height: var(--tap);
}
.check input {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.55rem;
  flex: none;
  accent-color: var(--blue);
}

fieldset {
  border: 1px solid var(--line);
  margin: 0.75rem 0 0;
  padding: 0.35rem 0.7rem 0.75rem;
  min-width: 0;
  border-radius: 0.6rem;
}
legend { font-weight: 700; padding: 0 0.25rem; font-size: 0.9rem; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.9rem;
}
button, .btn {
  font: inherit;
  font-weight: 650;
  border: 1px solid var(--navy);
  background: var(--navy);
  color: var(--white);
  min-height: var(--tap);
  padding: 0.4rem 0.95rem;
  cursor: pointer;
  border-radius: 0.55rem;
}
button.secondary, .btn.secondary {
  background: transparent;
  color: var(--navy);
}
button:hover, .btn:hover { background: var(--blue); border-color: var(--blue); color: #fff; }
button.secondary:hover { color: #fff; }

/* Details / FAQ */
details.fold {
  background: var(--white);
  border: 1px solid var(--line);
  margin: 0 0 0.6rem;
  min-width: 0;
  border-radius: var(--radius);
}
details.fold > summary {
  cursor: pointer;
  font-weight: 650;
  min-height: var(--tap);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.85rem;
  list-style: none;
}
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after {
  content: "+";
  font-size: 1.2rem;
  color: var(--navy-soft);
  flex: none;
}
details.fold[open] > summary::after { content: "–"; }
.fold-body {
  padding: 0 0.85rem 0.9rem;
  color: var(--navy-soft);
  min-width: 0;
}
.fold-body p, .fold-body ul { margin: 0 0 0.6rem; }
.fold-body p:last-child, .fold-body ul:last-child { margin-bottom: 0; }

.faq-item { margin: 0 0 0.85rem; }
.faq-item h3 { margin: 0 0 0.2rem; font-size: 1.02rem; color: var(--navy); }
.faq-item p { margin: 0; color: var(--navy-soft); }

.home-faq { padding: 0 0 2.5rem; }
.home-faq h2 { margin-bottom: 0.85rem; }
.faq-list {
  display: grid;
  gap: 0.55rem;
}

.table-scroll {
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}
.workings {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
}
.workings th, .workings td {
  text-align: left;
  padding: 0.4rem 0.4rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  overflow-wrap: anywhere;
}
.workings td.num, .workings th.num { text-align: right; white-space: nowrap; }
.workings tfoot td { font-weight: 700; border-top: 1px solid var(--navy); }

@media (max-width: 559px) {
  .workings.stack thead { display: none; }
  .workings.stack, .workings.stack tbody, .workings.stack tr, .workings.stack td {
    display: block;
    width: 100%;
  }
  .workings.stack tr {
    border-bottom: 1px solid var(--navy);
    padding: 0.35rem 0;
  }
  .workings.stack td {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    border: 0;
    padding: 0.15rem 0;
    text-align: left;
    white-space: normal;
  }
  .workings.stack td.num { text-align: right; }
  .workings.stack td::before {
    content: attr(data-label);
    font-weight: 650;
    color: var(--navy-soft);
    flex: 0 1 45%;
  }
}

.related {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.2rem 0 1.5rem;
}
.related a {
  min-height: var(--tap);
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  background: var(--white);
  padding: 0 0.7rem;
  text-decoration: none;
  color: var(--navy);
  font-size: 0.9rem;
  border-radius: 0.5rem;
}
.related a:hover { border-color: var(--blue); color: var(--blue); }

.offer-list {
  margin: 0 0 0.85rem;
  padding-left: 1.15rem;
}
.offer-list li { margin: 0 0 0.4rem; }

.offers-block { padding: 0.15rem 0 1.7rem; }
.offers-block h2 { font-size: 1.25rem; margin: 0 0 0.35rem; }
.offers-note {
  margin: 0 0 0.85rem;
  font-size: 0.9rem;
  color: var(--navy-soft);
  max-width: 40rem;
}
.offer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.65rem;
}
@media (min-width: 640px) {
  .offer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .offer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.offer-card {
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 0.8rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  border-radius: var(--radius);
}
.offer-card .icon-tile {
  margin: 0;
  width: 2.6rem;
  height: 2.6rem;
  flex: none;
}
.offer-card .icon-tile svg { width: 1.55rem; height: 1.55rem; }
.offer-body { flex: 1; min-width: 0; }
.offer-card h3 {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.offer-label {
  display: inline-block;
  margin-top: 0.22rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--red-aa);
  color: var(--white);
  padding: 0.12rem 0.35rem;
  border-radius: 0.25rem;
}
.offer-cta {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0 0.85rem;
  background: var(--navy);
  color: var(--white);
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  border-radius: 0.5rem;
}
.offer-cta:hover,
.offer-cta:focus-visible {
  background: var(--blue);
  color: var(--white);
}
@media (max-width: 420px) {
  .offer-card { flex-wrap: wrap; }
  .offer-cta { width: 100%; }
}


.answer-block {
  border-left: 3px solid var(--yellow);
  padding: 0.15rem 0 0.15rem 0.8rem;
  margin: 0.6rem 0 0;
  color: var(--navy-soft);
}

.prose { max-width: 42rem; padding: 1.4rem 0 2.4rem; }
.prose p { margin: 0 0 0.75rem; }
.prose h1 { margin-top: 0; }

.article {
  max-width: 44rem;
  padding: 0.5rem 0 2.6rem;
}
.article h2 {
  font-size: 1.4rem;
  margin: 1.6rem 0 0.55rem;
}
.article p, .article li { color: var(--navy); }
.article p { margin: 0 0 0.85rem; }
.article ul, .article ol { margin: 0 0 0.85rem; padding-left: 1.15rem; }
.article li { margin: 0 0 0.35rem; }
.article a { overflow-wrap: anywhere; }
.article .source { font-size: 0.92rem; color: var(--navy-soft); }
.article-kicker {
  margin: 1.4rem 0 0.3rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--blue);
}

.disclaimer, .tiny { color: var(--navy-soft); font-size: 0.82rem; }
.disclaimer { padding: 0.25rem 0 1.5rem; }

.compare {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.6rem;
}
@media (min-width: 720px) {
  .compare { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.compare article {
  border: 1px solid var(--line);
  padding: 0.7rem;
  background: var(--ice);
  min-width: 0;
  border-radius: 0.6rem;
}
.compare article.winner { border: 2px solid var(--blue); background: var(--ok-bg); }

.site-footer {
  border-top: 1px solid var(--navy);
  padding: 1rem 0 1.5rem;
  background: var(--white);
  font-size: 0.88rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  justify-content: space-between;
  align-items: baseline;
}
.footer-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 0.9rem; }
.footer-nav a { min-height: var(--tap); display: inline-flex; align-items: center; }

.home-note { padding: 0 0 2rem; max-width: 38rem; color: var(--navy-soft); }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav { display: none; width: 100%; flex-direction: column; align-items: stretch; padding-bottom: 0.5rem; }
  .site-header.is-open .nav { display: flex; }
  .nav a { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card { transition: none; }
}

code, .break { overflow-wrap: anywhere; word-break: break-word; }
