
/* =========================================================================
   উত্তরাধিকার ক্যালকুলেটর — STYLE
   ========================================================================= */
:root {
  color-scheme: light;
  /* brand */
  --brand: #0e8a76;
  --brand-strong: #0a5f52;
  --brand-deep: #07483f;
  --brand-soft: #e9f6f2;
  --brand-softer: #f3faf8;
  --accent: #c9922e;
  --accent-soft: #fff7e8;
  --accent-ink: #8a5d12;
  --brand-text: #0a5f52;
  --app-link: #2e7d32;
  --on-brand: #ffffff;
  --on-accent: #ffffff;
  --danger: #b8392f;
  --danger-soft: #fdf0ee;
  --danger-ink: #6e302b;
  --warn-soft: #fff8e8;
  --warn-line: #f0dfb8;
  --warn-ink: #6f5217;
  /* surfaces */
  --bg: #f4f8f6;
  --bg-2: #eaf3f0;
  --surface: #ffffff;
  --surface-2: #fbfdfc;
  --surface-3: #f2f8f6;
  --line: #e0eae6;
  --line-strong: #cbdcd6;
  /* ink */
  --ink: #11221e;
  --ink-2: #2e4741;
  --muted: #5d716a;
  /* spacing */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 40px;
  /* radii */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 24px;
  --r-pill: 999px;
  /* elevation */
  --sh-1: 0 1px 2px rgba(11, 46, 39, .05);
  --sh-2: 0 1px 2px rgba(11, 46, 39, .04), 0 10px 24px -18px rgba(11, 55, 47, .30);
  --sh-3: 0 2px 6px rgba(11, 46, 39, .06), 0 18px 40px -26px rgba(11, 55, 47, .36);
  --sh-brand: 0 12px 26px -14px rgba(10, 95, 82, .55);
  /* layout */
  --shell: 1240px;
  --header-h: 72px;
  --glow-1: rgba(14, 138, 118, .10);
  --glow-2: rgba(201, 146, 46, .07);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --t-fast: 160ms var(--ease);
  --t-base: 220ms var(--ease);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --brand: #35c9a5;
  --brand-strong: #24b48f;
  --brand-deep: #b9efdd;
  --brand-soft: #14312a;
  --brand-softer: #112722;
  --accent: #e0ac48;
  --accent-soft: #3a2f16;
  --accent-ink: #f0cd8b;
  --brand-text: #74dcbb;
  --app-link: #7ee0a2;
  --on-brand: #04211c;
  --on-accent: #2a1e05;
  --danger: #f0857a;
  --danger-soft: #3a201d;
  --danger-ink: #f6bdb5;
  --warn-soft: #37301c;
  --warn-line: #55492a;
  --warn-ink: #f0dcae;
  /* নিরপেক্ষ ধূসর-কালো — আগে সবুজ ছায়া ছিল, তাই ডার্ক মোড সবুজ দেখাত */
  --bg: #0d1011;
  --bg-2: #090b0c;
  --surface: #15191a;
  --surface-2: #1b2021;
  --surface-3: #222829;
  --line: #2a3132;
  --line-strong: #3b4445;
  --ink: #eef2f1;
  --ink-2: #c8d1cf;
  --muted: #95a09e;
  --sh-1: 0 1px 2px rgba(0, 0, 0, .4);
  --sh-2: 0 1px 2px rgba(0, 0, 0, .35), 0 10px 24px -18px rgba(0, 0, 0, .7);
  --sh-3: 0 2px 6px rgba(0, 0, 0, .4), 0 18px 40px -26px rgba(0, 0, 0, .8);
  --sh-brand: 0 12px 26px -14px rgba(0, 0, 0, .7);
  --glow-1: rgba(53, 201, 165, .045);
  --glow-2: rgba(224, 172, 72, .028);
}
/* ============================== BASE ============================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  min-width: 320px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 5% -10%, var(--glow-1), transparent 60%),
    radial-gradient(800px 400px at 100% 0%, var(--glow-2), transparent 58%),
    linear-gradient(180deg, var(--surface) 0, var(--bg) 340px, var(--bg-2) 100%);
  background-attachment: fixed;
  font-family: 'Kalpurush', 'Hind Siliguri', 'Noto Sans Bengali', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}
h1, h2, h3, p, ul, figure {
  margin: 0;
}
ul {
  padding: 0;
  list-style: none;
}
button, input {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
svg {
  display: block;
}
small {
  font-size: .82em;
  font-weight: 500;
  color: var(--muted);
}
::selection {
  color: var(--on-brand);
  background: var(--brand-strong);
}
:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link {
  position: absolute;
  top: -60px;
  left: var(--s-4);
  z-index: 200;
  padding: var(--s-2) var(--s-4);
  color: var(--on-brand);
  background: var(--brand-strong);
  border-radius: var(--r-sm);
  text-decoration: none;
  transition: top var(--t-fast);
}
.skip-link:focus-visible {
  top: var(--s-3);
}
.shell {
  width: min(100% - 2 * var(--s-4), var(--shell));
  margin-inline: auto;
}
/* ============================== HEADER ============================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  /* হেডারের নিচের দাগ (আন্ডারলাইন) সরানো হলো — বদলে খুব নরম ছায়া */
  border-bottom: 0;
  box-shadow: 0 6px 18px -16px rgba(10, 40, 32, .45);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}
