/* TaxHisab public site. Values come from the design project (Home.dc.html); tokens live in tokens.css.
   No inline styles anywhere in the views: the Content-Security-Policy forbids them. */

/* ---------- Base ---------- */

* { box-sizing: border-box; }

html { overflow-x: clip; scroll-behavior: smooth; }
html.menu-open { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Scrollbars: thin, in the brand greens, on a transparent track. Firefox reads the two properties; WebKit
   browsers read the pseudo-elements. */
* { scrollbar-width: thin; scrollbar-color: var(--neutral-300) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--neutral-300); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background: var(--primary-600); background-clip: padding-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  /* Short pages: the content area takes the spare height, so the footer rests at the bottom of the window. */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}
main { flex: 1 0 auto; }

a { color: var(--text-link); text-decoration: none; }
a:hover { color: var(--text-link-hover); text-decoration: underline; }

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}

h1, h2, h3, p { margin: 0; }

[hidden] { display: none !important; }

.plain-list { margin: 0; padding: 0; list-style: none; }

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  background: var(--brand-primary);
  color: #fff;
  font-weight: 700;
}
.skip-link:focus { top: 12px; color: #fff; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Logo ---------- */

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--neutral-900);
}
.logo:hover { text-decoration: none; color: var(--neutral-900); }
.logo-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(145deg, var(--accent-500), var(--accent-700));
  box-shadow: 0 4px 10px -3px rgba(196, 42, 28, 0.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
/* The hand-drawn "T" overlaps the following "ax". */
.logo-t {
  display: inline-block;
  vertical-align: -0.05em;
  position: relative;
  z-index: 1;
  margin-right: -0.5em;
}
.logo-t svg { width: 1.05em; height: 0.78em; display: block; overflow: visible; }
.logo-hisab { color: var(--brand-primary); }

.logo-inverse, .logo-inverse:hover { color: #fff; font-size: 18px; }
.logo-inverse .logo-mark { width: 26px; height: 26px; border-radius: 8px; font-size: 13px; box-shadow: none; }
.logo-inverse .logo-hisab { color: var(--primary-300); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s;
}
.btn:hover { text-decoration: none; }
.btn-lg { height: 54px; padding: 0 28px; font-size: 16px; }

.btn-accent {
  height: 44px;
  padding: 0 22px;
  font-size: 15px;
  color: #fff;
  background: linear-gradient(155deg, var(--accent-500), var(--accent-700));
  box-shadow: 0 6px 16px -6px rgba(196, 42, 28, 0.5);
}
.btn-primary {
  color: #fff;
  background: linear-gradient(155deg, var(--primary-600), var(--primary-800));
  box-shadow: 0 10px 24px -10px rgba(15, 81, 50, 0.5);
}
.btn-accent:hover, .btn-primary:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -10px rgba(15, 81, 50, 0.45);
}
.btn-accent:active, .btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--color-surface);
  color: var(--brand-primary);
  border: 1.5px solid var(--color-border-strong);
}
.btn-secondary:hover { color: var(--brand-primary); border-color: var(--brand-primary); background: var(--brand-primary-subtle); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  padding: 0 20px;
  border-bottom: 1px solid transparent;
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.site-header.is-scrolled {
  border-bottom-color: var(--color-border);
  box-shadow: 0 4px 16px -8px rgba(15, 23, 21, 0.12);
}

.site-nav { display: none; gap: 32px; }
.site-nav a { font-size: 15px; font-weight: 600; color: var(--text-secondary); transition: color 0.15s; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--brand-primary); text-decoration: none; }

.site-header-cta { display: none; }

.icon-btn {
  display: flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  color: inherit;
}

@media (min-width: 900px) {
  .site-nav, .site-header-cta { display: flex; }
  .menu-open-btn { display: none; }
}

/* ---------- Mobile menu ---------- */

.mobile-menu { position: fixed; inset: 0; z-index: 50; display: flex; }
.mobile-menu-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13, 15, 15, 0.45);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.mobile-menu-panel {
  position: relative;
  margin-left: auto;
  width: 82%;
  max-width: 320px;
  height: 100%;
  overflow-y: auto;
  background: var(--color-surface);
  box-shadow: var(--shadow-xl);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mobile-menu-close { align-self: flex-end; color: var(--text-secondary); }
.mobile-menu-link {
  padding: 14px 4px;
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid var(--color-border);
}
.mobile-menu-cta { margin-top: 20px; height: 52px; font-size: 16px; }

/* ---------- Sections ---------- */

.section { padding: 40px 0; }
.section-first { padding: 56px 0 40px; }
.section-tight { padding: 8px 0 40px; }
.section-last { padding: 20px 0 56px; }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 24px;
}
.section-title-loose { margin-bottom: 32px; }
.section-title-close { margin-bottom: 8px; }
.section-intro { margin-bottom: 22px; color: var(--text-secondary); font-size: 14px; line-height: 1.55; }
.section-intro a { font-weight: 600; }

.more-link { display: inline-block; margin-top: 14px; font-weight: 700; font-size: 14px; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 22px; }
.step-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; }

/* Hover lift shared by cards */
.lift {
  transition: transform 0.22s var(--ease-standard), box-shadow 0.22s var(--ease-standard), border-color 0.22s;
}
.lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -16px rgba(15, 81, 50, 0.22), 0 4px 12px rgba(15, 81, 50, 0.08);
  border-color: var(--primary-300);
}
.lift-accent:hover {
  border-color: var(--accent-300);
  box-shadow: 0 20px 40px -16px rgba(196, 42, 28, 0.22), 0 4px 12px rgba(196, 42, 28, 0.08);
}
.lift-gold:hover {
  border-color: var(--gold-300);
  box-shadow: 0 20px 40px -16px rgba(168, 125, 29, 0.22), 0 4px 12px rgba(168, 125, 29, 0.08);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(40px, 7vw, 88px) 0 clamp(32px, 5vw, 64px);
  /* Shown on its own until the hero image is added, and behind it while it loads. */
  background: linear-gradient(120deg, var(--color-bg) 35%, var(--primary-50) 100%);
}
.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  z-index: 0;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(100deg, var(--color-bg) 0%, var(--color-bg) 22%, rgba(255, 255, 255, 0.85) 42%, rgba(255, 255, 255, 0.3) 62%, rgba(255, 255, 255, 0.05) 85%);
}
/* Narrow desktops and tablets: the text column covers more of the photo, so the fade reaches further right. */
@media (max-width: 1100px) {
  .hero-scrim {
    background: linear-gradient(100deg, var(--color-bg) 0%, var(--color-bg) 42%, rgba(255, 255, 255, 0.88) 60%, rgba(255, 255, 255, 0.4) 78%, rgba(255, 255, 255, 0.1) 95%);
  }
}
@media (max-width: 860px) {
  .hero-image { opacity: 0.18; }
  .hero-scrim { background: rgba(255, 255, 255, 0.4); }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 620px;
  display: grid;
  gap: 22px;
  justify-items: start;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 14px;
  border-radius: var(--radius-full);
  background: var(--color-surface);
  border: 1px solid var(--brand-primary-border);
  color: var(--brand-primary);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 2px 8px -2px rgba(15, 81, 50, 0.15);
}
.hero-pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary-500);
  animation: pulse-dot 1.8s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.85); }
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.25rem, 4.2vw, 3.1rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
}
.hero-title-accent {
  background: linear-gradient(120deg, var(--primary-600), var(--primary-800));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-lead { font-size: clamp(1rem, 1.6vw, 1.15rem); line-height: 1.65; color: var(--text-secondary); }

.hero-card {
  width: 100%;
  max-width: 480px;
  margin-top: 10px;
  padding: 26px;
  display: grid;
  gap: 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 48px -24px rgba(15, 23, 21, 0.25), 0 2px 8px rgba(15, 23, 21, 0.06);
}
.hero-card-label { font-size: 14px; font-weight: 700; color: var(--text-secondary); }

.money-input {
  display: flex;
  align-items: center;
  height: 52px;
  border: 1.5px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  background: var(--color-bg-subtle);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.money-input:focus-within { border-color: var(--brand-primary); box-shadow: 0 0 0 4px var(--brand-primary-subtle); }
.money-input-symbol { padding: 0 4px 0 16px; color: var(--text-secondary); font-weight: 700; font-size: 19px; }
.money-input input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0 16px 0 0;
  border: none;
  border-radius: 0;
  background: transparent;
  outline: none;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
  font-family: var(--font-body);
  font-size: 19px;
  font-weight: 600;
  color: var(--text-primary);
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-actions .btn { flex: 1; min-width: 180px; }

.hero-assurance { font-size: 12px; color: var(--text-tertiary); display: flex; align-items: center; gap: 6px; }

/* ---------- Calculator choice cards ---------- */

.choice-card {
  position: relative;
  overflow: hidden;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}
.choice-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-500), var(--primary-700));
}
.choice-card-accent { border-color: var(--accent-200); background: var(--accent-50); }
.choice-card-gold { border-color: var(--gold-200); background: var(--gold-50); }
.choice-card-accent::before, .choice-card-gold::before { content: none; }

