/* /enhancement — the "book" layer.  Loaded only on chapter pages, on top of
   site.css.  The look is a printed colour-science textbook: warm paper, one
   ink colour, and a small family of muted tints used sparingly for plates,
   tables and status marks.  Nothing saturated. */

:root {
  --bk-paper:   #fbf8f1;
  --bk-paper-2: #f3eee2;
  --bk-ink:     #2b2a27;
  --bk-ink-2:   #6b665c;
  --bk-rule:    #d9d2c2;
  --bk-teal:    #3b7a80;   /* section colour */
  --bk-rust:    #b5563a;   /* build / attention */
  --bk-ochre:   #c08a2e;   /* partial */
  --bk-sage:    #6c8f5a;   /* have */
  --bk-slate:   #5a6a85;   /* margin notes, figure captions */
  --bk-tint-teal:  #e3eeee;
  --bk-tint-rust:  #f5e6df;
  --bk-tint-ochre: #f7eedb;
  --bk-tint-sage:  #e6efe1;
  --bk-tint-slate: #e6eaf1;
}

.bk-page {
  background: var(--bk-paper);
  color: var(--bk-ink);
  font-family: Lato, "Segoe UI", system-ui, sans-serif;
  font-size: 1.04rem;
  line-height: 1.65;
}
.bk-page h1, .bk-page h2, .bk-page h3, .bk-page h4 {
  font-family: Poppins, "Segoe UI", system-ui, sans-serif;
  color: var(--bk-ink);
}
.bk-page a { color: var(--bk-teal); }

/* running head + chapter opener */
.bk-runhead {
  border-bottom: 1px solid var(--bk-rule);
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--bk-ink-2);
}
.bk-opener { padding: 3.5rem 0 2.5rem; border-bottom: 3px double var(--bk-rule); }
.bk-chapter-no {
  font-family: Poppins, sans-serif;
  font-size: 5.5rem;
  line-height: 1;
  font-weight: 600;
  color: var(--bk-teal);
  opacity: .55;
}
.bk-opener h1 { font-size: 2.3rem; font-weight: 600; margin-top: .5rem; }
.bk-opener .bk-lede { font-size: 1.2rem; color: var(--bk-ink-2); max-width: 46rem; }
.bk-meta { font-size: .85rem; color: var(--bk-ink-2); }

/* body measure and section numbering */
.bk-body { max-width: 50rem; }
.bk-body h2 {
  font-size: 1.55rem; font-weight: 600;
  margin-top: 3rem; padding-top: 1.25rem;
  border-top: 1px solid var(--bk-rule);
}
.bk-body h2 .bk-n, .bk-body h3 .bk-n {
  color: var(--bk-teal); font-weight: 500; margin-right: .6rem;
  font-variant-numeric: tabular-nums;
}
.bk-body h3 { font-size: 1.2rem; font-weight: 600; margin-top: 2rem; }
.bk-body p  { margin-bottom: 1rem; }
.bk-body p.bk-first::first-letter {
  float: left; font-family: Poppins, sans-serif; font-size: 3.4rem; line-height: .85;
  padding: .1em .1em 0 0; color: var(--bk-teal);
}
.bk-body ul, .bk-body ol { padding-left: 1.4rem; }
.bk-body li { margin-bottom: .35rem; }
.bk-body code, .bk-body kbd {
  font-family: Inconsolata, ui-monospace, monospace;
  font-size: .93em; color: var(--bk-ink);
  background: var(--bk-paper-2); padding: .05em .3em; border-radius: 3px;
}

/* plates: tinted boxes used for asides, definitions and key findings */
.bk-plate {
  border-left: 4px solid var(--bk-teal);
  background: var(--bk-tint-teal);
  padding: 1rem 1.25rem; margin: 1.5rem 0; border-radius: 0 6px 6px 0;
}
.bk-plate.rust  { border-color: var(--bk-rust);  background: var(--bk-tint-rust); }
.bk-plate.ochre { border-color: var(--bk-ochre); background: var(--bk-tint-ochre); }
.bk-plate.sage  { border-color: var(--bk-sage);  background: var(--bk-tint-sage); }
.bk-plate.slate { border-color: var(--bk-slate); background: var(--bk-tint-slate); }
.bk-plate .bk-label {
  display: block; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--bk-ink-2); margin-bottom: .35rem;
}
.bk-plate p:last-child { margin-bottom: 0; }

/* tables: hairline rules, tinted heading band, no zebra */
.bk-table { width: 100%; border-collapse: collapse; margin: 1.25rem 0 .5rem; font-size: .95rem; }
.bk-table th {
  text-align: left; font-weight: 600; font-size: .8rem; letter-spacing: .06em;
  text-transform: uppercase; color: var(--bk-ink-2);
  background: var(--bk-tint-slate); padding: .55rem .6rem;
  border-bottom: 1px solid var(--bk-rule);
}
.bk-table td { padding: .55rem .6rem; border-bottom: 1px solid var(--bk-rule); vertical-align: top; }
.bk-table tr:last-child td { border-bottom: 2px solid var(--bk-rule); }
.bk-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bk-table .bk-sub td { background: var(--bk-paper-2); font-weight: 600; }
.bk-table-wrap { overflow-x: auto; }

