@font-face { font-family: 'HW Trad Cursive'; src: url('/fonts/PlaywriteUSTrad.woff2') format('woff2'); font-weight: 100 400; font-display: swap; }
@font-face { font-family: 'HW Modern Cursive'; src: url('/fonts/PlaywriteUSModern.woff2') format('woff2'); font-weight: 100 400; font-display: swap; }
@font-face { font-family: 'HW Slant Print'; src: url('/fonts/PlaywriteNZ.woff2') format('woff2'); font-weight: 100 400; font-display: swap; }

* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.55 system-ui, sans-serif; color: #1f2933; background: #f4f6f8; }
a { color: #1d5fa8; }
header.site { background: #fff; border-bottom: 1px solid #dde3ea; }
header.site .in, main, footer.site .in { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
header.site .in { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
header.site .brand { font-weight: 700; color: #1f2933; text-decoration: none; }
header.site nav { display: flex; gap: 14px; flex-wrap: wrap; font-size: 14px; }
h1 { font-size: 28px; line-height: 1.25; margin: 24px 0 8px; }
h2 { font-size: 21px; margin: 32px 0 8px; }
.lead { margin: 0 0 20px; max-width: 760px; }

.tool { display: grid; grid-template-columns: 330px 1fr; gap: 20px; align-items: start; }
.panel { background: #fff; border: 1px solid #dde3ea; border-radius: 10px; padding: 16px; }
.panel label { display: block; font-size: 14px; font-weight: 600; margin: 12px 0 4px; }
.panel label.check { font-weight: 400; display: flex; gap: 8px; align-items: center; }
.panel textarea, .panel select { width: 100%; padding: 8px; font: inherit; border: 1px solid #b9c3cf; border-radius: 6px; background: #fff; }
.panel textarea { min-height: 90px; resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
button, .btn { display: inline-block; font: inherit; font-weight: 600; padding: 10px 16px; border-radius: 8px; border: 0; cursor: pointer; text-decoration: none; }
#print { width: 100%; margin-top: 16px; background: #1d5fa8; color: #fff; }
.btn-pro { background: #f0a020; color: #1f2933; }
.note { font-size: 13px; color: #52606d; margin: 8px 0 0; }
#limit { background: #fff6e0; border: 1px solid #f0c060; border-radius: 6px; padding: 8px; font-size: 14px; margin-top: 10px; }
.probox { margin-top: 16px; padding: 12px; border: 1px dashed #f0a020; border-radius: 8px; background: #fffaf0; font-size: 14px; }
.probox h3 { margin: 0 0 6px; font-size: 16px; }
.probox ul { margin: 6px 0 10px; padding-left: 18px; }
/* Pro purchase is shown only when payments are open and the visitor is not Pro. */
.buy, .proonly { display: none; }
body.pay-on:not(.is-pro) .buy { display: block; }
body.is-pro .proonly { display: block; }

.preview { min-width: 0; }
.preview .bar { display: flex; justify-content: space-between; font-size: 14px; color: #52606d; margin-bottom: 8px; }
#pages svg.page { display: block; width: 100%; height: auto; margin-bottom: 16px; background: #fff; box-shadow: 0 1px 6px rgba(0, 0, 0, .18); }
#measure { position: absolute; left: -9999px; top: 0; width: 10px; height: 10px; visibility: hidden; }

.content { max-width: 760px; }
.content li { margin: 4px 0; }
.links { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; padding: 0; list-style: none; }
.links a { display: block; padding: 12px; background: #fff; border: 1px solid #dde3ea; border-radius: 8px; text-decoration: none; }
footer.site { margin-top: 40px; background: #fff; border-top: 1px solid #dde3ea; font-size: 13px; color: #52606d; }
footer.site .in { padding-top: 16px; padding-bottom: 24px; }

@media (max-width: 820px) { .tool { grid-template-columns: 1fr; } }

@media print {
  body { background: #fff; }
  header.site, footer.site, .panel, .content, .preview .bar, h1, .lead { display: none !important; }
  main, .tool, .preview { display: block; margin: 0; padding: 0; max-width: none; }
  #pages svg.page { width: var(--w); height: var(--h); margin: 0; box-shadow: none; break-after: page; }
  #pages svg.page:last-child { break-after: auto; }
}
