/* The Tested Jar
 *
 * Palette carried from the book's cover so the two read as one thing.
 * No web fonts, no framework, no JavaScript.
 *
 * THE ONE DESIGN ARGUMENT THAT DRIVES THIS FILE:
 * on this site the quoted source is not evidence supporting our sentence, it IS
 * the content, and our sentence is the gloss. So .sourceslab-quote is set
 * LARGER and HEAVIER than the body prose around it. Every sibling site in this
 * line does the opposite -- quotes set small and quiet -- and doing the opposite
 * here is the whole point.
 *
 * Danger red is reserved. #B3271E appears in exactly two components and never
 * decorates. A reader has to be able to trust that red here means one thing.
 *
 * Class names checked programmatically against all 350 in the five sister sites:
 * zero shared.
 */

:root {
  --preserve: #7B2D3B;   /* deep preserve red -- brand */
  --sage:     #5F7D4F;   /* secondary */
  --amber:    #E0A82E;   /* accent, and the rule beside every quoted source */
  /* Two text-on-colour pairs measured below 4.5:1 and were fixed rather than
   * waived. --amber-lit is the amber for TEXT on the burgundy masthead (the
   * plain accent measured 4.30 there); --sage-deep is the link-hover green on
   * the warm ground (plain sage measured 4.05). The undarkened values stay for
   * rules, borders and fills, where contrast ratios do not apply. */
  --amber-lit: #EDBC50;  /* 5.22:1 on --preserve */
  --sage-deep: #4E6941;  /* 5.36:1 on --ground, 5.99:1 on --paper */
  --ground:   #F5EFE3;   /* warm light ground; no sister site uses a warm ground */
  --danger:   #B3271E;   /* RESERVED. Two components. Never decoration. */
  --ink:      #2B2B2B;
  --ink-soft: #55504a;
  --ink-thin: #6a635b;   /* 4.9:1 on --ground */
  --paper:    #FFFCF6;
  --rule:     #ded3bf;
  --rule-firm:#c3b596;

  --measure: 40rem;
  --wide: 68rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 1.0625rem/1.65 Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
}

.hopover {
  position: absolute; left: -9999px;
  background: var(--ink); color: var(--paper);
  padding: 0.6rem 1rem; z-index: 20;
}
.hopover:focus { left: 0.5rem; top: 0.5rem; }

a { color: var(--preserve); }
/* NOT --danger. This rule said `color: var(--danger)` and turned every link on
 * the site emergency red on hover -- nav, footer, the book box -- including on
 * the botulism page, where the same colour is the background of the medical
 * block. The file states the reserved-red rule twice above and then broke it in
 * its third declaration. Found by audit. */
a:hover { color: var(--sage-deep); text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--sage); outline-offset: 2px; }

/* ---------------------------------------------------------------- masthead */

.crock {
  background: var(--preserve);
  border-bottom: 4px solid var(--amber);
}

.capsule {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 1.1rem 1.25rem 0.85rem;
}

.preservemark {
  display: block;
  color: var(--ground);
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.preservemark:hover { color: var(--amber-lit); }

.preservemark-tag {
  display: block;
  font: 400 0.875rem/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #efe2d4;
  margin-top: 0.2rem;
  max-width: 44ch;
}

.shelfnav {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.15rem;
  margin: 0.9rem 0 0;
  padding: 0;
  font: 500 0.9375rem/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
}
.shelfnav-item a {
  display: inline-block;
  color: var(--ground);
  text-decoration: none;
  padding: 0.3rem 0;
  border-bottom: 2px solid transparent;
}
.shelfnav-item a:hover { color: var(--amber-lit); border-bottom-color: var(--amber-lit); }
.shelfnav-item a[aria-current="page"] { color: var(--amber-lit); border-bottom-color: var(--amber-lit); }

/* -------------------------------------------------------------------- body */

.pagecrate {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 1.75rem 1.25rem 4rem;
}

.trailline {
  font: 400 0.875rem/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink-thin);
  margin-bottom: 1.25rem;
}

.topmatter { max-width: var(--measure); }
.topmatter h1 {
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.5rem);
  line-height: 1.18;
  letter-spacing: -0.015em;
  margin: 0 0 0.5rem;
}

.datestamp {
  font: 400 0.8125rem/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink-thin);
  margin: 0 0 1.5rem;
}

.upfront {
  max-width: var(--measure);
  background: var(--paper);
  border: 1px solid var(--rule-firm);
  border-left: 6px solid var(--sage);
  padding: 1rem 1.25rem;
  margin: 0 0 2rem;
}
.upfront-tag {
  font: 600 0.75rem/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--sage-deep);
  margin: 0 0 0.45rem;
}
.upfront p { margin: 0 0 0.6rem; }
.upfront p:last-child { margin-bottom: 0; }