.choice-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-primary-subtle);
  color: var(--brand-primary);
}
.choice-card-accent .choice-icon { background: var(--color-surface); color: var(--brand-accent); }
.choice-card-gold .choice-icon { background: var(--color-surface); color: var(--gold-700); }

.choice-badge {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: var(--radius-full);
  background: var(--brand-primary-subtle);
  color: var(--brand-primary);
  font-size: 12px;
  font-weight: 700;
}
.choice-card-accent .choice-badge { background: var(--color-surface); color: var(--accent-700); }
.choice-card-gold .choice-badge { background: var(--color-surface); color: var(--gold-700); }

.choice-title { font-weight: 700; font-size: 19px; font-family: var(--font-display); }
.choice-card-gold .choice-title { color: var(--gold-800); }
.choice-text { color: var(--text-secondary); font-size: 14px; line-height: 1.55; }
.choice-link { margin-top: 6px; font-weight: 700; font-size: 14px; color: var(--brand-primary); }
.choice-card-accent .choice-link { color: var(--accent-700); }
/* Make the whole card clickable while keeping one real link for assistive tech. */
.choice-link::after { content: ""; position: absolute; inset: 0; }

/* ---------- How it works ---------- */

.step { display: flex; flex-direction: column; gap: 10px; }
.step-number {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(155deg, var(--primary-600), var(--primary-800));
  box-shadow: 0 8px 18px -8px rgba(15, 81, 50, 0.5);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
}
.step-title { font-weight: 700; font-size: 17px; font-family: var(--font-display); }
.step-text { color: var(--text-secondary); font-size: 14px; line-height: 1.55; }

/* ---------- Trust band ---------- */

.trust-band {
  position: relative;
  overflow: hidden;
  padding: 40px 32px;
  border-radius: var(--radius-xl);
  background: linear-gradient(155deg, var(--neutral-900), var(--neutral-800));
}
.trust-band::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -60px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--primary-700), transparent 70%);
  opacity: 0.35;
}
.trust-band .section-title { position: relative; color: #fff; margin-bottom: 28px; }
.trust-grid { position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; }
.trust-item { display: flex; gap: 12px; align-items: flex-start; }
.trust-check {
  width: 26px;
  height: 26px;
  margin-top: 2px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(46, 143, 101, 0.25);
  color: var(--primary-300);
}
.trust-title { font-weight: 700; font-size: 15px; color: #fff; }
.trust-text { margin-top: 3px; color: var(--neutral-400); font-size: 14px; line-height: 1.5; }

/* ---------- Slab table ---------- */

.table-wrap {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  overflow-x: auto;
  box-shadow: 0 12px 32px -20px rgba(15, 23, 21, 0.2);
}
.slab-table { width: 100%; min-width: 420px; border-collapse: collapse; font-size: 14px; }
.slab-table thead tr { background: linear-gradient(180deg, var(--neutral-50), var(--color-bg-subtle)); }
.slab-table th {
  padding: 14px 18px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}
.slab-table tbody tr { border-top: 1px solid var(--color-border); }
.slab-table td { padding: 13px 18px; }
.slab-table .num { text-align: right; }
.slab-table td.num { font-weight: 700; color: var(--brand-primary); }

/* ---------- Guides ---------- */

.guide-card {
  position: relative;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}
.guide-title { font-weight: 700; font-size: 16px; font-family: var(--font-display); }
.guide-text { flex: 1; color: var(--text-secondary); font-size: 14px; line-height: 1.55; }
.guide-link { font-weight: 700; font-size: 14px; }
.guide-link::after { content: ""; position: absolute; inset: 0; }

/* ---------- FAQ (native <details>: works without JavaScript) ---------- */

.faq {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface);
}
.faq-item { border-bottom: 1px solid var(--color-border); }
.faq-item:last-child { border-bottom: none; }
.faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 18px 20px;
  cursor: pointer;
  list-style: none;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-chevron { flex-shrink: 0; color: var(--brand-primary); transition: transform 0.2s; }
.faq-item[open] .faq-chevron { transform: rotate(180deg); }
.faq-answer { padding: 0 20px 18px; font-size: 14px; line-height: 1.6; color: var(--text-secondary); }
.faq-answer p + p { margin-top: 10px; }

/* ---------- Disclaimer note ---------- */

.note {
  display: flex;
  gap: 10px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
}
.note-label { flex-shrink: 0; color: var(--text-tertiary); font-size: 13px; font-weight: 700; }
.note-text { font-size: 14px; line-height: 1.55; color: var(--text-secondary); }

/* ---------- Footer ---------- */

.site-footer {
  padding: 52px 0 24px;
  background: linear-gradient(180deg, var(--neutral-900), var(--neutral-950));
  color: var(--neutral-300);
}
.footer-grid { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.footer-about { margin-top: 10px; max-width: 260px; font-size: 14px; line-height: 1.6; color: var(--neutral-400); }
.footer-heading {
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
}
.footer-links { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.footer-links a { color: var(--neutral-300); }
.footer-links a:hover { color: #fff; }
.footer-muted { color: var(--neutral-500); }
.footer-contact { display: flex; flex-direction: column; gap: 6px; font-style: normal; font-size: 14px; line-height: 1.5; color: var(--neutral-400); }
.footer-contact a { color: var(--neutral-300); text-decoration: none; }
.footer-contact a:hover { color: #fff; }
.footer-heading-social { margin-top: 22px; }
.footer-social { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--neutral-300); text-decoration: none; }
.footer-social svg { flex-shrink: 0; color: #1877F2; }
.footer-social:hover { color: #fff; text-decoration: none; }
.footer-credit a { color: #fff; font-weight: 600; text-decoration: none; }
.footer-credit a:hover { text-decoration: underline; }
.footer-bottom {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--neutral-800);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  font-size: 13px;
  color: var(--neutral-500);
}
.footer-bottom a { color: var(--neutral-400); }
.footer-bottom a:hover { color: #fff; }

/* ---------- Error pages ---------- */

.error-page { padding: clamp(56px, 10vw, 120px) 0; display: grid; gap: 16px; justify-items: start; max-width: 560px; }
.error-code { font-family: var(--font-display); font-weight: 700; font-size: 14px; letter-spacing: 0.08em; color: var(--brand-primary); }
.error-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.75rem, 4vw, 2.5rem); line-height: 1.15; letter-spacing: -0.02em; }
.error-text { color: var(--text-secondary); line-height: 1.65; }
.error-ref { font-family: var(--font-mono); font-size: 13px; color: var(--text-tertiary); }
.error-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }

/* =====================================================================
   Calculators (Quick / Detailed) and result. Source: Quick Calculator.dc.html
   ===================================================================== */

.container-narrow { max-width: 672px; padding: 0 16px; }
.calc-page { padding-bottom: 40px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.breadcrumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding-top: 20px; font-size: 14px; }
.breadcrumbs a { color: var(--text-secondary); }
.breadcrumbs span[aria-hidden] { color: var(--text-tertiary); }
.breadcrumbs [aria-current] { color: var(--text-primary); font-weight: 600; }

.page-title {
  margin: 16px 0 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  line-height: 1.15;
}
.page-lead { margin-bottom: 24px; font-size: 15px; line-height: 1.6; color: var(--text-secondary); }

/* Buttons used here */
.btn-md { height: 48px; padding: 0 20px; font-size: 15px; }
.site-header-cta .btn-md { height: 44px; }
.btn-sm { height: 40px; padding: 0 16px; font-size: 14px; }
.btn-block { display: flex; width: 100%; }
.btn[disabled] { opacity: 0.75; cursor: progress; transform: none; }

/* Quick calculator: the form and, beside it on wide screens, the Smart Suggestions card. */
.quick-page .page-lead { max-width: 720px; }
.quick-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.quick-side { display: flex; flex-direction: column; }
.quick-main { max-width: 672px; min-width: 0; }
.quick-side { max-width: 672px; }
@media (min-width: 1024px) {
  .quick-grid { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 32px; }
  .quick-main, .quick-side { max-width: none; }
  .quick-side { position: sticky; top: 92px; margin-top: 20px; }
}

/* Fields */
.calc-form { display: flex; flex-direction: column; gap: 20px; margin-top: 20px; }
.calc-fields { display: flex; flex-direction: column; gap: 18px; }
.calc-form .section-card { padding: 22px 22px 24px; }
.calc-form .section-head { margin: -22px -22px 20px; padding: 16px 22px; }
.calc-form .fold-list { margin-top: 2px; }
.calc-fields[inert] { opacity: 0.6; }

.field { margin: 0; padding: 0; border: none; min-width: 0; }
.field-label { display: block; margin-bottom: 6px; padding: 0; font-size: 14px; font-weight: 700; }
.field-label-row { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.field-label-row .field-label { margin-bottom: 0; }
.field-sublabel { font-size: 13px; color: var(--text-secondary); }
.required { color: var(--error-600); }
.field-hint { margin-top: 6px; font-size: 13px; color: var(--text-tertiary); }
.field-error { margin-top: 6px; font-size: 13px; color: var(--error-600); }

.select-row { display: flex; gap: 10px; }
.select, .text-input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text-primary);
}
.select:focus-visible, .text-input:focus-visible { border-color: var(--brand-primary); box-shadow: 0 0 0 4px var(--brand-primary-subtle); border-radius: var(--radius-md); }

.money-input-lg { height: 56px; background: var(--color-surface); }
.money-input-lg input { font-size: 21px; font-weight: 700; }
.money-input-md { height: 48px; border-width: 1px; background: var(--color-surface); }
.money-input-md .money-input-symbol { padding-left: 14px; font-size: 16px; }
.money-input-md input { font-size: 16px; font-weight: 400; padding-right: 14px; }
/* A count has no Taka sign in front of it, so the input supplies the left spacing itself. */
.money-input input:first-child { padding-left: 16px; }
.money-input-md input:first-child { padding-left: 14px; }
/* A field with a value shows it, like a chosen radio card, so the filled-in parts of a long form stand out. */
.money-input.is-filled, .text-input.is-filled, .select.is-filled { border-color: var(--brand-primary); background: var(--brand-primary-subtle); }
.money-input.is-filled input { background: transparent; }
.money-input.is-invalid { border-color: var(--error-500); }
.money-input.is-invalid:focus-within { border-color: var(--error-500); box-shadow: var(--focus-ring-error); }

/* Radio cards */
.radio-cards { display: grid; gap: 10px; }
/* Taxpayer category: two options per row where there is room; one per row on phones. */
@media (min-width: 640px) {
  [data-input="taxpayerCategory"] .radio-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.radio-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 44px;
  padding: 16px;
  border: 1.5px solid var(--color-border-strong);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.radio-card:hover { border-color: var(--primary-400); }
.radio-card:has(input:checked) { border-color: var(--brand-primary); background: var(--brand-primary-subtle); }
.radio-card:has(input:focus-visible) { box-shadow: var(--focus-ring); }
.radio-card input { position: absolute; opacity: 0; pointer-events: none; }
.radio-dot {
  position: relative;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  border: 1.5px solid var(--color-border-strong);
  border-radius: 50%;
}
.radio-card:has(input:checked) .radio-dot { border-color: var(--brand-primary); }
.radio-card:has(input:checked) .radio-dot::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--brand-primary);
}
.radio-title { display: block; font-weight: 700; font-size: 15px; }
.radio-text { display: block; margin-top: 2px; font-size: 13px; color: var(--text-secondary); }

.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; font-weight: 600; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--brand-primary); }

