:root {
  color-scheme: light;
  --ink: #1e342b;
  --green: #254d3f;
  --muted: #57665a;
  --line: #d6d8c9;
  --sheet: #f8f7ee;
  --gold: #d5b575;
  --serif: "Baskervville", Baskerville, Georgia, serif;
  --sans: "DM Sans", "Helvetica Neue", Arial, sans-serif;
  font: 100%/1.5 var(--sans);
  color: var(--ink);
  background: var(--sheet);
}
* {
  box-sizing: border-box;
}
body,
figure,
h1,
h2,
h3,
h4,
p {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
select {
  cursor: pointer;
}
button {
  color: inherit;
}
button:focus-visible,
select:focus-visible,
input:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #bb9042;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.icon svg {
  width: 1.05em;
  height: 1.05em;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font: 600 24px/1 var(--serif);
  letter-spacing: -0.035em;
}
.wordmark img {
  display: block;
}
.gate-top,
.appbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(24px, 5vw, 90px);
  height: 84px;
  border-bottom: 1px solid var(--line);
  background: #f8f7ee;
}
.securelabel,
.lock-button {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 0.88rem;
  color: #425e4e;
}
.securelabel .icon {
  font-size: 16px;
}
.gate-grid {
  display: grid;
  grid-template-columns: minmax(390px, 0.93fr) 1.07fr;
  min-height: calc(100svh - 84px);
}
.gate-copy {
  background: #17392f;
  color: var(--sheet);
  padding: clamp(48px, 6vw, 110px);
  display: grid;
  align-items: center;
}
.gate-content {
  max-width: 440px;
  width: 100%;
  margin: auto;
}
.eyebrow {
  text-transform: uppercase;
  font-weight: 620;
  font-size: 0.78rem;
  letter-spacing: 0.13em;
  display: flex;
  align-items: center;
  gap: 11px;
}
.eyebrow > span {
  width: 28px;
  height: 1px;
  background: currentColor;
}
.gate-copy .eyebrow {
  color: #dbbd80;
}
.gate-copy h1 {
  font: normal clamp(76px, 7.2vw, 124px)/0.89 var(--serif);
  letter-spacing: -0.066em;
  margin: 25px 0 25px;
}
.gate-copy h1 i {
  font-weight: normal;
  color: #e4c995;
}
.intro {
  color: #e0e5d9;
  font: normal 1.08rem/1.6 var(--sans);
  max-width: 365px;
}
.gate-copy form {
  margin-top: 36px;
  max-width: 395px;
}
.gate-copy label {
  font-size: 0.88rem;
  font-weight: 550;
  display: block;
  margin-bottom: 8px;
}
.password-field {
  display: flex;
  align-items: center;
  background: #23473b;
  border: 1px solid #778c77;
  border-radius: 5px;
}
.password-field input {
  background: transparent;
  border: 0;
  color: white;
  min-width: 0;
  padding: 12px 14px;
  flex: 1;
  line-height: 1.5;
}
.eye {
  display: grid;
  place-items: center;
  align-self: stretch;
  width: 46px;
  background: transparent;
  border: 0;
  color: #e9e4d4;
}
.eye .icon {
  font-size: 20px;
}
.enter {
  border: 1px solid #ddc18c;
  background: #e4c995;
  border-radius: 5px;
  color: #18372c;
  width: 100%;
  padding: 13px 19px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 650;
}
.enter:hover {
  background: #efd6a5;
}
.enter:disabled {
  cursor: wait;
  opacity: 0.8;
}
#gate-message {
  color: #ffe0ae;
  font-size: 0.9rem;
  margin: 10px 0;
  min-height: 0;
}
#gate-message:empty {
  margin: 13px 0;
}
.privacy {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #bdccbc;
  font-size: 0.83rem;
  margin-top: 22px;
}
.gate-art {
  position: relative;
  min-height: 430px;
  background: #d0c9a3;
  overflow: hidden;
}
.gate-art img {
  position: absolute;
  height: 100%;
  width: 100%;
  object-fit: cover;
  object-position: 83% center;
}
.gate-art:after {
  content: "";
  position: absolute;
  inset: 50% 0 0;
  background: linear-gradient(transparent, rgba(25, 42, 32, 0.75));
}
.gate-art figcaption {
  position: absolute;
  z-index: 1;
  left: 9%;
  bottom: 8%;
  color: #fff8e6;
  display: grid;
  gap: 3px;
}
.gate-art figcaption span {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.17em;
}
.gate-art figcaption i {
  font: italic clamp(32px, 3vw, 54px)/1.1 var(--serif);
}
.appbar {
  height: 72px;
  gap: 26px;
}
.appbar nav {
  display: flex;
  gap: 6px;
  flex: 1;
}
.appbar nav button,
.lock-button {
  background: none;
  border: 0;
  padding: 9px 13px;
  border-radius: 5px;
}
.appbar nav button[aria-pressed="true"] {
  background: #e7ebdf;
  color: var(--green);
  font-weight: 650;
}
.lock-button {
  border: 1px solid var(--line);
}
.archive {
  max-width: 1740px;
  margin: auto;
  padding: 35px clamp(16px, 4.6vw, 80px) 44px;
}
.archive-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 25px;
}
.archive-head h1 {
  font: normal clamp(40px, 4.4vw, 68px)/1.05 var(--serif);
  letter-spacing: -0.045em;
  margin: 6px 0 3px;
}
.archive-head .eyebrow {
  color: #657355;
}
.sub,
.dir-head span {
  color: var(--muted);
  font-size: 0.92rem;
}
.searchbox {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffef8;
  padding: 9px 14px;
  color: var(--muted);
}
.searchbox input {
  background: transparent;
  border: 0;
  min-width: 0;
  width: 210px;
  color: var(--ink);
}
.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(295px, 325px);
  gap: 18px;
  align-items: start;
}
.mainpane,
.profile {
  min-width: 0;
  background: #fffef8;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.tree-tools,
.dir-head,
.tree-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  gap: 12px;
}
.tree-tools h2,
.dir-head h2 {
  font: 600 1.58rem/1.15 var(--serif);
  letter-spacing: -0.025em;
}
.tree-tools .eyebrow {
  color: var(--muted);
  font-size: 0.7rem;
}
.depth {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.86rem;
  color: var(--muted);
}
select {
  padding: 5px 7px;
  background: #fffef8;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
}
#window {
  height: clamp(400px, 59vh, 760px);
  overflow: auto;
  position: relative;
  background:
    radial-gradient(#93a18d44 0.8px, transparent 0.9px) 0 0/16px 16px,
    #f4f5eb;
  border-block: 1px solid var(--line);
  overscroll-behavior: contain;
  cursor: grab;
}
#window.dragging {
  cursor: grabbing;
  user-select: none;
}
#drawing {
  position: relative;
  margin: auto;
}
#edges,
#cards {
  position: absolute;
  inset: 0;
  overflow: visible;
}
#edges {
  pointer-events: none;
}
.person-node {
  position: absolute;
  background: #fffef8;
  border: 1.2px solid #a3b49c;
  border-radius: 7px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 4px;
  line-height: 1.08;
  color: #284236;
  box-shadow: 0 2px 3px #273d2f0b;
}
.person-node strong {
  font: 600 1.07em/1.04 var(--serif);
  text-wrap: balance;
}
.person-node small {
  font-size: 0.69em;
  color: #576a59;
  line-height: 1.1;
  margin-top: 3px;
}
.person-node[aria-pressed="true"] {
  background: #24473a;
  color: #fff9e5;
  border-color: #24473a;
}
.person-node[aria-pressed="true"] small {
  color: #dfddc7;
}
.person-node:hover {
  border-color: #476e50;
  box-shadow: 0 2px 7px #4054402c;
}
.tree-footer {
  padding: 9px 14px;
  min-height: 54px;
  flex-wrap: wrap;
}
.legend,
.zooms {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.79rem;
  color: var(--muted);
}
.legend b {
  width: 21px;
  border-top: 2px solid #5a7864;
  margin-left: 8px;
}
.legend .dashed {
  border-top-style: dashed;
}
.zooms button,
.profile button.action {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fffef8;
  padding: 5px 9px;
  min-height: 33px;
}
.zooms button:hover,
.profile button.action:hover {
  background: #edf0e4;
}
.zooms button:disabled {
  opacity: 0.45;
  cursor: default;
}
.profile {
  padding: 22px;
  max-height: calc(100svh - 118px);
  overflow-y: auto;
}
.profile .eyebrow {
  color: #66755f;
}
.profile h2 {
  font: 600 2.15rem/1.02 var(--serif);
  letter-spacing: -0.04em;
  margin: 12px 0;
}
.profile .action {
  font-size: 0.84rem;
  margin: 0 0 3px;
}
.profile h3 {
  font: 600 1.27rem/1.2 var(--serif);
  margin: 20px 0 9px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.profile h4 {
  font-size: 0.92rem;
}
.profile p,
.profile li,
.profile summary {
  font-size: 0.9rem;
  line-height: 1.5;
}
.profile p + p {
  margin-top: 8px;
}
.profile small {
  font-size: 0.79rem;
  color: var(--muted);
}
.profile details {
  margin: 8px 0;
}
.profile summary {
  cursor: pointer;
  color: #345342;
}
.profile details p {
  margin-top: 6px;
}
.profile ul {
  padding-left: 18px;
}
.profile a {
  color: #2c604b;
  text-underline-offset: 2px;
}
.kin {
  background: none;
  padding: 3px 0;
  color: #24573f;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-align: left;
}
.fact {
  margin-top: 8px;
}
.row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.dir-head {
  border-bottom: 1px solid var(--line);
}
#directory {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0 16px;
  padding: 8px 18px;
  max-height: 65vh;
  overflow: auto;
}
.entry {
  display: grid;
  text-align: left;
  align-content: center;
  min-height: 67px;
  gap: 3px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 8px 4px;
}
.entry strong {
  font: 600 1.15rem/1.08 var(--serif);
}
.entry small {
  color: var(--muted);
  font-size: 0.81rem;
}
.entry[aria-pressed="true"],
.entry:hover {
  background: #eef1e7;
}
.empty {
  padding: 24px;
  color: var(--muted);
}
@media (max-width: 850px) {
  .gate-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
  .gate-copy {
    padding: 44px 30px;
  }
  .workspace-grid {
    grid-template-columns: minmax(0, 1fr) 265px;
  }
  .archive {
    padding-inline: 16px;
  }
  .appbar {
    padding-inline: 20px;
  }
  .profile {
    padding: 16px;
  }
}
@media (max-width: 700px) {
  .gate-top {
    height: 65px;
    padding-inline: 20px;
  }
  .gate-grid {
    display: flex;
    flex-direction: column;
    min-height: calc(100svh - 65px);
  }
  .gate-copy {
    padding: 39px 25px 38px;
    flex: 1;
  }
  .gate-content {
    max-width: 450px;
  }
  .gate-copy h1 {
    font-size: 75px;
    margin: 16px 0;
  }
  .gate-copy h1 br {
    display: none;
  }
  .gate-copy h1 i::before {
    content: " ";
  }
  .gate-copy form {
    margin-top: 23px;
    max-width: none;
  }
  .gate-art {
    min-height: 180px;
    max-height: 240px;
  }
  .gate-art img {
    object-position: center 64%;
  }
  .gate-art figcaption {
    left: 24px;
    bottom: 18px;
  }
  .appbar {
    flex-wrap: wrap;
    height: auto;
    padding: 12px 14px 6px;
    gap: 8px;
  }
  .appbar .wordmark {
    font-size: 21px;
  }
  .appbar nav {
    order: 3;
    flex-basis: 100%;
  }
  .appbar nav button {
    padding: 6px 11px;
  }
  .lock-button {
    margin-left: auto;
  }
  .archive {
    padding-top: 20px;
  }
  .archive-head {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }
  .searchbox input {
    width: 100%;
  }
  .workspace-grid {
    grid-template-columns: 1fr;
  }
  .profile {
    max-height: none;
    scroll-margin: 15px;
  }
  .depth {
    gap: 4px;
  }
  .tree-tools {
    padding: 12px;
  }
  .tree-tools h2 {
    font-size: 1.27rem;
  }
  #window {
    height: 400px;
  }
  .wide {
    display: none;
  }
  #directory {
    max-height: 52vh;
  }
  .archive-head h1 {
    font-size: 44px;
  }
}
.profile-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 10px 0;
}
.relation-label {
  color: var(--muted);
}
.kin-list {
  display: flex;
  align-items: start;
  flex-direction: column;
}
.source {
  margin: 10px 0 14px;
  padding-left: 10px;
  border-left: 2px solid var(--line);
  font-size: 0.87rem;
  overflow-wrap: anywhere;
}
.source strong,
.source small {
  display: block;
}
.source a {
  display: inline-block;
  margin-top: 3px;
}
.person-media {
  margin: 16px 0 8px;
}
.person-media img {
  max-width: 100%;
  max-height: 320px;
  object-fit: contain;
  background: #eeecdf;
  border-radius: 4px;
  display: block;
}
.person-media figcaption {
  font-size: 0.79rem;
  line-height: 1.4;
  margin-top: 6px;
  color: var(--muted);
}
.dir-filter {
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.dir-filter input {
  accent-color: var(--green);
}
.other-names {
  color: var(--muted);
}
#origins-view {
  max-height: 74vh;
  overflow: auto;
}
#origins,
#album {
  padding: 0 20px 18px;
}
.origin-card {
  padding: 18px 0 16px;
  border-bottom: 1px solid var(--line);
}
.origin-card h3 {
  font: 600 1.5rem/1.14 var(--serif);
  margin: 4px 0 8px;
}
.origin-card .eyebrow {
  color: var(--muted);
  font-size: 0.68rem;
}
.origin-card p,
.origin-card details {
  font-size: 0.92rem;
}
.origin-card summary {
  cursor: pointer;
}
.origin-card .confidence {
  color: var(--green);
  margin: 7px 0;
}
.origin-card .kin {
  font-size: 0.91rem;
  margin: 0 0 4px;
}
#album {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
  gap: 16px;
}
.image-trigger {
  padding: 0;
  border: 0;
  background: #ecebdc;
  display: block;
  position: relative;
  cursor: zoom-in;
  width: 100%;
  border-radius: 4px;
}
.image-trigger img {
  width: 100%;
  height: auto;
}
.image-trigger span {
  position: absolute;
  right: 6px;
  bottom: 6px;
  color: white;
  background: #243e32e8;
  padding: 2px 6px;
  font-size: 0.72rem;
  border-radius: 3px;
}
.person-media a,
#viewer a,
.origin-card a {
  overflow-wrap: anywhere;
  color: var(--green);
}
#viewer {
  width: min(1000px, 94vw);
  max-height: 92svh;
  overflow: auto;
  background: var(--sheet);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}
