/* Letters & Certificates: shared by the on-screen preview and dompdf (PDF).
   Keep to CSS that dompdf understands: no variables, flexbox, or grid. */
@font-face { font-family: 'EB Garamond'; font-style: normal; font-weight: normal; src: url('fonts/EBGaramond-Regular.ttf') format('truetype'); }
@font-face { font-family: 'EB Garamond'; font-style: italic; font-weight: normal; src: url('fonts/EBGaramond-Italic.ttf') format('truetype'); }
@font-face { font-family: 'EB Garamond'; font-style: normal; font-weight: bold; src: url('fonts/EBGaramond-Bold.ttf') format('truetype'); }
@font-face { font-family: 'Cinzel'; font-style: normal; font-weight: normal; src: url('fonts/Cinzel-Regular.ttf') format('truetype'); }
@font-face { font-family: 'Cinzel'; font-style: normal; font-weight: bold; src: url('fonts/Cinzel-Bold.ttf') format('truetype'); }
@font-face { font-family: 'Great Vibes'; font-style: normal; font-weight: normal; src: url('fonts/GreatVibes-Regular.ttf') format('truetype'); }
@font-face { font-family: 'Pinyon Script'; font-style: normal; font-weight: normal; src: url('fonts/PinyonScript-Regular.ttf') format('truetype'); }
@font-face { font-family: 'Lato'; font-style: normal; font-weight: normal; src: url('fonts/Lato-Regular.ttf') format('truetype'); }
@font-face { font-family: 'Lato'; font-style: normal; font-weight: bold; src: url('fonts/Lato-Bold.ttf') format('truetype'); }

