/* ==========================================================================
   Home page (index.html) — "the ledger"
   --------------------------------------------------------------------------
   Render-blocking on purpose: it is small, same-origin, and it lays out the
   hero and every section under it in the first paint. style.css still loads
   async for the header, footer and shared widgets, so the shared selectors
   here (tool cards, filter) carry one extra class to outrank it whichever
   file lands last.

   Page plan, one layout family per section:
     hero        split: the question on one side, a working calculator
                 (VAT, zakat, percentage) answering it on the other
     most used   bento of five, one large navy cell
     exclusives  a native scroll-snap row (Splide removed)
     categories  a table of contents with dotted leaders
     all tools   the filterable card grid
     trust       promises beside a ledger of official sources
     blog        an editorial list
     about       a reading column
   ========================================================================== */

.h-home {
  --h-line: color-mix(in srgb, var(--primary-text) 14%, transparent);
  --h-tint: color-mix(in srgb, var(--primary-text) 8%, transparent);
  --h-display: var(--font-display, 'Reem Kufi', 'Readex Pro', 'Segoe UI', Tahoma, sans-serif);
  --h-shadow: 0 1px 2px rgba(26, 58, 92, .06), 0 24px 48px -24px rgba(26, 58, 92, .32);
  --h-bars: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 40'%3E%3Crect x='0' y='6' width='60' height='11' rx='5.5'/%3E%3Crect x='22' y='23' width='38' height='11' rx='5.5'/%3E%3C/svg%3E");
  display: block;
}
.h-wrap {
  max-width: 1200px;
  margin-inline: auto;
  padding-left: 24px;
  padding-right: 24px;
}
.h-home > * > .h-wrap > *,
.h-hero-grid > *,
.h-toc-grid > *,
.h-trust > * { min-width: 0; }
.h-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.h-section { padding-block: clamp(56px, 7vw, 96px); }
.h-section-tint { background: color-mix(in srgb, var(--primary-text) 4%, var(--bg)); }
/* The exclusives row bleeds to the page edge using 100vw, which counts the
   vertical scrollbar; clip keeps those few pixels from widening the page. */
.h-section-tint { overflow-x: clip; }
.h-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}
.h-head .h-title { margin-bottom: 0; }
.h-title,
.h-tools .v2-section-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 28px;
  font-family: var(--h-display);
  font-size: clamp(26px, 3.2vw, 38px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: normal;
  color: var(--text);
  text-wrap: balance;
}
.h-title::before,
.h-tools .v2-section-title::before {
  content: "";
  width: 30px;
  height: 20px;
  flex: none;
  background: var(--accent);
  -webkit-mask: var(--h-bars) center / contain no-repeat;
          mask: var(--h-bars) center / contain no-repeat;
}
.h-link {
  font-weight: 700;
  font-size: var(--text-sm, 14px);
  color: var(--primary-text);
  white-space: nowrap;
}
.h-link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ── Hero ───────────────────────────────────────────────────────────────── */