/* Optional fields: native <details> */
.disclosure summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  cursor: pointer;
  list-style: none;
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-primary);
}
.disclosure summary::-webkit-details-marker { display: none; }
.disclosure-chevron { flex-shrink: 0; transition: transform 0.2s; }
.disclosure[open] .disclosure-chevron { transform: rotate(180deg); }
.disclosure-body { margin-top: 4px; }

/* "What is this?" */
.tip { position: relative; display: inline-flex; }
.tip-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: -12px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}
.tip-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: 1px solid var(--color-border-strong);
  border-radius: 50%;
  background: var(--color-bg-subtle);
}
.tip-bubble {
  position: absolute;
  bottom: 135%;
  left: 50%;
  z-index: 10;
  width: 240px;
  max-width: 70vw;
  padding: 10px 12px;
  transform: translateX(-50%);
  border-radius: var(--radius-md);
  background: var(--neutral-900);
  box-shadow: var(--shadow-lg);
  color: #fff;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
}

/* Alerts */
.alert { display: flex; gap: 10px; padding: 16px; border: 1px solid; border-radius: var(--radius-lg); }
.alert-error { background: var(--state-error-bg); border-color: var(--state-error-border); }
.alert-warning { background: var(--state-warning-bg); border-color: var(--state-warning-border); }
.alert-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #fff;
}
.alert-error .alert-icon { background: var(--state-error-text); }
.alert-warning .alert-icon { background: var(--state-warning-text); }
.alert-title { font-family: var(--font-body); font-size: 15px; font-weight: 700; }
.alert-error .alert-title { color: var(--state-error-text); }
.alert-warning .alert-title { color: var(--state-warning-text); }
.alert-text { margin-top: 4px; font-size: 14px; line-height: 1.5; color: var(--text-secondary); }
.alert .btn { margin-top: 10px; }
.alert-compact { padding: 12px 14px; border-radius: var(--radius-md); }
.alert-compact .alert-text { margin: 0; font-size: 13px; color: var(--state-error-text); }
.ref { font-family: var(--font-mono); font-size: 0.95em; }

/* Loading */
.skeleton { display: flex; flex-direction: column; gap: 10px; padding-top: 8px; }
.skeleton-line {
  height: 16px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--neutral-100) 25%, var(--neutral-200) 37%, var(--neutral-100) 63%);
  background-size: 400px 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}
.skeleton-line-short { width: 60%; }
@keyframes shimmer { 0% { background-position: -200px 0; } 100% { background-position: 200px 0; } }

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  border: 2px solid #fff;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.assurance { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-tertiary); }
.assurance svg { flex-shrink: 0; }

.sticky-bar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin-top: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}

