/* Sample screen of the Unisson Studio editor's preview (studio-editeur.html, .s-* rules), selectors moved into the
   shadow tree. The model's --p-* preview variables are the catalog's --bythium-* tokens here, the ones the slotted
   components read too: bythium-pack-live-preview sets them on its screen, so the drawn parts and the real components
   follow the same tokens. --bythium-radius, --bythium-density and --bythium-font are target tokens of the editor,
   read here only. No motion of its own. */
:host {
  --rad: var(--bythium-radius, 12px);
  --d: var(--bythium-density, 1);
  --g: calc(12px * var(--d));
  display: block;
  min-inline-size: 0;
  max-inline-size: none;
  color: var(--bythium-text-primary);
  font: 13.5px / 1.45 var(--bythium-font, 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;
}
.sample {
  container-type: inline-size;
  background: var(--bythium-surface-page);
}
.s-shell {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  min-block-size: 540px;
}
.s-side {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: var(--g);
  background: var(--bythium-surface-card);
  border-inline-end: 1px solid var(--bythium-border-subtle);
}
.s-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-block-end: var(--g);
  font-weight: 800;
  letter-spacing: -0.01em;
}
.s-logo i {
  inline-size: 18px;
  block-size: 18px;
  border-radius: min(var(--rad), 9px);
  background: var(--bythium-brand-primary);
}
.s-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.s-nav span {
  display: block;
  padding: calc(6px * var(--d)) 10px;
  border-radius: var(--rad);
  color: var(--bythium-text-muted);
  white-space: nowrap;
}
.s-nav .on {
  color: var(--bythium-text-primary);
  font-weight: 600;
  background: color-mix(in oklch, var(--bythium-brand-primary) 14%, transparent);
  box-shadow: inset 3px 0 0 var(--bythium-brand-primary);
}
.s-main {
  display: flex;
  flex-direction: column;
  gap: var(--g);
  min-inline-size: 0;
  padding: calc(var(--g) * 1.4);
}
.s-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.s-crumb {
  font-size: 12.5px;
  color: var(--bythium-text-muted);
}
.s-crumb b {
  font-weight: 600;
  color: var(--bythium-text-primary);
}
::slotted([slot="avatar"]) {
  flex: none;
}
.s-title {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.s-tabs {
  display: flex;
  gap: 18px;
  border-block-end: 1px solid var(--bythium-border-subtle);
}
.s-tabs span {
  padding-block-end: calc(8px * var(--d));
  color: var(--bythium-text-muted);
}
.s-tabs .on {
  color: var(--bythium-brand-primary);
  font-weight: 700;
  box-shadow: inset 0 -2px 0 var(--bythium-brand-primary);
}
.s-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--g);
}
.s-box,
.s-stats ::slotted(*) {
  min-inline-size: 0;
  padding: var(--g);
  background: var(--bythium-surface-card);
  border: 1px solid var(--bythium-border-subtle);
  border-radius: var(--rad);
}
.s-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: var(--g);
  align-items: start;
}
.s-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-weight: 700;
}
.s-table {
  margin-block-start: calc(8px * var(--d));
}
.s-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: calc(7px * var(--d)) 0;
  border-block-start: 1px solid var(--bythium-border-subtle);
}
.s-row.th {
  color: var(--bythium-text-muted);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.s-row ::slotted(*) {
  flex: none;
}
.s-pg {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  margin-block-start: calc(8px * var(--d));
}
.s-pg span {
  display: grid;
  place-items: center;
  min-inline-size: 26px;
  block-size: 26px;
  border-radius: min(var(--rad), 8px);
  color: var(--bythium-text-muted);
  font-size: 12.5px;
}
.s-pg .on {
  background: var(--bythium-brand-primary);
  color: var(--bythium-on-brand-primary);
  font-weight: 700;
}
.s-form {
  display: flex;
  flex-direction: column;
  gap: calc(10px * var(--d));
  margin-block-start: calc(8px * var(--d));
}
.s-fl small {
  display: block;
  margin-block-end: 4px;
  font-size: 12px;
  color: var(--bythium-text-muted);
}
.s-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  block-size: calc(34px * var(--d));
  padding: 0 10px;
  border: 1px solid var(--bythium-border-subtle);
  border-radius: var(--rad);
  background: var(--bythium-surface-page);
  color: var(--bythium-text-primary);
}
.s-in em {
  font-style: normal;
  color: var(--bythium-text-muted);
}
.s-in svg {
  flex: none;
}
.s-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-block-start: 2px;
}
::slotted([slot="toast"]) {
  align-self: flex-end;
}
/* The slotted components keep their own drawing; their boxes take the rows of the model's miniatures, so the screen
   keeps its height: 36 px buttons, a 24 px switch row, a 20 px checkbox row, a 38 px alert, the progress head. */
.s-btns ::slotted(*) {
  display: inline-flex;
  align-items: center;
  min-block-size: calc(36px * var(--d));
}
::slotted([slot="form"]) {
  display: flex;
  align-items: center;
  min-block-size: 20px;
}
::slotted(bythium-switch[slot="form"]) {
  min-block-size: 24px;
}
::slotted([slot="alert"]) {
  min-block-size: calc(38px * var(--d));
}
::slotted([slot="progress"]) {
  display: block;
  min-block-size: 37px;
}
.s-stats ::slotted(*) {
  padding-block: calc(var(--g) - 4.5px);
}
.s-stats ::slotted(bythium-sparkline-mini) {
  min-block-size: 77px;
}
/* A component left out of the pack stays in place, greyed and outlined; a part inside a greyed one is not dimmed twice. */
[data-off],
::slotted([data-off]) {
  opacity: 0.3;
  filter: grayscale(1);
  outline: 1px dashed var(--bythium-text-muted);
  outline-offset: 2px;
}
[data-off] [data-off] {
  opacity: 1;
  filter: none;
  outline: 0;
}
@container (max-width: 560px) {
  .s-shell {
    grid-template-columns: minmax(0, 1fr);
    min-block-size: 0;
  }
  .s-side {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    border-inline-end: 0;
    border-block-end: 1px solid var(--bythium-border-subtle);
  }
  .s-logo {
    margin: 0;
  }
  .s-nav {
    flex-direction: row;
  }
  .s-nav span:nth-child(n + 3) {
    display: none;
  }
  .s-stats {
    grid-template-columns: 1fr 1fr;
  }
  .s-stats ::slotted(:last-child) {
    grid-column: 1 / -1;
  }
  .s-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  /* Narrow, the model's alert text runs on two lines. */
  ::slotted([slot="alert"]) {
    min-block-size: calc(57px * var(--d));
  }
}
@media (forced-colors: active) {
  .s-box,
  .s-in,
  .s-side {
    border-color: CanvasText;
  }
}