.h-hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(40px, 6vw, 88px) clamp(48px, 6vw, 96px);
}
.h-hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.h-hero h1 {
  font-family: var(--h-display);
  font-size: clamp(36px, 5.2vw, 64px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: normal;
  color: var(--text);
  margin: 0 0 20px;
  text-wrap: balance;
}
.h-hero h1 em {
  font-style: normal;
  color: var(--primary-text);
  background: linear-gradient(var(--accent), var(--accent)) 0 92% / 100% .16em no-repeat;
  -webkit-box-decoration-break: clone;
          box-decoration-break: clone;
}
.h-hero-sub {
  max-width: 46ch;
  margin: 0 0 30px;
  font-size: var(--text-md, 18px);
  line-height: 1.85;
  color: var(--text-muted);
}

.h-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 560px;
  min-height: 64px;
  padding: 6px;
  padding-inline-start: 18px;
  background: var(--surface);
  border: 1.5px solid var(--h-line);
  border-radius: 18px;
  box-shadow: var(--h-shadow);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.h-search:focus-within {
  border-color: var(--primary-text);
  box-shadow: var(--h-shadow), 0 0 0 4px color-mix(in srgb, var(--accent) 26%, transparent);
}
.h-search-ico { flex: none; color: var(--text-muted); }
.h-search-input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  outline: none;
  padding: 10px 4px;
  font: inherit;
  font-size: var(--text-md, 17px);
  color: var(--text);
}
.h-search-input::placeholder { color: color-mix(in srgb, var(--text-muted) 85%, transparent); }
.h-search-btn {
  flex: none;
  min-height: 50px;
  padding: 0 26px;
  border: 0;
  border-radius: 13px;
  background: var(--primary);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .18s ease, transform .12s ease;
}
.h-search-btn:hover { background: var(--primary-dark, #12283f); }
.h-search-btn:active { transform: translateY(1px); }

.h-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin-top: 18px;
  font-size: var(--text-sm, 14px);
}
.h-quick a {
  color: var(--text-muted);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--h-line);
  text-underline-offset: 5px;
  transition: color .18s ease, text-decoration-color .18s ease;
}
.h-quick a:hover { color: var(--primary-text); text-decoration-color: var(--accent); }

/* The calculator card */
.h-ledger {
  justify-self: center;
  width: 100%;
  max-width: 470px;
  background: var(--surface);
  border: 1px solid var(--h-line);
  border-radius: 26px;
  box-shadow: var(--h-shadow);
  overflow: hidden;
  animation: h-lift .7s cubic-bezier(.2, .8, .2, 1) both .1s;
}
.h-ledger-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--h-line);
}
.h-ledger-tabs button {
  min-height: 52px;
  border: 0;
  background: none;
  font: inherit;
  font-size: var(--text-sm, 14px);
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: color .18s ease, box-shadow .18s ease;
}
.h-ledger-tabs button:hover { color: var(--text); }
.h-ledger-tabs button.is-on {
  color: var(--primary-text);
  box-shadow: inset 0 -3px 0 var(--accent);
}
.h-ledger-body { padding: 22px 24px 20px; }
.h-ledger-fields { display: grid; gap: 12px; }
.h-field { display: grid; gap: 6px; font-size: var(--text-sm, 14px); font-weight: 600; color: var(--text); }
.h-field[hidden] { display: none; }
.h-field input {
  width: 100%;
  min-height: 54px;
  padding: 10px 16px;
  border: 1.5px solid var(--h-line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 22px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  direction: ltr;
  text-align: right;
}
.h-field input:focus {
  outline: none;
  border-color: var(--primary-text);
  background: var(--surface);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 26%, transparent);
}
.h-ledger-rows { margin: 14px 0 0; }
.h-ledger-rows > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 10px 2px;
  border-bottom: 1px dashed var(--h-line);
  font-size: var(--text-sm, 15px);
}
.h-ledger-rows dt { color: var(--text-muted); }
.h-ledger-rows dd {
  margin: 0;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  direction: ltr;
}
.h-answer {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  padding: 18px 20px;
  border-radius: 18px;
  background: var(--primary);
  color: #fff;
}
.h-answer-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-sm, 14px);
  color: rgba(255, 255, 255, .82);
}
.h-answer-label::before {
  content: "";
  width: 20px;
  height: 14px;
  flex: none;
  background: var(--accent);
  -webkit-mask: var(--h-bars) center / contain no-repeat;
          mask: var(--h-bars) center / contain no-repeat;
}
.h-answer-value {
  font-size: clamp(30px, 3.4vw, 40px);
  font-weight: 700;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
  direction: ltr;
  text-align: right;
}
.h-ledger-note {
  margin: 12px 0 0;
  font-size: var(--text-xs, 13px);
  line-height: 1.7;
  color: var(--text-muted);
}
.h-ledger-more {
  display: inline-flex;
  gap: 6px;
  margin-top: 10px;
  font-size: var(--text-sm, 14px);
  font-weight: 700;
  color: var(--primary-text);
}
.h-ledger-more:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ── Most used: bento of five ───────────────────────────────────────────── */

