/* Stubbs History — a broadsheet on cream paper. Ink, rules and small capitals; nothing else. */
@font-face { font-family: "Garamond"; src: url("fonts/eb-garamond-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Garamond"; src: url("fonts/eb-garamond-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Garamond"; src: url("fonts/eb-garamond-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Garamond"; src: url("fonts/eb-garamond-latin-500-italic.woff2") format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: "Garamond"; src: url("fonts/eb-garamond-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Garamond"; src: url("fonts/eb-garamond-latin-600-italic.woff2") format("woff2"); font-weight: 600; font-style: italic; font-display: swap; }

:root {
  --paper: #f3ead8;
  --paper-deep: #ebdfc8;
  --ink: #241b13;
  --ink-soft: #5c4e3f;
  --rule: #34281d;
  --hair: #b9a888;
  --gold: #8a6a2e;
  --measure: 40rem;
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: "Garamond", "EB Garamond", Georgia, "Times New Roman", serif;
  font-size: 1.125rem; line-height: 1.55;
  font-variant-numeric: oldstyle-nums proportional-nums;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration-color: var(--hair); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--ink); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- masthead ---------- */
.masthead { max-width: 72rem; margin: 0 auto; padding: 1.25rem 16px 0; text-align: center; }
.dateline {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft);
  border-bottom: 1px solid var(--rule); padding-bottom: .45rem;
}
.title {
  display: block; text-decoration: none; font-weight: 500;
  font-size: clamp(2.4rem, 7vw, 4.6rem); line-height: 1.05; letter-spacing: .06em;
  font-variant: small-caps; padding: .7rem 0 .55rem;
}
.sections {
  border-top: 3px double var(--rule); border-bottom: 1px solid var(--rule);
  display: flex; justify-content: center; flex-wrap: wrap; gap: .2rem 1.6rem; padding: .5rem 0;
  font-variant: small-caps; letter-spacing: .06em; font-size: 1.02rem;
}
.sections a { text-decoration: none; color: var(--ink-soft); }
.sections a:hover, .sections a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--gold); }

main { max-width: 72rem; margin: 0 auto; padding: 2rem 16px 3rem; }

/* ---------- type ---------- */
h1, h2, h3 { font-weight: 500; line-height: 1.15; margin: 0 0 .6rem; }
h1 { font-size: clamp(1.9rem, 4.2vw, 2.7rem); }
h2 { font-size: 1.05rem; font-variant: small-caps; letter-spacing: .07em; border-top: 1px solid var(--rule); padding-top: .45rem; margin-top: 2rem; }
h3 { font-size: 1.15rem; font-style: italic; }
p { margin: 0 0 .9rem; }
.kicker { font-variant: small-caps; letter-spacing: .08em; color: var(--gold); margin-bottom: .35rem; font-size: 1rem; }
.kicker a { text-decoration: none; }
.standfirst { font-size: 1.28rem; line-height: 1.45; color: var(--ink-soft); font-style: italic; margin-bottom: 1.4rem; }
.note { font-size: .95rem; color: var(--ink-soft); font-style: italic; border-top: 1px solid var(--hair); padding-top: .6rem; margin-top: 2rem; }
blockquote { margin: 1rem 0; padding-left: 1rem; border-left: 1px solid var(--hair); font-style: italic; }
strong { font-weight: 600; }
.yrs { color: var(--ink-soft); font-size: .92em; white-space: nowrap; }

/* ---------- article sheets ---------- */
.sheet { max-width: var(--measure); margin: 0 auto; }
.sheet.wide { max-width: 60rem; }
.columns { column-gap: 2.2rem; column-rule: 1px solid var(--hair); }
.lead .columns > p:first-child::first-letter, .life .columns > p:first-child::first-letter { float: left; font-size: 3.4em; line-height: .85; padding: .06em .08em 0 0; font-weight: 500; }

/* ---------- front page ---------- */
.front { display: grid; grid-template-columns: minmax(0, 1fr) 19rem; gap: 2.5rem; }
.front .lead h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); }
.front .columns { columns: 2 17rem; }
.rail { border-left: 1px solid var(--rule); padding-left: 1.5rem; }
.rail h2 { margin-top: 0; }
.rail section + section { margin-top: 2rem; }
.glance { list-style: none; padding: 0; margin: 0; font-size: 1rem; }
.glance li { padding: .28rem 0; border-bottom: 1px dotted var(--hair); display: flex; justify-content: space-between; gap: .5rem; }
.contents { list-style: none; padding: 0; margin: 0; font-size: 1rem; }
.contents li { padding: .5rem 0; border-bottom: 1px dotted var(--hair); }
.contents a { font-variant: small-caps; letter-spacing: .05em; font-weight: 500; }

