/* PRINT IT (goals/print.js): a plan, or a goal's chapters, printed: the builder, and the printed pieces */
.gp { position: fixed; inset: 0; z-index: 2147483300; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); font-family: var(--sans); opacity: 0; transition: opacity 0.18s ease; }
.gp.open { opacity: 1; }
.gp[hidden] { display: none; }
html.gp-open, html.gp-open body { overflow: hidden; }
.gp svg { width: 18px; height: 18px; flex: none; }
.gp-bar { flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top)); background: var(--bg-raised); border-bottom: 1px solid var(--rule); }
.gp-close { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 14px 0 8px; border: 1px solid var(--rule); border-radius: 999px; background: var(--bg); color: var(--ink); font: 700 14px var(--sans); cursor: pointer; }
.gp-titles { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.gp-titles small { font: 800 10.5px var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); }
.gp-titles b { font: italic 19px/1.2 var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gp-print { display: inline-flex; align-items: center; gap: 7px; min-height: 42px; padding: 0 18px; border: none; border-radius: 999px; background: var(--gold); color: var(--on-gold, #1c1a17); font: 800 15px var(--sans); cursor: pointer; }
.gp-main { flex: 1; min-height: 0; display: flex; overflow: hidden; }
.gp-opts { flex: none; width: 310px; overflow-y: auto; overscroll-behavior: contain; padding: 16px; border-right: 1px solid var(--rule); background: var(--bg-raised); }
.gp-work { flex: 1; min-width: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 16px calc(40px + env(safe-area-inset-bottom)); }
@media (max-width: 760px) {
  .gp-main { display: block; overflow-y: auto; overscroll-behavior: contain; }
  .gp-opts { width: auto; overflow: visible; border-right: none; border-bottom: 1px solid var(--rule); }
  .gp-work { overflow: visible; }
}

/* the choices */
.gp-f { display: block; margin: 0 0 14px; }
.gp-f > span { display: block; margin: 0 0 6px; font: 700 13px var(--sans); }
.gp-f select, .gp-f input[type="date"] { display: block; width: 100%; min-width: 0; min-height: 44px; box-sizing: border-box; padding: 8px 12px; border: 1.5px solid var(--rule); border-radius: 12px; background: var(--bg); color: var(--ink); font: 16px var(--sans); }
.gp-f input[type="date"] { -webkit-appearance: none; appearance: none; text-align: left; }
.gp-f input[type="date"]::-webkit-date-and-time-value { text-align: left; }
.gp-f-s { display: block; margin-top: 4px; font: 12.5px/1.4 var(--sans); color: var(--muted); }
.gp-seg { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 13px; background: color-mix(in srgb, var(--ink) 6%, var(--bg)); }
.gp-seg label { flex: 1 1 auto; padding: 8px 8px; border-radius: 9px; text-align: center; font: 700 13px var(--sans); color: var(--muted); cursor: pointer; }
.gp-seg label.is-on { background: var(--bg-raised); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }
.gp-seg input, .gp-shape input { position: absolute; opacity: 0; pointer-events: none; }
.gp-shapes { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.gp-shape { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px 8px; border: 1.5px solid var(--rule); border-radius: 12px; background: var(--bg); font: 700 12px var(--sans); text-align: center; cursor: pointer; }
.gp-shape.is-on { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 12%, var(--bg)); }
.gp-sh { display: block; height: 34px; border: 2px solid currentColor; border-radius: 3px; opacity: 0.7; }
.gp-sh.is-bookmark { width: 10px; }
.gp-sh.is-card { width: 34px; height: 21px; margin: 6px 0 7px; }
.gp-sh.is-half { width: 22px; height: 34px; border-style: solid dashed solid solid; }
.gp-sh.is-page { width: 26px; }
.gp-sh.is-calendar { width: 36px; height: 26px; margin: 4px 0; background: linear-gradient(currentColor, currentColor) 0 6px / 100% 2px no-repeat, repeating-linear-gradient(90deg, transparent 0 8px, currentColor 8px 9px) 0 0 / 100% 100%; }
.gp-sw { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font: 600 14px var(--sans); cursor: pointer; }
.gp-sw input { flex: none; display: grid; place-items: center; width: 22px; height: 22px; margin: 0; -webkit-appearance: none; appearance: none; border: 2px solid var(--rule); border-radius: 7px; background: var(--bg); cursor: pointer; }
.gp-sw input:checked { border-color: var(--gold); background: var(--gold); }
.gp-sw input:checked::after { content: ''; width: 6px; height: 11px; margin-top: -2px; border: solid var(--on-gold, #1c1a17); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }

/* the toolbar, and the pieces as they'll print */
.gp-tools { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin: 0 -16px; padding: 8px 12px; background: color-mix(in srgb, var(--bg) 92%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); }
.gp-tools button { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: none; border-radius: 10px; background: none; color: var(--ink); cursor: pointer; }
.gp-tools button:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.gp-sep { width: 1px; height: 22px; margin: 0 4px; background: var(--rule); }
.gp-hint { margin: 12px 0; font: 13.5px/1.5 var(--sans); color: var(--muted); }
.gp-pieces { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 18px; }
.gp-slot { position: relative; }
.gp-rm { position: absolute; top: -10px; right: -10px; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 1px solid var(--rule); border-radius: 50%; background: var(--bg-raised); color: var(--muted); cursor: pointer; }
.gp-rm svg { width: 14px; height: 14px; }
.gp-over { display: none; max-width: 100%; margin: 6px 0 0; font: 700 12px/1.4 var(--sans); color: #C2453A; }
.gp-slot.is-over .gp-over { display: block; }
.gp-slot.is-over .gp-piece { box-shadow: 0 0 0 2px #C2453A, 0 8px 24px -12px rgba(0, 0, 0, 0.4); }
.gp-more { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.gp-btn { display: inline-flex; align-items: center; gap: 7px; min-height: 42px; padding: 0 16px; border: none; border-radius: 999px; background: color-mix(in srgb, var(--ink) 7%, var(--bg-raised)); color: var(--ink); font: 700 14px var(--sans); cursor: pointer; }
.gp-toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 3; max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 14px; background: var(--ink); color: var(--bg); font: 600 14px/1.4 var(--sans); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease; }
.gp-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* a piece: paper, whatever the site's colors; its words */
.gp-piece { --gp-accent: var(--gp-color, #A6773A); position: relative; box-sizing: border-box; overflow: hidden; column-gap: 0.22in; column-fill: auto; background: #fff; color: #1d1b18; font-family: -apple-system, "Segoe UI", system-ui, sans-serif; line-height: 1.38; border-radius: 3px; box-shadow: 0 8px 24px -12px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 0, 0, 0.08); outline: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.gp-piece.is-black { --gp-accent: #1d1b18; }
.gp-piece:not(.is-black) { background: linear-gradient(var(--gp-accent), var(--gp-accent)) top / 100% 0.05in no-repeat, #fff; } /* (a thin band of its color along its top) */
/* the colors to choose from: a swatch each, by who they're for */
.pc-sw { display: grid; gap: 8px; }
.pc-g small { display: block; margin-bottom: 4px; font: 700 11.5px var(--sans); color: var(--muted); }
.pc-g > div { display: flex; flex-wrap: wrap; gap: 8px; }
.pc-c { position: relative; display: block; cursor: pointer; }
.pc-c input { position: absolute; opacity: 0; pointer-events: none; }
.pc-c i { display: block; width: 30px; height: 30px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.3); transition: box-shadow 0.12s ease; }
.pc-c.is-on i { box-shadow: 0 0 0 2px var(--bg-raised), 0 0 0 4px var(--c); }
.pc-c input:focus-visible + i { outline: 2px solid var(--gold); outline-offset: 3px; }
.pc-c span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.gp-piece:focus { box-shadow: 0 0 0 2px var(--gold), 0 8px 24px -12px rgba(0, 0, 0, 0.45); }
.gp-piece p, .gp-piece h3, .gp-piece h4, .gp-piece ul, .gp-piece div { margin: 0; }
.gp-piece ul { padding-left: 1.2em; }
.gp-piece h3 { font: italic 600 1.45em/1.15 Georgia, "Times New Roman", serif; color: var(--gp-accent); }
.gp-piece h4 { margin: 0.5em 0 0.15em; font-size: 1em; font-weight: 800; letter-spacing: 0.04em; color: var(--gp-accent); break-after: avoid; }
.gp-piece .gp-sub { margin: 0.15em 0 0.3em; font-size: 0.82em; color: #6b655c; }
.gp-piece .gp-verse { margin: 0.35em 0 0.5em; padding: 0.35em 0 0.35em 0.6em; border-left: 2px solid var(--gp-accent); font: italic 0.88em/1.35 Georgia, serif; color: #3d3a35; }
.gp-piece .gp-verse span { font: normal 700 0.85em -apple-system, system-ui, sans-serif; color: #6b655c; white-space: nowrap; }
.gp-piece .gp-run { margin: 0 0 0.35em; padding-bottom: 0.2em; border-bottom: 1px solid #ddd6ca; font-size: 0.74em; font-weight: 700; color: #6b655c; column-span: all; }
.gp-piece .gp-run span { float: right; font-weight: 600; }
.gp-piece .gp-title, .gp-piece .gp-sub, .gp-piece .gp-verse { column-span: all; }
.gp-piece .gp-l { padding: 0.12em 0; padding-left: 1.45em; text-indent: -1.45em; break-inside: avoid; }
.gp-piece .gp-l b { font-weight: 700; color: var(--gp-accent); }
.gp-cb { display: inline-block; width: 0.95em; height: 0.95em; margin-right: 0.5em; vertical-align: -0.12em; border: 1.3px solid #1d1b18; border-radius: 2px; text-indent: 0; cursor: pointer; }
.gp-cb.is-on { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d1b18' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E") center / 100% no-repeat; }
.gp-piece .gp-bk { margin: 0 0 0.45em; break-inside: avoid; }
.gp-piece .gp-bk > b { display: block; margin-bottom: 0.15em; font-weight: 800; color: var(--gp-accent); }
.gp-ns { display: flex; flex-wrap: wrap; gap: 0.18em; }
.gp-n { display: inline-grid; place-items: center; min-width: 1.75em; height: 1.75em; box-sizing: border-box; border: 1px solid #8f877b; border-radius: 2px; font-size: 0.78em; color: #3d3a35; cursor: pointer; }
.gp-n.is-on { background: #1d1b18; border-color: #1d1b18; color: #fff; }
.gp-piece:not(.is-black) .gp-n.is-on { background: var(--gp-accent); border-color: var(--gp-accent); }
.gp-piece font[size="1"] { font-size: 0.72em; } .gp-piece font[size="2"] { font-size: 0.86em; } .gp-piece font[size="3"] { font-size: 1em; }
.gp-piece font[size="4"] { font-size: 1.18em; } .gp-piece font[size="5"] { font-size: 1.4em; } .gp-piece font[size="6"] { font-size: 1.75em; }
/* (at the foot of each, small: where it was made. Not part of the words, so it isn't edited away) */
.gp-piece::after { content: 'Created with theundefiled.com'; position: absolute; left: 0; right: 0; bottom: calc(var(--gp-pad, 0.16in) * 0.45 + 1px); font: 600 6.5pt/1 -apple-system, "Segoe UI", system-ui, sans-serif; letter-spacing: 0.04em; color: #9a9387; text-align: center; pointer-events: none; column-span: all; }
.gp-piece.is-black::after { color: #77716a; }
/* (a calendar: a month to a page) */
.gp-piece.is-calendar { display: flex; flex-direction: column; }
.gp-piece .gp-cal-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 0.3em; font-size: 1.8em; }
.gp-piece .gp-cal-h span { font: 600 0.45em -apple-system, system-ui, sans-serif; color: #6b655c; }
.gp-cal { flex: 1; width: 100%; border-collapse: collapse; table-layout: fixed; }
.gp-cal th { padding: 0.2em; font-size: 0.8em; font-weight: 800; color: var(--gp-accent); text-align: left; }
.gp-cal td { padding: 0.25em 0.3em; border: 1px solid #8f877b; vertical-align: top; font-size: 0.82em; line-height: 1.25; }
.gp-cal td.is-out { background: #f4f1ec; }
.gp-cd { display: block; font-weight: 800; }
.gp-cr { display: block; margin-top: 0.15em; }

/* printed: the sheets alone */
.gp-out { display: none; }
@media print {
  html.gp-printing body > *:not(.gp) { display: none !important; }
  html.gp-printing, html.gp-printing body { height: auto !important; overflow: visible !important; background: #fff !important; }
  html.gp-printing .gp { position: static; display: block; opacity: 1; background: #fff; }
  html.gp-printing .gp > :not(.gp-out) { display: none !important; }
  html.gp-printing .gp-out { display: block; }
  .gp-sheet { display: grid; box-sizing: border-box; justify-content: center; align-content: center; overflow: hidden; break-after: page; page-break-after: always; }
  .gp-sheet:last-child { break-after: auto; page-break-after: auto; }
  /* (for a print shop: each piece its own page, with its bleed, and crop marks if asked) */
  .gp-shop { position: relative; box-sizing: border-box; overflow: hidden; break-after: page; page-break-after: always; }
  .gp-shop:last-child { break-after: auto; page-break-after: auto; }
  .gp-bleed { display: grid; place-items: center; box-sizing: border-box; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .gp-bleed > * { box-shadow: none !important; outline: none !important; border-radius: 0 !important; }
  .gp-crop { position: absolute; background: #000; }
  .gp-turn { overflow: hidden; break-after: page; page-break-after: always; }
  .gp-turn:last-child { break-after: auto; page-break-after: auto; }
  .gp-turned { transform-origin: top left; }
  .gp-turn .gp-sheet { break-after: auto; page-break-after: auto; }
  .gp-sheet .gp-piece { border-radius: 0; box-shadow: none; }
  .gp-sheet .gp-piece.is-cut { outline: 1px dashed #9a9387; outline-offset: -0.5px; }
}
/* (two choices side by side: a bookmark's width and length; the Prayer Journal's printouts too) */
.pp-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pp-two .gp-f { min-width: 0; }
/* "At a print shop": how to send it */
.gp-shopinfo { margin: 0 0 14px; padding: 14px 16px; border-radius: 16px; background: color-mix(in srgb, var(--gold) 9%, var(--bg-raised)); border: 1px solid color-mix(in srgb, var(--gold) 40%, var(--rule)); font: 14px/1.55 var(--sans); }
.gp-shopinfo > b { display: block; margin-bottom: 4px; font: 700 15px var(--sans); }
.gp-shopinfo ol { margin: 0 0 8px; padding-left: 20px; }
.gp-shopinfo li { margin-bottom: 4px; }
.gp-shopinfo textarea { display: block; width: 100%; box-sizing: border-box; margin: 0 0 8px; padding: 10px 12px; border: 1.5px solid var(--rule); border-radius: 12px; background: var(--bg); color: var(--ink); font: 14px/1.5 var(--sans); resize: vertical; }
.gp-shopinfo p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.gp-shopinfo .gp-shopnote { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--bg); border: 1px solid var(--rule); color: var(--ink); } /* (the files are to help: check them before ordering) */
.gp-shopnote b { display: block; margin-bottom: 2px; }
/* "Before you print": what to choose in the print window */
.gp-tips { position: fixed; inset: 0; z-index: 2147483500; display: grid; place-items: center; padding: 16px; background: rgba(20, 16, 12, 0.5); font-family: var(--sans); }
.gp-tips-card { width: 100%; max-width: 440px; padding: 18px 18px 14px; border-radius: 20px; background: var(--bg-raised); color: var(--ink); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6); }
.gp-tips-h { display: block; font: italic 22px var(--serif); }
.gp-tips-card p { margin: 6px 0 4px; font: 14.5px/1.5 var(--sans); color: var(--muted); }
.gp-tips-card ul { margin: 0 0 12px; padding-left: 20px; font: 14.5px/1.55 var(--sans); }
.gp-tips-card li { margin-bottom: 6px; }
.gp-tips-b { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.gp-shopinfo .gp-shopsafari { margin: 4px 0 10px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, #B0473E 10%, var(--bg)); border: 1px solid color-mix(in srgb, #B0473E 35%, var(--rule)); color: var(--ink); }
.gp-tips-safari { margin: 4px 0 8px !important; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, #B0473E 9%, var(--bg)); border: 1px solid color-mix(in srgb, #B0473E 30%, var(--rule)); color: var(--ink) !important; }
.gp-tips-link { width: 100%; margin-bottom: 4px; }
.pc-head { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font: 700 13px var(--sans); }
.pc-head em { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 4px; border-radius: 999px; background: color-mix(in srgb, var(--c) 14%, transparent); color: color-mix(in srgb, var(--c) 80%, var(--ink)); font: 700 13px var(--sans); font-style: normal; }
.pc-head em i { width: 14px; height: 14px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.35); }
