
.fgr { display: flex; flex-direction: column; gap: .85rem; }
.fgr-row { display: grid; grid-template-columns: 6.5rem 1fr; gap: .85rem; align-items: start; }
.fgr-lab {
    display: flex; align-items: center; justify-content: flex-end; gap: .25rem;
    padding-top: .3rem;
    font-size: 11px; font-weight: 500; color: rgb(100 116 139);
    font-variant-numeric: tabular-nums; white-space: nowrap;
}
html.dark .fgr-lab { color: rgb(var(--slate-400-rgb)); }
.fgr-items { display: flex; flex-wrap: wrap; gap: .35rem; }

/* The label stacks above its band on a narrow screen rather than squeezing the tags. */
@media (max-width: 520px) {
    .fgr-row { grid-template-columns: 1fr; gap: .3rem; }
    .fgr-lab { justify-content: flex-start; padding-top: 0; }
}

.ft {
    display: inline-flex; align-items: baseline; gap: .3rem;
    font-size: 13.5px; line-height: 1.45; color: rgb(30 41 59);
    border-radius: 6px; padding: .2rem .5rem; white-space: nowrap;
}
html.dark .ft { color: rgb(var(--slate-200-rgb)); }
.ft-note { font-style: normal; font-size: 10.5px; opacity: .62; }
.ft-wait { font-style: normal; font-size: 10px; }
/* A linked tag has to look pressable without becoming a second kind of object: the tint deepens
   a step on hover rather than the shape or the type changing. */
.ft-link { text-decoration: none; transition: filter .15s, box-shadow .15s; }
.ft-link:hover { filter: brightness(.94) saturate(1.15); }
html.dark .ft-link:hover { filter: brightness(1.35); }
.ft-link:focus-visible { outline: 2px solid rgba(51,153,102,.75); outline-offset: 1px; }

/* Eight rungs, one colour, eight opacities, 6% to 52%. The range is far wider than the
   capsules could carry: there, neighbouring pills sat side by side and anything this
   strong shouted. Here a band is a block under its own label, several steps from its
   neighbour, so the weight can do real work. Worst text contrast 9.6:1 light, 6.4:1 dark. */
.ft-r0 { background: rgba(51, 153, 102, 0.06); }
.ft-r1 { background: rgba(51, 153, 102, 0.126); }
.ft-r2 { background: rgba(51, 153, 102, 0.191); }
.ft-r3 { background: rgba(51, 153, 102, 0.257); }
.ft-r4 { background: rgba(51, 153, 102, 0.323); }
.ft-r5 { background: rgba(51, 153, 102, 0.389); }
.ft-r6 { background: rgba(51, 153, 102, 0.454); }
.ft-r7 { background: rgba(51, 153, 102, 0.52); }

/* Fold: six bands' worth of height, with a sliver of the next under the fade. */
.fgr-list { position: relative; }
/* CLIP ONLY WHEN THERE IS A BUTTON TO UNDO IT. This clipped unconditionally, so a section
   holding exactly the limit lost its last band with nothing on the page to bring it back. */
.fgr-foldable:not(.fgr-open) { max-height: 13.5rem; overflow: hidden; }
.fgr-veil {
    position: absolute; left: 0; right: 0; bottom: 0; height: 2.1rem; pointer-events: none;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,.65) 40%, rgb(var(--white-rgb, 255 255 255)) 100%);
}
html.dark .fgr-veil {
    background: linear-gradient(to bottom, rgb(var(--color-surface-rgb, 17 24 39) / 0) 0%, rgb(var(--color-surface-rgb, 17 24 39) / .65) 40%, var(--color-surface) 100%);
}

.fgr-hang { position: relative; display: flex; justify-content: center; margin-top: .75rem; }
.fgr-hang::before {
    content: ''; position: absolute; top: -.75rem; left: 50%; width: 1px; height: .75rem;
    background: rgb(203 213 225); transition: height .25s cubic-bezier(.34,1.56,.64,1);
}
html.dark .fgr-hang::before { background: rgb(var(--slate-700-rgb)); }
.fgr-hang-open::before { height: .4rem; }

.fgr-btn {
    display: inline-flex; align-items: center; gap: .35rem;
    border: 1px solid rgb(226 232 240); border-radius: 9999px; background: rgb(var(--white-rgb, 255 255 255));
    color: rgb(71 85 105); padding: .3rem .85rem; font-size: 12px; font-weight: 500; line-height: 1;
    box-shadow: 0 1px 2px rgba(15,23,42,.06);
    transition: transform .25s cubic-bezier(.34,1.56,.64,1), border-color .15s, color .15s;
}
.fgr-btn:hover { transform: translateY(2px); border-color: rgb(203 213 225); color: rgb(15 23 42); }
.fgr-hang-open .fgr-btn { transform: translateY(-1px); }
html.dark .fgr-btn { background: var(--color-surface); border-color: var(--color-border); color: rgb(var(--slate-400-rgb)); }
html.dark .fgr-btn:hover { border-color: rgb(var(--slate-700-rgb)); color: rgb(var(--slate-200-rgb)); }
.fgr-chev { height: .8rem; width: .8rem; transition: transform .25s ease; }
.fgr-hang-open .fgr-chev { transform: rotate(180deg); }

@media (prefers-reduced-motion: reduce) { .fgr-btn, .fgr-chev, .fgr-hang::before { transition: none; } }
