/* What a project's page holds beside its text, canvas and code (appWindow/pageBlocks.js), drawn as the app's
   editor draws it, with the page's 16 px for the app's 17; and the drawings the reader's card opens on
   (appWindow/readerDrawing.js), each in the look of its own project. */

.doc .tbl { width: calc(100% + 7.5px); margin: .8em -1.9px 0 -5.6px; border-collapse: collapse; overflow: hidden; font: .95em/1.55 var(--face-sans); font-variant-numeric: tabular-nums; background: var(--panel); border-radius: 7.5px; }
.doc .tbl th { font-weight: 600; text-align: left; padding: .5em 1em; border-bottom: 1.9px solid var(--hairline); }
.doc .tbl td { padding: .4em 1em; border-bottom: 1px solid var(--hairline); }
.doc .tbl tbody tr:last-child td { border-bottom: none; }
.doc .swatch { display: inline-block; width: 13.2px; height: 13.2px; vertical-align: middle; border: 1px solid var(--hairline); border-radius: 3.8px; }
.doc .img { margin: .8em 0 0; }
.doc .img svg { display: block; width: 240px; max-width: 100%; border-radius: 5.6px; box-shadow: 0 3.8px 18.8px rgba(60, 56, 54, .1); }
.doc .quote { position: relative; margin: .8em 0 0; padding: .25em 0 .25em 20px; color: var(--muted); }
.doc .quote::after { content: ""; position: absolute; left: 0; top: .5em; bottom: .5em; border-left: 2.8px solid var(--hairline); }
.doc .quote p { margin: 0; }
.doc del { text-decoration-color: var(--muted); }
.doc .lnk { color: var(--ink); text-decoration: underline; }
.doc .math { padding: 0 1.9px; white-space: nowrap; }
.canvas.framed { height: auto; padding: 14px 12px 16px; }
.cframe { width: 300px; max-width: 100%; font: 13.2px/1.3 var(--face-mono); color: var(--ink); }
.cframe .ftitle { display: block; height: 18.8px; padding-left: 5.6px; border: 1.4px solid var(--ink); border-radius: 3.8px 3.8px 0 0; background: var(--whisper-selection); line-height: 16px; white-space: nowrap; }
.cframe .fbody { display: grid; gap: 8px; padding: 12px; border: 1.4px solid color-mix(in srgb, var(--ink) 45%, transparent); border-top: 0; }
.cframe .shape { text-align: center; }

/* ---- the reader's drawing ---- */
.pay { display: grid; gap: 6px; padding: 9px; background: var(--own-paper); color: var(--own-ink); font: 10.2px/1.35 system-ui, -apple-system, "Segoe UI", sans-serif; }
.pay > b { font-size: 16px; line-height: 1.3; font-weight: 650; }
.pay .go { padding: 9px; border-radius: 8px; background: var(--own-accent); color: var(--own-on); text-align: center; font-size: 12.5px; font-weight: 650; }
.pay .muted { color: var(--own-soft); }
/* a list */
.pay .saved { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 8px; padding: 8px; border-radius: 8px; background: var(--own-surface); }
.pay .saved span:first-child { min-width: 0; overflow-wrap: anywhere; }
.pay .saved .from { flex: none; margin-left: auto; color: var(--own-soft); }
.pay .faint { opacity: .55; font-style: italic; }
/* a phone's screen, in the green the page asks for */
.pay.phonescreen { --left-over: #2F6F62; justify-items: center; gap: 2px; padding: 12px; text-align: center; }
.pay.phonescreen strong { font-size: 38px; line-height: 1.15; color: var(--left-over); }
.pay.phonescreen .small { font-size: 12px; }
.pay.phonescreen .go { justify-self: stretch; margin-top: 8px; background: var(--left-over); }
/* bars in pairs */
.pay.bars .pairs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 4px; }
.pay.bars .group { display: block; font-size: 11.5px; color: var(--own-soft); }
.pay.bars .pair { display: flex; align-items: flex-end; gap: 8px; height: 84px; margin-top: 14px; border-bottom: 1.5px solid var(--hairline); }
.pay.bars :is(.pair, .key) i { background: #c9ced5; }
.pay.bars .pair i { position: relative; flex: 1; height: calc(var(--share) * 100%); border-radius: 4px 4px 0 0; }
.pay.bars :is(.pair, .key) i.on { background: var(--own-accent); }
.pay.bars em { position: absolute; left: 50%; top: -15px; transform: translateX(-50%); font: 600 11.5px/1 system-ui, sans-serif; white-space: nowrap; }
.pay.bars .key { display: block; margin-top: 4px; font-size: 11.5px; }
.pay.bars .key i { display: inline-block; width: 9px; height: 9px; margin: 0 4px 0 8px; border-radius: 2px; }
/* a page's opening */
.pay.opening { gap: 8px; }
.pay.opening > b { font-size: 15px; line-height: 1.35; }
.pay.opening blockquote { margin: 0; padding-left: 9px; border-left: 3px solid var(--own-line); font-size: 12px; line-height: 1.5; }
.pay.opening .small { font-size: 11.5px; }

@media (prefers-color-scheme: dark) {
  .doc del { text-decoration-color: var(--faint); }
  .doc .img svg { box-shadow: 0 3.8px 18.8px rgba(0, 0, 0, .2); }
  .pay.phonescreen { --left-over: #7fc4b2; }
}