/* Result */
.result-stack { display: flex; flex-direction: column; gap: 20px; margin-top: 20px; }
/* A result with a comparison: two columns on wide screens, the comparison beside the assessment and staying in view. */
.result-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.result-layout.has-compare .result-stack { max-width: none; }
.result-side { display: flex; flex-direction: column; gap: 20px; margin-top: 20px; }
.result-side .smart-card { padding: 22px 24px 18px; }
@media (min-width: 1024px) {
  .result-layout.has-compare { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; }
  .result-side { position: sticky; top: 92px; }
}
@media (max-width: 1023px) {
  .result-layout.has-compare { max-width: 672px; margin: 0 auto; }
}
.result-card {
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  box-shadow: 0 24px 48px -24px rgba(15, 23, 21, 0.28), 0 2px 8px rgba(15, 23, 21, 0.06);
}
.result-hero {
  position: relative;
  overflow: hidden;
  padding: 32px 24px;
  text-align: center;
  background: linear-gradient(160deg, var(--primary-50), var(--brand-primary-subtle));
}
.result-hero::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -40px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--primary-200), transparent 70%);
  opacity: 0.6;
}
.result-overline { position: relative; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--brand-primary); }
.result-amount {
  position: relative;
  margin-top: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.25rem, 6vw, 2.75rem);
  letter-spacing: -0.02em;
  color: var(--brand-primary);
}
.result-pills { position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.pill {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: var(--radius-full);
  background: var(--color-surface);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}
.pill-primary { color: var(--brand-primary); }

.result-rows { margin: 0; padding: 20px 24px 0; }
.result-row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; font-size: 14px; }
.result-row dt { margin: 0; }
.result-row dd { margin: 0; font-weight: 700; text-align: right; }
.result-row-info { padding: 10px 8px; border-radius: var(--radius-sm); background: var(--state-info-bg); color: var(--info-700); }
.result-row-total { align-items: baseline; margin-top: 4px; padding: 14px 0; border-top: 1.5px solid var(--color-border-strong); }
.result-row-total dt { font-size: 17px; font-weight: 700; }
.result-row-total dd { font-size: 22px; color: var(--brand-primary); }
.result-note {
  margin: 4px 24px 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--color-bg-subtle);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
}
.result-actions { display: flex; flex-direction: column; gap: 10px; padding: 20px 24px 24px; }
.result-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
/* The PDF form is one cell: its human-check widget (usually invisible) sits above its button, never in a cell of its own. */
.result-buttons form { display: flex; flex-direction: column; gap: 0; min-width: 0; align-items: stretch; }
.result-buttons form .btn { width: 100%; }
/* The widget comes after the button in the flow, so the button lines up with its neighbour whatever Cloudflare draws. */
.result-buttons form .human-check { order: 2; }
.result-buttons form .human-check:not(:empty) { margin-top: 10px; }
.result-buttons form .human-check .human-check-widget:empty { display: none; }
@media (max-width: 480px) { .result-buttons { grid-template-columns: 1fr; } }

/* Dialogs: a native <dialog>, styled as a card. Without JS the "#email-dialog" link shows it via :target. */
.dialog { width: min(480px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); color: var(--text-primary); box-shadow: var(--shadow-lg); }
.dialog::backdrop { background: rgba(13, 15, 15, 0.45); }
.dialog:not([open]):target { display: block; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 50; }
.dialog-body { padding: 24px; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.dialog-title { margin: 0; font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--text-primary); }
.dialog-close { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; font-size: 24px; line-height: 1; color: var(--text-tertiary); text-decoration: none; }
.dialog-close:hover { background: var(--color-bg-muted); color: var(--text-primary); }
.dialog-text { margin: 0 0 16px; font-size: 14px; line-height: 1.55; color: var(--text-secondary); }
.dialog .text-input { width: 100%; }
.dialog-consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; font-size: 13px; line-height: 1.5; color: var(--text-secondary); cursor: pointer; }
.dialog-consent input { margin-top: 3px; flex-shrink: 0; width: 16px; height: 16px; accent-color: var(--brand-primary); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.dialog-actions-center { justify-content: center; }
.dialog-success .dialog-body { text-align: center; }
.dialog-icon { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; margin-bottom: 12px; border-radius: 50%; background: var(--state-success-bg); color: var(--state-success-text); font-size: 28px; font-weight: 700; }
.alert-success { background: var(--state-success-bg); border-color: var(--state-success-border); }
.alert-success .alert-text { color: var(--state-success-text); }
.result-more { margin-top: 4px; text-align: center; font-size: 14px; font-weight: 700; }
.result-id { margin-top: 4px; text-align: center; font-size: 12px; color: var(--text-tertiary); }

/* =====================================================================
   Detailed calculator. Source: Detailed Calculator.dc.html
   ===================================================================== */

.detailed-grid { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: start; }
@media (min-width: 901px) {
  .detailed-grid { grid-template-columns: 1.55fr 1fr; }
}
.detailed-main, .detailed-form, .detailed-sections { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.detailed-sections[inert] { opacity: 0.6; }

.section-card {
  padding: 24px 26px 26px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-md);
  scroll-margin-top: 88px;
}
.section-card-year { padding: 16px 20px; box-shadow: none; }
.section-card-review { border-color: var(--brand-primary-border); }
.section-head { display: flex; align-items: center; gap: 14px; margin: -24px -26px 20px; padding: 18px 26px; border-bottom: 1px solid var(--color-border); border-radius: var(--radius-lg) var(--radius-lg) 0 0; background: linear-gradient(180deg, var(--color-bg-subtle), var(--color-surface)); }
.section-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--brand-primary-subtle);
  color: var(--brand-primary);
}
.section-head-text { flex: 1; min-width: 0; }
.section-step { display: block; margin-bottom: 2px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-tertiary); }
.section-name { font-family: var(--font-display); font-size: 19px; font-weight: 700; line-height: 1.2; }
.section-status {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--radius-full);
  background: var(--color-bg-muted);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.section-status.is-done { background: var(--success-50); color: var(--success-700); }
.section-status.is-done::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--success-500); }
.section-intro-text { margin: -6px 0 16px; font-size: 14px; line-height: 1.55; color: var(--text-secondary); }
.section-fields { display: grid; gap: 16px; }

.field-row-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.field-row-head .field-label { margin-bottom: 0; }
.field-per { font-size: 12px; color: var(--text-tertiary); }

/* Human check (Cloudflare Turnstile). Invisible unless Cloudflare needs the visitor to do something. */
.human-check { display: grid; gap: 6px; }
.human-check:empty { display: none; }
.human-check-widget:empty { display: none; }
.human-check-hint { margin: 0; font-size: 13px; color: var(--text-tertiary); }
.human-check-hint[hidden] { display: none; }
.result-buttons form .human-check:empty { display: none; }
.dialog .human-check { margin-top: 14px; }

/* Folded fields: one hairline row each until opened; the amount shows on the row once entered. A run of them
   shares one bordered list, so they read as "what might apply to you" rather than a stack of boxes. */
.fold-list { border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); overflow: hidden; }
.field-fold + .field-fold { border-top: 1px solid var(--color-border); }
.fold-summary { display: flex; align-items: center; gap: 12px; padding: 12px 16px; cursor: pointer; list-style: none; color: var(--text-primary); }
.fold-summary::-webkit-details-marker { display: none; }
.fold-summary:hover { background: var(--color-bg-subtle); }
.fold-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.fold-title { font-size: 14px; font-weight: 700; line-height: 1.3; }
.fold-desc { font-size: 12px; line-height: 1.4; color: var(--text-tertiary); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; line-clamp: 1; -webkit-box-orient: vertical; }
.fold-value { flex-shrink: 0; display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: var(--radius-full); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.field-fold:not(.is-filled) .fold-value { border: 1px dashed var(--color-border-strong); color: var(--brand-primary); }
.field-fold.is-filled .fold-value { background: var(--success-50); color: var(--success-700); }
.field-fold.is-filled .fold-title::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 8px; border-radius: 50%; background: var(--success-500); vertical-align: middle; }
.fold-chevron { flex-shrink: 0; color: var(--text-tertiary); transition: transform 0.2s; }
.field-fold[open] .fold-chevron { transform: rotate(180deg); }
.field-fold[open] .fold-summary { background: var(--color-bg-subtle); }
.fold-body { display: grid; gap: 14px; padding: 16px 16px 18px; border-top: 1px dashed var(--color-border); }
.fold-body .income-group { padding: 0; border: 0; background: transparent; }
.fold-body .income-label, .fold-body .field-label { font-size: 14px; }

/* Income sources */
.income-group {
  padding: 16px 18px 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}
