/* The figure inherits the local reference palette, including nested theme samples. */
.ref-illus {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  margin: 0;
  overflow: hidden;
  isolation: isolate;
}
.ref-illus[data-illus-ratio="4/3"] { aspect-ratio: 4 / 3; }
.ref-illus[data-illus-ratio="1/1"] { aspect-ratio: 1; }
.ref-illus > canvas { display: block; width: 100%; height: 100%; }

/* Private review gallery. */
.illus-preview {
  margin: 0;
  background: #191b1d;
  color: #eff0ed;
  font: 15px/1.45 system-ui, sans-serif;
}
.illus-preview main { max-width: 1640px; margin: auto; padding: 32px clamp(12px, 2.5vw, 40px) 64px; }
.illus-preview header { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px 24px; margin-bottom: 28px; }
.illus-preview h1 { margin: 0 auto 0 0; font-size: clamp(20px, 3vw, 32px); font-weight: 500; }
.illus-preview label { display: inline-flex; align-items: center; gap: .4em; }
.illus-preview select { font: inherit; }
.illus-preview section { margin-bottom: 32px; }
.illus-preview h2 { margin: 0 0 8px; font-size: 15px; font-weight: 500; }
.illus-preview .pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.illus-preview .panel {
  position: relative;
  width: 100%;
  background: var(--ref-page);
  color: var(--ref-text);
}
.illus-preview .panel[data-theme="dark"] {
  --ref-page: #101214; --ref-text: #f7f7f5; --ref-muted: #a6abad; --ref-line: #ffffff24;
}
.illus-preview .panel[data-theme="light"] {
  --ref-page: #f0f1ed; --ref-text: #1e2124; --ref-muted: #666; --ref-line: #0000001f;
}
.illus-preview .panel small {
  position: absolute; z-index: 1; inset: 10px auto auto 12px; color: var(--ref-muted); pointer-events: none;
}
.illus-preview .phone-width .pair { grid-template-columns: repeat(2, minmax(0, 390px)); }
@media (max-width: 700px) {
  .illus-preview .pair, .illus-preview .phone-width .pair { grid-template-columns: minmax(0, 1fr); }
  .illus-preview main { padding-inline: 0; }
  .illus-preview header, .illus-preview h2 { padding-inline: 12px; }
  .illus-preview .phone-width .panel { max-width: 390px; }
}
.illus-preview.bench #gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.illus-preview.bench section { margin: 0; }
.illus-preview.bench .pair { display: block; }
.illus-preview.bench main { max-width: min(1200px, 176vh); padding: 6px; }
.illus-preview.bench header { margin-bottom: 8px; }
.illus-preview.bench header label { display: none; }
.illus-preview.bench h1, .illus-preview.bench h2 { font-size: 14px; }
.illus-preview.bench output { font-variant-numeric: tabular-nums; }
