/* Marking Time: cyanotype edition.
   Blue comes from Jo's original theme and from the cyanotype prints of the records' era.
   Brygada 1918 for reading, Atkinson Hyperlegible for labels, tables and controls. */

:root {
  color-scheme: light;
  --paper: #f4f7f9;
  --surface: #ffffff;
  --ink: #1c2733;
  --faded: #56636f;
  --rule: #d3dde6;
  --heading: #13385a;
  --link: #1f5a8a;
  --wash: #e6eef5;
  --ground: #13385a;
  --tone: #1e4a73;
  --on-ground: #f3f7fb;
  --on-ground-soft: #c9d9e7;
  --chip-bg: #13385a;
  --chip-fg: #ffffff;
  --mark: #b42318;
  --c-green: #1f7a3a;
  --c-orange: #a35200;
  --c-magenta: #b0186f;
  --c-violet: #6a2bb8;
  --c-gold: #8a6a00;
  --c-brown: #8b3a1a;
  --c-cyan: #00727f;
  --c-grey: #66717c;
  --serif: "Brygada 1918", Georgia, "Times New Roman", serif;
  --sans: "Atkinson Hyperlegible", "Segoe UI", system-ui, -apple-system, sans-serif;
  --measure: 68ch;
  --step: 1.3rem;
  --shadow: 0 0 0 1px rgba(19, 56, 90, .07), 0 14px 32px -18px rgba(19, 56, 90, .5);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #0d1823;
    --surface: #12212e;
    --ink: #e2e9ef;
    --faded: #9dafbf;
    --rule: #233a4e;
    --heading: #b9d7f0;
    --link: #8ec3eb;
    --wash: #15293a;
    --ground: #0f2a42;
    --tone: #1a4268;
    --chip-bg: #8ec3eb;
    --chip-fg: #0d1823;
    --mark: #ff8f85;
    --c-green: #6fcf8b;
    --c-orange: #ffb066;
    --c-magenta: #ff7ac2;
    --c-violet: #c4a1ff;
    --c-gold: #e3c35a;
    --c-brown: #e3a184;
    --c-cyan: #6fd3dc;
    --c-grey: #a7b4c0;
    --shadow: 0 0 0 1px rgba(0, 0, 0, .45), 0 16px 34px -18px rgba(0, 0, 0, .85);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.1875rem/1.68 var(--serif);
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
img { border: 0; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; border-radius: 3px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -5rem; z-index: 50; background: var(--surface); color: var(--link); padding: .7rem 1rem; border-radius: 6px; font: 700 1rem var(--sans); }
.skip:focus { top: 1rem; }

/* ---------- masthead */
.masthead { background: var(--paper); border-bottom: 1px solid var(--rule); }
.masthead-in { max-width: 78rem; margin: 0 auto; padding: .65rem 1rem; display: flex; align-items: center; gap: 1.5rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--heading); text-decoration: none; font: 600 1.35rem/1 var(--serif); white-space: nowrap; }
.brand img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--rule); }
.mainnav { margin-left: auto; display: flex; flex-wrap: wrap; gap: .15rem; font: 400 1rem/1 var(--sans); }
.mainnav a { color: var(--ink); text-decoration: none; padding: .75rem .75rem; border-radius: 8px; white-space: nowrap; }
.mainnav a:hover { background: var(--wash); }
.mainnav a[aria-current] { color: var(--heading); font-weight: 700; box-shadow: inset 0 -3px 0 var(--link); border-radius: 8px 8px 0 0; }
@media (min-width: 861px) {
  .masthead { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 88%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
}
@media (max-width: 860px) {
  .masthead-in { flex-wrap: wrap; gap: .4rem; padding: .8rem 1rem .1rem; }
  .mainnav { margin: 0 -.6rem; width: calc(100% + 1.2rem); }
  .mainnav a { padding: .7rem .6rem; }
}

/* ---------- page head */
.pagehead { max-width: calc(var(--measure) + 2rem); margin: 0 auto; padding: clamp(2rem, 5vw, 3.5rem) 1rem clamp(1.1rem, 2.5vw, 1.9rem); }
.crumbs { font: 400 .95rem/1.4 var(--sans); color: var(--faded); margin: 0 0 .9rem; }
.crumbs a { color: var(--faded); text-decoration: none; }
.crumbs a:hover { color: var(--link); text-decoration: underline; }
.crumbs .sep { margin: 0 .55em; opacity: .6; }
.title { font: 600 clamp(2.15rem, 1.5rem + 2.4vw, 3.2rem)/1.06 var(--serif); color: var(--heading); letter-spacing: -.015em; margin: 0; text-wrap: balance; }

/* ---------- reading column with room for photographs and tables */
.prose {
  display: grid;
  grid-template-columns:
    [full-start] minmax(1rem, 1fr)
    [wide-start] minmax(0, 9rem)
    [content-start] min(var(--measure), 100% - 2rem)
    [content-end] minmax(0, 9rem)
    [wide-end] minmax(1rem, 1fr) [full-end];
  padding-bottom: clamp(2.5rem, 6vw, 4rem);
}
.prose > * { grid-column: content; min-width: 0; }
.prose > .wide { grid-column: wide; }
/* records keep the text's left edge and use the extra room on the right */
.prose > .tree, .prose > .tablewrap, .prose > .recindex { grid-column: content-start / wide-end; }
[id] { scroll-margin-top: 5.5rem; }
.prose p { margin: 0 0 1.15em; }
.prose h2 { font: 600 1.6rem/1.2 var(--serif); color: var(--heading); margin: 2.1em 0 .55em; letter-spacing: -.01em; text-wrap: balance; }
.prose h3 { font: 700 1.22rem/1.3 var(--serif); color: var(--heading); margin: 1.9em 0 .45em; text-wrap: balance; }
.prose > h2:first-child, .prose > h3:first-child { margin-top: .2em; }
.prose ul { margin: 0 0 1.15em; padding-left: 1.3em; }
.prose li { margin: .2em 0; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2.4rem 0; }
.indent { margin-left: calc(var(--d) * 1.6rem); }
.ind { display: inline-block; width: calc(var(--n) * 1.4em); }
/* Jo underlined names and headings; underlines now mean links, so this emphasis is set in a heavier weight */
.u { font-weight: 600; }
.dead { border-bottom: 1px dashed var(--faded); cursor: help; }
.missing { display: inline-block; padding: .9rem 1.1rem; border: 1px dashed var(--rule); border-radius: 6px; color: var(--faded); font: 400 .95rem/1.4 var(--sans); }
.empty { color: var(--faded); font-style: italic; }
@media (max-width: 600px) {
  body { font-size: 1.125rem; }
  .indent { margin-left: calc(var(--d) * .8rem); }
  .ind { width: calc(var(--n) * .6em); }
}

/* colours Jo used to mark relationships and notes */
.c-red { color: var(--mark); }
.c-blue { color: var(--link); }
.c-green { color: var(--c-green); }
.c-orange { color: var(--c-orange); }
.c-magenta { color: var(--c-magenta); }
.c-violet { color: var(--c-violet); }
.c-gold { color: var(--c-gold); }
.c-brown { color: var(--c-brown); }
.c-cyan { color: var(--c-cyan); }
.c-grey { color: var(--c-grey); }

/* ---------- photographs and scans */
.plate { margin: 1.9rem 0; text-align: center; }
.row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 1rem 1.4rem; margin: 1.9rem 0; }
img.ph { display: inline-block; max-width: 100%; height: auto; vertical-align: middle; background: #fff; padding: clamp(4px, .55vw, 8px); box-shadow: var(--shadow); border-radius: 2px; }
img.glyph { max-width: 100%; height: auto; vertical-align: middle; margin: .1em .45em; }
img.glyph.lead { float: left; margin: .35rem 1.1rem .5rem 0; }
.prose p { display: flow-root; }
p img.ph, li img.ph { margin: .4em .3em; }
.zoom { display: inline-block; max-width: 100%; cursor: zoom-in; }

/* ---------- family trees: one row per person, indented by generation */
.tree { list-style: none; margin: 1.5rem 0 2.25rem; padding: 0; font-size: 1.0625rem; line-height: 1.5; }
.tree li {
  display: flex; align-items: flex-start; gap: .65rem;
  padding: .32rem 0 .32rem calc(var(--g) * var(--step));
  background: repeating-linear-gradient(90deg, var(--rule) 0 1px, transparent 1px var(--step)) .8rem 0 / calc(var(--g) * var(--step)) 100% no-repeat;
}
.tree .gen { flex: none; display: inline-grid; place-items: center; min-width: 1.6rem; height: 1.6rem; padding: 0 .3rem; margin-top: .02rem; border-radius: 999px; background: var(--chip-bg); color: var(--chip-fg); font: 700 .8rem/1 var(--sans); }
.tree .gen[class*="c-"] { background: transparent; box-shadow: inset 0 0 0 2px currentColor; }
.tree .who { flex: 1; min-width: 0; }
.tree li.cont { padding-left: calc(var(--g) * var(--step) + 2.25rem); }
@media (max-width: 600px) { :root { --step: .7rem; } .tree { font-size: 1rem; } }

/* ---------- census and other dot-leader records as tables */
.tablewrap { overflow-x: auto; margin: .6rem 0 2rem; background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; }
table.records { border-collapse: collapse; width: 100%; font: 400 1rem/1.4 var(--sans); font-variant-numeric: lining-nums tabular-nums; }
table.records th { font-weight: 700; font-size: .82rem; color: var(--faded); text-align: left; text-transform: lowercase; padding: .6rem .8rem; background: var(--wash); border-bottom: 1px solid var(--rule); white-space: nowrap; }
table.records th::first-letter { text-transform: uppercase; }
table.records td { padding: .5rem .8rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.records td:first-child { white-space: nowrap; }
table.records tbody tr:last-child td { border-bottom: 0; }
/* on phones each census row becomes a small labelled record */
@media (max-width: 600px) {
  table.records.stack thead { display: none; }
  table.records.stack, table.records.stack tbody, table.records.stack tr { display: block; width: auto; }
  table.records.stack tr { padding: .75rem .9rem; border-bottom: 1px solid var(--rule); }
  table.records.stack tbody tr:last-child { border-bottom: 0; }
  table.records.stack td { display: grid; grid-template-columns: 6.25rem 1fr; gap: .75rem; padding: .1rem 0; border: 0; white-space: normal; }
  table.records.stack td::before { content: attr(data-label); color: var(--faded); font-size: .88rem; }
  table.records.stack td:first-child { display: block; font-weight: 700; padding-bottom: .3rem; }
  table.records.stack td:first-child::before, table.records.stack td.raw::before { content: none; }
  table.records.stack td.raw { display: block; font-weight: 400; }
  table.records.stack td:empty { display: none; }
}

/* ---------- genealogy index */
.recindex { margin-top: 2rem; }
table.matrix { border-collapse: collapse; width: 100%; font: 400 1rem/1.3 var(--sans); }
table.matrix th, table.matrix td { padding: .3rem .35rem; border-bottom: 1px solid var(--rule); text-align: center; vertical-align: middle; }
table.matrix thead th { font-size: .85rem; color: var(--faded); font-weight: 700; background: var(--wash); padding: .65rem .35rem; }
table.matrix thead th:first-child, table.matrix th[scope="row"] { text-align: left; padding-left: .9rem; }
table.matrix th[scope="row"] a { font: 600 1.12rem/1.2 var(--serif); color: var(--heading); text-decoration: none; }
table.matrix th[scope="row"] a:hover { text-decoration: underline; }
table.matrix tbody tr:last-child > * { border-bottom: 0; }
table.matrix tbody tr:hover { background: var(--wash); }
.dot { display: inline-block; width: 1.75rem; height: 1.75rem; border-radius: 50%; position: relative; vertical-align: middle; }
.dot::before { content: ""; position: absolute; inset: .48rem; border-radius: 50%; background: var(--link); transition: inset .15s; }
.dot:hover::before, .dot:focus-visible::before { inset: .3rem; }
@media (max-width: 640px) {
  table.matrix thead { display: none; }
  table.matrix tr { display: block; padding: .65rem .8rem; border-bottom: 1px solid var(--rule); }
  table.matrix th, table.matrix td { display: inline-flex; align-items: center; border: 0; padding: .1rem .55rem .1rem 0; }
  table.matrix th[scope="row"] { display: block; padding: 0 0 .25rem; }
  table.matrix td:empty { display: none; }
  table.matrix td::before { content: attr(data-label); font-size: .9rem; color: var(--faded); }
}
.groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 0 2.5rem; }
.groups h3 { margin-top: 1.2em; }
.groups ul { list-style: none; padding: 0; margin: 0 0 1em; font: 400 1rem/1.45 var(--sans); }
.groups li { margin: .4em 0; }

/* ---------- related pages */
.related { max-width: calc(var(--measure) + 2rem); margin: 0 auto; padding: 0 1rem clamp(3rem, 7vw, 5rem); }
.related h2 { font: 600 1.3rem/1.25 var(--serif); color: var(--heading); margin: 0 0 .8rem; padding-top: 1.6rem; border-top: 1px solid var(--rule); }
.related ul { list-style: none; margin: 0; padding: 0; columns: 2 17rem; column-gap: 2.5rem; font: 400 1.02rem/1.45 var(--sans); }
.related li { break-inside: avoid; padding: .3rem 0; }

/* ---------- footer */
.sitefoot { background: var(--ground); color: var(--on-ground-soft); font: 400 1rem/1.6 var(--sans); }
.foot-in { max-width: 78rem; margin: 0 auto; padding: 2.5rem 1rem 3rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.25rem 3rem; }
.foot-brand { font: 600 1.4rem/1.2 var(--serif); color: var(--on-ground); margin: 0 0 .3rem; }
.sitefoot p { margin: 0; }
.foot-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; }
.sitefoot a { color: var(--on-ground); }

