/* app.css — one stylesheet. The pages read like a book: a serif text face, a narrow measure, warm paper.
   Brand: Tree & Thread, "Lamplight Heritage" (docs/STYLE.md, Brand). Pine and cream carry the layout; Silk Gold is the
   thread, used for lines only (gold text is too faint on cream); links are Pine, hovers a darkened Clay. Fonts are
   self-hosted (public/assets/fonts, SIL Open Font License): Fraunces for headings, Source Serif 4 for reading,
   Source Sans 3 for the interface. */
@font-face { font-family: "Fraunces"; src: url("fonts/fraunces.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("fonts/fraunces-italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("fonts/source-serif-4.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("fonts/source-serif-4-italic.woff2") format("woff2"); font-weight: 200 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("fonts/source-sans-3.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }
:root {
  --pine: #173F2C; --pine-2: #22553c; --gold: #C9973F; --lamp: #EFC65C; --clay: #C2693F; --clay-ink: #9A4A26; --sage: #9DB89A; --cream: #F7F1E3;
  --paper: #F7F1E3; --ink: #22312A; --muted: #5d665f; --rule: #e2d8c3; --accent: #9A4A26; --link: #173F2C;
  --card: #fffdf8; --confirmed: #2f6b3a; --probable: #3f6385; --candidate: #8a5d0c; --story: #74488a; --open: #a23b3b; --unrev: #6f6c63;
  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); }
body { margin: 0; font: 17px/1.6 var(--serif); }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent); }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.2; color: var(--ink); font-variation-settings: "SOFT" 50; }
h1 { font-size: 2rem; margin: .4em 0 .2em; }
h2 { font-size: 1.4rem; margin: 1.8em 0 .5em; border-bottom: 1px solid var(--rule); padding-bottom: .25em;
  background: linear-gradient(var(--gold), var(--gold)) left bottom / 3.5rem 2px no-repeat; }   /* the gold thread under each heading */
