/* ATT&CK mind map (/attack/map only) */
.am-tools button{font:inherit;font-size:.85rem;background:var(--ed-fill);color:var(--text);border:1px solid var(--hair);border-radius:4px;padding:.25rem .7rem;cursor:pointer}
.am-tools button:hover{border-color:var(--hair-strong)}
.am-wrap{overflow-x:auto;padding:1rem 0 1.5rem}
.am-wrap:focus-visible{outline:2px solid var(--brass);outline-offset:2px}
.am-tree,.am-tree ul{list-style:none;margin:0;padding:0}
.am-tree summary,.am-tree .am-link,.am-leaf a{display:inline-block;font-size:.88rem;line-height:1.3;padding:.3rem .6rem;border:1px solid var(--hair);border-radius:6px;background:var(--ed-fill);color:var(--text);text-decoration:none;white-space:nowrap}
.am-tree summary{cursor:pointer;list-style:none}
.am-tree summary::-webkit-details-marker{display:none}
.am-tree summary::before{content:"+";display:inline-block;width:1em;color:var(--brass);font-family:var(--mono)}
.am-tree details[open]>summary::before{content:"\2212"}
.am-tree details[open]>summary{border-color:var(--hair-strong);background:var(--ed-tint)}
.am-tree summary:hover,.am-tree .am-link:hover,.am-leaf a:hover{border-color:var(--hair-strong)}
.am-tree summary:focus-visible,.am-tree a:focus-visible{outline:2px solid var(--ice);outline-offset:2px}
.am-root>summary{font-weight:600;font-size:1rem;color:var(--brass)}
.am-tree .mono{font-family:var(--mono);font-size:.8em;color:var(--ice)}
.am-n{font-family:var(--mono);font-size:.72rem;color:var(--muted);margin-left:.3rem}
.am-go{font-size:.75rem;color:var(--muted);margin-left:.4rem}
.am-go:hover{color:var(--brass)}
.am-leaf a{font-size:.8rem;padding:.15rem .5rem}
/* vertical indented tree (default / mobile) */
.am-tree details>ul{margin-left:.9rem;padding-left:.9rem;border-left:1px solid var(--line)}
.am-tree details>ul>li{position:relative;padding:.2rem 0}
.am-tree details>ul>li::before{content:"";position:absolute;left:-.9rem;top:1rem;width:.8rem;border-top:1px solid var(--line)}
/* horizontal mind map on wider screens */
@media (min-width:1440px){
  .am-tree details{display:flex;align-items:flex-start;flex-wrap:nowrap}
  .am-tree details>summary{flex:none}
  .am-tree details>.am-go{align-self:center;order:1}
  .am-tree details>ul{order:2;flex-basis:auto;margin-left:1.4rem;padding-left:0;border-left:0;position:relative}
  .am-tree details[open]>summary{position:relative}
  .am-tree details>ul>li{padding:.18rem 0 .18rem 1.4rem}
  .am-tree details>ul>li::before{left:0;top:1.05rem;width:1.2rem;border-top:1px solid var(--hair-strong)}
  .am-tree details>ul>li::after{content:"";position:absolute;left:0;top:0;bottom:0;border-left:1px solid var(--hair-strong)}
  .am-tree details>ul>li:first-child::after{top:1.05rem}
  .am-tree details>ul>li:last-child::after{bottom:auto;height:1.05rem}
  .am-tree details>ul>li:only-child::after{display:none}
  .am-tree details>ul::before{content:"";position:absolute;left:-1.4rem;top:1.05rem;width:1.4rem;border-top:1px solid var(--hair-strong)}
}
/* below 1440px: vertical tree, labels wrap, boxes stay inside the screen */
@media (max-width:1439px){ .am-wrap{overflow-x:visible} .am-tree summary,.am-tree .am-link,.am-leaf a{white-space:normal;overflow-wrap:anywhere;max-width:100%;box-sizing:border-box} .am-tree li{max-width:100%;box-sizing:border-box} }
@media (max-width:640px){ .am-wrap{padding-right:12px} }
/* root sits on top; tactics branch below it (no left scroll) */
@media (min-width:1440px){
  .am-tree .am-root{display:block}
  .am-tree .am-root>ul{margin:.6rem 0 0 1rem;padding-left:0;border-left:1px solid var(--hair-strong)}
  .am-tree .am-root>ul::before{display:none}
  .am-tree .am-root>ul>li::after{display:none}
}
