/* ===========================================================================
   BOOK SKIN: LOVELACE
   ---------------------------------------------------------------------------
   Loaded after book.css when config.book.skin = 'lovelace'. It changes the
   palette, the three faces and a handful of rules that book.css hardcodes.
   Layout is untouched.

   Direction: 1843. Ada Lovelace's Notes were published in Taylor's Scientific
   Memoirs that year. The year before, John Herschel (the man checking tables
   with Babbage in the first sentence of Chapter 1) had invented the
   cyanotype, and in 1843 Anna Atkins used it to make the first book
   illustrated with photographs. So the ground is Prussian blue, the blue of a
   cyanotype, with line and type in the white the process leaves behind. The
   only warm notes are the manila of the punched cards and the brass of the
   thread that laces them.

   Old Standard TT for display: a revival of the modern faces that scientific
   books of the period were set in. Literata for reading. IBM Plex Mono for
   dates, labels and the letters printed under the card columns; IBM is in
   the book, and a monospace is what a punched card is.
   ========================================================================= */

body.book--lovelace {
  --ink: #14324F;
  --ink-deep: #0E2640;
  --night: #1A3D60;
  --rule: #33597E;
  --rule-soft: #24486B;
  --paper: #EEF3F2;
  --ash: #B4C8D6;
  --ash-dim: #8FAAC0;
  --sodium: #C9A24B;
  --sodium-lt: #E4C777;
  --verdigris: #A5CDB9;

  --card: #E6D6AC;
  --card-mark: rgba(20, 50, 79, 0.2);
  --card-ink: rgba(14, 38, 64, 0.72);

  --display: 'Old Standard TT', 'Scotch Roman', 'Century Schoolbook', Georgia, serif;
  --body: 'Literata', Georgia, 'Times New Roman', serif;
  --util: 'IBM Plex Mono', 'SFMono-Regular', Menlo, Consolas, monospace;

  font-size: 1.05rem;
  line-height: 1.7;
}

/* A cyanotype is never flat: the sensitiser is brushed on and the exposure
   is uneven. One soft light, off centre, and a grain. */
body.book--lovelace .book-masthead {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(120% 90% at 22% 18%, #1D4A74 0%, #14324F 48%, #0E2640 100%);
}

/* Monospace does not want the wide tracking the condensed grotesque took. */
body.book--lovelace .nav-logo,
body.book--lovelace .nav-links a,
body.book--lovelace .book-eyebrow,
body.book--lovelace .book-section-label,
body.book--lovelace .book-byline,
body.book--lovelace .book-status,
body.book--lovelace .book-chapter-label,
body.book--lovelace .book-part-number,
body.book--lovelace .register thead th {
  letter-spacing: 0.06em;
}

body.book--lovelace .nav-logo {
  font-size: 0.74rem;
}

body.book--lovelace .nav-links a {
  font-size: 0.72rem;
}

body.book--lovelace .nav.scrolled {
  background-color: rgba(14, 38, 64, 0.95);
}

@media (max-width: 768px) {
  body.book--lovelace .nav-links {
    background: var(--ink-deep);
  }
}

/* Title page of a scientific memoir: large, upright, tight, no tricks. */
body.book--lovelace .book-title {
  font-weight: 400;
  font-size: clamp(3rem, 9.4vw, 7.2rem);
  line-height: 0.98;
  letter-spacing: -0.018em;
}

body.book--lovelace .book-subtitle {
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  color: var(--ash);
  max-width: 40ch;
}

body.book--lovelace .book-h2,
body.book--lovelace .book-page-title {
  letter-spacing: -0.008em;
}

body.book--lovelace .book-standfirst p {
  font-style: italic;
  max-width: 26ch;
}

body.book--lovelace .book-prose p,
body.book--lovelace .article-content p,
body.book--lovelace .article-content li {
  color: #DCE7EC;
}

body.book--lovelace .book-prose a,
body.book--lovelace .book-inline-link,
body.book--lovelace .article-content a {
  text-decoration-color: rgba(228, 199, 119, 0.45);
}

body.book--lovelace .book-working-flag {
  border-color: rgba(201, 162, 75, 0.5);
}

/* Excerpts open on the chapter's epigraph. */
body.book--lovelace .book-chapter-text blockquote {
  margin: 0 0 2.4rem;
  padding: 0 0 0 1.4rem;
  border-left: 2px solid var(--sodium);
  font-family: var(--display);
  font-style: italic;
  font-size: 1.22rem;
  line-height: 1.45;
  color: var(--paper);
}

body.book--lovelace .book-chapter-text blockquote p {
  color: inherit;
  margin-bottom: 0.4rem;
}

body.book--lovelace .book-chapter-text blockquote cite {
  display: block;
  font-family: var(--util);
  font-style: normal;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: var(--ash);
  margin-top: 0.8rem;
}

body.book--lovelace .book-chapter-text hr {
  border: 0;
  height: 1px;
  width: 4rem;
  margin: 2.6rem 0;
  background: var(--rule);
}

body.book--lovelace .book-chapter-text .excerpt-cast {
  margin-top: 2.8rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--rule);
  font-family: var(--util);
  font-size: 0.8rem;
  line-height: 1.7;
  color: var(--ash);
}

body.book--lovelace .book-chapter-text .excerpt-cast strong {
  color: var(--paper);
  font-weight: 500;
}

/* Thirty-two chapters: the spelled-out labels run long. */
@media (min-width: 701px) {
  body.book--lovelace .book-chapter-item a {
    grid-template-columns: 12.5rem 1fr auto;
  }
}
