/* The sample at /demo (js/demo.js). Every rule starts at html[data-demo], which
   only the sample sets, so none of this reaches the real app. */
html[data-demo] { --demo-h: 36px; }

.demo-strip {
  position: sticky; top: 0; z-index: 55;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2px 10px;
  padding: calc(7px + env(safe-area-inset-top, 0px)) max(14px, env(safe-area-inset-right, 0px)) 7px max(14px, env(safe-area-inset-left, 0px));
  margin-left: calc(-1 * env(safe-area-inset-left, 0px)); margin-right: calc(-1 * env(safe-area-inset-right, 0px));
  background: var(--x-p2); color: var(--x-p2-ink);
  box-shadow: 0 .5px 0 var(--x-hairline);
  font-size: 13.5px; line-height: 20px; text-align: center; text-wrap: balance;
}
.demo-pill { flex: none; padding: 0 9px; border-radius: 999px; background: var(--x-p2-ink); color: var(--x-p2); font-weight: 600; letter-spacing: .01em; }
.demo-line { min-width: 0; }
.demo-line--short { display: none; }
@media (max-width: 859px) {
  .demo-strip { font-size: 12.5px; gap: 0 7px; }
  .demo-pill { padding: 0 8px; }
  .demo-line--long { display: none; }
  .demo-line--short { display: inline; }
}
.demo-cta { position: relative; display: inline-flex; align-items: center; min-height: 28px; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
/* The link is drawn 28px tall to keep the strip slim; its tap is 6px wider
   each side and 48px tall, none of it drawn. Centered, the strip's top edge
   (the link sits 7px below it) cut it to 42px (site sweep, 2026-11-13), so it
   starts at the strip's top and reaches 6px past the link below. */
.demo-cta::before { content: ""; position: absolute; left: -6px; right: -6px; top: -7px; height: 48px; }

/* A sheet (Add) covers the window, strip and all, and follows the visible area
   when the keyboard is up, so it carries a strip of its own as its first row
   (js/demo.js markSheets). The page strip sits under it (z-index 55 against the
   sheet's 60). */
.demo-strip--sheet { position: sticky; top: 0; z-index: 5; flex: none; margin: 0; padding: 7px 14px; }

/* The sticky laptop bar sits just under the strip, not beneath it; the strip
   already clears a notch, so the bar does not clear it twice. */
html[data-demo] .rail-host { padding-top: 0; }
@media (min-width: 860px) {
  html[data-demo] .rail-host { top: var(--demo-h, 36px); }
}

/* Connect, in the sample. */
.demo-page { padding: 48px 0 24px; }
.demo-page .start-stack { align-items: stretch; }
@media (min-width: 860px) { .demo-page { padding-top: 96px; } }