/* ---------- the line (pedigree column) ---------- */
.pedigree { list-style: none; padding: 1rem 0 0; margin: 0 auto; }
.gen { position: relative; display: grid; grid-template-columns: 1fr minmax(0, 20rem) 1fr; align-items: center; gap: 1rem; padding: .8rem 0; }
.gen::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; border-left: 3px double var(--rule); transform: translateX(-1.5px); z-index: 0; }
.gen:first-child::before { top: 50%; }
.gen:last-child::before { bottom: 50%; }
.box { position: relative; z-index: 1; display: block; text-align: center; text-decoration: none; border: 3px double var(--rule); padding: .55rem .9rem; background: var(--paper); }
.box.main { grid-column: 2; border-width: 4px; outline: 1px solid var(--rule); outline-offset: 3px; }
.box .nm { display: block; font-variant: small-caps; letter-spacing: .05em; font-size: 1.12rem; font-weight: 500; }
.box .dt { display: block; font-size: .9rem; }
.box .oc { display: block; font-size: .9rem; font-style: italic; color: var(--ink-soft); }
.box:hover { background: var(--paper-deep); }
.spouse { grid-column: 3; display: flex; align-items: center; gap: .5rem; }
.spouse .m { font-style: italic; color: var(--ink-soft); }
.spouse .box { border-width: 1px; border-style: solid; padding: .4rem .7rem; flex: 1; }
.spouse .box .nm { font-size: 1rem; }
.prooflink { grid-column: 1; grid-row: 1; justify-self: end; font-size: .9rem; font-variant: small-caps; letter-spacing: .05em; }

/* ---------- ledgers and lists ---------- */
.ledger { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 1rem; }
.ledger th { text-align: left; font-weight: 500; font-variant: small-caps; letter-spacing: .06em; border-bottom: 1px solid var(--rule); padding: .35rem .5rem .35rem 0; }
.ledger td { border-bottom: 1px dotted var(--hair); padding: .45rem .5rem .45rem 0; vertical-align: top; }
.ledger .num { width: 3rem; color: var(--ink-soft); }
.ledger .grade { font-style: italic; color: var(--ink-soft); }
.sheet table:not(.ledger) { border-collapse: collapse; width: 100%; font-size: .98rem; margin: 1rem 0; }
.sheet table:not(.ledger) th, .sheet table:not(.ledger) td { border-bottom: 1px dotted var(--hair); padding: .35rem .5rem .35rem 0; text-align: left; vertical-align: top; }
.list { list-style: none; padding: 0; }
.list li { border-bottom: 1px dotted var(--hair); padding: .7rem 0; }
.list li a { font-size: 1.25rem; text-decoration: none; }
.list li p { margin: .2rem 0 0; color: var(--ink-soft); font-style: italic; }
.pager { display: flex; justify-content: space-between; border-top: 3px double var(--rule); margin-top: 2.5rem; padding-top: .6rem; font-variant: small-caps; letter-spacing: .05em; }

/* ---------- person pages ---------- */
.person .years, .proof .years { font-size: 1.25rem; color: var(--ink-soft); margin-top: -.3rem; }
.facts { display: grid; grid-template-columns: 11rem 1fr; gap: .1rem 1.2rem; margin: 1.4rem 0; border-top: 1px solid var(--rule); }
.facts dt { font-variant: small-caps; letter-spacing: .05em; color: var(--ink-soft); padding: .5rem 0; border-bottom: 1px dotted var(--hair); }
.facts dd { margin: 0; padding: .5rem 0; border-bottom: 1px dotted var(--hair); }
.facts .src { display: block; font-size: .88rem; color: var(--ink-soft); font-style: italic; margin-top: .15rem; }
.records { padding-left: 1.1rem; font-size: 1rem; }
.records li { margin-bottom: .35rem; }
.records .rk { font-variant: small-caps; letter-spacing: .04em; }