/* ---------- home */
.hero { background: var(--ground); color: var(--on-ground); }
.hero-in { max-width: 78rem; margin: 0 auto; padding: clamp(2.5rem, 6vw, 5.5rem) 1rem; display: grid; gap: clamp(2rem, 4vw, 3.5rem); align-items: center; }
@media (min-width: 960px) { .hero-in { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
.display { font: 700 clamp(3.4rem, 1.6rem + 6.4vw, 7rem)/.9 var(--serif); letter-spacing: -.03em; margin: 0 0 1.4rem; color: var(--on-ground); }
.lede { font: 400 clamp(1.15rem, 1.02rem + .45vw, 1.38rem)/1.55 var(--serif); color: var(--on-ground-soft); max-width: 34ch; margin: 0 0 2rem; }
.hero-links { display: flex; flex-wrap: wrap; gap: .75rem; margin: 0; }
.btn { display: inline-flex; align-items: center; min-height: 3rem; padding: .75rem 1.3rem; border-radius: 999px; font: 700 1.02rem/1 var(--sans); text-decoration: none; }
.btn.primary { background: var(--on-ground); color: #13385a; }
.btn.secondary { color: var(--on-ground); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--on-ground) 55%, transparent); }
.btn:hover { text-decoration: underline; }
.btn:focus-visible { outline-color: var(--on-ground); }
.cyano { margin: 0; }
.cyano .print { display: block; background: #fbfcfd; padding: clamp(8px, 1.1vw, 14px); box-shadow: 0 34px 60px -32px rgba(0, 0, 0, .7); }
.cyano .print:focus-visible { outline-color: var(--on-ground); }
.cyano .tone { display: block; background: var(--tone); isolation: isolate; }
.cyano img { display: block; width: 100%; height: auto; mix-blend-mode: screen; filter: grayscale(1) contrast(1.12); animation: expose 2.6s cubic-bezier(.22, .7, .2, 1) .15s both; }
@keyframes expose {
  from { filter: grayscale(1) contrast(.5) brightness(2.4); }
  to { filter: grayscale(1) contrast(1.12) brightness(1); }
}
.cyano figcaption { font: 400 .95rem/1.55 var(--sans); color: var(--on-ground-soft); margin-top: 1rem; max-width: 62ch; }

.band { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.band.tint { background: var(--wash); }
.band-in { max-width: 78rem; margin: 0 auto; padding: 0 1rem; }
.band h2 { font: 600 clamp(1.75rem, 1.3rem + 1.5vw, 2.4rem)/1.15 var(--serif); color: var(--heading); margin: 0 0 .5rem; letter-spacing: -.01em; }
.note { color: var(--faded); margin: 0 0 2rem; max-width: 58ch; font-size: 1.05rem; }
.register { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .1em 1.1em; font: 500 clamp(1.75rem, 1.15rem + 2.3vw, 3.1rem)/1.3 var(--serif); letter-spacing: -.01em; }
.register a { color: var(--heading); text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat; transition: background-size .2s; }
.register a:hover, .register a:focus-visible { background-size: 100% 2px; }
.register .n { font: 700 .8rem/1 var(--sans); color: var(--faded); margin-left: .3em; vertical-align: super; }

.split { display: grid; gap: clamp(2.5rem, 5vw, 4rem); }
@media (min-width: 960px) { .split { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); } }
.types { list-style: none; margin: 1.25rem 0 1.5rem; padding: 0; font: 400 1.12rem/1.3 var(--sans); }
.types li { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--rule); }
.types li:first-child { border-top: 1px solid var(--rule); }
.types a { color: var(--ink); text-decoration: none; font-weight: 700; }
.types a:hover { color: var(--link); text-decoration: underline; }
.types .n { color: var(--faded); font-variant-numeric: tabular-nums; }
.more { margin: 0; font: 400 1.05rem/1.4 var(--sans); }
.albums { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 1.5rem 1.1rem; }
.albums a { display: block; color: var(--ink); text-decoration: none; }
.albums img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; background: #fff; padding: 5px; box-shadow: var(--shadow); border-radius: 2px; }
.albums span { display: block; font: 700 1rem/1.3 var(--sans); margin-top: .65rem; }
.albums a:hover span { color: var(--link); text-decoration: underline; }

.about { display: grid; gap: 2rem 3.5rem; align-items: center; }
@media (min-width: 760px) { .about { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
.about-img { justify-self: center; }
.about-img img { display: block; max-width: 100%; height: auto; background: #fff; padding: 8px; box-shadow: var(--shadow); }
.about blockquote { margin: 1rem 0 1.25rem; font: italic 400 clamp(1.3rem, 1.1rem + .8vw, 1.7rem)/1.45 var(--serif); }
.about blockquote p { margin: 0; }
.farewell { text-align: center; font: italic 400 1.25rem/1.4 var(--serif); color: var(--faded); margin: 0; padding: 0 1rem clamp(3rem, 7vw, 5rem); }

/* ---------- enlarged photograph */
.viewer { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96vh; overflow: visible; }
.viewer::backdrop { background: rgba(6, 16, 26, .9); }
.viewer img { display: block; max-width: 96vw; max-height: 84vh; width: auto; height: auto; margin: 0 auto; background: #fff; }
.viewer-close { position: fixed; top: 1rem; right: 1rem; min-height: 2.75rem; padding: .6rem 1.1rem; border: 0; border-radius: 999px; background: #fff; color: #13385a; font: 700 1rem/1 var(--sans); cursor: pointer; }
.viewer-cap { color: #dfe9f2; text-align: center; font: 400 .95rem/1.4 var(--sans); margin: .8rem auto 0; max-width: 60ch; }

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

@media print {
  .masthead, .sitefoot, .related, .skip, .viewer, .hero-links { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  a { color: #000; }
  .prose { display: block; }
  img.ph { box-shadow: none; border: 1px solid #ccc; }
  .tablewrap { overflow: visible; border-color: #999; }
}
