/* « Composants utilisés » box of the Unisson « Gabarits » model (.uses, .glow): its rules, selectors moved into the
   shadow tree, colours read from the --pack-* tokens. Each line is one element whose text is the tag name: its role
   and its level pill are drawn from its data-role and data-level attributes (read by assistive technologies as
   generated content), so a template of twelve tags costs twenty-four elements rather than sixty. No motion. */
:host {
  display: block;
  min-inline-size: 0;
  color: var(--pack-ink);
  font:
    16px / 1.6 Inter,
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  font-feature-settings: normal;
  letter-spacing: normal;
  -webkit-font-smoothing: antialiased;
}
:host([hidden]) {
  display: none;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
[part="heading"],
p {
  margin: 0;
}
.glow {
  position: relative;
  border-radius: 18px;
  background: var(--pack-panel);
  border: 1px solid var(--pack-line);
  box-shadow: var(--pack-shadow);
}
.glow::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, var(--pack-c1), transparent 35%, transparent 65%, var(--pack-c2));
  opacity: 0.55;
  pointer-events: none;
  -webkit-mask:
    linear-gradient(var(--pack-ink) 0 0) content-box,
    linear-gradient(var(--pack-ink) 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(var(--pack-ink) 0 0) content-box exclude,
    linear-gradient(var(--pack-ink) 0 0);
}
.uses {
  padding: 16px 16px 12px;
}
[part="heading"] {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--pack-mut);
  font:
    700 11px ui-monospace,
    "JetBrains Mono",
    Menlo,
    Consolas,
    monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
[part="count"] {
  padding: 1px 8px;
  border-radius: 99px;
  border: 1px solid var(--pack-line2);
  color: var(--pack-ink);
  font:
    700 12px ui-monospace,
    "JetBrains Mono",
    Menlo,
    Consolas,
    monospace;
  letter-spacing: 0;
}
[part="list"] {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 2px;
}
/* li a of the model, a grid: the tag name (the line's text, an anonymous item) in the first cell, the level pill
   after it, the role under both. Both pseudo-elements are placed explicitly, so the name takes the first free cell and
   the first row is as tall as the taller of the name and the pill, as in the model. The base sheet draws every anchor
   as a 44 px underlined flex box: undone. */
[part="item"] {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0 8px;
  min-block-size: 0;
  padding: 7px 8px;
  border-radius: 10px;
  color: var(--pack-ink);
  font:
    600 12.5px ui-monospace,
    "JetBrains Mono",
    Menlo,
    Consolas,
    monospace;
  overflow-wrap: anywhere;
  text-decoration: none;
}
[part="item"]:not([data-level]) {
  grid-template-columns: minmax(0, 1fr);
}
a[part="item"]:hover {
  background: var(--pack-panel2);
}
a[part="item"]:focus-visible {
  outline: 2px solid var(--pack-focus);
  outline-offset: 3px;
}
/* The role (.role): muted, under the name, over the whole width. */
[part="item"][data-role]::before {
  content: attr(data-role);
  grid-row: 2;
  grid-column: 1 / -1;
  color: var(--pack-mut);
  font:
    400 12.5px / 1.4 Inter,
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  overflow-wrap: normal;
}
/* The level (.lvl): a small pill at the end of the name's line. */
[part="item"][data-level]::after {
  content: attr(data-level);
  grid-row: 1;
  grid-column: 2;
  align-self: center;
  padding: 1px 6px;
  border: 1px solid var(--pack-line2);
  border-radius: 99px;
  color: var(--pack-mut);
  font:
    600 10.5px ui-monospace,
    "JetBrains Mono",
    Menlo,
    Consolas,
    monospace;
}
[part="note"] {
  margin-block-start: 10px;
  padding: 10px 8px 0;
  border-block-start: 1px solid var(--pack-line);
  color: var(--pack-mut);
  font-size: 12.5px;
}
[part="note"] code {
  font:
    600 12.5px ui-monospace,
    "JetBrains Mono",
    Menlo,
    Consolas,
    monospace;
}
@media (max-width: 1099px) {
  [part="list"] {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 2px 12px;
  }
}
/* Forced colours: the ring is not drawn; the pills keep their edge. */
@media (forced-colors: active) {
  .glow::after {
    display: none;
  }
}
