/* ==========================================================================
   Challan — agreement document. Reads like a formal deed: centred title,
   recital, numbered clauses with generous line height, signature blocks.
   ========================================================================== */

.ag { --fs: 12.5px; line-height: 1.65; padding: var(--pad-y) var(--pad-x) 52px !important; }
.ag.f-serif { --fs: 13.5px; }
.ag::before { display: none; }
.ag.tpl-modern { border-top: 5px solid var(--acc); }

.ag-stamp { height: 300px; margin: calc(-1 * var(--pad-y)) calc(-1 * var(--pad-x)) 28px; border-bottom: 1.5px dashed var(--rule-2); display: grid; place-items: center; background: repeating-linear-gradient(135deg, #fff, #fff 10px, #FAFBFC 10px, #FAFBFC 20px); }
.ag-stamp span { font-size: 11px; color: var(--mute); letter-spacing: .04em; }

.ag-head { display: grid; justify-items: center; text-align: center; gap: 8px; padding-bottom: 18px; margin-bottom: 22px; border-bottom: 2px solid var(--ink); }
.ag-title { font-size: 24px; font-weight: 650; letter-spacing: .02em; color: var(--acc-ink); text-transform: uppercase; }
.f-serif .ag-title { font-weight: 600; letter-spacing: .06em; }
.ag-meta { color: var(--soft); font-size: .92em; display: flex; gap: 16px; }
.ag-meta b { color: var(--ink); font-weight: 600; }

.ag-recital { margin-bottom: 14px !important; }
.ag-parties { display: grid; gap: 4px; margin-bottom: 24px; }
.ag-party { display: grid; grid-template-columns: 26px 1fr; gap: 10px; padding: 12px 14px; border: 1px solid var(--rule); border-radius: 8px; }
.ag-pn { width: 22px; height: 22px; border-radius: 50%; background: var(--acc-tint); color: var(--acc-ink); display: grid; place-items: center; font-size: 11px; font-weight: 650; margin-top: 2px; }
.ag-pname { font-weight: 650; font-size: 14px; }
.ag-co { font-weight: 400; color: var(--soft); }
.ag-paddr, .ag-pids { color: var(--soft); font-size: .94em; }
.ag-role { margin-top: 4px; font-size: .94em; color: var(--soft); }
.ag-role b { color: var(--ink); }
.ag-and { text-align: center; font-style: italic; color: var(--mute); font-size: .92em; }

.ag-h { font-size: 12px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--acc-ink); margin: 0 0 12px; }
.ag-terms { margin-bottom: 26px; padding: 16px 18px; background: var(--fill); border-radius: 8px; }
.ag-terms dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 24px; }
.ag-terms dt { color: var(--mute); font-size: .88em; }
.ag-terms dd { margin: 0; font-weight: 600; }
.ag-prop { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--rule); }
.ag-prop span { display: block; color: var(--mute); font-size: .88em; }

.ag-clauses ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; counter-reset: c; }
.ag-clauses li { counter-increment: c; display: grid; grid-template-columns: 30px 1fr; text-align: justify; hyphens: auto; }
.ag-clauses li::before { content: counter(c) "."; font-weight: 650; color: var(--acc-ink); }
.ag-blank { color: var(--err, #B42318); letter-spacing: 1px; }
.ag-schedule { margin-top: 24px; }
.ag-schedule p { white-space: pre-line; }

.ag-sign { margin-top: 36px; break-inside: avoid; }
.ag-witness-line { font-style: italic; color: var(--soft); margin-bottom: 34px !important; }
.ag-sig-row { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.ag-sig { position: relative; }
.ag-sig .rc-stamp { inset-inline-start: auto; inset-inline-end: -10px; top: -46px; }
.ag-sig .rc-revstamp { inset-inline-start: auto; inset-inline-end: 0; bottom: 60px; }
.ag-sig-l { margin-top: 6px; font-size: .92em; color: var(--soft); }
.ag-sig-l b { display: block; color: var(--ink); }
.ag-wit { margin-top: 34px; break-inside: avoid; }
.ag-wit .ag-sig-l b { font-weight: 500; }

/* Templates that normally rely on a band or sidebar get a plain top for agreements */
.ag.tpl-professional .ag-head, .ag.tpl-luxury .ag-head { border-bottom-color: var(--acc); }
.ag.tpl-luxury .ag-title { color: #14161C; }
.ag.tpl-bold .ag-title { font-size: 34px; letter-spacing: -.02em; text-transform: none; font-family: var(--font-grotesk); }
.ag.tpl-minimal .ag-head { border-bottom-width: 1px; }
.ag.tpl-minimal .ag-terms { background: none; border: 1px solid var(--rule); }
