/* Keep the headline for the entrance, then give its space to the live example.
   The scroll controller owns --creation-focus, including reverse scrolling. */
#creation { --creation-focus: 0; --creation-heading-height: 90px; --creation-heading-gap: 20px; }
#creation .creation-step { border-top: 0; }
#creation .creation-step-title.action-link {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 28px;
  align-items: center;
  justify-content: initial;
  gap: 10px;
  margin: 0;
  min-width: 0;
  padding: 14px 12px;
  text-align: left;
  font-size: 16px;
}
#creation .creation-step-tabs { display: grid; gap: 8px; }
#creation .creation-step-title small { text-align: center; font-variant-numeric: tabular-nums; line-height: 1.2; }
#creation .creation-step-title .creation-step-name { line-height: 1.4; min-width: 0; white-space: normal; word-break: keep-all; }
#creation .creation-step-title b { margin: 0; }
#creation.creation-motion-enabled .creation-stage {
  height: var(--creation-mobile-height, 100svh);
  min-height: 0;
  top: 0;
  overflow: hidden;
}
#creation.creation-motion-enabled .creation-layout {
  height: 100%;
  padding-top: var(--creation-layout-top, 110px);
  padding-bottom: var(--consultation-clearance, 132px);
  display: flex;
  flex-direction: column;
  gap: 0;
}
#creation.creation-motion-enabled .creation-heading {
  display: block;
  flex: none;
  height: calc((var(--creation-heading-height) + var(--creation-heading-gap)) * (1 - var(--creation-focus)));
  min-height: 0;
  margin: 0;
  overflow: hidden;
}
#creation.creation-motion-enabled .creation-heading > div {
  transform: translate3d(0, calc(-1 * var(--creation-heading-height) * var(--creation-focus)), 0);
  opacity: calc(1 - var(--creation-focus));
  will-change: transform, opacity;
}
#creation.creation-motion-enabled .creation-content { flex: 1; min-height: 0; align-items: stretch; }
#creation.creation-motion-enabled .creation-presentations { position: relative; min-height: 0; height: 100%; display: block; }
#creation.creation-motion-enabled .creation-presentation { position: absolute; inset: 0; height: 100%; min-height: 0; }
#creation.creation-motion-enabled .creation-board { height: 100%; min-height: 0; display: flex; flex-direction: column; }
#creation.creation-motion-enabled .creation-board-top { flex: none; }
#creation.creation-motion-enabled .creation-screens { flex: 1; min-height: 0; overflow: hidden; }
#creation.creation-motion-enabled .creation-chat { min-height: 0; display: flex; flex-direction: column; }
#creation.creation-motion-enabled .creation-chat-heading { flex: none; }
#creation.creation-motion-enabled .creation-chat-window { height: auto; flex: 1; min-height: 0; overflow: hidden; }
#creation.creation-motion-enabled .creation-result { min-height: 0; }
#creation.creation-motion-enabled .creation-preview-screen { min-height: 0; }
#creation.creation-motion-enabled .creation-footnote { display: none; }

@media (min-width: 1101px) {
  #creation.creation-motion-enabled .creation-content { gap: 28px; grid-template-columns: minmax(200px, .64fr) minmax(0, 2.5fr); }
  #creation.creation-motion-enabled .handoff-demo { height: 100%; min-height: 0; align-self: stretch; }
  #creation.creation-motion-enabled .handoff-demo-view { overflow-y: auto; }
  #creation.creation-motion-enabled .search-demo { height: 100%; display: flex; flex-direction: column; }
  #creation.creation-motion-enabled .search-demo-heading,
  #creation.creation-motion-enabled .search-modes,
  #creation.creation-motion-enabled .search-demo-note { flex: none; }
  #creation.creation-motion-enabled .search-views { flex: 1; min-height: 0; grid-template-rows: minmax(0, 1fr); }
  #creation.creation-motion-enabled .search-view { min-height: 0; overflow-y: auto; }
  #creation.creation-motion-enabled .search-conversation { display: flex; flex-direction: column; height: 100%; min-height: 0; }
  #creation.creation-motion-enabled .search-conversation-label,
  #creation.creation-motion-enabled .search-user-message,
  #creation.creation-motion-enabled .search-aeo-scroll-hint { flex: none; }
  #creation.creation-motion-enabled .search-ai-message { flex: 1; min-height: 0; align-items: stretch; grid-template-rows: minmax(0, 1fr); }
  #creation.creation-motion-enabled .search-answer-mark { align-self: start; }
  #creation.creation-motion-enabled :is(.search-aeo-scroll, .search-geo-scroll) { height: 100%; max-height: none; min-height: 0; }

}
@media (max-width: 1100px) {
  #creation { --creation-heading-gap: 16px; }
  #creation .creation-step-title.action-link {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 12px 34px;
    justify-items: center;
    align-content: center;
    gap: 3px;
    padding: 8px 4px;
    min-height: 68px;
    font-size: 12px;
    text-align: center;
  }
  #creation .creation-step-title small { font-size: 10px; }
  #creation .creation-step-title .creation-step-name { display: flex; align-items: center; justify-content: center; height: 34px; width: 100%; text-align: center; }
  #creation .creation-step-title b { display: none; }
  #creation.creation-motion-enabled .creation-step-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
}
@media (max-width: 700px) and (orientation: portrait) {
  /* Dock measurement already reserves 12px; add a little breathing room. */
  #creation.creation-motion-enabled .creation-layout {
    padding-bottom: calc(var(--consultation-clearance, 132px) + 8px);
  }
}
@media (min-width: 701px) and (max-width: 1100px) {
  #creation .creation-step-title.action-link { grid-template-columns: 22px minmax(0, 1fr); grid-template-rows: 34px; min-height: 52px; font-size: 14px; padding: 7px 8px; gap: 5px; }
  #creation .creation-step-title small { font-size: 11px; }
}
@media (max-width: 360px) {
  #creation .creation-step-title.action-link { font-size: 11px; }
}
@media (max-width: 1100px) and (max-height: 500px) and (orientation: landscape) {
  #creation { --creation-heading-gap: 8px; }
  #creation.creation-motion-enabled .creation-layout { padding-top: 80px; }
  #creation.creation-motion-enabled h2 { font-size: 20px; line-height: 1.3; }
  #creation.creation-motion-enabled h2 br { display: none; }
  #creation .creation-step-title.action-link { grid-template-columns: 18px minmax(0, 1fr); grid-template-rows: 30px; min-height: 38px; padding: 3px 6px; gap: 3px; font-size: 11px; }
  #creation .creation-step-title .creation-step-name { height: 30px; }
  .creation-tight-landscape #creation .creation-step-title.action-link { grid-template-columns: minmax(0, 1fr); grid-template-rows: 10px 30px; min-height: 48px; padding: 3px 2px; }
}
@media print {
  #creation.creation-motion-enabled .creation-stage,
  #creation.creation-motion-enabled .creation-layout,
  #creation.creation-motion-enabled .creation-heading { height: auto; overflow: visible; }
  #creation.creation-motion-enabled .creation-heading > div { opacity: 1; transform: none; }
  #creation.creation-motion-enabled .creation-presentation { position: static; height: auto; }
}