#viewer::backdrop {
  background: #10271fd9;
}
#viewer header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
#viewer h2 {
  font: 600 1.55rem var(--serif);
}
#close-viewer {
  border: 1px solid var(--line);
  background: #fffef8;
  padding: 6px 14px;
  border-radius: 4px;
}
#viewer-content img {
  display: block;
  max-width: 100%;
  margin: 0 auto 10px;
}
#viewer-content small {
  display: block;
  margin-top: 6px;
}
.dir-head {
  flex-wrap: wrap;
}
#pan-tip {
  font-size: 0.76rem;
  color: var(--muted);
}
@media (max-width: 700px) {
  #origins-view {
    max-height: none;
  }
  .tree-footer {
    gap: 4px;
  }
  .tree-footer .legend b {
    width: 15px;
    margin-left: 2px;
  }
  #pan-tip {
    order: 3;
    width: 100%;
  }
}
.legend-info {
  position: relative;
}
.legend-info summary {
  display: flex;
  align-items: center;
  cursor: pointer;
}
.legend-info summary::after {
  content: "⌄";
  margin-left: 4px;
  color: var(--muted);
}
.legend-info p {
  position: absolute;
  bottom: 100%;
  z-index: 1;
  background: #fffef8;
  padding: 12px;
  width: min(254px, 75vw);
  border: 1px solid var(--line);
  border-radius: 5px;
  box-shadow: 0 3px 12px #20392920;
  font-size: 0.85rem;
}
.chart-download {
  padding: 0 20px 20px;
}
.chart-download a {
  color: var(--green);
  text-underline-offset: 3px;
}
#published-photos {
  padding: 15px 20px;
}
.photo-links {
  display: grid;
  gap: 12px;
}
.photo-links small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}
.photo-links a {
  color: var(--green);
  text-underline-offset: 3px;
}
