/* History: year tree. Each event hangs off its year with a ├ or └ connector. */

.tree { margin-top: 1rem; }
.tree-year { display: grid; grid-template-columns: 8rem 1fr; gap: 0 1.5rem; padding: 1.5rem 0; border-top: 1px solid var(--line); }
.tree-y {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(2.6rem, 6vw, 3.6rem); line-height: 1;
  color: var(--text);
  position: sticky; top: 5rem; align-self: start;
}

.tree-events { list-style: none; position: relative; }
.tree-ev { position: relative; padding: 0.4rem 0 1.6rem 2.4rem; }
/* vertical line down the left, stopping at the last event's connector */
.tree-ev::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  border-left: 1px solid var(--line-gold);
}
.tree-ev:last-child::before { bottom: auto; height: 1.15rem; }
/* horizontal branch into each event */
.tree-ev::after {
  content: ''; position: absolute; left: 0; top: 1.15rem;
  width: 1.6rem; border-top: 1px solid var(--line-gold);
}
.tree-ev.major::after { border-top: 2px solid var(--gold); }

.tree-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-bottom: 0.3rem; }
.tree-date { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.tree-ev .h-sub { font-size: 1.3rem; margin: 0.2rem 0 0.3rem; }
.tree-ev.major .h-sub { color: var(--text); }
.tree-ev p { color: #cfc7bb; max-width: 64ch; }

.source { display: inline-block; margin-top: 0.5rem; font-size: 0.78rem; color: var(--faint); }
a.source { color: var(--muted); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 2px; }
a.source:hover { color: var(--text); }

.undated { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem 2.5rem; }

@media (max-width: 680px) {
  .tree-year { grid-template-columns: 1fr; }
  .tree-y { position: static; margin-bottom: 0.8rem; }
}
