/* Base tree structure */
.ct-tree {
    list-style: none;
    margin: 0;
    padding-left: 0;            /* root has no padding */
  }
  .ct-tree ul {
    list-style: none;
    margin: 0;
    padding-left: 1.25rem;      /* every nested level indents */
  }

  .ct-tree li.active > .ct-row > a {
    font-weight: bold;
    color: #d32f2f;
    text-decoration: underline;
  }
  
  /* Each term container is block; we control layout inside with .ct-row */
  .ct-term { margin: .125rem 0; }
  
  /* Header row: link (left) + toggle (right) */
  .ct-row {
    display: flex;
    align-items: stretch;       /* makes the button full height of the row */
    min-height: 44px;           /* a comfortable tap target */
  }
  
  /* Top-level styling (grey background) */
  .ct-tree > .ct-term {
    background: #FBFAF8;        /* grey background for top level */
    border-radius: 4px;
    margin-bottom: 1rem;
    overflow: hidden;           /* to clip the red button radius if needed */
  }
  
  /* Term link */
  .ct-term-link,
  .ct-post-link {
    text-decoration: none;
    display: inline-block;
    padding: .5rem .75rem;
  }
  
  .ct-tree > .ct-term > .ct-row > .ct-term-link {
    font-weight: 600;
    flex: 1;                    /* take available space */
    color: inherit;
    padding: .5rem .75rem;
    transition: background-color .2s, color .2s;
    border-radius: 4px 0 0 4px; /* match outer radius on the left */
  }
  
  /* Hover + active colors for top-level link */
  .ct-tree > .ct-term > .ct-row > .ct-term-link:hover,
  .ct-tree > .ct-term.active > .ct-row > .ct-term-link {
    background: var(--awb-color4);
    color: #fff;
  }
  
  /* Toggle button: right side, big, red, full-height */
  .ct-accordion .ct-toggle {
    border: 0;
    cursor: pointer;
    background: #d32f2f;        /* red background */
    color: #fff;
    padding: 0 0.75rem;         /* wider button */
    display: flex;
    align-items: center;
    justify-content: center;
    height: auto;               /* with align-items:stretch on .ct-row makes it full height */
    min-width: 44px;            /* comfortable target */
  }
  
  /* optional: slightly darker on hover */
  .ct-accordion .ct-toggle:hover {
    background: #b71c1c;
  }
  
  /* Chevron icon: white; ▸ (closed) / ▾ (open) */
  .ct-accordion .ct-toggle .ct-icon::before {
    content: "▸";
    display: inline-block;
    width: 1em;
    text-align: center;
    color: currentColor;        /* white due to button color */
    font-weight: 700;
  }
  .ct-accordion .ct-term.expanded > .ct-row > .ct-toggle .ct-icon::before {
    content: "▾";
  }
  
  /* Sub-lists appear below header row */
  .ct-sub {
    padding: .25rem 0;
  }
  .ct-accordion .ct-sub.collapsed { display: none; }
  
  /* Posts inside */
  .ct-post { margin: .125rem 0; }