/* Booklist & Display Designer.
 *
 * Two halves. The workspace around the page (side panel, toolbars, lists)
 * takes its surfaces and type from the site preset like every other tool.
 * The SHEET does not: it is a printed object with its own palette and type
 * pairing (booklistmodel.js PALETTES/FONTS, passed in as --bl-* custom
 * properties on the sheet), measured in inches so that what is on screen is
 * what comes out of the printer. A sheet is drawn at true size and scaled
 * down with a transform; nothing inside it is sized in screen units.
 *
 * Sheet rules are scoped to `.bl-sheet`, not the product element, because
 * the print copy is put on <body> directly (see printNow in booklist.js).
 */

.product[data-product="booklist"] {
  --bl-line: color-mix(in srgb, var(--text) 15%, transparent);
  --bl-soft-ui: color-mix(in srgb, var(--text) 4%, var(--surface));
}

.bl-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bl-pane { display: grid; gap: .9rem; min-width: 0; }
.bl-muted { color: var(--muted); font-size: .9rem; }
.bl-help { color: var(--muted); font-size: .85rem; margin: 0; }
.bl-eyebrow { margin: 0; font-size: .75rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.bl-field { display: grid; gap: .2rem; min-width: 0; }
.bl-field-label { font-size: .75rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.bl-empty { display: grid; gap: .6rem; max-width: 38rem; padding: 1rem 0; justify-items: start; }

/* ── Bars ──────────────────────────────────────────────────────────── */

.bl-bar, .bl-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem; }
.bl-bar { padding: .55rem .8rem; border: 1px solid var(--bl-line); border-radius: var(--radius); background: var(--bl-soft-ui); }
.bl-bar-actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.bl-formats { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--bl-line); border-radius: var(--radius); overflow: hidden; }
.bl-format {
  font: inherit; font-size: .92rem; padding: .4rem .8rem; border: 0; border-right: 1px solid var(--bl-line);
  background: var(--surface); color: var(--text); cursor: pointer;
}
.bl-format:last-child { border-right: 0; }
.bl-format.is-on { background: var(--accent); color: var(--accent-contrast); }
.bl-format:focus-visible, .bl-side-tab:focus-visible, .bl-swatch:focus-visible, .bl-palette:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; position: relative; z-index: 1;
}
.bl-tools { font-size: .88rem; color: var(--muted); }
.bl-tools-sep { width: 1px; height: 1.2rem; background: var(--bl-line); }
.bl-zoom { min-width: 3.2rem; text-align: center; font-variant-numeric: tabular-nums; }

/* ── Layout: side panel and the stage ──────────────────────────────── */

.bl-layout { display: grid; grid-template-columns: 22rem minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 960px) { .bl-layout { grid-template-columns: minmax(0, 1fr); } .bl-side { order: 2; } }

.bl-side {
  display: grid; gap: .6rem; align-content: start; min-width: 0;
  border: 1px solid var(--bl-line); border-radius: var(--radius); background: var(--surface);
  position: sticky; top: .75rem; max-height: calc(100vh - 1.5rem); overflow: auto;
}
@media (max-width: 960px) { .bl-side { position: static; max-height: none; } }
.bl-side-tabs { display: flex; border-bottom: 1px solid var(--bl-line); position: sticky; top: 0; background: var(--surface); z-index: 2; }
.bl-side-tab {
  flex: 1; font: inherit; font-size: .92rem; padding: .6rem .4rem; border: 0; background: none; color: var(--muted);
  border-bottom: 3px solid transparent; cursor: pointer;
}
.bl-side-tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.bl-side-body { display: grid; gap: .7rem; padding: .2rem .8rem .9rem; min-width: 0; }

