.site-map {
    --map-ink: #253f56;
    --map-link: #315d7b;
    --map-line: #cbd9e2;
    color: var(--map-ink);
    line-height: 1.45;
}
.site-map ul { list-style: none; margin: 0; padding: 0; }
.site-map h2, .site-map p { margin: 0; }
.site-map a, .site-map summary { overflow-wrap: anywhere; }
.site-map :is(a, button, summary):focus-visible { outline: 2px solid #356a90; outline-offset: -2px; border-radius: 4px; }
.map-intro { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 18px; color: #536574; }
.map-xml { font-size: 13px; color: var(--map-link); text-decoration: underline; text-underline-offset: 3px; }
.map-panel { border: 1px solid #d8e1e7; border-radius: 10px; margin-bottom: 16px; background: white; }
.site-map [id] { scroll-margin-top: calc(var(--purchase-header-height, 150px) + 12px); }
.map-panel-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; padding: 12px 16px; border-radius: 10px 10px 0 0; border-bottom: 1px solid #e0e7ec; background: #f4f7f9; }
.map-panel-head h2 { color: var(--map-ink); font: bold 18px/1.3 'exo_2regular', Arial, sans-serif; }
.map-panel-head svg { flex: none; width: 22px; height: 22px; fill: none; stroke: #a95213; stroke-width: 1.6; stroke-linejoin: round; }
.map-toggle { margin-left: auto; border: 1px solid #c8d7e1; border-radius: 5px; padding: 6px 10px; background: white; color: var(--map-link); font: inherit; font-size: 13px; cursor: pointer; }
.map-toggle:hover, .map-pages a:hover, .map-children a:hover { background: #edf3f7; color: #18354b; }
.site-map .map-pages { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 20px; padding: 8px 14px; }
.map-pages a { display: flex; align-items: baseline; gap: 9px; padding: 8px; border-radius: 5px; color: var(--map-link); }
.map-pages a::before { content: '→'; color: #668196; font-size: .9em; }
.site-map .map-branches { padding: 10px 14px 10px 16px; }
.site-map :is(.map-branches, .map-children) > li { position: relative; margin: 0; padding-left: 19px; }
.site-map :is(.map-branches, .map-children) > li::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; border-left: 1px solid var(--map-line); }
.site-map :is(.map-branches, .map-children) > li::after { content: ''; position: absolute; left: 0; top: var(--map-joint); width: 14px; border-top: 1px solid var(--map-line); }
.site-map :is(.map-branches, .map-children) > li:last-child::before { height: var(--map-joint); }
.map-branches > li { --map-joint: 22px; }
.map-children > li { --map-joint: 18px; }
.site-map summary { display: flex; align-items: center; gap: 10px; padding: 7px 9px; box-sizing: border-box; cursor: pointer; list-style: none; border-radius: 5px; }
.site-map summary::-webkit-details-marker { display: none; }
.site-map summary::after { content: ''; flex: none; width: 7px; height: 7px; margin: 0 4px 0 auto; border: solid #587082; border-width: 0 1.5px 1.5px 0; transform: rotate(-45deg); }
.site-map details[open] > summary::after { transform: rotate(45deg); }
.map-group > summary { min-height: 44px; font-weight: bold; }
.site-map summary:hover { background: #f0f4f6; }
.map-group[open] > summary { background: #fff1e4; color: #78380c; }
.map-folder { position: relative; box-sizing: border-box; flex: none; width: 18px; height: 12px; margin-top: 3px; border: 1.5px solid #987043; border-radius: 2px; background: #fff7ec; }
.map-folder::before { content: ''; position: absolute; top: -4px; left: -1.5px; width: 7px; height: 3px; border: 1.5px solid #987043; border-bottom: 0; border-radius: 2px 2px 0 0; background: #fff7ec; }
.map-count { margin-left: auto; padding: 1px 7px; background: #edf2f5; color: #496174; border-radius: 10px; font: 12px/1.6 Arial, sans-serif; }
.map-group > summary:has(.map-count)::after { margin-left: 2px; }
.site-map .map-children { margin: 2px 0 7px 18px; }
.map-material > summary, .map-children a { min-height: 36px; }
.map-material[open] > summary { background: #eef3f6; font-weight: bold; }
.map-children a { display: flex; align-items: center; padding: 6px 9px; box-sizing: border-box; border-radius: 4px; color: var(--map-link); }
.map-overview { font-size: .92em; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 600px) {
    .map-panel-head { padding: 10px; }
    .map-panel-head h2 { font-size: 16px; }
    .map-toggle { min-height: 38px; padding-inline: 7px; }
    .site-map .map-pages { grid-template-columns: 1fr; padding: 5px 8px; }
    .map-pages a, .map-material > summary, .map-children a { min-height: 44px; align-items: center; box-sizing: border-box; }
    .site-map .map-branches { padding: 6px 6px 6px 9px; }
    .site-map :is(.map-branches, .map-children) > li { padding-left: 11px; }
    .site-map :is(.map-branches, .map-children) > li::after { width: 9px; }
    .site-map .map-children { margin-left: 10px; }
    .map-children > li { --map-joint: 22px; }
    .site-map summary { gap: 6px; }
}
@media (max-width: 980px) {
    #content:has(.site-map) > .main { order: 0; }
}
