/* Guide pages (cash book format, udhar band hai, khata apps compared).
   Loaded after styles.css; reuses its tokens, nav, buttons and footer. */
.guide { padding-block: clamp(24px, 4vw, 48px) var(--section); }
.guide__inner { max-width: 820px; margin-inline: auto; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; color: var(--text-2); font-size: var(--fs-small); margin-bottom: 20px; }
.crumbs a { color: var(--ink-soft); font-weight: 600; }
.crumbs a:hover { color: var(--accent-strong); }
.guide h1 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.06; letter-spacing: -0.03em; font-weight: 800; text-wrap: balance; }
.guide .meta { margin-top: 14px; color: var(--text-2); font-size: var(--fs-small); }
.guide .lead { margin-top: 20px; }
.guide h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); max-width: none; margin-top: clamp(40px, 5vw, 64px); margin-bottom: 14px; }
.guide h3 { margin-top: 28px; margin-bottom: 8px; }
.guide p { margin-top: 14px; color: var(--ink-soft); max-width: 68ch; }
.guide p:first-child { margin-top: 0; }
.guide ul.list, .guide ol.list { margin-top: 14px; padding-inline-start: 22px; color: var(--ink-soft); display: grid; gap: 8px; max-width: 68ch; }
.guide ul.list { list-style: disc; }
.guide ol.list { list-style: decimal; }
.guide a.inline { color: var(--accent-strong); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.guide b { color: var(--ink); }

.toc { margin-top: 28px; padding: 20px 24px; border-radius: var(--r); background: var(--surface); }
.toc p { margin: 0 0 8px; font-weight: 700; color: var(--ink); }
.toc ol { padding-inline-start: 20px; list-style: decimal; display: grid; gap: 4px; color: var(--ink-soft); font-size: var(--fs-small); }
.toc a:hover { color: var(--accent-strong); }

.table-wrap { margin-top: 18px; overflow-x: auto; border-radius: var(--r-in); background: var(--surface); -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: 0.9375rem; min-width: 560px; }
.tbl caption { text-align: start; padding: 14px 16px 4px; font-weight: 700; font-size: var(--fs-small); color: var(--ink); }
.tbl th, .tbl td { padding: 10px 14px; text-align: start; border-bottom: 1px solid var(--tone); vertical-align: top; }
.tbl thead th { background: var(--surface-2); font-size: var(--fs-small); font-weight: 700; color: var(--ink); white-space: nowrap; }
.tbl td.num, .tbl th.num { text-align: end; white-space: nowrap; }
.tbl tr.total td { font-weight: 800; color: var(--ink); background: var(--ground); }
.tbl tr.bal td { color: var(--accent-strong); font-weight: 700; }
.tbl tbody tr:last-child td { border-bottom: 0; }

.callout { margin-top: 24px; padding: 20px 24px; border-radius: var(--r); background: var(--accent-muted); color: var(--ink-soft); }
.callout p { margin-top: 8px; }
.callout p:first-child { margin-top: 0; }
.callout--plain { background: var(--surface); }

.cta { margin-top: clamp(40px, 5vw, 64px); padding: clamp(24px, 4vw, 40px); border-radius: var(--r); background: var(--ink); color: #fff; display: grid; gap: 16px; }
.cta h2 { margin: 0; color: #fff; }
.cta p { color: rgba(255, 255, 255, 0.82); margin: 0; }
.cta .actions { display: flex; flex-wrap: wrap; gap: 12px; }
.cta .btn--ghost { background: rgba(255, 255, 255, 0.12); color: #fff; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.faq { margin-top: 18px; display: grid; gap: 10px; }
.faq details { background: var(--surface); border-radius: var(--r-in); padding: 16px 20px; }
.faq summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.faq details p { margin-top: 10px; }
.related { margin-top: 18px; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.related a { display: block; padding: 18px 20px; border-radius: var(--r-in); background: var(--surface); font-weight: 700; }
.related a span { display: block; margin-top: 4px; font-weight: 500; color: var(--text-2); font-size: var(--fs-small); }
.related a:hover { color: var(--accent-strong); }

/* Udhar band hai signs */
.signs { margin-top: 20px; display: grid; gap: 20px; }
.sign-card { background: var(--surface); border-radius: var(--r); padding: 16px; display: grid; gap: 14px; }
.sign { aspect-ratio: 297 / 210; border: 10px solid var(--ink); border-radius: 12px; background: #fff; display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; text-align: center; min-width: 0; width: 100%; overflow: hidden; gap: 2%; padding: 6%; container-type: inline-size; color: var(--ink); }
.sign--red { border-color: var(--expense-strong); }
.sign--red .sign__ur { color: var(--expense-strong); }
.sign--orange { border-color: var(--accent-strong); }
.sign__ur { font-family: "Noto Nastaliq Urdu", "Noto Naskh Arabic", serif; font-weight: 700; font-size: 12cqi; line-height: 2.4; direction: rtl; padding-bottom: 3cqi; }
.sign--long .sign__ur { font-size: 7.5cqi; line-height: 2.3; }
.sign__sub { font-family: "Noto Nastaliq Urdu", "Noto Naskh Arabic", serif; font-size: 5.2cqi; line-height: 2; direction: rtl; }
.sign__ro { font-weight: 800; font-size: 4.4cqi; letter-spacing: 0.02em; }
.sign-card .row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.sign-card .row b { font-size: var(--fs-small); }

@media print {
  @page { size: A4 landscape; margin: 0; }
  body { background: #fff; }
  body.printing-sign > *:not(main) { display: none !important; }
  body.printing-sign main .guide__inner > *:not(.signs) { display: none !important; }
  body.printing-sign .sign-card { display: none; padding: 0; background: none; }
  body.printing-sign .sign-card.is-print { display: block; }
  body.printing-sign .sign-card .row { display: none; }
  body.printing-sign .guide { padding: 0; }
  body.printing-sign .wrap { padding: 0; max-width: none; }
  body.printing-sign .sign { width: 297mm; height: 210mm; border-width: 14mm; border-radius: 0; aspect-ratio: auto; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.printing-table > *:not(main) { display: none !important; }
  body.printing-table .guide__inner > *:not(#print-sheet) { display: none !important; }
  body.printing-table #print-sheet { display: block !important; }
}
#print-sheet { display: none; }
#print-sheet table { width: 100%; border-collapse: collapse; font-size: 11pt; }
#print-sheet th, #print-sheet td { border: 1px solid #333; height: 9mm; padding: 2mm; text-align: start; }
#print-sheet .sheet-title { font-size: 16pt; font-weight: 700; margin-bottom: 4mm; }
