/* Closed cards (lib/fold.js), on child screens only (P6: no accordion on a root): one line each, one open at a time
   (the shared name makes them an accordion), at most six rows inside; a score pill (.sp, css/widgets.css) or a due
   badge at the end of a card. */
.folds{display:flex;flex-direction:column;gap:10px}
details.fc{background:var(--card-bg);border:1px solid var(--card-edge);box-shadow:var(--shadow-sm);border-radius:var(--r)}
details.fc[open]{border-color:var(--a)}
details.fc summary{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:12px;min-height:68px;padding:10px 16px;cursor:pointer;list-style:none}
details.fc summary::-webkit-details-marker{display:none}
details.fc summary::after{content:'';inline-size:8px;block-size:8px;border-inline-end:2px solid var(--mut);border-bottom:2px solid var(--mut);transform:rotate(45deg);margin-inline:2px 4px}
details.fc[open]>summary::after{transform:rotate(-135deg)}
/* in Hebrew the inline end is the left edge, so the same corner turns the other way to point down, then up (as
   widgets.css turns a fold's); the open turn is the card's own summary only, a summary inside turns with its own */
[dir=rtl] details.fc summary::after{transform:rotate(-45deg)}
[dir=rtl] details.fc[open]>summary::after{transform:rotate(135deg)}
details.fc .inside{padding:0 16px 14px;display:flex;flex-direction:column}
details.fc .inside .btn{align-self:flex-start;margin-block-start:10px}
details.fc .tt{display:flex;flex-direction:column;min-width:0}
details.fc .tt b{font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
details.fc .tt small{color:var(--mut);font-size:.8rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* on a phone a card head keeps one line: the grade's word gives way to its dot and number */
@media (max-width:639px){details.fc summary .sp{font-size:0;gap:6px}details.fc summary .sp .num{font-size:.8rem}}
