/* --c is a category colour; index.php sets it on each category panel and card. --blue is the brand colour. */
:root {
  --ink: #0F1B2D; --muted: #5A6679; --line: #E4E8F0; --soft: #F4F7FC; --blue: #1766FF; --c: #1766FF;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #fff; color: var(--ink); font: 16px/1.6 var(--font); }
a { color: var(--blue); }
svg { flex: none; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
[id] { scroll-margin-top: 24px; }

/* Header */
.top { border-bottom: 1px solid var(--line); background: #fff; }
.top .wrap { display: flex; justify-content: space-between; align-items: center; gap: 20px; height: 68px; }
.logo { flex: none; display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.logo span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 1.05rem; font-weight: 700; }
nav { display: flex; gap: 30px; }
nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.95rem; }
nav a:hover { color: var(--blue); }
.btn { flex: none; padding: 10px 18px; border-radius: 10px; background: var(--ink); color: #fff; font-weight: 700; font-size: 0.9rem; text-decoration: none; }
.btn:hover { background: var(--blue); }

/* Type */
h1 { font-weight: 800; font-size: clamp(2rem, 5.2vw, 3.1rem); line-height: 1.08; letter-spacing: -0.035em; margin: 40px 0 14px; }
h2 { font-weight: 800; font-size: 1.6rem; line-height: 1.2; letter-spacing: -0.025em; margin: 64px 0 16px; }
h3 { font-weight: 800; font-size: 1.15rem; line-height: 1.3; letter-spacing: -0.015em; margin: 0 0 4px; }
p { margin: 0 0 14px; }
.lead { color: var(--muted); font-size: 1.1rem; max-width: 58ch; }
.crumbs { margin: 28px 0 -24px; font-size: 0.9rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.prose { max-width: 70ch; }
.reviewed { margin-top: 24px; font-size: 0.9rem; color: var(--muted); }

/* Home hero */
.herobg { background: radial-gradient(760px 460px at 12% 38%, #E3EEFF 0%, rgba(227, 238, 255, 0) 70%), linear-gradient(#F6F9FF, #fff); }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); align-items: center; gap: 64px; padding-top: 44px; padding-bottom: 56px; }
.pitch { position: relative; }
.badge { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 22px; padding: 7px 14px; border-radius: 999px; background: #E3EEFF; color: var(--blue); font-weight: 700; font-size: 0.88rem; }
.badge svg { width: 16px; height: 16px; }
.hero h1 { margin: 0 0 18px; font-size: clamp(2.2rem, 5vw, 3.6rem); max-width: 11ch; }
.hero h1 span, .head h2 span { color: var(--blue); }
.hero .lead { max-width: 46ch; }
.coin { position: absolute; right: 0; top: 64px; width: 150px; }
.perks { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 32px 0 0; padding: 0; font-size: 0.82rem; line-height: 1.4; color: var(--muted); }
.perks li { --c: var(--blue); }
.perks span { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 12px; border-radius: 50%; background: color-mix(in srgb, var(--c) 13%, #fff); color: var(--c); }
.perks b { display: block; color: var(--ink); font-size: 0.92rem; }

/* Calculator: a dark panel so it stands out from the white page, with the result on white inside it. */
.calc { margin-top: 28px; padding: 26px; border-radius: 22px; background: var(--ink); color: #fff; box-shadow: 0 34px 60px -30px rgba(15, 27, 45, 0.6); --c: var(--blue); --tint: #4D8BFF; }
.hero .calc { margin-top: 0; }
.panel { display: grid; grid-template-columns: 1.05fr 1fr; gap: 28px; }
.panel[hidden] { display: none; }
.stack .panel { grid-template-columns: 1fr; gap: 18px; }
.panel form, .result { min-width: 0; }
.tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; margin-bottom: 20px; padding: 4px; border-radius: 12px; background: rgba(255, 255, 255, 0.08); }
.tabs button { padding: 9px 4px; border: 0; border-radius: 9px; background: none; color: rgba(255, 255, 255, 0.72); font: 700 0.9rem var(--font); cursor: pointer; }
.tabs button:hover { color: #fff; }
.tabs button[aria-selected=true] { background: var(--blue); color: #fff; }
.ptitle { margin: 0; font-weight: 800; font-size: 1.15rem; letter-spacing: -0.01em; }
.psub { margin: 2px 0 6px; font-size: 0.88rem; color: rgba(255, 255, 255, 0.7); }
.field { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; padding: 15px 0; }
.field:first-child { padding-top: 4px; }
.field + .field { border-top: 1px solid rgba(255, 255, 255, 0.1); }
.field label { font-weight: 500; font-size: 0.95rem; color: rgba(255, 255, 255, 0.85); }
.field .box, .field select { justify-self: end; max-width: 100%; }
.box { display: flex; align-items: center; gap: 4px; min-width: 0; padding: 0 12px; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 10px; background: rgba(255, 255, 255, 0.08); font-weight: 700; }
.box:focus-within { border-color: var(--tint); }
.box input { flex: 0 1 10ch; width: 10ch; min-width: 3ch; padding: 9px 0; border: 0; outline: 0; background: none; color: inherit; font: inherit; text-align: right; -moz-appearance: textfield; appearance: textfield; }
.box input::-webkit-outer-spin-button, .box input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.box span { color: rgba(255, 255, 255, 0.65); font-weight: 500; white-space: nowrap; }
select { padding: 10px 12px; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 10px; background: rgba(255, 255, 255, 0.08); color: #fff; font: 700 0.95rem var(--font); }
select option { background: #fff; color: var(--ink); }
.calc :focus-visible { outline-color: var(--tint); }
/* --f is how far along the slider is; calc.js keeps it up to date. */
.field input[type=range] { grid-column: 1 / -1; width: 100%; height: 22px; margin: 0; background: none; cursor: pointer; -webkit-appearance: none; appearance: none; }
.field input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--tint) var(--f, 0%), rgba(255, 255, 255, 0.16) var(--f, 0%)); }
.field input[type=range]::-moz-range-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--tint) var(--f, 0%), rgba(255, 255, 255, 0.16) var(--f, 0%)); }
.field input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -7px; border: 3px solid #fff; border-radius: 50%; background: var(--blue); }
.field input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border: 3px solid #fff; border-radius: 50%; background: var(--blue); }

.result { align-self: stretch; display: flex; flex-direction: column; justify-content: center; padding: 24px; border-radius: 14px; background: #fff; color: var(--ink); }
.result p { margin: 0; }
.result .label { color: var(--muted); font-weight: 500; font-size: 0.92rem; }
.result .big { font-weight: 800; font-size: clamp(2rem, 6vw, 2.9rem); line-height: 1.15; letter-spacing: -0.03em; color: var(--blue); overflow-wrap: anywhere; }
.breakdown { display: flex; align-items: center; gap: 22px; margin-top: 16px; }
.donut { flex: none; width: 100px; aspect-ratio: 1; border-radius: 50%; background: conic-gradient(var(--blue) calc(var(--p) * 1%), #CFE0FF 0); -webkit-mask: radial-gradient(circle, transparent 52%, #000 53%); mask: radial-gradient(circle, transparent 52%, #000 53%); }
dl { flex: 1; min-width: 0; margin: 0; font-size: 0.93rem; font-variant-numeric: tabular-nums; }
dl div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; }
dl div + div { border-top: 1px solid var(--line); }
dt { color: var(--muted); }
dd { margin: 0; font-weight: 700; text-align: right; }
.k0 dt::before, .k1 dt::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 8px; border-radius: 50%; background: #CFE0FF; }
.k1 dt::before { background: var(--blue); }

/* Formula and questions */
.formula { padding: 16px 18px; border-radius: 12px; background: var(--soft); font-weight: 700; overflow-x: auto; white-space: pre; }
details { margin-bottom: 12px; padding: 0 18px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 15px 0; font-weight: 700; cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.3rem; font-weight: 500; line-height: 1; color: var(--muted); }
details[open] summary::after { content: "−"; }
details p { color: var(--muted); }
.faqgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; align-items: start; }

/* Reference tables on calculator pages */
.tablewrap { margin-bottom: 8px; border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; font-variant-numeric: tabular-nums; }
th, td { padding: 11px 14px; text-align: right; white-space: nowrap; }
th:first-child { text-align: left; }
thead th { background: var(--soft); font-weight: 700; }
tbody th { font-weight: 700; }
tbody tr + tr > * { border-top: 1px solid var(--line); }

/* Home: category panels */
.head { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 32px; margin: 24px 0 28px; }
.head h2 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.4rem); }
.head > p { margin: 0; color: var(--muted); max-width: 44ch; }
.eyebrow { margin: 0 0 6px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.cat { margin-bottom: 24px; padding: 24px; border: 1px solid color-mix(in srgb, var(--c) 26%, #fff); border-radius: 22px; background: color-mix(in srgb, var(--c) 11%, #fff); }
.cathead { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.cathead p { margin: 0; color: #46515F; font-size: 0.95rem; }
.cathead h3 { font-size: 1.35rem; }
.round { flex: none; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: var(--c); color: #fff; box-shadow: 0 10px 20px -10px var(--c); }
.round svg { width: 28px; height: 28px; }

/* Calculator cards: a solid colour tile and a soft coloured shadow lift each card off whatever is behind it. */
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.grid a { display: flex; align-items: center; gap: 14px; height: 100%; padding: 16px; border: 1px solid color-mix(in srgb, var(--c) 30%, #fff); border-radius: 16px; background: color-mix(in srgb, var(--c) 6%, #fff); color: #46515F; font-size: 0.9rem; line-height: 1.45; text-decoration: none; box-shadow: 0 1px 2px rgba(15, 27, 45, 0.06), 0 14px 24px -18px color-mix(in srgb, var(--c) 75%, #0F1B2D); transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s; }
.cat .grid a { background: #fff; }
.grid a > span:nth-child(2) { flex: 1; min-width: 0; }
.grid b { display: block; margin-bottom: 2px; color: var(--ink); font-size: 1.02rem; font-weight: 800; letter-spacing: -0.01em; }
.tile { flex: none; display: grid; place-items: center; width: 50px; height: 50px; border-radius: 14px; background: var(--c); color: #fff; box-shadow: 0 8px 16px -8px var(--c); }
.grid a > svg { width: 30px; height: 30px; padding: 7px; border-radius: 50%; background: color-mix(in srgb, var(--c) 14%, #fff); color: color-mix(in srgb, var(--c) 80%, #000); }
.grid a:hover { transform: translateY(-2px); border-color: var(--c); box-shadow: 0 2px 4px rgba(15, 27, 45, 0.08), 0 20px 30px -18px color-mix(in srgb, var(--c) 90%, #0F1B2D); }
.grid a:hover > svg { background: var(--c); color: #fff; }
@media (prefers-reduced-motion: reduce) { .grid a { transition: none; } .grid a:hover { transform: none; } }

.notes { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 28px; padding: 30px 8px; border-radius: 20px; background: var(--soft); }
.notes div { position: relative; padding: 0 26px 0 76px; }
.notes div + div { border-left: 1px solid var(--line); }
.notes svg { position: absolute; left: 26px; top: 2px; width: 34px; height: 34px; color: var(--ink); }
.notes h3 { font-size: 1.02rem; }
.notes p { margin: 0; color: var(--muted); font-size: 0.9rem; }

/* Footer */
.bottom { margin-top: 80px; padding: 48px 0 40px; background: var(--soft); color: var(--muted); font-size: 0.9rem; }
.bottom .wrap { display: grid; grid-template-columns: 1.7fr 1fr 1.2fr 0.8fr; gap: 32px; }
.bottom .logo { margin-bottom: 14px; }
.bottom p { max-width: 34ch; }
.bottom h4 { margin: 0 0 12px; color: var(--ink); font-size: 0.92rem; }
.bottom ul { list-style: none; margin: 0; padding: 0; }
.bottom li { margin-bottom: 7px; }
.bottom li a { color: var(--muted); text-decoration: none; }
.bottom li a:hover { color: var(--blue); }

@media (max-width: 1100px) { .coin { display: none; } }
@media (max-width: 960px) {
  nav { display: none; }
  .hero { grid-template-columns: 1fr; gap: 36px; padding-top: 32px; padding-bottom: 40px; }
  .hero h1 { max-width: 14ch; }
  .head { grid-template-columns: 1fr; gap: 10px; }
  .notes { grid-template-columns: 1fr; padding: 8px 0; }
  .notes div { padding-top: 20px; padding-bottom: 20px; }
  .notes div + div { border-left: 0; border-top: 1px solid var(--line); }
  .bottom .wrap { grid-template-columns: 1fr 1fr; }
  .bottom .wrap > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .top .wrap { height: 60px; }
  .calc { padding: 16px; border-radius: 20px; }
  .panel { grid-template-columns: 1fr; gap: 18px; }
  .result { padding: 20px; }
  .perks { grid-template-columns: 1fr 1fr; gap: 22px 16px; }
  .cat { padding: 16px; border-radius: 18px; }
  .round { width: 48px; height: 48px; }
  .grid { grid-template-columns: 1fr; }
  .faqgrid { grid-template-columns: 1fr; }
  h2 { margin-top: 48px; }
}
@media (max-width: 420px) {
  .breakdown { flex-direction: column; align-items: stretch; }
  .donut { align-self: center; }
  .btn { padding: 9px 14px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Language menu in the header */
.top nav { margin: 0 auto; }
.lang { position: relative; flex: none; margin: 0 0 0 auto; padding: 0; border-radius: 10px; }
.lang summary { gap: 6px; padding: 8px 12px; font-size: 0.9rem; }
.lang summary::after, .lang[open] summary::after { content: "▾"; font-size: 0.8rem; }
.lang div { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; display: grid; grid-template-columns: 1fr 1fr; min-width: 250px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 16px 32px -16px rgba(15, 27, 45, 0.35); }
.lang a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--ink); font-weight: 500; text-decoration: none; }
.lang a:hover, .lang a[aria-current] { background: var(--soft); }
@media (max-width: 480px) { .top .btn { display: none; } }

/* Indian scripts need more line height than Latin, and no letter squeezing. */
html:not(:lang(en)) :is(h1, h2, h3, .big, .ptitle, .eyebrow) { line-height: 1.4; letter-spacing: 0; }
html:not(:lang(en)) .hero h1 { max-width: 16ch; font-size: clamp(2rem, 4.4vw, 3.1rem); }
/* The longer translated headline needs the space the coin graphic uses. */
html:not(:lang(en)) .coin { display: none; }

/* Search content on calculator pages: steps, direct answers, tips */
.steps, .tips { margin: 0 0 14px; padding-left: 22px; }
.steps li, .tips li { margin-bottom: 8px; padding-left: 4px; }
.steps li::marker { font-weight: 800; color: var(--blue); }
.answers { list-style: none; margin: 0 0 14px; padding: 0; }
.answers li { margin-bottom: 10px; padding: 12px 16px; border-left: 3px solid var(--blue); border-radius: 0 10px 10px 0; background: var(--soft); color: #46515F; }
.answers b { display: block; color: var(--ink); }