.section-fields > .income-group { border-left: 3px solid var(--brand-primary); }
.income-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.income-label { font-size: 15px; font-weight: 700; }
.income-subtotal { flex-shrink: 0; font-size: 13px; font-weight: 600; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.income-per { font-weight: 400; color: var(--text-tertiary); }
.income-hint { margin: -6px 0 12px; }
.income-rows { display: grid; gap: 10px; }
.income-rows:not(:empty) { margin-bottom: 10px; }
/* Rows that take the year past 12 months: flagged, with a warning below, but never refused. */
.income-row.is-over .months-select { border-color: var(--error-500); background: var(--error-50); color: var(--error-600); }
.field-warning { margin: -4px 0 10px; font-size: 13px; color: var(--error-600); }
.field-warning[hidden] { display: none; }
.income-row { display: flex; gap: 8px; align-items: center; }
.income-row .text-input { flex: 1.2; min-width: 0; height: 44px; font-size: 14px; }
.income-row .money-input { flex: 1; min-width: 0; height: 44px; }
.income-group.is-itemized [data-income-entry] { display: none; }
/* So much per month, for so many months (or once): the amount box and the months beside it. */
.income-entry { display: flex; gap: 8px; align-items: center; }
.income-entry .money-input { flex: 1; min-width: 0; }
.months-select { flex: 0 0 auto; width: 150px; height: 48px; padding: 0 12px; font-size: 15px; }
.income-group-lg .months-select { height: 56px; }
.income-row .months-select { width: 132px; height: 44px; font-size: 14px; }
@media (max-width: 480px) {
  .income-row { flex-wrap: wrap; }
  .income-row .text-input { flex: 1 1 100%; }
  .income-row .months-select { width: 118px; }
  .months-select { width: 126px; }
}
.row-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-tertiary);
  cursor: pointer;
}
.row-remove:hover { color: var(--error-600); background: var(--error-50); }
.add-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  margin-top: 12px;
  padding: 0 14px;
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--brand-primary);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.add-row:hover { border-color: var(--brand-primary); }

/* Review */
.review-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--color-border); }
.review-text { min-width: 0; }
.review-label { font-size: 14px; font-weight: 600; }
.review-detail { margin-top: 2px; font-size: 13px; color: var(--text-secondary); }
.review-edit { flex-shrink: 0; min-height: 44px; display: inline-flex; align-items: center; font-size: 13px; font-weight: 700; }
.review-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }

