/* /engines: one card per place p'lisp runs. Theme tokens only (themes.css). */

main.engines { max-width: 1080px; }
.engines > p, .engines > h2 { max-width: 760px; }

.eng-key { font-size: 0.9375rem; color: var(--text-muted); }

.eng-badge {
  display: inline-block;
  vertical-align: middle;
  margin-left: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.6;
}
.eng-key .eng-badge { margin-left: 0; }
.eng-badge.is-ready { background: var(--accent); color: var(--accent-ink); }
.eng-badge.is-next { background: transparent; color: var(--gold); border: 1px solid var(--gold-dim); }

.eng-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 16px;
  margin: 28px 0 40px;
}

.eng-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: 0 3px 0 var(--shadow);
  overflow: hidden;
  scroll-margin-top: 24px;
}
.eng-card:target { border-color: var(--accent); }

.eng-media {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 800 / 722;
  background: var(--code-bg);
  border-bottom: 1px solid var(--line);
}
.eng-code {
  display: flex;
  align-items: center;
  padding: 16px;
  overflow: hidden;
}
.eng-code pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--code-string);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-variant-ligatures: none;
}

.eng-body { display: flex; flex-direction: column; flex: 1; padding: 4px 20px 20px; }
.eng-body h2 { margin: 16px 0 8px; font-size: 1.375rem; }
.eng-body p { margin: 0 0 10px; }
.eng-install { margin-top: auto !important; }
.eng-install .button { margin-top: 6px; }
.eng-small { font-size: 0.9375rem; color: var(--text-soft); }

.eng-copy {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  user-select: all;
  overflow-wrap: anywhere;
}
.eng-cmd {
  display: block;
  margin-top: 6px;
  padding: 12px 14px;
  background: var(--code-bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  font-size: 0.9375rem;
}

.button-quiet { background: var(--surface-2); box-shadow: 0 4px 0 var(--line); }
main a.button { color: var(--accent-ink); }
main a.button-quiet, main a.button-quiet:hover { color: var(--text); }
main a.button-quiet:hover { background: var(--surface-3); box-shadow: 0 4px 0 var(--accent-shadow); }

/* Clips: paused on the poster until hover (mouse) or mostly on screen (touch); see js/engine-clips.js. */
.eng-clip { position: relative; cursor: pointer; }
.eng-clip video { object-fit: cover; }
.eng-play {
  position: absolute; left: 12px; bottom: 14px; display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%; padding-left: 3px;
  background: var(--accent); color: var(--accent-ink); font-size: 16px; box-shadow: 0 3px 0 var(--accent-shadow);
  transition: opacity 0.2s;
}
.eng-clip.is-playing .eng-play { opacity: 0; }
