.timeline-page { --tree-ink:#253b36; --tree-leaf:#426b5c; --tree-gold:#aa8453; --tree-paper:#f7f5ef; background:var(--tree-paper); }
.tree-hero { background:var(--tree-ink); color:#fff; padding:2.8rem 0 2rem; position:relative; overflow:hidden; }
.tree-hero::after { content:""; width:42%; height:110%; border:1px solid #a7bc9c55; border-radius:50%; position:absolute; right:-12%; top:8%; transform:rotate(-35deg); pointer-events:none; }
.tree-hero .eyebrow { color:#dbc49e; }
.tree-hero h1 { font-family:Georgia,serif; font-size:clamp(2.3rem,5vw,4rem); line-height:1.09; margin:.6rem 0 1rem; font-weight:normal; letter-spacing:-.03em; }
.tree-intro { max-width:42rem; font-size:1.1rem; line-height:1.6; color:#f2f0e7; }
.tree-numbers { display:flex; flex-wrap:wrap; gap:1.4rem; font-size:.9rem; margin:1.2rem 0; color:#ddc7a7; }
.tree-numbers span { border-left:1px solid #a7bc9c66; padding-left:1.4rem; }
.tree-hero .btn { background:#ddc7a7; color:#223b32; border-color:#ddc7a7; }
.tree-method { max-width:48rem; margin-top:1.2rem; font-size:.85rem; position:relative; z-index:1; }
.tree-method summary { cursor:pointer; text-decoration:underline; text-underline-offset:4px; }
.tree-method p { color:#e2e8df; line-height:1.7; }
.tree-explore { padding-top:1.4rem; padding-bottom:.5rem; scroll-margin-top:100px; }
.tree-filters { max-width:380px; margin:0 auto; }
.tree-filters[hidden],.tree-station[hidden],.tree-empty[hidden],.tree-navigator[hidden] { display:none; }
.tree-filters label { display:grid; gap:.35rem; font-size:.85rem; font-weight:600; text-align:center; }
.tree-filters select { width:100%; min-height:44px; background:#fffefa; border:1px solid #9caa9c; border-radius:4px; padding:.6rem; font:inherit; font-weight:normal; color:#24382e; }
.tree-timeline { position:relative; padding-top:1.4rem; padding-bottom:1.4rem; isolation:isolate; }
.tree-timeline::after { content:""; position:absolute; inset:0; background:url('../img/timeline-tree.svg') repeat-y center top / min(100%,1100px) 1150px; opacity:.09; pointer-events:none; z-index:-1; }
.tree-timeline::before { content:""; position:absolute; left:50%; top:0; bottom:0; width:5px; transform:translateX(-50%); background:linear-gradient(#b0b898,#6b8665 12%,#426b5c 70%,#a3b28d); border-radius:5px; }
.tree-station { position:relative; display:grid; grid-template-columns:minmax(0,1fr) 70px minmax(0,1fr); align-items:start; margin-bottom:1.3rem; scroll-margin-top:var(--tree-scroll-offset,180px); }
.tree-station::before { content:""; position:absolute; width:35px; height:2px; background:#7c9875; top:2.2rem; right:50%; }
.tree-station.is-right::before { right:auto; left:50%; }
.tree-node { position:absolute; left:calc(50% - 7px); top:calc(2.2rem - 6px); width:14px; height:14px; background:#426b5c; border:3px solid var(--tree-paper); border-radius:50%; z-index:1; }
.tree-station-inner { grid-column:1; grid-row:1; padding:1.2rem; border:1px solid #d8ddce; border-radius:4px 22px 4px 4px; background:#fffefaf5; box-shadow:0 4px 18px #2f493008; min-width:0; }
.tree-station.is-right .tree-station-inner { grid-column:3; border-radius:22px 4px 4px 4px; }
.tree-category { grid-column:3; grid-row:1; align-self:start; margin:1.6rem 0 0; max-width:20rem; font-size:clamp(1rem,1.3vw,1.2rem); font-weight:600; line-height:1.55; letter-spacing:.04em; text-transform:uppercase; color:#4a6a50; padding:.45rem 0; }
.tree-station.is-right .tree-category { grid-column:1; text-align:right; justify-self:end; }
.tree-station-inner>p { line-height:1.7; font-size:.94rem; margin:0; }
.tree-station-inner h2.sr-only { margin:0; }
.tree-station:not(:has(.sr-only)) h2 { font-size:1.2rem; }
.timeline-page:not(.tree-ready) .tree-station h2.sr-only { position:static; width:auto; height:auto; clip:auto; overflow:visible; white-space:normal; margin-bottom:.8rem; }
.tree-evidence-list { display:grid; grid-template-columns:repeat(var(--evidence-columns,2),minmax(0,1fr)); gap:.65rem; list-style:none; padding:0; margin:1rem 0 0; }
.tree-evidence { min-width:0; border-top:1px solid #dedfce; padding-top:.6rem; }
.tree-evidence>a { color:var(--tree-ink); text-decoration:none; display:block; }
.tree-evidence>a:hover .tree-evidence-title { text-decoration:underline; }
.tree-evidence img,.tree-media-label { display:block; width:100%; height:auto; aspect-ratio:1.55; max-height:155px; object-fit:contain; background:#eeeee5; border-radius:3px; }
.tree-media-label { display:grid; place-content:center; color:#426b5c; font:2.2rem Georgia,serif; }
.tree-kind { display:block; color:#5a6e54; font-size:.67rem; margin:.5rem 0 .25rem; }
.tree-evidence-title { display:block; font-size:.8rem; line-height:1.4; font-weight:600; overflow-wrap:anywhere; }
.tree-date { display:block; font-size:.68rem; line-height:1.4; color:#5f6357; margin-top:.3rem; }
.tree-evidence audio { width:100%; min-width:0; height:36px; margin-top:.5rem; }
.tree-evidence small { display:block; font-size:.65rem; line-height:1.4; color:#5f6357; }
.tree-navigator { position:fixed; left:50%; top:100px; transform:translateX(-50%); display:flex; align-items:center; gap:.7rem; width:max-content; max-width:min(720px,calc(100% - 24px)); z-index:90; background:#fffefaf7; color:var(--tree-ink); border:1px solid #bcc7ad; border-radius:12px; padding:.5rem; box-shadow:0 4px 24px #20382f24; opacity:1; visibility:visible; transition:opacity .22s,transform .22s,visibility .22s; }
.tree-navigator.is-idle { opacity:0; visibility:hidden; pointer-events:none; transform:translate(-50%,-8px); }
.tree-navigator-caption { min-width:0; text-align:center; padding:0 .25rem; }
.tree-navigator-caption p { font-size:.9rem; font-weight:600; line-height:1.4; margin:0; overflow-wrap:anywhere; }
.tree-navigator-caption small { display:block; font-size:.65rem; color:#5d7058; margin-top:.15rem; }
.tree-navigator button { display:grid; place-items:center; flex:0 0 42px; width:42px; height:42px; border:0; border-radius:7px; background:#e7ecde; color:#294835; font:1.5rem Georgia,serif; cursor:pointer; touch-action:manipulation; }
.tree-navigator button:hover { background:#d5dfc8; }
.tree-navigator button:disabled { opacity:.3; cursor:default; }
.tree-end { text-align:center; padding:2rem 0 2.8rem; }
.tree-end h2 { font:normal 1.8rem Georgia,serif; color:var(--tree-ink); }
.tree-end p { max-width:42rem; margin:1rem auto 1.3rem; }
.tree-end>a { display:inline-block; margin:.5rem; }
.timeline-page a:focus-visible,.timeline-page button:focus-visible,.timeline-page summary:focus-visible,.timeline-page select:focus-visible { outline:3px solid #b38036; outline-offset:4px; }
@media(min-width:1300px) { .tree-timeline { max-width:1400px; } }
@media(max-width:700px) {
  .tree-hero { padding-top:2rem; }
  .tree-timeline { padding-left:10px; padding-right:10px; }
  .tree-timeline::before { left:calc(18% + 16px); }
  .tree-station { grid-template-columns:minmax(58px,18%) 20px minmax(0,1fr); }
  .tree-station .tree-station-inner,.tree-station.is-right .tree-station-inner { grid-column:3; padding:.85rem; border-radius:16px 4px 4px 4px; }
  .tree-station .tree-category,.tree-station.is-right .tree-category { grid-column:1; text-align:right; justify-self:end; font-size:.78rem; line-height:1.5; letter-spacing:0; overflow-wrap:anywhere; margin-top:1.7rem; }
  .tree-station::before,.tree-station.is-right::before { left:calc(18% + 10px); right:auto; width:10px; }
  .tree-node { left:calc(18% + 3px); }
  .tree-timeline::after { background-size:850px 1000px; }
  .tree-navigator { gap:.3rem; }
  .tree-navigator-caption p { font-size:.78rem; }
  .tree-navigator button { flex-basis:38px; width:38px; height:42px; }
}
@media(max-width:480px) {
  .tree-evidence-list { grid-template-columns:1fr; gap:.7rem; }
  .tree-evidence>a { display:grid; grid-template-columns:66px minmax(0,1fr); column-gap:.55rem; align-items:start; }
  .tree-evidence img,.tree-media-label { grid-row:1/4; }
  .tree-kind { margin-top:0; }
  .tree-evidence-title { font-size:.74rem; }
  .tree-evidence audio { max-width:100%; }
  .tree-hero h1 { font-size:2.5rem; }
}
@media(prefers-reduced-motion:reduce) { .tree-navigator { transition:none; } }
@media print {
  .site-header,.site-footer,.tree-filters,.tree-method,.tree-evidence audio,.tree-navigator { display:none!important; }
  .tree-hero { color:#000; background:white; padding:1rem; }
  .tree-station { display:block; break-inside:avoid; }
  .tree-category { text-align:left!important; margin:1rem 0; }
  .tree-station h2.sr-only { position:static; width:auto; height:auto; clip:auto; overflow:visible; white-space:normal; margin-bottom:1rem; }
  .tree-timeline::before,.tree-timeline::after,.tree-node,.tree-station::before { display:none; }
}

/* A personal musical imprint above the existing branching chronological line. */
.tree-hero::after{border:0;border-radius:0;transform:none;inset:0 0 0 auto;width:50%;height:100%;background:url('../img/timeline-imprint.svg') no-repeat right center / contain;opacity:.36}
.tree-hero>.container{position:relative;z-index:1}
.tree-hero h1{max-width:820px;text-wrap:balance}
.tree-hero .eyebrow{margin:1rem 0 1.3rem;font-size:.85rem}
@media(max-width:700px){.tree-hero::after{width:90%;opacity:.13}.tree-station{grid-template-columns:minmax(72px,22%) 20px minmax(0,1fr)}.tree-timeline::before{left:calc(22% + 16px)}.tree-station::before,.tree-station.is-right::before{left:calc(22% + 10px)}.tree-node{left:calc(22% + 9px)}}

/* The current station controls live below its opposite category, never over the reading text. */
.tree-hero h1{color:#f1debc}
.tree-station-meta{grid-column:3;grid-row:1;max-width:23rem;min-width:0;margin-top:1.6rem}
.tree-station.is-right .tree-station-meta{grid-column:1;text-align:right;justify-self:end}
.tree-station-meta .tree-category{display:block;max-width:none;margin:0;padding:.45rem 0}
.tree-nav-slot{min-width:0}
.tree-navigator{position:relative;inset:auto;left:auto;top:auto;transform:none;width:100%;max-width:100%;box-sizing:border-box;z-index:auto;margin:.55rem 0 0;box-shadow:none;background:#fffdf6;border-color:#ccd2c0;border-radius:5px;gap:.4rem;padding:.45rem;align-items:center}
.tree-navigator.is-idle{transform:none}
.tree-navigator-caption{flex:1;min-width:0;text-align:center;padding:0}
.tree-navigator-caption p{font-size:.83rem;line-height:1.5}
.tree-navigator button{flex:0 0 34px;width:34px;height:36px;font-size:1.2rem}
@media(max-width:700px){
 .tree-station .tree-station-meta,.tree-station.is-right .tree-station-meta{grid-column:1;grid-row:1;text-align:right;justify-self:end;margin-top:1.6rem;max-width:100%}
 .tree-station-meta .tree-category,.tree-station.is-right .tree-station-meta .tree-category{font-size:.74rem;margin:0}
 .tree-navigator{display:grid;grid-template-columns:1fr 1fr;padding:.3rem;gap:.3rem}
 .tree-navigator-caption{grid-column:1/-1;grid-row:1}
 .tree-navigator-caption p{font-size:.68rem;line-height:1.4;overflow-wrap:anywhere}
 .tree-navigator-caption small{font-size:.6rem}
 .tree-navigator button{width:100%;height:30px;min-width:0;grid-row:2}
}