/* Step rail (large screens): every step in a row, ticked as answered, the one in view highlighted. */
.step-rail { display: none; }
@media (min-width: 901px) {
  /* Sticks under the site header, so any step is one click away wherever the visitor is in the form. */
  .step-rail { position: sticky; top: 76px; z-index: 20; display: flex; gap: 4px; margin: 0; padding: 6px; list-style: none; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: rgba(255, 255, 255, 0.96); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: var(--shadow-md); }
  .detailed-main .section-card { scroll-margin-top: 152px; } /* header + rail */
  .step-rail-item { flex: 1; min-width: 0; }
  .step-rail-link { display: flex; align-items: center; gap: 9px; min-height: 52px; padding: 6px 10px; border-radius: var(--radius-md); color: var(--text-secondary); text-decoration: none; transition: background 0.15s; }
  .step-rail-link:hover { background: var(--color-bg-subtle); }
  .step-rail-num { position: relative; display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 26px; height: 26px; border: 2px solid var(--color-border-strong); border-radius: 50%; font-size: 13px; font-weight: 700; color: var(--text-secondary); }
  .step-rail-tick { display: none; }
  .step-rail-title { min-width: 0; font-size: 12.5px; font-weight: 700; line-height: 1.25; color: var(--text-primary); display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .step-rail-item.is-done .step-rail-num { border-color: var(--success-500); background: var(--success-500); color: #fff; }
  .step-rail-item.is-done .step-rail-digit { display: none; }
  .step-rail-item.is-done .step-rail-tick { display: block; }
  .step-rail-item.is-current .step-rail-link { background: var(--brand-primary-subtle); }
  .step-rail-item.is-current .step-rail-num { border-color: var(--brand-primary); color: var(--brand-primary); }
  .step-rail-item.is-current.is-done .step-rail-num { background: var(--brand-primary); border-color: var(--brand-primary); color: #fff; }

  /* Stuck under the header: the rail turns brand green, so it reads as the page's fixed navigation. */
  .step-rail { transition: background 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease; }
  .step-rail-link, .step-rail-num, .step-rail-title { transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease; }
  .step-rail.is-stuck { border-color: transparent; background: linear-gradient(120deg, var(--primary-800), var(--primary-600) 60%, var(--primary-500)); box-shadow: 0 12px 28px -12px rgba(15, 81, 50, 0.45), var(--shadow-md); }
  .step-rail.is-stuck .step-rail-title { color: #fff; }
  .step-rail.is-stuck .step-rail-num { border-color: rgba(255, 255, 255, 0.5); color: #fff; }
  .step-rail.is-stuck .step-rail-link:hover { background: rgba(255, 255, 255, 0.12); }
  .step-rail.is-stuck .step-rail-item.is-done .step-rail-num { background: #fff; border-color: #fff; color: var(--primary-700); }
  .step-rail.is-stuck .step-rail-item.is-current .step-rail-link { background: rgba(255, 255, 255, 0.18); }
  .step-rail.is-stuck .step-rail-item.is-current .step-rail-num { border-color: #fff; color: #fff; }
  .step-rail.is-stuck .step-rail-item.is-current.is-done .step-rail-num { background: #fff; color: var(--primary-700); }
}

/* With a margin beside the form, the stuck rail leaves the column and stands to the left of it, vertical, so
   nothing covers the form. Numbers only where the margin is narrow (the name shows on hover); names too where
   it is wide. */
@media (min-width: 1300px) {
  .step-rail.is-stuck {
    position: fixed;
    top: 92px;
    left: max(8px, calc((100vw - var(--container-max)) / 2 - 60px));
    flex-direction: column;
    gap: 2px;
    width: 52px;
    padding: 6px;
    border-radius: 16px;
  }
  .step-rail.is-stuck .step-rail-item { flex: 0 0 auto; }
  .detailed-main .section-card { scroll-margin-top: 92px; } /* the rail is beside the form now, not above it */
  .step-rail.is-stuck .step-rail-link { position: relative; justify-content: center; min-height: 0; padding: 7px; }
  .step-rail.is-stuck .step-rail-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .step-rail.is-stuck .step-rail-link::after {
    content: attr(data-title);
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%) translateX(-4px);
    padding: 5px 9px;
    border-radius: 6px;
    background: var(--ink, #171B1A);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s, transform 0.15s;
  }
  .step-rail.is-stuck .step-rail-link:hover::after, .step-rail.is-stuck .step-rail-link:focus-visible::after { opacity: 1; transform: translateY(-50%); }
}
@media (min-width: 1560px) {
  .step-rail.is-stuck { left: max(8px, calc((100vw - var(--container-max)) / 2 - 184px)); width: 172px; padding: 8px; }
  .step-rail.is-stuck .step-rail-link { justify-content: flex-start; padding: 7px 9px; }
  .step-rail.is-stuck .step-rail-title { position: static; width: auto; height: auto; overflow: hidden; clip-path: none; white-space: normal; }
  .step-rail.is-stuck .step-rail-link::after { display: none; }
}

/* Steps (small screens, script only) */
.stepper { padding: 16px 18px; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); }
.stepper-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.stepper-count { font-size: 13px; font-weight: 700; color: var(--brand-primary); }
.stepper-title { font-size: 13px; color: var(--text-secondary); }
.stepper-track { height: 6px; overflow: hidden; border-radius: 999px; background: var(--color-bg-muted); }
.stepper-bar { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--primary-500), var(--primary-700)); transition: width 0.25s ease; }

.sticky-bar-steps {
  z-index: 30;
  display: flex;
  gap: 12px;
  margin-top: 20px;
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.sticky-bar-steps .btn { flex: 1; }
.sticky-bar-steps [data-step-next] { flex: 2; }

/* The side column: the summary and the suggestion card travel together. */
.detailed-side { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 900px) { .detailed-side { position: static; } }

/* Summary so far: the figure first, progress, then the breakdown. */
.summary {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-lg);
}
@media (max-width: 900px) {
  .summary { display: none; }
}
.summary-hero { margin: -22px -22px 0; padding: 20px 22px 18px; border-radius: var(--radius-lg) var(--radius-lg) 0 0; background: linear-gradient(135deg, var(--primary-800), var(--primary-600)); color: #fff; }
.summary-head { display: flex; align-items: center; gap: 8px; }
.summary-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary-300); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.18); }
.summary-title { font-size: 13px; font-weight: 700; letter-spacing: 0.02em; color: rgba(255, 255, 255, 0.85); }
.summary-badge {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}
.summary-figure { display: block; margin-top: 10px; font-family: var(--font-display); font-size: 34px; font-weight: 700; line-height: 1.1; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.summary-empty { margin: 8px 0 0; font-size: 12px; line-height: 1.5; color: rgba(255, 255, 255, 0.78); }
.summary-progress-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 8px; font-size: 13px; font-weight: 700; color: var(--text-secondary); }
/* Bangla digits need size and contrast: Hind Siliguri's "১" is a thin hook that fades below 13px in light grey. */
.summary-progress-head span:last-child { color: var(--text-primary); font-weight: 700; font-variant-numeric: tabular-nums; }
.summary-rows { display: grid; gap: 9px; margin: 0; padding: 14px 0 0; border-top: 1px solid var(--color-border); font-size: 13.5px; }
.summary-rows:empty { display: none; }
.summary-row { display: flex; justify-content: space-between; gap: 10px; }
.summary-row dt { color: var(--text-secondary); }
.summary-row dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.summary.is-stale .summary-rows, .summary.is-stale .summary-figure { opacity: 0.55; }
.summary-text { margin: 0; padding-top: 12px; border-top: 1px solid var(--color-border); font-size: 12px; line-height: 1.5; color: var(--text-tertiary); }

/* Detailed result: stages */
.stages { padding: 8px 20px 4px; }
.stage { border-bottom: 1px solid var(--color-border); }
.stage summary, .stage-flat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 12px 4px;
  list-style: none;
}
.stage summary { cursor: pointer; }
.stage summary::-webkit-details-marker { display: none; }
.stage-label { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.stage-flat .stage-label { padding-left: 20px; }
.stage-chevron { flex-shrink: 0; color: var(--text-tertiary); transform: rotate(-90deg); transition: transform 0.2s; }
.stage[open] .stage-chevron { transform: none; }
.stage-value { flex-shrink: 0; font-size: 15px; font-variant-numeric: tabular-nums; }
.stage-label.is-strong { font-weight: 700; }
.stage-value.is-strong { font-size: 16px; color: var(--brand-primary); }
.stage-lines { display: flex; flex-direction: column; gap: 6px; padding: 0 4px 14px 32px; }
.stage-line { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--text-secondary); }
.stage-line span:last-child { font-weight: 600; font-variant-numeric: tabular-nums; }
.stage-note { font-size: 13px; line-height: 1.5; color: var(--text-secondary); }
.stages .result-row { margin-top: 8px; }
.stages .result-row-total { margin-top: 4px; }
.total-label { font-size: 17px; font-weight: 700; }
.total-value { font-size: 22px; color: var(--brand-primary); }

/* ---------- Calculator hub ---------- */

.hub-page { padding-bottom: 48px; }
.hub-lead { max-width: 640px; }
.hub-section { padding: 8px 0 40px; }
.hub-section-last { padding-bottom: 0; }
.hub-page .page-lead + .hub-section { padding-top: 32px; }

.hub-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.hub-card {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}
.hub-card-accent { border-color: var(--accent-200); background: var(--accent-50); }
.hub-card-accent .choice-badge { background: var(--color-surface); color: var(--accent-700); }
.hub-card-title { font-family: var(--font-display); font-weight: 700; font-size: 22px; }
.hub-card-text { color: var(--text-secondary); font-size: 15px; line-height: 1.6; }
.hub-facts { margin: 8px 0 0; display: flex; flex-direction: column; gap: 8px; flex: 1; font-size: 14px; }
.hub-facts dt { display: inline; font-weight: 700; }
.hub-facts dd { display: inline; margin: 0; color: var(--text-secondary); }
.hub-card-cta { margin-top: 12px; }

.compare-table { width: 100%; min-width: 480px; border-collapse: collapse; font-size: 14px; }
.compare-table thead tr { background: linear-gradient(180deg, var(--neutral-50), var(--color-bg-subtle)); }
.compare-table th, .compare-table td { padding: 12px 16px; text-align: left; }
.compare-table thead th { font-weight: 700; color: var(--text-primary); }
.compare-table tbody tr { border-top: 1px solid var(--color-border); }
.compare-table tbody th { font-weight: 600; color: var(--text-secondary); }

.premium-band {
  position: relative;
  overflow: hidden;
  padding: 32px 28px;
  border-radius: var(--radius-xl);
  background: linear-gradient(155deg, var(--primary-700), var(--primary-900));
}
.premium-band::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -60px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-500), transparent 70%);
  opacity: 0.25;
}
.premium-band-body { position: relative; max-width: 440px; }
.premium-band-badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  margin-bottom: 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.premium-band-title { font-family: var(--font-display); font-weight: 700; font-size: 20px; color: #fff; }
.premium-band-text { margin-top: 8px; color: var(--primary-100); font-size: 14px; line-height: 1.5; }

/* ---------- CMS pages: FAQ, guides, About, legal ---------- */

.content-page { padding-bottom: 56px; }
.content-updated { margin-top: 8px; font-size: 13px; color: var(--text-tertiary); }
.content-note { margin-top: 32px; }
.content-grid { margin-top: 28px; }
.faq-group { margin-top: 32px; }

.prose { margin-top: 28px; font-size: 16px; line-height: 1.7; color: var(--text-primary); overflow-wrap: break-word; }
.prose > * + * { margin-top: 16px; }
.prose h2 { margin-top: 36px; font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; line-height: 1.25; }
.prose h3 { margin-top: 28px; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; line-height: 1.3; }
.prose h4 { margin-top: 24px; font-weight: 700; font-size: 1rem; }
.prose ul, .prose ol { padding-left: 24px; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 6px; }
.prose a { color: var(--brand-primary); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.prose strong { font-weight: 700; }
.prose blockquote {
  padding: 12px 18px;
  border-left: 4px solid var(--primary-300);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--brand-primary-subtle);
  color: var(--text-secondary);
}
.prose img { max-width: 100%; height: auto; border-radius: var(--radius-md); }
.prose hr { border: none; border-top: 1px solid var(--color-border); margin: 32px 0; }
.prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 14px; }
.prose th, .prose td { padding: 10px 14px; border: 1px solid var(--color-border); text-align: left; }
.prose th { background: var(--color-bg-subtle); font-weight: 700; }

