/* The live demos as a studio (live-studio.js; markup from tools/site/site_shell.py). Classes only: the owner console allows no style attributes. */

.ld-top { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin: 0 0 18px; }
.ld-top [data-ld-home] { margin-right: auto; }
.live-demos[data-ld-studio] { display: block; }

/* Products: one product per colour, the same everywhere in the studio. */
.ld-mark { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--chart-none); }
.ld-devices { background: var(--chart-1); } .ld-people { background: var(--chart-4); } .ld-signups { background: var(--chart-2); }
.ld-payments { background: var(--chart-3); } .ld-workflows { background: var(--chart-6); }

/* The overview: four tiles and the Workflows band. */
.ld-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ld-tile { display: flex; flex-direction: column; align-items: stretch; gap: 12px; text-align: left; padding: 22px 24px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: inherit; font-weight: 400; cursor: pointer; }
.ld-tile:hover, .ld-tile:focus, .ld-tile:active { border-color: var(--accent); background: var(--surface); color: var(--ink); transform: none; }
.ld-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ld-tile-h { display: flex; align-items: center; gap: 10px; }
.ld-tile-h .ld-mark { width: 12px; height: 12px; }
.ld-tile-name { font: 700 21px/1.2 var(--display); letter-spacing: -.02em; }
.ld-count { margin-left: auto; font-size: 13px; color: var(--muted); }
.ld-tile-line { color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.ld-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ld-chip { font-size: 13px; padding: 5px 11px; border-radius: var(--radius-pill); background: var(--surface-2); color: var(--ink); }
.ld-chip[hidden] { display: none; }
.ld-last { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.ld-last [data-ld-last] { color: var(--ink-2); text-align: right; }
.ld-last .badge, .ld-band-last .badge { font-size: 12px; padding: 2px 9px; }

.ld-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; margin-top: 16px; padding: 22px 26px;
  border-radius: var(--radius); background: var(--ink); color: var(--bg); }
.ld-band > div:first-child { max-width: 600px; }
.ld-band-h { margin: 0 0 6px; font-size: 21px; color: inherit; }
.ld-band p { margin: 0; color: var(--line-strong); font-size: 15px; line-height: 1.5; }
.ld-band .ld-band-last { margin-top: 8px; font-size: 13px; color: var(--muted); }
.ld-band .secondary, .ld-band .btn.secondary { background: transparent; color: var(--bg); border: 1px solid var(--ink-2); }
.ld-band .secondary:hover, .ld-band .btn.secondary:hover { border-color: var(--bg); }

/* The studio: the rail beside one demo. */
.ld-body { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.ld-rail { flex: 1 1 210px; max-width: 250px; position: sticky; top: 76px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.ld-rail[hidden] { display: none; }
.ld-rail .ld-rail-h { display: flex; align-items: center; gap: 8px; margin: 10px 10px 4px; font: 600 12px/1.3 var(--font); letter-spacing: 0; color: var(--muted); }
.ld-rail .ld-rail-h:first-child { margin-top: 4px; }
.ld-rail ul { list-style: none; margin: 0 0 6px; padding: 0; }
.ld-rail li[hidden] { display: none; }
.ld-rail button { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; border-radius: var(--radius-xs); background: transparent; color: var(--ink-2);
  font: 400 14px/1.3 var(--font); cursor: pointer; }
.ld-rail button:hover, .ld-rail button:focus, .ld-rail button:active { background: var(--bg-tint); color: var(--ink); transform: none; }
.ld-rail button[aria-current] { background: var(--accent-soft); color: var(--ink); font-weight: 600; }
.ld-stage { flex: 999 1 440px; min-width: 0; }
.ld-panel[hidden], .ld-switch[hidden], .ld-overview[hidden], .ld-studio[hidden] { display: none; }
.ld-panel > section > h2 { margin: 0 0 4px; font-size: 24px; }
.ld-panel > section > h2:focus { outline: none; }
.ld-panel > section > p { margin: 0 0 14px; color: var(--muted); max-width: 70ch; }
.ld-panel + .ld-panel:not([hidden]) { margin-top: 28px; }
.ld-switch { margin: 0 0 16px; }
.ld-switch button { padding: 7px 14px; font-size: 14px; font-weight: 600; border-radius: var(--radius-pill); background: var(--surface); color: var(--ink-2); border: 1px solid var(--line-strong); }
.ld-switch button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* The journey: a strip of five steps over the demo, and the combined decision beside it. */
.ld-steps { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.ld-steps[hidden], .ld-steps li[hidden] { display: none; }
.ld-steps li { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.ld-steps li b { font: 700 16px/1.25 var(--display); }
.ld-step-p { font-size: 12px; color: var(--muted); }
.ld-step-out { font-size: 13px; color: var(--muted); }
.ld-steps li.is-now { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.ld-steps li.is-now .ld-step-out { color: var(--accent); font-weight: 600; }
.ld-steps li.is-done .ld-step-out { color: var(--ok); font-weight: 600; }
.ld-sum { flex: 1 1 280px; max-width: 360px; display: flex; flex-direction: column; gap: 12px; padding: 22px 24px; border-radius: var(--radius); background: var(--ink); color: var(--bg); }
.ld-sum[hidden] { display: none; }
.ld-sum p { margin: 0; }
.ld-sum-k { font-size: 13px; color: var(--bg); opacity: .78; }   /* on the dark summary: --muted is too dim there */
.ld-sum-v { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ld-sum-v b { font: 700 22px/1.2 var(--display); }
.ld-sum-bar { height: 8px; border-radius: var(--radius-pill); background: var(--ink-2); overflow: hidden; }
.ld-sum-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--accent-line); transition: width .3s ease; }
.ld-sum-log { list-style: none; margin: 0; padding: 0; }
.ld-sum-log li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--ink-2); font-size: 14px; }
.ld-sum-log li span:first-child { color: var(--line-strong); }
.ld-sum-ask { font-size: 14px; line-height: 1.5; color: var(--line-strong); }
.ld-sum .btn.secondary { background: transparent; color: var(--bg); border: 1px solid var(--ink-2); }
.is-journey .ld-stage { flex-basis: 520px; }

@media (max-width: 760px) {
  .ld-tiles { grid-template-columns: minmax(0, 1fr); }
  .ld-rail { position: static; max-width: none; }
  .ld-sum { max-width: none; }
}
@media (prefers-reduced-motion: reduce) { .ld-sum-bar i { transition: none; } }