.bl-stage { display: grid; gap: .6rem; min-width: 0; }
.bl-fit-notes:empty { display: none; }
.bl-fit-notes {
  border-left: 3px solid var(--warn, #9a6700); padding: .35rem .7rem; font-size: .88rem;
  background: color-mix(in srgb, var(--warn, #9a6700) 8%, var(--surface));
}
.bl-fit-notes p { margin: .1rem 0; }
.bl-canvas {
  display: grid; justify-items: center; gap: .6rem; padding: 12px; min-height: 20rem;
  border-radius: var(--radius); background: color-mix(in srgb, var(--text) 9%, var(--bg));
  overflow: auto; max-height: calc(100vh - 9rem);
}
@media (max-width: 960px) { .bl-canvas { max-height: none; } }
.bl-sheet-frame { position: relative; flex: none; }
.bl-sheet-frame > .bl-sheet {
  position: absolute; left: 0; top: 0; transform-origin: 0 0;
  box-shadow: 0 1px 2px rgb(0 0 0 / .18), 0 6px 18px rgb(0 0 0 / .14);
}
.bl-sheet-label { margin: 0 0 .4rem; font-size: .8rem; color: var(--muted); }

/* ── Titles tab ────────────────────────────────────────────────────── */

.bl-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
.bl-row {
  display: grid; grid-template-columns: auto 2.2rem minmax(0, 1fr) auto; gap: .5rem; align-items: center;
  padding: .3rem .4rem; border: 1px solid transparent; border-radius: var(--radius); background: var(--bl-soft-ui);
}
.bl-row.is-selected { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.bl-grip { cursor: grab; color: var(--muted); font-size: 1.1rem; line-height: 1; padding: .3rem .1rem; touch-action: none; user-select: none; }
.bl-cover.bl-thumb { width: 2.2rem; height: 3.2rem; object-fit: cover; border-radius: 2px; }
.bl-lettered.bl-thumb { padding: .15rem; }
.bl-thumb .bl-lettered-title { font-size: .42rem; }
.bl-thumb .bl-lettered-author { display: none; }
.bl-row-main {
  display: grid; gap: .05rem; text-align: left; min-width: 0; font: inherit; padding: .1rem;
  border: 0; background: none; color: inherit; cursor: pointer;
}
.bl-row-main:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.bl-row-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-row-sub { font-size: .8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-row-moves { display: flex; gap: .1rem; }
.bl-row-moves button { min-width: 1.9rem; min-height: 1.9rem; }

.bl-editor { display: grid; gap: .55rem; padding: .7rem; border: 1px solid var(--bl-line); border-radius: var(--radius); }
.bl-editor-head { display: flex; justify-content: space-between; gap: .5rem; align-items: start; }
.bl-editor-head h3 { margin: 0; font-size: 1.05rem; }
.bl-cover.bl-editor-cover { width: 4.4rem; height: 6.6rem; flex: none; object-fit: cover; border-radius: 2px; }
.bl-editor-cover .bl-lettered-title { font-size: .7rem; }
.bl-cover-choice { display: flex; flex-wrap: wrap; gap: .4rem .7rem; align-items: center; }

/* ── Find tab ──────────────────────────────────────────────────────── */

.bl-search { display: flex; gap: .4rem; }
.bl-search .input { flex: 1; min-width: 0; }
.bl-search-msg { margin: 0; font-size: .86rem; min-height: 1.2em; }
.bl-search-msg:empty { display: none; }
.bl-results { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.bl-result {
  display: grid; grid-template-columns: 2.6rem minmax(0, 1fr) auto; gap: .55rem; align-items: center;
  padding: .3rem; border-radius: var(--radius); background: var(--bl-soft-ui); cursor: grab; touch-action: none;
}
.bl-result:hover { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.bl-result .bl-cover.bl-thumb { width: 2.6rem; height: 3.8rem; }
.bl-result-text { display: grid; min-width: 0; }
.bl-on-list { font-size: .8rem; color: var(--muted); }
.bl-manual summary { cursor: pointer; font-weight: 600; }
.bl-manual { display: grid; gap: .5rem; }
.bl-credit { font-size: .8rem; color: var(--muted); margin: 0; }

/* ── Design tab ────────────────────────────────────────────────────── */

.bl-side-body fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: .35rem; min-width: 0; }
.bl-side-body legend { font-size: .75rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 0; margin-bottom: .25rem; }
.bl-swatches { grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr)); }
.bl-swatch {
  font: inherit; font-size: .88rem; padding: .4rem .5rem; border: 1px solid var(--bl-line);
  border-radius: var(--radius); background: var(--surface); color: var(--text); cursor: pointer;
}
.bl-swatch.is-on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); font-weight: 600; }
.bl-palettes { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.bl-palette {
  aspect-ratio: 1; border-radius: 50%; border: 2px solid var(--surface); cursor: pointer; padding: 0;
  box-shadow: 0 0 0 1px var(--bl-line);
}
.bl-palette.is-on { box-shadow: 0 0 0 2px var(--accent); }
.bl-checks { grid-template-columns: 1fr; }
.bl-check { display: flex; gap: .45rem; align-items: center; font-size: .92rem; }

/* ── Lists pane ────────────────────────────────────────────────────── */

.bl-list-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: .7rem; }
.bl-list-card {
  display: grid; grid-template-columns: 5.4rem minmax(0, 1fr); gap: .7rem; padding: .7rem;
  border: 1px solid var(--bl-line); border-radius: var(--radius); background: var(--surface);
}
.bl-list-card.is-open { border-color: var(--accent); }
.bl-card-covers { position: relative; height: 6rem; }
.bl-card-covers .bl-cover { position: absolute; width: 3.4rem; height: 5.1rem; object-fit: cover; border-radius: 2px; box-shadow: 0 1px 3px rgb(0 0 0 / .25); }
.bl-card-covers > :nth-child(1) { left: 0; top: .6rem; transform: rotate(-6deg); }
.bl-card-covers > :nth-child(2) { left: 1rem; top: .3rem; }
.bl-card-covers > :nth-child(3) { left: 2rem; top: .6rem; transform: rotate(6deg); }
.bl-card-covers .bl-lettered-title { font-size: .45rem; }
.bl-card-covers .bl-lettered-author { display: none; }
.bl-list-card-body { display: grid; gap: .3rem; align-content: start; min-width: 0; }
.bl-list-card-body h3 { margin: 0; font-size: 1.02rem; overflow-wrap: anywhere; }
.bl-exports, .bl-settings { display: grid; gap: .6rem; max-width: 46rem; }
.bl-exports h3, .bl-settings h3 { margin: .4rem 0 0; }

/* ── Dragging ──────────────────────────────────────────────────────── */

.bl-ghost {
  position: fixed; z-index: 1000; pointer-events: none; max-width: 16rem;
  padding: .35rem .6rem; border-radius: var(--radius); background: var(--text); color: var(--bg);
  font-size: .85rem; box-shadow: 0 4px 14px rgb(0 0 0 / .3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bl-insert { position: fixed; z-index: 999; pointer-events: none; background: var(--accent); border-radius: 2px; display: none; }
.is-dragging { opacity: .4; }
.bl-dragging, .bl-dragging * { cursor: grabbing !important; user-select: none; }

/* ══ The sheet ══════════════════════════════════════════════════════
   Everything below is in inches and points and reads only --bl-* tokens. */

.bl-sheet {
  --bl-pad: .5in;
  position: relative; box-sizing: border-box; overflow: hidden;
  background: var(--bl-paper); color: var(--bl-ink);
  font-family: var(--bl-body-font); font-size: 10.5pt; line-height: 1.32;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.bl-sheet *, .bl-sheet *::before, .bl-sheet *::after { box-sizing: border-box; }
.bl-sheet h2, .bl-sheet h3, .bl-sheet p { margin: 0; }

/* Editing in place. The placeholder shows only on screen: the print copy
   drops empty fields (drawSheet forPrint). */
.bl-sheet [contenteditable] { outline: none; border-radius: 2px; cursor: text; }
.bl-sheet [contenteditable]:hover { box-shadow: 0 0 0 1px color-mix(in srgb, var(--bl-accent) 45%, transparent); }
.bl-sheet [contenteditable]:focus { box-shadow: 0 0 0 2px var(--bl-accent); background: color-mix(in srgb, var(--bl-paper) 85%, white); }
.bl-sheet [contenteditable].is-empty::before { content: attr(data-placeholder); color: color-mix(in srgb, var(--bl-ink) 40%, transparent); font-style: italic; }

.bl-page { position: absolute; inset: 0; padding: var(--bl-pad); display: flex; flex-direction: column; gap: .2in; }

/* Head and foot */
.bl-head { display: grid; gap: .05in; }
.bl-kicker { font-family: var(--bl-body-font); font-size: 9.5pt; letter-spacing: .14em; text-transform: uppercase; color: var(--bl-accent); font-weight: 600; }
.bl-heading { font-family: var(--bl-head-font); font-size: 30pt; line-height: 1.05; font-weight: 700; color: var(--bl-ink); }
.bl-intro { font-size: 11pt; max-width: 6in; }
.bl-continued { font-family: var(--bl-head-font); font-size: 13pt; color: var(--bl-accent); }
.bl-foot { margin-top: auto; display: flex; align-items: flex-end; gap: .2in; justify-content: space-between; }
.bl-footer { font-size: 9.5pt; white-space: pre-line; flex: 1; }
.bl-qr-block { display: grid; justify-items: center; gap: .03in; flex: none; }
.bl-qr { width: .95in; height: .95in; background: #fff; }
.bl-qr svg { width: 100%; height: 100%; display: block; }
.bl-qr-label { font-size: 7.5pt; text-align: center; max-width: 1.2in; }
.bl-page-no { margin-top: auto; text-align: right; font-size: 8.5pt; opacity: .75; }

/* Entries */
.bl-items { display: grid; gap: .16in .3in; align-content: start; }
.bl-entry { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .14in; align-items: start; border-radius: 3px; min-width: 0; }
.bl-entry:focus { outline: none; }
.bl-entry:focus-visible, .bl-entry.is-selected { box-shadow: 0 0 0 2px var(--bl-paper), 0 0 0 4px var(--bl-accent); }
.bl-cover-frame { width: .95in; height: 1.45in; cursor: grab; touch-action: none; }
.bl-cover { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 2px; box-shadow: 0 1px 2px rgb(0 0 0 / .3); background: var(--bl-soft); }
.bl-lettered {
  display: flex; flex-direction: column; justify-content: space-between; padding: .08in; overflow: hidden;
  font-family: var(--bl-head-font); border-radius: 2px;
}
.bl-lettered-title { font-size: 8pt; font-weight: 700; line-height: 1.1; overflow-wrap: anywhere; }
.bl-lettered-author { font-size: 6.5pt; opacity: .85; }
.bl-entry-text { display: grid; gap: .03in; min-width: 0; align-content: start; }
.bl-title { font-family: var(--bl-head-font); font-size: 12.5pt; line-height: 1.15; font-weight: 700; cursor: grab; overflow-wrap: anywhere; }
.bl-author { font-size: 9.5pt; font-style: italic; }
.bl-note { font-size: 9.5pt; }
.bl-call {
  justify-self: start; margin-top: .03in; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 8.5pt;
  padding: .01in .06in; border: 1px solid var(--bl-accent); color: var(--bl-accent); border-radius: 2px;
}

.bl-empty-drop {
  grid-column: 1 / -1; display: grid; gap: .05in; place-content: center; text-align: center; min-height: 2.4in; padding: .3in;
  border: 2px dashed color-mix(in srgb, var(--bl-ink) 30%, transparent); border-radius: 6px; font-size: 11pt;
}

/* Flyer layouts */
.bl-format-flyer.bl-layout-grid .bl-items { grid-template-columns: 1fr 1fr; }
.bl-format-flyer.bl-layout-list .bl-items { grid-template-columns: 1fr; gap: .2in; }
.bl-format-flyer.bl-layout-list .bl-cover-frame { width: 1.05in; height: 1.6in; }
.bl-format-flyer.bl-layout-list .bl-title { font-size: 14pt; }
.bl-format-flyer.bl-layout-list .bl-note { font-size: 10.5pt; }
.bl-format-flyer.bl-layout-wall .bl-items { grid-template-columns: repeat(5, 1fr); gap: .18in .2in; }
.bl-format-flyer.bl-layout-wall .bl-entry { grid-template-columns: 1fr; gap: .05in; text-align: center; }
.bl-format-flyer.bl-layout-wall .bl-cover-frame { width: 100%; height: auto; aspect-ratio: 2 / 3; }
.bl-format-flyer.bl-layout-wall .bl-title { font-size: 9pt; }
.bl-format-flyer.bl-layout-wall .bl-author { font-size: 8pt; }
.bl-format-flyer.bl-layout-wall .bl-call { justify-self: center; }

/* Bookmarks: four strips across a landscape sheet, with cut lines. */
.bl-format-bookmark { display: grid; grid-template-columns: repeat(4, 1fr); }
.bl-piece { position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.bl-mark { padding: .3in .22in; gap: .14in; border-right: 1px dashed color-mix(in srgb, var(--bl-ink) 35%, transparent); }
.bl-mark:last-child { border-right: 0; }
.bl-mark .bl-heading { font-size: 17pt; }
.bl-mark .bl-kicker { font-size: 7.5pt; }
.bl-mark .bl-items { gap: .11in; }
.bl-mark .bl-entry { grid-template-columns: .55in minmax(0, 1fr); gap: .08in; }
.bl-mark .bl-cover-frame { width: .55in; height: .84in; }
/* A bookmark has room for the title, not the annotation; the notes stay on
   the list and come back in any other format. */
.bl-mark .bl-note { display: none; }
.bl-mark .bl-lettered { padding: .04in; }
.bl-mark .bl-lettered-title { font-size: 5.5pt; }
.bl-mark .bl-lettered-author { display: none; }
.bl-mark .bl-title { font-size: 9pt; }
.bl-mark .bl-author, .bl-mark .bl-call { font-size: 7.5pt; }
.bl-mark .bl-foot { flex-direction: column; align-items: center; gap: .06in; text-align: center; }
.bl-mark .bl-footer { font-size: 7.5pt; }
.bl-mark .bl-qr { width: .75in; height: .75in; }
.bl-layout-text .bl-cover-frame { display: none; }
.bl-layout-text .bl-entry { grid-template-columns: 1fr; padding-bottom: .06in; border-bottom: 1px solid color-mix(in srgb, var(--bl-ink) 18%, transparent); }

/* Shelf talkers: four cards, 4.25 × 5.5 in, to fold or stand in a holder. */
.bl-format-talker { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.bl-card {
  padding: 0 .3in .25in; gap: .1in; text-align: center;
  border-right: 1px dashed color-mix(in srgb, var(--bl-ink) 35%, transparent);
  border-bottom: 1px dashed color-mix(in srgb, var(--bl-ink) 35%, transparent);
}
.bl-card:nth-child(2n) { border-right: 0; }
.bl-card:nth-child(n+3) { border-bottom: 0; }
.bl-card.is-blank { background: repeating-linear-gradient(45deg, transparent 0 8px, color-mix(in srgb, var(--bl-ink) 5%, transparent) 8px 9px); }
.bl-banner {
  margin: 0 -.3in; padding: .12in .3in; background: var(--bl-accent); color: var(--bl-on-accent);
  font-family: var(--bl-head-font); font-size: 14pt; font-weight: 700; letter-spacing: .02em;
}
.bl-card .bl-entry { grid-template-columns: 1fr; justify-items: center; align-content: start; gap: .08in; min-height: 0; padding-top: .12in; }
.bl-card .bl-card-foot { margin-top: auto; }
.bl-card .bl-cover-frame { width: 1.35in; height: 2.05in; }
.bl-card .bl-title { font-size: 13pt; }
.bl-card .bl-note { font-size: 9.5pt; }
.bl-card .bl-call { justify-self: center; }
.bl-card-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: .12in; text-align: left; }
.bl-staff { font-size: 8.5pt; font-style: italic; flex: 1; }
.bl-card .bl-qr { width: .7in; height: .7in; }
.bl-card .bl-qr-label { font-size: 6.5pt; }

/* Display sign */
.bl-sign { gap: .3in; text-align: center; padding: .7in; }
.bl-sign .bl-head { justify-items: center; }
.bl-sign .bl-heading { font-size: 46pt; }
.bl-sign .bl-kicker { font-size: 13pt; }
.bl-sign .bl-intro { font-size: 14pt; max-width: 6.2in; }
.bl-paper-tabloid .bl-sign .bl-heading { font-size: 68pt; }
.bl-paper-tabloid .bl-sign .bl-intro { font-size: 19pt; max-width: 8.5in; }
.bl-fan { position: relative; flex: 1; min-height: 0; display: block; }
.bl-fan .bl-entry {
  position: absolute; left: 50%; top: 14%; height: 54%; aspect-ratio: 2 / 3; display: block;
  transform: translateX(calc(-50% + var(--fan-x, 0%) * 1.95)) translateY(var(--fan-y, 0%)) rotate(var(--fan-r, 0deg));
  transform-origin: 50% 100%;
}
.bl-fan .bl-cover-frame, .bl-grid9 .bl-cover-frame { width: 100%; height: 100%; }
.bl-fan .bl-cover { box-shadow: 0 2px 8px rgb(0 0 0 / .35); }
/* Sized from the height left between head and foot, so nine covers never
   push the footer off the sheet whatever the paper. */
.bl-grid9 {
  flex: 1; min-height: 0; gap: .2in; justify-content: center;
  grid-template-rows: repeat(3, minmax(0, 1fr)); grid-template-columns: repeat(3, auto);
}
.bl-grid9 .bl-entry { display: block; height: 100%; aspect-ratio: 2 / 3; min-height: 0; }
.bl-sign .bl-foot { text-align: left; }
.bl-sign .bl-footer { font-size: 13pt; }
.bl-sign .bl-qr { width: 1.4in; height: 1.4in; }
.bl-sign .bl-qr-label { font-size: 10pt; max-width: 1.6in; }

/* ── Themes ───────────────────────────────────────────────────────── */

/* Classic: centred head between rules. */
.bl-theme-classic .bl-page > .bl-head { text-align: center; justify-items: center; padding-bottom: .14in; border-bottom: 2px solid var(--bl-accent); position: relative; }
.bl-theme-classic .bl-page > .bl-head::before { content: ""; display: block; width: 100%; border-top: 2px solid var(--bl-accent); margin-bottom: .1in; }
.bl-theme-classic .bl-page > .bl-head.is-continued::before { display: none; }
.bl-theme-classic .bl-foot { border-top: 1px solid color-mix(in srgb, var(--bl-ink) 25%, transparent); padding-top: .12in; }
.bl-theme-classic .bl-mark .bl-head { text-align: center; justify-items: center; border-bottom: 1.5px solid var(--bl-accent); padding-bottom: .08in; }

/* Bold: a band of colour carries the head. */
.bl-theme-bold .bl-page > .bl-head {
  margin: calc(var(--bl-pad) * -1) calc(var(--bl-pad) * -1) 0; padding: var(--bl-pad) var(--bl-pad) .25in;
  background: var(--bl-accent); color: var(--bl-on-accent);
}
.bl-theme-bold .bl-page > .bl-head .bl-heading, .bl-theme-bold .bl-page > .bl-head .bl-kicker,
.bl-theme-bold .bl-page > .bl-head .bl-continued { color: var(--bl-on-accent); }
.bl-theme-bold .bl-heading { font-size: 36pt; text-transform: none; }
.bl-theme-bold .bl-sign > .bl-head { margin: -.7in -.7in 0; padding: .7in .7in .35in; }
.bl-theme-bold .bl-mark > .bl-head { margin: -.3in -.22in 0; padding: .3in .22in .14in; background: var(--bl-accent); color: var(--bl-on-accent); }
.bl-theme-bold .bl-mark > .bl-head .bl-heading, .bl-theme-bold .bl-mark > .bl-head .bl-kicker { color: var(--bl-on-accent); }
.bl-theme-bold .bl-title { color: var(--bl-accent); }
.bl-theme-bold .bl-foot { background: var(--bl-soft); margin: 0 calc(var(--bl-pad) * -1) calc(var(--bl-pad) * -1); padding: .2in var(--bl-pad) var(--bl-pad); }
.bl-theme-bold .bl-sign .bl-foot { margin: 0 -.7in -.7in; padding: .3in .7in .7in; }
.bl-theme-bold .bl-mark .bl-foot { margin: 0 -.22in -.3in; padding: .12in .22in .3in; }

/* Modern: white space and a stripe down the side. */
.bl-theme-modern .bl-page { padding-left: calc(var(--bl-pad) + .3in); }
.bl-theme-modern .bl-page::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: .28in; background: var(--bl-accent); }
.bl-theme-modern .bl-sign { padding-left: 1in; text-align: left; }
.bl-theme-modern .bl-sign .bl-head { justify-items: start; }
.bl-theme-modern .bl-heading { font-weight: 600; letter-spacing: -.01em; }
.bl-theme-modern .bl-kicker { color: var(--bl-ink); opacity: .75; }
.bl-theme-modern .bl-call { border: 0; background: var(--bl-soft); color: var(--bl-ink); }
.bl-theme-modern .bl-mark { border-top: .18in solid var(--bl-accent); }
.bl-theme-modern .bl-banner { background: var(--bl-ink); }

/* ── Printing ─────────────────────────────────────────────────────── */

.bl-print { display: none; }

@media print {
  /* Everything but the sheets leaves the flow; hidden chrome still has
     height, and that height printed as blank pages after the last sheet. */
  body:has(> #bl-print[data-printing]) > :not(#bl-print) { display: none !important; }
  body:has(> #bl-print[data-printing]) { margin: 0; padding: 0; background: #fff; }
  #bl-print[data-printing] { display: block; position: static; inset: auto; }
  .bl-print .bl-sheet { page: bl-letter; break-after: page; box-shadow: none; transform: none; }
  .bl-print .bl-sheet:last-child { break-after: auto; }
  .bl-print .bl-sheet.bl-paper-a4 { page: bl-a4; }
  .bl-print .bl-sheet.bl-paper-tabloid { page: bl-tabloid; }
  .bl-print .bl-sheet.is-landscape { page: bl-letter-land; }
  .bl-print .bl-sheet.is-landscape.bl-paper-a4 { page: bl-a4-land; }
  .bl-print .bl-entry { box-shadow: none !important; }
}

@page bl-letter { size: 8.5in 11in; margin: 0; }
@page bl-a4 { size: 210mm 297mm; margin: 0; }
@page bl-tabloid { size: 11in 17in; margin: 0; }
@page bl-letter-land { size: 11in 8.5in; margin: 0; }
@page bl-a4-land { size: 297mm 210mm; margin: 0; }