.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
}
.brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: var(--s-3);
}
.brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  color: var(--on-brand);
  border-radius: var(--r-md);
  background: linear-gradient(145deg, var(--brand), var(--brand-strong));
  box-shadow: var(--sh-brand);
}
.brand-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.brand-title {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--brand-deep);
  font-size: clamp(15px, 1.3vw, 18px);
  font-weight: 700;
  line-height: 1.25;
}
.brand-name {
  white-space: nowrap;
}
.brand-badge {
  padding: 1px 8px;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.6;
}
.brand-sub {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.desktop-nav {
  display: flex;
  align-items: center;
  gap: var(--s-1);
}
.nav-link {
  min-height: 40px;
  padding: var(--s-2) var(--s-4);
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: var(--r-pill);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color var(--t-fast), background var(--t-fast);
}
.nav-link:hover {
  color: var(--brand-text);
  background: var(--brand-soft);
}
.nav-link.is-active {
  color: var(--on-brand);
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
}
.nav-link-app {
  color: var(--app-link);
  font-weight: bold;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--s-2);
}
.icon-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: var(--brand-text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--sh-1);
  transition: background var(--t-fast), transform var(--t-fast);
}
.icon-btn:hover {
  background: var(--brand-soft);
}
.icon-btn:active {
  transform: scale(.96);
}
.icon-moon {
  display: none;
}
:root[data-theme="dark"] .icon-sun {
  display: none;
}
:root[data-theme="dark"] .icon-moon {
  display: block;
}
.ghost-btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-4);
  color: var(--brand-text);
  background: var(--brand-soft);
  border: 1px solid color-mix(in srgb, var(--brand) 18%, transparent);
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 600;
  transition: background var(--t-fast), transform var(--t-fast);
}
.ghost-btn:hover {
  background: color-mix(in srgb, var(--brand) 16%, var(--surface));
}
.ghost-btn:active {
  transform: scale(.98);
}
.menu-btn {
  display: none;
}
.mobile-nav {
  display: none;
  overflow: hidden;
  max-height: 0;
  border-top: 1px solid transparent;
  transition: max-height var(--t-base), border-color var(--t-base);
}
.mobile-nav.is-open {
  max-height: 380px;
  border-top-color: var(--line);
}
.mobile-nav-inner {
  display: grid;
  gap: var(--s-1);
  padding-block: var(--s-3) var(--s-4);
}
.mobile-nav-inner .nav-link {
  width: 100%;
  text-align: left;
  justify-content: flex-start;
  border-radius: var(--r-md);
}
.nav-link-reset {
  color: var(--danger);
}
.nav-link-reset:hover {
  color: var(--danger);
  background: var(--danger-soft);
}
/* ============================== HERO ============================== */
.hero {
  width: 100%;
  max-width: 780px;
  padding-block: clamp(var(--s-6), 4vw, 56px) clamp(var(--s-6), 3vw, var(--s-8));
  margin-inline: 0 auto;
  text-align: left;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 6px var(--s-3);
  color: var(--brand-text);
  background: var(--brand-soft);
  border: 1px solid color-mix(in srgb, var(--brand) 20%, transparent);
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 600;
}
.hero-title {
  margin-top: var(--s-4);
  color: var(--ink);
  font-size: clamp(28px, 4.4vw, 46px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -.01em;
  text-wrap: balance;
}
.hero-sub {
  margin-top: var(--s-3);
  max-width: 640px;
  color: var(--muted);
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.8;
}
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin-top: var(--s-5);
}
.stat-pill {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: var(--s-2) var(--s-4);
  color: var(--brand-text);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--sh-1);
  font-size: 14px;
  font-weight: 600;
}
.stat-pill-accent {
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 28%, transparent);
}
/* ============================== CARD ============================== */
.card {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-2);
}
.card.pad {
  padding: var(--s-5);
}
.card-title {
  margin-bottom: var(--s-4);
  color: var(--brand-deep);
  font-size: 17px;
  font-weight: 700;
}
.card-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  margin-bottom: var(--s-4);
}
.card-title-row .card-title {
  margin-bottom: 0;
}
.title-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}
.mini-btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: var(--s-2) var(--s-3);
  color: var(--brand-text);
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.mini-btn:hover {
  background: var(--brand-soft);
  border-color: var(--brand);
}
.mini-btn.is-armed {
  color: var(--on-brand);
  background: linear-gradient(135deg, var(--brand-strong), var(--brand));
  border-color: transparent;
}
/* ---------- deceased name + name column ---------- */
.deceased-row {
  display: grid;
  gap: 6px;
  margin-bottom: var(--s-4);
  padding: var(--s-3) var(--s-4);
  background: var(--brand-softer);
  border: 1px solid color-mix(in srgb, var(--brand) 22%, transparent);
  border-radius: var(--r-md);
}
.deceased-row label {
  color: var(--brand-text);
  font-size: 13px;
  font-weight: 600;
}
.text-input {
  width: 100%;
  min-height: 44px;
  padding: var(--s-2) var(--s-3);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  font-size: 15px;
}
.text-input:focus {
  outline: 0;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
}
.name-input {
  min-width: 130px;
  min-height: 38px;
  padding: 4px var(--s-2);
  font-size: 14px;
}
/* ---------- হিসাবের ধাপ ---------- */
.steps-head {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: 0;
  color: var(--brand-deep);
  background: transparent;
  border: 0;
  text-align: left;
  font-size: 17px;
  font-weight: 700;
}
.steps-head .section-chevron {
  transition: transform var(--t-base);
}
.steps-card.is-open .steps-head .section-chevron {
  transform: rotate(180deg);
  color: var(--brand);
}
.steps-body {
  display: none;
  gap: var(--s-3);
  margin-top: var(--s-2);
}
.steps-card.is-open .steps-body {
  display: grid;
}
.step-block {
  padding: var(--s-3) var(--s-4);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: var(--r-md);
}
.step-block.is-key {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
  border-left-color: var(--accent);
}
.step-title {
  margin-bottom: 6px;
  color: var(--brand-deep);
  font-size: 14.5px;
  font-weight: 700;
}
.step-block.is-key .step-title {
  color: var(--accent-ink);
}
.step-line {
  display: flex;
  justify-content: space-between;
  gap: var(--s-3);
  padding: 3px 0;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.6;
}
.step-line b {
  color: var(--brand-text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.step-line.is-total {
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px dashed var(--line-strong);
  font-weight: 700;
}
.step-note {
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.7;
}
/* ---------- শেয়ার ---------- */
.share-box {
  max-width: 780px;
  margin: var(--s-5) auto 0;
  padding: var(--s-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  text-align: center;
  box-shadow: var(--sh-1);
}
.share-title {
  margin-bottom: var(--s-3);
  color: var(--brand-deep);
  font-size: 15px;
  font-weight: 700;
}
.share-btns {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  justify-content: center;
}
.share-btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: var(--s-2) var(--s-4);
  color: #fff;
  background: #555;
  border: 0;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: transform var(--t-fast), filter var(--t-fast);
}
.share-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}
.share-btn:active {
  transform: translateY(0) scale(.98);
}
.share-fb { background: #0d5dc4; }
.share-wa { background: #0f7a45; }
.share-tw { background: #14171a; }
.share-tg { background: #17698f; }
.share-cp {
  color: var(--brand-text);
  background: var(--brand-soft);
  border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent);
}
/* ============================== CALCULATOR ============================== */
.calc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  align-items: start;
  gap: clamp(var(--s-5), 2.4vw, var(--s-8));
  padding-bottom: clamp(var(--s-8), 5vw, 64px);
}
.heirs-card {
  overflow: hidden;
}
.card-head {
  padding: var(--s-5) var(--s-5) var(--s-4);
  border-bottom: 1px solid var(--line);
}
.card-head h3 {
  color: var(--brand-deep);
  font-size: 17px;
  font-weight: 700;
}
.card-head p {
  margin-top: var(--s-1);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.tab {
  position: relative;
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: var(--s-3) var(--s-2);
  color: var(--muted);
  background: transparent;
  border: 0;
  font-size: 15px;
  font-weight: 600;
  transition: color var(--t-fast), background var(--t-fast);
}
.tab:hover {
  color: var(--brand-text);
  background: var(--brand-softer);
}
.tab.is-active {
  color: var(--brand-text);
  background: var(--surface);
  box-shadow: inset 0 -3px 0 var(--brand);
}
.tab-badge {
  min-width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  padding-inline: 6px;
  color: var(--on-brand);
  background: var(--brand);
  border-radius: var(--r-pill);
  font-size: 12px;
  line-height: 1;
}
.heirs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-3);
  padding: var(--s-5);
}
/* ---------- accordion sections (ট্যাবের পরিবর্তে) ---------- */
.heir-section {
  border-bottom: 1px solid var(--line);
}
.heir-section:last-child {
  border-bottom: 0;
}
.section-head {
  width: 100%;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-5);
  color: var(--brand-deep);
  background: var(--surface-2);
  border: 0;
  text-align: left;
  transition: background var(--t-fast);
}
.section-head:hover {
  background: var(--brand-softer);
}
.heir-section.is-open .section-head {
  background: var(--surface);
  box-shadow: inset 3px 0 0 var(--brand);
}
.section-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}
.section-hint {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.section-meta {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: var(--s-2);
}
.section-chevron {
  color: var(--muted);
  transition: transform var(--t-base);
}
.heir-section.is-open .section-chevron {
  transform: rotate(180deg);
  color: var(--brand);
}
.section-body {
  display: none;
}
.heir-section.is-open .section-body {
  display: grid;
}
.heir-row {
  min-width: 0;
  min-height: 68px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-2) var(--s-2) var(--s-4);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: background var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
}
.heir-row.is-sub-item {
  margin-left: 18px;
  background: var(--surface-3);
}
.heir-row:hover,
.heir-row:focus-within {
  background: var(--surface);
  border-color: var(--line-strong);
  box-shadow: var(--sh-1);
}
.heir-row.is-filled {
  background: var(--brand-softer);
  border-color: color-mix(in srgb, var(--brand) 32%, transparent);
}
.heir-name {
  min-width: 0;
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
}
.heir-branch {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.heir-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
}
.heir-info-btn {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  display: inline-grid;
  place-items: center;
  margin-left: 5px;
  padding: 0;
  color: var(--brand);
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--brand) 45%, transparent);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
  transition: color var(--t-fast), background var(--t-fast);
}
.heir-info-btn:hover,
.heir-info-btn[aria-expanded="true"] {
  color: var(--on-brand);
  background: var(--brand);
  border-color: var(--brand);
}
.heir-info-text {
  margin: 0 var(--s-2) 2px 0;
  padding: var(--s-2) var(--s-3);
  color: var(--brand-text);
  background: var(--brand-soft);
  border-left: 3px solid var(--brand);
  border-radius: var(--r-sm);
  font-size: 13px;
  line-height: 1.6;
}
/* ---------- stepper (heirs + assets) ---------- */
.stepper {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
}
.step-btn {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--brand);
  background: transparent;
  border: 0;
  border-radius: 50%;
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
  user-select: none;
  transition: color var(--t-fast), background var(--t-fast), transform 120ms var(--ease);
}
.step-btn:hover {
  color: var(--brand-text);
  background: var(--brand-soft);
}
.step-btn:active {
  transform: scale(.9);
}
.step-input {
  width: 56px;
  min-width: 0;
  height: 40px;
  padding: 0 var(--s-1);
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: var(--r-sm);
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.step-input:focus {
  outline: 0;
  background: var(--brand-soft);
}
/* ---------- assets ---------- */
.assets-card {
  overflow: hidden;
}
.assets-head {
  padding: var(--s-4) var(--s-5);
  color: var(--on-brand);
  background:
    radial-gradient(160px 90px at 92% 0%, rgba(255, 255, 255, .16), transparent 70%),
    linear-gradient(135deg, var(--brand), var(--brand-strong));
}
.assets-eyebrow {
  display: block;
  opacity: .82;
  font-size: 12px;
  font-weight: 600;
}
.assets-head h3 {
  font-size: 18px;
  font-weight: 700;
}
.assets-body {
  display: grid;
  gap: var(--s-3);
  padding: var(--s-4);
}
.asset-row {
  display: grid;
  grid-template-columns: minmax(88px, .8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: var(--s-3);
  min-height: 68px;
  padding: var(--s-2) var(--s-2) var(--s-2) var(--s-4);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: background var(--t-fast), border-color var(--t-fast);
}
.asset-row:hover,
.asset-row:focus-within {
  background: var(--surface);
  border-color: var(--line-strong);
}
.asset-row label {
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}
.asset-row .stepper {
  width: 100%;
  justify-content: space-between;
  border-radius: var(--r-md);
}
.asset-row .step-input {
  flex: 1 1 auto;
  width: auto;
  height: 42px;
  font-size: 18px;
}
/* ---------- ঋণ, দাফন খরচ ও ওসিয়ত ---------- */
.deduct-card .heir-section {
  border-bottom: 0;
}
.deduct-card .section-head {
  padding: var(--s-3) var(--s-4);
  min-height: 56px;
}
.deduct-card .section-title {
  font-size: 15px;
}
.deduct-hint {
  margin: 0 0 var(--s-1);
  padding: var(--s-3);
  color: var(--brand-text);
  background: var(--brand-softer);
  border-left: 3px solid var(--brand);
  border-radius: var(--r-sm);
  font-size: 12.5px;
  line-height: 1.65;
}
.deduct-body {
  /* display এখানে দেওয়া যাবে না — .section-body / .is-open নিয়ম দুটিকে অকার্যকর করে দেয় */
  gap: var(--s-3);
  padding: 0 var(--s-4) var(--s-4);
}
.deduct-note {
  padding: var(--s-3);
  border-radius: var(--r-sm);
  font-size: 12.5px;
  line-height: 1.65;
}
.deduct-note.is-warn {
  color: var(--warn-ink);
  background: var(--warn-soft);
  border: 1px solid var(--warn-line);
}
.deduct-note.is-ok {
  color: var(--brand-text);
  background: var(--brand-soft);
  border: 1px solid color-mix(in srgb, var(--brand) 24%, transparent);
}
.deduct-note.is-bad {
  color: var(--danger-ink);
  background: var(--danger-soft);
  border: 1px solid color-mix(in srgb, var(--danger) 26%, transparent);
}
/* ফলাফলে সম্পত্তির হিসাব */
.estate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--s-3);
}
.estate-item {
  padding: var(--s-3) var(--s-4);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.estate-item.is-minus {
  background: var(--danger-soft);
  border-color: color-mix(in srgb, var(--danger) 20%, transparent);
}
.estate-item.is-net {
  background: var(--brand-soft);
  border-color: color-mix(in srgb, var(--brand) 34%, transparent);
}
.estate-label {
  display: block;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}
.estate-value {
  display: block;
  margin-top: 2px;
  color: var(--brand-text);
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.estate-item.is-minus .estate-value { color: var(--danger-ink); }
.estate-item.is-net .estate-value { color: var(--brand-deep); }
.estate-foot {
  margin-top: var(--s-3);
  padding: var(--s-3) var(--s-4);
  color: var(--warn-ink);
  background: var(--warn-soft);
  border: 1px solid var(--warn-line);
  border-radius: var(--r-md);
  font-size: 13px;
  line-height: 1.7;
}
/* ---------- live stats ---------- */
.stats-card {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-4) var(--s-5);
}
.stat {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.stat-right {
  text-align: left;
}
.stat-label {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}
.stat-value {
  color: var(--brand-text);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.3;
}
.stat-divider {
  width: 1px;
  height: 38px;
  background: var(--line);
}
/* ---------- buttons ---------- */
.btn-primary,
.btn-secondary {
  min-height: 56px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: var(--s-3) var(--s-5);
  border-radius: var(--r-lg);
  font-size: 16px;
  font-weight: 700;
  transition: transform var(--t-fast), box-shadow var(--t-base), background var(--t-base);
}
.btn-primary {
  color: var(--on-brand);
  background: linear-gradient(135deg, var(--brand-strong), var(--brand));
  border: 0;
  box-shadow: var(--sh-brand);
}
.btn-primary:hover {
  transform: translateY(-1px);
}
.btn-primary:active {
  transform: translateY(0) scale(.99);
}
.btn-secondary {
  color: var(--brand-text);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  box-shadow: var(--sh-1);
}
.btn-secondary:hover {
  background: var(--brand-soft);
  transform: translateY(-1px);
}
.btn-icon {
  display: grid;
  place-items: center;
}
.btn-label,
.btn-text {
  line-height: 1.4;
}
.btn-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 720ms linear infinite;
}
.btn-primary.is-loading .btn-spinner {
  display: block;
}
.btn-primary.is-loading {
  pointer-events: none;
  opacity: .85;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.inline-msg {
  padding: var(--s-3) var(--s-4);
  color: var(--warn-ink);
  background: var(--warn-soft);
  border: 1px solid var(--warn-line);
  border-radius: var(--r-md);
  font-size: 14px;
  line-height: 1.6;
}
.side {
  position: sticky;
  top: calc(var(--header-h) + var(--s-5));
  display: grid;
  gap: var(--s-3);
}
.side-note {
  color: var(--muted);
  text-align: center;
  font-size: 12px;
  line-height: 1.6;
}
/* ============================== SNACKBAR TOAST ============================== */
.top-snackbar {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  z-index: 9999;
  min-width: 280px;
  max-width: 90vw;
  background: var(--surface);
  border: 1px solid var(--brand);
  box-shadow: var(--sh-3);
  border-radius: var(--r-md);
  padding: var(--s-3) var(--s-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  opacity: 0;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.top-snackbar.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.top-snackbar-text {
  color: var(--brand-text);
  font-size: 14px;
  font-weight: 600;
}
.top-snackbar-btn {
  background: transparent;
  border: 0;
  color: var(--brand-strong);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--r-sm);
}
.top-snackbar-btn:hover {
  background: var(--brand-soft);
}
/* ============================== RESULT ============================== */
.result {
  padding-bottom: clamp(var(--s-8), 6vw, 72px);
  scroll-margin-top: calc(var(--header-h) + var(--s-4));
}
.result-head {
  margin-bottom: var(--s-5);
  text-align: center;
}
.result-eyebrow {
  display: block;
  color: var(--brand);
  font-size: 13px;
  font-weight: 600;
}
.result-head h2 {
  color: var(--brand-deep);
  font-size: clamp(22px, 2.8vw, 30px);
  font-weight: 700;
  line-height: 1.35;
}
.grid-2,
.grid-table {
  display: grid;
  gap: var(--s-5);
  align-items: start;
  margin-bottom: var(--s-5);
}
.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid-table {
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, .8fr);
}
.grid-2.is-single {
  grid-template-columns: minmax(0, 1fr);
}
/* ---------- key/value lists ---------- */
.kv-list {
  display: grid;
}
.kv-list li {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: var(--s-2) 0;
  border-bottom: 1px solid var(--line);
}
.kv-list li:last-child {
  border-bottom: 0;
}
.kv-name {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: var(--s-2);
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 600;
}
.kv-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent);
}
.kv-value {
  flex: 0 0 auto;
  max-width: 56%;
  padding: var(--s-1) var(--s-3);
  color: var(--brand-text);
  background: var(--brand-soft);
  border-radius: var(--r-pill);
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.kv-empty {
  padding: var(--s-5) 0;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}
/* ---------- table ---------- */
.table-card {
  overflow: hidden;
}
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.dist-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
}
.dist-table th,
.dist-table td {
  padding: var(--s-2) var(--s-2);
  text-align: right;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
.dist-table th {
  color: var(--brand-text);
  background: var(--surface-3);
  font-weight: 700;
}
.dist-table th small {
  font-size: .66em;
  font-weight: 500;
  opacity: .85;
}
.dist-table td {
  color: var(--ink-2);
  background: var(--surface);
  font-variant-numeric: tabular-nums;
}
.dist-table th:first-child,
.dist-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 120px;
  text-align: left;
  white-space: nowrap;
  font-weight: 600;
  background: var(--surface);
}
.dist-table th:first-child {
  background: var(--surface-3);
}
.dist-table tbody tr:nth-child(even) td {
  background: var(--surface-2);
}
.dist-table tbody tr:nth-child(even) td:first-child {
  background: var(--surface-2);
}
.dist-table tbody tr:hover td {
  background: var(--brand-softer);
}
.cell-share {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.share-fraction {
  color: var(--brand-text);
  font-size: 15px;
  font-weight: 700;
}
.share-percent {
  color: var(--muted);
  font-size: 12px;
}
.dist-table tfoot td {
  background: var(--surface-3);
  border-bottom: 0;
  border-top: 2px solid var(--line-strong);
  color: var(--brand-deep);
  font-weight: 700;
  white-space: nowrap;
}
.dist-table tfoot td:first-child {
  background: var(--surface-3);
}
.table-warn {
  margin-top: var(--s-4);
  padding: var(--s-3) var(--s-4);
  color: var(--danger-ink);
  background: var(--danger-soft);
  border: 1px solid color-mix(in srgb, var(--danger) 26%, transparent);
  border-radius: var(--r-md);
  font-size: 13px;
  line-height: 1.7;
}
/* ---------- chart ---------- */
.chart-wrap {
  position: relative;
  width: min(100%, 300px);
  aspect-ratio: 1;
  margin-inline: auto;
}
.chart-wrap canvas {
  width: 100% !important;
  height: 100% !important;
}
.chart-card.is-fallback .chart-wrap {
  display: none;
}
.chart-fallback {
  margin-top: var(--s-2);
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  line-height: 1.6;
}
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-3);
  justify-content: center;
  margin-top: var(--s-4);
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  background: var(--surface-2);
  padding: 4px 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
}
.legend-dot {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 50%;
}
.legend-name {
  white-space: nowrap;
  color: var(--ink-2);
}
.legend-value {
  margin-left: 4px;
  font-weight: 700;
  color: var(--brand-text);
  font-variant-numeric: tabular-nums;
}
/* ---------- notes ---------- */
.note-list {
  display: grid;
  gap: var(--s-2);
}
.note {
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md);
  font-size: 14px;
  line-height: 1.75;
}
.note-rule {
  color: var(--ink-2);
  background: var(--brand-softer);
  border: 1px solid color-mix(in srgb, var(--brand) 16%, transparent);
}
.note-exclusion {
  color: var(--danger-ink);
  background: var(--danger-soft);
  border: 1px solid color-mix(in srgb, var(--danger) 20%, transparent);
}
.note-principle {
  color: var(--accent-ink);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  font-weight: 600;
}
.note b {
  font-weight: 700;
}
/* ---------- actions & disclaimer ---------- */
.result-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-3);
  margin-bottom: var(--s-5);
}
.btn-save {
  box-shadow: var(--sh-brand);
}
.disclaimer {
  max-width: 780px;
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  margin-inline: auto;
  padding: var(--s-4);
  color: var(--warn-ink);
  background: var(--warn-soft);
  border: 1px solid var(--warn-line);
  border-radius: var(--r-md);
  font-size: 13px;
  line-height: 1.8;
}
.disclaimer-icon {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  display: grid;
  place-items: center;
  color: var(--on-accent);
  background: var(--accent);
  border-radius: 50%;
  font-weight: 700;
  line-height: 1;
}
/* ============================== FOOTER ============================== */
.site-footer {
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}
.footer-inner {
  display: grid;
  gap: 2px;
  padding-block: var(--s-6);
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}
.footer-small {
  font-size: 12px;
  opacity: .85;
}
/* ============================== RESPONSIVE ============================== */
@media (max-width: 1180px) {
  :root {
    --shell: 1060px;
  }
  .calc-grid {
    grid-template-columns: minmax(0, 1fr) 340px;
  }
}
@media (max-width: 980px) {
  :root {
    --header-h: 66px;
  }
  .desktop-nav,
  .desktop-reset {
    display: none;
  }
  .menu-btn,
  .mobile-nav {
    display: block;
  }
  .calc-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .side {
    position: static;
  }
  .grid-table {
    grid-template-columns: minmax(0, 1fr);
  }
  .chart-card {
    width: min(100%, 520px);
    margin-inline: auto;
  }
}
@media (max-width: 720px) {
  body {
    font-size: 15px;
  }
  .brand-sub {
    display: none;
  }
  .heirs-grid {
    grid-template-columns: minmax(0, 1fr);
    padding: var(--s-4);
  }
  .tab {
    min-height: 54px;
    padding-inline: var(--s-1);
    font-size: 14px;
  }
  .grid-2,
  .result-actions {
    grid-template-columns: minmax(0, 1fr);
  }
  .kv-value {
    max-width: 52%;
  }
}
@media (max-width: 430px) {
  .shell {
    width: min(100% - 16px, var(--shell));
  }
  .section-head {
    padding-inline: var(--s-4);
  }
  .section-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }
  .brand-mark {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }
  .brand-title {
    font-size: 15px;
  }
  .brand-name {
    max-width: 47vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .icon-btn {
    width: 42px;
    height: 42px;
  }
  .card.pad {
    padding: var(--s-3);
  }
  .card-head,
  .assets-head {
    padding: var(--s-4);
  }
  .heir-row,
  .asset-row {
    padding-left: var(--s-3);
  }
  .asset-row {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-2);
  }
  .step-btn {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }
  .step-input {
    width: 48px;
  }
  .stats-card {
    padding: var(--s-4);
    gap: var(--s-3);
  }
  .stat-value {
    font-size: 19px;
  }
  .kv-value {
    max-width: 50%;
    font-size: 12px;
  }
}
@media (max-width: 360px) {
  .tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .tab {
    font-size: 13px;
  }
  .tab-badge {
    display: none;
  }
  .step-btn {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }
}
/* ============================== PRINT REPORT ============================== */
.brand-home {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: 0;
  background: transparent;
  border: 0;
  text-align: left;
  border-radius: var(--r-md);
  /* আলাদা পাতায় এটি <a> ট্যাগ হয়ে যায়, তাই ব্রাউজারের নিজের আন্ডারলাইন বন্ধ করা হলো */
  color: inherit;
  text-decoration: none;
}
.brand-home:hover,
.brand-home:focus,
.brand-home:active,
.brand-home:visited {
  color: inherit;
  text-decoration: none;
}
/* ============================== FOOTER LINKS ============================== */
.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  margin-top: 6px;
  font-size: 13px;
}
.footer-links a {
  color: var(--brand-text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .15s ease;
}
.footer-links a:hover,
.footer-links a:focus-visible {
  border-bottom-color: currentColor;
}
.footer-links span {
  opacity: .45;
}
#printReport {
  display: none;
}
/* রিপোর্টের রং প্রিন্টে সবসময় হালকা থিমেই থাকবে (ডার্ক মোডেও) */
.pr-wrap {
  color: #16261f;
  background: #fff;
  font-family: 'Kalpurush', 'Hind Siliguri', 'Noto Sans Bengali', sans-serif;
  font-size: 11.5px;
  line-height: 1.6;
}
.pr-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 3px solid #0a5f52;
}
.pr-head h1 {
  color: #0a5f52;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.01em;
}
.pr-head-right {
  text-align: right;
  font-size: 10.5px;
  line-height: 1.5;
  color: #4a5c56;
}
.pr-head-right b {
  display: block;
  color: #0e8a76;
  font-size: 11px;
}
.pr-title {
  margin: 16px 0 10px;
  color: #07483f;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
}
.pr-meta {
  margin-bottom: 10px;
  color: #55665f;
  text-align: center;
  font-size: 10.5px;
}
.pr-table {
  width: 100%;
  margin-top: 6px;
  border-collapse: collapse;
  border: 1.5px solid #0a5f52;
}
.pr-table th,
.pr-table td {
  padding: 5px 7px;
  border: 1px solid #b9d2cb;
  text-align: right;
  white-space: nowrap;
  font-size: 11px;
}
.pr-table th {
  color: #fff;
  background: #0a5f52;
  text-align: center;
  font-weight: 700;
}
.pr-table td.pr-c {
  text-align: center;
  white-space: normal;
}
.pr-table tbody tr:nth-child(even) td { background: #f4faf8; }
.pr-table tfoot td {
  background: #e9f6f2;
  color: #07483f;
  font-weight: 700;
}
.pr-sec {
  margin-top: 14px;
  padding-top: 8px;
  border-top: 1px dashed #9ec3ba;
}
.pr-sec h3 {
  margin-bottom: 6px;
  color: #0a5f52;
  font-size: 12.5px;
  font-weight: 700;
}
.pr-sec ol,
.pr-sec ul {
  margin: 0;
  padding-left: 16px;
  list-style: decimal;
}
.pr-sec ul { list-style: disc; }
.pr-sec li {
  margin-bottom: 3px;
  font-size: 11px;
  line-height: 1.6;
}
.pr-sec li b { color: #07483f; }
/* বঞ্চিত আত্মীয়ের তালিকা — ওয়েবপাতার মতো প্রিন্টেও লাল */
.pr-sec-excl {
  border-top-color: #e6b3ab;
}
.pr-sec-excl h3 { color: #a3352a; }
.pr-sec-excl li { color: #8c3227; }
.pr-sec-excl li b { color: #7a2f26; }
.pr-warn {
  margin-top: 14px;
  padding: 8px 10px;
  color: #7a2f26;
  background: #fdf0ee;
  border: 1px solid #e6b3ab;
  border-radius: 6px;
  font-size: 10.5px;
  line-height: 1.6;
}
.pr-estate {
  margin-top: 12px;
  border-collapse: collapse;
  width: 100%;
  border: 1px solid #b9d2cb;
}
.pr-estate td {
  padding: 4px 8px;
  border: 1px solid #d5e6e1;
  font-size: 11px;
}
.pr-estate td:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.pr-estate tr:last-child td {
  background: #e9f6f2;
  color: #07483f;
  font-weight: 700;
}
.pr-watermark {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-32deg);
  z-index: 5;
  color: #0a5f52;
  opacity: .07;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
  pointer-events: none;
}
.pr-foot {
  margin-top: 16px;
  padding-top: 8px;
  border-top: 1px solid #cfe0da;
  color: #6b7d76;
  text-align: center;
  font-size: 10px;
}
@media print {
  @page { size: A4 portrait; margin: 12mm 10mm; }
  html, body {
    background: #fff !important;
    overflow: visible !important;
  }
  body > *:not(#printReport) { display: none !important; }
  #printReport {
    display: block !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .pr-table { page-break-inside: auto; }
  .pr-table tr { page-break-inside: avoid; }
  .pr-sec, .pr-warn { page-break-inside: avoid; }
}
/* ============================== MOTION ============================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
    
/* =========================================================================
   ARTICLE / GUIDE — অতিরিক্ত স্টাইল
   ========================================================================= */
.article-wrap {
  width: min(100% - 2 * var(--s-4), 820px);
  margin-inline: auto;
  padding-block: var(--s-6) var(--s-10);
}
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: var(--s-4);
  color: var(--muted);
  font-size: 13px;
}
.breadcrumb a {
  color: var(--brand-text);
  text-decoration: none;
  font-weight: 600;
}
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span[aria-hidden] { opacity: .5; }
.article-title {
  color: var(--ink);
  font-size: clamp(25px, 4vw, 36px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -.01em;
  text-wrap: balance;
}
.article-meta {
  margin-top: var(--s-2);
  color: var(--muted);
  font-size: 13px;
}
.answer-box {
  margin: var(--s-5) 0;
  padding: var(--s-5);
  background: var(--brand-soft);
  border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent);
  border-left: 5px solid var(--brand);
  border-radius: var(--r-md);
}
.answer-box h2 {
  margin-bottom: var(--s-2);
  color: var(--brand-deep);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .02em;
}
.answer-box p {
  color: var(--ink-2);
  font-size: 16.5px;
  line-height: 1.85;
}
.answer-box a {
  color: var(--brand-text);
  font-weight: 600;
}
.article-body .bullets a {
  color: var(--brand-text);
  font-weight: 600;
}
.article-body h2 {
  margin: var(--s-8) 0 var(--s-3);
  color: var(--brand-deep);
  font-size: clamp(19px, 2.2vw, 23px);
  font-weight: 700;
  line-height: 1.45;
}
.article-body h3 {
  margin: var(--s-6) 0 var(--s-2);
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
}
.article-body p {
  margin-bottom: var(--s-4);
  color: var(--ink-2);
  font-size: 16.5px;
  line-height: 1.9;
}
.article-body b, .article-body strong { color: var(--ink); font-weight: 700; }
.article-body a { color: var(--brand-text); font-weight: 600; }
.bullets {
  display: grid;
  gap: var(--s-2);
  margin-bottom: var(--s-4);
  padding: 0;
  list-style: none;
}
.bullets li {
  position: relative;
  padding-left: 24px;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.85;
}
.bullets li::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
}
.callout {
  margin: var(--s-5) 0;
  padding: var(--s-4);
  border-radius: var(--r-md);
  font-size: 15.5px;
  line-height: 1.85;
}
.callout-warn {
  color: var(--warn-ink);
  background: var(--warn-soft);
  border: 1px solid var(--warn-line);
}
.callout-note {
  color: var(--ink-2);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
}
.callout b { font-weight: 700; }
/* অটো-হিসাব উদাহরণ */
.calc-example {
  margin: var(--s-5) 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
}
.ex-head {
  padding: var(--s-3) var(--s-4);
  color: var(--on-brand);
  background: linear-gradient(135deg, var(--brand-strong), var(--brand));
}
.ex-eyebrow {
  display: block;
  opacity: .85;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .04em;
}
.ex-head strong {
  display: block;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.5;
}
.ex-table-wrap { overflow-x: auto; }
.ex-table {
  width: 100%;
  min-width: 380px;
  border-collapse: collapse;
}
.ex-table th, .ex-table td {
  padding: var(--s-2) var(--s-3);
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  white-space: nowrap;
}
.ex-table th {
  color: var(--brand-text);
  background: var(--surface-3);
  font-weight: 700;
}
.ex-table th:first-child, .ex-table td:first-child {
  text-align: left;
  white-space: normal;
}
.ex-table th:not(:first-child), .ex-table td:not(:first-child) { text-align: right; }
.ex-table td {
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.ex-frac { color: var(--brand-text); font-weight: 700; }
.ex-table tbody tr.is-zero td { color: var(--muted); }
.ex-table tfoot td {
  background: var(--surface-3);
  color: var(--brand-deep);
  font-weight: 700;
  border-bottom: 0;
}
.ex-notes {
  display: grid;
  gap: 6px;
  padding: var(--s-3) var(--s-4);
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}
.ex-note {
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.7;
}
.ex-note b { color: var(--brand-text); }
.ex-note.is-out { color: var(--danger-ink); }
/* CTA */
.cta-box {
  margin: var(--s-8) 0 var(--s-6);
  padding: var(--s-6);
  text-align: center;
  background:
    radial-gradient(220px 120px at 90% 0%, rgba(255,255,255,.14), transparent 70%),
    linear-gradient(135deg, var(--brand-strong), var(--brand));
  border-radius: var(--r-xl);
  box-shadow: var(--sh-brand);
}
.cta-box h2 {
  margin: 0 0 var(--s-2);
  color: var(--on-brand);
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 700;
}
.cta-box p {
  margin: 0 auto var(--s-4);
  max-width: 480px;
  color: var(--on-brand);
  opacity: .92;
  font-size: 15px;
  line-height: 1.8;
}
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 52px;
  padding: var(--s-3) var(--s-6);
  color: var(--brand-strong);
  background: #fff;
  border-radius: var(--r-pill);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: transform var(--t-fast);
}
:root[data-theme="dark"] .cta-btn { color: #04211c; }
.cta-btn:hover { transform: translateY(-2px); }
/* FAQ */
.faq-item {
  margin-bottom: var(--s-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: var(--s-4);
  color: var(--brand-deep);
  background: transparent;
  border: 0;
  text-align: left;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
}
.faq-q:hover { background: var(--brand-softer); }
.faq-q .section-chevron { flex: 0 0 auto; transition: transform var(--t-base); }
.faq-item.is-open .faq-q .section-chevron { transform: rotate(180deg); color: var(--brand); }
.faq-a {
  display: none;
  padding: 0 var(--s-4) var(--s-4);
  color: var(--ink-2);
  font-size: 15.5px;
  line-height: 1.85;
}
.faq-item.is-open .faq-a { display: block; }
/* সম্পর্কিত লেখা */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--s-3);
}
.related-card {
  display: block;
  padding: var(--s-4);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  text-decoration: none;
  box-shadow: var(--sh-1);
  transition: transform var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
}
.related-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand);
  box-shadow: var(--sh-2);
}
.related-card strong {
  display: block;
  color: var(--brand-deep);
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.55;
}
.related-card span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}
/* গাইড তালিকা */
.guide-hero {
  padding-block: var(--s-8) var(--s-6);
  text-align: center;
}
.guide-hero h1 {
  color: var(--ink);
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 700;
  line-height: 1.35;
}
.guide-hero p {
  margin: var(--s-3) auto 0;
  max-width: 620px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.85;
}
.guide-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: var(--s-4);
  padding-bottom: var(--s-10);
}
.guide-card {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  padding: var(--s-5);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  text-decoration: none;
  box-shadow: var(--sh-1);
  transition: transform var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
}
.guide-card:hover {
  transform: translateY(-3px);
  border-color: var(--brand);
  box-shadow: var(--sh-2);
}
.guide-num {
  align-self: flex-start;
  padding: 2px 10px;
  color: var(--brand-text);
  background: var(--brand-soft);
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 700;
}
.guide-card h2 {
  color: var(--brand-deep);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.55;
}
.guide-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}
.guide-more {
  margin-top: auto;
  padding-top: var(--s-2);
  /* --brand (৪.২৭) সামান্য কম ছিল; --brand-text দিলে WCAG AA পূর্ণ হয় */
  color: var(--brand-text);
  font-size: 14px;
  font-weight: 700;
}
@media (max-width: 720px) {
  .article-body p, .answer-box p { font-size: 16px; }
  .cta-box { padding: var(--s-5) var(--s-4); }
}
@media print {
  .site-header, .site-footer, .cta-box, .related-grid, .breadcrumb, .share-box { display: none !important; }
  .faq-a { display: block !important; }
}