/* status marks */
.bk-mark {
  display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; padding: .1rem .5rem; border-radius: 999px; white-space: nowrap;
  border: 1px solid transparent;
}
.bk-mark.have    { color: var(--bk-sage);  background: var(--bk-tint-sage);  border-color: #cddcc4; }
.bk-mark.partial { color: var(--bk-ochre); background: var(--bk-tint-ochre); border-color: #eadcb8; }
.bk-mark.build   { color: var(--bk-rust);  background: var(--bk-tint-rust);  border-color: #ebcfc3; }
.bk-mark.skip    { color: var(--bk-slate); background: var(--bk-tint-slate); border-color: #cdd4e1; }

/* figures */
.bk-figure { margin: 1.75rem 0; }
.bk-figure figcaption {
  font-size: .85rem; color: var(--bk-slate); margin-top: .5rem;
}
.bk-figure figcaption b { font-variant: small-caps; letter-spacing: .05em; font-weight: 600; }

/* the colour-bar "scale" used to show priority tiers */
.bk-scale { display: flex; gap: 4px; margin: 1rem 0 1.5rem; }
.bk-scale div {
  flex: 1; padding: .55rem .7rem; font-size: .8rem; border-radius: 4px; color: var(--bk-ink);
}
.bk-scale .t1 { background: #d9e6e7; }
.bk-scale .t2 { background: #e8ecd9; }
.bk-scale .t3 { background: #f3e8cf; }
.bk-scale .t4 { background: #f0dcd3; }
.bk-scale b { display: block; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--bk-ink-2); }

/* footnotes / sources */
.bk-sources { font-size: .85rem; color: var(--bk-ink-2); }
.bk-sources ol { padding-left: 1.4rem; }
.bk-sources li { margin-bottom: .25rem; overflow-wrap: anywhere; }

/* chapter list on the contents page */
.bk-contents .bk-entry {
  display: flex; gap: 1.25rem; padding: 1.25rem 0; border-bottom: 1px solid var(--bk-rule);
  color: inherit; text-decoration: none;
}
.bk-contents .bk-entry:hover .bk-entry-title { color: var(--bk-teal); }
.bk-contents .bk-entry-no { font-family: Poppins, sans-serif; font-size: 2rem; color: var(--bk-teal); opacity: .6; min-width: 3rem; line-height: 1; }
.bk-contents .bk-entry-title { font-family: Poppins, sans-serif; font-weight: 600; font-size: 1.15rem; }
.bk-contents .bk-entry-blurb { color: var(--bk-ink-2); }
.bk-contents .bk-entry.soon { opacity: .55; }

/* prev/next */
.bk-nav { border-top: 3px double var(--bk-rule); margin-top: 3rem; padding-top: 1.25rem; font-size: .95rem; }

@media print {
  .bk-page { background: #fff; }
  nav.navbar, footer, .bk-nav { display: none !important; }
}

/* tier marks (chapter 5): the lowest QuickBooks tier that has a feature */
.bk-mark.ss   { color: var(--bk-teal);  background: var(--bk-tint-teal);  border-color: #c5d9da; }
.bk-mark.es   { color: var(--bk-sage);  background: var(--bk-tint-sage);  border-color: #cddcc4; }
.bk-mark.pl   { color: var(--bk-ochre); background: var(--bk-tint-ochre); border-color: #eadcb8; }
.bk-mark.ad   { color: var(--bk-slate); background: var(--bk-tint-slate); border-color: #cdd4e1; }
.bk-mark.none { color: var(--bk-rust);  background: var(--bk-tint-rust);  border-color: #ebcfc3; }
.bk-mark.addon { color: var(--bk-ink-2); background: var(--bk-paper-2); border-color: var(--bk-rule); }
.bk-legend span { margin-right: .5rem; }

/* multi-column price tables (chapter 8): fixed proportions, no nowrap */
.bk-tiers { table-layout: fixed; }
.bk-tiers th:nth-child(1) { width: 17%; }
.bk-tiers th:nth-child(2) { width: 41%; }
.bk-tiers th:nth-child(3), .bk-tiers th:nth-child(4) { width: 21%; }
.bk-body ul.bk-prices { list-style: none; padding: 0; margin: 0 0 .35rem; }
.bk-prices li { white-space: nowrap; font-variant-numeric: tabular-nums; margin: 0; }
@media (max-width: 640px) { .bk-tiers { table-layout: auto; min-width: 40rem; } }
