/* =========================================================================
   PDFMinter — document styles (shared by editor, preview, image export & print)
   Theme variables are set inline on .pdfm-doc by JS.
   ========================================================================= */
.pdfm-doc {
	--d-color: #047857; --d-color-dark: #064e3b; --d-accent: #7c3aed;
	--d-soft: rgba(4,120,87,.08); --d-soft2: rgba(4,120,87,.16); --d-on: #fff;
	--d-head: 'Poppins'; --d-body: 'Inter';
	--d-ink: #0f172a; --d-text: #1f2937; --d-muted: #64748b; --d-line: #e2e8f0;
	font-family: var(--d-body), -apple-system, 'Segoe UI', Roboto, sans-serif;
	color: var(--d-text); font-size: 15px; line-height: 1.65; text-align: left;
	-webkit-font-smoothing: antialiased; letter-spacing: normal; word-spacing: normal; text-transform: none;
	-webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.pdfm-doc *, .pdfm-doc *::before, .pdfm-doc *::after { box-sizing: border-box; }
.pdfm-doc .pdfm-blk { margin: 0 0 14px; padding: 0; border: 0; background: none; }
.pdfm-doc .pdfm-blk a { color: var(--d-color); text-decoration: underline; text-underline-offset: 2px; }
.pdfm-doc .pdfm-blk b, .pdfm-doc .pdfm-blk strong { font-weight: 700; color: var(--d-ink); }
.pdfm-doc .pdfm-blk mark { background: var(--d-soft2); color: inherit; padding: 0 3px; border-radius: 3px; }

/* ---------- Pages ---------- */
.pdfm-page { position: relative; background: #fff; overflow: hidden; flex: none; }
.pdfm-page-body { position: absolute; }
.pdfm-page-content { display: flow-root; }
.pdfm-page-foot { position: absolute; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 10.5px; color: var(--d-muted); font-family: var(--d-body), sans-serif; letter-spacing: .02em; }
.pdfm-page-foot .pdfm-foot-left { display: flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdfm-page-foot img { height: 16px; width: auto; max-width: 80px; object-fit: contain; }
.pdfm-page-foot .pdfm-foot-num { font-weight: 700; color: var(--d-color); min-width: 22px; text-align: right; }
.pdfm-page-foot::before { content: ''; position: absolute; left: 0; right: 0; top: -10px; height: 1px; background: var(--d-line); }

/* ---------- Headings ---------- */
.pdfm-doc .pdfm-heading { font-family: var(--d-head), var(--d-body), sans-serif; color: var(--d-ink); font-weight: 700; line-height: 1.22; letter-spacing: -.01em; }
.pdfm-doc .pdfm-h1 { font-size: 29px; margin: 10px 0 14px; padding-top: 2px; }
.pdfm-doc .pdfm-h2 { font-size: 21px; margin: 8px 0 10px; color: var(--d-color-dark); }
.pdfm-doc .pdfm-h3 { font-size: 16px; margin: 6px 0 8px; text-transform: uppercase; letter-spacing: .06em; color: var(--d-color); }
.pdfm-doc.pdfm-hs-bar .pdfm-h1::before { content: ''; display: block; width: 44px; height: 5px; border-radius: 4px; background: linear-gradient(90deg, var(--d-color), var(--d-accent)); margin-bottom: 12px; }
.pdfm-doc.pdfm-hs-number .pdfm-h1 { display: flex; align-items: baseline; gap: 12px; }
.pdfm-doc .pdfm-h-num { font-size: .8em; color: var(--d-color); font-weight: 800; flex: none; opacity: .9; }
.pdfm-doc.pdfm-hs-plain .pdfm-h1 { border-bottom: 2px solid var(--d-soft2); padding-bottom: 8px; }
.pdfm-doc .pdfm-h-text { outline: none; }

/* ---------- Paragraphs ---------- */
.pdfm-doc .pdfm-p { margin: 0; outline: none; }
.pdfm-doc .pdfm-align-center .pdfm-p { text-align: center; }
.pdfm-doc .pdfm-align-justify .pdfm-p { text-align: justify; }
.pdfm-doc .pdfm-size-lead .pdfm-p { font-size: 18px; line-height: 1.6; color: var(--d-ink); }
.pdfm-doc .pdfm-size-small .pdfm-p { font-size: 13px; color: var(--d-muted); }

/* ---------- Lists ---------- */
.pdfm-doc ul.pdfm-ul, .pdfm-doc ol.pdfm-ul { list-style: none; margin: 0; padding: 0; counter-reset: pdfmli; }
.pdfm-doc ol.pdfm-ul { counter-reset: pdfmli var(--start, 0); }
.pdfm-doc .pdfm-ul > li { position: relative; margin: 0 0 7px; padding: 0 0 0 28px; outline: none; list-style: none; }
.pdfm-doc ul.pdfm-ul > li::before { content: ''; position: absolute; left: 6px; top: .62em; width: 8px; height: 8px; border-radius: 50%; background: var(--d-color); box-shadow: 0 0 0 4px var(--d-soft); }
.pdfm-doc ol.pdfm-ul > li { counter-increment: pdfmli; padding-left: 34px; }
.pdfm-doc ol.pdfm-ul > li::before { content: counter(pdfmli); position: absolute; left: 0; top: .12em; width: 23px; height: 23px; border-radius: 50%; background: var(--d-color); color: var(--d-on); font-size: 12px; font-weight: 700; line-height: 23px; text-align: center; font-family: var(--d-head), sans-serif; }

/* ---------- Checklist ---------- */
.pdfm-doc ul.pdfm-check { list-style: none; margin: 0; padding: 0; }
.pdfm-doc .pdfm-check > li { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 8px; padding: 9px 12px; border-radius: 10px; background: var(--d-soft); list-style: none; }
.pdfm-doc .pdfm-box { flex: none; width: 18px; height: 18px; border: 2px solid var(--d-color); border-radius: 5px; margin-top: .18em; background: #fff; }
.pdfm-doc .pdfm-check-text { flex: 1; outline: none; min-width: 0; }

/* ---------- Callout ---------- */
.pdfm-doc .pdfm-callout { display: flex; gap: 14px; padding: 16px 18px; border-radius: 14px; background: var(--d-soft); border-left: 5px solid var(--d-color); }
.pdfm-doc .pdfm-callout-icon { flex: none; width: 32px; height: 32px; border-radius: 10px; background: var(--d-color); color: var(--d-on); display: flex; align-items: center; justify-content: center; }
.pdfm-doc .pdfm-callout-icon svg { width: 18px; height: 18px; }
.pdfm-doc .pdfm-callout-body { flex: 1; min-width: 0; }
.pdfm-doc .pdfm-callout-label { font-family: var(--d-head), sans-serif; font-weight: 700; color: var(--d-ink); font-size: 14px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 3px; outline: none; }
.pdfm-doc .pdfm-callout-text { outline: none; }
.pdfm-doc .pdfm-callout-warning { background: #fff7ed; border-left-color: #f59e0b; }
.pdfm-doc .pdfm-callout-warning .pdfm-callout-icon { background: #f59e0b; color: #fff; }
.pdfm-doc .pdfm-callout-note { background: #f1f5f9; border-left-color: #64748b; }
.pdfm-doc .pdfm-callout-note .pdfm-callout-icon { background: #475569; color: #fff; }
.pdfm-doc .pdfm-callout-success { background: linear-gradient(135deg, var(--d-soft), rgba(124,58,237,.07)); border-left-color: var(--d-accent); }
.pdfm-doc .pdfm-callout-success .pdfm-callout-icon { background: var(--d-accent); color: #fff; }

/* ---------- Quote ---------- */
.pdfm-doc .pdfm-quote { position: relative; padding: 18px 22px 16px 60px; margin: 18px 0; border-radius: 14px; background: #fafafa; border: 1px solid var(--d-line); }
.pdfm-doc .pdfm-quote-mark { position: absolute; left: 16px; top: 2px; font-family: Georgia, serif; font-size: 64px; line-height: 1; color: var(--d-color); opacity: .9; }
.pdfm-doc .pdfm-quote-text { font-family: var(--d-head), serif; font-size: 18px; line-height: 1.5; color: var(--d-ink); font-style: italic; outline: none; }
.pdfm-doc .pdfm-quote-cite { margin-top: 8px; font-size: 13px; color: var(--d-muted); font-weight: 600; outline: none; }
.pdfm-doc .pdfm-quote-cite:not(:empty)::before { content: '— '; }

/* ---------- Divider ---------- */
.pdfm-doc .pdfm-divider { padding: 8px 0; }
.pdfm-doc .pdfm-divider span { display: block; height: 1px; background: var(--d-line); }
.pdfm-doc .pdfm-divider-dots span { height: 6px; background: radial-gradient(circle, var(--d-color) 2px, transparent 2.5px) center / 18px 6px repeat-x; opacity: .6; width: 120px; margin: 0 auto; }
.pdfm-doc .pdfm-divider-accent span { height: 4px; width: 64px; border-radius: 4px; background: linear-gradient(90deg, var(--d-color), var(--d-accent)); }

/* ---------- Image ---------- */
.pdfm-doc .pdfm-figure { margin: 6px auto 16px; text-align: center; }
.pdfm-doc .pdfm-figure img { display: block; width: 100%; height: auto; max-width: 100%; border-radius: 12px; margin: 0 auto; border: 0; box-shadow: none; }
.pdfm-doc .pdfm-w-wide { width: 75%; } .pdfm-doc .pdfm-w-half { width: 50%; } .pdfm-doc .pdfm-w-full { width: 100%; }
.pdfm-doc .pdfm-figure figcaption, .pdfm-doc .pdfm-caption { font-size: 12.5px; color: var(--d-muted); margin-top: 8px; outline: none; text-align: center; }

/* ---------- Table of contents ---------- */
.pdfm-doc .pdfm-toc { padding: 4px 0; }
.pdfm-doc .pdfm-toc-title { font-family: var(--d-head), sans-serif; font-size: 29px; font-weight: 700; color: var(--d-ink); margin-bottom: 18px; outline: none; }
.pdfm-doc .pdfm-toc ol { list-style: none; margin: 0; padding: 0; }
.pdfm-doc .pdfm-toc li { display: flex; align-items: baseline; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--d-line); margin: 0; list-style: none; }
.pdfm-doc .pdfm-toc li .n { font-family: var(--d-head), sans-serif; font-weight: 800; color: var(--d-color); min-width: 28px; font-size: 14px; }
.pdfm-doc .pdfm-toc li .t { flex: 1; font-weight: 600; color: var(--d-ink); min-width: 0; }
.pdfm-doc .pdfm-toc li .pg { font-weight: 700; color: var(--d-muted); font-size: 13px; min-width: 20px; text-align: right; }
.pdfm-doc .pdfm-toc li.lvl2 { padding: 5px 0 5px 40px; border-bottom: 0; }
.pdfm-doc .pdfm-toc li.lvl2 .t { font-weight: 400; color: var(--d-text); font-size: 14px; }
.pdfm-doc .pdfm-toc-empty { color: var(--d-muted); font-size: 13px; font-style: italic; }

/* ---------- Worksheet lines ---------- */
.pdfm-doc .pdfm-lines-prompt { font-weight: 700; color: var(--d-ink); margin-bottom: 4px; outline: none; }
.pdfm-doc .pdfm-line { height: 34px; border-bottom: 1.5px solid #cbd5e1; }
.pdfm-doc .pdfm-lines-box .pdfm-lines-area { border: 1.5px solid #cbd5e1; border-radius: 12px; margin-top: 8px; }
.pdfm-doc .pdfm-lines-box .pdfm-line { border-bottom: 0; }

/* ---------- Table ---------- */
.pdfm-doc table.pdfm-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; border: 1px solid var(--d-line); border-radius: 12px; overflow: hidden; margin: 0; table-layout: fixed; }
.pdfm-doc table.pdfm-table th, .pdfm-doc table.pdfm-table td { padding: 9px 12px; text-align: left; vertical-align: top; border: 0; border-bottom: 1px solid var(--d-line); outline: none; word-wrap: break-word; background: transparent; color: var(--d-text); }
.pdfm-doc table.pdfm-table tr:last-child td { border-bottom: 0; }
.pdfm-doc table.pdfm-table th { background: var(--d-color); color: var(--d-on); font-family: var(--d-head), sans-serif; font-weight: 700; font-size: 12.5px; letter-spacing: .02em; }
.pdfm-doc table.pdfm-table tr:nth-child(even) td { background: #f8fafc; }
.pdfm-doc table.pdfm-table td { height: 38px; }

/* ---------- Cover (full page) ---------- */
.pdfm-doc .pdfm-cover { position: absolute; inset: 0; overflow: hidden; font-family: var(--d-body), sans-serif; }
.pdfm-doc .pdfm-cover-title { font-family: var(--d-head), sans-serif; font-weight: 800; line-height: 1.08; letter-spacing: -.02em; outline: none; font-size: 50px; }
.pdfm-doc .pdfm-cover-sub { font-size: 19px; line-height: 1.45; outline: none; margin-top: 18px; }
.pdfm-doc .pdfm-cover-badge { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; padding: 7px 14px; border-radius: 99px; outline: none; }
.pdfm-doc .pdfm-cover-author { font-size: 14px; font-weight: 600; outline: none; }
.pdfm-doc .pdfm-cover-logo { height: 44px; width: auto; max-width: 180px; object-fit: contain; }
.pdfm-doc .pdfm-cover-logo-chip { display: inline-flex; background: #fff; border-radius: 12px; padding: 8px 12px; }

/* bold */
.pdfm-doc .pdfm-cover-bold { background: linear-gradient(155deg, var(--d-color) 0%, var(--d-color-dark) 100%); color: var(--d-on); }
.pdfm-doc .pdfm-cover-bold .pdfm-cover-bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .22; mix-blend-mode: luminosity; }
.pdfm-doc .pdfm-cover-bold .pdfm-deco1 { position: absolute; width: 520px; height: 520px; border-radius: 50%; right: -180px; top: -160px; background: rgba(255,255,255,.08); }
.pdfm-doc .pdfm-cover-bold .pdfm-deco2 { position: absolute; width: 340px; height: 340px; border-radius: 50%; left: -120px; bottom: -120px; border: 60px solid rgba(255,255,255,.06); }
.pdfm-doc .pdfm-cover-bold .pdfm-deco3 { position: absolute; width: 180px; height: 180px; border-radius: 40px; right: 70px; bottom: 150px; background: var(--d-accent); opacity: .55; transform: rotate(18deg); }
.pdfm-doc .pdfm-cover-bold .pdfm-cover-in { position: absolute; left: 72px; right: 72px; top: 72px; bottom: 72px; display: flex; flex-direction: column; }
.pdfm-doc .pdfm-cover-bold .pdfm-cover-mid { margin-top: auto; margin-bottom: auto; }
.pdfm-doc .pdfm-cover-bold .pdfm-cover-badge { background: #fff; color: var(--d-color-dark); margin-bottom: 26px; }
.pdfm-doc .pdfm-cover-bold .pdfm-cover-title { color: var(--d-on); font-size: 54px; }
.pdfm-doc .pdfm-cover-bold .pdfm-cover-sub { opacity: .88; max-width: 560px; }
.pdfm-doc .pdfm-cover-bold .pdfm-cover-author { display: flex; align-items: center; gap: 12px; opacity: .95; }
.pdfm-doc .pdfm-cover-bold .pdfm-cover-author::before { content: ''; width: 36px; height: 2px; background: currentColor; opacity: .6; }

/* split */
.pdfm-doc .pdfm-cover-split { background: #fff; color: var(--d-ink); }
.pdfm-doc .pdfm-cover-split .pdfm-cover-top { position: absolute; left: 0; right: 0; top: 0; height: 52%; background: linear-gradient(135deg, var(--d-color), var(--d-color-dark)); background-size: cover; background-position: center; }
.pdfm-doc .pdfm-cover-split .pdfm-cover-top::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 20% 30%, rgba(255,255,255,.14) 0 2px, transparent 3px) 0 0 / 26px 26px; }
.pdfm-doc .pdfm-cover-split .pdfm-cover-top.has-img::after { background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.35)); }
.pdfm-doc .pdfm-cover-split .pdfm-cover-toprow { position: absolute; left: 72px; right: 72px; top: 64px; display: flex; justify-content: space-between; align-items: center; z-index: 2; }
.pdfm-doc .pdfm-cover-split .pdfm-cover-badge { background: rgba(255,255,255,.95); color: var(--d-color-dark); }
.pdfm-doc .pdfm-cover-split .pdfm-cover-card { position: absolute; left: 56px; right: 56px; top: 44%; background: #fff; border-radius: 22px; padding: 40px 40px 34px; box-shadow: 0 30px 60px rgba(15,23,42,.14); z-index: 2; }
.pdfm-doc .pdfm-cover-split .pdfm-cover-card::before { content: ''; display: block; width: 56px; height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--d-color), var(--d-accent)); margin-bottom: 20px; }
.pdfm-doc .pdfm-cover-split .pdfm-cover-title { font-size: 44px; color: var(--d-ink); }
.pdfm-doc .pdfm-cover-split .pdfm-cover-sub { color: var(--d-muted); }
.pdfm-doc .pdfm-cover-split .pdfm-cover-author { position: absolute; left: 72px; bottom: 60px; color: var(--d-muted); }

/* minimal */
.pdfm-doc .pdfm-cover-minimal { background: #fff; color: var(--d-ink); }
.pdfm-doc .pdfm-cover-minimal .pdfm-cover-bar { position: absolute; left: 0; right: 0; top: 0; height: 14px; background: linear-gradient(90deg, var(--d-color), var(--d-accent)); }
.pdfm-doc .pdfm-cover-minimal .pdfm-cover-in { position: absolute; left: 80px; right: 80px; top: 96px; bottom: 80px; display: flex; flex-direction: column; }
.pdfm-doc .pdfm-cover-minimal .pdfm-cover-badge { padding: 0; color: var(--d-color); letter-spacing: .2em; margin-top: 150px; }
.pdfm-doc .pdfm-cover-minimal .pdfm-cover-title { font-size: 52px; margin-top: 18px; }
.pdfm-doc .pdfm-cover-minimal .pdfm-cover-title::after { content: ''; display: block; width: 80px; height: 5px; background: var(--d-color); border-radius: 4px; margin-top: 26px; }
.pdfm-doc .pdfm-cover-minimal .pdfm-cover-sub { color: var(--d-muted); max-width: 520px; }
.pdfm-doc .pdfm-cover-minimal .pdfm-cover-img { margin-top: 30px; height: 250px; border-radius: 18px; background-size: cover; background-position: center; }
.pdfm-doc .pdfm-cover-minimal .pdfm-cover-author { margin-top: auto; color: var(--d-muted); }

/* band */
.pdfm-doc .pdfm-cover-band { background: #f8fafc; color: var(--d-ink); }
.pdfm-doc .pdfm-cover-band .pdfm-cover-in { position: absolute; left: 0; right: 0; top: 0; bottom: 0; display: flex; flex-direction: column; justify-content: center; }
.pdfm-doc .pdfm-cover-band .pdfm-cover-toprow { position: absolute; left: 72px; right: 72px; top: 64px; display: flex; justify-content: space-between; }
.pdfm-doc .pdfm-cover-band .pdfm-cover-badge { background: var(--d-soft2); color: var(--d-color-dark); }
.pdfm-doc .pdfm-cover-band .pdfm-cover-strip { background: linear-gradient(120deg, var(--d-color), var(--d-color-dark)); color: var(--d-on); padding: 70px 72px 64px; position: relative; overflow: hidden; }
.pdfm-doc .pdfm-cover-band .pdfm-cover-strip::after { content: ''; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%; background: var(--d-accent); opacity: .35; }
.pdfm-doc .pdfm-cover-band .pdfm-cover-title { color: var(--d-on); position: relative; z-index: 1; }
.pdfm-doc .pdfm-cover-band .pdfm-cover-sub { color: var(--d-on); opacity: .88; position: relative; z-index: 1; }
.pdfm-doc .pdfm-cover-band .pdfm-cover-author { position: absolute; left: 72px; bottom: 64px; color: var(--d-muted); }

/* ---------- Print ---------- */
@media print {
	.pdfm-page { box-shadow: none !important; margin: 0 !important; break-after: page; page-break-after: always; }
	.pdfm-page:last-child { break-after: auto; page-break-after: auto; }
}