.proseline { max-width: var(--measure); }
.proseline h2 {
  font-size: 1.4375rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 2.5rem 0 0.75rem;
}
.proseline h3 {
  font-size: 1.125rem;
  margin: 1.9rem 0 0.5rem;
}
.proseline p, .proseline ul, .proseline ol { margin: 0 0 1.1rem; }
.proseline li { margin-bottom: 0.45rem; }
.proseline strong { font-weight: 700; }

.proseline table {
  width: 100%;
  border-collapse: collapse;
  font: 400 0.9375rem/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
  margin: 0 0 1.4rem;
}
.proseline th, .proseline td {
  border-bottom: 1px solid var(--rule);
  padding: 0.55rem 0.6rem 0.55rem 0;
  text-align: left;
  vertical-align: top;
}
.proseline th { font-weight: 600; border-bottom-color: var(--rule-firm); }

/* ------------------------------------------- the tested-source slab
 * Deliberately heavier than the prose. See the header note.
 */

.sourceslab {
  max-width: var(--measure);
  margin: 2.25rem 0;
  background: var(--paper);
  border: 1px solid var(--rule-firm);
  border-left: 7px solid var(--amber);
}

.sourceslab-tag {
  font: 600 0.75rem/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--preserve);
  margin: 0;
  padding: 0.85rem 1.25rem 0;
}

.sourceslab-quote {
  margin: 0;
  padding: 0.55rem 1.25rem 0.4rem;
  font-size: 1.1875rem;
  line-height: 1.5;
  font-weight: 600;
  color: var(--ink);
}
.sourceslab-quote p { margin: 0 0 0.7rem; }
.sourceslab-quote p:last-child { margin-bottom: 0; }

.sourceslab-cite {
  font: 400 0.8125rem/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink-soft);
  margin: 0;
  padding: 0.35rem 1.25rem 0;
}

.sourceslab-when {
  font: 400 0.75rem/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink-thin);
  margin: 0;
  padding: 0.15rem 1.25rem 0.85rem;
}

.sourceslab-plain {
  border-top: 1px solid var(--rule);
  padding: 0.9rem 1.25rem 1rem;
  font-size: 1rem;
  color: var(--ink-soft);
}
.sourceslab-plain p { margin: 0 0 0.7rem; }
.sourceslab-plain p:last-child { margin-bottom: 0; }
.sourceslab-plain > p:first-child::before {
  content: "In plain words. ";
  font: 600 0.8125rem/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--sage-deep);
}

/* ------------------------------------------------------- the currency stamp */

.currency {
  max-width: var(--measure);
  margin: 2.5rem 0 0;
  padding: 1rem 0 0;
  border-top: 2px solid var(--rule-firm);
  font: 400 0.875rem/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
}

.currency-h {
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-thin);
  margin: 0 0 0.85rem;
}

.currency-row { margin: 0 0 0.95rem; }
.currency-doc { margin: 0; font-weight: 600; }
.currency-when { margin: 0.1rem 0 0; color: var(--ink-thin); font-size: 0.8125rem; }
.currency-note { margin: 0.3rem 0 0; color: var(--ink-soft); font-size: 0.8125rem; }

/* -------------------------------------------------- the no-process notice */

.noprocess {
  max-width: var(--measure);
  margin: 2.25rem 0;
  padding: 1.05rem 1.25rem 1.15rem;
  background: var(--paper);
  border: 2px solid var(--danger);
}

.noprocess-h {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--danger);
  margin: 0 0 0.5rem;
}

.noprocess-kind {
  font: 600 0.8125rem/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  margin: 0 0 0.35rem;
}

.noprocess-why {
  font: 400 0.9375rem/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink-soft);
  margin: 0;
}

.noprocess-detail { margin-top: 0.85rem; font-size: 1rem; }
.noprocess-detail p { margin: 0 0 0.6rem; }

.noprocess-instead {
  margin-top: 0.95rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--rule);
  font-size: 1rem;
}
.noprocess-instead p { display: inline; margin: 0; }
.noprocess-instead strong { color: var(--sage-deep); }

/* ---------------------------------------------------- the medical block */

