/* Same two fonts the original used, self-hosted (build.mjs copies them from the bundle). */
@font-face { font-family: 'Chakra Petch'; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/chakra-petch-700.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/fonts/inter-var.woff2) format('woff2'); }

/* Original page base styles */
a { color: #15675F; } a:hover { color: #0F2A28; }
* { box-sizing: border-box; }
html { background: #e7e9ec; }
body { margin: 0; font-family: Inter, system-ui, sans-serif; }

/* App chrome */
#bar { position: fixed; top: 0; left: 0; right: 0; height: 48px; z-index: 10; display: flex; align-items: center; gap: 8px; padding: 0 16px; background: #0F2A28; color: #fff; font: 500 13px Inter, system-ui, sans-serif; }
#bar button { font: inherit; color: #fff; background: #1d4a46; border: 1px solid #2c6b65; border-radius: 6px; padding: 6px 12px; cursor: pointer; }
#bar button:hover:not(:disabled) { background: #28A69C; }
#bar button:disabled { opacity: .35; cursor: default; }
#bar .gap { flex: 1; }
#status { opacity: .75; min-width: 120px; text-align: right; }
.edit-only { display: none; }
body.can-edit .edit-only { display: inline-block; }
body.can-edit .view-only { display: none; }

#stage { padding: 72px 0 40px; }
.page { width: 816px; height: 1056px; margin: 0 auto 28px; background: #fff; box-shadow: 0 2px 14px rgba(0,0,0,.18); overflow: hidden; position: relative; }
body.can-edit .page { outline: none; caret-color: #28A69C; }
body.can-edit .page img { cursor: pointer; }
body.can-edit .page img:hover { outline: 2px dashed #28A69C; }

dialog { border: 0; border-radius: 10px; padding: 24px; width: 320px; box-shadow: 0 10px 40px rgba(0,0,0,.3); font: 14px Inter, system-ui, sans-serif; }
dialog::backdrop { background: rgba(15,42,40,.55); }
dialog h2 { margin: 0 0 14px; font: 700 18px 'Chakra Petch', sans-serif; }
dialog label { display: block; margin-bottom: 10px; font-size: 12px; color: #555; }
dialog input { display: block; width: 100%; margin-top: 4px; padding: 8px 10px; font: inherit; border: 1px solid #bbb; border-radius: 6px; }
dialog .row { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }
dialog button { font: inherit; padding: 7px 14px; border-radius: 6px; border: 1px solid #bbb; background: #fff; cursor: pointer; }
dialog button.primary { background: #28A69C; border-color: #28A69C; color: #fff; }
#loginErr { color: #b3261e; font-size: 12px; min-height: 16px; }

/* Print = the "download": Save as PDF in the print dialog gives the same 8.5x11in pages. */
@page { size: 816px 1056px; margin: 0; }
@media print {
  html, body { background: #fff; }
  #bar, dialog { display: none !important; }
  #stage { padding: 0; }
  .page { margin: 0; box-shadow: none; break-after: page; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .page:last-child { break-after: auto; }
  .page img { outline: none !important; }
}
