/* The browser demo (Try it page and the home page): the viewer in a framed stage inside the page column, like the hero
 * player (same border colour and orange light), a header strip with the circuit name, and the keys under it. */
.ty-pick { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ty-pick a { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border: 1px solid var(--rule); border-radius: var(--radius-pill);
  color: var(--soft); text-decoration: none; font-size: 14px; font-weight: 500; white-space: nowrap; transition: border-color var(--motion-micro) linear, color var(--motion-micro) linear; }
.ty-pick a.on { border-color: var(--accent); color: var(--text); background: var(--surface); }
.ty-demo { margin: 0 0 24px; max-width: 820px; padding: 14px 18px; border: 1px solid var(--rule); border-left: 3px solid var(--accent); border-radius: var(--radius-surface);
  background: var(--surface); color: var(--soft); font-size: 16px; line-height: 1.5; }
.ty-demo b { color: var(--text); font-weight: 600; }
.ty-demo a, .ty-own { color: var(--text); text-decoration: none; background: linear-gradient(var(--accent), var(--accent)) 0 100% / 100% 1px no-repeat; transition: color var(--motion-micro) linear; }
.ty-tag { flex: none; height: 22px; padding: 0 9px; display: inline-flex; align-items: center; border: 1px solid var(--accent); border-radius: var(--radius-pill);
  color: var(--accent); font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }

.demo { position: relative; isolation: isolate; margin: 28px 0 0; }
.demo::before { /* light from the screen, as behind the hero player */
  content: ''; position: absolute; inset: -6% 0 8%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 107, 0, .12), rgba(255, 107, 0, .03) 55%, transparent 100%); }
.demo-head { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 8px 14px; background: var(--surface);
  border: 1px solid #3A2A1E; border-bottom-color: var(--rule); border-radius: 2px 2px 0 0; font-size: 14px; }
.ty-now { flex: 1; min-width: 0; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ty-own { flex: none; white-space: nowrap; color: var(--soft); }
.demo-links { flex: none; display: inline-flex; gap: 18px; }
.demo-frame { position: relative; height: clamp(560px, calc(100vh - 150px), 780px); background: #0D0D0D; overflow: hidden;
  border: 1px solid #3A2A1E; border-top: 0; border-radius: 0 0 2px 2px; }
.demo-app { display: block; width: 100%; height: 100%; border: 0; background: #0D0D0D; }
.demo-keys { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 16px 0 0; padding: 0; list-style: none; font-size: 14px; color: var(--soft); }
.demo-keys li { display: inline-flex; align-items: center; gap: 6px; }
.demo-keys kbd + kbd { margin-left: -2px; }
.demo-keys .t { display: none; }
@media (hover: none) and (pointer: coarse) { .demo-keys .m { display: none; } .demo-keys .t { display: inline-flex; } }

/* home page: a picture of the viewer until Run is pressed */
.hd-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: left top; opacity: .28; }
.hd-start { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 0 16px; text-align: center; }
.hd-start .btn { height: 52px; padding: 0 26px; font-size: 15px; }
.hd-size { color: var(--soft); font-size: 13px; }

/* Try it page */
.ty-sec { padding-top: 72px; }
.ty-sec h3 { font-size: 20px; font-weight: 700; margin: 0 0 8px; }
.ty-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.ty-card { display: flex; flex-direction: column; border: 1px solid var(--rule); border-radius: var(--radius-surface); text-decoration: none; color: var(--text); background: var(--ground); transition: border-color var(--motion-micro) linear; }
.ty-card img { width: 100%; height: auto; aspect-ratio: 800 / 602; object-fit: cover; border-bottom: 1px solid var(--rule); }
.ty-t { font-weight: 700; font-size: 17px; padding: 14px 18px 4px; }
.ty-d { color: var(--soft); font-size: 15px; line-height: 1.45; padding: 0 18px; flex: 1; }
.ty-go { padding: 12px 18px 16px; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.ty-two { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--rule); }
.ty-two > div { padding: 26px 28px 10px 0; min-width: 0; }
.ty-two > div + div { padding-left: 28px; border-left: 1px solid var(--rule); }
.ty-list { margin: 0 0 16px; padding: 0 0 0 18px; color: var(--soft); font-size: 16px; }
.ty-list li { margin: 0 0 8px; }
.ty-list li::marker { color: var(--accent); }
.ty-cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 0; }
#limits { padding-bottom: 96px; }

@media (hover: hover) {
  .ty-pick a:hover, .ty-card:hover { border-color: var(--accent); color: var(--text); }
  .ty-own:hover, .ty-demo a:hover { color: var(--accent); }
}
@media (hover: none) { .ty-pick a:active, .ty-card:active { border-color: var(--accent); } }
@media (max-width: 1080px) { .ty-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .demo { margin-top: 22px; }
  .demo-head { gap: 10px; padding: 8px 12px; }
  .demo-frame { height: max(420px, calc(100svh - 170px)); }
  .demo-keys { gap: 8px 16px; font-size: 13px; }
  .ty-grid { grid-template-columns: minmax(0, 1fr); }
  .ty-two { grid-template-columns: minmax(0, 1fr); }
  .ty-two > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); }
  .ty-sec { padding-top: 56px; }
}
@media (max-width: 420px) { .demo-head { flex-wrap: wrap; row-gap: 6px; } .ty-now { order: 3; flex-basis: 100%; } .ty-own, .demo-links { margin-left: auto; font-size: 13px; } .demo-links { gap: 14px; } }
@media (max-width: 640px) { .demo-head:has(.demo-links) { flex-wrap: wrap; row-gap: 6px; } .demo-head:has(.demo-links) .ty-now { order: 3; flex-basis: 100%; } .demo-links { margin-left: auto; font-size: 13px; gap: 14px; } }
/* a phone on its side: the stage fills the screen under the top bar when scrolled to */
@media (max-height: 520px) and (orientation: landscape) {
  .demo-frame { height: calc(100svh - 60px - 46px - 8px); min-height: 0; }
}

/* phones: the bar that says the demo paused while the page scrolls (assets/demo-pause.js) */
.demo-paused { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 30;
  display: flex; align-items: center; gap: 12px; padding: 10px 8px 10px 14px; background: var(--surface); border: 1px solid var(--rule);
  border-left: 3px solid var(--accent); border-radius: var(--radius-surface); color: var(--soft); font-size: 14px; line-height: 1.3;
  opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity var(--motion-micro) linear, transform var(--motion-micro) linear; }
.demo-paused.on { opacity: 1; transform: none; pointer-events: auto; }
.demo-paused-t { flex: 1; min-width: 0; }
.demo-paused-t b { color: var(--text); font-weight: 600; }
.demo-paused .btn { flex: none; }
.demo-paused-x { flex: none; width: 36px; height: 36px; border: 0; background: none; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
