/* visuals-preview */
.vvis {
  --vvis-paper: #f1eee4;
  --vvis-label: #183537;
  --vvis-accent: #176a67;
  --vvis-disc: #cde4da;
  --vvis-hot: #ac502f;
  margin: 1rem 0;
  padding: clamp(.6rem, 2vw, 1.25rem);
  color: var(--vvis-label);
  background: var(--vvis-paper);
  border: 1px solid #d4dbcc;
  border-radius: .95rem;
}
[data-theme="dark"] .vvis {
  --vvis-paper: #213333;
  --vvis-label: #f0eadb;
  --vvis-accent: #a5dcd0;
  --vvis-disc: #365752;
  --vvis-hot: #ffb08c;
  border-color: #4b6562;
}
.vvis-scene {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: .5rem;
}
.vvis-panel {
  flex: 1 1 0;
  min-width: min(5rem, 100%);
  max-width: 14rem;
  text-align: center;
}
.vvis-icon {
  display: block;
  width: clamp(42px, 13vw, 76px);
  height: auto;
  margin: 0 auto .4rem;
}
.vvis-disc { fill: var(--vvis-disc); }
.vvis-ink, .vvis-line {
  fill: none;
  stroke: var(--vvis-accent);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.vvis-label, .vvis-chart-view figcaption {
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.vvis-link { color: var(--vvis-hot); font-size: 1rem; align-self: center; }
.vvis-chart-view { text-align: center; }
.vvis-chart { display: block; width: min(100%, 23rem); height: auto; margin: 0 auto .35rem; }
.vvis-grid { fill: none; stroke: var(--vvis-accent); opacity: .3; }
.vvis-line-1 { stroke: var(--vvis-hot); stroke-dasharray: 5 4; }
.vvis-dot { fill: var(--vvis-accent); }
.vvis-hot { fill: var(--vvis-hot); }
@media (max-width: 390px) {
  .vvis-scene { gap: .25rem; }
  .vvis-panel { min-width: min(4.4rem, 100%); }
  .vvis-label, .vvis-chart-view figcaption { font-size: .8125rem; }
}

/* Added when merging into Writing Studio: reserved space while the script loads,
   and a soft fade-in (opacity + transform only; off for reduced motion / motion-off). */
.vvis-slot { min-height: 7.5rem; margin: 1rem 0; }
html[data-motion=on] .vvis { -webkit-animation: vvis-in 260ms ease both; animation: vvis-in 260ms ease both; }
@-webkit-keyframes vvis-in { from { opacity: 0; -webkit-transform: translateY(6px); } to { opacity: 1; -webkit-transform: none; } }
@keyframes vvis-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .vvis { -webkit-animation: none !important; animation: none !important; } }
html[data-motion=off] .vvis, html[data-motion=none] .vvis { -webkit-animation: none !important; animation: none !important; }
.vt-stage .vvis { box-sizing: border-box; max-width: 100%; }

/* Phones: keep 1-3 panels on one row (so the arrow never sits alone at a line end);
   4 panels stack in a column with the arrow turned downwards. */
@media (max-width: 480px) {
  .vvis-scene { flex-wrap: nowrap; align-items: flex-start; }
  .vvis-scene .vvis-panel { min-width: 0; }
  .vvis-scene .vvis-icon { width: clamp(36px, 11vw, 56px); }
  .vvis-scene .vvis-link { padding-top: 1rem; }
  .vvis-scene .vvis-label { font-size: .8125rem; }
  .vvis-scene.vvis-n4 { flex-direction: column; align-items: center; }
  .vvis-scene.vvis-n4 .vvis-panel { flex: none; max-width: 100%; }
  .vvis-scene.vvis-n4 .vvis-link { display: block; padding-top: 0; -webkit-transform: rotate(90deg); transform: rotate(90deg); }
}