.h-bento {
  display: grid;
  grid-template-rows: minmax(190px, auto) minmax(190px, auto) auto;
  gap: 16px;
}
.h-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  border: 1px solid var(--h-line);
  border-radius: 22px;
  background: var(--surface);
  color: var(--text);
  overflow: hidden;
  isolation: isolate;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.h-cell:hover {
  border-color: var(--primary-text);
  transform: translateY(-3px);
  box-shadow: var(--h-shadow);
}
/* Three columns, three rows: the large cell holds the start column for two
   rows, the wide one and two squares fill the other side, and the fifth is a
   slim strip under all of them. Five items, five cells. */
.h-bento { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); }
.h-bento .h-cell-1 { grid-column: 1; grid-row: 1 / span 2; }
.h-bento .h-cell-2 { grid-column: 2 / span 2; grid-row: 1; }
.h-bento .h-cell-3 { grid-column: 2; grid-row: 2; }
.h-bento .h-cell-4 { grid-column: 3; grid-row: 2; }
.h-bento .h-cell-5 {
  grid-column: 1 / -1;
  grid-row: 3;
  flex-direction: row;
  align-items: center;
  gap: 18px;
  min-height: 0;
  padding: 18px 24px;
}
.h-bento .h-cell-5 .h-cell-ico { margin: 0; }
.h-bento .h-cell-5 h3 { flex: none; }
.h-bento .h-cell-5 p { flex: 1; min-width: 0; }
.h-bento .h-cell-5 .h-cell-cta { margin: 0; padding: 0; white-space: nowrap; }
.h-cell-ico {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 6px;
  border-radius: 14px;
  background: var(--h-tint);
  color: var(--primary-text);
}
.h-cell-ico svg { width: 22px; height: 22px; }
.h-cell h3 {
  font-size: var(--text-md, 18px);
  font-weight: 700;
  line-height: 1.5;
  color: inherit;
}
.h-cell p {
  font-size: var(--text-sm, 14px);
  line-height: 1.75;
  color: var(--text-muted);
}
.h-cell-cta {
  margin-top: auto;
  padding-top: 10px;
  font-size: var(--text-sm, 14px);
  font-weight: 700;
  color: var(--primary-text);
}
/* the large cell: navy, with the bars as its picture */
.h-cell-1 {
  justify-content: flex-end;
  padding: 32px;
  border-color: transparent;
  background: var(--primary);
  color: #fff;
}
.h-cell-1::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset-inline-end: -110px;
  bottom: -80px;
  width: 360px;
  height: 240px;
  background: #fff;
  opacity: .07;
  -webkit-mask: var(--h-bars) center / contain no-repeat;
          mask: var(--h-bars) center / contain no-repeat;
}
.h-cell-1 h3 { font-family: var(--h-display); font-size: clamp(26px, 3vw, 36px); line-height: 1.35; }
.h-cell-1 p { color: rgba(255, 255, 255, .8); font-size: var(--text-base, 16px); max-width: 38ch; }
.h-cell-1 .h-cell-ico { background: rgba(255, 255, 255, .12); color: #fff; }
.h-cell-1 .h-cell-cta { color: var(--accent); padding-top: 18px; }
.h-cell-1:hover { border-color: transparent; }
/* the wide cell: warm tint */
.h-cell-2 {
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
}
.h-cell-2 .h-cell-ico { background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent-text); }
.h-cell-2 .h-cell-cta { color: var(--accent-text); }

/* ── Exclusives: one scroll-snap row ────────────────────────────────────── */

/* The row runs past the container to the page edge on its far side, and
   fades there, so a card cut by the edge reads as "more this way" instead
   of a layout error. The native scrollbar is replaced by a thin progress
   line under the row (home.js moves it). */
