#shchipin-tree { color: #24382e; padding: 20px 0; }
#shchipin-tree [hidden] { display: none !important; }
#shchipin-tree .sg-heading h2 { margin: 4px 0 8px; }
#shchipin-tree .sg-heading p { margin: 0; }
#shchipin-tree .sg-switch { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0; }
#shchipin-tree .sg-switch button { padding: 10px 16px; min-height: 44px; border: 1px solid #b9c2b5; border-radius: 4px; color: #24382e; background: #fffdf7; cursor: pointer; font: inherit; }
#shchipin-tree .sg-switch button[aria-pressed=true] { background: #28533f; color: #fffdf7; }
#shchipin-tree .sg-tree { position: relative; }
#shchipin-tree .sg-generation { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 28px; margin-bottom: 36px; }
#shchipin-tree .sg-generation:last-child { margin-bottom: 0; }
#shchipin-tree .sg-generation:not([data-generation="0"]) .sg-person:first-of-type { grid-column: 2; }
#shchipin-tree .sg-generation-label { display: none; }
#shchipin-tree .sg-person { position: relative; z-index: 1; min-height: 96px; padding: 12px 10px; border: 1px solid #b9c2b5; border-radius: 4px; background: #fffdf7; color: #24382e; text-align: left; font: 16px/1.3 Georgia,serif; overflow-wrap: anywhere; cursor: pointer; }
#shchipin-tree .sg-person small { display: block; font: 12px/1.4 system-ui,sans-serif; margin-top: 8px; color: #606a60; }
#shchipin-tree .sg-person[aria-pressed=true] { background: #28533f; color: #fffdf7; }
#shchipin-tree .sg-person[aria-pressed=true] small { color: #fffdf7; }
#shchipin-tree .sg-connections { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
#shchipin-tree .sg-connections path { fill: none; stroke: #606a60; stroke-width: 1.4; }
#shchipin-tree .sg-legend { display: flex; flex-wrap: wrap; gap: 18px; margin: 18px 0 26px; font: 12px/1.5 system-ui,sans-serif; color: #606a60; }
#shchipin-tree .sg-legend span::before { content: "— "; }
#shchipin-tree .sg-legend .sg-sibling-legend::before { content: "╌ "; }
#shchipin-tree .sg-detail { border-top: 1px solid #b9c2b5; padding-top: 20px; }
#shchipin-tree .sg-relation { margin-bottom: 8px; }
#shchipin-tree .sg-relation button { padding: 4px 0; border: 0; background: transparent; text-align: left; color: #28533f; text-decoration: underline; font: inherit; cursor: pointer; }
#shchipin-tree .sg-event { margin: 0; padding: 16px 0; border-top: 1px solid #b9c2b5; }
#shchipin-tree .sg-event h4 { margin: 0 0 10px; font-size: 18px; }
#shchipin-tree .sg-variant { margin: 8px 0 14px; }
#shchipin-tree .sg-variant-date { margin: 0 0 4px; }
#shchipin-tree .sg-source { display: block; font-size: 14px; overflow-wrap: anywhere; }
#shchipin-tree details { margin-top: 7px; font-size: 14px; }
#shchipin-tree summary { cursor: pointer; }
#shchipin-tree blockquote { margin: 10px 0; padding: 0 12px; }
@media(max-width:560px) {
 #shchipin-tree .sg-connections, #shchipin-tree .sg-legend { display: none; }
 #shchipin-tree .sg-generation { grid-template-columns: minmax(0,1fr); gap: 8px; margin-bottom: 20px; }
 #shchipin-tree .sg-generation-label { display: block; color: #606a60; font: 12px/1.5 system-ui,sans-serif; }
 #shchipin-tree .sg-generation:not([data-generation="0"]) .sg-person:first-of-type { grid-column: 1; }
 #shchipin-tree .sg-person { min-height: 70px; }
 #shchipin-tree .sg-relation button { min-height: 44px; }
}

#shchipin-tree .sg-research-note { margin: 18px 0; max-width: 75ch; }
#shchipin-tree .sg-version { display: block; margin: 6px 0; color: #765125; font-size: 13px; }
#shchipin-tree .sg-version-path { stroke: #997342; }
#shchipin-tree .sg-version-legend::before { content: "┄ "; color: #997342; }
#shchipin-tree .sg-book { border-top: 1px solid #b9c2b5; margin-top: 24px; padding-top: 18px; }
#shchipin-tree .sg-book details { scroll-margin-top: 100px; }
#shchipin-tree .sg-generation .sg-person:only-of-type { grid-column: 2; }
@media(max-width:560px) { #shchipin-tree .sg-generation .sg-person:only-of-type { grid-column: 1; } }
