/* Total Mayhem Almanac - production skin, book-true ("more my books").
   Ink on paper, Roboto Mono (the books' own face), black label-block headings
   like the printed NOTICE / WARNING / ABOUT DASH panels, one print red,
   highlighter yellow reserved for [RALPH: ...] slots.
   Local system fonts only. Zero external requests. */

:root {
  --paper: #FBF7EE;
  --ink: #161513;
  --card: #FFFFFF;
  --red: #E0301E;
  --yellow: #FFD23F;
  --muted: #6E675C;
  --rule: #161513;
  --shadow: #161513;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #171614;
    --ink: #F2EDE4;
    --card: #211F1C;
    --red: #FF6A5A;
    --yellow: #E8B915;
    --muted: #A79E8F;
    --rule: #F2EDE4;
    --shadow: #00000000;
  }
}

* { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Roboto Mono", ui-monospace, Menlo, Consolas, monospace;
  line-height: 1.55;
}
main { max-width: 64rem; margin: 0 auto; padding: 1.3rem 1.1rem 4rem; }
a { color: inherit; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- printed label blocks ---------- */
h1, h2, h3 {
  font-family: "Roboto Mono", ui-monospace, Menlo, monospace;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
h1 {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  font-size: 1.45rem;
  line-height: 1.3;
  padding: 0.32rem 0.75rem;
  margin: 0.9rem 0 0.6rem;
  transform: rotate(-0.6deg);
}
h2 {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.95rem;
  padding: 0.18rem 0.6rem;
  margin: 1.9rem 0 0.6rem;
}
h3 {
  font-size: 0.85rem;
  border-bottom: 2px solid var(--ink);
  display: inline-block;
  margin: 1.2rem 0 0.4rem;
  padding-bottom: 0.05rem;
}
h1 .count, h2 .count { color: var(--paper); opacity: 0.65; font-weight: 400; font-size: 0.8em; }
h3 .count, p .count { color: var(--muted); font-weight: 400; }
p.count { color: var(--muted); font-size: 0.85rem; margin: 0.2rem 0 1rem; }

/* ---------- header ---------- */
header.top {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.1rem;
  padding: 0.6rem 1rem;
  background: var(--paper);
  border-bottom: 3px solid var(--rule);
  position: sticky; top: 0; z-index: 30;
}
.brand {
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  text-decoration: none; font-size: 0.95rem;
  background: var(--ink); color: var(--paper);
  padding: 0.22rem 0.55rem;
  white-space: nowrap;
}
/* two-part brand: TOTAL MAYHEM (site home) + ALMANAC (this bundle) */
.brand.sub { background: var(--red); color: #FFF; margin-left: 0.25rem; transform: rotate(0.6deg); }
header.top nav { display: flex; flex-wrap: wrap; gap: 0.1rem 0.8rem; }
header.top nav a {
  text-decoration: none;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.12rem 0.05rem;
  border-bottom: 3px solid transparent;
}
header.top nav a:hover { border-bottom-color: var(--ink); }
header.top nav a.on { border-bottom-color: var(--red); color: var(--red); font-weight: 700; }
.searchbox { position: relative; margin-left: auto; flex: 0 1 16rem; min-width: 12rem; }
.searchbox input, #bigq {
  width: 100%; font: inherit; font-size: 0.88rem;
  border: 2px solid var(--ink); border-radius: 0;
  background: var(--card); color: var(--ink);
  padding: 0.32rem 0.65rem;
}
.searchbox input::placeholder, #bigq::placeholder {
  color: var(--muted); text-transform: uppercase; font-size: 0.78rem;
}
#q-results, #bigq-results {
  background: var(--card);
  border: 2px solid var(--ink);
}
#q-results {
  position: absolute; top: 2.3rem; left: 0; right: 0;
  max-height: 24rem; overflow: auto; z-index: 40;
  box-shadow: 5px 5px 0 var(--shadow);
}
#q-results a, #bigq-results a {
  display: flex; gap: 0.6rem; align-items: baseline;
  padding: 0.35rem 0.6rem; color: var(--ink); text-decoration: none;
  font-size: 0.9rem;
}
#q-results a:hover, #bigq-results a:hover { background: var(--yellow); color: #161513; }
#q-results a .chip, #bigq-results a .chip { margin-left: auto; }
#bigq { margin: 0.8rem 0 0.5rem; font-size: 1rem; }
#bigq-results { margin-top: 0.5rem; }