.h-ex-wrap {
  --h-gutter: max(24px, calc((100vw - 1200px) / 2 + 24px));
  position: relative;
  margin-inline-end: calc(-1 * var(--h-gutter));
}
.h-ex-nav { display: flex; gap: 8px; }
.h-ex-btn {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--h-line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  transition: border-color .18s ease, color .18s ease, background-color .18s ease, transform .12s ease, opacity .18s ease;
}
.h-ex-btn:hover:not(:disabled) { border-color: var(--primary); background: var(--primary); color: #fff; }
.h-ex-btn:active:not(:disabled) { transform: scale(.94); }
.h-ex-btn:disabled { opacity: .35; cursor: default; }
.h-ex-row {
  list-style: none;
  margin: 0;
  padding: 6px 0 22px;
  padding-inline-end: var(--h-gutter);
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 23.5%);
  gap: 18px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline-start: 0;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 96px);
          mask-image: linear-gradient(to right, transparent 0, #000 96px);
}
.h-ex-row::-webkit-scrollbar { display: none; }
.h-ex-row.is-end { -webkit-mask-image: none; mask-image: none; }
.h-ex-row > li { scroll-snap-align: start; min-width: 0; }
.h-ex {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  padding: 24px 24px 20px;
  border: 1px solid var(--h-line);
  border-radius: 22px;
  background: var(--surface);
  color: var(--text);
  transition: border-color .25s ease, transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s cubic-bezier(.2, .8, .2, 1);
}
.h-ex:hover {
  border-color: var(--primary-text);
  transform: translateY(-4px);
  box-shadow: var(--h-shadow);
}
.h-ex-ico {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 8px;
  border-radius: 14px;
  background: var(--primary);
  color: #fff;
  transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}
.h-ex:hover .h-ex-ico { transform: rotate(-6deg) scale(1.06); }
.h-ex-ico svg { width: 22px; height: 22px; }
.h-ex h3 { font-size: var(--text-md, 18px); font-weight: 700; line-height: 1.5; }
/* Three lines at most, so the cards keep one height and the action sits
   right under the text instead of far below it. */
.h-ex p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  font-size: var(--text-sm, 14px);
  line-height: 1.8;
  color: var(--text-muted);
}
.h-ex-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 14px;
  font-size: var(--text-sm, 14px);
  font-weight: 700;
  color: var(--primary-text);
}
.h-ex-cta > span { transition: transform .25s ease; }
.h-ex:hover .h-ex-cta > span { transform: translateX(-4px); }

.h-ex-progress {
  position: relative;
  height: 3px;
  max-width: 1152px;
  margin-top: 6px;
  margin-inline-end: var(--h-gutter);
  border-radius: 3px;
  background: var(--h-line);
  overflow: hidden;
}
.h-ex-progress > span {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 30%;
  border-radius: 3px;
  background: var(--accent);
  will-change: transform;
}

/* ── Categories: a table of contents ───────────────────────────────────── */

.h-toc-grid {
  display: grid;
  grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}
