/* The Flinglet panel on the homepage. The panel's own rules are the generated flinglet.css; this is only how it sits on this page. */
#flinglet-section { margin: 0 0 3rem; }
#flinglet .panel-skip { margin: 0; padding: 1.1rem 0 0; color: var(--muted); }
/* one left edge: the panel's content lines up with the page's header, headings and footer (the orange field still runs edge to edge) */
#flinglet-section #flinglet .stage { padding-left: 0; padding-right: 0; }
#flinglet .combined-note { margin: .6rem 0 0; color: var(--muted); font-size: .92rem; max-width: 34rem; }
#flinglet .copy-combined { margin-top: .7rem; }

/* Embedded in a page, not an app shell: the conversation keeps its own scroll, but the finished prompt takes the room it needs
   and the page does the scrolling. The wall and the idea strip step aside once the conversation has started. */
#flinglet .stage[data-phase="talking"] .wall-card,
#flinglet .stage[data-phase="talking"] .istrip { display: none; }
#flinglet .stage[data-phase="talking"] .preview { position: sticky; top: 1rem; align-self: start; }
#flinglet .make:has(#result:not([hidden])) { height: auto; min-height: 0; max-height: none; overflow: visible; }
#flinglet .make:has(#result:not([hidden])) .canvas { overflow: visible; padding-bottom: 1.5rem; }
@media (min-width: 981px) {
  #flinglet .stage[data-phase="talking"]:has(#result:not([hidden])) { grid-template-columns: minmax(0, 1fr); }
  #flinglet .stage[data-phase="talking"]:has(#result:not([hidden])) .make { grid-column: 1; grid-row: 1; max-width: 52rem; justify-self: center; }
  #flinglet .stage[data-phase="talking"]:has(#result:not([hidden])) .preview { display: none; }
}

/* Seams, as on flinger.ai. The homepage sky fades from its horizon straight into this field's colour (--seam, set per theme
   in style.css: Flinglet's orange in Day, flinger.ai's forest in Dusk, deep green in Terminal), so the field starts solid
   and only fades out at the bottom, into the page. One colour shift at each edge, never two back to back. */
#flinglet-section #flinglet .stage[data-phase="hero"]::before {
  margin-top: -48px; margin-bottom: -150px;   /* the stage has 42px of top padding: cover it all, so no strip of page shows at the seam */
  border-image: linear-gradient(to bottom, var(--seam) 0, var(--seam) calc(100% - 210px), var(--bg) 100%) fill 0 // 0 100vmax;
}
@media (max-width: 650px) {
  #flinglet-section #flinglet .stage[data-phase="hero"] .hero { border-image: linear-gradient(var(--seam), var(--seam)) fill 0 // 0 100vmax; }
  #flinglet-section #flinglet .stage[data-phase="hero"] .make { border-image: linear-gradient(to bottom, var(--seam) 0, var(--seam) calc(100% - 110px), var(--bg) 100%) fill 0 // 0 100vmax; }
}
