/* Framed preview of the Unisson « Gabarits » model (.frame, .frame-bar, .viewport, figcaption, .glow): its rules,
   selectors moved into the shadow tree, colours read from the --pack-* tokens. The three dots are one pseudo-element
   and its two shadows. The viewport is a size container's child: 62.5 % of the frame's width high, so the 1000 x 625
   canvas keeps its ratio; the slotted drawing scales itself to that width (its own sheet, container units): nothing
   is measured, the server tree is the final one.
   The masks of the ring only read alpha, so any opaque token stands in for the model's black. 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;
}
.frame {
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  container-type: inline-size;
}
.glow {
  position: relative;
  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);
}
.bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-block-end: 1px solid var(--pack-line);
  color: var(--pack-mut);
  font:
    600 12px ui-monospace,
    "JetBrains Mono",
    Menlo,
    Consolas,
    monospace;
}
/* .dots: three 10 px dots 6 px apart, pink, violet and green, drawn by one box and its two shadows. */
.bar::before {
  content: "";
  flex: none;
  inline-size: 10px;
  block-size: 10px;
  margin-inline-end: 32px;
  border-radius: 50%;
  background: var(--pack-c4);
  box-shadow:
    16px 0 0 var(--pack-c2),
    32px 0 0 var(--pack-c3);
}
.url {
  flex: 1;
  min-inline-size: 0;
  max-inline-size: 420px;
  margin-inline: auto;
  padding: 3px 12px;
  border-radius: 8px;
  background: var(--pack-panel2);
  border: 1px solid var(--pack-line);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vp {
  flex: none;
}
.viewport {
  position: relative;
  block-size: calc(100cqi * 0.625);
  overflow: hidden;
  background: var(--pack-code);
}
figcaption {
  padding: 10px 16px;
  border-block-start: 1px solid var(--pack-line);
  font-size: 13px;
  color: var(--pack-mut);
}
@media (max-width: 700px) {
  .vp {
    display: none;
  }
}
/* Forced colours: the ring is not drawn and the dots keep a visible fill. */
@media (forced-colors: active) {
  .glow::after {
    display: none;
  }
  .bar::before {
    forced-color-adjust: none;
    background: CanvasText;
    box-shadow:
      16px 0 0 CanvasText,
      32px 0 0 CanvasText;
  }
}
