/* The folding list of a dashboard page: the tools tab's tool list (templates/tfa.html) and the BIM resources'
   category list (templates/resources.html) share it. A list of uppercase heading-font buttons on the left that
   folds to a rail naming the open item; the content pane fills the rest. Lifted out of tfa.html on 2026-11-07 so
   both pages carry one copy (Avi: "make it like tools, collapsible side bar, the works, reuse it"). */

    .tfa-layout { display: flex; gap: 30px; flex: 1; min-height: 0; }
    .tfa-sidebar { flex: 0 0 300px; display: flex; flex-direction: column; gap: 10px;
                   overflow-y: auto; padding-right: 15px; min-width: 0; }
    .tfa-rail { display: flex; flex-direction: column; gap: 10px; }
    .tfa-collapse {
        display: flex; align-items: center; gap: 10px; width: 100%;
        background: transparent; border: 1px dashed var(--border-glass); border-radius: 4px;
        color: var(--text-muted); padding: 8px 12px; cursor: pointer;
        font-family: var(--font-heading); font-size: 0.72rem; letter-spacing: 1px; text-transform: uppercase;
    }
    .tfa-collapse span[aria-hidden] { font-size: 1.1rem; line-height: 1; }
    .tfa-collapse:hover, .tfa-rail-name:hover { color: var(--accent-cyan); border-color: var(--accent-cyan); }
    .tfa-collapse:focus-visible, .tfa-rail-name:focus-visible, .tfa-tool-btn:focus-visible {
        outline: 2px solid var(--accent-cyan); outline-offset: 2px; }
    .tfa-rail-name { display: none; }

    .tfa-layout.collapsed { gap: 12px; }
    .tfa-layout.collapsed .tfa-sidebar { flex-basis: 40px; padding-right: 0; overflow: hidden; }
    .tfa-layout.collapsed .tfa-tool-btn,
    .tfa-layout.collapsed .tfa-collapse-label { display: none; }
    .tfa-layout.collapsed .tfa-collapse { justify-content: center; padding: 8px 0; }
    .tfa-layout.collapsed .tfa-rail-name {
        display: block; writing-mode: vertical-rl; transform: rotate(180deg);
        background: transparent; border: 1px solid var(--border-glass); border-radius: 4px;
        color: var(--accent-cyan); padding: 14px 0; width: 100%; cursor: pointer;
        font-family: var(--font-heading); font-weight: 600; font-size: 0.78rem;
        letter-spacing: 2px; text-transform: uppercase; white-space: nowrap;
    }
    @media (prefers-reduced-motion: no-preference) {
        .tfa-sidebar { transition: flex-basis .18s ease; }
    }

    .tfa-tool-btn {
        background: var(--surface-dark);
        border: 1px solid var(--border-glass);
        color: var(--text-muted);
        text-align: left;
        padding: 15px 20px;
        font-family: var(--font-heading);
        font-weight: 600;
        font-size: 1rem;
        border-radius: 4px;
        cursor: pointer;
        transition: var(--transition-smooth);
        text-transform: uppercase;
        letter-spacing: 1px;
    }
    .tfa-tool-btn:hover {
        background: rgba(0, 240, 255, 0.05);
        border-color: rgba(0, 240, 255, 0.3);
        color: #fff;
    }
    .tfa-tool-btn.active {
        background: rgba(0, 240, 255, 0.1);
        border-color: var(--accent-cyan);
        color: var(--accent-cyan);
        box-shadow: inset 4px 0 0 var(--accent-cyan);
    }
    
    /* Ensure scrollbar looks clean in Chrome/Safari */
    .tfa-sidebar::-webkit-scrollbar {
        width: 6px;
    }
    .tfa-sidebar::-webkit-scrollbar-track {
        background: rgba(0,0,0,0.2);
    }
    .tfa-sidebar::-webkit-scrollbar-thumb {
        background: var(--border-glass);
        border-radius: 3px;
    }
    .tfa-sidebar::-webkit-scrollbar-thumb:hover {
        background: rgba(0, 240, 255, 0.3);
    }

    /* a secondary entry under a heading entry (a group under its category) */
    .tfa-tool-btn.sub { padding: 11px 20px 11px 34px; font-size: 0.85rem; }
    .tfa-tool-btn .tfa-count { float: right; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0; opacity: 0.7; }
    a.tfa-tool-btn { display: block; text-decoration: none; }
