/* elizagen.org shared stylesheet */
:root {
  --bg: #fdfcf9;
  --text: #222;
  --muted: #5b6770;
  --accent: #134f5c;
  --link: #1b6a7d;
  --rule: #d9d6cf;
  --header-bg: #134f5c;
  --header-text: #fff;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161a1c;
    --text: #e4e4e0;
    --muted: #9aa5ab;
    --accent: #7fc3d2;
    --link: #8fd0de;
    --rule: #33393c;
    --header-bg: #0e3a44;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 Lato, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--link); }
header {
  background: var(--header-bg);
  color: var(--header-text);
  padding: 18px 16px 10px;
  text-align: center;
}
header .sitename {
  color: var(--header-text);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
}
header .tagline { display: block; opacity: 0.85; margin-bottom: 10px; }
nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; }
nav a { color: var(--header-text); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
nav a:hover, nav a.current { border-bottom-color: var(--header-text); }
main { max-width: 860px; margin: 0 auto; padding: 16px; overflow-wrap: break-word; }
section { margin: 0; }
p { margin: 0.7em 0; }
p.tight { margin: 0.15em 0; }
p.indent { margin-left: 2em; }
p.shaded { background: rgba(127,127,127,0.1); padding: 0 6px; font-family: "Courier New", monospace; font-size: 0.92em; }
h1 + p, h2 + p, h3 + p { margin-top: 0.3em; }
h1, h2, h3, h4 { color: var(--accent); line-height: 1.25; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; margin-top: 1.4em; }
h3 { font-size: 1.2rem; }
.center { text-align: center; }
.right { text-align: right; }
img { max-width: 100%; height: auto; }
.block > a > img, .block > img { display: block; margin: 0.5em auto; max-height: 600px; width: auto; }
.embed { position: relative; width: 100%; aspect-ratio: 4 / 3; margin: 1em 0; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 1px solid var(--rule); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin: 1em 0; }
.gallery figure { margin: 0; }
.gallery img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border: 1px solid var(--rule); }
.gallery figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 4px; }
code, pre { font-family: "Courier New", monospace; font-size: 0.92em; }
pre { overflow-x: auto; }
table { border-collapse: collapse; max-width: 100%; display: block; overflow-x: auto; }
td, th { border: 1px solid var(--rule); padding: 4px 8px; vertical-align: top; }
footer { border-top: 1px solid var(--rule); color: var(--muted); font-size: 0.9rem; text-align: center; padding: 16px; margin-top: 2em; }

/* genealogy page */
.lede { font-size: 1.15rem; }
figure.wide { margin: 1em 0; text-align: center; }
figure.wide img { display: block; margin: 0 auto; background: #fff; border: 1px solid var(--rule); }
figure.wide figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 6px; text-align: left; }
dl.features dt { font-weight: 700; margin-top: 0.6em; }
dl.features dd { margin: 0.1em 0 0 1.5em; }
.matrix-wrap { overflow-x: auto; margin: 1em 0; }
table.matrix { display: table; font-size: 0.85rem; border-collapse: collapse; }
table.matrix th, table.matrix td { border: 1px solid var(--rule); padding: 2px 6px; }
table.matrix thead th { vertical-align: bottom; height: 11em; padding: 4px 2px; }
table.matrix thead th span { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; font-weight: 600; }
table.matrix thead th:first-child { vertical-align: bottom; text-align: left; }
table.matrix tbody th { text-align: left; font-weight: normal; white-space: nowrap; }
table.matrix .eid { color: var(--muted); font-variant-numeric: tabular-nums; }
table.matrix td { text-align: center; width: 1.8em; }
table.matrix td.yes { background: rgba(19,79,92,0.18); color: var(--accent); font-weight: 700; }
table.matrix td.unk { color: var(--muted); }
table.matrix tbody tr:hover { background: rgba(127,127,127,0.08); }
