#study .recipe-study-map { display: grid; gap: clamp(16px, 2.5vw, 26px); }

#study .recipe-overview {
  min-width: 0;
  margin: 0;
  padding: 6px 0 clamp(5px, 1.2vw, 13px);
}

#study .recipe-overview svg,
#study .recipe-topic-diagram {
  display: block;
  width: 100%;
  height: auto;
  margin-inline: auto;
  color: #253e4c;
  fill: currentColor;
  font-family: var(--font-sans, system-ui);
  font-size: 17px;
}

#study .recipe-overview svg { max-width: 740px; }

#study .recipe-topic-diagram {
  max-width: 324px;
  width: calc(100% + clamp(10px, 1.6vw, 20px));
  justify-self: center;
  grid-area: diagram;
  font-size: 21px;
  overflow: hidden;
}

.recipe-map-input { fill: none; stroke: #8095a0; stroke-width: .9; }
.recipe-map-frame { fill: #fff; stroke: #cbd7dd; stroke-width: .9; }
.recipe-map-module { stroke-width: 1.1; }
.recipe-map-encoder { fill: #eff2f2; stroke: #899da3; }
.recipe-map-predictor { fill: #e4edf3; stroke: #7293a7; }
.recipe-map-latents { fill: #edf4f7; stroke: #82a0b1; }
.recipe-map-expert { fill: #f5e9e2; stroke: #b88b75; }
.recipe-map-flame { fill: #a66044; }
.recipe-map-symbol { font: italic 22px Georgia, "Times New Roman", serif; }
.recipe-map-output { font-size: 13px; }

.recipe-map-wire,
.recipe-map-arrow {
  fill: none;
  stroke: #496678;
  stroke-width: 1.4;
}

.recipe-map-arrow { marker-end: url(#recipe-map-arrow); }

#study .recipe-overview[data-focus] [data-recipe-layer],
#study .recipe-topic-diagram .recipe-mini-muted { opacity: .24; }

#study .recipe-overview[data-focus="study-action"] [data-recipe-layer="action"],
#study .recipe-overview[data-focus="study-targets"] [data-recipe-layer="targets"],
#study .recipe-overview[data-focus="study-targets"] [data-recipe-layer="dynamics"],
#study .recipe-overview[data-focus="study-collapse"] [data-recipe-layer="collapse"],
#study .recipe-overview[data-focus="study-dynamics"] [data-recipe-layer="collapse"] { opacity: 1; }

@media (max-width: 540px) {
  #study .recipe-overview svg { font-size: 20px; }
  .recipe-map-output { font-size: 15px; }
}

@media (prefers-reduced-motion: no-preference) {
  #study .recipe-overview [data-recipe-layer] { transition: opacity .18s ease; }
}
