/* Post-specific styles for "Training a model to open the gates of hell" */

.equation-block {
  margin: 1.35rem 0 1.35rem 2rem;
  text-align: center;
  font-size: 1.28rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.equation-block mjx-container[display="true"] {
  margin: 0.25rem 0;
  font-size: 128% !important;
}

.angel-quote {
  margin: 1.3rem 0 1.3rem 2rem;
  padding: 0.8rem 0 0.8rem 1rem;
  border-left: 3px solid rgba(255, 255, 255, 0.35);
  font-style: italic;
}

.angel-quote p {
  margin: 0;
}

.angel-quote cite {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.92rem;
  font-style: normal;
  opacity: 0.82;
}

.prologue-questions {
  margin: 0.55rem auto 0.95rem auto;
  width: min(780px, 92%);
  text-align: center;
}

.prologue-questions p {
  margin: 0.2rem 0;
  font-size: clamp(1.12rem, 2.6vw, 1.5rem);
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.cppn-explorer {
  margin: 0.75rem auto 1.2rem auto;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  width: fit-content;
  max-width: 96%;
}

.cppn-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  width: min(720px, 84vw);
  line-height: 0;
}

.cppn-feature {
  width: min(720px, 84vw);
  line-height: 0;
  margin: 0 auto 0.35rem auto;
}

.cppn-video-feature {
  width: 100%;
  aspect-ratio: 21 / 8;
  object-fit: cover;
  display: block;
  border-radius: 0;
  border: 0;
  background: transparent;
}

.cppn-video {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  border-radius: 0;
  border: 0;
  background: transparent;
}

@media (max-width: 900px) {
  .cppn-row {
    width: min(96vw, 560px);
  }
}

.post-image-row {
  margin: 0.45rem 0 0.9rem 0;
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 10px;
  grid-auto-rows: clamp(170px, 24vw, 300px);
}

.post-image-row img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 8px;
  object-fit: contain;
}

.post-image-single-right {
  margin: 0.45rem 0 0.9rem 0;
  display: flex;
  justify-content: center;
}

.post-image-single-right img {
  width: min(32%, 300px);
  height: auto;
  display: block;
  border-radius: 8px;
}

.post-image-flow {
  margin: 0.45rem 0 0.9rem 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  width: min(540px, 72%);
  margin-left: auto;
  margin-right: auto;
}

.post-image-flow img {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  display: block;
  border-radius: 8px;
  object-fit: cover;
}

.post-image-flow img:last-of-type {
  object-position: left center;
}

.post-image-flow-arrow {
  font-size: 1.45rem;
  line-height: 1;
  opacity: 0.8;
}

.visual-takeaway {
  width: min(760px, 94%);
  margin: 0.35rem auto 1rem auto;
  text-align: center;
  font-size: 0.96rem;
  color: var(--ink-dim);
}

.visual-takeaway strong {
  color: var(--ink);
}

@media (max-width: 700px) {
  .post-image-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .post-image-single-right {
    justify-content: center;
  }

  .post-image-single-right img {
    width: min(92vw, 360px);
  }

  .post-image-flow {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .post-image-flow-arrow {
    justify-self: center;
    transform: rotate(90deg);
  }
}

.two-models-lab {
  margin: 10px 0 16px;
  padding: 0;
  border: 0;
  background: transparent;
}

#two-models-canvas {
  width: 100%;
  aspect-ratio: 23 / 8;
  height: auto;
  display: block;
  border-radius: 8px;
  border: 0;
  background: transparent;
}

.two-models-controls {
  margin-top: 8px;
  display: flex;
  gap: 8px;
}

.two-models-controls button {
  border: 1px solid color-mix(in srgb, var(--rule) 64%, transparent);
  background: transparent;
  color: var(--ink-dim);
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
}

.delta-collapse-lab {
  margin: 18px 0 22px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--rule) 55%, transparent);
  border-radius: 14px;
  background:
    radial-gradient(120% 120% at 0% 0%, color-mix(in srgb, var(--bg) 84%, #e9f2ff 16%), transparent 55%),
    color-mix(in srgb, var(--bg) 95%, #ffffff 5%);
}

.delta-collapse-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.9fr) minmax(0, 1.45fr);
  gap: 14px;
  align-items: start;
}

.delta-collapse-explain {
  border: 1px solid color-mix(in srgb, var(--rule) 52%, transparent);
  border-radius: 10px;
  padding: 10px;
  background: color-mix(in srgb, var(--bg) 96%, #ffffff 4%);
}

.delta-collapse-explain h4 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.delta-collapse-explain p {
  margin: 0 0 8px;
  font-size: 0.93rem;
  color: var(--ink-dim);
}

.delta-collapse-explain .delta-live {
  margin: 0 0 5px;
  color: var(--ink);
}

.delta-collapse-plot {
  border: 1px solid color-mix(in srgb, var(--rule) 52%, transparent);
  border-radius: 10px;
  padding: 8px;
  background: color-mix(in srgb, var(--bg) 96%, #ffffff 4%);
}

#delta-collapse-canvas {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--rule) 55%, transparent);
  background: color-mix(in srgb, var(--bg) 92%, #ffffff 8%);
}

.delta-collapse-controls {
  margin-top: 8px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.93rem;
}

.delta-collapse-controls button {
  border: 1px solid var(--rule);
  background: var(--bg);
  color: var(--ink);
  padding: 6px 11px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
}

.delta-collapse-controls label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.evo-loop-lab {
  margin: 10px 0 16px;
  padding: 0;
  border: 0;
  background: transparent;
}

#evo-loop-canvas {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  border: 0;
  background: transparent;
}

.evo-search-lab {
  margin: 10px 0 16px;
  padding: 0;
  border: 0;
  background: transparent;
}

#evo-search-canvas {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  border: 0;
  background: transparent;
}

@media (max-width: 860px) {
  .delta-collapse-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}
