/* Fusion HCM Insights folder tree
   Colours follow the site's variables when present (see the site stylesheet) and fall back to defaults. */
.fhi-tree{
  --ft-accent:var(--fhi-accent,#c74634);
  --ft-navy:var(--fhi-navy,#12263f);
  --ft-border:rgba(128,128,128,.3);
  font-size:15px;line-height:1.4;
}
.fhi-tree *{box-sizing:border-box}
.fhi-tree ul{list-style:none;margin:0;padding:0}
.fhi-tree li{margin:0}
.fhi-tree a{text-decoration:none;color:inherit}

.fhi-tree-title{margin:0 0 8px;font-size:13px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--ft-navy)}
.fhi-tree-controls{display:flex;gap:12px;margin:0 0 10px}
.fhi-tree-controls button{background:none;border:0;padding:0;font:inherit;font-size:12px;color:var(--ft-accent);cursor:pointer;text-decoration:underline;text-underline-offset:2px}
.fhi-tree-controls button:hover{background:none;color:var(--ft-accent);transform:none;opacity:.8}

/* Folder row */
.fhi-folder>summary{
  display:flex;align-items:center;gap:6px;cursor:pointer;list-style:none;
  padding:6px 8px;border-radius:8px;font-weight:600;color:var(--ft-navy);
}
.fhi-folder>summary::-webkit-details-marker{display:none}
.fhi-folder>summary:hover,.fhi-leaf:hover{background:rgba(128,128,128,.12)}
.fhi-folder>summary a{flex:1 1 auto;min-width:0}
.fhi-folder>summary a:hover,.fhi-file a:hover,.fhi-leaf a:hover{color:var(--ft-accent)}

/* Icons: caret + folder before the name */
.fhi-folder>summary::before{
  content:"";flex:0 0 14px;width:14px;height:14px;background:currentColor;opacity:.6;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 6 15 12 9 18'/%3E%3C/svg%3E") center/contain no-repeat;
          mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 6 15 12 9 18'/%3E%3C/svg%3E") center/contain no-repeat;
  transition:transform .15s ease;
}
.fhi-folder[open]>summary::before{transform:rotate(90deg)}
.fhi-folder>summary a::before,.fhi-leaf a.fhi-cat-link::before{
  content:"";display:inline-block;width:16px;height:16px;margin-right:6px;vertical-align:-3px;background:var(--ft-accent);
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* Category without children or posts */
.fhi-leaf{display:flex;align-items:center;gap:6px;padding:6px 8px 6px 28px;border-radius:8px;font-weight:600;color:var(--ft-navy)}
.fhi-leaf a{flex:1 1 auto}

/* Children with a guide line, like a file tree */
.fhi-children{margin:2px 0 4px 15px;padding-left:10px;border-left:1px solid var(--ft-border)}

/* Posts (files) */
.fhi-file a{
  display:block;padding:5px 8px;border-radius:8px;font-size:14px;opacity:.9;
}
.fhi-file a:hover{background:rgba(128,128,128,.12);opacity:1}
.fhi-file a::before{
  content:"";display:inline-block;width:13px;height:13px;margin-right:7px;vertical-align:-2px;background:currentColor;opacity:.55;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3C/svg%3E") center/contain no-repeat;
          mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3C/svg%3E") center/contain no-repeat;
}
.fhi-more a{display:block;padding:4px 8px 4px 28px;font-size:13px;color:var(--ft-accent)}
.fhi-more a:hover{text-decoration:underline}

/* Count badge */
.fhi-count{flex:0 0 auto;min-width:22px;padding:1px 7px;border-radius:999px;background:rgba(128,128,128,.15);font-size:11px;font-weight:600;text-align:center;color:inherit}

/* Current page / current category */
.fhi-file.is-current a{background:rgba(199,70,52,.12);color:var(--ft-accent);font-weight:600;opacity:1;box-shadow:inset 3px 0 0 var(--ft-accent)}
.fhi-cat-link.is-current{color:var(--ft-accent)}

.fhi-tree a:focus-visible,.fhi-tree summary:focus-visible,.fhi-tree button:focus-visible{outline:2px solid var(--ft-accent);outline-offset:2px;border-radius:6px}
