/* What it costs: the itemised bill, what free means, and where everything lives.
   Tokens only, from styles.css. The bill is a real table, dressed as the receipt on the home page. */

/* Hyphenated names (in-app, Tafsir al-Jalalayn) stay on one line rather than breaking at the hyphen. */
.nb { white-space: nowrap; }

/* The plain headline lines up with the bill beneath it, rather than sitting in a narrower column. */
.page-hero.plain h1 { max-width: 13em; }

/* ── The bill ─────────────────────────────────────── */
.bill-section { padding-top: 24px; }
.bill-col { display: grid; gap: 44px; min-width: 0; align-content: start; }

.receipt { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.receipt th, .receipt td { padding: 13px 0; vertical-align: middle; text-align: left; font-weight: 400; }
/* The rule goes on the row, so the dashes run unbroken from the item to its price */
.receipt tbody tr { border-bottom: 1px dashed var(--line); }
.receipt th[scope='row'] { padding-right: 18px; }
.receipt .what { display: block; font-weight: 500; }
.receipt .else { display: block; margin-top: 3px; font-size: 14px; line-height: 1.45; color: var(--muted); }
.receipt td { text-align: right; font-weight: 600; color: var(--brand); white-space: nowrap; }
.receipt tbody tr:last-child { border-bottom: 0; }

/* Each part of the bill under its own small heading, like the sections of a till receipt */
.receipt .grp { border-bottom: 0; }
.receipt .grp th { padding: 34px 0 4px; font-family: var(--display); font-size: 11.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.receipt .grp th::after { content: ''; display: block; height: 1px; margin-top: 10px; background: var(--ink); opacity: 0.35; }
.receipt tbody:first-of-type .grp th { padding-top: 14px; }

/* The header row only names the columns for screen readers; it takes no room on the page. */
.receipt thead th { padding: 0; }
/* The total spans both columns, so the large figure doesn't widen the price column on a phone. */
.receipt tfoot tr { border-top: 3px double var(--ink); }
.receipt tfoot td { padding: 18px 0 0; text-align: left; color: var(--ink); font-weight: 400; white-space: normal; }
.receipt .sum td > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.receipt .sum span { font-family: var(--display); letter-spacing: 0.14em; font-size: 18px; text-transform: uppercase; }
.receipt .sum .amt { font-size: 34px; line-height: 1.1; letter-spacing: 0.02em; color: var(--brand); }
.bill .small { line-height: 1.5; }

.bill-notes { display: grid; gap: 14px; padding: 0 4px; font-size: 15px; color: var(--muted); }
.bill-notes b { color: var(--ink); font-weight: 600; }

/* The aside: what a plan costs elsewhere, as a short tally ending in ours */
.plans { margin: 22px 0 0; border-top: 1px solid var(--ink); }
.plans > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 11px 0; border-bottom: 1px dashed var(--line); }
.plans dt { font-size: 15px; color: var(--muted); }
.plans dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.plans > .ours { border-bottom: 0; border-top: 3px double var(--ink); margin-top: 10px; padding-top: 14px; }
.plans .ours dt { font-family: var(--display); font-size: 16px; letter-spacing: 0.14em; color: var(--ink); }
.plans .ours dd { font-family: var(--display); font-weight: 400; font-size: 30px; line-height: 1; color: var(--brand); }

/* ── What free means here ─────────────────────────── */
.frees { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.frees li { padding: 26px 26px 30px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
/* A small "none" sign: a ring with a stroke through it, in the brand green */
.frees h3::before {
  content: ''; display: block; width: 28px; height: 28px; margin-bottom: 18px; border-radius: 50%;
  border: 1.5px solid var(--brand);
  background: linear-gradient(45deg, transparent calc(50% - 0.75px), var(--brand) calc(50% - 0.75px), var(--brand) calc(50% + 0.75px), transparent calc(50% + 0.75px));
}
.frees h3 { font-size: 22px; line-height: 1.15; }
.frees p { margin-top: 10px; font-size: 15.5px; color: var(--muted); }
@media (max-width: 920px) { .frees { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .frees { grid-template-columns: minmax(0, 1fr); }
  .frees li { padding: 22px 20px 24px; }
  /* The heading text sits in one span, so the flex gap falls only between the sign and the words. */
  .frees h3 { display: flex; align-items: center; gap: 14px; }
  .frees h3::before { flex: none; width: 24px; height: 24px; margin: 0; }
}

/* ── Why it can be free ───────────────────────────── */
.why-free { position: relative; overflow: hidden; }
.why-free .wrap { position: relative; }
/* The Khalis arch, faint, in the empty corner beside the heading */
.why-free .arch-bg { position: absolute; right: 4%; top: 64px; height: 330px; width: auto; opacity: 0.07; pointer-events: none; color: var(--on-deep); }
/* Below 920px there is no empty corner left: the arch would run behind the text, so it goes. */
@media (max-width: 920px) { .why-free .arch-bg { display: none; } }
.why-free .section-head h2 { color: var(--on-deep); }

.where { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 0.85fr); border-top: 1px solid rgba(246, 241, 230, 0.35); }
.where li { display: grid; align-content: start; gap: 10px; padding: 26px 28px 8px 0; }
.where li + li { padding-left: 28px; border-left: 1px solid rgba(246, 241, 230, 0.18); }
.where h3 { font-size: 19px; line-height: 1.2; letter-spacing: 0.06em; margin-bottom: 4px; }
.where p { font-size: 15.5px; line-height: 1.55; opacity: 0.85; }
.where .nil { font-family: var(--display); font-size: clamp(46px, 5vw, 64px); line-height: 1; letter-spacing: 0.04em; color: var(--sunrise); opacity: 1; }
@media (max-width: 920px) {
  .where { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .where li:nth-child(odd) { padding-left: 0; border-left: 0; }
  .where li:nth-child(n + 3) { border-top: 1px solid rgba(246, 241, 230, 0.18); margin-top: 18px; }
}
@media (max-width: 560px) {
  .where { grid-template-columns: minmax(0, 1fr); }
  .where li, .where li + li { padding: 22px 0 6px; border-left: 0; }
  .where li + li { border-top: 1px solid rgba(246, 241, 230, 0.18); margin-top: 14px; }
}

/* ── A calm close ─────────────────────────────────── */
/* The heading on the left, the way on to the right; the footer below carries the full list of pages. */
.closing .inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: 20px 72px; align-items: end; }
.closing h2 { font-size: clamp(30px, 3.8vw, 48px); line-height: 1.08; margin-top: 12px; }
.closing .inner p { font-size: 18px; color: var(--muted); max-width: 30em; }
.closing .btn { margin-top: 24px; }
@media (max-width: 920px) { .closing .inner { grid-template-columns: minmax(0, 1fr); } }