/* ---------- chips as printed labels ---------- */
.chip {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1.5px solid var(--ink);
  border-left-width: 6px;
  padding: 0.02rem 0.45rem;
  background: var(--card);
  color: var(--ink);
  vertical-align: middle;
}
.t-character { border-left-color: #2E86AB; }
.t-teacher { border-left-color: #6C4AB0; }
.t-scallywag { border-left-color: #E0301E; }
.t-creature { border-left-color: #C4457E; }
.t-gadget { border-left-color: #B58900; }
.t-weapon { border-left-color: #C25E00; }
.t-vehicle { border-left-color: #0E7C61; }
.t-location { border-left-color: #4C8B2B; }
.t-organisation { border-left-color: #5B5EA6; }
.t-food { border-left-color: #7A9A01; }
.t-other { border-left-color: var(--muted); }
.chip.bk { border-left-color: var(--red); text-decoration: none; }
a.chip.bk:hover { background: var(--ink); color: var(--paper); }
.chip.ft, .chip.rt, .chip.cat { border-left-color: var(--muted); }
.chip.k-entity { border-left-color: #2E86AB; }
.chip.k-incident { border-left-color: #C25E00; }
.chip.k-relationship { border-left-color: #0E7C61; }
.chip.k-fact { border-left-color: #B58900; }
.chip.k-continuity { border-left-color: #6C4AB0; }

/* ---------- records ---------- */
.rec {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 6px;
  box-shadow: 3px 3px 0 var(--shadow);
  padding: 0.6rem 0.85rem;
  margin: 0.6rem 0;
}
@media (prefers-color-scheme: dark) { .rec { box-shadow: none; } }
.rec p.assert { margin: 0 0 0.3rem; white-space: pre-line; }
.rec .subj { font-weight: 700; margin-right: 0.3rem; }

blockquote.q {
  position: relative;
  margin: 0.55rem 0 0.35rem;
  padding: 0.5rem 0.85rem;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 10px;
  white-space: pre-line;
  font-size: 0.92rem;
}
blockquote.q::after {
  content: "";
  position: absolute; left: 1.3rem; bottom: -0.58rem;
  width: 0.85rem; height: 0.85rem;
  background: var(--paper);
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: rotate(45deg) skew(8deg, 8deg);
}
blockquote.q .cites { font-style: normal; }
table.ev blockquote.q { margin: 0; }
table.ev blockquote.q::after { display: none; }

.meta { margin-top: 0.45rem; font-size: 0.72rem; color: var(--muted); }
.refs { margin: 0.45rem 0; font-size: 0.85rem; line-height: 1.9; }
.lbl { color: var(--muted); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
.xnote {
  margin-top: 0.4rem;
  font-size: 0.78rem;
  color: var(--muted);
  border-top: 1px dashed var(--muted);
  padding-top: 0.3rem;
}
.prose { white-space: pre-line; }
.kv, .aliases, .firstapp, .bookchips, .absorbed { margin: 0.45rem 0; }
.alias {
  display: inline-block;
  border: 1.5px solid var(--ink);
  background: var(--card);
  padding: 0 0.45rem; margin: 0.12rem 0.25rem 0 0;
  font-weight: 700; font-size: 0.85rem;
}
.desc { font-size: 1.08rem; margin: 0.55rem 0; }
.headrow { display: flex; gap: 0.55rem; align-items: center; flex-wrap: wrap; margin: 0.2rem 0 0.9rem; }
code {
  font-family: "Roboto Mono", ui-monospace, Menlo, monospace;
  font-size: 0.72rem;
  border: 1.5px solid var(--muted); color: var(--muted);
  padding: 0 0.3rem; background: transparent;
  overflow-wrap: anywhere;
}

/* citation tickets */
a.ref {
  display: inline-block;
  font-family: "Roboto Mono", ui-monospace, Menlo, monospace;
  font-size: 0.68rem;
  text-decoration: none;
  background: var(--card);
  border: 1.5px solid var(--ink);
  color: var(--ink);
  padding: 0 0.32rem;
  margin: 0.08rem 0.18rem 0.08rem 0;
  white-space: nowrap;
}
a.ref:hover { background: var(--ink); color: var(--paper); }

/* RALPH slots - highlighter over ink */
.ralph {
  background: var(--yellow);
  color: #161513;
  border: 2px dashed #161513;
  padding: 0.55rem 0.85rem;
  margin: 1rem 0;
  font-weight: 700;
  font-size: 0.88rem;
}

/* ---------- artwork ---------- */
figure.polaroid { margin: 0; }
.polaroid {
  display: inline-block;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 4px;
  padding: 0.4rem 0.4rem 0.32rem;
  box-shadow: 5px 5px 0 var(--shadow);
  text-align: center;
}
@media (prefers-color-scheme: dark) { .polaroid { box-shadow: none; } }
.polaroid img { display: block; max-width: 100%; border: 1.5px solid var(--ink); }
.polaroid figcaption { display: block; margin-top: 0.3rem; }
.polaroid > a { display: block; text-decoration: none; }
.polaroid:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--shadow); }
.tilt-a { transform: rotate(-0.8deg); }
.tilt-b { transform: rotate(0.7deg); }

.hero { display: grid; grid-template-columns: 1.45fr 1fr; gap: 1.4rem; align-items: start; }
.hero .polaroid { max-width: 19rem; justify-self: center; }
@media (max-width: 760px) { .hero { grid-template-columns: 1fr; } }
.hero h1 { margin-top: 0.2rem; }

.filmstrip {
  display: flex; gap: 1rem; overflow-x: auto; padding: 0.8rem 0.2rem 1rem;
  scroll-snap-type: x proximity;
}
.filmstrip .polaroid { flex: 0 0 11rem; scroll-snap-align: start; }
.filmstrip .polaroid:nth-child(odd) { transform: rotate(-0.7deg); }
.filmstrip .polaroid:nth-child(even) { transform: rotate(0.6deg); }
.filmstrip .polaroid:hover { transform: translate(-2px,-2px); }

/* cover wall */
.wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 1.05rem; margin: 1.1rem 0; }
.booktile {
  text-decoration: none; text-align: center;
  background: var(--card); border: 2px solid var(--ink); border-radius: 4px;
  padding: 0.45rem; box-shadow: 4px 4px 0 var(--shadow);
}
.booktile:hover { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 var(--shadow); }
.booktile img { width: 100%; border: 1.5px solid var(--ink); display: block; }
.booktile b {
  display: block; margin-top: 0.35rem;
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em;
}
.booktile .n { display: block; color: var(--muted); font-size: 0.68rem; }
@media (prefers-color-scheme: dark) { .booktile, .booktile:hover { box-shadow: none; } }

.bookhero { display: flex; gap: 1.4rem; align-items: flex-start; flex-wrap: wrap; }
.bookhero .polaroid { flex: 0 0 14rem; max-width: 14rem; }
.bookhero .bookmeta { flex: 1 1 20rem; }

/* ---------- lists / cards ---------- */
ul, ol { padding-left: 1.2rem; }
li { margin: 0.28rem 0; }
ul.entlist li a:first-child, ul.incs li > a, ul.conts li > a, ol.incs li > a {
  text-decoration: none; border-bottom: 2px solid var(--red); font-weight: 500;
}
ul.entlist li a:first-child:hover, ul.incs li > a:hover, ul.conts li > a:hover,
ol.incs li > a:hover { background: var(--yellow); color: #161513; }
ul.rels { list-style: none; padding-left: 0; }
ul.rels li.rec { margin: 0.5rem 0; }
.relhead { font-weight: 500; }
.relhead a { text-decoration: none; border-bottom: 2px solid var(--red); }
.relhead a:hover { background: var(--yellow); color: #161513; }
.count { color: var(--muted); font-weight: 400; font-size: 0.85em; }

/* evidence table */
table.ev { border-collapse: collapse; width: 100%; margin: 0.5rem 0; }
table.ev td { border: 1.5px solid var(--ink); padding: 0.45rem 0.6rem; vertical-align: top; }
table.ev td.note { width: 30%; color: var(--muted); font-size: 0.85rem; }

/* citation reverse index */
section.cite { border-top: 2px solid var(--ink); padding: 0.7rem 0; }
section.cite h2 { border: none; margin: 0.2rem 0 0.5rem; background: transparent; color: var(--ink); padding: 0; }
section.cite h2 code { font-size: 0.85rem; border-color: var(--ink); color: var(--ink); }
.citebody { display: flex; gap: 1.1rem; align-items: flex-start; }
.citebody .polaroid { flex: 0 0 10.5rem; max-width: 10.5rem; }
.citebody ul { flex: 1 1 auto; margin: 0; }
@media (max-width: 640px) { .citebody { flex-direction: column; } }
section.cite:target, .rec:target, li.rec:target {
  outline: 4px solid var(--yellow);
  outline-offset: 2px;
}

details { margin: 0.55rem 0; }
details summary {
  cursor: pointer; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.85rem;
}
details.allrefs .refs a { margin-right: 0.15rem; }

@media (max-width: 700px) {
  header.top { position: static; }
  .searchbox { flex-basis: 100%; margin-left: 0; }
}

/* Ralph-authored editorial copy (verbatim from editorial/) */
.intro { font-size: 1.02rem; max-width: 44rem; }
.intro p { margin: 0.7rem 0; }
.intro a { color: var(--red); text-decoration: none; border-bottom: 2px solid var(--red); overflow-wrap: anywhere; }
.intro a:hover { background: var(--yellow); color: #161513; }

/* random entry - highlighter button by the letterbar */
button.lucky {
  display: inline-block; cursor: pointer;
  font: inherit; font-weight: 700; font-size: 0.85rem;
  text-transform: uppercase; letter-spacing: 0.05em;
  background: var(--yellow); color: #161513;
  border: 2px solid var(--ink); border-radius: 0;
  padding: 0.3rem 0.8rem; margin: 0 0 1rem;
  box-shadow: 3px 3px 0 var(--shadow);
  transform: rotate(-0.8deg);
}
button.lucky:hover { transform: translate(-2px,-2px) rotate(-0.8deg); box-shadow: 5px 5px 0 var(--shadow); }
@media (prefers-color-scheme: dark) { button.lucky, button.lucky:hover { box-shadow: none; } }

/* A-Z navigation */
.letterbar { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.8rem 0 1.2rem; }
.letterbar a {
  display: inline-block; min-width: 1.9rem; text-align: center;
  font-weight: 700; text-decoration: none;
  border: 2px solid var(--ink); background: var(--card);
  padding: 0.12rem 0.3rem;
  box-shadow: 2.5px 2.5px 0 var(--shadow);
}
.letterbar a:hover { background: var(--ink); color: var(--paper); transform: translate(-1px,-1px); }
@media (prefers-color-scheme: dark) { .letterbar a { box-shadow: none; } }
.azlist h2 { scroll-margin-top: 5rem; }

/* Ralph's site entry copy (verbatim from total-mayhem.com) */
.entrycopy { font-size: 1.05rem; margin: 0.6rem 0; }
.entrycopy p { margin: 0.45rem 0; }
.entrycopy a { color: var(--red); text-decoration: none; border-bottom: 2px solid var(--red); }
.entrycopy a:hover { background: var(--yellow); color: #161513; }

/* imported book display titles (verbatim from Ralph's site) */
.booktitle { font-size: 1.05rem; font-weight: 700; margin: 0.4rem 0 0.6rem; }
.booktile .n { overflow-wrap: anywhere; }

/* ============ encyclopedia split ============ */

/* TOP: the clean entry, in a raised card. Boxed image floats into the body;
   text wraps around it and fully justifies. */
.entrycard {
  position: relative;
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: 16px;
  box-shadow: 7px 7px 0 var(--shadow);
  padding: 1.5rem 1.7rem;
  margin: 1rem 0 0;
}
.entrycard::after { content: ""; display: block; clear: both; }

/* A-Z arrows, top right of every card: previous / next entry
   alphabetically, wrapping at the ends (arrow keys work too) */
.entrycard .cardnav { position: absolute; top: 1rem; right: 1rem; display: flex; gap: 0.5rem; }
.entrycard .cardnav a {
  display: inline-block; text-decoration: none;
  width: 2.1rem; height: 2.1rem; line-height: 1.95rem; text-align: center;
  font-weight: 700; font-size: 1.05rem;
  border: 2px solid var(--ink); border-radius: 8px;
  background: var(--card); color: var(--ink);
  box-shadow: 3px 3px 0 var(--shadow);
}
.entrycard .cardnav a:hover { background: var(--yellow); color: #161513; transform: translate(-1px,-1px); }
@media (prefers-color-scheme: dark) { .entrycard .cardnav a, .entrycard .cardnav a:hover { box-shadow: none; } }
.entrycard > h1 { max-width: calc(100% - 6rem); }
@media (prefers-color-scheme: dark) { .entrycard { box-shadow: none; } }

/* the entry illustration: plain image (Ralph's transparent PNGs), no frame,
   no caption - large and centered partway down the entry, like the entries on
   total-mayhem.com/almanac. The white backing only exists so black line-art
   stays legible in dark mode; on the white light-mode card it is seamless. */
.entrycard .entryart {
  display: block;
  width: 62%;
  max-width: 30rem;
  height: auto;
  margin: 1.3rem auto 1.4rem;
  background: #fff;
  padding: 0.5rem;
  border-radius: 4px;
}
/* very tall portraits Ralph flagged as too big (book_art_picks "tall") -
   half the display width, so the height halves with it */
.entrycard .entryart.tall { width: 31%; max-width: 15rem; }

.entrycard .desc, .entrycard .entrycopy {
  font-size: 1.15rem; line-height: 1.62;
  text-align: justify;
  hyphens: auto; -webkit-hyphens: auto;
}
.entrycard .entrycopy p { margin: 0 0 0.7rem; }

@media (max-width: 620px) {
  .entrycard .entryart { width: 92%; max-width: none; }
  .entrycard .entryart.tall { width: 46%; max-width: none; }
  .entrycard .desc, .entrycard .entrycopy { text-align: left; }
}

/* camp roster (entry_excludes.json fold): the b13 cabin kids listed on
   the camp's own card, cabin by cabin - kid names plain text, cabin
   names linked */
.entrycard .roster { margin-top: 1.4rem; text-align: left; }
.entrycard .roster .rosterhead {
  display: inline-block;
  background: var(--ink); color: var(--paper);
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 0.14rem 0.5rem; margin-bottom: 0.6rem;
  transform: rotate(-0.6deg);
}
.entrycard .roster .rosterrow { margin: 0.25rem 0; font-size: 0.92rem; }
.entrycard .roster .rosterrow b { font-weight: 700; }
.entrycard .roster .rosterrow a { color: var(--red); }

/* buy links (entry extras): his country links from /books/, verbatim - the
   almanac's one sales block (Ralph's explicit exception, MAYHEM issue #8).
   Label block like the roster head; buttons in the cardnav idiom. */
.entrycard .buyblock { clear: both; margin-top: 1.4rem; text-align: left; }
.entrycard .buyblock .buyhead {
  display: inline-block;
  background: var(--ink); color: var(--paper);
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 0.14rem 0.5rem; margin-bottom: 0.6rem;
  transform: rotate(-0.6deg);
}
.entrycard .buylinks { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.entrycard .buylinks a {
  display: inline-block; text-decoration: none;
  font-size: 0.78rem; font-weight: 700;
  border: 2px solid var(--ink); border-radius: 8px;
  padding: 0.18rem 0.55rem;
  background: var(--card); color: var(--ink);
  box-shadow: 3px 3px 0 var(--shadow);
}
.entrycard .buylinks a:hover { background: var(--yellow); color: #161513; transform: translate(-1px,-1px); }
@media (prefers-color-scheme: dark) { .entrycard .buylinks a, .entrycard .buylinks a:hover { box-shadow: none; } }

/* merged single canonical entry (Ralph 2026-07-10): one seamless body -
   subject-matter subheads and lists inside his own flowing prose, no
   source seams. Subheads/lists match the entrycopy voice, quieter than the
   black label blocks. */
.entrycard .entrycopy .mergedsub {
  font-size: 1.05rem; font-weight: 700;
  margin: 1rem 0 0.35rem; text-align: left;
}
.entrycard .entrycopy ul.mergedlist {
  margin: 0.2rem 0 0.8rem 1.4rem; padding: 0;
  text-align: left; font-size: 1.08rem; line-height: 1.55;
}
.entrycard .entrycopy ul.mergedlist li { margin: 0.18rem 0; }

/* printed in-book almanac pages (MAYHEM issue #7): Ralph's own single-page
   almanac entries from Books 12A/12B/13/14, transcribed verbatim. The label
   block is chrome (roster/buyhead idiom); everything under it is his printed
   text at full body size. */
.entrycard .printedalm {
  clear: both; margin-top: 1.5rem;
  text-align: justify;
  hyphens: auto; -webkit-hyphens: auto;
}
.entrycard .printedalm-label {
  display: inline-block;
  background: var(--ink); color: var(--paper);
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 0.14rem 0.5rem; margin-bottom: 0.7rem;
  transform: rotate(-0.6deg);
}
.entrycard .printedalm p { font-size: 1.15rem; line-height: 1.62; margin: 0 0 0.7rem; }
.entrycard .printedalm-head {
  font-size: 1.3rem; font-weight: 700;
  margin: 0 0 0.5rem; text-align: left;
}
.entrycard .printedalm-sub {
  font-size: 1.05rem; font-weight: 700;
  margin: 0.9rem 0 0.35rem; text-align: left;
}
.entrycard .printedalm ul.printedalm-list {
  margin: 0 0 0.7rem 1.4rem; padding: 0;
  font-size: 1.08rem; line-height: 1.55; text-align: left;
}
.entrycard .printedalm ul.printedalm-list li { margin: 0.18rem 0; }
.entrycard .printedalm a { color: var(--red); text-decoration: none; border-bottom: 2px solid var(--red); }
.entrycard .printedalm a:hover { background: var(--yellow); color: #161513; }
@media (max-width: 620px) { .entrycard .printedalm { text-align: left; } }

/* card colophon: which book(s) the entry appears in - plain text, no link */
.entrycard .bookline {
  clear: both;
  margin-top: 1.1rem;
  font-size: 0.68rem; font-weight: 700;
  color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.09em;
}

/* BOTTOM: research - the canon-explorer record, kept but hidden. It is a
   closed-by-default <details> under each entry/book (AL/CE split): the kid
   reader never sees it unless they open it. */
details.research {
  margin-top: 2.6rem;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--muted);
}
details.research > summary {
  cursor: pointer;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.2em;
  font-size: 0.7rem; color: var(--muted);
  border-top: 1px solid var(--muted);
  padding-top: 0.5rem;
  margin: 0 0 1rem;
}
details.research > summary:hover { color: var(--ink); }
/* research headings: quiet, not the big black blocks */
details.research h2 {
  background: none; color: var(--muted);
  font-size: 0.72rem; letter-spacing: 0.1em;
  border-bottom: 1px solid var(--muted);
  border-radius: 0; transform: none;
  padding: 0 0 0.15rem; margin: 1.6rem 0 0.5rem;
}
details.research h2 .count { color: var(--muted); opacity: 1; }
details.research h3 {
  font-size: 0.7rem; color: var(--muted);
  border-bottom: none; margin: 0.9rem 0 0.3rem;
}
details.research .desc { font-size: 0.8rem; color: var(--ink); }
/* research record cards: flat, compact - not the raised sticker style */
details.research .rec {
  box-shadow: none;
  border-width: 1px;
  border-radius: 5px;
  padding: 0.45rem 0.6rem;
  margin: 0.4rem 0;
  color: var(--ink);
}
details.research blockquote.q { font-size: 0.8rem; padding: 0.4rem 0.65rem; }
details.research blockquote.q::after { display: none; }
details.research .lbl { font-size: 0.62rem; }
details.research .filmstrip .polaroid { flex-basis: 8.5rem; box-shadow: none; }
details.research .filmstrip .polaroid { border-width: 1.5px; }
details.research li { margin: 0.18rem 0; }

/* ---- family front door (Ralph 2026-07-10): kid layer + grown-ups strip ---- */
.hero { text-align: center; margin: 0.4rem 0 1.6rem; }
.hero .tagline { color: #555; font-size: 1.06rem; margin: 0.4rem auto 0.9rem; max-width: 34rem; }
.lucky.hero { font-size: 1.15rem; padding: 0.7rem 1.6rem; }
.kidhead { text-align: center; margin: 1.8rem 0 0.9rem; }
.feedgrid, .doorgrid {
  display: grid; gap: 0.9rem;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.feedgrid .card, .doorgrid .doortile {
  display: flex; flex-direction: column; align-items: center; gap: 0.35rem;
  background: #fff; border-radius: 10px; padding: 0.8rem 0.6rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.09); text-decoration: none;
  color: inherit; text-align: center;
}
.feedgrid .card:hover, .doorgrid .doortile:hover {
  box-shadow: 0 2px 9px rgba(0,0,0,0.16);
}
.feedgrid .card img, .doorgrid .doortile img {
  width: 100%; height: 120px; object-fit: contain; background: #fff;
}
.feedgrid .card b { font-size: 0.95rem; line-height: 1.25; }
.feedgrid .card .tz { font-size: 0.8rem; color: #666; line-height: 1.3; }
.doorgrid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.doorgrid .doortile b { font-size: 1rem; }
.doorgrid .doortile .n { font-size: 0.78rem; color: #888; }
.grownups {
  margin: 2.4rem 0 0.8rem; padding: 1.1rem 1.2rem; border-radius: 10px;
  background: #f2f2f5; font-size: 0.95rem;
}
.grownups h2 { margin-top: 0; font-size: 1.05rem; }
.starthere { display: flex; gap: 1rem; align-items: center; margin-top: 0.8rem; }
.starthere img { width: 84px; height: auto; border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2); }
.startnote { color: #555; }
@media (prefers-color-scheme: dark) {
  .feedgrid .card, .doorgrid .doortile { background: #fff; color: #222; }
  .grownups { background: #26262b; }
  .hero .tagline, .startnote { color: #aaa; }
  .feedgrid .card .tz { color: #555; }
}
@media (max-width: 640px) {
  .feedgrid { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); }
}

/* the scallywags book-list closing line - Ralph's own, verbatim */
.entrycard .roster .swfoot { font-weight: 700; margin-top: 0.7rem; }

/* Hello page - contact + newsletter signup forms.
   Same ink-on-paper skin: hard black borders, offset shadow, label-block
   headings, highlighter-yellow submit. Fields model on .searchbox input,
   button on button.lucky. */
.hellointro { font-size: 1.02rem; max-width: 44rem; margin: 0.6rem 0 1.5rem; }
.formcard {
  max-width: 34rem; margin: 0 0 1.8rem;
  border: 3px solid var(--ink); background: var(--card);
  padding: 1rem 1.1rem 1.2rem;
  box-shadow: 4px 4px 0 var(--shadow);
}
.formcard h2 {
  margin: 0 0 0.4rem; font-size: 0.9rem;
  text-transform: uppercase; letter-spacing: 0.05em;
  background: var(--ink); color: var(--paper);
  display: inline-block; padding: 0.16rem 0.5rem;
}
.tmform label {
  display: block; font-size: 0.75rem; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--muted); margin: 0.85rem 0 0.2rem;
}
.tmform input[type="text"], .tmform input[type="email"], .tmform textarea {
  width: 100%; font: inherit; font-size: 0.9rem;
  border: 2px solid var(--ink); border-radius: 0;
  background: var(--paper); color: var(--ink);
  padding: 0.4rem 0.6rem;
}
.tmform input:focus, .tmform textarea:focus {
  outline: 3px solid var(--yellow); outline-offset: 0;
}
.tmform textarea { resize: vertical; min-height: 6.5rem; }
.tmform input::placeholder, .tmform textarea::placeholder { color: var(--muted); }
.tmbtn {
  display: inline-block; cursor: pointer; margin-top: 1.1rem;
  font: inherit; font-weight: 700; font-size: 0.85rem;
  text-transform: uppercase; letter-spacing: 0.05em;
  background: var(--yellow); color: #161513;
  border: 2px solid var(--ink); border-radius: 0;
  padding: 0.38rem 1.1rem; box-shadow: 3px 3px 0 var(--shadow);
}
.tmbtn:hover { transform: translate(-2px,-2px); box-shadow: 5px 5px 0 var(--shadow); }
.tmbtn:disabled { opacity: 0.55; cursor: default; transform: none; box-shadow: 3px 3px 0 var(--shadow); }
.formmsg {
  margin: 1rem 0 0; font-size: 0.9rem; font-weight: 700;
  padding: 0.45rem 0.65rem; border: 2px solid var(--ink);
}
.formmsg.ok { background: var(--yellow); color: #161513; }
.formmsg.err { background: var(--red); color: #fff; }
.formnote { margin: 1rem 0 0; font-size: 0.78rem; color: var(--muted); max-width: 40rem; }
/* honeypot: kept in the DOM and submitted, hidden from people */
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
@media (prefers-color-scheme: dark) {
  .formcard { box-shadow: none; }
  .tmbtn, .tmbtn:hover, .tmbtn:disabled { box-shadow: none; }
}