/* ---------- index of names ---------- */
.letters { display: flex; flex-wrap: wrap; gap: .3rem .8rem; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: .4rem 0; margin: 1rem 0 1.5rem; font-variant: small-caps; }
.letters a { text-decoration: none; }
.names { columns: 3 15rem; column-gap: 2rem; column-rule: 1px solid var(--hair); }
.names section { break-inside: avoid-column; }
.names h2 { margin-top: 0; border: 0; font-size: 1.4rem; }
.names ul { list-style: none; padding: 0; margin: 0 0 1.2rem; font-size: 1rem; }
.names li { padding: .12rem 0; }

/* ---------- colophon ---------- */
.colophon { max-width: 72rem; margin: 0 auto; padding: 1rem 16px 2.5rem; border-top: 3px double var(--rule); text-align: center; color: var(--ink-soft); font-size: .92rem; }
.colophon p { max-width: 44rem; margin: .4rem auto; }

/* ---------- narrow screens ---------- */
@media (max-width: 760px) {
  body { font-size: 1.06rem; }
  .front { grid-template-columns: 1fr; }
  .rail { border-left: 0; padding-left: 0; border-top: 3px double var(--rule); padding-top: 1rem; }
  .columns, .front .columns { columns: 1; }
  .dateline span:nth-child(2) { display: none; }
  .gen { grid-template-columns: 1fr; gap: .4rem; }
  .gen::before { display: none; }
  .box.main, .spouse, .prooflink { grid-column: 1; grid-row: auto; justify-self: stretch; }
  .prooflink { justify-self: center; }
  .spouse { justify-content: center; }
  .pedigree .gen + .gen { border-top: 1px dotted var(--hair); }
  .facts { grid-template-columns: 1fr; }
  .facts dt { border-bottom: 0; padding-bottom: 0; }
  .names { columns: 1; }
}

@media print {
  .sections, .pager, .letters { display: none; }
  body { background: none; }
}

/* ---------- family trees ---------- */
.sheet.full { max-width: none; }
.sheet.full > .kicker, .sheet.full > h1, .sheet.full > .standfirst { max-width: 60rem; margin-left: auto; margin-right: auto; }
.chartbar { max-width: 60rem; margin: 0 auto .6rem; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; font-size: .95rem; color: var(--ink-soft); font-style: italic; }
.fit { font: inherit; font-style: normal; font-variant: small-caps; letter-spacing: .05em; background: none; color: var(--ink); border: 1px solid var(--rule); padding: .2rem .7rem; cursor: pointer; }
.fit:hover { background: var(--paper-deep); }
.treewrap { margin: 0 0 1rem; overflow: auto; max-height: 92vh; border-top: 3px double var(--rule); border-bottom: 3px double var(--rule); padding: .8rem 0; -webkit-overflow-scrolling: touch; }
.treewrap svg { display: block; margin: 0 auto; max-width: none; }
.treewrap.fitted { max-height: none; }
.treewrap.fitted svg { width: 100%; height: auto; }
.treewrap figcaption { font-size: .92rem; font-style: italic; color: var(--ink-soft); text-align: center; margin-top: .6rem; }
.sheet.full section { max-width: 60rem; margin: 2.5rem auto 0; }
.before .columns { columns: 2 20rem; }
.before h3 { font-size: 1.05rem; margin-top: 1rem; break-after: avoid; }
.before ul { padding-left: 1.1rem; margin: 0 0 1rem; }
.before li { margin-bottom: .45rem; break-inside: avoid; }
.interesting .treewrap { margin: 1.5rem 0 2rem; }
.entry { border-top: 1px solid var(--hair); padding-top: .4rem; margin-top: 1.4rem; scroll-margin-top: 1rem; }
.entry h2 { border: 0; padding: 0; margin: 0 0 .1rem; font-size: 1.25rem; font-variant: normal; letter-spacing: 0; }
.entry .meta { font-size: .95rem; color: var(--ink-soft); font-style: italic; margin-bottom: .4rem; }
.entry:target { background: var(--paper-deep); outline: 6px solid var(--paper-deep); }
.more { font-variant: small-caps; letter-spacing: .04em; white-space: nowrap; }
.families .who { font-size: .95rem; font-style: normal !important; color: var(--ink) !important; }
.interesting .treewrap { max-height: none; }