.redalert {
  max-width: var(--measure);
  margin: 2.25rem 0;
  padding: 1.1rem 1.25rem 1.2rem;
  background: var(--danger);
  color: #fff6f4;
}
.redalert a { color: #ffe9d9; }

.redalert-h {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0 0 0.65rem;
}

.redalert-line {
  font: 400 1rem/1.6 system-ui, -apple-system, "Segoe UI", sans-serif;
  margin: 0 0 0.75rem;
}

.redalert-src {
  font: 400 0.8125rem/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
  margin: 0;
  opacity: 0.9;
}

/* ------------------------------------------------------------- questions */

.followups {
  max-width: var(--measure);
  margin: 2.75rem 0 0;
  padding-top: 1.5rem;
  border-top: 2px solid var(--rule-firm);
}
.followups h2 { font-size: 1.3125rem; margin: 0 0 1.1rem; }
.queries-q {
  font-weight: 700;
  margin: 1.4rem 0 0.4rem;
}
.queries-a { color: var(--ink-soft); }
.queries-a p { margin: 0 0 0.7rem; }

/* ----------------------------------------------------------- source deck */

.sourcedeck {
  max-width: var(--measure);
  margin: 2.5rem 0 0;
  padding-top: 1.4rem;
  border-top: 2px solid var(--rule-firm);
}
.sourcedeck-h {
  font: 600 0.75rem/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-thin);
  margin: 0 0 0.9rem;
}
.sourcedeck-item {
  font: 400 0.9375rem/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
  margin: 0 0 0.85rem;
}
.sourcedeck-host { color: var(--ink-thin); font-size: 0.8125rem; }

/* ---------------------------------------------------------------- book box */

.bookrail {
  max-width: var(--measure);
  margin: 2.75rem 0 0;
  padding: 1.15rem 1.25rem 1.25rem;
  background: var(--paper);
  border: 1px solid var(--rule-firm);
  border-top: 5px solid var(--sage);
}
.bookrail-h { font-size: 1.1875rem; font-weight: 700; margin: 0 0 0.25rem; }
.bookrail-sub {
  font: 400 0.875rem/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink-thin);
  margin: 0 0 0.75rem;
}
.bookrail-blurb { margin: 0 0 0.9rem; font-size: 1rem; }
.bookrail-go { margin: 0 0 0.85rem; }
.bookrail-go a {
  display: inline-block;
  background: var(--sage);
  color: var(--paper);
  text-decoration: none;
  font: 600 0.9375rem/1 system-ui, -apple-system, "Segoe UI", sans-serif;
  padding: 0.7rem 1.1rem;
}
.bookrail-go a:hover { background: var(--preserve); color: var(--ground); }
.bookrail-fine {
  font: 400 0.8125rem/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink-thin);
  margin: 0;
}

/* -------------------------------------------------------------- hub / home */

.hubline {
  max-width: var(--measure);
  font-size: 1.125rem;
  color: var(--ink-soft);
  margin: 0 0 0.5rem;
}
.shelftally {
  font: 400 0.8125rem/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink-thin);
  margin: 0 0 2rem;
}

.tilewall {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 1px;
  background: var(--rule-firm);
  border: 1px solid var(--rule-firm);
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
}

.crate {
  background: var(--paper);
  padding: 1.1rem 1.15rem 1.25rem;
}
.crate-h { font-size: 1.0625rem; font-weight: 700; margin: 0 0 0.4rem; line-height: 1.3; }
.crate-h a { text-decoration: none; }
.crate-h a:hover { text-decoration: underline; text-decoration-color: var(--amber);
                  text-decoration-thickness: 3px; text-underline-offset: 3px; }
.crate-note {
  font: 400 0.9375rem/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink-soft);
  margin: 0;
}
.crate-count {
  font: 400 0.8125rem/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink-thin);
  margin: 0.6rem 0 0;
}

/* -------------------------------------------------------------------- 404 */

.gone { max-width: var(--measure); }
.gone-h { font-size: 1.875rem; margin: 0 0 0.75rem; }

/* ----------------------------------------------------------------- footer */

.cellar {
  background: var(--ink);
  color: #d9d2c8;
  margin-top: 4rem;
}
.cellar > div {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 2rem 1.25rem 2.5rem;
}
.cellar ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.35rem;
  margin: 0 0 1.5rem;
  padding: 0;
  font: 500 0.9375rem/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}
.cellar a { color: var(--amber); }
.cellar a:hover { color: var(--ground); }
.cellar p {
  font: 400 0.8125rem/1.65 system-ui, -apple-system, "Segoe UI", sans-serif;
  max-width: 62ch;
  margin: 0 0 0.9rem;
}

@media (min-width: 46rem) {
  .capsule { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; }
  .shelfnav { margin-top: 0; justify-content: flex-end; }
  .preservemark-tag { max-width: 34ch; }
}

@media print {
  .crock, .cellar, .hopover, .bookrail { display: none; }
  body { background: #fff; }
  .sourceslab { border-left-width: 4px; }
}