.content-cta {
  margin-top: 40px;
  padding: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--brand-primary-subtle);
}
.content-cta-title { font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.content-cta-text { margin-top: 4px; font-size: 14px; color: var(--text-secondary); }

/* ---------- Tax rules ---------- */

.rules-section { margin-top: 40px; }
.rules-version { font-weight: 700; color: var(--text-primary); white-space: nowrap; }
.rules-category { margin-top: 20px; }
.rules-category-title { margin-bottom: 10px; font-family: var(--font-display); font-weight: 700; font-size: 17px; }
.rules-category-threshold { margin-left: 6px; font-family: var(--font-body); font-weight: 600; font-size: 13px; color: var(--text-secondary); }
.rules-list { padding-left: 22px; list-style: disc; font-size: 15px; line-height: 1.6; }
.rules-list li + li { margin-top: 6px; }
.rules-after-list { margin-top: 14px; margin-bottom: 0; }
.rules-other-years { margin-top: 24px; font-size: 14px; color: var(--text-secondary); }
.rules-other-years a { margin-left: 8px; font-weight: 700; }

/* ---------- Language ---------- */

/*
  Bangla text leads with the Bangla face; Latin words inside it still fall through to the brand fonts. The digits
  come from Noto Sans Bengali (loaded as a ten-character subset), whose "১" is unmistakable; everything else in
  Bangla stays Hind Siliguri. In English pages the same subset covers any Bangla digit that appears.
*/
:lang(bn) { --font-display: 'Noto Sans Bengali', 'Hind Siliguri', 'Outfit', system-ui, sans-serif; --font-body: 'Noto Sans Bengali', 'Hind Siliguri', 'Karla', system-ui, sans-serif; }
:lang(en) { --font-display: 'Outfit', 'Noto Sans Bengali', 'Hind Siliguri', system-ui, sans-serif; --font-body: 'Karla', 'Noto Sans Bengali', 'Hind Siliguri', system-ui, sans-serif; }
:lang(bn) body, body:lang(bn) { line-height: 1.6; }

/* Bangla digits need size and contrast: in Hind Siliguri the "১" is a thin hook that fades below 13px or in the
   lightest grey. In Bangla, small text that can carry a figure sits at 13px, uppercase labels at 12px, and the
   tertiary grey is one step darker. */
:lang(bn) { --text-tertiary: var(--neutral-600); }
:lang(bn) .hero-assurance, :lang(bn) .assurance, :lang(bn) .result-id, :lang(bn) .field-per, :lang(bn) .fold-desc,
:lang(bn) .summary-empty, :lang(bn) .summary-text, :lang(bn) .smart-note, :lang(bn) .compare-option-note,
:lang(bn) .compare-dropped, :lang(bn) .compare-table thead th, :lang(bn) .slab-table th, :lang(bn) .pill,
:lang(bn) .choice-badge, :lang(bn) .step-rail-title, :lang(bn) .field-hint, :lang(bn) .radio-text,
:lang(bn) .review-detail, :lang(bn) .fold-value, :lang(bn) .income-per, :lang(bn) .footer-bottom,
:lang(bn) .breadcrumbs, :lang(bn) .summary-rows, :lang(bn) .smart-detail, :lang(bn) .smart-split li { font-size: 13px; }
:lang(bn) .section-step, :lang(bn) .compare-kicker, :lang(bn) .summary-badge, :lang(bn) .smart-badge,
:lang(bn) .premium-band-badge, :lang(bn) .summary-title { font-size: 12px; }
:lang(bn) .summary-empty { color: rgba(255, 255, 255, 0.9); }
:lang(bn) .smart-ring small { font-size: 10.5px; }
/* Amounts typed in Bangla digits: the thin "১" needs weight, so every amount box, months list and subtotal is bolder. */
:lang(bn) .money-input input { font-weight: 600; }
:lang(bn) .money-input-lg input { font-weight: 700; }
:lang(bn) .months-select { font-weight: 600; font-size: 15px; }
:lang(bn) .income-subtotal { font-size: 14px; font-weight: 700; color: var(--text-primary); }
:lang(bn) .income-per { font-size: 13px; font-weight: 500; }
@media (max-width: 480px) { :lang(bn) .compare-table { font-size: 13px; } }

.lang-switch {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 14px;
  margin-right: 10px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
}
.lang-switch:hover { border-color: var(--brand-primary); color: var(--brand-primary); }

/* =====================================================================
   Smart Suggestions: how much more eligible investment earns the full rebate.
   A gradient border and a red sparkle set it apart from every green header; the placeholder is the same card
   with a dashed border until the live preview has a figure.
   ===================================================================== */
/* WhatsApp share: the brand green, so it reads as WhatsApp at a glance. */
.btn-whatsapp { gap: 8px; border: 1px solid #1FAF57; background: #25D366; color: #fff; }
.btn-whatsapp:hover { background: #1FAF57; color: #fff; text-decoration: none; }
.btn-whatsapp svg { flex-shrink: 0; }

/* "Tax on a monthly salary of ৳X" pages. */
.band-hero { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-bottom: 28px; padding: 28px 20px 24px; border-radius: var(--radius-lg); background: var(--brand-primary-subtle); text-align: center; }
.band-hero-label { font-size: 14px; font-weight: 600; color: var(--brand-primary); }
.band-hero-amount { font-family: var(--font-display); font-size: 44px; font-weight: 700; line-height: 1.15; color: var(--brand-primary); }
.band-hero-sub { font-size: 14px; color: var(--text-secondary); }
.band-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 16px; }
.band-table th { font-weight: 500; text-align: left; }
.band-table .band-slab th { padding-left: 24px; color: var(--text-secondary); }
.band-table .band-total th, .band-table .band-total td { font-weight: 700; color: var(--brand-primary); }
.band-index { min-width: 0; }
.band-invest { font-size: 15px; line-height: 1.6; }
.band-nav { display: flex; justify-content: space-between; gap: 12px; margin: 28px 0 16px; padding-top: 16px; border-top: 1px solid var(--color-border); font-weight: 600; }
.band-note { margin-top: 12px; font-size: 13px; color: var(--text-tertiary); }
@media (max-width: 480px) { .band-hero-amount { font-size: 36px; } .band-actions .btn { width: 100%; } }

/* "We have a suggestion for you": a pill under the header on the result page, for five seconds or until closed. */
.smart-banner {
  position: fixed;
  top: 80px;
  left: 50%;
  z-index: 35;
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(calc(100% - 32px), 640px);
  padding: 10px 10px 10px 16px;
  border: 1px solid var(--brand-primary);
  border-radius: var(--radius-full);
  background: var(--color-surface);
  box-shadow: 0 12px 32px -12px rgba(15, 81, 50, 0.35), 0 0 0 4px var(--brand-primary-subtle);
  transform: translate(-50%, -28px) scale(0.97);
  opacity: 0;
  will-change: transform, opacity;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.35s ease-out;
}
.smart-banner.is-shown { transform: translate(-50%, 0) scale(1); opacity: 1; }
.smart-banner[hidden] { display: none; }
.smart-banner-icon { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--brand-primary); color: #fff; }
.smart-banner-text { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 14px; line-height: 1.3; }
.smart-banner-text b { color: var(--brand-primary); }
.smart-banner-gist { font-size: 13px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.smart-banner-see { flex-shrink: 0; height: 36px; padding: 0 14px; border-radius: var(--radius-full); }
.smart-banner-close { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 36px; height: 36px; border: none; border-radius: 50%; background: transparent; color: var(--text-tertiary); cursor: pointer; }
.smart-banner-close:hover { background: var(--color-bg-subtle); color: var(--text-primary); }
@media (max-width: 480px) { .smart-banner { top: 76px; padding-left: 12px; } .smart-banner-gist { display: none; } }
@media (prefers-reduced-motion: reduce) { .smart-banner { transition: opacity 0.2s; transform: translate(-50%, 0) scale(1); } }
/* "See it" lands on the card and lights it up for a moment. */
.smart-card.is-spotlit { box-shadow: 0 0 0 4px var(--brand-primary-subtle), 0 0 0 6px var(--brand-primary); transition: box-shadow 0.3s; }

.smart-card {
  position: relative;
  padding: 18px 20px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  background: linear-gradient(var(--color-surface), var(--color-surface)) padding-box,
              linear-gradient(135deg, var(--primary-500), var(--primary-200) 55%, var(--gold-200)) border-box;
  box-shadow: 0 0 0 4px rgba(46, 143, 101, 0.08), var(--shadow-md);
  transition: box-shadow 0.3s ease, background 0.3s ease;
}
.smart-card.is-placeholder {
  border: 1px dashed var(--primary-300);
  background: var(--color-bg-subtle);
  box-shadow: none;
}
.smart-card.is-actionable { box-shadow: 0 0 0 4px rgba(46, 143, 101, 0.14), 0 14px 30px -14px rgba(15, 81, 50, 0.35); }
.smart-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.smart-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent-50);
  color: var(--accent-600);
}
.smart-card.is-placeholder .smart-icon { background: var(--color-bg-muted); color: var(--text-tertiary); }
.smart-title { flex: 1; margin: 0; font-family: var(--font-display); font-size: 17px; font-weight: 700; }
.smart-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: var(--radius-full);
  background: var(--brand-primary-subtle);
  color: var(--brand-primary);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.smart-card.is-placeholder .smart-badge { display: none; }
.smart-placeholder { margin: 0; font-size: 14px; line-height: 1.55; color: var(--text-secondary); }
.smart-placeholder[hidden], .smart-body[hidden], .smart-split[hidden] { display: none; }
.smart-body { display: flex; align-items: flex-start; gap: 16px; }
.smart-ring {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 84px;
  height: 84px;
  text-align: center;
}
.smart-ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.smart-ring circle { fill: none; stroke-width: 7; }
.smart-ring-track { stroke: var(--color-bg-muted); }
.smart-ring-fill { stroke: var(--primary-500); stroke-linecap: round; transition: stroke-dasharray 0.45s ease; }
.smart-ring b, .smart-ring small { position: relative; }
.smart-ring b { font-family: var(--font-display); font-size: 17px; font-weight: 700; line-height: 1; color: var(--brand-primary); font-variant-numeric: tabular-nums; }
.smart-ring small { margin-top: 3px; font-size: 9.5px; line-height: 1.1; font-weight: 600; color: var(--text-tertiary); }
.smart-main { flex: 1; min-width: 0; }
.smart-headline { margin: 2px 0 6px; font-family: var(--font-display); font-size: 18px; font-weight: 700; line-height: 1.25; color: var(--text-primary); }
.smart-card.is-actionable .smart-headline { color: var(--brand-primary); }
.smart-detail { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--text-secondary); }
.smart-split { display: grid; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.smart-split li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: var(--radius-md); background: var(--brand-primary-subtle); font-size: 13.5px; }
.smart-split li span { min-width: 0; }
.smart-split li b { flex-shrink: 0; color: var(--brand-primary); font-variant-numeric: tabular-nums; }
.smart-foot { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--color-border); }
.smart-note { margin: 0; font-size: 12px; line-height: 1.45; color: var(--text-tertiary); }
.smart-link { display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 700; }
.result-stack .smart-card { padding: 22px 24px 18px; }
@media (max-width: 480px) { .smart-body { flex-direction: column; align-items: center; text-align: center; } .smart-split li { text-align: left; } }