body.pdf { margin: 0; }
.sheet, .sheet * { box-sizing: content-box; }
.sheet { position: relative; background: #fff; color: #222; overflow: hidden; }
.sheet + .sheet { page-break-before: always; }

/* ---------- Letters (8.5 x 11 portrait) ---------- */
.letter { width: 6.5in; height: 9.3in; padding: 0.55in 1in 1.15in 1in; font-family: 'EB Garamond', serif; font-size: 12.5pt; line-height: 1.42; }
.lh-band { display: none; }
.lh-head { text-align: center; }
.lh-logo { max-height: 0.85in; max-width: 2.6in; margin: 0 auto 6px; display: block; }
.lh-name { font-family: 'Cinzel', serif; font-size: 20pt; letter-spacing: 1.5px; line-height: 1.15; }
.lh-tag { font-style: italic; font-size: 11pt; color: #555; margin-top: 2px; }
.lh-rule { border-top: 2px solid #1d2f5c; margin: 10px 0 26px; height: 0; }
.lh-space { height: 1.45in; }
.lh-foot { position: absolute; left: 1in; top: 10.25in; width: 6.5in; text-align: center; font-size: 9pt; color: #555; line-height: 1.35; }
.lh-verse { font-style: italic; margin-top: 3px; }
.lt-body p { margin: 0 0 12px; }
.lt-date { margin-bottom: 18px !important; }
.lt-addr { margin-bottom: 20px !important; }

.lh-modern { font-family: 'Lato', sans-serif; font-size: 11pt; line-height: 1.5; }
.lh-modern .lh-band { display: block; position: absolute; left: 0; top: 0; width: 8.5in; height: 0.22in; }
.lh-modern .lh-head { width: 6.5in; border-collapse: collapse; margin-top: 0.2in; text-align: left; }
.lh-modern .lh-head td { vertical-align: bottom; padding: 0; }
.lh-modern .lh-left { width: 60%; }
.lh-modern .lh-right { width: 40%; text-align: right; font-size: 8.5pt; color: #555; line-height: 1.4; }
.lh-modern .lh-logo { margin: 0 0 6px; max-height: 0.7in; }
.lh-modern .lh-name { font-family: 'Lato', sans-serif; font-weight: bold; font-size: 19pt; letter-spacing: 0.5px; }
.lh-modern .lh-tag { font-style: normal; font-size: 10pt; }
.lh-modern .lh-rule { border-top: 1.5px solid #b08d3c !important; margin: 10px 0 26px; }

.lh-elegant .lh-name { font-family: 'EB Garamond', serif; font-size: 21pt; letter-spacing: 4px; text-transform: uppercase; }
.lh-elegant .lh-rule { border-top-width: 3px; border-top-style: double; }
.lh-elegant .lh-foot { font-size: 9pt; }
.lh-elegant .lh-verse { font-size: 10pt; color: #6b5a2e; }

/* ---------- Certificates (11 x 8.5 landscape) ---------- */
.cert { width: 11in; height: 8.5in; font-family: 'EB Garamond', serif; color: #2a2a2a; }
.cert div { position: absolute; }
.cert .c-sig-line, .cert .c-seal-ring, .cert .c-seal-text { position: static; }
.c-frame1 { left: 0.35in; top: 0.35in; width: 10.18in; height: 7.68in; border: 6px double #1d2f5c; }
.c-frame2 { left: 0.58in; top: 0.58in; width: 9.81in; height: 7.31in; border: 1.5px solid #b08d3c; }
.c-church, .c-title, .c-intro, .c-name { left: 0; width: 11in; text-align: center; }
.c-church { top: 0.98in; font-family: 'Cinzel', serif; font-size: 12pt; letter-spacing: 3px; color: #b08d3c; }
.c-title { top: 1.3in; font-family: 'Cinzel', serif; font-size: 36pt; letter-spacing: 2px; }
.c-intro { top: 2.42in; font-style: italic; font-size: 16pt; color: #444; }
.c-name { top: 2.72in; font-family: 'Great Vibes', cursive; font-size: 50pt; line-height: 1.2; word-spacing: 6px; }
.c-text { top: 3.95in; left: 1.6in; width: 7.8in; text-align: center; font-size: 15pt; line-height: 1.4; }
.c-verse { top: 5.0in; left: 2.1in; width: 6.8in; text-align: center; font-style: italic; font-size: 11.5pt; line-height: 1.35; color: #555; }
.c-ref { font-style: normal; font-family: 'Cinzel', serif; font-size: 9pt; letter-spacing: 1px; color: #b08d3c; }
.c-sig { top: 6.45in; width: 3in; text-align: center; font-size: 11pt; color: #444; }
.c-sig-l { left: 1.25in; }
.c-sig-r { left: 6.75in; }
.c-sig-line { border-top: 1px solid #333; height: 0; margin-bottom: 4px; }
.c-seal { left: 4.95in; top: 5.98in; width: 1.1in; height: 1.1in; text-align: center; }
.c-seal-ring { width: 1.1in; height: 1.1in; border-radius: 0.55in; background: #b08d3c; }
.c-seal-text { width: 0.86in; height: 0.52in; padding-top: 0.34in; margin: 0 auto; position: relative !important; top: 0.12in; border-radius: 0.43in; background: #fff; font-family: 'Cinzel', serif; font-size: 17pt; font-weight: bold; line-height: 1; letter-spacing: 1px; text-align: center; }
.c-seal-logo img { max-width: 1.1in; max-height: 1.1in; }
.c-corner { position: absolute; width: 1.15in; height: 1.15in; }
.c-tl { left: 0.4in; top: 0.4in; }
.c-tr { left: 9.45in; top: 0.4in; }
.c-br { left: 9.45in; top: 6.95in; }
.c-bl { left: 0.4in; top: 6.95in; }

.cs-elegant { background: #fbf7ee; }
.cs-elegant .c-frame1 { left: 0.3in; top: 0.3in; width: 10.38in; height: 7.88in; border: 1px solid #b08d3c; }
.cs-elegant .c-frame2 { left: 0.45in; top: 0.45in; width: 10.04in; height: 7.54in; border: 2.5px solid #1d2f5c; }
.cs-elegant .c-title { top: 1.2in; font-family: 'Pinyon Script', cursive; font-size: 52pt; letter-spacing: 0; }
.cs-elegant .c-church { top: 0.95in; }
.cs-elegant .c-intro { top: 2.45in; }

.cs-modern .c-band { left: 0; top: 0; width: 0.6in; height: 8.5in; }
.cs-modern .c-band-line { left: 0.75in; top: 0; width: 0; height: 8.5in; border-left: 2px solid #b08d3c; }
.cs-modern .c-church, .cs-modern .c-title, .cs-modern .c-intro, .cs-modern .c-name { left: 0.9in; width: 9.8in; }
.cs-modern .c-text { left: 2in; width: 7.6in; font-family: 'Lato', sans-serif; font-size: 13.5pt; }
.cs-modern .c-verse { left: 2.4in; width: 6.8in; }
.cs-modern .c-church { font-family: 'Lato', sans-serif; font-weight: bold; font-size: 11pt; letter-spacing: 5px; text-transform: uppercase; }
.cs-modern .c-title { font-family: 'Lato', sans-serif; font-weight: bold; font-size: 30pt; letter-spacing: 6px; text-transform: uppercase; top: 1.38in; }
.cs-modern .c-intro { font-family: 'Lato', sans-serif; font-style: normal; font-size: 14pt; }
.cs-modern .c-name { font-family: 'EB Garamond', serif; font-style: italic; font-size: 46pt; top: 2.8in; word-spacing: 0; }
.cs-modern .c-sig { font-family: 'Lato', sans-serif; font-size: 10pt; }
.cs-modern .c-sig-l { left: 1.75in; }
.cs-modern .c-seal { left: 5.25in; }

/* Accent colors */
.acc-navy .lh-name, .acc-navy .c-title, .acc-navy .c-name, .acc-navy .c-seal-text { color: #1d2f5c; }
.acc-navy .lh-rule, .acc-navy .c-frame1, .acc-navy.cs-elegant .c-frame2 { border-color: #1d2f5c; }
.acc-navy .lh-band, .acc-navy .c-band { background: #1d2f5c; }
.acc-burgundy .lh-name, .acc-burgundy .c-title, .acc-burgundy .c-name, .acc-burgundy .c-seal-text { color: #6e1f2a; }
.acc-burgundy .lh-rule, .acc-burgundy .c-frame1, .acc-burgundy.cs-elegant .c-frame2 { border-color: #6e1f2a; }
.acc-burgundy .lh-band, .acc-burgundy .c-band { background: #6e1f2a; }
.acc-forest .lh-name, .acc-forest .c-title, .acc-forest .c-name, .acc-forest .c-seal-text { color: #1f4d3a; }
.acc-forest .lh-rule, .acc-forest .c-frame1, .acc-forest.cs-elegant .c-frame2 { border-color: #1f4d3a; }
.acc-forest .lh-band, .acc-forest .c-band { background: #1f4d3a; }
.acc-purple .lh-name, .acc-purple .c-title, .acc-purple .c-name, .acc-purple .c-seal-text { color: #4b2a6b; }
.acc-purple .lh-rule, .acc-purple .c-frame1, .acc-purple.cs-elegant .c-frame2 { border-color: #4b2a6b; }
.acc-purple .lh-band, .acc-purple .c-band { background: #4b2a6b; }
.acc-charcoal .lh-name, .acc-charcoal .c-title, .acc-charcoal .c-name, .acc-charcoal .c-seal-text { color: #2f3236; }
.acc-charcoal .lh-rule, .acc-charcoal .c-frame1, .acc-charcoal.cs-elegant .c-frame2 { border-color: #2f3236; }
.acc-charcoal .lh-band, .acc-charcoal .c-band { background: #2f3236; }
.acc-teal .lh-name, .acc-teal .c-title, .acc-teal .c-name, .acc-teal .c-seal-text { color: #0e5a63; }
.acc-teal .lh-rule, .acc-teal .c-frame1, .acc-teal.cs-elegant .c-frame2 { border-color: #0e5a63; }
.acc-teal .lh-band, .acc-teal .c-band { background: #0e5a63; }

/* ---------- On-screen preview ---------- */
.screen-preview { overflow-x: auto; padding: 8px 0 16px; }
.screen-preview .sheet { margin: 0 auto 24px; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
@media (max-width: 1200px) { .screen-preview .cert { zoom: 0.75; } }
@media (max-width: 900px) { .screen-preview .letter { zoom: 0.8; } .screen-preview .cert { zoom: 0.55; } }
@media (max-width: 640px) { .screen-preview .letter { zoom: 0.42; } .screen-preview .cert { zoom: 0.31; } }
@media print {
  .screen-preview { overflow: visible; padding: 0; }
  .screen-preview .sheet { margin: 0; box-shadow: none; zoom: 1 !important; }
}
.lt-body p.sign-gap { margin-top: 0.55in; }


/* ---------- Reports (flow across pages; portrait) ---------- */
.report { width: 6.8in; min-height: 9.8in; padding: 0.55in 0.85in 0.7in 0.85in; font-family: 'EB Garamond', serif; font-size: 11.5pt; line-height: 1.4; }
body.pdf .report { width: auto; min-height: 0; padding: 0; overflow: visible; }
.report.lh-modern { font-family: 'Lato', sans-serif; font-size: 10pt; }
.report .lh-rule { margin-bottom: 16px; }
.rp-title { font-family: 'Cinzel', serif; font-weight: normal; font-size: 18pt; margin: 0; letter-spacing: 1px; }
.lh-modern .rp-title { font-family: 'Lato', sans-serif; font-weight: bold; font-size: 16pt; letter-spacing: 0; }
.rp-sub { font-style: italic; margin: 2px 0 14px; color: #555; }
.rp-h2 { font-family: 'Cinzel', serif; font-weight: normal; font-size: 12pt; letter-spacing: 1px; margin: 18px 0 6px; page-break-after: avoid; }
.lh-modern .rp-h2 { font-family: 'Lato', sans-serif; font-weight: bold; font-size: 11pt; text-transform: uppercase; letter-spacing: 1.5px; }
.rp-table { width: 100%; border-collapse: collapse; margin: 4px 0 8px; }
.rp-table caption { text-align: left; font-style: italic; color: #555; padding-bottom: 4px; }
.rp-table th, .rp-table td { text-align: left; padding: 4px 6px; border-bottom: 0.75px solid #d8d2c4; vertical-align: top; }
.rp-table thead th { border-bottom: 1.5px solid #1d2f5c; font-weight: bold; }
.rp-table tbody th { font-weight: normal; }
.rp-table .num { text-align: right; white-space: nowrap; }
.rp-table tr.total th, .rp-table tr.total td { font-weight: bold; border-top: 1.5px solid #888; }
.rp-table tr.extra th, .rp-table tr.extra td { color: #444; }
.rp-table tr { page-break-inside: avoid; }
.rp-note { white-space: pre-wrap; }
.rp-empty { font-style: italic; color: #666; }
.rp-foot { margin-top: 24px; font-size: 9.5pt; color: #666; font-style: italic; }
.box { display: inline-block; width: 10px; height: 10px; border: 1px solid #333; }
.rp-table .check { width: 18px; text-align: center; }

.acc-navy .rp-title, .acc-navy .rp-h2 { color: #1d2f5c; } .acc-navy .rp-table thead th { border-bottom-color: #1d2f5c; }
.acc-burgundy .rp-title, .acc-burgundy .rp-h2 { color: #6e1f2a; } .acc-burgundy .rp-table thead th { border-bottom-color: #6e1f2a; }
.acc-forest .rp-title, .acc-forest .rp-h2 { color: #1f4d3a; } .acc-forest .rp-table thead th { border-bottom-color: #1f4d3a; }
.acc-purple .rp-title, .acc-purple .rp-h2 { color: #4b2a6b; } .acc-purple .rp-table thead th { border-bottom-color: #4b2a6b; }
.acc-charcoal .rp-title, .acc-charcoal .rp-h2 { color: #2f3236; } .acc-charcoal .rp-table thead th { border-bottom-color: #2f3236; }
.acc-teal .rp-title, .acc-teal .rp-h2 { color: #0e5a63; } .acc-teal .rp-table thead th { border-bottom-color: #0e5a63; }
body.pdf .sr { display: none; }
.lh-modern .rp-foot, .lh-modern .rp-sub, .lh-modern .rp-empty { font-style: normal; }
.rp-entry { border-top: 0.75px solid #d8d2c4; padding: 6px 0 4px; page-break-inside: avoid; }
.rp-entry-h { font-weight: bold; margin: 0 0 2px; }
.rp-entry .rp-note { margin: 0 0 2px; }