/* ---------- the interactive tree ---------- */
.treeapp { max-width: 72rem; margin: 0 auto; }
.branches-head { max-width: 60rem; margin: 0 auto; }
.branches-head h2 { margin-top: .5rem; }
.branches-head p { color: var(--ink-soft); font-style: italic; font-size: 1rem; }
.branches { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: .8rem; margin: .8rem 0 1.4rem; }
.branch { text-align: left; font: inherit; color: var(--ink); background: transparent; border: 1px solid var(--rule); padding: .7rem .85rem .6rem; cursor: pointer; display: flex; flex-direction: column; gap: .25rem; }
.branch:hover { background: var(--paper-deep); }
.branch[aria-expanded="true"] { border: 3px double var(--gold); background: var(--paper-deep); }
.branch .bt { font-variant: small-caps; letter-spacing: .05em; font-weight: 500; font-size: 1.05rem; }
.branch .bn { font-size: .95rem; line-height: 1.4; }
.branch .bj { font-size: .88rem; font-style: italic; color: var(--ink-soft); }
.branch .bx { font-size: .88rem; font-variant: small-caps; letter-spacing: .05em; color: var(--gold); margin-top: .15rem; }
.treeapp .chartbar { max-width: none; }
.treeapp .treewrap { max-height: none; width: min(96vw, 1560px); margin-left: calc((100% - min(96vw, 1560px)) / 2); }
.treeapp .chartbar { width: min(96vw, 1560px); margin-left: calc((100% - min(96vw, 1560px)) / 2); padding: 0 .5rem; box-sizing: border-box; }
.legend { font-size: .92rem; font-style: italic; color: var(--ink-soft); text-align: center; }

/* ---------- explained words ---------- */
.gl { border-bottom: 1px dotted var(--ink-soft); cursor: help; position: relative; outline: none; }
.gl:hover::after, .gl:focus::after {
  content: attr(data-def); position: absolute; left: 0; top: 1.5em; z-index: 20;
  width: min(20rem, 78vw); padding: .55rem .7rem; background: var(--paper-deep); color: var(--ink);
  border: 1px solid var(--rule); box-shadow: 0 2px 6px rgba(36,27,19,.15);
  font: normal normal 400 .92rem/1.4 "Garamond", Georgia, serif; font-variant: normal; letter-spacing: 0; text-transform: none; white-space: normal;
}
.glossary { margin-top: 1.5rem; }
.glossary dt { font-variant: small-caps; letter-spacing: .05em; font-weight: 500; margin-top: .9rem; border-top: 1px dotted var(--hair); padding-top: .5rem; }
.glossary dd { margin: .15rem 0 0; }
.treekey { max-width: 60rem; margin: 1.5rem auto 0; }
.treekey dl { columns: 2 18rem; column-gap: 2rem; font-size: .95rem; }
.treekey dt { font-variant: small-caps; letter-spacing: .04em; font-weight: 500; break-after: avoid; }
.treekey dd { margin: 0 0 .5rem; color: var(--ink-soft); break-inside: avoid; }

