/* Legacy Interview: book templates. A5 (148 x 210 mm).
   Screen: every .sheet is one page with a shadow. Print: @page boxes, full-bleed cover,
   page numbers in the bottom margin (Chrome / Edge), chapters start on a new page. */

.book{--paper:#ffffff;--ink-t:#141414;--soft:#6b6760;--rule:#cfc8bb;--accent:#141414;
  --f-body:"Crimson Pro",Georgia,serif;--f-head:"Crimson Pro",Georgia,serif;--f-ui:"Roboto Condensed","Arial Narrow",sans-serif;
  color:var(--ink-t);-webkit-print-color-adjust:exact;print-color-adjust:exact}
.book .sheet{width:148mm;height:210mm;padding:20mm 17mm 22mm;margin:0 auto 14px;background:var(--paper);color:var(--ink-t);
  box-shadow:0 4px 24px rgba(0,0,0,.18);position:relative;overflow:hidden;display:flex;flex-direction:column;box-sizing:border-box}
.book.flow .sheet{height:auto;min-height:210mm;overflow:visible}
.book .orn{display:block;width:30mm;height:3mm;color:var(--rule);margin:5mm auto}

/* cover */
.book .cover{padding:16mm 14mm;justify-content:space-between;text-align:center}
.book .cv-kicker,.book .cv-foot{font-family:var(--f-ui);font-size:7.5pt;letter-spacing:.24em;text-transform:uppercase}
.book .cv-mid{display:flex;flex-direction:column;align-items:center}
.book .cv-shield{width:24mm;height:auto;margin-bottom:10mm}
.book .cv-name{margin:0;line-height:1.02}
.book .cv-rule{width:18mm;height:0;border-top:.6pt solid currentColor;margin:7mm auto 5mm;opacity:.8}
.book .cv-sub{margin:0}

/* title page */
.book .titlepage{justify-content:space-between;text-align:center}
.book .tp-in{margin-top:32mm}
.book .tp-kicker{font-family:var(--f-ui);font-size:8pt;letter-spacing:.24em;text-transform:uppercase;color:var(--soft);margin:0 0 5mm}
.book .tp-name{margin:0;line-height:1.05}
.book .tp-sub{font-family:var(--f-body);font-style:italic;font-size:13pt;margin:0;color:var(--soft)}
.book .tp-foot{font-family:var(--f-body);font-size:9.5pt;color:var(--soft);line-height:1.5}
.book .tp-foot p{margin:0 0 3mm}

/* contents */
.book .ct-h{margin:14mm 0 10mm}
.book .ct-list{list-style:none;padding:0;margin:0}
.book .ct-list li{display:grid;grid-template-columns:20mm 1fr;grid-template-rows:auto auto;column-gap:4mm;padding:3.5mm 0;border-bottom:.5pt solid var(--rule)}
.book .ct-n{grid-row:1/3;font-family:var(--f-ui);font-size:8pt;letter-spacing:.18em;text-transform:uppercase;color:var(--soft);padding-top:1mm}
.book .ct-name{font-family:var(--f-ui);font-size:8pt;letter-spacing:.18em;text-transform:uppercase}
.book .ct-title{font-family:var(--f-body);font-size:12.5pt;font-style:italic}

/* chapter */
.book .chp-head{margin:6mm 0 8mm}
.book .chp-num{display:block;font-family:var(--f-ui);font-size:8pt;letter-spacing:.24em;text-transform:uppercase;color:var(--soft)}
.book .chp-name{display:block}
.book .chp-title{margin:2mm 0 0;font-weight:400}
.book .chp-quote{margin:0 0 7mm;font-family:var(--f-body);font-size:14pt;line-height:1.3;font-style:italic}
.book .chp-body p{font-family:var(--f-body);font-size:11pt;line-height:1.55;margin:0 0 3.2mm;text-align:justify;hyphens:auto;orphans:3;widows:3}
.book .chp-body p:first-child::first-letter{float:left;font-size:3.35em;line-height:.82;margin:1.2mm 2mm 0 0}
.book .chp-qr{margin-top:auto;padding-top:6mm;display:flex;gap:4mm;align-items:center;font-family:var(--f-ui);font-size:8pt;letter-spacing:.06em;color:var(--soft);break-inside:avoid}
.book .chp-qr svg{width:16mm;height:16mm;flex:none}

/* closing */
.book .closing{justify-content:space-between;text-align:center}
.book .cl-in{margin-top:24mm;display:flex;flex-direction:column;align-items:center}
.book .cl-kicker{font-family:var(--f-ui);font-size:8pt;letter-spacing:.24em;text-transform:uppercase;color:var(--soft);margin:0 0 4mm}
.book .cl-h{margin:0 0 9mm;max-width:95mm;line-height:1.15}
.book .cl-qr svg{width:38mm;height:38mm}
.book .cl-url{font-family:var(--f-ui);font-size:8pt;letter-spacing:.06em;color:var(--soft);margin:4mm 0 0;word-break:break-all}
.book .cl-foot{display:flex;flex-direction:column;align-items:center;gap:3mm;font-family:var(--f-ui);font-size:7.5pt;letter-spacing:.1em;text-transform:uppercase;color:var(--soft);line-height:1.6}
.book .cl-foot img{width:9mm;height:auto}
.book .cl-foot p{margin:0}

