/* Quiet card previews: one figure and one brand-colour chart on a flat tint, no tiles or sheet tabs. */
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-quiet,
.tg-public #template-gallery .tg-quiet {
  height: auto;
  padding: 14px 14px 12px;
  background: var(--fg-surface-alt);
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-card:hover,
.tg-public #template-gallery .tg-card:hover {
  background: var(--fg-surface-alt);
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-card:hover .tg-quiet,
.tg-public #template-gallery .tg-card:hover .tg-quiet {
  background: var(--fg-surface);
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-kpi,
.tg-public #template-gallery .tg-kpi {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  margin: 0;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-kpi-v,
.tg-public #template-gallery .tg-kpi-v {
  font: 600 20px/1.1 var(--font-body);
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-kpi-k,
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-chart-name,
.tg-public #template-gallery .tg-kpi-k,
.tg-public #template-gallery .tg-chart-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--fg-muted);
  font-size: 12px;
  line-height: 1.3;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-chart-name,
.tg-public #template-gallery .tg-chart-name {
  margin: 10px 0 8px;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-rows,
.tg-public #template-gallery .tg-rows {
  display: grid;
  grid-template-columns: minmax(0, 38%) minmax(0, 1fr) auto;
  grid-auto-rows: 18px;
  align-content: start;
  align-items: center;
  column-gap: 10px;
  row-gap: 6px;
  height: 90px;
  font-size: 11.5px;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-row-k,
.tg-public #template-gallery .tg-row-k {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--fg-muted);
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-row-track,
.tg-public #template-gallery .tg-row-track {
  display: block;
  height: 8px;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-row-bar,
.tg-public #template-gallery .tg-row-bar {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: 0 2px 2px 0;
  background: var(--fg-primary-bg);
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-row-v,
.tg-public #template-gallery .tg-row-v {
  color: var(--fg-ink);
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-cols,
.tg-public #template-gallery .tg-cols {
  display: flex;
  flex-direction: column;
  height: 90px;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-cols-plot,
.tg-public #template-gallery .tg-cols-plot {
  display: grid;
  grid-template-columns: repeat(var(--tg-cols), minmax(0, 1fr));
  grid-template-rows: 100%;
  align-items: end;
  gap: 4px;
  height: 70px;
  border-bottom: 1px solid var(--fg-line-strong);
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-col,
.tg-public #template-gallery .tg-col {
  display: block;
  justify-self: center;
  width: min(100%, 12px);
  border-radius: 2px 2px 0 0;
  background: var(--fg-primary-bg);
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery :is(.tg-row-bar, .tg-col).is-negative,
.tg-public #template-gallery :is(.tg-row-bar, .tg-col).is-negative {
  background: var(--fg-muted);
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-cols-axis,
.tg-public #template-gallery .tg-cols-axis {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-top: 5px;
  color: var(--fg-muted);
  font-size: 11.5px;
  line-height: 1.2;
  white-space: nowrap;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-cols--labelled .tg-cols-axis,
.tg-public #template-gallery .tg-cols--labelled .tg-cols-axis {
  display: grid;
  grid-template-columns: repeat(var(--tg-cols), minmax(0, 1fr));
  gap: 4px;
  text-align: center;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-cols--labelled .tg-cols-axis span,
.tg-public #template-gallery .tg-cols--labelled .tg-cols-axis span {
  overflow: hidden;
  text-overflow: ellipsis;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-card-body h2,
.tg-public #template-gallery .tg-card-body h2 {
  margin: 0;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-meta,
.tg-public #template-gallery .tg-meta {
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 12px;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-meta > span:first-child,
.tg-public #template-gallery .tg-meta > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-access,
.tg-public #template-gallery .tg-access {
  flex: none;
  color: var(--fg-ink);
  font-weight: 500;
  white-space: nowrap;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-access svg,
.tg-public #template-gallery .tg-access svg {
  width: 12px;
  height: 12px;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-skeleton,
.tg-public #template-gallery .tg-skeleton {
  display: block;
  border-radius: var(--radius-xs);
  background: color-mix(in srgb, var(--fg-ink) 7%, transparent);
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-skeleton--kpi,
.tg-public #template-gallery .tg-skeleton--kpi {
  width: 45%;
  height: 22px;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-skeleton--line,
.tg-public #template-gallery .tg-skeleton--line {
  width: 60%;
  height: 12px;
  margin: 12px 0 10px;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-skeleton--chart,
.tg-public #template-gallery .tg-skeleton--chart {
  height: 90px;
}
/* Detail preview: the same quiet language at full size, with all three figures and the workbook's sheet tabs. */
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-preview--detail.tg-quiet,
.tg-public #template-gallery .tg-preview--detail.tg-quiet {
  padding: 0;
  background: var(--fg-surface);
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-quiet-body,
.tg-public #template-gallery .tg-quiet-body {
  padding: clamp(16px, 4cqw, 24px);
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-preview--detail .tg-kpis,
.tg-public #template-gallery .tg-preview--detail .tg-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 3cqw, 24px);
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-preview--detail .tg-kpi,
.tg-public #template-gallery .tg-preview--detail .tg-kpi {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-preview--detail .tg-kpi-v,
.tg-public #template-gallery .tg-preview--detail .tg-kpi-v {
  font-size: clamp(18px, 4.4cqw, 28px);
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-preview--detail .tg-kpi-k,
.tg-public #template-gallery .tg-preview--detail .tg-kpi-k {
  font-size: 12.5px;
  white-space: normal;
  overflow-wrap: anywhere;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-preview--detail .tg-chart-name,
.tg-public #template-gallery .tg-preview--detail .tg-chart-name {
  margin: 24px 0 12px;
  font-size: 13px;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-preview--detail .tg-rows,
.tg-public #template-gallery .tg-preview--detail .tg-rows {
  height: auto;
  /* The label column fits the longest category, up to half the width. */
  grid-template-columns: fit-content(50%) minmax(0, 1fr) auto;
  grid-auto-rows: 22px;
  row-gap: 8px;
  font-size: 13px;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-preview--detail .tg-row-track,
.tg-public #template-gallery .tg-preview--detail .tg-row-track {
  height: 10px;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-preview--detail .tg-cols,
.tg-public #template-gallery .tg-preview--detail .tg-cols {
  height: auto;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-preview--detail .tg-cols-plot,
.tg-public #template-gallery .tg-preview--detail .tg-cols-plot {
  height: 200px;
  gap: 6px;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-preview--detail .tg-col,
.tg-public #template-gallery .tg-preview--detail .tg-col {
  width: min(100%, 28px);
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-preview--detail .tg-cols-axis,
.tg-public #template-gallery .tg-preview--detail .tg-cols-axis {
  font-size: 12px;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-preview--detail .tg-skeleton--chart,
.tg-public #template-gallery .tg-preview--detail .tg-skeleton--chart {
  height: 200px;
}
