/* <cad-gallery> behaviour styles. Link this file in <head> (render-blocking), so the overview's first paint is final:
 * <link rel="stylesheet" href="/kit/gallery.css">. gallery.js adds the behaviour; the page styles everything else.
 * Kit rules sit in :where() (zero specificity) except the few that hide things, which must win. */
:where(cad-gallery){display:block}
cad-gallery [hidden]{display:none!important}
/* The overview shows the first `limit` cards of each group (the page marks the rest data-over), and a "see all" link
   only where a group has more. With scripting off nothing is cut and the links are not needed. */
@media(scripting:enabled){cad-gallery[data-overview]:not([data-failed]) [data-item][data-over]{display:none}}
cad-gallery[data-ready][data-overview] [data-item][data-over]{display:none}
cad-gallery:not([data-overview]) [data-gallery-more],cad-gallery [data-group]:not([data-more]) [data-gallery-more]{display:none}
@media(scripting:none){cad-gallery [data-gallery-js]{display:none!important}}
/* The page marks data-failed when gallery.js did not start (see the import in the kit README): the same as no script. */
cad-gallery[data-failed] [data-gallery-js]{display:none!important}
/* a choice that would leave nothing: muted, still readable (4.5:1 on light backgrounds) and still usable */
:where(cad-gallery [data-empty]){color:var(--cad-gallery-muted,#5d716c)}
:where(.cad-gallery-chip){display:inline-flex;align-items:center;gap:.4em;min-height:32px;padding:.25em .8em;border-radius:999px;cursor:pointer;
  font:inherit;font-size:.85em;color:inherit;background:var(--cad-gallery-chip-bg,#eef1e4);border:1px solid var(--cad-gallery-line,#6f8a80)}
:where(.cad-gallery-chip)::after{content:"×";font-size:1.2em;line-height:1}
:where(.cad-gallery-chip:focus-visible){outline:2px solid var(--cad-gallery-accent,#bd3a12);outline-offset:2px}
@media(pointer:coarse){:where(.cad-gallery-chip){min-height:44px}}
/* The live status line repeats what an empty-state box says: kept for screen readers, hidden from view meanwhile. */
cad-gallery [data-gallery-status][data-gallery-boxed]{position:absolute;width:1px;height:1px;min-width:0;min-height:0;flex:none;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