/* ---------- GRIM: the brand. Ink cover, Gobold capitals, white interior, sand as a rule only ---------- */
.book.tpl-grim{--f-head:"Gobold Thin","Roboto Condensed",Impact,sans-serif;--accent:#e1b17e}
.book.tpl-grim .cover{background:#08080a;color:#f4f1ec}
.book.tpl-grim .cv-name{font-family:var(--f-head);font-weight:400;text-transform:uppercase;font-size:46pt;letter-spacing:.01em}
.book.tpl-grim .cv-rule{border-color:#e1b17e;opacity:1}
.book.tpl-grim .cv-sub{font-family:var(--f-body);font-weight:500;font-size:14pt;color:#f4f1ec}
.book.tpl-grim .cv-kicker{color:#e1b17e}
.book.tpl-grim .tp-name,.book.tpl-grim .ct-h,.book.tpl-grim .chp-name,.book.tpl-grim .cl-h{font-family:var(--f-head);font-weight:400;text-transform:uppercase}
.book.tpl-grim .tp-name{font-size:40pt}
.book.tpl-grim .ct-h{font-size:30pt}
.book.tpl-grim .chp-name{font-size:34pt;line-height:1.05;margin-top:2mm}
.book.tpl-grim .chp-title{font-family:var(--f-body);font-weight:500;font-size:15pt;color:var(--soft)}
.book.tpl-grim .chp-head .orn{display:none}
.book.tpl-grim .chp-head::after{content:"";display:block;width:14mm;border-top:.75pt solid #e1b17e;margin-top:5mm}
.book.tpl-grim .chp-quote{font-style:normal;font-weight:500;border-left:.75pt solid #e1b17e;padding-left:5mm}
.book.tpl-grim .chp-body p:first-child::first-letter{font-family:var(--f-head);font-size:3.9em;line-height:.8;margin-top:1.5mm}
.book.tpl-grim .cl-h{font-size:24pt}
.book.tpl-grim .orn{color:#e1b17e}

/* ---------- CLASSIC: a traditional memoir. Cloth-green cover with a gold frame, centred openers ---------- */
.book.tpl-classic{--paper:#fdfbf6;--rule:#cdbf9f;--soft:#6e6656}
.book.tpl-classic .cover{background:#1f3a2e;color:#e7d6a8;padding:12mm}
.book.tpl-classic .cover::before{content:"";position:absolute;inset:8mm;border:.8pt solid #c9ad6a;pointer-events:none}
.book.tpl-classic .cover::after{content:"";position:absolute;inset:10mm;border:.4pt solid #c9ad6a;pointer-events:none}
.book.tpl-classic .cv-top,.book.tpl-classic .cv-foot{padding:6mm 0}
.book.tpl-classic .cv-shield{width:18mm;opacity:.95}
.book.tpl-classic .cv-name{font-family:var(--f-head);font-weight:500;font-size:34pt;letter-spacing:.12em;text-transform:uppercase}
.book.tpl-classic .cv-rule{border-color:#c9ad6a}
.book.tpl-classic .cv-sub{font-family:var(--f-body);font-style:italic;font-size:15pt}
.book.tpl-classic .tp-name{font-family:var(--f-head);font-weight:500;font-size:30pt;letter-spacing:.1em;text-transform:uppercase}
.book.tpl-classic .ct-h{font-family:var(--f-head);font-weight:500;font-size:13pt;letter-spacing:.3em;text-transform:uppercase;text-align:center}
.book.tpl-classic .chp-head{text-align:center;margin-top:16mm}
.book.tpl-classic .chp-name{font-family:var(--f-ui);font-size:8pt;letter-spacing:.24em;text-transform:uppercase;color:var(--soft);margin-top:1mm}
.book.tpl-classic .chp-title{font-family:var(--f-head);font-style:italic;font-weight:400;font-size:22pt;line-height:1.15;margin-top:5mm}
.book.tpl-classic .chp-quote{text-align:center;border-top:.5pt solid var(--rule);border-bottom:.5pt solid var(--rule);padding:4mm 6mm;font-size:13pt}
.book.tpl-classic .chp-body p:first-child::first-letter{font-family:var(--f-head);font-weight:500;color:#1f3a2e}
.book.tpl-classic .chp-body p:first-child::first-line{font-variant:small-caps;letter-spacing:.04em}
.book.tpl-classic .cl-h{font-family:var(--f-head);font-style:italic;font-weight:400;font-size:20pt}

/* ---------- MODERN: light and open. Large condensed type, big chapter numbers, ragged right ---------- */
.book.tpl-modern{--f-body:"Roboto",system-ui,sans-serif;--f-head:"Roboto Condensed","Arial Narrow",sans-serif;--rule:#dcd8d0;--soft:#7a766e}
.book.tpl-modern .cover{background:#efebe4;color:#141414;text-align:left;padding:16mm 14mm}
.book.tpl-modern .cv-mid{align-items:flex-start;margin-top:auto;margin-bottom:12mm}
.book.tpl-modern .cv-shield{width:12mm;margin-bottom:auto;order:-1;position:absolute;top:16mm;right:14mm}
.book.tpl-modern .cv-name{font-family:var(--f-head);font-weight:500;font-size:58pt;line-height:.95;text-transform:uppercase;letter-spacing:-.01em}
.book.tpl-modern .cv-rule{margin:6mm 0 4mm;width:30mm;border-top-width:1.5pt}
.book.tpl-modern .cv-sub{font-family:var(--f-body);font-size:11pt}
.book.tpl-modern .cv-foot{text-align:left}
.book.tpl-modern .titlepage{text-align:left}
.book.tpl-modern .tp-name{font-family:var(--f-head);font-weight:500;font-size:40pt;text-transform:uppercase;line-height:.98}
.book.tpl-modern .titlepage .orn{margin:6mm 0;width:24mm}
.book.tpl-modern .tp-sub{font-style:normal}
.book.tpl-modern .ct-h{font-family:var(--f-head);font-weight:500;font-size:28pt;text-transform:uppercase}
.book.tpl-modern .ct-title{font-style:normal;font-size:11pt}
.book.tpl-modern .chp-head .orn{display:none}
.book.tpl-modern .chp-num{font-size:0;letter-spacing:0}
.book.tpl-modern .chp-num::before{content:attr(data-n);font-family:var(--f-head);font-weight:500;font-size:64pt;line-height:.9;color:#e2ddd3;letter-spacing:-.02em}
.book.tpl-modern .chp-name{font-family:var(--f-head);font-size:8.5pt;font-weight:500;letter-spacing:.22em;text-transform:uppercase;margin-top:3mm}
.book.tpl-modern .chp-title{font-family:var(--f-head);font-weight:500;font-size:22pt;line-height:1.08;margin-top:2mm}
.book.tpl-modern .chp-quote{font-family:var(--f-head);font-style:normal;font-weight:500;font-size:15pt;border-left:2pt solid #141414;padding-left:5mm}
.book.tpl-modern .chp-body p{font-size:10pt;line-height:1.65;text-align:left;hyphens:manual}
.book.tpl-modern .chp-body p:first-child::first-letter{float:none;font-size:inherit;margin:0;line-height:inherit}
.book.tpl-modern .chp-body p:first-child{font-size:12pt;line-height:1.5}
.book.tpl-modern .cl-h{font-family:var(--f-head);font-weight:500;font-size:22pt;text-transform:uppercase}
.book.tpl-modern .closing{text-align:left}
.book.tpl-modern .cl-in{align-items:flex-start}
.book.tpl-modern .cl-foot{align-items:flex-start;text-align:left}

/* ---------- print ---------- */
@page{size:A5;margin:20mm 17mm 22mm;
  @bottom-center{content:counter(page);font-family:"Roboto Condensed",sans-serif;font-size:8pt;color:#8a857c}}
@page cover{margin:0;@bottom-center{content:none}}
@page front{@bottom-center{content:none}}
@media print{
  :root,html,body{color-scheme:light!important;background:#fff!important}
  .app{max-width:none!important;padding:0!important;display:block!important}
  .book,.book.flow{width:auto!important}
  .book .sheet,.book.flow .sheet{min-height:0!important;height:auto!important;width:auto!important}
  .book .sheet.cover{width:148mm!important;height:210mm!important}
  .book .sheet.titlepage,.book .sheet.closing{min-height:164mm!important}
  .printbar{display:none!important}
  .book .sheet{width:auto;height:auto;min-height:0;margin:0;padding:0;box-shadow:none;overflow:visible;display:block;break-after:page;background:transparent}
  .book .sheet:last-child{break-after:auto}
  .book .cover{page:cover;width:148mm;height:210mm;padding:16mm 14mm;display:flex;flex-direction:column;justify-content:space-between}
  .book.tpl-classic .cover{padding:12mm}
  .book.tpl-modern .cover{padding:16mm 14mm}
  .book .titlepage,.book .contents,.book .closing{page:front;min-height:166mm;display:flex;flex-direction:column}
  .book .contents{display:block}
  .book .chp-qr{margin-top:6mm;break-before:avoid;break-inside:avoid}
  .book .chp-body p:last-child{break-after:avoid}
}

/* ---------- scaled previews (book screen) ---------- */
.mini{--s:.42;width:calc(148mm * var(--s));height:calc(210mm * var(--s));position:relative;overflow:hidden;flex:none;border-radius:2px;box-shadow:0 10px 30px rgba(0,0,0,.45)}
.mini .book{position:absolute;top:0;left:0;width:148mm;transform:scale(var(--s));transform-origin:0 0}
.mini .book .sheet{margin:0;box-shadow:none}
