/* Printables · "Exercise book": ruled paper, red margin, fountain-pen blue, Kalam handwriting for headings; sheets are clean black on white */
.t-print {
  --ink: #233a8b; --red: #e05d64; --rule: #d6e3f5; --paper: #fbfbf5;
  --bg: var(--paper); --surface: #ffffff; --surface-2: #eef3fb; --text: #1f2a44; --muted: #5c6782; --line: rgba(35, 58, 139, .22);
  --primary: var(--ink); --primary-ink: #fff; --accent: #ffd43b; --accent-ink: #2b2100;
  --radius: 6px; --radius-sm: 5px; --btn-radius: 6px;
  --font-head: 'Kalam', 'Lexend', cursive;
  --top-bg: rgba(251, 251, 245, .94); --top-border: 1px solid rgba(35, 58, 139, .2);
  background-color: var(--paper);
  background-image: linear-gradient(90deg, transparent 0 62px, rgba(224, 93, 100, .5) 62px 64px, transparent 64px), repeating-linear-gradient(180deg, transparent 0 31px, var(--rule) 31px 32px);
}
.t-print .mu-mark { background: var(--ink); color: #fff; border-radius: 4px; }
.t-print .btn-ghost { border-color: rgba(35, 58, 139, .45); color: var(--ink); }
.t-print .btn-accent { background: var(--accent); color: var(--accent-ink); }
.t-print .seg { background: #fff; }
.t-print .seg-btn.on { background: var(--ink); color: #fff; }
.t-print .small { font-size: .86rem; }
.pr-hero { padding: 2.2rem 0 1rem 2.6rem; }
.pr-hero h1 { font-size: clamp(2.6rem, 6vw, 4.2rem); color: var(--ink); font-weight: 700; margin: 0; line-height: 1; }
.pr-hero h1::after { content: ''; display: block; width: 220px; height: 12px; margin-top: .2rem; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 12'%3E%3Cpath d='M2 8 C40 2 80 12 120 6 S190 3 218 7' fill='none' stroke='%23e05d64' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat; }
.pr-lede { max-width: 62ch; font-size: 1.1rem; margin-top: .8rem; }
.pr-kinds { display: flex; gap: .3rem; overflow-x: auto; padding: 0 0 0 2.6rem; border-bottom: 2px solid var(--ink); scrollbar-width: thin; }
.pr-kinds a { flex: none; display: inline-flex; gap: .35rem; align-items: center; padding: .55rem .9rem .45rem; border: 2px solid var(--ink); border-bottom: 0; border-radius: 10px 10px 0 0; background: #fff; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; position: relative; top: 2px; }
.pr-kinds a:hover { background: #fff8d6; }
.pr-kinds a[aria-current="page"] { background: var(--ink); color: #fff; }
.pr-layout { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 1.4rem; padding-top: 1.2rem; align-items: start; }
.pr-opts { background: #fff; border: 2px solid var(--ink); border-radius: 8px; padding: 1rem 1.1rem; position: sticky; top: 70px; max-height: calc(100vh - 86px); overflow: auto; box-shadow: 5px 5px 0 rgba(35, 58, 139, .18); }
.pr-opts h2 { font-size: 1.6rem; color: var(--ink); margin: 0 0 .6rem; }
.opt-fields { display: grid; gap: .8rem; }
.opt-fields .field { display: grid; gap: .25rem; }
.opt-fields .field small { color: var(--muted); font-size: .8rem; }
.opt-fields .seg { flex-wrap: wrap; }
.opt-fields .sel, .opt-fields .inp:not(.sm) { width: 100%; }
.chk { display: flex; gap: .5rem; align-items: center; font-size: .95rem; }
.chk input { width: 1.1rem; height: 1.1rem; accent-color: var(--ink); }
.seed-row { display: flex; gap: .6rem; align-items: flex-end; flex-wrap: wrap; padding-top: .6rem; border-top: 1px dashed var(--line); }
.pr-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .6rem; }
.pv { background: #dde4ee; border-radius: 8px; padding: 10px; overflow: hidden; }
.pv-in { margin: 0 auto; }
@media (max-width: 960px) { .pr-layout { grid-template-columns: 1fr; } .pr-opts { position: static; max-height: none; } .pr-hero, .pr-kinds { padding-left: 0; } .t-print { background-image: repeating-linear-gradient(180deg, transparent 0 31px, var(--rule) 31px 32px); } }

/* ===== the printable sheets (screen preview and print) ===== */
.sheet { width: 210mm; min-height: 297mm; margin: 0 auto 10px; padding: 13mm 14mm 9mm; background: #fff; color: #111; box-shadow: 0 6px 20px rgba(20, 30, 60, .18); font-family: 'Lexend', system-ui, sans-serif; font-size: 11pt; line-height: 1.4; display: flex; flex-direction: column; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.sheet h1 { font-family: 'Lexend', sans-serif; font-size: 19pt; font-weight: 700; margin: 0 0 2mm; color: #111; }
.sh-meta { display: flex; flex-wrap: wrap; gap: 3mm 8mm; font-size: 10pt; margin: 1mm 0 3mm; }
.sh-meta i { display: inline-block; width: 48mm; border-bottom: 1px solid #555; vertical-align: -1mm; }
.sh-meta i.short { width: 12mm; }
.sh-inst { font-size: 10pt; color: #222; margin: 0 0 5mm; padding: 2mm 3mm; border-left: 3px solid #888; background: #f3f3f3; }
.sh-foot { margin-top: auto; padding-top: 4mm; font-size: 8pt; color: #666; border-top: 1px solid #ddd; }
.wq { list-style: none; counter-reset: q; padding: 0; margin: 0 0 4mm; display: grid; grid-template-columns: repeat(var(--c, 2), minmax(0, 1fr)); gap: 7mm 6mm; }
.wq.cols-1 { --c: 1; } .wq.cols-2 { --c: 2; } .wq.cols-3 { --c: 3; } .wq.cols-4 { --c: 4; }
.wq li { counter-increment: q; display: flex; align-items: baseline; flex-wrap: wrap; gap: 1.5mm 2mm; break-inside: avoid; font-size: 12.5pt; }
.wq li::before { content: counter(q) "."; font-size: 8.5pt; color: #777; min-width: 5.5mm; }
.wq .al { flex: 1 1 12mm; border-bottom: 1px solid #444; min-width: 12mm; height: 1.1em; }
.wq .wl { display: block; flex-basis: 100%; border-bottom: 1px solid #aaa; height: 8mm; }
.wq.vert { gap: 6mm 8mm; }
.wq.vert li { align-items: flex-start; }
.blank { display: inline-block; width: 13mm; height: 8mm; border: 1.3px solid #333; border-radius: 1.5mm; vertical-align: middle; }
.cmp { display: inline-block; width: 8mm; height: 8mm; border: 1.3px solid #333; border-radius: 50%; vertical-align: middle; margin: 0 1mm; }
.sheet .frac { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; line-height: 1.05; font-size: .92em; margin: 0 .3mm; }
.sheet .frac > span:first-child { border-bottom: 1px solid currentColor; padding: 0 .8mm; }
.vq { display: inline-grid; justify-items: end; font-family: 'IBM Plex Mono', monospace; font-size: 14pt; line-height: 1.35; min-width: 25mm; padding-right: 1mm; }
.vq .vl { width: 100%; border-top: 1.6px solid #222; height: 10mm; margin-top: 1mm; }
.ld { display: inline-flex; align-items: flex-start; font-family: 'IBM Plex Mono', monospace; font-size: 14pt; margin-top: 5mm; }
.ld-b { padding: 1.2mm 1.5mm 0 0; }
.ld-a { border-left: 1.6px solid #222; border-top: 1.6px solid #222; border-top-left-radius: 3.5mm; padding: 1.2mm 2mm 0 2.5mm; min-height: 22mm; }
.keys { list-style: none; counter-reset: k; padding: 0; margin: 0; columns: 3; column-gap: 8mm; font-size: 11pt; }
.keys li { counter-increment: k; break-inside: avoid; margin-bottom: 2mm; }
.keys li::before { content: counter(k) ". "; color: #777; font-size: 9pt; }
.clk { display: flex; flex-direction: column; align-items: center; gap: 1.5mm; width: 100%; }
.clock { width: 36mm; height: 36mm; }
.ck-face { fill: #fff; stroke: #222; stroke-width: 1.8; } .ck-ma { stroke: #222; stroke-width: 1.4; } .ck-mi { stroke: #999; stroke-width: .6; }
.ck-n { font: 600 8.5px 'Lexend', sans-serif; text-anchor: middle; fill: #222; }
.ck-h { stroke: #222; stroke-width: 3.6; stroke-linecap: round; } .ck-m { stroke: #222; stroke-width: 2; stroke-linecap: round; } .ck-c { fill: #222; }
.clk-t, .clk-l { font-size: 10pt; text-align: center; }
/* charts */
.msq { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 11pt; text-align: center; }
.msq th, .msq td { border: 1px solid #666; padding: 1.5mm 0; }
.msq th { background: #e6e6e6; font-weight: 700; }
.msq td.sqn { background: #f0f0f0; font-weight: 700; }
.msq.n15 { font-size: 9pt; } .msq.n20 { font-size: 7.2pt; } .msq.n20 th, .msq.n20 td { padding: .9mm 0; }
.book { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4mm; }
.tt { border: 1px solid #999; border-radius: 2mm; padding: 2mm 3mm; break-inside: avoid; }
.tt h4 { margin: 0 0 1mm; font-size: 10pt; }
.tt div { display: flex; justify-content: space-between; font-family: 'IBM Plex Mono', monospace; font-size: 9.5pt; border-bottom: 1px dotted #bbb; }
.tt b { min-width: 9mm; text-align: right; }
.hgrid { display: grid; grid-template-columns: repeat(10, 1fr); border-top: 1.2px solid #444; border-left: 1.2px solid #444; }
.hgrid div { border-right: 1.2px solid #444; border-bottom: 1.2px solid #444; aspect-ratio: 1; display: grid; place-items: center; font-size: 14pt; }
.hgrid.small div { aspect-ratio: auto; height: 11mm; font-size: 10pt; }
.hgrid .mk { background: #d9d9d9; font-weight: 700; }
.nlines { display: grid; gap: 9mm; margin-top: 3mm; }
.nline { width: 100%; height: auto; }
.nl-axis { stroke: #222; stroke-width: .5; } .nl-tick { stroke: #222; stroke-width: .4; } .nl-fl { stroke: #222; stroke-width: .25; }
.nl-l { font: 3.3px 'Lexend', sans-serif; text-anchor: middle; fill: #222; } .nl-f { font: 2.7px 'Lexend', sans-serif; text-anchor: middle; fill: #222; }
.paper { width: 100%; height: auto; }
.pg { stroke: #9fb6d6; stroke-width: .2; } .pg-b { stroke: #7896c2; stroke-width: .35; } .pd { fill: #555; } .pa { stroke: #222; stroke-width: .45; }
.pl { font: 2.5px 'Lexend', sans-serif; text-anchor: middle; fill: #333; } .pl.r { text-anchor: end; } .pl.b { font-weight: 700; font-size: 3.6px; }
/* formula sheets */
.fs .fsheet header h2 { margin: 0; font-size: 18pt; } .fs .fsheet header p { margin: 0 0 3mm; color: #555; }
.fs .fsheet h3 { font-size: 12pt; margin: 4mm 0 1mm; }
.fs .fsheet table { width: 100%; border-collapse: collapse; }
.fs .fsheet th { text-align: left; font-weight: 500; color: #555; width: 32%; padding: 1mm 2mm 1mm 0; vertical-align: top; font-size: 10pt; }
.fs .fsheet td { font-family: 'IBM Plex Mono', monospace; padding: 1mm 0; border-bottom: 1px dashed #ccc; font-size: 10.5pt; }
.fs .fsheet footer { display: none; }
/* flashcards */
.cardsheet { padding: 11mm 10mm 8mm; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 63mm; border-top: 1px dashed #999; border-left: 1px dashed #999; }
.fcard { border-right: 1px dashed #999; border-bottom: 1px dashed #999; display: grid; place-items: center; position: relative; text-align: center; padding: 3mm; }
.fcard b { font-size: 25pt; font-weight: 700; }
.fcard.back b { font-size: 19pt; color: #333; font-weight: 600; }
.fcard .flip { position: absolute; bottom: 3mm; left: 0; right: 0; transform: rotate(180deg); font-size: 11pt; color: #555; }
/* bingo */
.bingos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8mm; }
.bcard { border: 2px solid #222; border-radius: 3mm; padding: 3mm; break-inside: avoid; }
.bhead { display: grid; grid-template-columns: repeat(5, 1fr); text-align: center; font-weight: 800; font-size: 17pt; margin-bottom: 1mm; }
.bgrid { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid #444; border-left: 1px solid #444; }
.bgrid span { border-right: 1px solid #444; border-bottom: 1px solid #444; aspect-ratio: 1; display: grid; place-items: center; font-size: 15pt; font-weight: 600; }
.bgrid .free { background: #e9e9e9; font-size: 18pt; }
.bcard small { display: block; text-align: right; font-size: 8pt; color: #666; margin-top: 1mm; }
.caller { columns: 3; column-gap: 8mm; font-size: 10.5pt; padding-left: 7mm; margin: 0; }
.caller li { break-inside: avoid; margin-bottom: 1.6mm; }
.caller i { color: #666; font-style: normal; }
.tick { display: inline-block; width: 3.2mm; height: 3.2mm; border: 1px solid #444; margin-right: 1.5mm; vertical-align: -.4mm; }
/* certificate */
.certsheet { width: 297mm; min-height: 210mm; padding: 9mm; }
.cert { flex: 1; display: flex; border: 3.5mm solid var(--c1); padding: 2.5mm; position: relative; }
.c-gold { --c1: #b8862a; --c2: #e0bd63; } .c-ocean { --c1: #1f4e9c; --c2: #1b8f8a; }
.c-rainbow { --c1: #7a3ea8; --c2: #f4a261; border-image: linear-gradient(90deg, #e63946, #f4a261, #e9c46a, #2a9d8f, #457b9d, #8e44ad) 1; }
.c-in { flex: 1; border: .9mm solid var(--c2); padding: 8mm 16mm 6mm; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 3mm; }
.c-top { font-family: 'Cinzel', serif; font-size: 30pt; font-weight: 700; color: var(--c1); margin: 0; letter-spacing: .6mm; }
.c-small { font-size: 12pt; margin: 0; color: #444; }
.c-name { font-family: 'Kalam', cursive; font-size: 38pt; font-weight: 700; margin: 0; border-bottom: .5mm solid #999; padding: 0 12mm; min-width: 150mm; line-height: 1.25; }
.c-award { font-family: 'Cinzel', serif; font-size: 23pt; font-weight: 700; color: var(--c1); margin: 0; }
.c-reason { font-size: 13pt; margin: 0; font-style: italic; color: #333; }
.c-foot { display: flex; justify-content: space-between; align-items: flex-end; width: 100%; margin-top: 5mm; }
.c-foot > span { display: grid; gap: 1mm; text-align: center; font-size: 10pt; color: #444; min-width: 62mm; }
.c-foot b { font-size: 12pt; color: #111; border-bottom: .4mm solid #555; padding-bottom: 1mm; min-height: 8mm; }
.c-foot .c-seal { min-width: 0; width: 26mm; height: 26mm; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff2c4, var(--c2) 58%, var(--c1)); display: grid; place-items: center; font-size: 20pt; color: #fff; font-family: 'Noto Sans Math', serif; box-shadow: inset 0 0 0 1.5mm rgba(255, 255, 255, .45); }
.c-symbols { margin: 1mm 0 0; letter-spacing: 4mm; color: var(--c2); font-size: 13pt; font-family: 'Noto Sans Math', serif; }

@media print {
  body.t-print.mu-printing { background: #fff !important; }
  .mu-print-root .sheet { width: auto !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; box-shadow: none !important; break-after: page; page-break-after: always; zoom: 1; }
  .mu-print-root .sheet:last-child { break-after: auto; page-break-after: auto; }
  .mu-print-root .certsheet { height: 188mm; overflow: hidden; }
  .mu-print-root .sh-foot { margin-top: 6mm; }
}
