@page p69 { size: 6in 9in; margin: 0.5in; }
@page p85x11 { size: 8.5in 11in; margin: 0.5in; }
@page p8x10 { size: 8in 10in; margin: 0.5in; }

* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: #1b1b1b; background: #f6f4ee; line-height: 1.5; }
a { color: #0b4f8a; }
header.top, main.page, footer.foot { max-width: 60rem; margin: 0 auto; padding: 1rem; }
header.top h1 { margin: 0.5rem 0 0.25rem; font-size: 1.8rem; }
.tagline { margin: 0; color: #444; }
.langs { color: #555; font-size: 0.95rem; }
nav.links a { margin-right: 1rem; }
.panel { background: #fff; border: 1px solid #d8d4c8; border-radius: 8px; padding: 1rem; margin: 1rem 0; }
.panel h2 { margin-top: 0; font-size: 1.2rem; }
.row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: end; margin-bottom: 0.75rem; }
.row label { display: flex; flex-direction: column; font-size: 0.9rem; gap: 0.2rem; }
.row label.inline { flex-direction: row; align-items: center; gap: 0.4rem; }
input[type=text], input[type=number], select, textarea { font: inherit; padding: 0.35rem; border: 1px solid #aaa; border-radius: 4px; }
textarea { width: 100%; min-height: 9rem; }
button, a.button { font: inherit; padding: 0.5rem 1rem; border: 0; border-radius: 6px; background: #0b4f8a; color: #fff; cursor: pointer; text-decoration: none; display: inline-block; }
button.alt { background: #4a4a4a; }
.status { font-size: 0.9rem; color: #333; min-height: 1.4rem; }
.note { font-size: 0.9rem; color: #444; }
.price { font-size: 1.4rem; font-weight: 700; }
.buy { border: 1px dashed #8a8472; border-radius: 6px; background: #faf8f1; padding: 0.75rem; }
.disclose { font-size: 0.9rem; border-top: 1px solid #ddd; margin-top: 1rem; padding-top: 0.75rem; color: #333; }
.legal h2 { margin-top: 1.5rem; }

#output { margin: 1rem 0; display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.sheet { background: #fff; border: 1px solid #bbb; padding: 0.25in; color: #000; }
.trim-6x9 .sheet { width: 5in; page: p69; }
.trim-85x11 .sheet { width: 7.5in; page: p85x11; }
.trim-8x10 .sheet { width: 7in; page: p8x10; }
.ptitle { text-align: center; font-size: 20pt; margin: 0 0 0.1in; }
.pnum { text-align: center; margin: 0 0 0.1in; font-size: 10pt; }
.g { display: grid; grid-template-columns: repeat(var(--n), 1fr); container-type: inline-size; border: 1.5px solid #000; width: 100%; margin: 0 auto; }
.trim-85x11 .g { width: 6.2in; }
.trim-8x10 .g { width: 5.8in; }
.trim-6x9 .g { width: 4.6in; }
.c { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: calc(68cqw / var(--n)); font-family: "DejaVu Sans Mono", Menlo, Consolas, monospace; font-weight: 600; line-height: 1; }
.c.hit { background: #d0d0d0; font-weight: 800; }
.n10 { --n: 10; } .n11 { --n: 11; } .n12 { --n: 12; } .n13 { --n: 13; }
.n14 { --n: 14; } .n15 { --n: 15; } .n16 { --n: 16; } .n17 { --n: 17; }
.n18 { --n: 18; } .n19 { --n: 19; } .n20 { --n: 20; } .n21 { --n: 21; }
.n22 { --n: 22; } .n23 { --n: 23; } .n24 { --n: 24; } .n25 { --n: 25; }
.wl { list-style: none; margin: 0.15in auto 0; padding: 0; column-count: 3; column-gap: 0.2in; font-size: 10.5pt; font-weight: 600; }
.wl li { break-inside: avoid; padding: 1px 0; }

@media print {
  body { background: #fff; }
  .noprint { display: none !important; }
  #output { margin: 0; display: block; }
  .sheet { border: 0; padding: 0; margin: 0 auto; break-after: page; break-inside: avoid; }
  .sheet:last-child { break-after: auto; }
}