/* ---------- the map ---------- */
.mapapp { display: grid; grid-template-columns: minmax(0, 1fr) 21rem; gap: 2rem; max-width: 72rem; margin: 1.5rem auto 0; align-items: start; }
.mapcol { position: sticky; top: .8rem; }
.mapfig { margin: 0; border: 3px double var(--rule); padding: 4px; background: var(--paper); }
.mapctl { display: flex; align-items: center; gap: .6rem; margin-bottom: .5rem; font-variant: small-caps; letter-spacing: .05em; }
.mapctl button { font: inherit; background: none; border: 1px solid var(--rule); color: var(--ink); padding: .15rem .65rem; cursor: pointer; }
.mapctl button:hover { background: var(--paper-deep); }
.mapctl .mcount { color: var(--ink-soft); font-style: italic; font-variant: normal; margin-right: auto; }
.mcaption { display: none; }
.geo { display: block; width: 100%; height: auto; --z: 1; max-height: calc(100vh - 5rem); }
.geo[data-map="ch"] { aspect-ratio: 800 / 880; }
.geo[data-map="wo"] { aspect-ratio: 748 / 405; }
.geo .wl { fill: none; stroke: #bfae8a; stroke-width: .6; vector-effect: non-scaling-stroke; }
.geo .coast { fill: none; stroke: #241b13; stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.geo .border { fill: none; stroke: #6d5d4a; stroke-width: 1; stroke-dasharray: 7 3 1.5 3; vector-effect: non-scaling-stroke; }
.geo .river { fill: none; stroke: #6f7d86; stroke-width: 1.1; vector-effect: non-scaling-stroke; }
.geo .wland { fill: #f3ead8; stroke: #241b13; stroke-width: .8; vector-effect: non-scaling-stroke; }
.geo .wborder { fill: none; stroke: #a8977a; stroke-width: .6; stroke-dasharray: 3 2; vector-effect: non-scaling-stroke; }
.geo .grat { stroke: #d6c8a8; stroke-width: .5; vector-effect: non-scaling-stroke; }
.geo .gl-lab { font: italic calc(10px / var(--z)) Garamond, Georgia, serif; fill: #a8977a; }
.geo .region { font: 400 calc(15px / var(--z)) Garamond, Georgia, serif; letter-spacing: .35em; fill: #a8977a; }
.geo .town circle { fill: #7a6650; }
.geo .town text { font: italic calc(12.5px / var(--z)) Garamond, Georgia, serif; fill: #7a6650; paint-order: stroke; stroke: #f3ead8; stroke-width: calc(3px / var(--z)); }
.geo .place .ring { fill: #f3ead8; stroke: #241b13; stroke-width: 1; vector-effect: non-scaling-stroke; }
.geo .place .dot { fill: #8a6a2e; }
.geo .place text { font: 500 calc(14px / var(--z)) Garamond, Georgia, serif; font-variant: small-caps; letter-spacing: .04em; fill: #241b13;
  paint-order: stroke; stroke: #f3ead8; stroke-width: calc(4px / var(--z)); stroke-linejoin: round; }
.geo:not(.zoomed) .place.imp2 text { display: none; }
.geo .place.on .ring { stroke: #6e4a1f; stroke-width: 2.4; }
.geo .place.on .dot { fill: #6e4a1f; }
.geo .place.on text { fill: #6e4a1f; font-weight: 600; font-size: calc(15.5px / var(--z)); }
.geo .step { display: none; }
.geo .step.on { display: inline; }
.geo .route { fill: none; stroke: #6e4a1f; stroke-width: 2.6; stroke-linecap: round; vector-effect: non-scaling-stroke;
  stroke-dasharray: 1; stroke-dashoffset: 1; animation: drawroute 1.6s ease forwards; }
@keyframes drawroute { to { stroke-dashoffset: 0; } }
.msteps { list-style: none; padding: 0; margin: 0; border-bottom: 1px solid var(--hair); }
.mstep { border-top: 1px solid var(--hair); padding: .65rem .6rem .7rem; cursor: pointer; }
.mstep:hover { background: var(--paper-deep); }
.mstep .mwhen { display: block; font-variant: small-caps; letter-spacing: .06em; color: var(--gold); font-size: .95rem; }
.mstep .mtitle { display: block; font-size: 1.12rem; }
.mstep .mtext { display: none; font-size: .98rem; margin-top: .35rem; line-height: 1.5; }
.mstep.on { background: var(--paper-deep); box-shadow: inset 3px 0 0 #6e4a1f; }
.mstep.on .mtitle { font-weight: 600; color: #6e4a1f; }
.mstep.on .mtext { display: block; }
@media (prefers-reduced-motion: reduce) { .geo .route { animation: none; stroke-dashoffset: 0; } }
@media (max-width: 860px) {
  .mapapp { grid-template-columns: 1fr; gap: 1rem; }
  .mapcol { position: static; }
  .mcaption { display: block; margin-top: .7rem; }
  .mcaption .mwhen { display: block; font-variant: small-caps; color: var(--gold); }
  .mcaption .mtitle { display: block; font-size: 1.15rem; font-weight: 600; }
  .mcaption .mtext { display: block; }
  .mstep .mtext { display: none !important; }
}

/* ---------- the tree with its branch column ---------- */
.treeapp { width: min(98vw, 1720px); max-width: none; margin-left: calc((100% - min(98vw, 1720px)) / 2); }
.treegrid { display: grid; grid-template-columns: 17.5rem minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.branchcol { position: sticky; top: .6rem; max-height: calc(100vh - 1.2rem); overflow-y: auto; padding-right: .3rem; }
.branchcol h2 { margin-top: 0; }
.branchcol > p { color: var(--ink-soft); font-style: italic; font-size: .95rem; margin: .2rem 0 .7rem; }
.treeapp .branches { display: flex; flex-direction: column; gap: .5rem; margin: 0; }
.treeapp .branch { padding: .5rem .65rem .45rem; gap: .15rem; }
.treeapp .branch .bt { font-size: 1rem; }
.treeapp .branch .bn { font-size: .88rem; line-height: 1.35; }
.treeapp .branch .bj, .treeapp .branch .bx { font-size: .82rem; }
.treeapp .treemain .chartbar, .treeapp .treemain .treewrap { width: auto; margin-left: 0; max-width: none; }
.treeapp .treemain .treewrap { margin-top: 0; }
.treeapp .treekey { max-width: 60rem; margin: 2rem auto 0; }
@media (max-width: 900px) {
  .treegrid { grid-template-columns: 1fr; }
  .branchcol { position: static; max-height: none; overflow: visible; }
  .treeapp .branches { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
}
/* ---------- Lives ---------- */
.story .storybody { max-width: 40rem; margin: 0 auto; }
.story .storybody > p:first-child::first-letter { float: left; font-size: 3.4em; line-height: .85; padding: .06em .08em 0 0; font-weight: 500; }
.story .storybody h3 { font-size: 1.3rem; margin: 2rem 0 .5rem; border-top: 1px solid var(--hair); padding-top: .8rem; }
.story .storybody blockquote { font-style: italic; margin: 1rem 2rem; }
.story .treewrap { margin: 1.6rem calc((40rem - min(60rem, 92vw)) / 2) 1.6rem; max-height: none; }
.story .whoswho, .story .sources { max-width: 40rem; margin: 2.5rem auto 0; }
.story .whoswho .entry h3 { margin: 0 0 .1rem; font-size: 1.15rem; border: 0; padding: 0; }
.story .sources ul { font-size: .92rem; padding-left: 1.1rem; }
.story .sources li { margin-bottom: .3rem; }
@media (max-width: 700px) { .story .treewrap { margin: 1.2rem 0; } }

/* ---------- the map: places and people ---------- */
.mapapp { grid-template-columns: minmax(0, 1fr) 22rem; }
.mtabs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .5rem; }
.mtab { font: inherit; font-size: .95rem; font-variant: small-caps; letter-spacing: .04em; background: none; color: var(--ink); border: 1px solid var(--rule); padding: .2rem .7rem; cursor: pointer; }
.mtab:hover { background: var(--paper-deep); }
.mtab.on { border: 3px double var(--gold); background: var(--paper-deep); padding: .05rem .6rem; }
.geo .place { cursor: pointer; outline: none; }
.geo .place .hit { fill: transparent; stroke: none; }
.geo .place:hover text, .geo .place:focus text { fill: #6e4a1f; text-decoration: underline; }
.geo .place:focus .ring { stroke: #6e4a1f; stroke-width: 2.4; }
.geo .place.on text { display: inline !important; }
.mpanel { border-top: 3px double var(--rule); padding-top: .4rem; position: sticky; top: .8rem; max-height: calc(100vh - 1.6rem); overflow-y: auto; }
.mpanel h2 { margin: .3rem 0 .4rem; }
.mpanel h3 { font-size: 1rem; font-variant: small-caps; letter-spacing: .05em; color: var(--gold); margin: 1rem 0 .3rem; font-weight: 500; }
.mpanel p { font-size: 1rem; line-height: 1.5; }
.pback { font: inherit; font-size: .9rem; background: none; border: 0; color: var(--gold); cursor: pointer; padding: 0; font-variant: small-caps; letter-spacing: .05em; }
.plist { list-style: none; padding: 0; margin: 0; }
.plist li { border-bottom: 1px dotted var(--hair); padding: .35rem 0; line-height: 1.35; }
.plist .yrs { display: block; font-size: .88rem; color: var(--ink-soft); }
.plist .role { display: block; font-size: .88rem; font-style: italic; color: var(--ink-soft); }
.plinks { list-style: none; padding: 0; margin: 0; columns: 2 9rem; column-gap: 1rem; }
.plinks li { break-inside: avoid; padding: .1rem 0; font-size: .98rem; }
.plinks .cnt { font-size: .8rem; color: var(--ink-soft); }
@media (max-width: 860px) { .mpanel { position: static; max-height: none; overflow: visible; } }
@media (max-width: 860px) { .mapapp { grid-template-columns: minmax(0, 1fr); } .mapcol { position: static; } }

/* ---------- the wealthiest ---------- */
.wealth .wintro { max-width: 44rem; margin: 0 auto 1.2rem; font-size: 1rem; }
.wealth .wkey, .wealth .wlist { max-width: 78rem; margin-left: auto; margin-right: auto; }
.wkey, .wrow { display: grid; grid-template-columns: 1.8rem 18rem minmax(10rem, 1fr) minmax(0, 29rem); column-gap: 1rem; align-items: center; }
.wkey { border-bottom: 3px double var(--rule); padding: .2rem 0; font-size: .8rem; font-variant: small-caps; letter-spacing: .06em; color: var(--gold); }
.wlist { list-style: none; padding: 0; margin-top: 0; }
.wrow { border-bottom: 1px dotted var(--hair); padding: .3rem 0; }
.wrank { font-size: 1.05rem; color: var(--gold); text-align: right; font-variant-numeric: oldstyle-nums; }
.whead { line-height: 1.2; }
.wname { display: block; font-size: 1.02rem; font-weight: 500; }
.wrel { display: block; font-size: .8rem; color: #6e4a1f; font-variant: small-caps; letter-spacing: .03em; line-height: 1.25; margin-top: .1rem; }
.wwho { display: block; font-size: .8rem; font-style: italic; color: var(--ink-soft); }
.wfig { flex: 0 0 5.2rem; font-weight: 600; font-size: .9rem; white-space: nowrap; }
.wtext { margin: 0; font-size: .84rem; line-height: 1.3; }
.wrange { color: var(--ink-soft); font-style: italic; }
@media (max-width: 1000px) {
  .wkey { display: none; }
  .wrow { grid-template-columns: 1.6rem minmax(0, 1fr); row-gap: .15rem; }
  .wrow .wbar, .wrow .wtext { grid-column: 2; }
}
/* ---------- proofs for the families ---------- */
.proof.family .ptoc { border-top: 3px double var(--rule); border-bottom: 1px solid var(--hair); margin: 1rem 0 1.5rem; padding: .3rem 0 .6rem; }
.proof.family .ptoc h2 { font-size: .95rem; font-variant: small-caps; letter-spacing: .06em; color: var(--gold); margin: .3rem 0; border: 0; }
.proof.family .ptoc ol { columns: 2 14rem; margin: 0; padding-left: 1.4rem; font-size: .98rem; }
.proofentry { border-top: 1px solid var(--hair); padding-top: .6rem; margin-top: 1.8rem; scroll-margin-top: 1rem; }
.proofentry h2 { font-size: 1.35rem; margin: 0 0 .1rem; border: 0; padding: 0; font-variant: normal; letter-spacing: 0; }
.proofentry h2 + p em:only-child { color: var(--ink-soft); }
.proofentry:target { background: var(--paper-deep); outline: 8px solid var(--paper-deep); }
.ledger.families .pintro { display: block; font-size: .9rem; color: var(--ink-soft); font-style: italic; margin-top: .15rem; }
/* ---------- the tree page: before the line at the top, key at the foot ---------- */
.sheet.full > .before { max-width: 60rem; margin: 1.6rem auto 2.2rem; }
.sheet.full > .before .note { font-style: italic; color: var(--ink-soft); font-size: .95rem; }
.treefoot { max-width: 60rem; margin: 2.5rem auto 0; }

/* ---- Films (films.py) */
.films .note { margin-top: 0; border-top: 0; padding-top: 0; }
.filmsec { margin-top: 2.2rem; }
.filmsec h2 { margin-bottom: .2rem; }
.filmsec .fi { color: var(--ink-soft); font-style: italic; font-size: 1rem; margin: 0 0 1rem; }
.filmlist { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 1.4rem 1.6rem; }
.filmcard { display: grid; grid-template-columns: auto 1fr; gap: .1rem .55rem; text-decoration: none; color: var(--ink); }
.filmcard img { grid-column: 1 / -1; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border: 3px double var(--rule); margin-bottom: .45rem; background: var(--paper-deep); }
.filmcard .fn { grid-row: span 3; font-size: 2rem; line-height: 1; color: var(--gold); font-weight: 500; }
.filmcard .ft { font-variant: small-caps; letter-spacing: .05em; font-weight: 500; font-size: 1.12rem; line-height: 1.25; }
.filmcard .fd { font-size: .9rem; color: var(--ink-soft); }
.filmcard .fs { font-size: .95rem; font-style: italic; color: var(--ink-soft); line-height: 1.4; }
.filmcard:hover .ft { text-decoration: underline; text-decoration-color: var(--gold); }
.film .years { font-size: 1.1rem; color: var(--ink-soft); margin-top: -.3rem; }
.player { margin: 1rem 0 1.4rem; border-top: 3px double var(--rule); border-bottom: 3px double var(--rule); padding: .6rem 0; }
.player video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #2b2722; }
.filmtext { max-width: var(--measure); }
/* the Play button over each film's poster (films.PLAY_BUTTON); the whole picture is the button */
.player .screen { position: relative; }
.playbtn { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; margin: 0; padding: 0 0 6%; border: 0;
  background: transparent; cursor: pointer; display: flex; align-items: flex-end; justify-content: center;
  font: inherit; color: var(--paper); -webkit-tap-highlight-color: transparent; }
.playbtn .pb { display: inline-flex; align-items: center; gap: .6rem; font-variant: small-caps; letter-spacing: .07em;
  font-weight: 500; font-size: 1.15rem; line-height: 1.2; background: rgba(36, 27, 19, .9); padding: .5rem 1.3rem .58rem 1.05rem;
  box-shadow: 0 0 0 3px rgba(36, 27, 19, .9), 0 0 0 4px rgba(243, 234, 216, .8); transition: background-color .15s, box-shadow .15s; }
.playbtn svg { flex: none; width: .78em; height: .78em; }
.playbtn:hover .pb, .playbtn:focus-visible .pb { background: var(--gold); box-shadow: 0 0 0 3px var(--gold), 0 0 0 4px var(--paper); }
.playbtn:focus-visible { outline: none; }
@media (max-width: 600px) { .playbtn { padding-bottom: 7.5%; } .playbtn .pb { font-size: .85rem; gap: .45rem; padding: .26rem .8rem .32rem .68rem; } }
.pager a { text-decoration: none; }
@media (max-width: 600px) { .pager { flex-direction: column; gap: .4rem; text-align: center; } }

/* ---- the film on the front page (films.home_html) */
.homefilm { margin: 1.1rem 0 1.8rem; }
.homefilm .player { margin: 0 0 .7rem; }
.homefilm-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .7rem 1.4rem; }
.homefilm-foot .cap { margin: 0; flex: 1 1 18rem; font-style: italic; color: var(--ink-soft); font-size: 1rem; line-height: 1.45; }
.btn { display: inline-block; font-variant: small-caps; letter-spacing: .07em; font-weight: 500; font-size: 1.1rem; line-height: 1.2;
  text-decoration: none; color: var(--paper); background: var(--ink); padding: .42rem 1.1rem .5rem;
  outline: 1px solid var(--rule); outline-offset: 3px; }
.btn:hover, .btn:focus-visible { background: var(--gold); outline-color: var(--gold); color: var(--paper); }
@media (max-width: 600px) { .homefilm-foot { flex-direction: column; align-items: flex-start; } .homefilm-foot .cap { flex: none; } .homefilm .btn { margin-left: 4px; } }