/* =====================================================================
   Year-on-year comparison: the offer button, the two-option modal, and the comparison card.
   ===================================================================== */
.btn-compare { gap: 8px; border: 1px solid var(--brand-primary-border); background: var(--brand-primary-subtle); color: var(--brand-primary); }
.btn-compare:hover { background: var(--primary-100); }
.dialog-wide { width: min(720px, calc(100vw - 32px)); }
.compare-options { display: grid; gap: 14px; margin-top: 16px; }
@media (min-width: 640px) { .compare-options { grid-template-columns: 1fr 1fr; align-items: stretch; } }
.compare-option { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 18px 18px 16px 18px; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); color: inherit; text-decoration: none; }
/* The whole card is the link: no underline on its text; instead it lifts, its border and title turn green, and its button fills. */
.compare-option-link, .compare-option-link:hover { text-decoration: none; }
.compare-option-link { transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease; }
.compare-option-link:hover, .compare-option-link:focus-visible { transform: translateY(-2px); border-color: var(--primary-400); box-shadow: 0 14px 28px -16px rgba(15, 81, 50, 0.35); }
.compare-option-link:hover .compare-option-title { color: var(--brand-primary); }
.compare-option-link:hover .btn-secondary { background: var(--brand-primary); border-color: var(--brand-primary); color: #fff; }
.compare-option-num { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand-primary); color: #fff; font-size: 13px; font-weight: 700; }
.compare-option-title { margin: 2px 0 0; font-family: var(--font-display); font-size: 16px; font-weight: 700; }
.compare-option-text { flex: 1; margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--text-secondary); }
.compare-option-note { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--text-tertiary); }
.compare-missing { margin-top: 4px; }
.compare-missing .field-label { font-size: 13px; margin-bottom: 8px; }
.radio-cards-compact .radio-card { padding: 10px 12px; }
.radio-cards-compact .radio-title { font-size: 13.5px; }
.alert-info { border-color: var(--brand-primary-border); background: var(--brand-primary-subtle); }
.alert-info .alert-icon { color: var(--brand-primary); }

.compare-card { padding: 22px 24px 18px; border: 1px solid var(--color-border); border-radius: var(--radius-xl); background: var(--color-surface); box-shadow: var(--shadow-md); }
.compare-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.compare-icon { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 38px; height: 38px; border-radius: 11px; background: var(--brand-primary-subtle); color: var(--brand-primary); }
.compare-kicker { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-tertiary); }
.compare-title { margin: 2px 0 0; font-family: var(--font-display); font-size: 19px; font-weight: 700; }
.compare-headline { margin: 0 0 6px; font-family: var(--font-display); font-size: 22px; font-weight: 700; line-height: 1.25; }
.compare-card.is-up .compare-headline { color: var(--accent-600); }
.compare-card.is-down .compare-headline { color: var(--success-700); }
.compare-detail { margin: 0 0 14px; font-size: 13.5px; line-height: 1.5; color: var(--text-secondary); }
.compare-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.compare-table th, .compare-table td { padding: 9px 8px; border-bottom: 1px solid var(--color-border); text-align: right; }
.compare-table th[scope="row"], .compare-table thead th:first-child { text-align: left; font-weight: 500; color: var(--text-secondary); }
.compare-table thead th { font-size: 12px; font-weight: 700; color: var(--text-tertiary); letter-spacing: 0.03em; text-transform: uppercase; }
.compare-table td.is-up { color: var(--accent-600); font-weight: 700; }
.compare-table td.is-down { color: var(--success-700); font-weight: 700; }
.compare-table .compare-total th, .compare-table .compare-total td { font-weight: 700; color: var(--text-primary); border-bottom: 0; border-top: 2px solid var(--color-border-strong); }
.compare-why { margin: 18px 0 8px; font-size: 14px; font-weight: 700; }
.compare-reasons { margin: 0; padding-left: 18px; font-size: 13.5px; line-height: 1.55; color: var(--text-secondary); }
.compare-reasons li + li { margin-top: 4px; }
.compare-dropped { margin: 12px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--text-tertiary); }
.compare-foot { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--color-border); }
.compare-link { font-size: 13px; font-weight: 700; }
@media (max-width: 480px) { .compare-table { font-size: 12.5px; } .compare-table th, .compare-table td { padding: 8px 4px; } }

/* "Show us a little support": the Facebook page, after a download or an email goes out. */
.follow-us { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 18px; padding: 16px 14px 14px; border: 1px dashed var(--color-border-strong); border-radius: var(--radius-md); background: var(--color-bg-subtle); }
.follow-us-text { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--text-secondary); }
.btn-facebook { gap: 8px; border: 1px solid #1877F2; background: #1877F2; color: #fff; }
.btn-facebook:hover { background: #166FE5; border-color: #166FE5; color: #fff; text-decoration: none; }
.btn-facebook svg { flex-shrink: 0; }

/* "View on your phone": the QR code that opens the PDF. A placeholder on the calculators until there is a result. */
.phone-card { padding: 16px 18px; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); box-shadow: var(--shadow-sm); }
.phone-card.is-placeholder { border-style: dashed; background: var(--color-bg-subtle); box-shadow: none; }
.phone-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.phone-icon { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 32px; height: 32px; border-radius: 9px; background: var(--brand-primary-subtle); color: var(--brand-primary); }
.phone-card.is-placeholder .phone-icon { background: var(--color-bg-muted); color: var(--text-tertiary); }
.phone-title { margin: 0; font-family: var(--font-display); font-size: 16px; font-weight: 700; }
.phone-body { display: flex; align-items: center; gap: 16px; }
.phone-qr { flex-shrink: 0; width: 120px; height: 120px; padding: 4px; border-radius: var(--radius-md); background: #fff; border: 1px solid var(--color-border); color: var(--neutral-300); }
.phone-qr svg { display: block; width: 100%; height: 100%; }
.phone-card.is-placeholder .phone-qr { opacity: 0.5; }
.phone-text { flex: 1; min-width: 0; font-size: 14px; line-height: 1.5; color: var(--text-secondary); }
.phone-text p { margin: 0; }
.phone-link { display: inline-block; margin: 8px 0 6px; font-weight: 700; }
.phone-note { font-size: 12px; color: var(--text-tertiary); }
.phone-note .ref { font-size: 11px; }
.quick-side, .detailed-side, .result-side { gap: 16px; }
.quick-side .phone-card, .detailed-side .phone-card { margin-top: 0; }
@media (max-width: 480px) { .phone-body { flex-direction: column; text-align: center; } }
@media (max-width: 900px) { .phone-card { display: none; } }