.h-toc-intro p {
  max-width: 34ch;
  font-size: var(--text-md, 17px);
  line-height: 1.85;
  color: var(--text-muted);
}
.h-toc {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 40px;
}
.h-toc a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 2px;
  border-bottom: 1px solid var(--h-line);
  color: var(--text);
}
.h-toc-ico {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--h-tint);
  color: var(--primary-text);
  transition: background-color .18s ease, color .18s ease;
}
.h-toc-ico svg { width: 18px; height: 18px; }
.h-toc-name { font-size: var(--text-md, 18px); font-weight: 700; }
.h-toc-dots {
  flex: 1;
  min-width: 16px;
  height: 0;
  border-bottom: 2px dotted var(--h-line);
  transform: translateY(5px);
  transition: border-color .18s ease;
}
.h-toc-count {
  font-size: var(--text-sm, 14px);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.h-toc a:hover .h-toc-name { color: var(--primary-text); }
.h-toc a:hover .h-toc-dots { border-color: var(--accent); }
.h-toc a:hover .h-toc-ico { background: var(--primary); color: #fff; }

/* ── All tools (markup reused from the previous page) ──────────────────── */

.h-tools {
  max-width: 1200px;
  margin-inline: auto;
  padding-left: 24px;
  padding-right: 24px;
}
.h-tools .v2-section-header { display: block; margin-bottom: 20px; }
.h-tools .v2-section-title { margin-bottom: 6px; }
.h-tools .v2-section-subtitle { color: var(--text-muted); font-size: var(--text-base, 16px); }
.h-tools .v2-tools-filter {
  position: sticky;
  top: 64px;
  z-index: 40;
  margin: 0 -24px 24px;
  padding: 14px 24px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--h-line);
}
.h-tools .v2-tools-filter-inner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.h-tools .v2-filter-search { position: relative; flex: 1; min-width: 220px; max-width: 340px; }
.h-tools .v2-filter-search svg {
  position: absolute;
  top: 50%;
  inset-inline-start: 14px;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.h-tools .v2-filter-search input {
  width: 100%;
  min-height: 46px;
  padding: 10px 16px;
  padding-inline-start: 44px;
  border: 1.5px solid var(--h-line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: var(--text-sm, 15px);
  outline: none;
}
.h-tools .v2-filter-search input:focus { border-color: var(--primary-text); }
.h-tools .v2-filter-chips {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  max-width: 100%;
}
.h-tools .v2-filter-chips::-webkit-scrollbar { display: none; }
.h-tools .v2-filter-chip,
.h-tools .v2-filter-chip.cat-btn {
  flex: none;
  min-height: 40px;
  padding: 6px 14px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--text-muted);
  font: inherit;
  font-size: var(--text-sm, 14px);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none;
  transition: background-color .18s ease, color .18s ease;
}
.h-tools .v2-filter-chip:hover,
.h-tools .v2-filter-chip.cat-btn:hover { background: var(--h-tint); color: var(--text); }
.h-tools .v2-filter-chip.active,
.h-tools .v2-filter-chip.cat-btn.active { background: var(--primary); color: #fff; }

.h-tools .tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.h-tools .tools-grid .tool-item { min-width: 0; }
.h-tools .tools-grid .tool-item .tool-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  padding: 20px 20px 16px;
  background: var(--surface);
  border: 1px solid var(--h-line) !important; /* the markup sets an inline amber border on some cards */
  border-radius: 18px;
  box-shadow: none;
  color: var(--text);
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.h-tools .tools-grid .tool-item .tool-card:hover {
  border-color: var(--primary-text) !important;
  transform: translateY(-2px);
  box-shadow: var(--h-shadow);
}
.h-tools .tools-grid .tool-card .card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.h-tools .tools-grid .tool-card .tool-icon-wrap {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--h-tint);
  color: var(--primary-text);
}
.h-tools .tools-grid .tool-card .tool-icon { font-size: 20px; line-height: 1; }
.h-tools .tools-grid .tool-card .tool-tag {
  padding: 0;
  border: 0;
  background: none !important;
  color: var(--text-muted) !important;
  font-size: var(--text-xs, 13px);
  font-weight: 500;
}
.h-tools .tools-grid .tool-card .tool-tag .ico { display: none; }
.h-tools .tools-grid .tool-card.is-new .tool-tag { color: var(--accent-text) !important; font-weight: 700; }
.h-tools .tools-grid .tool-card h3 { font-size: var(--text-md, 17px); font-weight: 700; line-height: 1.55; color: var(--text); margin: 4px 0 0; }
.h-tools .tools-grid .tool-card p { font-size: var(--text-sm, 14px); line-height: 1.75; color: var(--text-muted); margin: 0; }
.h-tools .tools-grid .tool-card .card-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed var(--h-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.h-tools .tools-grid .tool-card .calc-now { color: var(--primary-text); font-weight: 700; font-size: var(--text-sm, 14px); background: none; padding: 0; }
.h-tools .tools-grid .tool-card .arrow-icon { color: var(--accent-text); transition: transform .18s ease; }
.h-tools .tools-grid .tool-card:hover .arrow-icon { transform: translateX(-4px); }

.h-tools .v2-load-more-wrap { text-align: center; margin-top: 32px; }
.h-tools .v2-load-more {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 26px;
  border: 1px solid var(--h-line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .18s ease, color .18s ease;
}
.h-tools .v2-load-more:hover { border-color: var(--primary-text); color: var(--primary-text); }
.h-tools .v2-load-more .lm-count { color: var(--accent-text); font-variant-numeric: tabular-nums; }
.h-tools .v2-empty-state { text-align: center; padding: 48px 24px; color: var(--text-muted); }
.h-tools .v2-empty-state svg { color: var(--h-line); margin-bottom: 14px; }
.h-tools .v2-empty-state h3 { font-size: var(--text-md, 18px); color: var(--text); margin-bottom: 4px; }

/* favorites / recent, rendered by favorites.js */
.v2-fav-section { padding-top: 8px; }
.v2-fav-group { margin-bottom: 14px; }
.v2-fav-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: var(--text-sm, 14px);
  font-weight: 700;
  color: var(--text-muted);
}
.v2-fav-list { display: flex; flex-wrap: wrap; gap: 8px; }
.v2-fav-chip {
  padding: 8px 14px;
  border: 1px solid var(--h-line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: var(--text-sm, 14px);
  font-weight: 600;
}
.v2-fav-chip:hover { border-color: var(--primary-text); color: var(--primary-text); }

/* ── Trust ──────────────────────────────────────────────────────────────── */

.h-trust {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}
.h-promises {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 28px;
}
.h-promises li { display: grid; gap: 6px; padding-top: 14px; border-top: 2px solid var(--primary-text); }
.h-promises strong { font-size: var(--text-md, 18px); color: var(--text); }
.h-promises span { font-size: var(--text-sm, 14px); line-height: 1.75; color: var(--text-muted); }
.h-trust-note { margin-top: 28px; font-size: var(--text-xs, 13px); color: var(--text-muted); }
.h-sources {
  list-style: none;
  margin: 0;
  padding: 10px 24px;
  border: 1px solid var(--h-line);
  border-radius: 22px;
  background: var(--surface);
}
.h-sources li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 16px;
  padding: 14px 0;
  border-bottom: 1px dashed var(--h-line);
}
.h-sources li:last-child { border-bottom: 0; }
.h-src-name { font-weight: 700; color: var(--text); }
.h-src-role { font-size: var(--text-sm, 14px); color: var(--text-muted); }

/* ── Blog ───────────────────────────────────────────────────────────────── */

.h-posts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}
.h-post { display: grid; gap: 10px; padding-top: 18px; border-top: 1px solid var(--h-line); color: var(--text); }
.h-post-cat { font-size: var(--text-xs, 13px); font-weight: 700; color: var(--accent-text); }
.h-post h3 { font-size: var(--text-lg, 20px); font-weight: 700; line-height: 1.5; transition: color .18s ease; }
.h-post p { font-size: var(--text-sm, 14px); line-height: 1.8; color: var(--text-muted); }
.h-post:hover h3 { color: var(--primary-text); }

/* ── About: a reading column ───────────────────────────────────────────── */

.h-about { border-top: 1px solid var(--h-line); }
.h-article { max-width: 808px; }
.h-article h2 {
  margin: 0 0 16px;
  font-family: var(--h-display);
  font-size: clamp(24px, 2.6vw, 30px);
  font-weight: 700;
  line-height: 1.45;
  color: var(--text);
}
.h-article h3 { margin: 28px 0 8px; font-size: var(--text-lg, 20px); font-weight: 700; color: var(--primary-text); }
.h-article p { font-size: 17px; line-height: 1.95; color: var(--text); max-width: 68ch; }
.h-article a { color: var(--primary-text); text-decoration: underline; text-decoration-color: var(--h-line); text-underline-offset: 4px; }
.h-article a:hover { text-decoration-color: var(--accent); }

/* ── Motion ─────────────────────────────────────────────────────────────── */

/* Movement only, no fade: if a browser holds the animation (a background
   tab, a throttled frame), the calculator is still there to use. */
@keyframes h-lift {
  from { transform: translateY(18px); }
  to   { transform: none; }
}
/* home.js adds .h-js; without it nothing is hidden. */
.h-js .h-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .55s ease var(--h-delay, 0ms), transform .65s cubic-bezier(.2, .8, .2, 1) var(--h-delay, 0ms);
}
.h-js .h-reveal.is-in { opacity: 1; transform: none; }
.h-answer-value.is-ticking { color: color-mix(in srgb, #fff 92%, var(--accent)); }

@media (prefers-reduced-motion: reduce) {
  .h-ledger { animation: none; }
  .h-js .h-reveal { opacity: 1; transform: none; transition: none; }
  .h-ex:hover .h-ex-ico, .h-ex:hover .h-ex-cta > span { transform: none; }
  .h-cell:hover, .h-ex:hover, .h-tools .tools-grid .tool-item .tool-card:hover { transform: none; }
}

/* ── Smaller screens ───────────────────────────────────────────────────── */

@media (max-width: 1024px) {
  .h-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .h-bento { grid-template-rows: none; }
  .h-bento .h-cell { grid-row: auto; }
  .h-bento .h-cell-5 { flex-direction: column; align-items: stretch; }
  .h-bento .h-cell-5 .h-cell-cta { margin-top: auto; }
  .h-bento .h-cell-1 { grid-column: 1 / -1; min-height: 260px; }
  .h-bento .h-cell-2 { grid-column: 1 / -1; }
  .h-bento .h-cell-3 { grid-column: 1; }
  .h-bento .h-cell-4 { grid-column: 2; }
  .h-bento .h-cell-5 { grid-column: 1 / -1; }
  .h-ex-row { grid-auto-columns: minmax(270px, 40%); }
}
@media (max-width: 900px) {
  .h-hero-grid { grid-template-columns: minmax(0, 1fr); }
  .h-ledger { justify-self: stretch; max-width: none; }
  .h-toc-grid, .h-trust { grid-template-columns: minmax(0, 1fr); }
  .h-posts { grid-template-columns: minmax(0, 1fr); gap: 20px; }
}
@media (max-width: 640px) {
  .h-wrap, .h-tools { padding-left: 16px; padding-right: 16px; }
  .h-tools .v2-tools-filter { margin-inline: -16px; padding-inline: 16px; }
  .h-hero h1 { font-size: clamp(32px, 9vw, 40px); }
  .h-hero-sub { font-size: var(--text-base, 16px); margin-bottom: 22px; }
  .h-search { min-height: 58px; padding-inline-start: 14px; }
  .h-search-btn { padding: 0 18px; min-height: 46px; }
  .h-bento { grid-template-columns: minmax(0, 1fr); }
  .h-bento .h-cell,
  .h-bento .h-cell-3,
  .h-bento .h-cell-4 { grid-column: 1 / -1; grid-row: auto; }
  .h-cell-1 { padding: 26px; }
  .h-ex-wrap { --h-gutter: 16px; }
  .h-ex-row { grid-auto-columns: 82%; gap: 14px; }
  .h-ex-nav { display: none; }
  .h-toc { grid-template-columns: minmax(0, 1fr); }
  .h-promises { grid-template-columns: minmax(0, 1fr); }
  .h-ledger-body { padding: 18px; }
}