h3 { font-size: 1.05rem; margin: 1.2em 0 .3em; }
main { max-width: 1360px; margin: 0 auto; padding: 1rem 1.25rem 3rem; }   /* as wide as Recent changes, on every page (Tom, 30 Nov 2026) */
.muted { color: var(--muted); } .small { font-size: .85rem; }
code { font-size: .9em; background: #efe6d2; padding: 0 .25em; border-radius: 3px; }

header.site { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.2rem; padding: .65rem 1.25rem;
  border-bottom: 2px solid var(--gold); background: var(--pine); color: var(--cream); font-family: var(--sans); font-size: .95rem; }
header.site .brand { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--display); font-size: 1.2rem; color: var(--cream); text-decoration: none; font-weight: 600; }
header.site .brand .mark { width: 30px; height: 30px; flex: none; }
header.site nav { display: flex; flex-wrap: wrap; gap: .9rem; }
header.site nav a, header.site .me a, header.site button.link { color: var(--cream); text-decoration: none; }
header.site nav a:hover, header.site .me a:hover, header.site button.link:hover { color: var(--lamp); }
header.site a:focus-visible, header.site button:focus-visible, header.site input:focus-visible, header.site select:focus-visible { outline: 2px solid var(--lamp); outline-offset: 2px; }
header.site .search input { padding: .3rem .6rem; border: 1px solid #3d6b52; border-radius: 4px; width: 14rem; font: inherit; background: #fffdf8; color: var(--ink); margin: 0; }
header.site .me { margin-left: auto; display: flex; gap: .7rem; align-items: center; }
footer.site { text-align: center; color: var(--muted); font: .85rem var(--sans); padding: 2rem 1rem; border-top: 1px solid var(--rule); }
footer.site .product { display: inline-flex; align-items: center; gap: .35rem; font-family: var(--display); color: var(--pine); font-weight: 600; text-decoration: none; }
footer.site .product .mark { width: 22px; height: 22px; }
footer.site .tagline { font-style: italic; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.book, .person { max-width: 760px; margin: 0 auto; }
.person { max-width: 980px; }
.title-page { text-align: center; padding: 2rem 0 1rem; border-bottom: 1px double var(--rule); }
.title-page h1 { font-size: 2.6rem; font-weight: 600; } .subtitle { font-style: italic; font-size: 1.1rem; }
/* the hero: Pine, the drawn tree with its gold thread behind the title (public/assets/tree-thread.svg) */
.hero { background: var(--pine) url("tree-thread.svg") center bottom / auto 10.5rem no-repeat; color: var(--cream); border-radius: 10px;
  padding: 2.4rem 1.5rem 11rem; margin: 0 0 1.4rem; border-bottom: 3px solid var(--gold); }
.hero h1 { color: var(--cream); margin-top: 0; font-size: 2.7rem; text-wrap: balance; }
.hero .subtitle { color: #e9e1cd; margin: .3rem auto; max-width: 36rem; }
.hero .hero-tagline { font-family: var(--display); font-style: italic; color: var(--lamp); font-size: 1.15rem; margin: 1rem 0 0; }
.hero.small { padding: 1.6rem 1.2rem 7.5rem; background-size: auto 7rem; } .hero.small h1 { font-size: 2rem; }
.person header h1 { margin-top: .1em; } .person .life { font-size: 1.1rem; margin: 0; }
.crumbs { font: .85rem var(--sans); color: var(--muted); margin: 0; }
.actions { font: .9rem var(--sans); }
.story p:first-child::first-letter { font-family: var(--display); font-size: 2.7em; float: left; line-height: .9; padding: .05em .08em 0 0; color: var(--gold); }
.story aside p:first-child::first-letter, .story figure p:first-child::first-letter { font-size: inherit; float: none; padding: 0; color: inherit; }
.status-candidate, .status-detached { display: inline-block; margin-left: .5rem; padding: 0 .5rem; border-radius: 3px; background: #fbefd7; color: #6d4b0a; }
.status-detached { background: #ece9e4; color: #555; }

table { border-collapse: collapse; width: 100%; font: .92rem/1.45 var(--sans); }
th, td { text-align: left; vertical-align: top; padding: .4rem .5rem; border-bottom: 1px solid var(--rule); }
th { font-weight: 600; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
td.when { white-space: nowrap; } td.edit { white-space: nowrap; font-size: .8rem; }
.facts .note { color: #4a443c; font-size: .88rem; } .facts .note p { margin: .2em 0; }
table.lines td, table.list td { font-family: var(--serif); font-size: 1rem; }
table.diff { width: auto; font-size: .8rem; } table.diff th { text-transform: none; letter-spacing: 0; color: var(--ink); padding: .1rem .4rem; }
table.diff td { padding: .1rem .4rem; max-width: 22rem; overflow-wrap: anywhere; }
.diff .old { background: #fbe9e7; text-decoration: line-through; color: #7a2a20; } .diff .new { background: #e7f4e9; color: #1f5a2b; }
.changes .summary { font-style: italic; color: #4a443c; }
.changes .ts, .recent .ts { white-space: nowrap; color: var(--muted); font-size: .85rem; }
tr.warn td { background: #fdf1ef; }

.chip { display: inline-block; font: 600 .7rem/1.5 var(--sans); padding: 0 .45rem; border-radius: 9px; color: #fff; background: var(--unrev); white-space: nowrap; }
.chip-confirmed { background: var(--confirmed); } .chip-probable { background: var(--probable); } .chip-possible { background: var(--candidate); }
.chip-family_story { background: var(--story); } .chip-open_question { background: var(--open); } .chip-not_assessed { background: #c9c2b6; color: #3e3a33; }
.ora-says { display: flex; gap: .5rem; align-items: flex-start; font: .95rem/1.45 var(--sans); color: var(--ink); background: #fbf6ea; border: 1px solid var(--rule); border-left: 3px solid var(--gold); border-radius: 6px; padding: .5rem .7rem; margin: .6rem 0; }
.ora-says img { flex: none; margin-top: -.1rem; } .ora-says strong { color: var(--pine); font-family: var(--display); }
.ora-says.small { font-size: .85rem; padding: .35rem .6rem; }
.badge-ai { font: 700 .65rem/1.4 var(--sans); background: var(--pine); color: #fff; padding: 0 .35rem; border-radius: 3px; vertical-align: 1px; }

details.cites { font-size: .82rem; margin-top: .25rem; } details.cites summary { cursor: pointer; color: var(--muted); }
details.cites ol { margin: .3rem 0 .3rem 1.2rem; padding: 0; } details.cites li { margin: .2rem 0; overflow-wrap: anywhere; }
.research-note { background: var(--card); border: 1px solid var(--rule); border-radius: 6px; padding: .6rem .9rem; margin: .7rem 0; font-size: .95rem; }
.family .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 2rem; }
.family ul { margin: .2rem 0; padding-left: 1.1rem; }
.life { color: var(--muted); font-size: .9em; }
ul.stats li, ul.recent li { margin: .25rem 0; }

.filters { display: flex; flex-wrap: wrap; gap: .3rem .5rem; align-items: center; font: .85rem var(--sans); margin: .4rem 0; }
.filters a { padding: .1rem .55rem; border: 1px solid var(--rule); border-radius: 12px; text-decoration: none; color: var(--ink); background: #fff; }
.filters a.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.filters.letters a { padding: .05rem .4rem; }
.bigsearch { display: flex; gap: .5rem; } .bigsearch input { flex: 1; font: 1.1rem var(--serif); padding: .5rem .7rem; border: 1px solid var(--rule); border-radius: 5px; }
.results li { margin: .7rem 0; } .snippet { font-size: .88rem; color: #4a443c; } mark { background: #f6e2a8; }

.narrow { max-width: 640px; margin: 0 auto; }
.card { background: var(--card); border: 1px solid var(--rule); border-radius: 8px; padding: 1rem 1.2rem; margin: 1rem 0; }
.card.notice { border-color: #d9b66a; background: #fffaf0; } .card.danger { border-color: #e2b4ad; }
form label { display: block; margin: .7rem 0; font: .9rem var(--sans); color: #3b352e; }
form label.check, form label.inline-select { display: inline-flex; gap: .4rem; align-items: center; margin: .3rem 1rem .3rem 0; }
input:not([type=checkbox]), select, textarea { display: block; width: 100%; margin-top: .25rem; padding: .45rem .55rem; font: 1rem var(--serif);
  border: 1px solid #d4ccbe; border-radius: 5px; background: #fff; color: var(--ink); }
label.inline-select select { display: inline-block; width: auto; margin: 0; }
fieldset { border: 1px solid var(--rule); border-radius: 6px; margin: .8rem 0; } legend { font: .85rem var(--sans); color: var(--muted); }
button, .button { font: 600 .95rem var(--sans); background: var(--pine); color: var(--cream); border: 0; border-radius: 5px; padding: .5rem 1rem; cursor: pointer; text-decoration: none; display: inline-block; }
button.small { padding: .2rem .5rem; font-size: .75rem; } button.danger { background: #9b2c22; }
button.link { background: none; color: var(--link); padding: 0; font-weight: 400; text-decoration: underline; }
form.inline { display: inline; }
.req { color: #9b2c22; font-size: .75rem; }
.flash { background: #e7f4e9; border: 1px solid #b9dcc0; padding: .5rem .8rem; border-radius: 6px; font-family: var(--sans); }
.error { background: #fbe9e7; border: 1px solid #e8bdb6; padding: .5rem .8rem; border-radius: 6px; font-family: var(--sans); }
dl.meta { display: grid; grid-template-columns: max-content 1fr; gap: .2rem 1rem; font-family: var(--sans); font-size: .92rem; }
dl.meta dt { color: var(--muted); }
input.copy { font: .85rem ui-monospace, Menlo, monospace; }

@media (max-width: 720px) {
  body { font-size: 16px; } .family .cols { grid-template-columns: 1fr; }
  table.facts thead { display: none; } table.facts td { display: block; border: 0; padding: .1rem .3rem; }
  table.facts tr { display: block; border-bottom: 1px solid var(--rule); padding: .4rem 0; }
  header.site .me { margin-left: 0; } header.site .search input { width: 100%; }
}
@media print {
  header.site, footer.site, .actions, td.edit, .filters { display: none; }
  body { background: #fff; font-size: 11pt; } main { max-width: none; }
}

/* ── phase 2: book, pictures, discussion, trees ── */
.relation { font-style: italic; color: var(--accent); margin: .2rem 0; font-size: 1.05rem; }
.toc li { margin: .35rem 0; } .toc ul { font-size: .92rem; margin: .2rem 0 .5rem; } .toc.compact { columns: 2; column-gap: 2rem; }
.chapter h2 { margin-top: 2.2em; } .story-foot { color: var(--muted); border-top: 1px dotted var(--rule); padding-top: .3rem; }
.pager { display: flex; justify-content: space-between; gap: 1rem; margin: 2.5rem 0 1rem; font-family: var(--sans); font-size: .9rem; }
figure { margin: 1.4rem 0; text-align: center; } figure img { max-width: 100%; height: auto; border: 1px solid var(--rule); background: #fff; }
figure:not(.wide) img { max-height: 380px; width: auto; }
figcaption { font-size: .86rem; color: #4a443c; text-align: left; margin-top: .4rem; line-height: 1.45; }
figcaption .credit, .credit { display: block; color: var(--muted); font-size: .78rem; margin-top: .15rem; }
.person-ref { text-decoration-style: dotted; } .broken-link { color: #9b2c22; }
table.md { margin: 1rem 0; } table.md td, table.md th { font-family: var(--serif); font-size: .95rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .8rem; margin: 1rem 0; }
.tile { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; text-decoration: none; color: var(--ink); }
.tile img { width: 100%; height: 130px; object-fit: cover; background: #eee; }
.tile-title { font: .78rem/1.3 var(--sans); padding: .35rem .45rem; }
.doc-card { display: flex; align-items: center; justify-content: center; text-align: center; height: 130px; background: #f1ece2; color: var(--muted); font: .85rem var(--sans); padding: .5rem; }
.doc-card.big { height: auto; padding: 2rem; }
.viewer img { max-width: 100%; height: auto; border: 1px solid var(--rule); background: #fff; }
.artifact-page { max-width: 980px; margin: 0 auto; } .caption { font-size: 1rem; } .transcription { background: #fff; border: 1px solid var(--rule); padding: .6rem 1rem; border-radius: 6px; }
.disputed { color: #a23b3b; font-weight: 600; } .disputed-banner { background: #fdf1ef; border: 1px solid #e8bdb6; padding: .4rem .8rem; border-radius: 6px; font: .9rem var(--sans); }
tr.disputed-row td { background: #fdf6f4; }
details.qthis { margin-top: .3rem; } details.qthis summary { cursor: pointer; color: var(--muted); }
details.qthis form { margin-top: .3rem; } .fact-comment { border-left: 3px solid var(--rule); padding-left: .5rem; margin: .4rem 0; }
.discussion .comment { background: #fff; border: 1px solid var(--rule); border-radius: 6px; padding: .6rem .9rem; margin: .8rem 0; }
.comment .meta { font: .85rem var(--sans); margin: 0 0 .3rem; } .comment .reply { border-left: 3px solid var(--rule); margin: .5rem 0 0 .5rem; padding-left: .7rem; }
.ckind { display: inline-block; font: 600 .7rem/1.5 var(--sans); background: #ece6da; color: #4a443c; padding: 0 .45rem; border-radius: 9px; margin-right: .3rem; }
.kind-conflict .ckind { background: #f5d2cc; color: #7a2a20; } .kind-question .ckind { background: #dbe6f2; color: #2c4a6b; }
.kind-note .ckind { background: #ece7dc; color: #4a443c; } .kind-issue .ckind { background: #f6e7c6; color: #6d4b0a; }
.cstatus { float: right; font-size: .75rem; color: var(--muted); } .status-resolved, .status-rejected { opacity: .75; }
.desk-list li { margin: .7rem 0; }
.inline-form { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; } .inline-form input, .inline-form select { width: auto; display: inline-block; margin: 0; }
.filters input.short { width: 14rem; display: inline-block; margin: 0; } .filters select { width: auto; display: inline-block; margin: 0; }
.actions a.on { font-weight: 700; color: var(--accent); }
.pedigree { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: .6rem; overflow-x: auto; padding-bottom: 1rem; }
.pcol { display: flex; flex-direction: column; justify-content: space-around; gap: .4rem; }
.pbox { background: #fff; border: 1px solid var(--rule); border-left: 4px solid #c9c2b6; border-radius: 5px; padding: .35rem .5rem; font-size: .85rem; line-height: 1.3; }
.pbox.sex-M { border-left-color: #6d8fb3; } .pbox.sex-F { border-left-color: #c08497; } .pbox.empty { opacity: .55; }
.pbox .pn { float: right; font: .7rem var(--sans); color: var(--muted); }
.gens-5 .pbox, .gens-6 .pbox { font-size: .74rem; padding: .2rem .35rem; }
ul.descendants, ul.descendants ul { list-style: none; padding-left: 1.2rem; border-left: 1px dotted var(--rule); }
ul.descendants li { margin: .25rem 0; }
.wide-form { max-width: 900px; margin: 0 auto; } textarea.mono { font: .92rem/1.5 ui-monospace, Menlo, monospace; }
.help ul { margin: .3rem 0; } .noprint { }
@media print {
  .noprint, .story-foot, .pager, .discussion, details.qthis { display: none !important; }
  .print-chapter { page-break-before: always; } figure { page-break-inside: avoid; }
  figure img { max-height: 5in; }
}
@media (max-width: 720px) { .toc.compact { columns: 1; } .pedigree { grid-auto-columns: 130px; } }

.chip-inference { background: #fff; color: #7a3b1d; border: 1px solid #c9a27e; font-style: italic; }

/* ── never scroll the page sideways ── */
html, body { overflow-x: clip; }
main img, main video, main iframe { max-width: 100%; height: auto; }
figure { max-width: 100%; } figure img { max-width: 100%; height: auto; }
.viewer img { display: block; max-width: 100%; max-height: 85vh; width: auto; height: auto; margin: 0 auto; }
main p, main li, main dd, main td, main th, figcaption, .snippet { overflow-wrap: anywhere; }
main a { overflow-wrap: anywhere; word-break: break-word; }
.table-wrap { max-width: 100%; overflow-x: auto; }               /* a very wide table scrolls inside itself, never the page */
table.md { table-layout: auto; width: 100%; } table.md td, table.md th { min-width: 4.5rem; }
table.changes, table.list, table.facts, table.lines { table-layout: fixed; width: 100%; }
table.list.sortable th.num { width: 6rem; } table.list .num { text-align: right; white-space: nowrap; }   /* People: born, died, number, generation stay narrow; the name gets the room */
table.changes td, table.changes th, table.list td, table.facts td { overflow-wrap: anywhere; }
table.diff { table-layout: fixed; width: 100%; } table.diff td { max-width: none; }
dl.meta { grid-template-columns: minmax(6rem, max-content) minmax(0, 1fr); }
.pedigree { max-width: 100%; }
@media (max-width: 720px) {
  table.changes thead, table.list thead { display: none; }
  table.changes tr, table.list tr { display: block; border-bottom: 1px solid var(--rule); padding: .4rem 0; }
  table.changes td, table.list td { display: block; border: 0; padding: .1rem .3rem; }
  table.lines { font-size: .85rem; }
  header.site nav { gap: .6rem; font-size: .85rem; }
}

/* ══════════ THE BOOK (/) ══════════ */
body.book-page main { max-width: 1180px; }
.book-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 2.5rem; align-items: start; }
.book-toc { position: sticky; top: calc(var(--hh, 64px) + 1rem); max-height: calc(100vh - var(--hh, 64px) - 2rem); overflow-y: auto; font: .86rem/1.35 var(--sans); padding-right: .5rem; }
.book-toc .toc-title { font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .75rem; color: var(--muted); }
.book-toc .toc-title a { color: inherit; text-decoration: none; }
.book-toc ol { list-style: none; padding: 0; margin: 0; }
.book-toc li a { display: flex; gap: .5rem; padding: .28rem .4rem; border-radius: 4px; color: var(--ink); text-decoration: none; }
.book-toc li a:hover { background: #efe8da; } .book-toc li a.here { background: var(--accent); color: #fff; }
.book-toc .n { min-width: 1.4em; text-align: right; color: var(--muted); } .book-toc a.here .n { color: #fff; }
.toc-tools { margin-top: 1rem; }
.the-book { max-width: 720px; font-size: 1.07rem; line-height: 1.7; }
.the-book .title-page { text-align: center; padding: 3rem 0 2.5rem; border-bottom: 1px double var(--rule); }
.the-book .title-page h1 { font-size: 2.7rem; letter-spacing: .01em; }
.the-book .byline { font-size: 1.15rem; margin-top: 1.5rem; } .the-book .edition { color: var(--muted); font: .85rem var(--sans); }
.frontispiece img { max-height: 440px; width: auto; }
.contents-page h2, .chapter-title { border: 0; text-align: center; font-size: 1.9rem; margin: .2em 0 1em; }
.toc-print { list-style: none; padding: 0; max-width: 520px; margin: 0 auto 2rem; }
.toc-print li a { display: flex; gap: .8rem; padding: .25rem 0; border-bottom: 1px dotted var(--rule); color: var(--ink); text-decoration: none; }
.toc-print .n { min-width: 1.6em; color: var(--muted); text-align: right; }
.preface { border-top: 1px solid var(--rule); padding-top: 1rem; }
.the-book .chapter { padding-top: 3.5rem; margin-top: 2.5rem; border-top: 1px solid var(--rule); }
.chapter-no { text-align: center; font: 600 .78rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0; }
.the-book h3 { font-size: 1.3rem; margin-top: 2.2em; } .the-book h4 { font-size: 1.05rem; margin-top: 1.6em; }
.the-book .story-block p:first-of-type::first-letter { font-size: inherit; float: none; }
.story-tools { font: .78rem var(--sans); color: var(--muted); text-align: right; margin-top: -.3rem; }
.story-tools a { color: var(--muted); }
.line-chain { background: #fff; border: 1px solid var(--rule); border-radius: 8px; padding: .8rem 1.1rem; margin: 1.2rem 0 1.6rem; font-size: .95rem; }
.line-chain .aside-title { font: 600 .8rem var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--accent); margin: 0 0 .4rem; }
.line-chain ol { list-style: none; margin: 0; padding: 0; }
.line-chain li { position: relative; padding: .18rem 0 .18rem 1.3rem; }
.line-chain li::before { content: ""; position: absolute; left: .35rem; top: 0; bottom: 0; border-left: 2px solid #d9c9b3; }
.line-chain li::after { content: ""; position: absolute; left: .1rem; top: .7rem; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.line-chain li:first-child::before { top: .7rem; } .line-chain li.us::before { bottom: auto; height: .7rem; }
.line-chain li.us { font-weight: 600; }
.stat-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; margin: 1.2rem 0; }
.tile-stat { background: #fff; border: 1px solid var(--rule); border-radius: 8px; padding: .8rem .9rem; font-family: var(--sans); }
.tile-stat .v { display: block; font-size: 1.7rem; font-weight: 600; color: var(--ink); } .tile-stat .l { font-size: .78rem; color: var(--muted); }
.fig-note { font-size: .88rem; color: #4a443c; margin-top: .3rem; }
/* charts (src/Charts.php): one series each, palette blue, hairline grid, ink text */
svg.viz { display: block; margin: .6rem 0 .2rem; overflow: visible; font-family: var(--sans); }
svg.viz .mark { fill: #2f6b4f; } svg.viz .track { fill: #dde7d9; }   /* Pine family: one hue for single-series charts */
svg.viz .ring { stroke: var(--paper); stroke-width: 2; }
svg.viz .grid { stroke: #e3dccf; stroke-width: 1; }
svg.viz .lbl { fill: #2a2622; font-size: 13px; } svg.viz .lbl.small { font-size: 11.5px; }
svg.viz .val, svg.viz .tick { fill: #6f675d; font-size: 12px; }
svg.viz .mark:hover { fill: #1c5cab; }
details.viz-table { font-size: .85rem; margin-bottom: .4rem; } details.viz-table summary { color: var(--muted); cursor: pointer; }
.name-index { columns: 2; column-gap: 2rem; font-size: .9rem; line-height: 1.45; }
.idx-letter { font: 700 1rem var(--sans); color: var(--accent); margin: .8rem 0 .2rem; break-after: avoid; }
.idx-entry { margin: 0 0 .25rem; padding-left: 1em; text-indent: -1em; break-inside: avoid; }
.credits { font-size: .85rem; line-height: 1.45; }
@media (max-width: 1000px) {
  .book-layout { grid-template-columns: minmax(0, 1fr); }   /* minmax: a wide chart may not stretch the column past the screen */
  .book-toc { position: static; max-height: none; border: 1px solid var(--rule); border-radius: 8px; padding: .6rem; background: #fff; }
  .book-toc ol { columns: 2; } .the-book { max-width: none; }
}
@media (max-width: 600px) { .book-toc ol, .name-index { columns: 1; } .stat-tiles { grid-template-columns: repeat(2, 1fr); } .the-book .title-page h1 { font-size: 2rem; } }

/* ══════════ PRINT / PDF ══════════ */
@page { size: letter; margin: 0.8in 0.85in 0.9in; }
@media print {
  html, body { background: #fff !important; overflow: visible !important; }
  body { font-size: 11pt; color: #000; }
  .hero { background: none !important; color: #000 !important; padding: 0 !important; border: 0 !important; } .hero h1, .hero .subtitle { color: #000 !important; }
  header.site, footer.site, .noprint, .story-tools, .book-toc, .flash, .actions, .discussion, details.viz-table, details.qthis, details.cites summary { display: none !important; }
  main, body.book-page main { max-width: none; padding: 0; margin: 0; }
  .book-layout { display: block; } .the-book { max-width: none; font-size: 11pt; line-height: 1.5; }
  a { color: #000; text-decoration: none; }
  .the-book .title-page { min-height: 8.5in; display: flex; flex-direction: column; justify-content: center; border: 0; page-break-after: always; }
  .contents-page { page-break-after: always; }
  .the-book .chapter { page-break-before: always; border: 0; padding-top: 1in; margin: 0; }
  .chapter-title { font-size: 22pt; } .the-book h3 { font-size: 14pt; page-break-after: avoid; } .the-book h4 { page-break-after: avoid; }
  p { orphans: 3; widows: 3; }
  figure { page-break-inside: avoid; } figure img { max-height: 4.2in !important; width: auto !important; border: 0; }
  .line-chain, .tile-stat { border-color: #999; page-break-inside: avoid; }
  svg.viz { page-break-inside: avoid; } svg.viz .ring { stroke: #fff; }
  .chip { border: 1px solid #555; color: #000 !important; background: #fff !important; font-size: 7pt; }
  .person-ref { text-decoration: none; }
  .name-index, .credits { font-size: 9pt; }
}
.tile-stat .l { display: block; line-height: 1.3; margin-top: .2rem; } .tile-stat .v { line-height: 1.1; }

/* ── sticky header: stays at the top while reading; --hh (its height) is measured by app.js ── */
header.site { position: sticky; top: 0; z-index: 50; box-shadow: 0 1px 0 var(--rule), 0 2px 8px rgba(60, 40, 20, .06); }
html { scroll-padding-top: calc(var(--hh, 64px) + .75rem); }   /* jumps to #chapters and #facts land below the header */
@media (max-width: 720px) {
  /* on a phone keep it to two short rows: the name and search, then the menu scrolling sideways inside itself */
  header.site { gap: .35rem .6rem; padding: .45rem .8rem; }
  header.site .brand { font-size: 1rem; }
  header.site nav { order: 3; flex-basis: 100%; flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; scrollbar-width: none; padding-bottom: .1rem; }
  header.site nav::-webkit-scrollbar { display: none; }
  header.site .search { flex: 1; } header.site .search input { width: 100%; padding: .2rem .5rem; }
  header.site .me { order: 4; flex-basis: 100%; font-size: .8rem; flex-wrap: wrap; gap: .4rem; }
}
@media print { header.site { position: static; box-shadow: none; } }

/* compact sticky header: one row on wide screens, two on mid-size */
header.site { padding: .45rem 1.25rem; gap: .35rem 1.1rem; }
header.site nav { gap: .8rem; font-size: .88rem; }
header.site .search input { width: 11rem; padding: .22rem .55rem; }
header.site .me { gap: .7rem; font-size: .85rem; }
header.site .readas { display: inline-flex; margin: 0; } header.site .readas label { display: inline-flex; align-items: center; gap: .3rem; margin: 0; font-size: .8rem; color: #d9e3d6; }
header.site .readas select { display: inline-block; width: auto; margin: 0; padding: .1rem .3rem; font: .82rem var(--sans); }
@media (max-width: 720px) { header.site .readas { display: inline-flex; } header.site .me { font-size: .78rem; } }

/* phone header: two short rows — the name with Read as and sign out, then the menu (search is in the menu) */
.nav-search { display: none; }
@media (max-width: 720px) {
  header.site .search { display: none; }
  .nav-search { display: inline; }
  header.site .me { order: 2; flex-basis: auto; margin-left: auto; }
  header.site .me > a[href$="/account"] { display: none; }
  header.site .readas label { font-size: 0; gap: 0; } header.site .readas select { font-size: .78rem; }
}
@media (max-width: 720px) {
  header.site .brand { flex: 1 1 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .95rem; }
  header.site .me { flex: 0 0 auto; gap: .5rem; }
}

/* ── the book's contents panel: sticky beside the text, can be hidden and re-opened (app.js remembers the choice) ── */
.toc-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.toc-hide { background: none; color: var(--muted); font: .78rem var(--sans); padding: .15rem .4rem; border: 1px solid var(--rule); border-radius: 4px; }
.toc-hide:hover { color: var(--accent); border-color: var(--accent); }
.toc-reopen { display: none; position: fixed; z-index: 45; left: 0; top: calc(var(--hh, 64px) + 1rem);
  background: var(--accent); color: #fff; border-radius: 0 6px 6px 0; padding: .55rem .5rem; font: 600 .8rem var(--sans);
  writing-mode: vertical-rl; transform: rotate(180deg); box-shadow: 0 2px 8px rgba(60, 40, 20, .18); cursor: pointer; }
.toc-reopen span { margin-top: .3rem; }
.toc-backdrop { display: none; }
@media (min-width: 1001px) {
  body.toc-collapsed .book-layout { grid-template-columns: minmax(0, 1fr); }
  body.toc-collapsed .book-toc { display: none; }
  body.toc-collapsed .toc-reopen { display: block; }
  body.toc-collapsed .the-book { margin: 0 auto; }
}
/* phones and narrow windows: the contents is a drawer from the left, opened by a button that stays in reach */
@media (max-width: 1000px) {
  .book-toc { position: fixed !important; z-index: 60; left: 0; top: var(--hh, 64px); bottom: 0; width: min(86vw, 330px);
    max-height: none !important; overflow-y: auto; border: 0 !important; border-radius: 0 !important; background: var(--paper) !important;
    padding: .8rem 1rem 2rem !important; box-shadow: 4px 0 18px rgba(60, 40, 20, .18); transform: translateX(-105%); transition: transform .2s ease; }
  .book-toc ol { columns: 1 !important; }
  body.toc-open .book-toc { transform: none; }
  .toc-reopen { display: block; top: auto; bottom: 1rem; left: 1rem; writing-mode: horizontal-tb; transform: none; border-radius: 22px; padding: .55rem 1rem; }
  .toc-reopen span { margin: 0 0 0 .2rem; }
  body.toc-open .toc-reopen { display: none; }
  body.toc-open .toc-backdrop { display: block; position: fixed; inset: var(--hh, 64px) 0 0 0; z-index: 55; background: rgba(40, 30, 20, .25); }
}
@media (prefers-reduced-motion: reduce) { .book-toc { transition: none; } }

/* help pages and the guides rendered from Markdown */
.help-page .lead { font-size: 1.1rem; } .help-page li { margin: .45rem 0; }
.guide { max-width: 880px; font-size: 1rem; } .guide h1 { font-size: 2rem; } .guide h2 { margin-top: 2.2em; }
pre { background: #f1ece2; border: 1px solid var(--rule); border-radius: 6px; padding: .7rem .9rem; overflow-x: auto; font: .82rem/1.45 ui-monospace, Menlo, monospace; white-space: pre; }
pre code { background: none; padding: 0; }

/* The book's parts, and the data at the end of each family-line chapter (templates/book.php) */
.toc-part { font: 600 .72rem var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--accent); margin: .9rem 0 .2rem; }
.toc-part a { color: inherit; text-decoration: none; }
.contents-page .toc-part { margin-top: 1.2rem; }
.part-title { text-align: center; padding: 3rem 0 1.5rem; margin: 2rem 0 0; border-top: 1px solid var(--rule); }
.part-title h2 { font-size: 1.7rem; font-weight: 500; letter-spacing: .01em; margin: 0; }
.line-end { margin-top: 2.2rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
.line-end > h3 { margin-top: 0; }
table.meanwhile { width: 100%; border-collapse: collapse; font-size: .9rem; margin: .6rem 0 .4rem; table-layout: fixed; }
table.meanwhile th, table.meanwhile td { text-align: left; vertical-align: top; padding: .35rem .5rem; border-bottom: 1px solid var(--rule); }
table.meanwhile thead th { font: 600 .75rem var(--sans); text-transform: uppercase; letter-spacing: .05em; color: #6b6358; }
table.meanwhile th:first-child { width: 3.6rem; }
table.meanwhile th[scope=row] { font: 600 .85rem var(--sans); color: var(--accent); }
table.meanwhile td p { margin: 0 0 .3rem; }
table.meanwhile td:last-child { color: #3d3830; }
table.meanwhile td:last-child a { color: inherit; font-weight: 600; text-decoration-color: #cbbda8; }
.mw-desc { display: block; font-size: .82rem; color: #5d564c; font-weight: 400; }
@media (max-width: 640px) {
  table.meanwhile thead { display: none; }
  table.meanwhile, table.meanwhile tbody, table.meanwhile tr, table.meanwhile th, table.meanwhile td { display: block; width: auto; }
  table.meanwhile tr { border-bottom: 1px solid var(--rule); padding: .3rem 0; }
  table.meanwhile th, table.meanwhile td { border: 0; padding: .1rem 0; }
  table.meanwhile td:empty { display: none; }
  table.meanwhile td:last-child { padding-left: .8rem; border-left: 2px solid #d9c9b3; }
}
@media print {
  .part-title { page-break-before: always; page-break-after: always; border: 0; padding-top: 35vh; }
  table.meanwhile tr { page-break-inside: avoid; }
  .line-end { page-break-before: always; }
}
table.events-list th:first-child { width: 8.5rem; }
table.events-list th[scope=row] { text-transform: none; letter-spacing: 0; font-weight: 600; }
table.events-list td:last-child { width: 11rem; }

/* Research list (templates/desk.php, research_item.php, research_form.php) */
.actions-row { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; font: .9rem var(--sans); }
.button.on { background: var(--pine); color: var(--cream); }
button:hover, .button:hover { background: var(--pine-2); color: #fff; }
button.link:hover { background: none; }
.cost-total { font: .95rem var(--sans); background: #fff; border: 1px solid var(--rule); border-radius: 8px; padding: .5rem .8rem; display: inline-block; }
.research-filters input.short { width: 9rem; }
table.research-list { width: 100%; border-collapse: collapse; font-size: .92rem; margin: .5rem 0 1rem; }
table.research-list th, table.research-list td { text-align: left; vertical-align: top; padding: .4rem .45rem; border-bottom: 1px solid var(--rule); }
table.research-list thead th { font: 600 .75rem var(--sans); text-transform: uppercase; letter-spacing: .04em; color: #6b6358; }
table.research-list thead th a { color: inherit; text-decoration: none; } table.research-list thead th a.on { color: var(--accent); }
table.sortable thead th a { color: inherit; text-decoration: none; white-space: nowrap; } table.sortable thead th a:hover { text-decoration: underline; } table.sortable thead th[aria-sort] a { color: var(--accent); }
table.research-list .num { text-align: right; white-space: nowrap; }
.rstatus, .rprio { display: inline-block; font: 600 .72rem/1.6 var(--sans); padding: 0 .5rem; border-radius: 9px; background: #ece6da; color: #4a443c; white-space: nowrap; }
.rstatus-requested, .rstatus-waiting { background: #f6e7c6; color: #6d4b0a; }
.rstatus-received, .rstatus-done { background: #dcefdc; color: #1f5a2b; }
.rstatus-dead_end { background: #e4e1dc; color: #6b6358; text-decoration: line-through; }
.rprio-high { background: #f5d2cc; color: #7a2a20; } .rprio-low { background: #f1efeb; color: #7b746a; }
.facts-dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .3rem 1rem; }
.facts-dl dt { font: 600 .8rem var(--sans); color: #6b6358; padding-top: .15rem; } .facts-dl dd { margin: 0; }
.research-form .row2, .research-form .row3 { display: grid; gap: 0 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.research-form .row3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.prompt-received { border-color: #9cc99c; background: #f3faf3; }
.import-csv { margin-top: .5rem; }
@media (max-width: 640px) {
  .research-form .row2, .research-form .row3 { grid-template-columns: minmax(0, 1fr); }
  table.research-list thead { display: none; }
  table.research-list tr { display: grid; grid-template-columns: 1fr auto; border-bottom: 1px solid var(--rule); padding: .3rem 0; }
  table.research-list td { border: 0; padding: .1rem .2rem; }
  table.research-list td:first-child { grid-column: 1 / -1; }
}

/* History events in the text ({{event:N}}, md_event) and the family timeline */
.meanwhile-box { float: right; width: 15rem; margin: .2rem 0 1rem 1.4rem; padding: .6rem .8rem; background: #fff; border: 1px solid var(--rule); border-left: 3px solid var(--accent); border-radius: 6px; font: .85rem/1.45 var(--sans); }
.meanwhile-box p { margin: 0 0 .3rem; } .meanwhile-box .mw-when { font-weight: 600; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); }
.meanwhile-box .mw-title { font-weight: 600; } .meanwhile-box .mw-text { color: #4a443c; } .meanwhile-box .mw-src { font-size: .78rem; margin: 0; }
.mw-line { display: inline-block; font: 600 .68rem var(--sans); color: #6b6358; background: #ece6da; border-radius: 8px; padding: 0 .4rem; margin-left: .2rem; }
.events-list tr:target { background: #fff6e0; }
@media (max-width: 640px) { .meanwhile-box { float: none; width: auto; margin: .8rem 0; } }
@media print { .meanwhile-box { page-break-inside: avoid; } }
.voyage-card { float: right; clear: right; width: 16rem; margin: .2rem 0 1rem 1.4rem; padding: .6rem .8rem; background: #fbf6ea; border: 1px solid var(--rule); border-left: 3px solid var(--gold); border-radius: 6px; font: .85rem/1.45 var(--sans); }
.voyage-card p { margin: 0 0 .3rem; } .voyage-card .vc-when { font-weight: 600; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--clay-ink); }
.voyage-card .vc-ship { font-weight: 600; } .voyage-card .vc-route { font-weight: 400; color: #4a443c; } .voyage-card .vc-src { font-size: .78rem; margin: 0; }
.story-sidebar { clear: both; margin: 1.4rem 0; padding: .9rem 1.1rem; background: #fff; border: 1px solid var(--rule); border-top: 3px solid #b8ab97; border-radius: 6px; font: .9rem/1.5 var(--sans); }
.story-sidebar .sidebar-title { font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: #6b6358; margin: 0 0 .5rem; }
.story-sidebar p { margin: 0 0 .5rem; } .story-sidebar .sidebar-src { font-size: .78rem; color: #6b6358; margin: .6rem 0 0; }
.story-sidebar .sidebar-nosrc { color: #b42318; font-weight: 600; }
@media (max-width: 640px) { .voyage-card { float: none; width: auto; margin: .8rem 0; } }
@media print { .voyage-card, .story-sidebar, .family-map { page-break-inside: avoid; } .story-sidebar { background: none; border-color: #999; } }

/* Review queue (templates/review.php) */
.suggestion h2 { font-size: 1.15rem; margin: .2rem 0 .4rem; }
.suggestion.status-accepted { border-left: 3px solid #5a9a5a; } .suggestion.status-rejected, .suggestion.status-withdrawn { opacity: .75; }
table.diff { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: .9rem; margin: .5rem 0; }
table.diff th, table.diff td { vertical-align: top; text-align: left; padding: .35rem .5rem; border: 1px solid var(--rule); }
table.diff thead th { font: 600 .75rem var(--sans); text-transform: uppercase; color: #6b6358; background: #faf7f1; }
table.diff.fields th[scope=row] { width: 9rem; font: 600 .8rem var(--sans); }
table.diff td input { width: 100%; margin: 0; }
tr.d-same td { color: #7b746a; } tr.d-changed td:first-child, tr.d-removed td:first-child { background: #fbe9e6; }
tr.d-changed td:last-child, tr.d-added td:last-child { background: #e8f5e8; }
.review-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-end; }
.review-actions label { flex: 1 1 20rem; margin: 0; }
.evidence { background: #f3faf3; padding: .3rem .5rem; border-radius: 4px; }

table.diff del { background: #f5c9c2; text-decoration: line-through; } table.diff ins { background: #c4e6c4; text-decoration: none; }
table.assistants select { width: auto; display: inline-block; margin: 0 .2rem 0 0; } table.assistants td:last-child { white-space: nowrap; }
section.narrow:has(table.assistants) { max-width: 60rem; }
.review-note { border-left: 3px solid var(--rule); padding: .2rem .6rem; margin: .4rem 0; }

.notif-count { display: inline-block; min-width: 1.3rem; padding: 0 .35rem; border-radius: 10px; background: #b3402f; color: #fff !important; font: 600 .72rem/1.3rem var(--sans); text-align: center; text-decoration: none; }
.notifications li.read { opacity: .65; } .notifications li.unread a { font-weight: 600; }

/* Pictures in comments */
.comment figure, .reply figure, .fact-comment figure { max-width: 22rem; margin: .5rem 0; }
.comment figure img, .reply figure img, .fact-comment figure img { max-width: 100%; height: auto; border-radius: 4px; }
.attach { display: grid; gap: .3rem; margin: .3rem 0; } .attach input[type=file] { font-size: .85rem; }

/* A person's life against the times (templates/person.php) */
.times-list { list-style: none; padding: 0; margin: .4rem 0; font-size: .92rem; }
.times-list li { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: .6rem; padding: .3rem 0; border-bottom: 1px solid var(--rule); }
.times-list .t-when { font: 600 .82rem var(--sans); color: var(--accent); }
.times-list .t-age { display: block; font-weight: 400; color: #6b6358; }
.times-list li.linked { background: #fbf7ee; }
.chip-setting { background: #e7eef6; color: #2c4a6b; }
@media (max-width: 640px) { .times-list li { grid-template-columns: minmax(0, 1fr); gap: 0; } }

/* Draft stories */
.draft-banner { background: #fff6e0; border: 1px solid #e8d29a; border-radius: 6px; padding: .5rem .8rem; margin: .6rem 0; font: .88rem var(--sans); }
.story-draft { border-left: 3px dashed #e8d29a; padding-left: .8rem; }

.reading-key { margin-top: 1.5rem; padding: .8rem 1rem; border: 1px solid var(--rule); border-radius: 8px; background: #fff; font-size: .92rem; }
.reading-key h3 { margin-top: 0; } .reading-key dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .3rem .8rem; margin: .4rem 0; }
.reading-key dd { margin: 0; }
@media print { .reading-key { page-break-inside: avoid; } }

/* Voyages, places and family-move maps (templates/voyage*.php, places.php; VB\Maps) */
.row2-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.coords-form { display: flex; gap: .3rem; align-items: center; } .coords-form input { width: 6.5rem; margin: 0; }
section.narrow.wide-ok { max-width: 62rem; }
.family-map svg { width: 100%; height: auto; font: 11px var(--sans); }
.family-map .map-panel { fill: #dcebf7; stroke: none; }
.family-map .map-frame { fill: none; stroke: #b9d3ea; }
.family-map .map-land { fill: #f7f3ea; stroke: #b9cfe3; stroke-width: .6; stroke-linejoin: round; }
.family-map .map-lakes { fill: #dcebf7; stroke: #b9cfe3; stroke-width: .5; }
.family-map .map-rivers { fill: none; stroke: #a9cbe8; stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; }
.family-map .map-states { fill: none; stroke: #d8cfc0; stroke-width: .6; }
.family-map .map-borders { fill: none; stroke: #b8ab97; stroke-width: .9; stroke-dasharray: 3 2; }
.family-map .map-credit { font-size: 11px; color: #8a8174; margin-top: 2px; }
.family-map .map-panel-title { font: 600 10px var(--sans); fill: #6b6358; text-transform: uppercase; letter-spacing: .06em; }
.family-map .map-track { stroke: var(--clay); stroke-width: 2.2; stroke-linecap: round; opacity: .85; }
.family-map .map-crossing { fill: none; stroke: var(--gold); stroke-width: 2.2; stroke-dasharray: 5 4; opacity: .95; }   /* the thread across the sea */
.family-map .map-place circle { fill: var(--pine); stroke: #fff; stroke-width: 2; }
.family-map .map-place text { fill: #2b2620; paint-order: stroke; stroke: #f7f3ea; stroke-width: 3px; }
.family-map .map-years { fill: #6b6358; font-size: 10px; }
@media (max-width: 640px) { .row2-grid { grid-template-columns: minmax(0, 1fr); } }

/* Draft links and the connector's consent page */
.draft-prompt { border-left: 3px solid var(--accent); margin: 1rem 0; padding: .4rem .9rem; font-size: 1.05rem; background: #fff; }
.consent .lead code { font-size: .9em; } .consent fieldset label { display: block; margin: .3rem 0; }
.consent fieldset label { display: flex; align-items: center; gap: .5rem; }
.consent fieldset input[type=radio] { width: auto; margin: 0; flex: none; }

/* Verification workbench (templates/verify.php) */
.verify-layout { display: grid; grid-template-columns: 17rem minmax(0, 1fr); gap: 2rem; max-width: 76rem; margin: 0 auto; }
.verify-side h1 { font-size: 1.5rem; margin-top: 0; } .small-h { font: 600 .78rem var(--sans); text-transform: uppercase; letter-spacing: .05em; color: #6b6358; margin: 1.2rem 0 .4rem; }
.verify-progress { width: 100%; font-size: .85rem; } .verify-progress th { text-align: left; font-weight: 600; padding: .2rem .5rem .2rem 0; vertical-align: top; }
.verify-progress .bar { display: block; height: 6px; background: #cde2fb; border-radius: 3px; overflow: hidden; margin: .35rem 0 .15rem; }
.verify-progress .bar span { display: block; height: 100%; background: #2f6b4f; }
.verify-filters label { display: block; margin: .3rem 0; font-size: .85rem; } .verify-filters select, .verify-filters input { width: 100%; }
.verify-next { padding-left: 1.2rem; font-size: .88rem; } .verify-next li { margin: .25rem 0; } .verify-next li.on a { font-weight: 700; }
.verify-fact { margin: .2rem 0; } .verify-claim { font-size: 1.15rem; }
.verify-cites li { margin: .4rem 0; }
.verify-docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr)); gap: .6rem; }
.verify-docs a { display: block; text-decoration: none; color: inherit; } .verify-docs img { width: 100%; height: 6rem; object-fit: cover; border-radius: 4px; border: 1px solid var(--rule); }
.verify-docs .doc-card { display: flex; align-items: center; justify-content: center; height: 6rem; border: 1px solid var(--rule); border-radius: 4px; background: #fff; font: .8rem var(--sans); }
.verify-decide { position: sticky; bottom: 0; background: #fffdf8; box-shadow: 0 -4px 12px rgba(0,0,0,.05); }
.verify-buttons { display: flex; flex-wrap: wrap; gap: .4rem; margin: .4rem 0; }
.verify-buttons kbd, .recommendation kbd { font: .7rem var(--sans); border: 1px solid currentColor; border-radius: 3px; padding: 0 .25rem; margin-left: .3rem; opacity: .7; }
.recommendation { border-left: 3px solid #e8d29a; background: #fffaf0; }
@media (max-width: 860px) { .verify-layout { grid-template-columns: minmax(0, 1fr); } }
/* the draft preview (/story/{uid}/preview) */
.preview-bar { background: #fbf6ea; border: 1px solid var(--rule); border-left: 3px solid var(--gold); border-radius: 6px; padding: .5rem .8rem; margin: 0 auto 1.2rem; max-width: 760px; font: .92rem/1.45 var(--sans); }
.preview-bar p { margin: .2rem 0; }
.the-book.preview { max-width: 760px; margin: 0 auto; }
.review-answer { max-width: 760px; margin: 1.5rem auto; border-top: 3px solid var(--pine); }
.review-for-me { border-left: 3px solid var(--gold); }
button.secondary { background: #fff; color: var(--pine); border: 1px solid var(--pine); } button.secondary:hover { background: #eef3ee; color: var(--pine); }
/* Research Desk tabs (desk, review queue, workbench) and the menu count */
.desk-tabs { display: flex; flex-wrap: wrap; gap: .3rem; margin: .4rem 0 1rem; border-bottom: 1px solid var(--rule); font: .92rem var(--sans); }
.desk-tabs a { padding: .4rem .75rem; border-radius: 6px 6px 0 0; text-decoration: none; color: var(--ink); border: 1px solid transparent; border-bottom: 0; margin-bottom: -1px; }
.desk-tabs a:hover { background: #efe6d2; } .desk-tabs a.on { background: var(--card); border-color: var(--rule); color: var(--pine); font-weight: 600; box-shadow: inset 0 2px 0 var(--gold); }
.nav-count { display: inline-block; min-width: 1.2rem; padding: 0 .35rem; border-radius: 9px; background: var(--lamp); color: var(--pine); font: 700 .72rem/1.25rem var(--sans); text-align: center; }
/* Needs you */
.needs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: .8rem; margin: .5rem 0 1.5rem; }
.needs-card { background: var(--card); border: 1px solid var(--rule); border-radius: 8px; padding: .7rem .9rem; font: .9rem/1.4 var(--sans); }
.needs-card.has { border-top: 3px solid var(--gold); } .needs-card h3 { margin: 0 0 .4rem; font-size: 1rem; display: flex; justify-content: space-between; gap: .5rem; }
.needs-card h3 .n { font-family: var(--sans); color: var(--pine); } .needs-card ul { margin: 0; padding-left: 1rem; } .needs-card li { margin: .25rem 0; }
.needs-card .more { font-size: .82rem; margin: .4rem 0 0; }
.thread-actions { margin: .6rem 0 1rem; } .thread-actions .actions-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .2rem 0 .5rem; }
.thread-actions input.short { width: 18rem; display: inline-block; margin: 0; }
.next-up { border-top: 3px solid var(--gold); } .next-up h3 { margin-top: 0; } .next-up ol { margin: .3rem 0 0; padding-left: 1.3rem; } .next-up li { margin: .35rem 0; }
/* the landing page (/): a welcome band and six widgets, 3 × 2 (2 columns on a tablet, 1 on a phone) */
.landing { max-width: 1120px; margin: 0 auto; }
/* the welcome band: the Tree & Thread logo on its own cream, the family's title beside it */
.landing-band { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; gap: 1.5rem;
  background: #f6efdf; border: 1px solid var(--rule); border-bottom: 3px solid var(--gold); border-radius: 10px; padding: .6rem 1.6rem .6rem .6rem;   /* the logo's own cream */ margin: 0 0 1.2rem; }
.landing-logo { width: 100%; height: auto; display: block; }
.landing-welcome .hello { margin: 0; font: 1rem var(--sans); color: var(--muted); }
.landing-welcome h1 { font-size: 1.9rem; margin: .15rem 0 .3rem; color: var(--pine); }
.landing-welcome .tagline { margin: 0; font: italic 1.05rem var(--display); color: var(--clay-ink); }
@media (max-width: 760px) { .landing-band { grid-template-columns: 1fr; text-align: center; padding: .6rem 1rem 1rem; gap: .4rem; } }
.widget-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 960px) { .widget-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .widget-grid { grid-template-columns: 1fr; } }
.widget { background: var(--card); border: 1px solid var(--rule); border-top: 3px solid var(--pine); border-radius: 10px; padding: .9rem 1.1rem 1rem; display: flex; flex-direction: column; font: .95rem/1.45 var(--sans); min-width: 0; }
.widget h2 { font-size: 1.2rem; margin: 0 0 .6rem; border: 0; padding: 0; background: none; display: flex; align-items: center; gap: .4rem; }
.widget h2 a { color: var(--ink); text-decoration: none; } .widget h2 a:hover { color: var(--clay-ink); }
.widget h3 { font: 600 .78rem var(--sans); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: .7rem 0 .3rem; }
.widget .more { margin: auto 0 0; padding-top: .6rem; font-size: .88rem; }
.widget-stats { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin: 0 0 .6rem; color: var(--muted); } .widget-stats strong { color: var(--pine); font: 600 1.35rem var(--display); }
.widget-list { list-style: none; margin: 0; padding: 0; } .widget-list li { padding: .3rem 0; border-bottom: 1px solid #efe8da; } .widget-list li:last-child { border-bottom: 0; }
.day-list .year { display: inline-block; min-width: 2.6rem; font: 600 .9rem var(--display); color: var(--clay-ink); }
.widget-counts { list-style: none; margin: 0; padding: 0; } .widget-counts li { display: flex; justify-content: space-between; padding: .32rem 0; border-bottom: 1px solid #efe8da; color: var(--muted); }
.widget-counts li.has { color: var(--ink); font-weight: 600; } .widget-counts .n { font-variant-numeric: tabular-nums; } .widget-counts li.has .n { color: var(--pine); }
.widget-needs { border-top-color: var(--gold); }
.widget-search { display: flex; gap: .4rem; margin: 0 0 .6rem; } .widget-search input { margin: 0; }
.widget-lines { list-style: none; margin: 0; padding: 0; } .widget-lines li { padding: .35rem 0; border-bottom: 1px solid #efe8da; } .widget-lines li:last-child { border-bottom: 0; }
.widget-lines .muted { display: block; }
.widget-bars { display: grid; gap: .35rem; margin: .2rem 0 .6rem; }
.wbar { display: grid; grid-template-columns: 6.5rem 1fr 3.2rem; align-items: center; gap: .5rem; font-size: .85rem; }
.wbar-n { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
svg.pbar { width: 100%; height: 8px; display: block; } .pbar-track { fill: #e6ede4; } .pbar-fill { fill: #2f6b4f; }
/* Tree & Thread icons (public/assets/icons, from the heritage icon set) */
.widget h2 .widget-icon { width: 44px; height: 44px; flex: none; margin: -.25rem .15rem -.25rem -.2rem; }
.flash-stitched { display: flex; align-items: center; gap: .6rem; } .flash-stitched img { flex: none; }
.ora-says img { width: 30px; height: 30px; }
h1.with-icon { display: flex; align-items: center; gap: .5rem; } h1.with-icon img { flex: none; margin-left: -.2rem; }
.hero .hero-icon { display: block; margin: 0 auto .5rem; width: 84px; height: 84px; filter: drop-shadow(0 1px 0 rgba(247,241,227,.35)); }
h2.with-icon { display: flex; align-items: center; gap: .45rem; } h2.with-icon img { flex: none; margin: -.3rem 0 -.2rem -.15rem; }
.preview-bar .bar-icon { vertical-align: middle; margin: -.2rem .35rem 0 0; }

/* ---- the book, set like a printed book (/book) ----
   On screen: a paper page; part pages; chapter openers with a gold rule and a drop cap; justified, hyphenated
   paragraphs with indented first lines and no space between them (the first after a heading or a figure is not
   indented); the Comment · Edit · History links faded until the story is pointed at. Title page and contents are
   print-only. */
.print-only { display: none; }
.the-book:not(.preview) { max-width: 54rem; background: #fffdf8; border: 1px solid var(--rule); border-radius: 4px;
  box-shadow: 0 1px 2px rgba(34, 49, 42, .06), 0 10px 30px rgba(34, 49, 42, .06); padding: 1rem 4.5rem 4rem; font-size: 1.12rem; line-height: 1.72; }
.the-book .chapter > p:not(.chapter-no), .the-book .story-block > p:not(.story-tools) { margin: 0; text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.the-book .chapter > p:not(.chapter-no) + p, .the-book .story-block > p:not(.story-tools) + p:not(.story-tools) { text-indent: 1.6em; }
.the-book .story-block > ul, .the-book .story-block > ol, .the-book .story-block > figure, .the-book .story-block > aside, .the-book .story-block > .table-wrap { margin-top: 1em; margin-bottom: 1em; }
.part-title { text-align: center; padding: 5rem 0 3.5rem; margin: 0; border: 0; }
.part-title .part-no { margin: 0 0 .6rem; font: 600 .82rem var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--clay-ink); }
.part-title h2 { font-size: 2.3rem; font-weight: 500; line-height: 1.15; margin: 0 auto; max-width: 26rem; border: 0; padding: 0; background: none; text-wrap: balance; }
.part-title h2::after { content: ""; display: block; width: 4rem; height: 2px; background: var(--gold); margin: 1.3rem auto 0; }
.the-book .chapter { border: 0; margin-top: 0; padding-top: 4.5rem; }
.the-book .part-title + .chapter { padding-top: 1.5rem; }
.the-book .chapter-no { text-align: center; letter-spacing: .2em; color: var(--clay-ink); }
.the-book .chapter-title { font-size: 2.05rem; font-weight: 500; line-height: 1.2; margin: .35rem auto 2.2rem; max-width: 30rem; background: none; padding: 0; text-wrap: balance; }
.the-book .chapter-title::after { content: ""; display: block; width: 2.6rem; height: 2px; background: var(--gold); margin: 1rem auto 0; }
.the-book .story-block > h3 { text-align: center; font-size: 1.25rem; font-weight: 500; font-style: italic; margin: 2.8em 0 1em; }
.the-book .story-block:first-of-type > h3:first-child { margin-top: 0; }
/* a drop cap where each chapter's text begins */
.the-book .chapter-title + p::first-letter,
.the-book .chapter-title + .story-block > p:first-child::first-letter,
.the-book .chapter-title + .story-block > h3:first-child + p::first-letter {
  font-family: var(--display); font-size: 3.4em; float: left; line-height: .86; padding: .06em .09em 0 0; color: var(--pine); font-weight: 500; }
.the-book .story-tools { opacity: .3; transition: opacity .15s; margin-top: .6rem; }
.the-book .story-block:hover .story-tools, .the-book .story-tools:focus-within { opacity: 1; }
@media (hover: none) { .the-book .story-tools { opacity: .7; } }
.toc-key { margin: 1rem 0 .4rem; font-size: .82rem; } .toc-key summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.toc-key dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .3rem .5rem; margin: .5rem 0 0; } .toc-key dd { margin: 0; color: var(--muted); }
@media (max-width: 960px) { .the-book:not(.preview) { padding: .5rem 2rem 3rem; } }
@media (max-width: 600px) { .the-book:not(.preview) { padding: .2rem 1.1rem 2.5rem; font-size: 1.05rem; border-radius: 0; border-left: 0; border-right: 0; }
  .the-book .chapter > p:not(.chapter-no), .the-book .story-block > p:not(.story-tools) { text-align: left; } .part-title { padding: 3rem 0 2rem; } .part-title h2 { font-size: 1.8rem; } }
@media print {
  .print-only { display: block; }
  .the-book:not(.preview) { background: none; border: 0; box-shadow: none; padding: 0; max-width: none; }
  .the-book .chapter-title + p::first-letter, .the-book .chapter-title + .story-block > p:first-child::first-letter,
  .the-book .chapter-title + .story-block > h3:first-child + p::first-letter { color: #000; }
  .part-title h2::after, .the-book .chapter-title::after { background: #999; }
}
/* tables in the book and in stories: a header on a gold rule, light rows, words never broken mid-way */
.the-book table, table.md { border-collapse: collapse; width: 100%; margin: 1.2rem 0 1.6rem; font: .92rem/1.45 var(--sans); }
.the-book table th, table.md th { font: 600 .74rem/1.3 var(--sans); letter-spacing: .07em; text-transform: uppercase; color: var(--clay-ink);
  padding: .5rem .75rem .45rem; border-bottom: 2px solid var(--gold); text-align: left; vertical-align: bottom; }
.the-book table td, table.md td { padding: .55rem .75rem; border-bottom: 1px solid #ece4d3; vertical-align: top; font-family: var(--sans); font-size: .92rem; }
.the-book table tbody tr:nth-child(even) td, table.md tr:nth-child(even) td { background: #faf6ec; }
.the-book table td, .the-book table th, table.md td, table.md th { overflow-wrap: normal; word-break: normal; hyphens: manual; text-indent: 0; text-align: left; }
.the-book table td a, table.md td a { overflow-wrap: normal; word-break: normal; }
.the-book .table-wrap { margin: 1.2rem 0 1.6rem; } .the-book .table-wrap > table { margin: 0; }
@media print { .the-book table tbody tr:nth-child(even) td, table.md tr:nth-child(even) td { background: none; } .the-book table th, table.md th { color: #000; border-bottom-color: #999; } }
/* the Research Desk tabs stay in reach under the sticky header (desk, review queue, workbench) */
.desk-tabs { position: sticky; top: var(--hh, 64px); z-index: 40; background: var(--paper); padding-top: .45rem; margin-top: -.45rem; }
html:has(.desk-tabs) { scroll-padding-top: calc(var(--hh, 64px) + 3.4rem); }   /* jumps to #needs, #research … land below the tabs */
@media print { .desk-tabs { position: static; } }
/* footnotes in the book and stories (md_book): small numbers in the text, the notes at the end of each section */
sup.fn { font: 600 .68em var(--sans); line-height: 0; vertical-align: super; margin-left: .08em; }
sup.fn a { text-decoration: none; color: var(--clay-ink); padding: 0 .1em; } sup.fn a:hover { text-decoration: underline; }
ol.footnotes { margin: 1.4rem 0 .4rem; padding: .7rem 0 0 1.4rem; border-top: 1px solid var(--rule); font: .82rem/1.5 var(--sans); color: #4a4f48; text-align: left; }
ol.footnotes::before { content: ""; display: block; width: 3rem; height: 2px; background: var(--gold); margin: -.75rem 0 .6rem -1.4rem; }
ol.footnotes li { margin: .25rem 0; padding-left: .2rem; } ol.footnotes li::marker { color: var(--clay-ink); font-weight: 600; }
ol.footnotes li:target { background: #fbf3dc; border-radius: 3px; }
.fn-label { font-weight: 700; color: var(--ink); } .fn-confirmed { color: var(--confirmed); } .fn-probable { color: var(--probable); } .fn-possible { color: var(--candidate); }
.fn-family_story { color: var(--story); } .fn-open_question { color: var(--open); } .fn-inference { color: var(--clay-ink); font-style: italic; } .fn-setting { color: #2c4a6b; }
.fn-src { color: var(--muted); font-size: .92em; } .fn-back { text-decoration: none; margin-left: .2rem; color: var(--muted); }
.the-book .story-block > ol.footnotes { text-indent: 0; }
@media print { sup.fn a { color: #000; } ol.footnotes { color: #000; } .fn-back { display: none; } ol.footnotes::before { background: #999; } }
.title-page .title-icon { display: block; margin: 0 auto .3rem; }
/* Recent changes (/changes): columns sized to what they hold, words kept whole (every page is this wide now) */
table.changes { table-layout: fixed; width: 100%; min-width: 860px; }
table.changes col.c-id { width: 4.5rem; } table.changes col.c-when { width: 10.5rem; } table.changes col.c-who { width: 14rem; }
table.changes col.c-what { width: 29%; } table.changes col.c-undo { width: 5.5rem; }
table.changes td, table.changes th { overflow-wrap: break-word; word-break: normal; hyphens: manual; }
table.changes table.diff td, table.changes table.diff th { overflow-wrap: break-word !important; }
table.changes td.ts { white-space: nowrap; }
table.changes .summary { margin-top: .2rem; }
table.changes table.diff { table-layout: auto; width: 100%; margin: .2rem 0; font-size: .82rem; }
table.changes table.diff th { white-space: nowrap; width: 1%; font: 600 .78rem var(--sans); color: var(--muted); text-transform: none; letter-spacing: 0; }
table.changes table.diff td { overflow-wrap: break-word; word-break: normal; min-width: 3.5rem; }   /* short values stay whole; only a long one (an address, a JSON blob) wraps */
table.changes table.diff td.old { color: #8a3b30; }
table.changes details summary { cursor: pointer; }
@media (max-width: 760px) { table.changes { min-width: 0; } }
/* the fact page (/fact/{id}) */
.fact-page { max-width: 980px; margin: 0 auto; }
.fact-page .fact-line { font-size: 1.1rem; margin: .2rem 0 .4rem; }
.fact-jump { margin: .6rem 0 1rem; padding: .45rem .7rem; background: var(--card); border: 1px solid var(--rule); border-radius: 6px; font-family: var(--sans); }
.fact-open { border-left: 3px solid var(--gold); } .fact-open h2 { margin-top: 0; font-size: 1.1rem; }
.evidence-list { padding-left: 1.3rem; } .evidence-list li { margin: .7rem 0; } .evidence-list li > div { display: inline-block; vertical-align: top; max-width: calc(100% - 140px); }
.ev-thumb { display: inline-block; margin: 0 .8rem .3rem 0; vertical-align: top; } .ev-thumb img { width: 120px; height: auto; border: 1px solid var(--rule); border-radius: 4px; }
.evidence-list blockquote { margin: .3rem 0; padding-left: .6rem; border-left: 2px solid var(--gold); color: #4a443c; }
.fact-page .proposal { margin: .8rem 0; } .fact-page .proposal.status-accepted { border-left: 3px solid var(--confirmed); }
.fact-page .proposal.status-superseded, .fact-page .proposal.status-withdrawn, .fact-page .proposal.status-rejected { opacity: .8; }
.review-line { margin: .2rem 0; }
.fact-history { list-style: none; padding: 0; font: .9rem/1.45 var(--sans); } .fact-history li { padding: .35rem 0; border-bottom: 1px solid #efe8da; }
/* choosing what kind of post: buttons, not a drop-down */
.kind-pick { border: 0; padding: 0; margin: .3rem 0 .6rem; display: flex; flex-wrap: wrap; gap: .4rem; } .kind-pick legend { font: 600 .85rem var(--sans); margin-bottom: .3rem; padding: 0; }
.kind-opt { display: inline-flex; margin: 0; cursor: pointer; } .kind-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.kind-opt span { display: inline-flex; flex-direction: column; padding: .35rem .7rem; border: 1px solid var(--rule); border-radius: 8px; background: var(--card); font: 600 .88rem/1.2 var(--sans); color: var(--ink); }
.kind-opt small { font-weight: 400; color: var(--muted); font-size: .75rem; }
.kind-opt input:checked + span { border-color: var(--pine); box-shadow: inset 0 0 0 1px var(--pine); background: #eef3ee; }
.kind-opt input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
/* person page: a fact's talk and sources are links to its page */
.fact-links { font: .82rem/1.5 var(--sans); margin-top: .25rem; } .fact-links a { white-space: nowrap; }
.talk-list { list-style: none; padding: 0; margin: .4rem 0 1.2rem; } .talk-list > li { padding: .5rem .7rem; margin: .4rem 0; background: var(--card); border: 1px solid var(--rule); border-left: 3px solid var(--rule); border-radius: 6px; }
.talk-list > li.talk-agree { border-left-color: var(--confirmed); } .talk-list > li.talk-disagree, .talk-list > li.talk-rejected { border-left-color: var(--open); } .talk-list > li.talk-proposal { border-left-color: var(--gold); }
.talk-list p { margin: .1rem 0; } .talk-mark { font-weight: 700; margin-right: .2rem; }
/* the Color section of a person page (#details) */
.color .detail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); gap: .8rem; margin: .6rem 0 1rem; }
.color .detail-kind { background: var(--card); border: 1px solid var(--rule); border-top: 3px solid var(--gold); border-radius: 8px; padding: .6rem .8rem; }
.color .detail-kind h3 { margin: 0 0 .4rem; font-size: .95rem; } .color .detail { padding: .35rem 0; border-bottom: 1px solid #efe8da; } .color .detail:last-child { border-bottom: 0; }
.color .detail-title { margin: 0; } .color .detail-links { margin: .2rem 0 0; color: var(--muted); }
.color blockquote { margin: .3rem 0; padding-left: .6rem; border-left: 2px solid var(--gold); color: #4a443c; }
.color-sources { margin: .6rem 0 1rem; } .color-sources summary { cursor: pointer; font: 600 .9rem var(--sans); color: var(--pine); }
/* the short-story brief */
.brief-form { margin: .8rem 0; padding: .6rem .8rem; border: 1px solid var(--rule); border-left: 3px solid var(--gold); border-radius: 6px; background: #fbf6ea; }
.brief-form summary { cursor: pointer; } .scene-row { display: grid; grid-template-columns: 2fr 1fr 3fr; gap: .4rem; margin: .3rem 0; } .scene-row input { margin: 0; }
.story-hook { font: italic 1.2rem/1.5 var(--display); color: var(--pine); margin: .4rem 0 1rem; }
.story-open { margin-top: 1.4rem; padding-top: .7rem; border-top: 1px solid var(--rule); font-style: italic; }
.story-question { background: #fbf6ea; border-left: 3px solid var(--gold); padding: .5rem .7rem; border-radius: 4px; font: .95rem var(--sans); }
.scorecard li { list-style: none; } .scorecard ul { padding-left: .3rem; } .scorecard li.todo { color: var(--muted); } .scorecard li.ok strong { color: var(--confirmed); }
@media (max-width: 640px) { .scene-row { grid-template-columns: 1fr; } }

/* site review, 30 Nov 2026: skip link, hidden labels, grouped navigation */
.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: .5rem; top: -3rem; z-index: 100; padding: .4rem .8rem; background: var(--lamp); color: var(--ink); border-radius: 4px; font: 600 .9rem var(--sans); }
.skip-link:focus { top: .5rem; }
main:focus { outline: none; }
header.site nav .nav-group { display: inline-flex; gap: .9rem; padding-right: .9rem; border-right: 1px solid rgba(255, 253, 248, .25); }
header.site nav .nav-group:last-child { border-right: 0; padding-right: 0; }
@media (max-width: 720px) { header.site nav .nav-group { gap: .6rem; padding-right: .6rem; } }
/* the proposal, place and family pages; merging; loose pictures; search */
.provenance { background: #fbf6ea; border-left: 3px solid var(--gold); padding: .35rem .6rem; border-radius: 4px; }
.family-partners { display: flex; flex-wrap: wrap; gap: .4rem 2rem; font-size: 1.1rem; margin: .4rem 0 1rem; } .family-partners p { margin: 0; }
.merge-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0; } .merge-compare h3 { margin-top: .2rem; }
.loose-list { list-style: none; padding: 0; } .loose-list > li { display: flex; gap: .8rem; align-items: flex-start; }
.loose-list .ev-thumb img { width: 110px; height: auto; border-radius: 4px; }
.tag-suggestion { display: inline-flex; align-items: center; gap: .3rem; margin: 0 .8rem .3rem 0; }
.search-tabs { margin: .6rem 0 1rem; } .search-group h2 { margin-bottom: .3rem; } .results .snippet { color: #4a443c; font-size: .9rem; }
.search-go { list-style: none; padding: .6rem .9rem; margin: 0 0 1rem; background: #f3efe6; border-left: 3px solid #C9973F; border-radius: 4px; } .search-go li + li { margin-top: .3rem; }
.batch-review { border-left: 3px solid var(--gold); } .batch-tick { display: block; margin: 0 0 .3rem; }
.living-choice { border: 1px solid var(--rule); border-radius: 6px; padding: .4rem .7rem; } .living-choice legend { font-weight: 600; }
.pager a, .pager strong { margin-right: .4rem; }
.removed-page dl.meta { margin: .8rem 0; }
/* history tables on a phone: each change stacks under its row instead of scrolling sideways */
@media (max-width: 640px) {
  table.changes, table.changes tbody, table.changes tr, table.changes td { display: block; width: auto; }
  table.changes thead, table.changes colgroup { display: none; }
  table.changes tr { border-bottom: 1px solid var(--rule); padding: .5rem 0; }
  table.changes td { border: 0; padding: .15rem 0; }
  .merge-compare { grid-template-columns: 1fr; }
}
form label.pic-choice { display: flex; margin: .4rem 0; } form label.pic-choice input { flex: none; width: auto; }
.cite-thumb { flex: none; width: 60px; height: auto; vertical-align: middle; border-radius: 3px; margin: 0 .3rem; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: .7rem; margin: .5rem 0; }
.check-card h3 { margin: 0 0 .3rem; } .check-card .n { float: right; font: 600 .9rem var(--sans); color: var(--pine); } .check-card ul { margin: 0; padding-left: 1rem; }

/* Record quality for a fact (GEDCOM QUAY; quality_chip): outlined, so it never reads as a fact's confidence label. */
.qchip { display: inline-block; font: 600 .68rem/1.45 var(--sans); padding: 0 .4rem; border-radius: 3px; border: 1px solid currentColor; white-space: nowrap; background: transparent; }
.qchip-3 { color: #2f5d44; } .qchip-2 { color: #5b6b3a; } .qchip-1 { color: #8a5a1e; } .qchip-0 { color: #8f2f2f; }
/* Form hints and the GEDCOM tag beside a field (Cite form). */
form .hint { display: block; font: .82rem/1.45 var(--sans); color: var(--muted); margin: .15rem 0 .3rem; font-weight: normal; }
p.hint { margin: .2rem 0 .5rem; }
.gtag { font: 600 .62rem/1.4 ui-monospace, Menlo, monospace; color: var(--muted); border: 1px solid var(--rule); border-radius: 3px; padding: 0 .3rem; margin-left: .3rem; vertical-align: middle; white-space: nowrap; font-weight: normal; }
.alt-fact { font: .75rem/1.4 var(--sans); color: var(--muted); }
.alt-fact.preferred { color: var(--pine, #2f6b4f); }

/* The map of every place (/places, Maps::placesSvg): dots sized by events, linked to the place page. */
.places-map .map-dot { fill: var(--pine); fill-opacity: .72; stroke: #fff; stroke-width: 1.2; }
.places-map a.map-place:hover .map-dot, .places-map a.map-place:focus .map-dot { fill: var(--clay); fill-opacity: 1; }
.places-map .map-label { font: 10px var(--sans); fill: #2b2620; paint-order: stroke; stroke: #f7f3ea; stroke-width: 3px; pointer-events: none; }

/* The street map on a place page (public/assets/map/placemap.js, VB\StreetMaps). */
.street-map-wrap { margin: 1rem 0 1.4rem; }
.street-map { height: 420px; border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; background: #eef0ea; }
@media (max-width: 640px) { .street-map { height: 320px; } }
@media print { .street-map-wrap { display: none; } }

/* The Stories list (/stories). */
.stories-list td:first-child { min-width: 16rem; }
.street-map-big { height: 600px; }
@media (max-width: 640px) { .street-map-big { height: 420px; } }
.map-jumps { display: flex; gap: .4rem; flex-wrap: wrap; margin: .8rem 0 .4rem; }

/* Family lines: a stripe color on tree cards and chart dots, always with the line named in the legend. */
.line-vonderbrink { --line-c: #2f6b4f; } .line-rumpke { --line-c: #9A4A26; } .line-schmeing { --line-c: #2c5d8f; }
.line-deyhle { --line-c: #8a6d1d; } .line-griffin { --line-c: #6b4c8a; } .line-mccauley { --line-c: #3f7f86; } .line-wielonski { --line-c: #8f3b55; }

/* The explorable family tree (/family-tree, public/assets/familytree.js). */
.family-tree { position: relative; height: 72vh; min-height: 460px; overflow: hidden; border: 1px solid var(--rule); border-radius: 8px;
  background: #fbf8f1; cursor: grab; touch-action: none; user-select: none; }
.family-tree.ft-dragging { cursor: grabbing; }
.family-tree.ft-loading .ft-stage { opacity: .5; transition: opacity .2s; }
.ft-stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.ft-lines { position: absolute; overflow: visible; pointer-events: none; }
.ft-lines path { fill: none; stroke: #b9ab94; stroke-width: 1.5; }
.ft-card { position: absolute; width: 172px; height: 64px; box-sizing: border-box; display: flex; align-items: center; gap: .45rem;
  padding: .35rem .5rem .35rem .65rem; background: #fff; border: 1px solid #d9ccb8; border-left: 5px solid var(--line-c, #c9c2b6);
  border-radius: 6px; box-shadow: 0 1px 2px rgba(0,0,0,.06); cursor: pointer; font: .78rem/1.25 var(--sans); }
.ft-card:hover, .ft-card:focus { border-color: var(--pine); outline: none; box-shadow: 0 0 0 2px rgba(23,63,44,.25); }
.ft-card.ft-focus { background: #f3efe3; border-color: var(--pine); border-width: 2px 2px 2px 6px; cursor: default; }
.ft-card.ft-partner { background: #fffdf8; }
.ft-card.ft-candidate { border-style: dashed; border-left-style: solid; }
.ft-photo { width: 40px; height: 48px; object-fit: cover; border-radius: 3px; flex: none; }
.ft-text { min-width: 0; flex: 1; }
.ft-name { font-weight: 600; color: var(--ink); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ft-years { color: var(--muted); font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ft-open { position: absolute; right: 4px; top: 2px; font-size: .8rem; text-decoration: none; color: var(--muted); padding: 0 .2rem; }
.ft-open:hover { color: var(--pine); }
.ft-more { position: absolute; left: 50%; transform: translateX(-50%); font-size: .6rem; color: var(--muted); }
.ft-more-up { top: -12px; } .ft-more-down { bottom: -12px; }
.ft-toolbar { display: flex; flex-wrap: wrap; gap: .5rem .8rem; align-items: center; margin: .6rem 0; font: .85rem var(--sans); }
.ft-group { display: inline-flex; gap: .2rem; align-items: center; }
.ft-search { position: relative; }
.ft-search input { width: 15rem; margin: 0; }
.ft-found { position: absolute; z-index: 5; left: 0; top: 100%; margin: 2px 0 0; padding: 0; list-style: none; background: #fff; min-width: 100%;
  border: 1px solid var(--rule); border-radius: 6px; box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.ft-found:empty { display: none; }
.ft-found li { padding: .3rem .6rem; }
.ft-legend { display: flex; flex-wrap: wrap; gap: .3rem .9rem; align-items: center; }
.ft-key { display: inline-flex; align-items: center; gap: .3rem; }
.ft-key::before { content: ""; width: 12px; height: 12px; border-radius: 2px; background: var(--line-c, #c9c2b6); }
.ft-key.ft-candidate::before { background: #fff; border: 1px dashed #8d8577; }
@media print { .family-tree { height: auto; } }

/* All our ancestors (/ancestors): a wide chart that scrolls sideways. */
.ancestors-chart { overflow: auto; max-height: 80vh; border: 1px solid var(--rule); border-radius: 8px; background: #fff; }
.ancestors-chart svg { display: block; font: 12px var(--sans); }
.ancestors-chart .ac-gen { font: 600 10px var(--sans); fill: #6b6358; text-transform: uppercase; letter-spacing: .05em; }
.ancestors-chart .ac-link { fill: none; stroke: #d2c6b2; stroke-width: 1; }
.ancestors-chart .ac-person circle { fill: var(--line-c, #c9c2b6); }
.ancestors-chart .ac-person text { fill: var(--ink); }
.ancestors-chart .ac-person:hover text, .ancestors-chart .ac-person:focus text { fill: var(--pine); text-decoration: underline; }
.ancestors-chart .ac-years { fill: var(--muted); font-size: 10px; }

/* Notifications (/notifications). */
.notification-list li.unread { border-left: 3px solid var(--clay); padding-left: .6rem; }
.muted-list li { opacity: .75; }

/* A Research Desk tab's own small menu (desk_subtabs) and the trail back (desk_crumbs). */
.desk-subtabs { display: flex; gap: .2rem 1rem; flex-wrap: wrap; font: .85rem var(--sans); margin: -.2rem 0 .8rem; }
.desk-subtabs a { color: var(--muted); text-decoration: none; padding: .15rem 0; border-bottom: 2px solid transparent; }
.desk-subtabs a.on { color: var(--pine); border-bottom-color: var(--gold); font-weight: 600; }
.desk-crumbs { font: .82rem var(--sans); color: var(--muted); margin: .2rem 0 .6rem; }

/* A proposal's item discussion on the review queue (templates/proposal_card.php). */
.proposal-talk { margin-top: .6rem; border-top: 1px dashed var(--rule); padding-top: .4rem; }
.proposal-talk .talk-item { margin: .35rem 0; }
.review-help { margin: .4rem 0 0; }

/* GEDCOM details on a person page (person_gedcom.php), a family's child links, shared notes */
button.linkish { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; }
ul.ties { padding-left: 1.2em; }
ul.ties li { margin: .2em 0; }
li.name-tran { list-style: circle; margin-left: 1.2em; }
.link-status { font-size: .85em; font-weight: 600; }
.link-challenged { color: #8a5a00; }
.link-disproven { color: #8b2a1d; text-decoration: line-through; }
.link-proven { color: #2f5e3a; }
.shared-note { border-left: 3px solid #C9973F; padding-left: .8em; }

/* the Site tab: filters, thread rows, closed threads folded */
.site-filters { display: flex; flex-wrap: wrap; gap: .5em .8em; align-items: center; }
.site-threads li { margin: .35em 0; }
details.site-closed { margin: .6em 0 1em; }
details.site-closed > summary { cursor: pointer; color: #5b665f; }

/* the Stories page (stories.php): search row, chips, On this day, the feed of cards, the table's sortable headings */
.stories-intro .button { margin-left: .6em; }
.story-search { display: flex; flex-wrap: wrap; gap: .5em .8em; align-items: center; }
.story-search .story-q { flex: 1 1 18em; min-width: 14em; }
.story-chips { display: flex; flex-wrap: wrap; gap: .4em .8em; align-items: center; }
.story-chips .view-switch { margin-left: auto; display: inline-flex; gap: 0; border: 1px solid #c9c2ae; border-radius: 999px; overflow: hidden; }
.story-chips .view-switch a { padding: .15em .8em; text-decoration: none; }
.story-chips .view-switch a.on { background: #173F2C; color: #F7F1E3; }
.on-this-day { margin: 1em 0 1.4em; }
.on-this-day h2 { margin-bottom: .4em; }
.otd-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(15em, 1fr)); gap: .7em; }
.otd-card { display: block; padding: .7em .9em; border-radius: 8px; background: #fffaf0; border: 1px solid #e3d6b4; border-left: 4px solid #C9973F; text-decoration: none; color: inherit; }
.otd-card:hover strong { text-decoration: underline; }
.otd-when { display: block; font-size: .85em; color: #6b5a2e; margin-bottom: .2em; }
.story-feed { display: grid; gap: 1em; }
.story-card { display: flex; gap: 1em; align-items: flex-start; padding: .9em 0; border-bottom: 1px solid #e6dfcc; }
.story-card .story-pic img { width: 120px; height: 120px; object-fit: cover; border-radius: 6px; }
.story-card h3 { margin: 0 0 .3em; font-size: 1.15em; }
.story-card p { margin: .2em 0; }
.stories-list th a { color: inherit; text-decoration: none; white-space: nowrap; }
.stories-list th a:hover { text-decoration: underline; }
@media (max-width: 600px) { .story-card .story-pic img { width: 72px; height: 72px; } }
.story-byline { font-size: 1.05em; color: #4a564e; margin: -.3em 0 .4em; }
table.stories-list th, table.stories-list td { overflow-wrap: normal; word-break: normal; }
table.stories-list td:nth-child(1) { min-width: 14em; }
table.stories-list td:nth-child(2), table.stories-list td:nth-child(3) { min-width: 5.5em; }
table.stories-list td:nth-child(4) { min-width: 12em; }
table.stories-list td:nth-child(6) { max-width: 11em; }
table.stories-list a { overflow-wrap: normal; word-break: normal; }

/* A table wider than the page scrolls sideways inside .table-wrap: keep its scroll bar visible (macOS hides it until
   scrolling, so nobody knew there was more), with a soft edge on the side that has more. */
.table-wrap::-webkit-scrollbar { height: 10px; }
.table-wrap::-webkit-scrollbar-track { background: #efe8d6; border-radius: 5px; }
.table-wrap::-webkit-scrollbar-thumb { background: #b9ad8e; border-radius: 5px; }
.table-wrap::-webkit-scrollbar-thumb:hover { background: #8f8364; }
.people-pick input { display: block; margin: .3em 0; }
.people-pick { border: 0; padding: 0; margin: .8em 0; }
.invite-card { margin-top: 1em; }
table.stories-list td:last-child { white-space: nowrap; }

/* Type-to-filter fields (app.js picker, partials.php pick()): the list under the field, name tags for several */
.pick-wrap { position: relative; display: block; }
.pick-menu { position: absolute; z-index: 50; left: 0; right: 0; top: 100%; margin: 2px 0 0; padding: .2rem 0; list-style: none;
  background: #fffdf7; border: 1px solid #c9c2ae; border-radius: 6px; box-shadow: 0 6px 18px rgba(34, 49, 42, .18); max-height: 18rem; overflow-y: auto; }
.pick-menu li { display: flex; align-items: center; gap: .5rem; padding: .35rem .6rem; cursor: pointer; line-height: 1.3; }
.pick-menu li.on, .pick-menu li:hover { background: #efe6cf; }
.pick-menu img { width: 36px; height: 36px; object-fit: cover; border-radius: 3px; flex: none; }
.pick-menu .pick-label { flex: 1 1 auto; }
.pick-menu .pick-sub { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.pick-tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .3rem; }
.pick-tags:empty { display: none; }
.pick-tag { display: inline-flex; align-items: center; gap: .2rem; padding: .1rem .2rem .1rem .55rem; background: #173F2C; color: #F7F1E3; border-radius: 999px; font-size: .85rem; }
.pick-tag button { background: none; border: 0; color: inherit; font-size: 1rem; line-height: 1; padding: 0 .3rem; cursor: pointer; }
/* the search boxes' matches as you type (header, /search): wide enough for a name, its kind on a second line */
.pick-quick .pick-menu { right: auto; width: min(26rem, 92vw); max-height: 28rem; color: var(--ink); text-align: left; font-family: var(--sans); font-size: .95rem; }
.pick-quick .pick-menu li { display: grid; grid-template-columns: auto 1fr; column-gap: .5rem; row-gap: 0; }
.pick-quick .pick-menu img { grid-row: span 2; }
.pick-quick .pick-menu .pick-label, .pick-quick .pick-menu .pick-sub { grid-column: -2; white-space: normal; }
.pick-quick .pick-menu li:last-child { border-top: 1px solid var(--rule); }
.pick-menu li.pick-none { color: var(--muted); font-style: italic; cursor: default; } .pick-menu li.pick-none:hover { background: none; }

/* Voyages (voyage.php, voyages.php, ship.php): the ship and route card, each passenger's line on the list */
.row3-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 0 .8rem; }
.voyage-top { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: flex-start; margin: 1rem 0; }
.voyage-top .voyage-ship-pic { flex: 0 1 18rem; }
.voyage-top .voyage-facts { flex: 1 1 18rem; margin: 0; }
.voyage-sea { border-left: 3px solid #7a3b1d; padding: .3rem .8rem; margin: 1rem 0; background: #fbf6ea; }
.voyage-sea h3 { margin: 0 0 .3rem; font-size: 1rem; }
.passenger { border-bottom: 1px solid var(--rule); padding: .5rem 0; }
.passenger p { margin: .15rem 0; }
.manifest-line { color: #4a443c; }
.voyages-find li { margin: .35rem 0; }
.ship-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .7rem; }
.ship-card { border: 1px solid var(--rule); border-radius: 6px; padding: .6rem .8rem; background: #fffdf7; }

/* Every page uses the full width, as Recent changes does (Tom, 30 Nov 2026): tables and forms get the room. Kept
   narrow on purpose: running text meant to be read (the book, a chapter, a story, the guides, Help, About: long lines
   are hard to read), and the one-box pages (sign-in, password, setup, an invitation link, an error, a shared preview). */
section.narrow, section.narrow.wide-ok, .wide-form, .person, .artifact-page, .book.wide-page { max-width: none; }
section.narrow.card, section.narrow.login-page, section.narrow.draft-page, section.narrow.consent, section.narrow.share-page { max-width: 640px; }
.add-voyage { margin: .8rem 0 1rem; }

/* the voyage map's pop-ups: a list reads from the left */
#voyages-street-map .maplibregl-popup-content { text-align: left; } #voyages-street-map .maplibregl-popup-content ul { margin: .3rem 0 0; padding-left: 1.1rem; }

/* the review page (story_preview.php): how it works, what changed since the review, a change still waiting */
.review-how ol { margin: .4rem 0 .4rem 1.2rem; } .review-how li { margin: .2rem 0; }
.review-changes { border-left: 4px solid #C9973F; }
.waiting-change { border-left: 4px solid #7a3b1d; }

/* the data-quality scorecard on the Research Desk (templates/desk.php, VB\Quality) and the second-look list (review.php) */
.quality-card { margin: 0 0 1rem; }
.quality-table { width: 100%; border-collapse: collapse; margin: .4rem 0; }
.quality-table th, .quality-table td { padding: .3rem .5rem; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.quality-table .num { text-align: right; white-space: nowrap; }
.quality-table tr.over td { background: #fbf3e2; }
.second-look-form { display: inline-flex; gap: .4rem; align-items: center; flex-wrap: wrap; margin-left: .4rem; }
/* weighing a record beside its citation on the fact page (templates/fact.php, VB\Evidence) */
.weigh-form { display: inline-flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.weigh-form select { width: auto; max-width: 17rem; }

/* "How good is the record" on the Overview (templates/overview_quality.php, VB\QualityCharts, VB\Metrics) */
svg.viz .o3 { fill: #163d2b; } svg.viz .o2 { fill: #2f6b4f; } svg.viz .o1 { fill: #4f8f6e; } svg.viz .o0 { fill: #8fbea3; } svg.viz .o-none { fill: #d8d2c4; }
svg.viz .s-family { fill: #2a78d6; } svg.viz .s-agents { fill: #eb6834; } svg.viz .s-jobs { fill: #1baf7a; }
svg.viz .axis { stroke: #cfc7b6; stroke-width: 1; } svg.viz .ref { stroke: #6f675d; stroke-width: 1.25; stroke-dasharray: 5 4; }
svg.viz .line { fill: none; stroke: #2f6b4f; stroke-width: 2; stroke-linejoin: round; } svg.viz .dot { fill: #2f6b4f; stroke: #fffdf8; stroke-width: 2; }
svg.viz .dot-quiet { fill: #8fbea3; } svg.viz-small { margin: .2rem 0; }
.overview-wide { max-width: none; }
.dq-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .8rem; margin: .8rem 0 1.2rem; }
.dq-tile { background: var(--card); border: 1px solid var(--rule); border-radius: 8px; padding: .7rem .9rem; }
.dq-tile .n { font-family: var(--display); font-size: 1.9rem; line-height: 1.1; color: var(--ink); }
.dq-tile .k { font-size: .85rem; color: var(--ink); } .dq-tile .d { font-size: .8rem; color: var(--muted); }
.dq-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 1rem 2rem; align-items: start; }
.dq-trends { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: .6rem 1.2rem; }
.dq-trends figure { margin: 0; } .dq-trends figcaption { font-size: .85rem; }
table.dq { width: 100%; border-collapse: collapse; font-size: .9rem; margin: .4rem 0 1rem; }
table.dq th, table.dq td { padding: .3rem .5rem; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
table.dq .num { text-align: right; white-space: nowrap; } table.dq tr.over td { background: #fbf3e2; }
table.dq td.heat-0 { background: #f4efe4; color: #8a8273; } table.dq td.heat-1 { background: #e3eee6; } table.dq td.heat-2 { background: #c5dccd; }
table.dq td.heat-3 { background: #8fbea3; } table.dq td.heat-4 { background: #2f6b4f; color: #fff; }
.dq-status { font-size: .8rem; padding: .05rem .45rem; border-radius: 9px; background: #efe6cf; white-space: nowrap; }
.dq-status.met, .dq-status.on-track { background: #dbe9df; color: #1f4a35; } .dq-status.behind { background: #f6e0d3; color: #8a3a16; }
.dq-chart-wide { max-width: 760px; }

/* One click to settle (1 Dec 2026): folded threads, a thread's proposals, ready checks, check marks */
.comment-fold { margin: .4rem 0; border-left: 3px solid var(--line, #ddd); padding-left: .6rem; }
.comment-fold > summary { cursor: pointer; list-style-position: inside; }
.comment-fold[open] > summary { margin-bottom: .4rem; }
.thread-proposals .one-click { margin-top: .6rem; }
.thread-proposals .one-click button { margin-right: .4rem; }
.ready-note { margin: .4rem 0; }
.mark-check { display: inline; margin-left: .4rem; }
.mark-check > summary { display: inline; cursor: pointer; color: var(--muted, #666); font-size: .85em; }
.open-threads ul { margin: .3rem 0 0; }

/* "Note:" before a fact's note, on the same line as its first paragraph */
.fact-note > strong:first-child + p, .note > strong:first-child + p { display: inline; }

/* Rules and terms (docs/RULES.md): the agent prompt, the Confidence dropdown, the evidence questions */
pre.agent-prompt { white-space: pre-wrap; max-height: 28rem; }
.conf-form { display: inline-flex; flex-wrap: wrap; gap: .3rem; align-items: center; margin: 0; }
.conf-form select.conf-select { font: inherit; font-size: .78rem; padding: .1rem .3rem; border-radius: 999px; cursor: pointer; }
.conf-sug { color: var(--muted, #6b6255); font-style: italic; }
button.linkish { background: none; border: 0; padding: 0; color: var(--link, #2f5d8a); text-decoration: underline; cursor: pointer; font: inherit; font-size: .8rem; }
.evidence-form { display: flex; flex-wrap: wrap; gap: .4rem .6rem; align-items: flex-end; margin: .3rem 0; }
.evidence-form .ev-q, .evidence-answers .ev-q { display: inline-flex; flex-direction: column; font-size: .75rem; color: var(--muted, #6b6255); }
.evidence-form .ev-q select, .evidence-answers .ev-q select { font-size: .8rem; }
.evidence-form > div.small { flex-basis: 100%; }
.evidence-form.is-suggested select { border-style: dashed; }
.evidence-answers { border-top: 1px solid var(--rule, #ddd); margin-top: .6rem; padding-top: .4rem; }
.evidence-answers .ev-row { display: flex; flex-wrap: wrap; gap: .4rem .6rem; align-items: flex-end; margin: .3rem 0; }
.evidence-answers .ev-src { flex-basis: 100%; font-weight: 600; }
.conf-select option { color: #222; background: #fff; }
.evidence-form select, .evidence-answers select, .conf-form select { width: auto; max-width: 17rem; min-width: 0; }
.evidence-form button, .conf-form button { width: auto; }
.evidence-form .ev-q span, .evidence-answers .ev-q span { margin-bottom: .1rem; }
.evidence-form select, .evidence-answers select { font-size: .82rem; padding: .2rem .35rem; margin-top: .1rem; }
.conf-form select.conf-select { display: inline-block; margin-top: 0; }

/* One entry's review (templates/review_entry.php, docs/RULES.md "How a review works") */
.review-entry { max-width: 64rem; }
.rv-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; margin-bottom: 1rem; }
.rv-title { font-size: 1.5rem; margin: .1rem 0; }
.rv-lbl { display: block; font: .72rem var(--sans); color: var(--muted, #6b6255); letter-spacing: .03em; margin-bottom: .2rem; }
.rv-conf { text-align: right; white-space: nowrap; }
.rv-rules { background: #e8eef5; border-radius: 6px; padding: .6rem .8rem; margin-bottom: 1rem; font-family: var(--sans); }
.rv-rules.is-corroborated { background: #e4efe4; }
.rv-sec { font: 600 .78rem var(--sans); letter-spacing: .05em; text-transform: uppercase; color: var(--muted, #6b6255); margin: 1.2rem 0 .5rem; }
.rv-item { border: 1px solid var(--rule); border-left: 4px solid var(--rule); background: #fff; padding: .6rem .8rem; margin-bottom: .6rem; font-family: var(--sans); }
.rv-item.kind-conflict { border-left-color: #b4483c; } .rv-item.kind-question { border-left-color: #3f6385; } .rv-item.kind-task { border-left-color: #b9851a; }
.rv-item.kind-proposal { border-left-color: #2f6b3a; } .rv-item.kind-check { border-left-color: #9a958b; } .rv-item.kind-note { border-left-color: #c9c2b6; }
.rv-item-head { display: flex; justify-content: space-between; gap: .8rem; flex-wrap: wrap; }
.rv-mark { font-size: .72rem; color: #2f6b3a; margin: 0 .3rem; white-space: nowrap; }
.rv-body { margin-top: .3rem; color: #3e3a33; } .rv-body p { margin: .2rem 0; }
.rv-status { display: flex; justify-content: flex-end; gap: .4rem; align-items: center; margin-top: .4rem; }
.rv-status select { width: auto; display: inline-block; margin: 0; font-size: .82rem; padding: .2rem .4rem; }
.rv-resolve { border-top: 2px solid var(--rule); margin-top: 1rem; padding-top: .4rem; }
.rv-resolve-grid { display: grid; grid-template-columns: 12rem 1fr; gap: 1rem; align-items: start; }
.rv-actions { display: flex; justify-content: flex-end; gap: 1rem; align-items: center; margin-top: .8rem; }
@media (max-width: 640px) { .rv-head { flex-direction: column; } .rv-conf { text-align: left; } .rv-resolve-grid { grid-template-columns: 1fr; } }

/* The review card (templates/review_card.php): one visual language for each kind of data */
.rc { background: #fff; border: 1px solid var(--rule); border-radius: 12px; padding: 1.1rem 1.25rem; font-family: var(--sans); font-size: .92rem; line-height: 1.5; }
.rc a[data-modal], .rc .rc-name { color: var(--link, #2f5d8a); }
.rc-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; margin-bottom: 1rem; }
.rc-title { font: 600 1.35rem/1.25 var(--serif); margin: .1rem 0 0; }
.rc-lbl { display: block; font-size: .72rem; color: #6b6255; letter-spacing: .03em; margin-bottom: .2rem; }
.rc-conf { text-align: right; white-space: nowrap; } .rc-arrow { color: #6b6255; } .rc-links { font-size: .78rem; margin-top: .35rem; }
.rc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .8rem; margin-bottom: .8rem; }
.rc-box { border: 1px solid var(--rule); border-radius: 8px; padding: .7rem .85rem; background: #fff; }
.rc-records { margin-bottom: .8rem; }
.rc-sec { font: 600 .72rem var(--sans); letter-spacing: .06em; text-transform: uppercase; color: #6b6255; margin: 1rem 0 .5rem; }
.rc-box .rc-sec { margin-top: 0; }
.rc-name { font-weight: 600; } .rc-sub { color: #6b6255; font-size: .82rem; } .rc-ev { color: #6b6255; font-size: .74rem; }
.rc-tbl { width: 100%; border-collapse: collapse; font-size: .85rem; margin-top: .4rem; }
.rc-tbl th { text-align: left; font-weight: 400; color: #6b6255; width: 6.5rem; padding: .3rem 0; border-top: 1px solid var(--rule); vertical-align: top; }
.rc-tbl td { padding: .3rem 0; border-top: 1px solid var(--rule); vertical-align: top; }
.rc-facts td:first-child { width: 34%; } .rc-r { text-align: right; } tr.is-here td { background: #fbf3dd; }
.rc-more { display: inline-block; font-size: .8rem; margin-top: .3rem; }
.rc-rec { display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; gap: .7rem; align-items: center; padding: .45rem 0; border-top: 1px solid var(--rule); }
.rc-rec:first-of-type { border-top: 0; }
.rc-thumb { display: block; width: 88px; height: 64px; border-radius: 6px; overflow: hidden; background: #f1ece2; }
.rc-thumb img { width: 100%; height: 100%; object-fit: cover; border: 0; }
.rc-thumb-none { display: flex; align-items: center; justify-content: center; color: #9a958b; font-size: 1.3rem; }
.rc-also { font-size: .82rem; color: #6b6255; border-top: 1px solid var(--rule); margin: .5rem 0 0; padding-top: .5rem; }
.rc-rules { background: #e8eef5; color: #2c4a6b; border-radius: 8px; padding: .65rem .85rem; margin: .2rem 0 .4rem; }
.rc-rules.is-corroborated { background: #e4efe4; color: #24502c; } .rc-rules div { font-size: .85rem; }
.rc-item { border: 1px solid var(--rule); border-left: 4px solid #c9c2b6; padding: .65rem .85rem; margin-bottom: .6rem; background: #fff; }
.rc-item.kind-conflict { border-left-color: #b4483c; } .rc-item.kind-question { border-left-color: #3f6385; } .rc-item.kind-task { border-left-color: #b9851a; }
.rc-item.kind-proposal { border-left-color: #2f6b3a; } .rc-item.kind-check { border-left-color: #9a958b; }
.rc-item-head { display: flex; justify-content: space-between; gap: .8rem; flex-wrap: wrap; align-items: baseline; }
.rc-who { font-size: .78rem; color: #6b6255; } .rc-via { color: #6b6255; }
.rc-pill { display: inline-block; font: 600 .7rem/1.6 var(--sans); padding: 0 .55rem; border-radius: 999px; margin-right: .3rem; white-space: nowrap; background: #ece7dc; color: #4a443c; }
.pill-conflict { background: #f6dcd8; color: #7a2a20; } .pill-question { background: #dbe6f2; color: #2c4a6b; } .pill-task { background: #f4e6c4; color: #6d4b0a; }
.pill-proposal { background: #dcefdc; color: #1f5a2b; } .pill-check { background: #ece7dc; color: #5f5a50; } .pill-issue { background: #f4e6c4; color: #6d4b0a; }
.rc-mark { font-size: .74rem; color: #2f6b3a; margin-right: .3rem; white-space: nowrap; }
.rc-body { font-size: .85rem; margin-top: .3rem; }
.rc-talk { margin-top: .4rem; } .rc-talk > summary { font-size: .8rem; color: var(--link, #2f5d8a); cursor: pointer; }
.rc-msg { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: .6rem; padding: .55rem 0; border-top: 1px solid var(--rule); }
.rc-av { width: 30px; height: 30px; border-radius: 50%; background: #dbe6f2; color: #2c4a6b; display: flex; align-items: center; justify-content: center; font-size: .7rem; font-weight: 600; }
.rc-av.is-ai { background: #ece7dc; color: #4a443c; }
.rc-text { font-size: .88rem; } .rc-text p { margin: .15rem 0; }
.rc-reply { border-top: 1px solid var(--rule); padding-top: .5rem; margin-top: .2rem; }
.rc-reply textarea { font-size: .88rem; }
.rc-reply-row { display: flex; justify-content: space-between; align-items: center; gap: .6rem; margin-top: .4rem; }
.rc-status { display: flex; justify-content: flex-end; gap: .4rem; align-items: center; margin-top: .45rem; font-size: .78rem; color: #6b6255; }
.rc-status select { width: auto; display: inline-block; margin: 0; font-size: .82rem; padding: .2rem .4rem; }
.rc-earlier > summary { cursor: pointer; } .rc-closed { border: 1px solid var(--rule); border-radius: 6px; background: #faf8f3; padding: .55rem .75rem; margin-bottom: .5rem; }
.rc-resolution { margin: .4rem 0 0; padding: .1rem 0 .1rem .7rem; border-left: 3px solid #2f6b3a; font-size: .85rem; color: #3e3a33; }
.rc-resolve { border-top: 2px solid var(--rule); margin-top: 1rem; }
.rc-resolve-grid { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: 1rem; align-items: start; }
.rc-actions { display: flex; justify-content: space-between; align-items: center; gap: .8rem; margin-top: .8rem; flex-wrap: wrap; }
.rc-open-record { justify-content: flex-start; }
@media (max-width: 700px) { .rc-head { flex-direction: column; } .rc-conf { text-align: left; } .rc-grid, .rc-resolve-grid { grid-template-columns: 1fr; } }

/* The modal: anything a[data-modal] opens over the page (app.js) */
dialog.vb-modal { width: min(64rem, 94vw); max-height: 88vh; border: 1px solid var(--rule); border-radius: 12px; padding: 0; }
dialog.vb-modal::backdrop { background: rgba(30, 26, 20, .45); }
.vb-modal-bar { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center; gap: 1rem; background: #fff; border-bottom: 1px solid var(--rule); padding: .5rem 1rem; font: .82rem var(--sans); z-index: 2; }
.vb-modal-bar button { background: none; border: 0; font-size: 1.3rem; cursor: pointer; color: #4a443c; padding: 0 .3rem; }
.vb-modal-body { padding: 1rem 1.25rem; overflow: auto; }
/* Flag something (templates/flag.php) */
.flag-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 1.2rem; }
.flag-line { font-size: .85rem; padding: .2rem 0; border-top: 1px solid var(--rule); }
.flag-kinds { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; margin-bottom: .8rem; }
.flag-kind { display: flex; gap: .5rem; align-items: flex-start; border: 1px solid var(--rule); border-radius: 8px; padding: .5rem .6rem; cursor: pointer; }
.flag-kind input { width: auto; margin-top: .2rem; } .flag-kind small { display: block; color: #6b6255; font-size: .74rem; }
.flag-kind:has(input:checked) { border: 2px solid var(--link, #2f5d8a); }
.flag-kind.kind-conflict:has(input:checked) { border-color: #b4483c; }
.flag-kind.kind-change { grid-column: 1 / 3; }
.flag-form label { display: block; margin-bottom: .6rem; }
.flag-change-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.flag-warn { background: #f4e6c4; color: #6d4b0a; border-radius: 6px; padding: .5rem .7rem; font-size: .85rem; margin: .4rem 0; }
.flag-form:not(:has(input[value=conflict]:checked)):not(:has(input[value=change]:checked)) .flag-for-conflict { display: none; }
.flag-form:not(:has(input[value=task]:checked)) .flag-for-task { display: none; }
.flag-form:not(:has(input[value=change]:checked)) .flag-for-change { display: none; }
.flag-form:has(input[value=conflict]:checked) .flag-for-change.flag-for-conflict { display: block; }
@media (max-width: 700px) { .flag-grid, .flag-kinds { grid-template-columns: 1fr; } .flag-kind.kind-change { grid-column: auto; } }
/* The review queue (templates/review_queue.php) */
.review-queue { max-width: 72rem; font-family: var(--sans); }
.rq-areas { display: flex; gap: .4rem; margin: .6rem 0 1rem; flex-wrap: wrap; }
.rq-areas a { padding: .35rem .8rem; border: 1px solid var(--rule); border-radius: 999px; text-decoration: none; color: inherit; font-size: .9rem; }
.rq-areas a.on { background: var(--pine, #2f5d4a); color: #fff; border-color: transparent; } .rq-areas .n { opacity: .75; margin-left: .2rem; }
.rq-filters { display: flex; gap: .7rem; flex-wrap: wrap; align-items: flex-end; }
.rq-filters select { width: auto; display: inline-block; margin: 0; }
.rq-note { font-size: .8rem; color: #6b6255; margin: .6rem 0 .2rem; }
.rq-key { font-size: .78rem; margin: .2rem 0 1rem; display: flex; gap: .35rem; flex-wrap: wrap; align-items: center; }
.rq-mk { display: inline-block; font-size: .74rem; color: #4a443c; border: 1px solid var(--rule); border-radius: 999px; padding: 0 .55rem; margin-right: .3rem; white-space: nowrap; }
.rq-groups { margin-bottom: 1rem; font-size: .88rem; } .rq-groups summary { cursor: pointer; color: var(--link, #2f5d8a); }
.rq-row { background: #fff; border: 1px solid var(--rule); border-radius: 12px; margin-bottom: .6rem; overflow: hidden; }
.rq-sum { display: grid; grid-template-columns: 1.2rem minmax(0, 1fr) auto; gap: .8rem; align-items: start; padding: .8rem 1rem; cursor: pointer; list-style: none; }
.rq-sum::-webkit-details-marker { display: none; }
.rq-sum:hover { background: #faf8f3; }
.rq-chev::before { content: '›'; display: inline-block; font-size: 1.3rem; line-height: 1; color: #6b6255; transition: transform .15s; }
.rq-row[open] .rq-chev::before { transform: rotate(90deg); }
.rq-main { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.rq-title { font-weight: 600; font-size: 1rem; color: inherit; text-decoration: none; }
.rq-sub { font-size: .82rem; color: #6b6255; }
.rq-tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .35rem; align-items: center; }
.rq-side { font-size: .8rem; color: #6b6255; text-align: right; white-space: nowrap; }
.rq-card { border-top: 1px solid var(--rule); padding: 1rem; background: #faf8f3; }
.rq-card .rc { border: 0; padding: 0; background: transparent; }
@media (max-width: 640px) { .rq-sum { grid-template-columns: 1rem minmax(0, 1fr); } .rq-side { grid-column: 2; text-align: left; } }
.js form.autosave .autosave-btn { display: none; }
.review-banner { font: .85rem var(--sans); background: #f4f1ea; border: 1px solid var(--rule); border-radius: 8px; padding: .45rem .75rem; }
.review-link { font-family: var(--sans); } .review-link.has-open { font-weight: 600; }
.pill-draft { background: #e6e1f2; color: #4a3a75; } .pill-request { background: #e6e1f2; color: #4a3a75; } .pill-note { background: #ece7dc; color: #4a443c; }
.rc-item.kind-draft, .rc-item.kind-request { border-left-color: #6d5aa8; } .rc-item.kind-issue { border-left-color: #b9851a; }
/* Start here: the three review areas, then Yours */
.start-areas { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; margin: .5rem 0 1.5rem; font-family: var(--sans); }
.start-area h2 { margin: 0; font-size: 1.15rem; } .start-area h2 a { text-decoration: none; } .start-area .n { font-size: .9rem; color: #6b6255; margin-left: .2rem; }
.start-rows { padding-left: 1.1rem; font-size: .88rem; margin: .5rem 0; } .start-rows li { margin: .25rem 0; }
.start-area.area-tree { border-top: 4px solid #2f6b3a; } .start-area.area-book { border-top: 4px solid #6d5aa8; } .start-area.area-site { border-top: 4px solid #b9851a; }
/* The notifications bell beside your name (layout.php): always there; a count when something is unread */
header.site .bell { position: relative; display: inline-flex; align-items: center; color: inherit; text-decoration: none; margin-right: .5rem; vertical-align: middle; }
header.site .bell svg { display: block; }
header.site .bell .bell-count { position: absolute; top: -.45rem; right: -.6rem; min-width: 1.1rem; height: 1.1rem; padding: 0 .25rem; border-radius: 999px;
  background: #c0392b; color: #fff; font: 700 .65rem/1.1rem var(--sans); text-align: center; }
header.site .nav-pair { white-space: nowrap; } header.site .nav-amp { margin: 0 .3rem; opacity: .75; }
.wait-items { margin: 0; padding: .6rem 1rem .4rem 2.6rem; border-top: 1px solid var(--rule); font: .88rem/1.5 var(--sans); background: #faf8f3; }
.wait-items li { margin: .3rem 0; } .wait-more { margin: 0; padding: 0 1rem .7rem 2.6rem; font: .85rem var(--sans); background: #faf8f3; }
/* buttons as links: secondary links look like secondary buttons; on the card a button keeps its own colors */
a.button.secondary { background: #fff; color: var(--pine); border: 1px solid var(--pine); } a.button.secondary:hover { background: #eef3ee; color: var(--pine); }
.rc a.button { color: var(--cream); } .rc a.button.secondary { color: var(--pine); }
.rc-unread { color: #8a5d0c; font-weight: 600; }
.rc-hist { border-top: 1px solid var(--rule); padding: .45rem 0; } .rc-history { margin-top: .4rem; }
.rc-item.is-focus { box-shadow: 0 0 0 2px #2f6b3a; } .proposal-full { font: 600 .78rem var(--sans); letter-spacing: .05em; text-transform: uppercase; color: #6b6255; margin: 1.6rem 0 .5rem; }
.fact-about { margin-top: 1.5rem; }
/* Decide panel: each item's decision, the summary of what Save will do */
.rc-decide { border: 0; margin: .5rem 0 0; padding: .4rem 0 0; border-top: 1px dashed var(--rule); display: flex; flex-wrap: wrap; gap: .3rem .5rem; align-items: center; font-size: .82rem; }
.rc-decide legend { float: left; font-size: .75rem; color: #6b6255; margin-right: .4rem; padding: 0; }
.rc-choice { display: inline-flex; align-items: center; gap: .25rem; border: 1px solid var(--rule); border-radius: 999px; padding: .1rem .65rem; cursor: pointer; background: #fff; }
.rc-choice input { width: auto; margin: 0; } .rc-choice:has(input:checked) { border-color: var(--pine); background: #eef3ee; font-weight: 600; }
.rc-choice.is-later { color: #6b6255; }
.rc-hints { display: block; margin-top: .3rem; font-size: .78rem; } .rc-hints .linkish { margin-right: .6rem; }
.rc-summary { margin: .7rem 0 0; font-size: .88rem; color: #6b6255; } .rc-summary.has-changes { color: #24502c; font-weight: 600; }
button.rc-save:disabled { opacity: .45; cursor: not-allowed; }
.rc-save-wrap { display: inline-flex; align-items: center; gap: .8rem; justify-content: flex-end; flex-wrap: wrap; text-align: right; }
.rc-save-wrap .rc-summary { margin: 0; max-width: 32rem; }
.rc-lbl .req { color: #a23b3b; font-weight: 600; text-transform: lowercase; }
/* The two working sections of the card: what is open (each with Your decision), and Decide */
.rc-band { display: flex; align-items: baseline; gap: .9rem; flex-wrap: wrap; margin: 1.2rem 0 .7rem; padding: .55rem .85rem; border-radius: 8px; }
.rc-band h3 { margin: 0; font: 700 1.05rem/1.2 var(--serif); color: inherit; }
.rc-band p { margin: 0; font: .84rem/1.4 var(--sans); }
.rc-band-n { display: inline-block; min-width: 1.4rem; padding: 0 .45rem; margin-left: .3rem; border-radius: 999px; background: rgba(0,0,0,.08); font: 600 .8rem/1.4rem var(--sans); text-align: center; }
.rc-band-open { background: #f4f1ea; border-left: 4px solid #9a958b; border-radius: 0 8px 8px 0; color: #3e3a33; }
.rc-band-decide { background: #e4efe4; border-left: 4px solid #2f6b3a; border-radius: 0 8px 8px 0; color: #24502c; }
.rc-resolve { border-top: 0; margin-top: 1.2rem; background: #f6faf6; border: 1px solid #cfe0cf; border-radius: 10px; padding: 0 1rem 1rem; }
.rc-resolve .rc-band-decide { margin: 0 -1rem .9rem; border-radius: 10px 10px 0 0; border-left: 0; border-bottom: 1px solid #cfe0cf; padding: .7rem 1rem; }
/* the entry's history, below the card (outside its border), folded */
details.rc-history { margin: .8rem .2rem 0; font-family: var(--sans); font-size: .9rem; }
details.rc-history > summary { cursor: pointer; color: #6b6255; }
details.rc-history .rc-hist { border-top: 1px solid var(--rule); padding: .45rem 0; }

/* Tree & Thread words (VB\Glossary, partials theme_word()): the plain words beside a trial word, and its "?" */
.tw-plain { font-size: .78em; font-weight: 400; color: #6b6255; }
.tw-help { display: inline-block; width: 1.05em; height: 1.05em; line-height: 1.05em; font-size: .72em; text-align: center; border: 1px solid currentColor; border-radius: 50%; color: #6b6255; text-decoration: none; vertical-align: .15em; font-weight: 600; }
.tw-help:hover, .tw-help:focus { color: var(--link, #173F2C); }

/* Ready to stitch (templates/review_queue.php): lanes of decisions made several at a time */
.stitch { background: #fbf8f0; border: 1px solid var(--rule); border-left: 3px solid #C9973F; border-radius: 12px; padding: .8rem 1rem; margin: 0 0 1.2rem; }
.stitch-h { font-size: 1.15rem; margin: 0 0 .2rem; }
.stitch-n { display: inline-block; min-width: 1.6em; text-align: center; font-size: .78rem; font-weight: 600; background: #173F2C; color: #F7F1E3; border-radius: 999px; padding: 0 .45rem; vertical-align: .1em; }
.stitch-intro { font-size: .85rem; color: #4a443c; margin: 0 0 .5rem; }
.stitch-lane { background: #fff; border: 1px solid var(--rule); border-radius: 10px; margin: .4rem 0; }
.stitch-lane > summary { cursor: pointer; padding: .55rem .8rem; font-weight: 600; list-style: none; }
.stitch-lane > summary::-webkit-details-marker { display: none; }
.stitch-lane > summary::before { content: '▸'; display: inline-block; width: 1em; color: #6b6255; }
.stitch-lane[open] > summary::before { content: '▾'; }
.stitch-lane form { padding: 0 .8rem .8rem; }
.stitch-rows { list-style: none; margin: 0; padding: 0; max-height: 26rem; overflow-y: auto; }
.stitch-rows li { border-top: 1px solid #eee7d9; }
.stitch-row { display: grid; grid-template-columns: 1.4rem minmax(0, 1fr); gap: .5rem; padding: .45rem 0; cursor: pointer; font-weight: 400; }
.stitch-detail { display: block; font-size: .8rem; color: #4a443c; }
.stitch-quote { display: block; font-size: .8rem; color: #22312A; font-style: italic; margin-top: .15rem; }
.stitch-img { font-size: .8rem; }
.stitch-note { display: block; margin-top: .6rem; }
.stitch-note textarea { width: 100%; }

/* Overview trends in four groups (Metrics::GROUPS), each chart bordered by its status (site feedback 503) */
.dq-group { margin: 1.1rem 0 .3rem; font-size: 1rem; }
.dq-fig { border: 1px solid var(--rule); border-left-width: 4px; border-radius: 8px; padding: .4rem .6rem; background: #fff; }
.dq-fig.rag-green { border-left-color: #3f7d4e; } .dq-fig.rag-amber { border-left-color: #d39a1c; } .dq-fig.rag-red { border-left-color: #b23a24; }
.rag-dot { display: inline-block; width: .7em; height: .7em; border-radius: 50%; margin-right: .35em; vertical-align: .05em; }
.rag-green .rag-dot { background: #3f7d4e; } .rag-amber .rag-dot { background: #d39a1c; } .rag-red .rag-dot { background: #b23a24; }
.rag-word { font-size: .76rem; font-weight: 600; }
.rag-green .rag-word { color: #1f4a35; } .rag-amber .rag-word { color: #7a5408; } .rag-red .rag-word { color: #8a2a17; }
.rag-key { font-weight: 600; } .rag-key.rag-green { color: #1f4a35; } .rag-key.rag-amber { color: #7a5408; } .rag-key.rag-red { color: #8a2a17; }
.dq-new { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #9A4A26; border: 1px solid #9A4A26; border-radius: 4px; padding: 0 .25rem; }

/* Move the needle (Metrics::needle): one line of progress on Tree review and the landing page */
.needle { display: flex; flex-wrap: wrap; gap: .3rem .9rem; align-items: baseline; font-size: .85rem; background: #fff; border: 1px solid var(--rule); border-radius: 10px; padding: .5rem .8rem; margin: 0 0 .9rem; }
.needle strong { font-family: Fraunces, Georgia, serif; }
.needle .up { color: #3f7d4e; } .needle .down { color: #a8432a; }

/* Check a sample (templates/review_sample.php) */
.sample-item { margin-bottom: 1rem; }
.sample-verdict { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; background: #fbf8f0; border: 1px solid var(--rule); border-top: 0; border-radius: 0 0 10px 10px; padding: .5rem .8rem; margin-top: -.4rem; }
.sample-verdict input[name^="why"] { flex: 1 1 18rem; }
.needle .np + .np::before { content: '·'; margin-right: .6rem; color: #6b6255; }
.needle > strong { flex-basis: 100%; }
@media (min-width: 700px) { .needle > strong { flex-basis: auto; } }

/* The KPI summary heatmap (QualityCharts::kpiHeatmap): every measure by day against its target. Status tints after the
   dataviz skill's fixed status palette (good #0ca30c, warning #fab219, critical #d03b3b); the text stays ink, and each
   cell also carries a mark (✓ ~ ✕) and words for screen readers, so no status is told by color alone. */
.kpi-heat-wrap { overflow-x: auto; margin: .3rem 0 1rem; border: 1px solid var(--rule); border-radius: 10px; background: #fff; }
table.kpi-heat { border-collapse: separate; border-spacing: 2px; font-size: .78rem; }
table.kpi-heat th, table.kpi-heat td { padding: .3rem .45rem; white-space: nowrap; }
table.kpi-heat thead th { font-weight: 600; color: #4a443c; text-align: center; border-bottom: 1px solid #e1e0d9; }
table.kpi-heat .kh-name { position: sticky; left: 0; background: #fff; text-align: left; font-weight: 500; color: #22312A; z-index: 1; }
table.kpi-heat td { text-align: right; border-radius: 4px; color: #22312A; font-variant-numeric: tabular-nums; }
table.kpi-heat .kh-green { background: #e1f2e1; } table.kpi-heat .kh-amber { background: #fdefc9; } table.kpi-heat .kh-red { background: #f7dcdc; }
table.kpi-heat .kh-none { background: #f4f1ea; color: #8a8273; text-align: center; }
table.kpi-heat .kh-target { color: #4a443c; text-align: right; }
table.kpi-heat .kh-group th { text-align: left; font-family: Fraunces, Georgia, serif; font-size: .85rem; padding-top: .6rem; color: #173F2C; background: #fff; }
.kh-mark { display: inline-block; width: 1em; margin-right: .25em; font-weight: 700; text-align: center; }
.kh-green .kh-mark { color: #006300; } .kh-amber .kh-mark { color: #7a5408; } .kh-red .kh-mark { color: #a8262a; }
.kh-key { display: inline-block; padding: 0 .4rem; border-radius: 4px; color: #22312A; font-weight: 600; }
.kh-key.kh-green { background: #e1f2e1; } .kh-key.kh-amber { background: #fdefc9; } .kh-key.kh-red { background: #f7dcdc; }
@media (forced-colors: active) { table.kpi-heat td { border: 1px solid CanvasText; } }
@media print { .kpi-heat-wrap { overflow: visible; } }
table.kpi-heat th { text-transform: none; letter-spacing: 0; }
table.kpi-heat thead th { font-size: .74rem; }

/* Downloads: the made-to-order GEDCOM form, the test kit, the change report for RootsMagic, a compared file */
.dl-quick { list-style: none; padding: 0; margin: .6rem 0; display: grid; gap: .45rem; }
.dl-quick li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .6rem; }
.dl-build { margin: .8rem 0; border-top: 1px solid var(--rule); padding-top: .6rem; }
.dl-build summary { cursor: pointer; }
.dl-form { display: grid; gap: .7rem; margin-top: .6rem; }
.dl-form fieldset { border: 1px solid var(--rule); border-radius: 6px; padding: .5rem .8rem .7rem; display: grid; gap: .45rem; margin: 0; }
.dl-form legend { font: 600 .8rem var(--sans); padding: 0 .3rem; }
.dl-form label { margin: 0; }
.dl-form select, .dl-form input[type=date], .dl-form input.narrow { width: auto; display: inline-block; max-width: 100%; }
.dl-form input.narrow { width: 5rem; }
.dl-form.inline { grid-template-columns: minmax(0, 28rem) auto; align-items: end; }
.dl-form button { justify-self: start; }
@media (max-width: 640px) { .dl-form.inline { grid-template-columns: 1fr; } }
.sync-person h2 { font-size: 1.05rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem; margin-top: 0; }
.sync-tick input { width: 1.15rem; height: 1.15rem; margin: 0; vertical-align: -2px; }
.sync-changes { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.sync-changes > li { border-left: 3px solid var(--rule); padding-left: .6rem; }
.sync-changes ul { margin: .15rem 0 .15rem 1rem; padding: 0; }
.sync-changes del { color: #8a3324; } .sync-changes ins { text-decoration: none; background: #e8f3e6; padding: 0 .15rem; }
.sync-act { font: 600 .68rem var(--sans); text-transform: uppercase; letter-spacing: .03em; padding: .05rem .35rem; border-radius: 3px; background: #eee9df; }
.sync-added { background: #e8f3e6; } .sync-removed { background: #f6e3de; }
.sync-foot { margin: .15rem 0; padding: .2rem .4rem; background: #faf7f0; border-radius: 4px; }
.sync-done { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; position: sticky; bottom: 0; padding: .5rem .7rem; background: #fff; border: 1px solid var(--rule); border-radius: 8px 8px 0 0; box-shadow: 0 -2px 8px rgba(0,0,0,.08); }
.sync-done input { flex: 1 1 16rem; margin: 0; } .sync-done button { margin: 0; }
ul.cols { columns: 18rem; padding-left: 1.1rem; }
.dl-form input[type=radio], .dl-form input[type=checkbox], .filters input[type=checkbox] { width: auto; display: inline-block; margin: 0 .35rem 0 0; vertical-align: -1px; }
.dl-form .hint { display: block; }
